@microsoft/ocsdk 0.5.22-main.873fbca → 0.5.22-main.8dbdcd5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SDK.min.js +1 -1
- package/lib/Common/Enums.d.ts +10 -1
- package/lib/Common/Enums.js +10 -1
- package/lib/Common/Enums.js.map +1 -1
- package/lib/Common/Locales.js +2 -2
- package/lib/Common/Locales.js.map +1 -1
- package/lib/Common/OmnichannelEndpoints.d.ts +1 -0
- package/lib/Common/OmnichannelEndpoints.js +2 -1
- package/lib/Common/OmnichannelEndpoints.js.map +1 -1
- package/lib/Common/RequestTimeoutConfig.d.ts +3 -0
- package/lib/Common/RequestTimeoutConfig.js +1 -1
- package/lib/Interfaces/ISDK.d.ts +6 -0
- package/lib/Interfaces/ISDK.js +1 -1
- package/lib/SDK.d.ts +24 -0
- package/lib/SDK.js +299 -3
- package/lib/SDK.js.map +1 -1
- package/lib/Utils/waitTimeBetweenRetriesConfigs.js +5 -2
- package/lib/Utils/waitTimeBetweenRetriesConfigs.js.map +1 -1
- package/package.json +1 -1
package/dist/SDK.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see SDK.min.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={79(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},477(){},579(e,t,n){var r=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(6993),o=n(1791);e.exports=function(e,t,n,i,a){return new o(r().w(e,t,n,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1111(e){"use strict";const t=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);e.exports=e=>!t.has(e&&e.code)},1132(e,t,n){var r=n(5901),o=n(9291),i=n(7122),a=n(1869);e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},1415(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.UNKNOWN_VERSION=t.BrowserInfo=void 0;var o=r(n(7383)),i=r(n(4579)),a=r(n(3693)),s=n(2949),u="([\\d,.]+)",c=t.UNKNOWN_VERSION="U",l=t.BrowserInfo=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"getUserAgent",value:function(){return this.userAgent()}},{key:"userAgentContainsString",value:function(e){return this.getUserAgent().indexOf(e)>-1}},{key:"isChrome",value:function(){return this.userAgentContainsString(s.BrowserVendor.CHROME)&&!this.userAgentContainsString(s.BrowserVendor.EDGE)&&!this.userAgentContainsString(s.BrowserVendor.EDGE_CHROMIUM)}},{key:"isIe",value:function(){return this.userAgentContainsString("Trident")}},{key:"isEdge",value:function(){return this.userAgentContainsString(s.BrowserVendor.EDGE)||this.userAgentContainsString(s.BrowserVendor.EDGE_CHROMIUM)}},{key:"isOpera",value:function(){return this.userAgentContainsString("OPR/")}},{key:"getBrowserName",value:function(){return this.isOpera()?s.BrowserVendor.OPERA:this.isEdge()?s.BrowserVendor.EDGE:this.isChrome()?s.BrowserVendor.CHROME:this.userAgentContainsString(s.BrowserVendor.FIREFOX)?s.BrowserVendor.FIREFOX:this.userAgentContainsString(s.BrowserVendor.SAFARI)?s.BrowserVendor.SAFARI:this.isIe()?s.BrowserVendor.IE:s.BrowserVendor.UNKNOWN}},{key:"getBrowserVersion",value:function(){var e=this;return this.isIe()?function(){var t=e.getUserAgent(),n=t.match(new RegExp(s.BrowserVendor.IE+" "+u));if(n)return n[1];var r=t.match(new RegExp("rv:"+u));return r?r[1]:void 0}():function(t){t===s.BrowserVendor.SAFARI&&(t="Version"),t===s.BrowserVendor.OPERA&&(t="OPR"),t===s.BrowserVendor.EDGE&&(t="Edge?");var n=e.getUserAgent().match(new RegExp(t+"/"+u));return n?n[1]:c}(this.getBrowserName())}}])}();(0,a.default)(l,"userAgent",function(){return window.navigator.userAgent})},1728(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579)),a=r(n(9478)),s=r(n(5529)),u=r(n(8537));t.default=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"getSDK",value:function(e,t,n){var r=new s.default(n);return new u.default({channelId:e.channelId||a.default.defaultChannelId,orgId:e.orgId,orgUrl:e.orgUrl,widgetId:e.widgetId},t||{},r)}}])}()},1791(e,t,n){var r=n(5172),o=n(5546);e.exports=function e(t,n){function i(e,o,a,s){try{var u=t[e](o),c=u.value;return c instanceof r?n.resolve(c.v).then(function(e){i("next",e,a,s)},function(e){i("throw",e,a,s)}):n.resolve(c).then(function(e){u.value=e,a(u)},function(e){return i("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},1869(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},1905(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.CustomContextData=void 0;var o=r(n(7383)),i=r(n(4579));t.CustomContextData=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"sort",value:function(e){var t=new Array;return Object.keys(e).forEach(function(n){if(e&&e["".concat(n)]){var r={key:n,value:e["".concat(n)]};t.push(r)}}),t.sort(function(e,t){var n=e.key.toUpperCase(),r=t.key.toUpperCase();return n<r?-1:n>r?1:0}),t}}])}()},2200(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.addOcUserAgentHeader=void 0;var o=r(n(1132)),i=r(n(2805));t.addOcUserAgentHeader=function(e,t){var r=n(8330).rE,a="ocsdk/".concat(r);t["".concat(i.default.ocUserAgent)]=[].concat((0,o.default)(e),[a]).join(" ")}},2487(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579));t.default=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"OCSDKLOAD",get:function(){return"oc:sdk:load"}}])}()},2515(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(9478)),i=n(3770),a=n(9903);t.default=function(e,t){var n,r,s,u,c,l;if(null!=e&&null!==(n=e.response)&&void 0!==n&&n.status)switch(e.response.status){case o.default.tooManyRequestsStatusCode:if(!1===t)return!1;break;case o.default.badRequestStatusCode:if(null!==(r=e.response)&&void 0!==r&&null!==(r=r.headers)&&void 0!==r&&r.errorcode&&parseInt(e.response.headers.errorcode)===o.default.outOfOfficeErrorCode)return!1;break;default:return(0,a.isRetryableError)(e)||(0,i.isNetworkError)(e)||0==(null===(s=e.response)||void 0===s?void 0:s.status)||!(null!==(u=e.response)&&void 0!==u&&u.status)}return(0,a.isRetryableError)(e)||(0,i.isNetworkError)(e)||0==(null===(c=e.response)||void 0===c?void 0:c.status)||!(null!==(l=e.response)&&void 0!==l&&l.status)}},2793(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4579)),i=r(n(7383)),a=r(n(3693)),s=t.default=(0,o.default)(function e(){(0,i.default)(this,e)});(0,a.default)(s,"LiveChatConnectorPath","livechatconnector/organization"),(0,a.default)(s,"LiveChatConnectorAuthPath","livechatconnector/auth/organization"),(0,a.default)(s,"LcwFcsDetailsPath","livechatconnector/v2/lcwfcsdetails"),(0,a.default)(s,"LiveChatConfigPath","livechatconnector/config"),(0,a.default)(s,"LiveChatSessionInitPath","livechatconnector/sessioninit"),(0,a.default)(s,"LiveChatAuthSessionInitPath","livechatconnector/auth/sessioninit"),(0,a.default)(s,"LiveChatGetChatTokenPath","livechatconnector/getchattoken"),(0,a.default)(s,"LiveChatv2GetChatTokenPath","livechatconnector/v2/getchattoken"),(0,a.default)(s,"LiveChatv3GetChatTokenPath","livechatconnector/v3/getchattoken"),(0,a.default)(s,"LiveChatv4GetChatTokenPath","livechatconnector/v4/getchattoken"),(0,a.default)(s,"LiveChatv4AuthGetChatTokenPath","livechatconnector/v4/auth/getchattoken"),(0,a.default)(s,"LiveChatAuthGetChatTokenPath","livechatconnector/auth/getchattoken"),(0,a.default)(s,"LiveChatv2AuthGetChatTokenPath","livechatconnector/v2/auth/getchattoken"),(0,a.default)(s,"LiveChatv3AuthGetChatTokenPath","livechatconnector/v3/auth/getchattoken"),(0,a.default)(s,"LiveChatSessionClosePath","livechatconnector/sessionclose"),(0,a.default)(s,"LiveChatAuthSessionClosePath","livechatconnector/auth/sessionclose"),(0,a.default)(s,"LiveChatSubmitPostChatPath","survey/submitpostchat"),(0,a.default)(s,"LiveChatAuthSubmitPostChatPath","survey/auth/submitpostchat"),(0,a.default)(s,"LiveChatGetSurveyInviteLinkPath","livechatconnector/getsurveyinvite"),(0,a.default)(s,"LiveChatAuthGetSurveyInviteLinkPath","livechatconnector/auth/getsurveyinvite"),(0,a.default)(s,"LiveChatGetChatTranscriptPath","livechatconnector/getchattranscripts"),(0,a.default)(s,"LiveChatv2GetChatTranscriptPath","livechatconnector/v2/getchattranscripts"),(0,a.default)(s,"LiveChatAuthGetChatTranscriptPath","livechatconnector/auth/getchattranscripts"),(0,a.default)(s,"LiveChatv2AuthGetChatTranscriptPath","livechatconnector/v2/auth/getchattranscripts"),(0,a.default)(s,"LiveChatTranscriptEmailRequestPath","livechatconnector/createemailrequest"),(0,a.default)(s,"LiveChatAuthTranscriptEmailRequestPath","livechatconnector/auth/createemailrequest"),(0,a.default)(s,"LiveChatFetchDataMaskingInfoPath","livechatconnector/fetchdatamaskinginfo"),(0,a.default)(s,"LiveChatSecondaryChannelEventPath","livechatconnector/secondarychannelevent"),(0,a.default)(s,"LiveChatAuthSecondaryChannelEventPath","livechatconnector/auth/secondarychannelevent"),(0,a.default)(s,"LiveChatLiveWorkItemDetailsPath","livechatconnector/getliveworkitemdetails"),(0,a.default)(s,"LiveChatAuthLiveWorkItemDetailsPath","livechatconnector/auth/getliveworkitemdetails"),(0,a.default)(s,"LiveChatGetReconnectableChatsPath","livechatconnector/auth/reconnectablechats"),(0,a.default)(s,"LiveChatReconnectAvailabilityPath","livechatconnector/reconnect"),(0,a.default)(s,"LiveChatValidateAuthChatMapRecordPath","livechatconnector/auth/validateauthchatmaprecord"),(0,a.default)(s,"GetAgentAvailabilityPath","livechatconnector/auth/getagentavailability"),(0,a.default)(s,"SendTypingIndicatorPath","inbound/typingindicator/livechat/sendtypingindicator"),(0,a.default)(s,"LiveChatAuthGetPersistentChatHistoryPath","livechatconnector/auth/organization")},2805(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4579)),i=r(n(7383)),a=r(n(3693)),s=t.default=(0,o.default)(function e(){(0,i.default)(this,e)});(0,a.default)(s,"authenticatedUserToken","AuthenticatedUserToken"),(0,a.default)(s,"authorization","Authorization"),(0,a.default)(s,"organizationId","OrganizationId"),(0,a.default)(s,"widgetAppId","widgetAppId"),(0,a.default)(s,"requestId","Request-Id"),(0,a.default)(s,"authCodeNonce","AuthCodeNonce"),(0,a.default)(s,"ocSessionId","Oc-Sessionid"),(0,a.default)(s,"ocUserAgent","Ms-Oc-User-Agent"),(0,a.default)(s,"correlationId","x-ms-client-request-id"),(0,a.default)(s,"pageToken","PageToken")},2949(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKError=t.OperatingSystem=t.OCSDKTelemetryEvent=t.LiveChatVersion=t.DeviceType=t.ChannelId=t.BrowserVendor=t.Browser=void 0,t.BrowserVendor=function(e){return e.IE="IE",e.CHROME="Chrome",e.FIREFOX="Firefox",e.SAFARI="Safari",e.EDGE="Edge",e.EDGE_CHROMIUM="Edg",e.OPERA="Opera",e.UNKNOWN="Unknown",e}({}),t.Browser=function(e){return e[e.Chrome=0]="Chrome",e[e.Firefox=1]="Firefox",e[e.Ie=2]="Ie",e[e.Edge=3]="Edge",e[e.Safari=4]="Safari",e[e.None=5]="None",e}({}),t.DeviceType=function(e){return e.Desktop="Desktop",e.Mobile="Mobile",e.Tablet="Tablet",e}({}),t.OperatingSystem=function(e){return e.WINDOWS="Windows",e.MACOSX="Mac OS X",e.WINDOWS_PHONE="Windows Phone",e.WINDOWS_RT="Windows RT",e.IOS="iOS",e.ANDROID="Android",e.LINUX="Linux",e.UNKNOWN="Unknown",e}({}),t.ChannelId=function(e){return e.LCW="lcw",e.SMS="sms",e.FACEBOOK="facebook",e.WECHAT="wechat",e}({}),t.OCSDKTelemetryEvent=function(e){return e.GETLCWFCSDETAILSSTARTED="GetLcwFcsDetailsStarted",e.GETLCWFCSDETAILSSUCCEEDED="GetLcwFcsDetailsSucceeded",e.GETLCWFCSDETAILSFAILED="GetLcwFcsDetailsFailed",e.GETCHATCONFIGFSTARTED="GetChatConfig",e.GETCHATCONFIGSUCCEEDED="GetChatConfigSucceeded",e.GETCHATCONFIGFAILED="GetChatConfigFailed",e.GETRECONNECTABLECHATSSTARTED="GetReconnnectableChatsStarted",e.GETRECONNECTABLECHATSSUCCEEDED="GetReconnnectableChatsSucceeded",e.GETRECONNECTABLECHATSFAILED="GetReconnnectableChatsFailed",e.GETRECONNECTAVAILABILITYSUCCEEDED="GetReconnnectableAvailabilitySucceeded",e.GETRECONNECTAVAILABILITYSTARTED="GetReconnnectableAvailabilityStarted",e.GETRECONNECTAVAILABILITYFAILED="GetReconnnectableAvailabilityFailed",e.GETCHATTOKENSTARTED="GetChatTokenStarted",e.GETCHATTOKENSUCCEEDED="GetChatTokenSucceeded",e.GETCHATTOKENFAILED="GetChatTokenFailed",e.GETLWISTATUSSTARTED="GetLwiStatusStarted",e.GETLWISTATUSSUCCEEDED="GetLwiStatusSucceeded",e.GETLWISTATUSFAILED="GetLwiStatusFailed",e.SESSIONINITSTARTED="SessionInitStarted",e.SESSIONINITSUCCEEDED="SessionInitSucceeded",e.SESSIONINITFAILED="SessionInitFailed",e.CREATESESSIONSTARTED="CreateSessionStarted",e.CREATESESSIONSUCCEEDED="CreateSessionSucceeded",e.CREATESESSIONFAILED="CreateSessionFailed",e.SESSIONCLOSESTARTED="SessionCloseStarted",e.SESSIONCLOSESUCCEEDED="SessionCloseSucceeded",e.SESSIONCLOSEFAILED="SessionCloseFailed",e.SUBMITPOSTCHATSTARTED="SubmitPostChatStarted",e.SUBMITPOSTCHATSUCCEEDED="SubmitPostChatSucceeded",e.SUBMITPOSTCHATFAILED="SubmitPostChatFailed",e.GETCHATTRANSCRIPTSTARTED="GetChatTranscriptStarted",e.GETCHATTRANSCRIPTSUCCEEDED="GetChatTranscriptSucceeded",e.GETCHATTRANSCRIPTFAILED="GetChatTranscriptFailed",e.EMAILTRANSCRIPTSTARTED="EmailTranscriptStarted",e.EMAILTRANSCRIPTSUCCEEDED="EmailTranscriptSucceeded",e.EMAILTRANSCRIPTFAILED="EmailTranscriptFailed",e.FETCHDATAMASKINGSTARTED="FetchDataMaskingStarted",e.FETCHDATAMASKINGSUCCEEDED="FetchDataMaskingSucceeded",e.FETCHDATAMASKINGFAILED="FetchDataMaskingFailed",e.SECONDARYCHANNELEVENTREQUESTSTARTED="SecondaryChannelEventRequestStarted",e.SECONDARYCHANNELEVENTREQUESTSUCCEEDED="SecondaryChannelEventRequestSucceeded",e.SECONDARYCHANNELEVENTREQUESTFAILED="SecondaryChannelEventRequestFailed",e.GETSURVEYINVITELINKSTARTED="GetSurveyInviteLinkStarted",e.GETSURVEYINVITELINKSUCCEEDED="GetSurveyInviteLinkSucceeded",e.GETSURVEYINVITELINKFAILED="GetSurveyInviteLinkFailed",e.VALIDATEAUTHCHATRECORDSTARTED="ValidateAuthChatRecordStarted",e.VALIDATEAUTHCHATRECORDSUCCEEDED="ValidateAuthChatRecordSucceeded",e.VALIDATEAUTHCHATRECORDFAILED="ValidateAuthChatRecordFailed",e.GETAGENTAVAILABILITYSTARTED="GetAgentAvailabilityStarted",e.GETAGENTAVAILABILITYSUCCEEDED="GetAgentAvailabilitySucceeded",e.GETAGENTAVAILABILITYFAILED="GetAgentAvailabilityFailed",e.SENDTYPINGINDICATORFAILED="SendTypingIndicatorFailed",e.SENDTYPINGINDICATORSUCCEEDED="SendTypingIndicatorSucceeded",e.GETPERSISTENTCHATHISTORYSTARTED="GetPersistentChatHistoryStarted",e.GETPERSISTENTCHATHISTORYSUCCEEDED="GetPersistentChatHistorySucceeded",e.GETPERSISTENTCHATHISTORYFAILED="GetPersistentChatHistoryFailed",e}({}),t.LiveChatVersion=function(e){return e[e.V1=1]="V1",e[e.V2=2]="V2",e[e.V3=3]="V3",e}({}),t.SDKError=function(e){return e.ClientHTTPTimeoutErrorName="ClientHTTPTimeoutError",e.ClientHTTPTimeoutErrorMessage="Server took too long to respond",e}({})},2950(e,t,n){"use strict";var r=n(4994);t.Ay=w;var o=r(n(4756)),i=r(n(3738)),a=r(n(9293)),s=r(n(3693)),u=r(n(1111));function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){(0,s.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var d="axios-retry";function f(e){return!e.response&&Boolean(e.code)&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&(0,u.default)(e)}var h=["get","head","options"],p=h.concat(["put","delete"]);function g(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function v(e){return!!e.config&&g(e)&&-1!==p.indexOf(e.config.method)}function E(e){return f(e)||v(e)}var m={retries:3,retryCondition:E,retryDelay:function(){return 0},shouldResetTimeout:!1,onRetry:function(){}};function T(e,t){var n=function(e,t){return l(l(l({},m),t),e[d])}(e,t);return n.retryCount=n.retryCount||0,e[d]=n,n}function C(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}function y(e,t){return S.apply(this,arguments)}function S(){return(S=(0,a.default)(o.default.mark(function e(t,n){var r,a,s,u;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.retries,a=t.retryCondition,s=t.retryCount<r&&a(n),"object"!==(0,i.default)(s)){e.next=13;break}return e.prev=3,e.next=6,s;case 6:return u=e.sent,e.abrupt("return",!1!==u);case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",!1);case 13:return e.abrupt("return",s);case 14:case"end":return e.stop()}},e,null,[[3,10]])}))).apply(this,arguments)}function w(e,t){var n=e.interceptors.request.use(function(e){return T(e,t).lastRequestTime=Date.now(),e}),r=e.interceptors.response.use(null,function(){var n=(0,a.default)(o.default.mark(function n(r){var i,a,s,u,c,l,d,f;return o.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=r.config){n.next=3;break}return n.abrupt("return",Promise.reject(r));case 3:return a=T(i,t),n.next=6,y(a,r);case 6:if(!n.sent){n.next=21;break}if(a.retryCount+=1,s=a.retryDelay,u=a.shouldResetTimeout,c=a.onRetry,l=s(a.retryCount,r),C(e,i),u||!i.timeout||!a.lastRequestTime){n.next=17;break}if(d=Date.now()-a.lastRequestTime,!((f=i.timeout-d-l)<=0)){n.next=16;break}return n.abrupt("return",Promise.reject(r));case 16:i.timeout=f;case 17:return i.transformRequest=[function(e){return e}],n.next=20,c(a.retryCount,r,i);case 20:return n.abrupt("return",new Promise(function(t){return setTimeout(function(){return t(e(i))},l)}));case 21:return n.abrupt("return",Promise.reject(r));case 22:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}());return{requestInterceptorId:n,responseInterceptorId:r}}w.isNetworkError=f,w.isSafeRequestError=function(e){return!!e.config&&g(e)&&-1!==h.indexOf(e.config.method)},w.isIdempotentRequestError=v,w.isNetworkOrIdempotentRequestError=E,w.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,n=Math.pow(2,e)*t;return n+.2*n*Math.random()},w.isRetryableError=g},3009(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,o=n.WordArray,i=n.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,o=0;o<64;)t(r)&&(o<8&&(s[o]=n(e.pow(r,.5))),u[o]=n(e.pow(r,1/3)),o++),r++}();var c=[],l=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],d=n[6],f=n[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[h-2],E=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[h]=g+c[h-7]+E+c[h-16]}var m=r&o^r&i^o&i,T=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),C=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&d)+u[h]+c[h];f=d,d=l,l=s,s=a+C|0,a=i,i=o,o=r,r=C+(T+m)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(l),t.HmacSHA256=i._createHmacHelper(l)}(Math),r.SHA256)},3693(e,t,n){var r=n(7736);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},3738(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3770(e,t,n){const r=n(2950).Ay;e.exports=r,e.exports.default=r},3905(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceInfo=void 0;var o=r(n(7383)),i=r(n(4579)),a=n(2949);t.DeviceInfo=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"getDeviceType",value:function(){return window.navigator.userAgent.match(/(android|ipod|windows phone|wpdesktop|windows ce|blackberry\w*|meego|webos|palm|symbian|pda|\w*?mobile\w*?|\w*?phone\w*?)/i)?a.DeviceType.Mobile:window.navigator.userAgent.match(/tablet|ipad/i)?a.DeviceType.Tablet:a.DeviceType.Desktop}}])}()},3920(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579));t.default=function(){function e(){(0,o.default)(this,e)}return(0,i.default)(e,null,[{key:"raiseCustomEvent",value:function(t,n){var r=e.createCustomEvent(t,n);window.dispatchEvent(r)}},{key:"createCustomEvent",value:function(e,t){var n=t?{detail:t}:void 0,r=null;try{r=new CustomEvent(e,n)}catch(t){(r=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,n)}return r}}])}()},4063(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(6425));t.default=function(e,t){try{if(o.default.isAxiosError(e)&&e.code==t)return!0}catch(e){return!1}return!1}},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4556(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579));t.default=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"GETTELEMETRYEVENTDATA",value:function(e,t,n){return{Description:n,ElapsedTimeInMilliseconds:t.ElapsedTimeInMilliseconds,HttpRequestResponseTime:t.HttpRequestResponseTime,Event:e,ExceptionDetails:t.ExceptionDetails,Region:t.Region,RequestId:t.RequestId,TransactionId:t.TransactionId,RequestHeaders:t.RequestHeaders,RequestPayload:t.RequestPayload,RequestPath:t.RequestPath,RequestMethod:t.RequestMethod,ResponseStatusCode:t.ResponseStatusCode,ResponseErrorcode:t.ResponseErrorcode,AuthTokenDetails:t.AuthTokenDetails}}}])}()},4579(e,t,n){var r=n(7736);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,n){var r=n(5172),o=n(6993),i=n(5869),a=n(887),s=n(1791),u=n(4373),c=n(579);function l(){"use strict";var t=o(),n=t.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var h={throw:1,return:2,break:3,continue:3};function p(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,h[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,c(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,o){return t.w(p(e),n,r,o&&o.reverse())},isGeneratorFunction:f,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,o){return(f(t)?a:i)(p(e),t,n,r,o)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},4756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},4994(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},5529(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579)),a=r(n(3693)),s=r(n(4556));t.default=function(){return(0,i.default)(function e(t){(0,o.default)(this,e),(0,a.default)(this,"logger",void 0),this.logger=t},[{key:"log",value:function(e,t,n,r){if(this.isLoggingEnabled()){var o=s.default.GETTELEMETRYEVENTDATA(t,n,r);this.logEvent(e,o)}}},{key:"logEvent",value:function(e,t){this.isLoggingEnabled()&&this.logger.logClientSdkTelemetryEvent(e,t)}},{key:"isLoggingEnabled",value:function(){return!this.isNullOrUndefined(this.logger)}},{key:"isNullOrUndefined",value:function(e){return null==e}}])}()},5546(e){function t(n,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5560(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4579)),i=r(n(7383)),a=r(n(3693)),s=t.default=(0,o.default)(function e(){(0,i.default)(this,e)});(0,a.default)(s,"supportedLocales",["ar-sa","bg-bg","ca-es","cs-cz","da-dk","de-de","el-gr","en-us","es-es","et-ee","eu-es","fi-fi","fr-fr","gl-es","he-il","hi-in","hr-hr","hu-hu","id-id","it-it","ja-jp","kk-kz","ko-kr","lt-lt","lv-lv","ms-my","nb-no","nl-nl","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sl-si","sr-cyrl-cs","sr-latn-cs","sv-se","th-th","tr-tr","uk-ua","vi-vn","zh-cn","zh-hk","zh-tw"])},5606(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,u=[],c=!1,l=-1;function d(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||a(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5869(e,t,n){var r=n(887);e.exports=function(e,t,n,o,i){var a=r(e,t,n,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},5901(e,t,n){var r=n(79);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},6425(e,t,n){"use strict";var r=n(5606);function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:s,toStringTag:u}=Symbol,c=(l=Object.create(null),e=>{const t=i.call(e);return l[t]||(l[t]=t.slice(8,-1).toLowerCase())});var l;const d=e=>(e=e.toLowerCase(),t=>c(t)===e),f=e=>t=>typeof t===e,{isArray:h}=Array,p=f("undefined");function g(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const v=d("ArrayBuffer"),E=f("string"),m=f("function"),T=f("number"),C=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==c(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||u in e||s in e)},S=d("Date"),w=d("File"),R=d("Blob"),O=d("FileList"),I=d("URLSearchParams"),[b,A,L,D]=["ReadableStream","Request","Response","Headers"].map(d);function x(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),h(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(g(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function N(e,t){if(g(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,P=e=>!p(e)&&e!==k,_=(U="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>U&&e instanceof U);var U;const F=d("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),G=d("RegExp"),H=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};x(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)},j=d("AsyncFunction"),B=(q="function"==typeof setImmediate,V=m(k.postMessage),q?setImmediate:V?(W=`axios@${Math.random()}`,K=[],k.addEventListener("message",({source:e,data:t})=>{e===k&&t===W&&K.length&&K.shift()()},!1),e=>{K.push(e),k.postMessage(W,"*")}):e=>setTimeout(e));var q,V,W,K;const z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(k):void 0!==r&&r.nextTick||B;var Y={isArray:h,isArrayBuffer:v,isBuffer:g,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=c(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&v(e.buffer),t},isString:E,isNumber:T,isBoolean:e=>!0===e||!1===e,isObject:C,isPlainObject:y,isEmptyObject:e=>{if(!C(e)||g(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:b,isRequest:A,isResponse:L,isHeaders:D,isUndefined:p,isDate:S,isFile:w,isBlob:R,isRegExp:G,isFunction:m,isStream:e=>C(e)&&m(e.pipe),isURLSearchParams:I,isTypedArray:_,isFileList:O,forEach:x,merge:function e(){const{caseless:t,skipUndefined:n}=P(this)&&this||{},r={},o=(o,i)=>{const a=t&&N(r,i)||i;y(r[a])&&y(o)?r[a]=e(r[a],o):y(o)?r[a]=e({},o):h(o)?r[a]=o.slice():n&&p(o)||(r[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&x(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(x(t,(t,r)=>{n&&m(t)?e[r]=o(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const u={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||u[s]||(t[s]=e[s],u[s]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:d,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!T(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[s]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:F,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:H,freezeMethods:e=>{H(e,(t,n)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];m(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return h(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:N,global:k,isContextDefined:P,isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[u]&&e[s])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(C(e)){if(t.indexOf(e)>=0)return;if(g(e))return e;if(!("toJSON"in e)){t[r]=e;const o=h(e)?[]:{};return x(e,(e,t)=>{const i=n(e,r+1);!p(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:j,isThenable:e=>e&&(C(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:B,asap:z,isIterable:e=>null!=e&&m(e[s])};function J(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Y.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.status}}});const $=J.prototype,X={};function Q(e){return Y.isPlainObject(e)||Y.isArray(e)}function Z(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,n){return e?e.concat(t).map(function(e,t){return e=Z(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{X[e]={value:e}}),Object.defineProperties(J,X),Object.defineProperty($,"isAxiosError",{value:!0}),J.from=(e,t,n,r,o,i)=>{const a=Object.create($);Y.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",u=null==t&&e?e.code:t;return J.call(a,s,u,n,r,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const te=Y.toFlatObject(Y,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Y.isUndefined(t[e])})).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Y.isSpecCompliantForm(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(Y.isDate(e))return e.toISOString();if(Y.isBoolean(e))return e.toString();if(!s&&Y.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(e)||Y.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(Y.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Y.isArray(e)&&function(e){return Y.isArray(e)&&!e.some(Q)}(e)||(Y.isFileList(e)||Y.endsWith(n,"[]"))&&(s=Y.toArray(e)))return n=Z(n),s.forEach(function(e,r){!Y.isUndefined(e)&&null!==e&&t.append(!0===a?ee([n],r,i):null===a?n:n+"[]",u(e))}),!1;return!!Q(e)||(t.append(ee(o,n,i),u(e)),!1)}const l=[],d=Object.assign(te,{defaultVisitor:c,convertValue:u,isVisitable:Q});if(!Y.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Y.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Y.forEach(n,function(n,i){!0===(!(Y.isUndefined(n)||null===n)&&o.call(t,n,Y.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),l.pop()}}(e),t}function re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function oe(e,t){this._pairs=[],e&&ne(e,this,t)}const ie=oe.prototype;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function se(e,t,n){if(!t)return e;const r=n&&n.encode||ae;Y.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Y.isURLSearchParams(t)?t.toString():new oe(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){const t=e?function(t){return e.call(this,t,re)}:re;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Y.forEach(this.handlers,function(t){null!==t&&e(t)})}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const de="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,he=de&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ge=de&&window.location.href||"http://localhost";var ve={...Object.freeze({__proto__:null,hasBrowserEnv:de,hasStandardBrowserWebWorkerEnv:pe,hasStandardBrowserEnv:he,navigator:fe,origin:ge}),...le};function Ee(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&Y.isArray(r)?r.length:i,s?(Y.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&Y.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Y.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(e,r)=>{t(function(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const me={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Y.isObject(e);if(o&&Y.isHTMLForm(e)&&(e=new FormData(e)),Y.isFormData(e))return r?JSON.stringify(Ee(e)):e;if(Y.isArrayBuffer(e)||Y.isBuffer(e)||Y.isStream(e)||Y.isFile(e)||Y.isBlob(e)||Y.isReadableStream(e))return e;if(Y.isArrayBufferView(e))return e.buffer;if(Y.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new ve.classes.URLSearchParams,{visitor:function(e,t,n,r){return ve.isNode&&Y.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Y.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ne(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(Y.isString(e))try{return(0,JSON.parse)(e),Y.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||me.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Y.isResponse(e)||Y.isReadableStream(e))return e;if(e&&Y.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch"],e=>{me.headers[e]={}});var Te=me;const Ce=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ye=Symbol("internals");function Se(e){return e&&String(e).trim().toLowerCase()}function we(e){return!1===e||null==e?e:Y.isArray(e)?e.map(we):String(e)}function Re(e,t,n,r,o){return Y.isFunction(r)?r.call(this,t,n):(o&&(t=n),Y.isString(t)?Y.isString(r)?-1!==t.indexOf(r):Y.isRegExp(r)?r.test(t):void 0:void 0)}class Oe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Se(t);if(!o)throw new Error("header name must be a non-empty string");const i=Y.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=we(e))}const i=(e,t)=>Y.forEach(e,(e,n)=>o(e,n,t));if(Y.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Y.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ce[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Y.isObject(e)&&Y.isIterable(e)){let n,r,o={};for(const t of e){if(!Y.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?Y.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Se(e)){const n=Y.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Y.isFunction(t))return t.call(this,e,n);if(Y.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Se(e)){const n=Y.findKey(this,e);return!(!n||void 0===this[n]||t&&!Re(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Se(e)){const o=Y.findKey(n,e);!o||t&&!Re(0,n[o],o,t)||(delete n[o],r=!0)}}return Y.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Re(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Y.forEach(this,(r,o)=>{const i=Y.findKey(n,o);if(i)return t[i]=we(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=we(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Y.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Y.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[ye]=this[ye]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Se(e);t[r]||(function(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Y.isArray(e)?e.forEach(r):r(e),this}}Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(Oe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Y.freezeMethods(Oe);var Ie=Oe;function be(e,t){const n=this||Te,r=t||n,o=Ie.from(r.headers);let i=r.data;return Y.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Ae(e){return!(!e||!e.__CANCEL__)}function Le(e,t,n){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,n),this.name="CanceledError"}function De(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Y.inherits(Le,J,{__CANCEL__:!0});const xe=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const f=c&&u-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(n,i){let a,s,u=0,c=1e3/i;const l=(n,i=Date.now())=>{u=i,a=null,s&&(clearTimeout(s),s=null),(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,u=o(s);r=i,e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-u;n>=c?l(e,t):(a=e,s||(s=setTimeout(()=>{s=null,l(a)},c-n)))},()=>a&&l(a)]}(0,n)},Ne=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ke=e=>(...t)=>Y.asap(()=>e(...t));var Pe=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,_e=ve.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Y.isString(r)&&s.push(`path=${r}`),Y.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),Y.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Ue(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Fe=e=>e instanceof Ie?{...e}:e;function Me(e,t){t=t||{};const n={};function r(e,t,n,r){return Y.isPlainObject(e)&&Y.isPlainObject(t)?Y.merge.call({caseless:r},e,t):Y.isPlainObject(t)?Y.merge({},t):Y.isArray(t)?t.slice():t}function o(e,t,n,o){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Y.isUndefined(t))return r(void 0,t)}function a(e,t){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Fe(e),Fe(t),0,!0)};return Y.forEach(Object.keys({...e,...t}),function(r){const i=u[r]||o,a=i(e[r],t[r],r);Y.isUndefined(a)&&i!==s||(n[r]=a)}),n}var Ge=e=>{const t=Me({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=Ie.from(a),t.url=se(Ue(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Y.isFormData(n))if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Y.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&a.set(e,n)})}if(ve.hasStandardBrowserEnv&&(r&&Y.isFunction(r)&&(r=r(t)),r||!1!==r&&Pe(t.url))){const e=o&&i&&_e.read(i);e&&a.set(o,e)}return t},He="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Ge(e);let o=r.data;const i=Ie.from(r.headers).normalize();let a,s,u,c,l,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let g=new XMLHttpRequest;function v(){if(!g)return;const r=Ie.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());De(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(n(new J("Request aborted",J.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const r=new J(t&&t.message?t.message:"Network Error",J.ERR_NETWORK,e,g);r.event=t||null,n(r),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new J(t,o.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&Y.forEach(i.toJSON(),function(e,t){g.setRequestHeader(t,e)}),Y.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),h&&([u,l]=xe(h,!0),g.addEventListener("progress",u)),f&&g.upload&&([s,c]=xe(f),g.upload.addEventListener("progress",s),g.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{g&&(n(!t||t.type?new Le(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const E=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);E&&-1===ve.protocols.indexOf(E)?n(new J("Unsupported protocol "+E+":",J.ERR_BAD_REQUEST,e)):g.send(o||null)})},je=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof J?t:new Le(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>Y.asap(a),s}};const Be=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},qe=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Be(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Ve}=Y,We=(({Request:e,Response:t})=>({Request:e,Response:t}))(Y.global),{ReadableStream:Ke,TextEncoder:ze}=Y.global,Ye=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=e=>{e=Y.merge.call({skipUndefined:!0},We,e);const{fetch:t,Request:n,Response:r}=e,o=t?Ve(t):"function"==typeof fetch,i=Ve(n),a=Ve(r);if(!o)return!1;const s=o&&Ve(Ke),u=o&&("function"==typeof ze?(c=new ze,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const l=i&&s&&Ye(()=>{let e=!1;const t=new n(ve.origin,{body:new Ke,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=a&&s&&Ye(()=>Y.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:h,timeout:p,onDownloadProgress:g,onUploadProgress:v,responseType:E,headers:m,withCredentials:T="same-origin",fetchOptions:C}=Ge(e),y=t||fetch;E=E?(E+"").toLowerCase():"text";let S=je([c,h&&h.toAbortSignal()],p),w=null;const R=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let O;try{if(v&&l&&"get"!==a&&"head"!==a&&0!==(O=await(async(e,t)=>{const r=Y.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Y.isBlob(e))return e.size;if(Y.isSpecCompliantForm(e)){const t=new n(ve.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Y.isArrayBufferView(e)||Y.isArrayBuffer(e)?e.byteLength:(Y.isURLSearchParams(e)&&(e+=""),Y.isString(e)?(await u(e)).byteLength:void 0)})(t):r})(m,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(Y.isFormData(s)&&(e=t.headers.get("content-type"))&&m.setContentType(e),t.body){const[e,n]=Ne(O,xe(ke(v)));s=qe(t.body,65536,e,n)}}Y.isString(T)||(T=T?"include":"omit");const t=i&&"credentials"in n.prototype,c={...C,signal:S,method:a.toUpperCase(),headers:m.normalize().toJSON(),body:s,duplex:"half",credentials:t?T:void 0};w=i&&new n(o,c);let h=await(i?y(w,C):y(o,c));const p=d&&("stream"===E||"response"===E);if(d&&(g||p&&R)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=Y.toFiniteNumber(h.headers.get("content-length")),[n,o]=g&&Ne(t,xe(ke(g),!0))||[];h=new r(qe(h.body,65536,n,()=>{o&&o(),R&&R()}),e)}E=E||"text";let I=await f[Y.findKey(f,E)||"text"](h,e);return!p&&R&&R(),await new Promise((t,n)=>{De(t,n,{data:I,headers:Ie.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:w})})}catch(t){if(R&&R(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,w),{cause:t.cause||t});throw J.from(t,t&&t.code,e,w)}}},$e=new Map,Xe=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,u=i.length,c=$e;for(;u--;)a=i[u],s=c.get(a),void 0===s&&c.set(a,s=u?new Map:Je(t)),c=s;return s};Xe();const Qe={http:null,xhr:He,fetch:{get:Xe}};Y.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ze=e=>`- ${e}`,et=e=>Y.isFunction(e)||null===e||!1===e;var tt=function(e,t){e=Y.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!et(r)&&(o=Qe[(n=String(r)).toLowerCase()],void 0===o))throw new J(`Unknown adapter '${n}'`);if(o&&(Y.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new J("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Ze).join("\n"):" "+Ze(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Le(null,e)}function rt(e){return nt(e),e.headers=Ie.from(e.headers),e.data=be.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tt(e.adapter||Te.adapter,e)(e).then(function(t){return nt(e),t.data=be.call(e,e.transformResponse,t),t.headers=Ie.from(t.headers),t},function(t){return Ae(t)||(nt(e),t&&t.response&&(t.response.data=be.call(e,e.transformResponse,t.response),t.response.headers=Ie.from(t.response.headers))),Promise.reject(t)})}const ot="1.13.2",it={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{it[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const at={};it.transitional=function(e,t,n){function r(e,t){return"[Axios v"+ot+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new J(r(o," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!at[o]&&(at[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},it.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var st={assertOptions:function(e,t,n){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new J("option "+i+" must be "+n,J.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new J("Unknown option "+i,J.ERR_BAD_OPTION)}},validators:it};const ut=st.validators;class ct{constructor(e){this.defaults=e||{},this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Me(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&st.assertOptions(n,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),null!=r&&(Y.isFunction(r)?t.paramsSerializer={serialize:r}:st.assertOptions(r,{encode:ut.function,serialize:ut.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),st.assertOptions(t,{baseUrl:ut.spelling("baseURL"),withXsrfToken:ut.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Y.merge(o.common,o[t.method]);o&&Y.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Ie.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const u=[];let c;this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let l,d=0;if(!s){const e=[rt.bind(this),void 0];for(e.unshift(...a),e.push(...u),l=e.length,c=Promise.resolve(t);d<l;)c=c.then(e[d++],e[d++]);return c}l=a.length;let f=t;for(;d<l;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=rt.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=u.length;d<l;)c=c.then(u[d++],u[d++]);return c}getUri(e){return se(Ue((e=Me(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Y.forEach(["delete","get","head","options"],function(e){ct.prototype[e]=function(t,n){return this.request(Me(n||{},{method:e,url:t,data:(n||{}).data}))}}),Y.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(Me(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ct.prototype[e]=t(),ct.prototype[e+"Form"]=t(!0)});var lt=ct;class dt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Le(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new dt(function(t){e=t}),cancel:e}}}var ft=dt;const ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ht).forEach(([e,t])=>{ht[t]=e});var pt=ht;const gt=function e(t){const n=new lt(t),r=o(lt.prototype.request,n);return Y.extend(r,lt.prototype,n,{allOwnKeys:!0}),Y.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Me(t,n))},r}(Te);gt.Axios=lt,gt.CanceledError=Le,gt.CancelToken=ft,gt.isCancel=Ae,gt.VERSION=ot,gt.toFormData=ne,gt.AxiosError=J,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return Y.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=Me,gt.AxiosHeaders=Ie,gt.formToJSON=e=>Ee(Y.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=tt,gt.HttpStatusCode=pt,gt.default=gt,e.exports=gt},6676(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidv4=void 0,t.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}},6993(e,t,n){var r=n(5546);function o(){var t,n,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function u(e,o,i,a){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return r(u,"_invoke",function(e,r,o){var i,a,s,u=0,l=o||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,a=0,s=t,f.n=n,c}};function h(e,r){for(a=e,s=r,n=0;!d&&u&&!o&&n<l.length;n++){var o,i=l[n],h=f.p,p=i[2];e>3?(o=p===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=e<2&&h<i[1])?(a=0,f.v=r,f.n=i[1]):h<p&&(o=e<3||i[0]>r||r>p)&&(i[4]=e,i[5]=r,f.n=p,a=0))}if(o||e>1)return c;throw d=!0,r}return function(o,l,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&h(l,p),a=l,s=p;(n=a<2?t:s)||!d;){i||(a?a<3?(a>1&&(f.n=-1),h(a,s)):f.n=s:f.v=s);try{if(u=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((n=(d=f.n<0)?s:e.call(r,f))!==c)break}catch(e){i=t,a=1,s=e}finally{u=1}}return{value:n,done:d}}}(e,i,a),!0),u}var c={};function l(){}function d(){}function f(){}n=Object.getPrototypeOf;var h=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),p=f.prototype=l.prototype=Object.create(h);function g(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,r(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return d.prototype=f,r(p,"constructor",f),r(f,"constructor",d),d.displayName="GeneratorFunction",r(f,s,"GeneratorFunction"),r(p),r(p,s,"Generator"),r(p,a,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:u,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},7122(e,t,n){var r=n(79);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7383(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},7537(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.OSInfo=void 0;var o=r(n(7383)),i=r(n(4579)),a=n(2949);t.OSInfo=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"getOsType",value:function(){var e=function(){return window.navigator.userAgent};return e().match(/windows\sphone\s\d+\.\d+/i)?a.OperatingSystem.WINDOWS_PHONE:e().match(/ arm;/i)?a.OperatingSystem.WINDOWS_RT:e().match(/(iPad|iPhone|iPod)(?=.*like Mac OS X)/i)?a.OperatingSystem.IOS:e().match(/android/i)?a.OperatingSystem.ANDROID:e().match(/(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|cros)/i)?a.OperatingSystem.LINUX:e().match(/(macintosh|mac os x)/i)?a.OperatingSystem.MACOSX:e().match(/(windows|win32)/i)?a.OperatingSystem.WINDOWS:a.OperatingSystem.UNKNOWN}}])}()},7736(e,t,n){var r=n(3738).default,o=n(9045);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7748(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.createGetChatTokenEndpoint=void 0;var o=r(n(3693)),i=n(2949),a=r(n(2793));t.createGetChatTokenEndpoint=function(e,t,n){var r=(0,o.default)((0,o.default)((0,o.default)({},i.LiveChatVersion.V1,a.default.LiveChatGetChatTokenPath),i.LiveChatVersion.V2,a.default.LiveChatv2GetChatTokenPath),i.LiveChatVersion.V3,a.default.LiveChatv3GetChatTokenPath),s=(0,o.default)((0,o.default)((0,o.default)({},i.LiveChatVersion.V1,a.default.LiveChatAuthGetChatTokenPath),i.LiveChatVersion.V2,a.default.LiveChatv2AuthGetChatTokenPath),i.LiveChatVersion.V3,a.default.LiveChatv3AuthGetChatTokenPath);return n?t?a.default.LiveChatv4AuthGetChatTokenPath:a.default.LiveChatv4GetChatTokenPath:Object.values(i.LiveChatVersion).includes(e)?t?s[e]:r[e]:t?s[i.LiveChatVersion.V2]:r[i.LiveChatVersion.V2]}},7938(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitTimeBetweenRetriesConfigs=void 0,t.waitTimeBetweenRetriesConfigs={getChatConfig:1e3,getLWIDetails:3e3,getChatToken:1e3,sessionInit:1e3,sessionClose:1e3,getReconnectableChats:1e3,getReconnectAvailability:1e3,submitPostChatResponse:1e3,getSurveyInviteLink:1e3,getChatTranscripts:1e3,emailTranscript:1e3,fetchDataMaskingInfo:1e3,makeSecondaryChannelEventRequest:1e3,getAgentAvailability:1e3,sendTypingIndicator:1e3,validateAuthChatRecordTimeout:1e3,getPersistentChatHistory:1e3}},8310(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var o=r(n(7383)),i=r(n(4579));t.Timer=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"TIMER",value:function(){var e=(new Date).getTime();return{get milliSecondsElapsed(){return(new Date).getTime()-e}}}}])}()},8330(e){"use strict";e.exports=JSON.parse('{"rE":"0.5.22-main.873fbca"}')},8503(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingSanitizer=void 0;var o=r(n(3738)),i=r(n(7383)),a=r(n(4579)),s=r(n(3693)),u=r(n(9478)),c=r(n(2805)),l=t.LoggingSanitizer=function(){function e(){(0,i.default)(this,e)}return(0,a.default)(e,null,[{key:"stripCustomContextDataValues",value:function(e){var t;e&&(null===(t=Object.keys(e))||void 0===t||t.forEach(function(t){var n;null!==(n=e["".concat(t)])&&void 0!==n&&n.value&&(e["".concat(t)].value=u.default.hiddenContentPlaceholder)}))}},{key:"stripPreChatResponse",value:function(e){e&&Object.keys(e).forEach(function(t){e["".concat(t)]&&"Type"!==t&&(e["".concat(t)]=u.default.hiddenContentPlaceholder)})}},{key:"stripGeolocation",value:function(e){e&&(Object.keys(e).includes("longitude")&&(e.longitude=u.default.hiddenContentPlaceholder),Object.keys(e).includes("latitude")&&(e.latitude=u.default.hiddenContentPlaceholder))}},{key:"stripAuthenticationUserToken",value:function(e){e&&(Object.keys(e).includes(c.default.authenticatedUserToken)&&(e[c.default.authenticatedUserToken]=u.default.hiddenContentPlaceholder),Object.keys(e).includes(c.default.authCodeNonce)&&(e[c.default.authCodeNonce]=u.default.hiddenContentPlaceholder),Object.keys(e).includes(c.default.authorization)&&(e[c.default.authorization]=u.default.hiddenContentPlaceholder))}},{key:"stripRequestHeadersSensitiveProperties",value:function(t){e.stripAuthenticationUserToken(t),Object.keys(t).includes(c.default.authorization)&&(t[c.default.authorization]=u.default.hiddenContentPlaceholder)}},{key:"stripRequestPayloadData",value:function(t){if(null!=t&&t.data){var n;if("string"==typeof t.data)try{n=JSON.parse(t.data)}catch(e){n=void 0}n&&(Object.keys(n).includes("preChatResponse")&&e.stripPreChatResponse(n.preChatResponse),Object.keys(n).includes("customContextData")&&e.stripCustomContextDataValues(n.customContextData),e.stripGeolocation(n),t.data=JSON.stringify(n),t.data=e.stripEmailDataFromError(t.data))}}},{key:"stripEmailDataFromError",value:function(e){return e.replace(this.emailRegex,u.default.hiddenContentPlaceholder)}},{key:"stripAxiosErrorSensitiveProperties",value:function(t){var n,r,o,i,a,s,u;t.isAxiosError&&(null!=t&&null!==(n=t.config)&&void 0!==n&&n.headers&&e.stripAuthenticationUserToken(null==t||null===(a=t.config)||void 0===a?void 0:a.headers),null!=t&&null!==(r=t.config)&&void 0!==r&&r.data&&this.stripRequestPayloadData(null==t?void 0:t.config),null!=t&&null!==(o=t.response)&&void 0!==o&&null!==(o=o.config)&&void 0!==o&&o.data&&this.stripRequestPayloadData(null==t||null===(s=t.response)||void 0===s?void 0:s.config),null!=t&&null!==(i=t.response)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.headers&&e.stripAuthenticationUserToken(null==t||null===(u=t.response)||void 0===u||null===(u=u.config)||void 0===u?void 0:u.headers))}},{key:"stripErrorSensitiveProperties",value:function(e){var t;e&&"object"===(0,o.default)(e)&&(null===(t=Object.keys(e))||void 0===t?void 0:t.length)>0&&this.stripAxiosErrorSensitiveProperties(e)}}])}();(0,s.default)(l,"emailRegex",/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g)},8537(e,t,n){"use strict";var r=n(4994),o=n(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=r(n(4756)),s=r(n(9293)),u=r(n(3738)),c=r(n(7383)),l=r(n(4579)),d=r(n(3693)),f=n(2949),h=r(n(6425)),p=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var n,r,i={__proto__:null,default:e};if(null===e||"object"!=o(e)&&"function"!=typeof e)return i;if(n=t){if(n.has(e))return n.get(e);n.set(e,i)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(r.get||r.set)?n(i,a,r):i[a]=e[a]);return i}(e)}(n(9903)),g=n(1415),v=r(n(9478)),E=n(1905),m=n(3905),T=r(n(9956)),C=r(n(5560)),y=n(8971),S=n(8503),w=n(7537),R=r(n(2793)),O=r(n(2805)),I=r(n(3009)),b=n(8310),A=n(2200),L=n(7748),D=r(n(4063)),x=r(n(2515)),N=n(6676),k=n(7938);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){(0,d.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var F=t.default=function(){return(0,l.default)(function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultConfiguration,o=arguments.length>2?arguments[2]:void 0;(0,c.default)(this,e),this.omnichannelConfiguration=t,this.configuration=r,this.logger=o,(0,d.default)(this,"liveChatVersion",void 0),(0,d.default)(this,"sessionId",void 0),(0,d.default)(this,"ocUserAgent",void 0),(0,d.default)(this,"HTTPTimeOutErrorMessage","".concat(f.SDKError.ClientHTTPTimeoutErrorName,": ").concat(f.SDKError.ClientHTTPTimeoutErrorMessage)),(0,d.default)(this,"setAuthCodeNonce",function(e){null!=e&&e.authcodenonce&&(n.configuration.authCodeNonce=null==e?void 0:e.authcodenonce)}),(0,d.default)(this,"setSessionIdHeader",function(e,t){e&&(t[O.default.ocSessionId]=e)}),(0,d.default)(this,"setRequestIdHeader",function(e,t){e&&(t[O.default.requestId]=e)}),(0,d.default)(this,"setCorrelationIdInHeader",function(e,t){e&&(t[O.default.correlationId]=e)}),Object.keys(this.configuration).length&&"object"===(0,u.default)(r)||(this.configuration=e.defaultConfiguration);for(var i=0,a=Object.keys(e.defaultConfiguration);i<a.length;i++){var s=a[i];this.configuration.hasOwnProperty(s)||(this.configuration["".concat(s)]=e.defaultConfiguration["".concat(s)])}for(var l=0,h=Object.keys(e.defaultConfiguration.requestTimeoutConfig);l<h.length;l++){var p=h[l];this.configuration.requestTimeoutConfig.hasOwnProperty(p)||(this.configuration.requestTimeoutConfig["".concat(p)]=e.defaultConfiguration.requestTimeoutConfig["".concat(p)])}var g=t.channelId;if(!Object.values(f.ChannelId).includes(g))throw new Error("Invalid channelId");var E,m=Object.keys(t),T=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return U(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(v.default.requiredOmnichannelConfigurationParameters);try{for(T.s();!(E=T.n()).done;){var C=E.value;if(!m.includes(C))throw new Error("Missing '".concat(C,"' in OmnichannelConfiguration"))}}catch(e){T.e(e)}finally{T.f()}this.ocUserAgent=this.configuration.ocUserAgent,this.liveChatVersion=f.LiveChatVersion.V2},[{key:"getLcwFcsDetails",value:(z=(0,s.default)(a.default.mark(function e(){var t,n,r,o,i,s,u,c,l,d,g,v,E,m,T;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETLCWFCSDETAILSSTARTED,"Get LCW FCS details started",""),n="/".concat(R.default.LcwFcsDetailsPath,"/").concat(this.omnichannelConfiguration.orgId),r="GET",o="".concat(this.omnichannelConfiguration.orgUrl).concat(n),i=h.default.create(),(0,p.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getChatConfig}),s={},(0,A.addOcUserAgentHeader)(this.ocUserAgent,s),u=b.Timer.TIMER(),e.prev=1,e.next=2,i.get(o,{headers:s,timeout:null!==(c=this.configuration.defaultRequestTimeout)&&void 0!==c?c:this.configuration.requestTimeoutConfig.getChatConfig});case 2:return l=e.sent,d=u.milliSecondsElapsed,g=t.milliSecondsElapsed,v=l.data,this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETLCWFCSDETAILSSUCCEEDED,"Get LCW FCS details succeeded","",l,g,n,r,void 0,void 0,s,d),e.abrupt("return",v);case 3:throw e.prev=3,T=e.catch(1),E=u.milliSecondsElapsed,m=t.milliSecondsElapsed,this.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETLCWFCSDETAILSFAILED,"Get LCW FCS details failed","",void 0,m,n,r,T,void 0,s,E),T;case 4:case"end":return e.stop()}},e,this,[[1,3]])})),function(){return z.apply(this,arguments)})},{key:"getChatConfig",value:(K=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,s,u,c,l,d,g,E,m,T,C,S,w,O=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=O.length>1&&void 0!==O[1]&&O[1],r=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATCONFIGFSTARTED,"Get Chat config started",t),t||(t=(0,N.uuidv4)()),o="/".concat(R.default.LiveChatConfigPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"?requestId=").concat(t,"&channelId=").concat(this.omnichannelConfiguration.channelId),i="GET",s="".concat(this.omnichannelConfiguration.orgUrl).concat(o),u=h.default.create(),(0,p.default)(u,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getChatConfig}),c={},this.addDefaultHeaders(t,c),n&&(c=_(_({},v.default.bypassCacheHeaders),c)),l=b.Timer.TIMER(),e.prev=1,e.next=2,u.get(s,{headers:c,timeout:null!==(d=this.configuration.defaultRequestTimeout)&&void 0!==d?d:this.configuration.requestTimeoutConfig.getChatConfig});case 2:return g=e.sent,E=l.milliSecondsElapsed,m=r.milliSecondsElapsed,(T=g.data).LiveChatVersion&&(this.liveChatVersion=T.LiveChatVersion),T.headers={},g.headers&&g.headers.date&&(T.headers.date=g.headers.date),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATCONFIGSUCCEEDED,"Get Chat config succeeded",t,g,m,o,i,void 0,void 0,c,E),e.abrupt("return",T);case 3:return e.prev=3,w=e.catch(1),C=l.milliSecondsElapsed,S=r.milliSecondsElapsed,this.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETCHATCONFIGFAILED,"Get Chat config failed",t,void 0,S,o,i,w,void 0,c,C),e.abrupt("return",Promise.reject(w));case 4:case"end":return e.stop()}},e,this,[[1,3]])})),function(e){return K.apply(this,arguments)})},{key:"getLWIDetails",value:(W=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g,E,m,T,C=this,S=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=S.length>1&&void 0!==S[1]?S[1]:{},o=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETLWISTATUSSTARTED,"Get LWI Details Started",t),t||(t=(0,N.uuidv4)()),i="/".concat(R.default.LiveChatLiveWorkItemDetailsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),u=h.default.create(),(0,p.axiosRetryHandlerWithNotFound)(u,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getLWIDetails}),c=r.authenticatedUserToken,l=r.reconnectId,d=v.default.defaultHeaders,c&&(i="/".concat(R.default.LiveChatAuthLiveWorkItemDetailsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),d[O.default.authenticatedUserToken]=c,d[O.default.authCodeNonce]=this.configuration.authCodeNonce),this.addDefaultHeaders(t,d),g=!c&&!0===this.configuration.useUnauthReconnectIdSigQueryParam,l&&(g||(i+="/".concat(l))),E={channelId:this.omnichannelConfiguration.channelId},l&&g&&(E.sig=l),m="".concat(this.omnichannelConfiguration.orgUrl).concat(i),T={headers:d,method:"GET",url:m,params:E,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getLWIDetails},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var s,c,l,h,p,g,E,m,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=b.Timer.TIMER(),e.prev=1,e.next=2,u(T);case 2:c=e.sent,l=s.milliSecondsElapsed,h=o.milliSecondsElapsed,p=c.data,g=c.headers,C.setAuthCodeNonce(g),C.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETLWISTATUSSUCCEEDED,"Get LWI Details succeeded",t,c,h,i,"GET",void 0,void 0,d,l),n(p),e.next=4;break;case 3:e.prev=3,S=e.catch(1),E=s.milliSecondsElapsed,m=o.milliSecondsElapsed,C.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETLWISTATUSFAILED,"Get LWI Details failed",t,void 0,m,i,"GET",S,void 0,d,E),(0,D.default)(S,v.default.axiosTimeoutErrorCode)&&r(new Error(C.HTTPTimeOutErrorMessage)),r(S);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return W.apply(this,arguments)})},{key:"getChatToken",value:(V=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g,E,m,T,C,S,w,R,I,A,x=this,k=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=k.length>1&&void 0!==k[1]?k[1]:{},o=k.length>2&&void 0!==k[2]?k[2]:0,i=b.Timer.TIMER(),u=r.reconnectId,c=r.authenticatedUserToken,l=r.currentLiveChatVersion,d=r.refreshToken,g=r.MsOcBotApplicationId,E=!!(g&&g.length>0),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATTOKENSTARTED,"Get Chat Token Started",t),!(o<0)){e.next=1;break}throw new Error("Invalid currentRetryCount");case 1:return t||(t=(0,N.uuidv4)()),m=v.default.defaultHeaders,this.addDefaultHeaders(t,m),T=(0,L.createGetChatTokenEndpoint)(l||this.liveChatVersion,!!c,E),c&&(m[O.default.authenticatedUserToken]=c,m[O.default.authCodeNonce]=this.configuration.authCodeNonce),C="/".concat(T,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),S=!c&&!0===this.configuration.useUnauthReconnectIdSigQueryParam,u&&(S||(C+="/".concat(u))),w={channelId:this.omnichannelConfiguration.channelId},g&&g.length>0&&(w["Ms-Oc-Bot-Application-Id"]=g),d&&(w.refreshToken="true"),u&&S&&(w.sig=u),R="".concat(this.omnichannelConfiguration.orgUrl).concat(C),I={headers:m,method:"GET",url:R,params:w,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getChatToken},A=h.default.create(),(0,p.default)(A,{headerOverwrites:[O.default.authCodeNonce],retries:o>this.configuration.maxRequestRetriesOnFailure?o:this.configuration.maxRequestRetriesOnFailure,retryOn429:this.configuration.getChatTokenRetryOn429,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getChatToken}),e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,c,l,d,h,p,g,E;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=b.Timer.TIMER(),e.prev=1,e.next=2,A(I);case 2:if(s=e.sent,c=o.milliSecondsElapsed,l=i.milliSecondsElapsed,d=s.data,h=s.headers,x.setAuthCodeNonce(h),h&&h[O.default.ocSessionId.toLowerCase()]&&(x.sessionId=h[O.default.ocSessionId.toLowerCase()]),!d){e.next=4;break}if(0!==Object.keys(d).length){e.next=3;break}return r(new Error("Empty data received from getChatToken")),e.abrupt("return");case 3:return d.requestId=t,x.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATTOKENSUCCEEDED,"Get Chat Token succeeded",t,s,l,C,"GET",void 0,void 0,m,c),n(d),e.abrupt("return");case 4:if(!u||s.status!==v.default.noContentStatusCode){e.next=5;break}return r(s),e.abrupt("return");case 5:e.next=7;break;case 6:e.prev=6,E=e.catch(1),p=o.milliSecondsElapsed,g=i.milliSecondsElapsed,x.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETCHATTOKENFAILED,"Get Chat Token failed",t,void 0,g,C,"GET",E,void 0,m,p),(0,D.default)(E,v.default.axiosTimeoutErrorCode)&&r(new Error(x.HTTPTimeOutErrorMessage)),r(E);case 7:case"end":return e.stop()}},e,null,[[1,6]])}));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}},e,this)})),function(e){return V.apply(this,arguments)})},{key:"getReconnectableChats",value:(q=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,p,g=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=b.Timer.TIMER(),o=t.authenticatedUserToken,this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETRECONNECTABLECHATSSTARTED,"Get Reconnectable chat Started"),i=null==t?void 0:t.requestId,u="/".concat(R.default.LiveChatGetReconnectableChatsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(i,"?channelId=").concat(this.omnichannelConfiguration.channelId),(c=v.default.defaultHeaders)[O.default.authenticatedUserToken]=o,c[O.default.authCodeNonce]=this.configuration.authCodeNonce,this.addDefaultHeaders(i,c),l="".concat(this.omnichannelConfiguration.orgUrl).concat(u),d={headers:c,method:"GET",url:l,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getReconnectableChats},p=h.default.create(),e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(t,n){var o,s,l,h,E,m,T,C,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=b.Timer.TIMER(),e.prev=1,e.next=2,p(d);case 2:if(s=e.sent,l=o.milliSecondsElapsed,h=r.milliSecondsElapsed,E=s.data,m=s.headers,g.setAuthCodeNonce(m),!E){e.next=3;break}return g.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETRECONNECTABLECHATSSUCCEEDED,"Get Reconnectable Chats Succeeded and old session returned",i,s,h,u,"GET",void 0,void 0,c,l),t(E),e.abrupt("return");case 3:return t(),e.abrupt("return");case 4:return e.prev=4,S=e.catch(1),T=o.milliSecondsElapsed,C=r.milliSecondsElapsed,g.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETRECONNECTABLECHATSFAILED,"Get Reconnectable Chats failed",i,void 0,C,u,"GET",S,void 0,c,T),(0,D.default)(S,v.default.axiosTimeoutErrorCode)&&n(new Error(g.HTTPTimeOutErrorMessage)),n(S),e.abrupt("return");case 5:case"end":return e.stop()}},e,null,[[1,4]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return q.apply(this,arguments)})},{key:"getReconnectAvailability",value:(B=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,p,g=this,E=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=E.length>1&&void 0!==E[1]?E[1]:{},o=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITYSTARTED,"Get Reconnectable availability Started"),i="/".concat(R.default.LiveChatReconnectAvailabilityPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),u=v.default.defaultHeaders,this.addDefaultHeaders(null==r?void 0:r.requestId,u),c="".concat(this.omnichannelConfiguration.orgUrl).concat(i),d={headers:u,method:l="GET",url:c,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getReconnectAvailability},p=h.default.create(),e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(t,n){var s,c,h,E,m,T,C,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=b.Timer.TIMER(),e.prev=1,e.next=2,p(d);case 2:if(c=e.sent,h=s.milliSecondsElapsed,E=o.milliSecondsElapsed,!(m=c.data)){e.next=3;break}return g.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITYSUCCEEDED,"Get Reconnect availability succeeded",null==r?void 0:r.requestId,c,E,i,l,void 0,void 0,u,h),t(m),e.abrupt("return");case 3:return g.logWithLogger(y.LogLevel.WARN,f.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITYSUCCEEDED,"Get Reconnect availability didn't send any valid data",null==r?void 0:r.requestId,c,E,i,l,void 0,void 0,u,h),t(),e.abrupt("return");case 4:return e.prev=4,S=e.catch(1),T=s.milliSecondsElapsed,C=o.milliSecondsElapsed,g.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITYFAILED,"Get Reconnect Availability failed",null==r?void 0:r.requestId,void 0,C,i,l,S,void 0,u,T),(0,D.default)(S,v.default.axiosTimeoutErrorCode)&&n(new Error(g.HTTPTimeOutErrorMessage)),n(S),e.abrupt("return");case 5:case"end":return e.stop()}},e,null,[[1,4]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return B.apply(this,arguments)})},{key:"getAgentAvailability",value:(j=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,S,A,L,x,N,k,P,_=this,U=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=U.length>1&&void 0!==U[1]?U[1]:{},o=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETAGENTAVAILABILITYSTARTED,"Get agent availability Started",t),i="/".concat(R.default.GetAgentAvailabilityPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=lcw"),u=h.default.create(),(0,p.default)(u,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getAgentAvailability}),c=r.authenticatedUserToken,l=r.initContext,d=r.getContext,S=v.default.defaultHeaders,c&&(S[O.default.authenticatedUserToken]=c,S[O.default.authCodeNonce]=this.configuration.authCodeNonce),this.addDefaultHeaders(t,S),A=l||{},L={orgId:this.omnichannelConfiguration.orgId,widgetId:this.omnichannelConfiguration.widgetId},A&&A.customContextData&&(x=E.CustomContextData.sort(A.customContextData),Object.assign(L,{customContext:x})),A.portalcontactid&&Object.assign(L,{portalcontactid:A.portalcontactid}),A.cacheKey=(0,I.default)(JSON.stringify(L)).toString(T.default),!d||window.document){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 1:if(d&&(A.browser=g.BrowserInfo.getBrowserName(),A.device=m.DeviceInfo.getDeviceType(),A.originurl=window.location.href,A.os=w.OSInfo.getOsType()),A.locale||(A.locale=v.default.defaultLocale),!A.locale||C.default.supportedLocales.includes(A.locale)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(A.locale,"'"))));case 2:return N="".concat(this.omnichannelConfiguration.orgUrl).concat(i),P={data:A,headers:S,method:k="POST",url:N,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getAgentAvailability},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var s,c,l,d,h,p,g,E,m;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=b.Timer.TIMER(),e.prev=1,e.next=2,u(P);case 2:c=e.sent,l=s.milliSecondsElapsed,d=o.milliSecondsElapsed,h=c.data,p=c.headers,_.setAuthCodeNonce(p),h&&(_.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETAGENTAVAILABILITYSUCCEEDED,"Get agent availability succeeded",t,c,d,i,k,void 0,void 0,S,l),n(h)),e.next=5;break;case 3:if(e.prev=3,m=e.catch(1),g=s.milliSecondsElapsed,E=o.milliSecondsElapsed,_.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETAGENTAVAILABILITYFAILED,"Get agent availability failed",t,void 0,E,i,k,m,void 0,S,g),!(0,D.default)(m,v.default.axiosTimeoutErrorCode)){e.next=4;break}return r(new Error(_.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:r(m);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}},e,this)})),function(e){return j.apply(this,arguments)})},{key:"sessionInit",value:(H=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,E,T,S,I,A,L,N,k,P,U,F=this,M=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=M.length>1&&void 0!==M[1]?M[1]:{},o=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SESSIONINITSTARTED,"Session Init Started",t),i=h.default.create(),(0,p.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.sessionInit,shouldRetry:function(e){return(0,x.default)(e,!0)},headerOverwrites:[O.default.authCodeNonce]}),u=r.reconnectId,c=r.authenticatedUserToken,l=r.initContext,E=r.getContext,T=l||{},S=_({},v.default.defaultHeaders),I=c?R.default.LiveChatAuthSessionInitPath:R.default.LiveChatSessionInitPath,A="/".concat(I,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),c&&Object.assign(S,(0,d.default)((0,d.default)({},O.default.authenticatedUserToken,c),O.default.authCodeNonce,this.configuration.authCodeNonce)),this.addDefaultHeaders(t,S),this.setRequestIdHeader(t,S),L=!c&&!0===this.configuration.useUnauthReconnectIdSigQueryParam,u&&(L||(A+="/".concat(u))),N={channelId:this.omnichannelConfiguration.channelId},u&&L&&(N.sig=u),!E||window.document){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 1:if(E&&(T.browser=g.BrowserInfo.getBrowserName(),T.device=m.DeviceInfo.getDeviceType(),T.originurl=window.location.href,T.os=w.OSInfo.getOsType()),T.locale||(T.locale=v.default.defaultLocale),!T.locale||C.default.supportedLocales.includes(T.locale)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(T.locale,"'"))));case 2:return k="".concat(this.omnichannelConfiguration.orgUrl).concat(A),U={data:T,headers:S,method:P="POST",url:k,params:N,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.sessionInit},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var s,u,c,l,d,h,p,g;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=b.Timer.TIMER(),e.prev=1,e.next=2,i(U);case 2:u=e.sent,c=s.milliSecondsElapsed,l=o.milliSecondsElapsed,d=u.headers,F.setAuthCodeNonce(d),F.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SESSIONINITSUCCEEDED,"Session Init Succeeded",t,u,l,A,P,void 0,T,S,c),n(),e.next=5;break;case 3:if(e.prev=3,g=e.catch(1),h=s.milliSecondsElapsed,p=o.milliSecondsElapsed,F.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.SESSIONINITFAILED,"Session Init failed",t,void 0,p,A,P,g,T,S,h),!(0,D.default)(g,v.default.axiosTimeoutErrorCode)){e.next=4;break}return r(new Error(F.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:r(g);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}},e,this)})),function(e){return H.apply(this,arguments)})},{key:"createConversation",value:(G=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,s,u,c,l,E,T,S,I,A,L,N,k,P,U,F,M,G,H,j,B,q=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=q.length>1&&void 0!==q[1]?q[1]:{},o=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.CREATESESSIONSTARTED,"Create conversation call Started",t),i=h.default.create(),(0,p.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.sessionInit,shouldRetry:function(e){return(0,x.default)(e,!0)},headerOverwrites:[O.default.authCodeNonce]}),s=r.reconnectId,u=r.authenticatedUserToken,c=r.initContext,l=r.getContext,E=c||{},T=_({},v.default.defaultHeaders),S=u?R.default.LiveChatConnectorAuthPath:R.default.LiveChatConnectorPath,I="/".concat(S,"/").concat(this.omnichannelConfiguration.orgId,"/widgetApp/").concat(this.omnichannelConfiguration.widgetId,"/conversation"),u&&Object.assign(T,(0,d.default)((0,d.default)({},O.default.authenticatedUserToken,u),O.default.authCodeNonce,this.configuration.authCodeNonce)),this.addDefaultHeaders(t,T),this.setRequestIdHeader(t,T),s&&(E.reconnectId=s),E.channelId=this.omnichannelConfiguration.channelId,!l||window.document){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 1:if(l&&(E.browser=g.BrowserInfo.getBrowserName(),E.device=m.DeviceInfo.getDeviceType(),E.originurl=window.location.href,E.os=w.OSInfo.getOsType()),E.locale||(E.locale=v.default.defaultLocale),!E.locale||C.default.supportedLocales.includes(E.locale)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(E.locale,"'"))));case 2:return A="".concat(this.omnichannelConfiguration.orgUrl).concat(I),N={data:E,headers:T,method:L="POST",url:A,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.sessionInit},k=b.Timer.TIMER(),e.prev=3,e.next=4,i(N);case 4:if(P=e.sent,U=k.milliSecondsElapsed,F=o.milliSecondsElapsed,M=P.data,G=P.headers,this.setAuthCodeNonce(G),G&&G[O.default.ocSessionId.toLowerCase()]&&(this.sessionId=G[O.default.ocSessionId.toLowerCase()]),0!==Object.keys(M).length){e.next=5;break}throw new Error("Empty data received from getChatToken");case 5:return M.requestId=t,this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.CREATESESSIONSUCCEEDED,"Create coversation call Succeeded",t,P,F,I,L,void 0,void 0,T,U),e.abrupt("return",M);case 6:if(e.prev=6,B=e.catch(3),H=k.milliSecondsElapsed,j=o.milliSecondsElapsed,this.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.CREATESESSIONFAILED,"Create conversation call failed",t,void 0,j,I,L,B,E,T,H),!(0,D.default)(B,v.default.axiosTimeoutErrorCode)){e.next=7;break}throw new Error(this.HTTPTimeOutErrorMessage);case 7:throw B;case 8:case"end":return e.stop()}},e,this,[[3,6]])})),function(e){return G.apply(this,arguments)})},{key:"sessionClose",value:(M=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g,E,m,T,C,S,w=this,I=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=I.length>1&&void 0!==I[1]?I[1]:{},o=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SESSIONCLOSESTARTED,"Session Close Started",t),i="/".concat(R.default.LiveChatSessionClosePath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),u=h.default.create(),(0,p.default)(u,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.sessionClose}),c=r.authenticatedUserToken,l=r.isReconnectChat,d=r.isPersistentChat,g=r.chatId,E=v.default.defaultHeaders,(m={}).chatId=g,c&&(i="/".concat(R.default.LiveChatAuthSessionClosePath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),E[O.default.authenticatedUserToken]=c,E[O.default.authCodeNonce]=this.configuration.authCodeNonce),this.addDefaultHeaders(t,E),l&&(i+="&isReconnectChat=true"),d&&(i+="&isPersistentChat=true"),T="".concat(this.omnichannelConfiguration.orgUrl).concat(i),S={data:m,headers:E,method:C="POST",url:T,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.sessionClose},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var s,c,l,d,h,p,g,m;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=b.Timer.TIMER(),e.prev=1,e.next=2,u(S);case 2:c=e.sent,l=s.milliSecondsElapsed,d=c.headers,w.setAuthCodeNonce(d),h=o.milliSecondsElapsed,w.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SESSIONCLOSESUCCEEDED,"Session Close succeeded",t,c,h,i,C,void 0,void 0,E,l),n(),e.next=4;break;case 3:e.prev=3,m=e.catch(1),p=s.milliSecondsElapsed,g=o.milliSecondsElapsed,w.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.SESSIONCLOSEFAILED,"Session close failed",t,void 0,g,i,C,m,void 0,E,p),m.code===v.default.axiosTimeoutErrorCode&&r(new Error(w.HTTPTimeOutErrorMessage)),r(m);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return M.apply(this,arguments)})},{key:"validateAuthChatRecord",value:(F=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDSTARTED,"Validate Auth Chat Record Started",t),i=n.authenticatedUserToken,u=n.chatId,c="/".concat(R.default.LiveChatValidateAuthChatMapRecordPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(u,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),l=h.default.create(),(0,p.default)(l,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.validateAuthChatRecord}),d=v.default.defaultHeaders,i&&(d[O.default.authenticatedUserToken]=i,d[O.default.authCodeNonce]=this.configuration.authCodeNonce),this.addDefaultHeaders(t,d),g="".concat(this.omnichannelConfiguration.orgUrl).concat(c),m={headers:d,method:E="GET",url:g,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.validateAuthChatRecordTimeout},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var i,s,u,h,p,g,C,S,w;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=b.Timer.TIMER(),e.prev=1,e.next=2,l(m);case 2:u=e.sent,h=i.milliSecondsElapsed,p=u.headers,T.setAuthCodeNonce(p),g=o.milliSecondsElapsed,!0===(null===(s=u.data)||void 0===s?void 0:s.authChatExist)?(T.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDSUCCEEDED,"Validate Auth Chat Record succeeded",t,u,g,c,E,void 0,void 0,d,h),n(u.data)):(T.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDFAILED,"Validate Auth Chat Record Failed. Record is not found or request is not authorized",t,u,g,c,E,void 0,void 0,d,h),r(new Error("Validate Auth Chat Record Failed. Record is not found or request is not authorized"))),e.next=4;break;case 3:e.prev=3,w=e.catch(1),C=i.milliSecondsElapsed,S=o.milliSecondsElapsed,T.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDFAILED,"Validate Auth Chat Record failed",t,void 0,S,c,E,w,void 0,d,C),(0,D.default)(w,v.default.axiosTimeoutErrorCode)&&r(new Error(T.HTTPTimeOutErrorMessage)),"Error: Request failed with status code 404"===w.toString()?n({}):r(w);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t){return F.apply(this,arguments)})},{key:"submitPostChatResponse",value:(P=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T=this,C=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=C.length>2&&void 0!==C[2]?C[2]:{},i=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SUBMITPOSTCHATSTARTED,"Submit Post Chat Started",t),u="/".concat(R.default.LiveChatSubmitPostChatPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),c=h.default.create(),(0,p.default)(c,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.submitPostChatResponse}),l=o.authenticatedUserToken,d=v.default.defaultHeaders,this.addDefaultHeaders(t,d),l&&(u="/".concat(R.default.LiveChatAuthSubmitPostChatPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),d[O.default.authenticatedUserToken]=l,d[O.default.authCodeNonce]=this.configuration.authCodeNonce),g="".concat(this.omnichannelConfiguration.orgUrl).concat(u),E="POST",m={data:JSON.stringify(n),headers:d,method:E,url:g,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.submitPostChatResponse},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,l,h,p,g,C,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=b.Timer.TIMER(),e.prev=1,e.next=2,c(m);case 2:s=e.sent,l=o.milliSecondsElapsed,h=s.headers,T.setAuthCodeNonce(h),p=i.milliSecondsElapsed,T.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SUBMITPOSTCHATSUCCEEDED,"Submit Post Chat succeeded",t,s,p,u,E,void 0,void 0,d,l),n(),e.next=4;break;case 3:e.prev=3,S=e.catch(1),g=o.milliSecondsElapsed,C=i.milliSecondsElapsed,T.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.SUBMITPOSTCHATFAILED,"Submit Post Chat Failed",t,void 0,C,u,E,S,void 0,d,g),(0,D.default)(S,v.default.axiosTimeoutErrorCode)&&r(new Error(T.HTTPTimeOutErrorMessage)),r(S);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t){return P.apply(this,arguments)})},{key:"getSurveyInviteLink",value:(k=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T,C=this,S=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=S.length>2&&void 0!==S[2]?S[2]:{},i=b.Timer.TIMER(),this.logger&&this.logger.log(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETSURVEYINVITELINKSTARTED,{SurveyOwnerId:t},"Get Survey Invite Link Started"),u="/".concat(R.default.LiveChatGetSurveyInviteLinkPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(t),c=h.default.create(),(0,p.default)(c,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getSurveyInviteLink}),l=o.authenticatedUserToken,d=o.requestId,g=v.default.defaultHeaders,l&&(u="/".concat(R.default.LiveChatAuthGetSurveyInviteLinkPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(t),g[O.default.authenticatedUserToken]=l,g[O.default.authCodeNonce]=this.configuration.authCodeNonce,g[O.default.widgetAppId]=this.omnichannelConfiguration.widgetId),this.addDefaultHeaders(d,g),d&&(g[O.default.requestId]=d),E="".concat(this.omnichannelConfiguration.orgUrl).concat(u),m="POST",T={data:JSON.stringify(n),headers:g,method:m,url:E,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.getSurveyInviteLink},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(t,n){var r,o,s,l,h,p,E,S,w;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=b.Timer.TIMER(),e.prev=1,e.next=2,c(T);case 2:o=e.sent,s=r.milliSecondsElapsed,l=o.data,h=o.headers,C.setAuthCodeNonce(h),p=i.milliSecondsElapsed,C.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETSURVEYINVITELINKSUCCEEDED,"Get Survey Invite Link Succeeded",d,o,p,u,m,void 0,void 0,g,s),t(l),e.next=4;break;case 3:e.prev=3,w=e.catch(1),E=r.milliSecondsElapsed,S=i.milliSecondsElapsed,C.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETSURVEYINVITELINKFAILED,"Get Survey Invite Link failed",d,void 0,S,u,m,w,void 0,g,E),(0,D.default)(w,v.default.axiosTimeoutErrorCode)&&n(new Error(C.HTTPTimeOutErrorMessage)),n(w);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t){return k.apply(this,arguments)})},{key:"getChatTranscripts",value:(i=(0,s.default)(a.default.mark(function e(t,n,r){var o,i,u,c,l,d,g,E,m,T,C=this,S=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=S.length>3&&void 0!==S[3]?S[3]:{},u=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATTRANSCRIPTSTARTED,"Get Chat Transcript Started",t),c="/".concat(R.default.LiveChatGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),l=h.default.create(),(0,p.default)(l,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getChatTranscripts}),d=i.authenticatedUserToken,g=i.currentLiveChatVersion,(E=v.default.defaultHeaders)[O.default.organizationId]=this.omnichannelConfiguration.orgId,E[O.default.widgetAppId]=this.omnichannelConfiguration.widgetId,E[O.default.authorization]=r,this.liveChatVersion===f.LiveChatVersion.V2||g&&g===f.LiveChatVersion.V2?(c="/".concat(R.default.LiveChatv2GetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),d&&(E[O.default.authenticatedUserToken]=d,E[O.default.authCodeNonce]=this.configuration.authCodeNonce,c="/".concat(R.default.LiveChatv2AuthGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId))):d&&(E[O.default.authenticatedUserToken]=d,E[O.default.authCodeNonce]=this.configuration.authCodeNonce,c="/".concat(R.default.LiveChatAuthGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId)),this.addDefaultHeaders(t,E),m="".concat(this.omnichannelConfiguration.orgUrl).concat(c),T={headers:E,method:"GET",url:m,timeout:null!==(o=this.configuration.defaultRequestTimeout)&&void 0!==o?o:this.configuration.requestTimeoutConfig.getChatTranscripts},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,i,s,d,h,p,g,m,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=b.Timer.TIMER(),e.prev=1,e.next=2,l(T);case 2:i=e.sent,s=o.milliSecondsElapsed,d=u.milliSecondsElapsed,h=i.data,p=i.headers,C.setAuthCodeNonce(p),C.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATTRANSCRIPTSUCCEEDED,"Get Chat Transcript succeeded",t,i,d,c,"GET",void 0,void 0,E,s),n(h),e.next=4;break;case 3:e.prev=3,S=e.catch(1),g=o.milliSecondsElapsed,m=u.milliSecondsElapsed,C.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETCHATTRANSCRIPTFAILED,"Get Chat Transcript failed",t,void 0,m,c,"GET",S,void 0,E,g),(0,D.default)(S,v.default.axiosTimeoutErrorCode)&&r(new Error(C.HTTPTimeOutErrorMessage)),r(S);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return i.apply(this,arguments)})},{key:"getPersistentChatHistory",value:(o=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g,E,m,T,C=this,S=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=S.length>1&&void 0!==S[1]?S[1]:{},o=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETPERSISTENTCHATHISTORYSTARTED,"Get Persistent Chat History Started",t),i=r.authenticatedUserToken,u=r.pageSize,c=r.pageToken,i){e.next=1;break}return this.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETPERSISTENTCHATHISTORYFAILED,"Get Persistent Chat History failed - Missing authenticated user token",t),e.abrupt("return",Promise.reject(new Error("Authenticated user token is required for persistent chat history")));case 1:return l="/".concat(R.default.LiveChatAuthGetPersistentChatHistoryPath,"/").concat(this.omnichannelConfiguration.orgId,"/widgetapp/").concat(this.omnichannelConfiguration.widgetId,"/conversation/history"),d=h.default.create(),(0,p.default)(d,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getPersistentChatHistory}),(g=_({},v.default.defaultHeaders))[O.default.authenticatedUserToken]=i,g[O.default.authCodeNonce]=this.configuration.authCodeNonce,this.addDefaultHeaders(t,g),E={},u&&(E.pageSize=u.toString()),g[O.default.pageToken]=c||"",m="".concat(this.omnichannelConfiguration.orgUrl).concat(l),T={headers:g,method:"GET",url:m,params:E,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getPersistentChatHistory},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var i,s,u,c,h,p,E,m,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=b.Timer.TIMER(),e.prev=1,e.next=2,d(T);case 2:s=e.sent,u=i.milliSecondsElapsed,c=o.milliSecondsElapsed,h=s.data,p=s.headers,C.setAuthCodeNonce(p),C.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.GETPERSISTENTCHATHISTORYSUCCEEDED,"Get Persistent Chat History succeeded",t,s,c,l,"GET",void 0,void 0,g,u),n(h),e.next=5;break;case 3:if(e.prev=3,S=e.catch(1),E=i.milliSecondsElapsed,m=o.milliSecondsElapsed,C.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETPERSISTENTCHATHISTORYFAILED,"Get Persistent Chat History failed",t,void 0,m,l,"GET",S,void 0,g,E),!(0,D.default)(S,v.default.axiosTimeoutErrorCode)){e.next=4;break}return r(new Error(C.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:r(S);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"emailTranscript",value:(r=(0,s.default)(a.default.mark(function e(t,n,r){var o,i,u,c,l,d,g,E,m,T,C=this,S=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=S.length>3&&void 0!==S[3]?S[3]:{},u=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.EMAILTRANSCRIPTSTARTED,"Email Transcript Started",t),c="/".concat(R.default.LiveChatTranscriptEmailRequestPath,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),l=h.default.create(),(0,p.default)(l,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.emailTranscript}),d=i.authenticatedUserToken,(g=v.default.defaultHeaders)[O.default.organizationId]=this.omnichannelConfiguration.orgId,g[O.default.widgetAppId]=this.omnichannelConfiguration.widgetId,g[O.default.authorization]=n,d&&(g[O.default.authenticatedUserToken]=d,g[O.default.authCodeNonce]=this.configuration.authCodeNonce,c="/".concat(R.default.LiveChatAuthTranscriptEmailRequestPath,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId)),this.addDefaultHeaders(t,g),E="".concat(this.omnichannelConfiguration.orgUrl).concat(c),m="POST",T={data:JSON.stringify(r),headers:g,method:m,url:E,timeout:null!==(o=this.configuration.defaultRequestTimeout)&&void 0!==o?o:this.configuration.requestTimeoutConfig.emailTranscript},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,i,s,d,h,p,E,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=b.Timer.TIMER(),e.prev=1,e.next=2,l(T);case 2:i=e.sent,s=o.milliSecondsElapsed,d=i.headers,C.setAuthCodeNonce(d),h=u.milliSecondsElapsed,C.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.EMAILTRANSCRIPTSUCCEEDED,"Email Transcript succeeded",t,i,h,c,m,void 0,void 0,g,s),n(),e.next=4;break;case 3:e.prev=3,S=e.catch(1),p=o.milliSecondsElapsed,E=u.milliSecondsElapsed,C.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.EMAILTRANSCRIPTFAILED,"Email Transcript Failed",t,void 0,E,c,m,S,void 0,g,p),(0,D.default)(S,v.default.axiosTimeoutErrorCode)&&r(new Error(C.HTTPTimeOutErrorMessage)),r(S);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return r.apply(this,arguments)})},{key:"fetchDataMaskingInfo",value:(n=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.FETCHDATAMASKINGSTARTED,"Fetch Data Masking Started",t),t||(t=(0,N.uuidv4)()),o="/".concat(R.default.LiveChatFetchDataMaskingInfoPath,"/").concat(this.omnichannelConfiguration.orgId),i=h.default.create(),(0,p.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.fetchDataMaskingInfo}),(u=v.default.defaultHeaders)[O.default.organizationId]=this.omnichannelConfiguration.orgId,u[O.default.requestId]=t,this.addDefaultHeaders(t,u),c="".concat(this.omnichannelConfiguration.orgUrl).concat(o),l={headers:u,method:"GET",url:c,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.fetchDataMaskingInfo},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,s){var c,h,p,g,E,m,T,C;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=b.Timer.TIMER(),e.prev=1,e.next=2,i(l);case 2:h=e.sent,p=c.milliSecondsElapsed,g=r.milliSecondsElapsed,E=h.data,d.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.FETCHDATAMASKINGSUCCEEDED,"Fetch Data Masking succeeded",t,h,g,o,"GET",void 0,void 0,u,p),n(E),e.next=4;break;case 3:e.prev=3,C=e.catch(1),m=c.milliSecondsElapsed,T=r.milliSecondsElapsed,d.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.FETCHDATAMASKINGFAILED,"Fetch Data Masking Failed",t,void 0,T,o,"GET",C,void 0,u,m),(0,D.default)(C,v.default.axiosTimeoutErrorCode)&&s(new Error(d.HTTPTimeOutErrorMessage)),s(C);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"makeSecondaryChannelEventRequest",value:(t=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T=this,C=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=C.length>2&&void 0!==C[2]?C[2]:{},i=b.Timer.TIMER(),this.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTSTARTED,"Secondary Channel Event Request Started",t),u="/".concat(R.default.LiveChatSecondaryChannelEventPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),c=h.default.create(),(0,p.default)(c,{headerOverwrites:[O.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.makeSecondaryChannelEventRequest}),l=o.authenticatedUserToken,(d=v.default.defaultHeaders)[O.default.organizationId]=this.omnichannelConfiguration.orgId,l&&(d[O.default.authenticatedUserToken]=l,d[O.default.authCodeNonce]=this.configuration.authCodeNonce,u="/".concat(R.default.LiveChatAuthSecondaryChannelEventPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t)),this.addDefaultHeaders(t,d),u+="?channelId="+v.default.defaultChannelId,g="".concat(this.omnichannelConfiguration.orgUrl).concat(u),E="POST",m={data:JSON.stringify(n),headers:d,method:E,url:g,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.makeSecondaryChannelEventRequest},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,l,h,p,g,C,S;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=b.Timer.TIMER(),e.prev=1,e.next=2,c(m);case 2:s=e.sent,l=o.milliSecondsElapsed,h=s.headers,T.setAuthCodeNonce(h),p=i.milliSecondsElapsed,T.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTSUCCEEDED,"Secondary Channel Event Request Succeeded",t,s,p,u,E,void 0,void 0,d,l),n(),e.next=4;break;case 3:e.prev=3,S=e.catch(1),g=o.milliSecondsElapsed,C=i.milliSecondsElapsed,T.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTFAILED,"Secondary Channel Event Request Failed",t,void 0,C,u,E,S,void 0,d,g),(0,D.default)(S,v.default.axiosTimeoutErrorCode)&&r(new Error(T.HTTPTimeOutErrorMessage)),r(S);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"sendTypingIndicator",value:(e=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,p,g,E,m=this,T=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=T.length>2&&void 0!==T[2]?T[2]:{},n&&n===f.LiveChatVersion.V2){e.next=1;break}return e.abrupt("return",Promise.resolve());case 1:if(i=b.Timer.TIMER(),u=o.customerDisplayName,n&&n===f.LiveChatVersion.V2){e.next=2;break}throw new Error("Typing indicator is only supported on v2");case 2:return c="/".concat(R.default.SendTypingIndicatorPath,"/").concat(t),l=h.default.create(),(d=v.default.defaultHeaders)[O.default.organizationId]=this.omnichannelConfiguration.orgId,u&&(d[v.default.customerDisplayName]=u),this.addDefaultHeaders(t,d),p="".concat(this.omnichannelConfiguration.orgUrl).concat(c),E={headers:d,method:g="POST",url:p,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.sendTypingIndicator},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,u,h,p,T,C;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=b.Timer.TIMER(),e.prev=1,e.next=2,l(E);case 2:s=e.sent,u=o.milliSecondsElapsed,h=i.milliSecondsElapsed,m.logWithLogger(y.LogLevel.INFO,f.OCSDKTelemetryEvent.SENDTYPINGINDICATORSUCCEEDED,"Send Typing Indicator Succeeded",t,s,h,c,g,void 0,void 0,d,u),n(),e.next=4;break;case 3:e.prev=3,C=e.catch(1),p=o.milliSecondsElapsed,T=i.milliSecondsElapsed,m.logWithLogger(y.LogLevel.ERROR,f.OCSDKTelemetryEvent.SENDTYPINGINDICATORFAILED,"Send Typing Indicator Failed",t,void 0,T,c,g,C,void 0,d,p),(0,D.default)(C,v.default.axiosTimeoutErrorCode)&&r(new Error(m.HTTPTimeOutErrorMessage)),r(C);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}},e,this)})),function(t,n){return e.apply(this,arguments)})},{key:"logWithLogger",value:function(e,t,n,r,o,i,a,s,u,c,l,d){var f,h,p;if(this.logger){u&&S.LoggingSanitizer.stripErrorSensitiveProperties(u);var g=void 0;c&&((g=_({},c)).customContextData&&S.LoggingSanitizer.stripCustomContextDataValues(g.customContextData),g.preChatResponse&&S.LoggingSanitizer.stripPreChatResponse(g.preChatResponse),S.LoggingSanitizer.stripGeolocation(g));var E=void 0,m=void 0;if(l&&(E=_({},l),S.LoggingSanitizer.stripRequestHeadersSensitiveProperties(E),l[O.default.authenticatedUserToken]&&window.document&&window.atob))try{var T=l[O.default.authenticatedUserToken].split(".")[1],C=window.atob(T),y=JSON.parse(C),w=y.lwicontexts;if(m={sub:y.sub,exp:y.exp},w){var R=JSON.parse(w);S.LoggingSanitizer.stripCustomContextDataValues(R),m.lwiContexts=R}}catch(e){}var I={RequestId:r,Region:null==o?void 0:o.data.Region,ElapsedTimeInMilliseconds:i,HttpRequestResponseTime:d,TransactionId:null==o?void 0:o.headers[v.default.transactionid],RequestPath:a,RequestMethod:s,ResponseStatusCode:o?o.status:u?null===(f=u.response)||void 0===f?void 0:f.status:void 0,ExceptionDetails:u?(null===(h=u.response)||void 0===h?void 0:h.data)||u:void 0,RequestPayload:g,RequestHeaders:E,ResponseErrorcode:u?null===(p=u.response)||void 0===p||null===(p=p.headers)||void 0===p?void 0:p.errorcode:void 0,AuthTokenDetails:m};this.logger.log(e,t,I,n)}}},{key:"addDefaultHeaders",value:function(e,t){this.setSessionIdHeader(this.sessionId,t),(0,A.addOcUserAgentHeader)(this.ocUserAgent,t),this.setCorrelationIdInHeader(e,t)}}]);var e,t,n,r,o,i,k,P,F,M,G,H,j,B,q,V,W,K,z}();i=F,(0,d.default)(F,"defaultRequestTimeoutConfig",{getChatConfig:12e4,getLWIDetails:15e3,getChatToken:15e3,sessionInit:15e3,sessionClose:15e3,getReconnectableChats:15e3,getReconnectAvailability:15e3,submitPostChatResponse:15e3,getSurveyInviteLink:15e3,getChatTranscripts:3e4,emailTranscript:5e3,fetchDataMaskingInfo:5e3,makeSecondaryChannelEventRequest:15e3,getAgentAvailability:15e3,sendTypingIndicator:5e3,validateAuthChatRecordTimeout:15e3,getPersistentChatHistory:15e3}),(0,d.default)(F,"defaultConfiguration",{authCodeNonce:(0,N.uuidv4)().substring(0,8),getChatTokenRetryCount:10,getChatTokenTimeBetweenRetriesOnFailure:1e4,getChatTokenRetryOn429:!0,maxRequestRetriesOnFailure:5,defaultRequestTimeout:void 0,requestTimeoutConfig:i.defaultRequestTimeoutConfig,useUnauthReconnectIdSigQueryParam:!1,waitTimeBetweenRetriesConfig:k.waitTimeBetweenRetriesConfigs,ocUserAgent:[]})},8971(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,t.LogLevel=function(e){return e.INFO="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR",e}({})},9021(e,t,n){var r;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n(477)}catch(e){}var r=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),i={},a=i.lib={},s=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var s=0;s<o;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=i.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},d=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},f=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,o=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*c,i);if(c){for(var d=0;d<c;d+=a)this._doProcessBlock(o,d);n=o.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(a.Hasher=h.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}}),i.algo={});return i}(Math),r)},9045(e,t,n){var r=n(3738).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9291(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9293(e){function t(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise(function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},9478(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4579)),i=r(n(7383)),a=r(n(3693)),s=n(2949),u=t.default=(0,o.default)(function e(){(0,i.default)(this,e)});(0,a.default)(u,"requiredOmnichannelConfigurationParameters",["orgUrl","orgId","widgetId"]),(0,a.default)(u,"defaultHeaders",{"Content-Type":"application/json"}),(0,a.default)(u,"bypassCacheHeaders",{"Cache-Control":"no-store, must-revalidate, no-cache","X-Cache-Control":"no-store"}),(0,a.default)(u,"defaultChannelId",s.ChannelId.LCW),(0,a.default)(u,"defaultLocale","en-us"),(0,a.default)(u,"noContentStatusCode",204),(0,a.default)(u,"tooManyRequestsStatusCode",429),(0,a.default)(u,"notFoundStatusCode",404),(0,a.default)(u,"badRequestStatusCode",400),(0,a.default)(u,"outOfOfficeErrorCode",705),(0,a.default)(u,"sensitiveProperties",["AuthenticatedUserToken"]),(0,a.default)(u,"transactionid","transaction-id"),(0,a.default)(u,"customerDisplayName","customerDisplayName"),(0,a.default)(u,"hiddenContentPlaceholder","*content hidden*"),(0,a.default)(u,"axiosTimeoutErrorCode","ECONNABORTED")},9903(e,t,n){"use strict";var r=n(4994),o=n(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.axiosRetryHandlerWithNotFound=function(e,t){c(e,{retries:t.retries,waitTimeInMsBetweenRetries:t.waitTimeInMsBetweenRetries,shouldRetry:function(e){var n;return u(e,t.retryOn429)||(null===(n=e.response)||void 0===n?void 0:n.status)===a.default.notFoundStatusCode}})},t.default=void 0,t.isRetryableError=l;var i=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var n,r,i={__proto__:null,default:e};if(null===e||"object"!=o(e)&&"function"!=typeof e)return i;if(n=t){if(n.has(e))return n.get(e);n.set(e,i)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(r.get||r.set)?n(i,a,r):i[a]=e[a]);return i}(e)}(n(3770)),a=r(n(9478));function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=function(e,t){var n,r,o;return!((null===(n=e.response)||void 0===n?void 0:n.status)===a.default.tooManyRequestsStatusCode&&!t)&&(l(e)||(0,i.isNetworkError)(e)||0===(null===(r=e.response)||void 0===r?void 0:r.status)||!(null!==(o=e.response)&&void 0!==o&&o.status))},c=function(e,t){void 0!==t.retryOn429&&null!==t.retryOn429||(t.retryOn429=!1),t.shouldRetry||(t.shouldRetry=function(e){return u(e,t.retryOn429)}),(0,i.default)(e,{retries:t.retries,retryCondition:t.shouldRetry,onRetry:function(e,n,r){var o=n.response,i=t.headerOverwrites;if(i&&null!=o&&o.headers){var a,u=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(i);try{for(u.s();!(a=u.n()).done;){var c=a.value,l=null==o?void 0:o.headers[c.toLocaleLowerCase()];l&&r.headers&&(r.headers[c]=l)}}catch(e){u.e(e)}finally{u.f()}}},retryDelay:function(e,n){var r,o,i=t.waitTimeInMsBetweenRetries,s=null==n||null===(r=n.response)||void 0===r||null===(r=r.headers)||void 0===r?void 0:r["retry-after"],u=i;if(s){var c=parseInt(s);if(isNaN(c)){var l=new Date(s),d=(new Date).getTime();l&&l instanceof Date&&isFinite(l.getTime())&&(u=Math.max(0,l.getTime()-d))}else u=c*i;return u}return(null===(o=n.response)||void 0===o?void 0:o.status)===a.default.tooManyRequestsStatusCode?5e3:Math.pow(2,e)*i}})};function l(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}t.default=c},9956(e,t,n){e.exports=n(9021).enc.Hex}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var r={};(()=>{"use strict";var e=r,t=n(4994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"SDKProvider",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"uuidv4",{enumerable:!0,get:function(){return s.uuidv4}});var o=t(n(3920)),i=t(n(2487)),a=t(n(1728)),s=n(6676);!function(){if(void 0===n.g.window&&(n.g.window=n.g),!window)throw new Error("window object not found");"Microsoft"in window||(window.Microsoft={}),"CRM"in window.Microsoft||(window.Microsoft.CRM={}),"Omnichannel"in window.Microsoft.CRM||(window.Microsoft.CRM.Omnichannel={}),"SDK"in window.Microsoft.CRM.Omnichannel||(window.Microsoft.CRM.Omnichannel.SDK={SDKProvider:a.default,Util:{uuidv4:s.uuidv4}}),window.document&&o.default.raiseCustomEvent(i.default.OCSDKLOAD)}()})();var o=window;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
|
2
|
+
(()=>{var e={79(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},477(){},579(e,t,n){var r=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(6993),o=n(1791);e.exports=function(e,t,n,i,a){return new o(r().w(e,t,n,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1111(e){"use strict";const t=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);e.exports=e=>!t.has(e&&e.code)},1132(e,t,n){var r=n(5901),o=n(9291),i=n(7122),a=n(1869);e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},1415(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.UNKNOWN_VERSION=t.BrowserInfo=void 0;var o=r(n(7383)),i=r(n(4579)),a=r(n(3693)),s=n(2949),u="([\\d,.]+)",c=t.UNKNOWN_VERSION="U",l=t.BrowserInfo=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"getUserAgent",value:function(){return this.userAgent()}},{key:"userAgentContainsString",value:function(e){return this.getUserAgent().indexOf(e)>-1}},{key:"isChrome",value:function(){return this.userAgentContainsString(s.BrowserVendor.CHROME)&&!this.userAgentContainsString(s.BrowserVendor.EDGE)&&!this.userAgentContainsString(s.BrowserVendor.EDGE_CHROMIUM)}},{key:"isIe",value:function(){return this.userAgentContainsString("Trident")}},{key:"isEdge",value:function(){return this.userAgentContainsString(s.BrowserVendor.EDGE)||this.userAgentContainsString(s.BrowserVendor.EDGE_CHROMIUM)}},{key:"isOpera",value:function(){return this.userAgentContainsString("OPR/")}},{key:"getBrowserName",value:function(){return this.isOpera()?s.BrowserVendor.OPERA:this.isEdge()?s.BrowserVendor.EDGE:this.isChrome()?s.BrowserVendor.CHROME:this.userAgentContainsString(s.BrowserVendor.FIREFOX)?s.BrowserVendor.FIREFOX:this.userAgentContainsString(s.BrowserVendor.SAFARI)?s.BrowserVendor.SAFARI:this.isIe()?s.BrowserVendor.IE:s.BrowserVendor.UNKNOWN}},{key:"getBrowserVersion",value:function(){var e=this;return this.isIe()?function(){var t=e.getUserAgent(),n=t.match(new RegExp(s.BrowserVendor.IE+" "+u));if(n)return n[1];var r=t.match(new RegExp("rv:"+u));return r?r[1]:void 0}():function(t){t===s.BrowserVendor.SAFARI&&(t="Version"),t===s.BrowserVendor.OPERA&&(t="OPR"),t===s.BrowserVendor.EDGE&&(t="Edge?");var n=e.getUserAgent().match(new RegExp(t+"/"+u));return n?n[1]:c}(this.getBrowserName())}}])}();(0,a.default)(l,"userAgent",function(){return window.navigator.userAgent})},1728(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579)),a=r(n(9478)),s=r(n(5529)),u=r(n(8537));t.default=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"getSDK",value:function(e,t,n){var r=new s.default(n);return new u.default({channelId:e.channelId||a.default.defaultChannelId,orgId:e.orgId,orgUrl:e.orgUrl,widgetId:e.widgetId},t||{},r)}}])}()},1791(e,t,n){var r=n(5172),o=n(5546);e.exports=function e(t,n){function i(e,o,a,s){try{var u=t[e](o),c=u.value;return c instanceof r?n.resolve(c.v).then(function(e){i("next",e,a,s)},function(e){i("throw",e,a,s)}):n.resolve(c).then(function(e){u.value=e,a(u)},function(e){return i("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},1869(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},1905(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.CustomContextData=void 0;var o=r(n(7383)),i=r(n(4579));t.CustomContextData=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"sort",value:function(e){var t=new Array;return Object.keys(e).forEach(function(n){if(e&&e["".concat(n)]){var r={key:n,value:e["".concat(n)]};t.push(r)}}),t.sort(function(e,t){var n=e.key.toUpperCase(),r=t.key.toUpperCase();return n<r?-1:n>r?1:0}),t}}])}()},2200(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.addOcUserAgentHeader=void 0;var o=r(n(1132)),i=r(n(2805));t.addOcUserAgentHeader=function(e,t){var r=n(8330).rE,a="ocsdk/".concat(r);t["".concat(i.default.ocUserAgent)]=[].concat((0,o.default)(e),[a]).join(" ")}},2487(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579));t.default=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"OCSDKLOAD",get:function(){return"oc:sdk:load"}}])}()},2515(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(9478)),i=n(3770),a=n(9903);t.default=function(e,t){var n,r,s,u,c,l;if(null!=e&&null!==(n=e.response)&&void 0!==n&&n.status)switch(e.response.status){case o.default.tooManyRequestsStatusCode:if(!1===t)return!1;break;case o.default.badRequestStatusCode:if(null!==(r=e.response)&&void 0!==r&&null!==(r=r.headers)&&void 0!==r&&r.errorcode&&parseInt(e.response.headers.errorcode)===o.default.outOfOfficeErrorCode)return!1;break;default:return(0,a.isRetryableError)(e)||(0,i.isNetworkError)(e)||0==(null===(s=e.response)||void 0===s?void 0:s.status)||!(null!==(u=e.response)&&void 0!==u&&u.status)}return(0,a.isRetryableError)(e)||(0,i.isNetworkError)(e)||0==(null===(c=e.response)||void 0===c?void 0:c.status)||!(null!==(l=e.response)&&void 0!==l&&l.status)}},2793(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4579)),i=r(n(7383)),a=r(n(3693)),s=t.default=(0,o.default)(function e(){(0,i.default)(this,e)});(0,a.default)(s,"LiveChatConnectorPath","livechatconnector/organization"),(0,a.default)(s,"LiveChatConnectorAuthPath","livechatconnector/auth/organization"),(0,a.default)(s,"LcwFcsDetailsPath","livechatconnector/v2/lcwfcsdetails"),(0,a.default)(s,"LiveChatConfigPath","livechatconnector/config"),(0,a.default)(s,"LiveChatSessionInitPath","livechatconnector/sessioninit"),(0,a.default)(s,"LiveChatAuthSessionInitPath","livechatconnector/auth/sessioninit"),(0,a.default)(s,"LiveChatGetChatTokenPath","livechatconnector/getchattoken"),(0,a.default)(s,"LiveChatv2GetChatTokenPath","livechatconnector/v2/getchattoken"),(0,a.default)(s,"LiveChatv3GetChatTokenPath","livechatconnector/v3/getchattoken"),(0,a.default)(s,"LiveChatv4GetChatTokenPath","livechatconnector/v4/getchattoken"),(0,a.default)(s,"LiveChatv4AuthGetChatTokenPath","livechatconnector/v4/auth/getchattoken"),(0,a.default)(s,"LiveChatAuthGetChatTokenPath","livechatconnector/auth/getchattoken"),(0,a.default)(s,"LiveChatv2AuthGetChatTokenPath","livechatconnector/v2/auth/getchattoken"),(0,a.default)(s,"LiveChatv3AuthGetChatTokenPath","livechatconnector/v3/auth/getchattoken"),(0,a.default)(s,"LiveChatSessionClosePath","livechatconnector/sessionclose"),(0,a.default)(s,"LiveChatAuthSessionClosePath","livechatconnector/auth/sessionclose"),(0,a.default)(s,"LiveChatSubmitPostChatPath","survey/submitpostchat"),(0,a.default)(s,"LiveChatAuthSubmitPostChatPath","survey/auth/submitpostchat"),(0,a.default)(s,"LiveChatGetSurveyInviteLinkPath","livechatconnector/getsurveyinvite"),(0,a.default)(s,"LiveChatAuthGetSurveyInviteLinkPath","livechatconnector/auth/getsurveyinvite"),(0,a.default)(s,"LiveChatGetChatTranscriptPath","livechatconnector/getchattranscripts"),(0,a.default)(s,"LiveChatv2GetChatTranscriptPath","livechatconnector/v2/getchattranscripts"),(0,a.default)(s,"LiveChatAuthGetChatTranscriptPath","livechatconnector/auth/getchattranscripts"),(0,a.default)(s,"LiveChatv2AuthGetChatTranscriptPath","livechatconnector/v2/auth/getchattranscripts"),(0,a.default)(s,"LiveChatTranscriptEmailRequestPath","livechatconnector/createemailrequest"),(0,a.default)(s,"LiveChatAuthTranscriptEmailRequestPath","livechatconnector/auth/createemailrequest"),(0,a.default)(s,"LiveChatFetchDataMaskingInfoPath","livechatconnector/fetchdatamaskinginfo"),(0,a.default)(s,"LiveChatSecondaryChannelEventPath","livechatconnector/secondarychannelevent"),(0,a.default)(s,"LiveChatAuthSecondaryChannelEventPath","livechatconnector/auth/secondarychannelevent"),(0,a.default)(s,"LiveChatLiveWorkItemDetailsPath","livechatconnector/getliveworkitemdetails"),(0,a.default)(s,"LiveChatAuthLiveWorkItemDetailsPath","livechatconnector/auth/getliveworkitemdetails"),(0,a.default)(s,"LiveChatGetReconnectableChatsPath","livechatconnector/auth/reconnectablechats"),(0,a.default)(s,"LiveChatReconnectAvailabilityPath","livechatconnector/reconnect"),(0,a.default)(s,"LiveChatValidateAuthChatMapRecordPath","livechatconnector/auth/validateauthchatmaprecord"),(0,a.default)(s,"GetAgentAvailabilityPath","livechatconnector/auth/getagentavailability"),(0,a.default)(s,"SendTypingIndicatorPath","inbound/typingindicator/livechat/sendtypingindicator"),(0,a.default)(s,"LiveChatAuthGetPersistentChatHistoryPath","livechatconnector/auth/organization"),(0,a.default)(s,"LiveChatAuthMidConversationPath","livechatconnector/auth/authenticateChat")},2805(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4579)),i=r(n(7383)),a=r(n(3693)),s=t.default=(0,o.default)(function e(){(0,i.default)(this,e)});(0,a.default)(s,"authenticatedUserToken","AuthenticatedUserToken"),(0,a.default)(s,"authorization","Authorization"),(0,a.default)(s,"organizationId","OrganizationId"),(0,a.default)(s,"widgetAppId","widgetAppId"),(0,a.default)(s,"requestId","Request-Id"),(0,a.default)(s,"authCodeNonce","AuthCodeNonce"),(0,a.default)(s,"ocSessionId","Oc-Sessionid"),(0,a.default)(s,"ocUserAgent","Ms-Oc-User-Agent"),(0,a.default)(s,"correlationId","x-ms-client-request-id"),(0,a.default)(s,"pageToken","PageToken")},2949(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKError=t.OperatingSystem=t.OCSDKTelemetryEvent=t.LiveChatVersion=t.DeviceType=t.ChannelId=t.BrowserVendor=t.Browser=void 0,t.BrowserVendor=function(e){return e.IE="IE",e.CHROME="Chrome",e.FIREFOX="Firefox",e.SAFARI="Safari",e.EDGE="Edge",e.EDGE_CHROMIUM="Edg",e.OPERA="Opera",e.UNKNOWN="Unknown",e}({}),t.Browser=function(e){return e[e.Chrome=0]="Chrome",e[e.Firefox=1]="Firefox",e[e.Ie=2]="Ie",e[e.Edge=3]="Edge",e[e.Safari=4]="Safari",e[e.None=5]="None",e}({}),t.DeviceType=function(e){return e.Desktop="Desktop",e.Mobile="Mobile",e.Tablet="Tablet",e}({}),t.OperatingSystem=function(e){return e.WINDOWS="Windows",e.MACOSX="Mac OS X",e.WINDOWS_PHONE="Windows Phone",e.WINDOWS_RT="Windows RT",e.IOS="iOS",e.ANDROID="Android",e.LINUX="Linux",e.UNKNOWN="Unknown",e}({}),t.ChannelId=function(e){return e.LCW="lcw",e.SMS="sms",e.FACEBOOK="facebook",e.WECHAT="wechat",e}({}),t.OCSDKTelemetryEvent=function(e){return e.GETLCWFCSDETAILSSTARTED="GetLcwFcsDetailsStarted",e.GETLCWFCSDETAILSSUCCEEDED="GetLcwFcsDetailsSucceeded",e.GETLCWFCSDETAILSFAILED="GetLcwFcsDetailsFailed",e.GETCHATCONFIGFSTARTED="GetChatConfig",e.GETCHATCONFIGSUCCEEDED="GetChatConfigSucceeded",e.GETCHATCONFIGFAILED="GetChatConfigFailed",e.GETRECONNECTABLECHATSSTARTED="GetReconnnectableChatsStarted",e.GETRECONNECTABLECHATSSUCCEEDED="GetReconnnectableChatsSucceeded",e.GETRECONNECTABLECHATSFAILED="GetReconnnectableChatsFailed",e.GETRECONNECTAVAILABILITYSUCCEEDED="GetReconnnectableAvailabilitySucceeded",e.GETRECONNECTAVAILABILITYSTARTED="GetReconnnectableAvailabilityStarted",e.GETRECONNECTAVAILABILITYFAILED="GetReconnnectableAvailabilityFailed",e.GETCHATTOKENSTARTED="GetChatTokenStarted",e.GETCHATTOKENSUCCEEDED="GetChatTokenSucceeded",e.GETCHATTOKENFAILED="GetChatTokenFailed",e.GETLWISTATUSSTARTED="GetLwiStatusStarted",e.GETLWISTATUSSUCCEEDED="GetLwiStatusSucceeded",e.GETLWISTATUSFAILED="GetLwiStatusFailed",e.SESSIONINITSTARTED="SessionInitStarted",e.SESSIONINITSUCCEEDED="SessionInitSucceeded",e.SESSIONINITFAILED="SessionInitFailed",e.CREATESESSIONSTARTED="CreateSessionStarted",e.CREATESESSIONSUCCEEDED="CreateSessionSucceeded",e.CREATESESSIONFAILED="CreateSessionFailed",e.SESSIONCLOSESTARTED="SessionCloseStarted",e.SESSIONCLOSESUCCEEDED="SessionCloseSucceeded",e.SESSIONCLOSEFAILED="SessionCloseFailed",e.SUBMITPOSTCHATSTARTED="SubmitPostChatStarted",e.SUBMITPOSTCHATSUCCEEDED="SubmitPostChatSucceeded",e.SUBMITPOSTCHATFAILED="SubmitPostChatFailed",e.GETCHATTRANSCRIPTSTARTED="GetChatTranscriptStarted",e.GETCHATTRANSCRIPTSUCCEEDED="GetChatTranscriptSucceeded",e.GETCHATTRANSCRIPTFAILED="GetChatTranscriptFailed",e.EMAILTRANSCRIPTSTARTED="EmailTranscriptStarted",e.EMAILTRANSCRIPTSUCCEEDED="EmailTranscriptSucceeded",e.EMAILTRANSCRIPTFAILED="EmailTranscriptFailed",e.FETCHDATAMASKINGSTARTED="FetchDataMaskingStarted",e.FETCHDATAMASKINGSUCCEEDED="FetchDataMaskingSucceeded",e.FETCHDATAMASKINGFAILED="FetchDataMaskingFailed",e.SECONDARYCHANNELEVENTREQUESTSTARTED="SecondaryChannelEventRequestStarted",e.SECONDARYCHANNELEVENTREQUESTSUCCEEDED="SecondaryChannelEventRequestSucceeded",e.SECONDARYCHANNELEVENTREQUESTFAILED="SecondaryChannelEventRequestFailed",e.GETSURVEYINVITELINKSTARTED="GetSurveyInviteLinkStarted",e.GETSURVEYINVITELINKSUCCEEDED="GetSurveyInviteLinkSucceeded",e.GETSURVEYINVITELINKFAILED="GetSurveyInviteLinkFailed",e.VALIDATEAUTHCHATRECORDSTARTED="ValidateAuthChatRecordStarted",e.VALIDATEAUTHCHATRECORDSUCCEEDED="ValidateAuthChatRecordSucceeded",e.VALIDATEAUTHCHATRECORDFAILED="ValidateAuthChatRecordFailed",e.GETAGENTAVAILABILITYSTARTED="GetAgentAvailabilityStarted",e.GETAGENTAVAILABILITYSUCCEEDED="GetAgentAvailabilitySucceeded",e.GETAGENTAVAILABILITYFAILED="GetAgentAvailabilityFailed",e.SENDTYPINGINDICATORFAILED="SendTypingIndicatorFailed",e.SENDTYPINGINDICATORSUCCEEDED="SendTypingIndicatorSucceeded",e.GETPERSISTENTCHATHISTORYSTARTED="GetPersistentChatHistoryStarted",e.GETPERSISTENTCHATHISTORYSUCCEEDED="GetPersistentChatHistorySucceeded",e.GETPERSISTENTCHATHISTORYFAILED="GetPersistentChatHistoryFailed",e.MIDAUTHENTICATECHATSTARTED="MidAuthenticateChatStarted",e.MIDAUTHENTICATECHATSUCCEEDED="MidAuthenticateChatSucceeded",e.MIDAUTHENTICATECHATFAILED="MidAuthenticateChatFailed",e.GETUNREADMESSAGECOUNTSTARTED="GetUnreadMessageCountStarted",e.GETUNREADMESSAGECOUNTSUCCEEDED="GetUnreadMessageCountSucceeded",e.GETUNREADMESSAGECOUNTFAILED="GetUnreadMessageCountFailed",e.SENDREADRECEIPTSTARTED="SendReadReceiptStarted",e.SENDREADRECEIPTSUCCEEDED="SendReadReceiptSucceeded",e.SENDREADRECEIPTFAILED="SendReadReceiptFailed",e}({}),t.LiveChatVersion=function(e){return e[e.V1=1]="V1",e[e.V2=2]="V2",e[e.V3=3]="V3",e}({}),t.SDKError=function(e){return e.ClientHTTPTimeoutErrorName="ClientHTTPTimeoutError",e.ClientHTTPTimeoutErrorMessage="Server took too long to respond",e}({})},2950(e,t,n){"use strict";var r=n(4994);t.Ay=R;var o=r(n(4756)),i=r(n(3738)),a=r(n(9293)),s=r(n(3693)),u=r(n(1111));function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){(0,s.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var d="axios-retry";function f(e){return!e.response&&Boolean(e.code)&&!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&(0,u.default)(e)}var h=["get","head","options"],p=h.concat(["put","delete"]);function g(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function v(e){return!!e.config&&g(e)&&-1!==p.indexOf(e.config.method)}function E(e){return f(e)||v(e)}var m={retries:3,retryCondition:E,retryDelay:function(){return 0},shouldResetTimeout:!1,onRetry:function(){}};function T(e,t){var n=function(e,t){return l(l(l({},m),t),e[d])}(e,t);return n.retryCount=n.retryCount||0,e[d]=n,n}function C(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}function S(e,t){return y.apply(this,arguments)}function y(){return(y=(0,a.default)(o.default.mark(function e(t,n){var r,a,s,u;return o.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.retries,a=t.retryCondition,s=t.retryCount<r&&a(n),"object"!==(0,i.default)(s)){e.next=13;break}return e.prev=3,e.next=6,s;case 6:return u=e.sent,e.abrupt("return",!1!==u);case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",!1);case 13:return e.abrupt("return",s);case 14:case"end":return e.stop()}},e,null,[[3,10]])}))).apply(this,arguments)}function R(e,t){var n=e.interceptors.request.use(function(e){return T(e,t).lastRequestTime=Date.now(),e}),r=e.interceptors.response.use(null,function(){var n=(0,a.default)(o.default.mark(function n(r){var i,a,s,u,c,l,d,f;return o.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(i=r.config){n.next=3;break}return n.abrupt("return",Promise.reject(r));case 3:return a=T(i,t),n.next=6,S(a,r);case 6:if(!n.sent){n.next=21;break}if(a.retryCount+=1,s=a.retryDelay,u=a.shouldResetTimeout,c=a.onRetry,l=s(a.retryCount,r),C(e,i),u||!i.timeout||!a.lastRequestTime){n.next=17;break}if(d=Date.now()-a.lastRequestTime,!((f=i.timeout-d-l)<=0)){n.next=16;break}return n.abrupt("return",Promise.reject(r));case 16:i.timeout=f;case 17:return i.transformRequest=[function(e){return e}],n.next=20,c(a.retryCount,r,i);case 20:return n.abrupt("return",new Promise(function(t){return setTimeout(function(){return t(e(i))},l)}));case 21:return n.abrupt("return",Promise.reject(r));case 22:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}());return{requestInterceptorId:n,responseInterceptorId:r}}R.isNetworkError=f,R.isSafeRequestError=function(e){return!!e.config&&g(e)&&-1!==h.indexOf(e.config.method)},R.isIdempotentRequestError=v,R.isNetworkOrIdempotentRequestError=E,R.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,n=Math.pow(2,e)*t;return n+.2*n*Math.random()},R.isRetryableError=g},3009(e,t,n){var r;e.exports=(r=n(9021),function(e){var t=r,n=t.lib,o=n.WordArray,i=n.Hasher,a=t.algo,s=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,o=0;o<64;)t(r)&&(o<8&&(s[o]=n(e.pow(r,.5))),u[o]=n(e.pow(r,1/3)),o++),r++}();var c=[],l=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],d=n[6],f=n[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[h-2],E=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[h]=g+c[h-7]+E+c[h-16]}var m=r&o^r&i^o&i,T=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),C=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&d)+u[h]+c[h];f=d,d=l,l=s,s=a+C|0,a=i,i=o,o=r,r=C+(T+m)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+d|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(l),t.HmacSHA256=i._createHmacHelper(l)}(Math),r.SHA256)},3693(e,t,n){var r=n(7736);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},3738(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3770(e,t,n){const r=n(2950).Ay;e.exports=r,e.exports.default=r},3905(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceInfo=void 0;var o=r(n(7383)),i=r(n(4579)),a=n(2949);t.DeviceInfo=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"getDeviceType",value:function(){return window.navigator.userAgent.match(/(android|ipod|windows phone|wpdesktop|windows ce|blackberry\w*|meego|webos|palm|symbian|pda|\w*?mobile\w*?|\w*?phone\w*?)/i)?a.DeviceType.Mobile:window.navigator.userAgent.match(/tablet|ipad/i)?a.DeviceType.Tablet:a.DeviceType.Desktop}}])}()},3920(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579));t.default=function(){function e(){(0,o.default)(this,e)}return(0,i.default)(e,null,[{key:"raiseCustomEvent",value:function(t,n){var r=e.createCustomEvent(t,n);window.dispatchEvent(r)}},{key:"createCustomEvent",value:function(e,t){var n=t?{detail:t}:void 0,r=null;try{r=new CustomEvent(e,n)}catch(t){(r=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,n)}return r}}])}()},4063(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(6425));t.default=function(e,t){try{if(o.default.isAxiosError(e)&&e.code==t)return!0}catch(e){return!1}return!1}},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4556(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579));t.default=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"GETTELEMETRYEVENTDATA",value:function(e,t,n){return{Description:n,ElapsedTimeInMilliseconds:t.ElapsedTimeInMilliseconds,HttpRequestResponseTime:t.HttpRequestResponseTime,Event:e,ExceptionDetails:t.ExceptionDetails,Region:t.Region,RequestId:t.RequestId,TransactionId:t.TransactionId,RequestHeaders:t.RequestHeaders,RequestPayload:t.RequestPayload,RequestPath:t.RequestPath,RequestMethod:t.RequestMethod,ResponseStatusCode:t.ResponseStatusCode,ResponseErrorcode:t.ResponseErrorcode,AuthTokenDetails:t.AuthTokenDetails}}}])}()},4579(e,t,n){var r=n(7736);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,n){var r=n(5172),o=n(6993),i=n(5869),a=n(887),s=n(1791),u=n(4373),c=n(579);function l(){"use strict";var t=o(),n=t.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function f(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var h={throw:1,return:2,break:3,continue:3};function p(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,h[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,c(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,o){return t.w(p(e),n,r,o&&o.reverse())},isGeneratorFunction:f,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,o){return(f(t)?a:i)(p(e),t,n,r,o)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},4756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},4994(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},5529(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(7383)),i=r(n(4579)),a=r(n(3693)),s=r(n(4556));t.default=function(){return(0,i.default)(function e(t){(0,o.default)(this,e),(0,a.default)(this,"logger",void 0),this.logger=t},[{key:"log",value:function(e,t,n,r){if(this.isLoggingEnabled()){var o=s.default.GETTELEMETRYEVENTDATA(t,n,r);this.logEvent(e,o)}}},{key:"logEvent",value:function(e,t){this.isLoggingEnabled()&&this.logger.logClientSdkTelemetryEvent(e,t)}},{key:"isLoggingEnabled",value:function(){return!this.isNullOrUndefined(this.logger)}},{key:"isNullOrUndefined",value:function(e){return null==e}}])}()},5546(e){function t(n,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5560(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4579)),i=r(n(7383)),a=r(n(3693)),s=t.default=(0,o.default)(function e(){(0,i.default)(this,e)});(0,a.default)(s,"supportedLocales",["ar-sa","bg-bg","ca-es","cs-cz","da-dk","de-de","el-gr","en-us","en-au","es-es","et-ee","eu-es","fi-fi","fr-fr","gl-es","he-il","hi-in","hr-hr","hu-hu","id-id","it-it","ja-jp","kk-kz","ko-kr","lt-lt","lv-lv","ms-my","nb-no","nl-nl","pl-pl","pt-br","pt-pt","ro-ro","ru-ru","sk-sk","sl-si","sr-cyrl-cs","sr-latn-cs","sv-se","th-th","tr-tr","uk-ua","vi-vn","zh-cn","zh-hk","zh-tw"])},5606(e){var t,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var s,u=[],c=!1,l=-1;function d(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||a(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5869(e,t,n){var r=n(887);e.exports=function(e,t,n,o,i){var a=r(e,t,n,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},5901(e,t,n){var r=n(79);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},6425(e,t,n){"use strict";var r=n(5606);function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:s,toStringTag:u}=Symbol,c=(l=Object.create(null),e=>{const t=i.call(e);return l[t]||(l[t]=t.slice(8,-1).toLowerCase())});var l;const d=e=>(e=e.toLowerCase(),t=>c(t)===e),f=e=>t=>typeof t===e,{isArray:h}=Array,p=f("undefined");function g(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const v=d("ArrayBuffer"),E=f("string"),m=f("function"),T=f("number"),C=e=>null!==e&&"object"==typeof e,S=e=>{if("object"!==c(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||u in e||s in e)},y=d("Date"),R=d("File"),w=d("Blob"),I=d("FileList"),O=d("URLSearchParams"),[A,b,L,D]=["ReadableStream","Request","Response","Headers"].map(d);function N(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),h(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(g(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function x(e,t){if(g(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,P=e=>!p(e)&&e!==k,U=(_="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>_&&e instanceof _);var _;const M=d("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),G=d("RegExp"),H=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};N(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)},j=d("AsyncFunction"),B=(q="function"==typeof setImmediate,W=m(k.postMessage),q?setImmediate:W?(V=`axios@${Math.random()}`,K=[],k.addEventListener("message",({source:e,data:t})=>{e===k&&t===V&&K.length&&K.shift()()},!1),e=>{K.push(e),k.postMessage(V,"*")}):e=>setTimeout(e));var q,W,V,K;const z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(k):void 0!==r&&r.nextTick||B;var Y={isArray:h,isArrayBuffer:v,isBuffer:g,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=c(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&v(e.buffer),t},isString:E,isNumber:T,isBoolean:e=>!0===e||!1===e,isObject:C,isPlainObject:S,isEmptyObject:e=>{if(!C(e)||g(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:A,isRequest:b,isResponse:L,isHeaders:D,isUndefined:p,isDate:y,isFile:R,isBlob:w,isRegExp:G,isFunction:m,isStream:e=>C(e)&&m(e.pipe),isURLSearchParams:O,isTypedArray:U,isFileList:I,forEach:N,merge:function e(){const{caseless:t,skipUndefined:n}=P(this)&&this||{},r={},o=(o,i)=>{const a=t&&x(r,i)||i;S(r[a])&&S(o)?r[a]=e(r[a],o):S(o)?r[a]=e({},o):h(o)?r[a]=o.slice():n&&p(o)||(r[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(N(t,(t,r)=>{n&&m(t)?e[r]=o(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const u={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||u[s]||(t[s]=e[s],u[s]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:d,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!T(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[s]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:M,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:H,freezeMethods:e=>{H(e,(t,n)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];m(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return h(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:x,global:k,isContextDefined:P,isSpecCompliantForm:function(e){return!!(e&&m(e.append)&&"FormData"===e[u]&&e[s])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(C(e)){if(t.indexOf(e)>=0)return;if(g(e))return e;if(!("toJSON"in e)){t[r]=e;const o=h(e)?[]:{};return N(e,(e,t)=>{const i=n(e,r+1);!p(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:j,isThenable:e=>e&&(C(e)||m(e))&&m(e.then)&&m(e.catch),setImmediate:B,asap:z,isIterable:e=>null!=e&&m(e[s])};function J(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Y.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.status}}});const $=J.prototype,X={};function Q(e){return Y.isPlainObject(e)||Y.isArray(e)}function Z(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,n){return e?e.concat(t).map(function(e,t){return e=Z(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{X[e]={value:e}}),Object.defineProperties(J,X),Object.defineProperty($,"isAxiosError",{value:!0}),J.from=(e,t,n,r,o,i)=>{const a=Object.create($);Y.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",u=null==t&&e?e.code:t;return J.call(a,s,u,n,r,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const te=Y.toFlatObject(Y,{},null,function(e){return/^is[A-Z]/.test(e)});function ne(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Y.isUndefined(t[e])})).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Y.isSpecCompliantForm(t);if(!Y.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(Y.isDate(e))return e.toISOString();if(Y.isBoolean(e))return e.toString();if(!s&&Y.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(e)||Y.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(Y.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Y.isArray(e)&&function(e){return Y.isArray(e)&&!e.some(Q)}(e)||(Y.isFileList(e)||Y.endsWith(n,"[]"))&&(s=Y.toArray(e)))return n=Z(n),s.forEach(function(e,r){!Y.isUndefined(e)&&null!==e&&t.append(!0===a?ee([n],r,i):null===a?n:n+"[]",u(e))}),!1;return!!Q(e)||(t.append(ee(o,n,i),u(e)),!1)}const l=[],d=Object.assign(te,{defaultVisitor:c,convertValue:u,isVisitable:Q});if(!Y.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Y.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),Y.forEach(n,function(n,i){!0===(!(Y.isUndefined(n)||null===n)&&o.call(t,n,Y.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),l.pop()}}(e),t}function re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function oe(e,t){this._pairs=[],e&&ne(e,this,t)}const ie=oe.prototype;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function se(e,t,n){if(!t)return e;const r=n&&n.encode||ae;Y.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Y.isURLSearchParams(t)?t.toString():new oe(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){const t=e?function(t){return e.call(this,t,re)}:re;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Y.forEach(this.handlers,function(t){null!==t&&e(t)})}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const de="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,he=de&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ge=de&&window.location.href||"http://localhost";var ve={...Object.freeze({__proto__:null,hasBrowserEnv:de,hasStandardBrowserWebWorkerEnv:pe,hasStandardBrowserEnv:he,navigator:fe,origin:ge}),...le};function Ee(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;return i=!i&&Y.isArray(r)?r.length:i,s?(Y.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&Y.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Y.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(e,r)=>{t(function(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const me={transitional:ce,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Y.isObject(e);if(o&&Y.isHTMLForm(e)&&(e=new FormData(e)),Y.isFormData(e))return r?JSON.stringify(Ee(e)):e;if(Y.isArrayBuffer(e)||Y.isBuffer(e)||Y.isStream(e)||Y.isFile(e)||Y.isBlob(e)||Y.isReadableStream(e))return e;if(Y.isArrayBufferView(e))return e.buffer;if(Y.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new ve.classes.URLSearchParams,{visitor:function(e,t,n,r){return ve.isNode&&Y.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Y.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ne(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(Y.isString(e))try{return(0,JSON.parse)(e),Y.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||me.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Y.isResponse(e)||Y.isReadableStream(e))return e;if(e&&Y.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch"],e=>{me.headers[e]={}});var Te=me;const Ce=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Se=Symbol("internals");function ye(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:Y.isArray(e)?e.map(Re):String(e)}function we(e,t,n,r,o){return Y.isFunction(r)?r.call(this,t,n):(o&&(t=n),Y.isString(t)?Y.isString(r)?-1!==t.indexOf(r):Y.isRegExp(r)?r.test(t):void 0:void 0)}class Ie{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ye(t);if(!o)throw new Error("header name must be a non-empty string");const i=Y.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Re(e))}const i=(e,t)=>Y.forEach(e,(e,n)=>o(e,n,t));if(Y.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Y.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ce[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Y.isObject(e)&&Y.isIterable(e)){let n,r,o={};for(const t of e){if(!Y.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?Y.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=ye(e)){const n=Y.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Y.isFunction(t))return t.call(this,e,n);if(Y.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ye(e)){const n=Y.findKey(this,e);return!(!n||void 0===this[n]||t&&!we(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ye(e)){const o=Y.findKey(n,e);!o||t&&!we(0,n[o],o,t)||(delete n[o],r=!0)}}return Y.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!we(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Y.forEach(this,(r,o)=>{const i=Y.findKey(n,o);if(i)return t[i]=Re(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=Re(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Y.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Y.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Se]=this[Se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ye(e);t[r]||(function(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Y.isArray(e)?e.forEach(r):r(e),this}}Ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Y.reduceDescriptors(Ie.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Y.freezeMethods(Ie);var Oe=Ie;function Ae(e,t){const n=this||Te,r=t||n,o=Oe.from(r.headers);let i=r.data;return Y.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function be(e){return!(!e||!e.__CANCEL__)}function Le(e,t,n){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,n),this.name="CanceledError"}function De(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Y.inherits(Le,J,{__CANCEL__:!0});const Ne=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const u=Date.now(),c=r[a];o||(o=u),n[i]=s,r[i]=u;let l=a,d=0;for(;l!==i;)d+=n[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const f=c&&u-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(n,i){let a,s,u=0,c=1e3/i;const l=(n,i=Date.now())=>{u=i,a=null,s&&(clearTimeout(s),s=null),(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,u=o(s);r=i,e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})})(...n)};return[(...e)=>{const t=Date.now(),n=t-u;n>=c?l(e,t):(a=e,s||(s=setTimeout(()=>{s=null,l(a)},c-n)))},()=>a&&l(a)]}(0,n)},xe=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ke=e=>(...t)=>Y.asap(()=>e(...t));var Pe=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,Ue=ve.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];Y.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Y.isString(r)&&s.push(`path=${r}`),Y.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),Y.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function _e(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Me=e=>e instanceof Oe?{...e}:e;function Fe(e,t){t=t||{};const n={};function r(e,t,n,r){return Y.isPlainObject(e)&&Y.isPlainObject(t)?Y.merge.call({caseless:r},e,t):Y.isPlainObject(t)?Y.merge({},t):Y.isArray(t)?t.slice():t}function o(e,t,n,o){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Y.isUndefined(t))return r(void 0,t)}function a(e,t){return Y.isUndefined(t)?Y.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Me(e),Me(t),0,!0)};return Y.forEach(Object.keys({...e,...t}),function(r){const i=u[r]||o,a=i(e[r],t[r],r);Y.isUndefined(a)&&i!==s||(n[r]=a)}),n}var Ge=e=>{const t=Fe({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=Oe.from(a),t.url=se(_e(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Y.isFormData(n))if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Y.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&a.set(e,n)})}if(ve.hasStandardBrowserEnv&&(r&&Y.isFunction(r)&&(r=r(t)),r||!1!==r&&Pe(t.url))){const e=o&&i&&Ue.read(i);e&&a.set(o,e)}return t},He="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Ge(e);let o=r.data;const i=Oe.from(r.headers).normalize();let a,s,u,c,l,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let g=new XMLHttpRequest;function v(){if(!g)return;const r=Oe.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());De(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(n(new J("Request aborted",J.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const r=new J(t&&t.message?t.message:"Network Error",J.ERR_NETWORK,e,g);r.event=t||null,n(r),g=null},g.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ce;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new J(t,o.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&Y.forEach(i.toJSON(),function(e,t){g.setRequestHeader(t,e)}),Y.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),d&&"json"!==d&&(g.responseType=r.responseType),h&&([u,l]=Ne(h,!0),g.addEventListener("progress",u)),f&&g.upload&&([s,c]=Ne(f),g.upload.addEventListener("progress",s),g.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{g&&(n(!t||t.type?new Le(null,e,g):t),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const E=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);E&&-1===ve.protocols.indexOf(E)?n(new J("Unsupported protocol "+E+":",J.ERR_BAD_REQUEST,e)):g.send(o||null)})},je=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof J?t:new Le(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>Y.asap(a),s}};const Be=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},qe=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Be(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:We}=Y,Ve=(({Request:e,Response:t})=>({Request:e,Response:t}))(Y.global),{ReadableStream:Ke,TextEncoder:ze}=Y.global,Ye=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Je=e=>{e=Y.merge.call({skipUndefined:!0},Ve,e);const{fetch:t,Request:n,Response:r}=e,o=t?We(t):"function"==typeof fetch,i=We(n),a=We(r);if(!o)return!1;const s=o&&We(Ke),u=o&&("function"==typeof ze?(c=new ze,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const l=i&&s&&Ye(()=>{let e=!1;const t=new n(ve.origin,{body:new Ke,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=a&&s&&Ye(()=>Y.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:h,timeout:p,onDownloadProgress:g,onUploadProgress:v,responseType:E,headers:m,withCredentials:T="same-origin",fetchOptions:C}=Ge(e),S=t||fetch;E=E?(E+"").toLowerCase():"text";let y=je([c,h&&h.toAbortSignal()],p),R=null;const w=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let I;try{if(v&&l&&"get"!==a&&"head"!==a&&0!==(I=await(async(e,t)=>{const r=Y.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Y.isBlob(e))return e.size;if(Y.isSpecCompliantForm(e)){const t=new n(ve.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Y.isArrayBufferView(e)||Y.isArrayBuffer(e)?e.byteLength:(Y.isURLSearchParams(e)&&(e+=""),Y.isString(e)?(await u(e)).byteLength:void 0)})(t):r})(m,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(Y.isFormData(s)&&(e=t.headers.get("content-type"))&&m.setContentType(e),t.body){const[e,n]=xe(I,Ne(ke(v)));s=qe(t.body,65536,e,n)}}Y.isString(T)||(T=T?"include":"omit");const t=i&&"credentials"in n.prototype,c={...C,signal:y,method:a.toUpperCase(),headers:m.normalize().toJSON(),body:s,duplex:"half",credentials:t?T:void 0};R=i&&new n(o,c);let h=await(i?S(R,C):S(o,c));const p=d&&("stream"===E||"response"===E);if(d&&(g||p&&w)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=h[t]});const t=Y.toFiniteNumber(h.headers.get("content-length")),[n,o]=g&&xe(t,Ne(ke(g),!0))||[];h=new r(qe(h.body,65536,n,()=>{o&&o(),w&&w()}),e)}E=E||"text";let O=await f[Y.findKey(f,E)||"text"](h,e);return!p&&w&&w(),await new Promise((t,n)=>{De(t,n,{data:O,headers:Oe.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:R})})}catch(t){if(w&&w(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,R),{cause:t.cause||t});throw J.from(t,t&&t.code,e,R)}}},$e=new Map,Xe=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,u=i.length,c=$e;for(;u--;)a=i[u],s=c.get(a),void 0===s&&c.set(a,s=u?new Map:Je(t)),c=s;return s};Xe();const Qe={http:null,xhr:He,fetch:{get:Xe}};Y.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ze=e=>`- ${e}`,et=e=>Y.isFunction(e)||null===e||!1===e;var tt=function(e,t){e=Y.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!et(r)&&(o=Qe[(n=String(r)).toLowerCase()],void 0===o))throw new J(`Unknown adapter '${n}'`);if(o&&(Y.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new J("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Ze).join("\n"):" "+Ze(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Le(null,e)}function rt(e){return nt(e),e.headers=Oe.from(e.headers),e.data=Ae.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tt(e.adapter||Te.adapter,e)(e).then(function(t){return nt(e),t.data=Ae.call(e,e.transformResponse,t),t.headers=Oe.from(t.headers),t},function(t){return be(t)||(nt(e),t&&t.response&&(t.response.data=Ae.call(e,e.transformResponse,t.response),t.response.headers=Oe.from(t.response.headers))),Promise.reject(t)})}const ot="1.13.2",it={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{it[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const at={};it.transitional=function(e,t,n){function r(e,t){return"[Axios v"+ot+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new J(r(o," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!at[o]&&(at[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},it.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var st={assertOptions:function(e,t,n){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new J("option "+i+" must be "+n,J.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new J("Unknown option "+i,J.ERR_BAD_OPTION)}},validators:it};const ut=st.validators;class ct{constructor(e){this.defaults=e||{},this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Fe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&st.assertOptions(n,{silentJSONParsing:ut.transitional(ut.boolean),forcedJSONParsing:ut.transitional(ut.boolean),clarifyTimeoutError:ut.transitional(ut.boolean)},!1),null!=r&&(Y.isFunction(r)?t.paramsSerializer={serialize:r}:st.assertOptions(r,{encode:ut.function,serialize:ut.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),st.assertOptions(t,{baseUrl:ut.spelling("baseURL"),withXsrfToken:ut.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Y.merge(o.common,o[t.method]);o&&Y.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Oe.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const u=[];let c;this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let l,d=0;if(!s){const e=[rt.bind(this),void 0];for(e.unshift(...a),e.push(...u),l=e.length,c=Promise.resolve(t);d<l;)c=c.then(e[d++],e[d++]);return c}l=a.length;let f=t;for(;d<l;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=rt.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=u.length;d<l;)c=c.then(u[d++],u[d++]);return c}getUri(e){return se(_e((e=Fe(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Y.forEach(["delete","get","head","options"],function(e){ct.prototype[e]=function(t,n){return this.request(Fe(n||{},{method:e,url:t,data:(n||{}).data}))}}),Y.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(Fe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ct.prototype[e]=t(),ct.prototype[e+"Form"]=t(!0)});var lt=ct;class dt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Le(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new dt(function(t){e=t}),cancel:e}}}var ft=dt;const ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ht).forEach(([e,t])=>{ht[t]=e});var pt=ht;const gt=function e(t){const n=new lt(t),r=o(lt.prototype.request,n);return Y.extend(r,lt.prototype,n,{allOwnKeys:!0}),Y.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Fe(t,n))},r}(Te);gt.Axios=lt,gt.CanceledError=Le,gt.CancelToken=ft,gt.isCancel=be,gt.VERSION=ot,gt.toFormData=ne,gt.AxiosError=J,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return Y.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=Fe,gt.AxiosHeaders=Oe,gt.formToJSON=e=>Ee(Y.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=tt,gt.HttpStatusCode=pt,gt.default=gt,e.exports=gt},6676(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidv4=void 0,t.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}},6993(e,t,n){var r=n(5546);function o(){var t,n,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function u(e,o,i,a){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return r(u,"_invoke",function(e,r,o){var i,a,s,u=0,l=o||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,a=0,s=t,f.n=n,c}};function h(e,r){for(a=e,s=r,n=0;!d&&u&&!o&&n<l.length;n++){var o,i=l[n],h=f.p,p=i[2];e>3?(o=p===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=e<2&&h<i[1])?(a=0,f.v=r,f.n=i[1]):h<p&&(o=e<3||i[0]>r||r>p)&&(i[4]=e,i[5]=r,f.n=p,a=0))}if(o||e>1)return c;throw d=!0,r}return function(o,l,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&h(l,p),a=l,s=p;(n=a<2?t:s)||!d;){i||(a?a<3?(a>1&&(f.n=-1),h(a,s)):f.n=s:f.v=s);try{if(u=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((n=(d=f.n<0)?s:e.call(r,f))!==c)break}catch(e){i=t,a=1,s=e}finally{u=1}}return{value:n,done:d}}}(e,i,a),!0),u}var c={};function l(){}function d(){}function f(){}n=Object.getPrototypeOf;var h=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),p=f.prototype=l.prototype=Object.create(h);function g(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,r(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return d.prototype=f,r(p,"constructor",f),r(f,"constructor",d),d.displayName="GeneratorFunction",r(f,s,"GeneratorFunction"),r(p),r(p,s,"Generator"),r(p,a,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:u,m:g}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},7122(e,t,n){var r=n(79);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7383(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},7537(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.OSInfo=void 0;var o=r(n(7383)),i=r(n(4579)),a=n(2949);t.OSInfo=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"getOsType",value:function(){var e=function(){return window.navigator.userAgent};return e().match(/windows\sphone\s\d+\.\d+/i)?a.OperatingSystem.WINDOWS_PHONE:e().match(/ arm;/i)?a.OperatingSystem.WINDOWS_RT:e().match(/(iPad|iPhone|iPod)(?=.*like Mac OS X)/i)?a.OperatingSystem.IOS:e().match(/android/i)?a.OperatingSystem.ANDROID:e().match(/(linux|joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|cros)/i)?a.OperatingSystem.LINUX:e().match(/(macintosh|mac os x)/i)?a.OperatingSystem.MACOSX:e().match(/(windows|win32)/i)?a.OperatingSystem.WINDOWS:a.OperatingSystem.UNKNOWN}}])}()},7736(e,t,n){var r=n(3738).default,o=n(9045);e.exports=function(e){var t=o(e,"string");return"symbol"==r(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},7748(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.createGetChatTokenEndpoint=void 0;var o=r(n(3693)),i=n(2949),a=r(n(2793));t.createGetChatTokenEndpoint=function(e,t,n){var r=(0,o.default)((0,o.default)((0,o.default)({},i.LiveChatVersion.V1,a.default.LiveChatGetChatTokenPath),i.LiveChatVersion.V2,a.default.LiveChatv2GetChatTokenPath),i.LiveChatVersion.V3,a.default.LiveChatv3GetChatTokenPath),s=(0,o.default)((0,o.default)((0,o.default)({},i.LiveChatVersion.V1,a.default.LiveChatAuthGetChatTokenPath),i.LiveChatVersion.V2,a.default.LiveChatv2AuthGetChatTokenPath),i.LiveChatVersion.V3,a.default.LiveChatv3AuthGetChatTokenPath);return n?t?a.default.LiveChatv4AuthGetChatTokenPath:a.default.LiveChatv4GetChatTokenPath:Object.values(i.LiveChatVersion).includes(e)?t?s[e]:r[e]:t?s[i.LiveChatVersion.V2]:r[i.LiveChatVersion.V2]}},7938(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitTimeBetweenRetriesConfigs=void 0,t.waitTimeBetweenRetriesConfigs={getChatConfig:1e3,getLWIDetails:3e3,getChatToken:1e3,sessionInit:1e3,sessionClose:1e3,getReconnectableChats:1e3,getReconnectAvailability:1e3,submitPostChatResponse:1e3,getSurveyInviteLink:1e3,getChatTranscripts:1e3,emailTranscript:1e3,fetchDataMaskingInfo:1e3,makeSecondaryChannelEventRequest:1e3,getAgentAvailability:1e3,sendTypingIndicator:1e3,validateAuthChatRecordTimeout:1e3,getPersistentChatHistory:1e3,midConversationAuthenticateChat:1e3,getUnreadMessageCount:1e3,sendReadReceipt:1e3}},8310(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var o=r(n(7383)),i=r(n(4579));t.Timer=function(){return(0,i.default)(function e(){(0,o.default)(this,e)},null,[{key:"TIMER",value:function(){var e=(new Date).getTime();return{get milliSecondsElapsed(){return(new Date).getTime()-e}}}}])}()},8330(e){"use strict";e.exports=JSON.parse('{"rE":"0.5.22-main.8dbdcd5"}')},8503(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingSanitizer=void 0;var o=r(n(3738)),i=r(n(7383)),a=r(n(4579)),s=r(n(3693)),u=r(n(9478)),c=r(n(2805)),l=t.LoggingSanitizer=function(){function e(){(0,i.default)(this,e)}return(0,a.default)(e,null,[{key:"stripCustomContextDataValues",value:function(e){var t;e&&(null===(t=Object.keys(e))||void 0===t||t.forEach(function(t){var n;null!==(n=e["".concat(t)])&&void 0!==n&&n.value&&(e["".concat(t)].value=u.default.hiddenContentPlaceholder)}))}},{key:"stripPreChatResponse",value:function(e){e&&Object.keys(e).forEach(function(t){e["".concat(t)]&&"Type"!==t&&(e["".concat(t)]=u.default.hiddenContentPlaceholder)})}},{key:"stripGeolocation",value:function(e){e&&(Object.keys(e).includes("longitude")&&(e.longitude=u.default.hiddenContentPlaceholder),Object.keys(e).includes("latitude")&&(e.latitude=u.default.hiddenContentPlaceholder))}},{key:"stripAuthenticationUserToken",value:function(e){e&&(Object.keys(e).includes(c.default.authenticatedUserToken)&&(e[c.default.authenticatedUserToken]=u.default.hiddenContentPlaceholder),Object.keys(e).includes(c.default.authCodeNonce)&&(e[c.default.authCodeNonce]=u.default.hiddenContentPlaceholder),Object.keys(e).includes(c.default.authorization)&&(e[c.default.authorization]=u.default.hiddenContentPlaceholder))}},{key:"stripRequestHeadersSensitiveProperties",value:function(t){e.stripAuthenticationUserToken(t),Object.keys(t).includes(c.default.authorization)&&(t[c.default.authorization]=u.default.hiddenContentPlaceholder)}},{key:"stripRequestPayloadData",value:function(t){if(null!=t&&t.data){var n;if("string"==typeof t.data)try{n=JSON.parse(t.data)}catch(e){n=void 0}n&&(Object.keys(n).includes("preChatResponse")&&e.stripPreChatResponse(n.preChatResponse),Object.keys(n).includes("customContextData")&&e.stripCustomContextDataValues(n.customContextData),e.stripGeolocation(n),t.data=JSON.stringify(n),t.data=e.stripEmailDataFromError(t.data))}}},{key:"stripEmailDataFromError",value:function(e){return e.replace(this.emailRegex,u.default.hiddenContentPlaceholder)}},{key:"stripAxiosErrorSensitiveProperties",value:function(t){var n,r,o,i,a,s,u;t.isAxiosError&&(null!=t&&null!==(n=t.config)&&void 0!==n&&n.headers&&e.stripAuthenticationUserToken(null==t||null===(a=t.config)||void 0===a?void 0:a.headers),null!=t&&null!==(r=t.config)&&void 0!==r&&r.data&&this.stripRequestPayloadData(null==t?void 0:t.config),null!=t&&null!==(o=t.response)&&void 0!==o&&null!==(o=o.config)&&void 0!==o&&o.data&&this.stripRequestPayloadData(null==t||null===(s=t.response)||void 0===s?void 0:s.config),null!=t&&null!==(i=t.response)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.headers&&e.stripAuthenticationUserToken(null==t||null===(u=t.response)||void 0===u||null===(u=u.config)||void 0===u?void 0:u.headers))}},{key:"stripErrorSensitiveProperties",value:function(e){var t;e&&"object"===(0,o.default)(e)&&(null===(t=Object.keys(e))||void 0===t?void 0:t.length)>0&&this.stripAxiosErrorSensitiveProperties(e)}}])}();(0,s.default)(l,"emailRegex",/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g)},8537(e,t,n){"use strict";var r=n(4994),o=n(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=r(n(4756)),s=r(n(9293)),u=r(n(3738)),c=r(n(7383)),l=r(n(4579)),d=r(n(3693)),f=n(2949),h=r(n(6425)),p=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var n,r,i={__proto__:null,default:e};if(null===e||"object"!=o(e)&&"function"!=typeof e)return i;if(n=t){if(n.has(e))return n.get(e);n.set(e,i)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(r.get||r.set)?n(i,a,r):i[a]=e[a]);return i}(e)}(n(9903)),g=n(1415),v=r(n(9478)),E=n(1905),m=n(3905),T=r(n(9956)),C=r(n(5560)),S=n(8971),y=n(8503),R=n(7537),w=r(n(2793)),I=r(n(2805)),O=r(n(3009)),A=n(8310),b=n(2200),L=n(7748),D=r(n(4063)),N=r(n(2515)),x=n(6676),k=n(7938);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach(function(t){(0,d.default)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var M=t.default=function(){return(0,l.default)(function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultConfiguration,o=arguments.length>2?arguments[2]:void 0;(0,c.default)(this,e),this.omnichannelConfiguration=t,this.configuration=r,this.logger=o,(0,d.default)(this,"liveChatVersion",void 0),(0,d.default)(this,"sessionId",void 0),(0,d.default)(this,"ocUserAgent",void 0),(0,d.default)(this,"HTTPTimeOutErrorMessage","".concat(f.SDKError.ClientHTTPTimeoutErrorName,": ").concat(f.SDKError.ClientHTTPTimeoutErrorMessage)),(0,d.default)(this,"setAuthCodeNonce",function(e){null!=e&&e.authcodenonce&&(n.configuration.authCodeNonce=null==e?void 0:e.authcodenonce)}),(0,d.default)(this,"setSessionIdHeader",function(e,t){e&&(t[I.default.ocSessionId]=e)}),(0,d.default)(this,"setRequestIdHeader",function(e,t){e&&(t[I.default.requestId]=e)}),(0,d.default)(this,"setCorrelationIdInHeader",function(e,t){e&&(t[I.default.correlationId]=e)}),Object.keys(this.configuration).length&&"object"===(0,u.default)(r)||(this.configuration=e.defaultConfiguration);for(var i=0,a=Object.keys(e.defaultConfiguration);i<a.length;i++){var s=a[i];this.configuration.hasOwnProperty(s)||(this.configuration["".concat(s)]=e.defaultConfiguration["".concat(s)])}for(var l=0,h=Object.keys(e.defaultConfiguration.requestTimeoutConfig);l<h.length;l++){var p=h[l];this.configuration.requestTimeoutConfig.hasOwnProperty(p)||(this.configuration.requestTimeoutConfig["".concat(p)]=e.defaultConfiguration.requestTimeoutConfig["".concat(p)])}var g=t.channelId;if(!Object.values(f.ChannelId).includes(g))throw new Error("Invalid channelId");var E,m=Object.keys(t),T=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(v.default.requiredOmnichannelConfigurationParameters);try{for(T.s();!(E=T.n()).done;){var C=E.value;if(!m.includes(C))throw new Error("Missing '".concat(C,"' in OmnichannelConfiguration"))}}catch(e){T.e(e)}finally{T.f()}this.ocUserAgent=this.configuration.ocUserAgent,this.liveChatVersion=f.LiveChatVersion.V2},[{key:"getLcwFcsDetails",value:($=(0,s.default)(a.default.mark(function e(){var t,n,r,o,i,s,u,c,l,d,g,v,E,m,T;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETLCWFCSDETAILSSTARTED,"Get LCW FCS details started",""),n="/".concat(w.default.LcwFcsDetailsPath,"/").concat(this.omnichannelConfiguration.orgId),r="GET",o="".concat(this.omnichannelConfiguration.orgUrl).concat(n),i=h.default.create(),(0,p.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getChatConfig}),s={},(0,b.addOcUserAgentHeader)(this.ocUserAgent,s),u=A.Timer.TIMER(),e.prev=1,e.next=2,i.get(o,{headers:s,timeout:null!==(c=this.configuration.defaultRequestTimeout)&&void 0!==c?c:this.configuration.requestTimeoutConfig.getChatConfig});case 2:return l=e.sent,d=u.milliSecondsElapsed,g=t.milliSecondsElapsed,v=l.data,this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETLCWFCSDETAILSSUCCEEDED,"Get LCW FCS details succeeded","",l,g,n,r,void 0,void 0,s,d),e.abrupt("return",v);case 3:throw e.prev=3,T=e.catch(1),E=u.milliSecondsElapsed,m=t.milliSecondsElapsed,this.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETLCWFCSDETAILSFAILED,"Get LCW FCS details failed","",void 0,m,n,r,T,void 0,s,E),T;case 4:case"end":return e.stop()}},e,this,[[1,3]])})),function(){return $.apply(this,arguments)})},{key:"getChatConfig",value:(J=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,s,u,c,l,d,g,E,m,T,C,y,R,I=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=I.length>1&&void 0!==I[1]&&I[1],r=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATCONFIGFSTARTED,"Get Chat config started",t),t||(t=(0,x.uuidv4)()),o="/".concat(w.default.LiveChatConfigPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"?requestId=").concat(t,"&channelId=").concat(this.omnichannelConfiguration.channelId),i="GET",s="".concat(this.omnichannelConfiguration.orgUrl).concat(o),u=h.default.create(),(0,p.default)(u,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getChatConfig}),c={},this.addDefaultHeaders(t,c),n&&(c=U(U({},v.default.bypassCacheHeaders),c)),l=A.Timer.TIMER(),e.prev=1,e.next=2,u.get(s,{headers:c,timeout:null!==(d=this.configuration.defaultRequestTimeout)&&void 0!==d?d:this.configuration.requestTimeoutConfig.getChatConfig});case 2:return g=e.sent,E=l.milliSecondsElapsed,m=r.milliSecondsElapsed,(T=g.data).LiveChatVersion&&(this.liveChatVersion=T.LiveChatVersion),T.headers={},g.headers&&g.headers.date&&(T.headers.date=g.headers.date),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATCONFIGSUCCEEDED,"Get Chat config succeeded",t,g,m,o,i,void 0,void 0,c,E),e.abrupt("return",T);case 3:return e.prev=3,R=e.catch(1),C=l.milliSecondsElapsed,y=r.milliSecondsElapsed,this.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETCHATCONFIGFAILED,"Get Chat config failed",t,void 0,y,o,i,R,void 0,c,C),e.abrupt("return",Promise.reject(R));case 4:case"end":return e.stop()}},e,this,[[1,3]])})),function(e){return J.apply(this,arguments)})},{key:"getLWIDetails",value:(Y=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g,E,m,T,C=this,y=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=y.length>1&&void 0!==y[1]?y[1]:{},o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETLWISTATUSSTARTED,"Get LWI Details Started",t),t||(t=(0,x.uuidv4)()),i="/".concat(w.default.LiveChatLiveWorkItemDetailsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),u=h.default.create(),(0,p.axiosRetryHandlerWithNotFound)(u,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getLWIDetails}),c=r.authenticatedUserToken,l=r.reconnectId,d=v.default.defaultHeaders,c&&(i="/".concat(w.default.LiveChatAuthLiveWorkItemDetailsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),d[I.default.authenticatedUserToken]=c,d[I.default.authCodeNonce]=this.configuration.authCodeNonce),this.addDefaultHeaders(t,d),g=!c&&!0===this.configuration.useUnauthReconnectIdSigQueryParam,l&&(g||(i+="/".concat(l))),E={channelId:this.omnichannelConfiguration.channelId},l&&g&&(E.sig=l),m="".concat(this.omnichannelConfiguration.orgUrl).concat(i),T={headers:d,method:"GET",url:m,params:E,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getLWIDetails},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var s,c,l,h,p,g,E,m,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=A.Timer.TIMER(),e.prev=1,e.next=2,u(T);case 2:c=e.sent,l=s.milliSecondsElapsed,h=o.milliSecondsElapsed,p=c.data,g=c.headers,C.setAuthCodeNonce(g),C.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETLWISTATUSSUCCEEDED,"Get LWI Details succeeded",t,c,h,i,"GET",void 0,void 0,d,l),n(p),e.next=4;break;case 3:e.prev=3,y=e.catch(1),E=s.milliSecondsElapsed,m=o.milliSecondsElapsed,C.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETLWISTATUSFAILED,"Get LWI Details failed",t,void 0,m,i,"GET",y,void 0,d,E),(0,D.default)(y,v.default.axiosTimeoutErrorCode)&&r(new Error(C.HTTPTimeOutErrorMessage)),r(y);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return Y.apply(this,arguments)})},{key:"getChatToken",value:(z=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g,E,m,T,C,y,R,w,O,b,N=this,k=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=k.length>1&&void 0!==k[1]?k[1]:{},o=k.length>2&&void 0!==k[2]?k[2]:0,i=A.Timer.TIMER(),u=r.reconnectId,c=r.authenticatedUserToken,l=r.currentLiveChatVersion,d=r.refreshToken,g=r.MsOcBotApplicationId,E=!!(g&&g.length>0),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATTOKENSTARTED,"Get Chat Token Started",t),!(o<0)){e.next=1;break}throw new Error("Invalid currentRetryCount");case 1:return t||(t=(0,x.uuidv4)()),m=v.default.defaultHeaders,this.addDefaultHeaders(t,m),T=(0,L.createGetChatTokenEndpoint)(l||this.liveChatVersion,!!c,E),c&&(m[I.default.authenticatedUserToken]=c,m[I.default.authCodeNonce]=this.configuration.authCodeNonce),C="/".concat(T,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),y=!c&&!0===this.configuration.useUnauthReconnectIdSigQueryParam,u&&(y||(C+="/".concat(u))),R={channelId:this.omnichannelConfiguration.channelId},g&&g.length>0&&(R["Ms-Oc-Bot-Application-Id"]=g),d&&(R.refreshToken="true"),u&&y&&(R.sig=u),w="".concat(this.omnichannelConfiguration.orgUrl).concat(C),O={headers:m,method:"GET",url:w,params:R,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getChatToken},b=h.default.create(),(0,p.default)(b,{headerOverwrites:[I.default.authCodeNonce],retries:o>this.configuration.maxRequestRetriesOnFailure?o:this.configuration.maxRequestRetriesOnFailure,retryOn429:this.configuration.getChatTokenRetryOn429,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getChatToken}),e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,c,l,d,h,p,g,E;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),e.prev=1,e.next=2,b(O);case 2:if(s=e.sent,c=o.milliSecondsElapsed,l=i.milliSecondsElapsed,d=s.data,h=s.headers,N.setAuthCodeNonce(h),h&&h[I.default.ocSessionId.toLowerCase()]&&(N.sessionId=h[I.default.ocSessionId.toLowerCase()]),!d){e.next=4;break}if(0!==Object.keys(d).length){e.next=3;break}return r(new Error("Empty data received from getChatToken")),e.abrupt("return");case 3:return d.requestId=t,N.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATTOKENSUCCEEDED,"Get Chat Token succeeded",t,s,l,C,"GET",void 0,void 0,m,c),n(d),e.abrupt("return");case 4:if(!u||s.status!==v.default.noContentStatusCode){e.next=5;break}return r(s),e.abrupt("return");case 5:e.next=7;break;case 6:e.prev=6,E=e.catch(1),p=o.milliSecondsElapsed,g=i.milliSecondsElapsed,N.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETCHATTOKENFAILED,"Get Chat Token failed",t,void 0,g,C,"GET",E,void 0,m,p),(0,D.default)(E,v.default.axiosTimeoutErrorCode)&&r(new Error(N.HTTPTimeOutErrorMessage)),r(E);case 7:case"end":return e.stop()}},e,null,[[1,6]])}));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}},e,this)})),function(e){return z.apply(this,arguments)})},{key:"getReconnectableChats",value:(K=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,p,g=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=A.Timer.TIMER(),o=t.authenticatedUserToken,this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETRECONNECTABLECHATSSTARTED,"Get Reconnectable chat Started"),i=null==t?void 0:t.requestId,u="/".concat(w.default.LiveChatGetReconnectableChatsPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(i,"?channelId=").concat(this.omnichannelConfiguration.channelId),(c=v.default.defaultHeaders)[I.default.authenticatedUserToken]=o,c[I.default.authCodeNonce]=this.configuration.authCodeNonce,this.addDefaultHeaders(i,c),l="".concat(this.omnichannelConfiguration.orgUrl).concat(u),d={headers:c,method:"GET",url:l,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getReconnectableChats},p=h.default.create(),e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(t,n){var o,s,l,h,E,m,T,C,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),e.prev=1,e.next=2,p(d);case 2:if(s=e.sent,l=o.milliSecondsElapsed,h=r.milliSecondsElapsed,E=s.data,m=s.headers,g.setAuthCodeNonce(m),!E){e.next=3;break}return g.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETRECONNECTABLECHATSSUCCEEDED,"Get Reconnectable Chats Succeeded and old session returned",i,s,h,u,"GET",void 0,void 0,c,l),t(E),e.abrupt("return");case 3:return t(),e.abrupt("return");case 4:return e.prev=4,y=e.catch(1),T=o.milliSecondsElapsed,C=r.milliSecondsElapsed,g.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETRECONNECTABLECHATSFAILED,"Get Reconnectable Chats failed",i,void 0,C,u,"GET",y,void 0,c,T),(0,D.default)(y,v.default.axiosTimeoutErrorCode)&&n(new Error(g.HTTPTimeOutErrorMessage)),n(y),e.abrupt("return");case 5:case"end":return e.stop()}},e,null,[[1,4]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return K.apply(this,arguments)})},{key:"getReconnectAvailability",value:(V=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,p,g=this,E=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=E.length>1&&void 0!==E[1]?E[1]:{},o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITYSTARTED,"Get Reconnectable availability Started"),i="/".concat(w.default.LiveChatReconnectAvailabilityPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),u=v.default.defaultHeaders,this.addDefaultHeaders(null==r?void 0:r.requestId,u),c="".concat(this.omnichannelConfiguration.orgUrl).concat(i),d={headers:u,method:l="GET",url:c,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getReconnectAvailability},p=h.default.create(),e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(t,n){var s,c,h,E,m,T,C,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=A.Timer.TIMER(),e.prev=1,e.next=2,p(d);case 2:if(c=e.sent,h=s.milliSecondsElapsed,E=o.milliSecondsElapsed,!(m=c.data)){e.next=3;break}return g.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITYSUCCEEDED,"Get Reconnect availability succeeded",null==r?void 0:r.requestId,c,E,i,l,void 0,void 0,u,h),t(m),e.abrupt("return");case 3:return g.logWithLogger(S.LogLevel.WARN,f.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITYSUCCEEDED,"Get Reconnect availability didn't send any valid data",null==r?void 0:r.requestId,c,E,i,l,void 0,void 0,u,h),t(),e.abrupt("return");case 4:return e.prev=4,y=e.catch(1),T=s.milliSecondsElapsed,C=o.milliSecondsElapsed,g.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETRECONNECTAVAILABILITYFAILED,"Get Reconnect Availability failed",null==r?void 0:r.requestId,void 0,C,i,l,y,void 0,u,T),(0,D.default)(y,v.default.axiosTimeoutErrorCode)&&n(new Error(g.HTTPTimeOutErrorMessage)),n(y),e.abrupt("return");case 5:case"end":return e.stop()}},e,null,[[1,4]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return V.apply(this,arguments)})},{key:"getAgentAvailability",value:(W=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,y,b,L,N,x,k,P,U=this,_=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=_.length>1&&void 0!==_[1]?_[1]:{},o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETAGENTAVAILABILITYSTARTED,"Get agent availability Started",t),i="/".concat(w.default.GetAgentAvailabilityPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=lcw"),u=h.default.create(),(0,p.default)(u,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getAgentAvailability}),c=r.authenticatedUserToken,l=r.initContext,d=r.getContext,y=v.default.defaultHeaders,c&&(y[I.default.authenticatedUserToken]=c,y[I.default.authCodeNonce]=this.configuration.authCodeNonce),this.addDefaultHeaders(t,y),b=l||{},L={orgId:this.omnichannelConfiguration.orgId,widgetId:this.omnichannelConfiguration.widgetId},b&&b.customContextData&&(N=E.CustomContextData.sort(b.customContextData),Object.assign(L,{customContext:N})),b.portalcontactid&&Object.assign(L,{portalcontactid:b.portalcontactid}),b.cacheKey=(0,O.default)(JSON.stringify(L)).toString(T.default),!d||window.document){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 1:if(d&&(b.browser=g.BrowserInfo.getBrowserName(),b.device=m.DeviceInfo.getDeviceType(),b.originurl=window.location.href,b.os=R.OSInfo.getOsType()),b.locale||(b.locale=v.default.defaultLocale),!b.locale||C.default.supportedLocales.includes(b.locale)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(b.locale,"'"))));case 2:return x="".concat(this.omnichannelConfiguration.orgUrl).concat(i),P={data:b,headers:y,method:k="POST",url:x,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getAgentAvailability},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var s,c,l,d,h,p,g,E,m;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=A.Timer.TIMER(),e.prev=1,e.next=2,u(P);case 2:c=e.sent,l=s.milliSecondsElapsed,d=o.milliSecondsElapsed,h=c.data,p=c.headers,U.setAuthCodeNonce(p),h&&(U.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETAGENTAVAILABILITYSUCCEEDED,"Get agent availability succeeded",t,c,d,i,k,void 0,void 0,y,l),n(h)),e.next=5;break;case 3:if(e.prev=3,m=e.catch(1),g=s.milliSecondsElapsed,E=o.milliSecondsElapsed,U.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETAGENTAVAILABILITYFAILED,"Get agent availability failed",t,void 0,E,i,k,m,void 0,y,g),!(0,D.default)(m,v.default.axiosTimeoutErrorCode)){e.next=4;break}return r(new Error(U.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:r(m);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}},e,this)})),function(e){return W.apply(this,arguments)})},{key:"sessionInit",value:(q=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,E,T,y,O,b,L,x,k,P,_,M=this,F=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=F.length>1&&void 0!==F[1]?F[1]:{},o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SESSIONINITSTARTED,"Session Init Started",t),i=h.default.create(),(0,p.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.sessionInit,shouldRetry:function(e){return(0,N.default)(e,!0)},headerOverwrites:[I.default.authCodeNonce]}),u=r.reconnectId,c=r.authenticatedUserToken,l=r.initContext,E=r.getContext,T=l||{},y=U({},v.default.defaultHeaders),O=c?w.default.LiveChatAuthSessionInitPath:w.default.LiveChatSessionInitPath,b="/".concat(O,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),c&&Object.assign(y,(0,d.default)((0,d.default)({},I.default.authenticatedUserToken,c),I.default.authCodeNonce,this.configuration.authCodeNonce)),this.addDefaultHeaders(t,y),this.setRequestIdHeader(t,y),L=!c&&!0===this.configuration.useUnauthReconnectIdSigQueryParam,u&&(L||(b+="/".concat(u))),x={channelId:this.omnichannelConfiguration.channelId},u&&L&&(x.sig=u),!E||window.document){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 1:if(E&&(T.browser=g.BrowserInfo.getBrowserName(),T.device=m.DeviceInfo.getDeviceType(),T.originurl=window.location.href,T.os=R.OSInfo.getOsType()),T.locale||(T.locale=v.default.defaultLocale),!T.locale||C.default.supportedLocales.includes(T.locale)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(T.locale,"'"))));case 2:return k="".concat(this.omnichannelConfiguration.orgUrl).concat(b),_={data:T,headers:y,method:P="POST",url:k,params:x,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.sessionInit},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var s,u,c,l,d,h,p,g;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=A.Timer.TIMER(),e.prev=1,e.next=2,i(_);case 2:u=e.sent,c=s.milliSecondsElapsed,l=o.milliSecondsElapsed,d=u.headers,M.setAuthCodeNonce(d),M.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SESSIONINITSUCCEEDED,"Session Init Succeeded",t,u,l,b,P,void 0,T,y,c),n(),e.next=5;break;case 3:if(e.prev=3,g=e.catch(1),h=s.milliSecondsElapsed,p=o.milliSecondsElapsed,M.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.SESSIONINITFAILED,"Session Init failed",t,void 0,p,b,P,g,T,y,h),!(0,D.default)(g,v.default.axiosTimeoutErrorCode)){e.next=4;break}return r(new Error(M.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:r(g);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}},e,this)})),function(e){return q.apply(this,arguments)})},{key:"createConversation",value:(B=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,s,u,c,l,E,T,y,O,b,L,x,k,P,_,M,F,G,H,j,B,q=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=q.length>1&&void 0!==q[1]?q[1]:{},o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.CREATESESSIONSTARTED,"Create conversation call Started",t),i=h.default.create(),(0,p.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.sessionInit,shouldRetry:function(e){return(0,N.default)(e,!0)},headerOverwrites:[I.default.authCodeNonce]}),s=r.reconnectId,u=r.authenticatedUserToken,c=r.initContext,l=r.getContext,E=c||{},T=U({},v.default.defaultHeaders),y=u?w.default.LiveChatConnectorAuthPath:w.default.LiveChatConnectorPath,O="/".concat(y,"/").concat(this.omnichannelConfiguration.orgId,"/widgetApp/").concat(this.omnichannelConfiguration.widgetId,"/conversation"),u&&Object.assign(T,(0,d.default)((0,d.default)({},I.default.authenticatedUserToken,u),I.default.authCodeNonce,this.configuration.authCodeNonce)),this.addDefaultHeaders(t,T),this.setRequestIdHeader(t,T),s&&(E.reconnectId=s),E.channelId=this.omnichannelConfiguration.channelId,!l||window.document){e.next=1;break}return e.abrupt("return",Promise.reject(new Error("getContext is only supported on web browsers")));case 1:if(l&&(E.browser=g.BrowserInfo.getBrowserName(),E.device=m.DeviceInfo.getDeviceType(),E.originurl=window.location.href,E.os=R.OSInfo.getOsType()),E.locale||(E.locale=v.default.defaultLocale),!E.locale||C.default.supportedLocales.includes(E.locale)){e.next=2;break}return e.abrupt("return",Promise.reject(new Error("Unsupported locale: '".concat(E.locale,"'"))));case 2:return b="".concat(this.omnichannelConfiguration.orgUrl).concat(O),x={data:E,headers:T,method:L="POST",url:b,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.sessionInit},k=A.Timer.TIMER(),e.prev=3,e.next=4,i(x);case 4:if(P=e.sent,_=k.milliSecondsElapsed,M=o.milliSecondsElapsed,F=P.data,G=P.headers,this.setAuthCodeNonce(G),G&&G[I.default.ocSessionId.toLowerCase()]&&(this.sessionId=G[I.default.ocSessionId.toLowerCase()]),0!==Object.keys(F).length){e.next=5;break}throw new Error("Empty data received from getChatToken");case 5:return F.requestId=t,this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.CREATESESSIONSUCCEEDED,"Create coversation call Succeeded",t,P,M,O,L,void 0,void 0,T,_),e.abrupt("return",F);case 6:if(e.prev=6,B=e.catch(3),H=k.milliSecondsElapsed,j=o.milliSecondsElapsed,this.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.CREATESESSIONFAILED,"Create conversation call failed",t,void 0,j,O,L,B,E,T,H),!(0,D.default)(B,v.default.axiosTimeoutErrorCode)){e.next=7;break}throw new Error(this.HTTPTimeOutErrorMessage);case 7:throw B;case 8:case"end":return e.stop()}},e,this,[[3,6]])})),function(e){return B.apply(this,arguments)})},{key:"sessionClose",value:(j=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g,E,m,T,C,y,R=this,O=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=O.length>1&&void 0!==O[1]?O[1]:{},o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SESSIONCLOSESTARTED,"Session Close Started",t),i="/".concat(w.default.LiveChatSessionClosePath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),u=h.default.create(),(0,p.default)(u,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.sessionClose}),c=r.authenticatedUserToken,l=r.isReconnectChat,d=r.isPersistentChat,g=r.chatId,E=v.default.defaultHeaders,(m={}).chatId=g,c&&(i="/".concat(w.default.LiveChatAuthSessionClosePath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),E[I.default.authenticatedUserToken]=c,E[I.default.authCodeNonce]=this.configuration.authCodeNonce),this.addDefaultHeaders(t,E),l&&(i+="&isReconnectChat=true"),d&&(i+="&isPersistentChat=true"),T="".concat(this.omnichannelConfiguration.orgUrl).concat(i),y={data:m,headers:E,method:C="POST",url:T,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.sessionClose},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var s,c,l,d,h,p,g,m;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=A.Timer.TIMER(),e.prev=1,e.next=2,u(y);case 2:c=e.sent,l=s.milliSecondsElapsed,d=c.headers,R.setAuthCodeNonce(d),h=o.milliSecondsElapsed,R.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SESSIONCLOSESUCCEEDED,"Session Close succeeded",t,c,h,i,C,void 0,void 0,E,l),n(),e.next=4;break;case 3:e.prev=3,m=e.catch(1),p=s.milliSecondsElapsed,g=o.milliSecondsElapsed,R.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.SESSIONCLOSEFAILED,"Session close failed",t,void 0,g,i,C,m,void 0,E,p),m.code===v.default.axiosTimeoutErrorCode&&r(new Error(R.HTTPTimeOutErrorMessage)),r(m);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return j.apply(this,arguments)})},{key:"validateAuthChatRecord",value:(H=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDSTARTED,"Validate Auth Chat Record Started",t),i=n.authenticatedUserToken,u=n.chatId,c="/".concat(w.default.LiveChatValidateAuthChatMapRecordPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(u,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),l=h.default.create(),(0,p.default)(l,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.validateAuthChatRecord}),d=v.default.defaultHeaders,i&&(d[I.default.authenticatedUserToken]=i,d[I.default.authCodeNonce]=this.configuration.authCodeNonce),this.addDefaultHeaders(t,d),g="".concat(this.omnichannelConfiguration.orgUrl).concat(c),m={headers:d,method:E="GET",url:g,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.validateAuthChatRecordTimeout},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var i,s,u,h,p,g,C,y,R;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=A.Timer.TIMER(),e.prev=1,e.next=2,l(m);case 2:u=e.sent,h=i.milliSecondsElapsed,p=u.headers,T.setAuthCodeNonce(p),g=o.milliSecondsElapsed,!0===(null===(s=u.data)||void 0===s?void 0:s.authChatExist)?(T.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDSUCCEEDED,"Validate Auth Chat Record succeeded",t,u,g,c,E,void 0,void 0,d,h),n(u.data)):(T.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDFAILED,"Validate Auth Chat Record Failed. Record is not found or request is not authorized",t,u,g,c,E,void 0,void 0,d,h),r(new Error("Validate Auth Chat Record Failed. Record is not found or request is not authorized"))),e.next=4;break;case 3:e.prev=3,R=e.catch(1),C=i.milliSecondsElapsed,y=o.milliSecondsElapsed,T.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.VALIDATEAUTHCHATRECORDFAILED,"Validate Auth Chat Record failed",t,void 0,y,c,E,R,void 0,d,C),(0,D.default)(R,v.default.axiosTimeoutErrorCode)&&r(new Error(T.HTTPTimeOutErrorMessage)),"Error: Request failed with status code 404"===R.toString()?n({}):r(R);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t){return H.apply(this,arguments)})},{key:"submitPostChatResponse",value:(G=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T=this,C=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=C.length>2&&void 0!==C[2]?C[2]:{},i=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SUBMITPOSTCHATSTARTED,"Submit Post Chat Started",t),u="/".concat(w.default.LiveChatSubmitPostChatPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),c=h.default.create(),(0,p.default)(c,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.submitPostChatResponse}),l=o.authenticatedUserToken,d=v.default.defaultHeaders,this.addDefaultHeaders(t,d),l&&(u="/".concat(w.default.LiveChatAuthSubmitPostChatPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),d[I.default.authenticatedUserToken]=l,d[I.default.authCodeNonce]=this.configuration.authCodeNonce),g="".concat(this.omnichannelConfiguration.orgUrl).concat(u),E="POST",m={data:JSON.stringify(n),headers:d,method:E,url:g,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.submitPostChatResponse},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,l,h,p,g,C,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),e.prev=1,e.next=2,c(m);case 2:s=e.sent,l=o.milliSecondsElapsed,h=s.headers,T.setAuthCodeNonce(h),p=i.milliSecondsElapsed,T.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SUBMITPOSTCHATSUCCEEDED,"Submit Post Chat succeeded",t,s,p,u,E,void 0,void 0,d,l),n(),e.next=4;break;case 3:e.prev=3,y=e.catch(1),g=o.milliSecondsElapsed,C=i.milliSecondsElapsed,T.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.SUBMITPOSTCHATFAILED,"Submit Post Chat Failed",t,void 0,C,u,E,y,void 0,d,g),(0,D.default)(y,v.default.axiosTimeoutErrorCode)&&r(new Error(T.HTTPTimeOutErrorMessage)),r(y);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t){return G.apply(this,arguments)})},{key:"getSurveyInviteLink",value:(F=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T,C=this,y=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=y.length>2&&void 0!==y[2]?y[2]:{},i=A.Timer.TIMER(),this.logger&&this.logger.log(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETSURVEYINVITELINKSTARTED,{SurveyOwnerId:t},"Get Survey Invite Link Started"),u="/".concat(w.default.LiveChatGetSurveyInviteLinkPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(t),c=h.default.create(),(0,p.default)(c,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getSurveyInviteLink}),l=o.authenticatedUserToken,d=o.requestId,g=v.default.defaultHeaders,l&&(u="/".concat(w.default.LiveChatAuthGetSurveyInviteLinkPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(t),g[I.default.authenticatedUserToken]=l,g[I.default.authCodeNonce]=this.configuration.authCodeNonce,g[I.default.widgetAppId]=this.omnichannelConfiguration.widgetId),this.addDefaultHeaders(d,g),d&&(g[I.default.requestId]=d),E="".concat(this.omnichannelConfiguration.orgUrl).concat(u),m="POST",T={data:JSON.stringify(n),headers:g,method:m,url:E,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.getSurveyInviteLink},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(t,n){var r,o,s,l,h,p,E,y,R;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=A.Timer.TIMER(),e.prev=1,e.next=2,c(T);case 2:o=e.sent,s=r.milliSecondsElapsed,l=o.data,h=o.headers,C.setAuthCodeNonce(h),p=i.milliSecondsElapsed,C.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETSURVEYINVITELINKSUCCEEDED,"Get Survey Invite Link Succeeded",d,o,p,u,m,void 0,void 0,g,s),t(l),e.next=4;break;case 3:e.prev=3,R=e.catch(1),E=r.milliSecondsElapsed,y=i.milliSecondsElapsed,C.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETSURVEYINVITELINKFAILED,"Get Survey Invite Link failed",d,void 0,y,u,m,R,void 0,g,E),(0,D.default)(R,v.default.axiosTimeoutErrorCode)&&n(new Error(C.HTTPTimeOutErrorMessage)),n(R);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t){return F.apply(this,arguments)})},{key:"getChatTranscripts",value:(M=(0,s.default)(a.default.mark(function e(t,n,r){var o,i,u,c,l,d,g,E,m,T,C=this,y=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=y.length>3&&void 0!==y[3]?y[3]:{},u=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATTRANSCRIPTSTARTED,"Get Chat Transcript Started",t),c="/".concat(w.default.LiveChatGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),l=h.default.create(),(0,p.default)(l,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getChatTranscripts}),d=i.authenticatedUserToken,g=i.currentLiveChatVersion,(E=v.default.defaultHeaders)[I.default.organizationId]=this.omnichannelConfiguration.orgId,E[I.default.widgetAppId]=this.omnichannelConfiguration.widgetId,E[I.default.authorization]=r,this.liveChatVersion===f.LiveChatVersion.V2||g&&g===f.LiveChatVersion.V2?(c="/".concat(w.default.LiveChatv2GetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),d&&(E[I.default.authenticatedUserToken]=d,E[I.default.authCodeNonce]=this.configuration.authCodeNonce,c="/".concat(w.default.LiveChatv2AuthGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId))):d&&(E[I.default.authenticatedUserToken]=d,E[I.default.authCodeNonce]=this.configuration.authCodeNonce,c="/".concat(w.default.LiveChatAuthGetChatTranscriptPath,"/").concat(n,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId)),this.addDefaultHeaders(t,E),m="".concat(this.omnichannelConfiguration.orgUrl).concat(c),T={headers:E,method:"GET",url:m,timeout:null!==(o=this.configuration.defaultRequestTimeout)&&void 0!==o?o:this.configuration.requestTimeoutConfig.getChatTranscripts},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,i,s,d,h,p,g,m,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),e.prev=1,e.next=2,l(T);case 2:i=e.sent,s=o.milliSecondsElapsed,d=u.milliSecondsElapsed,h=i.data,p=i.headers,C.setAuthCodeNonce(p),C.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETCHATTRANSCRIPTSUCCEEDED,"Get Chat Transcript succeeded",t,i,d,c,"GET",void 0,void 0,E,s),n(h),e.next=4;break;case 3:e.prev=3,y=e.catch(1),g=o.milliSecondsElapsed,m=u.milliSecondsElapsed,C.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETCHATTRANSCRIPTFAILED,"Get Chat Transcript failed",t,void 0,m,c,"GET",y,void 0,E,g),(0,D.default)(y,v.default.axiosTimeoutErrorCode)&&r(new Error(C.HTTPTimeOutErrorMessage)),r(y);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return M.apply(this,arguments)})},{key:"getPersistentChatHistory",value:(P=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g,E,m,T,C=this,y=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=y.length>1&&void 0!==y[1]?y[1]:{},o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETPERSISTENTCHATHISTORYSTARTED,"Get Persistent Chat History Started",t),i=r.authenticatedUserToken,u=r.pageSize,c=r.pageToken,i){e.next=1;break}return this.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETPERSISTENTCHATHISTORYFAILED,"Get Persistent Chat History failed - Missing authenticated user token",t),e.abrupt("return",Promise.reject(new Error("Authenticated user token is required for persistent chat history")));case 1:return l="/".concat(w.default.LiveChatAuthGetPersistentChatHistoryPath,"/").concat(this.omnichannelConfiguration.orgId,"/widgetapp/").concat(this.omnichannelConfiguration.widgetId,"/conversation/history"),d=h.default.create(),(0,p.default)(d,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getPersistentChatHistory}),(g=U({},v.default.defaultHeaders))[I.default.authenticatedUserToken]=i,g[I.default.authCodeNonce]=this.configuration.authCodeNonce,this.addDefaultHeaders(t,g),E={},u&&(E.pageSize=u.toString()),g[I.default.pageToken]=c||"",m="".concat(this.omnichannelConfiguration.orgUrl).concat(l),T={headers:g,method:"GET",url:m,params:E,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getPersistentChatHistory},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var i,s,u,c,h,p,E,m,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=A.Timer.TIMER(),e.prev=1,e.next=2,d(T);case 2:s=e.sent,u=i.milliSecondsElapsed,c=o.milliSecondsElapsed,h=s.data,p=s.headers,C.setAuthCodeNonce(p),C.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETPERSISTENTCHATHISTORYSUCCEEDED,"Get Persistent Chat History succeeded",t,s,c,l,"GET",void 0,void 0,g,u),n(h),e.next=5;break;case 3:if(e.prev=3,y=e.catch(1),E=i.milliSecondsElapsed,m=o.milliSecondsElapsed,C.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETPERSISTENTCHATHISTORYFAILED,"Get Persistent Chat History failed",t,void 0,m,l,"GET",y,void 0,g,E),!(0,D.default)(y,v.default.axiosTimeoutErrorCode)){e.next=4;break}return r(new Error(C.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:r(y);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}},e,this)})),function(e){return P.apply(this,arguments)})},{key:"emailTranscript",value:(k=(0,s.default)(a.default.mark(function e(t,n,r){var o,i,u,c,l,d,g,E,m,T,C=this,y=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=y.length>3&&void 0!==y[3]?y[3]:{},u=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.EMAILTRANSCRIPTSTARTED,"Email Transcript Started",t),c="/".concat(w.default.LiveChatTranscriptEmailRequestPath,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),l=h.default.create(),(0,p.default)(l,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.emailTranscript}),d=i.authenticatedUserToken,(g=v.default.defaultHeaders)[I.default.organizationId]=this.omnichannelConfiguration.orgId,g[I.default.widgetAppId]=this.omnichannelConfiguration.widgetId,g[I.default.authorization]=n,d&&(g[I.default.authenticatedUserToken]=d,g[I.default.authCodeNonce]=this.configuration.authCodeNonce,c="/".concat(w.default.LiveChatAuthTranscriptEmailRequestPath,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId)),this.addDefaultHeaders(t,g),E="".concat(this.omnichannelConfiguration.orgUrl).concat(c),m="POST",T={data:JSON.stringify(r),headers:g,method:m,url:E,timeout:null!==(o=this.configuration.defaultRequestTimeout)&&void 0!==o?o:this.configuration.requestTimeoutConfig.emailTranscript},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,i,s,d,h,p,E,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),e.prev=1,e.next=2,l(T);case 2:i=e.sent,s=o.milliSecondsElapsed,d=i.headers,C.setAuthCodeNonce(d),h=u.milliSecondsElapsed,C.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.EMAILTRANSCRIPTSUCCEEDED,"Email Transcript succeeded",t,i,h,c,m,void 0,void 0,g,s),n(),e.next=4;break;case 3:e.prev=3,y=e.catch(1),p=o.milliSecondsElapsed,E=u.milliSecondsElapsed,C.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.EMAILTRANSCRIPTFAILED,"Email Transcript Failed",t,void 0,E,c,m,y,void 0,g,p),(0,D.default)(y,v.default.axiosTimeoutErrorCode)&&r(new Error(C.HTTPTimeOutErrorMessage)),r(y);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t,n){return k.apply(this,arguments)})},{key:"fetchDataMaskingInfo",value:(i=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.FETCHDATAMASKINGSTARTED,"Fetch Data Masking Started",t),t||(t=(0,x.uuidv4)()),o="/".concat(w.default.LiveChatFetchDataMaskingInfoPath,"/").concat(this.omnichannelConfiguration.orgId),i=h.default.create(),(0,p.default)(i,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.fetchDataMaskingInfo}),(u=v.default.defaultHeaders)[I.default.organizationId]=this.omnichannelConfiguration.orgId,u[I.default.requestId]=t,this.addDefaultHeaders(t,u),c="".concat(this.omnichannelConfiguration.orgUrl).concat(o),l={headers:u,method:"GET",url:c,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.fetchDataMaskingInfo},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,s){var c,h,p,g,E,m,T,C;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=A.Timer.TIMER(),e.prev=1,e.next=2,i(l);case 2:h=e.sent,p=c.milliSecondsElapsed,g=r.milliSecondsElapsed,E=h.data,d.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.FETCHDATAMASKINGSUCCEEDED,"Fetch Data Masking succeeded",t,h,g,o,"GET",void 0,void 0,u,p),n(E),e.next=4;break;case 3:e.prev=3,C=e.catch(1),m=c.milliSecondsElapsed,T=r.milliSecondsElapsed,d.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.FETCHDATAMASKINGFAILED,"Fetch Data Masking Failed",t,void 0,T,o,"GET",C,void 0,u,m),(0,D.default)(C,v.default.axiosTimeoutErrorCode)&&s(new Error(d.HTTPTimeOutErrorMessage)),s(C);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"makeSecondaryChannelEventRequest",value:(o=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T=this,C=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=C.length>2&&void 0!==C[2]?C[2]:{},i=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTSTARTED,"Secondary Channel Event Request Started",t),u="/".concat(w.default.LiveChatSecondaryChannelEventPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t),c=h.default.create(),(0,p.default)(c,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.makeSecondaryChannelEventRequest}),l=o.authenticatedUserToken,(d=v.default.defaultHeaders)[I.default.organizationId]=this.omnichannelConfiguration.orgId,l&&(d[I.default.authenticatedUserToken]=l,d[I.default.authCodeNonce]=this.configuration.authCodeNonce,u="/".concat(w.default.LiveChatAuthSecondaryChannelEventPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(t)),this.addDefaultHeaders(t,d),u+="?channelId="+v.default.defaultChannelId,g="".concat(this.omnichannelConfiguration.orgUrl).concat(u),E="POST",m={data:JSON.stringify(n),headers:d,method:E,url:g,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.makeSecondaryChannelEventRequest},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,l,h,p,g,C,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),e.prev=1,e.next=2,c(m);case 2:s=e.sent,l=o.milliSecondsElapsed,h=s.headers,T.setAuthCodeNonce(h),p=i.milliSecondsElapsed,T.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTSUCCEEDED,"Secondary Channel Event Request Succeeded",t,s,p,u,E,void 0,void 0,d,l),n(),e.next=4;break;case 3:e.prev=3,y=e.catch(1),g=o.milliSecondsElapsed,C=i.milliSecondsElapsed,T.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.SECONDARYCHANNELEVENTREQUESTFAILED,"Secondary Channel Event Request Failed",t,void 0,C,u,E,y,void 0,d,g),(0,D.default)(y,v.default.axiosTimeoutErrorCode)&&r(new Error(T.HTTPTimeOutErrorMessage)),r(y);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"sendTypingIndicator",value:(r=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,p,g,E,m=this,T=arguments;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=T.length>2&&void 0!==T[2]?T[2]:{},n&&n===f.LiveChatVersion.V2){e.next=1;break}return e.abrupt("return",Promise.resolve());case 1:if(i=A.Timer.TIMER(),u=o.customerDisplayName,n&&n===f.LiveChatVersion.V2){e.next=2;break}throw new Error("Typing indicator is only supported on v2");case 2:return c="/".concat(w.default.SendTypingIndicatorPath,"/").concat(t),l=h.default.create(),(d=v.default.defaultHeaders)[I.default.organizationId]=this.omnichannelConfiguration.orgId,u&&(d[v.default.customerDisplayName]=u),this.addDefaultHeaders(t,d),p="".concat(this.omnichannelConfiguration.orgUrl).concat(c),E={headers:d,method:g="POST",url:p,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.sendTypingIndicator},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,u,h,p,T,C;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),e.prev=1,e.next=2,l(E);case 2:s=e.sent,u=o.milliSecondsElapsed,h=i.milliSecondsElapsed,m.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SENDTYPINGINDICATORSUCCEEDED,"Send Typing Indicator Succeeded",t,s,h,c,g,void 0,void 0,d,u),n(),e.next=4;break;case 3:e.prev=3,C=e.catch(1),p=o.milliSecondsElapsed,T=i.milliSecondsElapsed,m.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.SENDTYPINGINDICATORFAILED,"Send Typing Indicator Failed",t,void 0,T,c,g,C,void 0,d,p),(0,D.default)(C,v.default.axiosTimeoutErrorCode)&&r(new Error(m.HTTPTimeOutErrorMessage)),r(C);case 4:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 3:case"end":return e.stop()}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"midConversationAuthenticateChat",value:(n=(0,s.default)(a.default.mark(function e(t,n){var r,o,i,u,c,l,d,g,E,m,T=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.MIDAUTHENTICATECHATSTARTED,"Mid-Authenticate Chat Started",t),i=n.chatId,u=n.authenticatedUserToken,i&&u){e.next=1;break}throw this.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.MIDAUTHENTICATECHATFAILED,"Mid-Authenticate Chat Failed - chatId and authenticatedUserToken are required",t),new Error("chatId and authenticatedUserToken are required");case 1:return c="/".concat(w.default.LiveChatAuthMidConversationPath,"/").concat(this.omnichannelConfiguration.orgId,"/").concat(this.omnichannelConfiguration.widgetId,"/").concat(i,"/").concat(t,"?channelId=").concat(this.omnichannelConfiguration.channelId),l=h.default.create(),(0,p.default)(l,{headerOverwrites:[I.default.authCodeNonce],retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.midConversationAuthenticateChat}),(d=U({},v.default.defaultHeaders))[I.default.authenticatedUserToken]=u,d[I.default.authCodeNonce]=this.configuration.authCodeNonce,this.addDefaultHeaders(t,d),this.setRequestIdHeader(t,d),g="".concat(this.omnichannelConfiguration.orgUrl).concat(c),m={headers:d,method:E="POST",url:g,timeout:null!==(r=this.configuration.defaultRequestTimeout)&&void 0!==r?r:this.configuration.requestTimeoutConfig.midConversationAuthenticateChat},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var i,s,u,h,p,g,C,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=A.Timer.TIMER(),e.prev=1,e.next=2,l(m);case 2:s=e.sent,u=i.milliSecondsElapsed,h=o.milliSecondsElapsed,p=s.headers,T.setAuthCodeNonce(p),p&&p[I.default.ocSessionId.toLowerCase()]&&(T.sessionId=p[I.default.ocSessionId.toLowerCase()]),T.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.MIDAUTHENTICATECHATSUCCEEDED,"Mid-Authenticate Chat Succeeded",t,s,h,c,E,void 0,void 0,d,u),n(),e.next=5;break;case 3:if(e.prev=3,y=e.catch(1),g=i.milliSecondsElapsed,C=o.milliSecondsElapsed,T.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.MIDAUTHENTICATECHATFAILED,"Mid-Authenticate Chat Failed",t,void 0,C,c,E,y,void 0,d,g),!(0,D.default)(y,v.default.axiosTimeoutErrorCode)){e.next=4;break}return r(new Error(T.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:r(y);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"getUnreadMessageCount",value:(t=(0,s.default)(a.default.mark(function e(t){var n,r,o,i,u,c,l,d,g=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=A.Timer.TIMER(),o=(0,x.uuidv4)(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETUNREADMESSAGECOUNTSTARTED,"Get Unread Message Count Started",o),i="/".concat(w.default.LiveChatConnectorAuthPath,"/").concat(this.omnichannelConfiguration.orgId,"/widgetapp/").concat(this.omnichannelConfiguration.widgetId,"/unreadmessages"),u=h.default.create(),(0,p.default)(u,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.getUnreadMessageCount}),(c=U({},v.default.defaultHeaders))[I.default.authenticatedUserToken]=t,c[I.default.authCodeNonce]=this.configuration.authCodeNonce,this.addDefaultHeaders(o,c),l="".concat(this.omnichannelConfiguration.orgUrl).concat(i),d={headers:c,method:"GET",url:l,timeout:null!==(n=this.configuration.defaultRequestTimeout)&&void 0!==n?n:this.configuration.requestTimeoutConfig.getUnreadMessageCount},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(t,n){var s,l,h,p,E,m,T,C,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=A.Timer.TIMER(),e.prev=1,e.next=2,u(d);case 2:l=e.sent,h=s.milliSecondsElapsed,p=l.data,E=l.headers,g.setAuthCodeNonce(E),m=r.milliSecondsElapsed,g.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.GETUNREADMESSAGECOUNTSUCCEEDED,"Get Unread Message Count Succeeded",o,l,m,i,"GET",void 0,void 0,c,h),t(p),e.next=5;break;case 3:if(e.prev=3,y=e.catch(1),T=s.milliSecondsElapsed,C=r.milliSecondsElapsed,g.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.GETUNREADMESSAGECOUNTFAILED,"Get Unread Message Count Failed",o,void 0,C,i,"GET",y,void 0,c,T),!(0,D.default)(y,v.default.axiosTimeoutErrorCode)){e.next=4;break}return n(new Error(g.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:n(y);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"sendReadReceipt",value:(e=(0,s.default)(a.default.mark(function e(t,n,r){var o,i,u,c,l,d,g,E,m=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=A.Timer.TIMER(),this.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SENDREADRECEIPTSTARTED,"Send Read Receipt Started",t),u="/".concat(w.default.LiveChatConnectorAuthPath,"/").concat(this.omnichannelConfiguration.orgId,"/widgetapp/").concat(this.omnichannelConfiguration.widgetId,"/conversations/").concat(t,"/readreceipt"),c=h.default.create(),(0,p.default)(c,{retries:this.configuration.maxRequestRetriesOnFailure,waitTimeInMsBetweenRetries:this.configuration.waitTimeBetweenRetriesConfig.sendReadReceipt}),(l=U({},v.default.defaultHeaders))[I.default.authenticatedUserToken]=r,l[I.default.authCodeNonce]=this.configuration.authCodeNonce,this.addDefaultHeaders(t,l),d="".concat(this.omnichannelConfiguration.orgUrl).concat(u),g="POST",E={data:JSON.stringify({messageId:n}),headers:l,method:g,url:d,timeout:null!==(o=this.configuration.defaultRequestTimeout)&&void 0!==o?o:this.configuration.requestTimeoutConfig.sendReadReceipt},e.abrupt("return",new Promise(function(){var e=(0,s.default)(a.default.mark(function e(n,r){var o,s,d,h,p,T,C,y;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=A.Timer.TIMER(),e.prev=1,e.next=2,c(E);case 2:s=e.sent,d=o.milliSecondsElapsed,h=s.headers,m.setAuthCodeNonce(h),p=i.milliSecondsElapsed,m.logWithLogger(S.LogLevel.INFO,f.OCSDKTelemetryEvent.SENDREADRECEIPTSUCCEEDED,"Send Read Receipt Succeeded",t,s,p,u,g,void 0,void 0,l,d),n(),e.next=5;break;case 3:if(e.prev=3,y=e.catch(1),T=o.milliSecondsElapsed,C=i.milliSecondsElapsed,m.logWithLogger(S.LogLevel.ERROR,f.OCSDKTelemetryEvent.SENDREADRECEIPTFAILED,"Send Read Receipt Failed",t,void 0,C,u,g,y,void 0,l,T),!(0,D.default)(y,v.default.axiosTimeoutErrorCode)){e.next=4;break}return r(new Error(m.HTTPTimeOutErrorMessage)),e.abrupt("return");case 4:r(y);case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}},e,this)})),function(t,n,r){return e.apply(this,arguments)})},{key:"logWithLogger",value:function(e,t,n,r,o,i,a,s,u,c,l,d){var f,h,p;if(this.logger){u&&y.LoggingSanitizer.stripErrorSensitiveProperties(u);var g=void 0;c&&((g=U({},c)).customContextData&&y.LoggingSanitizer.stripCustomContextDataValues(g.customContextData),g.preChatResponse&&y.LoggingSanitizer.stripPreChatResponse(g.preChatResponse),y.LoggingSanitizer.stripGeolocation(g));var E=void 0,m=void 0;if(l&&(E=U({},l),y.LoggingSanitizer.stripRequestHeadersSensitiveProperties(E),l[I.default.authenticatedUserToken]&&window.document&&window.atob))try{var T=l[I.default.authenticatedUserToken].split(".")[1],C=window.atob(T),S=JSON.parse(C),R=S.lwicontexts;if(m={sub:S.sub,exp:S.exp},R){var w=JSON.parse(R);y.LoggingSanitizer.stripCustomContextDataValues(w),m.lwiContexts=w}}catch(e){}var O={RequestId:r,Region:null==o?void 0:o.data.Region,ElapsedTimeInMilliseconds:i,HttpRequestResponseTime:d,TransactionId:null==o?void 0:o.headers[v.default.transactionid],RequestPath:a,RequestMethod:s,ResponseStatusCode:o?o.status:u?null===(f=u.response)||void 0===f?void 0:f.status:void 0,ExceptionDetails:u?(null===(h=u.response)||void 0===h?void 0:h.data)||u:void 0,RequestPayload:g,RequestHeaders:E,ResponseErrorcode:u?null===(p=u.response)||void 0===p||null===(p=p.headers)||void 0===p?void 0:p.errorcode:void 0,AuthTokenDetails:m};this.logger.log(e,t,O,n)}}},{key:"addDefaultHeaders",value:function(e,t){this.setSessionIdHeader(this.sessionId,t),(0,b.addOcUserAgentHeader)(this.ocUserAgent,t),this.setCorrelationIdInHeader(e,t)}}]);var e,t,n,r,o,i,k,P,M,F,G,H,j,B,q,W,V,K,z,Y,J,$}();i=M,(0,d.default)(M,"defaultRequestTimeoutConfig",{getChatConfig:12e4,getLWIDetails:15e3,getChatToken:15e3,sessionInit:15e3,sessionClose:15e3,getReconnectableChats:15e3,getReconnectAvailability:15e3,submitPostChatResponse:15e3,getSurveyInviteLink:15e3,getChatTranscripts:3e4,emailTranscript:5e3,fetchDataMaskingInfo:5e3,makeSecondaryChannelEventRequest:15e3,getAgentAvailability:15e3,sendTypingIndicator:5e3,validateAuthChatRecordTimeout:15e3,getPersistentChatHistory:15e3,midConversationAuthenticateChat:15e3,getUnreadMessageCount:15e3,sendReadReceipt:5e3}),(0,d.default)(M,"defaultConfiguration",{authCodeNonce:(0,x.uuidv4)().substring(0,8),getChatTokenRetryCount:10,getChatTokenTimeBetweenRetriesOnFailure:1e4,getChatTokenRetryOn429:!0,maxRequestRetriesOnFailure:5,defaultRequestTimeout:void 0,requestTimeoutConfig:i.defaultRequestTimeoutConfig,useUnauthReconnectIdSigQueryParam:!1,waitTimeBetweenRetriesConfig:k.waitTimeBetweenRetriesConfigs,ocUserAgent:[]})},8971(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,t.LogLevel=function(e){return e.INFO="INFO",e.DEBUG="DEBUG",e.WARN="WARN",e.ERROR="ERROR",e}({})},9021(e,t,n){var r;e.exports=(r=r||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n(477)}catch(e){}var r=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),i={},a=i.lib={},s=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var s=0;s<o;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(r());return new u.init(t,e)}}),c=i.enc={},l=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},d=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},f=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,o=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*c,i);if(c){for(var d=0;d<c;d+=a)this._doProcessBlock(o,d);n=o.splice(0,c),r.sigBytes-=l}return new u.init(n,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(a.Hasher=h.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}}),i.algo={});return i}(Math),r)},9045(e,t,n){var r=n(3738).default;e.exports=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9291(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9293(e){function t(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise(function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},9478(e,t,n){"use strict";var r=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(4579)),i=r(n(7383)),a=r(n(3693)),s=n(2949),u=t.default=(0,o.default)(function e(){(0,i.default)(this,e)});(0,a.default)(u,"requiredOmnichannelConfigurationParameters",["orgUrl","orgId","widgetId"]),(0,a.default)(u,"defaultHeaders",{"Content-Type":"application/json"}),(0,a.default)(u,"bypassCacheHeaders",{"Cache-Control":"no-store, must-revalidate, no-cache","X-Cache-Control":"no-store"}),(0,a.default)(u,"defaultChannelId",s.ChannelId.LCW),(0,a.default)(u,"defaultLocale","en-us"),(0,a.default)(u,"noContentStatusCode",204),(0,a.default)(u,"tooManyRequestsStatusCode",429),(0,a.default)(u,"notFoundStatusCode",404),(0,a.default)(u,"badRequestStatusCode",400),(0,a.default)(u,"outOfOfficeErrorCode",705),(0,a.default)(u,"sensitiveProperties",["AuthenticatedUserToken"]),(0,a.default)(u,"transactionid","transaction-id"),(0,a.default)(u,"customerDisplayName","customerDisplayName"),(0,a.default)(u,"hiddenContentPlaceholder","*content hidden*"),(0,a.default)(u,"axiosTimeoutErrorCode","ECONNABORTED")},9903(e,t,n){"use strict";var r=n(4994),o=n(3738);Object.defineProperty(t,"__esModule",{value:!0}),t.axiosRetryHandlerWithNotFound=function(e,t){c(e,{retries:t.retries,waitTimeInMsBetweenRetries:t.waitTimeInMsBetweenRetries,shouldRetry:function(e){var n;return u(e,t.retryOn429)||(null===(n=e.response)||void 0===n?void 0:n.status)===a.default.notFoundStatusCode}})},t.default=void 0,t.isRetryableError=l;var i=function(e){if("function"==typeof WeakMap){var t=new WeakMap;new WeakMap}return function(e){if(e&&e.__esModule)return e;var n,r,i={__proto__:null,default:e};if(null===e||"object"!=o(e)&&"function"!=typeof e)return i;if(n=t){if(n.has(e))return n.get(e);n.set(e,i)}for(var a in e)"default"!==a&&{}.hasOwnProperty.call(e,a)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,a))&&(r.get||r.set)?n(i,a,r):i[a]=e[a]);return i}(e)}(n(3770)),a=r(n(9478));function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=function(e,t){var n,r,o;return!((null===(n=e.response)||void 0===n?void 0:n.status)===a.default.tooManyRequestsStatusCode&&!t)&&(l(e)||(0,i.isNetworkError)(e)||0===(null===(r=e.response)||void 0===r?void 0:r.status)||!(null!==(o=e.response)&&void 0!==o&&o.status))},c=function(e,t){void 0!==t.retryOn429&&null!==t.retryOn429||(t.retryOn429=!1),t.shouldRetry||(t.shouldRetry=function(e){return u(e,t.retryOn429)}),(0,i.default)(e,{retries:t.retries,retryCondition:t.shouldRetry,onRetry:function(e,n,r){var o=n.response,i=t.headerOverwrites;if(i&&null!=o&&o.headers){var a,u=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(i);try{for(u.s();!(a=u.n()).done;){var c=a.value,l=null==o?void 0:o.headers[c.toLocaleLowerCase()];l&&r.headers&&(r.headers[c]=l)}}catch(e){u.e(e)}finally{u.f()}}},retryDelay:function(e,n){var r,o,i=t.waitTimeInMsBetweenRetries,s=null==n||null===(r=n.response)||void 0===r||null===(r=r.headers)||void 0===r?void 0:r["retry-after"],u=i;if(s){var c=parseInt(s);if(isNaN(c)){var l=new Date(s),d=(new Date).getTime();l&&l instanceof Date&&isFinite(l.getTime())&&(u=Math.max(0,l.getTime()-d))}else u=c*i;return u}return(null===(o=n.response)||void 0===o?void 0:o.status)===a.default.tooManyRequestsStatusCode?5e3:Math.pow(2,e)*i}})};function l(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}t.default=c},9956(e,t,n){e.exports=n(9021).enc.Hex}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var r={};(()=>{"use strict";var e=r,t=n(4994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"SDKProvider",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"uuidv4",{enumerable:!0,get:function(){return s.uuidv4}});var o=t(n(3920)),i=t(n(2487)),a=t(n(1728)),s=n(6676);!function(){if(void 0===n.g.window&&(n.g.window=n.g),!window)throw new Error("window object not found");"Microsoft"in window||(window.Microsoft={}),"CRM"in window.Microsoft||(window.Microsoft.CRM={}),"Omnichannel"in window.Microsoft.CRM||(window.Microsoft.CRM.Omnichannel={}),"SDK"in window.Microsoft.CRM.Omnichannel||(window.Microsoft.CRM.Omnichannel.SDK={SDKProvider:a.default,Util:{uuidv4:s.uuidv4}}),window.document&&o.default.raiseCustomEvent(i.default.OCSDKLOAD)}()})();var o=window;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|