PageSourceSearch

https://nader-ragab.com/front/_next/static/chunks/f6d9d1a6.a5cceba158fde2b6.js

js nader-ragab.com collected 2026-10-01 14:32:13 UTC 200,405 bytes, 50 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4906],{57525:(e,t,n)=>{let r,o,i,a,s,c,u,l,p,d,f,h;n.d(t,{CheckoutWeb:()=>se});var m=function(){return(m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function g(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function y(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){var u=[s,c];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function v(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var _={CREDIT_CARD:"cards",DEBIT_CARD:"cards"},b="https://<entity>.<env>.oscato.com",E=Object.freeze({COMPONENT:{MOUNT:"mount",UNMOUNT:"unmount"}});function w(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:a,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let o=a.prototype,i=Object.keys(o);for(let e=0;e<i.length;e++){let t=i[e];t in n||(n[t]=o[t].bind(n))}}let o=n?.Parent??Object;class i extends o{}function a(e){var t;let o=n?.Parent?new i:this;for(let n of(r(o,e),(t=o._zod).deferred??(t.deferred=[]),o._zod.deferred))n();return o}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class k extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class S extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}let O={};function x(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function I(e,t){return"bigint"==typeof t?t.toString():t}function R(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function C(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}let T=Symbol("evaluating");function A(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==T)return void 0===r&&(r=T,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function z(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function P(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function N(e){return JSON.stringify(e)}let D="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let L=R(()=>
1{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function j(e){if(!1===$(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==$(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function M(e){return j(e)?{...e}:Array.isArray(e)?[...e]:e}let U=new Set(["string","number","symbol"]);function F(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Z(e,t,n){let r=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(r._zod.parent=e),r}function B(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(void 0!==e?.message){if(void 0!==e?.error)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,"string"==typeof e.error?{...e,error:()=>e.error}:e}let V={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function J(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function K(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function G(e){return"string"==typeof e?e:e?.message}function W(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=G(e.inst?._zod.def?.error?.(e))??G(t?.error?.(e))??G(n.customError?.(e))??G(n.localeError?.(e))??"Invalid input"),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function H(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function q(...e){let[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}let Y=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,I,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},X=w("$ZodError",Y),Q=w("$ZodError",Y,{Parent:Error}),ee=e=>(t,n,r,o)=>{let i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new k;if(a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>W(e,i,O)));throw D(t,o?.callee),t}return a.value},et=e=>async(t,n,r,o)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let t=new(o?.Err??e)(a.issues.map(e=>W(e,i,O)));throw D(t,o?.callee),t}return a.value},en=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new k;return i.issues.length?{success:!1,error:new(e??X)(i.issues.map(e=>W(e,o,O)))}:{success:!0,data:i.value}},er=en(Q),eo=e=>async(t,n,r)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>W(e,o,O)))}:{success:!0,data:i.value}},ei=eo(Q),ea=/^[cC][^\s-]{8,}$/,es=/^[0-9a-z]+$/,ec=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,eu=/^[0-9a-vA-V]{20}$/,el=/^[A-Za-z0-9]{27}$/,ep=/^[a-zA-Z0-9_-]{21}$/,ed=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ef=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,eh=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,em=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ey=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ev=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,e_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eb=/^$|^(?:[0-9a-zA-Z+/]{4}
1)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,eE=/^[A-Za-z0-9_-]*$/,ew=/^\+[1-9]\d{6,14}$/,ek="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",eS=RegExp(`^${ek}$`);function eO(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let ex=/^-?\d+$/,eI=/^-?\d+(?:\.\d+)?$/,eR=/^(?:true|false)$/i,eC=/^[^A-Z]*$/,eT=/^[^a-z]*$/,eA=w("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ez={number:"number",bigint:"bigint",object:"date"},eP=w("$ZodCheckLessThan",(e,t)=>{eA.init(e,t);let n=ez[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eN=w("$ZodCheckGreaterThan",(e,t)=>{eA.init(e,t);let n=ez[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eD=w("$ZodCheckMultipleOf",(e,t)=>{eA.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){let n=(e.toString().split(".")[1]||"").length,r=t.toString(),o=(r.split(".")[1]||"").length;if(0===o&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(o=Number.parseInt(e[1]))}let i=n>o?n:o;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),e$=w("$ZodCheckNumberFormat",(e,t)=>{eA.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=V[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=i,n&&(r.pattern=ex)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),eL=w("$ZodCheckMaxLength",(e,t)=>{var n;eA.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let o=H(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ej=w("$ZodCheckMinLength",(e,t)=>{var n;eA.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let o=H(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eM=w("$ZodCheckLengthEquals",(e,t)=>{var n;eA.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,o=r.length;if(o===t.length)return;let i=H(r),a=o>t.length;n.issues.push({origin:i,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),eU=w("$ZodCheckStringFormat",(e,t)=>{var n,r;eA.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),eF=w("$ZodCheckRegex",(e,t)=>{eU.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eZ=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=eC),eU.init(e,t)}),eB=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=eT),eU.init(e,t)}),eV=w("$ZodCheckIncludes",(e,t)=>{eA.init(e,t);let n=F(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=n=>
1{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),eJ=w("$ZodCheckStartsWith",(e,t)=>{eA.init(e,t);let n=RegExp(`^${F(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),eK=w("$ZodCheckEndsWith",(e,t)=>{eA.init(e,t);let n=RegExp(`.*${F(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),eG=w("$ZodCheckOverwrite",(e,t)=>{eA.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class eW{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});let t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>`  ${e}`)].join("\n"))}}let eH={major:4,minor:3,patch:6},eq=w("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=eH;let r=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&r.unshift(e),r))for(let n of t._zod.onattach)n(e);if(0===r.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r,o=J(e);for(let i of t){if(i._zod.def.when){if(!i._zod.def.when(e))continue}else if(o)continue;let t=e.issues.length,a=i._zod.check(e);if(a instanceof Promise&&!1===n?.async)throw new k;if(r||a instanceof Promise)r=(r??Promise.resolve()).then(async()=>{await a,e.issues.length!==t&&(o||(o=J(e,t)))});else{if(e.issues.length===t)continue;o||(o=J(e,t))}}return r?r.then(()=>e):e},n=(n,o,i)=>{if(J(n))return n.aborted=!0,n;let a=t(o,r,i);if(a instanceof Promise){if(!1===i.async)throw new k;return a.then(t=>e._zod.parse(t,i))}return e._zod.parse(a,i)};e._zod.run=(o,i)=>{if(i.skipChecks)return e._zod.parse(o,i);if("backward"===i.direction){let t=e._zod.parse({value:o.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,o,i)):n(t,o,i)}let a=e._zod.parse(o,i);if(a instanceof Promise){if(!1===i.async)throw new k;return a.then(e=>t(e,r,i))}return t(a,r,i)}}A(e,"~standard",()=>({validate:t=>{try{let n=er(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return ei(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}))}),eY=w("$ZodString",(e,t)=>{var n;eq.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(e){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),eX=w("$ZodStringFormat",(e,t)=>{eU.init(e,t),eY.init(e,t)}),eQ=w("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ef),eX.init(e,t)}),e0=w("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=eh(e))}else t.pattern??(t.pattern=eh());eX.init(e,t)}),e1=w("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=em),eX.init(e,t)}),e2=w("$ZodURL",(e,t)=>{eX.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),o=new URL(r);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",n
1ote:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=o.href:n.value=r)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),e4=w("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),eX.init(e,t)}),e3=w("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ep),eX.init(e,t)}),e9=w("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ea),eX.init(e,t)}),e6=w("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=es),eX.init(e,t)}),e5=w("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ec),eX.init(e,t)}),e8=w("$ZodXID",(e,t)=>{t.pattern??(t.pattern=eu),eX.init(e,t)}),e7=w("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=el),eX.init(e,t)}),te=w("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){let t=eO({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return RegExp(`^${ek}T(?:${r})$`)}(t)),eX.init(e,t)}),tt=w("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=eS),eX.init(e,t)}),tn=w("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${eO(t)}$`)),eX.init(e,t)}),tr=w("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ed),eX.init(e,t)}),to=w("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=eg),eX.init(e,t),e._zod.bag.format="ipv4"}),ti=w("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ey),eX.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),ta=w("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ev),eX.init(e,t)}),ts=w("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=e_),eX.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(2!==r.length)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function tc(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let tu=w("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=eb),eX.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{tc(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),tl=w("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=eE),eX.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!eE.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return tc(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),tp=w("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ew),eX.init(e,t)}),td=w("$ZodJWT",(e,t)=>{eX.init(e,t),e._zod.check=n=>{(function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),tf=w("$ZodNumber",(e,t)=>{eq.init(e,t),e._zod.pattern=e._zod.bag.pattern??eI,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}let o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;let i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}}),th=w("$ZodNumberFormat",(e,t)=>{e$.init(e,t),tf.init(e,t)}),tm=w("$ZodBoolean",(e,t)=>{eq.init(e,t),e._zod.pattern=eR,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch(e){}let o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),tg=w("$ZodUnknown",(e,t)=>{eq.init(e,t),e._zod.parse=e=>e}),ty=w("$ZodNever",(e,t)=>{eq.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function tv(e,t,n){e.issues.length&&t.issues.push(...K(n,e.issues)),t.value[n]=e.value}let t_=w("$ZodArray",(e,t)=>{eq.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);let i=[];for(let e=0;e<o.length;e++){let a=o[e],s=t.element._zod.run({value:a,issues:[]},r);s instanceof Promise?i.push(s.then(t=>tv(t,n,e))):tv(s,n,e)}return i.length?Promise.all(i).then(()=>n):n}});function tb(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...K(n,e.issues))}void 0===e.value?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function tE(e){var t;let n=Object.keys(e.shape);for(let t of n)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let r=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(r)}}function tw(e,t,n,r,o,i){let a=[],s=o.keySet,c=o.catchall._zod,u=c.def.type,l="optional"===c.optout;for(let o in t){if(s.has(o))continue;if("never"===u){a.push(o);continue}let i=c.run({value:t[o],issues:[]},r);i instanceof Promise?e.push(i.then(e=>tb(e,n,o,t,l))):tb(i,n,o,t,l)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}let tk=w("$ZodObject",(e,t)=>{let n;eq.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape");if(!r?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let o=R(()=>tE(t));A(e._zod,"propValues",()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values)for(let e of(n[t]??(n[t]=new Set),r.values))n[t].add(e)}return n});let i=t.catchall;e._zod.parse=(t,r)=>{n??(n=o.value);let a=t.value;if(!$(a))return t.issues.push({expected:"object",code:"invalid_type",input:a,inst:e}),t;t.value={};let s=[],c=n.shape;for(let e of n.keys){let n=c[e],o="optional"===n._zod.optout,i=n._zod.run({value:a[e],issues:[]},r);i instanceof Promise?s.push(i.then(n=>tb(n,t,e,a,o))):tb(i,t,e,a,o)}return i?tw(s,a,t,r,o.value,e):s.length?Promise.all(s).then(()=>t):t}}),tS=w("$ZodObjectJIT",(e,t)=>{let n,r;tk.init(e,t);let o=e._zod.parse,i=R(()=>tE(t)),a=!O.jitless,s=a&&L.value,c=t.catchall;e._zod.parse=(u,l)=>{r??(r=i.value);let p=u.value;return $(p)?a&&s&&!1===l?.async&&!0!==l.jitless?(n||(n=(e=>{let t=new eW(["shape","payload","ctx"]),n=i.value,r=e=>{let t=N(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let o=Object.create(null),a=0;for(let e of n.keys)o[e]="key_"+a++;for(let i of(t.write("const newResult = {};"),n.keys)){let n=o[i],a=N(i),s=e[i],c="optional"===s?._zod?.optout;t.write(`const ${n} = ${r(i)};`),c?t.write(`
2        if (${n}.issues.length) {
3          if (${a} in input) {
4            payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
5              ...iss,
6              path: iss.path ? [${a}, ...iss.path] : [${a}]
7            })));
8          }
9        }
10        
11        if (${n}.value === undefined) {
12          if (${a} in input) {
13            newResult[${a}] = undefined;
14          }
15        } else {
16          newResult[${a}] = ${n}.value;
17        }
18        
19      `):t.write(`
20        if (${n}.issues.length) {
21          payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
22            ...iss,
23            path: iss.path ? [${a}, ...iss.path] : [${a}]
24          })));
25        }
26        
27        if (${n}.value === undefined) {
28          if (${a} in input) {
29            newResult[${a}] = undefined;
30          }
31        } else {
32          newResult[${a}] = ${n}.value;
33        }
34        
35      `)}t.write("payload.value = newResult;"),t.write("return payload;");let s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),u=n(u,l),c?tw([],p,u,l,r,e):u):o(u,l):(u.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),u)}});function tO(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let o=e.filter(e=>!J(e));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>W(e,r,O)))}),t)}let tx=w("$ZodUnion",(e,t)=>{eq.init(e,t),A(e._zod,"optin",()=>t.options.some(e=>
35"optional"===e._zod.optin)?"optional":void 0),A(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),A(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),A(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>C(e.source)).join("|")})$`)}});let n=1===t.options.length,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let a=!1,s=[];for(let e of t.options){let t=e._zod.run({value:o.value,issues:[]},i);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then(t=>tO(t,o,e,i)):tO(s,o,e,i)}}),tI=w("$ZodIntersection",(e,t)=>{eq.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then(([t,n])=>tR(e,t,n)):tR(e,o,i)}});function tR(e,t,n){let r,o=new Map;for(let n of t.issues)if("unrecognized_keys"===n.code)for(let e of(r??(r=n),n.keys))o.has(e)||o.set(e,{}),o.get(e).l=!0;else e.issues.push(n);for(let t of n.issues)if("unrecognized_keys"===t.code)for(let e of t.keys)o.has(e)||o.set(e,{}),o.get(e).r=!0;else e.issues.push(t);let i=[...o].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(i.length&&r&&e.issues.push({...r,keys:i}),J(e))return e;let a=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(j(t)&&j(n)){let r=Object.keys(n),o=Object.keys(t).filter(e=>-1!==r.indexOf(e)),i={...t,...n};for(let r of o){let o=e(t[r],n[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};i[r]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<t.length;o++){let i=e(t[o],n[o]);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};r.push(i.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!a.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}let tC=w("$ZodRecord",(e,t)=>{eq.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!j(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let i=[],a=t.keyType._zod.values;if(a){let s;n.value={};let c=new Set;for(let e of a)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){c.add("number"==typeof e?e.toString():e);let a=t.valueType._zod.run({value:o[e],issues:[]},r);a instanceof Promise?i.push(a.then(t=>{t.issues.length&&n.issues.push(...K(e,t.issues)),n.value[e]=t.value})):(a.issues.length&&n.issues.push(...K(e,a.issues)),n.value[e]=a.value)}for(let e in o)c.has(e)||(s=s??[]).push(e);s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:s})}else for(let a of(n.value={},Reflect.ownKeys(o))){if("__proto__"===a)continue;let s=t.keyType._zod.run({value:a,issues:[]},r);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof a&&eI.test(a)&&s.issues.length){let e=t.keyType._zod.run({value:Number(a),issues:[]},r);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(s=e)}if(s.issues.length){"loose"===t.mode?n.value[a]=o[a]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>W(e,r,O)),input:a,path:[a],inst:e});continue}let c=t.valueType._zod.run({value:o[a],issues:[]},r);c instanceof Promise?i.push(c.then(e=>{e.issues.length&&n.issues.push(...K(a,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...K(a,c.issues)),n.value[s.value]=c.value)}return i.length?Promise.all(i).then(()=>n):n}}),tT=w("$ZodEnum",(e,t)=>{eq.init(e,t);let n=x(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>U.has(typeof e)).map(e=>"string"==typeof e?F(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{let i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),tA=w("$ZodTransform",(e,t)=>{eq.init(e,t),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new S(e.constructor.name);
35let o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(e=>(n.value=e,n));if(o instanceof Promise)throw new k;return n.value=o,n}});function tz(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}let tP=w("$ZodOptional",(e,t)=>{eq.init(e,t),e._zod.optin="optional",e._zod.optout="optional",A(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),A(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${C(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>tz(t,e.value)):tz(r,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}}),tN=w("$ZodExactOptional",(e,t)=>{tP.init(e,t),A(e._zod,"values",()=>t.innerType._zod.values),A(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),tD=w("$ZodNullable",(e,t)=>{eq.init(e,t),A(e._zod,"optin",()=>t.innerType._zod.optin),A(e._zod,"optout",()=>t.innerType._zod.optout),A(e._zod,"pattern",()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${C(e.source)}|null)$`):void 0}),A(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),t$=w("$ZodDefault",(e,t)=>{eq.init(e,t),e._zod.optin="optional",A(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>tL(e,t)):tL(r,t)}});function tL(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let tj=w("$ZodPrefault",(e,t)=>{eq.init(e,t),e._zod.optin="optional",A(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),tM=w("$ZodNonOptional",(e,t)=>{eq.init(e,t),A(e._zod,"values",()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(t=>tU(t,e)):tU(o,e)}});function tU(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}let tF=w("$ZodCatch",(e,t)=>{eq.init(e,t),A(e._zod,"optin",()=>t.innerType._zod.optin),A(e._zod,"optout",()=>t.innerType._zod.optout),A(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>W(e,n,O))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>W(e,n,O))},input:e.value}),e.issues=[]),e)}}),tZ=w("$ZodPipe",(e,t)=>{eq.init(e,t),A(e._zod,"values",()=>t.in._zod.values),A(e._zod,"optin",()=>t.in._zod.optin),A(e._zod,"optout",()=>t.out._zod.optout),A(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>tB(e,t.in,n)):tB(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tB(e,t.out,n)):tB(r,t.out,n)}});function tB(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}let tV=w("$ZodReadonly",(e,t)=>{eq.init(e,t),A(e._zod,"propValues",()=>t.innerType._zod.propValues),A(e._zod,"values",()=>t.innerType._zod.values),A(e._zod,"optin",()=>t.innerType?._zod?.optin),A(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(tJ):tJ(r)}});function tJ(e){return e.value=Object.freeze(e.value),e}let tK=w("$ZodCustom",(e,t)=>{eA.init(e,t),eq.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(t=>tG(t,n,r,e));tG(o,n,r,e)}});function tG(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(q(e))}}class tW{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}(rd=globalThis).__zod_globalRegistry??(rd.__zod_globalRegistry=new tW);let tH=globalThis.__zod_globalRegistry;function tq(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...B(t)})}function tY(e,t){return new eP({check:"less_than",...B(t),value:e,inclusive:!1})}function tX(e,t){return new eP({check:"less_than",...B(t),value:e,inclusive:!0})}function tQ(e,t){return new eN({check:"greater_than",...B(t),value:e,inclusive:!1})}function t0(e,t){return new eN({check:"greater_than",...B(t),value:e,inclusive:!0})}function t1(e,t){return new eD({check:"multiple_of",...B(t),value:e})}function t2(e,t){return new eL({check:"max_length",...B(t),maximum:e})}function t4(e,t){return new ej({check:"min_length",...B(t),minimum:e})}function t3(e,t){return new eM({check:"length_equals",...B(t),length:e})}function t9(e){return new eG({check:"overwrite",tx:e})}
35function t6(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??tH,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function t5(e,t,n={path:[],schemaPath:[]}){var r;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,r);else{let n=a.schema,i=t.processors[o.type];if(!i)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);i(e,t,n,r)}let i=e._zod.parent;i&&(a.ref||(a.ref=i),t5(i,t,r),t.seen.get(i).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let o=t._zod.def;if("transform"===o.type)return!0;if("array"===o.type)return e(o.element,r);if("set"===o.type)return e(o.valueType,r);if("lazy"===o.type)return e(o.getter(),r);if("promise"===o.type||"optional"===o.type||"nonoptional"===o.type||"nullable"===o.type||"readonly"===o.type||"default"===o.type||"prefault"===o.type)return e(o.innerType,r);if("intersection"===o.type)return e(o.left,r)||e(o.right,r);if("record"===o.type||"map"===o.type)return e(o.keyType,r)||e(o.valueType,r);if("pipe"===o.type)return e(o.in,r)||e(o.out,r);if("object"===o.type){for(let t in o.shape)if(e(o.shape[t],r))return!0;return!1}if("union"===o.type){for(let t of o.options)if(e(t,r))return!0;return!1}if("tuple"===o.type){for(let t of o.items)if(e(t,r))return!0;return!(!o.rest||!e(o.rest,r))}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function t8(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let o=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:o,defId:i}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,o=e.external.uri??(e=>e);if(n)return{ref:o(n)};let i=t[1].defId??t[1].schema.id??"schema"+e.counter++;return t[1].defId=i,{defId:i,ref:`${o("__shared")}#/${r}/${i}`}}if(t[1]===n)return{ref:"#"};let o=`#/${r}/`,i=t[1].schema.id??"__schema"+e.counter++;return{defId:i,ref:o+i}})(t);r.def={...r.schema},i&&(r.defId=i);let a=r.schema;for(let e in a)delete a[e];a.$ref=o};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
36
37Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){o(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){o(n);continue}}e.metadataRegistry.get(n[0])?.id?o(n):(r.cycle||r.count>1&&"ref"===e.reused)&&o(n)}}function t7(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let o=n.def??n.schema,i={...o},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(o.allOf=o.allOf??[],o.allOf.push(s)):Object.assign(o,s),Object.assign(o,i),t._zod.parent===a)for(let e in o)"$ref"!==e&&"allOf"!==e&&(e in i||delete o[e]);if(s.$ref&&n.def)for(let e in o)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(o[e])===JSON.stringify(n.def[e])&&delete o[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(o.$ref=t.schema.$ref,t.def))for(let e in o)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(o[e])===JSON.stringify(t.def[e])&&delete o[e]}e.override({zodSchema:t,jsonSchema:o,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let o={};
37if("draft-2020-12"===e.target?o.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?o.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(n)}Object.assign(o,n.def??n.schema);let i=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(i[e.defId]=e.def)}e.external||Object.keys(i).length>0&&("draft-2020-12"===e.target?o.$defs=i:o.definitions=i);try{let n=JSON.parse(JSON.stringify(o));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:ne(t,"input",e.processors),output:ne(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let ne=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},a=t6({...o??{},target:i,io:t,processors:n});return t5(e,a),t8(a,e),t7(a,e)},nt={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nn=(e,t,n,r)=>{let o=e._zod.def;t5(o.innerType,t,r),t.seen.get(e).ref=o.innerType},nr=w("ZodISODateTime",(e,t)=>{te.init(e,t),nS.init(e,t)}),no=w("ZodISODate",(e,t)=>{tt.init(e,t),nS.init(e,t)}),ni=w("ZodISOTime",(e,t)=>{tn.init(e,t),nS.init(e,t)}),na=w("ZodISODuration",(e,t)=>{tr.init(e,t),nS.init(e,t)}),ns=w("ZodError",(e,t)=>{X.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>(function(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e}));else if("invalid_key"===o.code)r({issues:o.issues});else if("invalid_element"===o.code)r({issues:o.issues});else if(0===o.path.length)n._errors.push(t(o));else{let e=n,r=0;for(;r<o.path.length;){let n=o.path[r];r===o.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(o))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n})(e,t)},flatten:{value:t=>(function(e,t=e=>e.message){let n={},r=[];for(let o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}})(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,I,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,I,2)}},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),nc=ee(ns),nu=et(ns),nl=en(ns),np=eo(ns),nd=(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ee(ns)(e,t,r)},nf=(e,t,n)=>ee(ns)(e,t,n),nh=async(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return et(ns)(e,t,r)},nm=async(e,t,n)=>et(ns)(e,t,n),ng=(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return en(ns)(e,t,r)},ny=(e,t,n)=>en(ns)(e,t,n),nv=async(e,t,n)=>{let r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return eo(ns)(e,t,r)},n_=async(e,t,n)=>eo(ns)(e,t,n),nb=w("ZodType",(e,t)=>(eq.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ne(e,"input"),output:ne(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{let r=t6({...n,processors:t});return t5(e,r),t8(r,e),t7(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(P(t,{checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Z(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>nc(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>nl(e,t,n),e.parseAsync=async(t,n)=>nu(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>np(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nd(e,t,n),e.decode=(t,n)=>nf(e,t,n),e.encodeAsync=async(t,n)=>nh(e,t,n),e.decodeAsync=async(t,n)=>nm(e,t,n),e.safeEncode=(t,n)=>ng(e,t,n),e.safeDecode=(t,n)=>ny(e,t,n),e.safeEncodeAsync=async(t,n)=>nv(e,t,n),e.safeDecodeAsync=async(t,n)=>n_(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return new ru({type:"custom",check:"custom",fn:e,...B(t)})}(t,n)),e.superRefine=t=>e.check(function(e){let t=function(e,t){let n=new eA({check:"custom",...B(void 0)});return n._zod.check=e,n}(n=>(n.addIssue=e=>{"string"==typeof e?n.issues.push(q(e,n.value,t._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),e.input??(e.input=n.value),e.inst??(e.inst=t),e.continue??(e.continue=!t._zod.def.abort),n.issues.push(q(e)))}
37,e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(t9(t)),e.optional=()=>n8(e),e.exactOptional=()=>new n7({type:"optional",innerType:e}),e.nullable=()=>rt(e),e.nullish=()=>n8(rt(e)),e.nonoptional=t=>new ro({type:"nonoptional",innerType:e,...B(t)}),e.array=()=>nQ(e),e.or=t=>new n2({type:"union",options:[e,t],...B(void 0)}),e.and=t=>new n4({type:"intersection",left:e,right:t}),e.transform=t=>rs(e,new n6({type:"transform",transform:t})),e.default=t=>new rn({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():M(t)}}),e.prefault=t=>new rr({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():M(t)}}),e.catch=t=>new ri({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t}),e.pipe=t=>rs(e,t),e.readonly=()=>new rc({type:"readonly",innerType:e}),e.describe=t=>{let n=e.clone();return tH.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>tH.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return tH.get(e);let n=e.clone();return tH.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),nE=w("_ZodString",(e,t)=>{eY.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{n.type="string";let{minimum:r,maximum:o,format:i,patterns:a,contentEncoding:s}=e._zod.bag;if("number"==typeof r&&(n.minLength=r),"number"==typeof o&&(n.maxLength=o),i&&(n.format=nt[i]??i,""===n.format&&delete n.format,"time"===i&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a];1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new eF({check:"string_format",format:"regex",...B(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new eV({check:"string_format",format:"includes",...B(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new eJ({check:"string_format",format:"starts_with",...B(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new eK({check:"string_format",format:"ends_with",...B(t),suffix:e})}(...t)),e.min=(...t)=>e.check(t4(...t)),e.max=(...t)=>e.check(t2(...t)),e.length=(...t)=>e.check(t3(...t)),e.nonempty=(...t)=>e.check(t4(1,...t)),e.lowercase=t=>e.check(new eZ({check:"string_format",format:"lowercase",...B(t)})),e.uppercase=t=>e.check(new eB({check:"string_format",format:"uppercase",...B(t)})),e.trim=()=>e.check(t9(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return t9(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(t9(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(t9(e=>e.toUpperCase())),e.slugify=()=>e.check(t9(e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}),nw=w("ZodString",(e,t)=>{eY.init(e,t),nE.init(e,t),e.email=t=>e.check(new nO({type:"string",format:"email",check:"string_format",abort:!1,...B(t)})),e.url=t=>e.check(new nR({type:"string",format:"url",check:"string_format",abort:!1,...B(t)})),e.jwt=t=>e.check(new nB({type:"string",format:"jwt",check:"string_format",abort:!1,...B(t)})),e.emoji=t=>e.check(new nC({type:"string",format:"emoji",check:"string_format",abort:!1,...B(t)})),e.guid=t=>e.check(tq(nx,t)),e.uuid=t=>e.check(new nI({type:"string",format:"uuid",check:"string_format",abort:!1,...B(t)})),e.uuidv4=t=>e.check(new nI({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...B(t)})),e.uuidv6=t=>e.check(new nI({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...B(t)})),e.uuidv7=t=>e.check(new nI({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...B(t)})),e.nanoid=t=>e.check(new nT({type:"string",format:"nanoid",check:"string_format",abort:!1,...B(t)})),e.guid=t=>e.check(tq(nx,t)),e.cuid=t=>e.check(new nA({type:"string",format:"cuid",check:"string_format",abort:!1,...B(t)})),e.cuid2=t=>e.check(new nz({type:"string",format:"cuid2",check:"string_format",abort:!1,...B(t)})),e.ulid=t=>e.check(new nP({type:"string",format:"ulid",check:"string_format",abort:!1,...B(t)})),e.base64=t=>e.check(new nU({type:"string",format:"base64",check:"string_format",abort:!1,...B(t)})),e.base64url=t=>e.check(new nF({type:"string",format:"base64url",check:"string_format",abort:!1,...B(t)})),e.xid=t=>e.check(new nN({type:"string",format:"xid",check:"string_format",abort:!1,...B(t)})),e.ksuid=t=>e.check(new nD({type:"string",format:"ksuid",check:"string_format",abort:!1,...B(t)})),e.ipv4=t=>e.check(new n$({type:"string",format:"ipv4",check:"string_format",abort:!1,...B(t)})),e.ipv6=t=>e.check(new nL({type:"string",format:"ipv6",check:"string_format",abort:!1,...B(t)})),e.cidrv4=t=>e.check(new nj({type:"string",format:"cidrv4",check:"string_format",abort:!1,...B(t)})),e.cidrv6=t=>e.check(new nM({type:"string",format:"cidrv6",check:"string_format",abort:!1,...B(t)})),e.e164=t=>e.check(new nZ({type:"string",format:"e164",check:"string_format",abort:!1,...B(t)})),e.datetime=t=>e.check(new nr({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...B(t)})),e.date=t=>e.check(new no({type:"string",format:"date",check:"string_format",...B(t)})),e.time=t=>e.check(new ni({type:"string",format:"time",check:"string_format",precision:null,...B(t)})),e.duration=t=>e.check(new na({type:"string",format:"duration",check:"string_format",...B(t)}))});function nk(e){return new nw({type:"string",...B(e)})}let nS=w("ZodStringFormat",(e,t)=>{eX.init(e,t),nE.init(e,t)}),nO=w("ZodEmail",(e,t)=>{e1.init(e,t),nS.init(e,t)}),nx=w("ZodGUID",(e,t)=>{eQ.init(e,t),nS.init(e,t)}),nI=w("ZodUUID",(e,t)=>{e0.init(e,t),nS.init(e,t)}),nR=w("ZodURL",(e,t)=>{e2.init(e,t),nS.init(e,t)}),nC=w("ZodEmoji",(e,t)=>{e4.init(e,t),nS.init(e,t)}),nT=w("ZodNanoID",(e,t)=>{e3.init(e,t),nS.init(e,t)}),nA=w("ZodCUID",(e,t)=>{e9.init(e,t),nS.init(e,t)}),nz=w("ZodCUID2",(e,t)=>{e6.init(e,t),nS.init(e,t)}),nP=w("ZodULID",(e,t)=>{e5.init(e,t),nS.init(e,t)}),nN=w("ZodXID",(e,t)=>{e8.init(e,t),nS.init(e,t)}),nD=w("ZodKSUID",(e,t)=>{e7.init(e,t),nS.init(e,t)}),n$=w("ZodIPv4",(e,t)=>{to.init(e,t),nS.init(e,t)}),nL=w("ZodIPv6",(e,t)=>{ti.init(e,t),nS.init(e,t)}),nj=w("ZodCIDRv4",(e,t)=>{ta.init(e,t),nS.init(e,t)}),nM=w("ZodCIDRv6",(e,t)=>{ts.init(e,t),nS.init(e,t)}),nU=w("ZodBase64",(e,t)=>{tu.init(e,t),nS.init(e,t)}),nF=w("ZodBase64URL",(e,t)=>{tl.init(e,t),nS.init(e,t)}),nZ=w("ZodE164",(e,t)=>{tp.init(e,t),nS.init(e,t)}),nB=w("ZodJWT",(e,t)=>{td.init(e,t),nS.init(e,t)}),nV=w("ZodNumber",(e,t)=>{tf.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{let{minimum:r,maximum:o,format:i,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:c}=e._zod.bag;"string"==typeof i&&i.includes("int")?n.type="integer":n.type="number","number"==typeof c&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.minimum=c,n.exclusiveMinimum=!0):n.exclusiveMinimum=c),"number"==typeof r&&(n.minimum=r,"number"==typeof c&&"draft-04"!==t.target&&(c>=r?delete n.minimum:delete n.exclusiveMinimum)),"number"==typeof s&&("draft-04"===t.target||"openapi-3.0"===t.target?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s),"number"==typeof o&&(n.maximum=o,"number"==typeof s&&"draft-04"!==t.target&&(s<=o?delete n.maximum:delete n.exclusiveMaximum)),"number"==typeof a&&(n.multipleOf=a)})(e,t,n),e.gt=(t,n)=>e.check(tQ(t,n)),e.gte=(t,n)=>e.check(t0(t,n)),e.min=(t,n)=>e.check(t0(t,n)),e.lt=(t,n)=>e.check(tY(t,n)),e.lte=(t,n)=>e.check(tX(t,n)),e.max=(t,n)=>e.check(tX(t,n)),e.int=t=>e.check(nK(t)),e.safe=t=>e.check(nK(t)),e.positive=t=>e.check(tQ(0,t)),e.nonnegative=t=>e.check(t0(0,t)),e.negative=t=>e.check(tY(0,t)),e.nonpositive=t=>e.check(tX(0,t)),e.multipleOf=(t,n)=>e.check(t1(t,n)),e.step=(t,n)=>e.check(t1(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),nJ=w("ZodNumberFormat",(e,t)=>{th.init(e,t),nV.init(e,t)});function nK(e){return new nJ({type:"number",check:"number_format",abort:!1,format:"safeint",...B(e)})}let nG=w("ZodBoolean",(e,t)=>{tm.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function nW(e){return new nG({type:"boolean",...B(e)})}let nH=w("ZodUnknown",(e,t)=>{tg.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}});function nq(){return new nH({type:"unknown"})}let nY=w("ZodNever",(e,t)=>{ty.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}}),nX=w("ZodArray",(e,t)=>{t_.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,{minimum:i,maximum:a}=e._zod.bag;"number"==typeof i&&(n.minItems=i),"number"==typeof a&&(n.maxItems=a),n.type="array",n.items=t5(o.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(t4(t,n)),e.nonempty=t=>e.check(t4(1,t)),e.max=(t,n)=>e.check(t2(t,n)),e.length=(t,n)=>e.check(t3(t,n)),e.unwrap=()=>e.element});function nQ(e,t){return new nX({type:"array",element:e,...B(t)})}let n0=w("ZodObject",(e,t)=>{tS.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;n.type="object",n.properties={};let i=o.shape;for(let e in i)n.properties[e]=t5(i[e],t,{...r,path:[...r.path,"properties",e]});let a=new Set([...new Set(Object.keys(i))].filter(e=>{let n=o.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout}));a.size>0&&(n.required=Array.from(a)),"never"===o.catchall?._zod.def.type?n.additionalProperties=!1:o.catchall?o.cat
37chall&&(n.additionalProperties=t5(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),A(e,"shape",()=>t.shape),e.keyof=()=>(function(e,t){return new n9({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(void 0)})})(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nq()}),e.loose=()=>e.clone({...e._zod.def,catchall:nq()}),e.strict=()=>e.clone({...e._zod.def,catchall:new nY({type:"never",...B(void 0)})}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>(function(e,t){if(!j(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=P(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return z(this,"shape",n),n}});return Z(e,r)})(e,t),e.safeExtend=t=>(function(e,t){if(!j(t))throw Error("Invalid input to safeExtend: expected a plain object");let n=P(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return z(this,"shape",n),n}});return Z(e,n)})(e,t),e.merge=t=>(function(e,t){let n=P(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return z(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Z(e,n)})(e,t),e.pick=t=>(function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");return Z(e,P(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return z(this,"shape",e),e},checks:[]}))})(e,t),e.omit=t=>(function(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let o=P(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return z(this,"shape",r),r},checks:[]});return Z(e,o)})(e,t),e.partial=(...t)=>(function(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let o=P(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(let t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return z(this,"shape",o),o},checks:[]});return Z(t,o)})(n5,e,t[0]),e.required=(...t)=>(function(e,t,n){let r=P(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let t in n){if(!(t in o))throw Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(let t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return z(this,"shape",o),o}});return Z(t,r)})(ro,e,t[0])});function n1(e,t){return new n0({type:"object",shape:e??{},...B(t)})}let n2=w("ZodUnion",(e,t)=>{tx.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,i=!1===o.inclusive,a=o.options.map((e,n)=>t5(e,t,{...r,path:[...r.path,i?"oneOf":"anyOf",n]}));i?n.oneOf=a:n.anyOf=a})(e,t,n,r),e.options=t.options}),n4=w("ZodIntersection",(e,t)=>{tI.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,i=t5(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=t5(o.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length;n.allOf=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]]})(e,t,n,r)}),n3=w("ZodRecord",(e,t)=>{tC.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;n.type="object";let i=o.keyType,a=i._zod.bag,s=a?.patterns;if("loose"===o.mode&&s&&s.size>0){let e=t5(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},s))n.patternProperties[t.source]=e}
37else"draft-07"!==t.target&&"draft-2020-12"!==t.target||(n.propertyNames=t5(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),n.additionalProperties=t5(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let c=i._zod.values;if(c){let e=[...c].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e)}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),n9=w("ZodEnum",(e,t)=>{tT.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{let r=x(e._zod.def.entries);r.every(e=>"number"==typeof e)&&(n.type="number"),r.every(e=>"string"==typeof e)&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let o={};for(let r of e){if(!n.has(r))throw Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new n9({...t,checks:[],...B(r),entries:o})},e.exclude=(e,r)=>{let o={...t.entries};for(let t of e){if(!n.has(t))throw Error(`Key ${t} not found in enum`);delete o[t]}return new n9({...t,checks:[],...B(r),entries:o})}}),n6=w("ZodTransform",(e,t)=>{tA.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new S(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(q(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(q(r)))};let o=t.transform(n.value,n);return o instanceof Promise?o.then(e=>(n.value=e,n)):(n.value=o,n)}}),n5=w("ZodOptional",(e,t)=>{tP.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nn(e,t,0,r),e.unwrap=()=>e._zod.def.innerType});function n8(e){return new n5({type:"optional",innerType:e})}let n7=w("ZodExactOptional",(e,t)=>{tN.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nn(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}),re=w("ZodNullable",(e,t)=>{tD.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,i=t5(o.innerType,t,r),a=t.seen.get(e);"openapi-3.0"===t.target?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rt(e){return new re({type:"nullable",innerType:e})}let rn=w("ZodDefault",(e,t)=>{t$.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;t5(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),rr=w("ZodPrefault",(e,t)=>{tj.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;t5(o.innerType,t,r),t.seen.get(e).ref=o.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ro=w("ZodNonOptional",(e,t)=>{tM.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;t5(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}),ri=w("ZodCatch",(e,t)=>{tF.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o,i=e._zod.def;t5(i.innerType,t,r),t.seen.get(e).ref=i.innerType;try{o=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=o})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),ra=w("ZodPipe",(e,t)=>{tZ.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def,i="input"===t.io?"transform"===o.in._zod.def.type?o.out:o.in:o.out;t5(i,t,r),t.seen.get(e).ref=i})(e,t,0,r),e.in=t.in,e.out=t.out});function rs(e,t){return new ra({type:"pipe",in:e,out:t})}let rc=w("ZodReadonly",(e,t)=>{tV.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let o=e._zod.def;t5(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ru=w("ZodCustom",(e,t)=>{tK.init(e,t),nb.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,e)});function rl(e,t){let n=B(t);return n.abort??(n.abort=!0),new ru({type:"custom",check:"custom",fn:()=>!0,...n})}function rp(e,t){return void 0===t&&(t="Invalid link"),nk().refine(function(t){return e(t)},{message:t})}var rd,rf,rh=n1({name:nk().optional(),source:nk().optional()}).loose(),rm=n1({code:nk().optional(),reason:nk().optional()}).loose(),rg=n1({reason:nk(),code:nk(),customerMessage:n1({title:nk().optional(),text:nk().optional()}).loose().optional()}).loose(),ry=n1({longId:nk().optional(),shortId:nk().optional(),transactionId:nk().optional(),pspId:nk().optional(),systemId:nk().optional(),institutionId:nk().optional()}).loose(),rv=n1({language:nk().optional(),hostedVersion:nk().optional(),primaryColor:nk().optional()}).loose(),r_=n1({reference:nk().optional(),amount:new nV({type:"number",checks:[],...B(rf)}
37),currency:nk()}).loose(),rb=n1({enabled:nW().optional().default(!0),globalContext:new n3({type:"record",keyType:nk(),valueType:nq(),...B(void 0)}).optional()}),rE=n1({env:nk().min(1,"env is a required field"),longId:nk().optional(),preload:nQ(nk()).optional().default([]),telemetry:rb.optional(),onBeforeError:rl().optional(),onBeforeCharge:rl().optional(),onListRefetch:rl().optional(),onPaymentSuccess:rl().optional(),onValidationInfo:rl().optional(),onPaymentFailure:rl().optional(),onBeforeProviderRedirect:rl().optional(),onComponentListChange:rl().optional(),setStyles:rl().optional(),onPaymentDeclined:rl().optional(),onReady:rl().optional(),refetchListBeforeCharge:nW().optional()});let rw="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,rk=globalThis,rS="10.43.0";function rO(){return rx(rk),rk}function rx(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||rS,t[rS]=t[rS]||{}}function rI(e,t,n=rk){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[rS]=r[rS]||{};return o[e]||(o[e]=t())}let rR=["debug","info","warn","error","log","assert","trace"],rC={};function rT(e){if(!("console"in rk))return e();let t=rk.console,n={},r=Object.keys(rC);r.forEach(e=>{let r=rC[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function rA(e,...t){rw&&function(){return rw?rI("loggerSettings",()=>({enabled:!1})):{enabled:!1}}().enabled&&rT(()=>{rk.console[e](`Sentry Logger [${e}]:`,...t)})}let rz={log:function(...e){rA("log",...e)},warn:function(...e){rA("warn",...e)},error:function(...e){rA("error",...e)}},rP=/\(error: (.*)\)/,rN=/captureMessage|captureException/;function rD(e){return e[e.length-1]||{}}let r$="<anonymous>";function rL(e){try{return e&&"function"==typeof e&&e.name||r$}catch{return r$}}function rj(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function rM(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}let rU={},rF={};function rZ(e,t){rU[e]=rU[e]||[],rU[e].push(t)}function rB(e,t){if(!rF[e]){rF[e]=!0;try{t()}catch(t){rw&&rz.error(`Error while instrumenting ${e}`,t)}}}function rV(e,t){let n=e&&rU[e];if(n)for(let r of n)try{r(t)}catch(t){rw&&rz.error(`Error while triggering instrumentation handler.
38Type: ${e}
39Name: ${rL(r)}
40Error:`,t)}}let rJ=null;function rK(){rJ=rk.onerror,rk.onerror=function(e,t,n,r,o){return rV("error",{column:r,error:o,line:n,msg:e,url:t}),!!rJ&&rJ.apply(this,arguments)},rk.onerror.__SENTRY_INSTRUMENTED__=!0}let rG=null;function rW(){rG=rk.onunhandledrejection,rk.onunhandledrejection=function(e){return rV("unhandledrejection",e),!rG||rG.apply(this,arguments)},rk.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let rH=Object.prototype.toString;function rq(e){switch(rH.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return r6(e,Error)}}function rY(e,t){return rH.call(e)===`[object ${t}]`}function rX(e){return rY(e,"ErrorEvent")}function rQ(e){return rY(e,"DOMError")}function r0(e){return rY(e,"String")}function r1(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function r2(e){return null===e||r1(e)||"object"!=typeof e&&"function"!=typeof e}function r4(e){return rY(e,"Object")}function r3(e){return"undefined"!=typeof Event&&r6(e,Event)}function r9(e){return!!(e?.then&&"function"==typeof e.then)}function r6(e,t){try{return e instanceof t}catch{return!1}}function r5(e){return!("object"!=typeof e||null===e||!(e.__isVue||e._isVue||e.__v_isVNode))}function r8(e){return"undefined"!=typeof Request&&r6(e,Request)}function r7(e,t={}){if(!e)return"<unknown>";try{let n,r=e,o=[],i=0,a=0,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;r&&i++<5&&(n=function(e,t){let n=[];if(!e?.tagName)return"";if(rk.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}n.push(e.tagName.toLowerCase());let r=t?.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;
40if(r?.length)r.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{e.id&&n.push(`#${e.id}`);let t=e.className;if(t&&r0(t))for(let e of t.split(/\s+/))n.push(`.${e}`)}for(let t of["aria-label","type","name","title","alt"]){let r=e.getAttribute(t);r&&n.push(`[${t}="${r}"]`)}return n.join("")}(r,s),!("html"===n||i>1&&a+3*o.length+n.length>=c));)o.push(n),a+=n.length,r=r.parentNode;return o.reverse().join(" > ")}catch{return"<unknown>"}}function oe(){try{return rk.document.location.href}catch{return""}}function ot(e,t,n){if(!(t in e))return;let r=e[t];if("function"!=typeof r)return;let o=n(r);"function"==typeof o&&or(o,r);try{e[t]=o}catch{rw&&rz.log(`Failed to replace method "${t}" in object`,e)}}function on(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{rw&&rz.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function or(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,on(e,"__sentry_original__",t)}catch{}}function oo(e){return e.__sentry_original__}function oi(e){if(rq(e))return{message:e.message,name:e.name,stack:e.stack,...os(e)};if(r3(e)){let t={type:e.type,target:oa(e.target),currentTarget:oa(e.currentTarget),...os(e)};return"undefined"!=typeof CustomEvent&&r6(e,CustomEvent)&&(t.detail=e.detail),t}return e}function oa(e){try{return"undefined"!=typeof Element&&r6(e,Element)?r7(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function os(e){if("object"==typeof e&&null!==e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function oc(e){if(void 0!==r)return r?r(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__");return t in rk&&"function"==typeof rk[t]?(r=rk[t])(e):(r=null,e())}function ou(){return oc(()=>Math.random())}function ol(){return oc(()=>Date.now())}function op(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function od(e,t){if(!Array.isArray(e))return"";let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{r5(r)?n.push(rM(r)):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function of(e,t,n=!1){return!!r0(e)&&(rY(t,"RegExp")?t.test(e):!!r0(t)&&(n?e===t:e.includes(t)))}function oh(e,t=[],n=!1){return t.some(t=>of(e,t,n))}function om(e=rk.crypto||rk.msCrypto){try{if(e?.randomUUID)return oc(()=>e.randomUUID()).replace(/-/g,"")}catch{}return o||(o="10000000100040008000100000000000"),o.replace(/[018]/g,e=>(e^(16*ou()&15)>>e/4).toString(16))}function og(e){return e.exception?.values?.[0]}function oy(e){let{message:t,event_id:n}=e;if(t)return t;let r=og(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function ov(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function o_(e,t){let n=og(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){let e={...r?.data,...t.data};n.mechanism.data=e}}function ob(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{on(e,"__sentry_captured__",!0)}catch{}return!1}function oE(){return ol()/1e3}function ow(){return(i??(i=function(){let{performance:e}=rk;if(!e?.now||!e.timeOrigin)return oE;let t=e.timeOrigin;return()=>(t+oc(()=>e.now()))/1e3}()))()}function ok(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ow(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:om()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function oS(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=oS(r[e],t[e],n-1));return r}function oO(){return om().substring(16)}let ox="_sentrySpan";function oI(e,t){t?on(e,ox,t):delete e[ox]}class oR{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:om(),sampleRand:ou()}}clone(){let e=new oR;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,oI(e,this[ox]),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&ok(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e,{tags:n,attributes:r,extra:o,user:i,contexts:a,level:s,fingerprint:c=[],propagationContext:u,conversationId:l}=(t instanceof oR?t.getScopeData():r4(t)?e:void 0)||{};return this._tags={...this._tags,...n},this._attributes={...this._attributes,...r},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),s&&(this._level=s),c.length&&(this._fingerprint=c),u&&(this._propagationContext=u),l&&(this._conversationId=l),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,oI(this,void 0),this._attachments=[],this.setPropagationContext({traceId:om(),sampleRand:ou()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n="number"==typeof t?t:100;if(n<=0)return this;let r={timestamp:oE(),...e,message:e.message?op(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:this[ox],conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=oS(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||om();if(!this._client)return rw&&rz.warn("No client configured on scope - will not capture exception!"),n;let r=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||om();if(!this._client)return rw&&rz.warn("No client configured on scope - will not capture message!"),r;let o=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){let n=e.event_id||t?.event_id||om();return this._client?this._client.captureEvent(e,{...t,event_id:n},this):rw&&rz.warn("No client configured on scope - will not capture event!"),n}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
40h(e=>{e(this)}),this._notifyingListeners=!1)}}class oC{constructor(e,t){let n,r;n=e||new oR,r=t||new oR,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t,n=this._pushScope();try{t=e(n)}catch(e){throw this._popScope(),e}return r9(t)?t.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function oT(){let e=rx(rO());return e.stack=e.stack||new oC(rI("defaultCurrentScope",()=>new oR),rI("defaultIsolationScope",()=>new oR))}function oA(e){return oT().withScope(e)}function oz(e,t){let n=oT();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function oP(e){return oT().withScope(()=>e(oT().getIsolationScope()))}function oN(e){let t=rx(e);return t.acs?t.acs:{withIsolationScope:oP,withScope:oA,withSetScope:oz,withSetIsolationScope:(e,t)=>oP(t),getCurrentScope:()=>oT().getScope(),getIsolationScope:()=>oT().getIsolationScope()}}function oD(){return oN(rO()).getCurrentScope()}function o$(){return oN(rO()).getIsolationScope()}function oL(){return oD().getClient()}let oj="sentry.profile_id",oM="sentry.exclusive_time";function oU(e){return{scope:e._sentryScope,isolationScope:function(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}(e._sentryIsolationScope)}}let oF=/^sentry-/;function oZ(e){return e.split(",").map(e=>{let t=e.indexOf("=");return -1===t?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let oB=/^o(\d+)\./,oV=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function oJ(e,t=!1){let{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`}function oK(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}let oG=!1;function oW(e){return"number"==typeof e?oH(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?oH(e.getTime()):ow()}function oH(e){return e>0x2540be3ff?e/1e3:e}function oq(e){if("function"==typeof e.getSpanJSON)return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status){let{attributes:r,startTime:o,name:i,endTime:a,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0,start_timestamp:oW(o),timestamp:oW(a)||void 0,status:function(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}
40(s),op:r["sentry.op"],origin:r["sentry.origin"],links:c&&c.length>0?c.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function oY(e){return e._sentryRootSpan||e}function oX(){oG||(rT(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),oG=!0)}function oQ(e){rz.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function o0(e,t){if(!t?.length||!e.description)return!1;for(let r of t){var n;if("string"==typeof(n=r)||n instanceof RegExp){if(of(e.description,r))return rw&&oQ(e),!0;continue}if(!r.name&&!r.op)continue;let t=!r.name||of(e.description,r.name),o=!r.op||e.op&&of(e.op,r.op);if(t&&o)return rw&&oQ(e),!0}return!1}let o1="production";function o2(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||o1,release:n.release,public_key:r,trace_id:e,org_id:function(e){let t,n=e.getOptions(),{host:r}=e.getDsn()||{};return n.orgId?t=String(n.orgId):r&&(t=function(e){let t=e.match(oB);return t?.[1]}(r)),t}(t)};return t.emit("createDsc",o),o}function o4(e,t=100,r=1/0){try{return function e(t,r,o=1/0,i=1/0,a=function(){let e=new WeakSet;return[function(t){return!!e.has(t)||(e.add(t),!1)},function(t){e.delete(t)}]}()){let[s,c]=a;if(null==r||["boolean","string"].includes(typeof r)||"number"==typeof r&&Number.isFinite(r))return r;let u=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==n.g&&t===n.g)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(r5(t))return rM(t);if(r4(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${rL(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;let r=function(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}}(t,r);if(!u.startsWith("[object "))return u;if(r.__sentry_skip_normalization__)return r;let l="number"==typeof r.__sentry_override_normalization_depth__?r.__sentry_override_normalization_depth__:o;if(0===l)return u.replace("object ","");if(s(r))return"[Circular ~]";if(r&&"function"==typeof r.toJSON)try{return e("",r.toJSON(),l-1,i,a)}catch{}let p=Array.isArray(r)?[]:{},d=0,f=oi(r);for(let t in f){if(!Object.prototype.hasOwnProperty.call(f,t))continue;if(d>=i){p[t]="[MaxProperties ~]";break}let n=f[t];p[t]=e(t,n,l-1,i,a),d++}return c(r),p}("",e,t,r)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function o3(e,t=[]){return[e,t]}function o9(e,t){for(let n of e[1])if(t(n,n[0].type))return!0;return!1}function o6(e){let t=rx(rk);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}let o5={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function o8(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function o7(e){return new it(t=>{t(e)})}function ie(e){return new it((t,n)=>{n(e)})}class it{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new it((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new it((t,n)=>{let r,o;return this.then(t=>{o=!1,r=t,e&&e()},t=>{o=!0,r=t,e&&e()}).then(()=>{o?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;let e=this._handlers.slice();
40this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){let t=(e,t)=>{0===this._state&&(r9(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function ir(e,t){let{extra:n,tags:r,attributes:o,user:i,contexts:a,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:p,attachments:d,propagationContext:f,transactionName:h,span:m}=t;io(e,"extra",n),io(e,"tags",r),io(e,"attributes",o),io(e,"user",i),io(e,"contexts",a),e.sdkProcessingMetadata=oS(e.sdkProcessingMetadata,c,2),s&&(e.level=s),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),p.length&&(e.eventProcessors=[...e.eventProcessors,...p]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function io(e,t,n){e[t]=oS(e[t],n,1)}function ii(e,t){let n=rI("globalScope",()=>new oR).getScopeData();return e&&ir(n,e.getScopeData()),t&&ir(n,t.getScopeData()),n}function ia(e,t){return oD().captureEvent(e,t)}function is(e){let t=o$(),{user:n}=ii(t,oD()),{userAgent:r}=rk.navigator||{},o=function(e){let t=ow(),n={sid:om(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>({sid:`${n.sid}`,init:n.init,started:new Date(1e3*n.started).toISOString(),timestamp:new Date(1e3*n.timestamp).toISOString(),status:n.status,errors:n.errors,did:"number"==typeof n.did||"string"==typeof n.did?`${n.did}`:void 0,duration:n.duration,abnormal_mechanism:n.abnormal_mechanism,attrs:{release:n.release,environment:n.environment,ip_address:n.ipAddress,user_agent:n.userAgent}})};return e&&ok(n,e),n}({user:n,...r&&{userAgent:r},...e}),i=t.getSession();return"ok"===i?.status&&ok(i,{status:"exited"}),ic(),t.setSession(o),o}function ic(){let e,t=o$(),n=oD().getSession()||t.getSession();n&&(e={},"ok"===n.status&&(e={status:"exited"}),ok(n,e)),iu(),t.setSession()}function iu(){let e=o$(),t=oL(),n=e.getSession();n&&t&&t.captureSession(n)}function il(e=!1){e?ic():iu()}let ip=[];function id(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function ih(e,t,n){if(n[t.name])rw&&rz.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,ip.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),ip.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}rw&&rz.log(`Integration installed: ${t.name}`)}}function im(e,t){let n=t??ig().get(e)??[];if(0===n.length)return;let r=e.getOptions(),o=function(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=oJ(r)),o3(o,[[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]])}(n,r._metadata,r.tunnel,e.getDsn());ig().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function ig(){return rI("clientToLogBufferMap",()=>new WeakMap)}function iy(e,t){let n=t??iv().get(e)??[];if(0===n.length)return;let r=e.getOptions(),o=function(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=oJ(r)),o3(o,[[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]])}(n,r._metadata,r.tunnel,e.getDsn());iv().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function iv(){return rI("clientToMetricBufferMap",()=>new WeakMap)}function i_(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}let ib=Symbol.for("SentryBufferFullError");function iE(e=100){let t=new Set;return{get $(){return Array.from(t)},add:function(n){if(!(t.size<e))return ie(ib);let r=n();return t.add(r),r.then(()=>{t.delete(r)},()=>{t.delete(r)}),r},drain:function(e){if(!t.size)return o7(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);return e?Promise.race([n,new Promise(t=>i_(setTimeout(()=>t(!1),e)))]):n}}}function iw(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}let ik="Not capturing exception because it's already been captured.",iS="Discarded session because of missing or non-string release",iO=Symbol.for("SentryInternalError"),ix=Symbol.for("SentryDoNotSendEventError");function iI(e){return{message:e,[iO]:!0}}function iR(e){return{message:e,[ix]:!0}}function iC(e){return!!e&&"object"==typeof e&&iO in e}function iT(e){return!!e&&"object"==typeof e&&ix in e}function iA(e,t,n,r,o){let i,a=0,s=!1;e.on(n,()=>{a=0,clearTimeout(i),s=!1}),e.on(t,t=>{(a+=r(t))>=8e5?o(e):s||(s=!0,i=i_(setTimeout(()=>{o(e)},5e3)))}),e.on("flush",()=>{o(e)})}class iz{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=iE(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=function(e){let t="string"==typeof e?function(e){let t=oV.exec(e);if(!t)return void rT(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});let[n,r,o="",i="",a="",s=""]=t.slice(1),c="",u=s,l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){let e=u.match(/^\d+/);e&&(u=e[0])}return oK({host:i,pass:o,path:c,projectId:u,port:a,protocol:n,publicKey:r})}(e):oK(e);if(t&&function(e){if(!rw)return!0;let{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(rz.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?"http"===r||"https"===r?t&&isNaN(parseInt(t,10))&&(rz.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(rz.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(rz.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):rw&&rz.warn("No DSN provided, client will not send events."),this._dsn){let t=function(e,t,n){return t||`${function(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/?${function(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()}(e,n)}`}(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&&iA(this,"afterCaptureLog","flushLogs",iL,im),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&iA(this,"afterCaptureMetric","flushMetrics",i$,iy)}captureException(e,t,n){let r=om();if(ob(e))return rw&&rz.log(ik),r;let o={event_id:r,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,n)).then(e=>e),"error"),o.event_id}captureMessage(e,t,n,r){let o={event_id:om(),...n},i=r1(e)?e:String(e),a=r2(e),s=a?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(()=>s.then(e=>this._captureEvent(e,o,r)),a?"unknown":"error"),o.event_id}captureEvent(e,t,n){let r=om();if(t?.originalException&&ob(t.originalException))return rw&&rz.log(ik),r;let o={event_id:r,...t},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,s=i.capturedSpanIsolationScope,c=iP(e.type);return this._process(()=>this._captureEvent(e,o,a||n,s),c),o.event_id}captureSession(e){this.sendSession(e),ok(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(!t)return!0;
40this.emit("flush");let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){im(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];ih(this,e,this._integrations),t||id(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){let o=o8(n),i=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return;let n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);let a=function(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:oJ(r)},...o&&{trace:o}}}(e,o,r,t);return delete e.sdkProcessingMetadata,o3(a,[[{type:i},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=function(e,t){let[n,r]=e;return[n,[...r,t]]}(n,function(e){let t="string"==typeof e.data?o6(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}(e));this.sendEnvelope(n).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){let{release:t,environment:n=o1}=this._options;if("aggregates"in e){let r=e.attrs||{};if(!r.release&&!t)return void(rw&&rz.warn(iS));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(rw&&rz.warn(iS));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);let r=function(e,t,n,r){let o=o8(n);return o3({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:oJ(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(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}`;rw&&rz.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 rw&&rz.error("Error while sending envelope:",e),{}}return rw&&rz.error("Transport disabled"),{}}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&ih(e,t,n)}),n}(this,e),id(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1,o=t.exception?.values;if(o){for(let e of(r=!0,n=!1,o))if(!1===e.mechanism?.handled){n=!0;break}}let i="ok"===e.status;(i&&0===e.errors||i&&n)&&(ok(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!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){let o=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i?.length&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),(function(e,t,n,r,o,i){let{normalizeDepth:l=3,normalizeMaxBreadth:p=1e3}=e,d={...t,event_id:t.event_id||n.event_id||om(),timestamp:t.timestamp||oE()},f=n.integrations||e.integrations.map(e=>e.name);!function(e,t){let{environment:n,release:r,dist:o,maxValueLength:i}=t;e.environment=e.environment||n||o1,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let a=e.request;a?.url&&i&&(a.url=op(a.url,i)),i&&e.exception?.values?.forEach(e
40=>{e.value&&(e.value=op(e.value,i))})}(d,e),f.length>0&&(d.sdk=d.sdk||{},d.sdk.integrations=[...d.sdk.integrations||[],...f]),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){let n=function(e){let t=rk._sentryDebugIds,n=rk._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(u&&r.length===s&&o.length===c)return u;s=r.length,c=o.length,u={},a||(a={});let i=(t,n)=>{for(let r of t){let t=n[r],o=a?.[r];if(o&&u&&t)u[o[0]]=t,a&&(a[r]=[o[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let o=n[e],i=o?.filename;if(i&&u&&a){u[i]=t,a[r]=[i,t];break}}}}};return t&&i(r,t),n&&i(o,n),u}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(d,e.stackParser);let h=function(e,t){if(!t)return e;let n=e?e.clone():new oR;return n.update(t),n}(r,n.captureContext);n.mechanism&&o_(d,n.mechanism);let m=o?o.getEventProcessors():[],g=ii(i,h),y=[...n.attachments||[],...g.attachments];y.length&&(n.attachments=y),function(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){let{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),a&&(e.level=a),s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:function(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:oq(e).parent_span_id,i=oU(e).scope;return{parent_span_id:o,span_id:r?i?.getPropagationContext().propagationSpanId||oO():t,trace_id:n}}(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e){let t=oL();if(!t)return{};let n=oY(e),r=oq(n),o=r.data,i=n.spanContext().traceState,a=i?.get("sentry.sample_rate")??o["sentry.sample_rate"]??o["sentry.previous_trace_sample_rate"];function s(e){return"number"!=typeof a&&"string"!=typeof a||(e.sample_rate=`${a}`),e}let c=n._frozenDsc;if(c)return s(c);let u=i?.get("sentry.dsc"),l=u&&function(e){let t=function(e){if(e&&(r0(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>(Object.entries(oZ(t)).forEach(([t,n])=>{e[t]=n}),e),{}):oZ(e)}(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(oF)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}(u);if(l)return s(l);let p=o2(e.spanContext().traceId,t),d=o["sentry.source"],f=r.description;return"url"!==d&&f&&(p.transaction=f),function(){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let e=oL()?.getOptions();return!(!e||null==e.tracesSampleRate&&!e.tracesSampler)}()&&(p.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return 1===t}(n)),p.sample_rand=i?.get("sentry.sample_rand")??oU(n).scope?.getPropagationContext().sampleRand.toString()),s(p),t.emit("createDsc",p,n),p}(t),...e.sdkProcessingMetadata};let n=oq(oY(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],n&&(e.fingerprint=e.fingerprint.concat(n)),e.fingerprint.length||delete e.fingerprint,function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...i}}(d,g);let v=[...m,...g.eventProcessors];return(n.data&&!0===n.data.__sentry__?o7(d):function(e,t,n,r=0){try{let o=function e(t,n,r,o){let i=r[o];if(!t||!i)return t;let a=i({...t},n);return rw&&null===a&&rz.log(`Event processor "${i.id||"?"}" dropped event`),r9(a)?a.then(t=>e(t,n,r,o+1)):e(a,n,r,o+1)}(t,n,e,r);return r9(o)?o:o7(o)}catch(e){return ie(e)}}(v,d,n)).then(e=>(e&&function(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)})}),0===Object.keys(t).length)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})})}(e),"number"==typeof l&&l>0?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:o4(e.data,t,n)}}))},...e.user&&{user:o4(e.user,t,n)},...e.contexts&&{contexts:o4(e.contexts,t,n)},...e.extra&&{extra:o4(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=o4(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:o4(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=o4(e.contexts.flags,3,n)),r}(e,l,p):e))})(o,e,t,n,this,r).then(e=>
40(null===e||(this.emit("postprocessEvent",e,t),e.contexts={trace:{...e.contexts?.trace,...function(e){let{traceId:t,parentSpanId:n,propagationSpanId:r}=e.getPropagationContext(),o={trace_id:t,span_id:r||oO()};return n&&(o.parent_span_id=n),o}(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||o2(n.traceId,e)}(this,n),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},n=oD(),r=o$()){return rw&&iN(e)&&rz.log(`Captured error event \`${iw(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{rw&&(iT(e)?rz.log(e.message):iC(e)?rz.warn(e.message):rz.warn(e))})}_processEvent(e,t,n,r){let o=this.getOptions(),{sampleRate:i}=o,a=iD(e),s=iN(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);let t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}(i);if(s&&"number"==typeof u&&ou()>u)return this.recordDroppedEvent("sample_rate","error"),ie(iR(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let l=iP(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l),iR("An event processor returned `null`, will not send event.");if(t.data&&!0===t.data.__sentry__)return e;var n=function(e,t,n,r){let{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:a,ignoreSpans:s}=t,c=n;if(iN(c)&&o)return o(c,r);if(iD(c)){if(a||s){let t=function(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:a,op:s}=e.contexts?.trace??{};return{data:a??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:a?.[oj],exclusive_time:a?.[oM],measurements:e.measurements,is_segment:!0}}(c);if(s?.length&&o0(t,s))return null;if(a){let e=a(t);e?c=oS(n,{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&&{[oj]:e.profile_id},...e.exclusive_time&&{[oM]:e.exclusive_time}}}},measurements:e.measurements}):oX()}if(c.spans){let t=[],n=c.spans;for(let e of n)if(s?.length&&o0(e,s)){let t=e.parent_span_id,r=e.span_id;if(t)for(let e of n)e.parent_span_id===r&&(e.parent_span_id=t)}else if(a){let n=a(e);n?t.push(n):(oX(),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(i){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(c,r)}}return c}(this,o,e,t);let r=`${c} must return \`null\` or a valid event.`;if(r9(n))return n.then(e=>{if(!r4(e)&&null!==e)throw iI(r);return e},e=>{throw iI(`${c} rejected with ${e}`)});if(!r4(n)&&null!==n)throw iI(r);return n}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",l),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw iR(`${c} returned \`null\`, will not send event.`)}let i=n.getSession()||r.getSession();if(s&&i&&this._updateSessionFromEvent(i,o),a){let e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}let u=o.transaction_info;return a&&u&&o.transaction!==e.transaction&&(o.transaction_info={...u,source:"custom"}),this.sendEvent(o,t),o}).then(null,e=>{if(iT(e)||iC(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),iI(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
41Reason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===ib&&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(){var e;rw&&rz.log("Flushing outcomes...");let t=this._clearOutcomes();if(0===t.length)return void(rw&&rz.log("No outcomes to send"));if(!this._dsn)return void(rw&&rz.log("No dsn provided, will not send outcomes"));rw&&rz.log("Sending outcomes:",t);let n=o3((e=this._options.tunnel&&oJ(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:oE(),discarded_events:t}]]);this.sendEnvelope(n)}}function iP(e){return"replay_event"===e?"replay":e||"error"}function iN(e){return void 0===e.type}function iD(e){return"transaction"===e.type}function i$(e){let t=0;return e.name&&(t+=2*e.name.length),(t+=8)+ij(e.attributes)}function iL(e){let t=0;return e.message&&(t+=2*e.message.length),t+ij(e.attributes)}function ij(e){if(!e)return 0;let t=0;
41return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*iM(e[0]):r2(e)?t+=iM(e):t+=100}),t}function iM(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:4*("boolean"==typeof e)}function iU(e){return rq(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function iF(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 iZ(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function iB(e,t){let n=oL(),r=o$();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=100}=n.getOptions();if(i<=0)return;let a={timestamp:oE(),...e},s=o?rT(()=>o(a,t)):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,i))}let iV=new WeakMap,iJ=[/^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. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/];function iK(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:iJ],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function iG(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return rw&&rz.error(`Cannot extract url for event ${oy(e)}`),null}}function iW(e){return Array.isArray(e.errors)}function iH(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...iW(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function iq(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function iY(){"console"in rk&&rR.forEach(function(e){e in rk.console&&ot(rk.console,e,function(t){return rC[e]=t,function(...t){rV("console",{args:t,level:e});let n=rC[e];n?.apply(rk.console,t)}})})}function iX(e,t){let n=rj(e),r=rj(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],o=n[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function iQ(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function i0(e){return e.exception?.values?.[0]}function i1(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function i2(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function i4(e,t){return!!e&&"object"==typeof e&&!!e[t]}function i3(e){return"string"==typeof e?e:e?i4(e,"url")?e.url:e.toString?e.toString():"":""}let i9=0;function i6(e,t={}){if("function"!=typeof e)return e;try{let t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(oo(e))return e}catch{return e}let n=function(...n){try{let r=n.map(e=>i6(e,t));return e.apply(this,r)}catch(e){throw i9++,setTimeout(()=>{i9--}),function(...e){let t=oN(rO());if(2===e.length){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(r=>{r.addEventProcessor(e=>(t.mechanism&&(ov(e,void 0),o_(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),oD().captureException(e,void 0)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}or(n,e),on(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function i5(e,t){let n=i7(e,t),r={type:function(e){let t=e?.name;return!t&&at(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}(t),value:function(e){let t=e?.message;return at(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?iU(t.error):iU(e):"No error message"}(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function i8(e,t){return{exception:{values:[i5(e,t)]}}}function i7(e,t){let n=t.stacktrace||t.stack||"",r=t&&ae.test(t.message)?1:0,o="number"==typeof t.framesToPop?t.framesToPop:0;try{return e(n,r,o)}catch{}return[]}let ae=/Minified React error #\d+;/i;function at(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function an(e,t,n,r,o){let i;if(rX(t)&&t.error)return i8(e,t.error);if(rQ(t)||rY(t,"DOMException")){if("stack"in t)i=i8(e,t);else{let o=t.name||(rQ(t)?"DOMError":"DOMException"),a=t.message?`${o}: ${t.message}`:o;ov(i=ar(e,a,n,r),a)}return"code"in t&&(i.tags={...i.tags,"DOMException.code":`${t.code}`}),i}return rq(t)?i8(e,t):(r4(t)||r3(t)?o_(i=function(e,t,n,r){let o=oL(),i=o?.getOptions().normalizeDepth,a=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:function e(t,n=3,r=102400){let o=o4(t,n);return~-encodeURI(JSON.stringify(o)).split(/%..|./).length>r?e(t,n-1,r):o}(t,i)};if(a)return{exception:{values:[i5(e,a)]},extra:s};let c={exception:{values:[{type:r3(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let n=function(e){let t=Object.keys(oi(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return rX(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:r3(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=i7(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,o),{synthetic:!0}):(ov(i=ar(e,t,n,r),`${t}`),o_(i,{synthetic:!0})),i)}function ar(e,t,n,r){let o={};if(r&&n){let r=i7(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),o_(o,{synthetic:!0})}
41if(r1(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}class ao extends iz{constructor(e){let t={release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:rk.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e};!function(e,t,n=[t],r="npm"){let o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:rS})),o.version=rS)}(t,"browser",["browser"],rk.SENTRY_SDK_SOURCE||"npm"),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:o,_experiments:i,enableMetrics:a}=this._options,s=a??i?.enableMetrics??!0;rk.document&&(r||o||s)&&rk.document.addEventListener("visibilitychange",()=>{"hidden"===rk.document.visibilityState&&(r&&this._flushOutcomes(),o&&im(this),s&&iy(this))}),n&&this.on("beforeSendSession",iZ)}eventFromException(e,t){return function(e,t,n,r){let o=an(e,t,n?.syntheticException||void 0,r);return o_(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),o7(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){let i=ar(e,t,r?.syntheticException||void 0,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),o7(i)}(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)}}let ai="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function aa(){if(!rk.document)return;let e=rV.bind(null,"dom"),t=as(e,!0);rk.document.addEventListener("click",t,!1),rk.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{let n=rk[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(ot(n,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){let r=as(e);i.handler=r,t.call(this,n,r,o)}i.refCount++}catch{}return t.call(this,n,r,o)}}),ot(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{let n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function as(e,t=!1){return n=>{var r;if(!n||n._sentryCaptured)return;let o=function(e){try{return e.target}catch{return null}}(n);if(r=n.type,"keypress"===r&&(!o?.tagName||"INPUT"!==o.tagName&&"TEXTAREA"!==o.tagName&&!o.isContentEditable))return;on(n,"_sentryCaptured",!0),o&&!o._sentryId&&on(o,"_sentryId",om());let i="keypress"===n.type?"input":n.type;!function(e){if(e.type!==d)return!1;try{if(!e.target||e.target._sentryId!==f)return!1}catch{}return!0}(n)&&(e({event:n,name:i,global:t}),d=n.type,f=o?o._sentryId:void 0),clearTimeout(p),p=rk.setTimeout(()=>{f=void 0,d=void 0},1e3)}}function ac(e){let t="history";rZ(t,e),rB(t,au)}function au(){function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=h,o=function(e){try{return new URL(e,rk.location.origin).toString()}catch{return e}}(String(n));if(h=o,r===o)return e.apply(this,t);rV("history",{from:r,to:o})}return e.apply(this,t)}}rk.addEventListener("popstate",()=>{let e=rk.location.href,t=h;h=e,t!==e&&rV("history",{from:t,to:e})}),"history"in rk&&rk.history&&(ot(rk.history,"pushState",e),ot(rk.history,"replaceState",e))}let al={},ap="__sentry_xhr_v3__";function ad(){if(!rk.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),o=1e3*ow(),i=r0(n[0])?n[0].toUpperCase():void 0,a=function(e){if(r0(e))return e;try{return e.toString()}catch{}}(n[1]);if(!i||!a)return e.apply(t,n);t[ap]={method:i,url:a,request_headers:{}},"POST"===i&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[ap];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}rV("xhr",{endTimestamp:1e3*ow(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener("readystatechange",s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,o]=n,i=t[ap];return i&&r0(r)&&r0(o)&&(i.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[ap];return r&&(void 0!==n[0]&&(r.body=n[0]),rV("xhr",{startTimestamp:1e3*ow(),xhr:t})),e.apply(t,n)}})}function af(e,t=function(e){let t=al[e];if(t)return t;let n=rk[e];
41if(i2(n))return al[e]=n.bind(rk);let r=rk.document;if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){ai&&rz.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?al[e]=n.bind(rk):n}("fetch")){let n=0,r=0;return function(e,t,n=iE(e.bufferSize||64)){let r={};return{send:function(o){let i=[];if(o9(o,(t,n)=>{let o=o5[n];!function(e,t,n=ol()){return(e[t]||e.all||0)>n}(r,o)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",o)}),0===i.length)return Promise.resolve({});let a=o3(o[0],i),s=t=>{var n;(n=["client_report"],o9(a,(e,t)=>n.includes(t)))?rw&&rz.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`):o9(a,(n,r)=>{e.recordDroppedEvent(t,o5[r])})};return n.add(()=>t({body:function(e){let[t,n]=e,r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[o6(r),e]:r.push("string"==typeof e?o6(e):e)}for(let e of n){let[t,n]=e;if(o(`
42${JSON.stringify(t)}
43`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(o4(n))}o(e)}}return"string"==typeof r?r:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}(r)}(a)}).then(e=>(413===e.statusCode?(rw&&rz.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),s("send_error")):(rw&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&rz.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=ol()){let o={...e},i=n?.["x-sentry-rate-limits"],a=n?.["retry-after"];if(i)for(let e of i.trim().split(",")){let[t,n,,,i]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(let e of n.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(o[e]=r+s);else o.all=r+s}else a?o.all=r+function(e,t=ol()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(o.all=r+6e4);return o}(r,e)),e),e=>{throw s("network_error"),rw&&rz.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===ib)return rw&&rz.error("Skipped sending event because buffer is full."),s("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}(e,async function(o){let i=o.body.length;n+=i,r++;let a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,a);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 al.fetch=void 0,e}finally{n-=i,r--}},iE(e.bufferSize||40))}let ah="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function am(e,t,n,r){let o={filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}let ag=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ay=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,av=/\((\S*)(?::(\d+))(?::(\d+))\)/,a_=/at (.+?) ?\(data:(.+?),/,ab=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,aE=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,aw=function(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let o=[],i=e.split("\n");for(let e=n;e<i.length;e++){let n=i[e];n.length>1024&&(n=n.slice(0,1024));let a=rP.test(n)?n.replace(rP,"$1"):n;if(!a.match(/\S*Error: /)){for(let e of t){let t=e(a);if(t){o.push(t);break}}if(o.length>=50+r)break}}var a=o.slice(r);if(!a.length)return[];let s=Array.from(a);return/sentryWrapped/.test(rD(s).function||"")&&s.pop(),s.reverse(),rN.test(rD(s).function||"")&&(s.pop(),rN.test(rD(s).function||"")&&s.pop()),s.slice(0,50).map(e=>({...e,filename:e.filename||rD(s).filename,function:e.function||"?"}))}}([30,e=>{let t=e.match(a_);
43if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=ag.exec(e);if(n){let[,e,t,r]=n;return am(e,"?",+t,+r)}let r=ay.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){let e=av.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=ak(r[1]||"?",r[2]);return am(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{let t=ab.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=aE.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]=ak(n,e),am(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),ak=(e,t)=>{let n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},aS=["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"];function aO(e){return function(...t){let n=t[0];return t[0]=i6(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${rL(e)}`}}),e.apply(this,t)}}function ax(e){return function(t){return e.apply(this,[i6(t,{mechanism:{data:{handler:rL(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function aI(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&ot(n,e,function(t){let n={mechanism:{data:{handler:rL(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=oo(t);return r&&(n.mechanism.data.handler=rL(r)),i6(t,n)})}),e.apply(this,t)}}function aR(e){ah&&rz.log(`Global Handler attached: ${e}`)}function aC(){let e=oL();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}!function(e){e.ERROR="error",e.WARN="warning",e.INFO="info",e.DEBUG="debug"}(aZ||(aZ={}));var aT=new(function(){function e(e){this.level=e}return e.prototype.shouldLog=function(e){if("true"===new URLSearchParams(window.location.search).get("debug"))return!0;var t=[aZ.ERROR,aZ.WARN,aZ.INFO,aZ.DEBUG];return t.indexOf(e)<=t.indexOf(this.level)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.shouldLog(aZ.ERROR)&&console.error.apply(console,v(["[ERROR]:"],e,!1))},e.prototype.warning=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.shouldLog(aZ.WARN)&&console.warn.apply(console,v(["[WARN]:"],e,!1))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.shouldLog(aZ.INFO)&&console.info.apply(console,v(["[INFO]:"],e,!1))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.shouldLog(aZ.DEBUG)&&console.debug.apply(console,v(["[DEBUG]:"],e,!1))},e}())(localStorage.getItem("PAYONEER_CHECKOUT_WEB_LOG_LEVEL")||aZ.ERROR),aA=function(){function e(){this.initialized=!1,this.scope=null}return e.getInstance=function(){return null!=e.instance||(e.instance=new e),e.instance},e.prototype.init=function(e){var t=this;if(!this.initialized){var n,r,o,i,a=window.location.search.includes("debugSentry");if(a&&aT.info("Sentry initialized in debug mode"),a||"sandbox"===e||"live"===e)try{let a;this.scope=(r=(n={environment:e,beforeSend:function(e){return t.filterSensitiveData(e)}}).environment,o=new ao({dsn:"https://[email protected]/4509808082681857",transport:af,stackParser:aw,beforeSend:n.beforeSend,integrations:[((e={})=>({...((e={})=>{let t;return{name:"EventFilters",setup(n){t=iK(e,n.getOptions())},processEvent:(n,r,o)=>(t||(t=iK(e,o.getOptions())),!function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;let n=e.transaction;return!!n&&oh(n,t)}(e,t.ignoreTransactions))return rw&&rz.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
44Event: ${oy(e)}`),!0}else{var n;if(n=t.ignoreErrors,n?.length&&iw(e).some(e=>oh(e,n)))return rw&&rz.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
45Event: ${oy(e)}`),!0;if(e.exception?.values?.length&&!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))return rw&&rz.warn(`Event dropped due to not having an error message, error type or stacktrace.
46Event: ${oy(e)}`),!0;if(function(e,t){if(!t?.length)return!1;let n=iG(e);return!!n&&oh(n,t)}(e,t.denyUrls))return rw&&rz.warn(`Event dropped due to being matched by \`denyUrls\` option.
47Event: ${oy(e)}.
48Url: ${iG(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;let n=iG(e);return!n||oh(n,t)}(e,t.allowUrls))return rw&&rz.warn(`Event dropped due to not being matched by \`allowUrls\` option.
49Event: ${oy(e)}.
50Url: ${iG(e)}`),!0}return!1}(n,t)?n:null)}})(e),name:"InboundFilters"}))(),{name:"FunctionToString",setupOnce(){l=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=oo(this),n=iV.has(oL())&&void 0!==t?t:this;return l.apply(n,e)}}catch{}},setup(e){iV.set(e,!0)}},{name:"ConversationId",setup(e){e.on("spanStart",e=>
50{let t=oD().getScopeData(),n=o$().getScopeData(),r=t.conversationId||n.conversationId;r&&e.setAttribute("gen_ai.conversation.id",r)})}},((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&ot(rk,"setTimeout",aO),t.setInterval&&ot(rk,"setInterval",aO),t.requestAnimationFrame&&ot(rk,"requestAnimationFrame",ax),t.XMLHttpRequest&&"XMLHttpRequest"in rk&&ot(XMLHttpRequest.prototype,"send",aI);let e=t.eventTarget;e&&(Array.isArray(e)?e:aS).forEach(e=>(function(e,t){let n=rk[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(ot(n,"addEventListener",function(n){return function(r,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=i6(o.handleEvent,{mechanism:{data:{handler:rL(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&this&&"object"==typeof this&&"removeEventListener"in this&&"function"==typeof this.removeEventListener&&this.removeEventListener(r,o),n.apply(this,[r,i6(o,{mechanism:{data:{handler:rL(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}}),ot(n,"removeEventListener",function(e){return function(t,n,r){try{let o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}}))})(e,t))}}})(),((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&function(e){let t="console";rZ(t,e),rB(t,iY)}(function(t){var n;if(oL()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:"warn"===(n=t.level)?"warning":["fatal","error","warning","log","info","debug"].includes(n)?n:"log",message:od(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;r.message=`Assertion failed: ${od(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1)}iB(r,{input:t.args,level:t.level})}),t.dom&&(n=t.dom,rZ("dom",function(t){if(oL()!==e)return;let r,o,i="object"==typeof n?n.serializeAttribute:void 0,a="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;a&&a>1024&&(ah&&rz.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=1024),"string"==typeof i&&(i=[i]);try{let e=t.event,n=e&&e.target?e.target:e;r=r7(n,{keyAttrs:i,maxStringLength:a}),o=function(e){if(!rk.HTMLElement)return null;let t=e;for(let e=0;e<5&&t;e++){if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(n)}catch{r="<unknown>"}if(0===r.length)return;let s={category:`ui.${t.name}`,message:r};o&&(s.data={"ui.component_name":o}),iB(s,{event:t.event,name:t.name,global:t.global})}),rB("dom",aa)),t.xhr&&(rZ("xhr",function(t){if(oL()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[ap];if(!n||!r||!o)return;let{method:i,url:a,status_code:s,body:c}=o,u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},l={category:"xhr",data:{method:i,url:a,status_code:s},type:"http",level:i1(s)};e.emit("beforeOutgoingRequestBreadcrumb",l,u),iB(l,u)}),rB("xhr",ad)),t.fetch&&function(e,t){let n="fetch";rZ(n,e),rB(n,()=>(function(e,t=!1){(!t||function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in rk))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(i2(rk.fetch))return!0;let e=!1,t=rk.document;if(t&&"function"==typeof t.createElement)try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=i2(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){rw&&rz.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())&&ot(rk,"fetch",function(e){return function(...t){let n=Error(),{method:r,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){let[t,n]=e;return{url:i3(t),method:i4(n,"method")?String(n.method).toUpperCase():r8(t)&&i4(t,"method")?String(t.method).toUpperCase():"GET"}}let t=e[0];return{url:i3(t),method:i4(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:r,url:o},startTimestamp:1e3*ow(),virtualError:n,headers:function(e){let[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(r8(t))return new Headers(t.headers)}catch{}}(t)};return rV("fetch",{...i}),e.apply(rk,t).then(async e=>(rV("fetch",{...i,endTimestamp:1e3*ow(),response:e}),e),e=>{rV("fetch",{...i,endTimestamp:1e3*ow(),error:e}),rq(e)&&void 0===e.stack&&(e.stack=n.stack,on(e,"framesToPop",1));let t=oL(),r=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{let t=new URL(i.fetchData.url).host;"always"===r?e.message=`${e.message} (${t})`:on(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})})(0,void 0))}(function(t){if(oL()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;
50if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.fetchData.method,t.fetchData.url,t.error){let o=t.fetchData,i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),iB(a,i)}else{let o=t.response,i={...t.fetchData,status_code:o?.status};t.fetchData.request_body_size,t.fetchData.response_body_size;let a={input:t.args,response:o,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:i,type:"http",level:i1(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",s,a),iB(s,a)}}),t.history&&ac(function(t){if(oL()!==e)return;let n=t.from,r=t.to,o=iF(rk.location.href),i=n?iF(n):void 0,a=iF(r);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),iB({category:"navigation",data:{from:n,to:r}})}),t.sentry&&e.on("beforeSendEvent",function(t){oL()===e&&iB({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:oy(t)},{event:t})})}}})(),((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){let t="error";rZ(t,t=>{let{stackParser:n,attachStacktrace:r}=aC();if(oL()!==e||i9>0)return;let{msg:o,url:i,line:a,column:s,error:c}=t,u=function(e,t,n,r){let o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],u=function(e){if(r0(e)&&0!==e.length)return e.startsWith("data:")?`<${function(e,t=!0){if(e.startsWith("data:")){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(","),a="";if(t&&-1!==i){let t=e.slice(i+1);a=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${a?`,${a}`:""}`}return e}(e,!1)}>`:e}(t)??oe();return 0===c.length&&c.push({colno:r,filename:u,function:"?",in_app:!0,lineno:n}),e}(an(n,c||o,void 0,r,!1),i,a,s);u.level="error",ia(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})}),rB(t,rK)}(e),aR("onerror")),t.onunhandledrejection&&(!function(e){let t="unhandledrejection";rZ(t,t=>{let{stackParser:n,attachStacktrace:r}=aC();if(oL()!==e||i9>0)return;let o=function(e){if(r2(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}(t),i=r2(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:an(n,o,void 0,r,!0);i.level="error",ia(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})}),rB(t,rW)}(e),aR("onunhandledrejection"))}}})(),((e={})=>{let t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){!function(e,t,n,r,o,i){if(!o.exception?.values||!i||!r6(i.originalException,Error))return;let a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=function e(t,n,r,o,i,a,s,c){if(a.length>=r+1)return a;let u=[...a];if(r6(o[i],Error)){iH(s,c,o);let a=t(n,o[i]),l=u.length;iq(a,i,l,c),u=e(t,n,r,o[i],i,[a,...u],a,l)}return iW(o)&&o.errors.forEach((a,l)=>{if(r6(a,Error)){iH(s,c,o);let p=t(n,a),d=u.length;iq(p,`errors[${l}]`,d,c),u=e(t,n,r,a,i,[p,...u],p,d)}}),u}(e,t,r,i.originalException,n,o.exception.values,a,0))}(i5,o.getOptions().stackParser,n,t,e,r)}}})(),{name:"Dedupe",processEvent(e){if(e.type)return e;try{var t;if((t=a)&&(function(e,t){let n=e.message,r=t.message;return(!!n||!!r)&&(!n||!!r)&&(!!n||!r)&&n===r&&!!iQ(e,t)&&!!iX(e,t)&&!0}(e,t)||function(e,t){let n=i0(t),r=i0(e);return!!n&&!!r&&n.type===r.type&&n.value===r.value&&!!iQ(e,t)&&!!iX(e,t)}(e,t)))return rw&&rz.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return a=e}},{name:"HttpContext",preprocessEvent(e){if(!rk.navigator&&!rk.location&&!rk.document)return;let t=function(){let e=oe(),{referrer:t}=rk.document||{},{userAgent:n}=rk.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}},{name:"CultureContext",preprocessEvent(e){let t=function(){try{let e=rk.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})}},((e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===rk.document)return void(ah&&rz.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));is({ignoreDuration:!0}),il();let e=o$(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();
50n?.id===t?.id&&n?.ip_address===t?.ip_address||(il(),n=t)}),"route"===t&&ac(({from:e,to:t})=>{e!==t&&(is({ignoreDuration:!0}),il())})}}})()].filter(function(e){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name)}),tracesSampleRate:.1,environment:r}),(i=new oR).setClient(o),o.init(),i),aT.info("Sentry initialized successfully"),this.initialized=!0}catch(e){aT.error("Failed to initialize Sentry:",e)}else aT.info("Sentry disabled for environment: ".concat(e,". Only enabled for 'sandbox' and 'live' environments."))}},e.prototype.captureError=function(e,t,n){var r,o,i;if(void 0===n&&(n="error"),this.initialized)try{t&&(null==(r=this.scope)||r.setContext("additional_data",t)),"string"==typeof e?null==(o=this.scope)||o.captureMessage(e,n):null==(i=this.scope)||i.captureException(e),aT.info("Error reported to Sentry")}catch(t){aT.error("Failed to report error to Sentry:",t),aT.error("Original error:",e)}},e.prototype.captureMessage=function(e,t,n){var r,o;if(this.initialized)try{n&&(null==(r=this.scope)||r.setContext("additional_data",n)),null==(o=this.scope)||o.captureMessage(e,null!=t?t:"info"),aT.info("Message reported to Sentry")}catch(e){aT.error("Failed to capture message in Sentry:",e)}},e.prototype.captureNetworkError=function(e,t,n,r){this.captureError(n,m({type:"network_error",url:e,status:t},r))},e.prototype.capturePaymentError=function(e,t,n){var r=t?this.sanitizeObject(t):void 0;this.captureError(e,m({type:"payment_error",paymentData:r},n))},e.prototype.captureConfigurationError=function(e,t,n){this.captureError(e,m({type:"configuration_error",configData:t},n))},e.prototype.captureComponentError=function(e,t,n,r){this.captureError(e,m({type:"component_error",component:t,operation:n},r))},e.prototype.setContext=function(e,t){var n;if(this.initialized)try{var r=this.sanitizeObject(t);null==(n=this.scope)||n.setContext(e,r),aT.debug("Context '".concat(e,"' set in Sentry"))}catch(t){aT.error("Failed to set context '".concat(e,"' in Sentry:"),t)}},e.prototype.setUser=function(e){var t;if(this.initialized)try{null==(t=this.scope)||t.setUser(e),aT.debug("User information set in Sentry")}catch(e){aT.error("Failed to set user information in Sentry:",e)}},e.prototype.addBreadcrumb=function(e){var t;if(this.initialized)try{var n=m(m({},e),{data:e.data?this.sanitizeObject(e.data):void 0});null==(t=this.scope)||t.addBreadcrumb(n),aT.debug("Breadcrumb added to Sentry")}catch(e){aT.error("Failed to add breadcrumb to Sentry:",e)}},e.prototype.isInitialized=function(){return this.initialized},e.prototype.filterSensitiveData=function(e){var t,n,r,o,i=m({},e);if(null==(t=i.extra)?void 0:t.paymentData)for(var a=0,s=["cardNumber","cvv","cvc","securityCode","pan"];a<s.length;a++){var c=s[a];(null==(r=null==(n=i.extra)?void 0:n.paymentData)?void 0:r[c])&&delete i.extra.paymentData[c]}if(null==(o=i.request)?void 0:o.data){var u="string"==typeof i.request.data?JSON.parse(i.request.data):i.request.data;if(u&&"object"==typeof u){var l=this.sanitizeObject(u);i.request.data=JSON.stringify(l)}}return i},e.prototype.sanitizeObject=function(e){if(!e||"object"!=typeof e)return e;for(var t=m({},e),n=["cardNumber","cvv","cvc","securityCode","pan","password","token"],r=this,o=0,i=Object.keys(t);o<i.length;o++)!function(e){var o=e.toLowerCase();n.some(function(e){return o.includes(e)})?t[e]="[REDACTED]":"object"==typeof t[e]&&null!==t[e]&&(t[e]=r.sanitizeObject(t[e]))}(i[o]);return t},e}(),az=(function(){function e(){this.sentryReporter=aA.getInstance()}return e.getInstance=function(){return null!=e.instance||(e.instance=new e),e.instance},e.prototype.init=function(e,t){e.enabled&&(this.sentryReporter.init(t),e.globalContext&&this.sentryReporter.isInitialized()&&this.sentryReporter.setContext("global",e.globalContext))},e.prototype.captureError=function(e,t){this.sentryReporter.captureError(e,t)},e.prototype.captureMessage=function(e,t,n){this.sentryReporter.captureMessage(e,null!=t?t:"info",n)},e.prototype.captureNetworkError=function(e,t,n,r){this.sentryReporter.captureNetworkError(e,t,n,r)},e.prototype.capturePaymentError=function(e,t,n){this.sentryReporter.capturePaymentError(e,t,n)},e.prototype.captureComponentError=function(e,t,n,r){this.sentryReporter.captureComponentError(e,t,n,r)},e.prototype.setContext=function(e,t){this.sentryReporter.setContext(e,t)},e.prototype.setUser=function(e){this.sentryReporter.setUser(e)},e.prototype.addBreadcrumb=function(e){this.sentryReporter.addBreadcrumb(e)},e.prototype.isInitialized=function(){return this.sentryReporter.isInitialized()},e})().getInstance();function aP(e){return g(this,void 0,void 0,function(){var t,n,r,o,i,a,s,c,u;return y(this,function(l){switch(l.label){case 0:t=Date.now(),l.label=1;case 1:return l.trys.push([1,4,,5]),[4,fetch(e)];case 2:if(n=l.sent(),a=Date.now()-t,!n.ok)throw r=Error("HTTP ".concat(n.status,": ").concat(n.statusText)),404!==n.status&&az.captureNetworkError(e,n.status,r,{responseHeaders:Object.fromEntries(n.headers.entries()),duration:a,method:"GET"}),r;return[4,n.json()];case 3:return o=l.sent(),a>5e3&&az.captureMessage("Slow API response detected: ".concat(e),"warning",{duration:a,url:e,method:"GET"}),[2,o];case 4:if(i=l.sent(),a=Date.now()-t,i instanceof TypeError&&i.message.includes("fetch"))throw s=Error("Network request failed: ".concat(i.message)),az.captureNetworkError(e,void 0,s,{originalError:i.message,duration:a,method:"GET",errorType:"network_failure"}),s;if(i instanceof SyntaxError)throw c=Error("JSON parsing failed for response from ".concat(e)),az.captureNetworkError(e,void 0,c,{originalError:i.message,duration:a,method:"GET",errorType:"json_parse_error"}),c;if(!(i instanceof Error))throw u=Error("Unknown error during API request to ".concat(e)),az.captureNetworkError(e,void 0,u,{originalError:String(i),duration:a,method:"GET",errorType:"unknown"}),u;throw i;case 5:return[2]}})})}function aN(e,t,n){void 0===n&&(n=[]);var r=n[0]&&(null==t?void 0:t.providerPrefix[n[0]])?null==t?void 0:t.providerPrefix[n[0]]:"";return r?"".concat(r).concat(e):e}function aD(e,t){var n,r=e.supportedComponents;if(!r)return null;for(var o=0;o<r.length;o++){var i=r[o];if(null==(n=Object.keys(e[i].supportedMethods))?void 0:n.includes(t))return i}return null}function a$(e,t,n){var r=n.formatMethodPathName,o=n.logoTemplate,i=null==e?void 0:e.getLogoUrl(o.replace("<%NETWORK_CODE%>",t));return r?"lowercase"===r?i.toLowerCase():"uppercase"===r?i.toUpperCase():i:i}function aL(e,t,n,r){var o,i,a;if(void 0===r&&(r={}),!(null==(i=null==(o=null==e?void 0:e.networks)?void 0:o.applicable)?void 0:i.length))return[];
50for(var s=e.networks.applicable||[],c=[],u=!!r.supportsGooglePay,l=0;l<s.length;l++){var p=s[l],d=p.code,f=n[aD(n,aN(Object.keys(_).includes(p.grouping)?_[p.grouping]:p.code.toLowerCase(),n,null!=(a=p.providers)?a:[]))];if("CREDIT_CARD"===p.grouping||"DEBIT_CARD"===p.grouping)(h=c.find(function(e){return"cards"===e.name}))||(h=function(e,t,n,r,o){var i;return{name:"cards",label:(null==(i=window.Payoneer)?void 0:i.getCardsMethodLabel)?window.Payoneer.getCardsMethodLabel(n,t.labels,t.labels[r],o):t.labels[r],defaultLogoUrl:(null==t?void 0:t.hasDefaultLogo)?a$(e,"cards",t):"",networkInformation:[],walletInformation:function(e,t,n,r){if(!(null==(o=e.wallets)?void 0:o.length))return[];var o,i,a,s=null==(a=null==(i=window.Payoneer)?void 0:i.getAvailableWallets)?void 0:a.call(i,e,r);return s?s.map(function(e){return{wallet:e,logoUrl:a$(t,e,n)}}):[]}(n,e,t,o)}}(t,f,e,d,u),c.push(h)),h.networkInformation.push({network:d,method:d,logoUrl:a$(t,d,f)});else{var h={name:d.toLocaleLowerCase(),label:f.labels[d],defaultLogoUrl:(null==f?void 0:f.hasDefaultLogo)?a$(t,d,f):"",networkInformation:[{network:d,method:d,logoUrl:a$(t,d,f)}]};c.push(h)}}return c}function aj(e,t){for(var n=new Set,r=0,o=Array.from(e);r<o.length;r++){var i=o[r];t.has(i)||n.add(i)}return n}function aM(e){return/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e)}function aU(e){return"object"==typeof e&&null!==e&&e.constructor===Object}function aF(e,t,n){aT[t](e),az.addBreadcrumb({message:e,level:t,data:n})}!function(e){e.DEFERRED="DEFERRED",e.NON_DEFERRED="NON_DEFERRED"}(aB||(aB={})),function(e){e.BANK_TRANSFER="BANK_TRANSFER",e.BILLING_PROVIDER="BILLING_PROVIDER",e.CASH_ON_DELIVERY="CASH_ON_DELIVERY",e.CHECK_PAYMENT="CHECK_PAYMENT",e.CREDIT_CARD="CREDIT_CARD",e.DEBIT_CARD="DEBIT_CARD",e.DIRECT_DEBIT="DIRECT_DEBIT",e.ELECTRONIC_INVOICE="ELECTRONIC_INVOICE",e.GIFT_CARD="GIFT_CARD",e.MOBILE_PAYMENT="MOBILE_PAYMENT",e.ONLINE_BANK_TRANSFER="ONLINE_BANK_TRANSFER",e.OPEN_INVOICE="OPEN_INVOICE",e.PREPAID_CARD="PREPAID_CARD",e.TERMINAL="TERMINAL",e.WALLET="WALLET"}(aV||(aV={})),function(e){e.DISPLAY_NATIVE="DISPLAY_NATIVE",e.PURE_NATIVE="PURE_NATIVE",e.HOSTED="HOSTED",e.SELECTIVE_NATIVE="SELECTIVE_NATIVE",e.MOBILE_NATIVE="MOBILE_NATIVE"}(aJ||(aJ={})),function(e){e.RISK_DECISION_PROVIDER="RISK_DECISION_PROVIDER",e.RISK_DATA_PROVIDER="RISK_DATA_PROVIDER"}(aK||(aK={})),function(e){e.PAYMENT_SERVICE_PROVIDER="PAYMENT_SERVICE_PROVIDER",e.RISK_DECISION_PROVIDER="RISK_DECISION_PROVIDER",e.RISK_DATA_PROVIDER="RISK_DATA_PROVIDER"}(aG||(aG={})),function(e){e.String="string",e.Numeric="numeric",e.Integer="integer",e.Select="select",e.Checkbox="checkbox"}(aW||(aW={})),function(e){e.CHARGE="CHARGE",e.PRESET="PRESET",e.PAYOUT="PAYOUT",e.UPDATE="UPDATE",e.SAVE="SAVE",e.TOKENIZE="TOKENIZE",e.ACTIVATION="ACTIVATION"}(aH||(aH={})),function(e){e.CHARGE="CHARGE",e.PRESET="PRESET",e.PAYOUT="PAYOUT",e.UPDATE="UPDATE",e.SAVE="SAVE",e.TOKENIZE="TOKENIZE"}(aq||(aq={})),function(e){e.UNSCHEDULED="UNSCHEDULED",e.SCHEDULED="SCHEDULED"}(aY||(aY={}));var aZ,aB,aV,aJ,aK,aG,aW,aH,aq,aY,aX,aQ,a0,a1=function(){function e(e,t,n,r){this.config={},this.isRiskDataPassed=!1,this.componentReadyListenerAttached=!1,this.component=e,t&&(this.data=t),n&&(this.internalEvents=n),r&&(this.publicEvents=r),this.createElementIfNotExists()}return e.prototype.mount=function(e){if(!e){var t=Error("Pass the DOM element to render ".concat(this.component.name," inside"));throw az.captureComponentError(t,this.component.name,"mount",{nodeProvided:!1,network:this.component.network}),t}try{return this.attachTo(e).addCBx(this.config).updateListData(this.data),this.emitEvent(E.COMPONENT.MOUNT,{componentName:"".concat(this.component.name,"::").concat(this.component.network)}),this}catch(t){throw az.captureComponentError(t instanceof Error?t:Error("Component mount failed"),this.component.name,"mount",{network:this.component.network,hasData:!!this.data,hasConfig:!!this.config,nodeTag:e.tagName,nodeId:e.id}),t}},e.prototype.updateNode=function(e){if(!this.isComponentDefined()){var t=Error("".concat(this.component.name,"::").concat(this.component.network,": Undefined component"));throw az.captureComponentError(t,this.component.name,"updateNode",{network:this.component.network,componentDefined:!1}),t}try{return aT.info("".concat(this.component.name,"::").concat(this.component.network,": Passing configs"),e),this.parent?this.attachTo(this.parent).addCBx(e):aF("".concat(this.component.name,"::").concat(this.component.network,": Parent does not exists or maybe not yet mounted"),aZ.WARN),this}catch(t){throw az.captureComponentError(t instanceof Error?t:Error("Component update failed"),this.component.name,"updateNode",{network:this.component.network,hasParent:!!this.parent,configKeys:Object.keys(e||{})}),t}},e.prototype.update=function(e,t){return this.data=t,this.config=e,aT.info("".concat(this.component.name,"::").concat(this.component.network,": Updating data and configs")),this.updateNode(e).updateListData(this.data),this},e.prototype.updateListData=function(e){var t;return this.isComponentDefined()&&(null==(t=this.element)?void 0:t.setListData)?(aT.info("".concat(this.component.name,"::").concat(this.component.network,": Setting list data")),this.element.setListData(e)):aT.info("".concat(this.component.name,"::").concat(this.component.network,": Error setting list data"),{setListDataProvider:!!this.element.setListData,isComponentDefined:this.isComponentDefined()}),this.data=e,this},e.prototype.unmount=function(){var e,t;return(null==(e=this.element)?void 0:e.removeComponent)&&(null==(t=this.element)||t.removeComponent(),this.emitEvent(E.COMPONENT.UNMOUNT,{componentName:"".concat(this.component.name,"::").concat(this.component.network)})),this.isRiskDataPassed=!1,this.componentReadyListenerAttached=!1,this},e.prototype.pay=function(){return g(this,void 0,void 0,function(){var e,t,n;return y(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),(null==(t=this.element)?void 0:t.pay)?[4,this.element.pay()]:[3,2];case 1:return[2,r.sent()];case 2:case 4:return[2];case 3:throw e=r.sent(),az.capturePaymentError(e instanceof Error?e:Error("Payment execution failed"),{paymentMethod:this.component.method,network:this.component.network,componentName:this.component.name},{operation:"pay",elementExists:!!this.element,payMethodExists:!!(null==(n=this.element)?void 0:n.pay)}),e}})})},e.prototype.isMounted=function(){return this.parent&&this.element&&this.parent.firstChild===this.element},e.prototype.attachTo=function(e){this.parent=e;try{if(this.isMounted())return aT.info("".concat(this.component.name," is already mounted:, skipping re-mount")),this;e.innerHTML="",e.append(this.element);var t=e.id?"".concat(e.tagName,"#").concat(e.id):e.tagName;return aT.info("".concat(this.component.name,"::").concat(this.component.network,": Mounting to ").concat(t)),this}catch(t){throw az.captureComponentError(t instanceof Error?t:Error("DOM attachment failed"),this.component.name,"attachTo",{network:this.component.network,nodeTag:e.tagName,nodeId:e.id,elementExists:!!this.element,wasAlreadyMounted:this.isMounted()}),t}},e.prototype.isComponentDefined=function(){return!!customElements.get(this.component.name)},e.prototype.createElementIfNotExists=function(){if(this.element)return aT.info("".concat(this.component.name,": Skipping creation. Element already exists"),this.element),this;try{var e=document.createElement(this.component.name);return e.id="".concat(this.component.name,"-component"),this.component.network&&(null==e||e.setAttribute("network",this.component.network)),this.component.method&&(null==e||e.setAttribute("method",this.component.method)),this.element=e,this.setupCheckoutEventListener(),aT.info("".concat(this.component.name,"::").concat(this.component.network,": element created"),this.element),this}catch(e){throw az.captureComponentError(e instanceof Error?e:Error("Element creation failed"),this.component.name,"createElementIfNotExists",{network:this.component.network,method:this.component.method,customElementsDefined:!!customElements.get(this.component.name)}),e}},e.prototype.addCBx=function(e){return aT.info("".concat(this.component.name,"::").concat(this.component.network,": Passing configs and callbacks"),{config:e}),this.config=m(m({},this.config),e),this.setupComponentReadyListener(),this.bindCallbacks(e),this.applyComponentSettings(),this.applyButtonStyles(),this.applyRefetchSettings(e),this},e.prototype.bindCallbacks=function(t){for(var n,r=this,o=0,i=e.CALLBACK_KEYS;o<i.length;o++)!function(e){var o=null==t?void 0:t[e],i=null==(n=r.element)?void 0:n[e];o&&"function"==typeof i&&i(o)}(i[o])},e.prototype.applyComponentSettings=function(){var e;this.applyHidePaymentButton(),(null==(e=this.element)?void 0:e.useLocalRiskLib)&&this.element.useLocalRiskLib(!1)},e.prototype.applyHidePaymentButton=function(){var e;this.component&&"boolean"==typeof this.component.hidePaymentButton&&(this.element&&(this.element.dataset.hidePaymentButton=String(this.component.hidePaymentButton),aT.info("".concat(this.component.name,"::").concat(this.component.network,': Setting data-hide-payment-button="').concat(this.component.hidePaymentButton,'"'))),(null==(e=this.element)?void 0:e.hidePaymentButton)&&(this.element.hidePaymentButton(this.component.hidePaymentButton),aT.info("".concat(this.component.name,"::").concat(this.component.network,": hidePaymentButton method called directly"))))},e.prototype.setupComponentReadyListener=function(){var e=this;this.element&&!this.componentReadyListenerAttached&&(this.componentReadyListenerAttached=!0,this.element.addEventListener("payoneer:component:ready",function(){aT.info("".concat(e.component.name,"::").concat(e.component.network,": Component ready event received, re-applying all settings")),e.bindCallbacks(e.config),e.a
50pplyComponentSettings(),e.applyButtonStyles(),e.applyRefetchSettings(e.config)},{once:!0}),this.element.addEventListener("payoneer:payment:ready",function(){var t,n;aT.info("".concat(e.component.name,"::").concat(e.component.network,": Payment ready event received")),(null==(t=e.config)?void 0:t.onReady)&&(null==(n=e.element)?void 0:n.onReady)&&e.element.onReady(e.config.onReady)},{once:!0}))},e.prototype.applyButtonStyles=function(){var e,t,n,r,o,i,a,s=(null==(e=this.data)?void 0:e.integrationType)===aJ.HOSTED,c=(null==(t=this.component)?void 0:t.primaryColor)&&(null==(n=this.component)?void 0:n.primaryTextColor);if(s||c){var u=null!=(r=this.component.primaryColor)?r:null==(i=null==(o=this.data)?void 0:o.style)?void 0:i.primaryColor,l=this.component.primaryColor?this.component.primaryTextColor:aM(u)?!function(e){if(!aM(e))return!1;var t,n,r,o,i=(3===(o=e.slice(1)).length?(t=Number.parseInt(o[0]+o[0],16),n=Number.parseInt(o[1]+o[1],16),r=Number.parseInt(o[2]+o[2],16)):(t=Number.parseInt(o.slice(0,2),16),n=Number.parseInt(o.slice(2,4),16),r=Number.parseInt(o.slice(4,6),16)),{red:t,green:n,blue:r});return .299*i.red+.587*i.green+.114*i.blue>133}(u)?"#FFFFFF":"#252526":null;"function"==typeof(null==(a=this.element)?void 0:a.setStyles)&&u&&l&&this.element.setStyles({primaryColor:u,primaryTextColor:l})}},e.prototype.applyRefetchSettings=function(e){var t,n;(null==(t=this.component)?void 0:t.refetchList)&&this.element.refetchList&&this.element.refetchList(this.component.refetchList),void 0!==(null==e?void 0:e.refetchListBeforeCharge)&&(null==(n=this.element)?void 0:n.setRefetchListBeforeCharge)&&this.element.setRefetchListBeforeCharge(e.refetchListBeforeCharge)},e.prototype.emitEvent=function(e,t){this.internalEvents&&this.internalEvents.emit(e,t)},e.prototype.setupCheckoutEventListener=function(){var e=this;this.element&&this.element.addEventListener("payoneer-checkout-event",function(t){var n=t.detail;(null==n?void 0:n.event)&&(e.reportCheckoutEventToSentry(n.event,n.data),e.emitPublicEvent(n.event,n.data))})},e.prototype.reportCheckoutEventToSentry=function(e,t){var n,r,o=null!=t?t:{};switch(e){case"payment:failed":case"payment:3ds:failed":case"payment:declined":case"payment:cancelled":az.addBreadcrumb({message:e,category:"payment",level:"warning",data:{networkCode:o.networkCode,interactionCode:null==(n=o.interaction)?void 0:n.code,interactionReason:null==(r=o.interaction)?void 0:r.reason,resultInfo:o.resultInfo,error:o.error,reason:o.reason}});break;case"error:charge-network":this.reportChargeNetworkError(o);break;case"error:3ds-unexpected":this.report3dsUnexpectedError(o);break;case"error:component-init":this.reportComponentInitError(o);break;case"charge:started":case"charge:completed":case"form:submitted":case"payment:success":case"payment:3ds:started":case"payment:3ds:completed":case"redirect:provider":az.addBreadcrumb({message:e,category:"checkout-event",level:"info",data:o})}},e.prototype.reportChargeNetworkError=function(e){var t,n,r=e.errorType,o=null==(t=e.interaction)?void 0:t.reason;"LIST_REFETCH_FAILED"!==o?az.capturePaymentError(Error("Charge network error: ".concat(r)),{networkCode:e.networkCode,errorType:r,httpStatus:e.httpStatus,interactionCode:null==(n=e.interaction)?void 0:n.code,interactionReason:o},{source:"checkout-event",event:"error:charge-network"}):az.addBreadcrumb({message:"List re-fetch failed during charge",category:"payment",level:"warning",data:{networkCode:e.networkCode,errorType:r}})},e.prototype.report3dsUnexpectedError=function(e){var t=e.errorType;"requires_payment_method"!==t?az.capturePaymentError(Error("3DS unexpected error: ".concat(t)),{networkCode:e.networkCode,errorType:t,errorMessage:e.errorMessage},{source:"checkout-event",event:"error:3ds-unexpected"}):az.addBreadcrumb({message:"3DS resulted in requires_payment_method",category:"payment",level:"warning",data:{networkCode:e.networkCode,errorMessage:e.errorMessage}})},e.prototype.reportComponentInitError=function(e){var t=e.errorType;"stripe_not_loaded"!==t?az.captureComponentError(Error("Component init error: ".concat(t)),this.component.name,"init",{source:"checkout-event",event:"error:component-init",errorType:t,errorMessage:e.errorMessage}):az.addBreadcrumb({message:"Stripe SDK not available after script load",category:"component",level:"warning",data:{errorMessage:e.errorMessage}})},e.prototype.emitPublicEvent=function(e,t){if(this.publicEvents)try{this.publicEvents.emit(e,t)}catch(e){}},e.CALLBACK_KEYS=["onBeforeCharge","onBeforeError","onPaymentSuccess","onValidationInfo","onPaymentFailure","onBeforeProviderRedirect","onPaymentDeclined","onReady"],e}(),a2=function(){function e(){this.scriptCache=new Set,this.callbacks={},this.loadingPromises={}}return e.prototype.loadScript=function(e,t,n){var r=this;if(window.customElements.get(t))return Promise.resolve();if(this.scriptCache.has(e)||t in this.loadingPromises)return this.loadingPromises[t];var o=new Promise(function(o,i){var a=document.createElement("script");a.src=e;var s=Date.now();n&&(a.integrity=n,a.crossOrigin="anonymous"),a.onload=function(){var i=Date.now()-s;r.scriptCache.add(e),delete r.loadingPromises[t],i>1e4&&az.captureMessage("Slow script loading detected: ".concat(t),"warning",{url:e,componentName:t,loadTime:i,hasIntegrity:!!n,operation:"script_load"}),r.callbacks[t]&&(r.callbacks[t].forEach(function(e){return e()}),delete r.callbacks[t]),o()},a.onerror=function(o){var a=Date.now()-s;delete r.loadingPromises[t];var c=Error("Failed to load script ".concat(e));az.captureError(c,{type:"script_loading_error",url:e,componentName:t,hasIntegrity:!!n,loadTime:a,errorEvent:o instanceof ErrorEvent?o.message:"Unknown script error",operation:"script_load"}),i(c)};try{document.head.appendChild(a)}catch(r){var c=r instanceof Error?r:Error("DOM manipulation failed during script loading");az.captureError(c,{type:"script_dom_error",url:e,componentName:t,hasIntegrity:!!n,operation:"script_append"}),i(c)}});return this.loadingPromises[t]=o,o},e.prototype.loadScriptChain=function(e,t,n){return g(this,void 0,void 0,function(){var r,o,i,a,s,c,u,l,p,d,f,h,m,g;return y(this,function(y){switch(y.label){case 0:r=Array.isArray(e)?e:[e],y.label=1;case 1:y.trys.push([1,6,,7]),o=function(e){for(var t={},n={},r=[],o=0,i=Object.keys(e);o<i.length;o++)!function o(i){var a;if(n[i])throw Error("Cyclic dependency detected at script: ".concat(i));if(!t[i]){n[i]=!0;var s=e[i];if(!s)throw Error("Missing script definition for key: ".concat(i));for(var c=0,u=null!=(a=null==s?void 0:s.dependsOn)?a:[];c<u.length;c++)o(u[c]);t[i]=!0,n[i]=!1,r.push(i)}}(i[o]);return r}(t),i=function(e,t){for(var n=new Set,r=0;r<e.length;r++)!function e(r){var o;if(!n.has(r)){var i=t[r];
50if(!i)throw Error("Missing script definition: '".concat(r,"'"));for(var a=0,s=null!=(o=i.dependsOn)?o:[];a<s.length;a++)e(s[a]);n.add(r)}}(e[r]);return n}(r,t),a=o.filter(function(e){return i.has(e)}),s=Date.now(),c=0,u=a,y.label=2;case 2:var v;return c<u.length?(d=(p=t[l=u[c]]).src,f=p.integrity,h=(v=d.toLowerCase()).startsWith("//")||v.startsWith("http://")||v.startsWith("https://")?d:n(d),[4,this.loadScript(h,l,f||"")]):[3,5];case 3:y.sent(),y.label=4;case 4:return c++,[3,2];case 5:return(m=Date.now()-s)>15e3&&az.captureMessage("Slow script chain loading detected","warning",{targets:r,loadOrder:a,chainTime:m,scriptCount:a.length,operation:"script_chain_load"}),[3,7];case 6:throw g=y.sent(),az.captureError(g instanceof Error?g:Error("Script chain loading failed"),{type:"script_chain_error",targets:r,operation:"script_chain_load"}),g;case 7:return[2]}})})},e.prototype.onLoad=function(e,t){window.customElements.get(e)?t(e):(this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t))},e}(),a4=function(){function e(){this.events=new Map,this.onceWrappers=new WeakMap}return e.prototype.on=function(e,t){var n;this.events.has(e)||this.events.set(e,[]),null==(n=this.events.get(e))||n.push(t)},e.prototype.once=function(e,t){var n=this,r=function(o){n.off(e,r),t(o)};this.onceWrappers.set(t,r),this.on(e,r)},e.prototype.emit=function(e,t){this.events.forEach(function(n,r){("*"===r||(r.endsWith(":*")?e.startsWith(r.slice(0,-1)):r===e))&&v([],n,!0).forEach(function(e){return e(t)})})},e.prototype.off=function(e,t){var n=this.onceWrappers.get(t),r=n||t,o=this.events.get(e);o&&this.events.set(e,o.filter(function(e){return e!==r})),n&&this.onceWrappers.delete(t)},e.prototype.removeAllListeners=function(e){e?this.events.delete(e):this.events.clear()},e}(),a3={exports:{}},a9=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(aX?a3.exports:(aX=1,self,aQ={82:(e,t)=>{function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=/["'&<>]/,o=function(e){var t,n=""+e,o=r.exec(n);if(!o)return n;var i="",a=0,s=0;for(a=o.index;a<n.length;a++){switch(n.charCodeAt(a)){case 34:t="&quot;";break;case 38:t="&amp;";break;case 39:t="&#39;";break;case 60:t="&lt;";break;case 62:t="&gt;";break;default:continue}s!==a&&(i+=n.substring(s,a)),s=a+1,i+=t}return s!==a?i+n.substring(s,a):i};function i(e){return"string"==typeof e}function a(e){return i(e)&&e.length>0}function s(e){return!(!e||"object"!==n(e)||e instanceof Array)}function c(e){return s(e)&&Object.keys(e).length>0}function u(e){return e instanceof Array}function l(e){return!(!u(e)||0!==e.length&&e.find(function(e){return!c(e)}))}var p=Object.freeze({isString:i,isNonEmptyString:a,isObject:s,isNonEmptyObject:c,isArray:u,isArrayOfObject:l,isValidStorageObject:function(e){return!!(c(e)&&Object.hasOwnProperty.call(e,"name")&&Object.hasOwnProperty.call(e,"version")&&Object.hasOwnProperty.call(e,"parameters")&&a(e.name)&&a(e.version)&&l(e.parameters))}}),d="__op_app_version_lib_storage__",f=["string","number","boolean"];function h(){var e;return"undefined"==typeof window?(console.log("ERROR: You are outside of a browser environment"),null):(window[d]||(window[d]=(e=[],Object.freeze({storeData:function(t,r,i){if(p.isNonEmptyString(t)&&p.isNonEmptyString(r)){var a={name:o(t.toLowerCase()),version:o(r.toLowerCase()),parameters:function(e){var t=[];if(p.isNonEmptyObject(e))for(var r in e){var i=e[r];f.includes(n(i))&&"string"==typeof r&&("string"==typeof i&&(i=o(i)),t.push({key:o(r),value:i}))}return t}(i)},s=e.findIndex(function(e){return e.name===t&&e.version===r});-1===s?e.push(a):e[s]=a}},getData:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return(t=n&&r?e.find(function(e){return e.name===n&&e.version===r}):n?e.find(function(e){return e.name===n}):e)&&(t=JSON.parse(JSON.stringify(t))),t}}))),window[d])}var m=Object.freeze({storeData:function(e,t,n){var r=h();null!==r&&r.storeData(e,t,n)},getData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=h();return null!==n?n.getData(e,t):{}}}),g="op-app-version-lib",y="0.2.1";function v(e){if(!p.isValidStorageObject(e))return"";var t=e.parameters.map(function(e){return"".concat(e.key,"=").concat(e.value)}).join(";");return"".concat(e.name,";version=").concat(e.version).concat(t?";".concat(t):"")}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m.storeData(e,t,n)}function b(){return m.getData().map(v).filter(function(e){return e}).join(", ")}function E(){return m.getData()}"object"===("undefined"==typeof window?"undefined":n(window))&&(window.OP_APP_VERSION_LIB_VERSION=y),t.PACKAGE_NAME=g,t.PACKAGE_VERSION=y,t.__parseHeaderString=v,t.addVersionInfo=_,t.default={PACKAGE_NAME:g,PACKAGE_VERSION:y,addVersionInfo:_,toString:b,toJSON:E},t.toJSON=E,t.toString=b}
50,254:(e,t,n)=>{function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var i=n(462),a=i.containsNonEmptyString,s=i.containsKey,c=i.isNonEmptyString,u=i.isNonEmptyObject,l=i.isNonEmptyArray,p=n(341),d=n(757),f={},h=[],m="RISK_LIBRARY",g=Object.seal({INTERNAL:"riskPluginInternalError",EXTERNAL:"riskPluginExternalError"}),y=Object.seal({dataKeys:[],setData:function(e,t){f[e]=t},getData:function(e){return f[e]},removeData:function(e){delete f[e]}});function v(){return h.map(function(e){return e.origin})}function _(e,t){return[m,e,t].join("__")}function b(e){var t="",n="";if(c(e)){var o=r(e.split("__"),3);o[0],t=o[1],n=o[2]}return[t,n]}function E(e,t,n){if(c(e)&&c(t)){var r=null;document&&(r=document.getElementById(e)),r&&r.setAttribute(t,n)}}function w(e,t,n){if(c(e)&&c(t)){var r=d.generateIframeId(e,t);E(r,"responded",!0),Object.values(p).includes(n)&&E(r,"response-type",n)}}function k(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g.INTERNAL;if(c(e)&&c(t)&&c(n)){I(r)||(r=g.INTERNAL),n.length>2e3&&(n=n.slice(0,2e3));var o=_(e,t);y.dataKeys.includes(o)||y.dataKeys.push(o);var i={};i[r]=n,y.setData(o,i),w(e,t,p.ERROR)}}function S(e,t,n){if(c(e)&&c(t)&&u(n)){var r=_(e,t);y.dataKeys.includes(r)||y.dataKeys.push(r),y.setData(r,n),w(e,t,p.DATA)}}function O(e){if(!u(e))return[];var t=[];for(var n in e)if(c(n)){var r=e[n];null!=r&&("string"!=typeof r&&(r=JSON.stringify(r)),(r=r.trim())&&t.push({name:n,value:r}))}return t}function x(e){if(!c(e)||!y.dataKeys.includes(e))return null;var t=r(b(e),2),n=t[0],o=t[1];if(!n||!o)return null;var i=O(y.getData(e));return l(i)?{providerType:n,providerCode:o,parameters:i}:null}function I(e){return e===g.INTERNAL||e===g.EXTERNAL}function R(e){return a(e,"messageType")&&"RISK_HANDLER_ERROR"===e.messageType&&s(e,"data")&&a(e.data,"providerType")&&a(e.data,"providerCode")&&s(e.data,"providerError")&&c(e.data.providerError)}function C(e){return a(e,"messageType")&&"RISK_HANDLER"===e.messageType&&s(e,"data")&&a(e.data,"providerType")&&a(e.data,"providerCode")&&s(e.data,"providerResults")&&u(e.data.providerResults)}function T(e){if(c(e)&&!v().includes(e)){var t=function(t){if(t.origin===e){var n=t.data||null;C(n)?S(n.data.providerType,n.data.providerCode,n.data.providerResults):R(n)&&k(n.data.providerType,n.data.providerCode,n.data.providerError,g.EXTERNAL)}};h.push({origin:e,listener:t}),window.addEventListener("message",t)}}function A(){0!==h.length&&(h.forEach(function(e){window.removeEventListener("message",e.listener)}),h=[])}e.exports=Object.freeze({init:function(e){l(e)&&e.forEach(function(e){T(e)})},clear:function(){y.dataKeys.forEach(function(e){y.removeData(e)}),y.dataKeys=[],A(),f={}},configureExternalStorage:function(e,t,n){"function"==typeof e&&(y.setData=e),"function"==typeof t&&(y.getData=t),"function"==typeof n&&(y.removeData=n)},SEPARATOR:"__",ErrorType:g,LIB_PREFIX:m,StorageManager:y,ERROR_MESSAGE_LIMIT:2e3,getInMemoryStorage:function(){return JSON.parse(JSON.stringify(f))},getRiskMessageListeners:function(){return JSON.parse(JSON.stringify(h))},parseKey:b,getRiskData:function(){var e=[];return y.dataKeys.forEach(function(t){var n=x(t);n&&e.push(n)}),e},generateKey:_,getParameters:O,getKnownOrigins:v,isValidErrorType:I,setAttributeValue:E,getProviderResults:x,isValidRiskMessage:C,storeProviderError:k,addMessageListener:T,setResponseIndicator:w,storeProviderResults:S,removeMessageListeners:A,isValidRiskErrorMessage:R,configureDefaultStorage:function(){y.setData=function(e,t){f[e]=t},y.getData=function(e){return f[e]},y.removeData=function(e){delete f[e]}}})},313:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,o,a){var s=Object.create((r&&r.prototype instanceof u?r:u).prototype);return i(s,"_invoke",function(n,r,o){var i,a,s,u=0,l=o||[],p=!1,d={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return i=t,a=0,s=e,d.n=n,c}};function f(n,r){for(a=n,s=r,t=0;!p&&u&&!o&&t<l.length;t++){var o,i=l[t],f=d.p,h=i[2];n>3?(o=h===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=f&&((o=n<2&&f<i[1])?(a=0,d.v=r,d.n=i[1]):f<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,d.n=h,a=0))}if(o||n>1)return c;throw p=!0,r}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(p&&1===l&&f(l,h),a=l,s=h;(t=a<2?e:s)||!p;){i||(a?a<3?(a>1&&(d.n=-1),f(a,s)):d.n=s:d.v=s);try{if(u=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");
50if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(p=d.n<0)?s:n.call(r,d))!==c)break}catch(t){i=e,a=1,s=t}finally{u=1}}return{value:t,done:p}}}(n,o,a),!0),s}var c={};function u(){}function l(){}function p(){}t=Object.getPrototypeOf;var d=p.prototype=u.prototype=Object.create([][r]?t(t([][r]())):(i(t={},r,function(){return this}),t));function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,i(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=p,i(d,"constructor",p),i(p,"constructor",l),l.displayName="GeneratorFunction",i(p,a,"GeneratorFunction"),i(d),i(d,a,"Generator"),i(d,r,function(){return this}),i(d,"toString",function(){return"[object Generator]"}),(o=function(){return{w:s,m:f}})()}function i(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(i=function(e,t,n,r){function a(t,n){i(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))})(e,t,n,r)}function a(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function s(e){a(i,r,o,s,c,"next",e)}function c(e){a(i,r,o,s,c,"throw",e)}s(void 0)})}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var u=n(976),l=n(254),p=n(954),d=n(757),f=n(699),h=n(82).addVersionInfo,m=n(462),g=m.isArrayOfObjects,y=m.containsKey,v=m.containsNonEmptyString,_=m.isNonEmptyArray,b=m.getParamByName,E=n(330).DD,w=n(330).rE;function k(e){var t;return v(e,"providerCode")&&v(e,"providerType")&&S(null==e||null==(t=e.links)?void 0:t.iframe)}function S(e){try{var t=new URL(e);return"https:"===t.protocol&&("checkout.payoneer.com"===t.hostname||/^[a-z0-9\-_]*(resources)[a-z0-9\-_]*\.(live|stage|sandbox|integration|[a-z0-9\-_]+\.integration)\.oscato\.com$/g.test(t.hostname))}catch(e){return!1}}function O(e){var t=[];return _(e)&&e.filter(S).forEach(function(e){var n=new URL(e);t.includes(n.origin)||t.push(n.origin)}),t}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!k(e))return"";var n=e.links.iframe;n.endsWith("/")||(n+="/");var r="?providerType="+e.providerType+"&providerCode="+e.providerCode+"&targetOrigin="+t;return y(e,"parameters")&&g(e.parameters)&&e.parameters.forEach(function(e){v(e,"name")&&y(e,"value")&&(r+="&"+e.name+"="+e.value)}),n+r}function I(e){var t=[],n=[];return _(e)&&e.forEach(function(e){k(e)?t.push(e):n.push(e)}),[t,n]}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.INVALID_CONFIG,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.storeProviderError;_(e)&&"function"==typeof n&&e.forEach(function(e){v(e,"providerType")&&v(e,"providerCode")&&n(e.providerType,e.providerCode,"string"==typeof t?t:f.INVALID_CONFIG)})}function C(){return(C=s(o().m(function e(t){var n,i,a,c;return o().w(function(e){for(;;)switch(e.n){case 0:if(T(),n=I(t),a=(i=function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{i=(n=n.call(e)).next,!1;for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(n,2)||function(e,t){if(e){if("string"==typeof e)return r(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],R(i[1]),0!==a.length){e.n=1;break}return e.a(2);case 1:c=O(a.map(function(e){return e.links.iframe})),l.init(c),a.forEach(function(e){var t=b(e.parameters,"handlerLoadingType");if(t&&"javascript"==(null==t?void 0:t.value)){var n=b(e.parameters,"handlerSrc");n&&n.value&&function(e,t){var n;S(t)&&u(t,{success:(n=s(o().m(function t(){var n;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,riskProviderHandler.run();case 1:n=t.v,l.storeProviderResults(e.providerType,null==e?void 0:e.providerCode,n);case 2:return t.a(2)}},t)})),function(){return n.apply(this,arguments)}),error:function(){var n="Failed to load script ".concat(t);l.storeProviderError(e.providerType,null==e?void 0:e.providerCode,n)}})}(e,n.value)}else{var r=x(e,window.location.origin);if(!r)return;var i=d.generateIframeId(e.providerType,e.providerCode);p.initIFrame(i,r,e.providerCode)}});case 2:return e.a(2)}},e)}))).apply(this,arguments)}function T(){p.destroy(),l.clear()}"object"===("undefined"==typeof window?"undefined":c(window))&&(window.OP_RISK_LIB_VERSION=w,h(E,w)),e.exports={init:function(e){return C.apply(this,arguments)},destroy:T,getRiskData:l.getRiskData,getProviderUrl:x,isValidHandlerURL:S,getDistinctOrigins:O,getSeparatedConfigs:I,isValidProviderConfig:k,generateInternalErrors:R,configureExternalStorage:l.configureExternalStorage,dataUtil:l,iframeUtil:p,PACKAG
50E_NAME:E,PACKAGE_VERSION:w}},330:e=>{e.exports=JSON.parse('{"DD":"op-risk-lib","rE":"1.7.0"}')},341:e=>{e.exports=Object.freeze({ERROR:"EXTERNAL_ERROR_MESSAGE",DATA:"RISK_PROVIDER_RESULTS"})},462:e=>{function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return!(!e||"object"!==t(e)||e instanceof Array)}function r(e){return!(!e||"string"!=typeof e||!e.trim())}function o(e){return!!(e&&e instanceof Array&&e.length)}function i(e){return!(!n(e)||!Object.keys(e).length)}function a(e,t){return i(e)&&e.hasOwnProperty(t)}e.exports={isJsonObject:n,isNonEmptyArray:o,isNonEmptyObject:i,isArrayOfObjects:function(e){return o(e)&&n(e[0])},isNonEmptyString:r,containsKey:a,containsNonEmptyString:function(e,t){return a(e,t)&&r(e[t])},getParamByName:function(e,t){return e.find(function(e){return e.name===t})}}},699:e=>{e.exports=Object.freeze({INVA
50LID_ORIGIN:"Risk-provider iframe url origin is invalid",INVALID_IFRAME_URL:"Risk-provider iframe url is invalid",INVALID_CONFIG:"Given risk-provider config is invalid"})},757:e=>{e.exports=Object.freeze({generateIframeId:function(e,t){return"IFRAME__"+e+"__"+t}})},954:(e,t,n)=>{var r=n(462).isNonEmptyString,o={};function i(e){o.hasOwnProperty(e)&&o[e]&&(o[e].remove(),delete o[e])}e.exports=Object.freeze({iframeHolder:o,getIFrame:function(e){return o.hasOwnProperty(e)?o[e]:null},initIFrame:function(e,t){var n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!r(e)||!r(t))return null;var i=document.createElement("iframe");return i.setAttribute("id",e),i.setAttribute("src",t),i.setAttribute("responded",!1),r(n)&&i.setAttribute("name",n),i.style.position="fixed",i.style.display="none",i.style.zIndex="-1000",i.style.left="110vw",i.style.top="110vh",i.style.height="0px",i.style.width="0px",i.style.opacity="0",o[e]=i,i}(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:""),i=document.querySelector("body");n&&i&&i.appendChild(n)},removeIFrame:i,destroy:function(){for(var e in o)i(e)}})},976:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){var e=function(){},t={},n={},r={};function o(e,t){if(e){var o=r[e];if(n[e]=t,o)for(;o.length;)o[0](e,t),o.splice(0,1)}}function i(t,n){t.call&&(t={success:t}),n.length?(t.error||e)(n):(t.success||e)(t)}function a(n,r,a){var s,c;if(r&&r.trim&&(s=r),c=(s?a:r)||{},s){if(s in t)throw"LoadJS";t[s]=!0}function u(t,r){!function(t,n,r){var o,i,a=(t=t.push?t:[t]).length,s=a,c=[];for(o=function(e,t,r){if("e"==t&&c.push(e),"b"==t){if(!r)return;c.push(e)}--a||n(c)},i=0;i<s;i++)!function t(n,r,o,i){var a,s,c,u=document,l=o.async,p=(o.numRetries||0)+1,d=o.before||e,f=n.replace(/[\?|#].*$/,""),h=n.replace(/^(css|img|module|nomodule)!/,"");if(i=i||0,/(^css!|\.css$)/.test(f))(c=u.createElement("link")).rel="stylesheet",c.href=h,(a="hideFocus"in c)&&c.relList&&(a=0,c.rel="preload",c.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(f))(c=u.createElement("img")).src=h;else if((c=u.createElement("script")).src=h,c.async=void 0===l||l,s="noModule"in c,/^module!/.test(f)){if(!s)return r(n,"l");c.type="module"}else if(/^nomodule!/.test(f)&&s)return r(n,"l");c.onload=c.onerror=c.onbeforeload=function(e){var s=e.type[0];if(a)try{c.sheet.cssText.length||(s="e")}catch(e){18!=e.code&&(s="e")}if("e"==s){if((i+=1)<p)return t(n,r,o,i)}else if("preload"==c.rel&&"style"==c.as)return c.rel="stylesheet";r(n,s,e.defaultPrevented)},!1!==d(n,c)&&u.head.appendChild(c)}(t[i],o,r)}(n,function(e){i(c,e),t&&i({success:t,error:r},e),o(s,e)},c)}if(c.returnPromise)return new Promise(u);u()}return a.ready=function(e,t){return function(e,t){e=e.push?e:[e];var o,i,a,s=[],c=e.length,u=c;
50for(o=function(e,n){n.length&&s.push(e),--u||t(s)};c--;)(a=n[i=e[c]])?o(i,a):(r[i]=r[i]||[]).push(o)}(e,function(e){i(t,e)}),a},a.done=function(e){o(e,[])},a.reset=function(){t={},n={},r={}},a.isDefined=function(e){return e in t},a})?n.apply(t,[]):n)||(e.exports=r)}},a0={},a3.exports=function e(t){var n=a0[t];if(void 0!==n)return n.exports;var r=a0[t]={exports:{}};return aQ[t].call(r.exports,r,r.exports,e),r.exports}(313))),a6=function(){function e(){this.library=a9,this.callback=void 0,this.isNotified=!1,this.iframe=null,this.isResponded=!1}return e.getInstance=function(){return null===this.instance&&(this.instance=new e),this.instance},e.prototype.init=function(e){this.library.init(e)},e.prototype.onLoad=function(e){var t;"function"==typeof e&&(this.callback=e),this.isResponded?"function"!=typeof this.callback||this.isNotified||(this.callback(this.library.getRiskData()),this.isNotified=!0):this.observe(null==(t=a9.iframeUtil.iframeHolder)?void 0:t.IFRAME__RISK_DATA_PROVIDER__IOVATION)},e.prototype.observe=function(e){var t=this;e&&(this.iframe=e,new MutationObserver(function(e){return t.onCustomAttributeChange(e)}).observe(e,{attributes:!0,attributeFilter:["responded"]}))},e.prototype.onCustomAttributeChange=function(e){var t=this;this.isResponded||e.forEach(function(e){var n,r;"attributes"===e.type&&"responded"===e.attributeName&&(t.isResponded="true"===(null==(n=t.iframe)?void 0:n.getAttribute("responded")),"function"==typeof t.callback&&(t.isResponded="true"===(null==(r=t.iframe)?void 0:r.getAttribute("responded")),t.callback(t.library.getRiskData()),t.isNotified=!0))})},e.prototype.getRiskData=function(){return this.library.getRiskData()},e.instance=null,e}(),a5=function(){function e(e){this.isRisklibInitialised=!1,this.checkout=e,this.eventListner(),this.riskManager=a6.getInstance()}return e.prototype.eventListner=function(){var e=this;this.checkout.internalEvents.on(E.COMPONENT.MOUNT,function(){return e.onMount()})},e.prototype.onMount=function(){var e=this;this.initRiskLib(),this.riskManager.onLoad(function(){window.riskLib={getRiskData:function(){return e.riskManager.getRiskData()}}})},e.prototype.initRiskLib=function(){this.isRisklibInitialised||(aT.debug("Initialising risk lib..."),this.riskManager.init(this.getRiskProviders()),this.isRisklibInitialised=!0)},e.prototype.getRiskProviders=function(){var e;return(null==(e=this.checkout.listData)?void 0:e.riskProviders)||[]},e}(),a8=["onBeforeCharge","onBeforeError","onPaymentSuccess","onValidationInfo","onPaymentFailure","onBeforeProviderRedirect","onPaymentDeclined","onReady"],a7=function(){function e(){var e=this;this.state="IDLE",this.config={env:"live",longId:"",preload:[],telemetry:void 0,onBeforeCharge:void 0,onBeforeError:void 0,onListRefetch:void 0,onPaymentSuccess:void 0,onValidationInfo:void 0,onPaymentFailure:void 0,onBeforeProviderRedirect:void 0,onComponentListChange:void 0,onPaymentDeclined:void 0,onReady:void 0,refetchListBeforeCharge:!1},this.scriptLoader=new a2,this.dropInComponents={},this.components=new Set,this.internalEvents=new a4,this.publicEvents=new a4,this.metaInfo={},this.supportsGooglePay=!1,this.internalEvents.on("mount",function(t){e.publicEvents.emit("component:mounted",t)}),this.internalEvents.on("unmount",function(t){e.publicEvents.emit("component:unmounted",t)})}return e.prototype.on=function(e,t){this.publicEvents.on(e,t)},e.prototype.off=function(e,t){this.publicEvents.off(e,t)},e.prototype.once=function(e,t){this.publicEvents.once(e,t)},e.prototype.destroy=function(){var e=this;Object.keys(this.dropInComponents).forEach(function(t){e.dropInComponents[t].unmount(),delete e.dropInComponents[t]}),this.components.clear(),this.publicEvents.emit("destroyed",{}),this.publicEvents.removeAllListeners(),this.internalEvents.removeAllListeners(),this.state="IDLE",aT.info("CheckoutWeb destroyed")},e.getGenericFetchListError=function(){return{interaction:{code:"ABORT",reason:"SYSTEM_FAILURE"},resultInfo:"We encountered a problem connecting to the server"}},e.prototype.preInitScript=function(e){return g(this,void 0,void 0,function(){var t,n,r,o;return y(this,function(i){for(t=0,n=e;t<n.length;t++)r=n[t],(o=aD(this.metaInfo,r))?(aF("".concat(o,": Preloading component"),aZ.INFO),this.scriptLoader.loadScriptChain([o],m({},this.metaInfo),this.environment.getCDNLink.bind(this.environment))):aF("Error preloading drop-in component, Method name is unknown: ".concat(r),aZ.ERROR,{info:r});return[2,Promise.resolve()]})})},e.prototype.initialise=function(t){return g(this,arguments,void 0,function(t,n){var r,o,i,a,s,c,u,l,p,d,f,h,g;return void 0===n&&(n=!1),y(this,function(y){var _;switch(y.label){case 0:if(this.componentsManager=new a5(this),this.state="LOADING",o=(r=(_=rE.safeParse(t)).success?{isValid:!0,data:_.data}:{isValid:!1,error:_.error}).isValid,i=r.data,a=r.error,!o)return this.state="ERROR",console.error("[Payoneer Checkout Web SDK] Invalid configuration: ",a),aT.error("Invalid configuration:",a),[2,this];if(this.config=i,this.environment=function(e){var t;switch(e){case"test":t=b.replace("<env>","sandbox");break;case"live":t=b.replace("<env>","live");break;default:t=b.replace("<env>",e)}function n(){return new URL("".concat(null==t?void 0:t.replace("<entity>","api"),"/pci/v1"))}function r(){return new URL("".concat(null==t?void 0:t.replace("<entity>","resources")))}return{getListURL:function(e){return"".concat(n().toString(),"/").concat(e)},getCDNLink:function(e){return"".concat(r().toString()).concat(e)},getEnvName:function(){return e},getMetaInfoURL:function(e){void 0===e&&(e="");var t=e?"".concat(e,"/"):"";return"".concat(r().toString()).concat(t,"meta-info.json")}
50,isValidLinksURL:function(e){try{if(new URL(e).origin!==n().origin)return!1}catch(e){return!1}return!0},isValidResourceURL:function(e){try{if(new URL(e).origin!==r().origin)return!1}catch(e){return!1}return!0},isValidHostedInputsURL:function(e){try{if(new URL(e).origin!==new URL("".concat(null==t?void 0:t.replace("<entity>","hostedinputs"))).origin)return!1}catch(e){return!1}return!0},getLogoUrl:function(e){return"".concat(r()).concat(e)}}}(null==(p=this.config)?void 0:p.env),(null==(d=this.config.telemetry)?void 0:d.enabled)&&!n&&(az.init(m(m({},this.config.telemetry),{globalContext:m({libraryVersion:"1.25.0",environment:this.config.env,longId:this.config.longId},this.config.telemetry.globalContext)}),this.config.env),az.addBreadcrumb({message:"CheckoutWeb initialised",level:"info"})),n)return[3,4];y.label=1;case 1:return y.trys.push([1,3,,4]),[4,Promise.all([aP(this.environment.getMetaInfoURL("web/libraries/checkout-web-sdk")),aP(this.environment.getMetaInfoURL("web/libraries/checkout-web-stripe"))])];case 2:return c=(s=y.sent())[0],u=s[1],this.metaInfo=function e(t,n){if(Array.isArray(t)&&Array.isArray(n)){for(var r=[],o=function(t){if(aU(t)&&"id"in t){var n=r.findIndex(function(e){return aU(e)&&"id"in e&&e.id===t.id});n>=0?r[n]=e(r[n],t):r.push(t)}else(aU(t)||r.includes(t))&&(!aU(t)||"id"in t)||r.push(t)},i=0,a=v(v([],t,!0),n,!0);i<a.length;i++)o(a[i]);return r}if(aU(t)&&aU(n)){var s=m({},t);for(var c in n)Object.hasOwn(n,c)&&(s[c]=c in t?e(t[c],n[c]):n[c]);return s}return null!=n?n:t}(m(m({},c),{providerPrefix:{WORLDPAY:"",TESTPSP:"",PPRO:""},supportedComponents:["payoneer-cards","payoneer-redirect"],"payoneer-cards":m(m({},c["payoneer-cards"]),{supportedMethods:{cards:["AMEX","DISCOVER","JCB","MASTERCARD","VISA"]},logoTemplate:"web/libraries/checkout-web-sdk/payoneer-cards/logo/<%NETWORK_CODE%>/[email protected]",labels:{JCB:"Cards",AMEX:"Cards",VISA:"Cards",MASTERCARD:"Cards",DISCOVER:"Cards"}}),"payoneer-redirect":m(m({},c["payoneer-redirect"]),{supportedMethods:{klarna:["KLARNA"],clearpay:["CLEARPAY"],afterpay:["AFTERPAY"],affirm:["AFFIRM"]},logoTemplate:"web/libraries/checkout-web-sdk/payoneer-redirect/logo/<%NETWORK_CODE%>/[email protected]",labels:{AFTERPAY:"Afterpay",CLEARPAY:"Clearpay",KLARNA:"Klarna",AFFIRM:"Affirm"}})}),u),[3,4];case 3:return l=y.sent(),this.state="ERROR",aT.error("Error fetching meta info:",l),[2,this];case 4:return(null==(h=null==(f=this.config)?void 0:f.preload)?void 0:h.length)>0&&!n?[4,this.preInitScript(this.config.preload)]:[3,6];case 5:y.sent(),y.label=6;case 6:if(!(null==(g=this.config)?void 0:g.longId))return this.state="IDLE",[2,this];y.label=7;case 7:return y.trys.push([7,9,,10]),[4,this.setupListData()];case 8:return y.sent(),[3,10];case 9:return y.sent(),this.handleFetchListError(e.getGenericFetchListError()),this.state="ERROR",[2,this];case 10:return n&&this.onRefetchListData("checkout-web"),[2,this]}})})},e.prototype.getGooglePayAvailability=function(e,t){return g(this,void 0,void 0,function(){var n,r,o,i;return y(this,function(a){switch(a.label){case 0:return(null==(o=window.Payoneer)?void 0:o.checkGooglePayAvailability)?[4,null==(i=window.Payoneer)?void 0:i.checkGooglePayAvailability(null==e?void 0:e.networks,t)]:[3,2];case 1:return r=a.sent(),[3,3];case 2:r=!1,a.label=3;case 3:return n=r,this.supportsGooglePay=n,aT.info("supportsGooglePay",n),[2,n]}})})},e.prototype.setupListData=function(t){return g(this,void 0,void 0,function(){var n,r,o,i,a,s,c,u,l,p,d,f;return y(this,function(h){var g,y,v,_,b,E,w;switch(h.label){case 0:return this.environment&&this.config.longId?(this.state="LOADING",[4,aP(this.environment.getListURL(this.config.longId))]):[2];case 1:if(!(null==(l=null==(n=h.sent())?void 0:n.interaction)?void 0:l.code))return this.handleFetchListError(e.getGenericFetchListError()),this.state="ERROR",[2];if("PROCEED"!==n.interaction.code)return this.handleFetchListError(n),this.state="ERROR",[2];r=m(m({},n),{networks:m({},n.networks)}),o=function(e){for(var t,n,r=e.supportedComponents||[],o=[],i=[],a=0;a<r.length;a++)for(var s=r[a],c=0,u=Object.entries(null!=(n=null==(t=e[s])?void 0:t.supportedMethods)?n:{});c<u.length;c++){var l=u[c],p=l[0],d=l[1];i.push(p),d.length&&o.push.apply(o,d)}return{methods:i,networks:o.filter(function(e,t){return o.indexOf(e)===t})}}(this.metaInfo).networks,(null==(p=null==r?void 0:r.networks)?void 0:p.applicable)&&(r.networks.applicable=r.networks.applicable.filter(function(e){var t=e.code;return o.includes(t)})),(null==(d=null==r?void 0:r.networks)?void 0:d.applicable)&&(this.providers=(null==(f=r.networks.applicable[0])?void 0:f.providers)||[]),h.label=2;case 2:return h.trys.push([2,4,,5]),Array.isArray(null==(E=null==(b=i=n1({links:n1({binlookup:rp((_=v=this.environment).isValidLinksURL,"Invalid Bin lookup URL").optional(),self:rp(_.isValidLinksURL,"Invalid list URL"),hostedInputs:rp(_.isValidHostedInputsURL,"Invalid hosted input URL").optional(),lang:rp(_.isValidResourceURL,"Invalid lang URL").optional()}).loose(),returnCode:rh.optional(),interaction:rg,identification:ry.optional(),status:rm.optional(),networks:n1({applicable:nQ(n1({code:nk(),label:nk(),method:nk(),grouping:nk(),registration:nk(),recurrence:nk(),redirect:nW().optional(),button:nk().optional(),selected:nW().optional(),operationType:nk(),deferral:nk().optional(),links:n1({self:rp(v.isValidLinksURL,"Invalid network link").optional(),operation:rp(v.isValidLinksURL,"Invalid network operation link").optional()}).loose()}).loose()).min(0)}).loose(),wallets:nQ(n1({code:nk(),networks:nQ(nk()).min(0),data:nQ(n1({key:nk(),value:nk()}).loose()).optional()}).loose()).optional(),style:rv.optional(),payment:r_,resultInfo:nk().optional(),operationType:nk().optional(),timestamp:nk().optional(),operation:nk().optional(),resultCode:nk().optional(),integrationType:nk().default("DISPLAY_NATIVE")}).loose().parse(r))?void 0:b.networks)?void 0:E.applicable)&&b.networks.applicable.length>0&&b.networks.applicable[0]&&"object"==typeof b.networks.applicable[0]&&"contractData"in b.networks.applicable[0]&&b.networks.applicable[0].contractData&&"object"==typeof b.networks.applicable[0].contractData&&"publishableKey"in b.networks.applicable[0].contractData&&(w=b.networks.applicable[0].contractData.publishableKey),a=null!=w?w:"",[4,this.getGooglePayAvailability(i,a)];case 3:return h.sent(),s=aL(i,this.environment,this.metaInfo),g=new Set(this.availableDropInComponents().map(function(e){return String(e.name)}
50)),c={addedComponents:aj(y=new Set(s.map(function(e){return String(e.name)})),g),removedComponents:aj(g,y),availableComponents:y},this.listData=i,c.addedComponents.size>0||c.removedComponents.size>0?(aT.debug("Diff: Components changed"),this.onComponentListChange(c,t)):aT.debug("Diff: Components remains unchanged"),this.state="LOADED",[3,5];case 4:return u=h.sent(),n&&this.handleFetchListError(n),aT.error("Invalid list data",u),this.state="ERROR",[3,5];case 5:return[2]}})})},e.prototype.handleFetchListError=function(e){var t;(null==(t=this.config)?void 0:t.onBeforeError)?this.config.onBeforeError(this,"checkout-web",e):aT.error("Error fetching list data",e)},e.prototype.getMethodName=function(e){return aN(e,this.metaInfo,this.providers||[])},e.prototype.dropIn=function(e,t){var n,r,o=this,i=this.getMethodName(e),a=aD(this.metaInfo,i);if(!a)return aT.error("".concat(i," is an unknown drop-in-component"));this.components.add(i);var s=null==i?void 0:i.toUpperCase(),c="".concat(a,"::").concat(s),u={refetchListBeforeCharge:null!=(r=null==(n=this.config)?void 0:n.refetchListBeforeCharge)&&r};if(a8.forEach(function(e){var t=o.config[e];"function"==typeof t&&(u[e]=function(e,n){return t(o,e,n)})}),this.dropInComponents[c])aT.info("".concat(a,":").concat(s,": Exists, skipping drop-in"));else{var l={name:a,network:s,method:s,hidePaymentButton:(null==t?void 0:t.hidePaymentButton)||!1,refetchList:function(e,t){return o.refetchListData(a,t)}};i.includes("card")&&(l.primaryColor=(null==t?void 0:t.primaryColor)||void 0,l.primaryTextColor=(null==t?void 0:t.primaryTextColor)||void 0),this.dropInComponents[c]=new a1(l,this.listData,this.internalEvents,this.publicEvents),aT.info("".concat(a,"::").concat(s,": Dropping-in"))}return this.scriptLoader.loadScriptChain([a],m({},this.metaInfo),this.environment.getCDNLink.bind(this.environment)),this.scriptLoader.onLoad(a,function(){aT.info("".concat(a,"::").concat(s,": is loaded. setting Node and list data"));try{o.dropInComponents[c].update(u,o.listData)}catch(e){aF("Error updating ".concat(a,"::").concat(s,":"),aZ.ERROR,{error:e})}}),this.dropInComponents[c]},e.prototype.update=function(e){return az.addBreadcrumb({message:"CheckoutWeb config updated",level:"info"}),this.initialise(m(m({},this.config),e),!0),this},e.prototype.updateLongId=function(e){return az.addBreadcrumb({message:"Long ID updated",level:"info"}),this.update(m(m({},this.config),{longId:e}))},e.prototype.reload=function(){az.addBreadcrumb({message:"CheckoutWeb reloaded",level:"info"}),this.update(this.config)},e.prototype.remove=function(e){var t=this.getMethodName(e),n="".concat(t,": Trying to remove non existant component");if(!this.components.has(t))return aF(n,aZ.WARN),!1;var r=aD(this.metaInfo,t),o=null==t?void 0:t.toUpperCase(),i="".concat(r,"::").concat(o),a=this.dropInComponents[i]||void 0;return a?(a.unmount(),this.components.delete(t),delete this.dropInComponents[i],aT.debug("".concat(a.component.name,"::").concat(a.component.network,": Removed succcessfully")),!0):(aF(n,aZ.WARN),!1)},e.prototype.getComponentInfo=function(e){return this.availableDropInComponents().find(function(t){return t.name===e})||{}},e.prototype.isDroppedIn=function(e){return this.components.has(this.getMethodName(e))},e.prototype.isAvailable=function(e){return!!this.availableDropInComponents().find(function(t){return e===t.name})},e.prototype.availableDropInComponents=function(){return aL(this.listData,this.environment,this.metaInfo,{supportsGooglePay:this.supportsGooglePay})},e.prototype.refetchListData=function(e,t){return g(this,void 0,void 0,function(){return y(this,function(n){switch(n.label){case 0:return az.addBreadcrumb({message:"Refetching list data",level:"info"}),[4,this.setupListData(t)];case 1:return n.sent(),[4,this.onRefetchListData(e)];case 2:return n.sent(),[2]}})})},e.prototype.onRefetchListData=function(e){return g(this,void 0,void 0,function(){var t;return y(this,function(n){switch(n.label){case 0:return this.passListDataAsProps(this.listData),(null==(t=this.config)?void 0:t.onListRefetch)&&"function"==typeof this.config.onListRefetch?[4,this.config.onListRefetch(this,e,this.listData)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.onComponentListChange=function(e,t){var n;(null==(n=this.config)?void 0:n.onComponentListChange)&&"function"==typeof this.config.onComponentListChange&&this.config.onComponentListChange(this,{availableComponents:e.availableComponents,addedComponents:e.addedComponents,removedComponents:e.removedComponents,chargeResponse:t})},e.prototype.passListDataAsProps=function(e){Object.entries(this.dropInComponents).forEac
50h(function(t){t[1].updateListData(e)})},e}();function se(e){return g(this,void 0,void 0,function(){return y(this,function(t){return[2,(new a7).initialise(e)]})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.