@livechat/accounts-sdk 2.2.0 → 2.2.1

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.
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("util")):"function"==typeof define&&define.amd?define(["util"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).AccountsSDK=e(t.require$$0)}(this,(function(t){"use strict";var e={extend:function(t){return t.oauth_exception&&this.oauth_exception[t.oauth_exception]?Object.assign(t,{description:this.oauth_exception[t.oauth_exception]}):t.identity_exception&&this.identity_exception[t.identity_exception]?Object.assign(t,{description:this.identity_exception[t.identity_exception]}):t},oauth_exception:{invalid_request:"You may be loading accounts-sdk on a domain that is not whitelisted.",unauthorized_client:"Client not found, not provided or incorectly configured.",access_denied:"Probably this application is installed on a different account and you do not have access to it.",unsupported_response_type:"Provided response type is incorrect or unavailable for a given client."},identity_exception:{unauthorized:"Resource owner identity is not known or consent is missing."}};class r{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.listening=!1,this.receiveMessage=this.receiveMessage.bind(this)}start(t,e){this._listenerInited||(this.listening=!0,this.callback=e,t&&(this.tid=setTimeout((()=>{this.stop(),e("timeout",null)}),t)),window.addEventListener("message",this.receiveMessage))}stop(){this.listening=!1,clearTimeout(this.tid),window.removeEventListener("message",this.receiveMessage,!1)}receiveMessage(t){t.origin!==this.options.server_url&&t.origin!==this.options.server_url.replace(/livechat\.com$/,"livechatinc.com")||(t.data.data||t.data.error)&&(this.stop(),t.data.error?this.callback(e.extend(t.data.error),null):(t.data.data.scopes&&(t.data.data.scope=t.data.data.scopes,delete t.data.data.scopes),t.data.data.expires_in&&(t.data.data.expires_in=parseInt(t.data.data.expires_in)||0),this.callback(null,t.data.data)))}}class n{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const n=this.sdk.authorizeURL(this.options,"button"),o=window.screen.width/2-250,i=window.screen.height/2-325;new r(this.options).start(null,((r,n)=>{if(r)return e(r);t(n)}));const a=function(){window.open(n,"livechat-login-popup","resizable,scrollbars,width=".concat(500,",height=").concat(650,",left=").concat(o,",top=").concat(i))};if(document.requestStorageAccess){document.requestStorageAccess().then(a,a)}else a()}))}}var o,i,a,c,s,u,l,p,f,y,d,h,g,m,b,v,w,_,S,A,O,j,P,E,x,I,k,R,D,M,F,U,N,C,L,T,B,z,W,K,q,$,G,H,V,Q,J,Y,X,Z,tt,et,rt,nt,ot,it,at,ct,st,ut,lt,pt,ft,yt,dt,ht,gt,mt,bt,vt,wt,_t,St,At,Ot,jt,Pt,Et,xt,It,kt,Rt,Dt,Mt,Ft,Ut,Nt,Ct,Lt,Tt,Bt,zt,Wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Kt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function qt(){return i?o:(i=1,o=TypeError)}function $t(){return c?a:(c=1,a=t.inspect)}function Gt(){if(u)return s;u=1;var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=t&&e&&"function"==typeof e.get?e.get:null,n=t&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&"function"==typeof i.get?i.get:null,c=o&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,d=Object.prototype.toString,h=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,b=String.prototype.replace,v=String.prototype.toUpperCase,w=String.prototype.toLowerCase,_=RegExp.prototype.test,S=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,k="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,r,"$&_")}var F=$t(),U=F.custom,N=q(U)?U:null,C={__proto__:null,double:'"',single:"'"},L={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function T(t,e,r){var n=r.quoteStyle||e,o=C[n];return o+t+o}function B(t){return b.call(String(t),/"/g,"&quot;")}function z(t){return!k||!("object"==typeof t&&(k in t||void 0!==t[k]))}function W(t){return"[object Array]"===H(t)&&z(t)}function K(t){return"[object RegExp]"===H(t)&&z(t)}function q(t){if(I)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}s=function t(e,o,i,s){var u=o||{};if(G(u,"quoteStyle")&&!G(C,u.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var d=!G(u,"customInspect")||u.customInspect;if("boolean"!=typeof d&&"symbol"!==d)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=u.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return Q(e,u);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var _=String(e);return v?M(e,_):_}if("bigint"==typeof e){var j=String(e)+"n";return v?M(e,j):j}var E=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=E&&E>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var U=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(u,i);if(void 0===s)s=[];else if(V(s,e)>=0)return"[Circular]";function L(e,r,n){if(r&&(s=O.call(s)).push(r),n){var o={depth:u.depth};return G(u,"quoteStyle")&&(o.quoteStyle=u.quoteStyle),t(e,o,i+1,s)}return t(e,u,i+1,s)}if("function"==typeof e&&!K(e)){var $=function(t){if(t.name)return t.name;var e=g.call(h.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),J=et(e,L);return"[Function"+($?": "+$:" (anonymous)")+"]"+(J.length>0?" { "+A.call(J,", ")+" }":"")}if(q(e)){var rt=I?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(e);return"object"!=typeof e||I?rt:Y(rt)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var nt="<"+w.call(String(e.nodeName)),ot=e.attributes||[],it=0;it<ot.length;it++)nt+=" "+ot[it].name+"="+T(B(ot[it].value),"double",u);return nt+=">",e.childNodes&&e.childNodes.length&&(nt+="..."),nt+="</"+w.call(String(e.nodeName))+">"}if(W(e)){if(0===e.length)return"[]";var at=et(e,L);return U&&!function(t){for(var e=0;e<t.length;e++)if(V(t[e],"\n")>=0)return!1;return!0}(at)?"["+tt(at,U)+"]":"[ "+A.call(at,", ")+" ]"}if(function(t){return"[object Error]"===H(t)&&z(t)}(e)){var ct=et(e,L);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===ct.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ct,", ")+" }":"{ ["+String(e)+"] "+A.call(S.call("[cause]: "+L(e.cause),ct),", ")+" }"}if("object"==typeof e&&d){if(N&&"function"==typeof e[N]&&F)return F(e,{depth:E-i});if("symbol"!==d&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!r||!t||"object"!=typeof t)return!1;try{r.call(t);try{a.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var st=[];return n&&n.call(e,(function(t,r){st.push(L(r,e,!0)+" => "+L(t,e))})),Z("Map",r.call(e),st,U)}if(function(t){if(!a||!t||"object"!=typeof t)return!1;try{a.call(t);try{r.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ut=[];return c&&c.call(e,(function(t){ut.push(L(t,e))})),Z("Set",a.call(e),ut,U)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return"[object Number]"===H(t)&&z(t)}(e))return Y(L(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return Y(L(P.call(e)));if(function(t){return"[object Boolean]"===H(t)&&z(t)}(e))return Y(y.call(e));if(function(t){return"[object String]"===H(t)&&z(t)}(e))return Y(L(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==Wt&&e===Wt)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===H(t)&&z(t)}(e)&&!K(e)){var lt=et(e,L),pt=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",yt=!pt&&k&&Object(e)===e&&k in e?m.call(H(e),8,-1):ft?"Object":"",dt=(pt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(yt||ft?"["+A.call(S.call([],yt||[],ft||[]),": ")+"] ":"");return 0===lt.length?dt+"{}":U?dt+"{"+tt(lt,U)+"}":dt+"{ "+A.call(lt,", ")+" }"}return String(e)};var $=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return $.call(t,e)}function H(t){return d.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Q(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Q(m.call(t,0,e.maxStringLength),e)+n}var o=L[e.quoteStyle||"single"];return o.lastIndex=0,T(b.call(b.call(t,o,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function Y(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Z(t,e,r,n){return t+" ("+e+") {"+(n?tt(r,n):A.call(r,", "))+"}"}function tt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function et(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=G(t,o)?e(t[o],t):""}var i,a="function"==typeof E?E(t):[];if(I){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var s in t)G(t,s)&&(r&&String(Number(s))===s&&s<t.length||I&&i["$"+s]instanceof Symbol||(_.call(/[^\w$]/,s)?n.push(e(s,t)+": "+e(t[s],t)):n.push(s+": "+e(t[s],t))));if("function"==typeof E)for(var u=0;u<a.length;u++)R.call(t,a[u])&&n.push("["+e(a[u])+"]: "+e(t[a[u]],t));return n}return s}function Ht(){if(p)return l;p=1;var t=Gt(),e=qt(),r=function(t,e,r){for(var n,o=t;null!=(n=o.next);o=n)if(n.key===e)return o.next=n.next,r||(n.next=t.next,t.next=n),n};return l=function(){var n,o={assert:function(r){if(!o.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(t){var e=n&&n.next,o=function(t,e){if(t)return r(t,e,!0)}(n,t);return o&&e&&e===o&&(n=void 0),!!o},get:function(t){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(n,t)},has:function(t){return function(t,e){return!!t&&!!r(t,e)}(n,t)},set:function(t,e){n||(n={next:void 0}),function(t,e,n){var o=r(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}}(n,t,e)}};return o}}function Vt(){return y?f:(y=1,f=Object)}function Qt(){return h?d:(h=1,d=Error)}function Jt(){return m?g:(m=1,g=EvalError)}function Yt(){return v?b:(v=1,b=RangeError)}function Xt(){return _?w:(_=1,w=ReferenceError)}function Zt(){return A?S:(A=1,S=SyntaxError)}function te(){return j?O:(j=1,O=URIError)}function ee(){return E?P:(E=1,P=Math.abs)}function re(){return I?x:(I=1,x=Math.floor)}function ne(){return R?k:(R=1,k=Math.max)}function oe(){return M?D:(M=1,D=Math.min)}function ie(){return U?F:(U=1,F=Math.pow)}function ae(){return C?N:(C=1,N=Math.round)}function ce(){return T?L:(T=1,L=Number.isNaN||function(t){return t!=t})}function se(){if(z)return B;z=1;var t=ce();return B=function(e){return t(e)||0===e?e:e<0?-1:1}}function ue(){return K?W:(K=1,W=Object.getOwnPropertyDescriptor)}function le(){if($)return q;$=1;var t=ue();if(t)try{t([],"length")}catch(e){t=null}return q=t}function pe(){if(H)return G;H=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return G=t}function fe(){if(Y)return J;Y=1;var t="undefined"!=typeof Symbol&&Symbol,e=Q?V:(Q=1,V=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return J=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function ye(){return Z?X:(Z=1,X="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function de(){return et?tt:(et=1,tt=Vt().getPrototypeOf||null)}function he(){if(nt)return rt;nt=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};return rt=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(t,e){for(var r=[],n=e,o=0;n<t.length;n+=1,o+=1)r[o]=t[n];return r}(arguments,1),c=e(0,o.length-a.length),s=[],u=0;u<c;u++)s[u]="$"+u;if(i=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(s,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(n,r(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i},rt}function ge(){if(it)return ot;it=1;var t=he();return ot=Function.prototype.bind||t}function me(){return ct?at:(ct=1,at=Function.prototype.call)}function be(){return ut?st:(ut=1,st=Function.prototype.apply)}function ve(){if(yt)return ft;yt=1;var t=ge(),e=be(),r=me(),n=pt?lt:(pt=1,lt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return ft=n||t.call(r,e)}function we(){if(ht)return dt;ht=1;var t=ge(),e=qt(),r=me(),n=ve();return dt=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function _e(){if(mt)return gt;mt=1;var t,e=we(),r=le();try{t=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var n=!!t&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return gt=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))}}function Se(){if(vt)return bt;vt=1;var t=ye(),e=de(),r=_e();return bt=t?function(e){return t(e)}:e?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return e(t)}:r?function(t){return r(t)}:null}function Ae(){if(_t)return wt;_t=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=ge();return wt=r.call(t,e)}function Oe(){if(At)return St;var t;At=1;var e=Vt(),r=Qt(),n=Jt(),o=Yt(),i=Xt(),a=Zt(),c=qt(),s=te(),u=ee(),l=re(),p=ne(),f=oe(),y=ie(),d=ae(),h=se(),g=Function,m=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},b=le(),v=pe(),w=function(){throw new c},_=b?function(){try{return w}catch(t){try{return b(arguments,"callee").get}catch(t){return w}}}():w,S=fe()(),A=Se(),O=de(),j=ye(),P=be(),E=me(),x={},I="undefined"!=typeof Uint8Array&&A?A(Uint8Array):t,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":S&&A?A([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?t:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?t:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":x,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&A?A(A([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&A?A((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&A?A((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&A?A(""[Symbol.iterator]()):t,"%Symbol%":S?Symbol:t,"%SyntaxError%":a,"%ThrowTypeError%":_,"%TypedArray%":I,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":s,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":P,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":O,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":p,"%Math.min%":f,"%Math.pow%":y,"%Math.round%":d,"%Math.sign%":h,"%Reflect.getPrototypeOf%":j};if(A)try{null.error}catch(t){var R=A(A(t));k["%Error.prototype%"]=R}var D=function t(e){var r;if("%AsyncFunction%"===e)r=m("async function () {}");else if("%GeneratorFunction%"===e)r=m("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=m("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&A&&(r=A(o.prototype))}return k[e]=r,r},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=ge(),U=Ae(),N=F.call(E,Array.prototype.concat),C=F.call(P,Array.prototype.splice),L=F.call(E,String.prototype.replace),T=F.call(E,String.prototype.slice),B=F.call(E,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,K=function(t,e){var r,n=t;if(U(M,n)&&(n="%"+(r=M[n])[0]+"%"),U(k,n)){var o=k[n];if(o===x&&(o=D(n)),void 0===o&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+t+" does not exist!")};return St=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,t))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=T(t,0,1),r=T(t,-1);if("%"===e&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return L(t,z,(function(t,e,r,o){n[n.length]=r?L(o,W,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=K("%"+n+"%",e),i=o.name,s=o.value,u=!1,l=o.alias;l&&(n=l[0],C(r,N([0,1],l)));for(var p=1,f=!0;p<r.length;p+=1){var y=r[p],d=T(y,0,1),h=T(y,-1);if(('"'===d||"'"===d||"`"===d||'"'===h||"'"===h||"`"===h)&&d!==h)throw new a("property names with quotes must have matching quotes");if("constructor"!==y&&f||(u=!0),U(k,i="%"+(n+="."+y)+"%"))s=k[i];else if(null!=s){if(!(y in s)){if(!e)throw new c("base intrinsic for "+t+" exists, but the property is not available.");return}if(b&&p+1>=r.length){var g=b(s,y);s=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[y]}else f=U(s,y),s=s[y];f&&!u&&(k[i]=s)}}return s},St}function je(){if(jt)return Ot;jt=1;var t=Oe(),e=we(),r=e([t("%String.prototype.indexOf%")]);return Ot=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function Pe(){if(Et)return Pt;Et=1;var t=Oe(),e=je(),r=Gt(),n=qt(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),c=e("Map.prototype.has",!0),s=e("Map.prototype.delete",!0),u=e("Map.prototype.size",!0);return Pt=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+r(t))},delete:function(e){if(t){var r=s(t,e);return 0===u(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&c(t,e)},set:function(e,r){t||(t=new o),a(t,e,r)}};return e}}function Ee(){if(Rt)return kt;Rt=1;var t=qt(),e=Gt(),r=Ht(),n=Pe(),o=function(){if(It)return xt;It=1;var t=Oe(),e=je(),r=Gt(),n=Pe(),o=qt(),i=t("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),c=e("WeakMap.prototype.set",!0),s=e("WeakMap.prototype.has",!0),u=e("WeakMap.prototype.delete",!0);return xt=i?function(){var t,e,l={assert:function(t){if(!l.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(t)return u(t,r)}else if(n&&e)return e.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?a(t,r):e&&e.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?s(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),c(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return l}:n}(),i=o||n||r;return kt=function(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(t){return!!r&&r.delete(t)},get:function(t){return r&&r.get(t)},has:function(t){return!!r&&r.has(t)},set:function(t,e){r||(r=i()),r.set(t,e)}};return n}}function xe(){if(Mt)return Dt;Mt=1;var t=String.prototype.replace,e=/%20/g,r="RFC3986";return Dt={default:r,formatters:{RFC1738:function(r){return t.call(r,e,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:r}}function Ie(){if(Ut)return Ft;Ut=1;var t=xe(),e=Ee(),r=Object.prototype.hasOwnProperty,n=Array.isArray,o=e(),i=function(t,e){return o.set(t,e),t},a=function(t){return o.has(t)},c=function(t){return o.get(t)},s=function(t,e){o.set(t,e)},u=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),l=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},p=1024;return Ft={arrayToObject:l,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e,r,n){if(a(t)){var o=c(t)+1;return t[o]=e,s(t,o),t}var u=[].concat(t,e);return u.length>r?i(l(u,{plainObjects:n}),u.length-1):u},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],o=0;o<e.length;++o)for(var i=e[o],a=i.obj[i.prop],c=Object.keys(a),s=0;s<c.length;++s){var u=c[s],l=a[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(e.push({obj:a,prop:u}),r.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(n(r)){for(var o=[],i=0;i<r.length;++i)void 0!==r[i]&&o.push(r[i]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(e,r,n,o,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var c="",s=0;s<a.length;s+=p){for(var l=a.length>=p?a.slice(s,s+p):a,f=[],y=0;y<l.length;++y){var d=l.charCodeAt(y);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===t.RFC1738&&(40===d||41===d)?f[f.length]=l.charAt(y):d<128?f[f.length]=u[d]:d<2048?f[f.length]=u[192|d>>6]+u[128|63&d]:d<55296||d>=57344?f[f.length]=u[224|d>>12]+u[128|d>>6&63]+u[128|63&d]:(y+=1,d=65536+((1023&d)<<10|1023&l.charCodeAt(y)),f[f.length]=u[240|d>>18]+u[128|d>>12&63]+u[128|d>>6&63]+u[128|63&d])}c+=f.join("")}return c},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isOverflow:a,isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(n(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(e(t[o]));return r}return e(t)},merge:function t(e,o,u){if(!o)return e;if("object"!=typeof o&&"function"!=typeof o){if(n(e))e.push(o);else{if(!e||"object"!=typeof e)return[e,o];if(a(e)){var p=c(e)+1;e[p]=o,s(e,p)}else(u&&(u.plainObjects||u.allowPrototypes)||!r.call(Object.prototype,o))&&(e[o]=!0)}return e}if(!e||"object"!=typeof e){if(a(o)){for(var f=Object.keys(o),y=u&&u.plainObjects?{__proto__:null,0:e}:{0:e},d=0;d<f.length;d++){y[parseInt(f[d],10)+1]=o[f[d]]}return i(y,c(o)+1)}return[e].concat(o)}var h=e;return n(e)&&!n(o)&&(h=l(e,u)),n(e)&&n(o)?(o.forEach((function(n,o){if(r.call(e,o)){var i=e[o];i&&"object"==typeof i&&n&&"object"==typeof n?e[o]=t(i,n,u):e.push(n)}else e[o]=n})),e):Object.keys(o).reduce((function(e,n){var i=o[n];return r.call(e,n)?e[n]=t(e[n],i,u):e[n]=i,e}),h)}},Ft}function ke(){if(Ct)return Nt;Ct=1;var t=Ee(),e=Ie(),r=xe(),n=Object.prototype.hasOwnProperty,o={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},i=Array.isArray,a=Array.prototype.push,c=function(t,e){a.apply(t,i(e)?e:[e])},s=Date.prototype.toISOString,u=r.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:u,formatter:r.formatters[u],indices:!1,serializeDate:function(t){return s.call(t)},skipNulls:!1,strictNullHandling:!1},p={},f=function r(n,o,a,s,u,f,y,d,h,g,m,b,v,w,_,S,A,O){for(var j,P=n,E=O,x=0,I=!1;void 0!==(E=E.get(p))&&!I;){var k=E.get(n);if(x+=1,void 0!==k){if(k===x)throw new RangeError("Cyclic object value");I=!0}void 0===E.get(p)&&(x=0)}if("function"==typeof g?P=g(o,P):P instanceof Date?P=v(P):"comma"===a&&i(P)&&(P=e.maybeMap(P,(function(t){return t instanceof Date?v(t):t}))),null===P){if(f)return h&&!S?h(o,l.encoder,A,"key",w):o;P=""}if("string"==typeof(j=P)||"number"==typeof j||"boolean"==typeof j||"symbol"==typeof j||"bigint"==typeof j||e.isBuffer(P))return h?[_(S?o:h(o,l.encoder,A,"key",w))+"="+_(h(P,l.encoder,A,"value",w))]:[_(o)+"="+_(String(P))];var R,D=[];if(void 0===P)return D;if("comma"===a&&i(P))S&&h&&(P=e.maybeMap(P,h)),R=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(g))R=g;else{var M=Object.keys(P);R=m?M.sort(m):M}var F=d?String(o).replace(/\./g,"%2E"):String(o),U=s&&i(P)&&1===P.length?F+"[]":F;if(u&&i(P)&&0===P.length)return U+"[]";for(var N=0;N<R.length;++N){var C=R[N],L="object"==typeof C&&C&&void 0!==C.value?C.value:P[C];if(!y||null!==L){var T=b&&d?String(C).replace(/\./g,"%2E"):String(C),B=i(P)?"function"==typeof a?a(U,T):U:U+(b?"."+T:"["+T+"]");O.set(n,x);var z=t();z.set(p,O),c(D,r(L,B,a,s,u,f,y,d,"comma"===a&&S&&i(P)?null:h,g,m,b,v,w,_,S,A,z))}}return D};return Nt=function(e,a){var s,u=e,p=function(t){if(!t)return l;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||l.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=r.default;if(void 0!==t.format){if(!n.call(r.formatters,t.format))throw new TypeError("Unknown format option provided.");a=t.format}var c,s=r.formatters[a],u=l.filter;if(("function"==typeof t.filter||i(t.filter))&&(u=t.filter),c=t.arrayFormat in o?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":l.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=void 0===t.allowDots?!0===t.encodeDotInKeys||l.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:l.addQueryPrefix,allowDots:p,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:l.allowEmptyArrays,arrayFormat:c,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:l.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?l.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:l.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:l.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:l.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:l.encodeValuesOnly,filter:u,format:a,formatter:s,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:l.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:l.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:l.strictNullHandling}}(a);"function"==typeof p.filter?u=(0,p.filter)("",u):i(p.filter)&&(s=p.filter);var y=[];if("object"!=typeof u||null===u)return"";var d=o[p.arrayFormat],h="comma"===d&&p.commaRoundTrip;s||(s=Object.keys(u)),p.sort&&s.sort(p.sort);for(var g=t(),m=0;m<s.length;++m){var b=s[m],v=u[b];p.skipNulls&&null===v||c(y,f(v,b,d,h,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,g))}var w=y.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),w.length>0?_+w:""},Nt}function Re(){if(Tt)return Lt;Tt=1;var t=Ie(),e=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:t.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},i=function(t,e,r){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},a=function(r,n,o,a){if(r){var c=function(t,r){var n=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(r.depth<=0){if(!r.plainObjects&&e.call(Object.prototype,n)&&!r.allowPrototypes)return;return[n]}var o=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(n),a=i?n.slice(0,i.index):n,c=[];if(a){if(!r.plainObjects&&e.call(Object.prototype,a)&&!r.allowPrototypes)return;c.push(a)}for(var s=0;null!==(i=o.exec(n))&&s<r.depth;){s+=1;var u=i[1].slice(1,-1);if(!r.plainObjects&&e.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(i[1])}if(i){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c.push("["+n.slice(i.index)+"]")}return c}(r,o);if(c)return function(e,r,n,o){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var c=e.slice(0,-1).join("");a=Array.isArray(r)&&r[c]?r[c].length:0}for(var s=o?r:i(r,n,a),u=e.length-1;u>=0;--u){var l,p=e[u];if("[]"===p&&n.parseArrays)l=t.isOverflow(s)?s:n.allowEmptyArrays&&(""===s||n.strictNullHandling&&null===s)?[]:t.combine([],s,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var f="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,y=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,d=parseInt(y,10);n.parseArrays||""!==y?!isNaN(d)&&p!==y&&String(d)===y&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(l=[])[d]=s:"__proto__"!==y&&(l[y]=s):l={0:s}}s=l}return s}(c,n,o,a)}};return Lt=function(c,s){var u=function(e){if(!e)return n;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===e.charset?n.charset:e.charset,o=void 0===e.duplicates?n.duplicates:e.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||n.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:n.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:n.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:n.decoder,delimiter:"string"==typeof e.delimiter||t.isRegExp(e.delimiter)?e.delimiter:n.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:n.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:n.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(s);if(""===c||null==c)return u.plainObjects?{__proto__:null}:{};for(var l="string"==typeof c?function(a,c){var s={__proto__:null},u=c.ignoreQueryPrefix?a.replace(/^\?/,""):a;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=c.parameterLimit===1/0?void 0:c.parameterLimit,p=u.split(c.delimiter,c.throwOnLimitExceeded?l+1:l);if(c.throwOnLimitExceeded&&p.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var f,y=-1,d=c.charset;if(c.charsetSentinel)for(f=0;f<p.length;++f)0===p[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[f]?d="utf-8":"utf8=%26%2310003%3B"===p[f]&&(d="iso-8859-1"),y=f,f=p.length);for(f=0;f<p.length;++f)if(f!==y){var h,g,m=p[f],b=m.indexOf("]="),v=-1===b?m.indexOf("="):b+1;if(-1===v?(h=c.decoder(m,n.decoder,d,"key"),g=c.strictNullHandling?null:""):null!==(h=c.decoder(m.slice(0,v),n.decoder,d,"key"))&&(g=t.maybeMap(i(m.slice(v+1),c,r(s[h])?s[h].length:0),(function(t){return c.decoder(t,n.decoder,d,"value")}))),g&&c.interpretNumericEntities&&"iso-8859-1"===d&&(g=o(String(g))),m.indexOf("[]=")>-1&&(g=r(g)?[g]:g),null!==h){var w=e.call(s,h);w&&"combine"===c.duplicates?s[h]=t.combine(s[h],g,c.arrayLimit,c.plainObjects):w&&"last"!==c.duplicates||(s[h]=g)}}return s}(c,u):c,p=u.plainObjects?{__proto__:null}:{},f=Object.keys(l),y=0;y<f.length;++y){var d=f[y],h=a(d,l[d],u,"string"==typeof c);p=t.merge(p,h,u)}return!0===u.allowSparse?p:t.compact(p)}}function De(){if(zt)return Bt;zt=1;var t=ke(),e=Re();return Bt={formats:xe(),parse:e,stringify:t}}var Me=Kt(De());
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("util")):"function"==typeof define&&define.amd?define(["util"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).AccountsSDK=e(t.require$$0)}(this,(function(t){"use strict";var e={extend:function(t){return t.oauth_exception&&this.oauth_exception[t.oauth_exception]?Object.assign(t,{description:this.oauth_exception[t.oauth_exception]}):t.identity_exception&&this.identity_exception[t.identity_exception]?Object.assign(t,{description:this.identity_exception[t.identity_exception]}):t},oauth_exception:{invalid_request:"You may be loading accounts-sdk on a domain that is not whitelisted.",unauthorized_client:"Client not found, not provided or incorectly configured.",access_denied:"Probably this application is installed on a different account and you do not have access to it.",unsupported_response_type:"Provided response type is incorrect or unavailable for a given client."},identity_exception:{unauthorized:"Resource owner identity is not known or consent is missing."}};class r{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=t,this.listening=!1,this.receiveMessage=this.receiveMessage.bind(this)}start(t,e){this._listenerInited||(this.listening=!0,this.callback=e,t&&(this.tid=setTimeout((()=>{this.stop(),e("timeout",null)}),t)),window.addEventListener("message",this.receiveMessage))}stop(){this.listening=!1,clearTimeout(this.tid),window.removeEventListener("message",this.receiveMessage,!1)}receiveMessage(t){t.origin!==this.options.server_url&&t.origin!==this.options.server_url.replace(/livechat\.com$/,"livechatinc.com")||(t.data.data||t.data.error)&&(this.stop(),t.data.error?this.callback(e.extend(t.data.error),null):(t.data.data.scopes&&(t.data.data.scope=t.data.data.scopes,delete t.data.data.scopes),t.data.data.expires_in&&(t.data.data.expires_in=parseInt(t.data.data.expires_in)||0),this.callback(null,t.data.data)))}}class n{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const n=this.sdk.authorizeURL(this.options,"button"),o=window.screen.width/2-250,i=window.screen.height/2-325;new r(this.options).start(null,((r,n)=>{if(r)return e(r);t(n)}));const a=function(){window.open(n,"livechat-login-popup","resizable,scrollbars,width=".concat(500,",height=").concat(650,",left=").concat(o,",top=").concat(i))};if(document.requestStorageAccess){document.requestStorageAccess().then(a,a)}else a()}))}}var o,i,a,c,l,s,u,p,f,y,d,h,g,m,b,v,w,_,S,O,A,j,P,E,x,I,k,R,D,M,L,F,U,N,C,T,B,z,W,K,q,$,G,H,V,Q,J,Y,X,Z,tt,et,rt,nt,ot,it,at,ct,lt,st,ut,pt,ft,yt,dt,ht,gt,mt,bt,vt,wt,_t,St,Ot,At,jt,Pt,Et,xt,It,kt,Rt,Dt,Mt,Lt,Ft,Ut,Nt,Ct,Tt,Bt,zt,Wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Kt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function qt(){return i?o:(i=1,o=TypeError)}function $t(){return c?a:(c=1,a=t.inspect)}function Gt(){if(s)return l;s=1;var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=t&&e&&"function"==typeof e.get?e.get:null,n=t&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&"function"==typeof i.get?i.get:null,c=o&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,d=Object.prototype.toString,h=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,b=String.prototype.replace,v=String.prototype.toUpperCase,w=String.prototype.toLowerCase,_=RegExp.prototype.test,S=Array.prototype.concat,O=Array.prototype.join,A=Array.prototype.slice,j=Math.floor,P="function"==typeof BigInt?BigInt.prototype.valueOf:null,E=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,k="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===I||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function M(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||_.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,r,"$&_")}var L=$t(),F=L.custom,U=q(F)?F:null,N={__proto__:null,double:'"',single:"'"},C={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function T(t,e,r){var n=r.quoteStyle||e,o=N[n];return o+t+o}function B(t){return b.call(String(t),/"/g,"&quot;")}function z(t){return!k||!("object"==typeof t&&(k in t||void 0!==t[k]))}function W(t){return"[object Array]"===H(t)&&z(t)}function K(t){return"[object RegExp]"===H(t)&&z(t)}function q(t){if(I)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}l=function t(e,o,i,l){var s=o||{};if(G(s,"quoteStyle")&&!G(N,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var d=!G(s,"customInspect")||s.customInspect;if("boolean"!=typeof d&&"symbol"!==d)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=s.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return Q(e,s);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var _=String(e);return v?M(e,_):_}if("bigint"==typeof e){var j=String(e)+"n";return v?M(e,j):j}var E=void 0===s.depth?5:s.depth;if(void 0===i&&(i=0),i>=E&&E>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var F=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=O.call(Array(t.indent+1)," ")}return{base:r,prev:O.call(Array(e+1),r)}}(s,i);if(void 0===l)l=[];else if(V(l,e)>=0)return"[Circular]";function C(e,r,n){if(r&&(l=A.call(l)).push(r),n){var o={depth:s.depth};return G(s,"quoteStyle")&&(o.quoteStyle=s.quoteStyle),t(e,o,i+1,l)}return t(e,s,i+1,l)}if("function"==typeof e&&!K(e)){var $=function(t){if(t.name)return t.name;var e=g.call(h.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),J=et(e,C);return"[Function"+($?": "+$:" (anonymous)")+"]"+(J.length>0?" { "+O.call(J,", ")+" }":"")}if(q(e)){var rt=I?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(e);return"object"!=typeof e||I?rt:Y(rt)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var nt="<"+w.call(String(e.nodeName)),ot=e.attributes||[],it=0;it<ot.length;it++)nt+=" "+ot[it].name+"="+T(B(ot[it].value),"double",s);return nt+=">",e.childNodes&&e.childNodes.length&&(nt+="..."),nt+="</"+w.call(String(e.nodeName))+">"}if(W(e)){if(0===e.length)return"[]";var at=et(e,C);return F&&!function(t){for(var e=0;e<t.length;e++)if(V(t[e],"\n")>=0)return!1;return!0}(at)?"["+tt(at,F)+"]":"[ "+O.call(at,", ")+" ]"}if(function(t){return"[object Error]"===H(t)&&z(t)}(e)){var ct=et(e,C);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===ct.length?"["+String(e)+"]":"{ ["+String(e)+"] "+O.call(ct,", ")+" }":"{ ["+String(e)+"] "+O.call(S.call("[cause]: "+C(e.cause),ct),", ")+" }"}if("object"==typeof e&&d){if(U&&"function"==typeof e[U]&&L)return L(e,{depth:E-i});if("symbol"!==d&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!r||!t||"object"!=typeof t)return!1;try{r.call(t);try{a.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var lt=[];return n&&n.call(e,(function(t,r){lt.push(C(r,e,!0)+" => "+C(t,e))})),Z("Map",r.call(e),lt,F)}if(function(t){if(!a||!t||"object"!=typeof t)return!1;try{a.call(t);try{r.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return c&&c.call(e,(function(t){st.push(C(t,e))})),Z("Set",a.call(e),st,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t,u);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return X("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{u.call(t,u)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return X("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return X("WeakRef");if(function(t){return"[object Number]"===H(t)&&z(t)}(e))return Y(C(Number(e)));if(function(t){if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}(e))return Y(C(P.call(e)));if(function(t){return"[object Boolean]"===H(t)&&z(t)}(e))return Y(y.call(e));if(function(t){return"[object String]"===H(t)&&z(t)}(e))return Y(C(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==Wt&&e===Wt)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===H(t)&&z(t)}(e)&&!K(e)){var ut=et(e,C),pt=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,ft=e instanceof Object?"":"null prototype",yt=!pt&&k&&Object(e)===e&&k in e?m.call(H(e),8,-1):ft?"Object":"",dt=(pt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(yt||ft?"["+O.call(S.call([],yt||[],ft||[]),": ")+"] ":"");return 0===ut.length?dt+"{}":F?dt+"{"+tt(ut,F)+"}":dt+"{ "+O.call(ut,", ")+" }"}return String(e)};var $=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return $.call(t,e)}function H(t){return d.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Q(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Q(m.call(t,0,e.maxStringLength),e)+n}var o=C[e.quoteStyle||"single"];return o.lastIndex=0,T(b.call(b.call(t,o,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function Y(t){return"Object("+t+")"}function X(t){return t+" { ? }"}function Z(t,e,r,n){return t+" ("+e+") {"+(n?tt(r,n):O.call(r,", "))+"}"}function tt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+O.call(t,","+r)+"\n"+e.prev}function et(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=G(t,o)?e(t[o],t):""}var i,a="function"==typeof E?E(t):[];if(I){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var l in t)G(t,l)&&(r&&String(Number(l))===l&&l<t.length||I&&i["$"+l]instanceof Symbol||(_.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if("function"==typeof E)for(var s=0;s<a.length;s++)R.call(t,a[s])&&n.push("["+e(a[s])+"]: "+e(t[a[s]],t));return n}return l}function Ht(){if(p)return u;p=1;var t=Gt(),e=qt(),r=function(t,e,r){for(var n,o=t;null!=(n=o.next);o=n)if(n.key===e)return o.next=n.next,r||(n.next=t.next,t.next=n),n};return u=function(){var n,o={assert:function(r){if(!o.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(t){var e=n&&n.next,o=function(t,e){if(t)return r(t,e,!0)}(n,t);return o&&e&&e===o&&(n=void 0),!!o},get:function(t){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(n,t)},has:function(t){return function(t,e){return!!t&&!!r(t,e)}(n,t)},set:function(t,e){n||(n={next:void 0}),function(t,e,n){var o=r(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}}(n,t,e)}};return o}}function Vt(){return y?f:(y=1,f=Object)}function Qt(){return h?d:(h=1,d=Error)}function Jt(){return m?g:(m=1,g=EvalError)}function Yt(){return v?b:(v=1,b=RangeError)}function Xt(){return _?w:(_=1,w=ReferenceError)}function Zt(){return O?S:(O=1,S=SyntaxError)}function te(){return j?A:(j=1,A=URIError)}function ee(){return E?P:(E=1,P=Math.abs)}function re(){return I?x:(I=1,x=Math.floor)}function ne(){return R?k:(R=1,k=Math.max)}function oe(){return M?D:(M=1,D=Math.min)}function ie(){return F?L:(F=1,L=Math.pow)}function ae(){return N?U:(N=1,U=Math.round)}function ce(){return T?C:(T=1,C=Number.isNaN||function(t){return t!=t})}function le(){if(z)return B;z=1;var t=ce();return B=function(e){return t(e)||0===e?e:e<0?-1:1}}function se(){return K?W:(K=1,W=Object.getOwnPropertyDescriptor)}function ue(){if($)return q;$=1;var t=se();if(t)try{t([],"length")}catch(e){t=null}return q=t}function pe(){if(H)return G;H=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return G=t}function fe(){if(Y)return J;Y=1;var t="undefined"!=typeof Symbol&&Symbol,e=Q?V:(Q=1,V=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return J=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function ye(){return Z?X:(Z=1,X="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function de(){return et?tt:(et=1,tt=Vt().getPrototypeOf||null)}function he(){if(nt)return rt;nt=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};return rt=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(t,e){for(var r=[],n=e,o=0;n<t.length;n+=1,o+=1)r[o]=t[n];return r}(arguments,1),c=e(0,o.length-a.length),l=[],s=0;s<c;s++)l[s]="$"+s;if(i=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(l,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,r(a,arguments));return Object(t)===t?t:this}return o.apply(n,r(a,arguments))})),o.prototype){var u=function(){};u.prototype=o.prototype,i.prototype=new u,u.prototype=null}return i},rt}function ge(){if(it)return ot;it=1;var t=he();return ot=Function.prototype.bind||t}function me(){return ct?at:(ct=1,at=Function.prototype.call)}function be(){return st?lt:(st=1,lt=Function.prototype.apply)}function ve(){if(yt)return ft;yt=1;var t=ge(),e=be(),r=me(),n=pt?ut:(pt=1,ut="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return ft=n||t.call(r,e)}function we(){if(ht)return dt;ht=1;var t=ge(),e=qt(),r=me(),n=ve();return dt=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function _e(){if(mt)return gt;mt=1;var t,e=we(),r=ue();try{t=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var n=!!t&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return gt=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))}}function Se(){if(vt)return bt;vt=1;var t=ye(),e=de(),r=_e();return bt=t?function(e){return t(e)}:e?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return e(t)}:r?function(t){return r(t)}:null}function Oe(){if(_t)return wt;_t=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=ge();return wt=r.call(t,e)}function Ae(){if(Ot)return St;var t;Ot=1;var e=Vt(),r=Qt(),n=Jt(),o=Yt(),i=Xt(),a=Zt(),c=qt(),l=te(),s=ee(),u=re(),p=ne(),f=oe(),y=ie(),d=ae(),h=le(),g=Function,m=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},b=ue(),v=pe(),w=function(){throw new c},_=b?function(){try{return w}catch(t){try{return b(arguments,"callee").get}catch(t){return w}}}():w,S=fe()(),O=Se(),A=de(),j=ye(),P=be(),E=me(),x={},I="undefined"!=typeof Uint8Array&&O?O(Uint8Array):t,k={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":S&&O?O([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?t:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?t:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":x,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&O?O(O([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&O?O((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&O?O((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&O?O(""[Symbol.iterator]()):t,"%Symbol%":S?Symbol:t,"%SyntaxError%":a,"%ThrowTypeError%":_,"%TypedArray%":I,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":P,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":A,"%Math.abs%":s,"%Math.floor%":u,"%Math.max%":p,"%Math.min%":f,"%Math.pow%":y,"%Math.round%":d,"%Math.sign%":h,"%Reflect.getPrototypeOf%":j};if(O)try{null.error}catch(t){var R=O(O(t));k["%Error.prototype%"]=R}var D=function t(e){var r;if("%AsyncFunction%"===e)r=m("async function () {}");else if("%GeneratorFunction%"===e)r=m("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=m("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&O&&(r=O(o.prototype))}return k[e]=r,r},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},L=ge(),F=Oe(),U=L.call(E,Array.prototype.concat),N=L.call(P,Array.prototype.splice),C=L.call(E,String.prototype.replace),T=L.call(E,String.prototype.slice),B=L.call(E,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,K=function(t,e){var r,n=t;if(F(M,n)&&(n="%"+(r=M[n])[0]+"%"),F(k,n)){var o=k[n];if(o===x&&(o=D(n)),void 0===o&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new a("intrinsic "+t+" does not exist!")};return St=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,t))throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=T(t,0,1),r=T(t,-1);if("%"===e&&"%"!==r)throw new a("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new a("invalid intrinsic syntax, expected opening `%`");var n=[];return C(t,z,(function(t,e,r,o){n[n.length]=r?C(o,W,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=K("%"+n+"%",e),i=o.name,l=o.value,s=!1,u=o.alias;u&&(n=u[0],N(r,U([0,1],u)));for(var p=1,f=!0;p<r.length;p+=1){var y=r[p],d=T(y,0,1),h=T(y,-1);if(('"'===d||"'"===d||"`"===d||'"'===h||"'"===h||"`"===h)&&d!==h)throw new a("property names with quotes must have matching quotes");if("constructor"!==y&&f||(s=!0),F(k,i="%"+(n+="."+y)+"%"))l=k[i];else if(null!=l){if(!(y in l)){if(!e)throw new c("base intrinsic for "+t+" exists, but the property is not available.");return}if(b&&p+1>=r.length){var g=b(l,y);l=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:l[y]}else f=F(l,y),l=l[y];f&&!s&&(k[i]=l)}}return l},St}function je(){if(jt)return At;jt=1;var t=Ae(),e=we(),r=e([t("%String.prototype.indexOf%")]);return At=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function Pe(){if(Et)return Pt;Et=1;var t=Ae(),e=je(),r=Gt(),n=qt(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),c=e("Map.prototype.has",!0),l=e("Map.prototype.delete",!0),s=e("Map.prototype.size",!0);return Pt=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+r(t))},delete:function(e){if(t){var r=l(t,e);return 0===s(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&c(t,e)},set:function(e,r){t||(t=new o),a(t,e,r)}};return e}}function Ee(){if(Rt)return kt;Rt=1;var t=qt(),e=Gt(),r=Ht(),n=Pe(),o=function(){if(It)return xt;It=1;var t=Ae(),e=je(),r=Gt(),n=Pe(),o=qt(),i=t("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),c=e("WeakMap.prototype.set",!0),l=e("WeakMap.prototype.has",!0),s=e("WeakMap.prototype.delete",!0);return xt=i?function(){var t,e,u={assert:function(t){if(!u.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(t)return s(t,r)}else if(n&&e)return e.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?a(t,r):e&&e.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?l(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),c(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return u}:n}(),i=o||n||r;return kt=function(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(t){return!!r&&r.delete(t)},get:function(t){return r&&r.get(t)},has:function(t){return!!r&&r.has(t)},set:function(t,e){r||(r=i()),r.set(t,e)}};return n}}function xe(){if(Mt)return Dt;Mt=1;var t=String.prototype.replace,e=/%20/g,r="RFC3986";return Dt={default:r,formatters:{RFC1738:function(r){return t.call(r,e,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:r}}function Ie(){if(Ft)return Lt;Ft=1;var t=xe(),e=Ee(),r=Object.prototype.hasOwnProperty,n=Array.isArray,o=e(),i=function(t,e){return o.set(t,e),t},a=function(t){return o.has(t)},c=function(t){return o.get(t)},l=function(t,e){o.set(t,e)},s=function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t}(),u=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},p=1024;return Lt={arrayToObject:u,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e,r,n){if(a(t)){var o=c(t)+1;return t[o]=e,l(t,o),t}var s=[].concat(t,e);return s.length>r?i(u(s,{plainObjects:n}),s.length-1):s},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],o=0;o<e.length;++o)for(var i=e[o],a=i.obj[i.prop],c=Object.keys(a),l=0;l<c.length;++l){var s=c[l],u=a[s];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(e[e.length]={obj:a,prop:s},r[r.length]=u)}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(n(r)){for(var o=[],i=0;i<r.length;++i)void 0!==r[i]&&(o[o.length]=r[i]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(e,r,n,o,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var c="",l=0;l<a.length;l+=p){for(var u=a.length>=p?a.slice(l,l+p):a,f=[],y=0;y<u.length;++y){var d=u.charCodeAt(y);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||i===t.RFC1738&&(40===d||41===d)?f[f.length]=u.charAt(y):d<128?f[f.length]=s[d]:d<2048?f[f.length]=s[192|d>>6]+s[128|63&d]:d<55296||d>=57344?f[f.length]=s[224|d>>12]+s[128|d>>6&63]+s[128|63&d]:(y+=1,d=65536+((1023&d)<<10|1023&u.charCodeAt(y)),f[f.length]=s[240|d>>18]+s[128|d>>12&63]+s[128|d>>6&63]+s[128|63&d])}c+=f.join("")}return c},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isOverflow:a,isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},markOverflow:i,maybeMap:function(t,e){if(n(t)){for(var r=[],o=0;o<t.length;o+=1)r[r.length]=e(t[o]);return r}return e(t)},merge:function t(e,o,s){if(!o)return e;if("object"!=typeof o&&"function"!=typeof o){if(n(e)){var p=e.length;if(s&&"number"==typeof s.arrayLimit&&p>s.arrayLimit)return i(u(e.concat(o),s),p);e[p]=o}else{if(!e||"object"!=typeof e)return[e,o];if(a(e)){var f=c(e)+1;e[f]=o,l(e,f)}else{if(s&&s.strictMerge)return[e,o];(s&&(s.plainObjects||s.allowPrototypes)||!r.call(Object.prototype,o))&&(e[o]=!0)}}return e}if(!e||"object"!=typeof e){if(a(o)){for(var y=Object.keys(o),d=s&&s.plainObjects?{__proto__:null,0:e}:{0:e},h=0;h<y.length;h++){d[parseInt(y[h],10)+1]=o[y[h]]}return i(d,c(o)+1)}var g=[e].concat(o);return s&&"number"==typeof s.arrayLimit&&g.length>s.arrayLimit?i(u(g,s),g.length-1):g}var m=e;return n(e)&&!n(o)&&(m=u(e,s)),n(e)&&n(o)?(o.forEach((function(n,o){if(r.call(e,o)){var i=e[o];i&&"object"==typeof i&&n&&"object"==typeof n?e[o]=t(i,n,s):e[e.length]=n}else e[o]=n})),e):Object.keys(o).reduce((function(e,n){var u=o[n];if(r.call(e,n)?e[n]=t(e[n],u,s):e[n]=u,a(o)&&!a(e)&&i(e,c(o)),a(e)){var p=parseInt(n,10);String(p)===n&&p>=0&&p>c(e)&&l(e,p)}return e}),m)}},Lt}function ke(){if(Nt)return Ut;Nt=1;var t=Ee(),e=Ie(),r=xe(),n=Object.prototype.hasOwnProperty,o={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},i=Array.isArray,a=Array.prototype.push,c=function(t,e){a.apply(t,i(e)?e:[e])},l=Date.prototype.toISOString,s=r.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:s,formatter:r.formatters[s],indices:!1,serializeDate:function(t){return l.call(t)},skipNulls:!1,strictNullHandling:!1},p={},f=function r(n,o,a,l,s,f,y,d,h,g,m,b,v,w,_,S,O,A){for(var j,P=n,E=A,x=0,I=!1;void 0!==(E=E.get(p))&&!I;){var k=E.get(n);if(x+=1,void 0!==k){if(k===x)throw new RangeError("Cyclic object value");I=!0}void 0===E.get(p)&&(x=0)}if("function"==typeof g?P=g(o,P):P instanceof Date?P=v(P):"comma"===a&&i(P)&&(P=e.maybeMap(P,(function(t){return t instanceof Date?v(t):t}))),null===P){if(f)return h&&!S?h(o,u.encoder,O,"key",w):o;P=""}if("string"==typeof(j=P)||"number"==typeof j||"boolean"==typeof j||"symbol"==typeof j||"bigint"==typeof j||e.isBuffer(P))return h?[_(S?o:h(o,u.encoder,O,"key",w))+"="+_(h(P,u.encoder,O,"value",w))]:[_(o)+"="+_(String(P))];var R,D=[];if(void 0===P)return D;if("comma"===a&&i(P))S&&h&&(P=e.maybeMap(P,h)),R=[{value:P.length>0?P.join(",")||null:void 0}];else if(i(g))R=g;else{var M=Object.keys(P);R=m?M.sort(m):M}var L=d?String(o).replace(/\./g,"%2E"):String(o),F=l&&i(P)&&1===P.length?L+"[]":L;if(s&&i(P)&&0===P.length)return F+"[]";for(var U=0;U<R.length;++U){var N=R[U],C="object"==typeof N&&N&&void 0!==N.value?N.value:P[N];if(!y||null!==C){var T=b&&d?String(N).replace(/\./g,"%2E"):String(N),B=i(P)?"function"==typeof a?a(F,T):F:F+(b?"."+T:"["+T+"]");A.set(n,x);var z=t();z.set(p,A),c(D,r(C,B,a,l,s,f,y,d,"comma"===a&&S&&i(P)?null:h,g,m,b,v,w,_,S,O,z))}}return D};return Ut=function(e,a){var l,s=e,p=function(t){if(!t)return u;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||u.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=r.default;if(void 0!==t.format){if(!n.call(r.formatters,t.format))throw new TypeError("Unknown format option provided.");a=t.format}var c,l=r.formatters[a],s=u.filter;if(("function"==typeof t.filter||i(t.filter))&&(s=t.filter),c=t.arrayFormat in o?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":u.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p=void 0===t.allowDots?!0===t.encodeDotInKeys||u.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:u.addQueryPrefix,allowDots:p,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:c,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?u.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:u.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:u.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:u.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:u.encodeValuesOnly,filter:s,format:a,formatter:l,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:u.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:u.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:u.strictNullHandling}}(a);"function"==typeof p.filter?s=(0,p.filter)("",s):i(p.filter)&&(l=p.filter);var y=[];if("object"!=typeof s||null===s)return"";var d=o[p.arrayFormat],h="comma"===d&&p.commaRoundTrip;l||(l=Object.keys(s)),p.sort&&l.sort(p.sort);for(var g=t(),m=0;m<l.length;++m){var b=l[m],v=s[b];p.skipNulls&&null===v||c(y,f(v,b,d,h,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,g))}var w=y.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),w.length>0?_+w:""},Ut}function Re(){if(Tt)return Ct;Tt=1;var t=Ie(),e=Object.prototype.hasOwnProperty,r=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:t.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},i=function(t,e,r){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},a=function(r,n,o,a){if(r){var c=function(t,r){var n=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(r.depth<=0){if(!r.plainObjects&&e.call(Object.prototype,n)&&!r.allowPrototypes)return;return[n]}var o=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(n),a=i?n.slice(0,i.index):n,c=[];if(a){if(!r.plainObjects&&e.call(Object.prototype,a)&&!r.allowPrototypes)return;c[c.length]=a}for(var l=0;null!==(i=o.exec(n))&&l<r.depth;){l+=1;var s=i[1].slice(1,-1);if(!r.plainObjects&&e.call(Object.prototype,s)&&!r.allowPrototypes)return;c[c.length]=i[1]}if(i){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");c[c.length]="["+n.slice(i.index)+"]"}return c}(r,o);if(c)return function(e,r,n,o){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var c=e.slice(0,-1).join("");a=Array.isArray(r)&&r[c]?r[c].length:0}for(var l=o?r:i(r,n,a),s=e.length-1;s>=0;--s){var u,p=e[s];if("[]"===p&&n.parseArrays)u=t.isOverflow(l)?l:n.allowEmptyArrays&&(""===l||n.strictNullHandling&&null===l)?[]:t.combine([],l,n.arrayLimit,n.plainObjects);else{u=n.plainObjects?{__proto__:null}:{};var f="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?p.slice(1,-1):p,y=n.decodeDotInKeys?f.replace(/%2E/g,"."):f,d=parseInt(y,10),h=!isNaN(d)&&p!==y&&String(d)===y&&d>=0&&n.parseArrays;if(n.parseArrays||""!==y)if(h&&d<n.arrayLimit)(u=[])[d]=l;else{if(h&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");h?(u[d]=l,t.markOverflow(u,d)):"__proto__"!==y&&(u[y]=l)}else u={0:l}}l=u}return l}(c,n,o,a)}};return Ct=function(c,l){var s=function(e){if(!e)return n;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===e.charset?n.charset:e.charset,o=void 0===e.duplicates?n.duplicates:e.duplicates;if("combine"!==o&&"first"!==o&&"last"!==o)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||n.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:n.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:n.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:n.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:n.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:n.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:n.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:n.decoder,delimiter:"string"==typeof e.delimiter||t.isRegExp(e.delimiter)?e.delimiter:n.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:n.depth,duplicates:o,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:n.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:n.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:n.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:n.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(l);if(""===c||null==c)return s.plainObjects?{__proto__:null}:{};for(var u="string"==typeof c?function(a,c){var l={__proto__:null},s=c.ignoreQueryPrefix?a.replace(/^\?/,""):a;s=s.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=c.parameterLimit===1/0?void 0:c.parameterLimit,p=s.split(c.delimiter,c.throwOnLimitExceeded?u+1:u);if(c.throwOnLimitExceeded&&p.length>u)throw new RangeError("Parameter limit exceeded. Only "+u+" parameter"+(1===u?"":"s")+" allowed.");var f,y=-1,d=c.charset;if(c.charsetSentinel)for(f=0;f<p.length;++f)0===p[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[f]?d="utf-8":"utf8=%26%2310003%3B"===p[f]&&(d="iso-8859-1"),y=f,f=p.length);for(f=0;f<p.length;++f)if(f!==y){var h,g,m=p[f],b=m.indexOf("]="),v=-1===b?m.indexOf("="):b+1;if(-1===v?(h=c.decoder(m,n.decoder,d,"key"),g=c.strictNullHandling?null:""):null!==(h=c.decoder(m.slice(0,v),n.decoder,d,"key"))&&(g=t.maybeMap(i(m.slice(v+1),c,r(l[h])?l[h].length:0),(function(t){return c.decoder(t,n.decoder,d,"value")}))),g&&c.interpretNumericEntities&&"iso-8859-1"===d&&(g=o(String(g))),m.indexOf("[]=")>-1&&(g=r(g)?[g]:g),c.comma&&r(g)&&g.length>c.arrayLimit){if(c.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+c.arrayLimit+" element"+(1===c.arrayLimit?"":"s")+" allowed in an array.");g=t.combine([],g,c.arrayLimit,c.plainObjects)}if(null!==h){var w=e.call(l,h);w&&("combine"===c.duplicates||m.indexOf("[]=")>-1)?l[h]=t.combine(l[h],g,c.arrayLimit,c.plainObjects):w&&"last"!==c.duplicates||(l[h]=g)}}return l}(c,s):c,p=s.plainObjects?{__proto__:null}:{},f=Object.keys(u),y=0;y<f.length;++y){var d=f[y],h=a(d,u[d],s,"string"==typeof c);p=t.merge(p,h,s)}return!0===s.allowSparse?p:t.compact(p)}}function De(){if(zt)return Bt;zt=1;var t=ke(),e=Re();return Bt={formats:xe(),parse:e,stringify:t}}var Me=Kt(De());
2
2
  /**
3
3
  * @param {Record<string, unknown>} object Source object to pick properties from.
4
4
  * @param {string[]} keys Keys to pick from the source object.
@@ -6,14 +6,14 @@
6
6
  * @author Auth0 https://github.com/auth0/auth0.js
7
7
  * @license MIT
8
8
  */
9
- function Fe(t,e){return e.reduce(((e,r)=>(t[r]&&(e[r]=t[r]),e)),{})}class Ue{constructor(t,e){this.options=e,this.sdk=t}authorize(){const t=this.sdk.authorizeURL(this.options);window.location=t}authorizeData(){return new Promise(((t,r)=>{let n={},o=[];switch(this.options.response_type){case"token":if(o=["access_token","expires_in","token_type"],n=Me.parse(window.location.hash.substring(1)),n=Fe(n,["access_token","expires_in","state","scope","token_type"]),!o.every((t=>Object.prototype.hasOwnProperty.call(n,t))))return void r(e.extend({identity_exception:"unauthorized"}));n.expires_in=parseInt(n.expires_in);break;case"code":if(o=["code"],n=Me.parse(window.location.search,{ignoreQueryPrefix:!0}),n=Fe(n,["state","code"]),!o.every((t=>Object.prototype.hasOwnProperty.call(n,t))))return void r(e.extend({identity_exception:"unauthorized"}))}this.sdk.redirectUriParamsPersister.retrieve(n.state),t(n)}))}}class Ne{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const n=this.sdk.authorizeURL(this.options,"button");new r(this.options).start(5e3,((r,n)=>{if(this.removeIframe(),r)return e(r);t(n)}));const o=document.createElement("iframe");o.setAttribute("src",n),o.setAttribute("id",this.iframeID()),o.style.width="1px",o.style.height="1px",o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.opacity="0",o.style.visibility="none",document.body.appendChild(o)}))}iframeID(){return this.options.client_id+this.options.response_type}removeIframe(){const t=document.getElementById(this.iframeID());t&&t.parentNode&&t.parentNode.removeChild(t)}}
9
+ function Le(t,e){return e.reduce(((e,r)=>(t[r]&&(e[r]=t[r]),e)),{})}class Fe{constructor(t,e){this.options=e,this.sdk=t}authorize(){const t=this.sdk.authorizeURL(this.options);window.location=t}authorizeData(){return new Promise(((t,r)=>{let n={},o=[];switch(this.options.response_type){case"token":if(o=["access_token","expires_in","token_type"],n=Me.parse(window.location.hash.substring(1)),n=Le(n,["access_token","expires_in","state","scope","token_type"]),!o.every((t=>Object.prototype.hasOwnProperty.call(n,t))))return void r(e.extend({identity_exception:"unauthorized"}));n.expires_in=parseInt(n.expires_in);break;case"code":if(o=["code"],n=Me.parse(window.location.search,{ignoreQueryPrefix:!0}),n=Le(n,["state","code"]),!o.every((t=>Object.prototype.hasOwnProperty.call(n,t))))return void r(e.extend({identity_exception:"unauthorized"}))}this.sdk.redirectUriParamsPersister.retrieve(n.state),t(n)}))}}class Ue{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const n=this.sdk.authorizeURL(this.options,"button");new r(this.options).start(5e3,((r,n)=>{if(this.removeIframe(),r)return e(r);t(n)}));const o=document.createElement("iframe");o.setAttribute("src",n),o.setAttribute("id",this.iframeID()),o.style.width="1px",o.style.height="1px",o.style.position="fixed",o.style.top="0",o.style.right="0",o.style.opacity="0",o.style.visibility="none",document.body.appendChild(o)}))}iframeID(){return this.options.client_id+this.options.response_type}removeIframe(){const t=document.getElementById(this.iframeID());t&&t.parentNode&&t.parentNode.removeChild(t)}}
10
10
  /**
11
11
  * @file
12
12
  * @author Auth0 https://github.com/auth0/auth0.js
13
13
  * @license MIT
14
- */function Ce(){}
14
+ */function Ne(){}
15
15
  /*! js-cookie v3.0.5 | MIT */
16
- function Le(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}Ce.prototype.getItem=function(){return null},Ce.prototype.removeItem=function(){},Ce.prototype.setItem=function(){};var Te=function t(e,r){function n(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=Le({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var a in o)o[a]&&(i+="; "+a,!0!==o[a]&&(i+="="+o[a].split(";")[0]));return document.cookie=t+"="+e.write(n,t)+i}}return Object.create({set:n,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),a=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(n[c]=e.read(a,c),t===c)break}catch(t){}}return t?n[t]:n}},remove:function(t,e){n(t,"",Le({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Le({},this.attributes,e))},withConverter:function(e){return t(Le({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});
16
+ function Ce(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}Ne.prototype.getItem=function(){return null},Ne.prototype.removeItem=function(){},Ne.prototype.setItem=function(){};var Te=function t(e,r){function n(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=Ce({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var a in o)o[a]&&(i+="; "+a,!0!==o[a]&&(i+="="+o[a].split(";")[0]));return document.cookie=t+"="+e.write(n,t)+i}}return Object.create({set:n,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),a=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(n[c]=e.read(a,c),t===c)break}catch(t){}}return t?n[t]:n}},remove:function(t,e){n(t,"",Ce({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Ce({},this.attributes,e))},withConverter:function(e){return t(Ce({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});
17
17
  /**
18
18
  * @file
19
19
  * @author Auth0 https://github.com/auth0/auth0.js
@@ -30,7 +30,7 @@ function ze(t){if(this.storage=new Be,!0===t.force_local_storage)try{const t=win
30
30
  * @author Auth0 https://github.com/auth0/auth0.js
31
31
  * @license MIT
32
32
  */
33
- function We(t){this.handler=new ze(t)}Be.prototype.getItem=function(t){return Te.get(t)},Be.prototype.removeItem=function(t){Te.remove(t)},Be.prototype.setItem=function(t,e,r){const n=Object.assign({expires:1,SameSite:"none",Secure:!0},r);Te.set(t,e,n)},ze.prototype.failover=function(){this.storage instanceof Ce?console.warn("DummyStorage: ignore failover"):this.storage instanceof Be?(console.warn("CookieStorage: failing over DummyStorage"),this.storage=new Ce):(console.warn("LocalStorage: failing over CookieStorage"),this.storage=new Be)},ze.prototype.getItem=function(t){try{return this.storage.getItem(t)}catch(e){return console.warn(e),this.failover(),this.getItem(t)}},ze.prototype.removeItem=function(t){try{return this.storage.removeItem(t)}catch(e){return console.warn(e),this.failover(),this.removeItem(t)}},ze.prototype.setItem=function(t,e,r){try{return this.storage.setItem(t,e,r)}catch(n){return console.warn(n),this.failover(),this.setItem(t,e,r)}},We.prototype.getItem=function(t){const e=this.handler.getItem(t);try{return JSON.parse(e)}catch(t){return e}},We.prototype.removeItem=function(t){return this.handler.removeItem(t)},We.prototype.setItem=function(t,e,r){const n=JSON.stringify(e);return this.handler.setItem(t,n,r)};class Ke{constructor(t){this.options=t.transaction,this.storage=new We(this.options)}generate(t){this.storage.setItem(this.options.namespace+t.state,{state:t.state,code_verifier:t.code_verifier},{expires:1/48})}get(t){const e=this.storage.getItem(this.options.namespace+t);return this.clear(t),e||{}}clear(t){this.storage.removeItem(this.options.namespace+t)}}var qe={hash:{},codec:{},exception:{invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t}}};qe.bitArray={bitSlice:function(t,e,r){return t=qe.bitArray._shiftRight(t.slice(e/32),32-(31&e)).slice(1),void 0===r?t:qe.bitArray.clamp(t,r-e)},extract:function(t,e,r){var n=Math.floor(-e-r&31);return(-32&(e+r-1^e)?t[e/32|0]<<32-n^t[e/32+1|0]>>>n:t[e/32|0]>>>n)&(1<<r)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e);var r=t[t.length-1],n=qe.bitArray.getPartial(r);return 32===n?t.concat(e):qe.bitArray._shiftRight(e,n,0|r,t.slice(0,t.length-1))},bitLength:function(t){var e,r=t.length;return 0===r?0:(e=t[r-1],32*(r-1)+qe.bitArray.getPartial(e))},clamp:function(t,e){if(32*t.length<e)return t;var r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=qe.bitArray.partial(e,t[r-1]&2147483648>>e-1,1)),t},partial:function(t,e,r){return 32===t?e:(r?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(qe.bitArray.bitLength(t)!==qe.bitArray.bitLength(e))return!1;var r,n=0;for(r=0;r<t.length;r++)n|=t[r]^e[r];return 0===n},_shiftRight:function(t,e,r,n){var o,i,a;for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;return i=t.length?t[t.length-1]:0,a=qe.bitArray.getPartial(i),n.push(qe.bitArray.partial(e+a&31,e+a>32?r:n.pop(),1)),n},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){var e,r;for(e=0;e<t.length;++e)r=t[e],t[e]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return t}},qe.codec.utf8String={fromBits:function(t){var e,r,n="",o=qe.bitArray.bitLength(t);for(e=0;e<o/8;e++)0==(3&e)&&(r=t[e/4]),n+=String.fromCharCode(r>>>8>>>8>>>8),r<<=8;return decodeURIComponent(escape(n))},toBits:function(t){t=unescape(encodeURIComponent(t));var e,r=[],n=0;for(e=0;e<t.length;e++)n=n<<8|t.charCodeAt(e),3==(3&e)&&(r.push(n),n=0);return 3&e&&r.push(qe.bitArray.partial(8*(3&e),n)),r}},qe.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},qe.hash.sha256.hash=function(t){return(new qe.hash.sha256).update(t).finalize()},qe.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=qe.codec.utf8String.toBits(t));var e,r=this._buffer=qe.bitArray.concat(this._buffer,t),n=this._length,o=this._length=n+qe.bitArray.bitLength(t);if(o>9007199254740991)throw new qe.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var i=new Uint32Array(r),a=0;for(e=512+n-(512+n&511);e<=o;e+=512)this._block(i.subarray(16*a,16*(a+1))),a+=1;r.splice(0,16*a)}else for(e=512+n-(512+n&511);e<=o;e+=512)this._block(r.splice(0,16));return this},finalize:function(){var t,e=this._buffer,r=this._h;for(t=(e=qe.bitArray.concat(e,[qe.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),r},_init:[],_key:[],_precompute:function(){var t,e,r=0,n=2;function o(t){return 4294967296*(t-Math.floor(t))|0}for(;r<64;n++){for(e=!0,t=2;t*t<=n;t++)if(n%t==0){e=!1;break}e&&(r<8&&(this._init[r]=o(Math.pow(n,.5))),this._key[r]=o(Math.pow(n,1/3)),r++)}},_block:function(t){var e,r,n,o,i=this._h,a=this._key,c=i[0],s=i[1],u=i[2],l=i[3],p=i[4],f=i[5],y=i[6],d=i[7];for(e=0;e<64;e++)e<16?r=t[e]:(n=t[e+1&15],o=t[e+14&15],r=t[15&e]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+t[15&e]+t[e+9&15]|0),r=r+d+(p>>>6^p>>>11^p>>>25^p<<26^p<<21^p<<7)+(y^p&(f^y))+a[e],d=y,y=f,f=p,p=l+r|0,l=u,u=s,c=r+((s=c)&u^l&(s^u))+(s>>>2^s>>>13^s>>>22^s<<30^s<<19^s<<10)|0;i[0]=i[0]+c|0,i[1]=i[1]+s|0,i[2]=i[2]+u|0,i[3]=i[3]+l|0,i[4]=i[4]+p|0,i[5]=i[5]+f|0,i[6]=i[6]+y|0,i[7]=i[7]+d|0}};var $e={base64URLEncode:function(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}};function Ge(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}
33
+ function We(t){this.handler=new ze(t)}Be.prototype.getItem=function(t){return Te.get(t)},Be.prototype.removeItem=function(t){Te.remove(t)},Be.prototype.setItem=function(t,e,r){const n=Object.assign({expires:1,SameSite:"none",Secure:!0},r);Te.set(t,e,n)},ze.prototype.failover=function(){this.storage instanceof Ne?console.warn("DummyStorage: ignore failover"):this.storage instanceof Be?(console.warn("CookieStorage: failing over DummyStorage"),this.storage=new Ne):(console.warn("LocalStorage: failing over CookieStorage"),this.storage=new Be)},ze.prototype.getItem=function(t){try{return this.storage.getItem(t)}catch(e){return console.warn(e),this.failover(),this.getItem(t)}},ze.prototype.removeItem=function(t){try{return this.storage.removeItem(t)}catch(e){return console.warn(e),this.failover(),this.removeItem(t)}},ze.prototype.setItem=function(t,e,r){try{return this.storage.setItem(t,e,r)}catch(n){return console.warn(n),this.failover(),this.setItem(t,e,r)}},We.prototype.getItem=function(t){const e=this.handler.getItem(t);try{return JSON.parse(e)}catch(t){return e}},We.prototype.removeItem=function(t){return this.handler.removeItem(t)},We.prototype.setItem=function(t,e,r){const n=JSON.stringify(e);return this.handler.setItem(t,n,r)};class Ke{constructor(t){this.options=t.transaction,this.storage=new We(this.options)}generate(t){this.storage.setItem(this.options.namespace+t.state,{state:t.state,code_verifier:t.code_verifier},{expires:1/48})}get(t){const e=this.storage.getItem(this.options.namespace+t);return this.clear(t),e||{}}clear(t){this.storage.removeItem(this.options.namespace+t)}}var qe={hash:{},codec:{},exception:{invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t}}};qe.bitArray={bitSlice:function(t,e,r){return t=qe.bitArray._shiftRight(t.slice(e/32),32-(31&e)).slice(1),void 0===r?t:qe.bitArray.clamp(t,r-e)},extract:function(t,e,r){var n=Math.floor(-e-r&31);return(-32&(e+r-1^e)?t[e/32|0]<<32-n^t[e/32+1|0]>>>n:t[e/32|0]>>>n)&(1<<r)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e);var r=t[t.length-1],n=qe.bitArray.getPartial(r);return 32===n?t.concat(e):qe.bitArray._shiftRight(e,n,0|r,t.slice(0,t.length-1))},bitLength:function(t){var e,r=t.length;return 0===r?0:(e=t[r-1],32*(r-1)+qe.bitArray.getPartial(e))},clamp:function(t,e){if(32*t.length<e)return t;var r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=qe.bitArray.partial(e,t[r-1]&2147483648>>e-1,1)),t},partial:function(t,e,r){return 32===t?e:(r?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(qe.bitArray.bitLength(t)!==qe.bitArray.bitLength(e))return!1;var r,n=0;for(r=0;r<t.length;r++)n|=t[r]^e[r];return 0===n},_shiftRight:function(t,e,r,n){var o,i,a;for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;return i=t.length?t[t.length-1]:0,a=qe.bitArray.getPartial(i),n.push(qe.bitArray.partial(e+a&31,e+a>32?r:n.pop(),1)),n},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){var e,r;for(e=0;e<t.length;++e)r=t[e],t[e]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return t}},qe.codec.utf8String={fromBits:function(t){var e,r,n="",o=qe.bitArray.bitLength(t);for(e=0;e<o/8;e++)0==(3&e)&&(r=t[e/4]),n+=String.fromCharCode(r>>>8>>>8>>>8),r<<=8;return decodeURIComponent(escape(n))},toBits:function(t){t=unescape(encodeURIComponent(t));var e,r=[],n=0;for(e=0;e<t.length;e++)n=n<<8|t.charCodeAt(e),3==(3&e)&&(r.push(n),n=0);return 3&e&&r.push(qe.bitArray.partial(8*(3&e),n)),r}},qe.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},qe.hash.sha256.hash=function(t){return(new qe.hash.sha256).update(t).finalize()},qe.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=qe.codec.utf8String.toBits(t));var e,r=this._buffer=qe.bitArray.concat(this._buffer,t),n=this._length,o=this._length=n+qe.bitArray.bitLength(t);if(o>9007199254740991)throw new qe.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var i=new Uint32Array(r),a=0;for(e=512+n-(512+n&511);e<=o;e+=512)this._block(i.subarray(16*a,16*(a+1))),a+=1;r.splice(0,16*a)}else for(e=512+n-(512+n&511);e<=o;e+=512)this._block(r.splice(0,16));return this},finalize:function(){var t,e=this._buffer,r=this._h;for(t=(e=qe.bitArray.concat(e,[qe.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),r},_init:[],_key:[],_precompute:function(){var t,e,r=0,n=2;function o(t){return 4294967296*(t-Math.floor(t))|0}for(;r<64;n++){for(e=!0,t=2;t*t<=n;t++)if(n%t==0){e=!1;break}e&&(r<8&&(this._init[r]=o(Math.pow(n,.5))),this._key[r]=o(Math.pow(n,1/3)),r++)}},_block:function(t){var e,r,n,o,i=this._h,a=this._key,c=i[0],l=i[1],s=i[2],u=i[3],p=i[4],f=i[5],y=i[6],d=i[7];for(e=0;e<64;e++)e<16?r=t[e]:(n=t[e+1&15],o=t[e+14&15],r=t[15&e]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+t[15&e]+t[e+9&15]|0),r=r+d+(p>>>6^p>>>11^p>>>25^p<<26^p<<21^p<<7)+(y^p&(f^y))+a[e],d=y,y=f,f=p,p=u+r|0,u=s,s=l,c=r+((l=c)&s^u&(l^s))+(l>>>2^l>>>13^l>>>22^l<<30^l<<19^l<<10)|0;i[0]=i[0]+c|0,i[1]=i[1]+l|0,i[2]=i[2]+s|0,i[3]=i[3]+u|0,i[4]=i[4]+p|0,i[5]=i[5]+f|0,i[6]=i[6]+y|0,i[7]=i[7]+d|0}};var $e={base64URLEncode:function(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}};function Ge(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}
34
34
  /**
35
35
  * @file
36
36
  * @author Auth0 https://github.com/auth0/auth0.js
@@ -40,5 +40,5 @@ function We(t){this.handler=new ze(t)}Be.prototype.getItem=function(t){return Te
40
40
  * @file
41
41
  * @author Auth0 https://github.com/auth0/auth0.js
42
42
  * @license MIT
43
- */function Ye(t,e,r){let n="";for(let o=0;o<t;o++){const t=Math.floor(Math.random()*r);n+=e.charAt(t)}return n}var Xe={string:function(t){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",r=window.crypto||window.msCrypto;if(!(r&&"function"==typeof r.getRandomValues))return Ye(t,e,65);const n=65*Math.floor(256/65);if(0===n)return Ye(t,e,65);const o=[];for(;o.length<t;){const i=t-o.length,a=new Uint8Array(i);r.getRandomValues(a);for(let r=0;r<a.length&&o.length<t;r++){const t=a[r];t>=n||o.push(e.charAt(t%65))}}return o.join("")}};return class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==t.client_id)throw new Error("client id not provided");this.options=Object.assign({},{organization_id:"",prompt:"",response_type:"token",popup_flow:"auto",state:"",verify_state:!0,verify_callback:!0,scope:null,redirect_uri:"",email_hint:null,server_url:"https://accounts.livechat.com",tracking:{utm_source:"accounts.livechat.com",utm_medium:"accounts-sdk"},transaction:{namespace:"com.livechat.accounts",key_length:32,force_local_storage:!1},pkce:{enabled:!0,code_verifier_length:128,code_challange_method:"S256"}},t),this.transaction=new Ke(this.options),this.redirectUriParamsPersister=new Je(this.options)}iframe(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new Ne(this,e)}popup(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new n(this,e)}redirect(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new Ue(this,e)}authorizeURL(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object.assign({},this.options,t);r.state||(r.state=Xe.string(r.key_length)),r.redirect_uri||(r.redirect_uri=window.location.href);const n=Fe(r,["client_id","organization_id","redirect_uri","state","response_type","scope","prompt"]);Object.assign(n,r.tracking),null===n.scope&&delete n.scope,null!=e&&(n.flow=e),r.email_hint&&(n.email=r.email_hint);let o=r.server_url;if("manual"===r.popup_flow&&(o+="/signin"),r.path&&(o+=r.path),"code"===r.response_type&&r.pkce.enabled){const t=r.pkce.code_verifier||Xe.string(r.pkce.code_verifier_length);switch(r.pkce.code_challange_method){case"S256":{const e=qe.hash.sha256.hash(t);Object.assign(n,{code_verifier:t,code_challenge:$e.base64URLEncode(e),code_challenge_method:r.pkce.code_challange_method});break}default:Object.assign(n,{code_verifier:t,code_challenge:t,code_challenge_method:r.pkce.code_challange_method})}}return this.transaction.generate(n),this.redirectUriParamsPersister.persist(n),delete n.code_verifier,o+"?"+Me.stringify(n)}verify(t){const e=this.transaction.get(t.state);return t.state&&this.options.verify_state&&e.state!=t.state?null:e}}}));
43
+ */function Ye(t,e,r){let n="";for(let o=0;o<t;o++){const t=Math.floor(Math.random()*r);n+=e.charAt(t)}return n}var Xe={string:function(t){const e="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",r=window.crypto||window.msCrypto;if(!(r&&"function"==typeof r.getRandomValues))return Ye(t,e,65);const n=65*Math.floor(256/65);if(0===n)return Ye(t,e,65);const o=[];for(;o.length<t;){const i=t-o.length,a=new Uint8Array(i);r.getRandomValues(a);for(let r=0;r<a.length&&o.length<t;r++){const t=a[r];t>=n||o.push(e.charAt(t%65))}}return o.join("")}};return class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==t.client_id)throw new Error("client id not provided");this.options=Object.assign({},{organization_id:"",prompt:"",response_type:"token",popup_flow:"auto",state:"",verify_state:!0,verify_callback:!0,scope:null,redirect_uri:"",email_hint:null,server_url:"https://accounts.livechat.com",tracking:{utm_source:"accounts.livechat.com",utm_medium:"accounts-sdk"},transaction:{namespace:"com.livechat.accounts",key_length:32,force_local_storage:!1},pkce:{enabled:!0,code_verifier_length:128,code_challange_method:"S256"}},t),this.transaction=new Ke(this.options),this.redirectUriParamsPersister=new Je(this.options)}iframe(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new Ue(this,e)}popup(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new n(this,e)}redirect(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Object.assign({},this.options,t);return new Fe(this,e)}authorizeURL(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=Object.assign({},this.options,t);r.state||(r.state=Xe.string(r.key_length)),r.redirect_uri||(r.redirect_uri=window.location.href);const n=Le(r,["client_id","organization_id","redirect_uri","state","response_type","scope","prompt"]);Object.assign(n,r.tracking),null===n.scope&&delete n.scope,null!=e&&(n.flow=e),r.email_hint&&(n.email=r.email_hint);let o=r.server_url;if("manual"===r.popup_flow&&(o+="/signin"),r.path&&(o+=r.path),"code"===r.response_type&&r.pkce.enabled){const t=r.pkce.code_verifier||Xe.string(r.pkce.code_verifier_length);switch(r.pkce.code_challange_method){case"S256":{const e=qe.hash.sha256.hash(t);Object.assign(n,{code_verifier:t,code_challenge:$e.base64URLEncode(e),code_challenge_method:r.pkce.code_challange_method});break}default:Object.assign(n,{code_verifier:t,code_challenge:t,code_challenge_method:r.pkce.code_challange_method})}}return this.transaction.generate(n),this.redirectUriParamsPersister.persist(n),delete n.code_verifier,o+"?"+Me.stringify(n)}verify(t){const e=this.transaction.get(t.state);return t.state&&this.options.verify_state&&e.state!=t.state?null:e}}}));
44
44
  //# sourceMappingURL=accounts-sdk.min.js.map