@leatcom/portal-sessions 0.3.0-beta.11 → 0.3.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{calendar-DDwBva4Q.js → calendar-CNx63kan.js} +2 -2
- package/dist/{camera-switch-qzVCu9nA.js → camera-switch-DWDTqbUe.js} +2 -2
- package/dist/{caret-left-CN9nJHxG.js → caret-left-DnKnL0Ih.js} +2 -2
- package/dist/{close-C3cNBsWI.js → close-BkhXUisU.js} +2 -2
- package/dist/{crossBlack-Bk5GghfW.js → crossBlack-By059Yuq.js} +2 -2
- package/dist/{dollar-CgVNkJJz.js → dollar-DJkFEq0l.js} +2 -2
- package/dist/{edit-BJZMibY4.js → edit-BzZVrm9d.js} +2 -2
- package/dist/{home-CEviZ8Oe.js → home-CObkO6rx.js} +2 -2
- package/dist/{information-GyGGINwg.js → information-DUF95hLD.js} +2 -2
- package/dist/{leat_logo-D4RkhmEp.js → leat_logo-j7OQmDvt.js} +2 -2
- package/dist/{mail-DemY4OPW.js → mail-EL5Fin0-.js} +2 -2
- package/dist/{notificationErrorV2-DoQ2HXpo.js → notificationErrorV2-CGbvQ-su.js} +2 -2
- package/dist/{notificationSuccessV2-B3PJl6dS.js → notificationSuccessV2-BhRAIAVE.js} +2 -2
- package/dist/{notificationWarningV2-Df16qkpM.js → notificationWarningV2-BswHis10.js} +2 -2
- package/dist/portal-sessions.es.js +23 -23
- package/dist/portal-sessions.umd.js +3 -3
- package/dist/{qr-scanner-worker.min-BYjhoE_l.js → qr-scanner-worker.min-CY0V49aw.js} +2 -2
- package/dist/{settings-zcOeMJIO.js → settings-Dca0sJDd.js} +2 -2
- package/dist/{shopping-bag-Nu4xZLvT.js → shopping-bag-C4DIWmq2.js} +2 -2
- package/dist/{star-BH-kt-To.js → star-CGmG_XLj.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{user-O_Zbi2Tw.js → user-DZy_M0Yn.js} +2 -2
- package/package.json +1 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`
|
|
1
|
+
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`c1892f55c7f480f84c48c65befae803a68799626`},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n!=null)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:portal-sessions-application-key":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`79a13198-c4e7-4a37-ba16-c45506dcc0b3`,e._sentryDebugIdIdentifier=`sentry-dbid-79a13198-c4e7-4a37-ba16-c45506dcc0b3`)}catch{}})(),(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.PortalSessions={},e.React,e[`react/jsx-runtime`],e.ReactDOM))})(this,function(e,t,n,r){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>()=>(e&&(t=e(e=0)),t),d=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),f=(e,t)=>{let n={};for(var r in e)a(n,r,{get:e[r],enumerable:!0});return t||a(n,Symbol.toStringTag,{value:`Module`}),n},p=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e},m=(e,t,n)=>(n=e==null?{}:i(c(e)),p(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e));let h=m(t,1);t=m(t),r=m(r,1);var g=function(e){return e.IDENTIFIER=`identifier`,e.EMAIL=`email`,e}({}),_=function(e){return e.ACTIVE=`ACTIVE`,e.EXPIRED=`EXPIRED`,e.COMPLETED=`COMPLETED`,e}({}),v=function(e){return e.GENERIC=`GENERIC`,e.GIFTCARD=`GIFTCARD`,e.REDEEM_GIFTCARD=`REDEEM_GIFTCARD`,e.TOP_UP_GIFTCARD=`TOP_UP_GIFTCARD`,e.PORTAL=`PORTAL`,e.PREPAID=`PREPAID`,e.PAY_PREPAID=`PAY_PREPAID`,e.TOP_UP_PREPAID=`TOP_UP_PREPAID`,e.POINTS_TRANSACTION=`POINTS_TRANSACTION`,e.VOUCHER=`VOUCHER`,e}({}),y=function(e){return e.CREDIT_RECEPTION=`credit_reception`,e.GIFTCARD_TRANSACTION=`giftcard_transaction`,e.VOUCHER_REDEEMED=`voucher_redeemed`,e.REWARD_RECEPTION=`reward_reception`,e.PREPAID_TRANSACTION=`prepaid_transaction`,e}({}),b=function(e){return e.USER=`user`,e.ENVIRONMENT=`environment`,e}({});function x(e,t){return function(){return e.apply(t,arguments)}}var{toString:S}=Object.prototype,{getPrototypeOf:C}=Object,{iterator:w,toStringTag:T}=Symbol,E=(e=>t=>{let n=S.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),D=e=>(e=e.toLowerCase(),t=>E(t)===e),O=e=>t=>typeof t===e,{isArray:k}=Array,A=O(`undefined`);function j(e){return e!==null&&!A(e)&&e.constructor!==null&&!A(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var M=D(`ArrayBuffer`);function N(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&M(e.buffer),t}var ee=O(`string`),P=O(`function`),te=O(`number`),ne=e=>typeof e==`object`&&!!e,re=e=>e===!0||e===!1,ie=e=>{if(E(e)!==`object`)return!1;let t=C(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(T in e)&&!(w in e)},F=e=>{if(!ne(e)||j(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ae=D(`Date`),oe=D(`File`),se=e=>!!(e&&e.uri!==void 0),ce=e=>e&&e.getParts!==void 0,le=D(`Blob`),ue=D(`FileList`),I=e=>ne(e)&&P(e.pipe);function L(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var de=L(),fe=de.FormData===void 0?void 0:de.FormData,pe=e=>{if(!e)return!1;if(fe&&e instanceof fe)return!0;let t=C(e);if(!t||t===Object.prototype||!P(e.append))return!1;let n=E(e);return n===`formdata`||n===`object`&&P(e.toString)&&e.toString()===`[object FormData]`},me=D(`URLSearchParams`),[he,ge,_e,ve]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(D),ye=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function be(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),k(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(j(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function xe(e,t){if(j(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Se=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Ce=e=>!A(e)&&e!==Se;function we(...e){let{caseless:t,skipUndefined:n}=Ce(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&xe(r,i)||i,o=Ie(r,a)?r[a]:void 0;ie(o)&&ie(e)?r[a]=we(o,e):ie(e)?r[a]=we({},e):k(e)?r[a]=e.slice():(!n||!A(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++)e[t]&&be(e[t],i);return r}var Te=(e,t,n,{allOwnKeys:r}={})=>(be(t,(t,r)=>{n&&P(t)?Object.defineProperty(e,r,{__proto__:null,value:x(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ee=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),De=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Oe=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&C(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ke=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Ae=e=>{if(!e)return null;if(k(e))return e;let t=e.length;if(!te(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},je=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&C(Uint8Array)),Me=(e,t)=>{let n=(e&&e[w]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Ne=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Pe=D(`HTMLFormElement`),Fe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Ie=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Le=D(`RegExp`),Re=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};be(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},ze=e=>{Re(e,(t,n)=>{if(P(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(P(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Be=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return k(e)?r(e):r(String(e).split(t)),n},Ve=()=>{},He=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ue(e){return!!(e&&P(e.append)&&e[T]===`FormData`&&e[w])}var We=e=>{let t=new WeakSet,n=e=>{if(ne(e)){if(t.has(e))return;if(j(e))return e;if(!(`toJSON`in e)){t.add(e);let r=k(e)?[]:{};return be(e,(e,t)=>{let i=n(e);!A(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},Ge=D(`AsyncFunction`),Ke=e=>e&&(ne(e)||P(e))&&P(e.then)&&P(e.catch),qe=((e,t)=>e?setImmediate:t?((e,t)=>(Se.addEventListener(`message`,({source:n,data:r})=>{n===Se&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Se.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,P(Se.postMessage)),R={isArray:k,isArrayBuffer:M,isBuffer:j,isFormData:pe,isArrayBufferView:N,isString:ee,isNumber:te,isBoolean:re,isObject:ne,isPlainObject:ie,isEmptyObject:F,isReadableStream:he,isRequest:ge,isResponse:_e,isHeaders:ve,isUndefined:A,isDate:ae,isFile:oe,isReactNativeBlob:se,isReactNative:ce,isBlob:le,isRegExp:Le,isFunction:P,isStream:I,isURLSearchParams:me,isTypedArray:je,isFileList:ue,forEach:be,merge:we,extend:Te,trim:ye,stripBOM:Ee,inherits:De,toFlatObject:Oe,kindOf:E,kindOfTest:D,endsWith:ke,toArray:Ae,forEachEntry:Me,matchAll:Ne,isHTMLForm:Pe,hasOwnProperty:Ie,hasOwnProp:Ie,reduceDescriptors:Re,freezeMethods:ze,toObjectSet:Be,toCamelCase:Fe,noop:Ve,toFiniteNumber:He,findKey:xe,global:Se,isContextDefined:Ce,isSpecCompliantForm:Ue,toJSONObject:We,isAsyncFn:Ge,isThenable:Ke,setImmediate:qe,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(Se):typeof process<`u`&&process.nextTick||qe,isIterable:e=>e!=null&&P(e[w])},Je=R.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),Ye=e=>{let t={},n,r,i;return e&&e.split(`
|
|
2
2
|
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Je[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function Xe(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var Ze=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Qe=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function $e(e,t){return R.isArray(e)?e.map(e=>$e(e,t)):Xe(String(e).replace(t,``))}var et=e=>$e(e,Ze),tt=e=>$e(e,Qe);function nt(e){let t=Object.create(null);return R.forEach(e.toJSON(),(e,n)=>{t[n]=tt(e)}),t}var rt=Symbol(`internals`);function it(e){return e&&String(e).trim().toLowerCase()}function at(e){return e===!1||e==null?e:R.isArray(e)?e.map(at):et(String(e))}function ot(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var st=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ct(e,t,n,r,i){if(R.isFunction(r))return r.call(this,t,n);if(i&&(t=n),R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function lt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function ut(e,t){let n=R.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var dt=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=it(t);if(!i)throw Error(`header name must be a non-empty string`);let a=R.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=at(e))}let a=(e,t)=>R.forEach(e,(e,n)=>i(e,n,t));if(R.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(R.isString(e)&&(e=e.trim())&&!st(e))a(Ye(e),t);else if(R.isObject(e)&&R.isIterable(e)){let n={},r,i;for(let t of e){if(!R.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?R.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=it(e),e){let n=R.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return ot(e);if(R.isFunction(t))return t.call(this,e,n);if(R.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=it(e),e){let n=R.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||ct(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=it(e),e){let i=R.findKey(n,e);i&&(!t||ct(n,n[i],i,t))&&(delete n[i],r=!0)}}return R.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||ct(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return R.forEach(this,(r,i)=>{let a=R.findKey(n,i);if(a){t[a]=at(r),delete t[i];return}let o=e?lt(i):String(i).trim();o!==i&&delete t[i],t[o]=at(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return R.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&R.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
|
3
3
|
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[rt]=this[rt]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=it(e);t[r]||(ut(n,e),t[r]=!0)}return R.isArray(e)?e.forEach(r):r(e),this}};dt.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),R.reduceDescriptors(dt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),R.freezeMethods(dt);var ft=`[REDACTED ****]`;function pt(e){if(R.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(R.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function mt(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||R.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof dt&&(e=e.toJSON()),r.push(e);let t;if(R.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);R.isUndefined(r)||(t[n]=r)});else{if(!R.isPlainObject(e)&&pt(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?ft:i(a);R.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var z=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&R.hasOwnProp(e,`redact`)?e.redact:void 0,n=R.isArray(t)&&t.length>0?mt(e,t):R.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};z.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,z.ERR_BAD_OPTION=`ERR_BAD_OPTION`,z.ECONNABORTED=`ECONNABORTED`,z.ETIMEDOUT=`ETIMEDOUT`,z.ECONNREFUSED=`ECONNREFUSED`,z.ERR_NETWORK=`ERR_NETWORK`,z.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,z.ERR_DEPRECATED=`ERR_DEPRECATED`,z.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,z.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,z.ERR_CANCELED=`ERR_CANCELED`,z.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,z.ERR_INVALID_URL=`ERR_INVALID_URL`,z.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function ht(e){return R.isPlainObject(e)||R.isArray(e)}function gt(e){return R.endsWith(e,`[]`)?e.slice(0,-2):e}function _t(e,t,n){return e?e.concat(t).map(function(e,t){return e=gt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function vt(e){return R.isArray(e)&&!e.some(ht)}var yt=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});function bt(e,t,n){if(!R.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!R.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||d,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&R.isSpecCompliantForm(t);if(!R.isFunction(i))throw TypeError(`visitor must be a function`);function u(e){if(e===null)return``;if(R.isDate(e))return e.toISOString();if(R.isBoolean(e))return e.toString();if(!l&&R.isBlob(e))throw new z(`Blob is not supported. Use a Buffer instead.`);return R.isArrayBuffer(e)||R.isTypedArray(e)?l&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function d(e,n,i){let s=e;if(R.isReactNative(t)&&R.isReactNativeBlob(e))return t.append(_t(i,n,a),u(e)),!1;if(e&&!i&&typeof e==`object`){if(R.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(R.isArray(e)&&vt(e)||(R.isFileList(e)||R.endsWith(n,`[]`))&&(s=R.toArray(e)))return n=gt(n),s.forEach(function(e,r){!(R.isUndefined(e)||e===null)&&t.append(o===!0?_t([n],r,a):o===null?n:n+`[]`,u(e))}),!1}return ht(e)?!0:(t.append(_t(i,n,a),u(e)),!1)}let f=[],p=Object.assign(yt,{defaultVisitor:d,convertValue:u,isVisitable:ht});function m(e,n,r=0){if(!R.isUndefined(e)){if(r>c)throw new z(`Object is too deeply nested (`+r+` levels). Max depth: `+c,z.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));f.push(e),R.forEach(e,function(e,a){(!(R.isUndefined(e)||e===null)&&i.call(t,e,R.isString(a)?a.trim():a,n,p))===!0&&m(e,n?n.concat(a):[a],r+1)}),f.pop()}}if(!R.isObject(e))throw TypeError(`data must be an object`);return m(e),t}function xt(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function St(e,t){this._pairs=[],e&&bt(e,this,t)}var Ct=St.prototype;Ct.append=function(e,t){this._pairs.push([e,t])},Ct.toString=function(e){let t=e?function(t){return e.call(this,t,xt)}:xt;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function wt(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function B(e,t,n){if(!t)return e;let r=n&&n.encode||wt,i=R.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):R.isURLSearchParams(t)?t.toString():new St(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Tt=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){R.forEach(this.handlers,function(t){t!==null&&e(t)})}},Et={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Dt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:St,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},Ot=f({hasBrowserEnv:()=>kt,hasStandardBrowserEnv:()=>jt,hasStandardBrowserWebWorkerEnv:()=>Mt,navigator:()=>At,origin:()=>Nt}),kt=typeof window<`u`&&typeof document<`u`,At=typeof navigator==`object`&&navigator||void 0,jt=kt&&(!At||[`ReactNative`,`NativeScript`,`NS`].indexOf(At.product)<0),Mt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Nt=kt&&window.location.href||`http://localhost`,Pt={...Ot,...Dt};function Ft(e,t){return bt(e,new Pt.classes.URLSearchParams,{visitor:function(e,t,n,r){return Pt.isNode&&R.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function It(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Lt(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Rt(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&R.isArray(r)?r.length:a,s?(R.hasOwnProp(r,a)?r[a]=R.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!R.hasOwnProp(r,a)||!R.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&R.isArray(r[a])&&(r[a]=Lt(r[a])),!o)}if(R.isFormData(e)&&R.isFunction(e.entries)){let n={};return R.forEachEntry(e,(e,r)=>{t(It(e),r,n,0)}),n}return null}var zt=(e,t)=>e!=null&&R.hasOwnProp(e,t)?e[t]:void 0;function Bt(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Vt={transitional:Et,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return r?JSON.stringify(Rt(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e)||R.isReadableStream(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=zt(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Ft(e,t).toString();if((a=R.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=zt(this,`env`),r=n&&n.FormData;return bt(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Bt(e)):e}],transformResponse:[function(e){let t=zt(this,`transitional`)||Vt.transitional,n=t&&t.forcedJSONParsing,r=zt(this,`responseType`),i=r===`json`;if(R.isResponse(e)||R.isReadableStream(e))return e;if(e&&R.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,zt(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?z.from(e,z.ERR_BAD_RESPONSE,this,null,zt(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Vt.headers[e]={}});function Ht(e,t){let n=this||Vt,r=t||n,i=dt.from(r.headers),a=r.data;return R.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Ut(e){return!!(e&&e.__CANCEL__)}var Wt=class extends z{constructor(e,t,n){super(e??`canceled`,z.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Gt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new z(`Request failed with status code `+n.status,n.status>=400&&n.status<500?z.ERR_BAD_REQUEST:z.ERR_BAD_RESPONSE,n.config,n.request,n))}function Kt(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function qt(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Jt(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var Yt=(e,t,n=3)=>{let r=0,i=qt(50,250);return Jt(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Xt=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Zt=e=>(...t)=>R.asap(()=>e(...t)),Qt=Pt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Pt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Pt.origin),Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent)):()=>!0,$t=Pt.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];R.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),R.isString(r)&&s.push(`path=${r}`),R.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),R.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);if(i!==-1&&r.slice(0,i)===e)return decodeURIComponent(r.slice(i+1))}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function en(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function tn(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function nn(e,t,n){let r=!en(t);return e&&(r||n===!1)?tn(e,t):t}var rn=e=>e instanceof dt?{...e}:e;function an(e,t){t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return R.isPlainObject(e)&&R.isPlainObject(t)?R.merge.call({caseless:r},e,t):R.isPlainObject(t)?R.merge({},t):R.isArray(t)?t.slice():t}function i(e,t,n,i){if(!R.isUndefined(t))return r(e,t,n,i);if(!R.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!R.isUndefined(t))return r(void 0,t)}function o(e,t){if(!R.isUndefined(t))return r(void 0,t);if(!R.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(R.hasOwnProp(t,a))return r(n,i);if(R.hasOwnProp(e,a))return r(void 0,n)}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:s,headers:(e,t,n)=>i(rn(e),rn(t),n,!0)};return R.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=R.hasOwnProp(c,r)?c[r]:i,o=a(R.hasOwnProp(e,r)?e[r]:void 0,R.hasOwnProp(t,r)?t[r]:void 0,r);R.isUndefined(o)&&a!==s||(n[r]=o)}),n}var on=[`content-type`,`content-length`];function sn(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t).forEach(([t,n])=>{on.includes(t.toLowerCase())&&e.set(t,n)})}var cn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),ln=e=>{let t=an({},e),n=e=>R.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=dt.from(s),t.url=B(nn(l,d,u),e.params,e.paramsSerializer),c&&s.set(`Authorization`,`Basic `+btoa((c.username||``)+`:`+(c.password?cn(c.password):``))),R.isFormData(r)&&(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):R.isFunction(r.getHeaders)&&sn(s,r.getHeaders(),n(`formDataHeaderPolicy`))),Pt.hasStandardBrowserEnv&&(R.isFunction(i)&&(i=i(t)),i===!0||i==null&&Qt(t.url))){let e=a&&o&&$t.read(o);e&&s.set(a,e)}return t},un=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=ln(e),i=r.data,a=dt.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=dt.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Gt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new z(`Request aborted`,z.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new z(t&&t.message?t.message:`Network Error`,z.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||Et;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new z(t,i.clarifyTimeoutError?z.ETIMEDOUT:z.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&R.forEach(nt(a),function(e,t){h.setRequestHeader(t,e)}),R.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Yt(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Yt(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Wt(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Kt(r.url);if(_&&!Pt.protocols.includes(_)){n(new z(`Unsupported protocol `+_+`:`,z.ERR_BAD_REQUEST,e));return}h.send(i||null)})},dn=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof z?t:new Wt(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new z(`timeout of ${t}ms exceeded`,z.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>R.asap(o),s},fn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},pn=async function*(e,t){for await(let n of mn(e))yield*fn(n,t)},mn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},hn=(e,t,n,r)=>{let i=pn(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})};function gn(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}if(typeof Buffer<`u`&&typeof Buffer.byteLength==`function`)return Buffer.byteLength(r,`utf8`);let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var _n=`1.16.1`,vn=64*1024,{isFunction:yn}=R,bn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},xn=e=>{let t=R.global!==void 0&&R.global!==null?R.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=R.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?yn(i):typeof fetch==`function`,c=yn(a),l=yn(o);if(!s)return!1;let u=s&&yn(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&bn(()=>{let e=!1,t=new a(Pt.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&bn(()=>R.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new z(`Response type '${e}' is not supported`,z.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new a(Pt.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e+=``),R.isString(e))return(await d(e)).byteLength},g=async(e,t)=>R.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:u,timeout:d,onDownloadProgress:h,onUploadProgress:_,responseType:v,headers:y,withCredentials:b=`same-origin`,fetchOptions:x,maxContentLength:S,maxBodyLength:C}=ln(e),w=R.isNumber(S)&&S>-1,T=R.isNumber(C)&&C>-1,E=i||fetch;v=v?(v+``).toLowerCase():`text`;let D=dn([l,u&&u.toAbortSignal()],d),O=null,k=D&&D.unsubscribe&&(()=>{D.unsubscribe()}),A;try{if(w&&typeof t==`string`&&t.startsWith(`data:`)&&gn(t)>S)throw new z(`maxContentLength size of `+S+` exceeded`,z.ERR_BAD_RESPONSE,e,O);if(T&&n!==`get`&&n!==`head`){let t=await g(y,s);if(typeof t==`number`&&isFinite(t)&&t>C)throw new z(`Request body larger than maxBodyLength limit`,z.ERR_BAD_REQUEST,e,O)}if(_&&f&&n!==`get`&&n!==`head`&&(A=await g(y,s))!==0){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(R.isFormData(s)&&(n=e.headers.get(`content-type`))&&y.setContentType(n),e.body){let[t,n]=Xt(A,Yt(Zt(_)));s=hn(e.body,vn,t,n)}}R.isString(b)||(b=b?`include`:`omit`);let i=c&&`credentials`in a.prototype;if(R.isFormData(s)){let e=y.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&y.delete(`content-type`)}y.set(`User-Agent`,`axios/`+_n,!1);let l={...x,signal:D,method:n.toUpperCase(),headers:nt(y.normalize()),body:s,duplex:`half`,credentials:i?b:void 0};O=c&&new a(t,l);let u=await(c?E(O,x):E(t,l));if(w){let t=R.toFiniteNumber(u.headers.get(`content-length`));if(t!=null&&t>S)throw new z(`maxContentLength size of `+S+` exceeded`,z.ERR_BAD_RESPONSE,e,O)}let d=p&&(v===`stream`||v===`response`);if(p&&u.body&&(h||w||d&&k)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=u[e]});let n=R.toFiniteNumber(u.headers.get(`content-length`)),[r,i]=h&&Xt(n,Yt(Zt(h),!0))||[],a=0;u=new o(hn(u.body,vn,t=>{if(w&&(a=t,a>S))throw new z(`maxContentLength size of `+S+` exceeded`,z.ERR_BAD_RESPONSE,e,O);r&&r(t)},()=>{i&&i(),k&&k()}),t)}v||=`text`;let j=await m[R.findKey(m,v)||`text`](u,e);if(w&&!p&&!d){let t;if(j!=null&&(typeof j.byteLength==`number`?t=j.byteLength:typeof j.size==`number`?t=j.size:typeof j==`string`&&(t=typeof r==`function`?new r().encode(j).byteLength:j.length)),typeof t==`number`&&t>S)throw new z(`maxContentLength size of `+S+` exceeded`,z.ERR_BAD_RESPONSE,e,O)}return!d&&k&&k(),await new Promise((t,n)=>{Gt(t,n,{data:j,headers:dt.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(k&&k(),D&&D.aborted&&D.reason instanceof z){let n=D.reason;throw n.config=e,O&&(n.request=O),t!==n&&(n.cause=t),n}throw t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new z(`Network Error`,z.ERR_NETWORK,e,O,t&&t.response),{cause:t.cause||t}):z.from(t,t&&t.code,e,O,t&&t.response)}}},Sn=new Map,Cn=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Sn;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:xn(t)),l=c;return c};Cn();var wn={http:null,xhr:un,fetch:{get:Cn}};R.forEach(wn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Tn=e=>`- ${e}`,En=e=>R.isFunction(e)||e===null||e===!1;function Dn(e,t){e=R.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!En(r)&&(i=wn[(n=String(r)).toLowerCase()],i===void 0))throw new z(`Unknown adapter '${n}'`);if(i&&(R.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new z(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
4
4
|
`+e.map(Tn).join(`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
|
7
7
|
`),r=t===-1?-1:n.indexOf(`
|
|
8
8
|
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
|
9
|
-
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=an(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Pn.assertOptions(n,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean),legacyInterceptorReqResOrdering:Fn.transitional(Fn.boolean)},!1),r!=null&&(R.isFunction(r)?t.paramsSerializer={serialize:r}:Pn.assertOptions(r,{encode:Fn.function,serialize:Fn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Pn.assertOptions(t,{baseUrl:Fn.spelling(`baseURL`),withXsrfToken:Fn.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&R.merge(i.common,i[t.method]);i&&R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=dt.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Et;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[An.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=An.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=an(this.defaults,e),B(nn(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};R.forEach([`delete`,`get`,`head`,`options`],function(e){In.prototype[e]=function(t,n){return this.request(an(n||{},{method:e,url:t,data:(n||{}).data}))}}),R.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(an(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}In.prototype[e]=t(),e!==`query`&&(In.prototype[e+`Form`]=t(!0))});var Ln=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Wt(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Rn(e){return function(t){return e.apply(null,t)}}function zn(e){return R.isObject(e)&&e.isAxiosError===!0}var Bn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bn).forEach(([e,t])=>{Bn[t]=e});function Vn(e){let t=new In(e),n=x(In.prototype.request,t);return R.extend(n,In.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Vn(an(e,t))},n}var Hn=Vn(Vt);Hn.Axios=In,Hn.CanceledError=Wt,Hn.CancelToken=Ln,Hn.isCancel=Ut,Hn.VERSION=_n,Hn.toFormData=bt,Hn.AxiosError=z,Hn.Cancel=Hn.CanceledError,Hn.all=function(e){return Promise.all(e)},Hn.spread=Rn,Hn.isAxiosError=zn,Hn.mergeConfig=an,Hn.AxiosHeaders=dt,Hn.formToJSON=e=>Rt(R.isHTMLForm(e)?new FormData(e):e),Hn.getAdapter=On.getAdapter,Hn.HttpStatusCode=Bn,Hn.default=Hn;var Un=(0,h.createContext)({});function Wn(){let e=(0,h.useContext)(Un);if(!e)throw Error(`Only use 'useApiContext' within a ApiContext Provider`);return e}var Gn={UNAUTHORIZED:401,MAINTENANCE_MODE:503},Kn=e=>{let t=e.response?.status;return t&&t!==Gn.UNAUTHORIZED&&console.error(e.response),Promise.reject(e)};function qn(){let{apiKey:e,host:t}=Wn(),n=(e,t={},n={})=>o(`GET`,e,t,n),r=(e,t={},n={})=>o(`POST`,e,t,n),i=(e,t={},n={})=>o(`PUT`,e,t,n),a=(e,t={})=>o(`DELETE`,e,t),o=(n,r,i={},a={})=>{let o=Hn.create({baseURL:`${t??`https://api.piggy.eu`}/api/v1/portal-sessions`,...a,headers:{Authorization:`Bearer ${e}`,...a.headers,"X-SDK-Version":`0.3.0-beta.11`}});return o.interceptors.response.use(void 0,Kn),o.request({method:n,url:r,params:n==`GET`?i:{},data:i})};return{get:n,post:r,put:i,destroy:a}}var Jn=m(d(((e,t)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()}))(),1);function Yn(e){return(0,n.jsxs)(`svg`,{...e,"aria-hidden":`true`,role:`status`,className:(0,Jn.default)(`inline h-5 w-5 animate-spin fill-[#E5E7EB]`,e.className),viewBox:`0 0 100 101`,fill:`red`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,n.jsx)(`path`,{d:`M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z`,fill:`currentFill`}),(0,n.jsx)(`path`,{d:`M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z`,fill:`currentColor`})]})}var Xn=`data:image/svg+xml,%3csvg%20width='331'%20height='297'%20viewBox='0%200%20331%20297'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M260.633%20120.233C256.252%20141.975%20249.682%20152.798%20240.921%20152.798C234.584%20152.798%20229.087%20148.853%20224.473%20140.869C219.859%20132.931%20213.661%20120.233%20205.88%20102.869C196.606%2081.8482%20188.078%2064.6769%20180.297%2051.2559C172.516%2037.8843%20162.543%2026.0991%20150.381%2015.9495C138.171%205.84943%20123.585%200.750732%20106.531%200.750732C66.1304%200.750732%2037.5648%2028.4561%2020.7431%2083.8685C8.56966%20124.042%201.84252%20172.378%200.554243%20228.779C0.43324%20234.077%200.372738%20236.726%201.39875%20238.822C2.29091%20240.644%203.79168%20242.18%205.59324%20243.113C7.66509%20244.187%2010.3571%20244.187%2015.7412%20244.187H49.9832C55.1593%20244.187%2057.7474%20244.187%2059.7252%20243.228C61.4991%20242.369%2062.8933%20241.064%2063.8691%20239.352C64.9571%20237.442%2065.1344%20234.785%2065.489%20229.471C66.8596%20208.929%2069.3476%20191.707%2072.9797%20177.809C78.8046%20155.346%2086.5875%20144.139%2096.3253%20144.139C103.13%20144.139%20109.001%20148.131%20113.848%20156.068C118.693%20164.053%20125.264%20177.425%20133.558%20196.281C146.234%20227.402%20159.374%20251.837%20172.982%20269.586C186.634%20287.335%20205.135%20296.186%20228.48%20296.186C267.948%20296.186%20295.536%20268.672%20311.379%20213.645C322.875%20173.601%20329.307%20125.115%20330.648%2068.1882C330.773%2062.8736%20330.836%2060.2162%20329.81%2058.1189C328.918%2056.2936%20327.419%2054.7593%20325.615%2053.8241C323.543%2052.7496%20320.846%2052.7496%20315.451%2052.7496H281.752C276.521%2052.7496%20273.906%2052.7496%20271.908%2053.7319C270.126%2054.6081%20268.711%2055.9568%20267.751%2057.6953C266.675%2059.6442%20266.547%2062.3114%20266.293%2067.6459C265.272%2089.0314%20263.387%20106.562%20260.633%20120.233Z'%20fill='currentColor'/%3e%3c/svg%3e`;function Zn({children:e,accent:t=`primary`}){return(0,n.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-linear-to-br from-core-gray-50 via-core-white-900 to-core-primary-50 px-6 py-10 text-center`,children:(0,n.jsxs)(`div`,{className:`relative w-full max-w-2xl overflow-hidden rounded-3xl border border-core-gray-100 bg-core-white-900 px-8 py-12 shadow-xl sm:px-12`,children:[(0,n.jsx)(`div`,{className:`absolute -top-20 -right-20 h-48 w-48 rounded-full bg-core-primary-100 opacity-60 blur-3xl`}),(0,n.jsx)(`div`,{className:`absolute -bottom-24 -left-16 h-56 w-56 rounded-full ${t===`red`?`bg-core-red-100`:`bg-core-primary-100`} opacity-40 blur-3xl`}),(0,n.jsxs)(`div`,{className:`relative z-10 flex flex-col items-center gap-8`,children:[(0,n.jsx)(`div`,{className:`flex h-24 w-24 items-center justify-center rounded-3xl bg-core-white-900 shadow-lg ring-1 ring-core-gray-100`,children:(0,n.jsx)(`img`,{alt:`Leat`,src:Xn,className:`h-12 w-12`})}),e]})]})})}function Qn({message:e=``}){return(0,n.jsx)(Zn,{children:(0,n.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,n.jsx)(Yn,{className:`h-8 w-8 text-core-primary-500`}),e&&(0,n.jsx)(`p`,{className:`font-medium text-base text-core-gray-600 leading-7 sm:text-lg`,children:e})]})})}var V=e=>typeof e==`string`,$n=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},er=e=>e==null?``:String(e),tr=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},nr=/###/g,rr=e=>e&&e.includes(`###`)?e.replace(nr,`.`):e,ir=e=>!e||V(e),ar=(e,t,n)=>{let r=V(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(ir(e))return{};let t=rr(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return ir(e)?{}:{obj:e,k:rr(r[i])}},or=(e,t,n)=>{let{obj:r,k:i}=ar(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=ar(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=ar(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},sr=(e,t,n,r)=>{let{obj:i,k:a}=ar(e,t,Object);i[a]=i[a]||[],i[a].push(n)},cr=(e,t)=>{let{obj:n,k:r}=ar(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},lr=(e,t,n)=>{let r=cr(e,n);return r===void 0?cr(t,n):r},ur=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?V(e[r])||e[r]instanceof String||V(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):ur(e[r],t[r],n):e[r]=t[r]);return e},dr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),fr={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},pr=e=>V(e)?e.replace(/[&<>"'\/]/g,e=>fr[e]):e,mr=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},hr=[` `,`,`,`?`,`!`,`;`],gr=new mr(20),_r=(e,t,n)=>{t||=``,n||=``;let r=hr.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=gr.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},vr=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},yr=e=>e?.replace(/_/g,`-`),br={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},xr=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||br,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>V(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),V(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Sr=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Cr=class extends Sr{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):V(n)&&i?o.push(...n.split(i)):o.push(n)));let s=cr(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!V(n)?s:vr(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),or(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(V(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=cr(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ur(s,n,i):s={...s,...n},or(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},wr={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Tr=Symbol(`i18next/PATH_KEY`);function Er(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Tr?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Dr(e,t){let{[Tr]:n}=e(Er()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Or=e=>!V(e)&&typeof e!=`boolean`&&typeof e!=`number`,kr=class e extends Sr{constructor(e,t={}){super(),tr([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=xr.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Or(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!_r(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:V(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:V(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Dr(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Dr(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!V(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Or(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(V(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Or(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&V(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=V(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!V(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=V(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=wr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return V(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Dr(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!V(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(V(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!V(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Ar=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=xr.create(`languageUtils`)}getScriptPartFromCode(e){if(e=yr(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=yr(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(V(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),V(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return V(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):V(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},jr={zero:0,one:1,two:2,few:3,many:4,other:5},Mr={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Nr=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=xr.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=yr(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Mr;if(!e.match(/-|_/))return Mr;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>jr[e]-jr[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Pr=(e,t,n,r=`.`,i=!0)=>{let a=lr(e,t,n);return!a&&i&&V(n)&&(a=vr(e,n,r),a===void 0&&(a=vr(t,n,r))),a},Fr=e=>e.replace(/\$/g,`$$$$`),Ir=class{constructor(e={}){this.logger=xr.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?pr:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?dr(i):a||`{{`,this.suffix=o?dr(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?dr(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?dr(l):``,this.nestingPrefix=d?dr(d):f||dr(`$t(`),this.nestingSuffix=p?dr(p):m||dr(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Pr(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Pr(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Fr(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Fr(this.escape(e)):Fr(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=V(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !V(a)&&!this.useRawValueToEscape&&(a=er(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${dr(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!V(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!V(i))return i;V(i)||(i=er(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Lr=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Rr=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(yr(r),i),t[o]=s),s(n)}},zr=e=>(t,n,r)=>e(yr(n),r)(t),Br=class{constructor(e={}){this.logger=xr.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Rr:zr;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Rr(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&!i[0].includes(`)`)&&i.find(e=>e.includes(`)`))){let e=i.findIndex(e=>e.includes(`)`));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Lr(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Vr=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Hr=class extends Sr{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=xr.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{sr(n.loaded,[i],a),Vr(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();V(e)&&(e=this.languageUtils.toResolveHierarchy(e)),V(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Ur=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),V(e[1])&&(t.defaultValue=e[1]),V(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Wr=e=>(V(e.ns)&&(e.ns=[e.ns]),V(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),V(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Gr=()=>{},Kr=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},qr=class e extends Sr{constructor(e={},t){if(super(),this.options=Wr(e),this.services={},this.logger=xr,this.modules={external:[]},Kr(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(V(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Ur();this.options={...n,...this.options,...Wr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?xr.init(r(this.modules.logger),this.options):xr.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Br;let t=new Ar(this.options);this.store=new Cr(this.options.resources,this.options);let n=this.services;n.logger=xr,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Nr(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Ir(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Hr(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new kr(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Gr,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=$n(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Gr){let n=t,r=V(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=$n();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Gr,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&wr.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=$n();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=V(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(V(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Dr(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Dr(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Dr(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return V(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=$n();return this.options.ns?(V(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=$n();V(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Ar(Ur());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Gr){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Cr(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Ur().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Ir(n)}return a.translator=new kr(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();qr.createInstance,qr.dir,qr.init,qr.loadResources,qr.reloadResources,qr.use,qr.changeLanguage,qr.getFixedT,qr.t,qr.exists,qr.setDefaultNamespace,qr.hasLoadedNamespace,qr.loadNamespaces,qr.loadLanguages;var Jr=(e,t=`EUR`)=>new Intl.NumberFormat(qr.language,{style:`currency`,currency:t??`EUR`}).format(e/100),Yr=e=>{window.parent.postMessage(e,`*`)},Xr=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24))),Zr=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24*7))),Qr=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24*365.25))),$r=e=>e===``||e==null||e===`null`,ei=(0,h.createContext)({cameraService:1,cameraFacingMode:b.USER,primaryIdentificationMethod:g.IDENTIFIER}),ti=(0,h.createContext)({portalSession:null,setPortalSession:()=>{},mutate:async()=>{}});function H(){let e=(0,h.useContext)(ti);if(!e)throw Error(`Only use 'usePortalSessionContext' within a PortalSessionProvider`);return e}function ni(e){let{portalSession:t}=H();return(0,h.useEffect)(()=>{t.contact&&e.onContactLink?.(t.contact)},[t.contact]),(0,n.jsx)(ei.Provider,{value:{cameraService:t.input_data.camera_service,cameraFacingMode:t.input_data.facing_mode,primaryIdentificationMethod:t.input_data.primary_identification_method,...e},children:e.children})}function ri(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var ii=e=>{switch(e){case`success`:return si;case`info`:return li;case`warning`:return ci;case`error`:return ui;default:return null}},ai=Array(12).fill(0),oi=({visible:e,className:t})=>h.default.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},h.default.createElement(`div`,{className:`sonner-spinner`},ai.map((e,t)=>h.default.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),si=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},h.default.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),ci=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},h.default.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),li=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},h.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),ui=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},h.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),di=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},h.default.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),h.default.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),fi=()=>{let[e,t]=h.default.useState(document.hidden);return h.default.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},pi=1,mi=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:pi++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],h.default.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(gi(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!h.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||pi++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},hi=(e,t)=>{let n=t?.id||pi++;return mi.addToast({title:e,...t,id:n}),n},gi=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,_i=Object.assign(hi,{success:mi.success,info:mi.info,warning:mi.warning,error:mi.error,custom:mi.custom,message:mi.message,promise:mi.promise,dismiss:mi.dismiss,loading:mi.loading},{getHistory:()=>mi.toasts,getToasts:()=>mi.getActiveToasts()});ri(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function vi(e){return e.label!==void 0}var yi=3,bi=`24px`,xi=`16px`,Si=4e3,Ci=356,wi=14,Ti=45,Ei=200;function Di(...e){return e.filter(Boolean).join(` `)}function Oi(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ki=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:g,actionButtonStyle:_,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=h.default.useState(null),[k,A]=h.default.useState(null),[j,M]=h.default.useState(!1),[N,ee]=h.default.useState(!1),[P,te]=h.default.useState(!1),[ne,re]=h.default.useState(!1),[ie,F]=h.default.useState(!1),[ae,oe]=h.default.useState(0),[se,ce]=h.default.useState(0),le=h.default.useRef(n.duration||b||Si),ue=h.default.useRef(null),I=h.default.useRef(null),L=c===0,de=c+1<=o,fe=n.type,pe=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,ge=h.default.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),_e=h.default.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ve=h.default.useMemo(()=>n.duration||b||Si,[n.duration,b]),ye=h.default.useRef(0),be=h.default.useRef(0),xe=h.default.useRef(0),Se=h.default.useRef(null),[Ce,we]=x.split(`-`),Te=h.default.useMemo(()=>s.reduce((e,t,n)=>n>=ge?e:e+t.height,0),[s,ge]),Ee=fi(),De=n.invert||t,Oe=fe===`loading`;be.current=h.default.useMemo(()=>ge*S+Te,[ge,Te]),h.default.useEffect(()=>{le.current=ve},[ve]),h.default.useEffect(()=>{M(!0)},[]),h.default.useEffect(()=>{let e=I.current;if(e){let t=e.getBoundingClientRect().height;return ce(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),h.default.useLayoutEffect(()=>{if(!j)return;let e=I.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ce(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let ke=h.default.useCallback(()=>{ee(!0),oe(be.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Ei)},[n,d,a,be]);h.default.useEffect(()=>{if(n.promise&&fe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ee?(()=>{if(xe.current<ye.current){let e=new Date().getTime()-ye.current;le.current-=e}xe.current=new Date().getTime()})():le.current!==1/0&&(ye.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),ke()},le.current)),()=>clearTimeout(e)},[u,i,n,fe,Ee,ke]),h.default.useEffect(()=>{n.delete&&(ke(),n.onDismiss==null||n.onDismiss.call(n,n))},[ke,n.delete]);function Ae(){return T?.loading?h.default.createElement(`div`,{className:Di(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":fe===`loading`},T.loading):h.default.createElement(oi,{className:Di(w?.loader,n?.classNames?.loader),visible:fe===`loading`})}let je=n.icon||T?.[fe]||ii(fe);return h.default.createElement(`li`,{tabIndex:0,ref:I,className:Di(v,me,w?.toast,n?.classNames?.toast,w?.default,w?.[fe],n?.classNames?.[fe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":ie,"data-removed":N,"data-visible":de,"data-y-position":Ce,"data-x-position":we,"data-index":c,"data-front":L,"data-swiping":P,"data-dismissible":pe,"data-type":fe,"data-invert":De,"data-swipe-out":ne,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${N?ae:be.current}px`,"--initial-height":C?`auto`:`${se}px`,...m,...n.style},onDragEnd:()=>{te(!1),O(null),Se.current=null},onPointerDown:e=>{e.button!==2&&(Oe||!pe||(ue.current=new Date,oe(be.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(te(!0),Se.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(ne||!pe)return;Se.current=null;let e=Number(I.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(I.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ue.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Ti||a>.11){oe(be.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),ke(),re(!0);return}else{var o,s;(o=I.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=I.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}F(!1),te(!1),O(null)},onPointerMove:t=>{var n,r;if(!Se.current||!pe||window.getSelection()?.toString().length>0)return;let i=t.clientY-Se.current.y,a=t.clientX-Se.current.x,o=e.swipeDirections??Oi(x);!D&&(Math.abs(a)>1||Math.abs(i)>1)&&O(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(D===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&F(!0),(n=I.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=I.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},_e&&!n.jsx&&fe!==`loading`?h.default.createElement(`button`,{"aria-label":E,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!pe?()=>{}:()=>{ke(),n.onDismiss==null||n.onDismiss.call(n,n)},className:Di(w?.closeButton,n?.classNames?.closeButton)},T?.close??di):null,(fe||n.icon||n.promise)&&n.icon!==null&&(T?.[fe]!==null||n.icon)?h.default.createElement(`div`,{"data-icon":``,className:Di(w?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ae():null,n.type===`loading`?null:je):null,h.default.createElement(`div`,{"data-content":``,className:Di(w?.content,n?.classNames?.content)},h.default.createElement(`div`,{"data-title":``,className:Di(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?h.default.createElement(`div`,{"data-description":``,className:Di(y,he,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),h.default.isValidElement(n.cancel)?n.cancel:n.cancel&&vi(n.cancel)?h.default.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||g,onClick:e=>{vi(n.cancel)&&pe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),ke())},className:Di(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,h.default.isValidElement(n.action)?n.action:n.action&&vi(n.action)?h.default.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||_,onClick:e=>{vi(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&ke())},className:Di(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Ai(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function ji(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?xi:bi;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Mi=h.default.forwardRef(function(e,t){let{id:n,invert:i,position:a=`bottom-right`,hotkey:o=[`altKey`,`KeyT`],expand:s,closeButton:c,className:l,offset:u,mobileOffset:d,theme:f=`light`,richColors:p,duration:m,style:g,visibleToasts:_=yi,toastOptions:v,dir:y=Ai(),gap:b=wi,icons:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=h.default.useState([]),T=h.default.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=h.default.useMemo(()=>Array.from(new Set([a].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,a]),[D,O]=h.default.useState([]),[k,A]=h.default.useState(!1),[j,M]=h.default.useState(!1),[N,ee]=h.default.useState(f===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:f),P=h.default.useRef(null),te=o.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),ne=h.default.useRef(null),re=h.default.useRef(!1),ie=h.default.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||mi.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return h.default.useEffect(()=>mi.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{r.default.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[C]),h.default.useEffect(()=>{if(f!==`system`){ee(f);return}if(f===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ee(`dark`):ee(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{ee(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{ee(e?`dark`:`light`)}catch(e){console.error(e)}})}},[f]),h.default.useEffect(()=>{C.length<=1&&A(!1)},[C]),h.default.useEffect(()=>{let e=e=>{if(o.every(t=>e[t]||e.code===t)){var t;A(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]),h.default.useEffect(()=>{if(P.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,re.current=!1)}},[P.current]),h.default.createElement(`section`,{ref:t,"aria-label":`${S} ${te}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},E.map((t,n)=>{let[r,a]=t.split(`-`);return T.length?h.default.createElement(`ol`,{key:t,dir:y===`auto`?Ai():y,tabIndex:-1,ref:P,className:l,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":r,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${Ci}px`,"--gap":`${b}px`,...g,...ji(u,d)},onBlur:e=>{re.current&&!e.currentTarget.contains(e.relatedTarget)&&(re.current=!1,ne.current&&=(ne.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||re.current||(re.current=!0,ne.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,r)=>h.default.createElement(ki,{key:n.id,icons:x,index:r,toast:n,defaultRichColors:p,duration:v?.duration??m,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:i,visibleToasts:_,closeButton:v?.closeButton??c,interacting:j,position:t,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:ie,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:s,gap:b,expanded:k,swipeDirections:e.swipeDirections}))):null}))}),Ni=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_15_20)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23E7FBF4'/%3e%3cpath%20d='M10.6668%2017.3333L14.6668%2020L21.3335%2012'%20stroke='%23039855'%20stroke-width='1.6875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_15_20'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,Pi=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_95)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FEF3F2'/%3e%3cpath%20d='M12.0003%2012L20.0003%2020M12.0003%2020L20.0003%2012'%20stroke='%23E02731'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_95'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,Fi=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_99)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FFFAEB'/%3e%3cpath%20d='M16.0002%2017.3333V13.3333M16.0002%2020V20.0067M23.0353%2019.3333L17.942%2010.456C17.0833%208.95867%2014.9167%208.95867%2014.058%2010.456L8.96533%2019.3333C8.11266%2020.8187%209.18933%2022.6667%2010.9073%2022.6667H21.0933C22.8107%2022.6667%2023.8873%2020.8187%2023.0353%2019.3333Z'%20stroke='%23CFAA25'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_99'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200C24.8366%200%2032%207.16344%2032%2016C32%2024.8366%2024.8366%2032%2016%2032C7.16344%2032%200%2024.8366%200%2016Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,Ii=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);Ui(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Li={},Ri=(e,t,n,r)=>{Ui(n)&&Li[n]||(Ui(n)&&(Li[n]=new Date),Ii(e,t,n,r))},zi=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},Bi=(e,t,n)=>{e.loadNamespaces(t,zi(e,n))},Vi=(e,t,n,r)=>{if(Ui(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Bi(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,zi(e,r))},Hi=(e,t,n={})=>!t.languages||!t.languages.length?(Ri(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),Ui=e=>typeof e==`string`,Wi=e=>typeof e==`object`&&!!e,Gi=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ki={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},qi=e=>Ki[e],Ji={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(Gi,qi),transDefaultProps:void 0},Yi=(e={})=>{Ji={...Ji,...e}},Xi=()=>Ji,Zi,Qi=e=>{Zi=e},$i=()=>Zi,ea={type:`3rdParty`,init(e){Yi(e.options.react),Qi(e)}},ta=(0,t.createContext)(),na=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},ra=d((e=>{var t=require("react");function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),ia=d((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}function n(e,t){d||a.startTransition===void 0||(d=!0,console.error(`You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.`));var n=t();if(!f){var i=t();o(n,i)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),f=!0)}i=s({inst:{value:n,getSnapshot:t}});var p=i[0].inst,m=i[1];return l(function(){p.value=n,p.getSnapshot=t,r(p)&&m({inst:p})},[e,n,t]),c(function(){return r(p)&&m({inst:p}),e(function(){r(p)&&m({inst:p})})},[e]),u(n),n}function r(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch{return!0}}function i(e,t){return t()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=require("react"),o=typeof Object.is==`function`?Object.is:t,s=a.useState,c=a.useEffect,l=a.useLayoutEffect,u=a.useDebugValue,d=!1,f=!1,p=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?i:n;e.useSyncExternalStore=a.useSyncExternalStore===void 0?p:a.useSyncExternalStore,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),aa=d(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=ra():t.exports=ia()}))(),oa={t:(e,t)=>{if(Ui(t))return t;if(Wi(t)&&Ui(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},sa=()=>()=>{},U=(e,n={})=>{let{i18n:r}=n,{i18n:i,defaultNS:a}=(0,t.useContext)(ta)||{},o=r||i||$i();o&&!o.reportNamespaces&&(o.reportNamespaces=new na),o||Ri(o,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let s=(0,t.useMemo)(()=>({...Xi(),...o?.options?.react,...n}),[o,n]),{useSuspense:c,keyPrefix:l}=s,u=e||a||o?.options?.defaultNS,d=Ui(u)?[u]:u||[`translation`],f=(0,t.useMemo)(()=>d,d);o?.reportNamespaces?.addUsedNamespaces?.(f);let p=(0,t.useRef)(0),m=(0,t.useCallback)(e=>{if(!o)return sa;let{bindI18n:t,bindI18nStore:n}=s,r=()=>{p.current+=1,e()};return t&&o.on(t,r),n&&o.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>o.off(e,r)),n&&n.split(` `).forEach(e=>o.store.off(e,r))}},[o,s]),h=(0,t.useRef)(),g=(0,t.useCallback)(()=>{if(!o)return oa;let e=!!(o.isInitialized||o.initializedStoreOnce)&&f.every(e=>Hi(e,o,s)),t=n.lng||o.language,r=p.current,i=h.current;if(i&&i.ready===e&&i.lng===t&&i.keyPrefix===l&&i.revision===r)return i;let a={t:o.getFixedT(t,s.nsMode===`fallback`?f:f[0],l,{scopeNs:f}),ready:e,lng:t,keyPrefix:l,revision:r};return h.current=a,a},[o,f,l,s,n.lng]),[_,v]=(0,t.useState)(0),{t:y,ready:b}=(0,aa.useSyncExternalStore)(m,g,g);(0,t.useEffect)(()=>{if(o&&!b&&!c){let e=()=>v(e=>e+1);n.lng?Vi(o,n.lng,f,e):Bi(o,f,e)}},[o,n.lng,f,b,c,_]);let x=o||{},S=(0,t.useRef)(null),C=(0,t.useRef)(),w=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},T=(0,t.useMemo)(()=>{let e=x,t=e?.language,n=e;e&&(S.current&&S.current.__original===e&&C.current===t?n=S.current:(n=w(e),S.current=n,C.current=t));let r=!b&&!c?(...e)=>(Ri(o,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),y(...e)):y,i=[r,n,b];return i.t=r,i.i18n=n,i.ready=b,i},[y,x,b,x.resolvedLanguage,x.language,x.languages]);if(o&&c&&!b)throw new Promise(e=>{let t=()=>e();n.lng?Vi(o,n.lng,f,t):Bi(o,f,t)});return T};function ca(){let{t:e}=U(),t=(0,n.jsx)(`img`,{src:Ni,alt:`success`}),r=(0,n.jsx)(`img`,{src:Pi,alt:`error`}),i=(0,n.jsx)(`img`,{src:Fi,alt:`warning`}),a=(e,t)=>{if(e===`success`)return o(t);c(t)},o=(n=e(`success`),r={})=>{_i.success(n,{icon:t,...r})},s=(t=e(`warning`))=>{_i.warning(t,{icon:i})},c=(t=e(`somethingWentWrong`))=>{let i=typeof t==`string`?t:t.response?.data.message,a=typeof t==`string`?void 0:t.response?.data.errors,o=(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`p`,{children:i}),a&&Object.keys(a).map(e=>a[e].map(e=>(0,n.jsx)(`li`,{children:e},e)))]});_i.error(o,{icon:r})};return{toast:a,successToast:o,warningToast:s,errorToast:c}}var la=Object.prototype.hasOwnProperty;function ua(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ua(e[r],t[r]););return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(la.call(e,n)&&++r&&!la.call(t,n)||!(n in t)||!ua(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var da=new WeakMap,fa=()=>{},pa=Object,ma=e=>e===void 0,ha=e=>typeof e==`function`,ga=(e,t)=>({...e,...t}),_a=e=>ha(e.then),va={},ya={},ba=`undefined`,xa=typeof window!=ba,Sa=typeof document!=ba,Ca=xa&&`Deno`in window,wa=()=>xa&&typeof window.requestAnimationFrame!=ba,Ta=(e,t)=>{let n=da.get(e);return[()=>!ma(t)&&e.get(t)||va,r=>{if(!ma(t)){let i=e.get(t);t in ya||(ya[t]=i),n[5](t,ga(i,r),i||va)}},n[6],()=>!ma(t)&&t in ya?ya[t]:!ma(t)&&e.get(t)||va]},Ea=!0,Da=()=>Ea,[Oa,ka]=xa&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[fa,fa],Aa=()=>{let e=Sa&&document.visibilityState;return ma(e)||e!==`hidden`},ja=e=>(Sa&&document.addEventListener(`visibilitychange`,e),Oa(`focus`,e),()=>{Sa&&document.removeEventListener(`visibilitychange`,e),ka(`focus`,e)}),Ma=e=>{let t=()=>{Ea=!0,e()},n=()=>{Ea=!1};return Oa(`online`,t),Oa(`offline`,n),()=>{ka(`online`,t),ka(`offline`,n)}},Na={isOnline:Da,isVisible:Aa},Pa={initFocus:ja,initReconnect:Ma},Fa=!h.default.useId,Ia=!xa||Ca,La=e=>wa()?window.requestAnimationFrame(e):setTimeout(e,1),Ra=Ia?h.useEffect:h.useLayoutEffect,za=typeof navigator<`u`&&navigator.connection,Ba=!Ia&&za&&([`slow-2g`,`2g`].includes(za.effectiveType)||za.saveData),Va=new WeakMap,Ha=e=>pa.prototype.toString.call(e),Ua=(e,t)=>e===`[object ${t}]`,Wa=0,Ga=e=>{let t=typeof e,n=Ha(e),r=Ua(n,`Date`),i=Ua(n,`RegExp`),a=Ua(n,`Object`),o,s;if(pa(e)===e&&!r&&!i){if(o=Va.get(e),o)return o;if(o=++Wa+`~`,Va.set(e,o),Array.isArray(e)){for(o=`@`,s=0;s<e.length;s++)o+=Ga(e[s])+`,`;Va.set(e,o)}if(a){o=`#`;let t=pa.keys(e).sort();for(;!ma(s=t.pop());)ma(e[s])||(o+=s+`:`+Ga(e[s])+`,`);Va.set(e,o)}}else o=r?e.toJSON():t==`symbol`?e.toString():t==`string`?JSON.stringify(e):``+e;return o},Ka=e=>{if(ha(e))try{e=e()}catch{e=``}let t=e;return e=typeof e==`string`?e:(Array.isArray(e)?e.length:e)?Ga(e):``,[e,t]},qa=0,Ja=()=>++qa;async function Ya(...e){let[t,n,r,i]=e,a=ga({populateCache:!0,throwOnError:!0},typeof i==`boolean`?{revalidate:i}:i||{}),o=a.populateCache,s=a.rollbackOnError,c=a.optimisticData,l=e=>typeof s==`function`?s(e):s!==!1,u=a.throwOnError;if(ha(n)){let e=n,r=[],i=t.keys();for(let n of i)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(d))}return d(n);async function d(n){let[i]=Ka(n);if(!i)return;let[s,d]=Ta(t,i),[f,p,m,h]=da.get(t),g=()=>{let e=f[i];return(ha(a.revalidate)?a.revalidate(s().data,n):a.revalidate!==!1)&&(delete m[i],delete h[i],e&&e[0])?e[0](2).then(()=>s().data):s().data};if(e.length<3)return g();let _=r,v,y=!1,b=Ja();p[i]=[b,0];let x=!ma(c),S=s(),C=S.data,w=S._c,T=ma(w)?C:w;if(x&&(c=ha(c)?c(T,C):c,d({data:c,_c:T})),ha(_))try{_=_(T)}catch(e){v=e,y=!0}if(_&&_a(_))if(_=await _.catch(e=>{v=e,y=!0}),b!==p[i][0]){if(y)throw v;return _}else y&&x&&l(v)&&(o=!0,d({data:T,_c:void 0}));if(o&&(y||(ha(o)?d({data:o(_,T),error:void 0,_c:void 0}):d({data:_,error:void 0,_c:void 0}))),p[i][1]=Ja(),Promise.resolve(g()).then(()=>{d({_c:void 0})}),y){if(u)throw v;return}return _}}var Xa=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},Za=(e,t)=>{if(!da.has(e)){let n=ga(Pa,t),r=Object.create(null),i=Ya.bind(void 0,e),a=fa,o=Object.create(null),s=(e,t)=>{let n=o[e]||[];return o[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},c=(t,n,r)=>{e.set(t,n);let i=o[t];if(i)for(let e of i)e(n,r)},l=()=>{if(!da.has(e)&&(da.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,c,s]),!Ia)){let t=n.initFocus(setTimeout.bind(void 0,Xa.bind(void 0,r,0))),i=n.initReconnect(setTimeout.bind(void 0,Xa.bind(void 0,r,1)));a=()=>{t&&t(),i&&i(),da.delete(e)}}};return l(),[e,i,l,a]}return[e,da.get(e)[4]]},Qa=(e,t,n,r,i)=>{let a=n.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!ma(a)&&o>a||setTimeout(r,s,i)},$a=ua,[eo,to]=Za(new Map),no=ga({onLoadingSlow:fa,onSuccess:fa,onError:fa,onErrorRetry:Qa,onDiscarded:fa,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ba?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Ba?5e3:3e3,compare:$a,isPaused:()=>!1,cache:eo,mutate:to,fallback:{}},Na),ro=(e,t)=>{let n=ga(e,t);if(t){let{use:r,fallback:i}=e,{use:a,fallback:o}=t;r&&a&&(n.use=r.concat(a)),i&&o&&(n.fallback=ga(i,o))}return n},io=(0,h.createContext)({}),ao=e=>{let{value:t}=e,n=(0,h.useContext)(io),r=ha(t),i=(0,h.useMemo)(()=>r?t(n):t,[r,n,t]),a=(0,h.useMemo)(()=>r?i:ro(n,i),[r,n,i]),o=i&&i.provider,s=(0,h.useRef)(void 0);o&&!s.current&&(s.current=Za(o(a.cache||eo),i));let c=s.current;return c&&(a.cache=c[0],a.mutate=c[1]),Ra(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,h.createElement)(io.Provider,ga(e,{value:a}))},oo=xa&&window.__SWR_DEVTOOLS_USE__,so=oo?window.__SWR_DEVTOOLS_USE__:[],co=()=>{oo&&(window.__SWR_DEVTOOLS_REACT__=h.default)},lo=e=>ha(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],uo=()=>{let e=(0,h.useContext)(io);return(0,h.useMemo)(()=>ga(no,e),[e])},fo=so.concat(e=>(t,n,r)=>e(t,n&&((...e)=>{let[r]=Ka(t),[,,,i]=da.get(eo);if(r.startsWith(`$inf$`))return n(...e);let a=i[r];return ma(a)?n(...e):(delete i[r],a)}),r)),po=e=>function(...t){let n=uo(),[r,i,a]=lo(t),o=ro(n,a),s=e,{use:c}=o,l=(c||[]).concat(fo);for(let e=l.length;e--;)s=l[e](s);return s(r,i||o.fetcher||null,o)},mo=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};co();var ho=h.default.use||(e=>{switch(e.status){case`pending`:throw e;case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:throw e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}),e}}),go={dedupe:!0},_o=Promise.resolve(void 0),vo=()=>fa,yo=(e,t,n)=>{let{cache:r,compare:i,suspense:a,fallbackData:o,revalidateOnMount:s,revalidateIfStale:c,refreshInterval:l,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:f,strictServerPrefetchWarning:p}=n,[m,g,_,v]=da.get(r),[y,b]=Ka(e),x=(0,h.useRef)(!1),S=(0,h.useRef)(!1),C=(0,h.useRef)(y),w=(0,h.useRef)(t),T=(0,h.useRef)(n),E=()=>T.current,D=()=>E().isVisible()&&E().isOnline(),[O,k,A,j]=Ta(r,y),M=(0,h.useRef)({}).current,N=ma(o)?ma(n.fallback)?void 0:n.fallback[y]:o,ee=(e,t)=>{for(let n in M){let r=n;if(r===`data`){if(!i(e[r],t[r])&&(!ma(e[r])||!i(se,t[r])))return!1}else if(t[r]!==e[r])return!1}return!0},P=!x.current,te=(0,h.useMemo)(()=>{let e=O(),n=j(),r=e=>{let n=ga(e);return delete n._k,!(!y||!t||E().isPaused())&&(P&&!ma(s)?s:ma(ma(N)?n.data:N)||c)?{isValidating:!0,isLoading:!0,...n}:n},i=r(e),a=e===n?i:r(n),o=i;return[()=>{let e=r(O());return ee(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]},[r,y]),ne=(0,aa.useSyncExternalStore)((0,h.useCallback)(e=>A(y,(t,n)=>{ee(n,t)||e()}),[r,y]),te[0],te[1]),re=m[y]&&m[y].length>0,ie=ne.data,F=ma(ie)?N&&_a(N)?ho(N):N:ie,ae=ne.error,oe=(0,h.useRef)(F),se=f?ma(ie)?ma(oe.current)?F:oe.current:ie:F,ce=y&&ma(F),le=(0,h.useRef)(null);!Ia&&(0,aa.useSyncExternalStore)(vo,()=>(le.current=!1,le),()=>(le.current=!0,le));let ue=le.current;p&&ue&&!a&&ce&&console.warn(`Missing pre-initiated data for serialized key "${y}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let I=!y||!t||E().isPaused()||re&&!ma(ae)?!1:P&&!ma(s)?s:a?ma(F)?!1:c:ma(F)||c,L=P&&I,de=ma(ne.isValidating)?L:ne.isValidating,fe=ma(ne.isLoading)?L:ne.isLoading,pe=(0,h.useCallback)(async e=>{let t=w.current;if(!y||!t||S.current||E().isPaused())return!1;let r,a,o=!0,s=e||{},c=!_[y]||!s.dedupe,l=()=>Fa?!S.current&&y===C.current&&x.current:y===C.current,u={isValidating:!1,isLoading:!1},d=()=>{k(u)},f=()=>{let e=_[y];e&&e[1]===a&&delete _[y]},p={isValidating:!0};ma(O().data)&&(p.isLoading=!0);try{if(c&&(k(p),n.loadingTimeout&&ma(O().data)&&setTimeout(()=>{o&&l()&&E().onLoadingSlow(y,n)},n.loadingTimeout),_[y]=[t(b),Ja()]),[r,a]=_[y],r=await r,c&&setTimeout(f,n.dedupingInterval),!_[y]||_[y][1]!==a)return c&&l()&&E().onDiscarded(y),!1;u.error=void 0;let e=g[y];if(!ma(e)&&(a<=e[0]||a<=e[1]||e[1]===0))return d(),c&&l()&&E().onDiscarded(y),!1;let s=O().data;u.data=i(s,r)?s:r,c&&l()&&E().onSuccess(r,y,n)}catch(e){f();let t=E(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,c&&l()&&(t.onError(e,y,t),(n===!0||ha(n)&&n(e))&&(!E().revalidateOnFocus||!E().revalidateOnReconnect||D())&&t.onErrorRetry(e,y,t,e=>{let t=m[y];t&&t[0]&&t[0](3,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[y,r]),me=(0,h.useCallback)((...e)=>Ya(r,C.current,...e),[]);if(Ra(()=>{w.current=t,T.current=n,ma(ie)||(oe.current=ie)}),Ra(()=>{if(!y)return;let e=pe.bind(void 0,go),t=0;E().revalidateOnFocus&&(t=Date.now()+E().focusThrottleInterval);let n=mo(y,m,(n,r={})=>{if(n==0){let n=Date.now();E().revalidateOnFocus&&n>t&&D()&&(t=n+E().focusThrottleInterval,e())}else if(n==1)E().revalidateOnReconnect&&D()&&e();else if(n==2)return pe();else if(n==3)return pe(r)});return S.current=!1,C.current=y,x.current=!0,k({_k:b}),I&&(_[y]||(ma(F)||Ia?e():La(e))),()=>{S.current=!0,n()}},[y]),Ra(()=>{let e;function t(){let t=ha(l)?l(O().data):l;t&&e!==-1&&(e=setTimeout(n,t))}function n(){!O().error&&(u||E().isVisible())&&(d||E().isOnline())?pe(go).then(t):t()}return t(),()=>{e&&=(clearTimeout(e),-1)}},[l,u,d,y]),(0,h.useDebugValue)(se),a){if(!Fa&&Ia&&ce)throw Error(`Fallback data is required when using Suspense in SSR.`);ce&&(w.current=t,T.current=n,S.current=!1);let e=v[y];if(ho(!ma(e)&&ce?me(e):_o),!ma(ae)&&ce)throw ae;let r=ce?pe(go):_o;!ma(se)&&ce&&(r.status=`fulfilled`,r.value=!0),ho(r)}return{mutate:me,get data(){return M.data=!0,se},get error(){return M.error=!0,ae},get isValidating(){return M.isValidating=!0,de},get isLoading(){return M.isLoading=!0,fe}}};pa.defineProperty(ao,`defaultValue`,{value:no});var bo=po(yo);function xo(e){let t=qn(),{errorToast:n}=ca(),{data:r,error:i,isValidating:a,mutate:o}=bo((0,h.useMemo)(()=>e.url?e.params?[e.url,JSON.stringify(e.params)]:[e.url]:null,[e.url,JSON.stringify(e.params)]),([n,r])=>r?t.get(n,e.params):t.get(n),{shouldRetryOnError:!1,revalidateOnFocus:e.revalidateOnFocus,revalidateOnMount:e.revalidateOnMount,refreshInterval:e.refreshInterval});return(0,h.useEffect)(()=>{r&&e.dataSetter(r.data.data,r.data.meta)},[r]),(0,h.useEffect)(()=>{i&&n(i)},[i]),{data:r,pending:a,error:i,isValidating:a,mutate:o}}function So({message:e}){return(0,n.jsxs)(Zn,{accent:`red`,children:[(0,n.jsxs)(`div`,{className:`space-y-3`,children:[(0,n.jsx)(`p`,{className:`font-semibold text-core-primary-500 text-sm uppercase tracking-[0.2em]`,children:`PortalSessions`}),(0,n.jsx)(`h1`,{className:`font-semibold text-3xl text-core-gray-900 tracking-tight sm:text-5xl`,children:`Session Unavailable`})]}),e&&(0,n.jsx)(`div`,{className:`w-full rounded-2xl border border-core-red-100 bg-core-red-50 px-5 py-4 font-medium text-core-red-700 text-sm`,children:e})]})}function Co(e){let[t,r]=(0,h.useState)(null),i=e.uuid,{mutate:a,error:o,pending:s}=xo({url:i,dataSetter:r});return t?t.status===_.EXPIRED?(0,n.jsx)(So,{message:`Portal session with uuid ${i} has expired.`}):(0,n.jsx)(ti.Provider,{value:{uuid:i,portalSession:t,setPortalSession:r,mutate:a,error:o},children:e.children}):(0,n.jsx)(Qn,{message:`Awaiting new session`})}function wo(){let e=(0,h.useContext)(ei);if(!e)throw Error(`Only use 'useConfigurationContext' within a ConfigurationContext Provider`);return e}var To=[{id:`session`,label:`Session`},{id:`configuration`,label:`Configuration`},{id:`inputData`,label:`Input data`},{id:`raw`,label:`Raw JSON`}];function Eo(e){navigator?.clipboard?.writeText&&navigator.clipboard.writeText(e)}function Do(e){if(e===void 0)return`—`;if(e===null)return`null`;if(typeof e==`string`)return e||`—`;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function Oo({label:e,value:t}){let r=Do(t),i=typeof t==`string`&&t.length>0;return(0,n.jsxs)(`div`,{className:`flex items-start justify-between gap-3 border-white/5 border-b py-2 last:border-none`,children:[(0,n.jsx)(`span`,{className:`shrink-0 font-medium text-[11px] text-white/50 uppercase tracking-wider`,children:e}),(0,n.jsx)(`button`,{type:`button`,title:i?`Click to copy`:void 0,onClick:i?()=>Eo(r):void 0,className:`break-all text-right font-mono text-[12px] text-white ${i?`cursor-pointer hover:text-emerald-300`:`cursor-default`}`,children:r})]})}function ko({title:e,children:t}){return(0,n.jsxs)(`div`,{className:`rounded-xl border border-white/10 bg-white/[0.03] p-4`,children:[(0,n.jsx)(`p`,{className:`m-0 mb-2 font-semibold text-[11px] text-emerald-300 uppercase tracking-widest`,children:e}),(0,n.jsx)(`div`,{className:`flex flex-col`,children:t})]})}function Ao(){let e=wo(),{uuid:t,portalSession:r,error:i}=H(),[a,o]=(0,h.useState)(!1),[s,c]=(0,h.useState)(`session`);(0,h.useEffect)(()=>{let e=e=>{e.key===`Escape`&&o(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let l=r?.input_data??{},u={uuid:t,type:r?.type,contact:r?.contact,currency:r?.currency,loyaltyProgram:r?.loyalty_program,events:r?.events,results:r?.results,inputData:l,error:i?.message},d=Object.entries(e).filter(([,e])=>typeof e!=`function`),f=Object.entries(e).filter(([,e])=>typeof e==`function`);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`fixed top-2 left-1/2 z-[2147483646] flex -translate-x-1/2 transform items-center gap-2 rounded-full border border-white/10 bg-zinc-900/90 px-3 py-1.5 font-medium text-white text-xs shadow-black/30 shadow-lg backdrop-blur transition-all hover:scale-[1.02] hover:bg-zinc-800/95`,"aria-label":`Toggle debug panel`,children:[(0,n.jsx)(`span`,{className:`inline-flex h-2 w-2 animate-pulse rounded-full bg-emerald-400`}),(0,n.jsx)(`span`,{className:`tracking-wide`,children:`DEBUG`}),(0,n.jsx)(`span`,{className:`hidden font-mono text-[10px] text-white/40 sm:inline`,children:t?.slice(0,8)||`no-session`})]}),a&&(0,n.jsxs)(`div`,{className:`fixed inset-0 z-[2147483647] flex items-start justify-center bg-black/40 p-4 backdrop-blur-sm sm:p-8`,children:[(0,n.jsx)(`button`,{type:`button`,"aria-label":`Close debug panel`,className:`absolute inset-0 cursor-default`,onClick:()=>o(!1)}),(0,n.jsxs)(`div`,{className:`relative flex max-h-[calc(100vh-2rem)] w-full max-w-3xl flex-col overflow-hidden rounded-2xl border border-white/10 bg-gradient-to-b from-zinc-900 to-zinc-950 text-white shadow-2xl shadow-black/50`,children:[(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-white/10 border-b px-5 py-4`,children:[(0,n.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,n.jsx)(`span`,{className:`inline-flex h-2.5 w-2.5 animate-pulse rounded-full bg-emerald-400`}),(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`p`,{className:`m-0 font-semibold text-sm`,children:`Portal PointsTransactionSession Debug`}),(0,n.jsx)(`p`,{className:`m-0 font-mono text-[11px] text-white/50`,children:t||`no session uuid`})]})]}),(0,n.jsx)(`button`,{type:`button`,onClick:()=>o(!1),className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-white/60 transition-colors hover:bg-white/10 hover:text-white`,"aria-label":`Close`,children:`✕`})]}),(0,n.jsx)(`div`,{className:`flex gap-1 border-white/10 border-b px-3 pt-3`,children:To.map(e=>{let t=s===e.id;return(0,n.jsxs)(`button`,{type:`button`,onClick:()=>c(e.id),className:`relative -mb-px cursor-pointer rounded-t-md px-3 py-2 font-medium text-xs transition-colors ${t?`border-white/10 border-x border-t bg-white/[0.04] text-white`:`text-white/60 hover:text-white`}`,children:[e.label,t&&(0,n.jsx)(`span`,{className:`absolute inset-x-0 -bottom-px h-0.5 bg-emerald-400`})]},e.id)})}),(0,n.jsxs)(`div`,{className:`flex-1 space-y-3 overflow-auto p-5`,children:[s===`session`&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ko,{title:`Identity`,children:[(0,n.jsx)(Oo,{label:`PointsTransactionSession UUID`,value:t}),(0,n.jsx)(Oo,{label:`Type`,value:r?.type}),(0,n.jsx)(Oo,{label:`Contact UUID`,value:r?.contact?.uuid}),(0,n.jsx)(Oo,{label:`Currency`,value:r?.currency})]}),(0,n.jsxs)(ko,{title:`Loyalty program`,children:[(0,n.jsx)(Oo,{label:`Name`,value:r?.loyalty_program?.name}),(0,n.jsx)(Oo,{label:`Max amount`,value:r?.loyalty_program?.max_amount}),(0,n.jsx)(Oo,{label:`Custom credit name`,value:r?.loyalty_program?.custom_credit_name})]}),(0,n.jsxs)(ko,{title:`Events`,children:[(0,n.jsx)(Oo,{label:`Count`,value:r?.events?.length??0}),r?.events?.slice(-3).map((e,t)=>(0,n.jsx)(Oo,{label:e.type,value:e.created_at},`${e.type}-${e.created_at}-${t}`))]}),i&&(0,n.jsx)(ko,{title:`Error`,children:(0,n.jsx)(Oo,{label:`Message`,value:i.message})})]}),s===`configuration`&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ko,{title:`Props`,children:[d.length===0&&(0,n.jsx)(`p`,{className:`m-0 py-2 text-[12px] text-white/40`,children:`No configuration provided.`}),d.map(([e,t])=>(0,n.jsx)(Oo,{label:e,value:t},e))]}),(0,n.jsxs)(ko,{title:`Callbacks`,children:[f.length===0&&(0,n.jsx)(`p`,{className:`m-0 py-2 text-[12px] text-white/40`,children:`No callbacks registered.`}),f.map(([e])=>(0,n.jsx)(Oo,{label:e,value:`ƒ registered`},e))]})]}),s===`inputData`&&(0,n.jsxs)(ko,{title:`Resolved input data`,children:[Object.entries(l).length===0&&(0,n.jsx)(`p`,{className:`m-0 py-2 text-[12px] text-white/40`,children:`No input data available.`}),Object.entries(l).map(([e,t])=>(0,n.jsx)(Oo,{label:e,value:t},e))]}),s===`raw`&&(0,n.jsxs)(`div`,{className:`rounded-xl border border-white/10 bg-black/40 p-4`,children:[(0,n.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,n.jsx)(`p`,{className:`m-0 font-semibold text-[11px] text-emerald-300 uppercase tracking-widest`,children:`Raw snapshot`}),(0,n.jsx)(`button`,{type:`button`,onClick:()=>Eo(JSON.stringify(u,null,2)),className:`cursor-pointer rounded-md bg-white/10 px-2 py-1 text-[11px] text-white/80 transition-colors hover:bg-white/20`,children:`Copy JSON`})]}),(0,n.jsx)(`pre`,{className:`m-0 max-h-[60vh] overflow-auto font-mono text-[11px] text-white/80 leading-relaxed`,children:JSON.stringify(u,null,2)})]})]}),(0,n.jsxs)(`div`,{className:`border-white/10 border-t px-5 py-3 text-[11px] text-white/40`,children:[`Press `,(0,n.jsx)(`kbd`,{className:`rounded bg-white/10 px-1 py-0.5`,children:`Esc`}),` `,`to close · Click any value to copy`]})]})]})]})}var jo=m(d(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(require("react")):typeof define==`function`&&define.amd?define([`react`],r):typeof e==`object`?e.ReactSimpleKeyboard=r(require("react")):n.ReactSimpleKeyboard=r(n.React)})(e,(function(e){return function(){var t={981:function(){typeof Element>`u`||`remove`in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<`u`&&`document`in self&&((!(`classList`in document.createElement(`_`))||document.createElementNS&&!(`classList`in document.createElementNS(`http://www.w3.org/2000/svg`,`g`)))&&function(e){"use strict";if(`Element`in e){var t=`classList`,n=`prototype`,r=e.Element[n],i=Object,a=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,``)},o=Array[n].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},s=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},c=function(e,t){if(t===``)throw new s(`SYNTAX_ERR`,`The token must not be empty.`);if(/\s/.test(t))throw new s(`INVALID_CHARACTER_ERR`,`The token must not contain space characters.`);return o.call(e,t)},l=function(e){for(var t=a.call(e.getAttribute(`class`)||``),n=t?t.split(/\s+/):[],r=0,i=n.length;r<i;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute(`class`,this.toString())}},u=l[n]=[],d=function(){return new l(this)};if(s[n]=Error[n],u.item=function(e){return this[e]||null},u.contains=function(e){return~c(this,e+``)},u.add=function(){var e,t=arguments,n=0,r=t.length,i=!1;do~c(this,e=t[n]+``)||(this.push(e),i=!0);while(++n<r);i&&this._updateClassName()},u.remove=function(){var e,t,n=arguments,r=0,i=n.length,a=!1;do for(t=c(this,e=n[r]+``);~t;)this.splice(t,1),a=!0,t=c(this,e);while(++r<i);a&&this._updateClassName()},u.toggle=function(e,t){var n=this.contains(e),r=n?!0!==t&&`remove`:!1!==t&&`add`;return r&&this[r](e),!0===t||!1===t?t:!n},u.replace=function(e,t){var n=c(e+``);~n&&(this.splice(n,1,t),this._updateClassName())},u.toString=function(){return this.join(` `)},i.defineProperty){var f={get:d,enumerable:!0,configurable:!0};try{i.defineProperty(r,t,f)}catch(e){e.number!==void 0&&e.number!==-2146823252||(f.enumerable=!1,i.defineProperty(r,t,f))}}else i[n].__defineGetter__&&r.__defineGetter__(t,d)}}(self),function(){"use strict";var e=document.createElement(`_`);if(e.classList.add(`c1`,`c2`),!e.classList.contains(`c2`)){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var n,r=arguments.length;for(n=0;n<r;n++)e=arguments[n],t.call(this,e)}};t(`add`),t(`remove`)}if(e.classList.toggle(`c3`,!1),e.classList.contains(`c3`)){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:n.call(this,e)}}`replace`in document.createElement(`_`).classList||(DOMTokenList.prototype.replace=function(e,t){var n=this.toString().split(` `),r=n.indexOf(e+``);~r&&(n=n.slice(r),this.remove.apply(this,n),this.add(t),this.add.apply(this,n.slice(1)))}),e=null}())},548:function(e){e.exports=function(){"use strict";var e={9306:function(e,t,n){var r=n(4901),i=n(6823),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not a function`)}},5548:function(e,t,n){var r=n(3517),i=n(6823),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not a constructor`)}},3506:function(e,t,n){var r=n(3925),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(`Can't set `+i(e)+` as a prototype`)}},6469:function(e,t,n){var r=n(8227),i=n(2360),a=n(4913).f,o=r(`unscopables`),s=Array.prototype;s[o]===void 0&&a(s,o,{configurable:!0,value:i(null)}),e.exports=function(e){s[o][e]=!0}},7829:function(e,t,n){var r=n(8183).charAt;e.exports=function(e,t,n){return t+(n&&r(e,t).length||1)}},8551:function(e,t,n){var r=n(34),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not an object`)}},235:function(e,t,n){var r=n(9213).forEach;e.exports=n(4598)(`forEach`)?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},7916:function(e,t,n){var r=n(6080),i=n(9565),a=n(8981),o=n(6319),s=n(4209),c=n(3517),l=n(6198),u=n(4659),d=n(4527),f=n(81),p=n(851),m=n(9539),h=Array;e.exports=function(e){var t=c(this),n=arguments.length,g=n>1?arguments[1]:void 0,_=g!==void 0;_&&(g=r(g,n>2?arguments[2]:void 0));var v,y,b,x,S,C,w=a(e),T=p(w),E=0;if(!T||this===h&&s(T))for(v=l(w),y=t?new this(v):h(v);v>E;E++)C=_?g(w[E],E):w[E],u(y,E,C);else for(y=t?new this:[],S=(x=f(w,T)).next;!(b=i(S,x)).done;E++){C=_?o(x,g,[b.value,E],!0):b.value;try{u(y,E,C)}catch(e){m(x,`throw`,e)}}return d(y,E),y}},9617:function(e,t,n){var r=n(5397),i=n(5610),a=n(6198),o=function(e){return function(t,n,o){var s=r(t),c=a(s);if(c===0)return!e&&-1;var l,u=i(o,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},9213:function(e,t,n){var r=n(6080),i=n(7055),a=n(8981),o=n(6198),s=n(1469),c=n(4659),l=function(e){var t=e===1,n=e===2,l=e===3,u=e===4,d=e===6,f=e===7,p=e===5||d;return function(m,h,g){for(var _,v,y=a(m),b=i(y),x=o(b),S=r(h,g),C=0,w=0,T=t?s(m,x):n||f?s(m,0):void 0;x>C;C++)if((p||C in b)&&(v=S(_=b[C],C,y),e))if(t)c(T,C,v);else if(v)switch(e){case 3:return!0;case 5:return _;case 6:return C;case 2:c(T,w++,_)}else switch(e){case 4:return!1;case 7:c(T,w++,_)}return d?-1:l||u?u:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},597:function(e,t,n){var r=n(9039),i=n(8227),a=n(9519),o=i(`species`);e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},t[e](Boolean).foo!==1}))}},4598:function(e,t,n){var r=n(9039);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},926:function(e,t,n){var r=n(9306),i=n(8981),a=n(7055),o=n(6198),s=TypeError,c=`Reduce of empty array with no initial value`,l=function(e){return function(t,n,l,u){var d=i(t),f=a(d),p=o(d);if(r(n),p===0&&l<2)throw new s(c);var m=e?p-1:0,h=e?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,e?m<0:p<=m)throw new s(c)}for(;e?m>=0:p>m;m+=h)m in f&&(u=n(u,f[m],m,d));return u}};e.exports={left:l(!1),right:l(!0)}},4527:function(e,t,n){var r=n(3724),i=n(4376),a=TypeError,o=Object.getOwnPropertyDescriptor;e.exports=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(i(e)&&!o(e,`length`).writable)throw new a(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t}},7680:function(e,t,n){e.exports=n(9504)([].slice)},4488:function(e,t,n){var r=n(7680),i=Math.floor,a=function(e,t){var n=e.length;if(n<8)for(var o,s,c=1;c<n;){for(s=c,o=e[c];s&&t(e[s-1],o)>0;)e[s]=e[--s];s!==c++&&(e[s]=o)}else for(var l=i(n/2),u=a(r(e,0,l),t),d=a(r(e,l),t),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)e[m+h]=m<f&&h<p?t(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return e};e.exports=a},7433:function(e,t,n){var r=n(4376),i=n(3517),a=n(34),o=n(8227)(`species`),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||a(t)&&(t=t[o])===null)&&(t=void 0)),t===void 0?s:t}},1469:function(e,t,n){var r=n(7433);e.exports=function(e,t){return new(r(e))(t===0?0:t)}},6319:function(e,t,n){var r=n(8551),i=n(9539);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){i(e,`throw`,t)}}},4428:function(e,t,n){var r=n(8227)(`iterator`),i=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){i=!0}};o[r]=function(){return this},Array.from(o,(function(){throw 2}))}catch{}e.exports=function(e,t){try{if(!t&&!i)return!1}catch{return!1}var n=!1;try{var a={};a[r]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch{}return n}},2195:function(e,t,n){var r=n(9504),i=r({}.toString),a=r(``.slice);e.exports=function(e){return a(i(e),8,-1)}},6955:function(e,t,n){var r=n(2140),i=n(4901),a=n(2195),o=n(8227)(`toStringTag`),s=Object,c=a(function(){return arguments}())===`Arguments`;e.exports=r?a:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=s(e),o))==`string`?n:c?a(t):(r=a(t))===`Object`&&i(t.callee)?`Arguments`:r}},7740:function(e,t,n){var r=n(9297),i=n(5031),a=n(7347),o=n(4913);e.exports=function(e,t,n){for(var s=i(t),c=o.f,l=a.f,u=0;u<s.length;u++){var d=s[u];r(e,d)||n&&r(n,d)||c(e,d,l(t,d))}}},1436:function(e,t,n){var r=n(8227)(`match`);e.exports=function(e){var t=/./;try{`/./`[e](t)}catch{try{return t[r]=!1,`/./`[e](t)}catch{}}return!1}},2211:function(e,t,n){e.exports=!n(9039)((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},2529:function(e){e.exports=function(e,t){return{value:e,done:t}}},6699:function(e,t,n){var r=n(3724),i=n(4913),a=n(6980);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},6980:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},4659:function(e,t,n){var r=n(3724),i=n(4913),a=n(6980);e.exports=function(e,t,n){r?i.f(e,t,a(0,n)):e[t]=n}},3640:function(e,t,n){var r=n(8551),i=n(4270),a=TypeError;e.exports=function(e){if(r(this),e===`string`||e===`default`)e=`string`;else if(e!==`number`)throw new a(`Incorrect hint`);return i(this,e)}},2106:function(e,t,n){var r=n(283),i=n(4913);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},6840:function(e,t,n){var r=n(4901),i=n(4913),a=n(283),o=n(9433);e.exports=function(e,t,n,s){s||={};var c=s.enumerable,l=s.name===void 0?t:s.name;if(r(n)&&a(n,l,s),s.global)c?e[t]=n:o(t,n);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch{}c?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},9433:function(e,t,n){var r=n(4576),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch{r[e]=t}return t}},4606:function(e,t,n){var r=n(6823),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i(`Cannot delete property `+r(t)+` of `+r(e))}},3724:function(e,t,n){e.exports=!n(9039)((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},4055:function(e,t,n){var r=n(4576),i=n(34),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},6837:function(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw new t(`Maximum allowed index exceeded`);return e}},7400:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(e,t,n){var r=n(4055)(`span`).classList,i=r&&r.constructor&&r.constructor.prototype;e.exports=i===Object.prototype?void 0:i},8727:function(e){e.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]},3709:function(e,t,n){var r=n(2839).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},3763:function(e,t,n){var r=n(2839);e.exports=/MSIE|Trident/.test(r)},6193:function(e,t,n){e.exports=n(4215)===`NODE`},2839:function(e,t,n){var r=n(4576).navigator,i=r&&r.userAgent;e.exports=i?String(i):``},9519:function(e,t,n){var r,i,a=n(4576),o=n(2839),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u&&(i=(r=u.split(`.`))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},3607:function(e,t,n){var r=n(2839).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},4215:function(e,t,n){var r=n(4576),i=n(2839),a=n(2195),o=function(e){return i.slice(0,e.length)===e};e.exports=o(`Bun/`)?`BUN`:o(`Cloudflare-Workers`)?`CLOUDFLARE`:o(`Deno/`)?`DENO`:o(`Node.js/`)?`NODE`:r.Bun&&typeof Bun.version==`string`?`BUN`:r.Deno&&typeof Deno.version==`object`?`DENO`:a(r.process)===`process`?`NODE`:r.window&&r.document?`BROWSER`:`REST`},6518:function(e,t,n){var r=n(4576),i=n(7347).f,a=n(6699),o=n(6840),s=n(9433),c=n(7740),l=n(2796);e.exports=function(e,t){var n,u,d,f,p,m=e.target,h=e.global,g=e.stat;if(n=h?r:g?r[m]||s(m,{}):r[m]&&r[m].prototype)for(u in t){if(f=t[u],d=e.dontCallGetSet?(p=i(n,u))&&p.value:n[u],!l(h?u:m+(g?`.`:`#`)+u,e.forced)&&d!==void 0){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&a(f,`sham`,!0),o(n,u,f,e)}}},9039:function(e){e.exports=function(e){try{return!!e()}catch{return!0}}},9228:function(e,t,n){n(7495);var r=n(9565),i=n(6840),a=n(7323),o=n(9039),s=n(8227),c=n(6699),l=s(`species`),u=RegExp.prototype;e.exports=function(e,t,n,d){var f=s(e),p=!o((function(){var t={};return t[f]=function(){return 7},``[e](t)!==7})),m=p&&!o((function(){var t=!1,n=/a/;if(e===`split`){var r={};r[l]=function(){return n},(n={constructor:r,flags:``})[f]=/./[f]}return n.exec=function(){return t=!0,null},n[f](``),!t}));if(!p||!m||n){var h=/./[f],g=t(f,``[e],(function(e,t,n,i,o){var s=t.exec;return s===a||s===u.exec?p&&!o?{done:!0,value:r(h,t,n,i)}:{done:!0,value:r(e,n,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(u,f,g[1])}d&&c(u[f],`sham`,!0)}},8745:function(e,t,n){var r=n(616),i=Function.prototype,a=i.apply,o=i.call;e.exports=typeof Reflect==`object`&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},6080:function(e,t,n){var r=n(7476),i=n(9306),a=n(616),o=r(r.bind);e.exports=function(e,t){return i(e),t===void 0?e:a?o(e,t):function(){return e.apply(t,arguments)}}},616:function(e,t,n){e.exports=!n(9039)((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}))},566:function(e,t,n){var r=n(9504),i=n(9306),a=n(34),o=n(9297),s=n(7680),c=n(616),l=Function,u=r([].concat),d=r([].join),f={};e.exports=c?l.bind:function(e){var t=i(this),n=t.prototype,r=s(arguments,1),c=function(){var n=u(r,s(arguments));return this instanceof c?function(e,t,n){if(!o(f,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;f[t]=l(`C,a`,`return new C(`+d(r,`,`)+`)`)}return f[t](e,n)}(t,n.length,n):t.apply(e,n)};return a(n)&&(c.prototype=n),c}},9565:function(e,t,n){var r=n(616),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},350:function(e,t,n){var r=n(3724),i=n(9297),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,`name`);e.exports={EXISTS:s,PROPER:s&&function(){}.name===`something`,CONFIGURABLE:s&&(!r||r&&o(a,`name`).configurable)}},6706:function(e,t,n){var r=n(9504),i=n(9306);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}}},7476:function(e,t,n){var r=n(2195),i=n(9504);e.exports=function(e){if(r(e)===`Function`)return i(e)}},9504:function(e,t,n){var r=n(616),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},7751:function(e,t,n){var r=n(4576),i=n(4901);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},851:function(e,t,n){var r=n(6955),i=n(5966),a=n(4117),o=n(6269),s=n(8227)(`iterator`);e.exports=function(e){if(!a(e))return i(e,s)||i(e,`@@iterator`)||o[r(e)]}},81:function(e,t,n){var r=n(9565),i=n(9306),a=n(8551),o=n(6823),s=n(851),c=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(i(n))return a(r(n,e));throw new c(o(e)+` is not iterable`)}},5966:function(e,t,n){var r=n(9306),i=n(4117);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},2478:function(e,t,n){var r=n(9504),i=n(8981),a=Math.floor,o=r(``.charAt),s=r(``.replace),c=r(``.slice),l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,d,f){var p=n+e.length,m=r.length,h=u;return d!==void 0&&(d=i(d),h=l),s(f,h,(function(i,s){var l;switch(o(s,0)){case`$`:return`$`;case`&`:return e;case"`":return c(t,0,n);case`'`:return c(t,p);case`<`:l=d[c(s,1,-1)];break;default:var u=+s;if(u===0)return i;if(u>m){var f=a(u/10);return f===0?i:f<=m?r[f-1]===void 0?o(s,1):r[f-1]+o(s,1):i}l=r[u-1]}return l===void 0?``:l}))}},4576:function(e,t,n){var r=function(e){return e&&e.Math===Math&&e};e.exports=r(typeof globalThis==`object`&&globalThis)||r(typeof window==`object`&&window)||r(typeof self==`object`&&self)||r(typeof n.g==`object`&&n.g)||r(typeof this==`object`&&this)||function(){return this}()||Function(`return this`)()},9297:function(e,t,n){var r=n(9504),i=n(8981),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},421:function(e){e.exports={}},397:function(e,t,n){e.exports=n(7751)(`document`,`documentElement`)},5917:function(e,t,n){var r=n(3724),i=n(9039),a=n(4055);e.exports=!r&&!i((function(){return Object.defineProperty(a(`div`),"a",{get:function(){return 7}}).a!==7}))},7055:function(e,t,n){var r=n(9504),i=n(9039),a=n(2195),o=Object,s=r(``.split);e.exports=i((function(){return!o(`z`).propertyIsEnumerable(0)}))?function(e){return a(e)===`String`?s(e,``):o(e)}:o},3167:function(e,t,n){var r=n(4901),i=n(34),a=n(2967);e.exports=function(e,t,n){var o,s;return a&&r(o=t.constructor)&&o!==n&&i(s=o.prototype)&&s!==n.prototype&&a(e,s),e}},3706:function(e,t,n){var r=n(9504),i=n(4901),a=n(7629),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},1181:function(e,t,n){var r,i,a,o=n(8622),s=n(4576),c=n(34),l=n(6699),u=n(9297),d=n(7629),f=n(6119),p=n(421),m=`Object already initialized`,h=s.TypeError,g=s.WeakMap;if(o||d.state){var _=d.state||=new g;_.get=_.get,_.has=_.has,_.set=_.set,r=function(e,t){if(_.has(e))throw new h(m);return t.facade=e,_.set(e,t),t},i=function(e){return _.get(e)||{}},a=function(e){return _.has(e)}}else{var v=f(`state`);p[v]=!0,r=function(e,t){if(u(e,v))throw new h(m);return t.facade=e,l(e,v,t),t},i=function(e){return u(e,v)?e[v]:{}},a=function(e){return u(e,v)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new h(`Incompatible receiver, `+e+` required`);return n}}}},4209:function(e,t,n){var r=n(8227),i=n(6269),a=r(`iterator`),o=Array.prototype;e.exports=function(e){return e!==void 0&&(i.Array===e||o[a]===e)}},4376:function(e,t,n){var r=n(2195);e.exports=Array.isArray||function(e){return r(e)===`Array`}},4901:function(e){var t=typeof document==`object`&&document.all;e.exports=t===void 0&&t!==void 0?function(e){return typeof e==`function`||e===t}:function(e){return typeof e==`function`}},3517:function(e,t,n){var r=n(9504),i=n(9039),a=n(4901),o=n(6955),s=n(7751),c=n(3706),l=function(){},u=s(`Reflect`,`construct`),d=/^\s*(?:class|function)\b/,f=r(d.exec),p=!d.test(l),m=function(e){if(!a(e))return!1;try{return u(l,[],e),!0}catch{return!1}},h=function(e){if(!a(e))return!1;switch(o(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return p||!!f(d,c(e))}catch{return!0}};h.sham=!0,e.exports=!u||i((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?h:m},2796:function(e,t,n){var r=n(9039),i=n(4901),a=/#|\.prototype\./,o=function(e,t){var n=c[s(e)];return n===u||n!==l&&(i(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,`.`).toLowerCase()},c=o.data={},l=o.NATIVE=`N`,u=o.POLYFILL=`P`;e.exports=o},2087:function(e,t,n){var r=n(34),i=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&i(e)===e}},4117:function(e){e.exports=function(e){return e==null}},34:function(e,t,n){var r=n(4901);e.exports=function(e){return typeof e==`object`?e!==null:r(e)}},3925:function(e,t,n){var r=n(34);e.exports=function(e){return r(e)||e===null}},6395:function(e){e.exports=!1},5810:function(e,t,n){var r=n(34),i=n(1181).get;e.exports=function(e){if(!r(e))return!1;var t=i(e);return!!t&&t.type===`RawJSON`}},788:function(e,t,n){var r=n(34),i=n(2195),a=n(8227)(`match`);e.exports=function(e){var t;return r(e)&&((t=e[a])===void 0?i(e)===`RegExp`:!!t)}},757:function(e,t,n){var r=n(7751),i=n(4901),a=n(1625),o=n(7040),s=Object;e.exports=o?function(e){return typeof e==`symbol`}:function(e){var t=r(`Symbol`);return i(t)&&a(t.prototype,s(e))}},9539:function(e,t,n){var r=n(9565),i=n(8551),a=n(5966);e.exports=function(e,t,n){var o,s;i(e);try{if(!(o=a(e,`return`))){if(t===`throw`)throw n;return n}o=r(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw n;if(s)throw o;return i(o),n}},3994:function(e,t,n){var r=n(7657).IteratorPrototype,i=n(2360),a=n(6980),o=n(687),s=n(6269),c=function(){return this};e.exports=function(e,t,n,l){var u=t+` Iterator`;return e.prototype=i(r,{next:a(+!l,n)}),o(e,u,!1,!0),s[u]=c,e}},1088:function(e,t,n){var r=n(6518),i=n(9565),a=n(6395),o=n(350),s=n(4901),c=n(3994),l=n(2787),u=n(2967),d=n(687),f=n(6699),p=n(6840),m=n(8227),h=n(6269),g=n(7657),_=o.PROPER,v=o.CONFIGURABLE,y=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,x=m(`iterator`),S=`keys`,C=`values`,w=`entries`,T=function(){return this};e.exports=function(e,t,n,o,m,g,E){c(n,t,o);var D,O,k,A=function(e){if(e===m&&P)return P;if(!b&&e&&e in N)return N[e];switch(e){case S:case C:case w:return function(){return new n(this,e)}}return function(){return new n(this)}},j=t+` Iterator`,M=!1,N=e.prototype,ee=N[x]||N[`@@iterator`]||m&&N[m],P=!b&&ee||A(m),te=t===`Array`&&N.entries||ee;if(te&&(D=l(te.call(new e)))!==Object.prototype&&D.next&&(a||l(D)===y||(u?u(D,y):s(D[x])||p(D,x,T)),d(D,j,!0,!0),a&&(h[j]=T)),_&&m===C&&ee&&ee.name!==C&&(!a&&v?f(N,`name`,C):(M=!0,P=function(){return i(ee,this)})),m)if(O={values:A(C),keys:g?P:A(S),entries:A(w)},E)for(k in O)(b||M||!(k in N))&&p(N,k,O[k]);else r({target:t,proto:!0,forced:b||M},O);return a&&!E||N[x]===P||p(N,x,P,{name:m}),h[t]=P,O}},7657:function(e,t,n){var r,i,a,o=n(9039),s=n(4901),c=n(34),l=n(2360),u=n(2787),d=n(6840),f=n(8227),p=n(6395),m=f(`iterator`),h=!1;[].keys&&(`next`in(a=[].keys())?(i=u(u(a)))!==Object.prototype&&(r=i):h=!0),!c(r)||o((function(){var e={};return r[m].call(e)!==e}))?r={}:p&&(r=l(r)),s(r[m])||d(r,m,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},6269:function(e){e.exports={}},6198:function(e,t,n){var r=n(8014);e.exports=function(e){return r(e.length)}},283:function(e,t,n){var r=n(9504),i=n(9039),a=n(4901),o=n(9297),s=n(3724),c=n(350).CONFIGURABLE,l=n(3706),u=n(1181),d=u.enforce,f=u.get,p=String,m=Object.defineProperty,h=r(``.slice),g=r(``.replace),_=r([].join),v=s&&!i((function(){return m((function(){}),`length`,{value:8}).length!==8})),y=String(String).split(`String`),b=e.exports=function(e,t,n){h(p(t),0,7)===`Symbol(`&&(t=`[`+g(p(t),/^Symbol\(([^)]*)\).*$/,`$1`)+`]`),n&&n.getter&&(t=`get `+t),n&&n.setter&&(t=`set `+t),(!o(e,`name`)||c&&e.name!==t)&&(s?m(e,`name`,{value:t,configurable:!0}):e.name=t),v&&n&&o(n,`arity`)&&e.length!==n.arity&&m(e,`length`,{value:n.arity});try{n&&o(n,`constructor`)&&n.constructor?s&&m(e,`prototype`,{writable:!1}):e.prototype&&=void 0}catch{}var r=d(e);return o(r,`source`)||(r.source=_(y,typeof t==`string`?t:``)),e};Function.prototype.toString=b((function(){return a(this)&&f(this).source||l(this)}),`toString`)},741:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},7819:function(e,t,n){e.exports=!n(9039)((function(){var e=`9007199254740993`,t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))},5749:function(e,t,n){var r=n(788),i=TypeError;e.exports=function(e){if(r(e))throw new i(`The method doesn't accept regular expressions`);return e}},4213:function(e,t,n){var r=n(3724),i=n(9504),a=n(9565),o=n(9039),s=n(1072),c=n(3717),l=n(8773),u=n(8981),d=n(7055),f=Object.assign,p=Object.defineProperty,m=i([].concat);e.exports=!f||o((function(){if(r&&f({b:1},f(p({},`a`,{enumerable:!0,get:function(){p(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),i=`abcdefghijklmnopqrst`;return e[n]=7,i.split(``).forEach((function(e){t[e]=e})),f({},e)[n]!==7||s(f({},t)).join(``)!==i}))?function(e,t){for(var n=u(e),i=arguments.length,o=1,f=c.f,p=l.f;i>o;)for(var h,g=d(arguments[o++]),_=f?m(s(g),f(g)):s(g),v=_.length,y=0;v>y;)h=_[y++],r&&!a(p,g,h)||(n[h]=g[h]);return n}:f},2360:function(e,t,n){var r,i=n(8551),a=n(6801),o=n(8727),s=n(421),c=n(397),l=n(4055),u=n(6119),d=`prototype`,f=`script`,p=u(`IE_PROTO`),m=function(){},h=function(e){return`<`+f+`>`+e+`</`+f+`>`},g=function(e){e.write(h(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){try{r=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;_=typeof document<`u`?document.domain&&r?g(r):(t=l(`iframe`),n=`java`+f+`:`,t.style.display=`none`,c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(h(`document.F=Object`)),e.close(),e.F):g(r);for(var i=o.length;i--;)delete _[d][o[i]];return _()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return e===null?n=_():(m[d]=i(e),n=new m,m[d]=null,n[p]=e),t===void 0?n:a.f(n,t)}},6801:function(e,t,n){var r=n(3724),i=n(8686),a=n(4913),o=n(8551),s=n(5397),c=n(1072);t.f=r&&!i?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),i=c(t),l=i.length,u=0;l>u;)a.f(e,n=i[u++],r[n]);return e}},4913:function(e,t,n){var r=n(3724),i=n(5917),a=n(8686),o=n(8551),s=n(6969),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=`enumerable`,f=`configurable`,p=`writable`;t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),typeof e==`function`&&t===`prototype`&&`value`in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:d in n?n[d]:r[d],writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return l(e,t,n)}catch{}if(`get`in n||`set`in n)throw new c(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e}},7347:function(e,t,n){var r=n(3724),i=n(9565),a=n(8773),o=n(6980),s=n(5397),c=n(6969),l=n(9297),u=n(5917),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=c(t),u)try{return d(e,t)}catch{}if(l(e,t))return o(!i(a.f,e,t),e[t])}},298:function(e,t,n){var r=n(2195),i=n(5397),a=n(8480).f,o=n(7680),s=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&r(e)===`Window`?function(e){try{return a(e)}catch{return o(s)}}(e):a(i(e))}},8480:function(e,t,n){var r=n(1828),i=n(8727).concat(`length`,`prototype`);t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},3717:function(e,t){t.f=Object.getOwnPropertySymbols},2787:function(e,t,n){var r=n(9297),i=n(4901),a=n(8981),o=n(6119),s=n(2211),c=o(`IE_PROTO`),l=Object,u=l.prototype;e.exports=s?l.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof l?u:null}},1625:function(e,t,n){e.exports=n(9504)({}.isPrototypeOf)},1828:function(e,t,n){var r=n(9504),i=n(9297),a=n(5397),o=n(9617).indexOf,s=n(421),c=r([].push);e.exports=function(e,t){var n,r=a(e),l=0,u=[];for(n in r)!i(s,n)&&i(r,n)&&c(u,n);for(;t.length>l;)i(r,n=t[l++])&&(~o(u,n)||c(u,n));return u}},1072:function(e,t,n){var r=n(1828),i=n(8727);e.exports=Object.keys||function(e){return r(e,i)}},8773:function(e,t){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor;t.f=r&&!n.call({1:2},1)?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},2551:function(e,t,n){var r=n(6395),i=n(4576),a=n(9039),o=n(3607);e.exports=r||!a((function(){if(!(o&&o<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete i[e]}}))},2967:function(e,t,n){var r=n(6706),i=n(34),a=n(7750),o=n(3506);e.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return a(n),o(r),i(n)&&(t?e(n,r):n.__proto__=r),n}}():void 0)},3179:function(e,t,n){var r=n(2140),i=n(6955);e.exports=r?{}.toString:function(){return`[object `+i(this)+`]`}},4270:function(e,t,n){var r=n(9565),i=n(4901),a=n(34),o=TypeError;e.exports=function(e,t){var n,s;if(t===`string`&&i(n=e.toString)&&!a(s=r(n,e))||i(n=e.valueOf)&&!a(s=r(n,e))||t!==`string`&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw new o(`Can't convert object to primitive value`)}},5031:function(e,t,n){var r=n(7751),i=n(9504),a=n(8480),o=n(3717),s=n(8551),c=i([].concat);e.exports=r(`Reflect`,`ownKeys`)||function(e){var t=a.f(s(e)),n=o.f;return n?c(t,n(e)):t}},8235:function(e,t,n){var r=n(9504),i=n(9297),a=SyntaxError,o=parseInt,s=String.fromCharCode,c=r(``.charAt),l=r(``.slice),u=r(/./.exec),d={'\\"':`"`,"\\\\":`\\`,"\\/":`/`,"\\b":`\b`,"\\f":`\f`,"\\n":`
|
|
9
|
+
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=an(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Pn.assertOptions(n,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean),legacyInterceptorReqResOrdering:Fn.transitional(Fn.boolean)},!1),r!=null&&(R.isFunction(r)?t.paramsSerializer={serialize:r}:Pn.assertOptions(r,{encode:Fn.function,serialize:Fn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Pn.assertOptions(t,{baseUrl:Fn.spelling(`baseURL`),withXsrfToken:Fn.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&R.merge(i.common,i[t.method]);i&&R.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=dt.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||Et;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[An.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=An.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=an(this.defaults,e),B(nn(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};R.forEach([`delete`,`get`,`head`,`options`],function(e){In.prototype[e]=function(t,n){return this.request(an(n||{},{method:e,url:t,data:(n||{}).data}))}}),R.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(an(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}In.prototype[e]=t(),e!==`query`&&(In.prototype[e+`Form`]=t(!0))});var Ln=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Wt(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Rn(e){return function(t){return e.apply(null,t)}}function zn(e){return R.isObject(e)&&e.isAxiosError===!0}var Bn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bn).forEach(([e,t])=>{Bn[t]=e});function Vn(e){let t=new In(e),n=x(In.prototype.request,t);return R.extend(n,In.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Vn(an(e,t))},n}var Hn=Vn(Vt);Hn.Axios=In,Hn.CanceledError=Wt,Hn.CancelToken=Ln,Hn.isCancel=Ut,Hn.VERSION=_n,Hn.toFormData=bt,Hn.AxiosError=z,Hn.Cancel=Hn.CanceledError,Hn.all=function(e){return Promise.all(e)},Hn.spread=Rn,Hn.isAxiosError=zn,Hn.mergeConfig=an,Hn.AxiosHeaders=dt,Hn.formToJSON=e=>Rt(R.isHTMLForm(e)?new FormData(e):e),Hn.getAdapter=On.getAdapter,Hn.HttpStatusCode=Bn,Hn.default=Hn;var Un=(0,h.createContext)({});function Wn(){let e=(0,h.useContext)(Un);if(!e)throw Error(`Only use 'useApiContext' within a ApiContext Provider`);return e}var Gn={UNAUTHORIZED:401,MAINTENANCE_MODE:503},Kn=e=>{let t=e.response?.status;return t&&t!==Gn.UNAUTHORIZED&&console.error(e.response),Promise.reject(e)};function qn(){let{apiKey:e,host:t}=Wn(),n=(e,t={},n={})=>o(`GET`,e,t,n),r=(e,t={},n={})=>o(`POST`,e,t,n),i=(e,t={},n={})=>o(`PUT`,e,t,n),a=(e,t={})=>o(`DELETE`,e,t),o=(n,r,i={},a={})=>{let o=Hn.create({baseURL:`${t??`https://api.piggy.eu`}/api/v1/portal-sessions`,...a,headers:{Authorization:`Bearer ${e}`,...a.headers,"X-SDK-Version":`0.3.0-beta.9`}});return o.interceptors.response.use(void 0,Kn),o.request({method:n,url:r,params:n==`GET`?i:{},data:i})};return{get:n,post:r,put:i,destroy:a}}var Jn=m(d(((e,t)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()}))(),1);function Yn(e){return(0,n.jsxs)(`svg`,{...e,"aria-hidden":`true`,role:`status`,className:(0,Jn.default)(`inline h-5 w-5 animate-spin fill-[#E5E7EB]`,e.className),viewBox:`0 0 100 101`,fill:`red`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,n.jsx)(`path`,{d:`M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z`,fill:`currentFill`}),(0,n.jsx)(`path`,{d:`M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z`,fill:`currentColor`})]})}var Xn=`data:image/svg+xml,%3csvg%20width='331'%20height='297'%20viewBox='0%200%20331%20297'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M260.633%20120.233C256.252%20141.975%20249.682%20152.798%20240.921%20152.798C234.584%20152.798%20229.087%20148.853%20224.473%20140.869C219.859%20132.931%20213.661%20120.233%20205.88%20102.869C196.606%2081.8482%20188.078%2064.6769%20180.297%2051.2559C172.516%2037.8843%20162.543%2026.0991%20150.381%2015.9495C138.171%205.84943%20123.585%200.750732%20106.531%200.750732C66.1304%200.750732%2037.5648%2028.4561%2020.7431%2083.8685C8.56966%20124.042%201.84252%20172.378%200.554243%20228.779C0.43324%20234.077%200.372738%20236.726%201.39875%20238.822C2.29091%20240.644%203.79168%20242.18%205.59324%20243.113C7.66509%20244.187%2010.3571%20244.187%2015.7412%20244.187H49.9832C55.1593%20244.187%2057.7474%20244.187%2059.7252%20243.228C61.4991%20242.369%2062.8933%20241.064%2063.8691%20239.352C64.9571%20237.442%2065.1344%20234.785%2065.489%20229.471C66.8596%20208.929%2069.3476%20191.707%2072.9797%20177.809C78.8046%20155.346%2086.5875%20144.139%2096.3253%20144.139C103.13%20144.139%20109.001%20148.131%20113.848%20156.068C118.693%20164.053%20125.264%20177.425%20133.558%20196.281C146.234%20227.402%20159.374%20251.837%20172.982%20269.586C186.634%20287.335%20205.135%20296.186%20228.48%20296.186C267.948%20296.186%20295.536%20268.672%20311.379%20213.645C322.875%20173.601%20329.307%20125.115%20330.648%2068.1882C330.773%2062.8736%20330.836%2060.2162%20329.81%2058.1189C328.918%2056.2936%20327.419%2054.7593%20325.615%2053.8241C323.543%2052.7496%20320.846%2052.7496%20315.451%2052.7496H281.752C276.521%2052.7496%20273.906%2052.7496%20271.908%2053.7319C270.126%2054.6081%20268.711%2055.9568%20267.751%2057.6953C266.675%2059.6442%20266.547%2062.3114%20266.293%2067.6459C265.272%2089.0314%20263.387%20106.562%20260.633%20120.233Z'%20fill='currentColor'/%3e%3c/svg%3e`;function Zn({children:e,accent:t=`primary`}){return(0,n.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-linear-to-br from-core-gray-50 via-core-white-900 to-core-primary-50 px-6 py-10 text-center`,children:(0,n.jsxs)(`div`,{className:`relative w-full max-w-2xl overflow-hidden rounded-3xl border border-core-gray-100 bg-core-white-900 px-8 py-12 shadow-xl sm:px-12`,children:[(0,n.jsx)(`div`,{className:`absolute -top-20 -right-20 h-48 w-48 rounded-full bg-core-primary-100 opacity-60 blur-3xl`}),(0,n.jsx)(`div`,{className:`absolute -bottom-24 -left-16 h-56 w-56 rounded-full ${t===`red`?`bg-core-red-100`:`bg-core-primary-100`} opacity-40 blur-3xl`}),(0,n.jsxs)(`div`,{className:`relative z-10 flex flex-col items-center gap-8`,children:[(0,n.jsx)(`div`,{className:`flex h-24 w-24 items-center justify-center rounded-3xl bg-core-white-900 shadow-lg ring-1 ring-core-gray-100`,children:(0,n.jsx)(`img`,{alt:`Leat`,src:Xn,className:`h-12 w-12`})}),e]})]})})}function Qn({message:e=``}){return(0,n.jsx)(Zn,{children:(0,n.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,n.jsx)(Yn,{className:`h-8 w-8 text-core-primary-500`}),e&&(0,n.jsx)(`p`,{className:`font-medium text-base text-core-gray-600 leading-7 sm:text-lg`,children:e})]})})}var V=e=>typeof e==`string`,$n=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},er=e=>e==null?``:String(e),tr=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},nr=/###/g,rr=e=>e&&e.includes(`###`)?e.replace(nr,`.`):e,ir=e=>!e||V(e),ar=(e,t,n)=>{let r=V(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(ir(e))return{};let t=rr(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return ir(e)?{}:{obj:e,k:rr(r[i])}},or=(e,t,n)=>{let{obj:r,k:i}=ar(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=ar(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=ar(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},sr=(e,t,n,r)=>{let{obj:i,k:a}=ar(e,t,Object);i[a]=i[a]||[],i[a].push(n)},cr=(e,t)=>{let{obj:n,k:r}=ar(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},lr=(e,t,n)=>{let r=cr(e,n);return r===void 0?cr(t,n):r},ur=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?V(e[r])||e[r]instanceof String||V(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):ur(e[r],t[r],n):e[r]=t[r]);return e},dr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),fr={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},pr=e=>V(e)?e.replace(/[&<>"'\/]/g,e=>fr[e]):e,mr=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},hr=[` `,`,`,`?`,`!`,`;`],gr=new mr(20),_r=(e,t,n)=>{t||=``,n||=``;let r=hr.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=gr.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},vr=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},yr=e=>e?.replace(/_/g,`-`),br={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},xr=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||br,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>V(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),V(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Sr=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Cr=class extends Sr{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):V(n)&&i?o.push(...n.split(i)):o.push(n)));let s=cr(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!V(n)?s:vr(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),or(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(V(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=cr(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ur(s,n,i):s={...s,...n},or(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},wr={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Tr=Symbol(`i18next/PATH_KEY`);function Er(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Tr?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Dr(e,t){let{[Tr]:n}=e(Er()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Or=e=>!V(e)&&typeof e!=`boolean`&&typeof e!=`number`,kr=class e extends Sr{constructor(e,t={}){super(),tr([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=xr.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Or(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!_r(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:V(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:V(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Dr(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Dr(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!V(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Or(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(V(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Or(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&V(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=V(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!V(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=V(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=wr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return V(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Dr(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!V(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(V(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!V(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Ar=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=xr.create(`languageUtils`)}getScriptPartFromCode(e){if(e=yr(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=yr(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(V(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),V(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return V(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):V(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},jr={zero:0,one:1,two:2,few:3,many:4,other:5},Mr={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Nr=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=xr.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=yr(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Mr;if(!e.match(/-|_/))return Mr;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>jr[e]-jr[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Pr=(e,t,n,r=`.`,i=!0)=>{let a=lr(e,t,n);return!a&&i&&V(n)&&(a=vr(e,n,r),a===void 0&&(a=vr(t,n,r))),a},Fr=e=>e.replace(/\$/g,`$$$$`),Ir=class{constructor(e={}){this.logger=xr.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?pr:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?dr(i):a||`{{`,this.suffix=o?dr(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?dr(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?dr(l):``,this.nestingPrefix=d?dr(d):f||dr(`$t(`),this.nestingSuffix=p?dr(p):m||dr(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Pr(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Pr(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Fr(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Fr(this.escape(e)):Fr(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=V(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !V(a)&&!this.useRawValueToEscape&&(a=er(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${dr(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!V(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!V(i))return i;V(i)||(i=er(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Lr=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Rr=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(yr(r),i),t[o]=s),s(n)}},zr=e=>(t,n,r)=>e(yr(n),r)(t),Br=class{constructor(e={}){this.logger=xr.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Rr:zr;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Rr(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&!i[0].includes(`)`)&&i.find(e=>e.includes(`)`))){let e=i.findIndex(e=>e.includes(`)`));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Lr(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Vr=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Hr=class extends Sr{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=xr.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{sr(n.loaded,[i],a),Vr(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();V(e)&&(e=this.languageUtils.toResolveHierarchy(e)),V(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Ur=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),V(e[1])&&(t.defaultValue=e[1]),V(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Wr=e=>(V(e.ns)&&(e.ns=[e.ns]),V(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),V(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Gr=()=>{},Kr=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},qr=class e extends Sr{constructor(e={},t){if(super(),this.options=Wr(e),this.services={},this.logger=xr,this.modules={external:[]},Kr(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(V(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Ur();this.options={...n,...this.options,...Wr(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?xr.init(r(this.modules.logger),this.options):xr.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Br;let t=new Ar(this.options);this.store=new Cr(this.options.resources,this.options);let n=this.services;n.logger=xr,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Nr(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Ir(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Hr(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new kr(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Gr,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=$n(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Gr){let n=t,r=V(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=$n();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Gr,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&wr.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=$n();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=V(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(V(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Dr(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Dr(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Dr(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return V(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=$n();return this.options.ns?(V(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=$n();V(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Ar(Ur());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Gr){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Cr(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Ur().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Ir(n)}return a.translator=new kr(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();qr.createInstance,qr.dir,qr.init,qr.loadResources,qr.reloadResources,qr.use,qr.changeLanguage,qr.getFixedT,qr.t,qr.exists,qr.setDefaultNamespace,qr.hasLoadedNamespace,qr.loadNamespaces,qr.loadLanguages;var Jr=(e,t=`EUR`)=>new Intl.NumberFormat(qr.language,{style:`currency`,currency:t??`EUR`}).format(e/100),Yr=e=>{window.parent.postMessage(e,`*`)},Xr=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24))),Zr=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24*7))),Qr=(e,t)=>Math.abs(Math.round((t.getTime()-e.getTime())/(1e3*3600*24*365.25))),$r=e=>e===``||e==null||e===`null`,ei=(0,h.createContext)({cameraService:1,cameraFacingMode:b.USER,primaryIdentificationMethod:g.IDENTIFIER}),ti=(0,h.createContext)({portalSession:null,setPortalSession:()=>{},mutate:async()=>{}});function H(){let e=(0,h.useContext)(ti);if(!e)throw Error(`Only use 'usePortalSessionContext' within a PortalSessionProvider`);return e}function ni(e){let{portalSession:t}=H();return(0,h.useEffect)(()=>{t.contact&&e.onContactLink?.(t.contact)},[t.contact]),(0,n.jsx)(ei.Provider,{value:{cameraService:t.input_data.camera_service,cameraFacingMode:t.input_data.facing_mode,primaryIdentificationMethod:t.input_data.primary_identification_method,...e},children:e.children})}function ri(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var ii=e=>{switch(e){case`success`:return si;case`info`:return li;case`warning`:return ci;case`error`:return ui;default:return null}},ai=Array(12).fill(0),oi=({visible:e,className:t})=>h.default.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},h.default.createElement(`div`,{className:`sonner-spinner`},ai.map((e,t)=>h.default.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),si=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},h.default.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),ci=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},h.default.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),li=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},h.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),ui=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},h.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),di=h.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},h.default.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),h.default.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),fi=()=>{let[e,t]=h.default.useState(document.hidden);return h.default.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},pi=1,mi=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:pi++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],h.default.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(gi(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!h.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!h.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||pi++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},hi=(e,t)=>{let n=t?.id||pi++;return mi.addToast({title:e,...t,id:n}),n},gi=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,_i=Object.assign(hi,{success:mi.success,info:mi.info,warning:mi.warning,error:mi.error,custom:mi.custom,message:mi.message,promise:mi.promise,dismiss:mi.dismiss,loading:mi.loading},{getHistory:()=>mi.toasts,getToasts:()=>mi.getActiveToasts()});ri(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function vi(e){return e.label!==void 0}var yi=3,bi=`24px`,xi=`16px`,Si=4e3,Ci=356,wi=14,Ti=45,Ei=200;function Di(...e){return e.filter(Boolean).join(` `)}function Oi(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ki=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:g,actionButtonStyle:_,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=h.default.useState(null),[k,A]=h.default.useState(null),[j,M]=h.default.useState(!1),[N,ee]=h.default.useState(!1),[P,te]=h.default.useState(!1),[ne,re]=h.default.useState(!1),[ie,F]=h.default.useState(!1),[ae,oe]=h.default.useState(0),[se,ce]=h.default.useState(0),le=h.default.useRef(n.duration||b||Si),ue=h.default.useRef(null),I=h.default.useRef(null),L=c===0,de=c+1<=o,fe=n.type,pe=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,ge=h.default.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),_e=h.default.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ve=h.default.useMemo(()=>n.duration||b||Si,[n.duration,b]),ye=h.default.useRef(0),be=h.default.useRef(0),xe=h.default.useRef(0),Se=h.default.useRef(null),[Ce,we]=x.split(`-`),Te=h.default.useMemo(()=>s.reduce((e,t,n)=>n>=ge?e:e+t.height,0),[s,ge]),Ee=fi(),De=n.invert||t,Oe=fe===`loading`;be.current=h.default.useMemo(()=>ge*S+Te,[ge,Te]),h.default.useEffect(()=>{le.current=ve},[ve]),h.default.useEffect(()=>{M(!0)},[]),h.default.useEffect(()=>{let e=I.current;if(e){let t=e.getBoundingClientRect().height;return ce(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),h.default.useLayoutEffect(()=>{if(!j)return;let e=I.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ce(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let ke=h.default.useCallback(()=>{ee(!0),oe(be.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Ei)},[n,d,a,be]);h.default.useEffect(()=>{if(n.promise&&fe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ee?(()=>{if(xe.current<ye.current){let e=new Date().getTime()-ye.current;le.current-=e}xe.current=new Date().getTime()})():le.current!==1/0&&(ye.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),ke()},le.current)),()=>clearTimeout(e)},[u,i,n,fe,Ee,ke]),h.default.useEffect(()=>{n.delete&&(ke(),n.onDismiss==null||n.onDismiss.call(n,n))},[ke,n.delete]);function Ae(){return T?.loading?h.default.createElement(`div`,{className:Di(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":fe===`loading`},T.loading):h.default.createElement(oi,{className:Di(w?.loader,n?.classNames?.loader),visible:fe===`loading`})}let je=n.icon||T?.[fe]||ii(fe);return h.default.createElement(`li`,{tabIndex:0,ref:I,className:Di(v,me,w?.toast,n?.classNames?.toast,w?.default,w?.[fe],n?.classNames?.[fe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":ie,"data-removed":N,"data-visible":de,"data-y-position":Ce,"data-x-position":we,"data-index":c,"data-front":L,"data-swiping":P,"data-dismissible":pe,"data-type":fe,"data-invert":De,"data-swipe-out":ne,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${N?ae:be.current}px`,"--initial-height":C?`auto`:`${se}px`,...m,...n.style},onDragEnd:()=>{te(!1),O(null),Se.current=null},onPointerDown:e=>{e.button!==2&&(Oe||!pe||(ue.current=new Date,oe(be.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(te(!0),Se.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(ne||!pe)return;Se.current=null;let e=Number(I.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(I.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ue.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Ti||a>.11){oe(be.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),ke(),re(!0);return}else{var o,s;(o=I.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=I.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}F(!1),te(!1),O(null)},onPointerMove:t=>{var n,r;if(!Se.current||!pe||window.getSelection()?.toString().length>0)return;let i=t.clientY-Se.current.y,a=t.clientX-Se.current.x,o=e.swipeDirections??Oi(x);!D&&(Math.abs(a)>1||Math.abs(i)>1)&&O(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(D===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&F(!0),(n=I.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=I.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},_e&&!n.jsx&&fe!==`loading`?h.default.createElement(`button`,{"aria-label":E,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!pe?()=>{}:()=>{ke(),n.onDismiss==null||n.onDismiss.call(n,n)},className:Di(w?.closeButton,n?.classNames?.closeButton)},T?.close??di):null,(fe||n.icon||n.promise)&&n.icon!==null&&(T?.[fe]!==null||n.icon)?h.default.createElement(`div`,{"data-icon":``,className:Di(w?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ae():null,n.type===`loading`?null:je):null,h.default.createElement(`div`,{"data-content":``,className:Di(w?.content,n?.classNames?.content)},h.default.createElement(`div`,{"data-title":``,className:Di(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?h.default.createElement(`div`,{"data-description":``,className:Di(y,he,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),h.default.isValidElement(n.cancel)?n.cancel:n.cancel&&vi(n.cancel)?h.default.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||g,onClick:e=>{vi(n.cancel)&&pe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),ke())},className:Di(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,h.default.isValidElement(n.action)?n.action:n.action&&vi(n.action)?h.default.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||_,onClick:e=>{vi(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&ke())},className:Di(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Ai(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function ji(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?xi:bi;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Mi=h.default.forwardRef(function(e,t){let{id:n,invert:i,position:a=`bottom-right`,hotkey:o=[`altKey`,`KeyT`],expand:s,closeButton:c,className:l,offset:u,mobileOffset:d,theme:f=`light`,richColors:p,duration:m,style:g,visibleToasts:_=yi,toastOptions:v,dir:y=Ai(),gap:b=wi,icons:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=h.default.useState([]),T=h.default.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=h.default.useMemo(()=>Array.from(new Set([a].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,a]),[D,O]=h.default.useState([]),[k,A]=h.default.useState(!1),[j,M]=h.default.useState(!1),[N,ee]=h.default.useState(f===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:f),P=h.default.useRef(null),te=o.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),ne=h.default.useRef(null),re=h.default.useRef(!1),ie=h.default.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||mi.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return h.default.useEffect(()=>mi.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{r.default.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[C]),h.default.useEffect(()=>{if(f!==`system`){ee(f);return}if(f===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ee(`dark`):ee(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{ee(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{ee(e?`dark`:`light`)}catch(e){console.error(e)}})}},[f]),h.default.useEffect(()=>{C.length<=1&&A(!1)},[C]),h.default.useEffect(()=>{let e=e=>{if(o.every(t=>e[t]||e.code===t)){var t;A(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]),h.default.useEffect(()=>{if(P.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,re.current=!1)}},[P.current]),h.default.createElement(`section`,{ref:t,"aria-label":`${S} ${te}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},E.map((t,n)=>{let[r,a]=t.split(`-`);return T.length?h.default.createElement(`ol`,{key:t,dir:y===`auto`?Ai():y,tabIndex:-1,ref:P,className:l,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":r,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${Ci}px`,"--gap":`${b}px`,...g,...ji(u,d)},onBlur:e=>{re.current&&!e.currentTarget.contains(e.relatedTarget)&&(re.current=!1,ne.current&&=(ne.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||re.current||(re.current=!0,ne.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,r)=>h.default.createElement(ki,{key:n.id,icons:x,index:r,toast:n,defaultRichColors:p,duration:v?.duration??m,className:v?.className,descriptionClassName:v?.descriptionClassName,invert:i,visibleToasts:_,closeButton:v?.closeButton??c,interacting:j,position:t,style:v?.style,unstyled:v?.unstyled,classNames:v?.classNames,cancelButtonStyle:v?.cancelButtonStyle,actionButtonStyle:v?.actionButtonStyle,closeButtonAriaLabel:v?.closeButtonAriaLabel,removeToast:ie,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:s,gap:b,expanded:k,swipeDirections:e.swipeDirections}))):null}))}),Ni=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_15_20)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23E7FBF4'/%3e%3cpath%20d='M10.6668%2017.3333L14.6668%2020L21.3335%2012'%20stroke='%23039855'%20stroke-width='1.6875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_15_20'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,Pi=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_95)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FEF3F2'/%3e%3cpath%20d='M12.0003%2012L20.0003%2020M12.0003%2020L20.0003%2012'%20stroke='%23E02731'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_95'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,Fi=`data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_99)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FFFAEB'/%3e%3cpath%20d='M16.0002%2017.3333V13.3333M16.0002%2020V20.0067M23.0353%2019.3333L17.942%2010.456C17.0833%208.95867%2014.9167%208.95867%2014.058%2010.456L8.96533%2019.3333C8.11266%2020.8187%209.18933%2022.6667%2010.9073%2022.6667H21.0933C22.8107%2022.6667%2023.8873%2020.8187%2023.0353%2019.3333Z'%20stroke='%23CFAA25'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_99'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200C24.8366%200%2032%207.16344%2032%2016C32%2024.8366%2024.8366%2032%2016%2032C7.16344%2032%200%2024.8366%200%2016Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,Ii=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);Ui(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Li={},Ri=(e,t,n,r)=>{Ui(n)&&Li[n]||(Ui(n)&&(Li[n]=new Date),Ii(e,t,n,r))},zi=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},Bi=(e,t,n)=>{e.loadNamespaces(t,zi(e,n))},Vi=(e,t,n,r)=>{if(Ui(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Bi(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,zi(e,r))},Hi=(e,t,n={})=>!t.languages||!t.languages.length?(Ri(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),Ui=e=>typeof e==`string`,Wi=e=>typeof e==`object`&&!!e,Gi=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ki={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},qi=e=>Ki[e],Ji={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(Gi,qi),transDefaultProps:void 0},Yi=(e={})=>{Ji={...Ji,...e}},Xi=()=>Ji,Zi,Qi=e=>{Zi=e},$i=()=>Zi,ea={type:`3rdParty`,init(e){Yi(e.options.react),Qi(e)}},ta=(0,t.createContext)(),na=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},ra=d((e=>{var t=require("react");function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),ia=d((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}function n(e,t){d||a.startTransition===void 0||(d=!0,console.error(`You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.`));var n=t();if(!f){var i=t();o(n,i)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),f=!0)}i=s({inst:{value:n,getSnapshot:t}});var p=i[0].inst,m=i[1];return l(function(){p.value=n,p.getSnapshot=t,r(p)&&m({inst:p})},[e,n,t]),c(function(){return r(p)&&m({inst:p}),e(function(){r(p)&&m({inst:p})})},[e]),u(n),n}function r(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch{return!0}}function i(e,t){return t()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=require("react"),o=typeof Object.is==`function`?Object.is:t,s=a.useState,c=a.useEffect,l=a.useLayoutEffect,u=a.useDebugValue,d=!1,f=!1,p=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?i:n;e.useSyncExternalStore=a.useSyncExternalStore===void 0?p:a.useSyncExternalStore,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),aa=d(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=ra():t.exports=ia()}))(),oa={t:(e,t)=>{if(Ui(t))return t;if(Wi(t)&&Ui(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},sa=()=>()=>{},U=(e,n={})=>{let{i18n:r}=n,{i18n:i,defaultNS:a}=(0,t.useContext)(ta)||{},o=r||i||$i();o&&!o.reportNamespaces&&(o.reportNamespaces=new na),o||Ri(o,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let s=(0,t.useMemo)(()=>({...Xi(),...o?.options?.react,...n}),[o,n]),{useSuspense:c,keyPrefix:l}=s,u=e||a||o?.options?.defaultNS,d=Ui(u)?[u]:u||[`translation`],f=(0,t.useMemo)(()=>d,d);o?.reportNamespaces?.addUsedNamespaces?.(f);let p=(0,t.useRef)(0),m=(0,t.useCallback)(e=>{if(!o)return sa;let{bindI18n:t,bindI18nStore:n}=s,r=()=>{p.current+=1,e()};return t&&o.on(t,r),n&&o.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>o.off(e,r)),n&&n.split(` `).forEach(e=>o.store.off(e,r))}},[o,s]),h=(0,t.useRef)(),g=(0,t.useCallback)(()=>{if(!o)return oa;let e=!!(o.isInitialized||o.initializedStoreOnce)&&f.every(e=>Hi(e,o,s)),t=n.lng||o.language,r=p.current,i=h.current;if(i&&i.ready===e&&i.lng===t&&i.keyPrefix===l&&i.revision===r)return i;let a={t:o.getFixedT(t,s.nsMode===`fallback`?f:f[0],l,{scopeNs:f}),ready:e,lng:t,keyPrefix:l,revision:r};return h.current=a,a},[o,f,l,s,n.lng]),[_,v]=(0,t.useState)(0),{t:y,ready:b}=(0,aa.useSyncExternalStore)(m,g,g);(0,t.useEffect)(()=>{if(o&&!b&&!c){let e=()=>v(e=>e+1);n.lng?Vi(o,n.lng,f,e):Bi(o,f,e)}},[o,n.lng,f,b,c,_]);let x=o||{},S=(0,t.useRef)(null),C=(0,t.useRef)(),w=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},T=(0,t.useMemo)(()=>{let e=x,t=e?.language,n=e;e&&(S.current&&S.current.__original===e&&C.current===t?n=S.current:(n=w(e),S.current=n,C.current=t));let r=!b&&!c?(...e)=>(Ri(o,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),y(...e)):y,i=[r,n,b];return i.t=r,i.i18n=n,i.ready=b,i},[y,x,b,x.resolvedLanguage,x.language,x.languages]);if(o&&c&&!b)throw new Promise(e=>{let t=()=>e();n.lng?Vi(o,n.lng,f,t):Bi(o,f,t)});return T};function ca(){let{t:e}=U(),t=(0,n.jsx)(`img`,{src:Ni,alt:`success`}),r=(0,n.jsx)(`img`,{src:Pi,alt:`error`}),i=(0,n.jsx)(`img`,{src:Fi,alt:`warning`}),a=(e,t)=>{if(e===`success`)return o(t);c(t)},o=(n=e(`success`),r={})=>{_i.success(n,{icon:t,...r})},s=(t=e(`warning`))=>{_i.warning(t,{icon:i})},c=(t=e(`somethingWentWrong`))=>{let i=typeof t==`string`?t:t.response?.data.message,a=typeof t==`string`?void 0:t.response?.data.errors,o=(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`p`,{children:i}),a&&Object.keys(a).map(e=>a[e].map(e=>(0,n.jsx)(`li`,{children:e},e)))]});_i.error(o,{icon:r})};return{toast:a,successToast:o,warningToast:s,errorToast:c}}var la=Object.prototype.hasOwnProperty;function ua(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ua(e[r],t[r]););return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(la.call(e,n)&&++r&&!la.call(t,n)||!(n in t)||!ua(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}var da=new WeakMap,fa=()=>{},pa=Object,ma=e=>e===void 0,ha=e=>typeof e==`function`,ga=(e,t)=>({...e,...t}),_a=e=>ha(e.then),va={},ya={},ba=`undefined`,xa=typeof window!=ba,Sa=typeof document!=ba,Ca=xa&&`Deno`in window,wa=()=>xa&&typeof window.requestAnimationFrame!=ba,Ta=(e,t)=>{let n=da.get(e);return[()=>!ma(t)&&e.get(t)||va,r=>{if(!ma(t)){let i=e.get(t);t in ya||(ya[t]=i),n[5](t,ga(i,r),i||va)}},n[6],()=>!ma(t)&&t in ya?ya[t]:!ma(t)&&e.get(t)||va]},Ea=!0,Da=()=>Ea,[Oa,ka]=xa&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[fa,fa],Aa=()=>{let e=Sa&&document.visibilityState;return ma(e)||e!==`hidden`},ja=e=>(Sa&&document.addEventListener(`visibilitychange`,e),Oa(`focus`,e),()=>{Sa&&document.removeEventListener(`visibilitychange`,e),ka(`focus`,e)}),Ma=e=>{let t=()=>{Ea=!0,e()},n=()=>{Ea=!1};return Oa(`online`,t),Oa(`offline`,n),()=>{ka(`online`,t),ka(`offline`,n)}},Na={isOnline:Da,isVisible:Aa},Pa={initFocus:ja,initReconnect:Ma},Fa=!h.default.useId,Ia=!xa||Ca,La=e=>wa()?window.requestAnimationFrame(e):setTimeout(e,1),Ra=Ia?h.useEffect:h.useLayoutEffect,za=typeof navigator<`u`&&navigator.connection,Ba=!Ia&&za&&([`slow-2g`,`2g`].includes(za.effectiveType)||za.saveData),Va=new WeakMap,Ha=e=>pa.prototype.toString.call(e),Ua=(e,t)=>e===`[object ${t}]`,Wa=0,Ga=e=>{let t=typeof e,n=Ha(e),r=Ua(n,`Date`),i=Ua(n,`RegExp`),a=Ua(n,`Object`),o,s;if(pa(e)===e&&!r&&!i){if(o=Va.get(e),o)return o;if(o=++Wa+`~`,Va.set(e,o),Array.isArray(e)){for(o=`@`,s=0;s<e.length;s++)o+=Ga(e[s])+`,`;Va.set(e,o)}if(a){o=`#`;let t=pa.keys(e).sort();for(;!ma(s=t.pop());)ma(e[s])||(o+=s+`:`+Ga(e[s])+`,`);Va.set(e,o)}}else o=r?e.toJSON():t==`symbol`?e.toString():t==`string`?JSON.stringify(e):``+e;return o},Ka=e=>{if(ha(e))try{e=e()}catch{e=``}let t=e;return e=typeof e==`string`?e:(Array.isArray(e)?e.length:e)?Ga(e):``,[e,t]},qa=0,Ja=()=>++qa;async function Ya(...e){let[t,n,r,i]=e,a=ga({populateCache:!0,throwOnError:!0},typeof i==`boolean`?{revalidate:i}:i||{}),o=a.populateCache,s=a.rollbackOnError,c=a.optimisticData,l=e=>typeof s==`function`?s(e):s!==!1,u=a.throwOnError;if(ha(n)){let e=n,r=[],i=t.keys();for(let n of i)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(d))}return d(n);async function d(n){let[i]=Ka(n);if(!i)return;let[s,d]=Ta(t,i),[f,p,m,h]=da.get(t),g=()=>{let e=f[i];return(ha(a.revalidate)?a.revalidate(s().data,n):a.revalidate!==!1)&&(delete m[i],delete h[i],e&&e[0])?e[0](2).then(()=>s().data):s().data};if(e.length<3)return g();let _=r,v,y=!1,b=Ja();p[i]=[b,0];let x=!ma(c),S=s(),C=S.data,w=S._c,T=ma(w)?C:w;if(x&&(c=ha(c)?c(T,C):c,d({data:c,_c:T})),ha(_))try{_=_(T)}catch(e){v=e,y=!0}if(_&&_a(_))if(_=await _.catch(e=>{v=e,y=!0}),b!==p[i][0]){if(y)throw v;return _}else y&&x&&l(v)&&(o=!0,d({data:T,_c:void 0}));if(o&&(y||(ha(o)?d({data:o(_,T),error:void 0,_c:void 0}):d({data:_,error:void 0,_c:void 0}))),p[i][1]=Ja(),Promise.resolve(g()).then(()=>{d({_c:void 0})}),y){if(u)throw v;return}return _}}var Xa=(e,t)=>{for(let n in e)e[n][0]&&e[n][0](t)},Za=(e,t)=>{if(!da.has(e)){let n=ga(Pa,t),r=Object.create(null),i=Ya.bind(void 0,e),a=fa,o=Object.create(null),s=(e,t)=>{let n=o[e]||[];return o[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},c=(t,n,r)=>{e.set(t,n);let i=o[t];if(i)for(let e of i)e(n,r)},l=()=>{if(!da.has(e)&&(da.set(e,[r,Object.create(null),Object.create(null),Object.create(null),i,c,s]),!Ia)){let t=n.initFocus(setTimeout.bind(void 0,Xa.bind(void 0,r,0))),i=n.initReconnect(setTimeout.bind(void 0,Xa.bind(void 0,r,1)));a=()=>{t&&t(),i&&i(),da.delete(e)}}};return l(),[e,i,l,a]}return[e,da.get(e)[4]]},Qa=(e,t,n,r,i)=>{let a=n.errorRetryCount,o=i.retryCount,s=~~((Math.random()+.5)*(1<<(o<8?o:8)))*n.errorRetryInterval;!ma(a)&&o>a||setTimeout(r,s,i)},$a=ua,[eo,to]=Za(new Map),no=ga({onLoadingSlow:fa,onSuccess:fa,onError:fa,onErrorRetry:Qa,onDiscarded:fa,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ba?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Ba?5e3:3e3,compare:$a,isPaused:()=>!1,cache:eo,mutate:to,fallback:{}},Na),ro=(e,t)=>{let n=ga(e,t);if(t){let{use:r,fallback:i}=e,{use:a,fallback:o}=t;r&&a&&(n.use=r.concat(a)),i&&o&&(n.fallback=ga(i,o))}return n},io=(0,h.createContext)({}),ao=e=>{let{value:t}=e,n=(0,h.useContext)(io),r=ha(t),i=(0,h.useMemo)(()=>r?t(n):t,[r,n,t]),a=(0,h.useMemo)(()=>r?i:ro(n,i),[r,n,i]),o=i&&i.provider,s=(0,h.useRef)(void 0);o&&!s.current&&(s.current=Za(o(a.cache||eo),i));let c=s.current;return c&&(a.cache=c[0],a.mutate=c[1]),Ra(()=>{if(c)return c[2]&&c[2](),c[3]},[]),(0,h.createElement)(io.Provider,ga(e,{value:a}))},oo=xa&&window.__SWR_DEVTOOLS_USE__,so=oo?window.__SWR_DEVTOOLS_USE__:[],co=()=>{oo&&(window.__SWR_DEVTOOLS_REACT__=h.default)},lo=e=>ha(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],uo=()=>{let e=(0,h.useContext)(io);return(0,h.useMemo)(()=>ga(no,e),[e])},fo=so.concat(e=>(t,n,r)=>e(t,n&&((...e)=>{let[r]=Ka(t),[,,,i]=da.get(eo);if(r.startsWith(`$inf$`))return n(...e);let a=i[r];return ma(a)?n(...e):(delete i[r],a)}),r)),po=e=>function(...t){let n=uo(),[r,i,a]=lo(t),o=ro(n,a),s=e,{use:c}=o,l=(c||[]).concat(fo);for(let e=l.length;e--;)s=l[e](s);return s(r,i||o.fetcher||null,o)},mo=(e,t,n)=>{let r=t[e]||(t[e]=[]);return r.push(n),()=>{let e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}};co();var ho=h.default.use||(e=>{switch(e.status){case`pending`:throw e;case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:throw e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}),e}}),go={dedupe:!0},_o=Promise.resolve(void 0),vo=()=>fa,yo=(e,t,n)=>{let{cache:r,compare:i,suspense:a,fallbackData:o,revalidateOnMount:s,revalidateIfStale:c,refreshInterval:l,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:f,strictServerPrefetchWarning:p}=n,[m,g,_,v]=da.get(r),[y,b]=Ka(e),x=(0,h.useRef)(!1),S=(0,h.useRef)(!1),C=(0,h.useRef)(y),w=(0,h.useRef)(t),T=(0,h.useRef)(n),E=()=>T.current,D=()=>E().isVisible()&&E().isOnline(),[O,k,A,j]=Ta(r,y),M=(0,h.useRef)({}).current,N=ma(o)?ma(n.fallback)?void 0:n.fallback[y]:o,ee=(e,t)=>{for(let n in M){let r=n;if(r===`data`){if(!i(e[r],t[r])&&(!ma(e[r])||!i(se,t[r])))return!1}else if(t[r]!==e[r])return!1}return!0},P=!x.current,te=(0,h.useMemo)(()=>{let e=O(),n=j(),r=e=>{let n=ga(e);return delete n._k,!(!y||!t||E().isPaused())&&(P&&!ma(s)?s:ma(ma(N)?n.data:N)||c)?{isValidating:!0,isLoading:!0,...n}:n},i=r(e),a=e===n?i:r(n),o=i;return[()=>{let e=r(O());return ee(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]},[r,y]),ne=(0,aa.useSyncExternalStore)((0,h.useCallback)(e=>A(y,(t,n)=>{ee(n,t)||e()}),[r,y]),te[0],te[1]),re=m[y]&&m[y].length>0,ie=ne.data,F=ma(ie)?N&&_a(N)?ho(N):N:ie,ae=ne.error,oe=(0,h.useRef)(F),se=f?ma(ie)?ma(oe.current)?F:oe.current:ie:F,ce=y&&ma(F),le=(0,h.useRef)(null);!Ia&&(0,aa.useSyncExternalStore)(vo,()=>(le.current=!1,le),()=>(le.current=!0,le));let ue=le.current;p&&ue&&!a&&ce&&console.warn(`Missing pre-initiated data for serialized key "${y}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let I=!y||!t||E().isPaused()||re&&!ma(ae)?!1:P&&!ma(s)?s:a?ma(F)?!1:c:ma(F)||c,L=P&&I,de=ma(ne.isValidating)?L:ne.isValidating,fe=ma(ne.isLoading)?L:ne.isLoading,pe=(0,h.useCallback)(async e=>{let t=w.current;if(!y||!t||S.current||E().isPaused())return!1;let r,a,o=!0,s=e||{},c=!_[y]||!s.dedupe,l=()=>Fa?!S.current&&y===C.current&&x.current:y===C.current,u={isValidating:!1,isLoading:!1},d=()=>{k(u)},f=()=>{let e=_[y];e&&e[1]===a&&delete _[y]},p={isValidating:!0};ma(O().data)&&(p.isLoading=!0);try{if(c&&(k(p),n.loadingTimeout&&ma(O().data)&&setTimeout(()=>{o&&l()&&E().onLoadingSlow(y,n)},n.loadingTimeout),_[y]=[t(b),Ja()]),[r,a]=_[y],r=await r,c&&setTimeout(f,n.dedupingInterval),!_[y]||_[y][1]!==a)return c&&l()&&E().onDiscarded(y),!1;u.error=void 0;let e=g[y];if(!ma(e)&&(a<=e[0]||a<=e[1]||e[1]===0))return d(),c&&l()&&E().onDiscarded(y),!1;let s=O().data;u.data=i(s,r)?s:r,c&&l()&&E().onSuccess(r,y,n)}catch(e){f();let t=E(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,c&&l()&&(t.onError(e,y,t),(n===!0||ha(n)&&n(e))&&(!E().revalidateOnFocus||!E().revalidateOnReconnect||D())&&t.onErrorRetry(e,y,t,e=>{let t=m[y];t&&t[0]&&t[0](3,e)},{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return o=!1,d(),!0},[y,r]),me=(0,h.useCallback)((...e)=>Ya(r,C.current,...e),[]);if(Ra(()=>{w.current=t,T.current=n,ma(ie)||(oe.current=ie)}),Ra(()=>{if(!y)return;let e=pe.bind(void 0,go),t=0;E().revalidateOnFocus&&(t=Date.now()+E().focusThrottleInterval);let n=mo(y,m,(n,r={})=>{if(n==0){let n=Date.now();E().revalidateOnFocus&&n>t&&D()&&(t=n+E().focusThrottleInterval,e())}else if(n==1)E().revalidateOnReconnect&&D()&&e();else if(n==2)return pe();else if(n==3)return pe(r)});return S.current=!1,C.current=y,x.current=!0,k({_k:b}),I&&(_[y]||(ma(F)||Ia?e():La(e))),()=>{S.current=!0,n()}},[y]),Ra(()=>{let e;function t(){let t=ha(l)?l(O().data):l;t&&e!==-1&&(e=setTimeout(n,t))}function n(){!O().error&&(u||E().isVisible())&&(d||E().isOnline())?pe(go).then(t):t()}return t(),()=>{e&&=(clearTimeout(e),-1)}},[l,u,d,y]),(0,h.useDebugValue)(se),a){if(!Fa&&Ia&&ce)throw Error(`Fallback data is required when using Suspense in SSR.`);ce&&(w.current=t,T.current=n,S.current=!1);let e=v[y];if(ho(!ma(e)&&ce?me(e):_o),!ma(ae)&&ce)throw ae;let r=ce?pe(go):_o;!ma(se)&&ce&&(r.status=`fulfilled`,r.value=!0),ho(r)}return{mutate:me,get data(){return M.data=!0,se},get error(){return M.error=!0,ae},get isValidating(){return M.isValidating=!0,de},get isLoading(){return M.isLoading=!0,fe}}};pa.defineProperty(ao,`defaultValue`,{value:no});var bo=po(yo);function xo(e){let t=qn(),{errorToast:n}=ca(),{data:r,error:i,isValidating:a,mutate:o}=bo((0,h.useMemo)(()=>e.url?e.params?[e.url,JSON.stringify(e.params)]:[e.url]:null,[e.url,JSON.stringify(e.params)]),([n,r])=>r?t.get(n,e.params):t.get(n),{shouldRetryOnError:!1,revalidateOnFocus:e.revalidateOnFocus,revalidateOnMount:e.revalidateOnMount,refreshInterval:e.refreshInterval});return(0,h.useEffect)(()=>{r&&e.dataSetter(r.data.data,r.data.meta)},[r]),(0,h.useEffect)(()=>{i&&n(i)},[i]),{data:r,pending:a,error:i,isValidating:a,mutate:o}}function So({message:e}){return(0,n.jsxs)(Zn,{accent:`red`,children:[(0,n.jsxs)(`div`,{className:`space-y-3`,children:[(0,n.jsx)(`p`,{className:`font-semibold text-core-primary-500 text-sm uppercase tracking-[0.2em]`,children:`PortalSessions`}),(0,n.jsx)(`h1`,{className:`font-semibold text-3xl text-core-gray-900 tracking-tight sm:text-5xl`,children:`Session Unavailable`})]}),e&&(0,n.jsx)(`div`,{className:`w-full rounded-2xl border border-core-red-100 bg-core-red-50 px-5 py-4 font-medium text-core-red-700 text-sm`,children:e})]})}function Co(e){let[t,r]=(0,h.useState)(null),i=e.uuid,{mutate:a,error:o,pending:s}=xo({url:i,dataSetter:r});return t?t.status===_.EXPIRED?(0,n.jsx)(So,{message:`Portal session with uuid ${i} has expired.`}):(0,n.jsx)(ti.Provider,{value:{uuid:i,portalSession:t,setPortalSession:r,mutate:a,error:o},children:e.children}):(0,n.jsx)(Qn,{message:`Awaiting new session`})}function wo(){let e=(0,h.useContext)(ei);if(!e)throw Error(`Only use 'useConfigurationContext' within a ConfigurationContext Provider`);return e}var To=[{id:`session`,label:`Session`},{id:`configuration`,label:`Configuration`},{id:`inputData`,label:`Input data`},{id:`raw`,label:`Raw JSON`}];function Eo(e){navigator?.clipboard?.writeText&&navigator.clipboard.writeText(e)}function Do(e){if(e===void 0)return`—`;if(e===null)return`null`;if(typeof e==`string`)return e||`—`;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function Oo({label:e,value:t}){let r=Do(t),i=typeof t==`string`&&t.length>0;return(0,n.jsxs)(`div`,{className:`flex items-start justify-between gap-3 border-white/5 border-b py-2 last:border-none`,children:[(0,n.jsx)(`span`,{className:`shrink-0 font-medium text-[11px] text-white/50 uppercase tracking-wider`,children:e}),(0,n.jsx)(`button`,{type:`button`,title:i?`Click to copy`:void 0,onClick:i?()=>Eo(r):void 0,className:`break-all text-right font-mono text-[12px] text-white ${i?`cursor-pointer hover:text-emerald-300`:`cursor-default`}`,children:r})]})}function ko({title:e,children:t}){return(0,n.jsxs)(`div`,{className:`rounded-xl border border-white/10 bg-white/[0.03] p-4`,children:[(0,n.jsx)(`p`,{className:`m-0 mb-2 font-semibold text-[11px] text-emerald-300 uppercase tracking-widest`,children:e}),(0,n.jsx)(`div`,{className:`flex flex-col`,children:t})]})}function Ao(){let e=wo(),{uuid:t,portalSession:r,error:i}=H(),[a,o]=(0,h.useState)(!1),[s,c]=(0,h.useState)(`session`);(0,h.useEffect)(()=>{let e=e=>{e.key===`Escape`&&o(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let l=r?.input_data??{},u={uuid:t,type:r?.type,contact:r?.contact,currency:r?.currency,loyaltyProgram:r?.loyalty_program,events:r?.events,results:r?.results,inputData:l,error:i?.message},d=Object.entries(e).filter(([,e])=>typeof e!=`function`),f=Object.entries(e).filter(([,e])=>typeof e==`function`);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`button`,{type:`button`,onClick:()=>o(e=>!e),className:`fixed top-2 left-1/2 z-[2147483646] flex -translate-x-1/2 transform items-center gap-2 rounded-full border border-white/10 bg-zinc-900/90 px-3 py-1.5 font-medium text-white text-xs shadow-black/30 shadow-lg backdrop-blur transition-all hover:scale-[1.02] hover:bg-zinc-800/95`,"aria-label":`Toggle debug panel`,children:[(0,n.jsx)(`span`,{className:`inline-flex h-2 w-2 animate-pulse rounded-full bg-emerald-400`}),(0,n.jsx)(`span`,{className:`tracking-wide`,children:`DEBUG`}),(0,n.jsx)(`span`,{className:`hidden font-mono text-[10px] text-white/40 sm:inline`,children:t?.slice(0,8)||`no-session`})]}),a&&(0,n.jsxs)(`div`,{className:`fixed inset-0 z-[2147483647] flex items-start justify-center bg-black/40 p-4 backdrop-blur-sm sm:p-8`,children:[(0,n.jsx)(`button`,{type:`button`,"aria-label":`Close debug panel`,className:`absolute inset-0 cursor-default`,onClick:()=>o(!1)}),(0,n.jsxs)(`div`,{className:`relative flex max-h-[calc(100vh-2rem)] w-full max-w-3xl flex-col overflow-hidden rounded-2xl border border-white/10 bg-gradient-to-b from-zinc-900 to-zinc-950 text-white shadow-2xl shadow-black/50`,children:[(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-white/10 border-b px-5 py-4`,children:[(0,n.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,n.jsx)(`span`,{className:`inline-flex h-2.5 w-2.5 animate-pulse rounded-full bg-emerald-400`}),(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`p`,{className:`m-0 font-semibold text-sm`,children:`Portal PointsTransactionSession Debug`}),(0,n.jsx)(`p`,{className:`m-0 font-mono text-[11px] text-white/50`,children:t||`no session uuid`})]})]}),(0,n.jsx)(`button`,{type:`button`,onClick:()=>o(!1),className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-white/60 transition-colors hover:bg-white/10 hover:text-white`,"aria-label":`Close`,children:`✕`})]}),(0,n.jsx)(`div`,{className:`flex gap-1 border-white/10 border-b px-3 pt-3`,children:To.map(e=>{let t=s===e.id;return(0,n.jsxs)(`button`,{type:`button`,onClick:()=>c(e.id),className:`relative -mb-px cursor-pointer rounded-t-md px-3 py-2 font-medium text-xs transition-colors ${t?`border-white/10 border-x border-t bg-white/[0.04] text-white`:`text-white/60 hover:text-white`}`,children:[e.label,t&&(0,n.jsx)(`span`,{className:`absolute inset-x-0 -bottom-px h-0.5 bg-emerald-400`})]},e.id)})}),(0,n.jsxs)(`div`,{className:`flex-1 space-y-3 overflow-auto p-5`,children:[s===`session`&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ko,{title:`Identity`,children:[(0,n.jsx)(Oo,{label:`PointsTransactionSession UUID`,value:t}),(0,n.jsx)(Oo,{label:`Type`,value:r?.type}),(0,n.jsx)(Oo,{label:`Contact UUID`,value:r?.contact?.uuid}),(0,n.jsx)(Oo,{label:`Currency`,value:r?.currency})]}),(0,n.jsxs)(ko,{title:`Loyalty program`,children:[(0,n.jsx)(Oo,{label:`Name`,value:r?.loyalty_program?.name}),(0,n.jsx)(Oo,{label:`Max amount`,value:r?.loyalty_program?.max_amount}),(0,n.jsx)(Oo,{label:`Custom credit name`,value:r?.loyalty_program?.custom_credit_name})]}),(0,n.jsxs)(ko,{title:`Events`,children:[(0,n.jsx)(Oo,{label:`Count`,value:r?.events?.length??0}),r?.events?.slice(-3).map((e,t)=>(0,n.jsx)(Oo,{label:e.type,value:e.created_at},`${e.type}-${e.created_at}-${t}`))]}),i&&(0,n.jsx)(ko,{title:`Error`,children:(0,n.jsx)(Oo,{label:`Message`,value:i.message})})]}),s===`configuration`&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(ko,{title:`Props`,children:[d.length===0&&(0,n.jsx)(`p`,{className:`m-0 py-2 text-[12px] text-white/40`,children:`No configuration provided.`}),d.map(([e,t])=>(0,n.jsx)(Oo,{label:e,value:t},e))]}),(0,n.jsxs)(ko,{title:`Callbacks`,children:[f.length===0&&(0,n.jsx)(`p`,{className:`m-0 py-2 text-[12px] text-white/40`,children:`No callbacks registered.`}),f.map(([e])=>(0,n.jsx)(Oo,{label:e,value:`ƒ registered`},e))]})]}),s===`inputData`&&(0,n.jsxs)(ko,{title:`Resolved input data`,children:[Object.entries(l).length===0&&(0,n.jsx)(`p`,{className:`m-0 py-2 text-[12px] text-white/40`,children:`No input data available.`}),Object.entries(l).map(([e,t])=>(0,n.jsx)(Oo,{label:e,value:t},e))]}),s===`raw`&&(0,n.jsxs)(`div`,{className:`rounded-xl border border-white/10 bg-black/40 p-4`,children:[(0,n.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,n.jsx)(`p`,{className:`m-0 font-semibold text-[11px] text-emerald-300 uppercase tracking-widest`,children:`Raw snapshot`}),(0,n.jsx)(`button`,{type:`button`,onClick:()=>Eo(JSON.stringify(u,null,2)),className:`cursor-pointer rounded-md bg-white/10 px-2 py-1 text-[11px] text-white/80 transition-colors hover:bg-white/20`,children:`Copy JSON`})]}),(0,n.jsx)(`pre`,{className:`m-0 max-h-[60vh] overflow-auto font-mono text-[11px] text-white/80 leading-relaxed`,children:JSON.stringify(u,null,2)})]})]}),(0,n.jsxs)(`div`,{className:`border-white/10 border-t px-5 py-3 text-[11px] text-white/40`,children:[`Press `,(0,n.jsx)(`kbd`,{className:`rounded bg-white/10 px-1 py-0.5`,children:`Esc`}),` `,`to close · Click any value to copy`]})]})]})]})}var jo=m(d(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(require("react")):typeof define==`function`&&define.amd?define([`react`],r):typeof e==`object`?e.ReactSimpleKeyboard=r(require("react")):n.ReactSimpleKeyboard=r(n.React)})(e,(function(e){return function(){var t={981:function(){typeof Element>`u`||`remove`in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<`u`&&`document`in self&&((!(`classList`in document.createElement(`_`))||document.createElementNS&&!(`classList`in document.createElementNS(`http://www.w3.org/2000/svg`,`g`)))&&function(e){"use strict";if(`Element`in e){var t=`classList`,n=`prototype`,r=e.Element[n],i=Object,a=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,``)},o=Array[n].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},s=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},c=function(e,t){if(t===``)throw new s(`SYNTAX_ERR`,`The token must not be empty.`);if(/\s/.test(t))throw new s(`INVALID_CHARACTER_ERR`,`The token must not contain space characters.`);return o.call(e,t)},l=function(e){for(var t=a.call(e.getAttribute(`class`)||``),n=t?t.split(/\s+/):[],r=0,i=n.length;r<i;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute(`class`,this.toString())}},u=l[n]=[],d=function(){return new l(this)};if(s[n]=Error[n],u.item=function(e){return this[e]||null},u.contains=function(e){return~c(this,e+``)},u.add=function(){var e,t=arguments,n=0,r=t.length,i=!1;do~c(this,e=t[n]+``)||(this.push(e),i=!0);while(++n<r);i&&this._updateClassName()},u.remove=function(){var e,t,n=arguments,r=0,i=n.length,a=!1;do for(t=c(this,e=n[r]+``);~t;)this.splice(t,1),a=!0,t=c(this,e);while(++r<i);a&&this._updateClassName()},u.toggle=function(e,t){var n=this.contains(e),r=n?!0!==t&&`remove`:!1!==t&&`add`;return r&&this[r](e),!0===t||!1===t?t:!n},u.replace=function(e,t){var n=c(e+``);~n&&(this.splice(n,1,t),this._updateClassName())},u.toString=function(){return this.join(` `)},i.defineProperty){var f={get:d,enumerable:!0,configurable:!0};try{i.defineProperty(r,t,f)}catch(e){e.number!==void 0&&e.number!==-2146823252||(f.enumerable=!1,i.defineProperty(r,t,f))}}else i[n].__defineGetter__&&r.__defineGetter__(t,d)}}(self),function(){"use strict";var e=document.createElement(`_`);if(e.classList.add(`c1`,`c2`),!e.classList.contains(`c2`)){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var n,r=arguments.length;for(n=0;n<r;n++)e=arguments[n],t.call(this,e)}};t(`add`),t(`remove`)}if(e.classList.toggle(`c3`,!1),e.classList.contains(`c3`)){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:n.call(this,e)}}`replace`in document.createElement(`_`).classList||(DOMTokenList.prototype.replace=function(e,t){var n=this.toString().split(` `),r=n.indexOf(e+``);~r&&(n=n.slice(r),this.remove.apply(this,n),this.add(t),this.add.apply(this,n.slice(1)))}),e=null}())},548:function(e){e.exports=function(){"use strict";var e={9306:function(e,t,n){var r=n(4901),i=n(6823),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not a function`)}},5548:function(e,t,n){var r=n(3517),i=n(6823),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not a constructor`)}},3506:function(e,t,n){var r=n(3925),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(`Can't set `+i(e)+` as a prototype`)}},6469:function(e,t,n){var r=n(8227),i=n(2360),a=n(4913).f,o=r(`unscopables`),s=Array.prototype;s[o]===void 0&&a(s,o,{configurable:!0,value:i(null)}),e.exports=function(e){s[o][e]=!0}},7829:function(e,t,n){var r=n(8183).charAt;e.exports=function(e,t,n){return t+(n&&r(e,t).length||1)}},8551:function(e,t,n){var r=n(34),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not an object`)}},235:function(e,t,n){var r=n(9213).forEach;e.exports=n(4598)(`forEach`)?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},7916:function(e,t,n){var r=n(6080),i=n(9565),a=n(8981),o=n(6319),s=n(4209),c=n(3517),l=n(6198),u=n(4659),d=n(4527),f=n(81),p=n(851),m=n(9539),h=Array;e.exports=function(e){var t=c(this),n=arguments.length,g=n>1?arguments[1]:void 0,_=g!==void 0;_&&(g=r(g,n>2?arguments[2]:void 0));var v,y,b,x,S,C,w=a(e),T=p(w),E=0;if(!T||this===h&&s(T))for(v=l(w),y=t?new this(v):h(v);v>E;E++)C=_?g(w[E],E):w[E],u(y,E,C);else for(y=t?new this:[],S=(x=f(w,T)).next;!(b=i(S,x)).done;E++){C=_?o(x,g,[b.value,E],!0):b.value;try{u(y,E,C)}catch(e){m(x,`throw`,e)}}return d(y,E),y}},9617:function(e,t,n){var r=n(5397),i=n(5610),a=n(6198),o=function(e){return function(t,n,o){var s=r(t),c=a(s);if(c===0)return!e&&-1;var l,u=i(o,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},9213:function(e,t,n){var r=n(6080),i=n(7055),a=n(8981),o=n(6198),s=n(1469),c=n(4659),l=function(e){var t=e===1,n=e===2,l=e===3,u=e===4,d=e===6,f=e===7,p=e===5||d;return function(m,h,g){for(var _,v,y=a(m),b=i(y),x=o(b),S=r(h,g),C=0,w=0,T=t?s(m,x):n||f?s(m,0):void 0;x>C;C++)if((p||C in b)&&(v=S(_=b[C],C,y),e))if(t)c(T,C,v);else if(v)switch(e){case 3:return!0;case 5:return _;case 6:return C;case 2:c(T,w++,_)}else switch(e){case 4:return!1;case 7:c(T,w++,_)}return d?-1:l||u?u:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},597:function(e,t,n){var r=n(9039),i=n(8227),a=n(9519),o=i(`species`);e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},t[e](Boolean).foo!==1}))}},4598:function(e,t,n){var r=n(9039);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},926:function(e,t,n){var r=n(9306),i=n(8981),a=n(7055),o=n(6198),s=TypeError,c=`Reduce of empty array with no initial value`,l=function(e){return function(t,n,l,u){var d=i(t),f=a(d),p=o(d);if(r(n),p===0&&l<2)throw new s(c);var m=e?p-1:0,h=e?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,e?m<0:p<=m)throw new s(c)}for(;e?m>=0:p>m;m+=h)m in f&&(u=n(u,f[m],m,d));return u}};e.exports={left:l(!1),right:l(!0)}},4527:function(e,t,n){var r=n(3724),i=n(4376),a=TypeError,o=Object.getOwnPropertyDescriptor;e.exports=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(i(e)&&!o(e,`length`).writable)throw new a(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t}},7680:function(e,t,n){e.exports=n(9504)([].slice)},4488:function(e,t,n){var r=n(7680),i=Math.floor,a=function(e,t){var n=e.length;if(n<8)for(var o,s,c=1;c<n;){for(s=c,o=e[c];s&&t(e[s-1],o)>0;)e[s]=e[--s];s!==c++&&(e[s]=o)}else for(var l=i(n/2),u=a(r(e,0,l),t),d=a(r(e,l),t),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)e[m+h]=m<f&&h<p?t(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return e};e.exports=a},7433:function(e,t,n){var r=n(4376),i=n(3517),a=n(34),o=n(8227)(`species`),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||a(t)&&(t=t[o])===null)&&(t=void 0)),t===void 0?s:t}},1469:function(e,t,n){var r=n(7433);e.exports=function(e,t){return new(r(e))(t===0?0:t)}},6319:function(e,t,n){var r=n(8551),i=n(9539);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){i(e,`throw`,t)}}},4428:function(e,t,n){var r=n(8227)(`iterator`),i=!1;try{var a=0,o={next:function(){return{done:!!a++}},return:function(){i=!0}};o[r]=function(){return this},Array.from(o,(function(){throw 2}))}catch{}e.exports=function(e,t){try{if(!t&&!i)return!1}catch{return!1}var n=!1;try{var a={};a[r]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch{}return n}},2195:function(e,t,n){var r=n(9504),i=r({}.toString),a=r(``.slice);e.exports=function(e){return a(i(e),8,-1)}},6955:function(e,t,n){var r=n(2140),i=n(4901),a=n(2195),o=n(8227)(`toStringTag`),s=Object,c=a(function(){return arguments}())===`Arguments`;e.exports=r?a:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=s(e),o))==`string`?n:c?a(t):(r=a(t))===`Object`&&i(t.callee)?`Arguments`:r}},7740:function(e,t,n){var r=n(9297),i=n(5031),a=n(7347),o=n(4913);e.exports=function(e,t,n){for(var s=i(t),c=o.f,l=a.f,u=0;u<s.length;u++){var d=s[u];r(e,d)||n&&r(n,d)||c(e,d,l(t,d))}}},1436:function(e,t,n){var r=n(8227)(`match`);e.exports=function(e){var t=/./;try{`/./`[e](t)}catch{try{return t[r]=!1,`/./`[e](t)}catch{}}return!1}},2211:function(e,t,n){e.exports=!n(9039)((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},2529:function(e){e.exports=function(e,t){return{value:e,done:t}}},6699:function(e,t,n){var r=n(3724),i=n(4913),a=n(6980);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},6980:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},4659:function(e,t,n){var r=n(3724),i=n(4913),a=n(6980);e.exports=function(e,t,n){r?i.f(e,t,a(0,n)):e[t]=n}},3640:function(e,t,n){var r=n(8551),i=n(4270),a=TypeError;e.exports=function(e){if(r(this),e===`string`||e===`default`)e=`string`;else if(e!==`number`)throw new a(`Incorrect hint`);return i(this,e)}},2106:function(e,t,n){var r=n(283),i=n(4913);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},6840:function(e,t,n){var r=n(4901),i=n(4913),a=n(283),o=n(9433);e.exports=function(e,t,n,s){s||={};var c=s.enumerable,l=s.name===void 0?t:s.name;if(r(n)&&a(n,l,s),s.global)c?e[t]=n:o(t,n);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch{}c?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},9433:function(e,t,n){var r=n(4576),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch{r[e]=t}return t}},4606:function(e,t,n){var r=n(6823),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i(`Cannot delete property `+r(t)+` of `+r(e))}},3724:function(e,t,n){e.exports=!n(9039)((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},4055:function(e,t,n){var r=n(4576),i=n(34),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},6837:function(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw new t(`Maximum allowed index exceeded`);return e}},7400:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(e,t,n){var r=n(4055)(`span`).classList,i=r&&r.constructor&&r.constructor.prototype;e.exports=i===Object.prototype?void 0:i},8727:function(e){e.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]},3709:function(e,t,n){var r=n(2839).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},3763:function(e,t,n){var r=n(2839);e.exports=/MSIE|Trident/.test(r)},6193:function(e,t,n){e.exports=n(4215)===`NODE`},2839:function(e,t,n){var r=n(4576).navigator,i=r&&r.userAgent;e.exports=i?String(i):``},9519:function(e,t,n){var r,i,a=n(4576),o=n(2839),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u&&(i=(r=u.split(`.`))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},3607:function(e,t,n){var r=n(2839).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},4215:function(e,t,n){var r=n(4576),i=n(2839),a=n(2195),o=function(e){return i.slice(0,e.length)===e};e.exports=o(`Bun/`)?`BUN`:o(`Cloudflare-Workers`)?`CLOUDFLARE`:o(`Deno/`)?`DENO`:o(`Node.js/`)?`NODE`:r.Bun&&typeof Bun.version==`string`?`BUN`:r.Deno&&typeof Deno.version==`object`?`DENO`:a(r.process)===`process`?`NODE`:r.window&&r.document?`BROWSER`:`REST`},6518:function(e,t,n){var r=n(4576),i=n(7347).f,a=n(6699),o=n(6840),s=n(9433),c=n(7740),l=n(2796);e.exports=function(e,t){var n,u,d,f,p,m=e.target,h=e.global,g=e.stat;if(n=h?r:g?r[m]||s(m,{}):r[m]&&r[m].prototype)for(u in t){if(f=t[u],d=e.dontCallGetSet?(p=i(n,u))&&p.value:n[u],!l(h?u:m+(g?`.`:`#`)+u,e.forced)&&d!==void 0){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&a(f,`sham`,!0),o(n,u,f,e)}}},9039:function(e){e.exports=function(e){try{return!!e()}catch{return!0}}},9228:function(e,t,n){n(7495);var r=n(9565),i=n(6840),a=n(7323),o=n(9039),s=n(8227),c=n(6699),l=s(`species`),u=RegExp.prototype;e.exports=function(e,t,n,d){var f=s(e),p=!o((function(){var t={};return t[f]=function(){return 7},``[e](t)!==7})),m=p&&!o((function(){var t=!1,n=/a/;if(e===`split`){var r={};r[l]=function(){return n},(n={constructor:r,flags:``})[f]=/./[f]}return n.exec=function(){return t=!0,null},n[f](``),!t}));if(!p||!m||n){var h=/./[f],g=t(f,``[e],(function(e,t,n,i,o){var s=t.exec;return s===a||s===u.exec?p&&!o?{done:!0,value:r(h,t,n,i)}:{done:!0,value:r(e,n,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(u,f,g[1])}d&&c(u[f],`sham`,!0)}},8745:function(e,t,n){var r=n(616),i=Function.prototype,a=i.apply,o=i.call;e.exports=typeof Reflect==`object`&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},6080:function(e,t,n){var r=n(7476),i=n(9306),a=n(616),o=r(r.bind);e.exports=function(e,t){return i(e),t===void 0?e:a?o(e,t):function(){return e.apply(t,arguments)}}},616:function(e,t,n){e.exports=!n(9039)((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}))},566:function(e,t,n){var r=n(9504),i=n(9306),a=n(34),o=n(9297),s=n(7680),c=n(616),l=Function,u=r([].concat),d=r([].join),f={};e.exports=c?l.bind:function(e){var t=i(this),n=t.prototype,r=s(arguments,1),c=function(){var n=u(r,s(arguments));return this instanceof c?function(e,t,n){if(!o(f,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;f[t]=l(`C,a`,`return new C(`+d(r,`,`)+`)`)}return f[t](e,n)}(t,n.length,n):t.apply(e,n)};return a(n)&&(c.prototype=n),c}},9565:function(e,t,n){var r=n(616),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},350:function(e,t,n){var r=n(3724),i=n(9297),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,`name`);e.exports={EXISTS:s,PROPER:s&&function(){}.name===`something`,CONFIGURABLE:s&&(!r||r&&o(a,`name`).configurable)}},6706:function(e,t,n){var r=n(9504),i=n(9306);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}}},7476:function(e,t,n){var r=n(2195),i=n(9504);e.exports=function(e){if(r(e)===`Function`)return i(e)}},9504:function(e,t,n){var r=n(616),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},7751:function(e,t,n){var r=n(4576),i=n(4901);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},851:function(e,t,n){var r=n(6955),i=n(5966),a=n(4117),o=n(6269),s=n(8227)(`iterator`);e.exports=function(e){if(!a(e))return i(e,s)||i(e,`@@iterator`)||o[r(e)]}},81:function(e,t,n){var r=n(9565),i=n(9306),a=n(8551),o=n(6823),s=n(851),c=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(i(n))return a(r(n,e));throw new c(o(e)+` is not iterable`)}},5966:function(e,t,n){var r=n(9306),i=n(4117);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},2478:function(e,t,n){var r=n(9504),i=n(8981),a=Math.floor,o=r(``.charAt),s=r(``.replace),c=r(``.slice),l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,d,f){var p=n+e.length,m=r.length,h=u;return d!==void 0&&(d=i(d),h=l),s(f,h,(function(i,s){var l;switch(o(s,0)){case`$`:return`$`;case`&`:return e;case"`":return c(t,0,n);case`'`:return c(t,p);case`<`:l=d[c(s,1,-1)];break;default:var u=+s;if(u===0)return i;if(u>m){var f=a(u/10);return f===0?i:f<=m?r[f-1]===void 0?o(s,1):r[f-1]+o(s,1):i}l=r[u-1]}return l===void 0?``:l}))}},4576:function(e,t,n){var r=function(e){return e&&e.Math===Math&&e};e.exports=r(typeof globalThis==`object`&&globalThis)||r(typeof window==`object`&&window)||r(typeof self==`object`&&self)||r(typeof n.g==`object`&&n.g)||r(typeof this==`object`&&this)||function(){return this}()||Function(`return this`)()},9297:function(e,t,n){var r=n(9504),i=n(8981),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},421:function(e){e.exports={}},397:function(e,t,n){e.exports=n(7751)(`document`,`documentElement`)},5917:function(e,t,n){var r=n(3724),i=n(9039),a=n(4055);e.exports=!r&&!i((function(){return Object.defineProperty(a(`div`),"a",{get:function(){return 7}}).a!==7}))},7055:function(e,t,n){var r=n(9504),i=n(9039),a=n(2195),o=Object,s=r(``.split);e.exports=i((function(){return!o(`z`).propertyIsEnumerable(0)}))?function(e){return a(e)===`String`?s(e,``):o(e)}:o},3167:function(e,t,n){var r=n(4901),i=n(34),a=n(2967);e.exports=function(e,t,n){var o,s;return a&&r(o=t.constructor)&&o!==n&&i(s=o.prototype)&&s!==n.prototype&&a(e,s),e}},3706:function(e,t,n){var r=n(9504),i=n(4901),a=n(7629),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},1181:function(e,t,n){var r,i,a,o=n(8622),s=n(4576),c=n(34),l=n(6699),u=n(9297),d=n(7629),f=n(6119),p=n(421),m=`Object already initialized`,h=s.TypeError,g=s.WeakMap;if(o||d.state){var _=d.state||=new g;_.get=_.get,_.has=_.has,_.set=_.set,r=function(e,t){if(_.has(e))throw new h(m);return t.facade=e,_.set(e,t),t},i=function(e){return _.get(e)||{}},a=function(e){return _.has(e)}}else{var v=f(`state`);p[v]=!0,r=function(e,t){if(u(e,v))throw new h(m);return t.facade=e,l(e,v,t),t},i=function(e){return u(e,v)?e[v]:{}},a=function(e){return u(e,v)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new h(`Incompatible receiver, `+e+` required`);return n}}}},4209:function(e,t,n){var r=n(8227),i=n(6269),a=r(`iterator`),o=Array.prototype;e.exports=function(e){return e!==void 0&&(i.Array===e||o[a]===e)}},4376:function(e,t,n){var r=n(2195);e.exports=Array.isArray||function(e){return r(e)===`Array`}},4901:function(e){var t=typeof document==`object`&&document.all;e.exports=t===void 0&&t!==void 0?function(e){return typeof e==`function`||e===t}:function(e){return typeof e==`function`}},3517:function(e,t,n){var r=n(9504),i=n(9039),a=n(4901),o=n(6955),s=n(7751),c=n(3706),l=function(){},u=s(`Reflect`,`construct`),d=/^\s*(?:class|function)\b/,f=r(d.exec),p=!d.test(l),m=function(e){if(!a(e))return!1;try{return u(l,[],e),!0}catch{return!1}},h=function(e){if(!a(e))return!1;switch(o(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return p||!!f(d,c(e))}catch{return!0}};h.sham=!0,e.exports=!u||i((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?h:m},2796:function(e,t,n){var r=n(9039),i=n(4901),a=/#|\.prototype\./,o=function(e,t){var n=c[s(e)];return n===u||n!==l&&(i(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,`.`).toLowerCase()},c=o.data={},l=o.NATIVE=`N`,u=o.POLYFILL=`P`;e.exports=o},2087:function(e,t,n){var r=n(34),i=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&i(e)===e}},4117:function(e){e.exports=function(e){return e==null}},34:function(e,t,n){var r=n(4901);e.exports=function(e){return typeof e==`object`?e!==null:r(e)}},3925:function(e,t,n){var r=n(34);e.exports=function(e){return r(e)||e===null}},6395:function(e){e.exports=!1},5810:function(e,t,n){var r=n(34),i=n(1181).get;e.exports=function(e){if(!r(e))return!1;var t=i(e);return!!t&&t.type===`RawJSON`}},788:function(e,t,n){var r=n(34),i=n(2195),a=n(8227)(`match`);e.exports=function(e){var t;return r(e)&&((t=e[a])===void 0?i(e)===`RegExp`:!!t)}},757:function(e,t,n){var r=n(7751),i=n(4901),a=n(1625),o=n(7040),s=Object;e.exports=o?function(e){return typeof e==`symbol`}:function(e){var t=r(`Symbol`);return i(t)&&a(t.prototype,s(e))}},9539:function(e,t,n){var r=n(9565),i=n(8551),a=n(5966);e.exports=function(e,t,n){var o,s;i(e);try{if(!(o=a(e,`return`))){if(t===`throw`)throw n;return n}o=r(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw n;if(s)throw o;return i(o),n}},3994:function(e,t,n){var r=n(7657).IteratorPrototype,i=n(2360),a=n(6980),o=n(687),s=n(6269),c=function(){return this};e.exports=function(e,t,n,l){var u=t+` Iterator`;return e.prototype=i(r,{next:a(+!l,n)}),o(e,u,!1,!0),s[u]=c,e}},1088:function(e,t,n){var r=n(6518),i=n(9565),a=n(6395),o=n(350),s=n(4901),c=n(3994),l=n(2787),u=n(2967),d=n(687),f=n(6699),p=n(6840),m=n(8227),h=n(6269),g=n(7657),_=o.PROPER,v=o.CONFIGURABLE,y=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,x=m(`iterator`),S=`keys`,C=`values`,w=`entries`,T=function(){return this};e.exports=function(e,t,n,o,m,g,E){c(n,t,o);var D,O,k,A=function(e){if(e===m&&P)return P;if(!b&&e&&e in N)return N[e];switch(e){case S:case C:case w:return function(){return new n(this,e)}}return function(){return new n(this)}},j=t+` Iterator`,M=!1,N=e.prototype,ee=N[x]||N[`@@iterator`]||m&&N[m],P=!b&&ee||A(m),te=t===`Array`&&N.entries||ee;if(te&&(D=l(te.call(new e)))!==Object.prototype&&D.next&&(a||l(D)===y||(u?u(D,y):s(D[x])||p(D,x,T)),d(D,j,!0,!0),a&&(h[j]=T)),_&&m===C&&ee&&ee.name!==C&&(!a&&v?f(N,`name`,C):(M=!0,P=function(){return i(ee,this)})),m)if(O={values:A(C),keys:g?P:A(S),entries:A(w)},E)for(k in O)(b||M||!(k in N))&&p(N,k,O[k]);else r({target:t,proto:!0,forced:b||M},O);return a&&!E||N[x]===P||p(N,x,P,{name:m}),h[t]=P,O}},7657:function(e,t,n){var r,i,a,o=n(9039),s=n(4901),c=n(34),l=n(2360),u=n(2787),d=n(6840),f=n(8227),p=n(6395),m=f(`iterator`),h=!1;[].keys&&(`next`in(a=[].keys())?(i=u(u(a)))!==Object.prototype&&(r=i):h=!0),!c(r)||o((function(){var e={};return r[m].call(e)!==e}))?r={}:p&&(r=l(r)),s(r[m])||d(r,m,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},6269:function(e){e.exports={}},6198:function(e,t,n){var r=n(8014);e.exports=function(e){return r(e.length)}},283:function(e,t,n){var r=n(9504),i=n(9039),a=n(4901),o=n(9297),s=n(3724),c=n(350).CONFIGURABLE,l=n(3706),u=n(1181),d=u.enforce,f=u.get,p=String,m=Object.defineProperty,h=r(``.slice),g=r(``.replace),_=r([].join),v=s&&!i((function(){return m((function(){}),`length`,{value:8}).length!==8})),y=String(String).split(`String`),b=e.exports=function(e,t,n){h(p(t),0,7)===`Symbol(`&&(t=`[`+g(p(t),/^Symbol\(([^)]*)\).*$/,`$1`)+`]`),n&&n.getter&&(t=`get `+t),n&&n.setter&&(t=`set `+t),(!o(e,`name`)||c&&e.name!==t)&&(s?m(e,`name`,{value:t,configurable:!0}):e.name=t),v&&n&&o(n,`arity`)&&e.length!==n.arity&&m(e,`length`,{value:n.arity});try{n&&o(n,`constructor`)&&n.constructor?s&&m(e,`prototype`,{writable:!1}):e.prototype&&=void 0}catch{}var r=d(e);return o(r,`source`)||(r.source=_(y,typeof t==`string`?t:``)),e};Function.prototype.toString=b((function(){return a(this)&&f(this).source||l(this)}),`toString`)},741:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},7819:function(e,t,n){e.exports=!n(9039)((function(){var e=`9007199254740993`,t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))},5749:function(e,t,n){var r=n(788),i=TypeError;e.exports=function(e){if(r(e))throw new i(`The method doesn't accept regular expressions`);return e}},4213:function(e,t,n){var r=n(3724),i=n(9504),a=n(9565),o=n(9039),s=n(1072),c=n(3717),l=n(8773),u=n(8981),d=n(7055),f=Object.assign,p=Object.defineProperty,m=i([].concat);e.exports=!f||o((function(){if(r&&f({b:1},f(p({},`a`,{enumerable:!0,get:function(){p(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),i=`abcdefghijklmnopqrst`;return e[n]=7,i.split(``).forEach((function(e){t[e]=e})),f({},e)[n]!==7||s(f({},t)).join(``)!==i}))?function(e,t){for(var n=u(e),i=arguments.length,o=1,f=c.f,p=l.f;i>o;)for(var h,g=d(arguments[o++]),_=f?m(s(g),f(g)):s(g),v=_.length,y=0;v>y;)h=_[y++],r&&!a(p,g,h)||(n[h]=g[h]);return n}:f},2360:function(e,t,n){var r,i=n(8551),a=n(6801),o=n(8727),s=n(421),c=n(397),l=n(4055),u=n(6119),d=`prototype`,f=`script`,p=u(`IE_PROTO`),m=function(){},h=function(e){return`<`+f+`>`+e+`</`+f+`>`},g=function(e){e.write(h(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){try{r=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;_=typeof document<`u`?document.domain&&r?g(r):(t=l(`iframe`),n=`java`+f+`:`,t.style.display=`none`,c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(h(`document.F=Object`)),e.close(),e.F):g(r);for(var i=o.length;i--;)delete _[d][o[i]];return _()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return e===null?n=_():(m[d]=i(e),n=new m,m[d]=null,n[p]=e),t===void 0?n:a.f(n,t)}},6801:function(e,t,n){var r=n(3724),i=n(8686),a=n(4913),o=n(8551),s=n(5397),c=n(1072);t.f=r&&!i?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),i=c(t),l=i.length,u=0;l>u;)a.f(e,n=i[u++],r[n]);return e}},4913:function(e,t,n){var r=n(3724),i=n(5917),a=n(8686),o=n(8551),s=n(6969),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=`enumerable`,f=`configurable`,p=`writable`;t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),typeof e==`function`&&t===`prototype`&&`value`in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:d in n?n[d]:r[d],writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return l(e,t,n)}catch{}if(`get`in n||`set`in n)throw new c(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e}},7347:function(e,t,n){var r=n(3724),i=n(9565),a=n(8773),o=n(6980),s=n(5397),c=n(6969),l=n(9297),u=n(5917),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=c(t),u)try{return d(e,t)}catch{}if(l(e,t))return o(!i(a.f,e,t),e[t])}},298:function(e,t,n){var r=n(2195),i=n(5397),a=n(8480).f,o=n(7680),s=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return s&&r(e)===`Window`?function(e){try{return a(e)}catch{return o(s)}}(e):a(i(e))}},8480:function(e,t,n){var r=n(1828),i=n(8727).concat(`length`,`prototype`);t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},3717:function(e,t){t.f=Object.getOwnPropertySymbols},2787:function(e,t,n){var r=n(9297),i=n(4901),a=n(8981),o=n(6119),s=n(2211),c=o(`IE_PROTO`),l=Object,u=l.prototype;e.exports=s?l.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof l?u:null}},1625:function(e,t,n){e.exports=n(9504)({}.isPrototypeOf)},1828:function(e,t,n){var r=n(9504),i=n(9297),a=n(5397),o=n(9617).indexOf,s=n(421),c=r([].push);e.exports=function(e,t){var n,r=a(e),l=0,u=[];for(n in r)!i(s,n)&&i(r,n)&&c(u,n);for(;t.length>l;)i(r,n=t[l++])&&(~o(u,n)||c(u,n));return u}},1072:function(e,t,n){var r=n(1828),i=n(8727);e.exports=Object.keys||function(e){return r(e,i)}},8773:function(e,t){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor;t.f=r&&!n.call({1:2},1)?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},2551:function(e,t,n){var r=n(6395),i=n(4576),a=n(9039),o=n(3607);e.exports=r||!a((function(){if(!(o&&o<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete i[e]}}))},2967:function(e,t,n){var r=n(6706),i=n(34),a=n(7750),o=n(3506);e.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return a(n),o(r),i(n)&&(t?e(n,r):n.__proto__=r),n}}():void 0)},3179:function(e,t,n){var r=n(2140),i=n(6955);e.exports=r?{}.toString:function(){return`[object `+i(this)+`]`}},4270:function(e,t,n){var r=n(9565),i=n(4901),a=n(34),o=TypeError;e.exports=function(e,t){var n,s;if(t===`string`&&i(n=e.toString)&&!a(s=r(n,e))||i(n=e.valueOf)&&!a(s=r(n,e))||t!==`string`&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw new o(`Can't convert object to primitive value`)}},5031:function(e,t,n){var r=n(7751),i=n(9504),a=n(8480),o=n(3717),s=n(8551),c=i([].concat);e.exports=r(`Reflect`,`ownKeys`)||function(e){var t=a.f(s(e)),n=o.f;return n?c(t,n(e)):t}},8235:function(e,t,n){var r=n(9504),i=n(9297),a=SyntaxError,o=parseInt,s=String.fromCharCode,c=r(``.charAt),l=r(``.slice),u=r(/./.exec),d={'\\"':`"`,"\\\\":`\\`,"\\/":`/`,"\\b":`\b`,"\\f":`\f`,"\\n":`
|
|
10
10
|
`,"\\r":`\r`,"\\t":` `},f=/^[\da-f]{4}$/i,p=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var n=!0,r=``;t<e.length;){var m=c(e,t);if(m===`\\`){var h=l(e,t,t+2);if(i(d,h))r+=d[h],t+=2;else{if(h!==`\\u`)throw new a(`Unknown escape sequence: "`+h+`"`);var g=l(e,t+=2,t+4);if(!u(f,g))throw new a(`Bad Unicode escape at: `+t);r+=s(o(g,16)),t+=4}}else{if(m===`"`){n=!1,t++;break}if(u(p,m))throw new a(`Bad control character in string literal at: `+t);r+=m,t++}}if(n)throw new a(`Unterminated string at: `+t);return{value:r,end:t}}},9167:function(e,t,n){e.exports=n(4576)},1056:function(e,t,n){var r=n(4913).f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},6682:function(e,t,n){var r=n(9565),i=n(8551),a=n(4901),o=n(2195),s=n(7323),c=TypeError;e.exports=function(e,t){var n=e.exec;if(a(n)){var l=r(n,e,t);return l!==null&&i(l),l}if(o(e)===`RegExp`)return r(s,e,t);throw new c(`RegExp#exec called on incompatible receiver`)}},7323:function(e,t,n){var r,i,a=n(9565),o=n(9504),s=n(655),c=n(7979),l=n(8429),u=n(5745),d=n(2360),f=n(1181).get,p=n(3635),m=n(8814),h=u(`native-string-replace`,String.prototype.replace),g=RegExp.prototype.exec,_=g,v=o(``.charAt),y=o(``.indexOf),b=o(``.replace),x=o(``.slice),S=(i=/b*/g,a(g,r=/a/,`a`),a(g,i,`a`),r.lastIndex!==0||i.lastIndex!==0),C=l.BROKEN_CARET,w=/()??/.exec(``)[1]!==void 0,T=function(e,t){for(var n=e.groups=d(null),r=0;r<t.length;r++){var i=t[r];n[i[0]]=e[i[1]]}};(S||w||C||p||m)&&(_=function(e){var t,n,r,i=this,o=f(i),l=s(e),u=o.raw;if(u)return u.lastIndex=i.lastIndex,t=a(_,u,l),i.lastIndex=u.lastIndex,t&&o.groups&&T(t,o.groups),t;var d=o.groups,p=C&&i.sticky,m=a(c,i),E=i.source,D=0,O=l;if(p){m=b(m,`y`,``),y(m,`g`)===-1&&(m+=`g`),O=x(l,i.lastIndex);var k=i.lastIndex>0&&v(l,i.lastIndex-1);i.lastIndex>0&&(!i.multiline||i.multiline&&k!==`
|
|
11
11
|
`&&k!==`\r`&&k!==`\u2028`&&k!==`\u2029`)&&(E=`(?: (?:`+E+`))`,O=` `+O,D++),n=RegExp(`^(?:`+E+`)`,m)}w&&(n=RegExp(`^`+E+`$(?!\\s)`,m)),S&&(r=i.lastIndex);var A=a(g,p?n:i,O);return p?A?(A.input=l,A[0]=x(A[0],D),A.index=i.lastIndex,i.lastIndex+=A[0].length):i.lastIndex=0:S&&A&&(i.lastIndex=i.global?A.index+A[0].length:r),w&&A&&A.length>1&&a(h,A[0],n,(function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===void 0&&(A[e]=void 0)})),A&&d&&T(A,d),A}),e.exports=_},5213:function(e,t,n){var r=n(4576),i=n(9039),a=r.RegExp;e.exports={correct:!i((function(){var e=!0;try{a(`.`,`d`)}catch{e=!1}var t={},n=``,r=e?`dgimsy`:`gimsy`,i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:`s`,global:`g`,ignoreCase:`i`,multiline:`m`,sticky:`y`};for(var s in e&&(o.hasIndices=`d`),o)i(s,o[s]);return Object.getOwnPropertyDescriptor(a.prototype,`flags`).get.call(t)!==r||n!==r}))}},7979:function(e,t,n){var r=n(8551);e.exports=function(){var e=r(this),t=``;return e.hasIndices&&(t+=`d`),e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.dotAll&&(t+=`s`),e.unicode&&(t+=`u`),e.unicodeSets&&(t+=`v`),e.sticky&&(t+=`y`),t}},1034:function(e,t,n){var r=n(9565),i=n(9297),a=n(1625),o=n(5213),s=n(7979),c=RegExp.prototype;e.exports=o.correct?function(e){return e.flags}:function(e){return o.correct||!a(c,e)||i(e,`flags`)?e.flags:r(s,e)}},8429:function(e,t,n){var r=n(9039),i=n(4576).RegExp,a=r((function(){var e=i(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!==null})),o=a||r((function(){return!i(`a`,`y`).sticky}));e.exports={BROKEN_CARET:a||r((function(){var e=i(`^r`,`gy`);return e.lastIndex=2,e.exec(`str`)!==null})),MISSED_STICKY:o,UNSUPPORTED_Y:a}},3635:function(e,t,n){var r=n(9039),i=n(4576).RegExp;e.exports=r((function(){var e=i(`.`,`s`);return!(e.dotAll&&e.test(`
|
|
12
12
|
`)&&e.flags===`s`)}))},8814:function(e,t,n){var r=n(9039),i=n(4576).RegExp;e.exports=r((function(){var e=i(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`}))},7750:function(e,t,n){var r=n(4117),i=TypeError;e.exports=function(e){if(r(e))throw new i(`Can't call method on `+e);return e}},7633:function(e,t,n){var r=n(7751),i=n(2106),a=n(8227),o=n(3724),s=a(`species`);e.exports=function(e){var t=r(e);o&&t&&!t[s]&&i(t,s,{configurable:!0,get:function(){return this}})}},687:function(e,t,n){var r=n(4913).f,i=n(9297),a=n(8227)(`toStringTag`);e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!i(e,a)&&r(e,a,{configurable:!0,value:t})}},6119:function(e,t,n){var r=n(5745),i=n(3392),a=r(`keys`);e.exports=function(e){return a[e]||(a[e]=i(e))}},7629:function(e,t,n){var r=n(6395),i=n(4576),a=n(9433),o=`__core-js_shared__`,s=e.exports=i[o]||a(o,{});(s.versions||=[]).push({version:`3.49.0`,mode:r?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE`,source:`https://github.com/zloirock/core-js`})},5745:function(e,t,n){var r=n(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},2293:function(e,t,n){var r=n(8551),i=n(5548),a=n(4117),o=n(8227)(`species`);e.exports=function(e,t){var n,s=r(e).constructor;return s===void 0||a(n=r(s)[o])?t:i(n)}},8183:function(e,t,n){var r=n(9504),i=n(1291),a=n(655),o=n(7750),s=r(``.charAt),c=r(``.charCodeAt),l=r(``.slice),u=function(e){return function(t,n){var r,u,d=a(o(t)),f=i(n),p=d.length;return f<0||f>=p?e?``:void 0:(r=c(d,f))<55296||r>56319||f+1===p||(u=c(d,f+1))<56320||u>57343?e?s(d,f):r:e?l(d,f,f+2):u-56320+(r-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},706:function(e,t,n){var r=n(350).PROPER,i=n(9039),a=n(7452);e.exports=function(e){return i((function(){return!!a[e]()||`
`[e]()!==`
`||r&&a[e].name!==e}))}},3802:function(e,t,n){var r=n(9504),i=n(7750),a=n(655),o=n(7452),s=r(``.replace),c=RegExp(`^[`+o+`]+`),l=RegExp(`(^|[^`+o+`])[`+o+`]+$`),u=function(e){return function(t){var n=a(i(t));return 1&e&&(n=s(n,c,``)),2&e&&(n=s(n,l,`$1`)),n}};e.exports={start:u(1),end:u(2),trim:u(3)}},4495:function(e,t,n){var r=n(9519),i=n(9039),a=n(4576).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol(`symbol detection`);return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8242:function(e,t,n){var r=n(9565),i=n(7751),a=n(8227),o=n(6840);e.exports=function(){var e=i(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,s=a(`toPrimitive`);t&&!t[s]&&o(t,s,(function(e){return r(n,this)}),{arity:1})}},1296:function(e,t,n){e.exports=n(4495)&&!!Symbol.for&&!!Symbol.keyFor},1240:function(e,t,n){e.exports=n(9504)(1.1.valueOf)},5610:function(e,t,n){var r=n(1291),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},5397:function(e,t,n){var r=n(7055),i=n(7750);e.exports=function(e){return r(i(e))}},1291:function(e,t,n){var r=n(741);e.exports=function(e){var t=+e;return t!=t||t===0?0:r(t)}},8014:function(e,t,n){var r=n(1291),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},8981:function(e,t,n){var r=n(7750),i=Object;e.exports=function(e){return i(r(e))}},2777:function(e,t,n){var r=n(9565),i=n(34),a=n(757),o=n(5966),s=n(4270),c=n(8227),l=TypeError,u=c(`toPrimitive`);e.exports=function(e,t){if(!i(e)||a(e))return e;var n,c=o(e,u);if(c){if(t===void 0&&(t=`default`),n=r(c,e,t),!i(n)||a(n))return n;throw new l(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),s(e,t)}},6969:function(e,t,n){var r=n(2777),i=n(757);e.exports=function(e){var t=r(e,`string`);return i(t)?t:t+``}},2140:function(e,t,n){var r={};r[n(8227)(`toStringTag`)]=`z`,e.exports=String(r)===`[object z]`},655:function(e,t,n){var r=n(6955),i=String;e.exports=function(e){if(r(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return i(e)}},6823:function(e){var t=String;e.exports=function(e){try{return t(e)}catch{return`Object`}}},3392:function(e,t,n){var r=n(9504),i=0,a=Math.random(),o=r(1.1.toString);e.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+o(++i+a,36)}},7040:function(e,t,n){e.exports=n(4495)&&!Symbol.sham&&typeof Symbol.iterator==`symbol`},8686:function(e,t,n){var r=n(3724),i=n(9039);e.exports=r&&i((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},8622:function(e,t,n){var r=n(4576),i=n(4901),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},511:function(e,t,n){var r=n(9167),i=n(9297),a=n(1951),o=n(4913).f;e.exports=function(e){var t=r.Symbol||={};i(t,e)||o(t,e,{value:a.f(e)})}},1951:function(e,t,n){t.f=n(8227)},8227:function(e,t,n){var r=n(4576),i=n(5745),a=n(9297),o=n(3392),s=n(4495),c=n(7040),l=r.Symbol,u=i(`wks`),d=c?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return a(u,e)||(u[e]=s&&a(l,e)?l[e]:d(`Symbol.`+e)),u[e]}},7452:function(e){e.exports=`
|
|
@@ -20,7 +20,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
20
20
|
`)}`)}function yd(e){if(!W)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=cu(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${Su(e)===e?`root `:``}span "${t}" with ID ${r}`;G.log(i)}function bd(e,t,n,r=wu()){let i=r&&Su(r);i&&(W&&G.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[gl]:t,[hl]:n}))}function xd(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[hl],i=n[gl];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function Sd(e){return e.getOptions().traceLifecycle===`stream`}var Cd=1e3,wd=class{constructor(e={}){this._traceId=e.traceId||Ac(),this._spanId=e.spanId||jc(),this._startTime=e.startTimestamp||xc(),this._links=e.links,this._attributes={},this.setAttributes({[pl]:`manual`,[fl]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=ou(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(ll,`custom`),this}end(e){this._endTime||(this._endTime=ou(e),yd(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[fl],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:hu(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[pl],profile_id:this._attributes[vl],exclusive_time:this._attributes[yl],measurements:xd(this._events),is_segment:this._isStandaloneSpan&&Su(this)===this||void 0,segment_id:this._isStandaloneSpan?Su(this).spanContext().spanId:void 0,links:iu(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Su(this),status:gu(this._status),attributes:this._attributes,links:au(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){W&&G.log(`[Tracing] Adding an event to span:`,e);let r=Td(t)?t:n||xc(),i=Td(t)?{}:t||{},a={name:e,time:ou(r),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=sl();if(e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this)),!(this._isStandaloneSpan||this===Su(this)))return;if(this._isStandaloneSpan){this._sampled?Od(_d([this],e)):(W&&G.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}else if(e&&Sd(e)){e.emit(`afterSegmentSpanEnd`,this);return}let t=this._convertSpanToTransaction();t&&(kl(this).scope||rl()).captureEvent(t)}_convertSpanToTransaction(){if(!Ed(cu(this)))return;this._name||=(W&&G.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:e,isolationScope:t}=kl(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let r=xu(this).filter(e=>e!==this&&!Dd(e)).map(e=>cu(e)).filter(Ed),i=this._attributes[ll];delete this._attributes[_l];let a=!1;r.forEach(e=>{delete e.data[_l],e.op?.startsWith(`gen_ai.`)&&(a=!0)});let o={contexts:{trace:eu(this)},spans:r.length>Cd?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Cd):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:zu(this),hasGenAiSpans:a},request:n,...i&&{transaction_info:{source:i}}},s=xd(this._events);return s&&Object.keys(s).length&&(W&&G.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(s,void 0,2)),o.measurements=s),o}};function Td(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Ed(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Dd(e){return e instanceof wd&&e.isStandaloneSpan()}function Od(e){let t=sl();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function kd(e,t,n){if(!Ou(e))return[!1];let r,i;typeof e.tracesSampler==`function`?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),r=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(i=e.tracesSampleRate,r=!0):i=t.parentSampled;let a=Kl(i);if(a===void 0)return W&&G.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!a)return W&&G.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,a,r];let o=n<a;return o||W&&G.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,a,r]}var Ad=`__SENTRY_SUPPRESS_TRACING__`;function jd(e){let t=Fd();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=Pd(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>ol(e.scope,t):i===void 0?e=>e():e=>Md(i,e))(()=>{let t=rl(),a=Rd(t,i),o=sl();return e.onlyIfParent&&!a?(o?.recordDroppedEvent(`no_parent_span`,`span`),new Bu):Nd({parentSpan:a,spanArguments:n,forceTransaction:r,scope:t})})}function Md(e,t){let n=Fd();return n.withActiveSpan?n.withActiveSpan(e,t):ol(n=>(Nc(n,e||void 0),t(n)))}function Nd({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ou()){let r=new Bu;return(n||!e)&&Iu(r,{sampled:`false`,sample_rate:`0`,transaction:t.name,...zu(r)}),r}let i=sl();if(zd(i,t))return Bd(r)||i?.recordDroppedEvent(`ignored`,`span`),new Bu({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});let a=il(),o;if(e&&!n)o=Ld(e,r,t),yu(e,o);else if(e){let n=zu(e),{traceId:i,spanId:a}=e.spanContext(),s=mu(e);o=Id({traceId:i,parentSpanId:a,...t},r,s),Iu(o,n)}else{let{traceId:e,dsc:n,parentSpanId:i,sampled:s}={...a.getPropagationContext(),...r.getPropagationContext()};o=Id({traceId:e,parentSpanId:i,...t},r,s),n&&Iu(o,n)}return vd(o),Ol(o,r,a),o}function Pd(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=ou(e.startTime),delete n.startTime,n}return t}function Fd(){return Yc(zo())}function Id(e,t,n){let r=sl(),i=r?.getOptions()||{},{name:a=``}=e,o={spanAttributes:{...e.attributes},spanName:a,parentSampled:n};r?.emit(`beforeSampling`,o,{decision:!1});let s=o.parentSampled??n,c=o.spanAttributes,l=t.getPropagationContext(),u=Bd(t),[d,f,p]=u?[!1]:kd(i,{name:a,parentSampled:s,attributes:c,parentSampleRate:Kl(l.dsc?.sample_rate)},l.sampleRand),m=new wd({...e,attributes:{[ll]:`custom`,[ul]:f!==void 0&&p?f:void 0,...c},sampled:d});return!d&&r&&!u&&(W&&G.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),r.recordDroppedEvent(`sample_rate`,Sd(r)?`span`:`transaction`)),r&&r.emit(`spanStart`,m),m}function Ld(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),a=Bd(t),o=a?!1:mu(e),s=o?new wd({...n,parentSpanId:r,traceId:i,sampled:o}):new Bu({traceId:i});yu(e,s);let c=sl();return c?(Sd(c)&&s instanceof Bu&&(e instanceof Bu&&e.dropReason?(s.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,`span`)):a||(s.dropReason=`sample_rate`,c.recordDroppedEvent(`sample_rate`,`span`))),c.emit(`spanStart`,s),n.endTimestamp&&(c.emit(`spanEnd`,s),c.emit(`afterSpanEnd`,s)),s):s}function Rd(e,t){if(t)return t;if(t===null)return;let n=Pc(e);if(!n)return;let r=sl();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Su(n):n}function zd(e,t){let n=e?.getOptions().ignoreSpans;return!e||!Sd(e)||!n?.length?!1:Au({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function Bd(e){return e.getScopeData().sdkProcessingMetadata[Ad]===!0}var Vd={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Hd=`heartbeatFailed`,Ud=`idleTimeout`,Wd=`finalTimeout`,Gd=`externalFinish`;function Kd(e,t={}){let n=new Map,r=!1,i,a=Gd,o=!t.disableAutoFinish,s=[],{idleTimeout:c=Vd.idleTimeout,finalTimeout:l=Vd.finalTimeout,childSpanTimeout:u=Vd.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,p=sl();if(!p||!Ou()){let e=new Bu;return Iu(e,{sample_rate:`0`,sampled:`false`,...zu(e)}),e}let m=rl(),h=wu(),g=qd(e);g.end=new Proxy(g.end,{apply(e,t,n){if(d&&d(g),t instanceof Bu)return;let[r,...i]=n,a=ou(r||xc()),o=xu(g).filter(e=>e!==g),s=cu(g);if(!o.length||!f)return S(a),Reflect.apply(e,t,[a,...i]);let c=p.getOptions().ignoreSpans,u=o?.reduce((e,t)=>{let n=cu(t);return!n.timestamp||c&&Au({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),m=s.start_timestamp,h=Math.min(m?m+l/1e3:1/0,Math.max(m||-1/0,Math.min(a,u||1/0)));return S(h),Reflect.apply(e,t,[h,...i])}});function _(){i&&=(clearTimeout(i),void 0)}function v(e){_(),i=setTimeout(()=>{!r&&n.size===0&&o&&(a=Ud,g.end(e))},c)}function y(e){i=setTimeout(()=>{!r&&o&&(a=Hd,g.end(e))},u)}function b(e){_(),n.set(e,!0),y(xc()+u/1e3)}function x(e){n.has(e)&&n.delete(e),n.size===0&&v(xc()+c/1e3)}function S(e){r=!0,n.clear(),s.forEach(e=>e()),Nc(m,h);let t=cu(g),{start_timestamp:i}=t;if(!i)return;t.data[`sentry.idle_span_finish_reason`]||g.setAttribute(ml,a);let o=t.status;(!o||o===`unknown`)&&g.setStatus({code:1}),G.log(`[Tracing] Idle span "${t.op}" finished`);let u=xu(g).filter(e=>e!==g),d=0;u.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),W&&G.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:r=0}=cu(t),i=r<=e,a=(l+c)/1e3,o=n-r<=a;if(W){let e=JSON.stringify(t,void 0,2);i?o||G.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):G.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!o||!i)&&(bu(g,t),d++)}),d>0&&g.setAttribute(`sentry.idle_span_discarded_spans`,d)}return s.push(p.on(`spanStart`,e=>{r||e===g||cu(e).timestamp||e instanceof wd&&e.isStandaloneSpan()||xu(g).includes(e)&&b(e.spanContext().spanId)})),s.push(p.on(`spanEnd`,e=>{r||x(e.spanContext().spanId)})),s.push(p.on(`idleSpanEnableAutoFinish`,e=>{e===g&&(o=!0,v(),n.size&&y())})),t.disableAutoFinish||v(),setTimeout(()=>{r||(g.setStatus({code:2,message:`deadline_exceeded`}),a=Wd,g.end())},l),g}function qd(e){let t=jd(e);return Nc(rl(),t),W&&G.log(`[Tracing] Started span is an idle span`),t}function Jd(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Qd(e,t),r&&tf(e,r),nf(e,n),$d(e,i),ef(e,a)}function Yd(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;Xd(e,`extra`,n),Xd(e,`tags`,r),Xd(e,`attributes`,i),Xd(e,`user`,a),Xd(e,`contexts`,o),e.sdkProcessingMetadata=kc(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Xd(e,t,n){e[t]=kc(e[t],n,1)}function Zd(e,t){let n=al().getScopeData();return e&&Yd(n,e.getScopeData()),t&&Yd(n,t.getScopeData()),n}function Qd(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function $d(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ef(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function tf(e,t){e.contexts={trace:tu(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:zu(t),...e.sdkProcessingMetadata};let n=cu(Su(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function nf(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var rf=`thismessage:/`;function af(e){return`isRelative`in e}function of(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?rf:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function sf(e){if(af(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function cf(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function lf(e){return e.split(/[?#]/,1)[0]}function uf(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function df(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}var ff=0,pf=1,mf=2;function hf(e){return new _f(t=>{t(e)})}function gf(e){return new _f((t,n)=>{n(e)})}var _f=class e{constructor(e){this._state=ff,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===ff)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===pf&&e[1](this._value),this._state===mf&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===ff){if(Ps(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(pf,e)},r=e=>{t(mf,e)};try{e(n,r)}catch(e){r(e)}}};function vf(e,t,n,r=0){try{let i=yf(t,n,e,r);return Ps(i)?i:hf(i)}catch(e){return gf(e)}}function yf(e,t,n,r){let i=n[r];if(!e||!i)return e;let a=i({...e},t);return W&&a===null&&G.log(`Event processor "${i.id||`?`}" dropped event`),Ps(a)?a.then(e=>yf(e,t,n,r+1)):yf(a,t,n,r+1)}var bf,xf,Sf,Cf;function wf(e){let t=Lo._sentryDebugIds,n=Lo._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(Cf&&r.length===xf&&i.length===Sf)return Cf;xf=r.length,Sf=i.length,Cf={},bf||={};let a=(t,n)=>{for(let r of t){let t=n[r],i=bf?.[r];if(i&&Cf&&t)Cf[i[0]]=t,bf&&(bf[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&Cf&&bf){Cf[i]=t,bf[r]=[i,t];break}}}}};return t&&a(r,t),n&&a(i,n),Cf}function Tf(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||uc(),timestamp:t.timestamp||vc()},l=n.integrations||e.integrations.map(e=>e.name);Ef(c,e),kf(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Df(c,e.stackParser);let u=jf(r,n.captureContext);n.mechanism&&mc(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Zd(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Jd(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?hf(c):vf(m,c,n)).then(e=>(e&&Of(e),typeof o==`number`&&o>0?Af(e,o,s):e))}function Ef(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=rc(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=rc(e.value,a)})}function Df(e,t){let n=wf(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function Of(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function kf(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Af(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Ku(e.data,t,n)}}))},...e.user&&{user:Ku(e.user,t,n)},...e.contexts&&{contexts:Ku(e.contexts,t,n)},...e.extra&&{extra:Ku(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ku(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Ku(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ku(e.contexts.flags,3,n)),r}function jf(e,t){if(!t)return e;let n=e?e.clone():new Ic;return n.update(t),n}function Mf(e){if(e)return Nf(e)||Ff(e)?{captureContext:e}:e}function Nf(e){return e instanceof Ic||typeof e==`function`}var Pf=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function Ff(e){return Object.keys(e).some(e=>Pf.includes(e))}function If(e,t){return rl().captureException(e,Mf(t))}function Lf(e,t){return rl().captureEvent(e,t)}function Rf(){let e=sl();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function zf(e){let t=il(),{user:n}=Zd(t,rl()),{userAgent:r}=Lo.navigator||{},i=Tc({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return a?.status===`ok`&&Ec(a,{status:`exited`}),Bf(),t.setSession(i),i}function Bf(){let e=il(),t=rl().getSession()||e.getSession();t&&Dc(t),Vf(),e.setSession()}function Vf(){let e=il(),t=sl(),n=e.getSession();n&&t&&t.captureSession(n)}function Hf(e=!1){if(e){Bf();return}Vf()}function Uf(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Wf(e){return`${Uf(e)}${e.projectId}/envelope/`}function Gf(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Kf(e,t,n){return t||`${Wf(e)}?${Gf(e,n)}`}var qf=[];function Jf(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Xf(e,t,n)}),n}function Yf(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Xf(e,t,n){if(n[t.name]){W&&G.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!qf.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),qf.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),W&&G.log(`Integration installed: ${t.name}`)}function Zf(e){return e}function Qf(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function $f(){return`npm`}function ep(){return!Qf()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function tp(){return typeof window<`u`&&(!ep()||np())}function np(){return Lo.process?.type===`renderer`}function rp(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...tp()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ip(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=zl(r)),ed(a,[rp(e,i)])}function ap(e,t){let n=t??op(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ip(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);sp().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function op(e){return sp().get(e)}function sp(){return Vo(`clientToLogBufferMap`,()=>new WeakMap)}function cp(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...tp()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function lp(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=zl(r)),ed(a,[cp(e,i)])}function up(e,t){let n=t??dp(e)??[];if(n.length===0)return;let r=e.getOptions(),i=lp(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);fp().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function dp(e){return fp().get(e)}function fp(){return Vo(`clientToMetricBufferMap`,()=>new WeakMap)}function pp(e){return du({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function mp(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Sd(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(pp(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getOptions().sendDefaultPii?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...tp()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}function hp(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}var gp=Symbol.for(`SentryBufferFullError`);function _p(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return gf(gp);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return hf(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>hp(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var vp=60*1e3;function yp(e,t=nc()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?vp:r-t}function bp(e,t){return e[t]||e.all||0}function xp(e,t,n=nc()){return bp(e,t)>n}function Sp(e,{statusCode:t,headers:n},r=nc()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+yp(o,r):t===429&&(i.all=r+60*1e3);return i}function Cp(e,t,n=_p(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(nd(i,(t,n)=>{let i=dd(n);xp(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=ed(i[0],a),s=t=>{if(rd(o,[`client_report`])){W&&G.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}nd(o,(n,r)=>{e.recordDroppedEvent(t,dd(r))})};return n.add(()=>t({body:ad(o)}).then(e=>e.statusCode===413?(W&&G.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),s(`send_error`),e):(W&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&G.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Sp(r,e),e),e=>{throw s(`network_error`),W&&G.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===gp)return W&&G.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function wp(e,t,n){let r=[{type:`client_report`},{timestamp:n||vc(),discarded_events:e}];return ed(t?{dsn:t}:{},[r])}function Tp(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Ep(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[vl],exclusive_time:o?.[yl],measurements:e.measurements,is_segment:!0}}function Dp(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var Op=`Not capturing exception because it's already been captured.`,kp=`Discarded session because of missing or non-string release`,Ap=Symbol.for(`SentryInternalError`),jp=Symbol.for(`SentryDoNotSendEventError`),Mp=5e3;function Np(e){return{message:e,[Ap]:!0}}function Pp(e){return{message:e,[jp]:!0}}function Fp(e){return!!e&&typeof e==`object`&&Ap in e}function Ip(e){return!!e&&typeof e==`object`&&jp in e}function Lp(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{a+=r(t),a>=8e5?i(e):s||(s=!0,o=hp(setTimeout(()=>{i(e)},Mp)))}),e.on(`flush`,()=>{i(e)})}var Rp=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=_p(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=Gl(e.dsn):W&&G.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Kf(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Lp(this,`afterCaptureLog`,`flushLogs`,Gp,ap),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Lp(this,`afterCaptureMetric`,`flushMetrics`,Wp,up)}captureException(e,t,n){let r=uc();if(hc(e))return W&&G.log(Op),r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),`error`),i.event_id}captureMessage(e,t,n,r){let i={event_id:uc(),...n},a=Os(e)?e:String(e),o=ks(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=uc();if(t?.originalException&&hc(t.originalException))return W&&G.log(Op),r;let i={event_id:r,...t},a=e.sdkProcessingMetadata||{},o=a.capturedSpanScope,s=a.capturedSpanIsolationScope,c=zp(e.type);return this._process(()=>this._captureEvent(e,i,o||n,s),c),i.event_id}captureSession(e){this.sendSession(e),Ec(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){ap(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Xf(this,e,this._integrations),t||Yf(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=mp(e,this),r=gd(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=td(r,cd(e));n&&(r=td(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=Pu}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t){W&&G.warn(kp);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){W&&G.warn(kp);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=hd(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;W&&G.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:``}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return W&&G.error(`Error while sending envelope:`,e),{}}return W&&G.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Jf(this,e),Yf(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(Ec(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a?.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Tf(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...cl(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Ru(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=rl(),r=il()){return W&&Hp(e)&&G.log(`Captured error event \`${Tp(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{W&&(Ip(e)?G.log(e.message):Fp(e)?G.warn(e.message):G.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Up(e),s=Hp(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:Kl(a);if(s&&typeof l==`number`&&tc()>l)return this.recordDroppedEvent(`sample_rate`,`error`),gf(Pp(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=zp(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Pp("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Bp(Vp(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw Pp(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw Ip(e)||Fp(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),Np(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===gp&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){W&&G.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){W&&G.log(`No outcomes to send`);return}if(!this._dsn){W&&G.log(`No dsn provided, will not send outcomes`);return}W&&G.log(`Sending outcomes:`,e);let t=wp(e,this._options.tunnel&&zl(this._dsn));this.sendEnvelope(t)}};function zp(e){return e===`replay_event`?`replay`:e||`error`}function Bp(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Ps(e))return e.then(e=>{if(!As(e)&&e!==null)throw Np(n);return e},e=>{throw Np(`${t} rejected with ${e}`)});if(!As(e)&&e!==null)throw Np(n);return e}function Vp(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!Vu(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Hp(c)&&i)return i(c,r);if(Up(c)){if(s||o){let t=Ep(c);if(o?.length&&Au({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=kc(n,Dp(e)):Tu()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&Au({description:e.description,op:e.op,attributes:e.data},o)){Mu(n,e);continue}if(s){let n=s(e);n?t.push(n):(Tu(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function Hp(e){return e.type===void 0}function Up(e){return e.type===`transaction`}function Wp(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Kp(e.attributes)}function Gp(e){let t=0;return e.message&&(t+=e.message.length*2),t+Kp(e.attributes)}function Kp(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*qp(e[0]):ks(e)?t+=qp(e):t+=100}),t}function qp(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Jp(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function Yp(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:Ro})),i.version=Ro)}function Xp(e={}){let t=e.client||sl();if(!Rf()||!t)return{};let n=Yc(zo());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||rl(),i=e.span||wu();if(!i&&nl())return{};let a=i?nu(i):Zp(r),o=Ml(i?zu(i):Ru(t,r));if(!ql.test(a))return G.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let s={"sentry-trace":a,baggage:o};return e.propagateTraceparent&&(s.traceparent=i?ru(i):Qp(r)),s}function Zp(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Xl(t,r,n)}function Qp(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Zl(t,r,n)}var $p=100;function em(e,t){let n=sl(),r=il();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=$p}=n.getOptions();if(a<=0)return;let o={timestamp:vc(),...e},s=i?Go(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var tm,nm=`FunctionToString`,rm=new WeakMap,im=Zf((()=>({name:nm,setupOnce(){tm=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Js(this),n=rm.has(sl())&&t!==void 0?t:this;return tm.apply(n,e)}}catch{}},setup(e){rm.set(e,!0)}}))),am=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],om=`EventFilters`,sm=Zf((e={})=>{let t;return{name:om,setup(n){t=lm(e,n.getOptions())},processEvent(n,r,i){return t||=lm(e,i.getOptions()),um(n,t)?null:n}}}),cm=Zf(((e={})=>({...sm(e),name:`InboundFilters`})));function lm(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:am],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function um(e,t){if(!e.type){if(dm(e,t.ignoreErrors))return W&&G.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${fc(e)}`),!0;if(_m(e))return W&&G.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${fc(e)}`),!0;if(pm(e,t.denyUrls))return W&&G.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${fc(e)}.\nUrl: ${gm(e)}`),!0;if(!mm(e,t.allowUrls))return W&&G.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${fc(e)}.\nUrl: ${gm(e)}`),!0}else if(e.type===`transaction`&&fm(e,t.ignoreTransactions))return W&&G.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${fc(e)}`),!0;return!1}function dm(e,t){return t?.length?Tp(e).some(e=>oc(e,t)):!1}function fm(e,t){if(!t?.length)return!1;let n=e.transaction;return n?oc(n,t):!1}function pm(e,t){if(!t?.length)return!1;let n=gm(e);return n?oc(n,t):!1}function mm(e,t){if(!t?.length)return!0;let n=gm(e);return n?oc(n,t):!0}function hm(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function gm(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?hm(t):null}catch{return W&&G.error(`Cannot extract url for event ${fc(e)}`),null}}function _m(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function vm(e,t,n,r,i,a){if(!i.exception?.values||!a||!Is(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=ym(e,t,r,a.originalException,n,i.exception.values,o,0))}function ym(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Is(r[i],Error)){xm(o,s,r);let a=e(t,r[i]),l=c.length;Sm(a,i,l,s),c=ym(e,t,n,r[i],i,[a,...c],a,l)}return bm(r)&&r.errors.forEach((a,l)=>{if(Is(a,Error)){xm(o,s,r);let u=e(t,a),d=c.length;Sm(u,`errors[${l}]`,d,s),c=ym(e,t,n,a,i,[u,...c],u,d)}}),c}function bm(e){return Array.isArray(e.errors)}function xm(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...bm(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Sm(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Cm(e){return Ss(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function wm(e){return Cm(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Tm=new Set([]);function Em(e){let t=`console`,n=fs(t,e);return ps(t,Dm),n}function Dm(){`console`in Lo&&Ho.forEach(function(e){e in Lo.console&&Gs(Lo.console,e,function(t){return Wo[e]=t,function(...t){let n=t[0],r=Wo[e],i=Tm.size&&typeof n==`string`&&oc(n,Tm);i||ms(`console`,{args:t,level:e}),(!i||W&&G.isEnabled())&&r?.apply(Lo.console,t)}})})}function Om(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var km=`Dedupe`,Am=Zf((()=>{let e;return{name:km,processEvent(t){if(t.type)return t;try{if(jm(t,e))return W&&G.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function jm(e,t){return t?!!(Mm(e,t)||Nm(e,t)):!1}function Mm(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Fm(e,t)||!Pm(e,t))}function Nm(e,t){let n=Im(t),r=Im(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Fm(e,t)||!Pm(e,t))}function Pm(e,t){let n=cs(e),r=cs(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Fm(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function Im(e){return e.exception?.values?.[0]}var Lm=`ConversationId`,Rm=Zf((()=>({name:Lm,setup(e){e.on(`spanStart`,e=>{let t=rl().getScopeData(),n=il().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=cu(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(xl,r)}})}})));function zm(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=Ou()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(Hm(n,e),Bm(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=sl(),d=!!wu()||!!u&&Sd(u),f=s&&d?jd(Km(o,a,c)):new Bu;if(s&&!d&&u?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=Vm(t,n,Ou()&&d?f:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(u){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit(`beforeOutgoingRequestSpan`,f,t)}return f}function Bm(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Vm(e,t,n,r){let i=Xp({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Rs(e)?e.headers:void 0);if(!c)return{...i};if(Wm(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?Um(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}else if(Gm(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&Um(e[1]));return o&&!t&&e.push([`baggage`,o]),e}else{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>Um(e)):Um(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,baggage:i.length>0?i.join(`,`):void 0});return r&&s&&!t&&(u.traceparent=s),u}}function Hm(e,t){if(t.response){Cl(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function Um(e){return typeof e==`string`?e.split(`,`).some(e=>e.trim().startsWith(Al)):!1}function Wm(e){return typeof Headers<`u`&&Is(e,Headers)}function Gm(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function Km(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${uf(e)}`,attributes:qm(e,void 0,t,n)};let r=of(e);return{name:`${t} ${r?sf(r):e}`,attributes:qm(e,r,t,n)}}function qm(e,t,n,r){let i={url:uf(e),type:`fetch`,"http.method":n,[pl]:r,[fl]:`http.client`};return t&&(af(t)||(i[`http.url`]=uf(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}function Jm(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Ym=Lo;function Xm(){return`history`in Ym&&!!Ym.history}function Zm(){if(!(`fetch`in Ym))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Qm(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function $m(){if(typeof EdgeRuntime==`string`)return!0;if(!Zm())return!1;if(Qm(Ym.fetch))return!0;let e=!1,t=Ym.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Qm(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){W&&G.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function eh(e,t){let n=`fetch`,r=fs(n,e);return ps(n,()=>nh(void 0,t)),r}function th(e){let t=`fetch-body-resolved`,n=fs(t,e);return ps(t,()=>nh(ih)),n}function nh(e,t=!1){t&&!$m()||Gs(Lo,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=sh(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:xc()*1e3,virtualError:r,headers:ch(n)};return e||ms(`fetch`,{...o}),t.apply(Lo,n).then(async t=>(e?e(t):ms(`fetch`,{...o,endTimestamp:xc()*1e3,response:t}),t),e=>{ms(`fetch`,{...o,endTimestamp:xc()*1e3,error:e}),Ss(e)&&e.stack===void 0&&(e.stack=r.stack,Ks(e,`framesToPop`,1));let t=sl()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(o.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:Ks(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function rh(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function ih(e){let t;try{t=e.clone()}catch{return}rh(t,()=>{ms(`fetch-body-resolved`,{endTimestamp:xc()*1e3,response:e})})}function ah(e,t){return!!e&&typeof e==`object`&&!!e[t]}function oh(e){return typeof e==`string`?e:e?ah(e,`url`)?e.url:e.toString?e.toString():``:``}function sh(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:oh(t),method:ah(n,`method`)?String(n.method).toUpperCase():Rs(t)&&ah(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:oh(t),method:ah(t,`method`)?String(t.method).toUpperCase():`GET`}}function ch(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Rs(t))return new Headers(t.headers)}catch{}}var lh=Lo,uh=0;function dh(){return uh>0}function fh(){uh++,setTimeout(()=>{uh--})}function ph(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Js(e))return e}catch{return e}let r=function(...n){try{let r=n.map(e=>ph(e,t));return e.apply(this,r)}catch(e){throw fh(),ol(r=>{r.addEventProcessor(e=>(t.mechanism&&(pc(e,void 0,void 0),mc(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),If(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}qs(r,e),Ks(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function mh(){let e=Us(),{referrer:t}=lh.document||{},{userAgent:n}=lh.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function hh(e,t){let n=vh(e,t),r={type:Ch(t),value:wh(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function gh(e,t,n,r){let i=sl()?.getOptions().normalizeDepth,a=jh(t),o={__serialized__:qu(t,i)};if(a)return{exception:{values:[hh(e,a)]},extra:o};let s={exception:{values:[{type:js(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:kh(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=vh(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function _h(e,t){return{exception:{values:[hh(e,t)]}}}function vh(e,t){let n=t.stacktrace||t.stack||``,r=bh(t),i=xh(t);try{return e(n,r,i)}catch{}return[]}var yh=/Minified React error #\d+;/i;function bh(e){return e&&yh.test(e.message)?1:0}function xh(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function Sh(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function Ch(e){let t=e?.name;return!t&&Sh(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function wh(e){let t=e?.message;return Sh(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?wm(t.error):wm(e):`No error message`}function Th(e,t,n,r){let i=Dh(e,t,n?.syntheticException||void 0,r);return mc(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),hf(i)}function Eh(e,t,n=`info`,r,i){let a=Oh(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),hf(a)}function Dh(e,t,n,r,i){let a;if(ws(t)&&t.error)return _h(e,t.error);if(Ts(t)||Es(t)){let i=t;if(`stack`in t)a=_h(e,t);else{let t=i.name||(Ts(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Oh(e,o,n,r),pc(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return Ss(t)?_h(e,t):As(t)||js(t)?(a=gh(e,t,n,i),mc(a,{synthetic:!0}),a):(a=Oh(e,t,n,r),pc(a,`${t}`,void 0),mc(a,{synthetic:!0}),a)}function Oh(e,t,n,r){let i={};if(r&&n){let r=vh(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),mc(i,{synthetic:!0})}if(Os(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function kh(e,{isUnhandledRejection:t}){let n=Qs(e),r=t?`promise rejection`:`exception`;return ws(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:js(e)?`Event \`${Ah(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ah(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function jh(e){return Object.values(e).find(e=>e instanceof Error)}var Mh=class extends Rp{constructor(e){let t=Nh(e);Yp(t,`browser`,[`browser`],lh.SENTRY_SDK_SOURCE||$f()),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?`auto`:`never`,...t._metadata.sdk.settings}),super(t);let{sendDefaultPii:n,sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;lh.document&&(r||i||s)&&lh.document.addEventListener(`visibilitychange`,()=>{lh.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&ap(this),s&&up(this))}),n&&this.on(`beforeSendSession`,Jp)}eventFromException(e,t){return Th(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return Eh(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function Nh(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:lh.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Ph=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,K=Lo,Fh=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,Ih=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=Fh(t.value,n),e(t)))}},Lh=(e=!0)=>{let t=K.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Rh=()=>Lh()?.activationStart??0;function zh(e,t,n){K.document&&K.addEventListener(e,t,n)}function Bh(e,t,n){K.document&&K.removeEventListener(e,t,n)}var Vh=-1,Hh=new Set,Uh=()=>K.document?.visibilityState===`hidden`&&!K.document?.prerendering?0:1/0,Wh=e=>{if(Kh(e)&&Vh>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of Hh)e();isFinite(Vh)||(Vh=e.type===`visibilitychange`?e.timeStamp:0,Bh(`prerenderingchange`,Wh,!0))}},Gh=()=>{if(K.document&&Vh<0){let e=Rh();Vh=(K.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??Uh(),zh(`visibilitychange`,Wh,!0),zh(`pagehide`,Wh,!0),zh(`prerenderingchange`,Wh,!0)}return{get firstHiddenTime(){return Vh},onHidden(e){Hh.add(e)}}};function Kh(e){return e.type===`pagehide`||K.document?.visibilityState===`hidden`}var qh=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,Jh=(e,t=-1)=>{let n=Lh(),r=`navigate`;return n&&(K.document?.prerendering||Rh()>0?r=`prerender`:K.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:qh(),navigationType:r}},Yh=new WeakMap;function Xh(e,t){try{return Yh.get(e)||Yh.set(e,new t),Yh.get(e)}catch{return new t}}var Zh=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}},Qh=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},$h=e=>{let t=!1;return()=>{t||=(e(),!0)}},eg=e=>{K.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},tg=[1800,3e3],ng=(e,t={})=>{eg(()=>{let n=Gh(),r=Jh(`FCP`),i,a=Qh(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Rh(),0),r.entries.push(t),i(!0)))});a&&(i=Ih(e,r,tg,t.reportAllChanges))})},rg=[.1,.25],ig=(e,t={})=>{ng($h(()=>{let n=Jh(`CLS`,0),r,i=Gh(),a=Xh(t,Zh),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=Qh(`layout-shift`,o);s&&(r=Ih(e,n,rg,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),K?.setTimeout?.(r))}))},ag=0,og=1/0,sg=0,cg=e=>{e.forEach(e=>{e.interactionId&&(og=Math.min(og,e.interactionId),sg=Math.max(sg,e.interactionId),ag=sg?(sg-og)/7+1:0)})},lg,ug=()=>lg?ag:performance.interactionCount||0,dg=()=>{`interactionCount`in performance||lg||(lg=Qh(`event`,cg,{type:`event`,buffered:!0,durationThreshold:0}))},fg=10,pg=0,mg=()=>ug()-pg,hg=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){pg=ug(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(mg()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<fg||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>fg){let e=this._longestInteractionList.splice(fg);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},gg=e=>{let t=K.requestIdleCallback||K.setTimeout;K.document?.visibilityState===`hidden`?e():(e=$h(e),zh(`visibilitychange`,e,{once:!0,capture:!0}),zh(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),Bh(`visibilitychange`,e,{capture:!0}),Bh(`pagehide`,e,{capture:!0})}))},_g=[200,500],vg=40,yg=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=Gh();eg(()=>{dg();let r=Jh(`INP`),i,a=Xh(t,hg),o=e=>{gg(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=Qh(`event`,o,{durationThreshold:t.durationThreshold??vg});i=Ih(e,r,_g,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},bg=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},xg=[2500,4e3],Sg=(e,t={})=>{eg(()=>{let n=Gh(),r=Jh(`LCP`),i,a=Xh(t,bg),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Rh(),0),r.entries=[t],i())},s=Qh(`largest-contentful-paint`,o);if(s){i=Ih(e,r,xg,t.reportAllChanges);let n=$h(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(gg(n),Bh(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])zh(e,a,{capture:!0})}})},Cg=[800,1800],wg=e=>{K.document?.prerendering?eg(()=>wg(e)):K.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>wg(e),!0)},Tg=(e,t={})=>{let n=Jh(`TTFB`),r=Ih(e,n,Cg,t.reportAllChanges);wg(()=>{let e=Lh();e&&(n.value=Math.max(e.responseStart-Rh(),0),n.entries=[e],r(!0))})},Eg={},Dg={},Og,kg,Ag,jg;function Mg(e,t=!1){return Hg(`cls`,e,Rg,Og,t)}function Ng(e,t=!1){return Hg(`lcp`,e,zg,kg,t)}function Pg(e){return Hg(`ttfb`,e,Bg,Ag)}function Fg(e){return Hg(`inp`,e,Vg,jg)}function Ig(e,t){return Wg(e,t),Dg[e]||(Ug(e),Dg[e]=!0),Gg(e,t)}function Lg(e,t){let n=Eg[e];if(n?.length)for(let r of n)try{r(t)}catch(t){Ph&&G.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${ss(r)}\nError:`,t)}}function Rg(){return ig(e=>{Lg(`cls`,{metric:e}),Og=e},{reportAllChanges:!0})}function zg(){return Sg(e=>{Lg(`lcp`,{metric:e}),kg=e},{reportAllChanges:!0})}function Bg(){return Tg(e=>{Lg(`ttfb`,{metric:e}),Ag=e})}function Vg(){return yg(e=>{Lg(`inp`,{metric:e}),jg=e})}function Hg(e,t,n,r,i=!1){Wg(e,t);let a;return Dg[e]||(a=n(),Dg[e]=!0),r&&t({metric:r}),Gg(e,t,i?a:void 0)}function Ug(e){let t={};e===`event`&&(t.durationThreshold=0),Qh(e,t=>{Lg(e,{entries:t})},t)}function Wg(e,t){Eg[e]=Eg[e]||[],Eg[e].push(t)}function Gg(e,t,n){return()=>{n&&n();let r=Eg[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function Kg(e){return`duration`in e}var qg=e=>{let t=t=>{(t.type===`pagehide`||K.document?.visibilityState===`hidden`)&&e(t)};zh(`visibilitychange`,t,{capture:!0,once:!0}),zh(`pagehide`,t,{capture:!0,once:!0})};function Jg(e){return typeof e==`number`&&isFinite(e)}function Yg(e,t,n,{...r}){let i=cu(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),Md(e,()=>{let e=jd({startTime:t,...r});return e&&e.end(n),e})}function Xg(e){let t=sl();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s,sendDefaultPii:c}=t.getOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=rl(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return jd({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":K.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function Zg(){return K.addEventListener&&K.performance}function Qg(e){return e/1e3}function $g(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function e_(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function t_(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}qg(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function n_(e){let t=0,n;if(!e_(`layout-shift`))return;let r=Mg(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);t_(e,(e,i)=>{r_(t,n,i,e),r()})}function r_(e,t,n,r){Ph&&G.log(`Sending CLS span (${e})`);let i=t?Qg((wc()||0)+t.startTime):xc(),a=rl().getScopeData().transactionName,o=t?Vs(t.sources[0]?.node):`Layout shift`,s={[pl]:`auto.http.browser.cls`,[fl]:`ui.webvital.cls`,[yl]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=Vs(e.node)});let c=Xg({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[hl]:``,[gl]:e}),c.end(i))}function i_(e){return e!=null&&e>0&&e<=6e4}function a_(e){let t=0,n;if(!e_(`largest-contentful-paint`))return;let r=Ng(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!i_(e.value)||(t=e.value,n=r)},!0);t_(e,(e,i)=>{o_(t,n,i,e),r()})}function o_(e,t,n,r){if(!i_(e))return;Ph&&G.log(`Sending LCP span (${e})`);let i=Qg((wc()||0)+(t?.startTime||0)),a=rl().getScopeData().transactionName,o=t?Vs(t.element):`Largest contentful paint`,s={[pl]:`auto.http.browser.lcp`,[fl]:`ui.webvital.lcp`,[yl]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=Vs(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=Xg({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[hl]:`millisecond`,[gl]:e}),c.end(i))}function s_(e){return e&&((wc()||performance.timeOrigin)+e)/1e3}function c_(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=$g(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return wc()||Zg()?.timeOrigin?l_({...t,"http.request.redirect_start":s_(e.redirectStart),"http.request.redirect_end":s_(e.redirectEnd),"http.request.worker_start":s_(e.workerStart),"http.request.fetch_start":s_(e.fetchStart),"http.request.domain_lookup_start":s_(e.domainLookupStart),"http.request.domain_lookup_end":s_(e.domainLookupEnd),"http.request.connect_start":s_(e.connectStart),"http.request.secure_connection_start":s_(e.secureConnectionStart),"http.request.connection_end":s_(e.connectEnd),"http.request.request_start":s_(e.requestStart),"http.request.response_start":s_(e.responseStart),"http.request.response_end":s_(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function l_(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var u_=2147483647,d_=0,f_={},p_,m_;function h_({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=Zg();if(r&&wc()){r.mark&&K.performance.mark(`sentry-tracing-init`);let i=t?a_(n):t===!1?b_():void 0,a=e?n_(n):e===!1?y_():void 0,o=x_();return()=>{o(),i?.(),a?.()}}return()=>void 0}function g_(){Ig(`longtask`,({entries:e})=>{let t=wu();if(!t)return;let{op:n,start_timestamp:r}=cu(t);for(let i of e){let e=Qg(wc()+i.startTime),a=Qg(i.duration);n===`navigation`&&r&&e<r||Yg(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[pl]:`auto.ui.browser.metrics`}})}})}function __(){new PerformanceObserver(e=>{let t=wu();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=Qg(wc()+n.startTime),{start_timestamp:r,op:i}=cu(t);if(i===`navigation`&&r&&e<r)continue;let a=Qg(n.duration),o={[pl]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),Yg(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function v_(){Ig(`event`,({entries:e})=>{let t=wu();if(t){for(let n of e)if(n.name===`click`){let e=Qg(wc()+n.startTime),r=Qg(n.duration),i={name:Vs(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[pl]:`auto.ui.browser.metrics`}},a=Ws(n.target);a&&(i.attributes[`ui.component_name`]=a),Yg(t,e,e+r,i)}}})}function y_(){return Mg(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(f_.cls={value:e.value,unit:``},m_=t)},!0)}function b_(){return Ng(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!i_(e.value)||(f_.lcp={value:e.value,unit:`millisecond`},p_=t)},!0)}function x_(){return Pg(({metric:e})=>{e.entries[e.entries.length-1]&&(f_.ttfb={value:e.value,unit:`millisecond`})})}function S_(e,t){let n=Zg(),r=wc();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o,recordClsOnPageloadSpan:s,recordLcpOnPageloadSpan:c}=t,l=Qg(r),u=n.getEntries(),{op:d,start_timestamp:f}=cu(e);if(u.slice(d_).forEach(t=>{let n=Qg(t.startTime),r=Qg(Math.max(0,t.duration));if(!(d===`navigation`&&f&&l+n<f))switch(t.entryType){case`navigation`:E_(e,t,l);break;case`mark`:case`paint`:case`measure`:{w_(e,t,n,r,l,a);let i=Gh(),o=t.startTime<i.firstHiddenTime;t.name===`first-paint`&&o&&(f_.fp={value:t.startTime,unit:`millisecond`}),t.name===`first-contentful-paint`&&o&&(f_.fcp={value:t.startTime,unit:`millisecond`});break}case`resource`:A_(e,t,t.name,n,r,l,o);break}}),d_=Math.max(u.length-1,0),j_(e,i),d===`pageload`){if(P_(f_),i){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),Ph&&G.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{f_[e]&&t(e,f_[e].value)}),f_[`ttfb.requestTime`]&&t(`ttfb.requestTime`,f_[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else s||delete f_.cls,c||delete f_.lcp,Object.entries(f_).forEach(([e,t])=>{bd(e,t.value,t.unit)}),M_(e,t);e.setAttribute(i?`browser.performance.time_origin`:`performance.timeOrigin`,l),e.setAttribute(i?`browser.performance.navigation.activation_start`:`performance.activationStart`,Rh())}p_=void 0,m_=void 0,f_={}}function C_(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function w_(e,t,n,r,i,a){if(C_(t)||[`mark`,`measure`].includes(t.entryType)&&oc(t.name,a))return;let o=Lh(!1),s=Qg(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[pl]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),T_(d,t),c<=u&&Yg(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function T_(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&ks(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(ks(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function E_(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{D_(e,t,r,n)}),D_(e,t,`secureConnection`,n,`TLS/SSL`),D_(e,t,`fetch`,n,`cache`),D_(e,t,`domainLookup`,n,`DNS`),k_(e,t,n)}function D_(e,t,n,r,i=n){let a=t[O_(n)],o=t[`${n}Start`];!o||!a||Yg(e,r+Qg(o),r+Qg(a),{op:`browser.${i}`,name:t.name,attributes:{[pl]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function O_(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function k_(e,t,n){let r=n+Qg(t.requestStart),i=n+Qg(t.responseEnd),a=n+Qg(t.responseStart);t.responseEnd&&(Yg(e,r,i,{op:`browser.request`,name:t.name,attributes:{[pl]:`auto.ui.browser.metrics`}}),Yg(e,a,i,{op:`browser.response`,name:t.name,attributes:{[pl]:`auto.ui.browser.metrics`}}))}function A_(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[pl]:`auto.resource.browser.metrics`},l=cf(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(K.location.origin),N_(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...c_(t)},d=a+r;Yg(e,d,d+i,{name:n.replace(K.location.origin,``),op:s,attributes:u})}function j_(e,t){let n=K.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),Jg(r.rtt)&&(f_[`connection.rtt`]={value:r.rtt,unit:`millisecond`},t&&e.setAttribute(`network.connection.rtt`,r.rtt))),Jg(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),Jg(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function M_(e,t){p_&&t.recordLcpOnPageloadSpan&&(p_.element&&e.setAttribute(`lcp.element`,Vs(p_.element)),p_.id&&e.setAttribute(`lcp.id`,p_.id),p_.url&&e.setAttribute(`lcp.url`,p_.url.trim().slice(0,200)),p_.loadTime!=null&&e.setAttribute(`lcp.loadTime`,p_.loadTime),p_.renderTime!=null&&e.setAttribute(`lcp.renderTime`,p_.renderTime),e.setAttribute(`lcp.size`,p_.size)),m_?.sources&&t.recordClsOnPageloadSpan&&m_.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Vs(t.node)))}function N_(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<u_||typeof i==`string`)&&(t[r]=i)})}function P_(e){let t=Lh(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var F_=[],I_=new Map,L_=new Map;function R_(){if(Zg()&&wc()){let e=B_();return()=>{e()}}return()=>void 0}var z_={click:`click`,pointerdown:`click`,pointerup:`click`,mousedown:`click`,mouseup:`click`,touchstart:`click`,touchend:`click`,mouseover:`hover`,mouseout:`hover`,mouseenter:`hover`,mouseleave:`hover`,pointerover:`hover`,pointerout:`hover`,pointerenter:`hover`,pointerleave:`hover`,dragstart:`drag`,dragend:`drag`,drag:`drag`,dragenter:`drag`,dragleave:`drag`,dragover:`drag`,drop:`drag`,keydown:`press`,keyup:`press`,keypress:`press`,input:`press`};function B_(){return Fg(V_)}var V_=({metric:e})=>{if(e.value==null)return;let t=Qg(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&z_[t.name]);if(!n)return;let{interactionId:r}=n,i=z_[n.name],a=Qg(wc()+n.startTime),o=wu(),s=o?Su(o):void 0,c=r==null?void 0:I_.get(r),l=c?.span||s,u=l?cu(l).description:rl().getScopeData().transactionName,d=Xg({name:c?.elementName||Vs(n.target),transaction:u,attributes:{[pl]:`auto.http.browser.inp`,[fl]:`ui.interaction.${i}`,[yl]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[hl]:`millisecond`,[gl]:e.value}),d.end(a+t))};function H_(e){return e==null?void 0:I_.get(e)}function U_(){let e=Object.keys(z_);tp()&&e.forEach(e=>{K.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=Vs(t),r=Math.round(e.timeStamp);if(L_.set(r,n),L_.size>50){let e=L_.keys().next().value;e!==void 0&&L_.delete(e)}}function n(e){let t=Math.round(e.startTime),n=L_.get(t);if(!n)for(let e=-5;e<=5;e++){let r=L_.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=wu(),r=t&&Su(t);e.forEach(e=>{if(!Kg(e))return;let t=e.interactionId;if(t==null||I_.has(t))return;let i=e.target?Vs(e.target):n(e);if(F_.length>10){let e=F_.shift();I_.delete(e)}F_.push(t),I_.set(t,{span:r,elementName:i})})};Ig(`event`,r),Ig(`first-input`,r)}function W_(e){let{name:t,op:n,origin:r,metricName:i,value:a,attributes:o,parentSpan:s,reportEvent:c,startTime:l,endTime:u}=e,d=rl().getScopeData().transactionName,f={[pl]:r,[fl]:n,[yl]:0,[`browser.web_vital.${i}.value`]:a,"sentry.transaction":d,"user_agent.original":K.navigator?.userAgent,...o};s&&lu(s).attributes?.[`sentry.op`]===`pageload`&&(f[`sentry.pageload.span_id`]=s.spanContext().spanId),c&&(f[`browser.web_vital.${i}.report_event`]=c);let p=jd({name:t,attributes:f,startTime:l,parentSpan:s});p&&p.end(u??l)}function G_(e){let t=0,n;if(!e_(`largest-contentful-paint`))return;let r=Ng(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!i_(e.value)||(t=e.value,n=r)},!0);t_(e,(e,i,a)=>{K_(t,n,a,e),r()})}function K_(e,t,n,r){if(!i_(e))return;Ph&&G.log(`Sending LCP span (${e})`);let i=wc()||0,a=Qg(i),o=Qg(i+(t?.startTime||0)),s=t?Vs(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=Vs(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),W_({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function q_(e){let t=0,n;if(!e_(`layout-shift`))return;let r=Mg(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);t_(e,(e,i,a)=>{J_(t,n,a,e),r()})}function J_(e,t,n,r){Ph&&G.log(`Sending CLS span (${e})`);let i=t?Qg((wc()||0)+t.startTime):xc(),a=t?Vs(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=Vs(e.node)}),W_({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function Y_(){!Zg()||!wc()||Fg(({metric:e})=>{if(e.value==null||Qg(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&z_[t.name]);t&&X_(e.value,t)})}function X_(e,t){Ph&&G.log(`Sending INP span (${e})`);let n=Qg(wc()+t.startTime),r=Qg(e),i=z_[t.name],a=H_(t.interactionId),o=wu(),s=o?Su(o):void 0,c=a?.span||s,l=c?lu(c).name:rl().getScopeData().transactionName;W_({name:a?.elementName||Vs(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[yl]:t.duration,"sentry.transaction":l},startTime:n,endTime:n+r,parentSpan:c})}var Z_=1e3,Q_,$_,ev;function tv(e){fs(`dom`,e),ps(`dom`,nv)}function nv(){if(!K.document)return;let e=ms.bind(null,`dom`),t=av(e,!0);K.document.addEventListener(`click`,t,!1),K.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=K[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Gs(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=av(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Gs(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function rv(e){if(e.type!==$_)return!1;try{if(!e.target||e.target._sentryId!==ev)return!1}catch{}return!0}function iv(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function av(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=ov(n);if(iv(n.type,r))return;Ks(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Ks(r,`_sentryId`,uc());let i=n.type===`keypress`?`input`:n.type;rv(n)||(e({event:n,name:i,global:t}),$_=n.type,ev=r?r._sentryId:void 0),clearTimeout(Q_),Q_=K.setTimeout(()=>{ev=void 0,$_=void 0},Z_)}}function ov(e){try{return e.target}catch{return null}}var sv;function cv(e){let t=`history`;fs(t,e),ps(t,lv)}function lv(){if(K.addEventListener(`popstate`,()=>{let e=K.location.href,t=sv;sv=e,t!==e&&ms(`history`,{from:t,to:e})}),!Xm())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=sv,i=uv(String(n));if(sv=i,r===i)return e.apply(this,t);ms(`history`,{from:r,to:i})}return e.apply(this,t)}}Gs(K.history,`pushState`,e),Gs(K.history,`replaceState`,e)}function uv(e){try{return new URL(e,K.location.origin).toString()}catch{return e}}var dv={};function fv(e){let t=dv[e];if(t)return t;let n=K[e];if(Qm(n))return dv[e]=n.bind(K);let r=K.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Ph&&G.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(dv[e]=n.bind(K))}function pv(e){dv[e]=void 0}var mv=`__sentry_xhr_v3__`;function hv(e){fs(`xhr`,e),ps(`xhr`,gv)}function gv(){if(!K.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=xc()*1e3,a=Ds(n[0])?n[0].toUpperCase():void 0,o=_v(n[1]);if(!a||!o)return e.apply(t,n);t[mv]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[mv];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}ms(`xhr`,{endTimestamp:xc()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[mv];return a&&Ds(r)&&Ds(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[mv];return r?(n[0]!==void 0&&(r.body=n[0]),ms(`xhr`,{startTimestamp:xc()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function _v(e){if(Ds(e))return e;try{return e.toString()}catch{}}function vv(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return Ph&&G.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r
|
|
21
21
|
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}var yv=40;function bv(e,t=fv(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw pv(`fetch`),e}finally{n-=a,r--}}return Cp(e,i,_p(e.bufferSize||yv))}var xv=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Sv=30,Cv=50;function wv(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Tv=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ev=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Dv=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ov=/at (.+?) ?\(data:(.+?),/,kv=[Sv,e=>{let t=e.match(Ov);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=Tv.exec(e);if(n){let[,e,t,r]=n;return wv(e,`?`,+t,+r)}let r=Ev.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=Dv.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Nv(r[1]||`?`,r[2]);return wv(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Av=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jv=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Mv=rs(kv,[Cv,e=>{let t=Av.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=jv.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Nv(n,e),wv(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Nv=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Pv=1024,Fv=`Breadcrumbs`,Iv=Zf(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Fv,setup(e){t.console&&Em(zv(e)),t.dom&&tv(Rv(e,t.dom)),t.xhr&&hv(Bv(e)),t.fetch&&eh(Vv(e)),t.history&&cv(Hv(e)),t.sentry&&e.on(`beforeSendEvent`,Lv(e))}}}));function Lv(e){return function(t){sl()===e&&em({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:fc(t)},{event:t})}}function Rv(e,t){return function(n){if(sl()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Pv&&(xv&&G.warn(`\`dom.maxStringLength\` cannot exceed ${Pv}, but a value of ${o} was configured. Sentry will use ${Pv} instead.`),o=Pv),typeof a==`string`&&(a=[a]);try{let e=n.event,t=Uv(e)?e.target:e;r=Vs(t,{keyAttrs:a,maxStringLength:o}),i=Ws(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),em(s,{event:n.event,name:n.name,global:n.global})}}function zv(e){return function(t){if(sl()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:Om(t.level),message:ic(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${ic(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;em(n,{input:t.args,level:t.level})}}function Bv(e){return function(t){if(sl()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[mv];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Jm(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),em(d,u)}}function Vv(e){return function(t){if(sl()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),em(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Jm(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),em(s,o)}}}function Hv(e){return function(t){if(sl()!==e)return;let n=t.from,r=t.to,i=cf(lh.location.href),a=n?cf(n):void 0,o=cf(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),em({category:`navigation`,data:{from:n,to:r}})}}function Uv(e){return!!e&&!!e.target}var Wv=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),Gv=`BrowserApiErrors`,Kv=Zf(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Gv,setupOnce(){t.setTimeout&&Gs(lh,`setTimeout`,qv),t.setInterval&&Gs(lh,`setInterval`,qv),t.requestAnimationFrame&&Gs(lh,`requestAnimationFrame`,Jv),t.XMLHttpRequest&&`XMLHttpRequest`in lh&&Gs(XMLHttpRequest.prototype,`send`,Yv);let e=t.eventTarget;e&&(Array.isArray(e)?e:Wv).forEach(e=>Xv(e,t))}}}));function qv(e){return function(...t){let n=t[0];return t[0]=ph(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ss(e)}`}}),e.apply(this,t)}}function Jv(e){return function(t){return e.apply(this,[ph(t,{mechanism:{data:{handler:ss(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function Yv(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Gs(n,e,function(t){let n={mechanism:{data:{handler:ss(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Js(t);return r&&(n.mechanism.data.handler=ss(r)),ph(t,n)})}),e.apply(this,t)}}function Xv(e,t){let n=lh[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Gs(n,`addEventListener`,function(n){return function(r,i,a){try{Zv(i)&&(i.handleEvent=ph(i.handleEvent,{mechanism:{data:{handler:ss(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&Qv(this,r,i),n.apply(this,[r,ph(i,{mechanism:{data:{handler:ss(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Gs(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}function Zv(e){return typeof e.handleEvent==`function`}function Qv(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var $v=Zf((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(lh.document===void 0){xv&&G.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}zf({ignoreDuration:!0}),Hf();let e=il(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();(n?.id!==t?.id||n?.ip_address!==t?.ip_address)&&(Hf(),n=t)}),t===`route`&&cv(({from:e,to:t})=>{e!==t&&(zf({ignoreDuration:!0}),Hf())})}}}),ey=`CultureContext`,ty=Zf((()=>({name:ey,preprocessEvent(e){let t=ny();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=ny();t&&df(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function ny(){try{let e=lh.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var ry=`GlobalHandlers`,iy=Zf(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:ry,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(ay(e),uy(`onerror`)),t.onunhandledrejection&&(oy(e),uy(`onunhandledrejection`))}}}));function ay(e){gs(t=>{let{stackParser:n,attachStacktrace:r}=dy();if(sl()!==e||dh())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=ly(Dh(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Lf(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function oy(e){ys(t=>{let{stackParser:n,attachStacktrace:r}=dy();if(sl()!==e||dh())return;let i=sy(t),a=ks(i)?cy(i):Dh(n,i,void 0,r,!0);a.level=`error`,Lf(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function sy(e){if(ks(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function cy(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function ly(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:fy(t)??Us(),function:`?`,in_app:!0}),e}function uy(e){xv&&G.log(`Global Handler attached: ${e}`)}function dy(){return sl()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function fy(e){if(!(!Ds(e)||e.length===0))return e.startsWith(`data:`)?`<${uf(e,!1)}>`:e}var py=Zf(()=>({name:`HttpContext`,preprocessEvent(e){if(!lh.navigator&&!lh.location&&!lh.document)return;let t=mh(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!lh.navigator&&!lh.location&&!lh.document)return;let t=mh();df(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers[`User-Agent`],"http.request.header.referer":t.headers.Referer})}})),my=`cause`,hy=5,gy=`LinkedErrors`,_y=Zf(((e={})=>{let t=e.limit||hy,n=e.key||my;return{name:gy,preprocessEvent(e,r,i){vm(hh,i.getOptions().stackParser,n,t,e,r)}}}));function vy(e){return[cm(),im(),Rm(),Kv(),Iv(),iy(),_y(),Am(),py(),ty(),$v()]}function yy(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function by(e){try{return new URL(e,lh.location.origin).href}catch{return}}function xy(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function Sy(e){try{return new Headers(e)}catch{return}}var Cy=new WeakMap,wy=new Map,Ty={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Ey(e,t){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:a,enableHTTPTimings:o,tracePropagationTargets:s,onRequestSpanStart:c,onRequestSpanEnd:l}={...Ty,...t},u=typeof a==`function`?a:e=>!0,d=e=>ky(e,s),f={},p=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(e=>(e.type===`transaction`&&e.spans&&e.spans.forEach(e=>{if(e.op===`http.client`){let t=wy.get(e.span_id);t&&(e.timestamp=t/1e3,wy.delete(e.span_id))}}),e)),i&&th(e=>{if(e.response){let t=Cy.get(e.response);t&&e.endTimestamp&&wy.set(t,e.endTimestamp)}}),eh(t=>{let n=zm(t,u,d,f,{propagateTraceparent:p,onRequestSpanEnd:l});if(t.response&&t.fetchData.__span&&Cy.set(t.response,t.fetchData.__span),n){let r=by(t.fetchData.url),i=r?cf(r).host:void 0;n.setAttributes({"http.url":r?uf(r):void 0,"server.address":i}),o&&Oy(n,e),c?.(n,{headers:t.headers})}})),r&&hv(t=>{let n=Ay(t,u,d,f,p,l);n&&(o&&Oy(n,e),c?.(n,{headers:Sy(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var Dy=300;function Oy(e,t){let{url:n}=cu(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(Sd(t)){let t=e.end.bind(e);e.end=e=>{let n=e??xc(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,Dy)}}let i=Ig(`resource`,({entries:t})=>{t.forEach(t=>{xy(t)&&t.name.endsWith(n)&&(e.setAttributes(c_(t)),r())})})}function ky(e,t){let n=Us();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?oc(r.toString(),t)||a&&oc(r.pathname,t):a}else{let n=!!e.match(/^\/(?!\/)/);return t?oc(e,t):n}}function Ay(e,t,n,r,i,a){let o=e.xhr,s=o?.[mv];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=Ou()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(Cl(n,s.status_code),n.end(),a?.(n,{headers:Sy(vv(o)),error:e.error})),delete r[t]);return}let d=by(c),f=cf(d||c),p=uf(lf(c)),m=sl(),h=!!wu()||!!m&&Sd(m),g=u&&h?jd({name:`${l} ${p}`,attributes:{url:uf(c),type:`xhr`,"http.method":l,"http.url":d?uf(d):void 0,"server.address":f?.host,[pl]:`auto.http.browser`,[fl]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Bu;return u&&!h&&m?.recordDroppedEvent(`no_parent_span`,`span`),o.__sentry_xhr_span_id__=g.spanContext().spanId,r[o.__sentry_xhr_span_id__]=g,n(c)&&jy(o,Ou()&&h?g:void 0,i),m&&m.emit(`beforeOutgoingRequestSpan`,g,e),g}function jy(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=Xp({span:t,propagateTraceparent:n});r&&My(e,r,i,a)}function My(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!yy(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}function Ny(){lh.document?lh.document.addEventListener(`visibilitychange`,()=>{let e=wu();if(!e)return;let t=Su(e);if(lh.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=cu(t);xv&&G.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}}):xv&&G.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var Py=`sentry_previous_trace`,Fy=`sentry.previous_trace`;function Iy(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?zy():void 0;e.on(`spanStart`,e=>{if(Su(e)!==e)return;let t=rl().getPropagationContext();i=Ly(i,e,t),r&&Ry(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=rl(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(By(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=By(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[dl]:i.sampleRate}})}function Ly(e,t,n){let r=cu(t);function i(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[`sentry.sample_rate`])}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(xv&&G.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[bl]:`previous_trace`}}),t.setAttribute(Fy,`${o.traceId}-${o.spanId}-${+!!By(o)}`)),a)}function Ry(e){try{lh.sessionStorage.setItem(Py,JSON.stringify(e))}catch(e){xv&&G.warn(`Could not store previous trace in sessionStorage`,e)}}function zy(){try{let e=lh.sessionStorage?.getItem(Py);return JSON.parse(e)}catch{return}}function By(e){return e.traceFlags===1}var Vy=`BrowserTracing`,Hy=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Uy(){let e=lh.navigator;return e?.userAgent?Hy.test(e.userAgent):!1}var Wy={...Vd,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Ty},Gy=((e={})=>{`enableElementTiming`in e&&Go(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=lh.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:a,_experiments:{enableInteractions:o,enableStandaloneClsSpans:s,enableStandaloneLcpSpans:c},beforeStartSpan:l,idleTimeout:u,finalTimeout:d,childSpanTimeout:f,markBackgroundSpan:p,traceFetch:m,traceXHR:h,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:_,enableHTTPTimings:v,ignoreResourceSpans:y,ignorePerformanceApiSpans:b,instrumentPageLoad:x,instrumentNavigation:S,detectRedirects:C,linkPreviousTrace:w,consistentTraceSampling:T,enableReportPageLoaded:E,onRequestSpanStart:D,onRequestSpanEnd:O}={...Wy,...e},k=Uy(),A,j,M;function N(e,r,i=!0){let a=r.op===`pageload`,o=r.name,p=l?l(r):r,m=p.attributes||{};if(o!==p.name&&(m[ll]=`custom`,p.attributes=m),!i){let e=vc();jd({...p,startTime:e}).end(e);return}t.name=p.name,t.source=m[ll];let h=Kd(p,{idleTimeout:u,finalTimeout:d,childSpanTimeout:f,disableAutoFinish:a,beforeSpanEnd:t=>{A?.();let n=Sd(e);S_(t,{recordClsOnPageloadSpan:!n&&!s,recordLcpOnPageloadSpan:!n&&!c,ignoreResourceSpans:y,ignorePerformanceApiSpans:b,spanStreamingEnabled:n}),$y(e,void 0);let r=rl(),i=r.getPropagationContext();r.setPropagationContext({...i,traceId:h.spanContext().traceId,sampled:mu(h),dsc:zu(t)}),a&&(M=void 0)},trimIdleSpanEndTimestamp:!E});a&&E&&(M=h),$y(e,h);function g(){n&&[`interactive`,`complete`].includes(n.readyState)&&e.emit(`idleSpanEnableAutoFinish`,h)}a&&!E&&n&&(n.addEventListener(`readystatechange`,()=>{g()}),g())}return{name:Vy,setup(e){if(k){xv&&G.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}Du();let t=Sd(e);if(A=h_({recordClsStandaloneSpans:t?void 0:s||!1,recordLcpStandaloneSpans:t?void 0:c||!1,client:e}),t?(G_(e),q_(e),r&&Y_()):r&&R_(),a&&Lo.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?__():i&&g_(),o&&v_(),C&&n){let e=()=>{j=xc()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function l(){let t=Qy(e);t&&!cu(t).timestamp&&(xv&&G.log(`[Tracing] Finishing current active span with op: ${cu(t).op}`),t.setAttribute(ml,`cancelled`),t.end())}e.on(`startNavigationSpan`,(t,n)=>{if(sl()!==e)return;if(n?.isRedirect){xv&&G.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),N(e,{op:`navigation.redirect`,...t},!1);return}j=void 0,l(),il().setPropagationContext({traceId:Ac(),sampleRand:Math.random(),propagationSpanId:Ou()?void 0:jc()});let r=rl();r.setPropagationContext({traceId:Ac(),sampleRand:Math.random(),propagationSpanId:Ou()?void 0:jc()}),r.setSDKProcessingMetadata({normalizedRequest:void 0}),N(e,{op:`navigation`,...t,parentSpan:null,forceTransaction:!0})}),e.on(`startPageLoadSpan`,(t,n={})=>{if(sl()!==e)return;l();let r=Yl(n.sentryTrace||Jy(`sentry-trace`)||Yy(`sentry-trace`),n.baggage||Jy(`baggage`)||Yy(`baggage`)),i=rl();i.setPropagationContext(r),Ou()||(i.getPropagationContext().propagationSpanId=jc()),i.setSDKProcessingMetadata({normalizedRequest:mh()}),N(e,{op:`pageload`,...t})}),e.on(`endPageloadSpan`,()=>{E&&M&&(M.setAttribute(ml,`reportPageLoaded`),M.end())})},afterAllSetup(e){if(k)return;let n=Us();if(w!==`off`&&Iy(e,{linkPreviousTrace:w,consistentTraceSampling:T}),lh.location){if(x){let t=wc();Ky(e,{name:lh.location.pathname,startTime:t?t/1e3:void 0,attributes:{[ll]:`url`,[pl]:`auto.pageload.browser`}})}S&&cv(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=of(t),a=Qy(e),o=a&&C&&tb(a,j);qy(e,{name:i?.pathname||lh.location.pathname,attributes:{[ll]:`url`,[pl]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}p&&Ny(),o&&Xy(e,u,d,f,t),r&&U_(),Ey(e,{traceFetch:m,traceXHR:h,trackFetchStreamPerformance:g,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_,enableHTTPTimings:v,onRequestSpanStart:D,onRequestSpanEnd:O})}}});function Ky(e,t,n){e.emit(`startPageLoadSpan`,t,n),rl().setTransactionName(t.name);let r=Qy(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function qy(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i}),e.emit(`startNavigationSpan`,t,{isRedirect:i});let a=rl();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...mh(),url:r}}),Qy(e)}function Jy(e){return(lh.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function Yy(e){return(lh.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function Xy(e,t,n,r,i){let a=lh.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=Qy(e);if(s){let e=cu(s).op;if([`navigation`,`pageload`].includes(e)){xv&&G.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(ml,`interactionInterrupted`),o.end(),void 0),!i.name){xv&&G.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=Kd({name:i.name,op:a,attributes:{[ll]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var Zy=`_sentry_idleSpan`;function Qy(e){return e[Zy]}function $y(e,t){Ks(e,Zy,t)}var eb=1.5;function tb(e,t){let n=cu(e),r=vc();return!(r-n.start_timestamp>eb||t&&r-t<=eb)}var nb=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,rb=new WeakSet;function ib(e,t){let n=Gy({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:i,useNavigationType:a,createRoutesFromChildren:o,matchRoutes:s,stripBasename:c,enableAsyncRouteHandlers:l=!1,instrumentPageLoad:u=!0,instrumentNavigation:d=!0,lazyRouteTimeout:f,lazyRouteManifest:p}=e;return{...n,setup(t){n.setup(t);let r=e.finalTimeout??3e4,i=(e.idleTimeout??1e3)*3,a=f??i;a===1/0?nb&&G.log(`[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:`,r,`ms to prevent indefinite hangs`):Number.isNaN(a)?nb&&G.warn(`[React Router] lazyRouteTimeout must be a number, falling back to default:`,i):a<0&&nb&&G.warn(`[React Router] lazyRouteTimeout must be non-negative or Infinity, got:`,a,`falling back to:`,i)},afterAllSetup(e){n.afterAllSetup(e);let r=lh.location?.pathname;u&&r&&Ky(e,{name:r,attributes:{[ll]:`url`,[fl]:`pageload`,[pl]:`auto.pageload.react.reactrouter_v${t}`}}),d&&rb.add(e)}}}function ab(e){return ib(e,`6`)}function ob(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function sb(...e){return t=>{let n=!1,r=e.map(e=>{let r=ob(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():ob(e[t],null)}}}}var cb=Symbol.for(`react.lazy`),lb=h.use;function ub(e){return typeof e==`object`&&!!e&&`then`in e}function db(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===cb&&`_payload`in e&&ub(e._payload)}function fb(e){let t=mb(e),r=h.forwardRef((e,r)=>{let{children:i,...a}=e;db(i)&&typeof lb==`function`&&(i=lb(i._payload));let o=h.Children.toArray(i),s=o.find(gb);if(s){let e=s.props.children,i=o.map(t=>t===s?h.Children.count(e)>1?h.Children.only(null):h.isValidElement(e)?e.props.children:null:t);return(0,n.jsx)(t,{...a,ref:r,children:h.isValidElement(e)?h.cloneElement(e,void 0,i):null})}return(0,n.jsx)(t,{...a,ref:r,children:i})});return r.displayName=`${e}.Slot`,r}var pb=fb(`Slot`);function mb(e){let t=h.forwardRef((e,t)=>{let{children:n,...r}=e;if(db(n)&&typeof lb==`function`&&(n=lb(n._payload)),h.isValidElement(n)){let e=vb(n),i=_b(r,n.props);return n.type!==h.Fragment&&(i.ref=t?sb(t,e):e),h.cloneElement(n,i)}return h.Children.count(n)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hb=Symbol(`radix.slottable`);function gb(e){return h.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===hb}function _b(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function vb(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yb=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},bb=({svgComponent:e,...t})=>(0,n.jsx)(e,{...t});function xb(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=xb(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Sb(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xb(e))&&(r&&(r+=` `),r+=t);return r}var Cb=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,wb=Sb,Tb=(e,t)=>n=>{if(t?.variants==null)return wb(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Cb(t)||Cb(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return wb(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Eb=Tb(`aspect-square`,{variants:{size:{"2xs":`h-3 w-3`,xs:`h-4 w-4`,sm:`h-5 w-5`,md:`h-6 w-6`,lg:`h-7 w-7`,xl:`h-8 w-8`,"2xl":`h-10 w-10`},variant:{primary:`fill-none stroke-core-white-900 stroke-[1.5]`,secondary:`fill-none stroke-core-gray-400 stroke-[1.5] active:stroke-core-gray-900 `,discovery:`fill-none stroke-core-primary-500 stroke-[1.5] `,destructive:`fill-none stroke-core-red-700 stroke-[1.5] `,placeholder:`fill-none stroke-core-gray-300 stroke-[1.5]`},outline:{true:[],false:[]}},compoundVariants:[{variant:`placeholder`,outline:!1,class:`fill-core-gray-300 stroke-width-0`}],defaultVariants:{variant:`placeholder`,size:`md`}}),Db=f({default:()=>Ob}),Ob,kb=u((()=>{Ob=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,n.jsx)(`path`,{d:`M8 4.75V8.25M16 4.75V8.25M7.75 10.75H16.25M6.75 19.25H17.25C18.3546 19.25 19.25 18.3546 19.25 17.25V8.75C19.25 7.64543 18.3546 6.75 17.25 6.75H6.75C5.64543 6.75 4.75 7.64543 4.75 8.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25Z`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})})})),Ab=f({default:()=>jb}),jb,Mb=u((()=>{jb=e=>(0,n.jsx)(`svg`,{height:24,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,n.jsx)(`path`,{d:`m21.25 7.5c.3796958 0 .693491.28215388.7431534.64822944l.0068466.10177056v8.5c0 1.7330315-1.3564548 3.1492459-3.0655761 3.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555 0-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932 1.06066018 0 .26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734 0 1.6711923-.7071103 1.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815 2 2c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554 0 .03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2 2c-.2928932.29289321-.767767.29289321-1.0606602 0-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734 0-1.67119234.70711027-1.7441988 1.60647279l-.0058012.14352721v8.5c0 .4142136-.33578644.75-.75.75-.37969577 0-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146 1.35645477-3.14924593 3.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117 5.85294824c2.209139 0 4 1.790861 4 4s-1.790861 4-4 4-4-1.790861-4-4 1.790861-4 4-4zm0 1.5c-1.3807119 0-2.5 1.1192881-2.5 2.5s1.1192881 2.5 2.5 2.5 2.5-1.1192881 2.5-2.5-1.1192881-2.5-2.5-2.5z`,fill:`#212121`})})})),Nb=f({default:()=>Pb}),Pb,Fb=u((()=>{Pb=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,n.jsx)(`path`,{d:`M13.25 8.75L9.75 12L13.25 15.25`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})})})),Ib=f({default:()=>Lb}),Lb,Rb=u((()=>{Lb=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,...e,children:(0,n.jsx)(`path`,{d:`M17.25 6.75L6.75 17.25M6.75 6.75L17.25 17.25`,strokeLinecap:`round`,strokeLinejoin:`round`})})})),zb=f({default:()=>Bb}),Bb,Vb=u((()=>{Bb=e=>(0,n.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsx)(`path`,{d:`M4.7002 4.70016L11.2999 11.2998`,stroke:`#000`,strokeWidth:1.8,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`path`,{d:`M11.2998 4.70016L4.70014 11.2998`,stroke:`#000`,strokeWidth:1.8,strokeLinecap:`round`,strokeLinejoin:`round`})]})})),Hb=f({default:()=>Ub}),Ub,Wb=u((()=>{Ub=e=>(0,n.jsxs)(`svg`,{width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[(0,n.jsx)(`circle`,{cx:12,cy:12,r:7.25,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5}),(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M14.25 8.75H11.375C10.4775 8.75 9.75 9.47754 9.75 10.375V10.375C9.75 11.2725 10.4775 12 11.375 12H12.625C13.5225 12 14.25 12.7275 14.25 13.625V13.625C14.25 14.5225 13.5225 15.25 12.625 15.25H9.75`}),(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M12 7.75V8.25`}),(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M12 15.75V16.25`})]})})),Gb=f({default:()=>Kb}),Kb,qb=u((()=>{Kb=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,...e,children:(0,n.jsx)(`path`,{d:`M19.25 19.25H13.75M9 18.25L4.75 19.25L5.75 15L15.0429 5.70711C15.4334 5.31658 16.0666 5.31658 16.4571 5.70711L18.2929 7.54289C18.6834 7.93342 18.6834 8.56658 18.2929 8.95711L9 18.25Z`,strokeLinecap:`round`,strokeLinejoin:`round`})})})),Jb=f({default:()=>Yb}),Yb,Xb=u((()=>{Yb=e=>(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,n.jsx)(`path`,{d:`M6.75024 19.2502H17.2502C18.3548 19.2502 19.2502 18.3548 19.2502 17.2502V9.75025L12.0002 4.75024L4.75024 9.75025V17.2502C4.75024 18.3548 5.64568 19.2502 6.75024 19.2502Z`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`path`,{d:`M9.74963 15.7493C9.74963 14.6447 10.6451 13.7493 11.7496 13.7493H12.2496C13.3542 13.7493 14.2496 14.6447 14.2496 15.7493V19.2493H9.74963V15.7493Z`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})]})})),Zb=f({default:()=>Qb}),Qb,$b=u((()=>{Qb=e=>(0,n.jsxs)(`svg`,{width:24,height:24,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,...e,children:[(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 13V15`}),(0,n.jsx)(`circle`,{cx:12,cy:9,r:.5}),(0,n.jsx)(`circle`,{cx:12,cy:12,r:7.25,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5})]})})),ex=f({default:()=>tx}),tx,nx=u((()=>{tx=e=>(0,n.jsx)(`svg`,{width:331,height:297,viewBox:`0 0 331 297`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,n.jsx)(`path`,{d:`M260.633 120.233C256.252 141.975 249.682 152.798 240.921 152.798C234.584 152.798 229.087 148.853 224.473 140.869C219.859 132.931 213.661 120.233 205.88 102.869C196.606 81.8482 188.078 64.6769 180.297 51.2559C172.516 37.8843 162.543 26.0991 150.381 15.9495C138.171 5.84943 123.585 0.750732 106.531 0.750732C66.1304 0.750732 37.5648 28.4561 20.7431 83.8685C8.56966 124.042 1.84252 172.378 0.554243 228.779C0.43324 234.077 0.372738 236.726 1.39875 238.822C2.29091 240.644 3.79168 242.18 5.59324 243.113C7.66509 244.187 10.3571 244.187 15.7412 244.187H49.9832C55.1593 244.187 57.7474 244.187 59.7252 243.228C61.4991 242.369 62.8933 241.064 63.8691 239.352C64.9571 237.442 65.1344 234.785 65.489 229.471C66.8596 208.929 69.3476 191.707 72.9797 177.809C78.8046 155.346 86.5875 144.139 96.3253 144.139C103.13 144.139 109.001 148.131 113.848 156.068C118.693 164.053 125.264 177.425 133.558 196.281C146.234 227.402 159.374 251.837 172.982 269.586C186.634 287.335 205.135 296.186 228.48 296.186C267.948 296.186 295.536 268.672 311.379 213.645C322.875 173.601 329.307 125.115 330.648 68.1882C330.773 62.8736 330.836 60.2162 329.81 58.1189C328.918 56.2936 327.419 54.7593 325.615 53.8241C323.543 52.7496 320.846 52.7496 315.451 52.7496H281.752C276.521 52.7496 273.906 52.7496 271.908 53.7319C270.126 54.6081 268.711 55.9568 267.751 57.6953C266.675 59.6442 266.547 62.3114 266.293 67.6459C265.272 89.0314 263.387 106.562 260.633 120.233Z`,fill:`currentColor`})})})),rx=f({default:()=>ix}),ix,ax=u((()=>{ix=e=>(0,n.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,...e,children:(0,n.jsx)(`path`,{d:`M5.5 6.5L12 12.25L18.5 6.5M6.75 18.25H17.25C18.3546 18.25 19.25 17.3546 19.25 16.25V7.75C19.25 6.64543 18.3546 5.75 17.25 5.75H6.75C5.64543 5.75 4.75 6.64543 4.75 7.75V16.25C4.75 17.3546 5.64543 18.25 6.75 18.25Z`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})})})),ox=f({default:()=>sx}),sx,cx=u((()=>{sx=e=>(0,n.jsxs)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsxs)(`g`,{clipPath:`url(#clip0_17_95)`,children:[(0,n.jsx)(`rect`,{width:32,height:32,rx:4,fill:`#FEF3F2`}),(0,n.jsx)(`path`,{d:`M12.0003 12L20.0003 20M12.0003 20L20.0003 12`,stroke:`#E02731`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,n.jsx)(`defs`,{children:(0,n.jsx)(`clipPath`,{id:`clip0_17_95`,children:(0,n.jsx)(`path`,{d:`M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z`,fill:`white`})})})]})})),lx=f({default:()=>ux}),ux,dx=u((()=>{ux=e=>(0,n.jsxs)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsxs)(`g`,{clipPath:`url(#clip0_15_20)`,children:[(0,n.jsx)(`rect`,{width:32,height:32,rx:4,fill:`#E7FBF4`}),(0,n.jsx)(`path`,{d:`M10.6668 17.3333L14.6668 20L21.3335 12`,stroke:`#039855`,strokeWidth:1.6875,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,n.jsx)(`defs`,{children:(0,n.jsx)(`clipPath`,{id:`clip0_15_20`,children:(0,n.jsx)(`path`,{d:`M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z`,fill:`white`})})})]})})),fx=f({default:()=>px}),px,mx=u((()=>{px=e=>(0,n.jsxs)(`svg`,{width:32,height:32,viewBox:`0 0 32 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsxs)(`g`,{clipPath:`url(#clip0_17_99)`,children:[(0,n.jsx)(`rect`,{width:32,height:32,rx:4,fill:`#FFFAEB`}),(0,n.jsx)(`path`,{d:`M16.0002 17.3333V13.3333M16.0002 20V20.0067M23.0353 19.3333L17.942 10.456C17.0833 8.95867 14.9167 8.95867 14.058 10.456L8.96533 19.3333C8.11266 20.8187 9.18933 22.6667 10.9073 22.6667H21.0933C22.8107 22.6667 23.8873 20.8187 23.0353 19.3333Z`,stroke:`#CFAA25`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,n.jsx)(`defs`,{children:(0,n.jsx)(`clipPath`,{id:`clip0_17_99`,children:(0,n.jsx)(`path`,{d:`M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z`,fill:`white`})})})]})})),hx=f({default:()=>gx}),gx,_x=u((()=>{gx=e=>(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,n.jsx)(`path`,{d:`M13.1191 5.61336C13.0508 5.11856 12.6279 4.75 12.1285 4.75H11.8715C11.3721 4.75 10.9492 5.11856 10.8809 5.61336L10.7938 6.24511C10.7382 6.64815 10.4403 6.96897 10.0622 7.11922C10.006 7.14156 9.95021 7.16484 9.89497 7.18905C9.52217 7.3524 9.08438 7.3384 8.75876 7.09419L8.45119 6.86351C8.05307 6.56492 7.49597 6.60451 7.14408 6.9564L6.95641 7.14408C6.60452 7.49597 6.56492 8.05306 6.86351 8.45118L7.09419 8.75876C7.33841 9.08437 7.3524 9.52216 7.18905 9.89497C7.16484 9.95021 7.14156 10.006 7.11922 10.0622C6.96897 10.4403 6.64815 10.7382 6.24511 10.7938L5.61336 10.8809C5.11856 10.9492 4.75 11.372 4.75 11.8715V12.1285C4.75 12.6279 5.11856 13.0508 5.61336 13.1191L6.24511 13.2062C6.64815 13.2618 6.96897 13.5597 7.11922 13.9378C7.14156 13.994 7.16484 14.0498 7.18905 14.105C7.3524 14.4778 7.3384 14.9156 7.09419 15.2412L6.86351 15.5488C6.56492 15.9469 6.60451 16.504 6.9564 16.8559L7.14408 17.0436C7.49597 17.3955 8.05306 17.4351 8.45118 17.1365L8.75876 16.9058C9.08437 16.6616 9.52216 16.6476 9.89496 16.811C9.95021 16.8352 10.006 16.8584 10.0622 16.8808C10.4403 17.031 10.7382 17.3519 10.7938 17.7549L10.8809 18.3866C10.9492 18.8814 11.3721 19.25 11.8715 19.25H12.1285C12.6279 19.25 13.0508 18.8814 13.1191 18.3866L13.2062 17.7549C13.2618 17.3519 13.5597 17.031 13.9378 16.8808C13.994 16.8584 14.0498 16.8352 14.105 16.8109C14.4778 16.6476 14.9156 16.6616 15.2412 16.9058L15.5488 17.1365C15.9469 17.4351 16.504 17.3955 16.8559 17.0436L17.0436 16.8559C17.3955 16.504 17.4351 15.9469 17.1365 15.5488L16.9058 15.2412C16.6616 14.9156 16.6476 14.4778 16.811 14.105C16.8352 14.0498 16.8584 13.994 16.8808 13.9378C17.031 13.5597 17.3519 13.2618 17.7549 13.2062L18.3866 13.1191C18.8814 13.0508 19.25 12.6279 19.25 12.1285V11.8715C19.25 11.3721 18.8814 10.9492 18.3866 10.8809L17.7549 10.7938C17.3519 10.7382 17.031 10.4403 16.8808 10.0622C16.8584 10.006 16.8352 9.95021 16.8109 9.89496C16.6476 9.52216 16.6616 9.08437 16.9058 8.75875L17.1365 8.4512C17.4351 8.05308 17.3955 7.49599 17.0436 7.1441L16.8559 6.95642C16.504 6.60453 15.9469 6.56494 15.5488 6.86353L15.2412 7.09419C14.9156 7.33841 14.4778 7.3524 14.105 7.18905C14.0498 7.16484 13.994 7.14156 13.9378 7.11922C13.5597 6.96897 13.2618 6.64815 13.2062 6.24511L13.1191 5.61336Z`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`path`,{d:`M13.25 12C13.25 12.6904 12.6904 13.25 12 13.25C11.3096 13.25 10.75 12.6904 10.75 12C10.75 11.3096 11.3096 10.75 12 10.75C12.6904 10.75 13.25 11.3096 13.25 12Z`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`})]})})),vx=f({default:()=>yx}),yx,bx=u((()=>{yx=e=>(0,n.jsxs)(`svg`,{width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M18.25 7.75H5.75V16.75L4.75 19.25H19.25L18.25 16.75V7.75Z`}),(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M18.25 7.75L16.25 4.75H7.75L5.75 7.75`}),(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M9.75 10.75V11.75C9.75 12.9926 10.7574 14 12 14V14C13.2426 14 14.25 12.9926 14.25 11.75V10.75`})]})})),xx=f({default:()=>Sx}),Sx,Cx=u((()=>{Sx=e=>(0,n.jsx)(`svg`,{width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.5,d:`M12 4.75L13.75 10.25H19.25L14.75 13.75L16.25 19.25L12 15.75L7.75 19.25L9.25 13.75L4.75 10.25H10.25L12 4.75Z`})})})),wx=f({default:()=>Tx}),Tx,Ex=u((()=>{Tx=e=>(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,n.jsx)(`path`,{d:`M15.25 8C15.25 9.79493 13.7949 11.25 12 11.25C10.205 11.25 8.74997 9.79493 8.74997 8C8.74997 6.20507 10.205 4.75 12 4.75C13.7949 4.75 15.25 6.20507 15.25 8Z`}),(0,n.jsx)(`path`,{d:`M6.84748 19.25H17.1525C18.2944 19.25 19.174 18.2681 18.6407 17.2584C17.8563 15.7731 16.068 14 12 14C7.93198 14 6.14364 15.7731 5.35921 17.2584C4.82594 18.2681 5.70556 19.25 6.84748 19.25Z`})]})})),Dx=({icon:e=`user`,size:t=`md`,variant:r=`placeholder`,outline:i=!0})=>{if(h.default.isValidElement(e))return`span`;let a=Ox(e);return a?(0,n.jsx)(bb,{svgComponent:a,className:Eb({variant:r,size:t,outline:i})}):null};function Ox(e){let[t,n]=(0,h.useState)(null),r=async()=>{try{let t=(await yb(Object.assign({"../../assets/svg/calendar.svg":()=>Promise.resolve().then(()=>(kb(),Db)),"../../assets/svg/camera-switch.svg":()=>Promise.resolve().then(()=>(Mb(),Ab)),"../../assets/svg/caret-left.svg":()=>Promise.resolve().then(()=>(Fb(),Nb)),"../../assets/svg/close.svg":()=>Promise.resolve().then(()=>(Rb(),Ib)),"../../assets/svg/crossBlack.svg":()=>Promise.resolve().then(()=>(Vb(),zb)),"../../assets/svg/dollar.svg":()=>Promise.resolve().then(()=>(Wb(),Hb)),"../../assets/svg/edit.svg":()=>Promise.resolve().then(()=>(qb(),Gb)),"../../assets/svg/home.svg":()=>Promise.resolve().then(()=>(Xb(),Jb)),"../../assets/svg/information.svg":()=>Promise.resolve().then(()=>($b(),Zb)),"../../assets/svg/leat_logo.svg":()=>Promise.resolve().then(()=>(nx(),ex)),"../../assets/svg/mail.svg":()=>Promise.resolve().then(()=>(ax(),rx)),"../../assets/svg/notificationErrorV2.svg":()=>Promise.resolve().then(()=>(cx(),ox)),"../../assets/svg/notificationSuccessV2.svg":()=>Promise.resolve().then(()=>(dx(),lx)),"../../assets/svg/notificationWarningV2.svg":()=>Promise.resolve().then(()=>(mx(),fx)),"../../assets/svg/settings.svg":()=>Promise.resolve().then(()=>(_x(),hx)),"../../assets/svg/shopping-bag.svg":()=>Promise.resolve().then(()=>(bx(),vx)),"../../assets/svg/star.svg":()=>Promise.resolve().then(()=>(Cx(),xx)),"../../assets/svg/user.svg":()=>Promise.resolve().then(()=>(Ex(),wx))}),`../../assets/svg/${e}.svg?react`,5)).default;n(()=>t)}catch(t){console.error(`Failed to import icon: ${e}`,t),n(null)}};return(0,h.useEffect)(()=>{r()},[e]),t}var kx=Tb(`group inline-flex shrink-0 select-none items-center justify-center rounded-lg font-medium antialiased transition-colors duration-100 hover:shadow-none focus:outline-0 focus:outline-core-primary-500 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 disabled:pointer-events-none`,{variants:{size:{sm:`h-8 gap-1 px-2 py-1 text-xs leading-4`,md:`h-10 gap-1 px-3 py-2 text-sm leading-5`,lg:`h-12 gap-1 px-3 py-3 text-base leading-6`},variant:{primary:`bg-core-primary-500 text-core-white-900 outline-primary hover:bg-core-primary-600 disabled:bg-core-primary-disabled`,secondary:`box-border border border-core-gray-200 bg-core-white-900 shadow-xs hover:bg-core-gray-50 disabled:opacity-30`,destructive:`bg-core-red-500 text-core-white-900 hover:bg-core-red-600 focus:outline-core-red-500 disabled:bg-core-red-200`,"destructive-outline":`box-border border border-core-red-200 text-core-red-700 shadow-xs hover:bg-core-red-50 focus:outline-core-red-500 disabled:opacity-40`,"link-gray":`bg-transparent underline-offset-2 hover:bg-surface hover:underline disabled:opacity-30`}},defaultVariants:{variant:`primary`,size:`md`}}),Ax={primary:`primary`,secondary:`secondary`,destructive:`primary`,"destructive-outline":`destructive`,"link-gray":`secondary`},jx={sm:`xs`,md:`sm`,lg:`md`},Mx=h.default.forwardRef(({after:e,asChild:t=!1,before:r,children:i,className:a,variant:o=`primary`,size:s=`md`,pending:c=!1,disabled:l=!1,onClick:u,...d},f)=>{let p=t?pb:`button`,m=e=>(0,Jn.default)(`group-hover:opacity-70`,e.props?.className),h=e=>e.props?.icon??`user`;return(0,n.jsxs)(p,{className:(0,Jn.default)(kx({variant:o,size:s}),a),disabled:l||c,onClick:u,ref:f,...d,children:[(0,n.jsxs)(`span`,{className:`flex items-center gap-1 ${c&&`opacity-0`}`,children:[r&&(0,n.jsx)(Dx,{className:m(r),icon:h(r),variant:Ax[o],size:jx[s]}),i,e&&(0,n.jsx)(Dx,{className:(0,Jn.default)(m(e),`${c&&`opacity-0`}`),icon:h(e),variant:Ax[o],size:jx[s]})]}),c&&(0,n.jsx)(Yn,{className:`absolute`})]})});Mx.displayName=`Button`;function Nx(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Px(e={}){let{initialEntries:t=[`/`],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((e,t)=>u(e,typeof e==`string`?null:e.state,t===0?`default`:void 0,typeof e==`string`?void 0:e.mask));let a=c(n??i.length-1),o=`POP`,s=null;function c(e){return Math.min(Math.max(e,0),i.length-1)}function l(){return i[a]}function u(e,t=null,n,r){let a=Rx(i?l().pathname:`/`,e,t,n,r);return Ix(a.pathname.charAt(0)===`/`,`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),a}function d(e){return typeof e==`string`?e:zx(e)}return{get index(){return a},get action(){return o},get location(){return l()},createHref:d,createURL(e){return new URL(d(e),`http://localhost`)},encodeLocation(e){let t=typeof e==`string`?Bx(e):e;return{pathname:t.pathname||``,search:t.search||``,hash:t.hash||``}},push(e,t){o=`PUSH`;let n=Nx(e)?e:u(e,t);a+=1,i.splice(a,i.length,n),r&&s&&s({action:o,location:n,delta:1})},replace(e,t){o=`REPLACE`;let n=Nx(e)?e:u(e,t);i[a]=n,r&&s&&s({action:o,location:n,delta:0})},go(e){o=`POP`;let t=c(a+e),n=i[t];a=t,s&&s({action:o,location:n,delta:e})},listen(e){return s=e,()=>{s=null}}}}function Fx(e,t){if(e===!1||e==null)throw Error(t)}function Ix(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Lx(){return Math.random().toString(36).substring(2,10)}function Rx(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Bx(t):t,state:n,key:t&&t.key||r||Lx(),mask:i}}function zx({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Bx(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Vx(e,t,n=`/`){return Hx(e,t,n,!1)}function Hx(e,t,n,r,i){let a=sS((typeof t==`string`?Bx(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Wx(e),s=null,c=oS(a);for(let e=0;s==null&&e<o.length;++e)s=rS(o[e],c,r);return s}function Ux(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function Wx(e){let t=Gx(e);return qx(t),t}function Gx(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;Fx(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=gS([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Fx(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Gx(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:tS(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Kx(e.path))a(e,t,!0,n)}),t}function Kx(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Kx(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function qx(e){e.sort((e,t)=>e.score===t.score?nS(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Jx=/^:[\w-]+$/,Yx=3,Xx=2,Zx=1,Qx=10,$x=-2,eS=e=>e===`*`;function tS(e,t){let n=e.split(`/`),r=n.length;return n.some(eS)&&(r+=$x),t&&(r+=Xx),n.filter(e=>!eS(e)).reduce((e,t)=>e+(Jx.test(t)?Yx:t===``?Zx:Qx),r)}function nS(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function rS(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=iS({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=iS({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:gS([a,u.pathname]),pathnameBase:vS(gS([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=gS([a,u.pathnameBase]))}return o}function iS(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=aS(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function aS(e,t=!1,n=!0){Ix(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function oS(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Ix(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function sS(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var cS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function lS(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Bx(e):e,a;return n?(n=hS(n),a=n.startsWith(`/`)?uS(n.substring(1),`/`):uS(n,t)):a=t,{pathname:a,search:yS(r),hash:bS(i)}}function uS(e,t){let n=_S(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function dS(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fS(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function pS(e){let t=fS(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function mS(e,t,n,r=!1){let i;typeof e==`string`?i=Bx(e):(i={...e},Fx(!i.pathname||!i.pathname.includes(`?`),dS(`?`,`pathname`,`search`,i)),Fx(!i.pathname||!i.pathname.includes(`#`),dS(`#`,`pathname`,`hash`,i)),Fx(!i.search||!i.search.includes(`#`),dS(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=lS(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var hS=e=>e.replace(/\/\/+/g,`/`),gS=e=>hS(e.join(`/`)),_S=e=>e.replace(/\/+$/,``),vS=e=>_S(e).replace(/^\/*/,`/`),yS=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,bS=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,xS=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function SS(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function CS(e){return gS(e.map(e=>e.route.path).filter(Boolean))||`/`}var wS=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function TS(e,t){let n=e;if(typeof n!=`string`||!cS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(wS)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=sS(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Ix(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var ES=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(ES);var DS=[`GET`,...ES];new Set(DS);var OS=h.createContext(null);OS.displayName=`DataRouter`;var kS=h.createContext(null);kS.displayName=`DataRouterState`;var AS=h.createContext(!1);function jS(){return h.useContext(AS)}var MS=h.createContext({isTransitioning:!1});MS.displayName=`ViewTransition`;var NS=h.createContext(new Map);NS.displayName=`Fetchers`;var PS=h.createContext(null);PS.displayName=`Await`;var FS=h.createContext(null);FS.displayName=`Navigation`;var IS=h.createContext(null);IS.displayName=`Location`;var LS=h.createContext({outlet:null,matches:[],isDataRoute:!1});LS.displayName=`Route`;var RS=h.createContext(null);RS.displayName=`RouteError`;var zS=`REACT_ROUTER_ERROR`,BS=`REDIRECT`,VS=`ROUTE_ERROR_RESPONSE`;function HS(e){if(e.startsWith(`${zS}:${BS}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function US(e){if(e.startsWith(`${zS}:${VS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new xS(t.status,t.statusText,t.data)}catch{}}function WS(e,{relative:t}={}){Fx(GS(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=h.useContext(FS),{hash:i,pathname:a,search:o}=tC(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:gS([n,a])),r.createHref({pathname:s,search:o,hash:i})}function GS(){return h.useContext(IS)!=null}function KS(){return Fx(GS(),`useLocation() may be used only in the context of a <Router> component.`),h.useContext(IS).location}function qS(){return h.useContext(IS).navigationType}var JS=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function YS(e){h.useContext(FS).static||h.useLayoutEffect(e)}function XS(){let{isDataRoute:e}=h.useContext(LS);return e?bC():ZS()}function ZS(){Fx(GS(),`useNavigate() may be used only in the context of a <Router> component.`);let e=h.useContext(OS),{basename:t,navigator:n}=h.useContext(FS),{matches:r}=h.useContext(LS),{pathname:i}=KS(),a=JSON.stringify(pS(r)),o=h.useRef(!1);return YS(()=>{o.current=!0}),h.useCallback((r,s={})=>{if(Ix(o.current,JS),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=mS(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:gS([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var QS=h.createContext(null);function $S(e){let t=h.useContext(LS).outlet;return h.useMemo(()=>t&&h.createElement(QS.Provider,{value:e},t),[t,e])}function eC(){let{matches:e}=h.useContext(LS);return e[e.length-1]?.params??{}}function tC(e,{relative:t}={}){let{matches:n}=h.useContext(LS),{pathname:r}=KS(),i=JSON.stringify(pS(n));return h.useMemo(()=>mS(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function nC(e,t){return rC(e,t)}function rC(e,t,n){Fx(GS(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=h.useContext(FS),{matches:i}=h.useContext(LS),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;SC(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
22
22
|
|
|
23
|
-
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=KS(),d;if(t){let e=typeof t==`string`?Bx(t):t;Fx(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Vx(e,{pathname:p});Ix(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Ix(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=uC(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:gS([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:gS([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?h.createElement(IS.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},g):g}function iC(){let e=yC(),t=SS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=h.createElement(h.Fragment,null,h.createElement(`p`,null,`💿 Hey developer 👋`),h.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,h.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,h.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),h.createElement(h.Fragment,null,h.createElement(`h2`,null,`Unexpected Application Error!`),h.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?h.createElement(`pre`,{style:i},n):null,o)}var aC=h.createElement(iC,null),oC=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=US(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:h.createElement(LS.Provider,{value:this.props.routeContext},h.createElement(RS.Provider,{value:e,children:this.props.component}));return this.context?h.createElement(cC,{error:e},t):t}};oC.contextType=AS;var sC=new WeakMap;function cC({children:e,error:t}){let{basename:n}=h.useContext(FS);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=HS(t.digest);if(e){let r=sC.get(t);if(r)throw r;let i=TS(e.location,n);if(wS&&!sC.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw sC.set(t,n),n}return h.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function lC({routeContext:e,match:t,children:n}){let r=h.useContext(OS);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(LS.Provider,{value:e},n)}function uC(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Fx(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:CS(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||aC,o&&(s<0&&c===0?(SC(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?p:n.route.Component?h.createElement(n.route.Component,null):n.route.element?n.route.element:e,h.createElement(lC,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?h.createElement(oC,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):g()},null)}function dC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fC(e){let t=h.useContext(OS);return Fx(t,dC(e)),t}function pC(e){let t=h.useContext(kS);return Fx(t,dC(e)),t}function mC(e){let t=h.useContext(LS);return Fx(t,dC(e)),t}function hC(e){let t=mC(e),n=t.matches[t.matches.length-1];return Fx(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function gC(){return hC(`useRouteId`)}function _C(){let e=pC(`useNavigation`);return h.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function vC(){let{matches:e,loaderData:t}=pC(`useMatches`);return h.useMemo(()=>e.map(e=>Ux(e,t)),[e,t])}function yC(){let e=h.useContext(RS),t=pC(`useRouteError`),n=hC(`useRouteError`);return e===void 0?t.errors?.[n]:e}function bC(){let{router:e}=fC(`useNavigate`),t=hC(`useNavigate`),n=h.useRef(!1);return YS(()=>{n.current=!0}),h.useCallback(async(r,i={})=>{Ix(n.current,JS),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var xC={};function SC(e,t,n){!t&&!xC[e]&&(xC[e]=!0,Ix(!1,n))}h.memo(CC);function CC({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return rC(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function wC({basename:e,children:t,initialEntries:n,initialIndex:r,useTransitions:i}){let a=h.useRef();a.current??=Px({initialEntries:n,initialIndex:r,v5Compat:!0});let o=a.current,[s,c]=h.useState({action:o.action,location:o.location}),l=h.useCallback(e=>{i===!1?c(e):h.startTransition(()=>c(e))},[i]);return h.useLayoutEffect(()=>o.listen(l),[o,l]),h.createElement(OC,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,useTransitions:i})}function TC({to:e,replace:t,state:n,relative:r}){Fx(GS(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=h.useContext(FS);Ix(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=h.useContext(LS),{pathname:o}=KS(),s=XS(),c=mS(e,pS(a),o,r===`path`),l=JSON.stringify(c);return h.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function EC(e){return $S(e.context)}function DC(e){Fx(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function OC({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){Fx(!GS(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=h.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Bx(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,g=h.useMemo(()=>{let e=sS(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Ix(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:h.createElement(FS.Provider,{value:c},h.createElement(IS.Provider,{children:t,value:g}))}function kC({children:e,location:t}){return nC(AC(e),t)}h.Component;function AC(e,t=[]){let n=[];return h.Children.forEach(e,(e,r)=>{if(!h.isValidElement(e))return;let i=[...t,r];if(e.type===h.Fragment){n.push.apply(n,AC(e.props.children,i));return}Fx(e.type===DC,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Fx(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=AC(e.props.children,i)),n.push(a)}),n}var jC=`get`,MC=`application/x-www-form-urlencoded`;function NC(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function PC(e){return NC(e)&&e.tagName.toLowerCase()===`button`}function FC(e){return NC(e)&&e.tagName.toLowerCase()===`form`}function IC(e){return NC(e)&&e.tagName.toLowerCase()===`input`}function LC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function RC(e,t){return e.button===0&&(!t||t===`_self`)&&!LC(e)}var zC=null;function BC(){if(zC===null)try{new FormData(document.createElement(`form`),0),zC=!1}catch{zC=!0}return zC}var VC=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function HC(e){return e!=null&&!VC.has(e)?(Ix(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${MC}"`),null):e}function UC(e,t){let n,r,i,a,o;if(FC(e)){let o=e.getAttribute(`action`);r=o?sS(o,t):null,n=e.getAttribute(`method`)||jC,i=HC(e.getAttribute(`enctype`))||MC,a=new FormData(e)}else if(PC(e)||IC(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?sS(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||jC,i=HC(e.getAttribute(`formenctype`))||HC(o.getAttribute(`enctype`))||MC,a=new FormData(o,e),!BC()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(NC(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=jC,r=null,i=MC,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var WC={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},GC=/[&><\u2028\u2029]/g;function KC(e){return e.replace(GC,e=>WC[e])}function qC(e,t){if(e===!1||e==null)throw Error(t)}function JC(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&sS(i.pathname,t)===`/`?i.pathname=`${_S(t)}/_root.${r}`:i.pathname=`${_S(i.pathname)}.${r}`,i}async function YC(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function XC(e){return e!=null&&typeof e.page==`string`}function ZC(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function QC(e,t,n){return rw((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await YC(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ZC).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function $C(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function ew(e,t,{includeHydrateFallback:n}={}){return tw(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function tw(e){return[...new Set(e)]}function nw(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function rw(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!XC(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(nw(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function iw(){let e=h.useContext(OS);return qC(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function aw(){let e=h.useContext(kS);return qC(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ow=h.createContext(void 0);ow.displayName=`FrameworkContext`;function sw(){let e=h.useContext(ow);return qC(e,`You must render this element inside a <HydratedRouter> element`),e}function cw(e,t){let n=h.useContext(ow),[r,i]=h.useState(!1),[a,o]=h.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=h.useRef(null);h.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),h.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:lw(s,p),onBlur:lw(c,m),onMouseEnter:lw(l,p),onMouseLeave:lw(u,m),onTouchStart:lw(d,p)}]:[a,f,{}]:[!1,f,{}]}function lw(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function uw({page:e,...t}){let n=jS(),{router:r}=iw(),i=h.useMemo(()=>Vx(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?h.createElement(fw,{page:e,matches:i,...t}):h.createElement(pw,{page:e,matches:i,...t}):null}function dw(e){let{manifest:t,routeModules:n}=sw(),[r,i]=h.useState([]);return h.useEffect(()=>{let r=!1;return QC(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function fw({page:e,matches:t,...n}){let r=KS(),{future:i}=sw(),{basename:a}=iw(),o=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=JC(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return h.createElement(h.Fragment,null,o.map(e=>h.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function pw({page:e,matches:t,...n}){let r=KS(),{future:i,manifest:a,routeModules:o}=sw(),{basename:s}=iw(),{loaderData:c,matches:l}=aw(),u=h.useMemo(()=>$C(e,t,l,a,r,`data`),[e,t,l,a,r]),d=h.useMemo(()=>$C(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=JC(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=h.useMemo(()=>ew(d,a),[d,a]),m=dw(d);return h.createElement(h.Fragment,null,f.map(e=>h.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>h.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>h.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function mw(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}h.Component;var hw=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{hw&&(window.__reactRouterVersion=`7.15.1`)}catch{}function gw({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=h.useState({action:n.action,location:n.location}),o=h.useCallback(e=>{r===!1?a(e):h.startTransition(()=>a(e))},[r]);return h.useLayoutEffect(()=>n.listen(o),[n,o]),h.createElement(OC,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}gw.displayName=`unstable_HistoryRouter`;var _w=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vw=h.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:g,navigator:_,useTransitions:v}=h.useContext(FS),y=typeof l==`string`&&_w.test(l),b=TS(l,g);l=b.to;let x=WS(l,{relative:r}),S=KS(),C=null;if(o){let e=mS(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:gS([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=cw(n,p),D=Tw(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=h.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:mw(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?h.createElement(h.Fragment,null,A,h.createElement(uw,{page:x})):A});vw.displayName=`Link`;var yw=h.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=tC(a,{relative:c.relative}),d=KS(),f=h.useContext(kS),{navigator:p,basename:m}=h.useContext(FS),g=f!=null&&Fw(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&m&&(y=sS(y,m)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return h.createElement(vw,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});yw.displayName=`NavLink`;var bw=h.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=jC,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:g}=h.useContext(FS),_=Ow(),v=kw(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&_w.test(s);return h.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});g&&n!==!1?h.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});bw.displayName=`Form`;function xw({getKey:e,storageKey:t,...n}){let r=h.useContext(ow),{basename:i}=h.useContext(FS),a=KS(),o=vC();Nw({getKey:e,storageKey:t});let s=h.useMemo(()=>{if(!r||!e)return null;let t=Mw(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return h.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${KC(JSON.stringify(t||Aw))}, ${KC(JSON.stringify(s))})`}})}xw.displayName=`ScrollRestoration`;function Sw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cw(e){let t=h.useContext(OS);return Fx(t,Sw(e)),t}function ww(e){let t=h.useContext(kS);return Fx(t,Sw(e)),t}function Tw(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=XS(),d=KS(),f=tC(e,{relative:o});return h.useCallback(p=>{if(RC(p,t)){p.preventDefault();let t=n===void 0?zx(d)===zx(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?h.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Ew=0,Dw=()=>`__${String(++Ew)}__`;function Ow(){let{router:e}=Cw(`useSubmit`),{basename:t}=h.useContext(FS),n=gC(),r=e.fetch,i=e.navigate;return h.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=UC(e,t);a.navigate===!1?await r(a.fetcherKey||Dw(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function kw(e,{relative:t}={}){let{basename:n}=h.useContext(FS),r=h.useContext(LS);Fx(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...tC(e||`.`,{relative:t})},o=KS();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:gS([n,a.pathname])),zx(a)}var Aw=`react-router-scroll-positions`,jw={};function Mw(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:sS(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Nw({getKey:e,storageKey:t}={}){let{router:n}=Cw(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=ww(`useScrollRestoration`),{basename:a}=h.useContext(FS),o=KS(),s=vC(),c=_C();h.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Pw(h.useCallback(()=>{if(c.state===`idle`){let t=Mw(o,s,a,e);jw[t]=window.scrollY}try{sessionStorage.setItem(t||Aw,JSON.stringify(jw))}catch(e){Ix(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(h.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Aw);e&&(jw=JSON.parse(e))}catch{}},[t]),h.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(jw,()=>window.scrollY,e?(t,n)=>Mw(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),h.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{Ix(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Pw(e,t){let{capture:n}=t||{};h.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Fw(e,{relative:t}={}){let n=h.useContext(MS);Fx(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Cw(`useViewTransitionState`),i=tC(e,{relative:t});if(!n.isTransitioning)return!1;let a=sS(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=sS(n.nextLocation.pathname,r)||n.nextLocation.pathname;return iS(i.pathname,o)!=null||iS(i.pathname,a)!=null}var Iw=({className:e,children:t,path:r,to:i,variant:a=`primary`,size:o=`md`,...s})=>(0,n.jsx)(yw,{className:(0,Jn.default)(kx({variant:a,size:o}),e),to:i??r,...s,children:(0,n.jsx)(`span`,{className:`flex items-center gap-1`,children:t})});Iw.displayName=`NavLinkButton`;function Lw(){let{t:e}=U(),[t,r]=(0,h.useState)(!1);return(0,n.jsxs)(Zn,{accent:`red`,children:[(0,n.jsxs)(`div`,{className:`space-y-3`,children:[(0,n.jsx)(`p`,{className:`font-semibold text-core-red-500 text-sm uppercase tracking-[0.2em]`,children:e(`error`,{defaultValue:`Error`})}),(0,n.jsx)(`h1`,{className:`font-semibold text-3xl text-core-gray-900 tracking-tight sm:text-5xl`,children:`Oops!`}),(0,n.jsx)(`p`,{className:`mx-auto max-w-xl text-base text-core-gray-500 leading-7 sm:text-lg`,children:e(`sorrySomethingWentWrong`)})]}),(0,n.jsx)(Mx,{onClick:()=>{r(!0),window.location.replace(`/`)},pending:t,children:e(`back`)})]})}var Rw=class extends h.Component{constructor(e){super(e),this.state={hasError:!1,scope:void 0}}componentDidMount(){let e=new Mh({dsn:`https://5b16c396f6e8f6e4b0b87455bea7e96b@o80526.ingest.us.sentry.io/4507345428283392`,transport:bv,stackParser:Mv,integrations:[...vy({}).filter(e=>![`BrowserApiErrors`,`Breadcrumbs`,`GlobalHandlers`].includes(e.name)),ab({useEffect:h.useEffect,useLocation:KS,useNavigationType:qS,createRoutesFromChildren:AC,matchRoutes:Vx})]}),t=new Ic;t.setClient(e),e.init(),this.setState({...this.state,scope:t})}componentDidCatch(e,t){console.error(`ErrorBoundary: `,e,t),this.state.scope.captureException(e),this.setState({...this.state,hasError:!0})}render(){return this.state.hasError?(0,n.jsx)(Lw,{}):this.props.children}};function zw(){let{apiKey:e,host:t}=Wn(),n=(e,t={},n={})=>o(`GET`,e,t,n),r=(e,t={},n={})=>o(`POST`,e,t,n),i=(e,t={},n={})=>o(`PUT`,e,t,n),a=(e,t={})=>o(`DELETE`,e,t),o=(n,r,i={},a={})=>{let o=Hn.create({baseURL:`${t??`https://api.piggy.eu`}/api/v2/portal-sessions`,...a,headers:{Authorization:`Bearer ${e}`,...a.headers,"X-SDK-Version":`0.3.0-beta.11`}});return o.interceptors.response.use(void 0,Kn),o.request({method:n,url:r,params:n==`GET`?i:{},data:i})};return{get:n,post:r,put:i,destroy:a}}function Bw({children:e,id:t,className:r}){return(0,n.jsx)(`div`,{id:t,className:`flex h-full max-h-full flex-col bg-white md:h-fit md:rounded-lg md:border md:shadow-md ${r}`,children:e})}function Vw({children:e,className:t}){return(0,n.jsx)(`div`,{className:`grow overflow-y-auto px-6 py-4 ${t??``}`,children:e})}function Hw({children:e}){return(0,n.jsx)(`div`,{className:`border-t px-6 py-4`,children:e})}function Uw({children:e}){return(0,n.jsx)(`div`,{className:`border-b px-6 py-4`,children:e})}function Ww({children:e}){return(0,n.jsx)(`p`,{className:`text-gray-500 text-sm leading-5`,children:e})}function Gw({children:e}){return(0,n.jsx)(`h2`,{className:`font-semibold text-gray-900 text-lg leading-6`,children:e})}function Kw({onSubmit:e,children:t}){return(0,n.jsx)(`form`,{onSubmit:t=>{t.preventDefault(),e&&e(t)},children:t})}function qw({children:e}){return(0,n.jsx)(`div`,{className:`h-screen w-screen md:p-6`,children:(0,n.jsx)(`div`,{className:`flex h-full max-h-full items-center justify-center *:grow md:mx-auto md:max-w-[420px]`,children:e})})}var Jw=({children:e,className:t,description:r,disabled:i,required:a=!1,tooltip:o,htmlFor:s})=>!e&&!o&&!r?null:(0,n.jsx)(`label`,{htmlFor:s,className:`inline-flex shrink-0 items-center gap-1 text-core-gray-800 antialiased `,children:(0,n.jsxs)(`div`,{className:(0,Jn.default)(`inline-flex cursor-pointer items-center gap-1 text-sm font-medium leading-6`,t,i&&`pointer-events-none text-core-gray-300`),children:[e?(0,n.jsx)(`span`,{className:(0,Jn.default)(i&&`pointer-events-none text-core-gray-300`),children:e}):null,r?(0,n.jsx)(`span`,{className:(0,Jn.default)(`font-normal text-core-gray-500`,i&&`text-current`),children:r}):null,a?(0,n.jsx)(`span`,{className:`font-normal text-core-red-500`,children:`*`}):null]})}),Yw=({helperText:e,error:t,disabled:r})=>e?(0,n.jsx)(`span`,{className:(0,Jn.default)(`text-start text-sm leading-6 text-core-gray-500 antialiased `,t&&`text-core-red-500`,r&&`text-core-gray-300`),children:e}):null;Jw.displayName=`Label`,Yw.displayName=`HelperText`;var Xw=Object.assign(Jw,{Helper:Yw}),Zw=({id:e,defaultChecked:t=!1,disabled:r,onChange:i})=>{let a=r,[o,s]=h.default.useState(t);return(0,n.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center`,children:(0,n.jsx)(`input`,{className:(0,Jn.default)(`h-4 w-4 rounded-sm border border-core-gray-200 bg-core-white-900 text-core-primary-500 shadow-xs`,`hover:border-core-gray-300 hover:shadow-none`,`checked:bg-core-primary-500`,`focus:outline-0 focus:ring-core-primary-500 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2`,`disabled:border disabled:border-core-gray-200 disabled:bg-core-gray-50 disabled:shadow-none`,`disabled:checked:bg-core-gray-200`),id:e,type:`checkbox`,checked:o,onChange:e=>{a||s(!o),i?.(e.target.checked)},disabled:a})})},Qw=h.default.createContext(null);function $w(e=!1){let t=h.default.useContext(Qw);if(!t&&!e)throw Error(`Checkbox.Item must be used within a CheckboxGroup or CheckboxGroup.Root`);return t}var eT=h.default.forwardRef(({children:e,description:t,disabled:r,helperText:i,id:a,label:o,required:s,tooltip:c},l)=>{let u=h.default.useId(),d=a??u,f=o??t??c??i?(0,n.jsxs)(`div`,{className:`inline-flex flex-col`,children:[(0,n.jsx)(Xw,{className:`cursor-default`,description:t,required:s,tooltip:c,htmlFor:d,disabled:r,children:o}),(0,n.jsx)(Xw.Helper,{disabled:r,helperText:i})]}):null;return(0,n.jsx)(Qw.Provider,{value:{disabled:r},children:(0,n.jsxs)(`div`,{ref:l,"aria-describedby":i?`${d}__describer`:void 0,"aria-labelledby":o?`${d}__label`:void 0,className:`flex flex-col gap-4`,role:`group`,children:[o??i??t??c?(0,n.jsx)(`div`,{className:`flex flex-col`,children:f}):null,e?(0,n.jsx)(`div`,{className:(0,Jn.default)(`flex flex-col gap-2`),children:e}):null]})})});eT.displayName=`CheckboxGroup`,Object.assign(eT,{Item:({disabled:e,label:t,defaultChecked:r})=>{let{disabled:i}=$w()??{};return(0,n.jsx)(tT,{disabled:e??i,label:t,defaultChecked:r})}});var tT=({id:e,children:t,defaultChecked:r=!1,description:i,disabled:a,helperText:o,label:s,required:c=!1,tooltip:l,onChange:u})=>{let d=h.default.useId(),f=e??d,p=!!$w(!0),m=s??i??l??o?(0,n.jsxs)(`div`,{className:`inline-flex flex-col`,children:[(0,n.jsx)(Xw,{className:(0,Jn.default)(p&&`font-normal`),description:i,required:c,tooltip:l,htmlFor:f,disabled:a,children:s}),(0,n.jsx)(Xw.Helper,{disabled:a,helperText:o})]}):null;return(0,n.jsxs)(`div`,{className:`flex gap-3`,children:[(0,n.jsx)(Zw,{id:f,defaultChecked:r,disabled:a,onChange:u}),t||m]})};tT.displayName=`Checkbox`;var nT=({id:e,name:t,label:r,description:i,required:a,type:o=`text`,value:s,placeholder:c,disabled:l,error:u=!1,helperText:d=``,onChange:f,beforeIcon:p,afterIcon:m,autoFocus:g,onFocus:_,onBlur:v})=>{let[y,b]=(0,h.useState)(d),x=(0,h.useRef)(null),[S,C]=(0,h.useState)(!1),{open:w,close:T}=Po();(0,h.useEffect)(()=>()=>{T()},[]);let E=()=>{x.current&&b(x.current.validationMessage),C(!1),T(),v?.()},D=async e=>{C(!0),(async()=>w(e))().then(()=>x.current?.scrollIntoView({behavior:`smooth`,block:`center`})),_?.()},O=e=>{f?.(e)},k=h.default.useId(),A=e??k;return(0,n.jsxs)(`div`,{className:`flex flex-col gap-2 antialiased`,children:[(0,n.jsx)(Xw,{description:i,disabled:l,htmlFor:A,required:a,children:r}),(0,n.jsx)(`div`,{className:(0,Jn.default)(`box flex h-10 flex-start flex-col justify-center self-stretch rounded-sm border border-core-gray-200 shadow-xs`,l?`pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200`:`bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none`,S&&!u&&`border-core-primary-500 ring-1 ring-core-primary-500`,u&&`border-core-red-500`,u&&S&&`border-core-red-500 ring-1 ring-core-red-500`),children:(0,n.jsxs)(`div`,{className:`flex flex-row gap-2 self-stretch p-2`,children:[p&&(0,n.jsx)(Dx,{icon:p}),(0,n.jsx)(`input`,{type:o,id:A,name:t,className:`flex grow border-none bg-transparent p-0 text-core-gray-800 text-sm placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 disabled:placeholder:text-core-gray-300`,value:s,onChange:O,onBlur:E,ref:x,placeholder:c,onFocus:D,disabled:l,autoFocus:g}),m&&(0,n.jsx)(Dx,{icon:m})]})}),(0,n.jsx)(`div`,{className:`grid overflow-hidden transition-all duration-300 ease-out ${d||y?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`}`,children:(0,n.jsx)(`div`,{className:`overflow-hidden`,children:(0,n.jsx)(Xw.Helper,{error:u,helperText:d||y})})})]})};nT.displayName=`Input`;var rT=({id:e,name:t,label:r,required:i,description:a,value:o,placeholder:s,disabled:c,error:l=!1,helperText:u=``,autoFocus:d,onChange:f})=>{let[p,m]=(0,h.useState)(u),g=(0,h.useRef)(null),[_,v]=(0,h.useState)(!1),{open:y,close:b}=Po();(0,h.useEffect)(()=>()=>{b()},[]);let x=()=>{g.current&&m(g.current.validationMessage),v(!1),b()},S=async e=>{v(!0),(async()=>y(e))().then(()=>g.current?.scrollIntoView({behavior:`smooth`,block:`center`}))},C=e=>{f?.(e)},w=h.default.useId(),T=e??w;return(0,n.jsxs)(`div`,{className:`flex flex-col gap-2 antialiased`,children:[(0,n.jsx)(Xw,{description:a,disabled:c,htmlFor:T,required:i,children:r}),(0,n.jsx)(`div`,{className:(0,Jn.default)(`flex-start box relative flex h-10 flex-col justify-center self-stretch rounded-sm border border-core-gray-200 shadow-xs`,c?`pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200`:` bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none `,_&&!l&&`border-core-primary-500 ring-1 ring-core-primary-500`,l&&`border-core-red-500`,l&&_&&`border-core-red-500 ring-1 ring-core-red-500`),children:(0,n.jsxs)(`div`,{className:`flex flex-row gap-2 self-stretch p-2`,children:[(0,n.jsx)(Dx,{icon:`mail`}),(0,n.jsx)(`input`,{type:`email`,id:T,name:t,className:`flex grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 disabled:placeholder:text-core-gray-300`,value:o,onChange:C,onBlur:x,ref:g,placeholder:s,onFocus:S,disabled:c,autoFocus:d})]})}),(0,n.jsx)(`div`,{className:`transition-grid-rows grid overflow-hidden duration-300 ease-out ${u||p?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`}`,children:(0,n.jsx)(`div`,{className:`overflow-hidden`,children:(0,n.jsx)(Xw.Helper,{error:l,helperText:u||p})})})]})};rT.displayName=`InputEmail`;var iT=({id:e,name:t,label:r,required:i,description:a,placeholder:o,value:s,disabled:c,error:l=!1,helperText:u,onChange:d,type:f=`date`})=>{let[p,m]=(0,h.useState)(!1),g=h.default.useId(),_=e??g;return(0,n.jsxs)(`div`,{className:`flex flex-col gap-2 antialiased`,children:[(0,n.jsx)(Xw,{description:a,disabled:c,htmlFor:_,required:i,children:r}),(0,n.jsx)(`div`,{className:(0,Jn.default)(`flex-start box relative flex h-10 flex-col justify-center self-stretch rounded-sm border border-core-gray-200 shadow-xs ring-core-primary-500 `,c?`pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200`:` bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none `,p&&!l&&`border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500`,l&&`border-core-red-500`,l&&p&&`border-core-red-500 ring-1 ring-core-red-500`),children:(0,n.jsxs)(`div`,{className:`flex w-full flex-row gap-2 self-stretch p-2`,children:[(0,n.jsx)(`input`,{type:f,id:_,name:t,value:s,max:`2200-01-01`,className:`flex grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 disabled:placeholder:text-core-gray-300`,placeholder:o,onChange:d,onFocus:()=>m(!0),onBlur:()=>m(!1),disabled:c}),(0,n.jsx)(Dx,{icon:`calendar`})]})}),(0,n.jsx)(`div`,{className:`grid overflow-hidden transition-all duration-300 ease-out ${u?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-100`}`,children:(0,n.jsx)(`div`,{className:`overflow-hidden`,children:(0,n.jsx)(Xw.Helper,{error:l,helperText:u})})})]})};iT.displayName=`Input`;function aT(){let{t:e}=U(),{successToast:t}=ca(),{portalSession:n}=H(),r=zw();return{findOrCreateContact:async({email:i,createIfNotFound:a})=>(await r.post(`${n.uuid}/contacts`,{email:i,create_if_not_found:a}).then(n=>(n.data.data.was_created&&t(e(`contactHasBeenCreated`)),n))).data.data}}function oT(){let{t:e}=U(),{successToast:t}=ca(),{portalSession:n}=H(),{onContactLink:r}=wo(),i=zw();return{linkContactToSession:async a=>{await i.post(`${n.uuid}/link-contact/${a.id}`).then(n=>(n.data.data.was_updated&&(t(e(`contactHasBeenLinkedToSession`)),r?.(a)),n))}}}function sT({onCancel:e,onSuccess:t}){let{t:r}=U(),{errorToast:i}=ca(),[a,o]=(0,h.useState)(!1),{portalSession:s}=H(),{findOrCreateContact:c}=aT(),{linkContactToSession:l}=oT(),[u,d]=(0,h.useState)(!0),[f,p]=(0,h.useState)(``);return(0,n.jsx)(qw,{children:(0,n.jsxs)(Bw,{id:Fo,children:[(0,n.jsxs)(Uw,{children:[(0,n.jsx)(Gw,{children:r(`authenticateViaEmail`)}),(0,n.jsx)(Ww,{children:`Type: ${s.type}`})]}),(0,n.jsxs)(Kw,{onSubmit:async()=>{o(!0);try{await l(await c({email:f,createIfNotFound:u})),await t()}catch(e){i(e)}finally{o(!1)}},children:[(0,n.jsxs)(Vw,{children:[(0,n.jsx)(nT,{value:f,placeholder:`john.doe@example.com`,label:r(`emailAddress`),onChange:e=>p(e.target.value),beforeIcon:`mail`}),(0,n.jsx)(tT,{required:!0,label:r(`createContactIfNotFound`),defaultChecked:u,onChange:e=>d(e)})]}),(0,n.jsx)(Hw,{children:(0,n.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,n.jsx)(Mx,{type:`submit`,className:`w-full`,pending:a,disabled:!f,children:r(`continue`)}),(0,n.jsx)(Mx,{className:`w-full`,variant:`secondary`,onClick:e,children:r(`back`)})]})})]})]})})}function cT(e){let t=zw(),{errorToast:n}=ca(),{data:r,error:i,isValidating:a,mutate:o}=bo((0,h.useMemo)(()=>e.url?e.params?[e.url,JSON.stringify(e.params)]:[e.url]:null,[e.url,JSON.stringify(e.params)]),([n,r])=>r?t.get(n,e.params):t.get(n),{shouldRetryOnError:!1,revalidateOnFocus:e.revalidateOnFocus,revalidateOnMount:e.revalidateOnMount,refreshInterval:e.refreshInterval});return(0,h.useEffect)(()=>{r&&e.dataSetter(r.data.data,r.data.meta)},[r]),(0,h.useEffect)(()=>{i&&n(i)},[i]),{data:r,pending:a,error:i,isValidating:a,mutate:o}}var lT={info:`border-core-primary-100 bg-core-primary-50 text-core-gray-700`,success:`border-core-green-100 bg-core-green-50 text-core-gray-700`,warning:`border-core-primary-100 bg-core-primary-50 text-core-gray-700`,error:`border-core-red-100 bg-core-red-50 text-core-gray-700`},uT={info:`discovery`,success:`discovery`,warning:`discovery`,error:`destructive`},dT={info:`information`,success:`notificationSuccessV2`,warning:`notificationWarningV2`,error:`notificationErrorV2`};function fT({children:e,className:t,icon:r,title:i,variant:a=`info`}){return(0,n.jsxs)(`div`,{className:(0,Jn.default)(`flex gap-3 rounded-xl border p-4 text-sm leading-5`,lT[a],t),children:[(0,n.jsx)(`div`,{className:`mt-0.5 shrink-0`,children:(0,n.jsx)(Dx,{icon:r??dT[a],size:`sm`,variant:uT[a]})}),(0,n.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[i?(0,n.jsx)(`div`,{className:`font-medium text-core-gray-900`,children:i}):null,(0,n.jsx)(`div`,{children:e})]})]})}function pT(){let{t:e}=U(),{successToast:t}=ca(),{portalSession:n}=H(),r=zw();return{linkIdentifierToContact:async(i,a)=>{await r.post(`${n.uuid}/contact-identifiers/${i.id}/link-to-contact/${a.id}`).then(n=>(t(e(`contactIdentifierWasLinked`)),n))}}}function mT(e){let{t}=U(),{id:r,onSuccess:i,onCancel:a}=e,{errorToast:o}=ca(),[s,c]=(0,h.useState)(!1),{portalSession:l}=H(),{findOrCreateContact:u}=aT(),{linkContactToSession:d}=oT(),{linkIdentifierToContact:f}=pT(),[p,m]=(0,h.useState)(!0),[g,_]=(0,h.useState)(null),[v,y]=(0,h.useState)(``);cT({url:`${l.uuid}/contact-identifiers/${r}`,dataSetter:_});let b=async e=>{c(!0);try{await d(e),await i()}catch(e){o(e)}finally{c(!1)}},x=async()=>{if(g){c(!0);try{let e=await u({email:v,createIfNotFound:p});await f(g,e),await d(e),await i()}catch(e){o(e)}finally{c(!1)}}},S=g?.contact;return(0,n.jsx)(qw,{children:(0,n.jsxs)(Bw,{children:[(0,n.jsxs)(Uw,{children:[(0,n.jsx)(Gw,{children:t(`linkIdentifier`)}),(0,n.jsx)(Ww,{children:g?.value})]}),(0,n.jsx)(Vw,{children:S?(0,n.jsx)(fT,{variant:`success`,children:t(`thisIdentifierIsLinkedToContact`,{contact:g.contact.email})}):(0,n.jsxs)(`div`,{children:[(0,n.jsx)(fT,{children:`This identifier is not linked to a contact`}),(0,n.jsx)(nT,{value:v,placeholder:`john.doe@example.com`,label:t(`emailAddress`),onChange:e=>y(e.target.value),beforeIcon:`mail`}),(0,n.jsx)(tT,{required:!0,label:t(`createContactIfNotFound`),defaultChecked:p,onChange:e=>m(e)})]})}),(0,n.jsx)(Hw,{children:(0,n.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[S?(0,n.jsx)(Mx,{className:`w-full`,onClick:()=>b(S),pending:s,children:t(`continue`)}):(0,n.jsx)(Mx,{className:`w-full`,onClick:x,pending:s,disabled:!v,children:t(p?`createContactAndLink`:`findContactAndLink`)}),(0,n.jsx)(Mx,{type:`submit`,className:`w-full`,variant:`secondary`,pending:s,onClick:a,children:t(`cancel`)})]})})]})})}var hT=typeof window<`u`?h.useLayoutEffect:()=>{},gT=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight],_T=()=>{let[e,t]=(0,h.useState)(),n=(0,h.useCallback)(()=>{let e=gT();t(t=>t&&t[0]===e[0]&&t[1]===e[1]?t:e)},[]);return hT(n,[n]),(0,h.useEffect)(()=>{let e=()=>{n(),setTimeout(n,1e3)};return window.addEventListener(`resize`,e),window.addEventListener(`orientationchange`,e),window.visualViewport?.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`orientationchange`,e),window.visualViewport?.removeEventListener(`resize`,e)}},[n]),e},vT=`data:image/svg+xml,%3csvg%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m21.25%207.5c.3796958%200%20.693491.28215388.7431534.64822944l.0068466.10177056v8.5c0%201.7330315-1.3564548%203.1492459-3.0655761%203.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555%200-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932%201.06066018%200%20.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734%200%201.6711923-.7071103%201.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815%202%202c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554%200%20.03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2%202c-.2928932.29289321-.767767.29289321-1.0606602%200-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734%200-1.67119234.70711027-1.7441988%201.60647279l-.0058012.14352721v8.5c0%20.4142136-.33578644.75-.75.75-.37969577%200-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146%201.35645477-3.14924593%203.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117%205.85294824c2.209139%200%204%201.790861%204%204s-1.790861%204-4%204-4-1.790861-4-4%201.790861-4%204-4zm0%201.5c-1.3807119%200-2.5%201.1192881-2.5%202.5s1.1192881%202.5%202.5%202.5%202.5-1.1192881%202.5-2.5-1.1192881-2.5-2.5-2.5z'%20fill='%23212121'/%3e%3c/svg%3e`,yT=f({createWorker:()=>bT}),bT,xT=u((()=>{bT=()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
|
|
23
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=KS(),d;if(t){let e=typeof t==`string`?Bx(t):t;Fx(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):Vx(e,{pathname:p});Ix(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Ix(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=uC(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:gS([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:gS([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?h.createElement(IS.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},g):g}function iC(){let e=yC(),t=SS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=h.createElement(h.Fragment,null,h.createElement(`p`,null,`💿 Hey developer 👋`),h.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,h.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,h.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),h.createElement(h.Fragment,null,h.createElement(`h2`,null,`Unexpected Application Error!`),h.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?h.createElement(`pre`,{style:i},n):null,o)}var aC=h.createElement(iC,null),oC=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=US(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:h.createElement(LS.Provider,{value:this.props.routeContext},h.createElement(RS.Provider,{value:e,children:this.props.component}));return this.context?h.createElement(cC,{error:e},t):t}};oC.contextType=AS;var sC=new WeakMap;function cC({children:e,error:t}){let{basename:n}=h.useContext(FS);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=HS(t.digest);if(e){let r=sC.get(t);if(r)throw r;let i=TS(e.location,n);if(wS&&!sC.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw sC.set(t,n),n}return h.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function lC({routeContext:e,match:t,children:n}){let r=h.useContext(OS);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(LS.Provider,{value:e},n)}function uC(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Fx(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:CS(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||aC,o&&(s<0&&c===0?(SC(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?p:n.route.Component?h.createElement(n.route.Component,null):n.route.element?n.route.element:e,h.createElement(lC,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?h.createElement(oC,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):g()},null)}function dC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fC(e){let t=h.useContext(OS);return Fx(t,dC(e)),t}function pC(e){let t=h.useContext(kS);return Fx(t,dC(e)),t}function mC(e){let t=h.useContext(LS);return Fx(t,dC(e)),t}function hC(e){let t=mC(e),n=t.matches[t.matches.length-1];return Fx(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function gC(){return hC(`useRouteId`)}function _C(){let e=pC(`useNavigation`);return h.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function vC(){let{matches:e,loaderData:t}=pC(`useMatches`);return h.useMemo(()=>e.map(e=>Ux(e,t)),[e,t])}function yC(){let e=h.useContext(RS),t=pC(`useRouteError`),n=hC(`useRouteError`);return e===void 0?t.errors?.[n]:e}function bC(){let{router:e}=fC(`useNavigate`),t=hC(`useNavigate`),n=h.useRef(!1);return YS(()=>{n.current=!0}),h.useCallback(async(r,i={})=>{Ix(n.current,JS),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var xC={};function SC(e,t,n){!t&&!xC[e]&&(xC[e]=!0,Ix(!1,n))}h.memo(CC);function CC({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return rC(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function wC({basename:e,children:t,initialEntries:n,initialIndex:r,useTransitions:i}){let a=h.useRef();a.current??=Px({initialEntries:n,initialIndex:r,v5Compat:!0});let o=a.current,[s,c]=h.useState({action:o.action,location:o.location}),l=h.useCallback(e=>{i===!1?c(e):h.startTransition(()=>c(e))},[i]);return h.useLayoutEffect(()=>o.listen(l),[o,l]),h.createElement(OC,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,useTransitions:i})}function TC({to:e,replace:t,state:n,relative:r}){Fx(GS(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=h.useContext(FS);Ix(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=h.useContext(LS),{pathname:o}=KS(),s=XS(),c=mS(e,pS(a),o,r===`path`),l=JSON.stringify(c);return h.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function EC(e){return $S(e.context)}function DC(e){Fx(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function OC({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){Fx(!GS(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=h.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Bx(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,g=h.useMemo(()=>{let e=sS(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Ix(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:h.createElement(FS.Provider,{value:c},h.createElement(IS.Provider,{children:t,value:g}))}function kC({children:e,location:t}){return nC(AC(e),t)}h.Component;function AC(e,t=[]){let n=[];return h.Children.forEach(e,(e,r)=>{if(!h.isValidElement(e))return;let i=[...t,r];if(e.type===h.Fragment){n.push.apply(n,AC(e.props.children,i));return}Fx(e.type===DC,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Fx(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=AC(e.props.children,i)),n.push(a)}),n}var jC=`get`,MC=`application/x-www-form-urlencoded`;function NC(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function PC(e){return NC(e)&&e.tagName.toLowerCase()===`button`}function FC(e){return NC(e)&&e.tagName.toLowerCase()===`form`}function IC(e){return NC(e)&&e.tagName.toLowerCase()===`input`}function LC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function RC(e,t){return e.button===0&&(!t||t===`_self`)&&!LC(e)}var zC=null;function BC(){if(zC===null)try{new FormData(document.createElement(`form`),0),zC=!1}catch{zC=!0}return zC}var VC=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function HC(e){return e!=null&&!VC.has(e)?(Ix(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${MC}"`),null):e}function UC(e,t){let n,r,i,a,o;if(FC(e)){let o=e.getAttribute(`action`);r=o?sS(o,t):null,n=e.getAttribute(`method`)||jC,i=HC(e.getAttribute(`enctype`))||MC,a=new FormData(e)}else if(PC(e)||IC(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?sS(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||jC,i=HC(e.getAttribute(`formenctype`))||HC(o.getAttribute(`enctype`))||MC,a=new FormData(o,e),!BC()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(NC(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=jC,r=null,i=MC,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var WC={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},GC=/[&><\u2028\u2029]/g;function KC(e){return e.replace(GC,e=>WC[e])}function qC(e,t){if(e===!1||e==null)throw Error(t)}function JC(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&sS(i.pathname,t)===`/`?i.pathname=`${_S(t)}/_root.${r}`:i.pathname=`${_S(i.pathname)}.${r}`,i}async function YC(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function XC(e){return e!=null&&typeof e.page==`string`}function ZC(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function QC(e,t,n){return rw((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await YC(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ZC).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function $C(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function ew(e,t,{includeHydrateFallback:n}={}){return tw(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function tw(e){return[...new Set(e)]}function nw(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function rw(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!XC(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(nw(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function iw(){let e=h.useContext(OS);return qC(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function aw(){let e=h.useContext(kS);return qC(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ow=h.createContext(void 0);ow.displayName=`FrameworkContext`;function sw(){let e=h.useContext(ow);return qC(e,`You must render this element inside a <HydratedRouter> element`),e}function cw(e,t){let n=h.useContext(ow),[r,i]=h.useState(!1),[a,o]=h.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=h.useRef(null);h.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),h.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:lw(s,p),onBlur:lw(c,m),onMouseEnter:lw(l,p),onMouseLeave:lw(u,m),onTouchStart:lw(d,p)}]:[a,f,{}]:[!1,f,{}]}function lw(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function uw({page:e,...t}){let n=jS(),{router:r}=iw(),i=h.useMemo(()=>Vx(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?h.createElement(fw,{page:e,matches:i,...t}):h.createElement(pw,{page:e,matches:i,...t}):null}function dw(e){let{manifest:t,routeModules:n}=sw(),[r,i]=h.useState([]);return h.useEffect(()=>{let r=!1;return QC(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function fw({page:e,matches:t,...n}){let r=KS(),{future:i}=sw(),{basename:a}=iw(),o=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=JC(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return h.createElement(h.Fragment,null,o.map(e=>h.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function pw({page:e,matches:t,...n}){let r=KS(),{future:i,manifest:a,routeModules:o}=sw(),{basename:s}=iw(),{loaderData:c,matches:l}=aw(),u=h.useMemo(()=>$C(e,t,l,a,r,`data`),[e,t,l,a,r]),d=h.useMemo(()=>$C(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=JC(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=h.useMemo(()=>ew(d,a),[d,a]),m=dw(d);return h.createElement(h.Fragment,null,f.map(e=>h.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>h.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>h.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function mw(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}h.Component;var hw=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{hw&&(window.__reactRouterVersion=`7.15.1`)}catch{}function gw({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=h.useState({action:n.action,location:n.location}),o=h.useCallback(e=>{r===!1?a(e):h.startTransition(()=>a(e))},[r]);return h.useLayoutEffect(()=>n.listen(o),[n,o]),h.createElement(OC,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}gw.displayName=`unstable_HistoryRouter`;var _w=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vw=h.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:g,navigator:_,useTransitions:v}=h.useContext(FS),y=typeof l==`string`&&_w.test(l),b=TS(l,g);l=b.to;let x=WS(l,{relative:r}),S=KS(),C=null;if(o){let e=mS(o,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:gS([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=cw(n,p),D=Tw(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=h.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:mw(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?h.createElement(h.Fragment,null,A,h.createElement(uw,{page:x})):A});vw.displayName=`Link`;var yw=h.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=tC(a,{relative:c.relative}),d=KS(),f=h.useContext(kS),{navigator:p,basename:m}=h.useContext(FS),g=f!=null&&Fw(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&m&&(y=sS(y,m)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return h.createElement(vw,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});yw.displayName=`NavLink`;var bw=h.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=jC,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:g}=h.useContext(FS),_=Ow(),v=kw(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&_w.test(s);return h.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});g&&n!==!1?h.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});bw.displayName=`Form`;function xw({getKey:e,storageKey:t,...n}){let r=h.useContext(ow),{basename:i}=h.useContext(FS),a=KS(),o=vC();Nw({getKey:e,storageKey:t});let s=h.useMemo(()=>{if(!r||!e)return null;let t=Mw(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return h.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${KC(JSON.stringify(t||Aw))}, ${KC(JSON.stringify(s))})`}})}xw.displayName=`ScrollRestoration`;function Sw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cw(e){let t=h.useContext(OS);return Fx(t,Sw(e)),t}function ww(e){let t=h.useContext(kS);return Fx(t,Sw(e)),t}function Tw(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=XS(),d=KS(),f=tC(e,{relative:o});return h.useCallback(p=>{if(RC(p,t)){p.preventDefault();let t=n===void 0?zx(d)===zx(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?h.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var Ew=0,Dw=()=>`__${String(++Ew)}__`;function Ow(){let{router:e}=Cw(`useSubmit`),{basename:t}=h.useContext(FS),n=gC(),r=e.fetch,i=e.navigate;return h.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=UC(e,t);a.navigate===!1?await r(a.fetcherKey||Dw(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function kw(e,{relative:t}={}){let{basename:n}=h.useContext(FS),r=h.useContext(LS);Fx(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...tC(e||`.`,{relative:t})},o=KS();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:gS([n,a.pathname])),zx(a)}var Aw=`react-router-scroll-positions`,jw={};function Mw(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:sS(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Nw({getKey:e,storageKey:t}={}){let{router:n}=Cw(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=ww(`useScrollRestoration`),{basename:a}=h.useContext(FS),o=KS(),s=vC(),c=_C();h.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Pw(h.useCallback(()=>{if(c.state===`idle`){let t=Mw(o,s,a,e);jw[t]=window.scrollY}try{sessionStorage.setItem(t||Aw,JSON.stringify(jw))}catch(e){Ix(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(h.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Aw);e&&(jw=JSON.parse(e))}catch{}},[t]),h.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(jw,()=>window.scrollY,e?(t,n)=>Mw(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),h.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{Ix(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Pw(e,t){let{capture:n}=t||{};h.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Fw(e,{relative:t}={}){let n=h.useContext(MS);Fx(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Cw(`useViewTransitionState`),i=tC(e,{relative:t});if(!n.isTransitioning)return!1;let a=sS(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=sS(n.nextLocation.pathname,r)||n.nextLocation.pathname;return iS(i.pathname,o)!=null||iS(i.pathname,a)!=null}var Iw=({className:e,children:t,path:r,to:i,variant:a=`primary`,size:o=`md`,...s})=>(0,n.jsx)(yw,{className:(0,Jn.default)(kx({variant:a,size:o}),e),to:i??r,...s,children:(0,n.jsx)(`span`,{className:`flex items-center gap-1`,children:t})});Iw.displayName=`NavLinkButton`;function Lw(){let{t:e}=U(),[t,r]=(0,h.useState)(!1);return(0,n.jsxs)(Zn,{accent:`red`,children:[(0,n.jsxs)(`div`,{className:`space-y-3`,children:[(0,n.jsx)(`p`,{className:`font-semibold text-core-red-500 text-sm uppercase tracking-[0.2em]`,children:e(`error`,{defaultValue:`Error`})}),(0,n.jsx)(`h1`,{className:`font-semibold text-3xl text-core-gray-900 tracking-tight sm:text-5xl`,children:`Oops!`}),(0,n.jsx)(`p`,{className:`mx-auto max-w-xl text-base text-core-gray-500 leading-7 sm:text-lg`,children:e(`sorrySomethingWentWrong`)})]}),(0,n.jsx)(Mx,{onClick:()=>{r(!0),window.location.replace(`/`)},pending:t,children:e(`back`)})]})}var Rw=class extends h.Component{constructor(e){super(e),this.state={hasError:!1,scope:void 0}}componentDidMount(){let e=new Mh({dsn:`https://5b16c396f6e8f6e4b0b87455bea7e96b@o80526.ingest.us.sentry.io/4507345428283392`,transport:bv,stackParser:Mv,integrations:[...vy({}).filter(e=>![`BrowserApiErrors`,`Breadcrumbs`,`GlobalHandlers`].includes(e.name)),ab({useEffect:h.useEffect,useLocation:KS,useNavigationType:qS,createRoutesFromChildren:AC,matchRoutes:Vx})]}),t=new Ic;t.setClient(e),e.init(),this.setState({...this.state,scope:t})}componentDidCatch(e,t){console.error(`ErrorBoundary: `,e,t),this.state.scope.captureException(e),this.setState({...this.state,hasError:!0})}render(){return this.state.hasError?(0,n.jsx)(Lw,{}):this.props.children}};function zw(){let{apiKey:e,host:t}=Wn(),n=(e,t={},n={})=>o(`GET`,e,t,n),r=(e,t={},n={})=>o(`POST`,e,t,n),i=(e,t={},n={})=>o(`PUT`,e,t,n),a=(e,t={})=>o(`DELETE`,e,t),o=(n,r,i={},a={})=>{let o=Hn.create({baseURL:`${t??`https://api.piggy.eu`}/api/v2/portal-sessions`,...a,headers:{Authorization:`Bearer ${e}`,...a.headers,"X-SDK-Version":`0.3.0-beta.9`}});return o.interceptors.response.use(void 0,Kn),o.request({method:n,url:r,params:n==`GET`?i:{},data:i})};return{get:n,post:r,put:i,destroy:a}}function Bw({children:e,id:t,className:r}){return(0,n.jsx)(`div`,{id:t,className:`flex h-full max-h-full flex-col bg-white md:h-fit md:rounded-lg md:border md:shadow-md ${r}`,children:e})}function Vw({children:e,className:t}){return(0,n.jsx)(`div`,{className:`grow overflow-y-auto px-6 py-4 ${t??``}`,children:e})}function Hw({children:e}){return(0,n.jsx)(`div`,{className:`border-t px-6 py-4`,children:e})}function Uw({children:e}){return(0,n.jsx)(`div`,{className:`border-b px-6 py-4`,children:e})}function Ww({children:e}){return(0,n.jsx)(`p`,{className:`text-gray-500 text-sm leading-5`,children:e})}function Gw({children:e}){return(0,n.jsx)(`h2`,{className:`font-semibold text-gray-900 text-lg leading-6`,children:e})}function Kw({onSubmit:e,children:t}){return(0,n.jsx)(`form`,{onSubmit:t=>{t.preventDefault(),e&&e(t)},children:t})}function qw({children:e}){return(0,n.jsx)(`div`,{className:`h-screen w-screen md:p-6`,children:(0,n.jsx)(`div`,{className:`flex h-full max-h-full items-center justify-center *:grow md:mx-auto md:max-w-[420px]`,children:e})})}var Jw=({children:e,className:t,description:r,disabled:i,required:a=!1,tooltip:o,htmlFor:s})=>!e&&!o&&!r?null:(0,n.jsx)(`label`,{htmlFor:s,className:`inline-flex shrink-0 items-center gap-1 text-core-gray-800 antialiased `,children:(0,n.jsxs)(`div`,{className:(0,Jn.default)(`inline-flex cursor-pointer items-center gap-1 text-sm font-medium leading-6`,t,i&&`pointer-events-none text-core-gray-300`),children:[e?(0,n.jsx)(`span`,{className:(0,Jn.default)(i&&`pointer-events-none text-core-gray-300`),children:e}):null,r?(0,n.jsx)(`span`,{className:(0,Jn.default)(`font-normal text-core-gray-500`,i&&`text-current`),children:r}):null,a?(0,n.jsx)(`span`,{className:`font-normal text-core-red-500`,children:`*`}):null]})}),Yw=({helperText:e,error:t,disabled:r})=>e?(0,n.jsx)(`span`,{className:(0,Jn.default)(`text-start text-sm leading-6 text-core-gray-500 antialiased `,t&&`text-core-red-500`,r&&`text-core-gray-300`),children:e}):null;Jw.displayName=`Label`,Yw.displayName=`HelperText`;var Xw=Object.assign(Jw,{Helper:Yw}),Zw=({id:e,defaultChecked:t=!1,disabled:r,onChange:i})=>{let a=r,[o,s]=h.default.useState(t);return(0,n.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center`,children:(0,n.jsx)(`input`,{className:(0,Jn.default)(`h-4 w-4 rounded-sm border border-core-gray-200 bg-core-white-900 text-core-primary-500 shadow-xs`,`hover:border-core-gray-300 hover:shadow-none`,`checked:bg-core-primary-500`,`focus:outline-0 focus:ring-core-primary-500 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2`,`disabled:border disabled:border-core-gray-200 disabled:bg-core-gray-50 disabled:shadow-none`,`disabled:checked:bg-core-gray-200`),id:e,type:`checkbox`,checked:o,onChange:e=>{a||s(!o),i?.(e.target.checked)},disabled:a})})},Qw=h.default.createContext(null);function $w(e=!1){let t=h.default.useContext(Qw);if(!t&&!e)throw Error(`Checkbox.Item must be used within a CheckboxGroup or CheckboxGroup.Root`);return t}var eT=h.default.forwardRef(({children:e,description:t,disabled:r,helperText:i,id:a,label:o,required:s,tooltip:c},l)=>{let u=h.default.useId(),d=a??u,f=o??t??c??i?(0,n.jsxs)(`div`,{className:`inline-flex flex-col`,children:[(0,n.jsx)(Xw,{className:`cursor-default`,description:t,required:s,tooltip:c,htmlFor:d,disabled:r,children:o}),(0,n.jsx)(Xw.Helper,{disabled:r,helperText:i})]}):null;return(0,n.jsx)(Qw.Provider,{value:{disabled:r},children:(0,n.jsxs)(`div`,{ref:l,"aria-describedby":i?`${d}__describer`:void 0,"aria-labelledby":o?`${d}__label`:void 0,className:`flex flex-col gap-4`,role:`group`,children:[o??i??t??c?(0,n.jsx)(`div`,{className:`flex flex-col`,children:f}):null,e?(0,n.jsx)(`div`,{className:(0,Jn.default)(`flex flex-col gap-2`),children:e}):null]})})});eT.displayName=`CheckboxGroup`,Object.assign(eT,{Item:({disabled:e,label:t,defaultChecked:r})=>{let{disabled:i}=$w()??{};return(0,n.jsx)(tT,{disabled:e??i,label:t,defaultChecked:r})}});var tT=({id:e,children:t,defaultChecked:r=!1,description:i,disabled:a,helperText:o,label:s,required:c=!1,tooltip:l,onChange:u})=>{let d=h.default.useId(),f=e??d,p=!!$w(!0),m=s??i??l??o?(0,n.jsxs)(`div`,{className:`inline-flex flex-col`,children:[(0,n.jsx)(Xw,{className:(0,Jn.default)(p&&`font-normal`),description:i,required:c,tooltip:l,htmlFor:f,disabled:a,children:s}),(0,n.jsx)(Xw.Helper,{disabled:a,helperText:o})]}):null;return(0,n.jsxs)(`div`,{className:`flex gap-3`,children:[(0,n.jsx)(Zw,{id:f,defaultChecked:r,disabled:a,onChange:u}),t||m]})};tT.displayName=`Checkbox`;var nT=({id:e,name:t,label:r,description:i,required:a,type:o=`text`,value:s,placeholder:c,disabled:l,error:u=!1,helperText:d=``,onChange:f,beforeIcon:p,afterIcon:m,autoFocus:g,onFocus:_,onBlur:v})=>{let[y,b]=(0,h.useState)(d),x=(0,h.useRef)(null),[S,C]=(0,h.useState)(!1),{open:w,close:T}=Po();(0,h.useEffect)(()=>()=>{T()},[]);let E=()=>{x.current&&b(x.current.validationMessage),C(!1),T(),v?.()},D=async e=>{C(!0),(async()=>w(e))().then(()=>x.current?.scrollIntoView({behavior:`smooth`,block:`center`})),_?.()},O=e=>{f?.(e)},k=h.default.useId(),A=e??k;return(0,n.jsxs)(`div`,{className:`flex flex-col gap-2 antialiased`,children:[(0,n.jsx)(Xw,{description:i,disabled:l,htmlFor:A,required:a,children:r}),(0,n.jsx)(`div`,{className:(0,Jn.default)(`box flex h-10 flex-start flex-col justify-center self-stretch rounded-sm border border-core-gray-200 shadow-xs`,l?`pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200`:`bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none`,S&&!u&&`border-core-primary-500 ring-1 ring-core-primary-500`,u&&`border-core-red-500`,u&&S&&`border-core-red-500 ring-1 ring-core-red-500`),children:(0,n.jsxs)(`div`,{className:`flex flex-row gap-2 self-stretch p-2`,children:[p&&(0,n.jsx)(Dx,{icon:p}),(0,n.jsx)(`input`,{type:o,id:A,name:t,className:`flex grow border-none bg-transparent p-0 text-core-gray-800 text-sm placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 disabled:placeholder:text-core-gray-300`,value:s,onChange:O,onBlur:E,ref:x,placeholder:c,onFocus:D,disabled:l,autoFocus:g}),m&&(0,n.jsx)(Dx,{icon:m})]})}),(0,n.jsx)(`div`,{className:`grid overflow-hidden transition-all duration-300 ease-out ${d||y?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`}`,children:(0,n.jsx)(`div`,{className:`overflow-hidden`,children:(0,n.jsx)(Xw.Helper,{error:u,helperText:d||y})})})]})};nT.displayName=`Input`;var rT=({id:e,name:t,label:r,required:i,description:a,value:o,placeholder:s,disabled:c,error:l=!1,helperText:u=``,autoFocus:d,onChange:f})=>{let[p,m]=(0,h.useState)(u),g=(0,h.useRef)(null),[_,v]=(0,h.useState)(!1),{open:y,close:b}=Po();(0,h.useEffect)(()=>()=>{b()},[]);let x=()=>{g.current&&m(g.current.validationMessage),v(!1),b()},S=async e=>{v(!0),(async()=>y(e))().then(()=>g.current?.scrollIntoView({behavior:`smooth`,block:`center`}))},C=e=>{f?.(e)},w=h.default.useId(),T=e??w;return(0,n.jsxs)(`div`,{className:`flex flex-col gap-2 antialiased`,children:[(0,n.jsx)(Xw,{description:a,disabled:c,htmlFor:T,required:i,children:r}),(0,n.jsx)(`div`,{className:(0,Jn.default)(`flex-start box relative flex h-10 flex-col justify-center self-stretch rounded-sm border border-core-gray-200 shadow-xs`,c?`pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200`:` bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none `,_&&!l&&`border-core-primary-500 ring-1 ring-core-primary-500`,l&&`border-core-red-500`,l&&_&&`border-core-red-500 ring-1 ring-core-red-500`),children:(0,n.jsxs)(`div`,{className:`flex flex-row gap-2 self-stretch p-2`,children:[(0,n.jsx)(Dx,{icon:`mail`}),(0,n.jsx)(`input`,{type:`email`,id:T,name:t,className:`flex grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 disabled:placeholder:text-core-gray-300`,value:o,onChange:C,onBlur:x,ref:g,placeholder:s,onFocus:S,disabled:c,autoFocus:d})]})}),(0,n.jsx)(`div`,{className:`transition-grid-rows grid overflow-hidden duration-300 ease-out ${u||p?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-0`}`,children:(0,n.jsx)(`div`,{className:`overflow-hidden`,children:(0,n.jsx)(Xw.Helper,{error:l,helperText:u||p})})})]})};rT.displayName=`InputEmail`;var iT=({id:e,name:t,label:r,required:i,description:a,placeholder:o,value:s,disabled:c,error:l=!1,helperText:u,onChange:d,type:f=`date`})=>{let[p,m]=(0,h.useState)(!1),g=h.default.useId(),_=e??g;return(0,n.jsxs)(`div`,{className:`flex flex-col gap-2 antialiased`,children:[(0,n.jsx)(Xw,{description:a,disabled:c,htmlFor:_,required:i,children:r}),(0,n.jsx)(`div`,{className:(0,Jn.default)(`flex-start box relative flex h-10 flex-col justify-center self-stretch rounded-sm border border-core-gray-200 shadow-xs ring-core-primary-500 `,c?`pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200`:` bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none `,p&&!l&&`border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500`,l&&`border-core-red-500`,l&&p&&`border-core-red-500 ring-1 ring-core-red-500`),children:(0,n.jsxs)(`div`,{className:`flex w-full flex-row gap-2 self-stretch p-2`,children:[(0,n.jsx)(`input`,{type:f,id:_,name:t,value:s,max:`2200-01-01`,className:`flex grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 disabled:placeholder:text-core-gray-300`,placeholder:o,onChange:d,onFocus:()=>m(!0),onBlur:()=>m(!1),disabled:c}),(0,n.jsx)(Dx,{icon:`calendar`})]})}),(0,n.jsx)(`div`,{className:`grid overflow-hidden transition-all duration-300 ease-out ${u?`grid-rows-[1fr] opacity-100`:`grid-rows-[0fr] opacity-100`}`,children:(0,n.jsx)(`div`,{className:`overflow-hidden`,children:(0,n.jsx)(Xw.Helper,{error:l,helperText:u})})})]})};iT.displayName=`Input`;function aT(){let{t:e}=U(),{successToast:t}=ca(),{portalSession:n}=H(),r=zw();return{findOrCreateContact:async({email:i,createIfNotFound:a})=>(await r.post(`${n.uuid}/contacts`,{email:i,create_if_not_found:a}).then(n=>(n.data.data.was_created&&t(e(`contactHasBeenCreated`)),n))).data.data}}function oT(){let{t:e}=U(),{successToast:t}=ca(),{portalSession:n}=H(),{onContactLink:r}=wo(),i=zw();return{linkContactToSession:async a=>{await i.post(`${n.uuid}/link-contact/${a.id}`).then(n=>(n.data.data.was_updated&&(t(e(`contactHasBeenLinkedToSession`)),r?.(a)),n))}}}function sT({onCancel:e,onSuccess:t}){let{t:r}=U(),{errorToast:i}=ca(),[a,o]=(0,h.useState)(!1),{portalSession:s}=H(),{findOrCreateContact:c}=aT(),{linkContactToSession:l}=oT(),[u,d]=(0,h.useState)(!0),[f,p]=(0,h.useState)(``);return(0,n.jsx)(qw,{children:(0,n.jsxs)(Bw,{id:Fo,children:[(0,n.jsxs)(Uw,{children:[(0,n.jsx)(Gw,{children:r(`authenticateViaEmail`)}),(0,n.jsx)(Ww,{children:`Type: ${s.type}`})]}),(0,n.jsxs)(Kw,{onSubmit:async()=>{o(!0);try{await l(await c({email:f,createIfNotFound:u})),await t()}catch(e){i(e)}finally{o(!1)}},children:[(0,n.jsxs)(Vw,{children:[(0,n.jsx)(nT,{value:f,placeholder:`john.doe@example.com`,label:r(`emailAddress`),onChange:e=>p(e.target.value),beforeIcon:`mail`}),(0,n.jsx)(tT,{required:!0,label:r(`createContactIfNotFound`),defaultChecked:u,onChange:e=>d(e)})]}),(0,n.jsx)(Hw,{children:(0,n.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,n.jsx)(Mx,{type:`submit`,className:`w-full`,pending:a,disabled:!f,children:r(`continue`)}),(0,n.jsx)(Mx,{className:`w-full`,variant:`secondary`,onClick:e,children:r(`back`)})]})})]})]})})}function cT(e){let t=zw(),{errorToast:n}=ca(),{data:r,error:i,isValidating:a,mutate:o}=bo((0,h.useMemo)(()=>e.url?e.params?[e.url,JSON.stringify(e.params)]:[e.url]:null,[e.url,JSON.stringify(e.params)]),([n,r])=>r?t.get(n,e.params):t.get(n),{shouldRetryOnError:!1,revalidateOnFocus:e.revalidateOnFocus,revalidateOnMount:e.revalidateOnMount,refreshInterval:e.refreshInterval});return(0,h.useEffect)(()=>{r&&e.dataSetter(r.data.data,r.data.meta)},[r]),(0,h.useEffect)(()=>{i&&n(i)},[i]),{data:r,pending:a,error:i,isValidating:a,mutate:o}}var lT={info:`border-core-primary-100 bg-core-primary-50 text-core-gray-700`,success:`border-core-green-100 bg-core-green-50 text-core-gray-700`,warning:`border-core-primary-100 bg-core-primary-50 text-core-gray-700`,error:`border-core-red-100 bg-core-red-50 text-core-gray-700`},uT={info:`discovery`,success:`discovery`,warning:`discovery`,error:`destructive`},dT={info:`information`,success:`notificationSuccessV2`,warning:`notificationWarningV2`,error:`notificationErrorV2`};function fT({children:e,className:t,icon:r,title:i,variant:a=`info`}){return(0,n.jsxs)(`div`,{className:(0,Jn.default)(`flex gap-3 rounded-xl border p-4 text-sm leading-5`,lT[a],t),children:[(0,n.jsx)(`div`,{className:`mt-0.5 shrink-0`,children:(0,n.jsx)(Dx,{icon:r??dT[a],size:`sm`,variant:uT[a]})}),(0,n.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[i?(0,n.jsx)(`div`,{className:`font-medium text-core-gray-900`,children:i}):null,(0,n.jsx)(`div`,{children:e})]})]})}function pT(){let{t:e}=U(),{successToast:t}=ca(),{portalSession:n}=H(),r=zw();return{linkIdentifierToContact:async(i,a)=>{await r.post(`${n.uuid}/contact-identifiers/${i.id}/link-to-contact/${a.id}`).then(n=>(t(e(`contactIdentifierWasLinked`)),n))}}}function mT(e){let{t}=U(),{id:r,onSuccess:i,onCancel:a}=e,{errorToast:o}=ca(),[s,c]=(0,h.useState)(!1),{portalSession:l}=H(),{findOrCreateContact:u}=aT(),{linkContactToSession:d}=oT(),{linkIdentifierToContact:f}=pT(),[p,m]=(0,h.useState)(!0),[g,_]=(0,h.useState)(null),[v,y]=(0,h.useState)(``);cT({url:`${l.uuid}/contact-identifiers/${r}`,dataSetter:_});let b=async e=>{c(!0);try{await d(e),await i()}catch(e){o(e)}finally{c(!1)}},x=async()=>{if(g){c(!0);try{let e=await u({email:v,createIfNotFound:p});await f(g,e),await d(e),await i()}catch(e){o(e)}finally{c(!1)}}},S=g?.contact;return(0,n.jsx)(qw,{children:(0,n.jsxs)(Bw,{children:[(0,n.jsxs)(Uw,{children:[(0,n.jsx)(Gw,{children:t(`linkIdentifier`)}),(0,n.jsx)(Ww,{children:g?.value})]}),(0,n.jsx)(Vw,{children:S?(0,n.jsx)(fT,{variant:`success`,children:t(`thisIdentifierIsLinkedToContact`,{contact:g.contact.email})}):(0,n.jsxs)(`div`,{children:[(0,n.jsx)(fT,{children:`This identifier is not linked to a contact`}),(0,n.jsx)(nT,{value:v,placeholder:`john.doe@example.com`,label:t(`emailAddress`),onChange:e=>y(e.target.value),beforeIcon:`mail`}),(0,n.jsx)(tT,{required:!0,label:t(`createContactIfNotFound`),defaultChecked:p,onChange:e=>m(e)})]})}),(0,n.jsx)(Hw,{children:(0,n.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[S?(0,n.jsx)(Mx,{className:`w-full`,onClick:()=>b(S),pending:s,children:t(`continue`)}):(0,n.jsx)(Mx,{className:`w-full`,onClick:x,pending:s,disabled:!v,children:t(p?`createContactAndLink`:`findContactAndLink`)}),(0,n.jsx)(Mx,{type:`submit`,className:`w-full`,variant:`secondary`,pending:s,onClick:a,children:t(`cancel`)})]})})]})})}var hT=typeof window<`u`?h.useLayoutEffect:()=>{},gT=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight],_T=()=>{let[e,t]=(0,h.useState)(),n=(0,h.useCallback)(()=>{let e=gT();t(t=>t&&t[0]===e[0]&&t[1]===e[1]?t:e)},[]);return hT(n,[n]),(0,h.useEffect)(()=>{let e=()=>{n(),setTimeout(n,1e3)};return window.addEventListener(`resize`,e),window.addEventListener(`orientationchange`,e),window.visualViewport?.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`orientationchange`,e),window.visualViewport?.removeEventListener(`resize`,e)}},[n]),e},vT=`data:image/svg+xml,%3csvg%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m21.25%207.5c.3796958%200%20.693491.28215388.7431534.64822944l.0068466.10177056v8.5c0%201.7330315-1.3564548%203.1492459-3.0655761%203.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555%200-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932%201.06066018%200%20.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734%200%201.6711923-.7071103%201.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815%202%202c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554%200%20.03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2%202c-.2928932.29289321-.767767.29289321-1.0606602%200-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734%200-1.67119234.70711027-1.7441988%201.60647279l-.0058012.14352721v8.5c0%20.4142136-.33578644.75-.75.75-.37969577%200-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146%201.35645477-3.14924593%203.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117%205.85294824c2.209139%200%204%201.790861%204%204s-1.790861%204-4%204-4-1.790861-4-4%201.790861-4%204-4zm0%201.5c-1.3807119%200-2.5%201.1192881-2.5%202.5s1.1192881%202.5%202.5%202.5%202.5-1.1192881%202.5-2.5-1.1192881-2.5-2.5-2.5z'%20fill='%23212121'/%3e%3c/svg%3e`,yT=f({createWorker:()=>bT}),bT,xT=u((()=>{bT=()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
|
|
24
24
|
class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
|
|
25
25
|
class ba{constructor(a){this.bitOffset=this.byteOffset=0;this.bytes=a}readBits(a){if(1>a||32<a||a>this.available())throw Error("Cannot read "+a.toString()+" bits");var b=0;if(0<this.bitOffset){b=8-this.bitOffset;var c=a<b?a:b;b-=c;b=(this.bytes[this.byteOffset]&255>>8-c<<b)>>b;a-=c;this.bitOffset+=c;8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(0<a){for(;8<=a;)b=b<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,a-=8;0<a&&(c=8-a,b=b<<a|(this.bytes[this.byteOffset]&255>>c<<c)>>c,
|
|
26
26
|
this.bitOffset+=a)}return b}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var B,C=B||(B={});C.Numeric="numeric";C.Alphanumeric="alphanumeric";C.Byte="byte";C.Kanji="kanji";C.ECI="eci";C.StructuredAppend="structuredappend";var D,E=D||(D={});E[E.Terminator=0]="Terminator";E[E.Numeric=1]="Numeric";E[E.Alphanumeric=2]="Alphanumeric";E[E.Byte=4]="Byte";E[E.Kanji=8]="Kanji";E[E.ECI=7]="ECI";E[E.StructuredAppend=3]="StructuredAppend";let F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
|