From c01868ef2cb82cd4d23f28dc988b300ba986f9b0 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 5 Jul 2025 01:02:43 +0000 Subject: [PATCH] Update self hosted dependency --- libs/deps/imslib.min.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/libs/deps/imslib.min.js b/libs/deps/imslib.min.js index 3db52b6e9ab..103364e0db3 100644 --- a/libs/deps/imslib.min.js +++ b/libs/deps/imslib.min.js @@ -1,17 +1,2 @@ -// Built 2025-03-28T01:41:01.503Z - Last Modified 2025-03-27T09:51:25.000Z -var roll=function(){ -/*! ***************************************************************************** - Copyright (c) Microsoft Corporation. All rights reserved. - Licensed under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of the - License at http://www.apache.org/licenses/LICENSE-2.0 - - THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED - WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, - MERCHANTABLITY OR NON-INFRINGEMENT. - - See the Apache Version 2.0 License for specific language governing permissions - and limitations under the License. - ***************************************************************************** */ -var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};function t(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function a(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.keys(a)),u=c.next();!u.done;u=c.next()){var l=u.value;if(r===l||r.endsWith("."+l))return new e(!0,a[l],o)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}}return new e(!1,o)},e.prototype.shouldFallbackToAdobe=function(e){return!!this.proxied&&("feature_disabled"===e.error&&"cdsc"===e.error_description)},e.THIRD_PARTY_DOMAINS_PROD={"behance.net":"https://sso.behance.net"},e.THIRD_PARTY_DOMAINS_STAGE={"s2stagehance.com":"https://sso.s2stagehance.com"},e}(),m=new(function(){function e(){this.baseUrlAdobe="",this.baseUrlServices="",this.checkTokenEndpoint=new g,this.jslibver="v2-v0.46.0-19-g35c1ff9"}return e.prototype.loadEnvironment=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r="");var n=e===l.STAGE;n?(this.baseUrlAdobe="https://ims-na1-stg1.adobelogin.com",this.baseUrlServices="https://adobeid-na1-stg1.services.adobe.com"):(this.baseUrlAdobe="https://ims-na1.adobelogin.com",this.baseUrlServices="https://adobeid-na1.services.adobe.com"),this.checkTokenEndpoint=g.computeEndpoint(t,r,n,this.baseUrlServices)},e}());function k(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function y(e,t){if(null==e)return t;if(e===t)return e;if(!k(e))return e;var r=Object.assign({},e);return k(t)&&Object.keys(t).forEach((function(n){var o,i;k(t[n])?n in e?r[n]=y(e[n],t[n]):Object.assign(r,((o={})[n]=t[n],o)):Object.assign(r,((i={})[n]=t[n],i))})),r}var w=new(function(){function e(){this.getCustomApiParameters=function(e,t){return e[t]||{}}}return e.prototype.mergeExternalParameters=function(e,t,r){return y(this.getCustomApiParameters(t,r),e)},e.prototype.toJson=function(e){try{return"string"!=typeof e?e:JSON.parse(e)}catch(e){return null}},e}()),b=function(){function e(){}return e.getInitialRedirectUri=function(e,t){var r=e.redirect_uri||t||window.location.href,n="function"==typeof r?r():r,o=n.indexOf("from_ims");return-1===o?n:("#"===n[o-1]&&o--,n.substr(0,o))},e.createDefaultRedirectUrl=function(e,t,r,n){var o=this.getInitialRedirectUri(r,e),i=this.createOldHash(o);return i.indexOf("?")>0?i+"&client_id="+t+"&api="+n:i+"?client_id="+t+"&api="+n},e.createRedirectUrl=function(e,t,r,n,o){void 0===o&&(o="");var i=this.createDefaultRedirectUrl(e,t,r,n);(o=o||r.scope||"")&&(i=i+"&scope="+o);var s=r.reauth||"";return s&&(i=i+"&reauth="+s),i},e.createOldHash=function(e){var t=e.indexOf("#");return t<0?e+"#old_hash=&from_ims=true":e.substring(0,t)+"#old_hash="+e.substring(t+1)+"&from_ims=true"},e.mergeApiParamsWithExternalParams=function(e,t,r){return y(w.getCustomApiParameters(e,r),t)},e}(),S=function(){var e=this;this.composeRedirectUrl=function(e){var t=e.apiParameters,n=e.externalParameters,o=void 0===n?{}:n,i=e.adobeIdRedirectUri,s=void 0===i?"":i,a=e.clientId,c=e.locale,u=e.state,l=void 0===u?{}:u,d=e.scope,p=void 0===d?o.scope||t.scope||"":d,h=b.mergeApiParamsWithExternalParams(t,o,"authorize");l&&(h.state=y(h.state||{},l));var f=b.createRedirectUrl(s,a,h,"authorize",p),v=o.locale||c||"",g=e.response_type,k=void 0===g?h.response_type||"":g;return r(r({},h),{client_id:a,scope:p,locale:v,response_type:k,jslVersion:m.jslibver,redirect_uri:f})},this.createRedirectUrl=function(t){var r=e.composeRedirectUrl(t),n=v.uriEncodeData(r);return m.baseUrlAdobe+"/ims/authorize/v1?"+n}},T=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.signIn=function(e){var r=t.createRedirectUrl(e);v.setHrefUrl(r)},t.authorizeToken=function(e,r){var n=t.composeRedirectUrl(r);e&&(n.user_assertion=e,n.user_assertion_type="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),t.createAuthorizeForm(n).submit()},t}return t(r,e),r.prototype.createAuthorizeForm=function(e){var t=m.baseUrlAdobe+"/ims/authorize/v1",r=document.createElement("form");r.style.display="none",r.setAttribute("method","post"),r.setAttribute("action",t);var n=null,o=null,i="";for(var s in e){if("object"==typeof(o=e[s])){if(0===Object.keys(o).length)continue;i=JSON.stringify(o)}else i=o;""!==i&&(n=this.createFormElement("input","text",s,i),r.appendChild(n))}return document.getElementsByTagName("body")[0].appendChild(r),r},r.prototype.createFormElement=function(e,t,r,n){var o=document.createElement(e);return o.setAttribute("type",t),o.setAttribute("name",r),o.setAttribute("value",n),o},r}(S),I=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/,_=["https://auth.services.adobe.com","https://auth-stg1.services.adobe.com","https://localhost.corp.adobe.com:9000"],R=new function(){var e=this;this.windowObjectReference=null,this.previousUrl="",this.openSignInWindow=function(t,r,n,o){e.onProcessLocation=o,e.allowOrigin=n.allowOrigin,e.timerId&&clearInterval(e.timerId),window.removeEventListener("message",e.receiveMessage),window.addEventListener("message",e.receiveMessage),e.broadcastChannel&&e.broadcastChannel.close(),e.broadcastChannel=new BroadcastChannel("imslib"),e.broadcastChannel.onmessage=e.receiveMessage;var i="popup=yes, width="+n.width+", height="+n.height+", top="+n.top+", left="+n.left;!e.windowObjectReference||e.windowObjectReference&&e.windowObjectReference.closed?e.windowObjectReference=window.open(t,n.title,i):e.previousUrl!==t?(e.windowObjectReference=window.open(t,n.title,i),e.windowObjectReference&&e.windowObjectReference.focus()):e.windowObjectReference.focus(),e.previousUrl=t},this.receiveMessage=function(t){if(a(_,[e.allowOrigin]).includes(t.origin)){try{if(!I.test(t.data))return void console.warn("refused to receive message containing unknown data format",t.data)}catch(e){return void console.error(e)}e.broadcastChannel&&e.broadcastChannel.close(),e.onProcessLocation&&e.onProcessLocation(t.data)}else console.warn("refused to receive message from origin not whitelisted",t.origin)}},P=function(e){function n(t,n){var o=e.call(this)||this;return o.signIn=function(e){e.state=r(r({},e.state),{imslibmodal:!0});var t=e.state.nonce,n=o.createRedirectUrl(e);R.openSignInWindow(n,t,o.popupSettings,o.onPopupMessage)},o.onPopupMessage=t,o.popupSettings=n,o}return t(n,e),n}(S),A=function(){function e(e,t){this.status=0,this.data="",this.status=e,this.data=this.toJson(t)}return e.prototype.toJson=function(e){try{return"string"!=typeof e?e:JSON.parse(e)}catch(t){return e}},e}(),E=new(function(){function e(){}return e.prototype.http=function(e){return new Promise((function(t,r){var n=new(0,window.XMLHttpRequest);"boolean"==typeof e.withCredentials?n.withCredentials=e.withCredentials:n.withCredentials=!0,"number"==typeof e.timeout&&(n.timeout=e.timeout),n.open(e.method,e.url,!0);var o;n.onload=function(){return this.status>=200&&this.status<300?t(new A(this.status,this.response)):r(new A(this.status,this.response))},n.onerror=function(){var e=new A(this.status,this.response);return r(e)},n.ontimeout=function(){var e=new A(0,"timeout");return r(e)},n.onabort=function(){var e=new A(0,"aborted");return r(e)},(o=e.headers)&&Object.keys(o).forEach((function(e){n.setRequestHeader(e,o[e])})),n.send(e.data)}))},e.prototype.post=function(e,t,r,n,o){return void 0===r&&(r={}),this.http({headers:r,method:"POST",url:e,data:t,withCredentials:n,timeout:o})},e.prototype.get=function(e,t,r,n){return void 0===t&&(t={}),this.http({headers:t,method:"GET",url:e,withCredentials:r,timeout:n})},e}()),O=function(){this.probe=function(e,t,r){if(void 0===r&&(r=2e3),!e||0===e.length)return Promise.resolve([]);for(var n={"Content-Type":"application/json","Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:0,"X-IMS-CLIENTID":t},o="/ims/cdsc_probe?"+v.uriEncodeData({client_id:t}),i=[],s=[],a=function(t){var a=e[t]+o;s.push(E.post(a,{},n,!1,r).then((function(e){return 200==e.status&&i.push(t)})).catch((function(){})))},c=0;c=0?new G("ride_pba_idle_session","",!0):null;var o=this.addRedirectUriToJump(r,n);return new G(r,o)},e.prototype.addRedirectUriToJump=function(e,t){if(!t||"string"!=typeof t)return"";var r=t;this.adobeIdThinData||(this.adobeIdThinData=new H);var n=this.adobeIdThinData.computeRideRedirectUri(e);if(!n||0===n.length)return r;try{var o=new URL(r);return o.searchParams.append("redirect_uri",n),o.toString()}catch(e){return r}},e.prototype.isUnauthorizedException=function(e){var t=e.status;return 401===(void 0===t?0:t)},e}()),J=new(function(){function e(){this.triggerOnError=null}return e.prototype.post=function(e,t,r){var n=this;void 0===r&&(r={});var o=z.getCachedApiResponse(e,t);if(o){var i=o.status,s=o.data;return 200===i?Promise.resolve(s):Promise.reject(s)}return E.post(e,t,r).then((function(r){return n.storeApiResponse(e,JSON.stringify(t),r)})).catch((function(r){return n.verifyError(e,JSON.stringify(t),r)}))},e.prototype.get=function(e,t){var r=this;void 0===t&&(t={});var n=z.getCachedApiResponse(e);if(n){var o=n.status,i=n.data;return 200===o?Promise.resolve(i):Promise.reject(i)}return E.get(e,t).then((function(t){return r.storeApiResponse(e,"",t)})).catch((function(t){return r.verifyError(e,"",t)}))},e.prototype.verifyError=function(e,t,r){this.storeApiResponse(e,t,r);var n=B.verify(r,e);return Promise.reject(n||r.data)},e.prototype.storeApiResponse=function(e,t,r){return void 0===t&&(t=""),z.storeApiResponse(e,t,r),Promise.resolve(r.data)},e}()),K=function(){function e(e){void 0===e&&(e={}),this.CONTENT_FORM_ENCODED="application/x-www-form-urlencoded;charset=utf-8",this.apiParameters=e}return e.prototype.validateToken=function(e){var t=e.token,n=e.client_id,o=e.type,i=v.uriEncodeData(r(r({},w.getCustomApiParameters(this.apiParameters,"validate_token")),{type:o||"access_token",client_id:n,token:t})),s=m.baseUrlAdobe+"/ims/validate_token/v1?jslVersion="+m.jslibver,a=this.formEncoded();return J.post(s,i,a)},e.prototype.getProfile=function(e){var t=e.token,n=e.client_id,o=r({},w.getCustomApiParameters(this.apiParameters,"profile")),i=this.createAuthorizationHeader(t);this.addClientIdInHeader(n,i);var s=v.uriEncodeData(r({client_id:n},o)),a=m.baseUrlAdobe+"/ims/profile/v1?"+s+"&jslVersion="+m.jslibver;return J.get(a,i)},e.prototype.getUserInfo=function(e){var t=e.token,n=e.client_id,o=r({},w.getCustomApiParameters(this.apiParameters,"userinfo")),i=this.createAuthorizationHeader(t);this.addClientIdInHeader(n,i);var s=v.uriEncodeData(r({client_id:n},o)),a=m.baseUrlAdobe+"/ims/userinfo/v1?"+s+"&jslVersion="+m.jslibver;return J.get(a,i)},e.prototype.logoutToken=function(e){var t=e.client_id,n=e.token,o=r({},w.getCustomApiParameters(this.apiParameters,"logout_token")),i=m.baseUrlServices+"/ims/logout/v1?jslVersion="+m.jslibver,s=this.addClientIdInHeader(t);return J.post(i,r({client_id:t,access_token:n},o),s)},e.prototype.checkStatus=function(){var e=m.baseUrlServices+"/ims/check/v1/status";return J.get(e)},e.prototype.checkToken=function(e,t,o){var i=e.client_id,s=e.scope,a=t.arkoseSessionToken,c=n(t,["arkoseSessionToken"]),u=r({},w.mergeExternalParameters(c,this.apiParameters,"check_token")),l=r(r({},u),{client_id:i,scope:s});return a&&(l.arkose_session_token=a),o&&(l.user_id=o),this.callCheckToken(v.uriEncodeData(l),i,"/check/v6/token?jslVersion="+m.jslibver)},e.prototype.switchProfile=function(e,t,n){void 0===n&&(n="");var o=e.client_id,i=e.scope,s=void 0===i?"":i,a=r({},w.mergeExternalParameters(t,this.apiParameters,"check_token")),c=v.uriEncodeData(r(r({},a),{client_id:o,scope:s,user_id:n}));return this.callCheckToken(c,o,"/check/v6/token?jslVersion="+m.jslibver)},e.prototype.listSocialProviders=function(e){var t=e.client_id,n=r({},w.getCustomApiParameters(this.apiParameters,"providers")),o=v.uriEncodeData(r({client_id:t},n)),i=m.baseUrlServices+"/ims/social/v2/providers?"+o+"&jslVersion="+m.jslibver,s=this.addClientIdInHeader(t);return J.get(i,s)},e.prototype.exchangeIjt=function(e,t){var n=e.client_id,o=r({},w.getCustomApiParameters(this.apiParameters,"ijt")),i=m.baseUrlServices+"/ims/jump/implicit/"+t,s=v.uriEncodeData(r({client_id:n},o)),a=i+"?"+s+"&jslVersion="+m.jslibver;a.length>2048&&(delete o.redirect_uri,a=i+"?"+(s=v.uriEncodeData(o)));var c=this.addClientIdInHeader(n);return J.get(a,c)},e.prototype.avatarUrl=function(e){return m.baseUrlAdobe+"/ims/avatar/download/"+e},e.prototype.getReleaseFlags=function(e){var t=e.token,n=e.client_id,o=r({},w.getCustomApiParameters(this.apiParameters,"fg_value")),i=this.createAuthorizationHeader(t);this.addClientIdInHeader(n,i);var s=v.uriEncodeData(r({client_id:n},o)),a=m.baseUrlAdobe+"/ims/fg/value/v1?"+s+"&jslVersion="+m.jslibver;return J.get(a,i)},e.prototype.getTransitoryAuthorizationCode=function(e,t,n){void 0===t&&(t={});var o=r({},w.mergeExternalParameters(t,this.apiParameters,"check_token")),i=v.uriEncodeData(r(r({},o),e));return this.callCheckToken(i,n,"/check/v6/token?client_id="+n+"&jslVersion="+m.jslibver)},e.prototype.getTokenFromCode=function(e,t){void 0===t&&(t={});var n=r({},w.mergeExternalParameters(t,this.apiParameters,"token"));n.grant_type="authorization_code",delete e.other;var o=m.baseUrlServices+"/ims/token/v3?jslVersion="+m.jslibver,i=v.uriEncodeData(r(r({},n),e)),s=this.formEncoded();return this.addClientIdInHeader(e.client_id,s),J.post(o,i,s)},e.prototype.jumpToken=function(e,t,n){void 0===t&&(t={});var o=r({},w.mergeExternalParameters(t,this.apiParameters,"jumptoken")),i=m.baseUrlServices+"/ims/jumptoken/v1?client_id="+n+"&jslVersion="+m.jslibver,s=v.uriEncodeData(r(r({},o),e)),a=this.formEncoded();return this.addClientIdInHeader(n,a),J.post(i,s,a)},e.prototype.jumpTokenToDevice=function(e,t,n,o){void 0===t&&(t={});var i=r({},w.mergeExternalParameters(t,this.apiParameters,"jumptoken_to_device"));!i.user_id&&o&&(i.user_id=o);var s=m.baseUrlServices+"/ims/jumptoken/v2?client_id="+n+"&jslVersion="+m.jslibver,a=v.uriEncodeData(r(r({},i),e)),c=this.formEncoded();return this.addClientIdInHeader(n,c),J.post(s,a,c)},e.prototype.socialHeadlessSignIn=function(e,t){void 0===t&&(t={});var n=r({},w.mergeExternalParameters(t,this.apiParameters,"jumptoken")),o=m.baseUrlServices+"/ims/social/v2/native?jslVersion="+m.jslibver,i=v.uriEncodeData(r(r(r({},n),e),{response_type:"implicit_jump"}));return J.post(o,i,this.formEncoded())},e.prototype.createAuthorizationHeader=function(e){var t={};return e&&(t[d]="Bearer "+e),t},e.prototype.formEncoded=function(e){return void 0===e&&(e={}),e["content-type"]=this.CONTENT_FORM_ENCODED,e},e.prototype.addClientIdInHeader=function(e,t){return void 0===t&&(t={}),t.client_id=e,t},e.prototype.callCheckToken=function(e,t,r){var n=this.formEncoded();return this.addClientIdInHeader(t,n),J.post(m.checkTokenEndpoint.url+"/ims"+r,e,n).catch((function(t){if(!m.checkTokenEndpoint.shouldFallbackToAdobe(t))throw t;return J.post(m.checkTokenEndpoint.fallbackUrl+"/ims"+r,e,n)}))},e}();!function(e){e.INITIALIZE_ERROR="initialize_error",e.HTTP="http",e.FRAGMENT="fragment",e.CSRF="csrf",e.NOT_ALLOWED="not_allowed",e.PROFILE_EXCEPTION="profile_exception",e.TOKEN_EXPIRED="token_expired",e.SOCIAL_PROVIDERS="SOCIAL_PROVIDERS",e.RIDE_EXCEPTION="ride_exception",e.ARKOSE_ERROR="arkose_error"}(N||(N={}));var W=function(e){this.message=null,this.errorType=N.PROFILE_EXCEPTION,this.message=e},Y=/\s|,/g;function X(e){return e.split(Y).sort().join(",")}var Z,Q=function(){function e(e){this.profileServiceRequest=e,this.storage=h.getStorageByName(c.SessionStorage)}return e.prototype.getProfile=function(e){var t=this,r=this.profileServiceRequest,n=r.clientId,o=r.imsApis,i=this.getProfileFromStorage();return i?Promise.resolve(i):o.getProfile({client_id:n,token:e}).then((function(e){if(!e)throw new W("NO profile response");if(0===Object.keys(e).length)throw new W("NO profile value");return t.saveProfileToStorage(e),Promise.resolve(e)})).catch((function(e){return e instanceof q?Promise.reject(e):(t.removeProfile(),Promise.reject(e))}))},e.prototype.getProfileStorageKey=function(){var e=this.profileServiceRequest;return"adobeid_ims_profile/"+e.clientId+"/"+!1+"/"+X(e.scope)},e.prototype.getProfileFromStorage=function(){var e=this.getProfileStorageKey(),t=this.storage.getItem(e);return t&&JSON.parse(t)},e.prototype.saveProfileToStorage=function(e){var t=this.getProfileStorageKey();this.storage.setItem(t,JSON.stringify(e))},e.prototype.removeProfile=function(){var e=this.getProfileStorageKey();this.storage.removeItem(e)},e.prototype.removeProfileIfOtherUser=function(e){if(e){var t=this.getProfileFromStorage();t&&t.userId!==e&&this.removeProfile()}},e}();!function(e){e.GUEST="guest"}(Z||(Z={}));var $,ee=function(){function e(e,t){var r=this;this.REAUTH_SCOPE="reauthenticated",this.valid=!1,this.isReauth=function(){return r.scope.indexOf(r.REAUTH_SCOPE)>=0},this.client_id="",this.scope="",this.expire=new Date,this.user_id="",this.tokenValue="",this.sid="",this.state=null,this.fromFragment=!1,this.impersonatorId="",this.isImpersonatedSession=!1;var n=e.valid,o=e.tokenValue,i=e.access_token,s=e.state,a=e.other,c=o||i,u=this.parseJwt(c);if(!u)throw new Error("token cannot be decoded "+c);this.state=w.toJson(s);var l=u.client_id,d=u.user_id,p=u.scope,h=u.sid,f=u.imp_id,v=u.imp_sid,g=u.pba,m=u.atp,k=u.gse;this.atp=m,this.client_id=l,this.expire=t,this.user_id=d,this.scope=p,this.valid=n,this.tokenValue=c,this.sid=h,this.other=a,this.impersonatorId=f||"",this.isImpersonatedSession=!!v,this.pbaSatisfiedPolicies=g&&g.split(",")||[],this.isGuestToken=this.atp===Z.GUEST,this.gse=k}return e.prototype.parseJwt=function(e){if(!e)return null;try{return JSON.parse(atob(e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")))}catch(t){return p.error("error on decoding token ",e,t),null}},e.prototype.validate=function(e,t){var r,n,o,i=this.valid,s=this.client_id,a=this.scope,c=this.expire;return c0&&(r=new Array(n+1).join(e)+r),r}("0",5,e.toString(2))},le=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("Data is not a string");var r=e.toLowerCase().split("");!function(e){if(e.length%8!=0)throw new Error("Data length is not a multiple of 8");e.forEach((function(e){if(!(e in ce))throw new Error("Unknown encoded character "+e)}));var t=!1;e.forEach((function(e){if("="!==e&&t)throw new Error("Found padding char in the middle of the string");"="===e&&(t=!0)}))}(r);var n=function(e){for(var t=e.length-1,r=0;"="===e[t];)++r,--t;return r}(r),o=[];r.forEach((function(e){o.push(ue(ce[e]))}));var i=o.join("");return n>0&&(i=i.slice(0,-5*n)),i.length%8!=0&&(i=i.slice(0,i.length%8*-1)),t?function(e){var t="";if(e.length%8!=0)throw new Error("Length must be a multiple of 8");for(var r=0,n=e.length;rge.lastUserInteraction&&(ge.lastUserInteraction=o)}return n.tokenService.refreshToken(e).then((function(e){return n.onTokenProfileReceived(e)})).catch((function(e){if(p.error("refresh token error",e),e instanceof q)return Promise.reject(e);var t=n.verifyRideErrorExceptionStrict(e);return t||(n.profileService.removeProfile(),n.onTokenExpired(),Promise.reject(e))}))},this.switchProfile=function(e,t){return void 0===t&&(t={}),e?n.tokenService.switchProfile(e,t).then((function(e){return n.onTokenProfileReceived(e)})).catch((function(e){return n.verifyRideErrorException(e)})):Promise.reject(new Error("Please provide the user id for switchProfile"))},this.executeErrorCallback=function(e){if(p.info("initialize exception ended",e),!e||e.type!==$.LOGOUT){var t=n.adobeIdData.onError;t&&t(N.HTTP,"Initialization error")}},this.triggerOnImsInstance=function(e){var t=document.createEvent("CustomEvent"),r={clientId:n.adobeIdData.client_id,instance:e};t.initCustomEvent("onImsLibInstance",!1,!1,r),window.dispatchEvent(t)},this.processInitializeException=function(e){return void 0===e&&(e={}),p.warn("initialize",e),n.restoreHash(),Promise.reject(e)},this.verifyModalSignInEvent=function(e){return e instanceof ae?n.notifyParentAboutModalSignIn(e):Promise.reject(e)},this.verifyTokenExpiredException=function(e){return e instanceof ie?(n.adobeIdData.handlers.triggerOnAccessTokenHasExpired(),Promise.resolve()):Promise.reject(e)},this.verifyRideErrorException=function(e){return o(n,void 0,Promise,(function(){return i(this,(function(t){switch(t.label){case 0:return e instanceof G?this.adobeIdData.overrideErrorHandler&&!this.adobeIdData.overrideErrorHandler(e)?[2,Promise.reject(e)]:e.isPbaExpiredIdleSessionWorkaround?[4,this.signIn()]:[3,2]:[3,4];case 1:return t.sent(),[3,4];case 2:return e.jump?[4,v.replaceUrlAndWait(e.jump,1e4)]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2,Promise.reject(e)]}}))}))},this.verifyRideErrorExceptionStrict=function(e){return e instanceof G?n.verifyRideErrorException(e):null},this.verifyCsrfException=function(e){var t=e.type;return t&&t===N.CSRF&&n.signOut(),Promise.reject(e)},this.processTokenResponse=function(e){var t=n.adobeIdData.handlers,r=e.tokenFields,o=e.profile,i=r.tokenValue,s=r.state,a=r.expire,c=r.sid,u=r.user_id,l=r.other,d=void 0===l?{}:l,h=r.impersonatorId,f=r.isImpersonatedSession,g=r.pbaSatisfiedPolicies,m=r.isGuestToken,k=r.gse;p.info("token",i),d.from_ims&&v.setHash(d.old_hash||""),n.profileService.removeProfileIfOtherUser(u);var y={token:i,expire:a,sid:c,impersonatorId:h,isImpersonatedSession:f,pbaSatisfiedPolicies:g,isGuestToken:m,gse:k};return r.isReauth()?t.triggerOnReauthAccessToken(y):n.tokenReceived(y),o&&n.profileService.saveProfileToStorage(o),Promise.resolve(s)},this.exchangeIjt=function(e){var t=n.adobeIdData.ijt;return e||t?n.tokenService.exchangeIjt(e||t).then((function(e){return e.profile?n.profileService.saveProfileToStorage(e.profile):n.profileService.removeProfile(),Promise.resolve(e)})):Promise.reject(new Error("please set the adobeid.ijt value"))},this.adobeIdData=new L(e),t&&(this.instanceKey=t),this.instanceId="imslib-"+Math.random().toString(36).substring(2,9);var s=this.adobeIdData,a=s.api_parameters,c=void 0===a?{}:a,u=s.client_id,l=s.scope,d=s.useLocalStorage,h=s.autoValidateToken,g=s.modalMode,m=s.modalSettings;this.imsApis=new K(c),this.csrfService=new f(u,this.instanceKey),this.serviceRequest={clientId:u,scope:l,imsApis:this.imsApis},this.tokenService=new fe(r(r({},this.serviceRequest),{useLocalStorage:d,autoValidateToken:h}),this.csrfService),this.profileService=new Q(this.serviceRequest),this.signInservice=g?new P(this.onPopupMessage,m):new T;var k=new BroadcastChannel("imslib-signout");k.addEventListener("message",this.onSignOutEventReceived.bind(this)),window.signoutBroadcastChannel=k}return Object.defineProperty(e.prototype,"version",{get:function(){return m.jslibver},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adobeid",{get:function(){return r({},this.adobeIdData)},enumerable:!0,configurable:!0}),e.prototype.enableLogging=function(){p.enableLogging()},e.prototype.disableLogging=function(){p.disableLogging()},e.prototype.checkInitialized=function(){this.initialized},e.prototype.signUp=function(e,t){var r=this;void 0===e&&(e={}),this.checkInitialized();var n=this.adobeIdData,o=this.csrfService;if(!n)throw new Error("no adobeId on reAuthenticate");var i=o.initialize();return n.createSignUpRedirectRequest(e,t,i).then((function(e){r.signInservice.signIn(e)}))},e.prototype.isSignedInUser=function(){var e=this.getAccessToken();return(!e||!e.isGuestToken)&&!(!e&&!this.getReauthAccessToken())},e.prototype.getProfile=function(){var e=this,t=this.profileService.getProfileFromStorage();if(t)return Promise.resolve(t);var r=this.getAccessToken()||this.getReauthAccessToken();if(!r){var n="please login before getting the profile";return Promise.reject(new W(n))}if(r.isGuestToken){n="guest account does not have a profile";return Promise.reject(new W(n))}return this.profileService.getProfile(r.token).then((function(e){return Promise.resolve(e)})).catch((function(t){return p.error("get profile exception ",t),t instanceof q?e.refreshToken().then((function(e){return Promise.resolve(e.profile)})):Promise.reject(new W(t.message||t))}))},e.prototype.avatarUrl=function(e){return this.imsApis.avatarUrl(e)},e.prototype.getReleaseFlags=function(e){return void 0===e&&(e=!1),e?this.tokenService.getDecodedReleaseFlags():this.tokenService.getReleaseFlags()},e.prototype.getAccessToken=function(){return this.getTokenFromStorage(!1)},e.prototype.getReauthAccessToken=function(){return this.getTokenFromStorage(!0)},e.prototype.getTokenFromStorage=function(e){var t=this.tokenService.getTokenFieldsFromStorage(e);return t?{token:t.tokenValue,expire:t.expire,sid:t.sid,impersonatorId:t.impersonatorId,isImpersonatedSession:t.isImpersonatedSession,pbaSatisfiedPolicies:t.pbaSatisfiedPolicies,isGuestToken:t.isGuestToken,gse:t.gse}:null},e.prototype.listSocialProviders=function(){var e=this;return new Promise((function(t,r){var n=e.adobeIdData.client_id;e.imsApis.listSocialProviders({client_id:n}).then((function(e){t(e)})).catch((function(e){r(e)}))}))},e.prototype.tokenReceived=function(e){this.adobeIdData.handlers.triggerOnAccessToken(e),ge.startAutoRefreshFlow({expire:e.expire,refreshTokenMethod:this.refreshToken})},e.prototype.onTokenProfileReceived=function(e){var t=e.tokenInfo,r=e.profile;return p.info("token",t),this.tokenReceived(t),this.profileService.saveProfileToStorage(r),Promise.resolve(e)},e.prototype.validateToken=function(){var e=this;return this.tokenService.validateToken().then((function(){return Promise.resolve(!0)})).catch((function(t){return p.warn("validate token exception",t),t instanceof q?Promise.reject(!1):(e.profileService.removeProfile(),Promise.reject(!1))}))},e.prototype.onTokenExpired=function(){var e=this.adobeIdData.handlers;this.tokenService.purge(),e.triggerOnAccessTokenHasExpired()},e.prototype.setStandAloneToken=function(e){return this.tokenService.setStandAloneToken(e)},e.prototype.initialize=function(){var e,t=this,r=this.adobeIdData,n=r.handlers,o=r.standalone,i=r.ijt,s=r.alwaysRemoveTokenFromUrl,a=r.enableGuestAccounts,c=r.enableGuestTokenForceRefresh,u=r.enableGuestBotDetection,l=null;switch(o&&this.setStandAloneToken(o),!0){case!!i:e=this.exchangeIjt;break;case a:e=this.tokenService.getGuestToken.bind(this.tokenService,{},{enableGuestAccounts:a,enableGuestTokenForceRefresh:c,enableGuestBotDetection:u});break;default:e=this.tokenService.getTokenAndProfile}return e().then(this.processTokenResponse,this.processError.apply(this)).then((function(e){l=e})).finally((function(){p.info("onReady initialization"),window.addEventListener("getImsLibInstance",(function(){t.triggerOnImsInstance(t)}),!1),s&&v.setHash(te.removeAccessToken()),n.triggerOnReady(l?l.context:null),t.triggerOnImsInstance(t),t.initialized=!0}))},e.prototype.processError=function(){var e=this;return function(t){return e.verifyModalSignInEvent(t).catch(e.processInitializeException).catch(e.verifyTokenExpiredException).catch(e.verifyRideErrorException).catch(e.verifyCsrfException).catch(e.executeErrorCallback)}},e.prototype.notifyParentAboutModalSignIn=function(e){var t=window.location.href.replace("imslibmodal","wasmodal");if(window.opener)window.opener.postMessage(t,window.location.origin),window.close();else{var r=new BroadcastChannel("imslib");r.postMessage(t),r.close(),window.close()}return Promise.reject("popup")},e.prototype.restoreHash=function(){var e=te.fragmentToObject();e&&e.from_ims&&v.setHash(e.old_hash||"")},e.prototype.getTransitoryAuthorizationCode=function(e,t){return void 0===t&&(t={}),(e=e||{}).response_type=e.response_type||"code",e.target_client_id=e.target_client_id||this.adobeIdData.client_id,e.target_scope=e.target_scope||this.adobeIdData.scope,this.imsApis.getTransitoryAuthorizationCode(e,t,this.adobeIdData.client_id)},e.prototype.jumpToken=function(e,t){return void 0===t&&(t={}),e.target_client_id=e.target_client_id||this.adobeIdData.client_id,e.target_scope=e.target_scope||this.adobeIdData.scope,this.imsApis.jumpToken(e,t,this.adobeIdData.client_id)},e.prototype.getVerifierByKey=function(e){return(new M).getVerifierByKey(e)},e.prototype.socialHeadlessSignIn=function(e,t){return void 0===t&&(t={}),o(this,void 0,Promise,(function(){var r=this;return i(this,(function(n){return[2,this.imsApis.socialHeadlessSignIn(e,t).then((function(e){return r.exchangeIjt(e.token)})).catch((function(t){return"ride_AdobeID_social"===t.error&&r.signIn({idp_flow:"social.native",provider_id:e.provider_id,idp_token:e.idp_token}),Promise.reject(t)}))]}))}))},e.prototype.getAccountType=function(){var e=this.getAccessToken();if(!e)throw new Error("please login before getting the account type");if(e.isGuestToken)return ne.GUEST;var t=this.profileService.getProfileFromStorage();if(!t)throw new Error("you need to first get the profile before getting the account type");return t.account_type},e.prototype.getSessionExpiration=function(){var e=this.getAccessToken();if(!e)throw new Error("please obtain a token before getting the session expiration");return e.gse},e.prototype.jumpTokenToDevice=function(e,t){void 0===t&&(t={});var r=this.tokenService.getTokenFieldsFromStorage(),n=r?r.user_id:null;return this.imsApis.jumpTokenToDevice(e,t,this.adobeIdData.client_id,n)},e.prototype.onSignOutEventReceived=function(e){e.data.clientId===this.adobeIdData.client_id&&e.data.instanceId!==this.instanceId&&(this.tokenService.purge(),this.profileService.removeProfile(),"function"==typeof this.adobeIdData.onSignOutEventReceived&&this.adobeIdData.onSignOutEventReceived())},e}(),ke=new(function(){function e(){this.createIMSLib=function(e,t){void 0===e&&(e=null),void 0===t&&(t="adobeIMS");var r=new me(e,t);return window[t]=r,r}}return e.prototype.initAdobeIms=function(){window.adobeImsFactory={createIMSLib:this.createIMSLib};var e=window.adobeIMS||null;if(!e){var t=window.adobeid;if(!t||!t.client_id)return;(e=this.createIMSLib(t,"adobeIMS")).initialize()}},e}());return new(function(){function e(){ke.initAdobeIms()}return e.prototype.initialize=function(){return!0},e}())}(); +// Built 2025-07-05T01:02:43.047Z - Last Modified 2025-06-26T14:30:11.000Z +var roll=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function a(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.keys(a)),u=c.next();!u.done;u=c.next()){var l=u.value;if(r===l||r.endsWith("."+l))return new e(!0,a[l],o)}}catch(e){i={error:e}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}}return new e(!1,o)},e.prototype.shouldFallbackToAdobe=function(e){return!!this.proxied&&("feature_disabled"===e.error&&"cdsc"===e.error_description)},e.THIRD_PARTY_DOMAINS_PROD={"behance.net":"https://sso.behance.net"},e.THIRD_PARTY_DOMAINS_STAGE={"s2stagehance.com":"https://sso.s2stagehance.com"},e}(),k=new(function(){function e(){this.baseUrlAdobe="",this.baseUrlServices="",this.checkTokenEndpoint=new m,this.jslibver="v2-v0.47.0-15-gd6558d5"}return e.prototype.loadEnvironment=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r="");var n=e===l.STAGE;n?(this.baseUrlAdobe="https://ims-na1-stg1.adobelogin.com",this.baseUrlServices="https://adobeid-na1-stg1.services.adobe.com"):(this.baseUrlAdobe="https://ims-na1.adobelogin.com",this.baseUrlServices="https://adobeid-na1.services.adobe.com"),this.checkTokenEndpoint=m.computeEndpoint(t,r,n,this.baseUrlServices)},e}());function y(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function w(e,t){if(null==e)return t;if(e===t)return e;if(!y(e))return e;var r=Object.assign({},e);return y(t)&&Object.keys(t).forEach((function(n){var o,i;y(t[n])?n in e?r[n]=w(e[n],t[n]):Object.assign(r,((o={})[n]=t[n],o)):Object.assign(r,((i={})[n]=t[n],i))})),r}var b=new(function(){function e(){this.getCustomApiParameters=function(e,t){return e[t]||{}}}return e.prototype.mergeExternalParameters=function(e,t,r){return w(this.getCustomApiParameters(t,r),e)},e.prototype.toJson=function(e){try{return"string"!=typeof e?e:JSON.parse(e)}catch(e){return null}},e}()),S=function(){function e(){}return e.getInitialRedirectUri=function(e,t){var r=e.redirect_uri||t||window.location.href,n="function"==typeof r?r():r,o=n.indexOf("from_ims");return-1===o?n:("#"===n[o-1]&&o--,n.substr(0,o))},e.createDefaultRedirectUrl=function(e,t,r,n){var o=this.getInitialRedirectUri(r,e),i=this.createOldHash(o);return i.indexOf("?")>0?"".concat(i,"&client_id=").concat(t,"&api=").concat(n):"".concat(i,"?client_id=").concat(t,"&api=").concat(n)},e.createRedirectUrl=function(e,t,r,n,o){void 0===o&&(o="");var i=this.createDefaultRedirectUrl(e,t,r,n);(o=o||r.scope||"")&&(i="".concat(i,"&scope=").concat(o));var s=r.reauth||"";return s&&(i="".concat(i,"&reauth=").concat(s)),i},e.createOldHash=function(e){var t=e.indexOf("#");if(t<0)return"".concat(e,"#old_hash=&from_ims=true");var r=e.substring(0,t),n=e.substring(t+1);return"".concat(r,"#old_hash=").concat(n,"&from_ims=true")},e.mergeApiParamsWithExternalParams=function(e,t,r){return w(b.getCustomApiParameters(e,r),t)},e}(),T=function(){var e=this;this.composeRedirectUrl=function(e){var t=e.apiParameters,n=e.externalParameters,o=void 0===n?{}:n,i=e.adobeIdRedirectUri,s=void 0===i?"":i,a=e.clientId,c=e.locale,u=e.state,l=void 0===u?{}:u,d=e.scope,p=void 0===d?o.scope||t.scope||"":d,h=S.mergeApiParamsWithExternalParams(t,o,"authorize");l&&(h.state=w(h.state||{},l));var f=S.createRedirectUrl(s,a,h,"authorize",p),v=o.locale||c||"",g=e.response_type,m=void 0===g?h.response_type||"":g;return r(r({},h),{client_id:a,scope:p,locale:v,response_type:m,jslVersion:k.jslibver,redirect_uri:f})},this.createRedirectUrl=function(t){var r=e.composeRedirectUrl(t),n=g.uriEncodeData(r);return"".concat(k.baseUrlAdobe,"/ims/authorize/v1?").concat(n)}},I=function(e){function r(){var t=e.apply(this,a([],s(arguments),!1))||this;return t.signIn=function(e){var r=t.createRedirectUrl(e);g.setHrefUrl(r)},t.authorizeToken=function(e,r){var n=t.composeRedirectUrl(r);e&&(n.user_assertion=e,n.user_assertion_type="urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),t.createAuthorizeForm(n).submit()},t}return t(r,e),r.prototype.createAuthorizeForm=function(e){var t="".concat(k.baseUrlAdobe,"/ims/authorize/v1"),r=document.createElement("form");r.style.display="none",r.setAttribute("method","post"),r.setAttribute("action",t);var n=null,o=null,i="";for(var s in e){if("object"==typeof(o=e[s])){if(0===Object.keys(o).length)continue;i=JSON.stringify(o)}else i=o;""!==i&&(n=this.createFormElement("input","text",s,i),r.appendChild(n))}return document.getElementsByTagName("body")[0].appendChild(r),r},r.prototype.createFormElement=function(e,t,r,n){var o=document.createElement(e);return o.setAttribute("type",t),o.setAttribute("name",r),o.setAttribute("value",n),o},r}(T),_=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/,R=["https://auth.services.adobe.com","https://auth-stg1.services.adobe.com","https://localhost.corp.adobe.com:9000"],P=new function(){var e=this;this.windowObjectReference=null,this.previousUrl="",this.openSignInWindow=function(t,r,n,o){e.onProcessLocation=o,e.allowOrigin=n.allowOrigin,e.timerId&&clearInterval(e.timerId),window.removeEventListener("message",e.receiveMessage),window.addEventListener("message",e.receiveMessage),e.broadcastChannel&&e.broadcastChannel.close(),e.broadcastChannel=new BroadcastChannel("imslib"),e.broadcastChannel.onmessage=e.receiveMessage;var i="popup=yes, width=".concat(n.width,", height=").concat(n.height,", top=").concat(n.top,", left=").concat(n.left);!e.windowObjectReference||e.windowObjectReference&&e.windowObjectReference.closed?e.windowObjectReference=window.open(t,n.title,i):e.previousUrl!==t?(e.windowObjectReference=window.open(t,n.title,i),e.windowObjectReference&&e.windowObjectReference.focus()):e.windowObjectReference.focus(),e.previousUrl=t},this.receiveMessage=function(t){if(a(a([],s(R),!1),[e.allowOrigin],!1).includes(t.origin)){try{if(!_.test(t.data))return void console.warn("refused to receive message containing unknown data format",t.data)}catch(e){return void console.error(e)}e.broadcastChannel&&e.broadcastChannel.close(),e.onProcessLocation&&e.onProcessLocation(t.data)}else console.warn("refused to receive message from origin not whitelisted",t.origin)}},A=function(e){function n(t,n){var o=e.call(this)||this;return o.signIn=function(e){e.state=r(r({},e.state),{imslibmodal:!0});var t=e.state.nonce,n=o.createRedirectUrl(e);P.openSignInWindow(n,t,o.popupSettings,o.onPopupMessage)},o.onPopupMessage=t,o.popupSettings=n,o}return t(n,e),n}(T),E=function(){function e(e,t){this.status=0,this.data="",this.status=e,this.data=this.toJson(t)}return e.prototype.toJson=function(e){try{return"string"!=typeof e?e:JSON.parse(e)}catch(t){return e}},e}(),O=new(function(){function e(){}return e.prototype.http=function(e){return new Promise((function(t,r){var n=new(0,window.XMLHttpRequest);"boolean"==typeof e.withCredentials?n.withCredentials=e.withCredentials:n.withCredentials=!0,"number"==typeof e.timeout&&(n.timeout=e.timeout),n.open(e.method,e.url,!0);var o;n.onload=function(){return this.status>=200&&this.status<300?t(new E(this.status,this.response)):r(new E(this.status,this.response))},n.onerror=function(){var e=new E(this.status,this.response);return r(e)},n.ontimeout=function(){var e=new E(0,"timeout");return r(e)},n.onabort=function(){var e=new E(0,"aborted");return r(e)},(o=e.headers)&&Object.keys(o).forEach((function(e){n.setRequestHeader(e,o[e])})),n.send(e.data)}))},e.prototype.post=function(e,t,r,n,o){return void 0===r&&(r={}),this.http({headers:r,method:"POST",url:e,data:t,withCredentials:n,timeout:o})},e.prototype.get=function(e,t,r,n){return void 0===t&&(t={}),this.http({headers:t,method:"GET",url:e,withCredentials:r,timeout:n})},e}()),j=function(){this.probe=function(e,t,r){if(void 0===r&&(r=2e3),!e||0===e.length)return Promise.resolve([]);for(var n={"Content-Type":"application/json","Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:0,"X-IMS-CLIENTID":t},o="/ims/cdsc_probe?"+g.uriEncodeData({client_id:t}),i=[],s=[],a=function(t){var a=e[t]+o;s.push(O.post(a,{},n,!1,r).then((function(e){return 200==e.status&&i.push(t)})).catch((function(){})))},c=0;c=0?new q("ride_pba_idle_session","",!0):null;var o=this.addRedirectUriToJump(r,n);return new q(r,o)},e.prototype.addRedirectUriToJump=function(e,t){if(!t||"string"!=typeof t)return"";var r=t;this.adobeIdThinData||(this.adobeIdThinData=new H);var n=this.adobeIdThinData.computeRideRedirectUri(e);if(!n||0===n.length)return r;try{var o=new URL(r);return o.searchParams.append("redirect_uri",n),o.toString()}catch(e){return r}},e.prototype.isUnauthorizedException=function(e){var t=e.status;return 401===(void 0===t?0:t)},e}()),K=new(function(){function e(){this.triggerOnError=null}return e.prototype.post=function(e,t,r){var n=this;void 0===r&&(r={});var o=G.getCachedApiResponse(e,t);if(o){var i=o.status,s=o.data;return 200===i?Promise.resolve(s):Promise.reject(s)}return O.post(e,t,r).then((function(r){return n.storeApiResponse(e,JSON.stringify(t),r)})).catch((function(r){return n.verifyError(e,JSON.stringify(t),r)}))},e.prototype.get=function(e,t){var r=this;void 0===t&&(t={});var n=G.getCachedApiResponse(e);if(n){var o=n.status,i=n.data;return 200===o?Promise.resolve(i):Promise.reject(i)}return O.get(e,t).then((function(t){return r.storeApiResponse(e,"",t)})).catch((function(t){return r.verifyError(e,"",t)}))},e.prototype.verifyError=function(e,t,r){this.storeApiResponse(e,t,r);var n=J.verify(r,e);return Promise.reject(n||r.data)},e.prototype.storeApiResponse=function(e,t,r){return void 0===t&&(t=""),G.storeApiResponse(e,t,r),Promise.resolve(r.data)},e}()),W=function(){function e(e){void 0===e&&(e={}),this.CONTENT_FORM_ENCODED="application/x-www-form-urlencoded;charset=utf-8",this.apiParameters=e}return e.prototype.validateToken=function(e){var t=e.token,n=e.client_id,o=e.type,i=g.uriEncodeData(r(r({},b.getCustomApiParameters(this.apiParameters,"validate_token")),{type:o||"access_token",client_id:n,token:t})),s="".concat(k.baseUrlAdobe,"/ims/validate_token/v1?jslVersion=").concat(k.jslibver),a=this.formEncoded();return K.post(s,i,a)},e.prototype.getProfile=function(e){var t=e.token,n=e.client_id,o=r({},b.getCustomApiParameters(this.apiParameters,"profile")),i=this.createAuthorizationHeader(t);this.addClientIdInHeader(n,i);var s=g.uriEncodeData(r({client_id:n},o)),a="".concat(k.baseUrlAdobe,"/ims/profile/v1?").concat(s,"&jslVersion=").concat(k.jslibver);return K.get(a,i)},e.prototype.getUserInfo=function(e){var t=e.token,n=e.client_id,o=r({},b.getCustomApiParameters(this.apiParameters,"userinfo")),i=this.createAuthorizationHeader(t);this.addClientIdInHeader(n,i);var s=g.uriEncodeData(r({client_id:n},o)),a="".concat(k.baseUrlAdobe,"/ims/userinfo/v1?").concat(s,"&jslVersion=").concat(k.jslibver);return K.get(a,i)},e.prototype.logoutToken=function(e){var t=e.client_id,n=e.token,o=r({},b.getCustomApiParameters(this.apiParameters,"logout_token")),i="".concat(k.baseUrlServices,"/ims/logout/v1?jslVersion=").concat(k.jslibver),s=this.addClientIdInHeader(t);return K.post(i,r({client_id:t,access_token:n},o),s)},e.prototype.checkStatus=function(){var e="".concat(k.baseUrlServices,"/ims/check/v1/status");return K.get(e)},e.prototype.checkToken=function(e,t,o){var i=e.client_id,s=e.scope,a=t.arkoseSessionToken,c=n(t,["arkoseSessionToken"]),u=r({},b.mergeExternalParameters(c,this.apiParameters,"check_token")),l=r(r({},u),{client_id:i,scope:s});return a&&(l.arkose_session_token=a),o&&(l.user_id=o),this.callCheckToken(g.uriEncodeData(l),"/check/v6/token?jslVersion=".concat(k.jslibver))},e.prototype.switchProfile=function(e,t,n){void 0===n&&(n="");var o=e.client_id,i=e.scope,s=void 0===i?"":i,a=r({},b.mergeExternalParameters(t,this.apiParameters,"check_token")),c=g.uriEncodeData(r(r({},a),{client_id:o,scope:s,user_id:n}));return this.callCheckToken(c,"/check/v6/token?jslVersion=".concat(k.jslibver))},e.prototype.listSocialProviders=function(e){var t=e.client_id,n=r({},b.getCustomApiParameters(this.apiParameters,"providers")),o=g.uriEncodeData(r({client_id:t},n)),i="".concat(k.baseUrlServices,"/ims/social/v2/providers?").concat(o,"&jslVersion=").concat(k.jslibver),s=this.addClientIdInHeader(t);return K.get(i,s)},e.prototype.exchangeIjt=function(e,t){var n=e.client_id,o=r({},b.getCustomApiParameters(this.apiParameters,"ijt")),i="".concat(k.baseUrlServices,"/ims/jump/implicit/").concat(t),s=g.uriEncodeData(r({client_id:n},o)),a="".concat(i,"?").concat(s,"&jslVersion=").concat(k.jslibver);a.length>2048&&(delete o.redirect_uri,s=g.uriEncodeData(o),a="".concat(i,"?").concat(s));var c=this.addClientIdInHeader(n);return K.get(a,c)},e.prototype.avatarUrl=function(e){return"".concat(k.baseUrlAdobe,"/ims/avatar/download/").concat(e)},e.prototype.getReleaseFlags=function(e){var t=e.token,n=e.client_id,o=r({},b.getCustomApiParameters(this.apiParameters,"fg_value")),i=this.createAuthorizationHeader(t);this.addClientIdInHeader(n,i);var s=g.uriEncodeData(r({client_id:n},o)),a="".concat(k.baseUrlAdobe,"/ims/fg/value/v1?").concat(s,"&jslVersion=").concat(k.jslibver);return K.get(a,i)},e.prototype.getTransitoryAuthorizationCode=function(e,t,n){void 0===t&&(t={});var o=r({},b.mergeExternalParameters(t,this.apiParameters,"check_token")),i=g.uriEncodeData(r(r({},o),e));return this.callCheckToken(i,"/check/v6/token?client_id=".concat(n,"&jslVersion=").concat(k.jslibver))},e.prototype.getTokenFromCode=function(e,t){void 0===t&&(t={});var n=r({},b.mergeExternalParameters(t,this.apiParameters,"token"));n.grant_type="authorization_code",delete e.other;var o="".concat(k.baseUrlServices,"/ims/token/v3?jslVersion=").concat(k.jslibver),i=g.uriEncodeData(r(r({},n),e)),s=this.formEncoded();return this.addClientIdInHeader(e.client_id,s),K.post(o,i,s)},e.prototype.jumpToken=function(e,t,n){void 0===t&&(t={});var o=r({},b.mergeExternalParameters(t,this.apiParameters,"jumptoken")),i="".concat(k.baseUrlServices,"/ims/jumptoken/v1?client_id=").concat(n,"&jslVersion=").concat(k.jslibver),s=g.uriEncodeData(r(r({},o),e)),a=this.formEncoded();return this.addClientIdInHeader(n,a),K.post(i,s,a)},e.prototype.jumpTokenToDevice=function(e,t,n,o){void 0===t&&(t={});var i=r({},b.mergeExternalParameters(t,this.apiParameters,"jumptoken_to_device"));!i.user_id&&o&&(i.user_id=o);var s="".concat(k.baseUrlServices,"/ims/jumptoken/v2?client_id=").concat(n,"&jslVersion=").concat(k.jslibver),a=g.uriEncodeData(r(r({},i),e)),c=this.formEncoded();return this.addClientIdInHeader(n,c),K.post(s,a,c)},e.prototype.socialHeadlessSignIn=function(e,t){void 0===t&&(t={});var n=r({},b.mergeExternalParameters(t,this.apiParameters,"jumptoken")),o="".concat(k.baseUrlServices,"/ims/social/v2/native?jslVersion=").concat(k.jslibver),i=g.uriEncodeData(r(r(r({},n),e),{response_type:"implicit_jump"}));return K.post(o,i,this.formEncoded())},e.prototype.createAuthorizationHeader=function(e){var t={};return e&&(t[d]="Bearer ".concat(e)),t},e.prototype.formEncoded=function(e){return void 0===e&&(e={}),e["content-type"]=this.CONTENT_FORM_ENCODED,e},e.prototype.addClientIdInHeader=function(e,t){return void 0===t&&(t={}),t.client_id=e,t},e.prototype.callCheckToken=function(e,t){var r=this.formEncoded();return K.post("".concat(k.checkTokenEndpoint.url,"/ims").concat(t),e,r).catch((function(n){if(!k.checkTokenEndpoint.shouldFallbackToAdobe(n))throw n;return K.post("".concat(k.checkTokenEndpoint.fallbackUrl,"/ims").concat(t),e,r)}))},e}();!function(e){e.INITIALIZE_ERROR="initialize_error",e.HTTP="http",e.FRAGMENT="fragment",e.CSRF="csrf",e.NOT_ALLOWED="not_allowed",e.PROFILE_EXCEPTION="profile_exception",e.TOKEN_EXPIRED="token_expired",e.SOCIAL_PROVIDERS="SOCIAL_PROVIDERS",e.RIDE_EXCEPTION="ride_exception",e.ARKOSE_ERROR="arkose_error"}(V||(V={}));var Y=function(e){this.message=null,this.errorType=V.PROFILE_EXCEPTION,this.message=e},X=/\s|,/g;function Z(e){return e.split(X).sort().join(",")}var Q,$=function(){function e(e){this.profileServiceRequest=e,this.storage=f.getStorageByName(c.SessionStorage)}return e.prototype.getProfile=function(e){var t=this,r=this.profileServiceRequest,n=r.clientId,o=r.imsApis,i=this.getProfileFromStorage();return i?Promise.resolve(i):o.getProfile({client_id:n,token:e}).then((function(e){if(!e)throw new Y("NO profile response");if(0===Object.keys(e).length)throw new Y("NO profile value");return t.saveProfileToStorage(e),Promise.resolve(e)})).catch((function(e){return e instanceof B||t.removeProfile(),Promise.reject(e)}))},e.prototype.getProfileStorageKey=function(){var e=this.profileServiceRequest,t=e.clientId,r=e.scope;return"".concat("adobeid_ims_profile","/").concat(t,"/").concat(!1,"/").concat(Z(r))},e.prototype.getProfileFromStorage=function(){var e=this.getProfileStorageKey(),t=this.storage.getItem(e);return t&&JSON.parse(t)},e.prototype.saveProfileToStorage=function(e){var t=this.getProfileStorageKey();this.storage.setItem(t,JSON.stringify(e))},e.prototype.removeProfile=function(){var e=this.getProfileStorageKey();this.storage.removeItem(e)},e.prototype.removeProfileIfOtherUser=function(e){if(e){var t=this.getProfileFromStorage();t&&t.userId!==e&&this.removeProfile()}},e}();!function(e){e.GUEST="guest"}(Q||(Q={}));var ee,te=function(){function e(e,t){var r=this;this.REAUTH_SCOPE="reauthenticated",this.valid=!1,this.isReauth=function(){return r.scope.indexOf(r.REAUTH_SCOPE)>=0},this.client_id="",this.scope="",this.expire=new Date,this.user_id="",this.tokenValue="",this.sid="",this.state=null,this.fromFragment=!1,this.impersonatorId="",this.isImpersonatedSession=!1;var n=e.valid,o=e.tokenValue,i=e.access_token,s=e.state,a=e.other,c=o||i,u=this.parseJwt(c);if(!u)throw new Error("token cannot be decoded ".concat(c));this.state=b.toJson(s);var l=u.client_id,d=u.user_id,p=u.scope,h=u.sid,f=u.imp_id,v=u.imp_sid,g=u.pba,m=u.atp,k=u.gse;this.atp=m,this.client_id=l,this.expire=t,this.user_id=d,this.scope=p,this.valid=n,this.tokenValue=c,this.sid=h,this.other=a,this.impersonatorId=f||"",this.isImpersonatedSession=!!v,this.pbaSatisfiedPolicies=g&&g.split(",")||[],this.isGuestToken=this.atp===Q.GUEST,this.gse=k}return e.prototype.parseJwt=function(e){if(!e)return null;try{return JSON.parse(atob(e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")))}catch(t){return h.error("error on decoding token ",e,t),null}},e.prototype.validate=function(e,t){var r,n,o,i=this.valid,s=this.client_id,a=this.scope,c=this.expire;return c0&&(r=new Array(n+1).join(e)+r),r}("0",5,e.toString(2))},de=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("Data is not a string");var r=e.toLowerCase().split("");!function(e){if(e.length%8!=0)throw new Error("Data length is not a multiple of 8");e.forEach((function(e){if(!(e in ue))throw new Error("Unknown encoded character "+e)}));var t=!1;e.forEach((function(e){if("="!==e&&t)throw new Error("Found padding char in the middle of the string");"="===e&&(t=!0)}))}(r);var n=function(e){for(var t=e.length-1,r=0;"="===e[t];)++r,--t;return r}(r),o=[];r.forEach((function(e){o.push(le(ue[e]))}));var i=o.join("");return n>0&&(i=i.slice(0,-5*n)),i.length%8!=0&&(i=i.slice(0,i.length%8*-1)),t?function(e){var t="";if(e.length%8!=0)throw new Error("Length must be a multiple of 8");for(var r=0,n=e.length;rme.lastUserInteraction&&(me.lastUserInteraction=o)}return n.tokenService.refreshToken(e).then((function(e){return n.onTokenProfileReceived(e)})).catch((function(e){if(h.error("refresh token error",e),e instanceof B)return Promise.reject(e);var t=n.verifyRideErrorExceptionStrict(e);return t||(n.profileService.removeProfile(),n.onTokenExpired(),Promise.reject(e))}))},this.switchProfile=function(e,t){return void 0===t&&(t={}),e?n.tokenService.switchProfile(e,t).then((function(e){return n.onTokenProfileReceived(e)})).catch((function(e){return n.verifyRideErrorException(e)})):Promise.reject(new Error("Please provide the user id for switchProfile"))},this.executeErrorCallback=function(e){if(h.info("initialize exception ended",e),!e||e.type!==ee.LOGOUT){var t=n.adobeIdData.onError;t&&t(V.HTTP,"Initialization error")}},this.triggerOnImsInstance=function(e){var t=document.createEvent("CustomEvent"),r={clientId:n.adobeIdData.client_id,instance:e};t.initCustomEvent("onImsLibInstance",!1,!1,r),window.dispatchEvent(t)},this.processInitializeException=function(e){return void 0===e&&(e={}),h.warn("initialize",e),n.restoreHash(),Promise.reject(e)},this.verifyModalSignInEvent=function(e){return e instanceof ce?n.notifyParentAboutModalSignIn(e):Promise.reject(e)},this.verifyTokenExpiredException=function(e){return e instanceof se?(n.adobeIdData.handlers.triggerOnAccessTokenHasExpired(),Promise.resolve()):Promise.reject(e)},this.verifyRideErrorException=function(e){return o(n,void 0,Promise,(function(){return i(this,(function(t){switch(t.label){case 0:return e instanceof q?this.adobeIdData.overrideErrorHandler&&!this.adobeIdData.overrideErrorHandler(e)?[2,Promise.reject(e)]:e.isPbaExpiredIdleSessionWorkaround?[4,this.signIn()]:[3,2]:[3,4];case 1:return t.sent(),[3,4];case 2:return e.jump?[4,g.replaceUrlAndWait(e.jump,1e4)]:[3,4];case 3:t.sent(),t.label=4;case 4:return[2,Promise.reject(e)]}}))}))},this.verifyRideErrorExceptionStrict=function(e){return e instanceof q?n.verifyRideErrorException(e):null},this.verifyCsrfException=function(e){var t=e.type;return t&&t===V.CSRF&&n.signOut(),Promise.reject(e)},this.processTokenResponse=function(e){var t=n.adobeIdData.handlers,r=e.tokenFields,o=e.profile,i=r.tokenValue,s=r.state,a=r.expire,c=r.sid,u=r.user_id,l=r.other,d=void 0===l?{}:l,p=r.impersonatorId,f=r.isImpersonatedSession,v=r.pbaSatisfiedPolicies,m=r.isGuestToken,k=r.gse;h.info("token",i),d.from_ims&&g.setHash(d.old_hash||""),n.profileService.removeProfileIfOtherUser(u);var y={token:i,expire:a,sid:c,impersonatorId:p,isImpersonatedSession:f,pbaSatisfiedPolicies:v,isGuestToken:m,gse:k};return r.isReauth()?t.triggerOnReauthAccessToken(y):n.tokenReceived(y),o&&n.profileService.saveProfileToStorage(o),Promise.resolve(s)},this.exchangeIjt=function(e){var t=n.adobeIdData.ijt;return e||t?n.tokenService.exchangeIjt(e||t).then((function(e){return e.profile?n.profileService.saveProfileToStorage(e.profile):n.profileService.removeProfile(),Promise.resolve(e)})):Promise.reject(new Error("please set the adobeid.ijt value"))},this.adobeIdData=new z(e),t&&(this.instanceKey=t),this.instanceId="imslib-".concat(Math.random().toString(36).substring(2,9));var c=this.adobeIdData,u=c.api_parameters,l=void 0===u?{}:u,d=c.client_id,p=c.scope,f=c.useLocalStorage,m=c.autoValidateToken,k=c.modalMode,y=c.modalSettings;this.imsApis=new W(l),this.csrfService=new v(d,this.instanceKey),this.serviceRequest={clientId:d,scope:p,imsApis:this.imsApis},this.tokenService=new ve(r(r({},this.serviceRequest),{useLocalStorage:f,autoValidateToken:m}),this.csrfService),this.profileService=new $(this.serviceRequest),this.signInservice=k?new A(this.onPopupMessage,y):new I;var w=new BroadcastChannel("imslib-signout");w.addEventListener("message",this.onSignOutEventReceived.bind(this)),window.signoutBroadcastChannel=w}return Object.defineProperty(e.prototype,"version",{get:function(){return k.jslibver},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"adobeid",{get:function(){return r({},this.adobeIdData)},enumerable:!1,configurable:!0}),e.prototype.enableLogging=function(){h.enableLogging()},e.prototype.disableLogging=function(){h.disableLogging()},e.prototype.checkInitialized=function(){this.initialized},e.prototype.signUp=function(e,t){var r=this;void 0===e&&(e={}),this.checkInitialized();var n=this.adobeIdData,o=this.csrfService;if(!n)throw new Error("no adobeId on reAuthenticate");var i=o.initialize();return n.createSignUpRedirectRequest(e,t,i).then((function(e){r.signInservice.signIn(e)}))},e.prototype.isSignedInUser=function(){var e=this.getAccessToken();return(!e||!e.isGuestToken)&&!(!e&&!this.getReauthAccessToken())},e.prototype.getProfile=function(){var e=this,t=this.profileService.getProfileFromStorage();if(t)return Promise.resolve(t);var r=this.getAccessToken()||this.getReauthAccessToken();if(!r){var n="please login before getting the profile";return Promise.reject(new Y(n))}if(r.isGuestToken){n="guest account does not have a profile";return Promise.reject(new Y(n))}return this.profileService.getProfile(r.token).then((function(e){return Promise.resolve(e)})).catch((function(t){return h.error("get profile exception ",t),t instanceof B?e.refreshToken().then((function(e){return Promise.resolve(e.profile)})):Promise.reject(new Y(t.message||t))}))},e.prototype.avatarUrl=function(e){return this.imsApis.avatarUrl(e)},e.prototype.getReleaseFlags=function(e){return void 0===e&&(e=!1),e?this.tokenService.getDecodedReleaseFlags():this.tokenService.getReleaseFlags()},e.prototype.getAccessToken=function(){return this.getTokenFromStorage(!1)},e.prototype.getReauthAccessToken=function(){return this.getTokenFromStorage(!0)},e.prototype.getTokenFromStorage=function(e){var t=this.tokenService.getTokenFieldsFromStorage(e);return t?{token:t.tokenValue,expire:t.expire,sid:t.sid,impersonatorId:t.impersonatorId,isImpersonatedSession:t.isImpersonatedSession,pbaSatisfiedPolicies:t.pbaSatisfiedPolicies,isGuestToken:t.isGuestToken,gse:t.gse}:null},e.prototype.listSocialProviders=function(){var e=this;return new Promise((function(t,r){var n=e.adobeIdData.client_id;e.imsApis.listSocialProviders({client_id:n}).then((function(e){t(e)})).catch((function(e){r(e)}))}))},e.prototype.tokenReceived=function(e){this.adobeIdData.handlers.triggerOnAccessToken(e),me.startAutoRefreshFlow({expire:e.expire,refreshTokenMethod:this.refreshToken})},e.prototype.onTokenProfileReceived=function(e){var t=e.tokenInfo,r=e.profile;return h.info("token",t),this.tokenReceived(t),this.profileService.saveProfileToStorage(r),Promise.resolve(e)},e.prototype.validateToken=function(){var e=this;return this.tokenService.validateToken().then((function(){return Promise.resolve(!0)})).catch((function(t){return h.warn("validate token exception",t),t instanceof B||e.profileService.removeProfile(),Promise.reject(!1)}))},e.prototype.onTokenExpired=function(){var e=this.adobeIdData.handlers;this.tokenService.purge(),e.triggerOnAccessTokenHasExpired()},e.prototype.setStandAloneToken=function(e){return this.tokenService.setStandAloneToken(e)},e.prototype.initialize=function(){var e,t=this,r=this.adobeIdData,n=r.handlers,o=r.standalone,i=r.ijt,s=r.alwaysRemoveTokenFromUrl,a=r.enableGuestAccounts,c=r.enableGuestTokenForceRefresh,u=r.enableGuestBotDetection,l=null;switch(o&&this.setStandAloneToken(o),!0){case!!i:e=this.exchangeIjt;break;case a:e=this.tokenService.getGuestToken.bind(this.tokenService,{},{enableGuestAccounts:a,enableGuestTokenForceRefresh:c,enableGuestBotDetection:u});break;default:e=this.tokenService.getTokenAndProfile}return e().then(this.processTokenResponse,this.processError.apply(this)).then((function(e){l=e})).finally((function(){h.info("onReady initialization"),window.addEventListener("getImsLibInstance",(function(){t.triggerOnImsInstance(t)}),!1),s&&g.setHash(re.removeAccessToken()),n.triggerOnReady(l?l.context:null),t.triggerOnImsInstance(t),t.initialized=!0}))},e.prototype.processError=function(){var e=this;return function(t){return e.verifyModalSignInEvent(t).catch(e.processInitializeException).catch(e.verifyTokenExpiredException).catch(e.verifyRideErrorException).catch(e.verifyCsrfException).catch(e.executeErrorCallback)}},e.prototype.notifyParentAboutModalSignIn=function(e){var t=window.location.href.replace("imslibmodal","wasmodal");if(window.opener)window.opener.postMessage(t,window.location.origin),window.close();else{var r=new BroadcastChannel("imslib");r.postMessage(t),r.close(),window.close()}return Promise.reject("popup")},e.prototype.restoreHash=function(){var e=re.fragmentToObject();e&&e.from_ims&&g.setHash(e.old_hash||"")},e.prototype.getTransitoryAuthorizationCode=function(e,t){return void 0===t&&(t={}),(e=e||{}).response_type=e.response_type||"code",e.target_client_id=e.target_client_id||this.adobeIdData.client_id,e.target_scope=e.target_scope||this.adobeIdData.scope,this.imsApis.getTransitoryAuthorizationCode(e,t,this.adobeIdData.client_id)},e.prototype.jumpToken=function(e,t){return void 0===t&&(t={}),e.target_client_id=e.target_client_id||this.adobeIdData.client_id,e.target_scope=e.target_scope||this.adobeIdData.scope,this.imsApis.jumpToken(e,t,this.adobeIdData.client_id)},e.prototype.getVerifierByKey=function(e){return(new L).getVerifierByKey(e)},e.prototype.socialHeadlessSignIn=function(e){return o(this,arguments,Promise,(function(e,t){var r=this;return void 0===t&&(t={}),i(this,(function(n){return[2,this.imsApis.socialHeadlessSignIn(e,t).then((function(e){return r.exchangeIjt(e.token)})).catch((function(t){return"ride_AdobeID_social"===t.error&&r.signIn({idp_flow:"social.native",provider_id:e.provider_id,idp_token:e.idp_token}),Promise.reject(t)}))]}))}))},e.prototype.getAccountType=function(){var e=this.getAccessToken();if(!e)throw new Error("please login before getting the account type");if(e.isGuestToken)return oe.GUEST;var t=this.profileService.getProfileFromStorage();if(!t)throw new Error("you need to first get the profile before getting the account type");return t.account_type},e.prototype.getSessionExpiration=function(){var e=this.getAccessToken();if(!e)throw new Error("please obtain a token before getting the session expiration");return e.gse},e.prototype.jumpTokenToDevice=function(e,t){void 0===t&&(t={});var r=this.tokenService.getTokenFieldsFromStorage(),n=r?r.user_id:null;return this.imsApis.jumpTokenToDevice(e,t,this.adobeIdData.client_id,n)},e.prototype.onSignOutEventReceived=function(e){e.data.clientId===this.adobeIdData.client_id&&e.data.instanceId!==this.instanceId&&(this.tokenService.purge(),this.profileService.removeProfile(),"function"==typeof this.adobeIdData.onSignOutEventReceived&&this.adobeIdData.onSignOutEventReceived())},e}(),ye=new(function(){function e(){this.createIMSLib=function(e,t){void 0===e&&(e=null),void 0===t&&(t="adobeIMS");var r=new ke(e,t);return window[t]=r,r}}return e.prototype.initAdobeIms=function(){window.adobeImsFactory={createIMSLib:this.createIMSLib};var e=window.adobeIMS||null;if(!e){var t=window.adobeid;if(!t||!t.client_id)return;(e=this.createIMSLib(t,"adobeIMS")).initialize()}},e}());return new(function(){function e(){ye.initAdobeIms()}return e.prototype.initialize=function(){return!0},e}())}();