@incodetech/welcome 1.85.0-20251209093606.0 → 1.85.0-20251209153124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/onBoarding.umd.js
CHANGED
|
@@ -63,7 +63,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[St]+=1);const breakpoints$3={
|
|
|
63
63
|
justify-content: center;
|
|
64
64
|
align-items: center;
|
|
65
65
|
flex-direction: column;
|
|
66
|
-
`;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>{let Be,Le;return{promise:new Promise((tt,nt)=>{Be=tt,Le=nt}),resolve:Be,reject:Le}});class InterruptionHandler{constructor(){this.boundVisibilityChange=this.handleVisibilityChange.bind(this),this.boundOnline=this.handleOnline.bind(this),this.boundOffline=this.handleOffline.bind(this),this.boundUnhandledRejection=this.handleUnhandledRejection.bind(this),this.boundError=this.handleError.bind(this),this.initialized=!1}registerEventListeners(){this.initialized||(document.addEventListener("visibilitychange",this.boundVisibilityChange),window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline),window.addEventListener("unhandledrejection",this.boundUnhandledRejection),window.addEventListener("error",this.boundError),this.initialized=!0)}removeEventListeners(){this.initialized&&(this.initialized=!1,document.removeEventListener("visibilitychange",this.boundVisibilityChange),window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),window.removeEventListener("unhandledrejection",this.boundUnhandledRejection),window.removeEventListener("error",this.boundError))}handleVisibilityChange(){document.hidden?this.onAppHidden():this.onAppVisible()}onAppHidden(){}onAppVisible(){}handleOnline(){}handleOffline(){}handleUnhandledRejection(Le){}handleError(Le){}}const regex$1={CURP_PATTERN:/^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/,EMAIL_PATTERN:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,SSN_PATTERN:/^\d{3}-?\d{2}-?\d{4}$/};function webgl(){let Be,Le,Ye=256,tt=128;Be=document.body.appendChild(document.createElement("canvas")),Be.width=Ye,Be.height=tt;try{Le=Be.getContext("webgl2")||Be.getContext("experimental-webgl2")||Be.getContext("webgl")||Be.getContext("experimental-webgl")||Be.getContext("moz-webgl");const nt="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",ft="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",ht=Le.createBuffer();Le.bindBuffer(Le.ARRAY_BUFFER,ht);const gt=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0]);Le.bufferData(Le.ARRAY_BUFFER,gt,Le.STATIC_DRAW),ht.itemSize=3,ht.numItems=3;const At=Le.createProgram(),xt=Le.createShader(Le.VERTEX_SHADER);Le.shaderSource(xt,nt),Le.compileShader(xt);const Et=Le.createShader(Le.FRAGMENT_SHADER);Le.shaderSource(Et,ft),Le.compileShader(Et),Le.attachShader(At,xt),Le.attachShader(At,Et),Le.linkProgram(At),Le.useProgram(At),At.vertexPosAttrib=Le.getAttribLocation(At,"attrVertex"),At.offsetUniform=Le.getUniformLocation(At,"uniformOffset"),Le.enableVertexAttribArray(At.vertexPosAttrib),Le.vertexAttribPointer(At.vertexPosAttrib,ht.itemSize,Le.FLOAT,!1,0,0),Le.uniform2f(At.offsetUniform,1,1),Le.drawArrays(Le.TRIANGLE_STRIP,0,ht.numItems);let yt="";const Ct=new Uint8Array(Ye*tt*4);return Le.readPixels(0,0,Ye,tt,Le.RGBA,Le.UNSIGNED_BYTE,Ct),yt=JSON.stringify(Ct).replace(/,?"[0-9]+":/g,""),document.body.removeChild(Be),sha256(yt)}catch{return""}}const sha256=(()=>{let Be=1,Le,Ye=[],tt=[];for(;++Be<18;)for(Le=Be*Be;Le<312;Le+=Be)Ye[Le]=1;function nt(gt,At){return Math.pow(gt,1/At)%1*4294967296|0}for(Be=1,Le=0;Be<313;)Ye[++Be]||(tt[Le]=nt(Be,2),Ye[Le++]=nt(Be,3));function ft(gt,At){return gt>>>At|gt<<32-At}function ht(gt){let At=tt.slice(Be=0),xt=unescape(encodeURI(gt)),Et=[],yt=xt.length,Ct=[],kt,vt,bt;for(;Be<yt;)Ct[Be>>2]|=(xt.charCodeAt(Be)&255)<<8*(3-Be++%4);for(yt*=8,Ct[yt>>5]|=128<<24-yt%32,Ct[bt=yt+64>>5|15]=yt,Be=0;Be<bt;Be+=16){for(kt=At.slice(Le=0,8);Le<64;kt[4]+=vt)Le<16?Et[Le]=Ct[Le+Be]:Et[Le]=(ft(vt=Et[Le-2],17)^ft(vt,19)^vt>>>10)+(Et[Le-7]|0)+(ft(vt=Et[Le-15],7)^ft(vt,18)^vt>>>3)+(Et[Le-16]|0),kt.unshift((vt=(kt.pop()+(ft(gt=kt[4],6)^ft(gt,11)^ft(gt,25))+((gt&kt[5]^~gt&kt[6])+Ye[Le])|0)+(Et[Le++]|0))+(ft(yt=kt[0],2)^ft(yt,13)^ft(yt,22))+(yt&kt[1]^kt[1]&kt[2]^kt[2]&yt));for(Le=8;Le--;)At[Le]=kt[Le]+At[Le]}for(xt="";Le<63;)xt+=(At[++Le>>3]>>4*(7-Le%8)&15).toString(16);return xt}return ht})();var store;function getGlobalConfig(Be){return{lang:store==null?void 0:store.lang,message:Be==null?void 0:Be.message,abortEarly:store==null?void 0:store.abortEarly,abortPipeEarly:store==null?void 0:store.abortPipeEarly}}var store2;function getGlobalMessage(Be){return store2==null?void 0:store2.get(Be)}var store3;function getSchemaMessage(Be){return store3==null?void 0:store3.get(Be)}var store4;function getSpecificMessage(Be,Le){var Ye;return(Ye=store4==null?void 0:store4.get(Be))==null?void 0:Ye.get(Le)}function _stringify$3(Be){var Ye,tt;const Le=typeof Be;return Le==="string"?`"${Be}"`:Le==="number"||Le==="bigint"||Le==="boolean"?`${Be}`:Le==="object"||Le==="function"?(Be&&((tt=(Ye=Object.getPrototypeOf(Be))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Le}function _addIssue(Be,Le,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Be.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$3(ft),At={kind:Be.kind,type:Be.type,input:ft,expected:ht,received:gt,message:`Invalid ${Le}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Be.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Be.kind==="schema",Et=(nt==null?void 0:nt.message)??Be.message??getSpecificMessage(Be.reference,At.lang)??(xt?getSchemaMessage(At.lang):null)??tt.message??getGlobalMessage(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps(Be){return{version:1,vendor:"valibot",validate(Le){return Be["~run"]({value:Le},getGlobalConfig())}}}function _isValidObjectKey(Be,Le){return Object.hasOwn(Be,Le)&&Le!=="__proto__"&&Le!=="prototype"&&Le!=="constructor"}function _joinExpects(Be,Le){const Ye=[...new Set(Be)];return Ye.length>1?`(${Ye.join(` ${Le} `)})`:Ye[0]??"never"}function isValiError(Be){return Be instanceof ValiError}var ValiError=class extends Error{constructor(Be){super(Be[0].message),this.name="ValiError",this.issues=Be}};function getFallback(Be,Le,Ye){return typeof Be.fallback=="function"?Be.fallback(Le,Ye):Be.fallback}function getDefault(Be,Le,Ye){return typeof Be.default=="function"?Be.default(Le,Ye):Be.default}function boolean$2(Be){return{kind:"schema",type:"boolean",reference:boolean$2,expects:"boolean",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="boolean"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function custom(Be,Le){return{kind:"schema",type:"custom",reference:custom,expects:"unknown",async:!1,check:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return this.check(Ye.value)?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function function_(Be){return{kind:"schema",type:"function",reference:function_,expects:"Function",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="function"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function literal(Be,Le){return{kind:"schema",type:"literal",reference:literal,expects:_stringify$3(Be),async:!1,literal:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===this.literal?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function null_(Be){return{kind:"schema",type:"null",reference:null_,expects:"null",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return Le.value===null?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function number$3(Be){return{kind:"schema",type:"number",reference:number$3,expects:"number",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="number"&&!isNaN(Le.value)?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function object(Be,Le){return{kind:"schema",type:"object",reference:object,expects:"Object",async:!1,entries:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const yt of xt.issues)yt.path?yt.path.unshift(Et):yt.path=[Et],(ft=Ye.issues)==null||ft.push(yt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue(this,"type",Ye,tt);return Ye}}}function optional(Be,Le){return{kind:"schema",type:"optional",reference:optional,expects:`(${Be.expects} | undefined)`,async:!1,wrapped:Be,default:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function record(Be,Le,Ye){return{kind:"schema",type:"record",reference:record,expects:"Object",async:!1,key:Be,value:Le,message:Ye,get"~standard"(){return _getStandardProps(this)},"~run"(tt,nt){var ht,gt;const ft=tt.value;if(ft&&typeof ft=="object"){tt.typed=!0,tt.value={};for(const At in ft)if(_isValidObjectKey(ft,At)){const xt=ft[At],Et=this.key["~run"]({value:At},nt);if(Et.issues){const Ct={type:"object",origin:"key",input:ft,key:At,value:xt};for(const kt of Et.issues)kt.path=[Ct],(ht=tt.issues)==null||ht.push(kt);if(tt.issues||(tt.issues=Et.issues),nt.abortEarly){tt.typed=!1;break}}const yt=this.value["~run"]({value:xt},nt);if(yt.issues){const Ct={type:"object",origin:"value",input:ft,key:At,value:xt};for(const kt of yt.issues)kt.path?kt.path.unshift(Ct):kt.path=[Ct],(gt=tt.issues)==null||gt.push(kt);if(tt.issues||(tt.issues=yt.issues),nt.abortEarly){tt.typed=!1;break}}(!Et.typed||!yt.typed)&&(tt.typed=!1),Et.typed&&(tt.value[Et.value]=yt.value)}}else _addIssue(this,"type",tt,nt);return tt}}}function string$2(Be){return{kind:"schema",type:"string",reference:string$2,expects:"string",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="string"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function _subIssues(Be){let Le;if(Be)for(const Ye of Be)Le?Le.push(...Ye.issues):Le=Ye.issues;return Le}function union(Be,Le){return{kind:"schema",type:"union",reference:union,expects:_joinExpects(Be.map(Ye=>Ye.expects),"|"),async:!1,options:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){let nt,ft,ht;for(const gt of this.options){const At=gt["~run"]({value:Ye.value},tt);if(At.typed)if(At.issues)ft?ft.push(At):ft=[At];else{nt=At;break}else ht?ht.push(At):ht=[At]}if(nt)return nt;if(ft){if(ft.length===1)return ft[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ft)}),Ye.typed=!0}else{if((ht==null?void 0:ht.length)===1)return ht[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ht)})}return Ye}}}function parse$8(Be,Le,Ye){const tt=Be["~run"]({value:Le},getGlobalConfig(Ye));if(tt.issues)throw new ValiError(tt.issues);return tt.value}function validate$2(...Be){try{Be.forEach(({schema:Le,value:Ye})=>parse$8(Le,Ye))}catch(Le){if(isValiError(Le)){const Ye=Le.issues.map(tt=>{var ft;return`${((ft=tt.path)==null?void 0:ft.map(ht=>ht.key).join("."))||"root"}: ${tt.message}`}).join(", ");throw new Error(`Validation failed: ${Ye}`)}throw Le}}exports.api=void 0;function setApi(Be){exports.api=Be}function setToken(Be){exports.api.defaults.headers["X-Incode-Hardware-Id"]=Be}const eventsQueue=[];function addEvent(Be){const{token:Le,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Be;if(!Le){eventsQueue.push(Be);return}return exports.api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Le}}).catch(()=>{})}function emptyQueue(Be){eventsQueue.forEach(Le=>{addEvent({...Le,token:Be})})}const state={token:null};var PipelineProfileName=(Be=>(Be[Be.IdCapture_2_01=0]="IdCapture_2_01",Be[Be.IdCapture_2_02=1]="IdCapture_2_02",Be[Be.IdCapture_3_02=2]="IdCapture_3_02",Be[Be.IdVideoSelfie_2_01=3]="IdVideoSelfie_2_01",Be[Be.SelfieWithAggregationMetrics=4]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=5]="SelfieWithQualityMetrics",Be[Be.SelfieVideoSelfie=6]="SelfieVideoSelfie",Be))(PipelineProfileName||{});class PipelineProfile{constructor(Le,Ye,tt,nt,ft,ht=null,gt=""){this.pipelineType=Le,this.name=Ye,this.detectionType=tt,this.modelNames=nt,this.parameters=ft,this.paramsConfigurator=ht,this.description=gt}reconfigureParams(Le,Ye){if(this.paramsConfigurator==null)throw new Error("PipelineProfile does not have a paramsConfigurator");this.paramsConfigurator(this.parameters,this.pipelineType,Le,Ye)}}var DetectionType=(Be=>(Be[Be.IDCapture=0]="IDCapture",Be[Be.Selfie=1]="Selfie",Be[Be.SelfieVideoSelfie=2]="SelfieVideoSelfie",Be[Be.IdVideoSelfie=3]="IdVideoSelfie",Be))(DetectionType||{}),WasmPipelineType=(Be=>(Be[Be.IdBlurGlarePipeline=0]="IdBlurGlarePipeline",Be[Be.IdBarcodeAndTextQualityPipeline=1]="IdBarcodeAndTextQualityPipeline",Be[Be.IdVideoSelfiePipeline=2]="IdVideoSelfiePipeline",Be[Be.SelfieWithAggregationMetrics=3]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=4]="SelfieWithQualityMetrics",Be[Be.IdFaceDetectionPipeline=5]="IdFaceDetectionPipeline",Be))(WasmPipelineType||{}),IdCaptureModelType=(Be=>(Be[Be.IdCaptureV1x=0]="IdCaptureV1x",Be[Be.IdCaptureV2x=1]="IdCaptureV2x",Be[Be.IdCaptureV3x=2]="IdCaptureV3x",Be))(IdCaptureModelType||{}),src$2={},src$1={},$_StatsigGlobal={},Log={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Log=Be.LogLevel=void 0;const Le=" DEBUG ",Ye=" INFO ",tt=" WARN ",nt=" ERROR ";function ft(gt){return gt.unshift("[Statsig]"),gt}Be.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class ht{static info(...At){ht.level>=Be.LogLevel.Info&&console.info(Ye,...ft(At))}static debug(...At){ht.level>=Be.LogLevel.Debug&&console.debug(Le,...ft(At))}static warn(...At){ht.level>=Be.LogLevel.Warn&&console.warn(tt,...ft(At))}static error(...At){ht.level>=Be.LogLevel.Error&&console.error(nt,...ft(At))}}Be.Log=ht,ht.level=Be.LogLevel.Warn})(Log),function(Be){var Le,Ye,tt;Object.defineProperty(Be,"__esModule",{value:!0}),Be._getInstance=Be._getStatsigGlobalFlag=Be._getStatsigGlobal=void 0;const nt=Log,ft=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:Ct}catch{return Ct}};Be._getStatsigGlobal=ft;const ht=kt=>(0,Be._getStatsigGlobal)()[kt];Be._getStatsigGlobalFlag=ht;const gt=kt=>{const vt=(0,Be._getStatsigGlobal)();return kt?vt.instances&&vt.instances[kt]:(vt.instances&&Object.keys(vt.instances).length>1&&nt.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),vt.firstInstance)};Be._getInstance=gt;const At="__STATSIG__",xt=typeof window<"u"?window:{},Et=typeof commonjsGlobal<"u"?commonjsGlobal:{},yt=typeof globalThis<"u"?globalThis:{},Ct=(tt=(Ye=(Le=xt[At])!==null&&Le!==void 0?Le:Et[At])!==null&&Ye!==void 0?Ye:yt[At])!==null&&tt!==void 0?tt:{instance:Be._getInstance};xt[At]=Ct,Et[At]=Ct,yt[At]=Ct}($_StatsigGlobal);var Diagnostics={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Diagnostics=void 0;const Le=new Map,Ye="start",tt="end",nt="statsig::diagnostics";Be.Diagnostics={_getMarkers:xt=>Le.get(xt),_markInitOverallStart:xt=>{gt(xt,ft({},Ye,"overall"))},_markInitOverallEnd:(xt,Et,yt)=>{gt(xt,ft({success:Et,error:Et?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:yt},tt,"overall"))},_markInitNetworkReqStart:(xt,Et)=>{gt(xt,ft(Et,Ye,"initialize","network_request"))},_markInitNetworkReqEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","network_request"))},_markInitProcessStart:xt=>{gt(xt,ft({},Ye,"initialize","process"))},_markInitProcessEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","process"))},_clearMarkers:xt=>{Le.delete(xt)},_formatError(xt){if(xt&&typeof xt=="object")return{code:At(xt,"code"),name:At(xt,"name"),message:At(xt,"message")}},_getDiagnosticsData(xt,Et,yt,Ct){var kt;return{success:(xt==null?void 0:xt.ok)===!0,statusCode:xt==null?void 0:xt.status,sdkRegion:(kt=xt==null?void 0:xt.headers)===null||kt===void 0?void 0:kt.get("x-statsig-region"),isDelta:yt.includes('"is_delta":true')===!0?!0:void 0,attempt:Et,error:Be.Diagnostics._formatError(Ct)}},_enqueueDiagnosticsEvent(xt,Et,yt,Ct){const kt=Be.Diagnostics._getMarkers(yt);if(kt==null||kt.length<=0)return-1;const vt=kt[kt.length-1].timestamp-kt[0].timestamp;Be.Diagnostics._clearMarkers(yt);const bt=ht(xt,{context:"initialize",markers:kt.slice(),statsigOptions:Ct});return Et.enqueue(bt),vt}};function ft(xt,Et,yt,Ct){return Object.assign({key:yt,action:Et,step:Ct,timestamp:Date.now()},xt)}function ht(xt,Et){return{eventName:nt,user:xt,value:null,metadata:Et,time:Date.now()}}function gt(xt,Et){var yt;const Ct=(yt=Le.get(xt))!==null&&yt!==void 0?yt:[];Ct.push(Et),Le.set(xt,Ct)}function At(xt,Et){if(Et in xt)return xt[Et]}})(Diagnostics);var EventLogger$1={},CacheKey={},Hashing={},TypingUtils={};Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0;function _typeOf(Be){return Array.isArray(Be)?"array":typeof Be}TypingUtils._typeOf=_typeOf;function _isTypeMatch(Be,Le){const Ye=tt=>Array.isArray(tt)?"array":tt===null?"null":typeof tt;return Ye(Be)===Ye(Le)}TypingUtils._isTypeMatch=_isTypeMatch,function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getSortedObject=Be._DJB2Object=Be._DJB2=void 0;const Le=TypingUtils,Ye=ft=>{let ht=0;for(let gt=0;gt<ft.length;gt++){const At=ft.charCodeAt(gt);ht=(ht<<5)-ht+At,ht=ht&ht}return String(ht>>>0)};Be._DJB2=Ye;const tt=(ft,ht)=>(0,Be._DJB2)(JSON.stringify((0,Be._getSortedObject)(ft,ht)));Be._DJB2Object=tt;const nt=(ft,ht)=>{if(ft==null)return null;const gt=Object.keys(ft).sort(),At={};return gt.forEach(xt=>{const Et=ft[xt];if(ht===0||(0,Le._typeOf)(Et)!=="object"){At[xt]=Et;return}At[xt]=(0,Be._getSortedObject)(Et,ht!=null?ht-1:ht)}),At};Be._getSortedObject=nt}(Hashing),Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const Hashing_1$4=Hashing;function _getUserStorageKey(Be,Le,Ye){var tt;if(Ye)return Ye(Be,Le);const nt=Le&&Le.customIDs?Le.customIDs:{},ft=[`uid:${(tt=Le==null?void 0:Le.userID)!==null&&tt!==void 0?tt:""}`,`cids:${Object.keys(nt).sort((ht,gt)=>ht.localeCompare(gt)).map(ht=>`${ht}-${nt[ht]}`).join(",")}`,`k:${Be}`];return(0,Hashing_1$4._DJB2)(ft.join("|"))}CacheKey._getUserStorageKey=_getUserStorageKey;function _getStorageKey(Be,Le,Ye){return Le?_getUserStorageKey(Be,Le,Ye):(0,Hashing_1$4._DJB2)(`k:${Be}`)}CacheKey._getStorageKey=_getStorageKey;var NetworkConfig={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.NetworkParam=Be.NetworkDefault=Be.Endpoint=void 0,Be.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},Be.NetworkDefault={[Be.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[Be.Endpoint._initialize]:"https://featureassets.org/v1",[Be.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},Be.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(NetworkConfig);var SafeJs={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getUnloadEvent=Be._getCurrentPageUrlSafe=Be._addDocumentEventListenerSafe=Be._addWindowEventListenerSafe=Be._isServerEnv=Be._getDocumentSafe=Be._getWindowSafe=void 0;const Le=()=>typeof window<"u"?window:null;Be._getWindowSafe=Le;const Ye=()=>{var At;const xt=(0,Be._getWindowSafe)();return(At=xt==null?void 0:xt.document)!==null&&At!==void 0?At:null};Be._getDocumentSafe=Ye;const tt=()=>{if((0,Be._getDocumentSafe)()!==null)return!1;const At=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||At};Be._isServerEnv=tt;const nt=(At,xt)=>{const Et=(0,Be._getWindowSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addWindowEventListenerSafe=nt;const ft=(At,xt)=>{const Et=(0,Be._getDocumentSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addDocumentEventListenerSafe=ft;const ht=()=>{var At;try{return(At=(0,Be._getWindowSafe)())===null||At===void 0?void 0:At.location.href.split(/[?#]/)[0]}catch{return}};Be._getCurrentPageUrlSafe=ht;const gt=()=>{const At=(0,Be._getWindowSafe)();return At&&"onpagehide"in At?"pagehide":"beforeunload"};Be._getUnloadEvent=gt})(SafeJs);var StatsigEvent={};Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const CONFIG_EXPOSURE_NAME="statsig::config_exposure",GATE_EXPOSURE_NAME="statsig::gate_exposure",LAYER_EXPOSURE_NAME="statsig::layer_exposure",_createExposure=(Be,Le,Ye,tt,nt)=>(Ye.bootstrapMetadata&&(tt.bootstrapMetadata=Ye.bootstrapMetadata),{eventName:Be,user:Le,value:null,metadata:_addEvaluationDetailsToMetadata(Ye,tt),secondaryExposures:nt,time:Date.now()}),_isExposureEvent=({eventName:Be})=>Be===GATE_EXPOSURE_NAME||Be===CONFIG_EXPOSURE_NAME||Be===LAYER_EXPOSURE_NAME;StatsigEvent._isExposureEvent=_isExposureEvent;const _createGateExposure=(Be,Le,Ye)=>{var tt,nt,ft;const ht={gate:Le.name,gateValue:String(Le.value),ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(ht.configVersion=Le.__evaluation.version),_createExposure(GATE_EXPOSURE_NAME,Be,Le.details,ht,_mapExposures((ft=(nt=Le.__evaluation)===null||nt===void 0?void 0:nt.secondary_exposures)!==null&&ft!==void 0?ft:[],Ye))};StatsigEvent._createGateExposure=_createGateExposure;function _mapExposures(Be,Le){return Be.map(Ye=>typeof Ye=="string"?(Le??{})[Ye]:Ye).filter(Ye=>Ye!=null)}StatsigEvent._mapExposures=_mapExposures;const _createConfigExposure=(Be,Le,Ye)=>{var tt,nt,ft,ht;const gt={config:Le.name,ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(gt.configVersion=Le.__evaluation.version),((nt=Le.__evaluation)===null||nt===void 0?void 0:nt.passed)!=null&&(gt.rulePassed=String(Le.__evaluation.passed)),_createExposure(CONFIG_EXPOSURE_NAME,Be,Le.details,gt,_mapExposures((ht=(ft=Le.__evaluation)===null||ft===void 0?void 0:ft.secondary_exposures)!==null&&ht!==void 0?ht:[],Ye))};StatsigEvent._createConfigExposure=_createConfigExposure;const _createLayerParameterExposure=(Be,Le,Ye,tt)=>{var nt,ft,ht,gt,At,xt,Et;const yt=Le.__evaluation,Ct=((nt=yt==null?void 0:yt.explicit_parameters)===null||nt===void 0?void 0:nt.includes(Ye))===!0;let kt="",vt=(ft=yt==null?void 0:yt.undelegated_secondary_exposures)!==null&&ft!==void 0?ft:[];Ct&&(kt=(ht=yt.allocated_experiment_name)!==null&&ht!==void 0?ht:"",vt=(gt=yt.secondary_exposures)!==null&>!==void 0?gt:[]);const bt=(At=Le.__evaluation)===null||At===void 0?void 0:At.parameter_rule_ids,It={config:Le.name,parameterName:Ye,ruleID:(xt=bt==null?void 0:bt[Ye])!==null&&xt!==void 0?xt:Le.ruleID,allocatedExperiment:kt,isExplicitParameter:String(Ct)};return((Et=Le.__evaluation)===null||Et===void 0?void 0:Et.version)!=null&&(It.configVersion=Le.__evaluation.version),_createExposure(LAYER_EXPOSURE_NAME,Be,Le.details,It,_mapExposures(vt,tt))};StatsigEvent._createLayerParameterExposure=_createLayerParameterExposure;const _addEvaluationDetailsToMetadata=(Be,Le)=>(Le.reason=Be.reason,Be.lcut&&(Le.lcut=String(Be.lcut)),Be.receivedAt&&(Le.receivedAt=String(Be.receivedAt)),Le);var StatsigOptionsCommon={};Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var StorageProvider={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._setObjectInStorage=Be._getObjectFromStorage=Be.Storage=void 0;const Le=Log,Ye=SafeJs,tt={},nt={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:yt=>tt[yt]?tt[yt]:null,setItem:(yt,Ct)=>{tt[yt]=Ct},removeItem:yt=>{delete tt[yt]},getAllKeys:()=>Object.keys(tt)};let ft=null;try{const yt=(0,Ye._getWindowSafe)();yt&&yt.localStorage&&typeof yt.localStorage.getItem=="function"&&(ft={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:Ct=>yt.localStorage.getItem(Ct),setItem:(Ct,kt)=>yt.localStorage.setItem(Ct,kt),removeItem:Ct=>yt.localStorage.removeItem(Ct),getAllKeys:()=>Object.keys(yt.localStorage)})}catch{Le.Log.warn("Failed to setup localStorageProvider.")}let ht=ft??nt,gt=ht;function At(yt){try{return yt()}catch(Ct){if(Ct instanceof Error&&Ct.name==="SecurityError")return Be.Storage._setProvider(nt),null;throw Ct}}Be.Storage={isReady:()=>gt.isReady(),isReadyResolver:()=>gt.isReadyResolver(),getProviderName:()=>gt.getProviderName(),getItem:yt=>At(()=>gt.getItem(yt)),setItem:(yt,Ct)=>At(()=>gt.setItem(yt,Ct)),removeItem:yt=>gt.removeItem(yt),getAllKeys:()=>gt.getAllKeys(),_setProvider:yt=>{ht=yt,gt=yt},_setDisabled:yt=>{yt?gt=nt:gt=ht}};function xt(yt){const Ct=Be.Storage.getItem(yt);return JSON.parse(Ct??"null")}Be._getObjectFromStorage=xt;function Et(yt,Ct){Be.Storage.setItem(yt,JSON.stringify(Ct))}Be._setObjectInStorage=Et})(StorageProvider);var UrlConfiguration$1={};Object.defineProperty(UrlConfiguration$1,"__esModule",{value:!0}),UrlConfiguration$1.UrlConfiguration=void 0;const Hashing_1$3=Hashing,NetworkConfig_1$2=NetworkConfig,ENDPOINT_DNS_KEY_MAP={[NetworkConfig_1$2.Endpoint._initialize]:"i",[NetworkConfig_1$2.Endpoint._rgstr]:"e",[NetworkConfig_1$2.Endpoint._download_config_specs]:"d"};class UrlConfiguration{constructor(Le,Ye,tt,nt){this.customUrl=null,this.fallbackUrls=null,this.endpoint=Le,this.endpointDnsKey=ENDPOINT_DNS_KEY_MAP[Le],Ye&&(this.customUrl=Ye),!Ye&&tt&&(this.customUrl=tt.endsWith("/")?`${tt}${Le}`:`${tt}/${Le}`),nt&&(this.fallbackUrls=nt);const ft=NetworkConfig_1$2.NetworkDefault[Le];this.defaultUrl=`${ft}/${Le}`}getUrl(){var Le;return(Le=this.customUrl)!==null&&Le!==void 0?Le:this.defaultUrl}getChecksum(){var Le;const Ye=((Le=this.fallbackUrls)!==null&&Le!==void 0?Le:[]).sort().join(",");return(0,Hashing_1$3._DJB2)(this.customUrl+Ye)}}UrlConfiguration$1.UrlConfiguration=UrlConfiguration;var VisibilityObserving={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._notifyVisibilityChanged=Be._subscribeToVisiblityChanged=Be._isUnloading=Be._isCurrentlyVisible=void 0;const Le=SafeJs,Ye="foreground",tt="background",nt=[];let ft=Ye,ht=!1;const gt=()=>ft===Ye;Be._isCurrentlyVisible=gt;const At=()=>ht;Be._isUnloading=At;const xt=yt=>{nt.unshift(yt)};Be._subscribeToVisiblityChanged=xt;const Et=yt=>{yt!==ft&&(ft=yt,nt.forEach(Ct=>Ct(yt)))};Be._notifyVisibilityChanged=Et,(0,Le._addWindowEventListenerSafe)("focus",()=>{ht=!1,(0,Be._notifyVisibilityChanged)(Ye)}),(0,Le._addWindowEventListenerSafe)("blur",()=>(0,Be._notifyVisibilityChanged)(tt)),(0,Le._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,Be._notifyVisibilityChanged)(document.visibilityState==="visible"?Ye:tt)}),(0,Le._addWindowEventListenerSafe)((0,Le._getUnloadEvent)(),()=>{ht=!0,(0,Be._notifyVisibilityChanged)(tt)})})(VisibilityObserving);var __awaiter$f=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(EventLogger$1,"__esModule",{value:!0}),EventLogger$1.EventLogger=void 0;const CacheKey_1$1=CacheKey,Hashing_1$2=Hashing,Log_1$8=Log,NetworkConfig_1$1=NetworkConfig,SafeJs_1$3=SafeJs,StatsigEvent_1=StatsigEvent,StatsigOptionsCommon_1$2=StatsigOptionsCommon,StorageProvider_1$4=StorageProvider,UrlConfiguration_1=UrlConfiguration$1,VisibilityObserving_1$1=VisibilityObserving,DEFAULT_QUEUE_SIZE=100,DEFAULT_FLUSH_INTERVAL_MS=1e4,MAX_DEDUPER_KEYS=1e3,DEDUPER_WINDOW_DURATION_MS=6e5,MAX_FAILED_LOGS=500,QUICK_FLUSH_WINDOW_MS=200,EVENT_LOGGER_MAP={},RetryFailedLogsTrigger={Startup:"startup",GainedFocus:"gained_focus"};class EventLogger{static _safeFlushAndForget(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye.flush().catch(()=>{})}static _safeRetryFailedLogs(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus)}constructor(Le,Ye,tt,nt){var ft,ht;this._sdkKey=Le,this._emitter=Ye,this._network=tt,this._options=nt,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(ft=nt==null?void 0:nt.loggingEnabled)!==null&&ft!==void 0?ft:(nt==null?void 0:nt.disableLogging)===!0?StatsigOptionsCommon_1$2.LoggingEnabledOption.disabled:StatsigOptionsCommon_1$2.LoggingEnabledOption.browserOnly,nt!=null&&nt.loggingEnabled&&nt.disableLogging!==void 0&&Log_1$8.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(ht=nt==null?void 0:nt.loggingBufferMaxSize)!==null&&ht!==void 0?ht:DEFAULT_QUEUE_SIZE;const gt=nt==null?void 0:nt.networkConfig;this._logEventUrlConfig=new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1$1.Endpoint._rgstr,gt==null?void 0:gt.logEventUrl,gt==null?void 0:gt.api,gt==null?void 0:gt.logEventFallbackUrls)}setLogEventCompressionMode(Le){this._network.setLogEventCompressionMode(Le)}setLoggingEnabled(Le){if(this._loggingEnabled==="disabled"&&Le!=="disabled"){const Ye=this._getStorageKey(),tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);tt&&this._queue.push(...tt),StorageProvider_1$4.Storage.removeItem(Ye)}this._loggingEnabled=Le}enqueue(Le){this._shouldLogEvent(Le)&&(this._normalizeAndAppendEvent(Le),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&EventLogger._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(Le){var Ye;const tt=(Ye=this._nonExposedChecks[Le])!==null&&Ye!==void 0?Ye:0;this._nonExposedChecks[Le]=tt+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var Le;const Ye=(0,SafeJs_1$3._isServerEnv)();Ye&&((Le=this._options)===null||Le===void 0?void 0:Le.loggingEnabled)!=="always"||(EVENT_LOGGER_MAP[this._sdkKey]=this,Ye||(0,VisibilityObserving_1$1._subscribeToVisiblityChanged)(tt=>{tt==="background"?EventLogger._safeFlushAndForget(this._sdkKey):tt==="foreground"&&EventLogger._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(RetryFailedLogsTrigger.Startup),this._startBackgroundFlushInterval())}stop(){return __awaiter$f(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete EVENT_LOGGER_MAP[this._sdkKey],yield this.flush()})}flush(){return __awaiter$f(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const Le=this._queue;this._queue=[],yield this._sendEvents(Le)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>QUICK_FLUSH_WINDOW_MS)&&setTimeout(()=>EventLogger._safeFlushAndForget(this._sdkKey),QUICK_FLUSH_WINDOW_MS))}_shouldLogEvent(Le){var Ye;if(((Ye=this._options)===null||Ye===void 0?void 0:Ye.loggingEnabled)!=="always"&&(0,SafeJs_1$3._isServerEnv)())return!1;if(!(0,StatsigEvent_1._isExposureEvent)(Le))return!0;const tt=Le.user?Le.user:{statsigEnvironment:void 0},nt=(0,CacheKey_1$1._getUserStorageKey)(this._sdkKey,tt),ft=Le.metadata?Le.metadata:{},ht=[Le.eventName,nt,ft.gate,ft.config,ft.ruleID,ft.allocatedExperiment,ft.parameterName,String(ft.isExplicitParameter),ft.reason].join("|"),gt=this._lastExposureTimeMap[ht],At=Date.now();return gt&&At-gt<DEDUPER_WINDOW_DURATION_MS?!1:(Object.keys(this._lastExposureTimeMap).length>MAX_DEDUPER_KEYS&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[ht]=At,!0)}_sendEvents(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye,tt;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(Le),!1;try{const ft=(0,VisibilityObserving_1$1._isUnloading)()&&this._network.isBeaconSupported()&&((tt=(Ye=this._options)===null||Ye===void 0?void 0:Ye.networkConfig)===null||tt===void 0?void 0:tt.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:Le}),(ft?this._sendEventsViaBeacon(Le):yield this._sendEventsViaPost(Le)).success?(this._emitter({name:"logs_flushed",events:Le}),!0):(Log_1$8.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(Le),!1)}catch{return Log_1$8.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye;const tt=yield this._network.post(this._getRequestData(Le)),nt=(Ye=tt==null?void 0:tt.code)!==null&&Ye!==void 0?Ye:-1;return{success:nt>=200&&nt<300}})}_sendEventsViaBeacon(Le){return{success:this._network.beacon(this._getRequestData(Le))}}_getRequestData(Le){return{sdkKey:this._sdkKey,data:{events:Le},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[NetworkConfig_1$1.NetworkParam.EventCount]:String(Le.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(Le){for(;Le.length>MAX_FAILED_LOGS;)Le.shift();const Ye=this._getStorageKey();try{const tt=this._getFailedLogsFromStorage(Ye);(0,StorageProvider_1$4._setObjectInStorage)(Ye,[...tt,...Le])}catch{Log_1$8.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(Le){let Ye=[];try{const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Le);return Array.isArray(tt)&&(Ye=tt),Ye}catch{return[]}}_retryFailedLogs(Le){const Ye=this._getStorageKey();__awaiter$f(this,void 0,void 0,function*(){StorageProvider_1$4.Storage.isReady()||(yield StorageProvider_1$4.Storage.isReadyResolver());const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);if(!tt)return;Le===RetryFailedLogsTrigger.Startup&&StorageProvider_1$4.Storage.removeItem(Ye),(yield this._sendEvents(tt))&&Le===RetryFailedLogsTrigger.GainedFocus&&StorageProvider_1$4.Storage.removeItem(Ye)}).catch(()=>{Log_1$8.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,Hashing_1$2._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(Le){Le.user&&(Le.user=Object.assign({},Le.user),delete Le.user.privateAttributes);const Ye={},tt=this._getCurrentPageUrl();tt&&(Ye.statsigMetadata={currentPage:tt});const nt=Object.assign(Object.assign({},Le),Ye);Log_1$8.Log.debug("Enqueued Event:",nt),this._queue.push(nt)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var Le;if(((Le=this._options)===null||Le===void 0?void 0:Le.includeCurrentPageUrlWithEvents)!==!1)return(0,SafeJs_1$3._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var Le,Ye;const tt=(Ye=(Le=this._options)===null||Le===void 0?void 0:Le.loggingIntervalMs)!==null&&Ye!==void 0?Ye:DEFAULT_FLUSH_INTERVAL_MS,nt=setInterval(()=>{const ft=EVENT_LOGGER_MAP[this._sdkKey];!ft||ft._flushIntervalId!==nt?clearInterval(nt):EventLogger._safeFlushAndForget(this._sdkKey)},tt);this._flushIntervalId=nt}}EventLogger$1.EventLogger=EventLogger;var StatsigMetadata={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigMetadataProvider=Be.SDK_VERSION=void 0,Be.SDK_VERSION="3.28.1";let Le={sdkVersion:Be.SDK_VERSION,sdkType:"js-mono"};Be.StatsigMetadataProvider={get:()=>Le,add:Ye=>{Le=Object.assign(Object.assign({},Le),Ye)}}})(StatsigMetadata);var ClientInterfaces={};Object.defineProperty(ClientInterfaces,"__esModule",{value:!0});var DataAdapterCore$1={},StableID={},UUID={};Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0;function getUUID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let Be=new Date().getTime(),Le=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,tt=>{let nt=Math.random()*16;return Be>0?(nt=(Be+nt)%16|0,Be=Math.floor(Be/16)):(nt=(Le+nt)%16|0,Le=Math.floor(Le/16)),(tt==="x"?nt:nt&7|8).toString(16)})}UUID.getUUID=getUUID,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const CacheKey_1=CacheKey,Log_1$7=Log,SafeJs_1$2=SafeJs,StorageProvider_1$3=StorageProvider,UUID_1=UUID,PROMISE_MAP={},COOKIE_ENABLED_MAP={},DISABLED_MAP={};StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:Be=>{if(DISABLED_MAP[Be])return null;if(PROMISE_MAP[Be]!=null)return PROMISE_MAP[Be];let Le=null;return Le=_loadFromCookie(Be),Le!=null?(PROMISE_MAP[Be]=Le,_persistToStorage(Le,Be),Le):(Le=_loadFromStorage(Be),Le==null&&(Le=(0,UUID_1.getUUID)()),_persistToStorage(Le,Be),_persistToCookie(Le,Be),PROMISE_MAP[Be]=Le,Le)},setOverride:(Be,Le)=>{PROMISE_MAP[Le]=Be,_persistToStorage(Be,Le),_persistToCookie(Be,Le)},_setCookiesEnabled:(Be,Le)=>{COOKIE_ENABLED_MAP[Be]=Le},_setDisabled:(Be,Le)=>{DISABLED_MAP[Be]=Le}};function _getStableIDStorageKey(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}function _persistToStorage(Be,Le){const Ye=_getStableIDStorageKey(Le);try{(0,StorageProvider_1$3._setObjectInStorage)(Ye,Be)}catch{Log_1$7.Log.warn("Failed to save StableID to storage")}}function _loadFromStorage(Be){const Le=_getStableIDStorageKey(Be);return(0,StorageProvider_1$3._getObjectFromStorage)(Le)}function _loadFromCookie(Be){if(!COOKIE_ENABLED_MAP[Be]||(0,SafeJs_1$2._getDocumentSafe)()==null)return null;const Le=document.cookie.split(";");for(const Ye of Le){const[tt,nt]=Ye.trim().split("=");if(tt===getCookieName(Be))return decodeURIComponent(nt)}return null}function _persistToCookie(Be,Le){if(!COOKIE_ENABLED_MAP[Le]||(0,SafeJs_1$2._getDocumentSafe)()==null)return;const Ye=new Date;Ye.setFullYear(Ye.getFullYear()+1),document.cookie=`${getCookieName(Le)}=${encodeURIComponent(Be)}; expires=${Ye.toUTCString()}; path=/`}function getCookieName(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}StableID.getCookieName=getCookieName;var StatsigUser={};Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const Hashing_1$1=Hashing,Log_1$6=Log;function _normalizeUser(Be,Le,Ye){try{const tt=JSON.parse(JSON.stringify(Be));return Le!=null&&Le.environment!=null?tt.statsigEnvironment=Le.environment:Ye!=null&&(tt.statsigEnvironment={tier:Ye}),tt}catch{return Log_1$6.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}StatsigUser._normalizeUser=_normalizeUser;function _getFullUserHash(Be){return Be?(0,Hashing_1$1._DJB2Object)(Be):null}StatsigUser._getFullUserHash=_getFullUserHash;var TypedJsonParse={};Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const Log_1$5=Log;function _typedJsonParse(Be,Le,Ye){try{const tt=JSON.parse(Be);if(tt&&typeof tt=="object"&&Le in tt)return tt}catch{}return Log_1$5.Log.error(`Failed to parse ${Ye}`),null}TypedJsonParse._typedJsonParse=_typedJsonParse;var __awaiter$e=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DataAdapterCore$1,"__esModule",{value:!0}),DataAdapterCore$1._makeDataAdapterResult=DataAdapterCore$1.DataAdapterCore=void 0;const Log_1$4=Log,StableID_1$2=StableID,StatsigUser_1=StatsigUser,StorageProvider_1$2=StorageProvider,TypedJsonParse_1=TypedJsonParse,CACHE_LIMIT=10,MAX_CACHE_WRITE_ATTEMPTS=8;class DataAdapterCore{constructor(Le,Ye){this._adapterName=Le,this._cacheSuffix=Ye,this._options=null,this._sdkKey=null,this._cacheLimit=CACHE_LIMIT,this._lastModifiedStoreKey=`statsig.last_modified_time.${Ye}`,this._inMemoryCache=new InMemoryCache}attach(Le,Ye,tt){this._sdkKey=Le,this._options=Ye}getDataSync(Le){const Ye=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),tt=this._getCacheKey(Ye),nt=this._inMemoryCache.get(tt,Ye);if(nt&&this._getIsCacheValueValid(nt))return nt;const ft=this._loadFromCache(tt);return ft&&this._getIsCacheValueValid(ft)?(this._inMemoryCache.add(tt,ft,this._cacheLimit),this._inMemoryCache.get(tt,Ye)):null}setData(Le,Ye){const tt=Ye&&(0,StatsigUser_1._normalizeUser)(Ye,this._options),nt=this._getCacheKey(tt);this._inMemoryCache.add(nt,_makeDataAdapterResult("Bootstrap",Le,null,tt),this._cacheLimit)}_getIsCacheValueValid(Le){return Le.stableID==null||Le.stableID===StableID_1$2.StableID.get(this._getSdkKey())}_getDataAsyncImpl(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){StorageProvider_1$2.Storage.isReady()||(yield StorageProvider_1$2.Storage.isReadyResolver());const nt=Le??this.getDataSync(Ye),ft=[this._fetchAndPrepFromNetwork(nt,Ye,tt)];return tt!=null&&tt.timeoutMs&&ft.push(new Promise(ht=>setTimeout(ht,tt.timeoutMs)).then(()=>(Log_1$4.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(ft)})}_prefetchDataImpl(Le,Ye){return __awaiter$e(this,void 0,void 0,function*(){const tt=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),nt=this._getCacheKey(tt),ft=yield this._getDataAsyncImpl(null,tt,Ye);ft&&this._inMemoryCache.add(nt,Object.assign(Object.assign({},ft),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){var nt;const ft=(nt=Le==null?void 0:Le.data)!==null&&nt!==void 0?nt:null,ht=Le!=null&&this._isCachedResultValidFor204(Le,Ye),gt=yield this._fetchFromNetwork(ft,Ye,tt,ht);if(!gt)return Log_1$4.Log.debug("No response returned for latest value"),null;const At=(0,TypedJsonParse_1._typedJsonParse)(gt,"has_updates","Response"),xt=this._getSdkKey(),Et=StableID_1$2.StableID.get(xt);let yt=null;if((At==null?void 0:At.has_updates)===!0)yt=_makeDataAdapterResult("Network",gt,Et,Ye);else if(ft&&(At==null?void 0:At.has_updates)===!1)yt=_makeDataAdapterResult("NetworkNotModified",ft,Et,Ye);else return null;const Ct=this._getCacheKey(Ye);return this._inMemoryCache.add(Ct,yt,this._cacheLimit),this._writeToCache(Ct,yt),yt})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Log_1$4.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(Le){var Ye;const tt=(Ye=StorageProvider_1$2.Storage.getItem)===null||Ye===void 0?void 0:Ye.call(StorageProvider_1$2.Storage,Le);if(tt==null)return null;const nt=(0,TypedJsonParse_1._typedJsonParse)(tt,"source","Cached Result");return nt?Object.assign(Object.assign({},nt),{source:"Cache"}):null}_writeToCache(Le,Ye){const tt=JSON.stringify(Ye);for(let nt=0;nt<MAX_CACHE_WRITE_ATTEMPTS;nt++)try{StorageProvider_1$2.Storage.setItem(Le,tt);break}catch(ft){if(!(ft instanceof Error)||!(ft.toString().includes("QuotaExceededError")||ft.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw ft;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(Le,this._cacheLimit-1)}this._runLocalStorageCacheEviction(Le)}_runLocalStorageCacheEviction(Le,Ye=this._cacheLimit){var tt;const nt=(tt=(0,StorageProvider_1$2._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&tt!==void 0?tt:{};nt[Le]=Date.now();const ft=_getEvictableKeys(nt,Ye);for(const ht of ft)delete nt[ht],StorageProvider_1$2.Storage.removeItem(ht);(0,StorageProvider_1$2._setObjectInStorage)(this._lastModifiedStoreKey,nt)}}DataAdapterCore$1.DataAdapterCore=DataAdapterCore;function _makeDataAdapterResult(Be,Le,Ye,tt){return{source:Be,data:Le,receivedAt:Date.now(),stableID:Ye,fullUserHash:(0,StatsigUser_1._getFullUserHash)(tt)}}DataAdapterCore$1._makeDataAdapterResult=_makeDataAdapterResult;class InMemoryCache{constructor(){this._data={}}get(Le,Ye){var tt;const nt=this._data[Le],ft=nt==null?void 0:nt.stableID,ht=(tt=Ye==null?void 0:Ye.customIDs)===null||tt===void 0?void 0:tt.stableID;return ht&&ft&&ht!==ft?(Log_1$4.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):nt}add(Le,Ye,tt){const nt=_getEvictableKeys(this._data,tt-1);for(const ft of nt)delete this._data[ft];this._data[Le]=Ye}merge(Le){this._data=Object.assign(Object.assign({},this._data),Le)}}function _getEvictableKeys(Be,Le){const Ye=Object.keys(Be);return Ye.length<=Le?[]:Le===0?Ye:Ye.sort((tt,nt)=>{const ft=Be[tt],ht=Be[nt];return typeof ft=="object"&&typeof ht=="object"?ft.receivedAt-ht.receivedAt:ft-ht}).slice(0,Ye.length-Le)}var DownloadConfigSpecsResponse={};Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0});var ErrorBoundary={},SDKType={};Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const SDK_CLIENT={};let suffix;SDKType.SDKType={_get:Be=>{var Le;return((Le=SDK_CLIENT[Be])!==null&&Le!==void 0?Le:"js-mono")+(suffix??"")},_setClientType(Be,Le){SDK_CLIENT[Be]=Le},_setBindingType(Be){(!suffix||suffix==="-react")&&(suffix="-"+Be)}},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__awaiter||function(yt,Ct,kt,vt){function bt(It){return It instanceof kt?It:new kt(function(wt){wt(It)})}return new(kt||(kt=Promise))(function(It,wt){function Rt(Dt){try{Bt(vt.next(Dt))}catch(Lt){wt(Lt)}}function Tt(Dt){try{Bt(vt.throw(Dt))}catch(Lt){wt(Lt)}}function Bt(Dt){Dt.done?It(Dt.value):bt(Dt.value).then(Rt,Tt)}Bt((vt=vt.apply(yt,Ct||[])).next())})};Object.defineProperty(Be,"__esModule",{value:!0}),Be.ErrorBoundary=Be.EXCEPTION_ENDPOINT=void 0;const Ye=Log,tt=SDKType,nt=StatsigMetadata;Be.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const ft="[Statsig] UnknownError";class ht{constructor(Ct,kt,vt,bt){this._sdkKey=Ct,this._options=kt,this._emitter=vt,this._lastSeenError=bt,this._seen=new Set}wrap(Ct,kt){try{const vt=Ct;xt(vt).forEach(bt=>{const It=vt[bt];"$EB"in It||(vt[bt]=(...wt)=>this._capture(kt?`${kt}:${bt}`:bt,()=>It.apply(Ct,wt)),vt[bt].$EB=!0)})}catch(vt){this._onError("eb:wrap",vt)}}logError(Ct,kt){this._onError(Ct,kt)}getLastSeenErrorAndReset(){const Ct=this._lastSeenError;return this._lastSeenError=void 0,Ct??null}attachErrorIfNoneExists(Ct){this._lastSeenError||(this._lastSeenError=gt(Ct))}_capture(Ct,kt){try{const vt=kt();return vt&&vt instanceof Promise?vt.catch(bt=>this._onError(Ct,bt)):vt}catch(vt){return this._onError(Ct,vt),null}}_onError(Ct,kt){try{Ye.Log.warn(`Caught error in ${Ct}`,{error:kt}),Le(this,void 0,void 0,function*(){var bt,It,wt,Rt,Tt,Bt,Dt;const Lt=kt||Error(ft),Nt=Lt instanceof Error,Pt=Nt?Lt.name:"No Name",Wt=gt(Lt);if(this._lastSeenError=Wt,this._seen.has(Pt))return;if(this._seen.add(Pt),!((It=(bt=this._options)===null||bt===void 0?void 0:bt.networkConfig)===null||It===void 0)&&It.preventAllNetworkTraffic){(wt=this._emitter)===null||wt===void 0||wt.call(this,{name:"error",error:kt,tag:Ct});return}const $t=tt.SDKType._get(this._sdkKey),Kt=nt.StatsigMetadataProvider.get(),Vt=Nt?Lt.stack:At(Lt),Ut=Object.assign({tag:Ct,exception:Pt,info:Vt,statsigOptions:Et(this._options)},Object.assign(Object.assign({},Kt),{sdkType:$t}));yield((Bt=(Tt=(Rt=this._options)===null||Rt===void 0?void 0:Rt.networkConfig)===null||Tt===void 0?void 0:Tt.networkOverrideFunc)!==null&&Bt!==void 0?Bt:fetch)(Be.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String($t),"STATSIG-SDK-VERSION":String(Kt.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(Ut)}),(Dt=this._emitter)===null||Dt===void 0||Dt.call(this,{name:"error",error:kt,tag:Ct})}).then(()=>{}).catch(()=>{})}catch{}}}Be.ErrorBoundary=ht;function gt(yt){return yt instanceof Error?yt:typeof yt=="string"?new Error(yt):new Error("An unknown error occurred.")}function At(yt){try{return JSON.stringify(yt)}catch{return ft}}function xt(yt){const Ct=new Set;let kt=Object.getPrototypeOf(yt);for(;kt&&kt!==Object.prototype;)Object.getOwnPropertyNames(kt).filter(vt=>typeof(kt==null?void 0:kt[vt])=="function").forEach(vt=>Ct.add(vt)),kt=Object.getPrototypeOf(kt);return Array.from(Ct)}function Et(yt){if(!yt)return{};const Ct={};return Object.keys(yt).forEach(kt=>{const vt=kt,bt=yt[vt];switch(typeof bt){case"number":case"bigint":case"boolean":Ct[String(vt)]=bt;break;case"string":bt.length<50?Ct[String(vt)]=bt:Ct[String(vt)]="set";break;case"object":vt==="environment"?Ct.environment=bt:vt==="networkConfig"?Ct.networkConfig=bt:Ct[String(vt)]=bt!=null?"set":"unset";break}}),Ct}}(ErrorBoundary);var EvaluationOptions={};Object.defineProperty(EvaluationOptions,"__esModule",{value:!0});var EvaluationTypes={};Object.defineProperty(EvaluationTypes,"__esModule",{value:!0});var InitializeResponse={};Object.defineProperty(InitializeResponse,"__esModule",{value:!0});var MemoKey={};Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const EXIST_KEYS=new Set([]),DO_NOT_MEMO_KEYS=new Set(["userPersistedValues"]);function createMemoKey(Be,Le,Ye){let tt=`${Be}|${Le}`;if(!Ye)return tt;for(const nt of Object.keys(Ye)){if(DO_NOT_MEMO_KEYS.has(nt))return;EXIST_KEYS.has(nt)?tt+=`|${nt}=true`:tt+=`|${nt}=${Ye[nt]}`}return tt}MemoKey.createMemoKey=createMemoKey;var NetworkCore$1={},NetworkFallbackResolver$1={},DnsTxtQuery={},__awaiter$d=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const FEATURE_ASSETS_DNS_QUERY=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),DNS_QUERY_ENDPOINT="https://cloudflare-dns.com/dns-query",DOMAIN_CHARS=["i","e","d"],MAX_START_LOOKUP=200;function _fetchTxtRecords(Be){return __awaiter$d(this,void 0,void 0,function*(){const Le=yield Be(DNS_QUERY_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:FEATURE_ASSETS_DNS_QUERY});if(!Le.ok){const nt=new Error("Failed to fetch TXT records from DNS");throw nt.name="DnsTxtFetchError",nt}const Ye=yield Le.arrayBuffer(),tt=new Uint8Array(Ye);return _parseDnsResponse(tt)})}DnsTxtQuery._fetchTxtRecords=_fetchTxtRecords;function _parseDnsResponse(Be){const Le=Be.findIndex((tt,nt)=>nt<MAX_START_LOOKUP&&String.fromCharCode(tt)==="="&&DOMAIN_CHARS.includes(String.fromCharCode(Be[nt-1])));if(Le===-1){const tt=new Error("Failed to parse TXT records from DNS");throw tt.name="DnsTxtParseError",tt}let Ye="";for(let tt=Le-1;tt<Be.length;tt++)Ye+=String.fromCharCode(Be[tt]);return Ye.split(",")}var __awaiter$c=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkFallbackResolver$1,"__esModule",{value:!0}),NetworkFallbackResolver$1._isDomainFailure=NetworkFallbackResolver$1.NetworkFallbackResolver=void 0;const DnsTxtQuery_1=DnsTxtQuery,Hashing_1=Hashing,Log_1$3=Log,StorageProvider_1$1=StorageProvider,DEFAULT_TTL_MS=7*24*60*60*1e3,COOLDOWN_TIME_MS=4*60*60*1e3;class NetworkFallbackResolver{constructor(Le){var Ye;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(Ye=Le.networkConfig)===null||Ye===void 0?void 0:Ye.networkOverrideFunc}setErrorBoundary(Le){this._errorBoundary=Le}tryBumpExpiryTime(Le,Ye){var tt;const nt=(tt=this._fallbackInfo)===null||tt===void 0?void 0:tt[Ye.endpoint];nt&&(nt.expiryTime=Date.now()+DEFAULT_TTL_MS,_tryWriteFallbackInfoToCache(Le,Object.assign(Object.assign({},this._fallbackInfo),{[Ye.endpoint]:nt})))}getActiveFallbackUrl(Le,Ye){var tt,nt;if(Ye.customUrl!=null&&Ye.fallbackUrls!=null)return null;let ft=this._fallbackInfo;ft==null&&(ft=(tt=_readFallbackInfoFromCache(Le))!==null&&tt!==void 0?tt:{},this._fallbackInfo=ft);const ht=ft[Ye.endpoint];return!ht||Date.now()>((nt=ht.expiryTime)!==null&&nt!==void 0?nt:0)||Ye.getChecksum()!==ht.urlConfigChecksum?(delete ft[Ye.endpoint],this._fallbackInfo=ft,_tryWriteFallbackInfoToCache(Le,this._fallbackInfo),null):ht.url?ht.url:null}tryFetchUpdatedFallbackInfo(Le,Ye,tt,nt){return __awaiter$c(this,void 0,void 0,function*(){var ft,ht;try{if(!_isDomainFailure(tt,nt))return!1;const At=Ye.customUrl==null&&Ye.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(Ye):Ye.fallbackUrls,xt=this._pickNewFallbackUrl((ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[Ye.endpoint],At);return xt?(this._updateFallbackInfoWithNewUrl(Le,Ye,xt),!0):!1}catch(gt){return(ht=this._errorBoundary)===null||ht===void 0||ht.logError("tryFetchUpdatedFallbackInfo",gt),!1}})}_updateFallbackInfoWithNewUrl(Le,Ye,tt){var nt,ft,ht;const gt={urlConfigChecksum:Ye.getChecksum(),url:tt,expiryTime:Date.now()+DEFAULT_TTL_MS,previous:[]},At=Ye.endpoint,xt=(nt=this._fallbackInfo)===null||nt===void 0?void 0:nt[At];xt&>.previous.push(...xt.previous),gt.previous.length>10&&(gt.previous=[]);const Et=(ht=(ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[At])===null||ht===void 0?void 0:ht.url;Et!=null&>.previous.push(Et),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[At]:gt}),_tryWriteFallbackInfoToCache(Le,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(Le){return __awaiter$c(this,void 0,void 0,function*(){var Ye;const tt=this._dnsQueryCooldowns[Le.endpoint];if(tt&&Date.now()<tt)return null;this._dnsQueryCooldowns[Le.endpoint]=Date.now()+COOLDOWN_TIME_MS;const nt=[],ft=yield(0,DnsTxtQuery_1._fetchTxtRecords)((Ye=this._networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch),ht=_extractPathFromUrl(Le.defaultUrl);for(const gt of ft){if(!gt.startsWith(Le.endpointDnsKey+"="))continue;const At=gt.split("=");if(At.length>1){let xt=At[1];xt.endsWith("/")&&(xt=xt.slice(0,-1)),nt.push(`https://${xt}${ht}`)}}return nt})}_pickNewFallbackUrl(Le,Ye){var tt;if(Ye==null)return null;const nt=new Set((tt=Le==null?void 0:Le.previous)!==null&&tt!==void 0?tt:[]),ft=Le==null?void 0:Le.url;let ht=null;for(const gt of Ye){const At=gt.endsWith("/")?gt.slice(0,-1):gt;if(!nt.has(gt)&&At!==ft){ht=At;break}}return ht}}NetworkFallbackResolver$1.NetworkFallbackResolver=NetworkFallbackResolver;function _isDomainFailure(Be,Le){var Ye;const tt=(Ye=Be==null?void 0:Be.toLowerCase())!==null&&Ye!==void 0?Ye:"";return Le||tt.includes("uncaught exception")||tt.includes("failed to fetch")||tt.includes("networkerror when attempting to fetch resource")}NetworkFallbackResolver$1._isDomainFailure=_isDomainFailure;function _getFallbackInfoStorageKey(Be){return`statsig.network_fallback.${(0,Hashing_1._DJB2)(Be)}`}function _tryWriteFallbackInfoToCache(Be,Le){const Ye=_getFallbackInfoStorageKey(Be);if(!Le||Object.keys(Le).length===0){StorageProvider_1$1.Storage.removeItem(Ye);return}StorageProvider_1$1.Storage.setItem(Ye,JSON.stringify(Le))}function _readFallbackInfoFromCache(Be){const Le=_getFallbackInfoStorageKey(Be),Ye=StorageProvider_1$1.Storage.getItem(Le);if(!Ye)return null;try{return JSON.parse(Ye)}catch{return Log_1$3.Log.error("Failed to parse FallbackInfo"),null}}function _extractPathFromUrl(Be){try{return new URL(Be).pathname}catch{return null}}var SDKFlags={};Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const FLAGMAP={};SDKFlags.SDKFlags={setFlags:(Be,Le)=>{FLAGMAP[Be]=Le},get:(Be,Le)=>{var Ye,tt;return(tt=(Ye=FLAGMAP[Be])===null||Ye===void 0?void 0:Ye[Le])!==null&&tt!==void 0?tt:!1}};var SessionID={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigSession=Be.SessionID=void 0;const Le=$_StatsigGlobal,Ye=CacheKey,tt=Log,nt=StorageProvider,ft=UUID,ht=30*60*1e3,gt=4*60*60*1e3,At={};Be.SessionID={get:Rt=>Be.StatsigSession.get(Rt).data.sessionID},Be.StatsigSession={get:Rt=>{At[Rt]==null&&(At[Rt]=xt(Rt));const Tt=At[Rt];return yt(Tt)},overrideInitialSessionID:(Rt,Tt)=>{At[Tt]=Et(Rt,Tt)}};function xt(Rt){let Tt=wt(Rt);const Bt=Date.now();return Tt||(Tt={sessionID:(0,ft.getUUID)(),startTime:Bt,lastUpdate:Bt}),{data:Tt,sdkKey:Rt}}function Et(Rt,Tt){const Bt=Date.now();return{data:{sessionID:Rt,startTime:Bt,lastUpdate:Bt},sdkKey:Tt}}function yt(Rt){const Tt=Date.now(),Bt=Rt.data,Dt=Rt.sdkKey;if(kt(Bt)||vt(Bt)){Bt.sessionID=(0,ft.getUUID)(),Bt.startTime=Tt;const Nt=__STATSIG__==null?void 0:__STATSIG__.instance(Dt);Nt&&Nt.$emt({name:"session_expired"})}Bt.lastUpdate=Tt,It(Bt,Rt.sdkKey),clearTimeout(Rt.idleTimeoutID),clearTimeout(Rt.ageTimeoutID);const Lt=Tt-Bt.startTime;return Rt.idleTimeoutID=Ct(Dt,ht),Rt.ageTimeoutID=Ct(Dt,gt-Lt),Rt}function Ct(Rt,Tt){return setTimeout(()=>{var Bt;const Dt=(Bt=(0,Le._getStatsigGlobal)())===null||Bt===void 0?void 0:Bt.instance(Rt);Dt&&Dt.$emt({name:"session_expired"})},Tt)}function kt({lastUpdate:Rt}){return Date.now()-Rt>ht}function vt({startTime:Rt}){return Date.now()-Rt>gt}function bt(Rt){return`statsig.session_id.${(0,Ye._getStorageKey)(Rt)}`}function It(Rt,Tt){const Bt=bt(Tt);try{(0,nt._setObjectInStorage)(Bt,Rt)}catch{tt.Log.warn("Failed to save SessionID")}}function wt(Rt){const Tt=bt(Rt);return(0,nt._getObjectFromStorage)(Tt)}})(SessionID);var StatsigClientEventEmitter={};Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"};var __awaiter$b=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkCore$1,"__esModule",{value:!0}),NetworkCore$1.NetworkCore=void 0;const __StatsigGlobal_1$1=$_StatsigGlobal,Diagnostics_1=Diagnostics,Log_1$2=Log,NetworkConfig_1=NetworkConfig,NetworkFallbackResolver_1=NetworkFallbackResolver$1,SDKFlags_1=SDKFlags,SDKType_1=SDKType,SafeJs_1$1=SafeJs,SessionID_1$1=SessionID,StableID_1$1=StableID,StatsigClientEventEmitter_1=StatsigClientEventEmitter,StatsigMetadata_1=StatsigMetadata,StatsigOptionsCommon_1$1=StatsigOptionsCommon,VisibilityObserving_1=VisibilityObserving,DEFAULT_TIMEOUT_MS=1e4,BACKOFF_BASE_MS=500,BACKOFF_MAX_MS=3e4,RATE_LIMIT_WINDOW_MS=1e3,RATE_LIMIT_MAX_REQ_COUNT=50,LEAK_RATE=RATE_LIMIT_MAX_REQ_COUNT/RATE_LIMIT_WINDOW_MS,RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);class NetworkCore{constructor(Le,Ye){this._emitter=Ye,this._errorBoundary=null,this._timeout=DEFAULT_TIMEOUT_MS,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,Le&&(this._options=Le),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(Le))}setLogEventCompressionMode(Le){this._options.logEventCompressionMode=Le}setErrorBoundary(Le){this._errorBoundary=Le,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(Le)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const Le=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,Le}beacon(Le){if(!_ensureValidSdkKey(Le))return!1;const Ye=this._getInternalRequestArgs("POST",Le),tt=this._getPopulatedURL(Ye),nt=navigator;return nt.sendBeacon.bind(nt)(tt,Ye.body)}post(Le){return __awaiter$b(this,void 0,void 0,function*(){const Ye=this._getInternalRequestArgs("POST",Le);return this._tryEncodeBody(Ye),yield this._tryToCompressBody(Ye),this._sendRequest(Ye)})}get(Le){const Ye=this._getInternalRequestArgs("GET",Le);return this._sendRequest(Ye)}_sendRequest(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye,tt,nt,ft;if(!_ensureValidSdkKey(Le)||this._netConfig.preventAllNetworkTraffic)return null;const{method:ht,body:gt,retries:At,attempt:xt}=Le,Et=Le.urlConfig.endpoint;if(this._isRateLimited(Et))return Log_1$2.Log.warn(`Request to ${Et} was blocked because you are making requests too frequently.`),null;const yt=xt??1;let Ct=!1;const kt=this._getPopulatedURL(Le);let vt=null;const bt=(0,VisibilityObserving_1._isUnloading)();try{const It={method:ht,body:gt,headers:Object.assign({},Le.headers),priority:Le.priority,keepalive:bt};_tryMarkInitStart(Le,yt);const wt=this._leakyBucket[Et];wt&&(wt.lastRequestTime=Date.now(),this._leakyBucket[Et]=wt);const Rt=(Ye=this._netConfig.networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch;let Tt;if(vt=yield Promise.race([Rt(kt,It).finally(()=>clearTimeout(Tt)),new Promise((Dt,Lt)=>{Tt=setTimeout(()=>{Ct=!0,Lt(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!vt.ok){const Dt=yield vt.text().catch(()=>"No Text"),Lt=new Error(`NetworkError: ${kt} ${Dt}`);throw Lt.name="NetworkError",Lt}const Bt=yield vt.text();return _tryMarkInitEnd(Le,vt,yt,Bt),this._fallbackResolver.tryBumpExpiryTime(Le.sdkKey,Le.urlConfig),{body:Bt,code:vt.status}}catch(It){const wt=_getErrorMessage(It),Rt=_didTimeout(wt??"",Ct);if(_tryMarkInitEnd(Le,vt,yt,"",It),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(Le.sdkKey,Le.urlConfig,wt,Rt))&&(Le.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(Le.sdkKey,Le.urlConfig)),!At||yt>At||!RETRYABLE_CODES.has((tt=vt==null?void 0:vt.status)!==null&&tt!==void 0?tt:500)){(nt=this._emitter)===null||nt===void 0||nt.call(this,{name:"error",error:It,tag:StatsigClientEventEmitter_1.ErrorTag.NetworkError,requestArgs:Le});const Bt=`A networking error occurred during ${ht} request to ${kt}.`;return Log_1$2.Log.error(Bt,wt,It),(ft=this._errorBoundary)===null||ft===void 0||ft.attachErrorIfNoneExists(Bt),null}return yield _exponentialBackoff(yt),this._sendRequest(Object.assign(Object.assign({},Le),{retries:At,attempt:yt+1}))}})}_getLogEventCompressionMode(Le){let Ye=Le==null?void 0:Le.logEventCompressionMode;return!Ye&&(Le==null?void 0:Le.disableCompression)===!0&&(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled),Ye||(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled),Ye}_isRateLimited(Le){var Ye;const tt=Date.now(),nt=(Ye=this._leakyBucket[Le])!==null&&Ye!==void 0?Ye:{count:0,lastRequestTime:tt},ft=tt-nt.lastRequestTime,ht=Math.floor(ft*LEAK_RATE);return nt.count=Math.max(0,nt.count-ht),nt.count>=RATE_LIMIT_MAX_REQ_COUNT?!0:(nt.count+=1,nt.lastRequestTime=tt,this._leakyBucket[Le]=nt,!1)}_getPopulatedURL(Le){var Ye;const tt=(Ye=Le.fallbackUrl)!==null&&Ye!==void 0?Ye:Le.urlConfig.getUrl();(Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize||Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=tt);const nt=Object.assign({[NetworkConfig_1.NetworkParam.SdkKey]:Le.sdkKey,[NetworkConfig_1.NetworkParam.SdkType]:SDKType_1.SDKType._get(Le.sdkKey),[NetworkConfig_1.NetworkParam.SdkVersion]:StatsigMetadata_1.SDK_VERSION,[NetworkConfig_1.NetworkParam.Time]:String(Date.now()),[NetworkConfig_1.NetworkParam.SessionID]:SessionID_1$1.SessionID.get(Le.sdkKey)},Le.params),ft=Object.keys(nt).map(ht=>`${encodeURIComponent(ht)}=${encodeURIComponent(nt[ht])}`).join("&");return`${tt}${ft?`?${ft}`:""}`}_tryEncodeBody(Le){var Ye;const tt=(0,SafeJs_1$1._getWindowSafe)(),nt=Le.body;if(!(!Le.isStatsigEncodable||this._options.disableStatsigEncoding||typeof nt!="string"||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-encode")!=null||!(tt!=null&&tt.btoa)))try{Le.body=tt.btoa(nt).split("").reverse().join(""),Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.StatsigEncoded]:"1"})}catch(ft){Log_1$2.Log.warn(`Request encoding failed for ${Le.urlConfig.getUrl()}`,ft)}}_tryToCompressBody(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye;const tt=Le.body;if(!(typeof tt!="string"||!_allowCompression(Le,this._options)))try{const nt=new TextEncoder().encode(tt),ft=new CompressionStream("gzip"),ht=ft.writable.getWriter();ht.write(nt).catch(Log_1$2.Log.error),ht.close().catch(Log_1$2.Log.error);const gt=ft.readable.getReader(),At=[];let xt;for(;!(xt=yield gt.read()).done;)At.push(xt.value);const Et=At.reduce((kt,vt)=>kt+vt.length,0),yt=new Uint8Array(Et);let Ct=0;for(const kt of At)yt.set(kt,Ct),Ct+=kt.length;Le.body=yt,Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.IsGzipped]:"1"})}catch(nt){Log_1$2.Log.warn(`Request compression failed for ${Le.urlConfig.getUrl()}`,nt)}})}_getInternalRequestArgs(Le,Ye){const tt=this._fallbackResolver.getActiveFallbackUrl(Ye.sdkKey,Ye.urlConfig),nt=Object.assign(Object.assign({},Ye),{method:Le,fallbackUrl:tt});return"data"in Ye&&_populateRequestBody(nt,Ye.data),nt}}NetworkCore$1.NetworkCore=NetworkCore;const _ensureValidSdkKey=Be=>Be.sdkKey?!0:(Log_1$2.Log.warn("Unable to make request without an SDK key"),!1),_populateRequestBody=(Be,Le)=>{const{sdkKey:Ye,fallbackUrl:tt}=Be,nt=StableID_1$1.StableID.get(Ye),ft=SessionID_1$1.SessionID.get(Ye),ht=SDKType_1.SDKType._get(Ye);Be.body=JSON.stringify(Object.assign(Object.assign({},Le),{statsigMetadata:Object.assign(Object.assign({},StatsigMetadata_1.StatsigMetadataProvider.get()),{stableID:nt,sessionID:ft,sdkType:ht,fallbackUrl:tt})}))};function _allowCompression(Be,Le){if(!Be.isCompressable||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const Ye=Be.urlConfig.customUrl!=null||Be.urlConfig.fallbackUrls!=null,tt=SDKFlags_1.SDKFlags.get(Be.sdkKey,"enable_log_event_compression")===!0;switch(Le.logEventCompressionMode){case StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled:return!1;case StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled:return!(Ye&&!tt);case StatsigOptionsCommon_1$1.LogEventCompressionMode.Forced:return!0;default:return!1}}function _getErrorMessage(Be){return typeof Be=="string"?Be:Be instanceof Error?`${Be.name}: ${Be.message}`:"Unknown Error"}function _didTimeout(Be,Le){return Be.includes("Timeout")||Le}function _tryMarkInitStart(Be,Le){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqStart(Be.sdkKey,{attempt:Le})}function _tryMarkInitEnd(Be,Le,Ye,tt,nt){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqEnd(Be.sdkKey,Diagnostics_1.Diagnostics._getDiagnosticsData(Le,Ye,tt,nt))}function _exponentialBackoff(Be){return __awaiter$b(this,void 0,void 0,function*(){yield new Promise(Le=>setTimeout(Le,Math.min(BACKOFF_BASE_MS*(Be*Be),BACKOFF_MAX_MS)))})}var OverrideAdapter={};Object.defineProperty(OverrideAdapter,"__esModule",{value:!0});var ParamStoreTypes={};Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0});var SizeOf={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._fastApproxSizeOf=void 0;const Le=2,Ye=1,tt=(nt,ft)=>{let ht=0;const gt=Object.keys(nt);for(let At=0;At<gt.length;At++){const xt=gt[At],Et=nt[xt];if(ht+=xt.length,typeof Et=="object"&&Et!==null?ht+=(0,Be._fastApproxSizeOf)(Et,ft)+Le:ht+=String(Et).length+Ye,ht>=ft)return ht}return ht};Be._fastApproxSizeOf=tt})(SizeOf);var StatsigClientBase$1={},__awaiter$a=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClientBase$1,"__esModule",{value:!0}),StatsigClientBase$1.StatsigClientBase=void 0;const __StatsigGlobal_1=$_StatsigGlobal,ErrorBoundary_1=ErrorBoundary,EventLogger_1=EventLogger$1,Log_1$1=Log,MemoKey_1=MemoKey,SafeJs_1=SafeJs,SessionID_1=SessionID,StableID_1=StableID,StatsigOptionsCommon_1=StatsigOptionsCommon,StorageProvider_1=StorageProvider,MAX_MEMO_CACHE_SIZE=3e3;class StatsigClientBase{constructor(Le,Ye,tt,nt){var ft,ht,gt,At;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const xt=this.$emt.bind(this);(nt==null?void 0:nt.logLevel)!=null&&(Log_1$1.Log.level=nt.logLevel),nt!=null&&nt.disableStorage&&StorageProvider_1.Storage._setDisabled(!0),nt!=null&&nt.initialSessionID&&SessionID_1.StatsigSession.overrideInitialSessionID(nt.initialSessionID,Le),nt!=null&&nt.storageProvider&&StorageProvider_1.Storage._setProvider(nt.storageProvider),nt!=null&&nt.enableCookies&&StableID_1.StableID._setCookiesEnabled(Le,nt.enableCookies),nt!=null&&nt.disableStableID&&StableID_1.StableID._setDisabled(Le,!0),this._sdkKey=Le,this._options=nt??{},this._memoCache={},this.overrideAdapter=(ft=nt==null?void 0:nt.overrideAdapter)!==null&&ft!==void 0?ft:null,this._logger=new EventLogger_1.EventLogger(Le,xt,tt,nt),this._errorBoundary=new ErrorBoundary_1.ErrorBoundary(Le,nt,xt),this._errorBoundary.wrap(this),this._errorBoundary.wrap(Ye),this._errorBoundary.wrap(this._logger),tt.setErrorBoundary(this._errorBoundary),this.dataAdapter=Ye,this.dataAdapter.attach(Le,nt,tt),this.storageProvider=StorageProvider_1.Storage,(At=(gt=(ht=this.overrideAdapter)===null||ht===void 0?void 0:ht.loadFromStorage)===null||gt===void 0?void 0:gt.call(ht))===null||At===void 0||At.catch(Et=>this._errorBoundary.logError("OA::loadFromStorage",Et)),this._primeReadyRipcord(),_assignGlobalInstance(Le,this)}updateRuntimeOptions(Le){Le.loggingEnabled?(this._options.loggingEnabled=Le.loggingEnabled,this._logger.setLoggingEnabled(Le.loggingEnabled)):Le.disableLogging!=null&&(this._options.disableLogging=Le.disableLogging,this._logger.setLoggingEnabled(Le.disableLogging?"disabled":"browser-only")),Le.disableStorage!=null&&(this._options.disableStorage=Le.disableStorage,StorageProvider_1.Storage._setDisabled(Le.disableStorage)),Le.enableCookies!=null&&(this._options.enableCookies=Le.enableCookies,StableID_1.StableID._setCookiesEnabled(this._sdkKey,Le.enableCookies)),Le.logEventCompressionMode?this._logger.setLogEventCompressionMode(Le.logEventCompressionMode):Le.disableCompression&&this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return __awaiter$a(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(Le,Ye){this._listeners[Le]||(this._listeners[Le]=[]),this._listeners[Le].push(Ye)}off(Le,Ye){if(this._listeners[Le]){const tt=this._listeners[Le].indexOf(Ye);tt!==-1&&this._listeners[Le].splice(tt,1)}}$on(Le,Ye){Ye.__isInternal=!0,this.on(Le,Ye)}$emt(Le){var Ye;const tt=nt=>{try{nt(Le)}catch(ft){if(nt.__isInternal===!0){this._errorBoundary.logError(`__emit:${Le.name}`,ft);return}Log_1$1.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",Le)}};this._listeners[Le.name]&&this._listeners[Le.name].forEach(nt=>tt(nt)),(Ye=this._listeners["*"])===null||Ye===void 0||Ye.forEach(tt)}_setStatus(Le,Ye){this.loadingStatus=Le,this._memoCache={},this.$emt({name:"values_updated",status:Le,values:Ye})}_enqueueExposure(Le,Ye,tt){if((tt==null?void 0:tt.disableExposureLog)===!0){this._logger.incrementNonExposureCount(Le);return}this._logger.enqueue(Ye)}_memoize(Le,Ye){return(tt,nt)=>{if(this._options.disableEvaluationMemoization)return Ye(tt,nt);const ft=(0,MemoKey_1.createMemoKey)(Le,tt,nt);return ft?(ft in this._memoCache||(Object.keys(this._memoCache).length>=MAX_MEMO_CACHE_SIZE&&(this._memoCache={}),this._memoCache[ft]=Ye(tt,nt)),this._memoCache[ft]):Ye(tt,nt)}}}StatsigClientBase$1.StatsigClientBase=StatsigClientBase;function _assignGlobalInstance(Be,Le){var Ye;if((0,SafeJs_1._isServerEnv)())return;const tt=(0,__StatsigGlobal_1._getStatsigGlobal)(),nt=(Ye=tt.instances)!==null&&Ye!==void 0?Ye:{},ft=Le;nt[Be]!=null&&Log_1$1.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),nt[Be]=ft,tt.firstInstance||(tt.firstInstance=ft),tt.instances=nt,__STATSIG__=tt}var StatsigDataAdapter={};Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached";var StatsigPlugin={};Object.defineProperty(StatsigPlugin,"__esModule",{value:!0});var StatsigTypeFactories={};Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const Log_1=Log,TypingUtils_1=TypingUtils;function _makeEvaluation(Be,Le,Ye,tt){var nt;return{name:Be,details:Le,ruleID:(nt=Ye==null?void 0:Ye.rule_id)!==null&&nt!==void 0?nt:"",__evaluation:Ye,value:tt}}function _makeFeatureGate(Be,Le,Ye){var tt;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,(Ye==null?void 0:Ye.value)===!0)),{idType:(tt=Ye==null?void 0:Ye.id_type)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeFeatureGate=_makeFeatureGate;function _makeDynamicConfig(Be,Le,Ye){var tt,nt;const ft=(tt=Ye==null?void 0:Ye.value)!==null&&tt!==void 0?tt:{};return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,ft)),{idType:(nt=Ye==null?void 0:Ye.id_type)!==null&&nt!==void 0?nt:null,get:_makeTypedGet(Be,Ye==null?void 0:Ye.value)})}StatsigTypeFactories._makeDynamicConfig=_makeDynamicConfig;function _makeExperiment(Be,Le,Ye){var tt;const nt=_makeDynamicConfig(Be,Le,Ye);return Object.assign(Object.assign({},nt),{groupName:(tt=Ye==null?void 0:Ye.group_name)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeExperiment=_makeExperiment;function _makeLayer(Be,Le,Ye,tt){var nt,ft;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,void 0)),{get:_makeTypedGet(Be,Ye==null?void 0:Ye.value,tt),groupName:(nt=Ye==null?void 0:Ye.group_name)!==null&&nt!==void 0?nt:null,__value:(ft=Ye==null?void 0:Ye.value)!==null&&ft!==void 0?ft:{}})}StatsigTypeFactories._makeLayer=_makeLayer;function _mergeOverride(Be,Le,Ye,tt){return Object.assign(Object.assign(Object.assign({},Be),Le),{get:_makeTypedGet(Be.name,Ye,tt)})}StatsigTypeFactories._mergeOverride=_mergeOverride;function _makeTypedGet(Be,Le,Ye){return(tt,nt)=>{var ft;const ht=(ft=Le==null?void 0:Le[tt])!==null&&ft!==void 0?ft:null;return ht==null?nt??null:nt!=null&&!(0,TypingUtils_1._isTypeMatch)(ht,nt)?(Log_1.Log.warn(`Parameter type mismatch. '${Be}.${tt}' was found to be type '${typeof ht}' but fallback/return type is '${typeof nt}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),nt??null):(Ye==null||Ye(tt),ht)}}StatsigTypeFactories._makeTypedGet=_makeTypedGet;var StatsigTypes={};Object.defineProperty(StatsigTypes,"__esModule",{value:!0});var StatsigUpdateDetails={};Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;const createUpdateDetails=(Be,Le,Ye,tt,nt,ft)=>({duration:Ye,source:Le,success:Be,error:tt,sourceUrl:nt,warnings:ft});StatsigUpdateDetails.createUpdateDetails=createUpdateDetails,StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt);var kt=Object.getOwnPropertyDescriptor(Et,yt);(!kt||("get"in kt?!Et.__esModule:kt.writable||kt.configurable))&&(kt={enumerable:!0,get:function(){return Et[yt]}}),Object.defineProperty(xt,Ct,kt)}:function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt),xt[Ct]=Et[yt]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Et){for(var yt in xt)yt!=="default"&&!Object.prototype.hasOwnProperty.call(Et,yt)&&Le(Et,xt,yt)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.Storage=Be.Log=Be.EventLogger=Be.Diagnostics=void 0;const tt=$_StatsigGlobal,nt=Diagnostics;Object.defineProperty(Be,"Diagnostics",{enumerable:!0,get:function(){return nt.Diagnostics}});const ft=EventLogger$1;Object.defineProperty(Be,"EventLogger",{enumerable:!0,get:function(){return ft.EventLogger}});const ht=Log;Object.defineProperty(Be,"Log",{enumerable:!0,get:function(){return ht.Log}});const gt=StatsigMetadata,At=StorageProvider;Object.defineProperty(Be,"Storage",{enumerable:!0,get:function(){return At.Storage}}),Ye($_StatsigGlobal,Be),Ye(CacheKey,Be),Ye(ClientInterfaces,Be),Ye(DataAdapterCore$1,Be),Ye(Diagnostics,Be),Ye(DownloadConfigSpecsResponse,Be),Ye(ErrorBoundary,Be),Ye(EvaluationOptions,Be),Ye(EvaluationTypes,Be),Ye(Hashing,Be),Ye(InitializeResponse,Be),Ye(Log,Be),Ye(MemoKey,Be),Ye(NetworkConfig,Be),Ye(NetworkCore$1,Be),Ye(OverrideAdapter,Be),Ye(ParamStoreTypes,Be),Ye(SafeJs,Be),Ye(SDKType,Be),Ye(SessionID,Be),Ye(SizeOf,Be),Ye(StableID,Be),Ye(StatsigClientBase$1,Be),Ye(StatsigClientEventEmitter,Be),Ye(StatsigDataAdapter,Be),Ye(StatsigEvent,Be),Ye(StatsigMetadata,Be),Ye(StatsigOptionsCommon,Be),Ye(StatsigPlugin,Be),Ye(StatsigTypeFactories,Be),Ye(StatsigTypes,Be),Ye(StatsigUser,Be),Ye(StorageProvider,Be),Ye(TypedJsonParse,Be),Ye(TypingUtils,Be),Ye(UrlConfiguration$1,Be),Ye(UUID,Be),Ye(VisibilityObserving,Be),Ye(StatsigUpdateDetails,Be),Ye(SDKFlags,Be),Object.assign((0,tt._getStatsigGlobal)(),{Log:ht.Log,SDK_VERSION:gt.SDK_VERSION})}(src$1);var StatsigClient$1={},EvaluationStore$1={},V1InitializeContainer$1={};Object.defineProperty(V1InitializeContainer$1,"__esModule",{value:!0}),V1InitializeContainer$1.V1InitializeContainer=void 0;const client_core_1$7=src$1;class V1InitializeContainer{constructor(Le){this._values=Le}getGate(Le){return this._getResultFromLookup(this._values.feature_gates,Le)}getConfig(Le){return this._getResultFromLookup(this._values.dynamic_configs,Le)}getLayer(Le){return this._getResultFromLookup(this._values.layer_configs,Le)}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$7._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V1InitializeContainer$1.V1InitializeContainer=V1InitializeContainer;var V2InitializeContainer$1={};Object.defineProperty(V2InitializeContainer$1,"__esModule",{value:!0}),V2InitializeContainer$1.V2InitializeContainer=void 0;const client_core_1$6=src$1;class V2InitializeContainer{constructor(Le){this._values=Le}getGate(Le){var Ye,tt,nt;const ft=this._getResultFromLookup(this._values.feature_gates,Le);return ft?{name:Le,value:ft.v===!0,rule_id:(Ye=ft.r)!==null&&Ye!==void 0?Ye:"default",secondary_exposures:(tt=ft.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ft.i)!==null&&nt!==void 0?nt:""}:null}getConfig(Le){var Ye,tt,nt,ft;const ht=this._getResultFromLookup(this._values.dynamic_configs,Le);return ht?{name:Le,value:(Ye=this._values.values[ht.v])!==null&&Ye!==void 0?Ye:{},rule_id:ht.r,secondary_exposures:(tt=ht.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ht.i)!==null&&nt!==void 0?nt:"",is_user_in_experiment:ht.ue===!0,passed:ht.p===!0,group_name:(ft=ht.gn)!==null&&ft!==void 0?ft:void 0,is_experiment_active:ht.ea===!0,group:ht.r,is_device_based:ht.i==="stableID"}:null}getLayer(Le){var Ye,tt,nt,ft,ht,gt;const At=this._getResultFromLookup(this._values.layer_configs,Le);return At?{name:Le,value:(Ye=this._values.values[At.v])!==null&&Ye!==void 0?Ye:{},rule_id:At.r,secondary_exposures:(tt=At.s)!==null&&tt!==void 0?tt:[],is_user_in_experiment:At.ue===!0,group_name:(nt=At.gn)!==null&&nt!==void 0?nt:void 0,is_experiment_active:At.ea===!0,group:At.r,is_device_based:At.i==="stableID",allocated_experiment_name:(ft=At.ae)!==null&&ft!==void 0?ft:"",explicit_parameters:(ht=At.ep)!==null&&ht!==void 0?ht:[],undelegated_secondary_exposures:(gt=At.us)!==null&>!==void 0?gt:[],parameter_rule_ids:At.pr}:null}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$6._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V2InitializeContainer$1.V2InitializeContainer=V2InitializeContainer,Object.defineProperty(EvaluationStore$1,"__esModule",{value:!0});const client_core_1$5=src$1,V1InitializeContainer_1=V1InitializeContainer$1,V2InitializeContainer_1=V2InitializeContainer$1;class EvaluationStore{constructor(Le){this._sdkKey=Le,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,client_core_1$5._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(Le,Ye){var tt,nt;if(!Le)return!1;const ft=(0,client_core_1$5._typedJsonParse)(Le.data,"has_updates","EvaluationResponse");return ft==null?!1:(this._source=Le.source,(ft==null?void 0:ft.has_updates)!==!0||((tt=ft.time)!==null&&tt!==void 0?tt:0)<this._lcut||(this._rawValues=Le.data,this._lcut=ft.time,this._receivedAt=Le.receivedAt,ft.response_format==="init-v2"?this._values=new V2InitializeContainer_1.V2InitializeContainer(ft):this._values=new V1InitializeContainer_1.V1InitializeContainer(ft),this._bootstrapMetadata=this._extractBootstrapMetadata(Le.source,ft),Le.source&&ft.user&&this._setWarningState(Ye,ft),client_core_1$5.SDKFlags.setFlags(this._sdkKey,(nt=ft.sdk_flags)!==null&&nt!==void 0?nt:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(Le){const Ye=this._values?this._values.getGate(Le):null;return this._getDetailedStoreResult(Ye)}getConfig(Le){const Ye=this._values?this._values.getConfig(Le):null;return this._getDetailedStoreResult(Ye)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(Le){const Ye=this._values?this._values.getLayer(Le):null;return this._getDetailedStoreResult(Ye)}getParamStore(Le){const Ye=this._values?this._values.getParamStore(Le):null;return this._getDetailedStoreResult(Ye)}getSource(){return this._source}getExposureMapping(){var Le;return(Le=this._values)===null||Le===void 0?void 0:Le.getExposureMapping()}_extractBootstrapMetadata(Le,Ye){if(Le!=="Bootstrap")return null;const tt={};return Ye.user&&(tt.user=Ye.user),Ye.sdkInfo&&(tt.generatorSDKInfo=Ye.sdkInfo),tt.lcut=Ye.time,tt}_getDetailedStoreResult(Le){return{result:Le,details:this._getDetails(Le==null)}}_setWarningState(Le,Ye){var tt,nt;const ft=client_core_1$5.StableID.get(this._sdkKey);if(((tt=Le.customIDs)===null||tt===void 0?void 0:tt.stableID)!==ft&&(!((nt=Le.customIDs)===null||nt===void 0)&&nt.stableID||ft)){this._warnings.add("StableIDMismatch");return}if("user"in Ye){const ht=Ye.user,gt=Object.assign(Object.assign({},Le),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,client_core_1$5._getFullUserHash)(gt)!==(0,client_core_1$5._getFullUserHash)(ht)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const Le={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(Le.warnings=Array.from(this._warnings)),Le}_getDetails(Le){var Ye,tt;const nt=this.getCurrentSourceDetails();let ft=nt.reason;const ht=(Ye=nt.warnings)!==null&&Ye!==void 0?Ye:[];this._source==="Bootstrap"&&ht.length>0&&(ft=ft+ht[0]),ft!=="Uninitialized"&&ft!=="NoValues"&&(ft=`${ft}:${Le?"Unrecognized":"Recognized"}`);const gt=this._source==="Bootstrap"&&(tt=this._bootstrapMetadata)!==null&&tt!==void 0?tt:void 0;return gt&&(nt.bootstrapMetadata=gt),Object.assign(Object.assign({},nt),{reason:ft})}}EvaluationStore$1.default=EvaluationStore;var Network={},EvaluationResponseDeltas={};Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const client_core_1$4=src$1,MAX_DELTAS_SORT_DEPTH=2;function _resolveDeltasResponse(Be,Le){const Ye=(0,client_core_1$4._typedJsonParse)(Le,"checksum","DeltasEvaluationResponse");if(!Ye)return{hadBadDeltaChecksum:!0};const tt=_mergeDeltasIntoCache(Be,Ye),nt=_handleDeletedEntries(tt),ft=(0,client_core_1$4._DJB2Object)({feature_gates:nt.feature_gates,dynamic_configs:nt.dynamic_configs,layer_configs:nt.layer_configs},MAX_DELTAS_SORT_DEPTH);return ft===Ye.checksumV2?JSON.stringify(nt):{hadBadDeltaChecksum:!0,badChecksum:ft,badMergedConfigs:nt,badFullResponse:Ye.deltas_full_response}}EvaluationResponseDeltas._resolveDeltasResponse=_resolveDeltasResponse;function _mergeDeltasIntoCache(Be,Le){return Object.assign(Object.assign(Object.assign({},Be),Le),{feature_gates:Object.assign(Object.assign({},Be.feature_gates),Le.feature_gates),layer_configs:Object.assign(Object.assign({},Be.layer_configs),Le.layer_configs),dynamic_configs:Object.assign(Object.assign({},Be.dynamic_configs),Le.dynamic_configs)})}function _handleDeletedEntries(Be){const Le=Be;return _deleteEntriesInRecord(Be.deleted_gates,Le.feature_gates),delete Le.deleted_gates,_deleteEntriesInRecord(Be.deleted_configs,Le.dynamic_configs),delete Le.deleted_configs,_deleteEntriesInRecord(Be.deleted_layers,Le.layer_configs),delete Le.deleted_layers,Le}function _deleteEntriesInRecord(Be,Le){Be==null||Be.forEach(Ye=>{delete Le[Ye]})}var __awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const client_core_1$3=src$1,EvaluationResponseDeltas_1=EvaluationResponseDeltas;class StatsigNetwork extends client_core_1$3.NetworkCore{constructor(Le,Ye){super(Le,Ye);const tt=Le==null?void 0:Le.networkConfig;this._option=Le,this._initializeUrlConfig=new client_core_1$3.UrlConfiguration(client_core_1$3.Endpoint._initialize,tt==null?void 0:tt.initializeUrl,tt==null?void 0:tt.api,tt==null?void 0:tt.initializeFallbackUrls)}fetchEvaluations(Le,Ye,tt,nt,ft){return __awaiter$9(this,void 0,void 0,function*(){var ht,gt,At,xt,Et,yt;const Ct=Ye?(0,client_core_1$3._typedJsonParse)(Ye,"has_updates","InitializeResponse"):null;let kt={user:nt,hash:(At=(gt=(ht=this._option)===null||ht===void 0?void 0:ht.networkConfig)===null||gt===void 0?void 0:gt.initializeHashAlgorithm)!==null&&At!==void 0?At:"djb2",deltasResponseRequested:!1,full_checksum:null};if(Ct!=null&&Ct.has_updates){const vt=(Ct==null?void 0:Ct.hash_used)!==((yt=(Et=(xt=this._option)===null||xt===void 0?void 0:xt.networkConfig)===null||Et===void 0?void 0:Et.initializeHashAlgorithm)!==null&&yt!==void 0?yt:"djb2");kt=Object.assign(Object.assign({},kt),{sinceTime:ft&&!vt?Ct.time:0,previousDerivedFields:"derived_fields"in Ct&&ft?Ct.derived_fields:{},deltasResponseRequested:!0,full_checksum:Ct.full_checksum,partialUserMatchSinceTime:vt?0:Ct.time})}return this._fetchEvaluations(Le,Ct,kt,tt)})}_fetchEvaluations(Le,Ye,tt,nt){return __awaiter$9(this,void 0,void 0,function*(){var ft,ht;const gt=yield this.post({sdkKey:Le,urlConfig:this._initializeUrlConfig,data:tt,retries:2,isStatsigEncodable:!0,priority:nt});if((gt==null?void 0:gt.code)===204)return'{"has_updates": false}';if((gt==null?void 0:gt.code)!==200)return(ft=gt==null?void 0:gt.body)!==null&&ft!==void 0?ft:null;if((Ye==null?void 0:Ye.has_updates)!==!0||((ht=gt.body)===null||ht===void 0?void 0:ht.includes('"is_delta":true'))!==!0||tt.deltasResponseRequested!==!0)return gt.body;const At=(0,EvaluationResponseDeltas_1._resolveDeltasResponse)(Ye,gt.body);return typeof At=="string"?At:this._fetchEvaluations(Le,Ye,Object.assign(Object.assign(Object.assign({},tt),At),{deltasResponseRequested:!1}),nt)})}}Network.default=StatsigNetwork;var ParamStoreGetterFactory={};Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const client_core_1$2=src$1,NO_EXPOSURE_OPT={disableExposureLog:!0};function _shouldLogExposure(Be){return Be==null||Be.disableExposureLog===!1}function _shouldReturnFallback(Be,Le){return Le!=null&&!(0,client_core_1$2._isTypeMatch)(Be,Le)}function _getMappedStaticValue(Be,Le){return Be.value}function _getMappedGateValue(Be,Le,Ye){return Be.getFeatureGate(Le.gate_name,_shouldLogExposure(Ye)?void 0:NO_EXPOSURE_OPT).value?Le.pass_value:Le.fail_value}function _getMappedDynamicConfigValue(Be,Le,Ye,tt){const ft=Be.getDynamicConfig(Le.config_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedExperimentValue(Be,Le,Ye,tt){const ft=Be.getExperiment(Le.experiment_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedLayerValue(Be,Le,Ye,tt){const ft=Be.getLayer(Le.layer_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _makeParamStoreGetter(Be,Le,Ye){return(tt,nt)=>{if(Le==null)return nt;const ft=Le[tt];if(ft==null||nt!=null&&(0,client_core_1$2._typeOf)(nt)!==ft.param_type)return nt;switch(ft.ref_type){case"static":return _getMappedStaticValue(ft);case"gate":return _getMappedGateValue(Be,ft,Ye);case"dynamic_config":return _getMappedDynamicConfigValue(Be,ft,nt,Ye);case"experiment":return _getMappedExperimentValue(Be,ft,nt,Ye);case"layer":return _getMappedLayerValue(Be,ft,nt,Ye);default:return nt}}}ParamStoreGetterFactory._makeParamStoreGetter=_makeParamStoreGetter;var StatsigEvaluationsDataAdapter$1={},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter$1,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=void 0;const client_core_1$1=src$1,Network_1$1=Network;class StatsigEvaluationsDataAdapter extends client_core_1$1.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(Le,Ye,tt){super.attach(Le,Ye,tt),tt!==null&&tt instanceof Network_1$1.default?this._network=tt:this._network=new Network_1$1.default(Ye??{})}getDataAsync(Le,Ye,tt){return this._getDataAsyncImpl(Le,(0,client_core_1$1._normalizeUser)(Ye,this._options),tt)}prefetchData(Le,Ye){return this._prefetchDataImpl(Le,Ye)}setData(Le){const Ye=(0,client_core_1$1._typedJsonParse)(Le,"has_updates","data");Ye&&"user"in Ye?super.setData(Le,Ye.user):client_core_1$1.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(Le,Ye){super.setData(Le,Ye)}_fetchFromNetwork(Le,Ye,tt,nt){return __awaiter$8(this,void 0,void 0,function*(){var ft;const ht=yield(ft=this._network)===null||ft===void 0?void 0:ft.fetchEvaluations(this._getSdkKey(),Le,tt==null?void 0:tt.priority,Ye,nt);return ht??null})}_getCacheKey(Le){var Ye;const tt=(0,client_core_1$1._getStorageKey)(this._getSdkKey(),Le,(Ye=this._options)===null||Ye===void 0?void 0:Ye.customUserCacheKeyFunc);return`${client_core_1$1.DataAdapterCachePrefix}.${this._cacheSuffix}.${tt}`}_isCachedResultValidFor204(Le,Ye){return Le.fullUserHash!=null&&Le.fullUserHash===(0,client_core_1$1._getFullUserHash)(Ye)}}StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=StatsigEvaluationsDataAdapter;var __awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClient$1,"__esModule",{value:!0});const client_core_1=src$1,EvaluationStore_1=EvaluationStore$1,Network_1=Network,ParamStoreGetterFactory_1=ParamStoreGetterFactory,StatsigEvaluationsDataAdapter_1=StatsigEvaluationsDataAdapter$1;class StatsigClient extends client_core_1.StatsigClientBase{static instance(Le){const Ye=(0,client_core_1._getStatsigGlobal)().instance(Le);return Ye instanceof StatsigClient?Ye:(client_core_1.Log.warn((0,client_core_1._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new StatsigClient(Le??"",{}))}constructor(Le,Ye,tt=null){var nt,ft;client_core_1.SDKType._setClientType(Le,"javascript-client");const ht=new Network_1.default(tt,At=>{this.$emt(At)});super(Le,(nt=tt==null?void 0:tt.dataAdapter)!==null&&nt!==void 0?nt:new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter,ht,tt),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(client_core_1.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(client_core_1.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(client_core_1.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(client_core_1.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(client_core_1.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(client_core_1.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new EvaluationStore_1.default(Le),this._network=ht,this._user=this._configureUser(Ye,tt),this._sdkInstanceID=(0,client_core_1.getUUID)();const gt=(ft=tt==null?void 0:tt.plugins)!==null&&ft!==void 0?ft:[];for(const At of gt)At.bind(this)}initializeSync(Le){var Ye;return this.loadingStatus!=="Uninitialized"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(Ye=this._store.getWarnings())!==null&&Ye!==void 0?Ye:[]]):(this._logger.start(),this.updateUserSync(this._user,Le))}initializeAsync(Le){return __awaiter$7(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(Le),this._initializePromise)})}updateUserSync(Le,Ye){const tt=performance.now();try{return this._updateUserSyncImpl(Le,Ye,tt)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}}_updateUserSyncImpl(Le,Ye,tt){var nt;const ft=[...(nt=this._store.getWarnings())!==null&&nt!==void 0?nt:[]];this._resetForUser(Le);const ht=this.dataAdapter.getDataSync(this._user);ht==null&&ft.push("NoCachedValues"),this._store.setValues(ht,this._user),this._finalizeUpdate(ht);const gt=Ye==null?void 0:Ye.disableBackgroundCacheRefresh;return gt===!0||gt==null&&(ht==null?void 0:ht.source)==="Bootstrap"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft):(this._runPostUpdate(ht??null,this._user),(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft))}updateUserAsync(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){const tt=performance.now();try{return yield this._updateUserAsyncImpl(Le,Ye)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}})}_updateUserAsyncImpl(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){this._resetForUser(Le);const tt=this._user;client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);let nt=this.dataAdapter.getDataSync(tt);if(this._store.setValues(nt,this._user),this._setStatus("Loading",nt),nt=yield this.dataAdapter.getDataAsync(nt,tt,Ye),tt!==this._user)return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let ft=!1;nt!=null&&(client_core_1.Diagnostics._markInitProcessStart(this._sdkKey),ft=this._store.setValues(nt,this._user),client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey,{success:ft})),this._finalizeUpdate(nt),ft||(this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey,ft,this._store.getCurrentSourceDetails());const ht=client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,client_core_1.createUpdateDetails)(ft,this._store.getSource(),ht,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:client_core_1.StatsigSession.get(this._sdkKey),stableID:client_core_1.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(Le,Ye){return this.getFeatureGate(Le,Ye).value}logEvent(Le,Ye,tt){const nt=typeof Le=="string"?{eventName:Le,value:Ye,metadata:tt}:Le;this.$emt({name:"log_event_called",event:nt}),this._logger.enqueue(Object.assign(Object.assign({},nt),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(Le){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:Le}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(Le){return __awaiter$7(this,void 0,void 0,function*(){return client_core_1.Storage.isReady()||(yield client_core_1.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,Le)})}_createErrorUpdateDetails(Le,Ye){var tt;return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),performance.now()-Ye,Le,null,[...(tt=this._store.getWarnings())!==null&&tt!==void 0?tt:[]])}_finalizeUpdate(Le){this._store.finalize(),this._setStatus("Ready",Le)}_runPostUpdate(Le,Ye){this.dataAdapter.getDataAsync(Le,Ye,{priority:"low"}).catch(tt=>{client_core_1.Log.error("An error occurred after update.",tt)})}_resetForUser(Le){this._logger.reset(),this._store.reset(),this._user=this._configureUser(Le,this._options)}_configureUser(Le,Ye){var tt,nt,ft;const ht=(0,client_core_1._normalizeUser)(Le,Ye),gt=(tt=ht.customIDs)===null||tt===void 0?void 0:tt.stableID;if(gt){const At=(ft=(nt=this.storageProvider).isReadyResolver)===null||ft===void 0?void 0:ft.call(nt);At?At.then(()=>client_core_1.StableID.setOverride(gt,this._sdkKey),()=>client_core_1.StableID.setOverride(gt,this._sdkKey)):client_core_1.StableID.setOverride(gt,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(ht.analyticsOnlyMetadata=Object.assign(Object.assign({},ht.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),ht}_getFeatureGateImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getGate(Le),gt=(0,client_core_1._makeFeatureGate)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getGateOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createGateExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"gate_evaluation",gate:xt}),xt}_getDynamicConfigImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getConfig(Le),gt=(0,client_core_1._makeDynamicConfig)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getDynamicConfigOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:xt}),xt}_getExperimentImpl(Le,Ye){var tt,nt,ft,ht;const{result:gt,details:At}=this._store.getConfig(Le),xt=(0,client_core_1._makeExperiment)(Le,At,gt);xt.__evaluation!=null&&(xt.__evaluation.secondary_exposures=(0,client_core_1._mapExposures)((nt=(tt=xt.__evaluation)===null||tt===void 0?void 0:tt.secondary_exposures)!==null&&nt!==void 0?nt:[],this._store.getExposureMapping()));const Et=(ht=(ft=this.overrideAdapter)===null||ft===void 0?void 0:ft.getExperimentOverride)===null||ht===void 0?void 0:ht.call(ft,xt,this._user,Ye),yt=Et??xt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,yt,this._store.getExposureMapping()),Ye),this.$emt({name:"experiment_evaluation",experiment:yt}),yt}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(Le,Ye){var tt,nt,ft;const{result:ht,details:gt}=this._store.getLayer(Le),At=(0,client_core_1._makeLayer)(Le,gt,ht),xt=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getLayerOverride)===null||nt===void 0?void 0:nt.call(tt,At,this._user,Ye);Ye!=null&&Ye.disableExposureLog&&this._logger.incrementNonExposureCount(Le);const Et=(0,client_core_1._mergeOverride)(At,xt,(ft=xt==null?void 0:xt.__value)!==null&&ft!==void 0?ft:At.__value,yt=>{Ye!=null&&Ye.disableExposureLog||this._enqueueExposure(Le,(0,client_core_1._createLayerParameterExposure)(this._user,Et,yt,this._store.getExposureMapping()),Ye)});return this.$emt({name:"layer_evaluation",layer:Et}),Et}_getParameterStoreImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getParamStore(Le);this._logger.incrementNonExposureCount(Le);const gt={name:Le,details:ht,__configuration:ft,get:(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,ft,Ye)},At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getParamStoreOverride)===null||nt===void 0?void 0:nt.call(tt,gt,Ye);return At!=null&&(gt.__configuration=At.config,gt.details=At.details,gt.get=(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,At.config,Ye)),gt}}StatsigClient$1.default=StatsigClient,function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,gt,At,xt){xt===void 0&&(xt=At);var Et=Object.getOwnPropertyDescriptor(gt,At);(!Et||("get"in Et?!gt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return gt[At]}}),Object.defineProperty(ht,xt,Et)}:function(ht,gt,At,xt){xt===void 0&&(xt=At),ht[xt]=gt[At]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,gt){for(var At in ht)At!=="default"&&!Object.prototype.hasOwnProperty.call(gt,At)&&Le(gt,ht,At)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigClient=void 0;const tt=src$1,nt=StatsigClient$1;Be.StatsigClient=nt.default,Ye(src$1,Be);const ft=Object.assign((0,tt._getStatsigGlobal)(),{StatsigClient:nt.default});Be.default=ft}(src$2);const FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","new_id_capture_ux_least_risky_clients","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id","face_occlusion"],GLOBAL_FLAGS=["new_fingerprint"],ID_MODULE_FLAGS=["id_face_readability","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web","face_occlusion"];function getStatsigEnvironment(Be){return isStageK8sEnv(Be)?{tier:"development"}:isStageEnv(Be)||isDemoEnv(Be)?{tier:"staging"}:isSaasEnv(Be)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,new_id_capture_ux_least_risky_clients:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1,face_occlusion:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(initPromise)return initPromise;initPromise=(async()=>{var gt;const ft={customIDs:{client_api_key:Le,hashed_onboarding_id:Ye,flow_id:Be},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise},getFeatureFlag=Be=>featureFlagsValues[Be]??!1,getModuleFeatureFlags=async Be=>{const Le={};GLOBAL_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]});const Ye=Be.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}),Le};function IdCaptureParamsConfigurator(Be,Le,Ye,tt){Object.assign(Be,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:tt?3e3:2e3,minFaceIdQualityScore:.62})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:getFeatureFlag("face_occlusion"),faceOcclusionThreshold:.3}}const getProfiles=()=>[new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new PipelineProfile(WasmPipelineType.IdBarcodeAndTextQualityPipeline,PipelineProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new PipelineProfile(WasmPipelineType.IdVideoSelfiePipeline,PipelineProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new PipelineProfile(WasmPipelineType.SelfieWithQualityMetrics,PipelineProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile")];function getProfile(Be){const Le=getProfiles().find(Ye=>Ye.name===Be);if(!Le)throw new Error(`Profile not found for type: ${Be}`);return Le}const wasmVersion="v2.12.38";function generateBundle(){const Be=getFeatureFlag("id_text_barcode_readability")?PipelineProfileName.IdCapture_3_02:getFeatureFlag("id_model_hebrew_back_id")?PipelineProfileName.IdCapture_2_02:PipelineProfileName.IdCapture_2_01,Le=PipelineProfileName.SelfieWithQualityMetrics,Ye=PipelineProfileName.SelfieVideoSelfie,tt=PipelineProfileName.IdVideoSelfie_2_01;return[Be,tt,Le,Ye]}function getInitializationParams(){const Le=generateBundle(),Ye="https://d3vv997wtl2myz.cloudfront.net/webcamera/onnx-backend-wasm",tt=`${Ye}/${wasmVersion}/webLib.wasm`,nt=`${Ye}/${wasmVersion}/webLibSimd.wasm`,ft=`${Ye}/${wasmVersion}/webLib.js`,ht=`${Ye}/${wasmVersion}/versions.json`;let gt=new Map,At=new Map;for(const xt of Le){const Et=getProfile(xt);if(!Et)throw new Error(`Profile not found: ${xt}`);const yt=Et.modelNames;let Ct=[];for(const kt of yt)Ct.push(`${Ye}/${wasmVersion}/models/${kt}`);gt.set(Et.pipelineType,Ct),At.set(Et.detectionType,Et)}return{wasmModulePath:tt,wasmSimdModulePath:nt,glueCodePath:ft,versionsFilePath:ht,pipelineModels:gt,enableSIMD:!0,profiles:At,wasmVersion}}window.wasmArrayBuffer=null;class MlWasmJSApi{constructor(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.wasmModule=null,this.pipelineApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceDetectionWasmApi=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallMutex=new Mutex,this.Module=null,this.loadModule=async Le=>{this.Module=(await import(Le)).Module}}async initialize(Le,Ye,tt,nt,ft,ht){await this.freeResources(),this.pipelines_=ht,this.versionsFile=ft,await this.loadModule(tt);const gt=await this.loadWasm(nt,Le,Ye);return this.pipelineApiUtilities=new this.wasmModule.PipelineApiUtilities,this.utilityApi=new this.wasmModule.UtilityApi,this.idCaptureWasmApi=new this.wasmModule.IdCaptureApi,this.faceDetectionWasmApi=new this.wasmModule.FaceDetectionApi,this.isInitialized_=!0,gt}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}isInitialized(){return this.pipelineApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceDetectionWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Le,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Le&&Ye&&Le==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Le*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Le,this.imageHeight_=Ye,this.inputImageBuffer=this.pipelineApiUtilities.allocateInputImageBuffer(Le,Ye,4))}async handleDetectionCallAndUpdateState(Le){this.checkWasmInitialization("Unable to update pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(Le))}encryptImage(Le){return this.checkWasmInitialization("Unable to encrypt the image, cpp API hasn't been initialized"),this.utilityApi.encryptImage(Le)}isVirtualCamera(Le){if(this.checkWasmInitialization("Unable to check if the camera is virtual, cpp API hasn't been initialized"),Le)return this.utilityApi.isVirtualCamera(Le)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Le){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Le.width,Le.height),this.inputImageBuffer.set(Le.data),this.utilityApi.analyzeFrame()}async freeResources(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,window.wasmArrayBuffer=null,this.pipelineApiUtilities&&typeof this.pipelineApiUtilities.delete=="function"&&(this.pipelineApiUtilities.delete(),this.pipelineApiUtilities=null),this.utilityApi&&typeof this.utilityApi.delete=="function"&&(this.utilityApi.delete(),this.utilityApi=null),this.idCaptureWasmApi&&typeof this.idCaptureWasmApi.delete=="function"&&(this.idCaptureWasmApi.delete(),this.idCaptureWasmApi=null),this.faceDetectionWasmApi&&typeof this.faceDetectionWasmApi.delete=="function"&&(this.faceDetectionWasmApi.delete(),this.faceDetectionWasmApi=null),this.wasmModule=null,this.isInitialized_=!1}resetPipeline(Le){this.checkWasmInitialization("Unable to reset pipeline, cpp API hasn't been initialized"),this.pipelineApiUtilities.resetPipeline(this.pipelineTypeToWasmEnum(Le))}resetAllPipelines(){this.checkWasmInitialization("Unable to reset pipelines, cpp API hasn't been initialized");for(const[Le,Ye]of this.pipelines_)this.resetPipeline(Le)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllPipelines(),this.resetOther()}async process(Le,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");switch(this.inputImageBuffer.set(Le.data),Ye){case WasmPipelineType.IdBlurGlarePipeline:case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.idCaptureWasmApi.runIdCapturePipeline(this.pipelineTypeToWasmEnum(Ye));case WasmPipelineType.IdFaceDetectionPipeline:return this.faceDetectionWasmApi.runIdFaceDetectionPipeline();case WasmPipelineType.IdVideoSelfiePipeline:return this.idCaptureWasmApi.runIdVideoSelfiePipeline();case WasmPipelineType.SelfieWithAggregationMetrics:case WasmPipelineType.SelfieWithQualityMetrics:return this.faceDetectionWasmApi.runSelfieFaceDetectionPipeline(this.pipelineTypeToWasmEnum(Ye));default:throw new Error("Unknown pipeline type")}}async runIdCapture(Le){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Le){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.faceDetectionWasmApi.runSelfieCapture()}async setFacePositionConstraints(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFacePositionConstraints(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceDetectionThresholds(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set face detection thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}async setFaceAttributesThresholds(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceAttributesThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceChecksEnabled(Le,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceChecksEnabled(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht)}async setFaceDetectionMode(Le,Ye){this.checkWasmInitialization("Unable to set face detection mode, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionMode(this.pipelineTypeToWasmEnum(Le),Ye)}async setFaceDetectionCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt){this.checkWasmInitialization("Unable to set face detection callbacks, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt)}async setIdCaptureThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt)}async setIdCaptureCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt)}async setIdCaptureGeometryParams(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt)}async setIdCaptureConfigParams(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}setIdCaptureModelType(Le,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.pipelineTypeToWasmEnum(Le),this.IdCaptureModelTypeToWasmEnum(Ye))}IdPerspectiveTransform(Le,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Le,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadWasm(Le,Ye,tt){const nt=Le?tt:Ye;try{window.wasmArrayBuffer=await fetch(nt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),this.wasmModule=await this.Module()}catch(ft){if(console.log(ft,Le,"useSmd"),Le)return await this.loadWasm(!1,Ye,tt);throw ft}return Le}async loadModels(){var nt;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Le=new this.wasmModule.PipelineTypeToIntMap,Ye=new Map,tt=new Map;for(let[ft,ht]of this.pipelines_){let gt=this.pipelineTypeToWasmEnum(ft),At=[],xt=new this.wasmModule.VectorInt;for(let Et of ht){if(!tt.has(Et)){let Ct=await fetch(Et).then(kt=>kt.arrayBuffer()).then(kt=>new Uint8Array(kt));tt.set(Et,Ct)}let yt=tt.get(Et);xt.push_back(yt.byteLength),At.push(yt)}Le.set(gt,xt),Ye.set(gt,At)}this.modelsBuffers=this.pipelineApiUtilities.allocateModelsBuffers(Le);for(let[ft,ht]of Ye){let gt=(nt=this.modelsBuffers)==null?void 0:nt.get(ft);for(let At=0;At<gt.size();At++){let xt=gt==null?void 0:gt.get(At);if(xt)xt.set(ht[At]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializePipelines(){this.checkWasmInitialization("Unable to initialize pipelines, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.pipelineApiUtilities.initializePipelines()}async setProductionMode(Le){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Le)}getPipelineState(){return this.checkWasmInitialization("Unable to get pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.getPipelineState()}getCurrentPipeline(){return this.checkWasmInitialization("Unable to get current pipeline, cpp API hasn't been initialized"),this.pipelineTypeFromWasmEnum(this.pipelineApiUtilities.getCurrentPipeline())}setSdkVersion(Le){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Le)}setSdkPlatform(Le){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Le)}setDeviceInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Le,Ye)}setBrowserInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Le,Ye)}setCameraInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Le,Ye)}setZc(Le){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Le)}setMotionStatus(Le){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Le)}setMetadataField(Le,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Le,Ye)}setInspectorOpened(Le){this.inspectorOpened_=Le}setBackgroundMode(Le){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Le)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(){return this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.prc.bind(this.utilityApi),[])}async poc(Le){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.poc.bind(this.utilityApi),[Le])}async pc(Le){this.checkWasmInitialization("Unable to pc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.pc.bind(this.utilityApi),[Le])}pipelineTypeToWasmEnum(Le){switch(Le){case WasmPipelineType.IdBlurGlarePipeline:return this.wasmModule.PipelineType.IdBlurGlarePipeline;case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.wasmModule.PipelineType.IdBarcodeAndTextQualityPipeline;case WasmPipelineType.IdFaceDetectionPipeline:return this.wasmModule.PipelineType.IdFaceDetectionPipeline;case WasmPipelineType.IdVideoSelfiePipeline:return this.wasmModule.PipelineType.IdVideoSelfiePipeline;case WasmPipelineType.SelfieWithAggregationMetrics:return this.wasmModule.PipelineType.SelfieWithAggregationMetrics;case WasmPipelineType.SelfieWithQualityMetrics:return this.wasmModule.PipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}pipelineTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.PipelineType.IdBlurGlarePipeline:return WasmPipelineType.IdBlurGlarePipeline;case this.wasmModule.IdBarcodeAndTextQualityPipeline:return WasmPipelineType.IdBarcodeAndTextQualityPipeline;case this.wasmModule.PipelineType.IdFaceDetectionPipeline:return WasmPipelineType.IdFaceDetectionPipeline;case this.wasmModule.PipelineType.IdVideoSelfiePipeline:return WasmPipelineType.IdVideoSelfiePipeline;case this.wasmModule.PipelineType.SelfieWithAggregationMetrics:return WasmPipelineType.SelfieWithAggregationMetrics;case this.wasmModule.PipelineType.SelfieWithQualityMetrics:return WasmPipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}IdCaptureModelTypeToWasmEnum(Le){switch(Le){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}IdCaptureModelTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.IdCaptureModelType.IdCaptureV1x:return IdCaptureModelType.IdCaptureV1x;case this.wasmModule.IdCaptureModelType.IdCaptureV2x:return IdCaptureModelType.IdCaptureV2x;case this.wasmModule.IdCaptureModelType.IdCaptureV3x:return IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Le){if(!this.isInitialized())throw new Error(Le)}async wasmCallWrapper(Le,Ye=[]){return await this.wasmCallMutex.withLock(async(...tt)=>{let nt=!1;try{for(;;){if(nt=Le(...tt),nt)return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){console.log("Error in wasmCallWrapper:",ft)}},...Ye)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),version$4="1.85.0-20251209093606.0";function e$2(Be,Le){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Be,Le)?Be[Le]:void 0}function t$2(Be,Le,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Be,location.href),{blockedURI:yt}=xt;yt!==Et.href&&yt!==Et.protocol.slice(0,-1)&&yt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Le).then(xt=>(At(),xt),xt=>new Promise(Et=>{const yt=new MessageChannel;yt.port1.onmessage=()=>Et(),yt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Be){let Le="";for(let Ye=0;Ye<Be.length;++Ye)if(Ye>0){const tt=Be[Ye].toLowerCase();tt!==Be[Ye]?Le+=` ${tt}`:Le+=Be[Ye]}else Le+=Be[Ye].toUpperCase();return Le}const r$4={default:"endpoint"},o$1={default:"tlsEndpoint"},i$5="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$e=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$d="API key required",m$2="API key not found",A$1="API key expired",w$e="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$d,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Be,Le){const Ye=[],[tt,nt]=function(gt){const At=function(yt){const Ct=[...yt];return{current:()=>Ct[0],postpone(){const kt=Ct.shift();kt!==void 0&&Ct.push(kt)},exclude(){Ct.shift()}}}(gt),xt=function(yt,Ct){let kt=0;return()=>Math.random()*Math.min(Ct,yt*Math.pow(2,kt++))}(100,3e3),Et=new Set;return[At.current(),(yt,Ct)=>{let kt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),kt=0;else if(vt===K)At.exclude();else if(vt===M$1){const It=Date.now()-yt.getTime()<50,wt=At.current();wt&&It&&!Et.has(wt)&&(Et.add(wt),kt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,kt??yt.getTime()+xt()-Date.now()]}]}(Be);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=yt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:yt}),Et=Le(gt);return Et.then(()=>xt(),xt),Et.catch(yt=>{if(ft!=null||(ft=yt),Ye.length>=5)throw ft;const Ct=nt(At,yt);if(!Ct)throw ft;const[kt,vt]=Ct;return(bt=vt,new Promise(It=>setTimeout(It,bt))).then(()=>ht(kt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Be){var Le,Ye;const{picked:tt,rest:nt}=function(Et,yt){const Ct={},kt={};for(const[vt,bt]of Object.entries(Et))yt.includes(vt)?Ct[vt]=bt:kt[vt]=bt;return{picked:Ct,rest:kt}}(Be,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Le=tt.apiKey)!==null&&Le!==void 0?Le:ft,gt=(Ye=e$2(Be,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],yt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(kt,vt,bt,It){return kt.addEventListener(vt,bt,It),()=>kt.removeEventListener(vt,bt,It)}(document,"visibilitychange",yt);return yt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$d);const Et=function(yt,Ct){return(Array.isArray(yt)?yt:[yt]).map(kt=>function(vt,bt){const It=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?It(bt):wt==="<loaderVersion>"?It(b$2):wt)}(String(kt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(yt){return yt instanceof Error&&yt.message===K?new Error(M$1):yt}(Et)}).then(([Et,yt])=>(xt(),Et.load({...nt,ldi:{attempts:yt,visibilityStates:At}})))}function F$1(Be){return t$2(Be,()=>function(Le){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Le))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Le,ht.appendChild(nt)})}(Be),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Be=window,Le="__fpjs_p_l_b",Ye=Be[Le];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Be,Le),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$d,ERROR_BAD_REQUEST_FORMAT:w$e,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$5,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$e,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$4,defaultTlsEndpoint:o$1};function e$1(Be,Le,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(yt){yt(Et)})).then(ht,gt)}At((tt=tt.apply(Be,[])).next())})}function n$1(Be,Le){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Le.call(Be,ht)}catch(yt){Et=[6,yt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$3={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$4=function(Be,Le){typeof window<"u"&&(o[Be]=Le)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Be){var Le,Ye=Be[0];return!(!((Le=r$3==null?void 0:r$3.exclude)===null||Le===void 0)&&Le.includes(Ye))}).filter(function(Be){var Le,Ye,tt,nt,ft=Be[0];return!((Le=r$3==null?void 0:r$3.include)===null||Le===void 0)&&Le.some(function(ht){return ht.includes(".")})?(Ye=r$3==null?void 0:r$3.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$3==null?void 0:r$3.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$3==null?void 0:r$3.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Be){return[Be[0],(0,Be[1])()]}))};function c$2(Be){return Be^=Be>>>16,Be=Math.imul(Be,2246822507),Be^=Be>>>13,Be=Math.imul(Be,3266489909),(Be^=Be>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Be,Le){return Be<<Le|Be>>>32-Le}function d(Be,Le){var Ye;if(Le===void 0&&(Le=0),Le=Le?0|Le:0,typeof Be=="string"&&(Ye=Be,Be=new TextEncoder().encode(Ye).buffer),!(Be instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Le,Le,Le,Le]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Be,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Be,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Be,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Be,Le){return new Promise(function(Ye){setTimeout(function(){return Ye(Le)},Be)})}function m$1(Be,Le,Ye){return Promise.all(Be.map(function(tt){return Promise.race([tt,f$1(Le,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Be,Le,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Be=u(),Le=Object.keys(Be),[4,m$1(Object.values(Be),(r$3==null?void 0:r$3.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Le[gt]]=ht}),[2,p(nt,r$3.exclude||[],r$3.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Be,Le,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var yt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Le.some(function(bt){return yt.startsWith(bt)}),kt=Ye.some(function(bt){return yt.startsWith(bt)});Ct&&!kt||(nt[xt]=Et)}else{var vt=p(Et,Le,Ye,yt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Be);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$d(Be){return e$1(this,void 0,void 0,function(){var Le,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Le=tt.sent(),Ye=d(JSON.stringify(Le)),Math.random()<1e-5&&r$3.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Le),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Be=navigator.userAgent,Le={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Be.match(nt);if(ft&&ft.groups)return{name:Le[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Be){for(var Le=0,Ye=0;Ye<Be.length;++Ye)Le+=Math.abs(Be[Ye]);return Le}var M=b$1();function E(Be,Le,Ye){for(var tt=[],nt=0;nt<Be[0].data.length;nt++){for(var ft=[],ht=0;ht<Be.length;ht++)ft.push(Be[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Le,Ye)}function P(Be){if(Be.length===0)return 0;for(var Le={},Ye=0,tt=Be;Ye<tt.length;Ye++)Le[ft=tt[Ye]]=(Le[ft]||0)+1;var nt=Be[0];for(var ft in Le)Le[ft]>Le[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$4("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Be){return[2,new Promise(function(Le,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Le({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$4("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Be){var Le=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Be({commonImageDataHash:d(E(Le,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Be,Le){if(!Be)throw new Error("Canvas context not supported");return Be.font,Be.font="72px ".concat(Le),Be.measureText("WwMmLli0Oo").width}function _$1(){var Be,Le=document.createElement("canvas"),Ye=(Be=Le.getContext("webgl"))!==null&&Be!==void 0?Be:Le.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Be=new Float32Array(1),Le=new Uint8Array(Be.buffer);return Be[0]=1/0,Be[0]=Be[0]-Be[0],Le[3]}function B(Be,Le){var Ye={};return Le.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Be.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Be=[],Le={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Le).forEach(function(Ye){Le[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Be.push("".concat(Ye,": ").concat(tt))})}),Be}b$1().name!="Firefox"&&i$4("fonts",function(){var Be=this;return new Promise(function(Le,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(yt){return setTimeout(yt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Be,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var yt=L(ht,Et);gt.includes(yt)||(At[Et]=yt)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$4("hardware",function(){return new Promise(function(Be,Le){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Be({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$4("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$4("permissions",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){return k=(r$3==null?void 0:r$3.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Be=Array.from({length:(r$3==null?void 0:r$3.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Be).then(function(Ye){return B(Ye,k)})]})})}),i$4("plugins",function(){var Be=[];if(navigator.plugins)for(var Le=0;Le<navigator.plugins.length;Le++){var Ye=navigator.plugins[Le];Be.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Be})})}),i$4("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$4("system",function(){return new Promise(function(Be){var Le=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Le.name,version:Le.version}};Le.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Be(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$4("webgl",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Be=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
66
|
+
`;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>{let Be,Le;return{promise:new Promise((tt,nt)=>{Be=tt,Le=nt}),resolve:Be,reject:Le}});class InterruptionHandler{constructor(){this.boundVisibilityChange=this.handleVisibilityChange.bind(this),this.boundOnline=this.handleOnline.bind(this),this.boundOffline=this.handleOffline.bind(this),this.boundUnhandledRejection=this.handleUnhandledRejection.bind(this),this.boundError=this.handleError.bind(this),this.initialized=!1}registerEventListeners(){this.initialized||(document.addEventListener("visibilitychange",this.boundVisibilityChange),window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline),window.addEventListener("unhandledrejection",this.boundUnhandledRejection),window.addEventListener("error",this.boundError),this.initialized=!0)}removeEventListeners(){this.initialized&&(this.initialized=!1,document.removeEventListener("visibilitychange",this.boundVisibilityChange),window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),window.removeEventListener("unhandledrejection",this.boundUnhandledRejection),window.removeEventListener("error",this.boundError))}handleVisibilityChange(){document.hidden?this.onAppHidden():this.onAppVisible()}onAppHidden(){}onAppVisible(){}handleOnline(){}handleOffline(){}handleUnhandledRejection(Le){}handleError(Le){}}const regex$1={CURP_PATTERN:/^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/,EMAIL_PATTERN:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,SSN_PATTERN:/^\d{3}-?\d{2}-?\d{4}$/};function webgl(){let Be,Le,Ye=256,tt=128;Be=document.body.appendChild(document.createElement("canvas")),Be.width=Ye,Be.height=tt;try{Le=Be.getContext("webgl2")||Be.getContext("experimental-webgl2")||Be.getContext("webgl")||Be.getContext("experimental-webgl")||Be.getContext("moz-webgl");const nt="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",ft="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",ht=Le.createBuffer();Le.bindBuffer(Le.ARRAY_BUFFER,ht);const gt=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0]);Le.bufferData(Le.ARRAY_BUFFER,gt,Le.STATIC_DRAW),ht.itemSize=3,ht.numItems=3;const At=Le.createProgram(),xt=Le.createShader(Le.VERTEX_SHADER);Le.shaderSource(xt,nt),Le.compileShader(xt);const Et=Le.createShader(Le.FRAGMENT_SHADER);Le.shaderSource(Et,ft),Le.compileShader(Et),Le.attachShader(At,xt),Le.attachShader(At,Et),Le.linkProgram(At),Le.useProgram(At),At.vertexPosAttrib=Le.getAttribLocation(At,"attrVertex"),At.offsetUniform=Le.getUniformLocation(At,"uniformOffset"),Le.enableVertexAttribArray(At.vertexPosAttrib),Le.vertexAttribPointer(At.vertexPosAttrib,ht.itemSize,Le.FLOAT,!1,0,0),Le.uniform2f(At.offsetUniform,1,1),Le.drawArrays(Le.TRIANGLE_STRIP,0,ht.numItems);let yt="";const Ct=new Uint8Array(Ye*tt*4);return Le.readPixels(0,0,Ye,tt,Le.RGBA,Le.UNSIGNED_BYTE,Ct),yt=JSON.stringify(Ct).replace(/,?"[0-9]+":/g,""),document.body.removeChild(Be),sha256(yt)}catch{return""}}const sha256=(()=>{let Be=1,Le,Ye=[],tt=[];for(;++Be<18;)for(Le=Be*Be;Le<312;Le+=Be)Ye[Le]=1;function nt(gt,At){return Math.pow(gt,1/At)%1*4294967296|0}for(Be=1,Le=0;Be<313;)Ye[++Be]||(tt[Le]=nt(Be,2),Ye[Le++]=nt(Be,3));function ft(gt,At){return gt>>>At|gt<<32-At}function ht(gt){let At=tt.slice(Be=0),xt=unescape(encodeURI(gt)),Et=[],yt=xt.length,Ct=[],kt,vt,bt;for(;Be<yt;)Ct[Be>>2]|=(xt.charCodeAt(Be)&255)<<8*(3-Be++%4);for(yt*=8,Ct[yt>>5]|=128<<24-yt%32,Ct[bt=yt+64>>5|15]=yt,Be=0;Be<bt;Be+=16){for(kt=At.slice(Le=0,8);Le<64;kt[4]+=vt)Le<16?Et[Le]=Ct[Le+Be]:Et[Le]=(ft(vt=Et[Le-2],17)^ft(vt,19)^vt>>>10)+(Et[Le-7]|0)+(ft(vt=Et[Le-15],7)^ft(vt,18)^vt>>>3)+(Et[Le-16]|0),kt.unshift((vt=(kt.pop()+(ft(gt=kt[4],6)^ft(gt,11)^ft(gt,25))+((gt&kt[5]^~gt&kt[6])+Ye[Le])|0)+(Et[Le++]|0))+(ft(yt=kt[0],2)^ft(yt,13)^ft(yt,22))+(yt&kt[1]^kt[1]&kt[2]^kt[2]&yt));for(Le=8;Le--;)At[Le]=kt[Le]+At[Le]}for(xt="";Le<63;)xt+=(At[++Le>>3]>>4*(7-Le%8)&15).toString(16);return xt}return ht})();var store;function getGlobalConfig(Be){return{lang:store==null?void 0:store.lang,message:Be==null?void 0:Be.message,abortEarly:store==null?void 0:store.abortEarly,abortPipeEarly:store==null?void 0:store.abortPipeEarly}}var store2;function getGlobalMessage(Be){return store2==null?void 0:store2.get(Be)}var store3;function getSchemaMessage(Be){return store3==null?void 0:store3.get(Be)}var store4;function getSpecificMessage(Be,Le){var Ye;return(Ye=store4==null?void 0:store4.get(Be))==null?void 0:Ye.get(Le)}function _stringify$3(Be){var Ye,tt;const Le=typeof Be;return Le==="string"?`"${Be}"`:Le==="number"||Le==="bigint"||Le==="boolean"?`${Be}`:Le==="object"||Le==="function"?(Be&&((tt=(Ye=Object.getPrototypeOf(Be))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Le}function _addIssue(Be,Le,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Be.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$3(ft),At={kind:Be.kind,type:Be.type,input:ft,expected:ht,received:gt,message:`Invalid ${Le}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Be.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Be.kind==="schema",Et=(nt==null?void 0:nt.message)??Be.message??getSpecificMessage(Be.reference,At.lang)??(xt?getSchemaMessage(At.lang):null)??tt.message??getGlobalMessage(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps(Be){return{version:1,vendor:"valibot",validate(Le){return Be["~run"]({value:Le},getGlobalConfig())}}}function _isValidObjectKey(Be,Le){return Object.hasOwn(Be,Le)&&Le!=="__proto__"&&Le!=="prototype"&&Le!=="constructor"}function _joinExpects(Be,Le){const Ye=[...new Set(Be)];return Ye.length>1?`(${Ye.join(` ${Le} `)})`:Ye[0]??"never"}function isValiError(Be){return Be instanceof ValiError}var ValiError=class extends Error{constructor(Be){super(Be[0].message),this.name="ValiError",this.issues=Be}};function getFallback(Be,Le,Ye){return typeof Be.fallback=="function"?Be.fallback(Le,Ye):Be.fallback}function getDefault(Be,Le,Ye){return typeof Be.default=="function"?Be.default(Le,Ye):Be.default}function boolean$2(Be){return{kind:"schema",type:"boolean",reference:boolean$2,expects:"boolean",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="boolean"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function custom(Be,Le){return{kind:"schema",type:"custom",reference:custom,expects:"unknown",async:!1,check:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return this.check(Ye.value)?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function function_(Be){return{kind:"schema",type:"function",reference:function_,expects:"Function",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="function"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function literal(Be,Le){return{kind:"schema",type:"literal",reference:literal,expects:_stringify$3(Be),async:!1,literal:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===this.literal?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function null_(Be){return{kind:"schema",type:"null",reference:null_,expects:"null",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return Le.value===null?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function number$3(Be){return{kind:"schema",type:"number",reference:number$3,expects:"number",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="number"&&!isNaN(Le.value)?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function object(Be,Le){return{kind:"schema",type:"object",reference:object,expects:"Object",async:!1,entries:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const yt of xt.issues)yt.path?yt.path.unshift(Et):yt.path=[Et],(ft=Ye.issues)==null||ft.push(yt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue(this,"type",Ye,tt);return Ye}}}function optional(Be,Le){return{kind:"schema",type:"optional",reference:optional,expects:`(${Be.expects} | undefined)`,async:!1,wrapped:Be,default:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function record(Be,Le,Ye){return{kind:"schema",type:"record",reference:record,expects:"Object",async:!1,key:Be,value:Le,message:Ye,get"~standard"(){return _getStandardProps(this)},"~run"(tt,nt){var ht,gt;const ft=tt.value;if(ft&&typeof ft=="object"){tt.typed=!0,tt.value={};for(const At in ft)if(_isValidObjectKey(ft,At)){const xt=ft[At],Et=this.key["~run"]({value:At},nt);if(Et.issues){const Ct={type:"object",origin:"key",input:ft,key:At,value:xt};for(const kt of Et.issues)kt.path=[Ct],(ht=tt.issues)==null||ht.push(kt);if(tt.issues||(tt.issues=Et.issues),nt.abortEarly){tt.typed=!1;break}}const yt=this.value["~run"]({value:xt},nt);if(yt.issues){const Ct={type:"object",origin:"value",input:ft,key:At,value:xt};for(const kt of yt.issues)kt.path?kt.path.unshift(Ct):kt.path=[Ct],(gt=tt.issues)==null||gt.push(kt);if(tt.issues||(tt.issues=yt.issues),nt.abortEarly){tt.typed=!1;break}}(!Et.typed||!yt.typed)&&(tt.typed=!1),Et.typed&&(tt.value[Et.value]=yt.value)}}else _addIssue(this,"type",tt,nt);return tt}}}function string$2(Be){return{kind:"schema",type:"string",reference:string$2,expects:"string",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="string"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function _subIssues(Be){let Le;if(Be)for(const Ye of Be)Le?Le.push(...Ye.issues):Le=Ye.issues;return Le}function union(Be,Le){return{kind:"schema",type:"union",reference:union,expects:_joinExpects(Be.map(Ye=>Ye.expects),"|"),async:!1,options:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){let nt,ft,ht;for(const gt of this.options){const At=gt["~run"]({value:Ye.value},tt);if(At.typed)if(At.issues)ft?ft.push(At):ft=[At];else{nt=At;break}else ht?ht.push(At):ht=[At]}if(nt)return nt;if(ft){if(ft.length===1)return ft[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ft)}),Ye.typed=!0}else{if((ht==null?void 0:ht.length)===1)return ht[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ht)})}return Ye}}}function parse$8(Be,Le,Ye){const tt=Be["~run"]({value:Le},getGlobalConfig(Ye));if(tt.issues)throw new ValiError(tt.issues);return tt.value}function validate$2(...Be){try{Be.forEach(({schema:Le,value:Ye})=>parse$8(Le,Ye))}catch(Le){if(isValiError(Le)){const Ye=Le.issues.map(tt=>{var ft;return`${((ft=tt.path)==null?void 0:ft.map(ht=>ht.key).join("."))||"root"}: ${tt.message}`}).join(", ");throw new Error(`Validation failed: ${Ye}`)}throw Le}}exports.api=void 0;function setApi(Be){exports.api=Be}function setToken(Be){exports.api.defaults.headers["X-Incode-Hardware-Id"]=Be}const eventsQueue=[];function addEvent(Be){const{token:Le,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Be;if(!Le){eventsQueue.push(Be);return}return exports.api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Le}}).catch(()=>{})}function emptyQueue(Be){eventsQueue.forEach(Le=>{addEvent({...Le,token:Be})})}const state={token:null};var PipelineProfileName=(Be=>(Be[Be.IdCapture_2_01=0]="IdCapture_2_01",Be[Be.IdCapture_2_02=1]="IdCapture_2_02",Be[Be.IdCapture_3_02=2]="IdCapture_3_02",Be[Be.IdVideoSelfie_2_01=3]="IdVideoSelfie_2_01",Be[Be.SelfieWithAggregationMetrics=4]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=5]="SelfieWithQualityMetrics",Be[Be.SelfieVideoSelfie=6]="SelfieVideoSelfie",Be))(PipelineProfileName||{});class PipelineProfile{constructor(Le,Ye,tt,nt,ft,ht=null,gt=""){this.pipelineType=Le,this.name=Ye,this.detectionType=tt,this.modelNames=nt,this.parameters=ft,this.paramsConfigurator=ht,this.description=gt}reconfigureParams(Le,Ye){if(this.paramsConfigurator==null)throw new Error("PipelineProfile does not have a paramsConfigurator");this.paramsConfigurator(this.parameters,this.pipelineType,Le,Ye)}}var DetectionType=(Be=>(Be[Be.IDCapture=0]="IDCapture",Be[Be.Selfie=1]="Selfie",Be[Be.SelfieVideoSelfie=2]="SelfieVideoSelfie",Be[Be.IdVideoSelfie=3]="IdVideoSelfie",Be))(DetectionType||{}),WasmPipelineType=(Be=>(Be[Be.IdBlurGlarePipeline=0]="IdBlurGlarePipeline",Be[Be.IdBarcodeAndTextQualityPipeline=1]="IdBarcodeAndTextQualityPipeline",Be[Be.IdVideoSelfiePipeline=2]="IdVideoSelfiePipeline",Be[Be.SelfieWithAggregationMetrics=3]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=4]="SelfieWithQualityMetrics",Be[Be.IdFaceDetectionPipeline=5]="IdFaceDetectionPipeline",Be))(WasmPipelineType||{}),IdCaptureModelType=(Be=>(Be[Be.IdCaptureV1x=0]="IdCaptureV1x",Be[Be.IdCaptureV2x=1]="IdCaptureV2x",Be[Be.IdCaptureV3x=2]="IdCaptureV3x",Be))(IdCaptureModelType||{}),src$2={},src$1={},$_StatsigGlobal={},Log={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Log=Be.LogLevel=void 0;const Le=" DEBUG ",Ye=" INFO ",tt=" WARN ",nt=" ERROR ";function ft(gt){return gt.unshift("[Statsig]"),gt}Be.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class ht{static info(...At){ht.level>=Be.LogLevel.Info&&console.info(Ye,...ft(At))}static debug(...At){ht.level>=Be.LogLevel.Debug&&console.debug(Le,...ft(At))}static warn(...At){ht.level>=Be.LogLevel.Warn&&console.warn(tt,...ft(At))}static error(...At){ht.level>=Be.LogLevel.Error&&console.error(nt,...ft(At))}}Be.Log=ht,ht.level=Be.LogLevel.Warn})(Log),function(Be){var Le,Ye,tt;Object.defineProperty(Be,"__esModule",{value:!0}),Be._getInstance=Be._getStatsigGlobalFlag=Be._getStatsigGlobal=void 0;const nt=Log,ft=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:Ct}catch{return Ct}};Be._getStatsigGlobal=ft;const ht=kt=>(0,Be._getStatsigGlobal)()[kt];Be._getStatsigGlobalFlag=ht;const gt=kt=>{const vt=(0,Be._getStatsigGlobal)();return kt?vt.instances&&vt.instances[kt]:(vt.instances&&Object.keys(vt.instances).length>1&&nt.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),vt.firstInstance)};Be._getInstance=gt;const At="__STATSIG__",xt=typeof window<"u"?window:{},Et=typeof commonjsGlobal<"u"?commonjsGlobal:{},yt=typeof globalThis<"u"?globalThis:{},Ct=(tt=(Ye=(Le=xt[At])!==null&&Le!==void 0?Le:Et[At])!==null&&Ye!==void 0?Ye:yt[At])!==null&&tt!==void 0?tt:{instance:Be._getInstance};xt[At]=Ct,Et[At]=Ct,yt[At]=Ct}($_StatsigGlobal);var Diagnostics={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Diagnostics=void 0;const Le=new Map,Ye="start",tt="end",nt="statsig::diagnostics";Be.Diagnostics={_getMarkers:xt=>Le.get(xt),_markInitOverallStart:xt=>{gt(xt,ft({},Ye,"overall"))},_markInitOverallEnd:(xt,Et,yt)=>{gt(xt,ft({success:Et,error:Et?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:yt},tt,"overall"))},_markInitNetworkReqStart:(xt,Et)=>{gt(xt,ft(Et,Ye,"initialize","network_request"))},_markInitNetworkReqEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","network_request"))},_markInitProcessStart:xt=>{gt(xt,ft({},Ye,"initialize","process"))},_markInitProcessEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","process"))},_clearMarkers:xt=>{Le.delete(xt)},_formatError(xt){if(xt&&typeof xt=="object")return{code:At(xt,"code"),name:At(xt,"name"),message:At(xt,"message")}},_getDiagnosticsData(xt,Et,yt,Ct){var kt;return{success:(xt==null?void 0:xt.ok)===!0,statusCode:xt==null?void 0:xt.status,sdkRegion:(kt=xt==null?void 0:xt.headers)===null||kt===void 0?void 0:kt.get("x-statsig-region"),isDelta:yt.includes('"is_delta":true')===!0?!0:void 0,attempt:Et,error:Be.Diagnostics._formatError(Ct)}},_enqueueDiagnosticsEvent(xt,Et,yt,Ct){const kt=Be.Diagnostics._getMarkers(yt);if(kt==null||kt.length<=0)return-1;const vt=kt[kt.length-1].timestamp-kt[0].timestamp;Be.Diagnostics._clearMarkers(yt);const bt=ht(xt,{context:"initialize",markers:kt.slice(),statsigOptions:Ct});return Et.enqueue(bt),vt}};function ft(xt,Et,yt,Ct){return Object.assign({key:yt,action:Et,step:Ct,timestamp:Date.now()},xt)}function ht(xt,Et){return{eventName:nt,user:xt,value:null,metadata:Et,time:Date.now()}}function gt(xt,Et){var yt;const Ct=(yt=Le.get(xt))!==null&&yt!==void 0?yt:[];Ct.push(Et),Le.set(xt,Ct)}function At(xt,Et){if(Et in xt)return xt[Et]}})(Diagnostics);var EventLogger$1={},CacheKey={},Hashing={},TypingUtils={};Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0;function _typeOf(Be){return Array.isArray(Be)?"array":typeof Be}TypingUtils._typeOf=_typeOf;function _isTypeMatch(Be,Le){const Ye=tt=>Array.isArray(tt)?"array":tt===null?"null":typeof tt;return Ye(Be)===Ye(Le)}TypingUtils._isTypeMatch=_isTypeMatch,function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getSortedObject=Be._DJB2Object=Be._DJB2=void 0;const Le=TypingUtils,Ye=ft=>{let ht=0;for(let gt=0;gt<ft.length;gt++){const At=ft.charCodeAt(gt);ht=(ht<<5)-ht+At,ht=ht&ht}return String(ht>>>0)};Be._DJB2=Ye;const tt=(ft,ht)=>(0,Be._DJB2)(JSON.stringify((0,Be._getSortedObject)(ft,ht)));Be._DJB2Object=tt;const nt=(ft,ht)=>{if(ft==null)return null;const gt=Object.keys(ft).sort(),At={};return gt.forEach(xt=>{const Et=ft[xt];if(ht===0||(0,Le._typeOf)(Et)!=="object"){At[xt]=Et;return}At[xt]=(0,Be._getSortedObject)(Et,ht!=null?ht-1:ht)}),At};Be._getSortedObject=nt}(Hashing),Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const Hashing_1$4=Hashing;function _getUserStorageKey(Be,Le,Ye){var tt;if(Ye)return Ye(Be,Le);const nt=Le&&Le.customIDs?Le.customIDs:{},ft=[`uid:${(tt=Le==null?void 0:Le.userID)!==null&&tt!==void 0?tt:""}`,`cids:${Object.keys(nt).sort((ht,gt)=>ht.localeCompare(gt)).map(ht=>`${ht}-${nt[ht]}`).join(",")}`,`k:${Be}`];return(0,Hashing_1$4._DJB2)(ft.join("|"))}CacheKey._getUserStorageKey=_getUserStorageKey;function _getStorageKey(Be,Le,Ye){return Le?_getUserStorageKey(Be,Le,Ye):(0,Hashing_1$4._DJB2)(`k:${Be}`)}CacheKey._getStorageKey=_getStorageKey;var NetworkConfig={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.NetworkParam=Be.NetworkDefault=Be.Endpoint=void 0,Be.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},Be.NetworkDefault={[Be.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[Be.Endpoint._initialize]:"https://featureassets.org/v1",[Be.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},Be.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(NetworkConfig);var SafeJs={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getUnloadEvent=Be._getCurrentPageUrlSafe=Be._addDocumentEventListenerSafe=Be._addWindowEventListenerSafe=Be._isServerEnv=Be._getDocumentSafe=Be._getWindowSafe=void 0;const Le=()=>typeof window<"u"?window:null;Be._getWindowSafe=Le;const Ye=()=>{var At;const xt=(0,Be._getWindowSafe)();return(At=xt==null?void 0:xt.document)!==null&&At!==void 0?At:null};Be._getDocumentSafe=Ye;const tt=()=>{if((0,Be._getDocumentSafe)()!==null)return!1;const At=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||At};Be._isServerEnv=tt;const nt=(At,xt)=>{const Et=(0,Be._getWindowSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addWindowEventListenerSafe=nt;const ft=(At,xt)=>{const Et=(0,Be._getDocumentSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addDocumentEventListenerSafe=ft;const ht=()=>{var At;try{return(At=(0,Be._getWindowSafe)())===null||At===void 0?void 0:At.location.href.split(/[?#]/)[0]}catch{return}};Be._getCurrentPageUrlSafe=ht;const gt=()=>{const At=(0,Be._getWindowSafe)();return At&&"onpagehide"in At?"pagehide":"beforeunload"};Be._getUnloadEvent=gt})(SafeJs);var StatsigEvent={};Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const CONFIG_EXPOSURE_NAME="statsig::config_exposure",GATE_EXPOSURE_NAME="statsig::gate_exposure",LAYER_EXPOSURE_NAME="statsig::layer_exposure",_createExposure=(Be,Le,Ye,tt,nt)=>(Ye.bootstrapMetadata&&(tt.bootstrapMetadata=Ye.bootstrapMetadata),{eventName:Be,user:Le,value:null,metadata:_addEvaluationDetailsToMetadata(Ye,tt),secondaryExposures:nt,time:Date.now()}),_isExposureEvent=({eventName:Be})=>Be===GATE_EXPOSURE_NAME||Be===CONFIG_EXPOSURE_NAME||Be===LAYER_EXPOSURE_NAME;StatsigEvent._isExposureEvent=_isExposureEvent;const _createGateExposure=(Be,Le,Ye)=>{var tt,nt,ft;const ht={gate:Le.name,gateValue:String(Le.value),ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(ht.configVersion=Le.__evaluation.version),_createExposure(GATE_EXPOSURE_NAME,Be,Le.details,ht,_mapExposures((ft=(nt=Le.__evaluation)===null||nt===void 0?void 0:nt.secondary_exposures)!==null&&ft!==void 0?ft:[],Ye))};StatsigEvent._createGateExposure=_createGateExposure;function _mapExposures(Be,Le){return Be.map(Ye=>typeof Ye=="string"?(Le??{})[Ye]:Ye).filter(Ye=>Ye!=null)}StatsigEvent._mapExposures=_mapExposures;const _createConfigExposure=(Be,Le,Ye)=>{var tt,nt,ft,ht;const gt={config:Le.name,ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(gt.configVersion=Le.__evaluation.version),((nt=Le.__evaluation)===null||nt===void 0?void 0:nt.passed)!=null&&(gt.rulePassed=String(Le.__evaluation.passed)),_createExposure(CONFIG_EXPOSURE_NAME,Be,Le.details,gt,_mapExposures((ht=(ft=Le.__evaluation)===null||ft===void 0?void 0:ft.secondary_exposures)!==null&&ht!==void 0?ht:[],Ye))};StatsigEvent._createConfigExposure=_createConfigExposure;const _createLayerParameterExposure=(Be,Le,Ye,tt)=>{var nt,ft,ht,gt,At,xt,Et;const yt=Le.__evaluation,Ct=((nt=yt==null?void 0:yt.explicit_parameters)===null||nt===void 0?void 0:nt.includes(Ye))===!0;let kt="",vt=(ft=yt==null?void 0:yt.undelegated_secondary_exposures)!==null&&ft!==void 0?ft:[];Ct&&(kt=(ht=yt.allocated_experiment_name)!==null&&ht!==void 0?ht:"",vt=(gt=yt.secondary_exposures)!==null&>!==void 0?gt:[]);const bt=(At=Le.__evaluation)===null||At===void 0?void 0:At.parameter_rule_ids,It={config:Le.name,parameterName:Ye,ruleID:(xt=bt==null?void 0:bt[Ye])!==null&&xt!==void 0?xt:Le.ruleID,allocatedExperiment:kt,isExplicitParameter:String(Ct)};return((Et=Le.__evaluation)===null||Et===void 0?void 0:Et.version)!=null&&(It.configVersion=Le.__evaluation.version),_createExposure(LAYER_EXPOSURE_NAME,Be,Le.details,It,_mapExposures(vt,tt))};StatsigEvent._createLayerParameterExposure=_createLayerParameterExposure;const _addEvaluationDetailsToMetadata=(Be,Le)=>(Le.reason=Be.reason,Be.lcut&&(Le.lcut=String(Be.lcut)),Be.receivedAt&&(Le.receivedAt=String(Be.receivedAt)),Le);var StatsigOptionsCommon={};Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var StorageProvider={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._setObjectInStorage=Be._getObjectFromStorage=Be.Storage=void 0;const Le=Log,Ye=SafeJs,tt={},nt={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:yt=>tt[yt]?tt[yt]:null,setItem:(yt,Ct)=>{tt[yt]=Ct},removeItem:yt=>{delete tt[yt]},getAllKeys:()=>Object.keys(tt)};let ft=null;try{const yt=(0,Ye._getWindowSafe)();yt&&yt.localStorage&&typeof yt.localStorage.getItem=="function"&&(ft={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:Ct=>yt.localStorage.getItem(Ct),setItem:(Ct,kt)=>yt.localStorage.setItem(Ct,kt),removeItem:Ct=>yt.localStorage.removeItem(Ct),getAllKeys:()=>Object.keys(yt.localStorage)})}catch{Le.Log.warn("Failed to setup localStorageProvider.")}let ht=ft??nt,gt=ht;function At(yt){try{return yt()}catch(Ct){if(Ct instanceof Error&&Ct.name==="SecurityError")return Be.Storage._setProvider(nt),null;throw Ct}}Be.Storage={isReady:()=>gt.isReady(),isReadyResolver:()=>gt.isReadyResolver(),getProviderName:()=>gt.getProviderName(),getItem:yt=>At(()=>gt.getItem(yt)),setItem:(yt,Ct)=>At(()=>gt.setItem(yt,Ct)),removeItem:yt=>gt.removeItem(yt),getAllKeys:()=>gt.getAllKeys(),_setProvider:yt=>{ht=yt,gt=yt},_setDisabled:yt=>{yt?gt=nt:gt=ht}};function xt(yt){const Ct=Be.Storage.getItem(yt);return JSON.parse(Ct??"null")}Be._getObjectFromStorage=xt;function Et(yt,Ct){Be.Storage.setItem(yt,JSON.stringify(Ct))}Be._setObjectInStorage=Et})(StorageProvider);var UrlConfiguration$1={};Object.defineProperty(UrlConfiguration$1,"__esModule",{value:!0}),UrlConfiguration$1.UrlConfiguration=void 0;const Hashing_1$3=Hashing,NetworkConfig_1$2=NetworkConfig,ENDPOINT_DNS_KEY_MAP={[NetworkConfig_1$2.Endpoint._initialize]:"i",[NetworkConfig_1$2.Endpoint._rgstr]:"e",[NetworkConfig_1$2.Endpoint._download_config_specs]:"d"};class UrlConfiguration{constructor(Le,Ye,tt,nt){this.customUrl=null,this.fallbackUrls=null,this.endpoint=Le,this.endpointDnsKey=ENDPOINT_DNS_KEY_MAP[Le],Ye&&(this.customUrl=Ye),!Ye&&tt&&(this.customUrl=tt.endsWith("/")?`${tt}${Le}`:`${tt}/${Le}`),nt&&(this.fallbackUrls=nt);const ft=NetworkConfig_1$2.NetworkDefault[Le];this.defaultUrl=`${ft}/${Le}`}getUrl(){var Le;return(Le=this.customUrl)!==null&&Le!==void 0?Le:this.defaultUrl}getChecksum(){var Le;const Ye=((Le=this.fallbackUrls)!==null&&Le!==void 0?Le:[]).sort().join(",");return(0,Hashing_1$3._DJB2)(this.customUrl+Ye)}}UrlConfiguration$1.UrlConfiguration=UrlConfiguration;var VisibilityObserving={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._notifyVisibilityChanged=Be._subscribeToVisiblityChanged=Be._isUnloading=Be._isCurrentlyVisible=void 0;const Le=SafeJs,Ye="foreground",tt="background",nt=[];let ft=Ye,ht=!1;const gt=()=>ft===Ye;Be._isCurrentlyVisible=gt;const At=()=>ht;Be._isUnloading=At;const xt=yt=>{nt.unshift(yt)};Be._subscribeToVisiblityChanged=xt;const Et=yt=>{yt!==ft&&(ft=yt,nt.forEach(Ct=>Ct(yt)))};Be._notifyVisibilityChanged=Et,(0,Le._addWindowEventListenerSafe)("focus",()=>{ht=!1,(0,Be._notifyVisibilityChanged)(Ye)}),(0,Le._addWindowEventListenerSafe)("blur",()=>(0,Be._notifyVisibilityChanged)(tt)),(0,Le._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,Be._notifyVisibilityChanged)(document.visibilityState==="visible"?Ye:tt)}),(0,Le._addWindowEventListenerSafe)((0,Le._getUnloadEvent)(),()=>{ht=!0,(0,Be._notifyVisibilityChanged)(tt)})})(VisibilityObserving);var __awaiter$f=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(EventLogger$1,"__esModule",{value:!0}),EventLogger$1.EventLogger=void 0;const CacheKey_1$1=CacheKey,Hashing_1$2=Hashing,Log_1$8=Log,NetworkConfig_1$1=NetworkConfig,SafeJs_1$3=SafeJs,StatsigEvent_1=StatsigEvent,StatsigOptionsCommon_1$2=StatsigOptionsCommon,StorageProvider_1$4=StorageProvider,UrlConfiguration_1=UrlConfiguration$1,VisibilityObserving_1$1=VisibilityObserving,DEFAULT_QUEUE_SIZE=100,DEFAULT_FLUSH_INTERVAL_MS=1e4,MAX_DEDUPER_KEYS=1e3,DEDUPER_WINDOW_DURATION_MS=6e5,MAX_FAILED_LOGS=500,QUICK_FLUSH_WINDOW_MS=200,EVENT_LOGGER_MAP={},RetryFailedLogsTrigger={Startup:"startup",GainedFocus:"gained_focus"};class EventLogger{static _safeFlushAndForget(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye.flush().catch(()=>{})}static _safeRetryFailedLogs(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus)}constructor(Le,Ye,tt,nt){var ft,ht;this._sdkKey=Le,this._emitter=Ye,this._network=tt,this._options=nt,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(ft=nt==null?void 0:nt.loggingEnabled)!==null&&ft!==void 0?ft:(nt==null?void 0:nt.disableLogging)===!0?StatsigOptionsCommon_1$2.LoggingEnabledOption.disabled:StatsigOptionsCommon_1$2.LoggingEnabledOption.browserOnly,nt!=null&&nt.loggingEnabled&&nt.disableLogging!==void 0&&Log_1$8.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(ht=nt==null?void 0:nt.loggingBufferMaxSize)!==null&&ht!==void 0?ht:DEFAULT_QUEUE_SIZE;const gt=nt==null?void 0:nt.networkConfig;this._logEventUrlConfig=new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1$1.Endpoint._rgstr,gt==null?void 0:gt.logEventUrl,gt==null?void 0:gt.api,gt==null?void 0:gt.logEventFallbackUrls)}setLogEventCompressionMode(Le){this._network.setLogEventCompressionMode(Le)}setLoggingEnabled(Le){if(this._loggingEnabled==="disabled"&&Le!=="disabled"){const Ye=this._getStorageKey(),tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);tt&&this._queue.push(...tt),StorageProvider_1$4.Storage.removeItem(Ye)}this._loggingEnabled=Le}enqueue(Le){this._shouldLogEvent(Le)&&(this._normalizeAndAppendEvent(Le),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&EventLogger._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(Le){var Ye;const tt=(Ye=this._nonExposedChecks[Le])!==null&&Ye!==void 0?Ye:0;this._nonExposedChecks[Le]=tt+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var Le;const Ye=(0,SafeJs_1$3._isServerEnv)();Ye&&((Le=this._options)===null||Le===void 0?void 0:Le.loggingEnabled)!=="always"||(EVENT_LOGGER_MAP[this._sdkKey]=this,Ye||(0,VisibilityObserving_1$1._subscribeToVisiblityChanged)(tt=>{tt==="background"?EventLogger._safeFlushAndForget(this._sdkKey):tt==="foreground"&&EventLogger._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(RetryFailedLogsTrigger.Startup),this._startBackgroundFlushInterval())}stop(){return __awaiter$f(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete EVENT_LOGGER_MAP[this._sdkKey],yield this.flush()})}flush(){return __awaiter$f(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const Le=this._queue;this._queue=[],yield this._sendEvents(Le)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>QUICK_FLUSH_WINDOW_MS)&&setTimeout(()=>EventLogger._safeFlushAndForget(this._sdkKey),QUICK_FLUSH_WINDOW_MS))}_shouldLogEvent(Le){var Ye;if(((Ye=this._options)===null||Ye===void 0?void 0:Ye.loggingEnabled)!=="always"&&(0,SafeJs_1$3._isServerEnv)())return!1;if(!(0,StatsigEvent_1._isExposureEvent)(Le))return!0;const tt=Le.user?Le.user:{statsigEnvironment:void 0},nt=(0,CacheKey_1$1._getUserStorageKey)(this._sdkKey,tt),ft=Le.metadata?Le.metadata:{},ht=[Le.eventName,nt,ft.gate,ft.config,ft.ruleID,ft.allocatedExperiment,ft.parameterName,String(ft.isExplicitParameter),ft.reason].join("|"),gt=this._lastExposureTimeMap[ht],At=Date.now();return gt&&At-gt<DEDUPER_WINDOW_DURATION_MS?!1:(Object.keys(this._lastExposureTimeMap).length>MAX_DEDUPER_KEYS&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[ht]=At,!0)}_sendEvents(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye,tt;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(Le),!1;try{const ft=(0,VisibilityObserving_1$1._isUnloading)()&&this._network.isBeaconSupported()&&((tt=(Ye=this._options)===null||Ye===void 0?void 0:Ye.networkConfig)===null||tt===void 0?void 0:tt.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:Le}),(ft?this._sendEventsViaBeacon(Le):yield this._sendEventsViaPost(Le)).success?(this._emitter({name:"logs_flushed",events:Le}),!0):(Log_1$8.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(Le),!1)}catch{return Log_1$8.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye;const tt=yield this._network.post(this._getRequestData(Le)),nt=(Ye=tt==null?void 0:tt.code)!==null&&Ye!==void 0?Ye:-1;return{success:nt>=200&&nt<300}})}_sendEventsViaBeacon(Le){return{success:this._network.beacon(this._getRequestData(Le))}}_getRequestData(Le){return{sdkKey:this._sdkKey,data:{events:Le},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[NetworkConfig_1$1.NetworkParam.EventCount]:String(Le.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(Le){for(;Le.length>MAX_FAILED_LOGS;)Le.shift();const Ye=this._getStorageKey();try{const tt=this._getFailedLogsFromStorage(Ye);(0,StorageProvider_1$4._setObjectInStorage)(Ye,[...tt,...Le])}catch{Log_1$8.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(Le){let Ye=[];try{const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Le);return Array.isArray(tt)&&(Ye=tt),Ye}catch{return[]}}_retryFailedLogs(Le){const Ye=this._getStorageKey();__awaiter$f(this,void 0,void 0,function*(){StorageProvider_1$4.Storage.isReady()||(yield StorageProvider_1$4.Storage.isReadyResolver());const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);if(!tt)return;Le===RetryFailedLogsTrigger.Startup&&StorageProvider_1$4.Storage.removeItem(Ye),(yield this._sendEvents(tt))&&Le===RetryFailedLogsTrigger.GainedFocus&&StorageProvider_1$4.Storage.removeItem(Ye)}).catch(()=>{Log_1$8.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,Hashing_1$2._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(Le){Le.user&&(Le.user=Object.assign({},Le.user),delete Le.user.privateAttributes);const Ye={},tt=this._getCurrentPageUrl();tt&&(Ye.statsigMetadata={currentPage:tt});const nt=Object.assign(Object.assign({},Le),Ye);Log_1$8.Log.debug("Enqueued Event:",nt),this._queue.push(nt)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var Le;if(((Le=this._options)===null||Le===void 0?void 0:Le.includeCurrentPageUrlWithEvents)!==!1)return(0,SafeJs_1$3._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var Le,Ye;const tt=(Ye=(Le=this._options)===null||Le===void 0?void 0:Le.loggingIntervalMs)!==null&&Ye!==void 0?Ye:DEFAULT_FLUSH_INTERVAL_MS,nt=setInterval(()=>{const ft=EVENT_LOGGER_MAP[this._sdkKey];!ft||ft._flushIntervalId!==nt?clearInterval(nt):EventLogger._safeFlushAndForget(this._sdkKey)},tt);this._flushIntervalId=nt}}EventLogger$1.EventLogger=EventLogger;var StatsigMetadata={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigMetadataProvider=Be.SDK_VERSION=void 0,Be.SDK_VERSION="3.28.1";let Le={sdkVersion:Be.SDK_VERSION,sdkType:"js-mono"};Be.StatsigMetadataProvider={get:()=>Le,add:Ye=>{Le=Object.assign(Object.assign({},Le),Ye)}}})(StatsigMetadata);var ClientInterfaces={};Object.defineProperty(ClientInterfaces,"__esModule",{value:!0});var DataAdapterCore$1={},StableID={},UUID={};Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0;function getUUID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let Be=new Date().getTime(),Le=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,tt=>{let nt=Math.random()*16;return Be>0?(nt=(Be+nt)%16|0,Be=Math.floor(Be/16)):(nt=(Le+nt)%16|0,Le=Math.floor(Le/16)),(tt==="x"?nt:nt&7|8).toString(16)})}UUID.getUUID=getUUID,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const CacheKey_1=CacheKey,Log_1$7=Log,SafeJs_1$2=SafeJs,StorageProvider_1$3=StorageProvider,UUID_1=UUID,PROMISE_MAP={},COOKIE_ENABLED_MAP={},DISABLED_MAP={};StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:Be=>{if(DISABLED_MAP[Be])return null;if(PROMISE_MAP[Be]!=null)return PROMISE_MAP[Be];let Le=null;return Le=_loadFromCookie(Be),Le!=null?(PROMISE_MAP[Be]=Le,_persistToStorage(Le,Be),Le):(Le=_loadFromStorage(Be),Le==null&&(Le=(0,UUID_1.getUUID)()),_persistToStorage(Le,Be),_persistToCookie(Le,Be),PROMISE_MAP[Be]=Le,Le)},setOverride:(Be,Le)=>{PROMISE_MAP[Le]=Be,_persistToStorage(Be,Le),_persistToCookie(Be,Le)},_setCookiesEnabled:(Be,Le)=>{COOKIE_ENABLED_MAP[Be]=Le},_setDisabled:(Be,Le)=>{DISABLED_MAP[Be]=Le}};function _getStableIDStorageKey(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}function _persistToStorage(Be,Le){const Ye=_getStableIDStorageKey(Le);try{(0,StorageProvider_1$3._setObjectInStorage)(Ye,Be)}catch{Log_1$7.Log.warn("Failed to save StableID to storage")}}function _loadFromStorage(Be){const Le=_getStableIDStorageKey(Be);return(0,StorageProvider_1$3._getObjectFromStorage)(Le)}function _loadFromCookie(Be){if(!COOKIE_ENABLED_MAP[Be]||(0,SafeJs_1$2._getDocumentSafe)()==null)return null;const Le=document.cookie.split(";");for(const Ye of Le){const[tt,nt]=Ye.trim().split("=");if(tt===getCookieName(Be))return decodeURIComponent(nt)}return null}function _persistToCookie(Be,Le){if(!COOKIE_ENABLED_MAP[Le]||(0,SafeJs_1$2._getDocumentSafe)()==null)return;const Ye=new Date;Ye.setFullYear(Ye.getFullYear()+1),document.cookie=`${getCookieName(Le)}=${encodeURIComponent(Be)}; expires=${Ye.toUTCString()}; path=/`}function getCookieName(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}StableID.getCookieName=getCookieName;var StatsigUser={};Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const Hashing_1$1=Hashing,Log_1$6=Log;function _normalizeUser(Be,Le,Ye){try{const tt=JSON.parse(JSON.stringify(Be));return Le!=null&&Le.environment!=null?tt.statsigEnvironment=Le.environment:Ye!=null&&(tt.statsigEnvironment={tier:Ye}),tt}catch{return Log_1$6.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}StatsigUser._normalizeUser=_normalizeUser;function _getFullUserHash(Be){return Be?(0,Hashing_1$1._DJB2Object)(Be):null}StatsigUser._getFullUserHash=_getFullUserHash;var TypedJsonParse={};Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const Log_1$5=Log;function _typedJsonParse(Be,Le,Ye){try{const tt=JSON.parse(Be);if(tt&&typeof tt=="object"&&Le in tt)return tt}catch{}return Log_1$5.Log.error(`Failed to parse ${Ye}`),null}TypedJsonParse._typedJsonParse=_typedJsonParse;var __awaiter$e=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DataAdapterCore$1,"__esModule",{value:!0}),DataAdapterCore$1._makeDataAdapterResult=DataAdapterCore$1.DataAdapterCore=void 0;const Log_1$4=Log,StableID_1$2=StableID,StatsigUser_1=StatsigUser,StorageProvider_1$2=StorageProvider,TypedJsonParse_1=TypedJsonParse,CACHE_LIMIT=10,MAX_CACHE_WRITE_ATTEMPTS=8;class DataAdapterCore{constructor(Le,Ye){this._adapterName=Le,this._cacheSuffix=Ye,this._options=null,this._sdkKey=null,this._cacheLimit=CACHE_LIMIT,this._lastModifiedStoreKey=`statsig.last_modified_time.${Ye}`,this._inMemoryCache=new InMemoryCache}attach(Le,Ye,tt){this._sdkKey=Le,this._options=Ye}getDataSync(Le){const Ye=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),tt=this._getCacheKey(Ye),nt=this._inMemoryCache.get(tt,Ye);if(nt&&this._getIsCacheValueValid(nt))return nt;const ft=this._loadFromCache(tt);return ft&&this._getIsCacheValueValid(ft)?(this._inMemoryCache.add(tt,ft,this._cacheLimit),this._inMemoryCache.get(tt,Ye)):null}setData(Le,Ye){const tt=Ye&&(0,StatsigUser_1._normalizeUser)(Ye,this._options),nt=this._getCacheKey(tt);this._inMemoryCache.add(nt,_makeDataAdapterResult("Bootstrap",Le,null,tt),this._cacheLimit)}_getIsCacheValueValid(Le){return Le.stableID==null||Le.stableID===StableID_1$2.StableID.get(this._getSdkKey())}_getDataAsyncImpl(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){StorageProvider_1$2.Storage.isReady()||(yield StorageProvider_1$2.Storage.isReadyResolver());const nt=Le??this.getDataSync(Ye),ft=[this._fetchAndPrepFromNetwork(nt,Ye,tt)];return tt!=null&&tt.timeoutMs&&ft.push(new Promise(ht=>setTimeout(ht,tt.timeoutMs)).then(()=>(Log_1$4.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(ft)})}_prefetchDataImpl(Le,Ye){return __awaiter$e(this,void 0,void 0,function*(){const tt=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),nt=this._getCacheKey(tt),ft=yield this._getDataAsyncImpl(null,tt,Ye);ft&&this._inMemoryCache.add(nt,Object.assign(Object.assign({},ft),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){var nt;const ft=(nt=Le==null?void 0:Le.data)!==null&&nt!==void 0?nt:null,ht=Le!=null&&this._isCachedResultValidFor204(Le,Ye),gt=yield this._fetchFromNetwork(ft,Ye,tt,ht);if(!gt)return Log_1$4.Log.debug("No response returned for latest value"),null;const At=(0,TypedJsonParse_1._typedJsonParse)(gt,"has_updates","Response"),xt=this._getSdkKey(),Et=StableID_1$2.StableID.get(xt);let yt=null;if((At==null?void 0:At.has_updates)===!0)yt=_makeDataAdapterResult("Network",gt,Et,Ye);else if(ft&&(At==null?void 0:At.has_updates)===!1)yt=_makeDataAdapterResult("NetworkNotModified",ft,Et,Ye);else return null;const Ct=this._getCacheKey(Ye);return this._inMemoryCache.add(Ct,yt,this._cacheLimit),this._writeToCache(Ct,yt),yt})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Log_1$4.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(Le){var Ye;const tt=(Ye=StorageProvider_1$2.Storage.getItem)===null||Ye===void 0?void 0:Ye.call(StorageProvider_1$2.Storage,Le);if(tt==null)return null;const nt=(0,TypedJsonParse_1._typedJsonParse)(tt,"source","Cached Result");return nt?Object.assign(Object.assign({},nt),{source:"Cache"}):null}_writeToCache(Le,Ye){const tt=JSON.stringify(Ye);for(let nt=0;nt<MAX_CACHE_WRITE_ATTEMPTS;nt++)try{StorageProvider_1$2.Storage.setItem(Le,tt);break}catch(ft){if(!(ft instanceof Error)||!(ft.toString().includes("QuotaExceededError")||ft.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw ft;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(Le,this._cacheLimit-1)}this._runLocalStorageCacheEviction(Le)}_runLocalStorageCacheEviction(Le,Ye=this._cacheLimit){var tt;const nt=(tt=(0,StorageProvider_1$2._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&tt!==void 0?tt:{};nt[Le]=Date.now();const ft=_getEvictableKeys(nt,Ye);for(const ht of ft)delete nt[ht],StorageProvider_1$2.Storage.removeItem(ht);(0,StorageProvider_1$2._setObjectInStorage)(this._lastModifiedStoreKey,nt)}}DataAdapterCore$1.DataAdapterCore=DataAdapterCore;function _makeDataAdapterResult(Be,Le,Ye,tt){return{source:Be,data:Le,receivedAt:Date.now(),stableID:Ye,fullUserHash:(0,StatsigUser_1._getFullUserHash)(tt)}}DataAdapterCore$1._makeDataAdapterResult=_makeDataAdapterResult;class InMemoryCache{constructor(){this._data={}}get(Le,Ye){var tt;const nt=this._data[Le],ft=nt==null?void 0:nt.stableID,ht=(tt=Ye==null?void 0:Ye.customIDs)===null||tt===void 0?void 0:tt.stableID;return ht&&ft&&ht!==ft?(Log_1$4.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):nt}add(Le,Ye,tt){const nt=_getEvictableKeys(this._data,tt-1);for(const ft of nt)delete this._data[ft];this._data[Le]=Ye}merge(Le){this._data=Object.assign(Object.assign({},this._data),Le)}}function _getEvictableKeys(Be,Le){const Ye=Object.keys(Be);return Ye.length<=Le?[]:Le===0?Ye:Ye.sort((tt,nt)=>{const ft=Be[tt],ht=Be[nt];return typeof ft=="object"&&typeof ht=="object"?ft.receivedAt-ht.receivedAt:ft-ht}).slice(0,Ye.length-Le)}var DownloadConfigSpecsResponse={};Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0});var ErrorBoundary={},SDKType={};Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const SDK_CLIENT={};let suffix;SDKType.SDKType={_get:Be=>{var Le;return((Le=SDK_CLIENT[Be])!==null&&Le!==void 0?Le:"js-mono")+(suffix??"")},_setClientType(Be,Le){SDK_CLIENT[Be]=Le},_setBindingType(Be){(!suffix||suffix==="-react")&&(suffix="-"+Be)}},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__awaiter||function(yt,Ct,kt,vt){function bt(It){return It instanceof kt?It:new kt(function(wt){wt(It)})}return new(kt||(kt=Promise))(function(It,wt){function Rt(Dt){try{Bt(vt.next(Dt))}catch(Lt){wt(Lt)}}function Tt(Dt){try{Bt(vt.throw(Dt))}catch(Lt){wt(Lt)}}function Bt(Dt){Dt.done?It(Dt.value):bt(Dt.value).then(Rt,Tt)}Bt((vt=vt.apply(yt,Ct||[])).next())})};Object.defineProperty(Be,"__esModule",{value:!0}),Be.ErrorBoundary=Be.EXCEPTION_ENDPOINT=void 0;const Ye=Log,tt=SDKType,nt=StatsigMetadata;Be.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const ft="[Statsig] UnknownError";class ht{constructor(Ct,kt,vt,bt){this._sdkKey=Ct,this._options=kt,this._emitter=vt,this._lastSeenError=bt,this._seen=new Set}wrap(Ct,kt){try{const vt=Ct;xt(vt).forEach(bt=>{const It=vt[bt];"$EB"in It||(vt[bt]=(...wt)=>this._capture(kt?`${kt}:${bt}`:bt,()=>It.apply(Ct,wt)),vt[bt].$EB=!0)})}catch(vt){this._onError("eb:wrap",vt)}}logError(Ct,kt){this._onError(Ct,kt)}getLastSeenErrorAndReset(){const Ct=this._lastSeenError;return this._lastSeenError=void 0,Ct??null}attachErrorIfNoneExists(Ct){this._lastSeenError||(this._lastSeenError=gt(Ct))}_capture(Ct,kt){try{const vt=kt();return vt&&vt instanceof Promise?vt.catch(bt=>this._onError(Ct,bt)):vt}catch(vt){return this._onError(Ct,vt),null}}_onError(Ct,kt){try{Ye.Log.warn(`Caught error in ${Ct}`,{error:kt}),Le(this,void 0,void 0,function*(){var bt,It,wt,Rt,Tt,Bt,Dt;const Lt=kt||Error(ft),Nt=Lt instanceof Error,Pt=Nt?Lt.name:"No Name",Wt=gt(Lt);if(this._lastSeenError=Wt,this._seen.has(Pt))return;if(this._seen.add(Pt),!((It=(bt=this._options)===null||bt===void 0?void 0:bt.networkConfig)===null||It===void 0)&&It.preventAllNetworkTraffic){(wt=this._emitter)===null||wt===void 0||wt.call(this,{name:"error",error:kt,tag:Ct});return}const $t=tt.SDKType._get(this._sdkKey),Kt=nt.StatsigMetadataProvider.get(),Vt=Nt?Lt.stack:At(Lt),Ut=Object.assign({tag:Ct,exception:Pt,info:Vt,statsigOptions:Et(this._options)},Object.assign(Object.assign({},Kt),{sdkType:$t}));yield((Bt=(Tt=(Rt=this._options)===null||Rt===void 0?void 0:Rt.networkConfig)===null||Tt===void 0?void 0:Tt.networkOverrideFunc)!==null&&Bt!==void 0?Bt:fetch)(Be.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String($t),"STATSIG-SDK-VERSION":String(Kt.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(Ut)}),(Dt=this._emitter)===null||Dt===void 0||Dt.call(this,{name:"error",error:kt,tag:Ct})}).then(()=>{}).catch(()=>{})}catch{}}}Be.ErrorBoundary=ht;function gt(yt){return yt instanceof Error?yt:typeof yt=="string"?new Error(yt):new Error("An unknown error occurred.")}function At(yt){try{return JSON.stringify(yt)}catch{return ft}}function xt(yt){const Ct=new Set;let kt=Object.getPrototypeOf(yt);for(;kt&&kt!==Object.prototype;)Object.getOwnPropertyNames(kt).filter(vt=>typeof(kt==null?void 0:kt[vt])=="function").forEach(vt=>Ct.add(vt)),kt=Object.getPrototypeOf(kt);return Array.from(Ct)}function Et(yt){if(!yt)return{};const Ct={};return Object.keys(yt).forEach(kt=>{const vt=kt,bt=yt[vt];switch(typeof bt){case"number":case"bigint":case"boolean":Ct[String(vt)]=bt;break;case"string":bt.length<50?Ct[String(vt)]=bt:Ct[String(vt)]="set";break;case"object":vt==="environment"?Ct.environment=bt:vt==="networkConfig"?Ct.networkConfig=bt:Ct[String(vt)]=bt!=null?"set":"unset";break}}),Ct}}(ErrorBoundary);var EvaluationOptions={};Object.defineProperty(EvaluationOptions,"__esModule",{value:!0});var EvaluationTypes={};Object.defineProperty(EvaluationTypes,"__esModule",{value:!0});var InitializeResponse={};Object.defineProperty(InitializeResponse,"__esModule",{value:!0});var MemoKey={};Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const EXIST_KEYS=new Set([]),DO_NOT_MEMO_KEYS=new Set(["userPersistedValues"]);function createMemoKey(Be,Le,Ye){let tt=`${Be}|${Le}`;if(!Ye)return tt;for(const nt of Object.keys(Ye)){if(DO_NOT_MEMO_KEYS.has(nt))return;EXIST_KEYS.has(nt)?tt+=`|${nt}=true`:tt+=`|${nt}=${Ye[nt]}`}return tt}MemoKey.createMemoKey=createMemoKey;var NetworkCore$1={},NetworkFallbackResolver$1={},DnsTxtQuery={},__awaiter$d=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const FEATURE_ASSETS_DNS_QUERY=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),DNS_QUERY_ENDPOINT="https://cloudflare-dns.com/dns-query",DOMAIN_CHARS=["i","e","d"],MAX_START_LOOKUP=200;function _fetchTxtRecords(Be){return __awaiter$d(this,void 0,void 0,function*(){const Le=yield Be(DNS_QUERY_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:FEATURE_ASSETS_DNS_QUERY});if(!Le.ok){const nt=new Error("Failed to fetch TXT records from DNS");throw nt.name="DnsTxtFetchError",nt}const Ye=yield Le.arrayBuffer(),tt=new Uint8Array(Ye);return _parseDnsResponse(tt)})}DnsTxtQuery._fetchTxtRecords=_fetchTxtRecords;function _parseDnsResponse(Be){const Le=Be.findIndex((tt,nt)=>nt<MAX_START_LOOKUP&&String.fromCharCode(tt)==="="&&DOMAIN_CHARS.includes(String.fromCharCode(Be[nt-1])));if(Le===-1){const tt=new Error("Failed to parse TXT records from DNS");throw tt.name="DnsTxtParseError",tt}let Ye="";for(let tt=Le-1;tt<Be.length;tt++)Ye+=String.fromCharCode(Be[tt]);return Ye.split(",")}var __awaiter$c=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkFallbackResolver$1,"__esModule",{value:!0}),NetworkFallbackResolver$1._isDomainFailure=NetworkFallbackResolver$1.NetworkFallbackResolver=void 0;const DnsTxtQuery_1=DnsTxtQuery,Hashing_1=Hashing,Log_1$3=Log,StorageProvider_1$1=StorageProvider,DEFAULT_TTL_MS=7*24*60*60*1e3,COOLDOWN_TIME_MS=4*60*60*1e3;class NetworkFallbackResolver{constructor(Le){var Ye;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(Ye=Le.networkConfig)===null||Ye===void 0?void 0:Ye.networkOverrideFunc}setErrorBoundary(Le){this._errorBoundary=Le}tryBumpExpiryTime(Le,Ye){var tt;const nt=(tt=this._fallbackInfo)===null||tt===void 0?void 0:tt[Ye.endpoint];nt&&(nt.expiryTime=Date.now()+DEFAULT_TTL_MS,_tryWriteFallbackInfoToCache(Le,Object.assign(Object.assign({},this._fallbackInfo),{[Ye.endpoint]:nt})))}getActiveFallbackUrl(Le,Ye){var tt,nt;if(Ye.customUrl!=null&&Ye.fallbackUrls!=null)return null;let ft=this._fallbackInfo;ft==null&&(ft=(tt=_readFallbackInfoFromCache(Le))!==null&&tt!==void 0?tt:{},this._fallbackInfo=ft);const ht=ft[Ye.endpoint];return!ht||Date.now()>((nt=ht.expiryTime)!==null&&nt!==void 0?nt:0)||Ye.getChecksum()!==ht.urlConfigChecksum?(delete ft[Ye.endpoint],this._fallbackInfo=ft,_tryWriteFallbackInfoToCache(Le,this._fallbackInfo),null):ht.url?ht.url:null}tryFetchUpdatedFallbackInfo(Le,Ye,tt,nt){return __awaiter$c(this,void 0,void 0,function*(){var ft,ht;try{if(!_isDomainFailure(tt,nt))return!1;const At=Ye.customUrl==null&&Ye.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(Ye):Ye.fallbackUrls,xt=this._pickNewFallbackUrl((ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[Ye.endpoint],At);return xt?(this._updateFallbackInfoWithNewUrl(Le,Ye,xt),!0):!1}catch(gt){return(ht=this._errorBoundary)===null||ht===void 0||ht.logError("tryFetchUpdatedFallbackInfo",gt),!1}})}_updateFallbackInfoWithNewUrl(Le,Ye,tt){var nt,ft,ht;const gt={urlConfigChecksum:Ye.getChecksum(),url:tt,expiryTime:Date.now()+DEFAULT_TTL_MS,previous:[]},At=Ye.endpoint,xt=(nt=this._fallbackInfo)===null||nt===void 0?void 0:nt[At];xt&>.previous.push(...xt.previous),gt.previous.length>10&&(gt.previous=[]);const Et=(ht=(ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[At])===null||ht===void 0?void 0:ht.url;Et!=null&>.previous.push(Et),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[At]:gt}),_tryWriteFallbackInfoToCache(Le,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(Le){return __awaiter$c(this,void 0,void 0,function*(){var Ye;const tt=this._dnsQueryCooldowns[Le.endpoint];if(tt&&Date.now()<tt)return null;this._dnsQueryCooldowns[Le.endpoint]=Date.now()+COOLDOWN_TIME_MS;const nt=[],ft=yield(0,DnsTxtQuery_1._fetchTxtRecords)((Ye=this._networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch),ht=_extractPathFromUrl(Le.defaultUrl);for(const gt of ft){if(!gt.startsWith(Le.endpointDnsKey+"="))continue;const At=gt.split("=");if(At.length>1){let xt=At[1];xt.endsWith("/")&&(xt=xt.slice(0,-1)),nt.push(`https://${xt}${ht}`)}}return nt})}_pickNewFallbackUrl(Le,Ye){var tt;if(Ye==null)return null;const nt=new Set((tt=Le==null?void 0:Le.previous)!==null&&tt!==void 0?tt:[]),ft=Le==null?void 0:Le.url;let ht=null;for(const gt of Ye){const At=gt.endsWith("/")?gt.slice(0,-1):gt;if(!nt.has(gt)&&At!==ft){ht=At;break}}return ht}}NetworkFallbackResolver$1.NetworkFallbackResolver=NetworkFallbackResolver;function _isDomainFailure(Be,Le){var Ye;const tt=(Ye=Be==null?void 0:Be.toLowerCase())!==null&&Ye!==void 0?Ye:"";return Le||tt.includes("uncaught exception")||tt.includes("failed to fetch")||tt.includes("networkerror when attempting to fetch resource")}NetworkFallbackResolver$1._isDomainFailure=_isDomainFailure;function _getFallbackInfoStorageKey(Be){return`statsig.network_fallback.${(0,Hashing_1._DJB2)(Be)}`}function _tryWriteFallbackInfoToCache(Be,Le){const Ye=_getFallbackInfoStorageKey(Be);if(!Le||Object.keys(Le).length===0){StorageProvider_1$1.Storage.removeItem(Ye);return}StorageProvider_1$1.Storage.setItem(Ye,JSON.stringify(Le))}function _readFallbackInfoFromCache(Be){const Le=_getFallbackInfoStorageKey(Be),Ye=StorageProvider_1$1.Storage.getItem(Le);if(!Ye)return null;try{return JSON.parse(Ye)}catch{return Log_1$3.Log.error("Failed to parse FallbackInfo"),null}}function _extractPathFromUrl(Be){try{return new URL(Be).pathname}catch{return null}}var SDKFlags={};Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const FLAGMAP={};SDKFlags.SDKFlags={setFlags:(Be,Le)=>{FLAGMAP[Be]=Le},get:(Be,Le)=>{var Ye,tt;return(tt=(Ye=FLAGMAP[Be])===null||Ye===void 0?void 0:Ye[Le])!==null&&tt!==void 0?tt:!1}};var SessionID={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigSession=Be.SessionID=void 0;const Le=$_StatsigGlobal,Ye=CacheKey,tt=Log,nt=StorageProvider,ft=UUID,ht=30*60*1e3,gt=4*60*60*1e3,At={};Be.SessionID={get:Rt=>Be.StatsigSession.get(Rt).data.sessionID},Be.StatsigSession={get:Rt=>{At[Rt]==null&&(At[Rt]=xt(Rt));const Tt=At[Rt];return yt(Tt)},overrideInitialSessionID:(Rt,Tt)=>{At[Tt]=Et(Rt,Tt)}};function xt(Rt){let Tt=wt(Rt);const Bt=Date.now();return Tt||(Tt={sessionID:(0,ft.getUUID)(),startTime:Bt,lastUpdate:Bt}),{data:Tt,sdkKey:Rt}}function Et(Rt,Tt){const Bt=Date.now();return{data:{sessionID:Rt,startTime:Bt,lastUpdate:Bt},sdkKey:Tt}}function yt(Rt){const Tt=Date.now(),Bt=Rt.data,Dt=Rt.sdkKey;if(kt(Bt)||vt(Bt)){Bt.sessionID=(0,ft.getUUID)(),Bt.startTime=Tt;const Nt=__STATSIG__==null?void 0:__STATSIG__.instance(Dt);Nt&&Nt.$emt({name:"session_expired"})}Bt.lastUpdate=Tt,It(Bt,Rt.sdkKey),clearTimeout(Rt.idleTimeoutID),clearTimeout(Rt.ageTimeoutID);const Lt=Tt-Bt.startTime;return Rt.idleTimeoutID=Ct(Dt,ht),Rt.ageTimeoutID=Ct(Dt,gt-Lt),Rt}function Ct(Rt,Tt){return setTimeout(()=>{var Bt;const Dt=(Bt=(0,Le._getStatsigGlobal)())===null||Bt===void 0?void 0:Bt.instance(Rt);Dt&&Dt.$emt({name:"session_expired"})},Tt)}function kt({lastUpdate:Rt}){return Date.now()-Rt>ht}function vt({startTime:Rt}){return Date.now()-Rt>gt}function bt(Rt){return`statsig.session_id.${(0,Ye._getStorageKey)(Rt)}`}function It(Rt,Tt){const Bt=bt(Tt);try{(0,nt._setObjectInStorage)(Bt,Rt)}catch{tt.Log.warn("Failed to save SessionID")}}function wt(Rt){const Tt=bt(Rt);return(0,nt._getObjectFromStorage)(Tt)}})(SessionID);var StatsigClientEventEmitter={};Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"};var __awaiter$b=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkCore$1,"__esModule",{value:!0}),NetworkCore$1.NetworkCore=void 0;const __StatsigGlobal_1$1=$_StatsigGlobal,Diagnostics_1=Diagnostics,Log_1$2=Log,NetworkConfig_1=NetworkConfig,NetworkFallbackResolver_1=NetworkFallbackResolver$1,SDKFlags_1=SDKFlags,SDKType_1=SDKType,SafeJs_1$1=SafeJs,SessionID_1$1=SessionID,StableID_1$1=StableID,StatsigClientEventEmitter_1=StatsigClientEventEmitter,StatsigMetadata_1=StatsigMetadata,StatsigOptionsCommon_1$1=StatsigOptionsCommon,VisibilityObserving_1=VisibilityObserving,DEFAULT_TIMEOUT_MS=1e4,BACKOFF_BASE_MS=500,BACKOFF_MAX_MS=3e4,RATE_LIMIT_WINDOW_MS=1e3,RATE_LIMIT_MAX_REQ_COUNT=50,LEAK_RATE=RATE_LIMIT_MAX_REQ_COUNT/RATE_LIMIT_WINDOW_MS,RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);class NetworkCore{constructor(Le,Ye){this._emitter=Ye,this._errorBoundary=null,this._timeout=DEFAULT_TIMEOUT_MS,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,Le&&(this._options=Le),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(Le))}setLogEventCompressionMode(Le){this._options.logEventCompressionMode=Le}setErrorBoundary(Le){this._errorBoundary=Le,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(Le)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const Le=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,Le}beacon(Le){if(!_ensureValidSdkKey(Le))return!1;const Ye=this._getInternalRequestArgs("POST",Le),tt=this._getPopulatedURL(Ye),nt=navigator;return nt.sendBeacon.bind(nt)(tt,Ye.body)}post(Le){return __awaiter$b(this,void 0,void 0,function*(){const Ye=this._getInternalRequestArgs("POST",Le);return this._tryEncodeBody(Ye),yield this._tryToCompressBody(Ye),this._sendRequest(Ye)})}get(Le){const Ye=this._getInternalRequestArgs("GET",Le);return this._sendRequest(Ye)}_sendRequest(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye,tt,nt,ft;if(!_ensureValidSdkKey(Le)||this._netConfig.preventAllNetworkTraffic)return null;const{method:ht,body:gt,retries:At,attempt:xt}=Le,Et=Le.urlConfig.endpoint;if(this._isRateLimited(Et))return Log_1$2.Log.warn(`Request to ${Et} was blocked because you are making requests too frequently.`),null;const yt=xt??1;let Ct=!1;const kt=this._getPopulatedURL(Le);let vt=null;const bt=(0,VisibilityObserving_1._isUnloading)();try{const It={method:ht,body:gt,headers:Object.assign({},Le.headers),priority:Le.priority,keepalive:bt};_tryMarkInitStart(Le,yt);const wt=this._leakyBucket[Et];wt&&(wt.lastRequestTime=Date.now(),this._leakyBucket[Et]=wt);const Rt=(Ye=this._netConfig.networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch;let Tt;if(vt=yield Promise.race([Rt(kt,It).finally(()=>clearTimeout(Tt)),new Promise((Dt,Lt)=>{Tt=setTimeout(()=>{Ct=!0,Lt(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!vt.ok){const Dt=yield vt.text().catch(()=>"No Text"),Lt=new Error(`NetworkError: ${kt} ${Dt}`);throw Lt.name="NetworkError",Lt}const Bt=yield vt.text();return _tryMarkInitEnd(Le,vt,yt,Bt),this._fallbackResolver.tryBumpExpiryTime(Le.sdkKey,Le.urlConfig),{body:Bt,code:vt.status}}catch(It){const wt=_getErrorMessage(It),Rt=_didTimeout(wt??"",Ct);if(_tryMarkInitEnd(Le,vt,yt,"",It),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(Le.sdkKey,Le.urlConfig,wt,Rt))&&(Le.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(Le.sdkKey,Le.urlConfig)),!At||yt>At||!RETRYABLE_CODES.has((tt=vt==null?void 0:vt.status)!==null&&tt!==void 0?tt:500)){(nt=this._emitter)===null||nt===void 0||nt.call(this,{name:"error",error:It,tag:StatsigClientEventEmitter_1.ErrorTag.NetworkError,requestArgs:Le});const Bt=`A networking error occurred during ${ht} request to ${kt}.`;return Log_1$2.Log.error(Bt,wt,It),(ft=this._errorBoundary)===null||ft===void 0||ft.attachErrorIfNoneExists(Bt),null}return yield _exponentialBackoff(yt),this._sendRequest(Object.assign(Object.assign({},Le),{retries:At,attempt:yt+1}))}})}_getLogEventCompressionMode(Le){let Ye=Le==null?void 0:Le.logEventCompressionMode;return!Ye&&(Le==null?void 0:Le.disableCompression)===!0&&(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled),Ye||(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled),Ye}_isRateLimited(Le){var Ye;const tt=Date.now(),nt=(Ye=this._leakyBucket[Le])!==null&&Ye!==void 0?Ye:{count:0,lastRequestTime:tt},ft=tt-nt.lastRequestTime,ht=Math.floor(ft*LEAK_RATE);return nt.count=Math.max(0,nt.count-ht),nt.count>=RATE_LIMIT_MAX_REQ_COUNT?!0:(nt.count+=1,nt.lastRequestTime=tt,this._leakyBucket[Le]=nt,!1)}_getPopulatedURL(Le){var Ye;const tt=(Ye=Le.fallbackUrl)!==null&&Ye!==void 0?Ye:Le.urlConfig.getUrl();(Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize||Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=tt);const nt=Object.assign({[NetworkConfig_1.NetworkParam.SdkKey]:Le.sdkKey,[NetworkConfig_1.NetworkParam.SdkType]:SDKType_1.SDKType._get(Le.sdkKey),[NetworkConfig_1.NetworkParam.SdkVersion]:StatsigMetadata_1.SDK_VERSION,[NetworkConfig_1.NetworkParam.Time]:String(Date.now()),[NetworkConfig_1.NetworkParam.SessionID]:SessionID_1$1.SessionID.get(Le.sdkKey)},Le.params),ft=Object.keys(nt).map(ht=>`${encodeURIComponent(ht)}=${encodeURIComponent(nt[ht])}`).join("&");return`${tt}${ft?`?${ft}`:""}`}_tryEncodeBody(Le){var Ye;const tt=(0,SafeJs_1$1._getWindowSafe)(),nt=Le.body;if(!(!Le.isStatsigEncodable||this._options.disableStatsigEncoding||typeof nt!="string"||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-encode")!=null||!(tt!=null&&tt.btoa)))try{Le.body=tt.btoa(nt).split("").reverse().join(""),Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.StatsigEncoded]:"1"})}catch(ft){Log_1$2.Log.warn(`Request encoding failed for ${Le.urlConfig.getUrl()}`,ft)}}_tryToCompressBody(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye;const tt=Le.body;if(!(typeof tt!="string"||!_allowCompression(Le,this._options)))try{const nt=new TextEncoder().encode(tt),ft=new CompressionStream("gzip"),ht=ft.writable.getWriter();ht.write(nt).catch(Log_1$2.Log.error),ht.close().catch(Log_1$2.Log.error);const gt=ft.readable.getReader(),At=[];let xt;for(;!(xt=yield gt.read()).done;)At.push(xt.value);const Et=At.reduce((kt,vt)=>kt+vt.length,0),yt=new Uint8Array(Et);let Ct=0;for(const kt of At)yt.set(kt,Ct),Ct+=kt.length;Le.body=yt,Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.IsGzipped]:"1"})}catch(nt){Log_1$2.Log.warn(`Request compression failed for ${Le.urlConfig.getUrl()}`,nt)}})}_getInternalRequestArgs(Le,Ye){const tt=this._fallbackResolver.getActiveFallbackUrl(Ye.sdkKey,Ye.urlConfig),nt=Object.assign(Object.assign({},Ye),{method:Le,fallbackUrl:tt});return"data"in Ye&&_populateRequestBody(nt,Ye.data),nt}}NetworkCore$1.NetworkCore=NetworkCore;const _ensureValidSdkKey=Be=>Be.sdkKey?!0:(Log_1$2.Log.warn("Unable to make request without an SDK key"),!1),_populateRequestBody=(Be,Le)=>{const{sdkKey:Ye,fallbackUrl:tt}=Be,nt=StableID_1$1.StableID.get(Ye),ft=SessionID_1$1.SessionID.get(Ye),ht=SDKType_1.SDKType._get(Ye);Be.body=JSON.stringify(Object.assign(Object.assign({},Le),{statsigMetadata:Object.assign(Object.assign({},StatsigMetadata_1.StatsigMetadataProvider.get()),{stableID:nt,sessionID:ft,sdkType:ht,fallbackUrl:tt})}))};function _allowCompression(Be,Le){if(!Be.isCompressable||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const Ye=Be.urlConfig.customUrl!=null||Be.urlConfig.fallbackUrls!=null,tt=SDKFlags_1.SDKFlags.get(Be.sdkKey,"enable_log_event_compression")===!0;switch(Le.logEventCompressionMode){case StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled:return!1;case StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled:return!(Ye&&!tt);case StatsigOptionsCommon_1$1.LogEventCompressionMode.Forced:return!0;default:return!1}}function _getErrorMessage(Be){return typeof Be=="string"?Be:Be instanceof Error?`${Be.name}: ${Be.message}`:"Unknown Error"}function _didTimeout(Be,Le){return Be.includes("Timeout")||Le}function _tryMarkInitStart(Be,Le){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqStart(Be.sdkKey,{attempt:Le})}function _tryMarkInitEnd(Be,Le,Ye,tt,nt){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqEnd(Be.sdkKey,Diagnostics_1.Diagnostics._getDiagnosticsData(Le,Ye,tt,nt))}function _exponentialBackoff(Be){return __awaiter$b(this,void 0,void 0,function*(){yield new Promise(Le=>setTimeout(Le,Math.min(BACKOFF_BASE_MS*(Be*Be),BACKOFF_MAX_MS)))})}var OverrideAdapter={};Object.defineProperty(OverrideAdapter,"__esModule",{value:!0});var ParamStoreTypes={};Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0});var SizeOf={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._fastApproxSizeOf=void 0;const Le=2,Ye=1,tt=(nt,ft)=>{let ht=0;const gt=Object.keys(nt);for(let At=0;At<gt.length;At++){const xt=gt[At],Et=nt[xt];if(ht+=xt.length,typeof Et=="object"&&Et!==null?ht+=(0,Be._fastApproxSizeOf)(Et,ft)+Le:ht+=String(Et).length+Ye,ht>=ft)return ht}return ht};Be._fastApproxSizeOf=tt})(SizeOf);var StatsigClientBase$1={},__awaiter$a=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClientBase$1,"__esModule",{value:!0}),StatsigClientBase$1.StatsigClientBase=void 0;const __StatsigGlobal_1=$_StatsigGlobal,ErrorBoundary_1=ErrorBoundary,EventLogger_1=EventLogger$1,Log_1$1=Log,MemoKey_1=MemoKey,SafeJs_1=SafeJs,SessionID_1=SessionID,StableID_1=StableID,StatsigOptionsCommon_1=StatsigOptionsCommon,StorageProvider_1=StorageProvider,MAX_MEMO_CACHE_SIZE=3e3;class StatsigClientBase{constructor(Le,Ye,tt,nt){var ft,ht,gt,At;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const xt=this.$emt.bind(this);(nt==null?void 0:nt.logLevel)!=null&&(Log_1$1.Log.level=nt.logLevel),nt!=null&&nt.disableStorage&&StorageProvider_1.Storage._setDisabled(!0),nt!=null&&nt.initialSessionID&&SessionID_1.StatsigSession.overrideInitialSessionID(nt.initialSessionID,Le),nt!=null&&nt.storageProvider&&StorageProvider_1.Storage._setProvider(nt.storageProvider),nt!=null&&nt.enableCookies&&StableID_1.StableID._setCookiesEnabled(Le,nt.enableCookies),nt!=null&&nt.disableStableID&&StableID_1.StableID._setDisabled(Le,!0),this._sdkKey=Le,this._options=nt??{},this._memoCache={},this.overrideAdapter=(ft=nt==null?void 0:nt.overrideAdapter)!==null&&ft!==void 0?ft:null,this._logger=new EventLogger_1.EventLogger(Le,xt,tt,nt),this._errorBoundary=new ErrorBoundary_1.ErrorBoundary(Le,nt,xt),this._errorBoundary.wrap(this),this._errorBoundary.wrap(Ye),this._errorBoundary.wrap(this._logger),tt.setErrorBoundary(this._errorBoundary),this.dataAdapter=Ye,this.dataAdapter.attach(Le,nt,tt),this.storageProvider=StorageProvider_1.Storage,(At=(gt=(ht=this.overrideAdapter)===null||ht===void 0?void 0:ht.loadFromStorage)===null||gt===void 0?void 0:gt.call(ht))===null||At===void 0||At.catch(Et=>this._errorBoundary.logError("OA::loadFromStorage",Et)),this._primeReadyRipcord(),_assignGlobalInstance(Le,this)}updateRuntimeOptions(Le){Le.loggingEnabled?(this._options.loggingEnabled=Le.loggingEnabled,this._logger.setLoggingEnabled(Le.loggingEnabled)):Le.disableLogging!=null&&(this._options.disableLogging=Le.disableLogging,this._logger.setLoggingEnabled(Le.disableLogging?"disabled":"browser-only")),Le.disableStorage!=null&&(this._options.disableStorage=Le.disableStorage,StorageProvider_1.Storage._setDisabled(Le.disableStorage)),Le.enableCookies!=null&&(this._options.enableCookies=Le.enableCookies,StableID_1.StableID._setCookiesEnabled(this._sdkKey,Le.enableCookies)),Le.logEventCompressionMode?this._logger.setLogEventCompressionMode(Le.logEventCompressionMode):Le.disableCompression&&this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return __awaiter$a(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(Le,Ye){this._listeners[Le]||(this._listeners[Le]=[]),this._listeners[Le].push(Ye)}off(Le,Ye){if(this._listeners[Le]){const tt=this._listeners[Le].indexOf(Ye);tt!==-1&&this._listeners[Le].splice(tt,1)}}$on(Le,Ye){Ye.__isInternal=!0,this.on(Le,Ye)}$emt(Le){var Ye;const tt=nt=>{try{nt(Le)}catch(ft){if(nt.__isInternal===!0){this._errorBoundary.logError(`__emit:${Le.name}`,ft);return}Log_1$1.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",Le)}};this._listeners[Le.name]&&this._listeners[Le.name].forEach(nt=>tt(nt)),(Ye=this._listeners["*"])===null||Ye===void 0||Ye.forEach(tt)}_setStatus(Le,Ye){this.loadingStatus=Le,this._memoCache={},this.$emt({name:"values_updated",status:Le,values:Ye})}_enqueueExposure(Le,Ye,tt){if((tt==null?void 0:tt.disableExposureLog)===!0){this._logger.incrementNonExposureCount(Le);return}this._logger.enqueue(Ye)}_memoize(Le,Ye){return(tt,nt)=>{if(this._options.disableEvaluationMemoization)return Ye(tt,nt);const ft=(0,MemoKey_1.createMemoKey)(Le,tt,nt);return ft?(ft in this._memoCache||(Object.keys(this._memoCache).length>=MAX_MEMO_CACHE_SIZE&&(this._memoCache={}),this._memoCache[ft]=Ye(tt,nt)),this._memoCache[ft]):Ye(tt,nt)}}}StatsigClientBase$1.StatsigClientBase=StatsigClientBase;function _assignGlobalInstance(Be,Le){var Ye;if((0,SafeJs_1._isServerEnv)())return;const tt=(0,__StatsigGlobal_1._getStatsigGlobal)(),nt=(Ye=tt.instances)!==null&&Ye!==void 0?Ye:{},ft=Le;nt[Be]!=null&&Log_1$1.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),nt[Be]=ft,tt.firstInstance||(tt.firstInstance=ft),tt.instances=nt,__STATSIG__=tt}var StatsigDataAdapter={};Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached";var StatsigPlugin={};Object.defineProperty(StatsigPlugin,"__esModule",{value:!0});var StatsigTypeFactories={};Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const Log_1=Log,TypingUtils_1=TypingUtils;function _makeEvaluation(Be,Le,Ye,tt){var nt;return{name:Be,details:Le,ruleID:(nt=Ye==null?void 0:Ye.rule_id)!==null&&nt!==void 0?nt:"",__evaluation:Ye,value:tt}}function _makeFeatureGate(Be,Le,Ye){var tt;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,(Ye==null?void 0:Ye.value)===!0)),{idType:(tt=Ye==null?void 0:Ye.id_type)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeFeatureGate=_makeFeatureGate;function _makeDynamicConfig(Be,Le,Ye){var tt,nt;const ft=(tt=Ye==null?void 0:Ye.value)!==null&&tt!==void 0?tt:{};return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,ft)),{idType:(nt=Ye==null?void 0:Ye.id_type)!==null&&nt!==void 0?nt:null,get:_makeTypedGet(Be,Ye==null?void 0:Ye.value)})}StatsigTypeFactories._makeDynamicConfig=_makeDynamicConfig;function _makeExperiment(Be,Le,Ye){var tt;const nt=_makeDynamicConfig(Be,Le,Ye);return Object.assign(Object.assign({},nt),{groupName:(tt=Ye==null?void 0:Ye.group_name)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeExperiment=_makeExperiment;function _makeLayer(Be,Le,Ye,tt){var nt,ft;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,void 0)),{get:_makeTypedGet(Be,Ye==null?void 0:Ye.value,tt),groupName:(nt=Ye==null?void 0:Ye.group_name)!==null&&nt!==void 0?nt:null,__value:(ft=Ye==null?void 0:Ye.value)!==null&&ft!==void 0?ft:{}})}StatsigTypeFactories._makeLayer=_makeLayer;function _mergeOverride(Be,Le,Ye,tt){return Object.assign(Object.assign(Object.assign({},Be),Le),{get:_makeTypedGet(Be.name,Ye,tt)})}StatsigTypeFactories._mergeOverride=_mergeOverride;function _makeTypedGet(Be,Le,Ye){return(tt,nt)=>{var ft;const ht=(ft=Le==null?void 0:Le[tt])!==null&&ft!==void 0?ft:null;return ht==null?nt??null:nt!=null&&!(0,TypingUtils_1._isTypeMatch)(ht,nt)?(Log_1.Log.warn(`Parameter type mismatch. '${Be}.${tt}' was found to be type '${typeof ht}' but fallback/return type is '${typeof nt}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),nt??null):(Ye==null||Ye(tt),ht)}}StatsigTypeFactories._makeTypedGet=_makeTypedGet;var StatsigTypes={};Object.defineProperty(StatsigTypes,"__esModule",{value:!0});var StatsigUpdateDetails={};Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;const createUpdateDetails=(Be,Le,Ye,tt,nt,ft)=>({duration:Ye,source:Le,success:Be,error:tt,sourceUrl:nt,warnings:ft});StatsigUpdateDetails.createUpdateDetails=createUpdateDetails,StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt);var kt=Object.getOwnPropertyDescriptor(Et,yt);(!kt||("get"in kt?!Et.__esModule:kt.writable||kt.configurable))&&(kt={enumerable:!0,get:function(){return Et[yt]}}),Object.defineProperty(xt,Ct,kt)}:function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt),xt[Ct]=Et[yt]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Et){for(var yt in xt)yt!=="default"&&!Object.prototype.hasOwnProperty.call(Et,yt)&&Le(Et,xt,yt)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.Storage=Be.Log=Be.EventLogger=Be.Diagnostics=void 0;const tt=$_StatsigGlobal,nt=Diagnostics;Object.defineProperty(Be,"Diagnostics",{enumerable:!0,get:function(){return nt.Diagnostics}});const ft=EventLogger$1;Object.defineProperty(Be,"EventLogger",{enumerable:!0,get:function(){return ft.EventLogger}});const ht=Log;Object.defineProperty(Be,"Log",{enumerable:!0,get:function(){return ht.Log}});const gt=StatsigMetadata,At=StorageProvider;Object.defineProperty(Be,"Storage",{enumerable:!0,get:function(){return At.Storage}}),Ye($_StatsigGlobal,Be),Ye(CacheKey,Be),Ye(ClientInterfaces,Be),Ye(DataAdapterCore$1,Be),Ye(Diagnostics,Be),Ye(DownloadConfigSpecsResponse,Be),Ye(ErrorBoundary,Be),Ye(EvaluationOptions,Be),Ye(EvaluationTypes,Be),Ye(Hashing,Be),Ye(InitializeResponse,Be),Ye(Log,Be),Ye(MemoKey,Be),Ye(NetworkConfig,Be),Ye(NetworkCore$1,Be),Ye(OverrideAdapter,Be),Ye(ParamStoreTypes,Be),Ye(SafeJs,Be),Ye(SDKType,Be),Ye(SessionID,Be),Ye(SizeOf,Be),Ye(StableID,Be),Ye(StatsigClientBase$1,Be),Ye(StatsigClientEventEmitter,Be),Ye(StatsigDataAdapter,Be),Ye(StatsigEvent,Be),Ye(StatsigMetadata,Be),Ye(StatsigOptionsCommon,Be),Ye(StatsigPlugin,Be),Ye(StatsigTypeFactories,Be),Ye(StatsigTypes,Be),Ye(StatsigUser,Be),Ye(StorageProvider,Be),Ye(TypedJsonParse,Be),Ye(TypingUtils,Be),Ye(UrlConfiguration$1,Be),Ye(UUID,Be),Ye(VisibilityObserving,Be),Ye(StatsigUpdateDetails,Be),Ye(SDKFlags,Be),Object.assign((0,tt._getStatsigGlobal)(),{Log:ht.Log,SDK_VERSION:gt.SDK_VERSION})}(src$1);var StatsigClient$1={},EvaluationStore$1={},V1InitializeContainer$1={};Object.defineProperty(V1InitializeContainer$1,"__esModule",{value:!0}),V1InitializeContainer$1.V1InitializeContainer=void 0;const client_core_1$7=src$1;class V1InitializeContainer{constructor(Le){this._values=Le}getGate(Le){return this._getResultFromLookup(this._values.feature_gates,Le)}getConfig(Le){return this._getResultFromLookup(this._values.dynamic_configs,Le)}getLayer(Le){return this._getResultFromLookup(this._values.layer_configs,Le)}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$7._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V1InitializeContainer$1.V1InitializeContainer=V1InitializeContainer;var V2InitializeContainer$1={};Object.defineProperty(V2InitializeContainer$1,"__esModule",{value:!0}),V2InitializeContainer$1.V2InitializeContainer=void 0;const client_core_1$6=src$1;class V2InitializeContainer{constructor(Le){this._values=Le}getGate(Le){var Ye,tt,nt;const ft=this._getResultFromLookup(this._values.feature_gates,Le);return ft?{name:Le,value:ft.v===!0,rule_id:(Ye=ft.r)!==null&&Ye!==void 0?Ye:"default",secondary_exposures:(tt=ft.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ft.i)!==null&&nt!==void 0?nt:""}:null}getConfig(Le){var Ye,tt,nt,ft;const ht=this._getResultFromLookup(this._values.dynamic_configs,Le);return ht?{name:Le,value:(Ye=this._values.values[ht.v])!==null&&Ye!==void 0?Ye:{},rule_id:ht.r,secondary_exposures:(tt=ht.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ht.i)!==null&&nt!==void 0?nt:"",is_user_in_experiment:ht.ue===!0,passed:ht.p===!0,group_name:(ft=ht.gn)!==null&&ft!==void 0?ft:void 0,is_experiment_active:ht.ea===!0,group:ht.r,is_device_based:ht.i==="stableID"}:null}getLayer(Le){var Ye,tt,nt,ft,ht,gt;const At=this._getResultFromLookup(this._values.layer_configs,Le);return At?{name:Le,value:(Ye=this._values.values[At.v])!==null&&Ye!==void 0?Ye:{},rule_id:At.r,secondary_exposures:(tt=At.s)!==null&&tt!==void 0?tt:[],is_user_in_experiment:At.ue===!0,group_name:(nt=At.gn)!==null&&nt!==void 0?nt:void 0,is_experiment_active:At.ea===!0,group:At.r,is_device_based:At.i==="stableID",allocated_experiment_name:(ft=At.ae)!==null&&ft!==void 0?ft:"",explicit_parameters:(ht=At.ep)!==null&&ht!==void 0?ht:[],undelegated_secondary_exposures:(gt=At.us)!==null&>!==void 0?gt:[],parameter_rule_ids:At.pr}:null}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$6._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V2InitializeContainer$1.V2InitializeContainer=V2InitializeContainer,Object.defineProperty(EvaluationStore$1,"__esModule",{value:!0});const client_core_1$5=src$1,V1InitializeContainer_1=V1InitializeContainer$1,V2InitializeContainer_1=V2InitializeContainer$1;class EvaluationStore{constructor(Le){this._sdkKey=Le,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,client_core_1$5._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(Le,Ye){var tt,nt;if(!Le)return!1;const ft=(0,client_core_1$5._typedJsonParse)(Le.data,"has_updates","EvaluationResponse");return ft==null?!1:(this._source=Le.source,(ft==null?void 0:ft.has_updates)!==!0||((tt=ft.time)!==null&&tt!==void 0?tt:0)<this._lcut||(this._rawValues=Le.data,this._lcut=ft.time,this._receivedAt=Le.receivedAt,ft.response_format==="init-v2"?this._values=new V2InitializeContainer_1.V2InitializeContainer(ft):this._values=new V1InitializeContainer_1.V1InitializeContainer(ft),this._bootstrapMetadata=this._extractBootstrapMetadata(Le.source,ft),Le.source&&ft.user&&this._setWarningState(Ye,ft),client_core_1$5.SDKFlags.setFlags(this._sdkKey,(nt=ft.sdk_flags)!==null&&nt!==void 0?nt:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(Le){const Ye=this._values?this._values.getGate(Le):null;return this._getDetailedStoreResult(Ye)}getConfig(Le){const Ye=this._values?this._values.getConfig(Le):null;return this._getDetailedStoreResult(Ye)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(Le){const Ye=this._values?this._values.getLayer(Le):null;return this._getDetailedStoreResult(Ye)}getParamStore(Le){const Ye=this._values?this._values.getParamStore(Le):null;return this._getDetailedStoreResult(Ye)}getSource(){return this._source}getExposureMapping(){var Le;return(Le=this._values)===null||Le===void 0?void 0:Le.getExposureMapping()}_extractBootstrapMetadata(Le,Ye){if(Le!=="Bootstrap")return null;const tt={};return Ye.user&&(tt.user=Ye.user),Ye.sdkInfo&&(tt.generatorSDKInfo=Ye.sdkInfo),tt.lcut=Ye.time,tt}_getDetailedStoreResult(Le){return{result:Le,details:this._getDetails(Le==null)}}_setWarningState(Le,Ye){var tt,nt;const ft=client_core_1$5.StableID.get(this._sdkKey);if(((tt=Le.customIDs)===null||tt===void 0?void 0:tt.stableID)!==ft&&(!((nt=Le.customIDs)===null||nt===void 0)&&nt.stableID||ft)){this._warnings.add("StableIDMismatch");return}if("user"in Ye){const ht=Ye.user,gt=Object.assign(Object.assign({},Le),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,client_core_1$5._getFullUserHash)(gt)!==(0,client_core_1$5._getFullUserHash)(ht)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const Le={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(Le.warnings=Array.from(this._warnings)),Le}_getDetails(Le){var Ye,tt;const nt=this.getCurrentSourceDetails();let ft=nt.reason;const ht=(Ye=nt.warnings)!==null&&Ye!==void 0?Ye:[];this._source==="Bootstrap"&&ht.length>0&&(ft=ft+ht[0]),ft!=="Uninitialized"&&ft!=="NoValues"&&(ft=`${ft}:${Le?"Unrecognized":"Recognized"}`);const gt=this._source==="Bootstrap"&&(tt=this._bootstrapMetadata)!==null&&tt!==void 0?tt:void 0;return gt&&(nt.bootstrapMetadata=gt),Object.assign(Object.assign({},nt),{reason:ft})}}EvaluationStore$1.default=EvaluationStore;var Network={},EvaluationResponseDeltas={};Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const client_core_1$4=src$1,MAX_DELTAS_SORT_DEPTH=2;function _resolveDeltasResponse(Be,Le){const Ye=(0,client_core_1$4._typedJsonParse)(Le,"checksum","DeltasEvaluationResponse");if(!Ye)return{hadBadDeltaChecksum:!0};const tt=_mergeDeltasIntoCache(Be,Ye),nt=_handleDeletedEntries(tt),ft=(0,client_core_1$4._DJB2Object)({feature_gates:nt.feature_gates,dynamic_configs:nt.dynamic_configs,layer_configs:nt.layer_configs},MAX_DELTAS_SORT_DEPTH);return ft===Ye.checksumV2?JSON.stringify(nt):{hadBadDeltaChecksum:!0,badChecksum:ft,badMergedConfigs:nt,badFullResponse:Ye.deltas_full_response}}EvaluationResponseDeltas._resolveDeltasResponse=_resolveDeltasResponse;function _mergeDeltasIntoCache(Be,Le){return Object.assign(Object.assign(Object.assign({},Be),Le),{feature_gates:Object.assign(Object.assign({},Be.feature_gates),Le.feature_gates),layer_configs:Object.assign(Object.assign({},Be.layer_configs),Le.layer_configs),dynamic_configs:Object.assign(Object.assign({},Be.dynamic_configs),Le.dynamic_configs)})}function _handleDeletedEntries(Be){const Le=Be;return _deleteEntriesInRecord(Be.deleted_gates,Le.feature_gates),delete Le.deleted_gates,_deleteEntriesInRecord(Be.deleted_configs,Le.dynamic_configs),delete Le.deleted_configs,_deleteEntriesInRecord(Be.deleted_layers,Le.layer_configs),delete Le.deleted_layers,Le}function _deleteEntriesInRecord(Be,Le){Be==null||Be.forEach(Ye=>{delete Le[Ye]})}var __awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const client_core_1$3=src$1,EvaluationResponseDeltas_1=EvaluationResponseDeltas;class StatsigNetwork extends client_core_1$3.NetworkCore{constructor(Le,Ye){super(Le,Ye);const tt=Le==null?void 0:Le.networkConfig;this._option=Le,this._initializeUrlConfig=new client_core_1$3.UrlConfiguration(client_core_1$3.Endpoint._initialize,tt==null?void 0:tt.initializeUrl,tt==null?void 0:tt.api,tt==null?void 0:tt.initializeFallbackUrls)}fetchEvaluations(Le,Ye,tt,nt,ft){return __awaiter$9(this,void 0,void 0,function*(){var ht,gt,At,xt,Et,yt;const Ct=Ye?(0,client_core_1$3._typedJsonParse)(Ye,"has_updates","InitializeResponse"):null;let kt={user:nt,hash:(At=(gt=(ht=this._option)===null||ht===void 0?void 0:ht.networkConfig)===null||gt===void 0?void 0:gt.initializeHashAlgorithm)!==null&&At!==void 0?At:"djb2",deltasResponseRequested:!1,full_checksum:null};if(Ct!=null&&Ct.has_updates){const vt=(Ct==null?void 0:Ct.hash_used)!==((yt=(Et=(xt=this._option)===null||xt===void 0?void 0:xt.networkConfig)===null||Et===void 0?void 0:Et.initializeHashAlgorithm)!==null&&yt!==void 0?yt:"djb2");kt=Object.assign(Object.assign({},kt),{sinceTime:ft&&!vt?Ct.time:0,previousDerivedFields:"derived_fields"in Ct&&ft?Ct.derived_fields:{},deltasResponseRequested:!0,full_checksum:Ct.full_checksum,partialUserMatchSinceTime:vt?0:Ct.time})}return this._fetchEvaluations(Le,Ct,kt,tt)})}_fetchEvaluations(Le,Ye,tt,nt){return __awaiter$9(this,void 0,void 0,function*(){var ft,ht;const gt=yield this.post({sdkKey:Le,urlConfig:this._initializeUrlConfig,data:tt,retries:2,isStatsigEncodable:!0,priority:nt});if((gt==null?void 0:gt.code)===204)return'{"has_updates": false}';if((gt==null?void 0:gt.code)!==200)return(ft=gt==null?void 0:gt.body)!==null&&ft!==void 0?ft:null;if((Ye==null?void 0:Ye.has_updates)!==!0||((ht=gt.body)===null||ht===void 0?void 0:ht.includes('"is_delta":true'))!==!0||tt.deltasResponseRequested!==!0)return gt.body;const At=(0,EvaluationResponseDeltas_1._resolveDeltasResponse)(Ye,gt.body);return typeof At=="string"?At:this._fetchEvaluations(Le,Ye,Object.assign(Object.assign(Object.assign({},tt),At),{deltasResponseRequested:!1}),nt)})}}Network.default=StatsigNetwork;var ParamStoreGetterFactory={};Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const client_core_1$2=src$1,NO_EXPOSURE_OPT={disableExposureLog:!0};function _shouldLogExposure(Be){return Be==null||Be.disableExposureLog===!1}function _shouldReturnFallback(Be,Le){return Le!=null&&!(0,client_core_1$2._isTypeMatch)(Be,Le)}function _getMappedStaticValue(Be,Le){return Be.value}function _getMappedGateValue(Be,Le,Ye){return Be.getFeatureGate(Le.gate_name,_shouldLogExposure(Ye)?void 0:NO_EXPOSURE_OPT).value?Le.pass_value:Le.fail_value}function _getMappedDynamicConfigValue(Be,Le,Ye,tt){const ft=Be.getDynamicConfig(Le.config_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedExperimentValue(Be,Le,Ye,tt){const ft=Be.getExperiment(Le.experiment_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedLayerValue(Be,Le,Ye,tt){const ft=Be.getLayer(Le.layer_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _makeParamStoreGetter(Be,Le,Ye){return(tt,nt)=>{if(Le==null)return nt;const ft=Le[tt];if(ft==null||nt!=null&&(0,client_core_1$2._typeOf)(nt)!==ft.param_type)return nt;switch(ft.ref_type){case"static":return _getMappedStaticValue(ft);case"gate":return _getMappedGateValue(Be,ft,Ye);case"dynamic_config":return _getMappedDynamicConfigValue(Be,ft,nt,Ye);case"experiment":return _getMappedExperimentValue(Be,ft,nt,Ye);case"layer":return _getMappedLayerValue(Be,ft,nt,Ye);default:return nt}}}ParamStoreGetterFactory._makeParamStoreGetter=_makeParamStoreGetter;var StatsigEvaluationsDataAdapter$1={},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter$1,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=void 0;const client_core_1$1=src$1,Network_1$1=Network;class StatsigEvaluationsDataAdapter extends client_core_1$1.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(Le,Ye,tt){super.attach(Le,Ye,tt),tt!==null&&tt instanceof Network_1$1.default?this._network=tt:this._network=new Network_1$1.default(Ye??{})}getDataAsync(Le,Ye,tt){return this._getDataAsyncImpl(Le,(0,client_core_1$1._normalizeUser)(Ye,this._options),tt)}prefetchData(Le,Ye){return this._prefetchDataImpl(Le,Ye)}setData(Le){const Ye=(0,client_core_1$1._typedJsonParse)(Le,"has_updates","data");Ye&&"user"in Ye?super.setData(Le,Ye.user):client_core_1$1.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(Le,Ye){super.setData(Le,Ye)}_fetchFromNetwork(Le,Ye,tt,nt){return __awaiter$8(this,void 0,void 0,function*(){var ft;const ht=yield(ft=this._network)===null||ft===void 0?void 0:ft.fetchEvaluations(this._getSdkKey(),Le,tt==null?void 0:tt.priority,Ye,nt);return ht??null})}_getCacheKey(Le){var Ye;const tt=(0,client_core_1$1._getStorageKey)(this._getSdkKey(),Le,(Ye=this._options)===null||Ye===void 0?void 0:Ye.customUserCacheKeyFunc);return`${client_core_1$1.DataAdapterCachePrefix}.${this._cacheSuffix}.${tt}`}_isCachedResultValidFor204(Le,Ye){return Le.fullUserHash!=null&&Le.fullUserHash===(0,client_core_1$1._getFullUserHash)(Ye)}}StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=StatsigEvaluationsDataAdapter;var __awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClient$1,"__esModule",{value:!0});const client_core_1=src$1,EvaluationStore_1=EvaluationStore$1,Network_1=Network,ParamStoreGetterFactory_1=ParamStoreGetterFactory,StatsigEvaluationsDataAdapter_1=StatsigEvaluationsDataAdapter$1;class StatsigClient extends client_core_1.StatsigClientBase{static instance(Le){const Ye=(0,client_core_1._getStatsigGlobal)().instance(Le);return Ye instanceof StatsigClient?Ye:(client_core_1.Log.warn((0,client_core_1._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new StatsigClient(Le??"",{}))}constructor(Le,Ye,tt=null){var nt,ft;client_core_1.SDKType._setClientType(Le,"javascript-client");const ht=new Network_1.default(tt,At=>{this.$emt(At)});super(Le,(nt=tt==null?void 0:tt.dataAdapter)!==null&&nt!==void 0?nt:new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter,ht,tt),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(client_core_1.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(client_core_1.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(client_core_1.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(client_core_1.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(client_core_1.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(client_core_1.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new EvaluationStore_1.default(Le),this._network=ht,this._user=this._configureUser(Ye,tt),this._sdkInstanceID=(0,client_core_1.getUUID)();const gt=(ft=tt==null?void 0:tt.plugins)!==null&&ft!==void 0?ft:[];for(const At of gt)At.bind(this)}initializeSync(Le){var Ye;return this.loadingStatus!=="Uninitialized"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(Ye=this._store.getWarnings())!==null&&Ye!==void 0?Ye:[]]):(this._logger.start(),this.updateUserSync(this._user,Le))}initializeAsync(Le){return __awaiter$7(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(Le),this._initializePromise)})}updateUserSync(Le,Ye){const tt=performance.now();try{return this._updateUserSyncImpl(Le,Ye,tt)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}}_updateUserSyncImpl(Le,Ye,tt){var nt;const ft=[...(nt=this._store.getWarnings())!==null&&nt!==void 0?nt:[]];this._resetForUser(Le);const ht=this.dataAdapter.getDataSync(this._user);ht==null&&ft.push("NoCachedValues"),this._store.setValues(ht,this._user),this._finalizeUpdate(ht);const gt=Ye==null?void 0:Ye.disableBackgroundCacheRefresh;return gt===!0||gt==null&&(ht==null?void 0:ht.source)==="Bootstrap"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft):(this._runPostUpdate(ht??null,this._user),(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft))}updateUserAsync(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){const tt=performance.now();try{return yield this._updateUserAsyncImpl(Le,Ye)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}})}_updateUserAsyncImpl(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){this._resetForUser(Le);const tt=this._user;client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);let nt=this.dataAdapter.getDataSync(tt);if(this._store.setValues(nt,this._user),this._setStatus("Loading",nt),nt=yield this.dataAdapter.getDataAsync(nt,tt,Ye),tt!==this._user)return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let ft=!1;nt!=null&&(client_core_1.Diagnostics._markInitProcessStart(this._sdkKey),ft=this._store.setValues(nt,this._user),client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey,{success:ft})),this._finalizeUpdate(nt),ft||(this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey,ft,this._store.getCurrentSourceDetails());const ht=client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,client_core_1.createUpdateDetails)(ft,this._store.getSource(),ht,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:client_core_1.StatsigSession.get(this._sdkKey),stableID:client_core_1.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(Le,Ye){return this.getFeatureGate(Le,Ye).value}logEvent(Le,Ye,tt){const nt=typeof Le=="string"?{eventName:Le,value:Ye,metadata:tt}:Le;this.$emt({name:"log_event_called",event:nt}),this._logger.enqueue(Object.assign(Object.assign({},nt),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(Le){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:Le}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(Le){return __awaiter$7(this,void 0,void 0,function*(){return client_core_1.Storage.isReady()||(yield client_core_1.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,Le)})}_createErrorUpdateDetails(Le,Ye){var tt;return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),performance.now()-Ye,Le,null,[...(tt=this._store.getWarnings())!==null&&tt!==void 0?tt:[]])}_finalizeUpdate(Le){this._store.finalize(),this._setStatus("Ready",Le)}_runPostUpdate(Le,Ye){this.dataAdapter.getDataAsync(Le,Ye,{priority:"low"}).catch(tt=>{client_core_1.Log.error("An error occurred after update.",tt)})}_resetForUser(Le){this._logger.reset(),this._store.reset(),this._user=this._configureUser(Le,this._options)}_configureUser(Le,Ye){var tt,nt,ft;const ht=(0,client_core_1._normalizeUser)(Le,Ye),gt=(tt=ht.customIDs)===null||tt===void 0?void 0:tt.stableID;if(gt){const At=(ft=(nt=this.storageProvider).isReadyResolver)===null||ft===void 0?void 0:ft.call(nt);At?At.then(()=>client_core_1.StableID.setOverride(gt,this._sdkKey),()=>client_core_1.StableID.setOverride(gt,this._sdkKey)):client_core_1.StableID.setOverride(gt,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(ht.analyticsOnlyMetadata=Object.assign(Object.assign({},ht.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),ht}_getFeatureGateImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getGate(Le),gt=(0,client_core_1._makeFeatureGate)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getGateOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createGateExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"gate_evaluation",gate:xt}),xt}_getDynamicConfigImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getConfig(Le),gt=(0,client_core_1._makeDynamicConfig)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getDynamicConfigOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:xt}),xt}_getExperimentImpl(Le,Ye){var tt,nt,ft,ht;const{result:gt,details:At}=this._store.getConfig(Le),xt=(0,client_core_1._makeExperiment)(Le,At,gt);xt.__evaluation!=null&&(xt.__evaluation.secondary_exposures=(0,client_core_1._mapExposures)((nt=(tt=xt.__evaluation)===null||tt===void 0?void 0:tt.secondary_exposures)!==null&&nt!==void 0?nt:[],this._store.getExposureMapping()));const Et=(ht=(ft=this.overrideAdapter)===null||ft===void 0?void 0:ft.getExperimentOverride)===null||ht===void 0?void 0:ht.call(ft,xt,this._user,Ye),yt=Et??xt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,yt,this._store.getExposureMapping()),Ye),this.$emt({name:"experiment_evaluation",experiment:yt}),yt}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(Le,Ye){var tt,nt,ft;const{result:ht,details:gt}=this._store.getLayer(Le),At=(0,client_core_1._makeLayer)(Le,gt,ht),xt=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getLayerOverride)===null||nt===void 0?void 0:nt.call(tt,At,this._user,Ye);Ye!=null&&Ye.disableExposureLog&&this._logger.incrementNonExposureCount(Le);const Et=(0,client_core_1._mergeOverride)(At,xt,(ft=xt==null?void 0:xt.__value)!==null&&ft!==void 0?ft:At.__value,yt=>{Ye!=null&&Ye.disableExposureLog||this._enqueueExposure(Le,(0,client_core_1._createLayerParameterExposure)(this._user,Et,yt,this._store.getExposureMapping()),Ye)});return this.$emt({name:"layer_evaluation",layer:Et}),Et}_getParameterStoreImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getParamStore(Le);this._logger.incrementNonExposureCount(Le);const gt={name:Le,details:ht,__configuration:ft,get:(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,ft,Ye)},At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getParamStoreOverride)===null||nt===void 0?void 0:nt.call(tt,gt,Ye);return At!=null&&(gt.__configuration=At.config,gt.details=At.details,gt.get=(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,At.config,Ye)),gt}}StatsigClient$1.default=StatsigClient,function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,gt,At,xt){xt===void 0&&(xt=At);var Et=Object.getOwnPropertyDescriptor(gt,At);(!Et||("get"in Et?!gt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return gt[At]}}),Object.defineProperty(ht,xt,Et)}:function(ht,gt,At,xt){xt===void 0&&(xt=At),ht[xt]=gt[At]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,gt){for(var At in ht)At!=="default"&&!Object.prototype.hasOwnProperty.call(gt,At)&&Le(gt,ht,At)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigClient=void 0;const tt=src$1,nt=StatsigClient$1;Be.StatsigClient=nt.default,Ye(src$1,Be);const ft=Object.assign((0,tt._getStatsigGlobal)(),{StatsigClient:nt.default});Be.default=ft}(src$2);const FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","new_id_capture_ux_least_risky_clients","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id","face_occlusion"],GLOBAL_FLAGS=["new_fingerprint"],ID_MODULE_FLAGS=["id_face_readability","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web","face_occlusion"];function getStatsigEnvironment(Be){return isStageK8sEnv(Be)?{tier:"development"}:isStageEnv(Be)||isDemoEnv(Be)?{tier:"staging"}:isSaasEnv(Be)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,new_id_capture_ux_least_risky_clients:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1,face_occlusion:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(initPromise)return initPromise;initPromise=(async()=>{var gt;const ft={customIDs:{client_api_key:Le,hashed_onboarding_id:Ye,flow_id:Be},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise},getFeatureFlag=Be=>featureFlagsValues[Be]??!1,getModuleFeatureFlags=async Be=>{const Le={};GLOBAL_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]});const Ye=Be.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}),Le};function IdCaptureParamsConfigurator(Be,Le,Ye,tt){Object.assign(Be,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:tt?3e3:2e3,minFaceIdQualityScore:.62})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:getFeatureFlag("face_occlusion"),faceOcclusionThreshold:.3}}const getProfiles=()=>[new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new PipelineProfile(WasmPipelineType.IdBarcodeAndTextQualityPipeline,PipelineProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new PipelineProfile(WasmPipelineType.IdVideoSelfiePipeline,PipelineProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new PipelineProfile(WasmPipelineType.SelfieWithQualityMetrics,PipelineProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile")];function getProfile(Be){const Le=getProfiles().find(Ye=>Ye.name===Be);if(!Le)throw new Error(`Profile not found for type: ${Be}`);return Le}const wasmVersion="v2.12.40";function generateBundle(){const Be=getFeatureFlag("id_text_barcode_readability")?PipelineProfileName.IdCapture_3_02:getFeatureFlag("id_model_hebrew_back_id")?PipelineProfileName.IdCapture_2_02:PipelineProfileName.IdCapture_2_01,Le=PipelineProfileName.SelfieWithQualityMetrics,Ye=PipelineProfileName.SelfieVideoSelfie,tt=PipelineProfileName.IdVideoSelfie_2_01;return[Be,tt,Le,Ye]}function getInitializationParams(){const Le=generateBundle(),Ye="https://d3vv997wtl2myz.cloudfront.net/webcamera/onnx-backend-wasm",tt=`${Ye}/${wasmVersion}/webLib.wasm`,nt=`${Ye}/${wasmVersion}/webLibSimd.wasm`,ft=`${Ye}/${wasmVersion}/webLib.js`,ht=`${Ye}/${wasmVersion}/versions.json`;let gt=new Map,At=new Map;for(const xt of Le){const Et=getProfile(xt);if(!Et)throw new Error(`Profile not found: ${xt}`);const yt=Et.modelNames;let Ct=[];for(const kt of yt)Ct.push(`${Ye}/${wasmVersion}/models/${kt}`);gt.set(Et.pipelineType,Ct),At.set(Et.detectionType,Et)}return{wasmModulePath:tt,wasmSimdModulePath:nt,glueCodePath:ft,versionsFilePath:ht,pipelineModels:gt,enableSIMD:!0,profiles:At,wasmVersion}}window.wasmArrayBuffer=null;class MlWasmJSApi{constructor(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.wasmModule=null,this.pipelineApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceDetectionWasmApi=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallMutex=new Mutex,this.Module=null,this.loadModule=async Le=>{this.Module=(await import(Le)).Module}}async initialize(Le,Ye,tt,nt,ft,ht){await this.freeResources(),this.pipelines_=ht,this.versionsFile=ft,await this.loadModule(tt);const gt=await this.loadWasm(nt,Le,Ye);return this.pipelineApiUtilities=new this.wasmModule.PipelineApiUtilities,this.utilityApi=new this.wasmModule.UtilityApi,this.idCaptureWasmApi=new this.wasmModule.IdCaptureApi,this.faceDetectionWasmApi=new this.wasmModule.FaceDetectionApi,this.isInitialized_=!0,gt}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}isInitialized(){return this.pipelineApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceDetectionWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Le,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Le&&Ye&&Le==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Le*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Le,this.imageHeight_=Ye,this.inputImageBuffer=this.pipelineApiUtilities.allocateInputImageBuffer(Le,Ye,4))}async handleDetectionCallAndUpdateState(Le){this.checkWasmInitialization("Unable to update pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(Le))}encryptImage(Le){return this.checkWasmInitialization("Unable to encrypt the image, cpp API hasn't been initialized"),this.utilityApi.encryptImage(Le)}isVirtualCamera(Le){if(this.checkWasmInitialization("Unable to check if the camera is virtual, cpp API hasn't been initialized"),Le)return this.utilityApi.isVirtualCamera(Le)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Le){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Le.width,Le.height),this.inputImageBuffer.set(Le.data),this.utilityApi.analyzeFrame()}async freeResources(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,window.wasmArrayBuffer=null,this.pipelineApiUtilities&&typeof this.pipelineApiUtilities.delete=="function"&&(this.pipelineApiUtilities.delete(),this.pipelineApiUtilities=null),this.utilityApi&&typeof this.utilityApi.delete=="function"&&(this.utilityApi.delete(),this.utilityApi=null),this.idCaptureWasmApi&&typeof this.idCaptureWasmApi.delete=="function"&&(this.idCaptureWasmApi.delete(),this.idCaptureWasmApi=null),this.faceDetectionWasmApi&&typeof this.faceDetectionWasmApi.delete=="function"&&(this.faceDetectionWasmApi.delete(),this.faceDetectionWasmApi=null),this.wasmModule=null,this.isInitialized_=!1}resetPipeline(Le){this.checkWasmInitialization("Unable to reset pipeline, cpp API hasn't been initialized"),this.pipelineApiUtilities.resetPipeline(this.pipelineTypeToWasmEnum(Le))}resetAllPipelines(){this.checkWasmInitialization("Unable to reset pipelines, cpp API hasn't been initialized");for(const[Le,Ye]of this.pipelines_)this.resetPipeline(Le)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllPipelines(),this.resetOther()}async process(Le,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");switch(this.inputImageBuffer.set(Le.data),Ye){case WasmPipelineType.IdBlurGlarePipeline:case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.idCaptureWasmApi.runIdCapturePipeline(this.pipelineTypeToWasmEnum(Ye));case WasmPipelineType.IdFaceDetectionPipeline:return this.faceDetectionWasmApi.runIdFaceDetectionPipeline();case WasmPipelineType.IdVideoSelfiePipeline:return this.idCaptureWasmApi.runIdVideoSelfiePipeline();case WasmPipelineType.SelfieWithAggregationMetrics:case WasmPipelineType.SelfieWithQualityMetrics:return this.faceDetectionWasmApi.runSelfieFaceDetectionPipeline(this.pipelineTypeToWasmEnum(Ye));default:throw new Error("Unknown pipeline type")}}async runIdCapture(Le){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Le){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.faceDetectionWasmApi.runSelfieCapture()}async setFacePositionConstraints(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFacePositionConstraints(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceDetectionThresholds(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set face detection thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}async setFaceAttributesThresholds(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceAttributesThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceChecksEnabled(Le,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceChecksEnabled(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht)}async setFaceDetectionMode(Le,Ye){this.checkWasmInitialization("Unable to set face detection mode, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionMode(this.pipelineTypeToWasmEnum(Le),Ye)}async setFaceDetectionCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt){this.checkWasmInitialization("Unable to set face detection callbacks, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt)}async setIdCaptureThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt)}async setIdCaptureCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt)}async setIdCaptureGeometryParams(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt)}async setIdCaptureConfigParams(Le,Ye,tt,nt,ft,ht,gt,At,xt){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt)}setIdCaptureModelType(Le,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.pipelineTypeToWasmEnum(Le),this.IdCaptureModelTypeToWasmEnum(Ye))}IdPerspectiveTransform(Le,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Le,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadWasm(Le,Ye,tt){const nt=Le?tt:Ye;try{window.wasmArrayBuffer=await fetch(nt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),this.wasmModule=await this.Module()}catch(ft){if(console.log(ft,Le,"useSmd"),Le)return await this.loadWasm(!1,Ye,tt);throw ft}return Le}async loadModels(){var nt;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Le=new this.wasmModule.PipelineTypeToIntMap,Ye=new Map,tt=new Map;for(let[ft,ht]of this.pipelines_){let gt=this.pipelineTypeToWasmEnum(ft),At=[],xt=new this.wasmModule.VectorInt;for(let Et of ht){if(!tt.has(Et)){let Ct=await fetch(Et).then(kt=>kt.arrayBuffer()).then(kt=>new Uint8Array(kt));tt.set(Et,Ct)}let yt=tt.get(Et);xt.push_back(yt.byteLength),At.push(yt)}Le.set(gt,xt),Ye.set(gt,At)}this.modelsBuffers=this.pipelineApiUtilities.allocateModelsBuffers(Le);for(let[ft,ht]of Ye){let gt=(nt=this.modelsBuffers)==null?void 0:nt.get(ft);for(let At=0;At<gt.size();At++){let xt=gt==null?void 0:gt.get(At);if(xt)xt.set(ht[At]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializePipelines(){this.checkWasmInitialization("Unable to initialize pipelines, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.pipelineApiUtilities.initializePipelines()}async setProductionMode(Le){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Le)}getPipelineState(){return this.checkWasmInitialization("Unable to get pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.getPipelineState()}getCurrentPipeline(){return this.checkWasmInitialization("Unable to get current pipeline, cpp API hasn't been initialized"),this.pipelineTypeFromWasmEnum(this.pipelineApiUtilities.getCurrentPipeline())}setSdkVersion(Le){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Le)}setSdkPlatform(Le){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Le)}setDeviceInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Le,Ye)}setBrowserInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Le,Ye)}setCameraInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Le,Ye)}setZc(Le){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Le)}setMotionStatus(Le){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Le)}setMetadataField(Le,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Le,Ye)}setInspectorOpened(Le){this.inspectorOpened_=Le}setBackgroundMode(Le){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Le)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(){return this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.prc.bind(this.utilityApi),[])}async poc(Le){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.poc.bind(this.utilityApi),[Le])}pipelineTypeToWasmEnum(Le){switch(Le){case WasmPipelineType.IdBlurGlarePipeline:return this.wasmModule.PipelineType.IdBlurGlarePipeline;case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.wasmModule.PipelineType.IdBarcodeAndTextQualityPipeline;case WasmPipelineType.IdFaceDetectionPipeline:return this.wasmModule.PipelineType.IdFaceDetectionPipeline;case WasmPipelineType.IdVideoSelfiePipeline:return this.wasmModule.PipelineType.IdVideoSelfiePipeline;case WasmPipelineType.SelfieWithAggregationMetrics:return this.wasmModule.PipelineType.SelfieWithAggregationMetrics;case WasmPipelineType.SelfieWithQualityMetrics:return this.wasmModule.PipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}pipelineTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.PipelineType.IdBlurGlarePipeline:return WasmPipelineType.IdBlurGlarePipeline;case this.wasmModule.IdBarcodeAndTextQualityPipeline:return WasmPipelineType.IdBarcodeAndTextQualityPipeline;case this.wasmModule.PipelineType.IdFaceDetectionPipeline:return WasmPipelineType.IdFaceDetectionPipeline;case this.wasmModule.PipelineType.IdVideoSelfiePipeline:return WasmPipelineType.IdVideoSelfiePipeline;case this.wasmModule.PipelineType.SelfieWithAggregationMetrics:return WasmPipelineType.SelfieWithAggregationMetrics;case this.wasmModule.PipelineType.SelfieWithQualityMetrics:return WasmPipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}IdCaptureModelTypeToWasmEnum(Le){switch(Le){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Le){if(!this.isInitialized())throw new Error(Le)}async wasmCallWrapper(Le,Ye=[]){return await this.wasmCallMutex.withLock(async(...tt)=>{let nt=!1;try{for(;;){if(nt=Le(...tt),nt)return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){console.log("Error in wasmCallWrapper:",ft)}},...Ye)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),version$4="1.85.0-20251209153124.0";function e$2(Be,Le){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Be,Le)?Be[Le]:void 0}function t$2(Be,Le,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Be,location.href),{blockedURI:yt}=xt;yt!==Et.href&&yt!==Et.protocol.slice(0,-1)&&yt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Le).then(xt=>(At(),xt),xt=>new Promise(Et=>{const yt=new MessageChannel;yt.port1.onmessage=()=>Et(),yt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Be){let Le="";for(let Ye=0;Ye<Be.length;++Ye)if(Ye>0){const tt=Be[Ye].toLowerCase();tt!==Be[Ye]?Le+=` ${tt}`:Le+=Be[Ye]}else Le+=Be[Ye].toUpperCase();return Le}const r$4={default:"endpoint"},o$1={default:"tlsEndpoint"},i$5="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$e=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$d="API key required",m$2="API key not found",A$1="API key expired",w$e="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$d,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Be,Le){const Ye=[],[tt,nt]=function(gt){const At=function(yt){const Ct=[...yt];return{current:()=>Ct[0],postpone(){const kt=Ct.shift();kt!==void 0&&Ct.push(kt)},exclude(){Ct.shift()}}}(gt),xt=function(yt,Ct){let kt=0;return()=>Math.random()*Math.min(Ct,yt*Math.pow(2,kt++))}(100,3e3),Et=new Set;return[At.current(),(yt,Ct)=>{let kt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),kt=0;else if(vt===K)At.exclude();else if(vt===M$1){const It=Date.now()-yt.getTime()<50,wt=At.current();wt&&It&&!Et.has(wt)&&(Et.add(wt),kt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,kt??yt.getTime()+xt()-Date.now()]}]}(Be);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=yt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:yt}),Et=Le(gt);return Et.then(()=>xt(),xt),Et.catch(yt=>{if(ft!=null||(ft=yt),Ye.length>=5)throw ft;const Ct=nt(At,yt);if(!Ct)throw ft;const[kt,vt]=Ct;return(bt=vt,new Promise(It=>setTimeout(It,bt))).then(()=>ht(kt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Be){var Le,Ye;const{picked:tt,rest:nt}=function(Et,yt){const Ct={},kt={};for(const[vt,bt]of Object.entries(Et))yt.includes(vt)?Ct[vt]=bt:kt[vt]=bt;return{picked:Ct,rest:kt}}(Be,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Le=tt.apiKey)!==null&&Le!==void 0?Le:ft,gt=(Ye=e$2(Be,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],yt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(kt,vt,bt,It){return kt.addEventListener(vt,bt,It),()=>kt.removeEventListener(vt,bt,It)}(document,"visibilitychange",yt);return yt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$d);const Et=function(yt,Ct){return(Array.isArray(yt)?yt:[yt]).map(kt=>function(vt,bt){const It=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?It(bt):wt==="<loaderVersion>"?It(b$2):wt)}(String(kt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(yt){return yt instanceof Error&&yt.message===K?new Error(M$1):yt}(Et)}).then(([Et,yt])=>(xt(),Et.load({...nt,ldi:{attempts:yt,visibilityStates:At}})))}function F$1(Be){return t$2(Be,()=>function(Le){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Le))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Le,ht.appendChild(nt)})}(Be),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Be=window,Le="__fpjs_p_l_b",Ye=Be[Le];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Be,Le),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$d,ERROR_BAD_REQUEST_FORMAT:w$e,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$5,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$e,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$4,defaultTlsEndpoint:o$1};function e$1(Be,Le,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(yt){yt(Et)})).then(ht,gt)}At((tt=tt.apply(Be,[])).next())})}function n$1(Be,Le){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Le.call(Be,ht)}catch(yt){Et=[6,yt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$3={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$4=function(Be,Le){typeof window<"u"&&(o[Be]=Le)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Be){var Le,Ye=Be[0];return!(!((Le=r$3==null?void 0:r$3.exclude)===null||Le===void 0)&&Le.includes(Ye))}).filter(function(Be){var Le,Ye,tt,nt,ft=Be[0];return!((Le=r$3==null?void 0:r$3.include)===null||Le===void 0)&&Le.some(function(ht){return ht.includes(".")})?(Ye=r$3==null?void 0:r$3.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$3==null?void 0:r$3.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$3==null?void 0:r$3.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Be){return[Be[0],(0,Be[1])()]}))};function c$2(Be){return Be^=Be>>>16,Be=Math.imul(Be,2246822507),Be^=Be>>>13,Be=Math.imul(Be,3266489909),(Be^=Be>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Be,Le){return Be<<Le|Be>>>32-Le}function d(Be,Le){var Ye;if(Le===void 0&&(Le=0),Le=Le?0|Le:0,typeof Be=="string"&&(Ye=Be,Be=new TextEncoder().encode(Ye).buffer),!(Be instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Le,Le,Le,Le]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Be,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Be,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Be,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Be,Le){return new Promise(function(Ye){setTimeout(function(){return Ye(Le)},Be)})}function m$1(Be,Le,Ye){return Promise.all(Be.map(function(tt){return Promise.race([tt,f$1(Le,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Be,Le,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Be=u(),Le=Object.keys(Be),[4,m$1(Object.values(Be),(r$3==null?void 0:r$3.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Le[gt]]=ht}),[2,p(nt,r$3.exclude||[],r$3.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Be,Le,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var yt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Le.some(function(bt){return yt.startsWith(bt)}),kt=Ye.some(function(bt){return yt.startsWith(bt)});Ct&&!kt||(nt[xt]=Et)}else{var vt=p(Et,Le,Ye,yt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Be);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$d(Be){return e$1(this,void 0,void 0,function(){var Le,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Le=tt.sent(),Ye=d(JSON.stringify(Le)),Math.random()<1e-5&&r$3.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Le),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Be=navigator.userAgent,Le={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Be.match(nt);if(ft&&ft.groups)return{name:Le[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Be){for(var Le=0,Ye=0;Ye<Be.length;++Ye)Le+=Math.abs(Be[Ye]);return Le}var M=b$1();function E(Be,Le,Ye){for(var tt=[],nt=0;nt<Be[0].data.length;nt++){for(var ft=[],ht=0;ht<Be.length;ht++)ft.push(Be[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Le,Ye)}function P(Be){if(Be.length===0)return 0;for(var Le={},Ye=0,tt=Be;Ye<tt.length;Ye++)Le[ft=tt[Ye]]=(Le[ft]||0)+1;var nt=Be[0];for(var ft in Le)Le[ft]>Le[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$4("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Be){return[2,new Promise(function(Le,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Le({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$4("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Be){var Le=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Be({commonImageDataHash:d(E(Le,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Be,Le){if(!Be)throw new Error("Canvas context not supported");return Be.font,Be.font="72px ".concat(Le),Be.measureText("WwMmLli0Oo").width}function _$1(){var Be,Le=document.createElement("canvas"),Ye=(Be=Le.getContext("webgl"))!==null&&Be!==void 0?Be:Le.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Be=new Float32Array(1),Le=new Uint8Array(Be.buffer);return Be[0]=1/0,Be[0]=Be[0]-Be[0],Le[3]}function B(Be,Le){var Ye={};return Le.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Be.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Be=[],Le={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Le).forEach(function(Ye){Le[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Be.push("".concat(Ye,": ").concat(tt))})}),Be}b$1().name!="Firefox"&&i$4("fonts",function(){var Be=this;return new Promise(function(Le,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(yt){return setTimeout(yt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Be,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var yt=L(ht,Et);gt.includes(yt)||(At[Et]=yt)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$4("hardware",function(){return new Promise(function(Be,Le){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Be({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$4("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$4("permissions",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){return k=(r$3==null?void 0:r$3.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Be=Array.from({length:(r$3==null?void 0:r$3.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Be).then(function(Ye){return B(Ye,k)})]})})}),i$4("plugins",function(){var Be=[];if(navigator.plugins)for(var Le=0;Le<navigator.plugins.length;Le++){var Ye=navigator.plugins[Le];Be.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Be})})}),i$4("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$4("system",function(){return new Promise(function(Be){var Le=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Le.name,version:Le.version}};Le.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Be(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$4("webgl",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Be=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
67
67
|
attribute vec2 position;
|
|
68
68
|
void main() {
|
|
69
69
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
@@ -2909,7 +2909,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof Be.getDerivedSta
|
|
|
2909
2909
|
overflow: hidden;
|
|
2910
2910
|
margin: auto;
|
|
2911
2911
|
}
|
|
2912
|
-
`,isAndroid=!!mobile.Android(),isDesktop=mobile.isDesktop(),parser=new UAParser,{browser:browser$1}=parser.getResult(),onFrameEmitter=new EventEmitter$5,whitePoster="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAAAKSURBVHicY2QAAAAEAAIhZK1qAAAAAElFTkSuQmCC",Webcam=React.forwardRef(({className:Be,onPlay:Le,videoSource:Ye,isSelfie:tt=!1,type:nt,permissionMessage:ft,onLog:ht=emptyFunc,stream:gt,onError:At=emptyFunc,token:xt,onStreamReady:Et=async()=>{},showCustomCameraPermissionScreen:yt,assistedOnboarding:Ct,deviceId:kt,onRestartOnboarding:vt=reload,showDoublePermissionsRequest:bt=!1,publishAudio:It=!1,fullHeight:wt=!1,isRecordingEnabled:Rt=!1,isKiosk:Tt=!1,flipVerticallyImage:Bt=!1,isIdv2:Dt=!1,isVideoSelfie:Lt=!1,documentType:Nt=null,zoomLevel:Pt=1,isDeepsightEnabled:Wt,showLoading:$t=!0,poster:Kt=whitePoster,isV2:Vt=!1},Ut)=>{const[_t,Xt]=React.useState(!1),[Qt,jt]=React.useState(gt),[zt,qt]=React.useState(!0),[Gt,e0]=React.useState($t),[s0,t0]=React.useState(Wt),l0=React.useRef(!1),d0=React.useRef({promise:Promise.resolve(),resolve:()=>{},pending:!1}),n0=React.useRef(null),g0=React.useRef(),A0=React.useRef(0),o0=React.useRef(0),r0=React.useRef(0),{t:Yt}=useTranslation$1(),[Mt,Jt]=usePermissions(),a0=React.useRef(),i0=React.useRef(!1),f0=React.useRef(!0),u0=React.useRef(!1),x0=React.useRef(CameraCleanupManager.getInstance());a0.current=Mt;const[p0,D0]=React.useState(!bt);ft=ft||Yt("permissionMessage"),React.useEffect(()=>{a0.current&&!isDesktop&&!Tt&&D0(a0.current)},[Mt]),React.useEffect(()=>{const tn=sessionStorage.getItem("cameraPermissionsGranted")==="true";!isDesktop&&tn&&!Tt&&D0(!0)},[Mt]),React.useEffect(()=>{const tn=document.querySelectorAll(".IncodeDefaultComponentContainer");if(!tn)return;const cn=[];return tn.forEach(yn=>{const Bn=window.getComputedStyle(yn);cn.push({el:yn,overflow:Bn.overflow}),yn.style.overflow="hidden"}),()=>{cn.forEach(({el:yn,overflow:Bn})=>{yn.style.overflow=Bn})}},[]),React.useEffect(()=>()=>{Qt&&x0.current.unregisterStream(Qt)},[Qt]);const L0=()=>{if(!l0.current)return;if(!n0.current){l0.current=!1;return}if(n0.current.paused){l0.current=!1;return}const tn=n0.current.currentTime;tn!==A0.current&&(onFrameEmitter.emit("newFrame"),A0.current=tn,!Rt&&Gt&&e0(!1)),requestAnimationFrame(L0)},z0=async tn=>{if(Pt>1){const cn=tn.getVideoTracks()[0];cn&&await zoomCamera(cn,Pt)}await Et(tn)};useEventListener("visibilitychange",async()=>{var tn,cn;if(document.hidden)return d0.current.pending||(tn=n0.current)==null?void 0:tn.pause();if(!d0.current.pending)return await((cn=n0.current)==null?void 0:cn.play())},document);const q0=async tn=>{const cn=tn.getVideoTracks()[0],yn=await getDeviceCapabilities(),Bn=getChosenCameraInfo(cn,r0.current,Ye),{width:er,height:Qn}=cn.getSettings(),{focusMode:Un=!1}=navigator.mediaDevices.getSupportedConstraints();addEvent({code:"cameraType",payload:{type:"webRTC",resolution:`${er}x${Qn}`,autofocus:Un,label:cn.label},token:xt}),addEvent({code:"cameraDebugInfo",payload:{type:"webRTC",availableCameras:yn,chosenCamera:Bn},token:xt}),tt&&addEvent({code:"cameraSelfie",token:xt})};useOnCameraPermissionChange(tn=>{tn==="denied"&&Xt(!0)});const X0=async tn=>{if(e0(!1),(tn==null?void 0:tn.name)==="NotReadableError"){tn.type="cameraInUse",await x0.current.waitForCameraAvailability(),setTimeout(()=>{r0.current=Math.min(r0.current+1,4),U0(!0)},300);return}if(tn.constructor.name==="DOMException"){const cn=tn.name;switch(cn){case"NotAllowedError":addEvent({code:"permissionDenied",payload:{message:"User denied to use camera.",errorType:cn},token:xt}),ht(getLogObject("permissionDenied",{message:"User denied to use camera.",errorType:cn})),tn.type="permissionDenied",yt?Xt(!0):At(tn);break;case"NotFoundError":tn.type="cameraNotFound",At(tn);break;case"OverconstrainedError":tn.type="cameraConstraintsError",At(tn);break;case"SecurityError":tn.type="cameraSecurityError",At(tn);break;case"AbortError":await x0.current.waitForCameraAvailability(),setTimeout(()=>U0(!0),300);return;default:tn.type="cameraUnknownError",At(tn);break}}else tn.constructor.name==="OverconstrainedError"?(ht(getLogObject("OSVersionNotSupported",{message:"OS version is not supported."})),qt(!1)):(ht(getLogObject("browserNotSupported",{message:"Browser is not supported."})),qt(!1))},T0=async tn=>{if(Jt(!0),x0.current.registerStream(tn),Lt){const cn=async()=>{n0.current.srcObject=tn,await z0(tn),jt(tn),await n0.current.play()},yn=tn.getVideoTracks()[0];onboardingAnalytics.updateCameraInfo(yn);const Bn=await onboardingAnalytics.checkForVirtualCameraByLabel(yn);Bn!=null&&Bn.isDetected&&(Bn.hasPriorDetection||await addDeviceStats(xt,{cameraLabelInspectionStatus:"FAIL"}),At(new Error("Virtual camera is detected"))),mobile.iOS()?yn.applyConstraints({advanced:[{focusDistance:1}]}).finally(()=>{cn()}):cn()}else{const cn=async er=>{u0.current?(n0.current.srcObject=er,jt(er),await z0(er),e0(!1),d0.current.resolve()):(n0.current.autoplay=!1,n0.current.srcObject=er,await MlWasmJSApi$1.prc(),killStream(er),u0.current=!0,await U0())},yn=tn.getVideoTracks()[0];onboardingAnalytics.updateCameraInfo(yn);const Bn=await onboardingAnalytics.checkForVirtualCameraByLabel(yn);Bn!=null&&Bn.isDetected&&(Bn.hasPriorDetection||await addDeviceStats(xt,{cameraLabelInspectionStatus:"FAIL"}),At(new Error("Virtual camera is detected"))),mobile.iOS()?yn.applyConstraints({advanced:[{focusDistance:1}]}).finally(()=>{cn(tn)}):cn(tn)}},_0=tn=>{if(d0.current.pending)return;d0.current.pending=!0;let cn;const yn=new Promise(Bn=>{cn=()=>{Bn(),d0.current.pending=!1}});d0.current={promise:yn,resolve:cn},tn&&yn.then(()=>{n0.current.play()})},P0=async(tn=!1)=>{if(d0.current.pending)return;const cn=n0.current,yn=cn.srcObject;yn&&(cn.pause(),killStream(yn),cn.srcObject=null),u0.current=!1,l0.current=!1,e0($t),_0(tn),await U0(!0),await d0.current.promise},U0=async tn=>{if(s0){await S0();return}isAndroid&&Ye==="environment"&&Rt&&await x0.current.waitForCameraAvailability(),isAndroid&&Ye==="environment"&&await new Promise(Bn=>setTimeout(Bn,100));const cn=Bn=>{if(Bn.getVideoTracks()[0].readyState==="ended"){const Qn={message:"Camera track ended",errorType:"mediaStreamTrackError",errorDescription:"A MediaStreamTrack ended due to a capture failure"};addEvent({token:xt,code:"error",payload:Qn}),At({...Qn,type:Qn.errorType})}};(async()=>{function Bn(Un){const $n={resizeMode:"none",facingMode:"environment"};switch(Un){case 0:return{...$n,height:{ideal:localStorage.getItem("isIPhone14OrHigher")==="true"?1080:720}};case 1:return{...$n,width:{min:3200,ideal:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 2:return{...$n,width:{min:1400,ideal:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 3:return{...$n,width:{min:640,ideal:640,max:800},height:{min:480,ideal:480,max:600}};case 4:return{...$n,width:{min:640,ideal:800,max:960},height:{min:480,ideal:480,max:480}};default:return{}}}const er=async Un=>{const $n={video:Ye==="environment"?Bn(Un.current):localStorage.getItem("isIPhone14OrHigher")==="true"?{height:{ideal:1080}}:{facingMode:Ye,height:{ideal:480},width:{ideal:640}},audio:It},gn=isSafari()||It,qn={audio:gn,video:{facingMode:"user",deviceId:kt?{exact:kt}:void 0}};if(mobile.isIpad()&&Ye==="user")try{const An=await getNonUltraWideFrontCameraStream();T0(An),await q0(An)}catch(An){At({...An,type:"permissionDenied"})}else isAndroid&&Ye==="environment"?navigator.mediaDevices.getUserMedia($n).then(async An=>{const dn=An.getVideoTracks()[0],Ln=await getCameras(),nr=adjustCamerasFromCameraStream(dn,Ln);An.getTracks().forEach(B0=>B0.stop());let jn=1280,hr=720;if(Un.current>1){const{width:B0,height:Y0}=Bn(Un.current);jn=B0==null?void 0:B0.ideal,hr=Y0==null?void 0:Y0.ideal}const gr={video:{deviceId:{exact:nr.deviceId},width:{ideal:jn},height:{ideal:hr}},audio:gn};navigator.mediaDevices.getUserMedia(gr).then(async B0=>{await q0(B0),T0(B0)})}).catch(async An=>{Un.current=Un.current+1,Un.current>4?await X0(An):er(Un)}):navigator.mediaDevices.getUserMedia(mobile.any()?$n:qn).then(async An=>{await q0(An),cn(An),T0(An)}).catch(async An=>{await X0(An)})};if(!tn&&mobile.iOS()&&i0.current&&!u0.current)return;if(p0===!0||isDesktop||Tt||bt===!1){if(i0.current=!0,gt){T0(gt);return}e0($t),er(r0),addEvent({token:xt,code:"cameraFeedbackDisplayed",payload:{feedback:"Loading..."},module:"ID Capture",screen:`${nt} Camera Capture`})}const Qn=document.createElement("canvas");g0.current=Qn})()};React.useEffect(()=>(_0(!0),U0(),()=>{p0&&(i0.current=!1,gt==null||gt.getTracks().forEach(tn=>tn.stop()))}),[p0,Ye,gt,s0]),React.useImperativeHandle(Ut,()=>({getCanvas:Z0,video:n0.current,stream:Qt,setIsLoadingCamera:e0,resetWebcam:P0,streamUnlocked:f0}));const en=({width:tn=0,height:cn=0,useOriginalDimensions:yn=!0})=>{if(!n0.current||!n0.current.videoHeight||!n0.current.videoWidth||!g0.current||!l0.current)return!1;const Bn=n0.current.currentTime;if(o0.current===Bn)return!1;if(o0.current=Bn,yn)g0.current.width=n0.current.videoWidth,g0.current.height=n0.current.videoHeight;else{if(tn===0||cn===0)return!1;g0.current.width=tn,g0.current.height=cn}const er=g0.current.getContext("2d");return er.clearRect(0,0,g0.current.width,g0.current.height),Bt&&rotateCanvasVertically(g0.current),er.drawImage(n0.current,0,0),!0},Z0=({width:tn=0,height:cn=0,useOriginalDimensions:yn=!0}={})=>en({width:tn,height:cn,useOriginalDimensions:yn})?new IncodeCanvas(g0.current):null,R0=()=>n0.current?n0.current.videoWidth>n0.current.videoHeight:!1,v0=async()=>{(Wt||mobile.Android())&&await S0(),D0(!0),sessionStorage.setItem("cameraPermissionsGranted",String(!0)),addEvent({token:xt,code:"permissionsAllowedCustom"}),addEvent({token:xt,code:"cameraPermissionSubmitted",payload:{requestor:"browser",requestorDetails:browser$1.name,permission:"allowed"},module:"ID capture",screen:`${nt} Camera Capture`})},S0=async()=>{const tn=await onboardingAnalytics.startOnboardingCheck();addEvent({token:xt,code:tn==="granted"?"motionPermissionsGranted":"motionPermissionsRejected"}),tn==="granted"&&await onboardingAnalytics.startMotionSensors(),t0(!1)},H0=()=>{addEvent({token:xt,code:"permissionsQuitFlow"}),setTimeout(()=>{window.location.reload()},0)},M0=()=>{addEvent({token:xt,code:"permissionsDeniedCustom"}),addEvent({token:xt,code:"cameraPermissionSubmitted",payload:{requestor:"browser",requestorDetails:browser$1.name,permission:"denied"},module:"ID capture",screen:`${nt} Camera Capture`})},G0=sessionStorage.getItem("cameraPermissionsGranted")==="true",K0=bt&&(typeof Mt<"u"&&!Mt&&!p0||typeof p0<"u"&&!p0)&&!isDesktop&&!Tt&&!G0,un=()=>{l0.current||(Le&&typeof Le=="function"&&(Le(),e0(!1)),l0.current=!0,requestAnimationFrame(L0))};return jsxRuntimeExports.jsxs(React.Fragment,{children:[!s0&&_t&&jsxRuntimeExports.jsx(AllowCameraUse,{handleAllowCamera:vt}),K0&&jsxRuntimeExports.jsx(FakePermissionsRequest,{handleDenyPermission:M0,handleCameraPermission:v0,handleQuitOnboarding:H0,type:nt,token:xt}),!zt&&jsxRuntimeExports.jsx(BrowserNotSupported,{}),Gt&&!K0&&jsxRuntimeExports.jsx(Loader$1,{isV2:Vt}),jsxRuntimeExports.jsx(Video$1,{"aria-hidden":"true",autoPlay:!1,poster:Kt,className:cx(Be,{selfie:tt,horizontal:R0(),desktop:!mobile.any(),assistedOnboarding:Ct,"full-height":wt,idv2:Dt}),playsInline:!0,onPlay:un,ref:n0,muted:!0}),multiPageDocumentTypes.includes(Nt)&&jsxRuntimeExports.jsx(V5COverlay,{children:jsxRuntimeExports.jsx("img",{src:documentCaptureSVG,alt:"V5C Logbook"})})]})}),captureButton="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='65'%20height='65'%20viewBox='0%200%2065%2065'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%3e%3cg%3e%3cg%20transform='translate(-155%20-646)%20translate(155%20646)'%3e%3ccircle%20cx='32.319'%20cy='32.319'%20r='32.319'%20fill='%2320263D'/%3e%3ccircle%20cx='32.319'%20cy='32.319'%20r='25.137'%20fill='%23FFF'%20fill-opacity='.093'%20stroke='%23FFF'%20stroke-width='2.052'/%3e%3c/g%3e%3cg%20fill='%23FFF'%20fill-rule='nonzero'%3e%3cpath%20d='M17.193%2012.24c0%202.294-1.88%204.16-4.193%204.16-2.312%200-4.192-1.866-4.192-4.16%200-2.293%201.88-4.16%204.192-4.16%202.312%200%204.193%201.867%204.193%204.16zM26%206.334v11.814C26%2019.723%2024.713%2021%2023.125%2021H2.875C1.287%2021%200%2019.723%200%2018.148V6.334C0%204.76%201.287%203.482%202.875%203.482h3.536v-.987C6.411%201.117%207.537%200%208.927%200h8.146c1.39%200%202.516%201.117%202.516%202.495v.986h3.536C24.713%203.482%2026%204.76%2026%206.334zm-6.65%205.906c0-3.473-2.849-6.298-6.35-6.298-3.5%200-6.349%202.825-6.349%206.298S9.5%2018.54%2013%2018.54c3.501%200%206.35-2.826%206.35-6.299z'%20transform='translate(-155%20-646)%20translate(155%20646)%20translate(19%2021)'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",faceFrame$1="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='336'%20height='518'%20viewBox='0%200%20336%20518'%3e%3cpath%20fill='none'%20fill-rule='evenodd'%20stroke='%23FFF'%20stroke-dasharray='7.139999675750732,19.03999967575073'%20stroke-width='9.044'%20d='M168%20513.392c76.83%200%20162.893-113.92%20162.893-254.447S280.236%204.498%20168%204.498%205.107%20118.418%205.107%20258.945%2091.17%20513.392%20168%20513.392z'/%3e%3c/svg%3e";class FaceDetection{constructor(){this.pipelineProfile=null,this.bestCanvas=null,this.bestLandmarks=null,this.bestTopLeft=null,this.bestSize=null,this.currCanvas=null}formatLandmarks(Le,Ye,tt){const[nt,ft,ht,gt,At,xt,Et,yt,Ct,kt]=Le;return{rightEyeX:nt,rightEyeY:ft,leftEyeX:ht,leftEyeY:gt,noseTipX:At,noseTipY:xt,rightMouthX:Et,rightMouthY:yt,mouthX:Ct,mouthY:kt,x:Ye[0],y:Ye[1],width:tt[0],height:tt[1]}}async initialize(Le){const{onNoFace:Ye,onGetReady:tt,onGetReadyFinished:nt,onCapture:ft,onTooManyFaces:ht,onTooClose:gt,onCenterFace:At,onFarAway:xt,onFaceAngle:Et,onDark:yt,onBlur:Ct,onHeadWear:kt,onLenses:vt,onEyesClosed:bt,onFaceMask:It,onSwitchToManualCapture:wt,onFaceOccluded:Rt,isLensesCheckEnabled:Tt,isMaskCheckEnabled:Bt,isClosedEyesCheckEnabled:Dt,isHeadWearCheckEnabled:Lt,isVideoSelfie:Nt,pipelineProfile:Pt,autocaptureTimeout:Wt}=Le;this.pipelineProfile=Pt;const $t=this.pipelineProfile.pipelineType;await MlWasmJSApi$1.setFacePositionConstraints($t,Pt.parameters.frameMinX,Pt.parameters.frameMinY,Pt.parameters.frameMaxX,Pt.parameters.frameMaxY),await MlWasmJSApi$1.setFaceDetectionThresholds($t,Pt.parameters.brightnessThreshold,Pt.parameters.blurrinessThreshold,Pt.parameters.tiltRotationAngleThreshold,Pt.parameters.minMagicCropSize,Wt,Pt.parameters.minFaceQualityScore,Pt.parameters.faceOcclusionThreshold),await MlWasmJSApi$1.setFaceChecksEnabled($t,Tt,Bt,Dt,Lt,Pt.parameters.isOcclusionCheckEnabled),await MlWasmJSApi$1.setFaceAttributesThresholds($t,Pt.parameters.headwearThreshold,Pt.parameters.lensesThreshold,Pt.parameters.closedEyesThreshold,Pt.parameters.maskThreshold),await MlWasmJSApi$1.setFaceDetectionMode($t,Nt);const Kt=()=>{this.bestCanvas.updateBase64Image(),this.bestCanvas.updateBlob(),ft(this.bestCanvas,this.formatLandmarks(this.bestLandmarks,this.bestTopLeft,this.bestSize))},Vt=Ut=>{this.bestCanvas=this.currCanvas.clone();const _t=Ut.rect;this.bestTopLeft=[_t.x,_t.y];const Xt=[_t.x+_t.width,_t.y+_t.height],Qt=this.bestTopLeft,jt=Xt;this.bestSize=[jt[0]-Qt[0],jt[1]-Qt[1]],this.bestLandmarks=[Ut.rightEye.x,Ut.rightEye.y,Ut.leftEye.x,Ut.leftEye.y,Ut.noseTip.x,Ut.noseTip.y,Ut.rightMouthCorner.x,Ut.rightMouthCorner.y,Ut.leftMouthCorner.x,Ut.leftMouthCorner.y]};await MlWasmJSApi$1.setFaceDetectionCallbacks($t,xt,gt,ht,Ye,Kt,tt,nt,At,yt,Ct,Et,Vt,vt,It,bt,kt,wt,Rt)}async detect(Le){try{this.currCanvas=Le,await MlWasmJSApi$1.allocateImageBuffers(Le==null?void 0:Le.width(),Le==null?void 0:Le.height()),await MlWasmJSApi$1.process(Le.getImageData(),this.pipelineProfile.pipelineType),this.currCanvas.release()}catch(Ye){console.error(`Exception: ${Ye}`)}}}function useSelfie({timeout:Be=4e4,onLog:Le=emptyFunc,handleCapture:Ye,numberOfTries:tt=3,handleNoAttemptsLeft:nt=emptyFunc,webcam:ft,isDetecting:ht,onSwitchManualCapture:gt=emptyFunc,onManualCaptureSelfie:At=emptyFunc,assistedOnboarding:xt=!1,notificationTimeout:Et=2e3,hatCheckEnabled:yt=!1,lensesCheckEnabled:Ct=!1,maskCheckEnabled:kt=!1,eyesClosedCheckEnabled:vt=!1,handleStopRecordingLocally:bt=emptyFunc}){var v0;const It=React.useRef(0),wt=React.useRef(!1),Rt=React.useRef(!1),[Tt,Bt]=React.useState(null),[Dt,Lt]=React.useState(""),[Nt,Pt]=React.useState("idle"),[Wt,$t]=React.useState(!1),[Kt,Vt]=React.useState(!1),[Ut,_t]=React.useState(null),Xt=React.useRef(),Qt=React.useRef(gt),jt=React.useRef(null),zt=React.useRef(!1),qt=React.useRef(),{t:Gt}=useTranslation$1();((v0=ft.current)==null?void 0:v0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=ht.current);const e0=React.useCallback(S0=>{qt.current&&clearTimeout(qt.current),Bt(S0),S0&&(qt.current=setTimeout(()=>{Bt(null)},Et))},[Et]),s0=async(S0,H0)=>{var M0;Rt.current||(ht.current=!1,((M0=ft.current)==null?void 0:M0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!1),await sleep(300),Rt.current=!0,Pt("uploading"),await bt(),await Ye(S0,H0))},t0=()=>{var H0,M0;ht.current=!1,((H0=ft.current)==null?void 0:H0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!1);const S0=getLogObject("timeout",{message:"No face found"});Bt(null),(M0=Qt.current)==null||M0.call(Qt),Le(S0),Vt(!0)},l0=()=>{wt.current||(Le(getLogObject("tooFar",{message:Gt("notifications.moveCloser")})),e0(Gt("notifications.moveCloser")))},d0=()=>{wt.current||(Le(getLogObject("tooManyFaces",{message:Gt("notifications.tooManyFaces")})),e0(Gt("notifications.tooManyFaces")))},n0=()=>{wt.current||(Le(getLogObject("centerFace",{message:Gt("notifications.centerFace")})),e0(Gt("notifications.centerFace")))},g0=()=>{Rt.current||wt.current||(Pt("capturing"),Le(getLogObject("dontMove",{message:Gt("notifications.dontMove")})),Bt(Gt("notifications.getReady")),wt.current=!0)},A0=()=>{Bt(""),Pt("idle"),wt.current=!1,Rt.current=!1},o0=()=>{wt.current||Rt.current||e0(Gt("notifications.moveAway"))},r0=()=>{wt.current||Rt.current||e0(Gt("notifications.onDark"))},Yt=()=>{wt.current||Rt.current||e0(Gt("notifications.onBlur"))},Mt=()=>{wt.current||Rt.current||e0(Gt("notifications.onFaceAngle"))},Jt=()=>{wt.current||Rt.current||(Le(getLogObject("headWear",{message:Gt("notifications.removeHeadwear")})),Bt(Gt("notifications.removeHeadwear")))},a0=()=>{wt.current||Rt.current||(Le(getLogObject("lenses",{message:Gt("notifications.removeLenses")})),Bt(Gt(getSelfieTranslation("removeLenses",xt))))},i0=()=>{wt.current||Rt.current||(Le(getLogObject("eyesClosed",{message:Gt("notifications.eyesClosed")})),Bt(Gt(getSelfieTranslation("openEyes",xt))))},f0=()=>{wt.current||Rt.current||(Le(getLogObject("mask",{message:Gt("notifications.mask")})),Bt(Gt(getSelfieTranslation("removeMask",xt))))},u0=()=>{console.log("Face occlusion detected")},x0=async()=>{jt.current=new FaceDetection,await jt.current.initialize({onNoFace:emptyFunc,onCaptureFace:emptyFunc,onTooManyFaces:d0,onTooClose:o0,onCenterFace:n0,onFarAway:l0,onGetReady:g0,onGetReadyFinished:A0,onBlur:Yt,onDark:r0,onFaceAngle:Mt,onHeadWear:Jt,onLenses:a0,onEyesClosed:i0,onFaceMask:f0,onSwitchToManualCapture:t0,onCapture:s0,onFaceOccluded:u0,isLensesCheckEnabled:Ct,isMaskCheckEnabled:kt,isClosedEyesCheckEnabled:vt,isHeadWearCheckEnabled:yt,isVideoSelfie:!1,pipelineProfile:detectionSetup.getProfile(DetectionType.Selfie),autocaptureTimeout:Be})};React.useEffect(()=>{Qt.current=gt},[gt]),React.useEffect(()=>{Vt(!1),J0()},[]);const p0=async({response:S0,livenessPassed:H0,imageBase64:M0})=>{if(It.current=It.current+1,tt!==-1&&It.current>=tt)return nt({response:S0,livenessPassed:H0,imageBase64:M0});Bt(null),Pt("idle"),wt.current=!1,Rt.current=!1},D0=S0=>{const H0=S0.errorMessage||S0.message||S0.reason,{status:M0}=S0;if(_t(M0),M0===3004){Bt(Gt("notifications.faceNotFound")),Lt(Gt("notifications.faceNotFoundDescription")),Le(getLogObject("unableToCrop",{message:`${Gt("notifications.unableToCrop")}`}));return}switch(H0){case"Face not found.":Bt(Gt("notifications.faceNotFound")),Lt(Gt("notifications.faceNotFoundDescription")),Le(getLogObject("faceNotDetected",{message:`${Gt("notifications.faceNotFound")}`}));break;case"No faces found on the image":Bt(Gt("notifications.face")),Le(getLogObject("faceNotDetected",{message:`${Gt("notifications.face")}`}));break;case"BadRequestException: More than one face detected.":Bt(Gt("notifications.multiple")),Le(getLogObject("multipleFacesDetected",{message:`${Gt("notifications.multiple")}`}));break;case"Cropping area goes off the image.":Bt(Gt("notifications.crop")),Le(getLogObject("cropTooSmall",{message:`${Gt("notifications.crop")}`}));break;case"Image in portrait orientation is expected.":Bt(Gt("notifications.portrait")),Le(getLogObject("imageNotPortrait",{message:`${Gt("notifications.portrait")}`}));break;case"Selfie image has low quality":Bt(Gt("notifications.lowQualityImage")),Lt(Gt("notifications.lowQualityImageDescription")),Le(getLogObject("lowQualityImage",{message:`${Gt("notifications.lowQualityImage")}`}));break;default:Le(getLogObject("InternalServerError",{message:`${Gt("notifications.error")}`})),Bt(Gt("notifications.error"));break}},L0=async()=>{if(!(!ht.current||zt.current)){zt.current=!0,jt.current||await x0();try{await MlWasmJSApi$1.handleDetectionCallAndUpdateState(detectionSetup.getProfile(DetectionType.Selfie).pipelineType);const S0=ft.current.getCanvas();await jt.current.detect(S0)}catch(S0){console.error(S0)}finally{zt.current=!1}}};React.useEffect(()=>(onFrameEmitter.on("newFrame",L0),()=>{onFrameEmitter.off("newFrame",L0)}),[L0]);const z0=React.useCallback(()=>{var S0;ht.current||(ht.current=!0,((S0=ft.current)==null?void 0:S0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!0))},[Le,x0]),J0=React.useCallback(async()=>{$t(!0),z0()},[z0]);function q0(){At();let S0=null,H0=0;const M0=5;(async()=>{for(;H0<M0&&(S0=ft.current.getCanvas(),!S0);)await sleep(500),H0++;if(!S0)throw D0({errorMessage:"Failed to get canvas after multiple attempts"}),new Error("Failed to get canvas after multiple attempts");S0.updateBase64Image(),S0.updateBlob(),s0(S0,null)})()}const X0=Nt==="capturing",T0=Nt==="uploading",_0=Nt==="success",P0=Nt==="error",U0=X0||T0,en=T0||_0||P0;return{notificationMessage:Tt,notificationDescription:Dt,mode:Nt,capturing:wt,cameraReady:Wt,showManualCapture:Kt,handleFaceAutoCapture:s0,setMode:Pt,resetLoading:p0,setNotificationMessage:Bt,setNotificationDescription:Lt,handleError:D0,autoDetectFace:z0,startAutoDetect:J0,handleManualCapture:q0,isCapturing:X0,isUploading:T0,isSuccess:_0,isError:P0,isLoading:U0,hideCamera:en,showBorders:Wt&&(Nt==="idle"||P0),shouldShowManualCapture:Kt&&!en,selfieTimeoutRef:Xt,errorStatus:Ut}}function createSession$6({apiKey:Be,sessionId:Le,token:Ye,onStreamsUpdated:tt,onConnect:nt,onError:ft,options:ht}={}){if(!Be)throw new Error("Missing apiKey");if(!Le)throw new Error("Missing sessionId");if(!Ye)throw new Error("Missing token");let gt=[],At=Ct=>{gt.findIndex(vt=>vt.id===Ct.stream.id)<0&&(gt.push(Ct.stream),tt(gt))},xt=Ct=>{const kt=gt.findIndex(vt=>vt.id===Ct.stream.id);kt>=0&&(gt.splice(kt,1),tt(gt))},Et={streamCreated:At,streamDestroyed:xt},yt=OT.initSession(Be,Le,ht);return yt.on(Et),yt.connect(Ye,Ct=>{yt&&(Ct&&typeof ft=="function"?ft(Ct):!Ct&&typeof nt=="function"&&nt())}),{session:yt,streams:gt,disconnect(){yt&&(yt.off(Et),yt.disconnect()),gt=null,At=null,xt=null,Et=null,yt=null,this.session=null,this.streams=null}}}let OTSession$4=class extends React.Component{constructor(Le){super(Le),this.state={streams:[]}}getChildContext(){return{session:this.sessionHelper.session,streams:this.state.streams}}componentWillMount(){this.createSession()}componentDidUpdate(Le){(Le.apiKey!==this.props.apiKey||Le.sessionId!==this.props.sessionId||Le.token!==this.props.token)&&this.createSession()}componentWillUnmount(){this.destroySession()}createSession(){this.destroySession(),this.sessionHelper=createSession$6({apiKey:this.props.apiKey,sessionId:this.props.sessionId,token:this.props.token,onStreamsUpdated:Ye=>{this.setState({streams:Ye})},onConnect:this.props.onConnect,onError:this.props.onError,options:this.props.options}),this.props.eventHandlers&&typeof this.props.eventHandlers=="object"&&this.sessionHelper.session.on(this.props.eventHandlers);const{streams:Le}=this.sessionHelper;this.setState({streams:Le})}destroySession(){this.sessionHelper&&(this.props.eventHandlers&&typeof this.props.eventHandlers=="object"&&this.sessionHelper.session.off(this.props.eventHandlers),this.sessionHelper.disconnect())}render(){const Le=typeof this.props.children=="function";return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Le?this.props.children(this.sessionHelper):this.props.children})}};OTSession$4.propTypes={children:PropTypes.oneOfType([PropTypes.element,PropTypes.arrayOf(PropTypes.element),PropTypes.func]).isRequired,apiKey:PropTypes.string.isRequired,sessionId:PropTypes.string.isRequired,token:PropTypes.string.isRequired,eventHandlers:PropTypes.objectOf(PropTypes.func),onConnect:PropTypes.func,onError:PropTypes.func,options:PropTypes.object},OTSession$4.defaultProps={eventHandlers:null,onConnect:null,onError:null,options:{}},OTSession$4.childContextTypes={streams:PropTypes.arrayOf(PropTypes.object),session:PropTypes.shape({subscribe:PropTypes.func,unsubscribe:PropTypes.func})};var reWhitespace=/\s/;function trimmedEndIndex$1(Be){for(var Le=Be.length;Le--&&reWhitespace.test(Be.charAt(Le)););return Le}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(Be){return Be&&Be.slice(0,trimmedEndIndex(Be)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1;function isObject$6(Be){var Le=typeof Be;return Be!=null&&(Le=="object"||Le=="function")}var isObject_1=isObject$6,freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$5=freeGlobal||freeSelf||Function("return this")(),_root=root$5,root$4=_root,Symbol$3=root$4.Symbol,_Symbol=Symbol$3,Symbol$2=_Symbol,objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty,nativeObjectToString$1=objectProto$1.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag$1(Be){var Le=hasOwnProperty$2.call(Be,symToStringTag$1),Ye=Be[symToStringTag$1];try{Be[symToStringTag$1]=void 0;var tt=!0}catch{}var nt=nativeObjectToString$1.call(Be);return tt&&(Le?Be[symToStringTag$1]=Ye:delete Be[symToStringTag$1]),nt}var _getRawTag=getRawTag$1,objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString$2(Be){return nativeObjectToString.call(Be)}var _objectToString=objectToString$2,Symbol$1=_Symbol,getRawTag=_getRawTag,objectToString$1=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag$1(Be){return Be==null?Be===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(Be)?getRawTag(Be):objectToString$1(Be)}var _baseGetTag=baseGetTag$1;function isObjectLike$1(Be){return Be!=null&&typeof Be=="object"}var isObjectLike_1=isObjectLike$1,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$1(Be){return typeof Be=="symbol"||isObjectLike(Be)&&baseGetTag(Be)==symbolTag}var isSymbol_1=isSymbol$1,baseTrim=_baseTrim,isObject$5=isObject_1,isSymbol=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(Be){if(typeof Be=="number")return Be;if(isSymbol(Be))return NAN;if(isObject$5(Be)){var Le=typeof Be.valueOf=="function"?Be.valueOf():Be;Be=isObject$5(Le)?Le+"":Le}if(typeof Be!="string")return Be===0?Be:+Be;Be=baseTrim(Be);var Ye=reIsBinary.test(Be);return Ye||reIsOctal.test(Be)?freeParseInt(Be.slice(2),Ye?2:8):reIsBadHex.test(Be)?NAN:+Be}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$1(Be){if(!Be)return Be===0?Be:0;if(Be=toNumber(Be),Be===INFINITY||Be===-INFINITY){var Le=Be<0?-1:1;return Le*MAX_INTEGER}return Be===Be?Be:0}var toFinite_1=toFinite$1,toFinite=toFinite_1;function toInteger$1(Be){var Le=toFinite(Be),Ye=Le%1;return Le===Le?Ye?Le-Ye:Le:0}var toInteger_1=toInteger$1,toInteger=toInteger_1,FUNC_ERROR_TEXT="Expected a function";function before$1(Be,Le){var Ye;if(typeof Le!="function")throw new TypeError(FUNC_ERROR_TEXT);return Be=toInteger(Be),function(){return--Be>0&&(Ye=Le.apply(this,arguments)),Be<=1&&(Le=void 0),Ye}}var before_1=before$1,before=before_1;function once$1(Be){return before(2,Be)}var once_1=once$1;const once$2=getDefaultExportFromCjs(once_1);var lodash_min={exports:{}};/**
|
|
2912
|
+
`,isAndroid=!!mobile.Android(),isDesktop=mobile.isDesktop(),parser=new UAParser,{browser:browser$1}=parser.getResult(),onFrameEmitter=new EventEmitter$5,whitePoster="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAAAKSURBVHicY2QAAAAEAAIhZK1qAAAAAElFTkSuQmCC",Webcam=React.forwardRef(({className:Be,onPlay:Le,videoSource:Ye,isSelfie:tt=!1,type:nt,permissionMessage:ft,onLog:ht=emptyFunc,stream:gt,onError:At=emptyFunc,token:xt,onStreamReady:Et=async()=>{},showCustomCameraPermissionScreen:yt,assistedOnboarding:Ct,deviceId:kt,onRestartOnboarding:vt=reload,showDoublePermissionsRequest:bt=!1,publishAudio:It=!1,fullHeight:wt=!1,isRecordingEnabled:Rt=!1,isKiosk:Tt=!1,flipVerticallyImage:Bt=!1,isIdv2:Dt=!1,isVideoSelfie:Lt=!1,documentType:Nt=null,zoomLevel:Pt=1,isDeepsightEnabled:Wt,showLoading:$t=!0,poster:Kt=whitePoster,isV2:Vt=!1},Ut)=>{const[_t,Xt]=React.useState(!1),[Qt,jt]=React.useState(gt),[zt,qt]=React.useState(!0),[Gt,e0]=React.useState($t),[s0,t0]=React.useState(Wt),l0=React.useRef(!1),d0=React.useRef({promise:Promise.resolve(),resolve:()=>{},pending:!1}),n0=React.useRef(null),g0=React.useRef(),A0=React.useRef(0),o0=React.useRef(0),r0=React.useRef(0),{t:Yt}=useTranslation$1(),[Mt,Jt]=usePermissions(),a0=React.useRef(),i0=React.useRef(!1),f0=React.useRef(!0),u0=React.useRef(!1),x0=React.useRef(CameraCleanupManager.getInstance());a0.current=Mt;const[p0,D0]=React.useState(!bt);ft=ft||Yt("permissionMessage"),React.useEffect(()=>{a0.current&&!isDesktop&&!Tt&&D0(a0.current)},[Mt]),React.useEffect(()=>{const tn=sessionStorage.getItem("cameraPermissionsGranted")==="true";!isDesktop&&tn&&!Tt&&D0(!0)},[Mt]),React.useEffect(()=>{const tn=document.querySelectorAll(".IncodeDefaultComponentContainer");if(!tn)return;const cn=[];return tn.forEach(yn=>{const Bn=window.getComputedStyle(yn);cn.push({el:yn,overflow:Bn.overflow}),yn.style.overflow="hidden"}),()=>{cn.forEach(({el:yn,overflow:Bn})=>{yn.style.overflow=Bn})}},[]),React.useEffect(()=>()=>{Qt&&x0.current.unregisterStream(Qt)},[Qt]);const L0=()=>{if(!l0.current)return;if(!n0.current){l0.current=!1;return}if(n0.current.paused){l0.current=!1;return}const tn=n0.current.currentTime;tn!==A0.current&&(onFrameEmitter.emit("newFrame"),A0.current=tn,!Rt&&Gt&&e0(!1)),requestAnimationFrame(L0)},z0=async tn=>{if(Pt>1){const cn=tn.getVideoTracks()[0];cn&&await zoomCamera(cn,Pt)}await Et(tn)};useEventListener("visibilitychange",async()=>{var tn,cn;if(document.hidden)return d0.current.pending||(tn=n0.current)==null?void 0:tn.pause();if(!d0.current.pending)return await((cn=n0.current)==null?void 0:cn.play())},document);const q0=async tn=>{const cn=tn.getVideoTracks()[0],yn=await getDeviceCapabilities(),Bn=getChosenCameraInfo(cn,r0.current,Ye),{width:er,height:Qn}=cn.getSettings(),{focusMode:Un=!1}=navigator.mediaDevices.getSupportedConstraints();addEvent({code:"cameraType",payload:{type:"webRTC",resolution:`${er}x${Qn}`,autofocus:Un,label:cn.label},token:xt}),addEvent({code:"cameraDebugInfo",payload:{type:"webRTC",availableCameras:yn,chosenCamera:Bn},token:xt}),tt&&addEvent({code:"cameraSelfie",token:xt})};useOnCameraPermissionChange(tn=>{tn==="denied"&&Xt(!0)});const X0=async tn=>{if(e0(!1),(tn==null?void 0:tn.name)==="NotReadableError"){tn.type="cameraInUse",await x0.current.waitForCameraAvailability(),setTimeout(()=>{r0.current=Math.min(r0.current+1,4),U0(!0)},300);return}if(tn.constructor.name==="DOMException"){const cn=tn.name;switch(cn){case"NotAllowedError":addEvent({code:"permissionDenied",payload:{message:"User denied to use camera.",errorType:cn},token:xt}),ht(getLogObject("permissionDenied",{message:"User denied to use camera.",errorType:cn})),tn.type="permissionDenied",yt?Xt(!0):At(tn);break;case"NotFoundError":tn.type="cameraNotFound",At(tn);break;case"OverconstrainedError":tn.type="cameraConstraintsError",At(tn);break;case"SecurityError":tn.type="cameraSecurityError",At(tn);break;case"AbortError":await x0.current.waitForCameraAvailability(),setTimeout(()=>U0(!0),300);return;default:tn.type="cameraUnknownError",At(tn);break}}else tn.constructor.name==="OverconstrainedError"?(ht(getLogObject("OSVersionNotSupported",{message:"OS version is not supported."})),qt(!1)):(ht(getLogObject("browserNotSupported",{message:"Browser is not supported."})),qt(!1))},T0=async tn=>{if(Jt(!0),x0.current.registerStream(tn),Lt){const cn=async()=>{n0.current.srcObject=tn,await z0(tn),jt(tn),await n0.current.play()},yn=tn.getVideoTracks()[0];onboardingAnalytics.updateCameraInfo(yn);const Bn=await onboardingAnalytics.checkForVirtualCameraByLabel(yn);Bn!=null&&Bn.isDetected&&(Bn.hasPriorDetection||await addDeviceStats(xt,{cameraLabelInspectionStatus:"FAIL"}),At(new Error("Virtual camera is detected"))),mobile.iOS()?yn.applyConstraints({advanced:[{focusDistance:1}]}).finally(()=>{cn()}):cn()}else{const cn=async er=>{u0.current?(n0.current.srcObject=er,jt(er),await z0(er),e0(!1),d0.current.resolve()):(n0.current.autoplay=!1,n0.current.srcObject=er,await MlWasmJSApi$1.prc(),killStream(er),u0.current=!0,await U0())},yn=tn.getVideoTracks()[0];onboardingAnalytics.updateCameraInfo(yn);const Bn=await onboardingAnalytics.checkForVirtualCameraByLabel(yn);Bn!=null&&Bn.isDetected&&(Bn.hasPriorDetection||await addDeviceStats(xt,{cameraLabelInspectionStatus:"FAIL"}),At(new Error("Virtual camera is detected"))),mobile.iOS()?yn.applyConstraints({advanced:[{focusDistance:1}]}).finally(()=>{cn(tn)}):cn(tn)}},_0=tn=>{if(d0.current.pending)return;let cn;const yn=new Promise(Bn=>{cn=()=>{Bn(),d0.current.pending=!1}});d0.current={promise:yn,resolve:cn,pending:!0},tn&&yn.then(()=>{n0.current.play()})},P0=async(tn=!1)=>{if(d0.current.pending)return;const cn=n0.current,yn=cn.srcObject;yn&&(cn.pause(),killStream(yn),cn.srcObject=null),u0.current=!1,l0.current=!1,e0($t),_0(tn),await U0(!0),await d0.current.promise},U0=async tn=>{if(s0){await S0();return}isAndroid&&Ye==="environment"&&Rt&&await x0.current.waitForCameraAvailability(),isAndroid&&Ye==="environment"&&await new Promise(Bn=>setTimeout(Bn,100));const cn=Bn=>{if(Bn.getVideoTracks()[0].readyState==="ended"){const Qn={message:"Camera track ended",errorType:"mediaStreamTrackError",errorDescription:"A MediaStreamTrack ended due to a capture failure"};addEvent({token:xt,code:"error",payload:Qn}),At({...Qn,type:Qn.errorType})}};(async()=>{function Bn(Un){const $n={resizeMode:"none",facingMode:"environment"};switch(Un){case 0:return{...$n,height:{ideal:localStorage.getItem("isIPhone14OrHigher")==="true"?1080:720}};case 1:return{...$n,width:{min:3200,ideal:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 2:return{...$n,width:{min:1400,ideal:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 3:return{...$n,width:{min:640,ideal:640,max:800},height:{min:480,ideal:480,max:600}};case 4:return{...$n,width:{min:640,ideal:800,max:960},height:{min:480,ideal:480,max:480}};default:return{}}}const er=async Un=>{const $n={video:Ye==="environment"?Bn(Un.current):localStorage.getItem("isIPhone14OrHigher")==="true"?{height:{ideal:1080}}:{facingMode:Ye,height:{ideal:480},width:{ideal:640}},audio:It},gn=isSafari()||It,qn={audio:gn,video:{facingMode:"user",deviceId:kt?{exact:kt}:void 0}};if(mobile.isIpad()&&Ye==="user")try{const An=await getNonUltraWideFrontCameraStream();T0(An),await q0(An)}catch(An){At({...An,type:"permissionDenied"})}else isAndroid&&Ye==="environment"?navigator.mediaDevices.getUserMedia($n).then(async An=>{const dn=An.getVideoTracks()[0],Ln=await getCameras(),nr=adjustCamerasFromCameraStream(dn,Ln);An.getTracks().forEach(B0=>B0.stop());let jn=1280,hr=720;if(Un.current>1){const{width:B0,height:Y0}=Bn(Un.current);jn=B0==null?void 0:B0.ideal,hr=Y0==null?void 0:Y0.ideal}const gr={video:{deviceId:{exact:nr.deviceId},width:{ideal:jn},height:{ideal:hr}},audio:gn};navigator.mediaDevices.getUserMedia(gr).then(async B0=>{await q0(B0),T0(B0)})}).catch(async An=>{Un.current=Un.current+1,Un.current>4?await X0(An):er(Un)}):navigator.mediaDevices.getUserMedia(mobile.any()?$n:qn).then(async An=>{await q0(An),cn(An),T0(An)}).catch(async An=>{await X0(An)})};if(!tn&&mobile.iOS()&&i0.current&&!u0.current)return;if(p0===!0||isDesktop||Tt||bt===!1){if(i0.current=!0,gt){T0(gt);return}e0($t),er(r0),addEvent({token:xt,code:"cameraFeedbackDisplayed",payload:{feedback:"Loading..."},module:"ID Capture",screen:`${nt} Camera Capture`})}const Qn=document.createElement("canvas");g0.current=Qn})()};React.useEffect(()=>(_0(!0),U0(),()=>{p0&&(i0.current=!1,gt==null||gt.getTracks().forEach(tn=>tn.stop()))}),[p0,Ye,gt,s0]),React.useImperativeHandle(Ut,()=>({getCanvas:Z0,video:n0.current,stream:Qt,setIsLoadingCamera:e0,resetWebcam:P0,streamUnlocked:f0}));const en=({width:tn=0,height:cn=0,useOriginalDimensions:yn=!0})=>{if(!n0.current||!n0.current.videoHeight||!n0.current.videoWidth||!g0.current||!l0.current)return!1;const Bn=n0.current.currentTime;if(o0.current===Bn)return!1;if(o0.current=Bn,yn)g0.current.width=n0.current.videoWidth,g0.current.height=n0.current.videoHeight;else{if(tn===0||cn===0)return!1;g0.current.width=tn,g0.current.height=cn}const er=g0.current.getContext("2d");return er.clearRect(0,0,g0.current.width,g0.current.height),Bt&&rotateCanvasVertically(g0.current),er.drawImage(n0.current,0,0),!0},Z0=({width:tn=0,height:cn=0,useOriginalDimensions:yn=!0}={})=>en({width:tn,height:cn,useOriginalDimensions:yn})?new IncodeCanvas(g0.current):null,R0=()=>n0.current?n0.current.videoWidth>n0.current.videoHeight:!1,v0=async()=>{(Wt||mobile.Android())&&await S0(),D0(!0),sessionStorage.setItem("cameraPermissionsGranted",String(!0)),addEvent({token:xt,code:"permissionsAllowedCustom"}),addEvent({token:xt,code:"cameraPermissionSubmitted",payload:{requestor:"browser",requestorDetails:browser$1.name,permission:"allowed"},module:"ID capture",screen:`${nt} Camera Capture`})},S0=async()=>{const tn=await onboardingAnalytics.startOnboardingCheck();addEvent({token:xt,code:tn==="granted"?"motionPermissionsGranted":"motionPermissionsRejected"}),tn==="granted"&&await onboardingAnalytics.startMotionSensors(),t0(!1)},H0=()=>{addEvent({token:xt,code:"permissionsQuitFlow"}),setTimeout(()=>{window.location.reload()},0)},M0=()=>{addEvent({token:xt,code:"permissionsDeniedCustom"}),addEvent({token:xt,code:"cameraPermissionSubmitted",payload:{requestor:"browser",requestorDetails:browser$1.name,permission:"denied"},module:"ID capture",screen:`${nt} Camera Capture`})},G0=sessionStorage.getItem("cameraPermissionsGranted")==="true",K0=bt&&(typeof Mt<"u"&&!Mt&&!p0||typeof p0<"u"&&!p0)&&!isDesktop&&!Tt&&!G0,un=()=>{l0.current||(Le&&typeof Le=="function"&&(Le(),e0(!1)),l0.current=!0,requestAnimationFrame(L0))};return jsxRuntimeExports.jsxs(React.Fragment,{children:[!s0&&_t&&jsxRuntimeExports.jsx(AllowCameraUse,{handleAllowCamera:vt}),K0&&jsxRuntimeExports.jsx(FakePermissionsRequest,{handleDenyPermission:M0,handleCameraPermission:v0,handleQuitOnboarding:H0,type:nt,token:xt}),!zt&&jsxRuntimeExports.jsx(BrowserNotSupported,{}),Gt&&!K0&&jsxRuntimeExports.jsx(Loader$1,{isV2:Vt}),jsxRuntimeExports.jsx(Video$1,{"aria-hidden":"true",autoPlay:!1,poster:Kt,className:cx(Be,{selfie:tt,horizontal:R0(),desktop:!mobile.any(),assistedOnboarding:Ct,"full-height":wt,idv2:Dt}),playsInline:!0,onPlay:un,ref:n0,muted:!0}),multiPageDocumentTypes.includes(Nt)&&jsxRuntimeExports.jsx(V5COverlay,{children:jsxRuntimeExports.jsx("img",{src:documentCaptureSVG,alt:"V5C Logbook"})})]})}),captureButton="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='65'%20height='65'%20viewBox='0%200%2065%2065'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%3e%3cg%3e%3cg%20transform='translate(-155%20-646)%20translate(155%20646)'%3e%3ccircle%20cx='32.319'%20cy='32.319'%20r='32.319'%20fill='%2320263D'/%3e%3ccircle%20cx='32.319'%20cy='32.319'%20r='25.137'%20fill='%23FFF'%20fill-opacity='.093'%20stroke='%23FFF'%20stroke-width='2.052'/%3e%3c/g%3e%3cg%20fill='%23FFF'%20fill-rule='nonzero'%3e%3cpath%20d='M17.193%2012.24c0%202.294-1.88%204.16-4.193%204.16-2.312%200-4.192-1.866-4.192-4.16%200-2.293%201.88-4.16%204.192-4.16%202.312%200%204.193%201.867%204.193%204.16zM26%206.334v11.814C26%2019.723%2024.713%2021%2023.125%2021H2.875C1.287%2021%200%2019.723%200%2018.148V6.334C0%204.76%201.287%203.482%202.875%203.482h3.536v-.987C6.411%201.117%207.537%200%208.927%200h8.146c1.39%200%202.516%201.117%202.516%202.495v.986h3.536C24.713%203.482%2026%204.76%2026%206.334zm-6.65%205.906c0-3.473-2.849-6.298-6.35-6.298-3.5%200-6.349%202.825-6.349%206.298S9.5%2018.54%2013%2018.54c3.501%200%206.35-2.826%206.35-6.299z'%20transform='translate(-155%20-646)%20translate(155%20646)%20translate(19%2021)'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",faceFrame$1="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='336'%20height='518'%20viewBox='0%200%20336%20518'%3e%3cpath%20fill='none'%20fill-rule='evenodd'%20stroke='%23FFF'%20stroke-dasharray='7.139999675750732,19.03999967575073'%20stroke-width='9.044'%20d='M168%20513.392c76.83%200%20162.893-113.92%20162.893-254.447S280.236%204.498%20168%204.498%205.107%20118.418%205.107%20258.945%2091.17%20513.392%20168%20513.392z'/%3e%3c/svg%3e";class FaceDetection{constructor(){this.pipelineProfile=null,this.bestCanvas=null,this.bestLandmarks=null,this.bestTopLeft=null,this.bestSize=null,this.currCanvas=null}formatLandmarks(Le,Ye,tt){const[nt,ft,ht,gt,At,xt,Et,yt,Ct,kt]=Le;return{rightEyeX:nt,rightEyeY:ft,leftEyeX:ht,leftEyeY:gt,noseTipX:At,noseTipY:xt,rightMouthX:Et,rightMouthY:yt,mouthX:Ct,mouthY:kt,x:Ye[0],y:Ye[1],width:tt[0],height:tt[1]}}async initialize(Le){const{onNoFace:Ye,onGetReady:tt,onGetReadyFinished:nt,onCapture:ft,onTooManyFaces:ht,onTooClose:gt,onCenterFace:At,onFarAway:xt,onFaceAngle:Et,onDark:yt,onBlur:Ct,onHeadWear:kt,onLenses:vt,onEyesClosed:bt,onFaceMask:It,onSwitchToManualCapture:wt,onFaceOccluded:Rt,isLensesCheckEnabled:Tt,isMaskCheckEnabled:Bt,isClosedEyesCheckEnabled:Dt,isHeadWearCheckEnabled:Lt,isVideoSelfie:Nt,pipelineProfile:Pt,autocaptureTimeout:Wt}=Le;this.pipelineProfile=Pt;const $t=this.pipelineProfile.pipelineType;await MlWasmJSApi$1.setFacePositionConstraints($t,Pt.parameters.frameMinX,Pt.parameters.frameMinY,Pt.parameters.frameMaxX,Pt.parameters.frameMaxY),await MlWasmJSApi$1.setFaceDetectionThresholds($t,Pt.parameters.brightnessThreshold,Pt.parameters.blurrinessThreshold,Pt.parameters.tiltRotationAngleThreshold,Pt.parameters.minMagicCropSize,Wt,Pt.parameters.minFaceQualityScore,Pt.parameters.faceOcclusionThreshold),await MlWasmJSApi$1.setFaceChecksEnabled($t,Tt,Bt,Dt,Lt,Pt.parameters.isOcclusionCheckEnabled),await MlWasmJSApi$1.setFaceAttributesThresholds($t,Pt.parameters.headwearThreshold,Pt.parameters.lensesThreshold,Pt.parameters.closedEyesThreshold,Pt.parameters.maskThreshold),await MlWasmJSApi$1.setFaceDetectionMode($t,Nt);const Kt=()=>{this.bestCanvas.updateBase64Image(),this.bestCanvas.updateBlob(),ft(this.bestCanvas,this.formatLandmarks(this.bestLandmarks,this.bestTopLeft,this.bestSize))},Vt=Ut=>{this.bestCanvas=this.currCanvas.clone();const _t=Ut.rect;this.bestTopLeft=[_t.x,_t.y];const Xt=[_t.x+_t.width,_t.y+_t.height],Qt=this.bestTopLeft,jt=Xt;this.bestSize=[jt[0]-Qt[0],jt[1]-Qt[1]],this.bestLandmarks=[Ut.rightEye.x,Ut.rightEye.y,Ut.leftEye.x,Ut.leftEye.y,Ut.noseTip.x,Ut.noseTip.y,Ut.rightMouthCorner.x,Ut.rightMouthCorner.y,Ut.leftMouthCorner.x,Ut.leftMouthCorner.y]};await MlWasmJSApi$1.setFaceDetectionCallbacks($t,xt,gt,ht,Ye,Kt,tt,nt,At,yt,Ct,Et,Vt,vt,It,bt,kt,wt,Rt)}async detect(Le){try{this.currCanvas=Le,await MlWasmJSApi$1.allocateImageBuffers(Le==null?void 0:Le.width(),Le==null?void 0:Le.height()),await MlWasmJSApi$1.process(Le.getImageData(),this.pipelineProfile.pipelineType),this.currCanvas.release()}catch(Ye){console.error(`Exception: ${Ye}`)}}}function useSelfie({timeout:Be=4e4,onLog:Le=emptyFunc,handleCapture:Ye,numberOfTries:tt=3,handleNoAttemptsLeft:nt=emptyFunc,webcam:ft,isDetecting:ht,onSwitchManualCapture:gt=emptyFunc,onManualCaptureSelfie:At=emptyFunc,assistedOnboarding:xt=!1,notificationTimeout:Et=2e3,hatCheckEnabled:yt=!1,lensesCheckEnabled:Ct=!1,maskCheckEnabled:kt=!1,eyesClosedCheckEnabled:vt=!1,handleStopRecordingLocally:bt=emptyFunc}){var v0;const It=React.useRef(0),wt=React.useRef(!1),Rt=React.useRef(!1),[Tt,Bt]=React.useState(null),[Dt,Lt]=React.useState(""),[Nt,Pt]=React.useState("idle"),[Wt,$t]=React.useState(!1),[Kt,Vt]=React.useState(!1),[Ut,_t]=React.useState(null),Xt=React.useRef(),Qt=React.useRef(gt),jt=React.useRef(null),zt=React.useRef(!1),qt=React.useRef(),{t:Gt}=useTranslation$1();((v0=ft.current)==null?void 0:v0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=ht.current);const e0=React.useCallback(S0=>{qt.current&&clearTimeout(qt.current),Bt(S0),S0&&(qt.current=setTimeout(()=>{Bt(null)},Et))},[Et]),s0=async(S0,H0)=>{var M0;Rt.current||(ht.current=!1,((M0=ft.current)==null?void 0:M0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!1),await sleep(300),Rt.current=!0,Pt("uploading"),await bt(),await Ye(S0,H0))},t0=()=>{var H0,M0;ht.current=!1,((H0=ft.current)==null?void 0:H0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!1);const S0=getLogObject("timeout",{message:"No face found"});Bt(null),(M0=Qt.current)==null||M0.call(Qt),Le(S0),Vt(!0)},l0=()=>{wt.current||(Le(getLogObject("tooFar",{message:Gt("notifications.moveCloser")})),e0(Gt("notifications.moveCloser")))},d0=()=>{wt.current||(Le(getLogObject("tooManyFaces",{message:Gt("notifications.tooManyFaces")})),e0(Gt("notifications.tooManyFaces")))},n0=()=>{wt.current||(Le(getLogObject("centerFace",{message:Gt("notifications.centerFace")})),e0(Gt("notifications.centerFace")))},g0=()=>{Rt.current||wt.current||(Pt("capturing"),Le(getLogObject("dontMove",{message:Gt("notifications.dontMove")})),Bt(Gt("notifications.getReady")),wt.current=!0)},A0=()=>{Bt(""),Pt("idle"),wt.current=!1,Rt.current=!1},o0=()=>{wt.current||Rt.current||e0(Gt("notifications.moveAway"))},r0=()=>{wt.current||Rt.current||e0(Gt("notifications.onDark"))},Yt=()=>{wt.current||Rt.current||e0(Gt("notifications.onBlur"))},Mt=()=>{wt.current||Rt.current||e0(Gt("notifications.onFaceAngle"))},Jt=()=>{wt.current||Rt.current||(Le(getLogObject("headWear",{message:Gt("notifications.removeHeadwear")})),Bt(Gt("notifications.removeHeadwear")))},a0=()=>{wt.current||Rt.current||(Le(getLogObject("lenses",{message:Gt("notifications.removeLenses")})),Bt(Gt(getSelfieTranslation("removeLenses",xt))))},i0=()=>{wt.current||Rt.current||(Le(getLogObject("eyesClosed",{message:Gt("notifications.eyesClosed")})),Bt(Gt(getSelfieTranslation("openEyes",xt))))},f0=()=>{wt.current||Rt.current||(Le(getLogObject("mask",{message:Gt("notifications.mask")})),Bt(Gt(getSelfieTranslation("removeMask",xt))))},u0=()=>{console.log("Face occlusion detected")},x0=async()=>{jt.current=new FaceDetection,await jt.current.initialize({onNoFace:emptyFunc,onCaptureFace:emptyFunc,onTooManyFaces:d0,onTooClose:o0,onCenterFace:n0,onFarAway:l0,onGetReady:g0,onGetReadyFinished:A0,onBlur:Yt,onDark:r0,onFaceAngle:Mt,onHeadWear:Jt,onLenses:a0,onEyesClosed:i0,onFaceMask:f0,onSwitchToManualCapture:t0,onCapture:s0,onFaceOccluded:u0,isLensesCheckEnabled:Ct,isMaskCheckEnabled:kt,isClosedEyesCheckEnabled:vt,isHeadWearCheckEnabled:yt,isVideoSelfie:!1,pipelineProfile:detectionSetup.getProfile(DetectionType.Selfie),autocaptureTimeout:Be})};React.useEffect(()=>{Qt.current=gt},[gt]),React.useEffect(()=>{Vt(!1),J0()},[]);const p0=async({response:S0,livenessPassed:H0,imageBase64:M0})=>{if(It.current=It.current+1,tt!==-1&&It.current>=tt)return nt({response:S0,livenessPassed:H0,imageBase64:M0});Bt(null),Pt("idle"),wt.current=!1,Rt.current=!1},D0=S0=>{const H0=S0.errorMessage||S0.message||S0.reason,{status:M0}=S0;if(_t(M0),M0===3004){Bt(Gt("notifications.faceNotFound")),Lt(Gt("notifications.faceNotFoundDescription")),Le(getLogObject("unableToCrop",{message:`${Gt("notifications.unableToCrop")}`}));return}switch(H0){case"Face not found.":Bt(Gt("notifications.faceNotFound")),Lt(Gt("notifications.faceNotFoundDescription")),Le(getLogObject("faceNotDetected",{message:`${Gt("notifications.faceNotFound")}`}));break;case"No faces found on the image":Bt(Gt("notifications.face")),Le(getLogObject("faceNotDetected",{message:`${Gt("notifications.face")}`}));break;case"BadRequestException: More than one face detected.":Bt(Gt("notifications.multiple")),Le(getLogObject("multipleFacesDetected",{message:`${Gt("notifications.multiple")}`}));break;case"Cropping area goes off the image.":Bt(Gt("notifications.crop")),Le(getLogObject("cropTooSmall",{message:`${Gt("notifications.crop")}`}));break;case"Image in portrait orientation is expected.":Bt(Gt("notifications.portrait")),Le(getLogObject("imageNotPortrait",{message:`${Gt("notifications.portrait")}`}));break;case"Selfie image has low quality":Bt(Gt("notifications.lowQualityImage")),Lt(Gt("notifications.lowQualityImageDescription")),Le(getLogObject("lowQualityImage",{message:`${Gt("notifications.lowQualityImage")}`}));break;default:Le(getLogObject("InternalServerError",{message:`${Gt("notifications.error")}`})),Bt(Gt("notifications.error"));break}},L0=async()=>{if(!(!ht.current||zt.current)){zt.current=!0,jt.current||await x0();try{await MlWasmJSApi$1.handleDetectionCallAndUpdateState(detectionSetup.getProfile(DetectionType.Selfie).pipelineType);const S0=ft.current.getCanvas();await jt.current.detect(S0)}catch(S0){console.error(S0)}finally{zt.current=!1}}};React.useEffect(()=>(onFrameEmitter.on("newFrame",L0),()=>{onFrameEmitter.off("newFrame",L0)}),[L0]);const z0=React.useCallback(()=>{var S0;ht.current||(ht.current=!0,((S0=ft.current)==null?void 0:S0.streamUnlocked)!=null&&(ft.current.streamUnlocked.current=!0))},[Le,x0]),J0=React.useCallback(async()=>{$t(!0),z0()},[z0]);function q0(){At();let S0=null,H0=0;const M0=5;(async()=>{for(;H0<M0&&(S0=ft.current.getCanvas(),!S0);)await sleep(500),H0++;if(!S0)throw D0({errorMessage:"Failed to get canvas after multiple attempts"}),new Error("Failed to get canvas after multiple attempts");S0.updateBase64Image(),S0.updateBlob(),s0(S0,null)})()}const X0=Nt==="capturing",T0=Nt==="uploading",_0=Nt==="success",P0=Nt==="error",U0=X0||T0,en=T0||_0||P0;return{notificationMessage:Tt,notificationDescription:Dt,mode:Nt,capturing:wt,cameraReady:Wt,showManualCapture:Kt,handleFaceAutoCapture:s0,setMode:Pt,resetLoading:p0,setNotificationMessage:Bt,setNotificationDescription:Lt,handleError:D0,autoDetectFace:z0,startAutoDetect:J0,handleManualCapture:q0,isCapturing:X0,isUploading:T0,isSuccess:_0,isError:P0,isLoading:U0,hideCamera:en,showBorders:Wt&&(Nt==="idle"||P0),shouldShowManualCapture:Kt&&!en,selfieTimeoutRef:Xt,errorStatus:Ut}}function createSession$6({apiKey:Be,sessionId:Le,token:Ye,onStreamsUpdated:tt,onConnect:nt,onError:ft,options:ht}={}){if(!Be)throw new Error("Missing apiKey");if(!Le)throw new Error("Missing sessionId");if(!Ye)throw new Error("Missing token");let gt=[],At=Ct=>{gt.findIndex(vt=>vt.id===Ct.stream.id)<0&&(gt.push(Ct.stream),tt(gt))},xt=Ct=>{const kt=gt.findIndex(vt=>vt.id===Ct.stream.id);kt>=0&&(gt.splice(kt,1),tt(gt))},Et={streamCreated:At,streamDestroyed:xt},yt=OT.initSession(Be,Le,ht);return yt.on(Et),yt.connect(Ye,Ct=>{yt&&(Ct&&typeof ft=="function"?ft(Ct):!Ct&&typeof nt=="function"&&nt())}),{session:yt,streams:gt,disconnect(){yt&&(yt.off(Et),yt.disconnect()),gt=null,At=null,xt=null,Et=null,yt=null,this.session=null,this.streams=null}}}let OTSession$4=class extends React.Component{constructor(Le){super(Le),this.state={streams:[]}}getChildContext(){return{session:this.sessionHelper.session,streams:this.state.streams}}componentWillMount(){this.createSession()}componentDidUpdate(Le){(Le.apiKey!==this.props.apiKey||Le.sessionId!==this.props.sessionId||Le.token!==this.props.token)&&this.createSession()}componentWillUnmount(){this.destroySession()}createSession(){this.destroySession(),this.sessionHelper=createSession$6({apiKey:this.props.apiKey,sessionId:this.props.sessionId,token:this.props.token,onStreamsUpdated:Ye=>{this.setState({streams:Ye})},onConnect:this.props.onConnect,onError:this.props.onError,options:this.props.options}),this.props.eventHandlers&&typeof this.props.eventHandlers=="object"&&this.sessionHelper.session.on(this.props.eventHandlers);const{streams:Le}=this.sessionHelper;this.setState({streams:Le})}destroySession(){this.sessionHelper&&(this.props.eventHandlers&&typeof this.props.eventHandlers=="object"&&this.sessionHelper.session.off(this.props.eventHandlers),this.sessionHelper.disconnect())}render(){const Le=typeof this.props.children=="function";return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Le?this.props.children(this.sessionHelper):this.props.children})}};OTSession$4.propTypes={children:PropTypes.oneOfType([PropTypes.element,PropTypes.arrayOf(PropTypes.element),PropTypes.func]).isRequired,apiKey:PropTypes.string.isRequired,sessionId:PropTypes.string.isRequired,token:PropTypes.string.isRequired,eventHandlers:PropTypes.objectOf(PropTypes.func),onConnect:PropTypes.func,onError:PropTypes.func,options:PropTypes.object},OTSession$4.defaultProps={eventHandlers:null,onConnect:null,onError:null,options:{}},OTSession$4.childContextTypes={streams:PropTypes.arrayOf(PropTypes.object),session:PropTypes.shape({subscribe:PropTypes.func,unsubscribe:PropTypes.func})};var reWhitespace=/\s/;function trimmedEndIndex$1(Be){for(var Le=Be.length;Le--&&reWhitespace.test(Be.charAt(Le)););return Le}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(Be){return Be&&Be.slice(0,trimmedEndIndex(Be)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1;function isObject$6(Be){var Le=typeof Be;return Be!=null&&(Le=="object"||Le=="function")}var isObject_1=isObject$6,freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$5=freeGlobal||freeSelf||Function("return this")(),_root=root$5,root$4=_root,Symbol$3=root$4.Symbol,_Symbol=Symbol$3,Symbol$2=_Symbol,objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty,nativeObjectToString$1=objectProto$1.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag$1(Be){var Le=hasOwnProperty$2.call(Be,symToStringTag$1),Ye=Be[symToStringTag$1];try{Be[symToStringTag$1]=void 0;var tt=!0}catch{}var nt=nativeObjectToString$1.call(Be);return tt&&(Le?Be[symToStringTag$1]=Ye:delete Be[symToStringTag$1]),nt}var _getRawTag=getRawTag$1,objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString$2(Be){return nativeObjectToString.call(Be)}var _objectToString=objectToString$2,Symbol$1=_Symbol,getRawTag=_getRawTag,objectToString$1=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag$1(Be){return Be==null?Be===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(Be)?getRawTag(Be):objectToString$1(Be)}var _baseGetTag=baseGetTag$1;function isObjectLike$1(Be){return Be!=null&&typeof Be=="object"}var isObjectLike_1=isObjectLike$1,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$1(Be){return typeof Be=="symbol"||isObjectLike(Be)&&baseGetTag(Be)==symbolTag}var isSymbol_1=isSymbol$1,baseTrim=_baseTrim,isObject$5=isObject_1,isSymbol=isSymbol_1,NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(Be){if(typeof Be=="number")return Be;if(isSymbol(Be))return NAN;if(isObject$5(Be)){var Le=typeof Be.valueOf=="function"?Be.valueOf():Be;Be=isObject$5(Le)?Le+"":Le}if(typeof Be!="string")return Be===0?Be:+Be;Be=baseTrim(Be);var Ye=reIsBinary.test(Be);return Ye||reIsOctal.test(Be)?freeParseInt(Be.slice(2),Ye?2:8):reIsBadHex.test(Be)?NAN:+Be}var toNumber_1=toNumber$1,toNumber=toNumber_1,INFINITY=1/0,MAX_INTEGER=17976931348623157e292;function toFinite$1(Be){if(!Be)return Be===0?Be:0;if(Be=toNumber(Be),Be===INFINITY||Be===-INFINITY){var Le=Be<0?-1:1;return Le*MAX_INTEGER}return Be===Be?Be:0}var toFinite_1=toFinite$1,toFinite=toFinite_1;function toInteger$1(Be){var Le=toFinite(Be),Ye=Le%1;return Le===Le?Ye?Le-Ye:Le:0}var toInteger_1=toInteger$1,toInteger=toInteger_1,FUNC_ERROR_TEXT="Expected a function";function before$1(Be,Le){var Ye;if(typeof Le!="function")throw new TypeError(FUNC_ERROR_TEXT);return Be=toInteger(Be),function(){return--Be>0&&(Ye=Le.apply(this,arguments)),Be<=1&&(Le=void 0),Ye}}var before_1=before$1,before=before_1;function once$1(Be){return before(2,Be)}var once_1=once$1;const once$2=getDefaultExportFromCjs(once_1);var lodash_min={exports:{}};/**
|
|
2913
2913
|
* @license
|
|
2914
2914
|
* Lodash <https://lodash.com/>
|
|
2915
2915
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -4011,7 +4011,7 @@ linearGradient:first-of-type {
|
|
|
4011
4011
|
height: 100%;
|
|
4012
4012
|
display: flex;
|
|
4013
4013
|
flex-direction: column;
|
|
4014
|
-
`,getCircleText=(Be,Le)=>({uploading:Be("notifications.uploading"),success:Be("notifications.done"),error:Le}),Selfie$2=({onError:Be,onSuccess:Le,permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,token:gt,timeout:At,numberOfTries:xt,stream:Et,onlyCapture:yt,showCustomCameraPermissionScreen:Ct,isSecondId:kt,isRecordingEnabled:vt=!1,skipProcessFace:bt=!1,deviceId:It,maskCheckEnabled:wt=!1,eyesClosedCheckEnabled:Rt=!1,hatCheckEnabled:Tt=!1,lensesCheckEnabled:Bt=!1,isDeepsightEnabled:Dt=!1})=>{const Lt=gt==null?void 0:gt.token,Nt=React.useRef(null),Pt=React.useRef(!1),Wt=React.useRef(null),$t=React.useRef(null),[Kt,Vt]=React.useState({}),[Ut,_t]=React.useState(1),Xt=React.useRef({}),{isOnline:Qt}=useOnlineStatus({onOnline:()=>{u0(),isManualCaptureMode=!1,Xt.current.canvas&&l0(Xt.current.canvas,Xt.current.faceCoordinates)},onOffline:()=>{}}),{startRecording:jt,stopRecording:zt,recordingStarted:qt,updateMediaStream:Gt}=useMediaRecorder({token:Lt,type:"selfie"}),{startRecording:e0,stopRecording:s0}=useMediaRecorderLocally();React.useEffect(()=>{isManualCaptureMode=!1},[]),React.useEffect(()=>{Nt.current.streamUnlocked=Pt},[]),React.useEffect(()=>()=>{!Dt&&(zt==null||zt())},[Dt,zt]);async function t0(en){var Z0;if(Ut>=xt){await A0(en);return}Dt&&await((Z0=Nt.current)==null?void 0:Z0.resetWebcam(!0)),_t(Ut+1),await Yt(en),isManualCaptureMode||await u0()}const l0=throttle$2(async(en,Z0)=>{var v0,S0,H0;Xt.current.canvas=en,Xt.current.faceCoordinates=Z0;const R0=en.getBase64Image();try{addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),clearTimeout(q0.current),Jt(""),addEvent({code:"selfieCapture",token:Lt}),await onboardingAnalytics.analyzeFrame(R0),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const M0=selfieType,G0=await MlWasmJSApi$1.encryptImage(R0),{blob:K0,url:un}=en.getBlobData();if(yt)return Le({imageBase64:R0,blob:K0,encryptedImage:G0,url:un});addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),addEvent({token:Lt,code:"captureAttemptFinished",module:"SELFIE",payload:{logs:onboardingAnalytics.getPipelineLogs()}}),addDeviceStats(Lt,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const tn=await capture({token:Lt,image:G0,type:M0,encrypted:!0,faceCoordinates:Z0,metadata:onboardingAnalytics.getMetadata(),recordingId:$t.current}),cn=selfieChecks(tn,{hatCheckEnabled:Tt,lensesCheckEnabled:Bt,maskCheckEnabled:wt,eyesClosedCheckEnabled:Rt});if(cn.hasErrors){addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),r0("error"),logSelfieChecks(tn,cn,ht,Jt,n0,i0,!1),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Vt({response:tn,livenessPassed:cn.livenessPassed,imageBase64:R0}),J0&&(Pt.current=!1,isManualCaptureMode=!0);return}Jt(n0("notifications.processing"));const{faceMatch:yn,existingUser:Bn,...er}=await o0();return addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),ht(getLogObject("successCapture",{response:tn,message:"Selfie uploaded successfully"})),Jt(n0("notifications.success")),await sleep(3500),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Le({...tn,...er,faceMatch:yn,existingUser:Bn,liveness:cn.livenessPassed,imageBase64:R0})}catch(M0){((S0=(v0=M0==null?void 0:M0.response)==null?void 0:v0.data)==null?void 0:S0.error)==="Maximum capture attempts reached"&&_t(xt),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),f0(M0.response?M0.response.data:n0("notifications.serverError")),r0("error"),await sleep(3e3),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Vt({response:(H0=M0==null?void 0:M0.response)==null?void 0:H0.data,livenessPassed:null,imageBase64:R0}),J0&&(Pt.current=!1,isManualCaptureMode=!0)}},300),d0=async()=>{if(!Dt)return;const en=await s0(Lt);$t.current=en},{t:n0}=useTranslation$1(),g0=(en,Z0,R0,v0)=>{updateSession$1({token:Lt,key:"manualSelfieCheckNeeded",value:!0});const S0=getLogObject("skip",{existingUser:en,liveness:Z0,imageBase64:R0,faceMatch:v0});ht(S0),Be(S0)};async function A0({response:en,livenessPassed:Z0,imageBase64:R0}){addEvent({code:"noAttempts",token:Lt}),ht(getLogObject("noAttemps",{response:en,message:"No attempt left"}));const{faceMatch:v0,existingUser:S0}=await o0();return g0(S0,Z0,R0,v0)}async function o0(){if(bt)return{faceMatch:!1};const en=await processFace({token:Lt});kt&&await processFaceSecondId({token:Lt});const Z0=en.confidence===1,R0=en.existingUser;return{faceMatch:Z0,existingUser:R0,...en}}const{setMode:r0,resetLoading:Yt,notificationMessage:Mt,setNotificationMessage:Jt,notificationDescription:a0,setNotificationDescription:i0,handleError:f0,startAutoDetect:u0,handleManualCapture:x0,isSuccess:p0,isError:D0,isLoading:L0,isUploading:z0,shouldShowManualCapture:J0,selfieTimeoutRef:q0,hideCamera:X0}=useSelfie({timeout:At,onLog:ht,handleCapture:l0,handleNoAttemptsLeft:A0,numberOfTries:xt,webcam:Nt,isDetecting:Pt,hatCheckEnabled:Tt,lensesCheckEnabled:Bt,maskCheckEnabled:wt,eyesClosedCheckEnabled:Rt,handleStopRecordingLocally:d0,onSwitchManualCapture:()=>{Jt(""),addEvent({code:"switchToManualCaptureSelfie",token:Lt})},onManualCaptureSelfie:()=>{addEvent({code:"manualCaptureSelfie",token:Lt})}}),T0=async en=>{Wt.current=en,Dt?e0(en):vt&&(qt?await Gt(en):await jt(en))},_0=L0||D0||p0,P0=xt-Ut;if(!Qt)return jsxRuntimeExports.jsx(NoInternetError,{});const U0=()=>P0>0;return jsxRuntimeExports.jsxs(Container$f,{className:"IncodeCaptureDesktopSelfieContainer",children:[jsxRuntimeExports.jsx(SrOnlyHeading,{className:"IncodeCaptureDesktopSelfieHeading",children:n0("selfie.title")}),jsxRuntimeExports.jsxs(SelfieContainer,{className:"IncodeCaptureDesktopSelfieSelfieContainer",children:[jsxRuntimeExports.jsxs(FaceMask$2,{className:"IncodeCaptureDesktopSelfieFaceMask",isCapturing:p0,isLoading:z0,error:D0,isUploading:_0,desktop:!0,children:[z0&&jsxRuntimeExports.jsx(BordersContainer,{className:cx("IncodeCaptureSelfieBordersContainer"),children:jsxRuntimeExports.jsx(LoadingBorders,{className:"IncodeCaptureSelfieLoadingBordersContainer",mode:"uploading"})}),jsxRuntimeExports.jsx(FaceFrame$1,{src:faceFrame$1,alt:"face frame",className:cx("IncodeCaptureDesktopSelfieFaceFrame",{hidden:X0})})]}),jsxRuntimeExports.jsx(Webcam,{className:cx("IncodeCaptureDesktopSelfieWebcam",{error:D0,hidden:X0}),ref:Nt,onPlay:()=>{},videoSource:"user",isSelfie:!0,type:"desktopSelfie",permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,stream:Et,onError:Be,token:Lt,onStreamReady:T0,showCustomCameraPermissionScreen:Ct,deviceId:It,isDeepsightEnabled:Dt}),X0&&z0&&jsxRuntimeExports.jsx(CameraOvalInnerText,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeCaptureSelfieCameraOvalInnerText",{isError:D0}),children:getCircleText(n0,Mt).uploading}),Mt&&!z0&&!D0&&jsxRuntimeExports.jsx(Notification$3,{isLoading:L0,isError:D0,className:"desktop IncodeCaptureDesktopSelfieNotification",children:Mt}),D0&&U0()?jsxRuntimeExports.jsxs(BlockingErrors,{children:[jsxRuntimeExports.jsx("img",{src:warningIcon$1,alt:"Warning icon",width:"32"}),jsxRuntimeExports.jsx(ErrorTitle$1,{className:"IncodeCaptureDesktopSelfieErrorTitle",children:Mt}),jsxRuntimeExports.jsx(ErrorDescription$1,{className:"IncodeCaptureDesktopSelfieErrorDescription",children:a0})]}):D0&&P0===0&&jsxRuntimeExports.jsxs(BlockingErrors,{children:[jsxRuntimeExports.jsx("img",{src:warningIcon$1,alt:"Warning icon",width:"32"}),jsxRuntimeExports.jsx(ErrorTitle$1,{className:"IncodeCaptureDesktopSelfieErrorTitle",children:n0("notifications.selfieCaptureFailed")}),jsxRuntimeExports.jsx(ErrorDescription$1,{className:"IncodeCaptureDesktopSelfieErrorDescription",children:n0("notifications.selfieCaptureFailedDescription")})]}),D0&&jsxRuntimeExports.jsxs(RetryButtonsContainer,{className:"IncodeCaptureDesktopSelfieCaptureRetryButtonsContainer",isDesktop:!0,children:[jsxRuntimeExports.jsx(Button$c,{onClick:async()=>{await t0(Kt)},theme:exports.theme,children:U0()?n0("common.tryAgain"):n0("common.continue")}),U0()&&jsxRuntimeExports.jsxs("div",{children:[P0," ",n0("notifications.attemptsRemaining")]})]}),J0&&jsxRuntimeExports.jsx(CaptureButtonContainer,{className:"IncodeCaptureDesktopSelfieCaptureButtonContainer",initial:{scale:0},animate:{scale:1},children:jsxRuntimeExports.jsx("button",{onClick:x0,type:"button",children:jsxRuntimeExports.jsx("img",{src:CaptureButton,alt:"capture button"})})})]}),jsxRuntimeExports.jsx("canvas",{id:"canvasFrame",hidden:!0})]})};function CaptureAndTutorial$3(Be){const[Le,Ye]=useDeviceId(),[tt,nt]=React.useState(!1),{currentStep:ft,nextStep:ht}=useSteps(),{showTutorial:gt,token:At}=Be;function xt(Et){Et!=="error"&&Ye(Et),nt(!0)}return tt?jsxRuntimeExports.jsxs(Steps,{currentStep:ft,children:[gt&&jsxRuntimeExports.jsx(TutorialSelfie,{className:"IncodeCaptureDesktopSelfieTutorial",...Be,onSuccess:ht}),jsxRuntimeExports.jsx(Selfie$2,{deviceId:Le,...Be})]}):jsxRuntimeExports.jsx(ChooseCamera,{onCameraChosen:xt,token:At==null?void 0:At.token})}const CaptureDesktopSelfie=preloadScript$3(CaptureAndTutorial$3);function Selfie$1(Be){return jsxRuntimeExports.jsx(CaptureSelfie$1,{...Be})}async function handleMotionPermissions$1(){const Be=sessionStorage.getItem("cameraPermissionsGranted")==="true",Le=sessionStorage.getItem("motionSensorsPermissionsRequested")==="true";Be&&!Le&&await onboardingAnalytics.startOnboardingCheck()}function CaptureAndTutorial$2(Be){const{currentStep:Le,nextStep:Ye}=useSteps();return jsxRuntimeExports.jsxs(Steps,{currentStep:Le,children:[Be.showTutorial&&isWebRtcSupported()&&jsxRuntimeExports.jsx(TutorialSelfie,{...Be,onSuccess:async()=>{Be.isDeepsightEnabled&&await handleMotionPermissions$1(),Ye()}}),jsxRuntimeExports.jsx(Selfie$1,{...Be})]})}const TutorialBackHeader=()=>{const{t:Be}=useTranslation$1(),Le=React.useRef();return useAutoFocus(Le),jsxRuntimeExports.jsx("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderBack",children:jsxRuntimeExports.jsx("h1",{className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleBack",tabIndex:-1,"aria-label":Be("tutorial.back.titleLabel"),ref:Le,children:Be("tutorial.back.title")})})};function TutorialBack({onSuccess:Be,token:Le,...Ye}){const tt=()=>mobile.isDesktop()?"https://sdk.incode.com/sdk/tutorials/tutorial-back-desktop.mp4":options.darkMode?"https://sdk.incode.com/sdk/tutorials/back-dark.mp4":"https://sdk.incode.com/sdk/tutorials/back.gif";React.useEffect(()=>{Le!=null&&Le.token&&(addEvent({token:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"Back ID capture tutorial"}),addEvent({token:Le.token,code:"tutorialBackId",payload:{tutorialBackID:!0}}))},[Le]);function nt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"Back ID capture tutorial"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{...Ye,token:Le,src:tt(),next:nt,header:jsxRuntimeExports.jsx(TutorialBackHeader,{}),type:"Back"})}const TutorialCreditCardBackHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.creditCardBack")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.creditCardBack2")})]})};function TutorialCreditCardBack({onSuccess:Be,token:Le,src:Ye="https://sdk.incode.com/sdk/tutorials/card%20back.svg",...tt}){const{t:nt}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialCreditCardBack",payload:{tutorialCreditCardBack:!0}})},[Le.token]);function ft(){addEvent({token:Le==null?void 0:Le.token,code:"continue"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{creditCard:!0,...tt,src:Ye,header:jsxRuntimeExports.jsx(TutorialCreditCardBackHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ft,children:nt("common.continue")})})})}const TutorialCreditCardFrontHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.creditCardFront")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.creditCardFront2")})]})};function TutorialCreditCardFront({onSuccess:Be,token:Le,src:Ye="https://sdk.incode.com/sdk/tutorials/card%20front.svg",...tt}){const{t:nt}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialCreditCard",payload:{tutorialCreditCard:!0}})},[Le.token]);function ft(){addEvent({token:Le==null?void 0:Le.token,code:"continue"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{creditCard:!0,...tt,src:Ye,header:jsxRuntimeExports.jsx(TutorialCreditCardFrontHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ft,children:nt("common.continue")})})})}function isObject$3(Be){return Be!==null&&typeof Be=="object"&&"constructor"in Be&&Be.constructor===Object}function extend$4(Be={},Le={}){Object.keys(Le).forEach(Ye=>{typeof Be[Ye]>"u"?Be[Ye]=Le[Ye]:isObject$3(Le[Ye])&&isObject$3(Be[Ye])&&Object.keys(Le[Ye]).length>0&&extend$4(Be[Ye],Le[Ye])})}const ssrDocument={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function getDocument$1(){const Be=typeof document<"u"?document:{};return extend$4(Be,ssrDocument),Be}const ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(Be){return typeof setTimeout>"u"?(Be(),null):setTimeout(Be,0)},cancelAnimationFrame(Be){typeof setTimeout>"u"||clearTimeout(Be)}};function getWindow(){const Be=typeof window<"u"?window:{};return extend$4(Be,ssrWindow),Be}function deleteProps(Be){const Le=Be;Object.keys(Le).forEach(Ye=>{try{Le[Ye]=null}catch{}try{delete Le[Ye]}catch{}})}function nextTick(Be,Le=0){return setTimeout(Be,Le)}function now(){return Date.now()}function getComputedStyle$1(Be){const Le=getWindow();let Ye;return Le.getComputedStyle&&(Ye=Le.getComputedStyle(Be,null)),!Ye&&Be.currentStyle&&(Ye=Be.currentStyle),Ye||(Ye=Be.style),Ye}function getTranslate(Be,Le="x"){const Ye=getWindow();let tt,nt,ft;const ht=getComputedStyle$1(Be);return Ye.WebKitCSSMatrix?(nt=ht.transform||ht.webkitTransform,nt.split(",").length>6&&(nt=nt.split(", ").map(gt=>gt.replace(",",".")).join(", ")),ft=new Ye.WebKitCSSMatrix(nt==="none"?"":nt)):(ft=ht.MozTransform||ht.OTransform||ht.MsTransform||ht.msTransform||ht.transform||ht.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),tt=ft.toString().split(",")),Le==="x"&&(Ye.WebKitCSSMatrix?nt=ft.m41:tt.length===16?nt=parseFloat(tt[12]):nt=parseFloat(tt[4])),Le==="y"&&(Ye.WebKitCSSMatrix?nt=ft.m42:tt.length===16?nt=parseFloat(tt[13]):nt=parseFloat(tt[5])),nt||0}function isObject$2(Be){return typeof Be=="object"&&Be!==null&&Be.constructor&&Object.prototype.toString.call(Be).slice(8,-1)==="Object"}function isNode(Be){return typeof window<"u"&&typeof window.HTMLElement<"u"?Be instanceof HTMLElement:Be&&(Be.nodeType===1||Be.nodeType===11)}function extend$3(...Be){const Le=Object(Be[0]),Ye=["__proto__","constructor","prototype"];for(let tt=1;tt<Be.length;tt+=1){const nt=Be[tt];if(nt!=null&&!isNode(nt)){const ft=Object.keys(Object(nt)).filter(ht=>Ye.indexOf(ht)<0);for(let ht=0,gt=ft.length;ht<gt;ht+=1){const At=ft[ht],xt=Object.getOwnPropertyDescriptor(nt,At);xt!==void 0&&xt.enumerable&&(isObject$2(Le[At])&&isObject$2(nt[At])?nt[At].__swiper__?Le[At]=nt[At]:extend$3(Le[At],nt[At]):!isObject$2(Le[At])&&isObject$2(nt[At])?(Le[At]={},nt[At].__swiper__?Le[At]=nt[At]:extend$3(Le[At],nt[At])):Le[At]=nt[At])}}}return Le}function setCSSProperty(Be,Le,Ye){Be.style.setProperty(Le,Ye)}function animateCSSModeScroll({swiper:Be,targetPosition:Le,side:Ye}){const tt=getWindow(),nt=-Be.translate;let ft=null,ht;const gt=Be.params.speed;Be.wrapperEl.style.scrollSnapType="none",tt.cancelAnimationFrame(Be.cssModeFrameID);const At=Le>nt?"next":"prev",xt=(yt,Ct)=>At==="next"&&yt>=Ct||At==="prev"&&yt<=Ct,Et=()=>{ht=new Date().getTime(),ft===null&&(ft=ht);const yt=Math.max(Math.min((ht-ft)/gt,1),0),Ct=.5-Math.cos(yt*Math.PI)/2;let kt=nt+Ct*(Le-nt);if(xt(kt,Le)&&(kt=Le),Be.wrapperEl.scrollTo({[Ye]:kt}),xt(kt,Le)){Be.wrapperEl.style.overflow="hidden",Be.wrapperEl.style.scrollSnapType="",setTimeout(()=>{Be.wrapperEl.style.overflow="",Be.wrapperEl.scrollTo({[Ye]:kt})}),tt.cancelAnimationFrame(Be.cssModeFrameID);return}Be.cssModeFrameID=tt.requestAnimationFrame(Et)};Et()}function elementChildren(Be,Le=""){return[...Be.children].filter(Ye=>Ye.matches(Le))}function createElement(Be,Le=[]){const Ye=document.createElement(Be);return Ye.classList.add(...Array.isArray(Le)?Le:[Le]),Ye}function elementPrevAll(Be,Le){const Ye=[];for(;Be.previousElementSibling;){const tt=Be.previousElementSibling;Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),Be=tt}return Ye}function elementNextAll(Be,Le){const Ye=[];for(;Be.nextElementSibling;){const tt=Be.nextElementSibling;Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),Be=tt}return Ye}function elementStyle(Be,Le){return getWindow().getComputedStyle(Be,null).getPropertyValue(Le)}function elementIndex(Be){let Le=Be,Ye;if(Le){for(Ye=0;(Le=Le.previousSibling)!==null;)Le.nodeType===1&&(Ye+=1);return Ye}}function elementParents(Be,Le){const Ye=[];let tt=Be.parentElement;for(;tt;)Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),tt=tt.parentElement;return Ye}function elementOuterSize(Be,Le,Ye){const tt=getWindow();return Be[Le==="width"?"offsetWidth":"offsetHeight"]+parseFloat(tt.getComputedStyle(Be,null).getPropertyValue(Le==="width"?"margin-right":"margin-top"))+parseFloat(tt.getComputedStyle(Be,null).getPropertyValue(Le==="width"?"margin-left":"margin-bottom"))}let support;function calcSupport(){const Be=getWindow(),Le=getDocument$1();return{smoothScroll:Le.documentElement&&Le.documentElement.style&&"scrollBehavior"in Le.documentElement.style,touch:!!("ontouchstart"in Be||Be.DocumentTouch&&Le instanceof Be.DocumentTouch)}}function getSupport(){return support||(support=calcSupport()),support}let deviceCached;function calcDevice({userAgent:Be}={}){const Le=getSupport(),Ye=getWindow(),tt=Ye.navigator.platform,nt=Be||Ye.navigator.userAgent,ft={ios:!1,android:!1},ht=Ye.screen.width,gt=Ye.screen.height,At=nt.match(/(Android);?[\s\/]+([\d.]+)?/);let xt=nt.match(/(iPad).*OS\s([\d_]+)/);const Et=nt.match(/(iPod)(.*OS\s([\d_]+))?/),yt=!xt&&nt.match(/(iPhone\sOS|iOS)\s([\d_]+)/),Ct=tt==="Win32";let kt=tt==="MacIntel";const vt=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!xt&&kt&&Le.touch&&vt.indexOf(`${ht}x${gt}`)>=0&&(xt=nt.match(/(Version)\/([\d.]+)/),xt||(xt=[0,1,"13_0_0"]),kt=!1),At&&!Ct&&(ft.os="android",ft.android=!0),(xt||yt||Et)&&(ft.os="ios",ft.ios=!0),ft}function getDevice(Be={}){return deviceCached||(deviceCached=calcDevice(Be)),deviceCached}let browser;function calcBrowser(){const Be=getWindow();let Le=!1;function Ye(){const tt=Be.navigator.userAgent.toLowerCase();return tt.indexOf("safari")>=0&&tt.indexOf("chrome")<0&&tt.indexOf("android")<0}if(Ye()){const tt=String(Be.navigator.userAgent);if(tt.includes("Version/")){const[nt,ft]=tt.split("Version/")[1].split(" ")[0].split(".").map(ht=>Number(ht));Le=nt<16||nt===16&&ft<2}}return{isSafari:Le||Ye(),needPerspectiveFix:Le,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(Be.navigator.userAgent)}}function getBrowser(){return browser||(browser=calcBrowser()),browser}function Resize({swiper:Be,on:Le,emit:Ye}){const tt=getWindow();let nt=null,ft=null;const ht=()=>{!Be||Be.destroyed||!Be.initialized||(Ye("beforeResize"),Ye("resize"))},gt=()=>{!Be||Be.destroyed||!Be.initialized||(nt=new ResizeObserver(Et=>{ft=tt.requestAnimationFrame(()=>{const{width:yt,height:Ct}=Be;let kt=yt,vt=Ct;Et.forEach(({contentBoxSize:bt,contentRect:It,target:wt})=>{wt&&wt!==Be.el||(kt=It?It.width:(bt[0]||bt).inlineSize,vt=It?It.height:(bt[0]||bt).blockSize)}),(kt!==yt||vt!==Ct)&&ht()})}),nt.observe(Be.el))},At=()=>{ft&&tt.cancelAnimationFrame(ft),nt&&nt.unobserve&&Be.el&&(nt.unobserve(Be.el),nt=null)},xt=()=>{!Be||Be.destroyed||!Be.initialized||Ye("orientationchange")};Le("init",()=>{if(Be.params.resizeObserver&&typeof tt.ResizeObserver<"u"){gt();return}tt.addEventListener("resize",ht),tt.addEventListener("orientationchange",xt)}),Le("destroy",()=>{At(),tt.removeEventListener("resize",ht),tt.removeEventListener("orientationchange",xt)})}function Observer({swiper:Be,extendParams:Le,on:Ye,emit:tt}){const nt=[],ft=getWindow(),ht=(xt,Et={})=>{const yt=ft.MutationObserver||ft.WebkitMutationObserver,Ct=new yt(kt=>{if(Be.__preventObserver__)return;if(kt.length===1){tt("observerUpdate",kt[0]);return}const vt=function(){tt("observerUpdate",kt[0])};ft.requestAnimationFrame?ft.requestAnimationFrame(vt):ft.setTimeout(vt,0)});Ct.observe(xt,{attributes:typeof Et.attributes>"u"?!0:Et.attributes,childList:typeof Et.childList>"u"?!0:Et.childList,characterData:typeof Et.characterData>"u"?!0:Et.characterData}),nt.push(Ct)},gt=()=>{if(Be.params.observer){if(Be.params.observeParents){const xt=elementParents(Be.el);for(let Et=0;Et<xt.length;Et+=1)ht(xt[Et])}ht(Be.el,{childList:Be.params.observeSlideChildren}),ht(Be.wrapperEl,{attributes:!1})}},At=()=>{nt.forEach(xt=>{xt.disconnect()}),nt.splice(0,nt.length)};Le({observer:!1,observeParents:!1,observeSlideChildren:!1}),Ye("init",gt),Ye("destroy",At)}const eventsEmitter={on(Be,Le,Ye){const tt=this;if(!tt.eventsListeners||tt.destroyed||typeof Le!="function")return tt;const nt=Ye?"unshift":"push";return Be.split(" ").forEach(ft=>{tt.eventsListeners[ft]||(tt.eventsListeners[ft]=[]),tt.eventsListeners[ft][nt](Le)}),tt},once(Be,Le,Ye){const tt=this;if(!tt.eventsListeners||tt.destroyed||typeof Le!="function")return tt;function nt(...ft){tt.off(Be,nt),nt.__emitterProxy&&delete nt.__emitterProxy,Le.apply(tt,ft)}return nt.__emitterProxy=Le,tt.on(Be,nt,Ye)},onAny(Be,Le){const Ye=this;if(!Ye.eventsListeners||Ye.destroyed||typeof Be!="function")return Ye;const tt=Le?"unshift":"push";return Ye.eventsAnyListeners.indexOf(Be)<0&&Ye.eventsAnyListeners[tt](Be),Ye},offAny(Be){const Le=this;if(!Le.eventsListeners||Le.destroyed||!Le.eventsAnyListeners)return Le;const Ye=Le.eventsAnyListeners.indexOf(Be);return Ye>=0&&Le.eventsAnyListeners.splice(Ye,1),Le},off(Be,Le){const Ye=this;return!Ye.eventsListeners||Ye.destroyed||!Ye.eventsListeners||Be.split(" ").forEach(tt=>{typeof Le>"u"?Ye.eventsListeners[tt]=[]:Ye.eventsListeners[tt]&&Ye.eventsListeners[tt].forEach((nt,ft)=>{(nt===Le||nt.__emitterProxy&&nt.__emitterProxy===Le)&&Ye.eventsListeners[tt].splice(ft,1)})}),Ye},emit(...Be){const Le=this;if(!Le.eventsListeners||Le.destroyed||!Le.eventsListeners)return Le;let Ye,tt,nt;return typeof Be[0]=="string"||Array.isArray(Be[0])?(Ye=Be[0],tt=Be.slice(1,Be.length),nt=Le):(Ye=Be[0].events,tt=Be[0].data,nt=Be[0].context||Le),tt.unshift(nt),(Array.isArray(Ye)?Ye:Ye.split(" ")).forEach(ht=>{Le.eventsAnyListeners&&Le.eventsAnyListeners.length&&Le.eventsAnyListeners.forEach(gt=>{gt.apply(nt,[ht,...tt])}),Le.eventsListeners&&Le.eventsListeners[ht]&&Le.eventsListeners[ht].forEach(gt=>{gt.apply(nt,tt)})}),Le}};function updateSize(){const Be=this;let Le,Ye;const tt=Be.el;typeof Be.params.width<"u"&&Be.params.width!==null?Le=Be.params.width:Le=tt.clientWidth,typeof Be.params.height<"u"&&Be.params.height!==null?Ye=Be.params.height:Ye=tt.clientHeight,!(Le===0&&Be.isHorizontal()||Ye===0&&Be.isVertical())&&(Le=Le-parseInt(elementStyle(tt,"padding-left")||0,10)-parseInt(elementStyle(tt,"padding-right")||0,10),Ye=Ye-parseInt(elementStyle(tt,"padding-top")||0,10)-parseInt(elementStyle(tt,"padding-bottom")||0,10),Number.isNaN(Le)&&(Le=0),Number.isNaN(Ye)&&(Ye=0),Object.assign(Be,{width:Le,height:Ye,size:Be.isHorizontal()?Le:Ye}))}function updateSlides(){const Be=this;function Le(Kt){return Be.isHorizontal()?Kt:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[Kt]}function Ye(Kt,Vt){return parseFloat(Kt.getPropertyValue(Le(Vt))||0)}const tt=Be.params,{wrapperEl:nt,slidesEl:ft,size:ht,rtlTranslate:gt,wrongRTL:At}=Be,xt=Be.virtual&&tt.virtual.enabled,Et=xt?Be.virtual.slides.length:Be.slides.length,yt=elementChildren(ft,`.${Be.params.slideClass}, swiper-slide`),Ct=xt?Be.virtual.slides.length:yt.length;let kt=[];const vt=[],bt=[];let It=tt.slidesOffsetBefore;typeof It=="function"&&(It=tt.slidesOffsetBefore.call(Be));let wt=tt.slidesOffsetAfter;typeof wt=="function"&&(wt=tt.slidesOffsetAfter.call(Be));const Rt=Be.snapGrid.length,Tt=Be.slidesGrid.length;let Bt=tt.spaceBetween,Dt=-It,Lt=0,Nt=0;if(typeof ht>"u")return;typeof Bt=="string"&&Bt.indexOf("%")>=0?Bt=parseFloat(Bt.replace("%",""))/100*ht:typeof Bt=="string"&&(Bt=parseFloat(Bt)),Be.virtualSize=-Bt,yt.forEach(Kt=>{gt?Kt.style.marginLeft="":Kt.style.marginRight="",Kt.style.marginBottom="",Kt.style.marginTop=""}),tt.centeredSlides&&tt.cssMode&&(setCSSProperty(nt,"--swiper-centered-offset-before",""),setCSSProperty(nt,"--swiper-centered-offset-after",""));const Pt=tt.grid&&tt.grid.rows>1&&Be.grid;Pt&&Be.grid.initSlides(Ct);let Wt;const $t=tt.slidesPerView==="auto"&&tt.breakpoints&&Object.keys(tt.breakpoints).filter(Kt=>typeof tt.breakpoints[Kt].slidesPerView<"u").length>0;for(let Kt=0;Kt<Ct;Kt+=1){Wt=0;let Vt;if(yt[Kt]&&(Vt=yt[Kt]),Pt&&Be.grid.updateSlide(Kt,Vt,Ct,Le),!(yt[Kt]&&elementStyle(Vt,"display")==="none")){if(tt.slidesPerView==="auto"){$t&&(yt[Kt].style[Le("width")]="");const Ut=getComputedStyle(Vt),_t=Vt.style.transform,Xt=Vt.style.webkitTransform;if(_t&&(Vt.style.transform="none"),Xt&&(Vt.style.webkitTransform="none"),tt.roundLengths)Wt=Be.isHorizontal()?elementOuterSize(Vt,"width"):elementOuterSize(Vt,"height");else{const Qt=Ye(Ut,"width"),jt=Ye(Ut,"padding-left"),zt=Ye(Ut,"padding-right"),qt=Ye(Ut,"margin-left"),Gt=Ye(Ut,"margin-right"),e0=Ut.getPropertyValue("box-sizing");if(e0&&e0==="border-box")Wt=Qt+qt+Gt;else{const{clientWidth:s0,offsetWidth:t0}=Vt;Wt=Qt+jt+zt+qt+Gt+(t0-s0)}}_t&&(Vt.style.transform=_t),Xt&&(Vt.style.webkitTransform=Xt),tt.roundLengths&&(Wt=Math.floor(Wt))}else Wt=(ht-(tt.slidesPerView-1)*Bt)/tt.slidesPerView,tt.roundLengths&&(Wt=Math.floor(Wt)),yt[Kt]&&(yt[Kt].style[Le("width")]=`${Wt}px`);yt[Kt]&&(yt[Kt].swiperSlideSize=Wt),bt.push(Wt),tt.centeredSlides?(Dt=Dt+Wt/2+Lt/2+Bt,Lt===0&&Kt!==0&&(Dt=Dt-ht/2-Bt),Kt===0&&(Dt=Dt-ht/2-Bt),Math.abs(Dt)<1/1e3&&(Dt=0),tt.roundLengths&&(Dt=Math.floor(Dt)),Nt%tt.slidesPerGroup===0&&kt.push(Dt),vt.push(Dt)):(tt.roundLengths&&(Dt=Math.floor(Dt)),(Nt-Math.min(Be.params.slidesPerGroupSkip,Nt))%Be.params.slidesPerGroup===0&&kt.push(Dt),vt.push(Dt),Dt=Dt+Wt+Bt),Be.virtualSize+=Wt+Bt,Lt=Wt,Nt+=1}}if(Be.virtualSize=Math.max(Be.virtualSize,ht)+wt,gt&&At&&(tt.effect==="slide"||tt.effect==="coverflow")&&(nt.style.width=`${Be.virtualSize+Bt}px`),tt.setWrapperSize&&(nt.style[Le("width")]=`${Be.virtualSize+Bt}px`),Pt&&Be.grid.updateWrapperSize(Wt,kt,Le),!tt.centeredSlides){const Kt=[];for(let Vt=0;Vt<kt.length;Vt+=1){let Ut=kt[Vt];tt.roundLengths&&(Ut=Math.floor(Ut)),kt[Vt]<=Be.virtualSize-ht&&Kt.push(Ut)}kt=Kt,Math.floor(Be.virtualSize-ht)-Math.floor(kt[kt.length-1])>1&&kt.push(Be.virtualSize-ht)}if(xt&&tt.loop){const Kt=bt[0]+Bt;if(tt.slidesPerGroup>1){const Vt=Math.ceil((Be.virtual.slidesBefore+Be.virtual.slidesAfter)/tt.slidesPerGroup),Ut=Kt*tt.slidesPerGroup;for(let _t=0;_t<Vt;_t+=1)kt.push(kt[kt.length-1]+Ut)}for(let Vt=0;Vt<Be.virtual.slidesBefore+Be.virtual.slidesAfter;Vt+=1)tt.slidesPerGroup===1&&kt.push(kt[kt.length-1]+Kt),vt.push(vt[vt.length-1]+Kt),Be.virtualSize+=Kt}if(kt.length===0&&(kt=[0]),Bt!==0){const Kt=Be.isHorizontal()&>?"marginLeft":Le("marginRight");yt.filter((Vt,Ut)=>!tt.cssMode||tt.loop?!0:Ut!==yt.length-1).forEach(Vt=>{Vt.style[Kt]=`${Bt}px`})}if(tt.centeredSlides&&tt.centeredSlidesBounds){let Kt=0;bt.forEach(Ut=>{Kt+=Ut+(Bt||0)}),Kt-=Bt;const Vt=Kt-ht;kt=kt.map(Ut=>Ut<=0?-It:Ut>Vt?Vt+wt:Ut)}if(tt.centerInsufficientSlides){let Kt=0;if(bt.forEach(Vt=>{Kt+=Vt+(Bt||0)}),Kt-=Bt,Kt<ht){const Vt=(ht-Kt)/2;kt.forEach((Ut,_t)=>{kt[_t]=Ut-Vt}),vt.forEach((Ut,_t)=>{vt[_t]=Ut+Vt})}}if(Object.assign(Be,{slides:yt,snapGrid:kt,slidesGrid:vt,slidesSizesGrid:bt}),tt.centeredSlides&&tt.cssMode&&!tt.centeredSlidesBounds){setCSSProperty(nt,"--swiper-centered-offset-before",`${-kt[0]}px`),setCSSProperty(nt,"--swiper-centered-offset-after",`${Be.size/2-bt[bt.length-1]/2}px`);const Kt=-Be.snapGrid[0],Vt=-Be.slidesGrid[0];Be.snapGrid=Be.snapGrid.map(Ut=>Ut+Kt),Be.slidesGrid=Be.slidesGrid.map(Ut=>Ut+Vt)}if(Ct!==Et&&Be.emit("slidesLengthChange"),kt.length!==Rt&&(Be.params.watchOverflow&&Be.checkOverflow(),Be.emit("snapGridLengthChange")),vt.length!==Tt&&Be.emit("slidesGridLengthChange"),tt.watchSlidesProgress&&Be.updateSlidesOffset(),!xt&&!tt.cssMode&&(tt.effect==="slide"||tt.effect==="fade")){const Kt=`${tt.containerModifierClass}backface-hidden`,Vt=Be.el.classList.contains(Kt);Ct<=tt.maxBackfaceHiddenSlides?Vt||Be.el.classList.add(Kt):Vt&&Be.el.classList.remove(Kt)}}function updateAutoHeight(Be){const Le=this,Ye=[],tt=Le.virtual&&Le.params.virtual.enabled;let nt=0,ft;typeof Be=="number"?Le.setTransition(Be):Be===!0&&Le.setTransition(Le.params.speed);const ht=gt=>tt?Le.slides[Le.getSlideIndexByData(gt)]:Le.slides[gt];if(Le.params.slidesPerView!=="auto"&&Le.params.slidesPerView>1)if(Le.params.centeredSlides)(Le.visibleSlides||[]).forEach(gt=>{Ye.push(gt)});else for(ft=0;ft<Math.ceil(Le.params.slidesPerView);ft+=1){const gt=Le.activeIndex+ft;if(gt>Le.slides.length&&!tt)break;Ye.push(ht(gt))}else Ye.push(ht(Le.activeIndex));for(ft=0;ft<Ye.length;ft+=1)if(typeof Ye[ft]<"u"){const gt=Ye[ft].offsetHeight;nt=gt>nt?gt:nt}(nt||nt===0)&&(Le.wrapperEl.style.height=`${nt}px`)}function updateSlidesOffset(){const Be=this,Le=Be.slides,Ye=Be.isElement?Be.isHorizontal()?Be.wrapperEl.offsetLeft:Be.wrapperEl.offsetTop:0;for(let tt=0;tt<Le.length;tt+=1)Le[tt].swiperSlideOffset=(Be.isHorizontal()?Le[tt].offsetLeft:Le[tt].offsetTop)-Ye-Be.cssOverflowAdjustment()}function updateSlidesProgress(Be=this&&this.translate||0){const Le=this,Ye=Le.params,{slides:tt,rtlTranslate:nt,snapGrid:ft}=Le;if(tt.length===0)return;typeof tt[0].swiperSlideOffset>"u"&&Le.updateSlidesOffset();let ht=-Be;nt&&(ht=Be),tt.forEach(At=>{At.classList.remove(Ye.slideVisibleClass)}),Le.visibleSlidesIndexes=[],Le.visibleSlides=[];let gt=Ye.spaceBetween;typeof gt=="string"&>.indexOf("%")>=0?gt=parseFloat(gt.replace("%",""))/100*Le.size:typeof gt=="string"&&(gt=parseFloat(gt));for(let At=0;At<tt.length;At+=1){const xt=tt[At];let Et=xt.swiperSlideOffset;Ye.cssMode&&Ye.centeredSlides&&(Et-=tt[0].swiperSlideOffset);const yt=(ht+(Ye.centeredSlides?Le.minTranslate():0)-Et)/(xt.swiperSlideSize+gt),Ct=(ht-ft[0]+(Ye.centeredSlides?Le.minTranslate():0)-Et)/(xt.swiperSlideSize+gt),kt=-(ht-Et),vt=kt+Le.slidesSizesGrid[At];(kt>=0&&kt<Le.size-1||vt>1&&vt<=Le.size||kt<=0&&vt>=Le.size)&&(Le.visibleSlides.push(xt),Le.visibleSlidesIndexes.push(At),tt[At].classList.add(Ye.slideVisibleClass)),xt.progress=nt?-yt:yt,xt.originalProgress=nt?-Ct:Ct}}function updateProgress(Be){const Le=this;if(typeof Be>"u"){const Et=Le.rtlTranslate?-1:1;Be=Le&&Le.translate&&Le.translate*Et||0}const Ye=Le.params,tt=Le.maxTranslate()-Le.minTranslate();let{progress:nt,isBeginning:ft,isEnd:ht,progressLoop:gt}=Le;const At=ft,xt=ht;if(tt===0)nt=0,ft=!0,ht=!0;else{nt=(Be-Le.minTranslate())/tt;const Et=Math.abs(Be-Le.minTranslate())<1,yt=Math.abs(Be-Le.maxTranslate())<1;ft=Et||nt<=0,ht=yt||nt>=1,Et&&(nt=0),yt&&(nt=1)}if(Ye.loop){const Et=Le.getSlideIndexByData(0),yt=Le.getSlideIndexByData(Le.slides.length-1),Ct=Le.slidesGrid[Et],kt=Le.slidesGrid[yt],vt=Le.slidesGrid[Le.slidesGrid.length-1],bt=Math.abs(Be);bt>=Ct?gt=(bt-Ct)/vt:gt=(bt+vt-kt)/vt,gt>1&&(gt-=1)}Object.assign(Le,{progress:nt,progressLoop:gt,isBeginning:ft,isEnd:ht}),(Ye.watchSlidesProgress||Ye.centeredSlides&&Ye.autoHeight)&&Le.updateSlidesProgress(Be),ft&&!At&&Le.emit("reachBeginning toEdge"),ht&&!xt&&Le.emit("reachEnd toEdge"),(At&&!ft||xt&&!ht)&&Le.emit("fromEdge"),Le.emit("progress",nt)}function updateSlidesClasses(){const Be=this,{slides:Le,params:Ye,slidesEl:tt,activeIndex:nt}=Be,ft=Be.virtual&&Ye.virtual.enabled,ht=At=>elementChildren(tt,`.${Ye.slideClass}${At}, swiper-slide${At}`)[0];Le.forEach(At=>{At.classList.remove(Ye.slideActiveClass,Ye.slideNextClass,Ye.slidePrevClass)});let gt;if(ft)if(Ye.loop){let At=nt-Be.virtual.slidesBefore;At<0&&(At=Be.virtual.slides.length+At),At>=Be.virtual.slides.length&&(At-=Be.virtual.slides.length),gt=ht(`[data-swiper-slide-index="${At}"]`)}else gt=ht(`[data-swiper-slide-index="${nt}"]`);else gt=Le[nt];if(gt){gt.classList.add(Ye.slideActiveClass);let At=elementNextAll(gt,`.${Ye.slideClass}, swiper-slide`)[0];Ye.loop&&!At&&(At=Le[0]),At&&At.classList.add(Ye.slideNextClass);let xt=elementPrevAll(gt,`.${Ye.slideClass}, swiper-slide`)[0];Ye.loop&&!xt===0&&(xt=Le[Le.length-1]),xt&&xt.classList.add(Ye.slidePrevClass)}Be.emitSlidesClasses()}const processLazyPreloader=(Be,Le)=>{if(!Be||Be.destroyed||!Be.params)return;const Ye=()=>Be.isElement?"swiper-slide":`.${Be.params.slideClass}`,tt=Le.closest(Ye());if(tt){const nt=tt.querySelector(`.${Be.params.lazyPreloaderClass}`);nt&&nt.remove()}},unlazy=(Be,Le)=>{if(!Be.slides[Le])return;const Ye=Be.slides[Le].querySelector('[loading="lazy"]');Ye&&Ye.removeAttribute("loading")},preload=Be=>{if(!Be||Be.destroyed||!Be.params)return;let Le=Be.params.lazyPreloadPrevNext;const Ye=Be.slides.length;if(!Ye||!Le||Le<0)return;Le=Math.min(Le,Ye);const tt=Be.params.slidesPerView==="auto"?Be.slidesPerViewDynamic():Math.ceil(Be.params.slidesPerView),nt=Be.activeIndex;if(Be.params.grid&&Be.params.grid.rows>1){const ht=nt,gt=[ht-Le];gt.push(...Array.from({length:Le}).map((At,xt)=>ht+tt+xt)),Be.slides.forEach((At,xt)=>{gt.includes(At.column)&&unlazy(Be,xt)});return}const ft=nt+tt-1;if(Be.params.rewind||Be.params.loop)for(let ht=nt-Le;ht<=ft+Le;ht+=1){const gt=(ht%Ye+Ye)%Ye;(gt<nt||gt>ft)&&unlazy(Be,gt)}else for(let ht=Math.max(nt-Le,0);ht<=Math.min(ft+Le,Ye-1);ht+=1)ht!==nt&&(ht>ft||ht<nt)&&unlazy(Be,ht)};function getActiveIndexByTranslate(Be){const{slidesGrid:Le,params:Ye}=Be,tt=Be.rtlTranslate?Be.translate:-Be.translate;let nt;for(let ft=0;ft<Le.length;ft+=1)typeof Le[ft+1]<"u"?tt>=Le[ft]&&tt<Le[ft+1]-(Le[ft+1]-Le[ft])/2?nt=ft:tt>=Le[ft]&&tt<Le[ft+1]&&(nt=ft+1):tt>=Le[ft]&&(nt=ft);return Ye.normalizeSlideIndex&&(nt<0||typeof nt>"u")&&(nt=0),nt}function updateActiveIndex(Be){const Le=this,Ye=Le.rtlTranslate?Le.translate:-Le.translate,{snapGrid:tt,params:nt,activeIndex:ft,realIndex:ht,snapIndex:gt}=Le;let At=Be,xt;const Et=Ct=>{let kt=Ct-Le.virtual.slidesBefore;return kt<0&&(kt=Le.virtual.slides.length+kt),kt>=Le.virtual.slides.length&&(kt-=Le.virtual.slides.length),kt};if(typeof At>"u"&&(At=getActiveIndexByTranslate(Le)),tt.indexOf(Ye)>=0)xt=tt.indexOf(Ye);else{const Ct=Math.min(nt.slidesPerGroupSkip,At);xt=Ct+Math.floor((At-Ct)/nt.slidesPerGroup)}if(xt>=tt.length&&(xt=tt.length-1),At===ft){xt!==gt&&(Le.snapIndex=xt,Le.emit("snapIndexChange")),Le.params.loop&&Le.virtual&&Le.params.virtual.enabled&&(Le.realIndex=Et(At));return}let yt;Le.virtual&&nt.virtual.enabled&&nt.loop?yt=Et(At):Le.slides[At]?yt=parseInt(Le.slides[At].getAttribute("data-swiper-slide-index")||At,10):yt=At,Object.assign(Le,{previousSnapIndex:gt,snapIndex:xt,previousRealIndex:ht,realIndex:yt,previousIndex:ft,activeIndex:At}),Le.initialized&&preload(Le),Le.emit("activeIndexChange"),Le.emit("snapIndexChange"),ht!==yt&&Le.emit("realIndexChange"),(Le.initialized||Le.params.runCallbacksOnInit)&&Le.emit("slideChange")}function updateClickedSlide(Be){const Le=this,Ye=Le.params,tt=Be.closest(`.${Ye.slideClass}, swiper-slide`);let nt=!1,ft;if(tt){for(let ht=0;ht<Le.slides.length;ht+=1)if(Le.slides[ht]===tt){nt=!0,ft=ht;break}}if(tt&&nt)Le.clickedSlide=tt,Le.virtual&&Le.params.virtual.enabled?Le.clickedIndex=parseInt(tt.getAttribute("data-swiper-slide-index"),10):Le.clickedIndex=ft;else{Le.clickedSlide=void 0,Le.clickedIndex=void 0;return}Ye.slideToClickedSlide&&Le.clickedIndex!==void 0&&Le.clickedIndex!==Le.activeIndex&&Le.slideToClickedSlide()}const update$2={updateSize,updateSlides,updateAutoHeight,updateSlidesOffset,updateSlidesProgress,updateProgress,updateSlidesClasses,updateActiveIndex,updateClickedSlide};function getSwiperTranslate(Be=this.isHorizontal()?"x":"y"){const Le=this,{params:Ye,rtlTranslate:tt,translate:nt,wrapperEl:ft}=Le;if(Ye.virtualTranslate)return tt?-nt:nt;if(Ye.cssMode)return nt;let ht=getTranslate(ft,Be);return ht+=Le.cssOverflowAdjustment(),tt&&(ht=-ht),ht||0}function setTranslate(Be,Le){const Ye=this,{rtlTranslate:tt,params:nt,wrapperEl:ft,progress:ht}=Ye;let gt=0,At=0;const xt=0;Ye.isHorizontal()?gt=tt?-Be:Be:At=Be,nt.roundLengths&&(gt=Math.floor(gt),At=Math.floor(At)),Ye.previousTranslate=Ye.translate,Ye.translate=Ye.isHorizontal()?gt:At,nt.cssMode?ft[Ye.isHorizontal()?"scrollLeft":"scrollTop"]=Ye.isHorizontal()?-gt:-At:nt.virtualTranslate||(Ye.isHorizontal()?gt-=Ye.cssOverflowAdjustment():At-=Ye.cssOverflowAdjustment(),ft.style.transform=`translate3d(${gt}px, ${At}px, ${xt}px)`);let Et;const yt=Ye.maxTranslate()-Ye.minTranslate();yt===0?Et=0:Et=(Be-Ye.minTranslate())/yt,Et!==ht&&Ye.updateProgress(Be),Ye.emit("setTranslate",Ye.translate,Le)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}function translateTo(Be=0,Le=this.params.speed,Ye=!0,tt=!0,nt){const ft=this,{params:ht,wrapperEl:gt}=ft;if(ft.animating&&ht.preventInteractionOnTransition)return!1;const At=ft.minTranslate(),xt=ft.maxTranslate();let Et;if(tt&&Be>At?Et=At:tt&&Be<xt?Et=xt:Et=Be,ft.updateProgress(Et),ht.cssMode){const yt=ft.isHorizontal();if(Le===0)gt[yt?"scrollLeft":"scrollTop"]=-Et;else{if(!ft.support.smoothScroll)return animateCSSModeScroll({swiper:ft,targetPosition:-Et,side:yt?"left":"top"}),!0;gt.scrollTo({[yt?"left":"top"]:-Et,behavior:"smooth"})}return!0}return Le===0?(ft.setTransition(0),ft.setTranslate(Et),Ye&&(ft.emit("beforeTransitionStart",Le,nt),ft.emit("transitionEnd"))):(ft.setTransition(Le),ft.setTranslate(Et),Ye&&(ft.emit("beforeTransitionStart",Le,nt),ft.emit("transitionStart")),ft.animating||(ft.animating=!0,ft.onTranslateToWrapperTransitionEnd||(ft.onTranslateToWrapperTransitionEnd=function(Ct){!ft||ft.destroyed||Ct.target===this&&(ft.wrapperEl.removeEventListener("transitionend",ft.onTranslateToWrapperTransitionEnd),ft.onTranslateToWrapperTransitionEnd=null,delete ft.onTranslateToWrapperTransitionEnd,Ye&&ft.emit("transitionEnd"))}),ft.wrapperEl.addEventListener("transitionend",ft.onTranslateToWrapperTransitionEnd))),!0}const translate={getTranslate:getSwiperTranslate,setTranslate,minTranslate,maxTranslate,translateTo};function setTransition(Be,Le){const Ye=this;Ye.params.cssMode||(Ye.wrapperEl.style.transitionDuration=`${Be}ms`),Ye.emit("setTransition",Be,Le)}function transitionEmit({swiper:Be,runCallbacks:Le,direction:Ye,step:tt}){const{activeIndex:nt,previousIndex:ft}=Be;let ht=Ye;if(ht||(nt>ft?ht="next":nt<ft?ht="prev":ht="reset"),Be.emit(`transition${tt}`),Le&&nt!==ft){if(ht==="reset"){Be.emit(`slideResetTransition${tt}`);return}Be.emit(`slideChangeTransition${tt}`),ht==="next"?Be.emit(`slideNextTransition${tt}`):Be.emit(`slidePrevTransition${tt}`)}}function transitionStart(Be=!0,Le){const Ye=this,{params:tt}=Ye;tt.cssMode||(tt.autoHeight&&Ye.updateAutoHeight(),transitionEmit({swiper:Ye,runCallbacks:Be,direction:Le,step:"Start"}))}function transitionEnd(Be=!0,Le){const Ye=this,{params:tt}=Ye;Ye.animating=!1,!tt.cssMode&&(Ye.setTransition(0),transitionEmit({swiper:Ye,runCallbacks:Be,direction:Le,step:"End"}))}const transition={setTransition,transitionStart,transitionEnd};function slideTo(Be=0,Le=this.params.speed,Ye=!0,tt,nt){typeof Be=="string"&&(Be=parseInt(Be,10));const ft=this;let ht=Be;ht<0&&(ht=0);const{params:gt,snapGrid:At,slidesGrid:xt,previousIndex:Et,activeIndex:yt,rtlTranslate:Ct,wrapperEl:kt,enabled:vt}=ft;if(ft.animating&>.preventInteractionOnTransition||!vt&&!tt&&!nt)return!1;const bt=Math.min(ft.params.slidesPerGroupSkip,ht);let It=bt+Math.floor((ht-bt)/ft.params.slidesPerGroup);It>=At.length&&(It=At.length-1);const wt=-At[It];if(gt.normalizeSlideIndex)for(let Tt=0;Tt<xt.length;Tt+=1){const Bt=-Math.floor(wt*100),Dt=Math.floor(xt[Tt]*100),Lt=Math.floor(xt[Tt+1]*100);typeof xt[Tt+1]<"u"?Bt>=Dt&&Bt<Lt-(Lt-Dt)/2?ht=Tt:Bt>=Dt&&Bt<Lt&&(ht=Tt+1):Bt>=Dt&&(ht=Tt)}if(ft.initialized&&ht!==yt&&(!ft.allowSlideNext&&(Ct?wt>ft.translate&&wt>ft.minTranslate():wt<ft.translate&&wt<ft.minTranslate())||!ft.allowSlidePrev&&wt>ft.translate&&wt>ft.maxTranslate()&&(yt||0)!==ht))return!1;ht!==(Et||0)&&Ye&&ft.emit("beforeSlideChangeStart"),ft.updateProgress(wt);let Rt;if(ht>yt?Rt="next":ht<yt?Rt="prev":Rt="reset",Ct&&-wt===ft.translate||!Ct&&wt===ft.translate)return ft.updateActiveIndex(ht),gt.autoHeight&&ft.updateAutoHeight(),ft.updateSlidesClasses(),gt.effect!=="slide"&&ft.setTranslate(wt),Rt!=="reset"&&(ft.transitionStart(Ye,Rt),ft.transitionEnd(Ye,Rt)),!1;if(gt.cssMode){const Tt=ft.isHorizontal(),Bt=Ct?wt:-wt;if(Le===0){const Dt=ft.virtual&&ft.params.virtual.enabled;Dt&&(ft.wrapperEl.style.scrollSnapType="none",ft._immediateVirtual=!0),Dt&&!ft._cssModeVirtualInitialSet&&ft.params.initialSlide>0?(ft._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{kt[Tt?"scrollLeft":"scrollTop"]=Bt})):kt[Tt?"scrollLeft":"scrollTop"]=Bt,Dt&&requestAnimationFrame(()=>{ft.wrapperEl.style.scrollSnapType="",ft._immediateVirtual=!1})}else{if(!ft.support.smoothScroll)return animateCSSModeScroll({swiper:ft,targetPosition:Bt,side:Tt?"left":"top"}),!0;kt.scrollTo({[Tt?"left":"top"]:Bt,behavior:"smooth"})}return!0}return ft.setTransition(Le),ft.setTranslate(wt),ft.updateActiveIndex(ht),ft.updateSlidesClasses(),ft.emit("beforeTransitionStart",Le,tt),ft.transitionStart(Ye,Rt),Le===0?ft.transitionEnd(Ye,Rt):ft.animating||(ft.animating=!0,ft.onSlideToWrapperTransitionEnd||(ft.onSlideToWrapperTransitionEnd=function(Bt){!ft||ft.destroyed||Bt.target===this&&(ft.wrapperEl.removeEventListener("transitionend",ft.onSlideToWrapperTransitionEnd),ft.onSlideToWrapperTransitionEnd=null,delete ft.onSlideToWrapperTransitionEnd,ft.transitionEnd(Ye,Rt))}),ft.wrapperEl.addEventListener("transitionend",ft.onSlideToWrapperTransitionEnd)),!0}function slideToLoop(Be=0,Le=this.params.speed,Ye=!0,tt){typeof Be=="string"&&(Be=parseInt(Be,10));const nt=this;let ft=Be;return nt.params.loop&&(nt.virtual&&nt.params.virtual.enabled?ft=ft+nt.virtual.slidesBefore:ft=nt.getSlideIndexByData(ft)),nt.slideTo(ft,Le,Ye,tt)}function slideNext(Be=this.params.speed,Le=!0,Ye){const tt=this,{enabled:nt,params:ft,animating:ht}=tt;if(!nt)return tt;let gt=ft.slidesPerGroup;ft.slidesPerView==="auto"&&ft.slidesPerGroup===1&&ft.slidesPerGroupAuto&&(gt=Math.max(tt.slidesPerViewDynamic("current",!0),1));const At=tt.activeIndex<ft.slidesPerGroupSkip?1:gt,xt=tt.virtual&&ft.virtual.enabled;if(ft.loop){if(ht&&!xt&&ft.loopPreventsSliding)return!1;tt.loopFix({direction:"next"}),tt._clientLeft=tt.wrapperEl.clientLeft}return ft.rewind&&tt.isEnd?tt.slideTo(0,Be,Le,Ye):tt.slideTo(tt.activeIndex+At,Be,Le,Ye)}function slidePrev(Be=this.params.speed,Le=!0,Ye){const tt=this,{params:nt,snapGrid:ft,slidesGrid:ht,rtlTranslate:gt,enabled:At,animating:xt}=tt;if(!At)return tt;const Et=tt.virtual&&nt.virtual.enabled;if(nt.loop){if(xt&&!Et&&nt.loopPreventsSliding)return!1;tt.loopFix({direction:"prev"}),tt._clientLeft=tt.wrapperEl.clientLeft}const yt=gt?tt.translate:-tt.translate;function Ct(wt){return wt<0?-Math.floor(Math.abs(wt)):Math.floor(wt)}const kt=Ct(yt),vt=ft.map(wt=>Ct(wt));let bt=ft[vt.indexOf(kt)-1];if(typeof bt>"u"&&nt.cssMode){let wt;ft.forEach((Rt,Tt)=>{kt>=Rt&&(wt=Tt)}),typeof wt<"u"&&(bt=ft[wt>0?wt-1:wt])}let It=0;if(typeof bt<"u"&&(It=ht.indexOf(bt),It<0&&(It=tt.activeIndex-1),nt.slidesPerView==="auto"&&nt.slidesPerGroup===1&&nt.slidesPerGroupAuto&&(It=It-tt.slidesPerViewDynamic("previous",!0)+1,It=Math.max(It,0))),nt.rewind&&tt.isBeginning){const wt=tt.params.virtual&&tt.params.virtual.enabled&&tt.virtual?tt.virtual.slides.length-1:tt.slides.length-1;return tt.slideTo(wt,Be,Le,Ye)}return tt.slideTo(It,Be,Le,Ye)}function slideReset(Be=this.params.speed,Le=!0,Ye){const tt=this;return tt.slideTo(tt.activeIndex,Be,Le,Ye)}function slideToClosest(Be=this.params.speed,Le=!0,Ye,tt=.5){const nt=this;let ft=nt.activeIndex;const ht=Math.min(nt.params.slidesPerGroupSkip,ft),gt=ht+Math.floor((ft-ht)/nt.params.slidesPerGroup),At=nt.rtlTranslate?nt.translate:-nt.translate;if(At>=nt.snapGrid[gt]){const xt=nt.snapGrid[gt],Et=nt.snapGrid[gt+1];At-xt>(Et-xt)*tt&&(ft+=nt.params.slidesPerGroup)}else{const xt=nt.snapGrid[gt-1],Et=nt.snapGrid[gt];At-xt<=(Et-xt)*tt&&(ft-=nt.params.slidesPerGroup)}return ft=Math.max(ft,0),ft=Math.min(ft,nt.slidesGrid.length-1),nt.slideTo(ft,Be,Le,Ye)}function slideToClickedSlide(){const Be=this,{params:Le,slidesEl:Ye}=Be,tt=Le.slidesPerView==="auto"?Be.slidesPerViewDynamic():Le.slidesPerView;let nt=Be.clickedIndex,ft;const ht=Be.isElement?"swiper-slide":`.${Le.slideClass}`;if(Le.loop){if(Be.animating)return;ft=parseInt(Be.clickedSlide.getAttribute("data-swiper-slide-index"),10),Le.centeredSlides?nt<Be.loopedSlides-tt/2||nt>Be.slides.length-Be.loopedSlides+tt/2?(Be.loopFix(),nt=Be.getSlideIndex(elementChildren(Ye,`${ht}[data-swiper-slide-index="${ft}"]`)[0]),nextTick(()=>{Be.slideTo(nt)})):Be.slideTo(nt):nt>Be.slides.length-tt?(Be.loopFix(),nt=Be.getSlideIndex(elementChildren(Ye,`${ht}[data-swiper-slide-index="${ft}"]`)[0]),nextTick(()=>{Be.slideTo(nt)})):Be.slideTo(nt)}else Be.slideTo(nt)}const slide={slideTo,slideToLoop,slideNext,slidePrev,slideReset,slideToClosest,slideToClickedSlide};function loopCreate(Be){const Le=this,{params:Ye,slidesEl:tt}=Le;if(!Ye.loop||Le.virtual&&Le.params.virtual.enabled)return;elementChildren(tt,`.${Ye.slideClass}, swiper-slide`).forEach((ft,ht)=>{ft.setAttribute("data-swiper-slide-index",ht)}),Le.loopFix({slideRealIndex:Be,direction:Ye.centeredSlides?void 0:"next"})}function loopFix({slideRealIndex:Be,slideTo:Le=!0,direction:Ye,setTranslate:tt,activeSlideIndex:nt,byController:ft,byMousewheel:ht}={}){const gt=this;if(!gt.params.loop)return;gt.emit("beforeLoopFix");const{slides:At,allowSlidePrev:xt,allowSlideNext:Et,slidesEl:yt,params:Ct}=gt;if(gt.allowSlidePrev=!0,gt.allowSlideNext=!0,gt.virtual&&Ct.virtual.enabled){Le&&(!Ct.centeredSlides&>.snapIndex===0?gt.slideTo(gt.virtual.slides.length,0,!1,!0):Ct.centeredSlides&>.snapIndex<Ct.slidesPerView?gt.slideTo(gt.virtual.slides.length+gt.snapIndex,0,!1,!0):gt.snapIndex===gt.snapGrid.length-1&>.slideTo(gt.virtual.slidesBefore,0,!1,!0)),gt.allowSlidePrev=xt,gt.allowSlideNext=Et,gt.emit("loopFix");return}const kt=Ct.slidesPerView==="auto"?gt.slidesPerViewDynamic():Math.ceil(parseFloat(Ct.slidesPerView,10));let vt=Ct.loopedSlides||kt;vt%Ct.slidesPerGroup!==0&&(vt+=Ct.slidesPerGroup-vt%Ct.slidesPerGroup),gt.loopedSlides=vt;const bt=[],It=[];let wt=gt.activeIndex;typeof nt>"u"?nt=gt.getSlideIndex(gt.slides.filter(Lt=>Lt.classList.contains(Ct.slideActiveClass))[0]):wt=nt;const Rt=Ye==="next"||!Ye,Tt=Ye==="prev"||!Ye;let Bt=0,Dt=0;if(nt<vt){Bt=Math.max(vt-nt,Ct.slidesPerGroup);for(let Lt=0;Lt<vt-nt;Lt+=1){const Nt=Lt-Math.floor(Lt/At.length)*At.length;bt.push(At.length-Nt-1)}}else if(nt>gt.slides.length-vt*2){Dt=Math.max(nt-(gt.slides.length-vt*2),Ct.slidesPerGroup);for(let Lt=0;Lt<Dt;Lt+=1){const Nt=Lt-Math.floor(Lt/At.length)*At.length;It.push(Nt)}}if(Tt&&bt.forEach(Lt=>{gt.slides[Lt].swiperLoopMoveDOM=!0,yt.prepend(gt.slides[Lt]),gt.slides[Lt].swiperLoopMoveDOM=!1}),Rt&&It.forEach(Lt=>{gt.slides[Lt].swiperLoopMoveDOM=!0,yt.append(gt.slides[Lt]),gt.slides[Lt].swiperLoopMoveDOM=!1}),gt.recalcSlides(),Ct.slidesPerView==="auto"&>.updateSlides(),Ct.watchSlidesProgress&>.updateSlidesOffset(),Le){if(bt.length>0&&Tt)if(typeof Be>"u"){const Lt=gt.slidesGrid[wt],Pt=gt.slidesGrid[wt+Bt]-Lt;ht?gt.setTranslate(gt.translate-Pt):(gt.slideTo(wt+Bt,0,!1,!0),tt&&(gt.touches[gt.isHorizontal()?"startX":"startY"]+=Pt))}else tt&>.slideToLoop(Be,0,!1,!0);else if(It.length>0&&Rt)if(typeof Be>"u"){const Lt=gt.slidesGrid[wt],Pt=gt.slidesGrid[wt-Dt]-Lt;ht?gt.setTranslate(gt.translate-Pt):(gt.slideTo(wt-Dt,0,!1,!0),tt&&(gt.touches[gt.isHorizontal()?"startX":"startY"]+=Pt))}else gt.slideToLoop(Be,0,!1,!0)}if(gt.allowSlidePrev=xt,gt.allowSlideNext=Et,gt.controller&>.controller.control&&!ft){const Lt={slideRealIndex:Be,slideTo:!1,direction:Ye,setTranslate:tt,activeSlideIndex:nt,byController:!0};Array.isArray(gt.controller.control)?gt.controller.control.forEach(Nt=>{!Nt.destroyed&&Nt.params.loop&&Nt.loopFix(Lt)}):gt.controller.control instanceof gt.constructor&>.controller.control.params.loop&>.controller.control.loopFix(Lt)}gt.emit("loopFix")}function loopDestroy(){const Be=this,{params:Le,slidesEl:Ye}=Be;if(!Le.loop||Be.virtual&&Be.params.virtual.enabled)return;Be.recalcSlides();const tt=[];Be.slides.forEach(nt=>{const ft=typeof nt.swiperSlideIndex>"u"?nt.getAttribute("data-swiper-slide-index")*1:nt.swiperSlideIndex;tt[ft]=nt}),Be.slides.forEach(nt=>{nt.removeAttribute("data-swiper-slide-index")}),tt.forEach(nt=>{Ye.append(nt)}),Be.recalcSlides(),Be.slideTo(Be.realIndex,0)}const loop={loopCreate,loopFix,loopDestroy};function setGrabCursor(Be){const Le=this;if(!Le.params.simulateTouch||Le.params.watchOverflow&&Le.isLocked||Le.params.cssMode)return;const Ye=Le.params.touchEventsTarget==="container"?Le.el:Le.wrapperEl;Le.isElement&&(Le.__preventObserver__=!0),Ye.style.cursor="move",Ye.style.cursor=Be?"grabbing":"grab",Le.isElement&&requestAnimationFrame(()=>{Le.__preventObserver__=!1})}function unsetGrabCursor(){const Be=this;Be.params.watchOverflow&&Be.isLocked||Be.params.cssMode||(Be.isElement&&(Be.__preventObserver__=!0),Be[Be.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",Be.isElement&&requestAnimationFrame(()=>{Be.__preventObserver__=!1}))}const grabCursor={setGrabCursor,unsetGrabCursor};function closestElement(Be,Le=this){function Ye(tt){if(!tt||tt===getDocument$1()||tt===getWindow())return null;tt.assignedSlot&&(tt=tt.assignedSlot);const nt=tt.closest(Be);return!nt&&!tt.getRootNode?null:nt||Ye(tt.getRootNode().host)}return Ye(Le)}function onTouchStart(Be){const Le=this,Ye=getDocument$1(),tt=getWindow(),nt=Le.touchEventsData;nt.evCache.push(Be);const{params:ft,touches:ht,enabled:gt}=Le;if(!gt||!ft.simulateTouch&&Be.pointerType==="mouse"||Le.animating&&ft.preventInteractionOnTransition)return;!Le.animating&&ft.cssMode&&ft.loop&&Le.loopFix();let At=Be;At.originalEvent&&(At=At.originalEvent);let xt=At.target;if(ft.touchEventsTarget==="wrapper"&&!Le.wrapperEl.contains(xt)||"which"in At&&At.which===3||"button"in At&&At.button>0||nt.isTouched&&nt.isMoved)return;const Et=!!ft.noSwipingClass&&ft.noSwipingClass!=="",yt=Be.composedPath?Be.composedPath():Be.path;Et&&At.target&&At.target.shadowRoot&&yt&&(xt=yt[0]);const Ct=ft.noSwipingSelector?ft.noSwipingSelector:`.${ft.noSwipingClass}`,kt=!!(At.target&&At.target.shadowRoot);if(ft.noSwiping&&(kt?closestElement(Ct,xt):xt.closest(Ct))){Le.allowClick=!0;return}if(ft.swipeHandler&&!xt.closest(ft.swipeHandler))return;ht.currentX=At.pageX,ht.currentY=At.pageY;const vt=ht.currentX,bt=ht.currentY,It=ft.edgeSwipeDetection||ft.iOSEdgeSwipeDetection,wt=ft.edgeSwipeThreshold||ft.iOSEdgeSwipeThreshold;if(It&&(vt<=wt||vt>=tt.innerWidth-wt))if(It==="prevent")Be.preventDefault();else return;Object.assign(nt,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),ht.startX=vt,ht.startY=bt,nt.touchStartTime=now(),Le.allowClick=!0,Le.updateSize(),Le.swipeDirection=void 0,ft.threshold>0&&(nt.allowThresholdMove=!1);let Rt=!0;xt.matches(nt.focusableElements)&&(Rt=!1,xt.nodeName==="SELECT"&&(nt.isTouched=!1)),Ye.activeElement&&Ye.activeElement.matches(nt.focusableElements)&&Ye.activeElement!==xt&&Ye.activeElement.blur();const Tt=Rt&&Le.allowTouchMove&&ft.touchStartPreventDefault;(ft.touchStartForcePreventDefault||Tt)&&!xt.isContentEditable&&At.preventDefault(),ft.freeMode&&ft.freeMode.enabled&&Le.freeMode&&Le.animating&&!ft.cssMode&&Le.freeMode.onTouchStart(),Le.emit("touchStart",At)}function onTouchMove(Be){const Le=getDocument$1(),Ye=this,tt=Ye.touchEventsData,{params:nt,touches:ft,rtlTranslate:ht,enabled:gt}=Ye;if(!gt||!nt.simulateTouch&&Be.pointerType==="mouse")return;let At=Be;if(At.originalEvent&&(At=At.originalEvent),!tt.isTouched){tt.startMoving&&tt.isScrolling&&Ye.emit("touchMoveOpposite",At);return}const xt=tt.evCache.findIndex(Lt=>Lt.pointerId===At.pointerId);xt>=0&&(tt.evCache[xt]=At);const Et=tt.evCache.length>1?tt.evCache[0]:At,yt=Et.pageX,Ct=Et.pageY;if(At.preventedByNestedSwiper){ft.startX=yt,ft.startY=Ct;return}if(!Ye.allowTouchMove){At.target.matches(tt.focusableElements)||(Ye.allowClick=!1),tt.isTouched&&(Object.assign(ft,{startX:yt,startY:Ct,prevX:Ye.touches.currentX,prevY:Ye.touches.currentY,currentX:yt,currentY:Ct}),tt.touchStartTime=now());return}if(nt.touchReleaseOnEdges&&!nt.loop){if(Ye.isVertical()){if(Ct<ft.startY&&Ye.translate<=Ye.maxTranslate()||Ct>ft.startY&&Ye.translate>=Ye.minTranslate()){tt.isTouched=!1,tt.isMoved=!1;return}}else if(yt<ft.startX&&Ye.translate<=Ye.maxTranslate()||yt>ft.startX&&Ye.translate>=Ye.minTranslate())return}if(Le.activeElement&&At.target===Le.activeElement&&At.target.matches(tt.focusableElements)){tt.isMoved=!0,Ye.allowClick=!1;return}if(tt.allowTouchCallbacks&&Ye.emit("touchMove",At),At.targetTouches&&At.targetTouches.length>1)return;ft.currentX=yt,ft.currentY=Ct;const kt=ft.currentX-ft.startX,vt=ft.currentY-ft.startY;if(Ye.params.threshold&&Math.sqrt(kt**2+vt**2)<Ye.params.threshold)return;if(typeof tt.isScrolling>"u"){let Lt;Ye.isHorizontal()&&ft.currentY===ft.startY||Ye.isVertical()&&ft.currentX===ft.startX?tt.isScrolling=!1:kt*kt+vt*vt>=25&&(Lt=Math.atan2(Math.abs(vt),Math.abs(kt))*180/Math.PI,tt.isScrolling=Ye.isHorizontal()?Lt>nt.touchAngle:90-Lt>nt.touchAngle)}if(tt.isScrolling&&Ye.emit("touchMoveOpposite",At),typeof tt.startMoving>"u"&&(ft.currentX!==ft.startX||ft.currentY!==ft.startY)&&(tt.startMoving=!0),tt.isScrolling||Ye.zoom&&Ye.params.zoom&&Ye.params.zoom.enabled&&tt.evCache.length>1){tt.isTouched=!1;return}if(!tt.startMoving)return;Ye.allowClick=!1,!nt.cssMode&&At.cancelable&&At.preventDefault(),nt.touchMoveStopPropagation&&!nt.nested&&At.stopPropagation();let bt=Ye.isHorizontal()?kt:vt,It=Ye.isHorizontal()?ft.currentX-ft.previousX:ft.currentY-ft.previousY;nt.oneWayMovement&&(bt=Math.abs(bt)*(ht?1:-1),It=Math.abs(It)*(ht?1:-1)),ft.diff=bt,bt*=nt.touchRatio,ht&&(bt=-bt,It=-It);const wt=Ye.touchesDirection;Ye.swipeDirection=bt>0?"prev":"next",Ye.touchesDirection=It>0?"prev":"next";const Rt=Ye.params.loop&&!nt.cssMode;if(!tt.isMoved){if(Rt&&Ye.loopFix({direction:Ye.swipeDirection}),tt.startTranslate=Ye.getTranslate(),Ye.setTransition(0),Ye.animating){const Lt=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});Ye.wrapperEl.dispatchEvent(Lt)}tt.allowMomentumBounce=!1,nt.grabCursor&&(Ye.allowSlideNext===!0||Ye.allowSlidePrev===!0)&&Ye.setGrabCursor(!0),Ye.emit("sliderFirstMove",At)}let Tt;tt.isMoved&&wt!==Ye.touchesDirection&&Rt&&Math.abs(bt)>=1&&(Ye.loopFix({direction:Ye.swipeDirection,setTranslate:!0}),Tt=!0),Ye.emit("sliderMove",At),tt.isMoved=!0,tt.currentTranslate=bt+tt.startTranslate;let Bt=!0,Dt=nt.resistanceRatio;if(nt.touchReleaseOnEdges&&(Dt=0),bt>0?(Rt&&!Tt&&tt.currentTranslate>(nt.centeredSlides?Ye.minTranslate()-Ye.size/2:Ye.minTranslate())&&Ye.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),tt.currentTranslate>Ye.minTranslate()&&(Bt=!1,nt.resistance&&(tt.currentTranslate=Ye.minTranslate()-1+(-Ye.minTranslate()+tt.startTranslate+bt)**Dt))):bt<0&&(Rt&&!Tt&&tt.currentTranslate<(nt.centeredSlides?Ye.maxTranslate()+Ye.size/2:Ye.maxTranslate())&&Ye.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:Ye.slides.length-(nt.slidesPerView==="auto"?Ye.slidesPerViewDynamic():Math.ceil(parseFloat(nt.slidesPerView,10)))}),tt.currentTranslate<Ye.maxTranslate()&&(Bt=!1,nt.resistance&&(tt.currentTranslate=Ye.maxTranslate()+1-(Ye.maxTranslate()-tt.startTranslate-bt)**Dt))),Bt&&(At.preventedByNestedSwiper=!0),!Ye.allowSlideNext&&Ye.swipeDirection==="next"&&tt.currentTranslate<tt.startTranslate&&(tt.currentTranslate=tt.startTranslate),!Ye.allowSlidePrev&&Ye.swipeDirection==="prev"&&tt.currentTranslate>tt.startTranslate&&(tt.currentTranslate=tt.startTranslate),!Ye.allowSlidePrev&&!Ye.allowSlideNext&&(tt.currentTranslate=tt.startTranslate),nt.threshold>0)if(Math.abs(bt)>nt.threshold||tt.allowThresholdMove){if(!tt.allowThresholdMove){tt.allowThresholdMove=!0,ft.startX=ft.currentX,ft.startY=ft.currentY,tt.currentTranslate=tt.startTranslate,ft.diff=Ye.isHorizontal()?ft.currentX-ft.startX:ft.currentY-ft.startY;return}}else{tt.currentTranslate=tt.startTranslate;return}!nt.followFinger||nt.cssMode||((nt.freeMode&&nt.freeMode.enabled&&Ye.freeMode||nt.watchSlidesProgress)&&(Ye.updateActiveIndex(),Ye.updateSlidesClasses()),nt.freeMode&&nt.freeMode.enabled&&Ye.freeMode&&Ye.freeMode.onTouchMove(),Ye.updateProgress(tt.currentTranslate),Ye.setTranslate(tt.currentTranslate))}function onTouchEnd(Be){const Le=this,Ye=Le.touchEventsData,tt=Ye.evCache.findIndex(Tt=>Tt.pointerId===Be.pointerId);if(tt>=0&&Ye.evCache.splice(tt,1),["pointercancel","pointerout","pointerleave"].includes(Be.type)&&!(Be.type==="pointercancel"&&(Le.browser.isSafari||Le.browser.isWebView)))return;const{params:nt,touches:ft,rtlTranslate:ht,slidesGrid:gt,enabled:At}=Le;if(!At||!nt.simulateTouch&&Be.pointerType==="mouse")return;let xt=Be;if(xt.originalEvent&&(xt=xt.originalEvent),Ye.allowTouchCallbacks&&Le.emit("touchEnd",xt),Ye.allowTouchCallbacks=!1,!Ye.isTouched){Ye.isMoved&&nt.grabCursor&&Le.setGrabCursor(!1),Ye.isMoved=!1,Ye.startMoving=!1;return}nt.grabCursor&&Ye.isMoved&&Ye.isTouched&&(Le.allowSlideNext===!0||Le.allowSlidePrev===!0)&&Le.setGrabCursor(!1);const Et=now(),yt=Et-Ye.touchStartTime;if(Le.allowClick){const Tt=xt.path||xt.composedPath&&xt.composedPath();Le.updateClickedSlide(Tt&&Tt[0]||xt.target),Le.emit("tap click",xt),yt<300&&Et-Ye.lastClickTime<300&&Le.emit("doubleTap doubleClick",xt)}if(Ye.lastClickTime=now(),nextTick(()=>{Le.destroyed||(Le.allowClick=!0)}),!Ye.isTouched||!Ye.isMoved||!Le.swipeDirection||ft.diff===0||Ye.currentTranslate===Ye.startTranslate){Ye.isTouched=!1,Ye.isMoved=!1,Ye.startMoving=!1;return}Ye.isTouched=!1,Ye.isMoved=!1,Ye.startMoving=!1;let Ct;if(nt.followFinger?Ct=ht?Le.translate:-Le.translate:Ct=-Ye.currentTranslate,nt.cssMode)return;if(nt.freeMode&&nt.freeMode.enabled){Le.freeMode.onTouchEnd({currentPos:Ct});return}let kt=0,vt=Le.slidesSizesGrid[0];for(let Tt=0;Tt<gt.length;Tt+=Tt<nt.slidesPerGroupSkip?1:nt.slidesPerGroup){const Bt=Tt<nt.slidesPerGroupSkip-1?1:nt.slidesPerGroup;typeof gt[Tt+Bt]<"u"?Ct>=gt[Tt]&&Ct<gt[Tt+Bt]&&(kt=Tt,vt=gt[Tt+Bt]-gt[Tt]):Ct>=gt[Tt]&&(kt=Tt,vt=gt[gt.length-1]-gt[gt.length-2])}let bt=null,It=null;nt.rewind&&(Le.isBeginning?It=nt.virtual&&nt.virtual.enabled&&Le.virtual?Le.virtual.slides.length-1:Le.slides.length-1:Le.isEnd&&(bt=0));const wt=(Ct-gt[kt])/vt,Rt=kt<nt.slidesPerGroupSkip-1?1:nt.slidesPerGroup;if(yt>nt.longSwipesMs){if(!nt.longSwipes){Le.slideTo(Le.activeIndex);return}Le.swipeDirection==="next"&&(wt>=nt.longSwipesRatio?Le.slideTo(nt.rewind&&Le.isEnd?bt:kt+Rt):Le.slideTo(kt)),Le.swipeDirection==="prev"&&(wt>1-nt.longSwipesRatio?Le.slideTo(kt+Rt):It!==null&&wt<0&&Math.abs(wt)>nt.longSwipesRatio?Le.slideTo(It):Le.slideTo(kt))}else{if(!nt.shortSwipes){Le.slideTo(Le.activeIndex);return}Le.navigation&&(xt.target===Le.navigation.nextEl||xt.target===Le.navigation.prevEl)?xt.target===Le.navigation.nextEl?Le.slideTo(kt+Rt):Le.slideTo(kt):(Le.swipeDirection==="next"&&Le.slideTo(bt!==null?bt:kt+Rt),Le.swipeDirection==="prev"&&Le.slideTo(It!==null?It:kt))}}function onResize(){const Be=this,{params:Le,el:Ye}=Be;if(Ye&&Ye.offsetWidth===0)return;Le.breakpoints&&Be.setBreakpoint();const{allowSlideNext:tt,allowSlidePrev:nt,snapGrid:ft}=Be,ht=Be.virtual&&Be.params.virtual.enabled;Be.allowSlideNext=!0,Be.allowSlidePrev=!0,Be.updateSize(),Be.updateSlides(),Be.updateSlidesClasses();const gt=ht&&Le.loop;(Le.slidesPerView==="auto"||Le.slidesPerView>1)&&Be.isEnd&&!Be.isBeginning&&!Be.params.centeredSlides&&!gt?Be.slideTo(Be.slides.length-1,0,!1,!0):Be.params.loop&&!ht?Be.slideToLoop(Be.realIndex,0,!1,!0):Be.slideTo(Be.activeIndex,0,!1,!0),Be.autoplay&&Be.autoplay.running&&Be.autoplay.paused&&(clearTimeout(Be.autoplay.resizeTimeout),Be.autoplay.resizeTimeout=setTimeout(()=>{Be.autoplay&&Be.autoplay.running&&Be.autoplay.paused&&Be.autoplay.resume()},500)),Be.allowSlidePrev=nt,Be.allowSlideNext=tt,Be.params.watchOverflow&&ft!==Be.snapGrid&&Be.checkOverflow()}function onClick(Be){const Le=this;Le.enabled&&(Le.allowClick||(Le.params.preventClicks&&Be.preventDefault(),Le.params.preventClicksPropagation&&Le.animating&&(Be.stopPropagation(),Be.stopImmediatePropagation())))}function onScroll(){const Be=this,{wrapperEl:Le,rtlTranslate:Ye,enabled:tt}=Be;if(!tt)return;Be.previousTranslate=Be.translate,Be.isHorizontal()?Be.translate=-Le.scrollLeft:Be.translate=-Le.scrollTop,Be.translate===0&&(Be.translate=0),Be.updateActiveIndex(),Be.updateSlidesClasses();let nt;const ft=Be.maxTranslate()-Be.minTranslate();ft===0?nt=0:nt=(Be.translate-Be.minTranslate())/ft,nt!==Be.progress&&Be.updateProgress(Ye?-Be.translate:Be.translate),Be.emit("setTranslate",Be.translate,!1)}function onLoad(Be){const Le=this;processLazyPreloader(Le,Be.target),!(Le.params.cssMode||Le.params.slidesPerView!=="auto"&&!Le.params.autoHeight)&&Le.update()}let dummyEventAttached=!1;function dummyEventListener(){}const events=(Be,Le)=>{const Ye=getDocument$1(),{params:tt,el:nt,wrapperEl:ft,device:ht}=Be,gt=!!tt.nested,At=Le==="on"?"addEventListener":"removeEventListener",xt=Le;nt[At]("pointerdown",Be.onTouchStart,{passive:!1}),Ye[At]("pointermove",Be.onTouchMove,{passive:!1,capture:gt}),Ye[At]("pointerup",Be.onTouchEnd,{passive:!0}),Ye[At]("pointercancel",Be.onTouchEnd,{passive:!0}),Ye[At]("pointerout",Be.onTouchEnd,{passive:!0}),Ye[At]("pointerleave",Be.onTouchEnd,{passive:!0}),(tt.preventClicks||tt.preventClicksPropagation)&&nt[At]("click",Be.onClick,!0),tt.cssMode&&ft[At]("scroll",Be.onScroll),tt.updateOnWindowResize?Be[xt](ht.ios||ht.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0):Be[xt]("observerUpdate",onResize,!0),nt[At]("load",Be.onLoad,{capture:!0})};function attachEvents(){const Be=this,Le=getDocument$1(),{params:Ye}=Be;Be.onTouchStart=onTouchStart.bind(Be),Be.onTouchMove=onTouchMove.bind(Be),Be.onTouchEnd=onTouchEnd.bind(Be),Ye.cssMode&&(Be.onScroll=onScroll.bind(Be)),Be.onClick=onClick.bind(Be),Be.onLoad=onLoad.bind(Be),dummyEventAttached||(Le.addEventListener("touchstart",dummyEventListener),dummyEventAttached=!0),events(Be,"on")}function detachEvents(){events(this,"off")}const events$1={attachEvents,detachEvents},isGridEnabled=(Be,Le)=>Be.grid&&Le.grid&&Le.grid.rows>1;function setBreakpoint(){const Be=this,{realIndex:Le,initialized:Ye,params:tt,el:nt}=Be,ft=tt.breakpoints;if(!ft||ft&&Object.keys(ft).length===0)return;const ht=Be.getBreakpoint(ft,Be.params.breakpointsBase,Be.el);if(!ht||Be.currentBreakpoint===ht)return;const At=(ht in ft?ft[ht]:void 0)||Be.originalParams,xt=isGridEnabled(Be,tt),Et=isGridEnabled(Be,At),yt=tt.enabled;xt&&!Et?(nt.classList.remove(`${tt.containerModifierClass}grid`,`${tt.containerModifierClass}grid-column`),Be.emitContainerClasses()):!xt&&Et&&(nt.classList.add(`${tt.containerModifierClass}grid`),(At.grid.fill&&At.grid.fill==="column"||!At.grid.fill&&tt.grid.fill==="column")&&nt.classList.add(`${tt.containerModifierClass}grid-column`),Be.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(bt=>{if(typeof At[bt]>"u")return;const It=tt[bt]&&tt[bt].enabled,wt=At[bt]&&At[bt].enabled;It&&!wt&&Be[bt].disable(),!It&&wt&&Be[bt].enable()});const Ct=At.direction&&At.direction!==tt.direction,kt=tt.loop&&(At.slidesPerView!==tt.slidesPerView||Ct);Ct&&Ye&&Be.changeDirection(),extend$3(Be.params,At);const vt=Be.params.enabled;Object.assign(Be,{allowTouchMove:Be.params.allowTouchMove,allowSlideNext:Be.params.allowSlideNext,allowSlidePrev:Be.params.allowSlidePrev}),yt&&!vt?Be.disable():!yt&&vt&&Be.enable(),Be.currentBreakpoint=ht,Be.emit("_beforeBreakpoint",At),kt&&Ye&&(Be.loopDestroy(),Be.loopCreate(Le),Be.updateSlides()),Be.emit("breakpoint",At)}function getBreakpoint(Be,Le="window",Ye){if(!Be||Le==="container"&&!Ye)return;let tt=!1;const nt=getWindow(),ft=Le==="window"?nt.innerHeight:Ye.clientHeight,ht=Object.keys(Be).map(gt=>{if(typeof gt=="string"&>.indexOf("@")===0){const At=parseFloat(gt.substr(1));return{value:ft*At,point:gt}}return{value:gt,point:gt}});ht.sort((gt,At)=>parseInt(gt.value,10)-parseInt(At.value,10));for(let gt=0;gt<ht.length;gt+=1){const{point:At,value:xt}=ht[gt];Le==="window"?nt.matchMedia(`(min-width: ${xt}px)`).matches&&(tt=At):xt<=Ye.clientWidth&&(tt=At)}return tt||"max"}const breakpoints={setBreakpoint,getBreakpoint};function prepareClasses(Be,Le){const Ye=[];return Be.forEach(tt=>{typeof tt=="object"?Object.keys(tt).forEach(nt=>{tt[nt]&&Ye.push(Le+nt)}):typeof tt=="string"&&Ye.push(Le+tt)}),Ye}function addClasses(){const Be=this,{classNames:Le,params:Ye,rtl:tt,el:nt,device:ft}=Be,ht=prepareClasses(["initialized",Ye.direction,{"free-mode":Be.params.freeMode&&Ye.freeMode.enabled},{autoheight:Ye.autoHeight},{rtl:tt},{grid:Ye.grid&&Ye.grid.rows>1},{"grid-column":Ye.grid&&Ye.grid.rows>1&&Ye.grid.fill==="column"},{android:ft.android},{ios:ft.ios},{"css-mode":Ye.cssMode},{centered:Ye.cssMode&&Ye.centeredSlides},{"watch-progress":Ye.watchSlidesProgress}],Ye.containerModifierClass);Le.push(...ht),nt.classList.add(...Le),Be.emitContainerClasses()}function removeClasses(){const Be=this,{el:Le,classNames:Ye}=Be;Le.classList.remove(...Ye),Be.emitContainerClasses()}const classes={addClasses,removeClasses};function checkOverflow(){const Be=this,{isLocked:Le,params:Ye}=Be,{slidesOffsetBefore:tt}=Ye;if(tt){const nt=Be.slides.length-1,ft=Be.slidesGrid[nt]+Be.slidesSizesGrid[nt]+tt*2;Be.isLocked=Be.size>ft}else Be.isLocked=Be.snapGrid.length===1;Ye.allowSlideNext===!0&&(Be.allowSlideNext=!Be.isLocked),Ye.allowSlidePrev===!0&&(Be.allowSlidePrev=!Be.isLocked),Le&&Le!==Be.isLocked&&(Be.isEnd=!1),Le!==Be.isLocked&&Be.emit(Be.isLocked?"lock":"unlock")}const checkOverflow$1={checkOverflow},defaults={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function moduleExtendParams(Be,Le){return function(tt={}){const nt=Object.keys(tt)[0],ft=tt[nt];if(typeof ft!="object"||ft===null){extend$3(Le,tt);return}if(["navigation","pagination","scrollbar"].indexOf(nt)>=0&&Be[nt]===!0&&(Be[nt]={auto:!0}),!(nt in Be&&"enabled"in ft)){extend$3(Le,tt);return}Be[nt]===!0&&(Be[nt]={enabled:!0}),typeof Be[nt]=="object"&&!("enabled"in Be[nt])&&(Be[nt].enabled=!0),Be[nt]||(Be[nt]={enabled:!1}),extend$3(Le,tt)}}const prototypes={eventsEmitter,update:update$2,translate,transition,slide,loop,grabCursor,events:events$1,breakpoints,checkOverflow:checkOverflow$1,classes},extendedDefaults={};let Swiper$1=class vo{constructor(...Le){let Ye,tt;Le.length===1&&Le[0].constructor&&Object.prototype.toString.call(Le[0]).slice(8,-1)==="Object"?tt=Le[0]:[Ye,tt]=Le,tt||(tt={}),tt=extend$3({},tt),Ye&&!tt.el&&(tt.el=Ye);const nt=getDocument$1();if(tt.el&&typeof tt.el=="string"&&nt.querySelectorAll(tt.el).length>1){const At=[];return nt.querySelectorAll(tt.el).forEach(xt=>{const Et=extend$3({},tt,{el:xt});At.push(new vo(Et))}),At}const ft=this;ft.__swiper__=!0,ft.support=getSupport(),ft.device=getDevice({userAgent:tt.userAgent}),ft.browser=getBrowser(),ft.eventsListeners={},ft.eventsAnyListeners=[],ft.modules=[...ft.__modules__],tt.modules&&Array.isArray(tt.modules)&&ft.modules.push(...tt.modules);const ht={};ft.modules.forEach(At=>{At({params:tt,swiper:ft,extendParams:moduleExtendParams(tt,ht),on:ft.on.bind(ft),once:ft.once.bind(ft),off:ft.off.bind(ft),emit:ft.emit.bind(ft)})});const gt=extend$3({},defaults,ht);return ft.params=extend$3({},gt,extendedDefaults,tt),ft.originalParams=extend$3({},ft.params),ft.passedParams=extend$3({},tt),ft.params&&ft.params.on&&Object.keys(ft.params.on).forEach(At=>{ft.on(At,ft.params.on[At])}),ft.params&&ft.params.onAny&&ft.onAny(ft.params.onAny),Object.assign(ft,{enabled:ft.params.enabled,el:Ye,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return ft.params.direction==="horizontal"},isVertical(){return ft.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:ft.params.allowSlideNext,allowSlidePrev:ft.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:ft.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:ft.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),ft.emit("_swiper"),ft.params.init&&ft.init(),ft}getSlideIndex(Le){const{slidesEl:Ye,params:tt}=this,nt=elementChildren(Ye,`.${tt.slideClass}, swiper-slide`),ft=elementIndex(nt[0]);return elementIndex(Le)-ft}getSlideIndexByData(Le){return this.getSlideIndex(this.slides.filter(Ye=>Ye.getAttribute("data-swiper-slide-index")*1===Le)[0])}recalcSlides(){const Le=this,{slidesEl:Ye,params:tt}=Le;Le.slides=elementChildren(Ye,`.${tt.slideClass}, swiper-slide`)}enable(){const Le=this;Le.enabled||(Le.enabled=!0,Le.params.grabCursor&&Le.setGrabCursor(),Le.emit("enable"))}disable(){const Le=this;Le.enabled&&(Le.enabled=!1,Le.params.grabCursor&&Le.unsetGrabCursor(),Le.emit("disable"))}setProgress(Le,Ye){const tt=this;Le=Math.min(Math.max(Le,0),1);const nt=tt.minTranslate(),ht=(tt.maxTranslate()-nt)*Le+nt;tt.translateTo(ht,typeof Ye>"u"?0:Ye),tt.updateActiveIndex(),tt.updateSlidesClasses()}emitContainerClasses(){const Le=this;if(!Le.params._emitClasses||!Le.el)return;const Ye=Le.el.className.split(" ").filter(tt=>tt.indexOf("swiper")===0||tt.indexOf(Le.params.containerModifierClass)===0);Le.emit("_containerClasses",Ye.join(" "))}getSlideClasses(Le){const Ye=this;return Ye.destroyed?"":Le.className.split(" ").filter(tt=>tt.indexOf("swiper-slide")===0||tt.indexOf(Ye.params.slideClass)===0).join(" ")}emitSlidesClasses(){const Le=this;if(!Le.params._emitClasses||!Le.el)return;const Ye=[];Le.slides.forEach(tt=>{const nt=Le.getSlideClasses(tt);Ye.push({slideEl:tt,classNames:nt}),Le.emit("_slideClass",tt,nt)}),Le.emit("_slideClasses",Ye)}slidesPerViewDynamic(Le="current",Ye=!1){const tt=this,{params:nt,slides:ft,slidesGrid:ht,slidesSizesGrid:gt,size:At,activeIndex:xt}=tt;let Et=1;if(nt.centeredSlides){let yt=ft[xt]?ft[xt].swiperSlideSize:0,Ct;for(let kt=xt+1;kt<ft.length;kt+=1)ft[kt]&&!Ct&&(yt+=ft[kt].swiperSlideSize,Et+=1,yt>At&&(Ct=!0));for(let kt=xt-1;kt>=0;kt-=1)ft[kt]&&!Ct&&(yt+=ft[kt].swiperSlideSize,Et+=1,yt>At&&(Ct=!0))}else if(Le==="current")for(let yt=xt+1;yt<ft.length;yt+=1)(Ye?ht[yt]+gt[yt]-ht[xt]<At:ht[yt]-ht[xt]<At)&&(Et+=1);else for(let yt=xt-1;yt>=0;yt-=1)ht[xt]-ht[yt]<At&&(Et+=1);return Et}update(){const Le=this;if(!Le||Le.destroyed)return;const{snapGrid:Ye,params:tt}=Le;tt.breakpoints&&Le.setBreakpoint(),[...Le.el.querySelectorAll('[loading="lazy"]')].forEach(ht=>{ht.complete&&processLazyPreloader(Le,ht)}),Le.updateSize(),Le.updateSlides(),Le.updateProgress(),Le.updateSlidesClasses();function nt(){const ht=Le.rtlTranslate?Le.translate*-1:Le.translate,gt=Math.min(Math.max(ht,Le.maxTranslate()),Le.minTranslate());Le.setTranslate(gt),Le.updateActiveIndex(),Le.updateSlidesClasses()}let ft;if(tt.freeMode&&tt.freeMode.enabled&&!tt.cssMode)nt(),tt.autoHeight&&Le.updateAutoHeight();else{if((tt.slidesPerView==="auto"||tt.slidesPerView>1)&&Le.isEnd&&!tt.centeredSlides){const ht=Le.virtual&&tt.virtual.enabled?Le.virtual.slides:Le.slides;ft=Le.slideTo(ht.length-1,0,!1,!0)}else ft=Le.slideTo(Le.activeIndex,0,!1,!0);ft||nt()}tt.watchOverflow&&Ye!==Le.snapGrid&&Le.checkOverflow(),Le.emit("update")}changeDirection(Le,Ye=!0){const tt=this,nt=tt.params.direction;return Le||(Le=nt==="horizontal"?"vertical":"horizontal"),Le===nt||Le!=="horizontal"&&Le!=="vertical"||(tt.el.classList.remove(`${tt.params.containerModifierClass}${nt}`),tt.el.classList.add(`${tt.params.containerModifierClass}${Le}`),tt.emitContainerClasses(),tt.params.direction=Le,tt.slides.forEach(ft=>{Le==="vertical"?ft.style.width="":ft.style.height=""}),tt.emit("changeDirection"),Ye&&tt.update()),tt}changeLanguageDirection(Le){const Ye=this;Ye.rtl&&Le==="rtl"||!Ye.rtl&&Le==="ltr"||(Ye.rtl=Le==="rtl",Ye.rtlTranslate=Ye.params.direction==="horizontal"&&Ye.rtl,Ye.rtl?(Ye.el.classList.add(`${Ye.params.containerModifierClass}rtl`),Ye.el.dir="rtl"):(Ye.el.classList.remove(`${Ye.params.containerModifierClass}rtl`),Ye.el.dir="ltr"),Ye.update())}mount(Le){const Ye=this;if(Ye.mounted)return!0;let tt=Le||Ye.params.el;if(typeof tt=="string"&&(tt=document.querySelector(tt)),!tt)return!1;tt.swiper=Ye,tt.shadowEl&&(Ye.isElement=!0);const nt=()=>`.${(Ye.params.wrapperClass||"").trim().split(" ").join(".")}`;let ht=tt&&tt.shadowRoot&&tt.shadowRoot.querySelector?tt.shadowRoot.querySelector(nt()):elementChildren(tt,nt())[0];return!ht&&Ye.params.createElements&&(ht=createElement("div",Ye.params.wrapperClass),tt.append(ht),elementChildren(tt,`.${Ye.params.slideClass}`).forEach(gt=>{ht.append(gt)})),Object.assign(Ye,{el:tt,wrapperEl:ht,slidesEl:Ye.isElement?tt:ht,mounted:!0,rtl:tt.dir.toLowerCase()==="rtl"||elementStyle(tt,"direction")==="rtl",rtlTranslate:Ye.params.direction==="horizontal"&&(tt.dir.toLowerCase()==="rtl"||elementStyle(tt,"direction")==="rtl"),wrongRTL:elementStyle(ht,"display")==="-webkit-box"}),!0}init(Le){const Ye=this;return Ye.initialized||Ye.mount(Le)===!1||(Ye.emit("beforeInit"),Ye.params.breakpoints&&Ye.setBreakpoint(),Ye.addClasses(),Ye.updateSize(),Ye.updateSlides(),Ye.params.watchOverflow&&Ye.checkOverflow(),Ye.params.grabCursor&&Ye.enabled&&Ye.setGrabCursor(),Ye.params.loop&&Ye.virtual&&Ye.params.virtual.enabled?Ye.slideTo(Ye.params.initialSlide+Ye.virtual.slidesBefore,0,Ye.params.runCallbacksOnInit,!1,!0):Ye.slideTo(Ye.params.initialSlide,0,Ye.params.runCallbacksOnInit,!1,!0),Ye.params.loop&&Ye.loopCreate(),Ye.attachEvents(),[...Ye.el.querySelectorAll('[loading="lazy"]')].forEach(nt=>{nt.complete?processLazyPreloader(Ye,nt):nt.addEventListener("load",ft=>{processLazyPreloader(Ye,ft.target)})}),preload(Ye),Ye.initialized=!0,preload(Ye),Ye.emit("init"),Ye.emit("afterInit")),Ye}destroy(Le=!0,Ye=!0){const tt=this,{params:nt,el:ft,wrapperEl:ht,slides:gt}=tt;return typeof tt.params>"u"||tt.destroyed||(tt.emit("beforeDestroy"),tt.initialized=!1,tt.detachEvents(),nt.loop&&tt.loopDestroy(),Ye&&(tt.removeClasses(),ft.removeAttribute("style"),ht.removeAttribute("style"),gt&>.length&>.forEach(At=>{At.classList.remove(nt.slideVisibleClass,nt.slideActiveClass,nt.slideNextClass,nt.slidePrevClass),At.removeAttribute("style"),At.removeAttribute("data-swiper-slide-index")})),tt.emit("destroy"),Object.keys(tt.eventsListeners).forEach(At=>{tt.off(At)}),Le!==!1&&(tt.el.swiper=null,deleteProps(tt)),tt.destroyed=!0),null}static extendDefaults(Le){extend$3(extendedDefaults,Le)}static get extendedDefaults(){return extendedDefaults}static get defaults(){return defaults}static installModule(Le){vo.prototype.__modules__||(vo.prototype.__modules__=[]);const Ye=vo.prototype.__modules__;typeof Le=="function"&&Ye.indexOf(Le)<0&&Ye.push(Le)}static use(Le){return Array.isArray(Le)?(Le.forEach(Ye=>vo.installModule(Ye)),vo):(vo.installModule(Le),vo)}};Object.keys(prototypes).forEach(Be=>{Object.keys(prototypes[Be]).forEach(Le=>{Swiper$1.prototype[Le]=prototypes[Be][Le]})}),Swiper$1.use([Resize,Observer]);function createElementIfNotDefined(Be,Le,Ye,tt){return Be.params.createElements&&Object.keys(tt).forEach(nt=>{if(!Ye[nt]&&Ye.auto===!0){let ft=elementChildren(Be.el,`.${tt[nt]}`)[0];ft||(ft=createElement("div",tt[nt]),ft.className=tt[nt],Be.el.append(ft)),Ye[nt]=ft,Le[nt]=ft}}),Ye}function classesToSelector(Be=""){return`.${Be.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Pagination({swiper:Be,extendParams:Le,on:Ye,emit:tt}){const nt="swiper-pagination";Le({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:wt=>wt,formatFractionTotal:wt=>wt,bulletClass:`${nt}-bullet`,bulletActiveClass:`${nt}-bullet-active`,modifierClass:`${nt}-`,currentClass:`${nt}-current`,totalClass:`${nt}-total`,hiddenClass:`${nt}-hidden`,progressbarFillClass:`${nt}-progressbar-fill`,progressbarOppositeClass:`${nt}-progressbar-opposite`,clickableClass:`${nt}-clickable`,lockClass:`${nt}-lock`,horizontalClass:`${nt}-horizontal`,verticalClass:`${nt}-vertical`,paginationDisabledClass:`${nt}-disabled`}}),Be.pagination={el:null,bullets:[]};let ft,ht=0;const gt=wt=>(Array.isArray(wt)||(wt=[wt].filter(Rt=>!!Rt)),wt);function At(){return!Be.params.pagination.el||!Be.pagination.el||Array.isArray(Be.pagination.el)&&Be.pagination.el.length===0}function xt(wt,Rt){const{bulletActiveClass:Tt}=Be.params.pagination;wt&&(wt=wt[`${Rt==="prev"?"previous":"next"}ElementSibling`],wt&&(wt.classList.add(`${Tt}-${Rt}`),wt=wt[`${Rt==="prev"?"previous":"next"}ElementSibling`],wt&&wt.classList.add(`${Tt}-${Rt}-${Rt}`)))}function Et(wt){const Rt=wt.target.closest(classesToSelector(Be.params.pagination.bulletClass));if(!Rt)return;wt.preventDefault();const Tt=elementIndex(Rt)*Be.params.slidesPerGroup;if(Be.params.loop){if(Be.realIndex===Tt)return;const Bt=Be.getSlideIndexByData(Tt),Dt=Be.getSlideIndexByData(Be.realIndex);Bt>Be.slides.length-Be.loopedSlides&&Be.loopFix({direction:Bt>Dt?"next":"prev",activeSlideIndex:Bt,slideTo:!1}),Be.slideToLoop(Tt)}else Be.slideTo(Tt)}function yt(){const wt=Be.rtl,Rt=Be.params.pagination;if(At())return;let Tt=Be.pagination.el;Tt=gt(Tt);let Bt,Dt;const Lt=Be.virtual&&Be.params.virtual.enabled?Be.virtual.slides.length:Be.slides.length,Nt=Be.params.loop?Math.ceil(Lt/Be.params.slidesPerGroup):Be.snapGrid.length;if(Be.params.loop?(Dt=Be.previousRealIndex||0,Bt=Be.params.slidesPerGroup>1?Math.floor(Be.realIndex/Be.params.slidesPerGroup):Be.realIndex):typeof Be.snapIndex<"u"?(Bt=Be.snapIndex,Dt=Be.previousSnapIndex):(Dt=Be.previousIndex||0,Bt=Be.activeIndex||0),Rt.type==="bullets"&&Be.pagination.bullets&&Be.pagination.bullets.length>0){const Pt=Be.pagination.bullets;let Wt,$t,Kt;if(Rt.dynamicBullets&&(ft=elementOuterSize(Pt[0],Be.isHorizontal()?"width":"height"),Tt.forEach(Vt=>{Vt.style[Be.isHorizontal()?"width":"height"]=`${ft*(Rt.dynamicMainBullets+4)}px`}),Rt.dynamicMainBullets>1&&Dt!==void 0&&(ht+=Bt-(Dt||0),ht>Rt.dynamicMainBullets-1?ht=Rt.dynamicMainBullets-1:ht<0&&(ht=0)),Wt=Math.max(Bt-ht,0),$t=Wt+(Math.min(Pt.length,Rt.dynamicMainBullets)-1),Kt=($t+Wt)/2),Pt.forEach(Vt=>{const Ut=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(_t=>`${Rt.bulletActiveClass}${_t}`)].map(_t=>typeof _t=="string"&&_t.includes(" ")?_t.split(" "):_t).flat();Vt.classList.remove(...Ut)}),Tt.length>1)Pt.forEach(Vt=>{const Ut=elementIndex(Vt);Ut===Bt?Vt.classList.add(...Rt.bulletActiveClass.split(" ")):Be.isElement&&Vt.setAttribute("part","bullet"),Rt.dynamicBullets&&(Ut>=Wt&&Ut<=$t&&Vt.classList.add(...`${Rt.bulletActiveClass}-main`.split(" ")),Ut===Wt&&xt(Vt,"prev"),Ut===$t&&xt(Vt,"next"))});else{const Vt=Pt[Bt];if(Vt&&Vt.classList.add(...Rt.bulletActiveClass.split(" ")),Be.isElement&&Pt.forEach((Ut,_t)=>{Ut.setAttribute("part",_t===Bt?"bullet-active":"bullet")}),Rt.dynamicBullets){const Ut=Pt[Wt],_t=Pt[$t];for(let Xt=Wt;Xt<=$t;Xt+=1)Pt[Xt]&&Pt[Xt].classList.add(...`${Rt.bulletActiveClass}-main`.split(" "));xt(Ut,"prev"),xt(_t,"next")}}if(Rt.dynamicBullets){const Vt=Math.min(Pt.length,Rt.dynamicMainBullets+4),Ut=(ft*Vt-ft)/2-Kt*ft,_t=wt?"right":"left";Pt.forEach(Xt=>{Xt.style[Be.isHorizontal()?_t:"top"]=`${Ut}px`})}}Tt.forEach((Pt,Wt)=>{if(Rt.type==="fraction"&&(Pt.querySelectorAll(classesToSelector(Rt.currentClass)).forEach($t=>{$t.textContent=Rt.formatFractionCurrent(Bt+1)}),Pt.querySelectorAll(classesToSelector(Rt.totalClass)).forEach($t=>{$t.textContent=Rt.formatFractionTotal(Nt)})),Rt.type==="progressbar"){let $t;Rt.progressbarOpposite?$t=Be.isHorizontal()?"vertical":"horizontal":$t=Be.isHorizontal()?"horizontal":"vertical";const Kt=(Bt+1)/Nt;let Vt=1,Ut=1;$t==="horizontal"?Vt=Kt:Ut=Kt,Pt.querySelectorAll(classesToSelector(Rt.progressbarFillClass)).forEach(_t=>{_t.style.transform=`translate3d(0,0,0) scaleX(${Vt}) scaleY(${Ut})`,_t.style.transitionDuration=`${Be.params.speed}ms`})}Rt.type==="custom"&&Rt.renderCustom?(Pt.innerHTML=Rt.renderCustom(Be,Bt+1,Nt),Wt===0&&tt("paginationRender",Pt)):(Wt===0&&tt("paginationRender",Pt),tt("paginationUpdate",Pt)),Be.params.watchOverflow&&Be.enabled&&Pt.classList[Be.isLocked?"add":"remove"](Rt.lockClass)})}function Ct(){const wt=Be.params.pagination;if(At())return;const Rt=Be.virtual&&Be.params.virtual.enabled?Be.virtual.slides.length:Be.slides.length;let Tt=Be.pagination.el;Tt=gt(Tt);let Bt="";if(wt.type==="bullets"){let Dt=Be.params.loop?Math.ceil(Rt/Be.params.slidesPerGroup):Be.snapGrid.length;Be.params.freeMode&&Be.params.freeMode.enabled&&Dt>Rt&&(Dt=Rt);for(let Lt=0;Lt<Dt;Lt+=1)wt.renderBullet?Bt+=wt.renderBullet.call(Be,Lt,wt.bulletClass):Bt+=`<${wt.bulletElement} ${Be.isElement?'part="bullet"':""} class="${wt.bulletClass}"></${wt.bulletElement}>`}wt.type==="fraction"&&(wt.renderFraction?Bt=wt.renderFraction.call(Be,wt.currentClass,wt.totalClass):Bt=`<span class="${wt.currentClass}"></span> / <span class="${wt.totalClass}"></span>`),wt.type==="progressbar"&&(wt.renderProgressbar?Bt=wt.renderProgressbar.call(Be,wt.progressbarFillClass):Bt=`<span class="${wt.progressbarFillClass}"></span>`),Be.pagination.bullets=[],Tt.forEach(Dt=>{wt.type!=="custom"&&(Dt.innerHTML=Bt||""),wt.type==="bullets"&&Be.pagination.bullets.push(...Dt.querySelectorAll(classesToSelector(wt.bulletClass)))}),wt.type!=="custom"&&tt("paginationRender",Tt[0])}function kt(){Be.params.pagination=createElementIfNotDefined(Be,Be.originalParams.pagination,Be.params.pagination,{el:"swiper-pagination"});const wt=Be.params.pagination;if(!wt.el)return;let Rt;typeof wt.el=="string"&&Be.isElement&&(Rt=Be.el.shadowRoot.querySelector(wt.el)),!Rt&&typeof wt.el=="string"&&(Rt=[...document.querySelectorAll(wt.el)]),Rt||(Rt=wt.el),!(!Rt||Rt.length===0)&&(Be.params.uniqueNavElements&&typeof wt.el=="string"&&Array.isArray(Rt)&&Rt.length>1&&(Rt=[...Be.el.querySelectorAll(wt.el)],Rt.length>1&&(Rt=Rt.filter(Tt=>elementParents(Tt,".swiper")[0]===Be.el)[0])),Array.isArray(Rt)&&Rt.length===1&&(Rt=Rt[0]),Object.assign(Be.pagination,{el:Rt}),Rt=gt(Rt),Rt.forEach(Tt=>{wt.type==="bullets"&&wt.clickable&&Tt.classList.add(wt.clickableClass),Tt.classList.add(wt.modifierClass+wt.type),Tt.classList.add(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass),wt.type==="bullets"&&wt.dynamicBullets&&(Tt.classList.add(`${wt.modifierClass}${wt.type}-dynamic`),ht=0,wt.dynamicMainBullets<1&&(wt.dynamicMainBullets=1)),wt.type==="progressbar"&&wt.progressbarOpposite&&Tt.classList.add(wt.progressbarOppositeClass),wt.clickable&&Tt.addEventListener("click",Et),Be.enabled||Tt.classList.add(wt.lockClass)}))}function vt(){const wt=Be.params.pagination;if(At())return;let Rt=Be.pagination.el;Rt&&(Rt=gt(Rt),Rt.forEach(Tt=>{Tt.classList.remove(wt.hiddenClass),Tt.classList.remove(wt.modifierClass+wt.type),Tt.classList.remove(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass),wt.clickable&&Tt.removeEventListener("click",Et)})),Be.pagination.bullets&&Be.pagination.bullets.forEach(Tt=>Tt.classList.remove(...wt.bulletActiveClass.split(" ")))}Ye("changeDirection",()=>{if(!Be.pagination||!Be.pagination.el)return;const wt=Be.params.pagination;let{el:Rt}=Be.pagination;Rt=gt(Rt),Rt.forEach(Tt=>{Tt.classList.remove(wt.horizontalClass,wt.verticalClass),Tt.classList.add(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass)})}),Ye("init",()=>{Be.params.pagination.enabled===!1?It():(kt(),Ct(),yt())}),Ye("activeIndexChange",()=>{typeof Be.snapIndex>"u"&&yt()}),Ye("snapIndexChange",()=>{yt()}),Ye("snapGridLengthChange",()=>{Ct(),yt()}),Ye("destroy",()=>{vt()}),Ye("enable disable",()=>{let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList[Be.enabled?"remove":"add"](Be.params.pagination.lockClass)))}),Ye("lock unlock",()=>{yt()}),Ye("click",(wt,Rt)=>{const Tt=Rt.target;let{el:Bt}=Be.pagination;if(Array.isArray(Bt)||(Bt=[Bt].filter(Dt=>!!Dt)),Be.params.pagination.el&&Be.params.pagination.hideOnClick&&Bt&&Bt.length>0&&!Tt.classList.contains(Be.params.pagination.bulletClass)){if(Be.navigation&&(Be.navigation.nextEl&&Tt===Be.navigation.nextEl||Be.navigation.prevEl&&Tt===Be.navigation.prevEl))return;const Dt=Bt[0].classList.contains(Be.params.pagination.hiddenClass);tt(Dt===!0?"paginationShow":"paginationHide"),Bt.forEach(Lt=>Lt.classList.toggle(Be.params.pagination.hiddenClass))}});const bt=()=>{Be.el.classList.remove(Be.params.pagination.paginationDisabledClass);let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList.remove(Be.params.pagination.paginationDisabledClass))),kt(),Ct(),yt()},It=()=>{Be.el.classList.add(Be.params.pagination.paginationDisabledClass);let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList.add(Be.params.pagination.paginationDisabledClass))),vt()};Object.assign(Be.pagination,{enable:bt,disable:It,render:Ct,update:yt,init:kt,destroy:vt})}function isObject$1(Be){return typeof Be=="object"&&Be!==null&&Be.constructor&&Object.prototype.toString.call(Be).slice(8,-1)==="Object"}function extend$2(Be,Le){const Ye=["__proto__","constructor","prototype"];Object.keys(Le).filter(tt=>Ye.indexOf(tt)<0).forEach(tt=>{typeof Be[tt]>"u"?Be[tt]=Le[tt]:isObject$1(Le[tt])&&isObject$1(Be[tt])&&Object.keys(Le[tt]).length>0?Le[tt].__swiper__?Be[tt]=Le[tt]:extend$2(Be[tt],Le[tt]):Be[tt]=Le[tt]})}function needsNavigation(Be={}){return Be.navigation&&typeof Be.navigation.nextEl>"u"&&typeof Be.navigation.prevEl>"u"}function needsPagination(Be={}){return Be.pagination&&typeof Be.pagination.el>"u"}function needsScrollbar(Be={}){return Be.scrollbar&&typeof Be.scrollbar.el>"u"}function uniqueClasses(Be=""){const Le=Be.split(" ").map(tt=>tt.trim()).filter(tt=>!!tt),Ye=[];return Le.forEach(tt=>{Ye.indexOf(tt)<0&&Ye.push(tt)}),Ye.join(" ")}function wrapperClass(Be=""){return Be?Be.includes("swiper-wrapper")?Be:`swiper-wrapper ${Be}`:"swiper-wrapper"}const paramsList=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function getParams(Be={},Le=!0){const Ye={on:{}},tt={},nt={};extend$2(Ye,Swiper$1.defaults),extend$2(Ye,Swiper$1.extendedDefaults),Ye._emitClasses=!0,Ye.init=!1;const ft={},ht=paramsList.map(At=>At.replace(/_/,"")),gt=Object.assign({},Be);return Object.keys(gt).forEach(At=>{typeof Be[At]>"u"||(ht.indexOf(At)>=0?isObject$1(Be[At])?(Ye[At]={},nt[At]={},extend$2(Ye[At],Be[At]),extend$2(nt[At],Be[At])):(Ye[At]=Be[At],nt[At]=Be[At]):At.search(/on[A-Z]/)===0&&typeof Be[At]=="function"?Le?tt[`${At[2].toLowerCase()}${At.substr(3)}`]=Be[At]:Ye.on[`${At[2].toLowerCase()}${At.substr(3)}`]=Be[At]:ft[At]=Be[At])}),["navigation","pagination","scrollbar"].forEach(At=>{Ye[At]===!0&&(Ye[At]={}),Ye[At]===!1&&delete Ye[At]}),{params:Ye,passedParams:nt,rest:ft,events:tt}}function mountSwiper({el:Be,nextEl:Le,prevEl:Ye,paginationEl:tt,scrollbarEl:nt,swiper:ft},ht){needsNavigation(ht)&&Le&&Ye&&(ft.params.navigation.nextEl=Le,ft.originalParams.navigation.nextEl=Le,ft.params.navigation.prevEl=Ye,ft.originalParams.navigation.prevEl=Ye),needsPagination(ht)&&tt&&(ft.params.pagination.el=tt,ft.originalParams.pagination.el=tt),needsScrollbar(ht)&&nt&&(ft.params.scrollbar.el=nt,ft.originalParams.scrollbar.el=nt),ft.init(Be)}function getChangedParams(Be,Le,Ye,tt,nt){const ft=[];if(!Le)return ft;const ht=At=>{ft.indexOf(At)<0&&ft.push(At)};if(Ye&&tt){const At=tt.map(nt),xt=Ye.map(nt);At.join("")!==xt.join("")&&ht("children"),tt.length!==Ye.length&&ht("children")}return paramsList.filter(At=>At[0]==="_").map(At=>At.replace(/_/,"")).forEach(At=>{if(At in Be&&At in Le)if(isObject$1(Be[At])&&isObject$1(Le[At])){const xt=Object.keys(Be[At]),Et=Object.keys(Le[At]);xt.length!==Et.length?ht(At):(xt.forEach(yt=>{Be[At][yt]!==Le[At][yt]&&ht(At)}),Et.forEach(yt=>{Be[At][yt]!==Le[At][yt]&&ht(At)}))}else Be[At]!==Le[At]&&ht(At)}),ft}function isChildSwiperSlide(Be){return Be.type&&Be.type.displayName&&Be.type.displayName.includes("SwiperSlide")}function processChildren(Be){const Le=[];return React.Children.toArray(Be).forEach(Ye=>{isChildSwiperSlide(Ye)?Le.push(Ye):Ye.props&&Ye.props.children&&processChildren(Ye.props.children).forEach(tt=>Le.push(tt))}),Le}function getChildren(Be){const Le=[],Ye={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return React.Children.toArray(Be).forEach(tt=>{if(isChildSwiperSlide(tt))Le.push(tt);else if(tt.props&&tt.props.slot&&Ye[tt.props.slot])Ye[tt.props.slot].push(tt);else if(tt.props&&tt.props.children){const nt=processChildren(tt.props.children);nt.length>0?nt.forEach(ft=>Le.push(ft)):Ye["container-end"].push(tt)}else Ye["container-end"].push(tt)}),{slides:Le,slots:Ye}}function updateSwiper({swiper:Be,slides:Le,passedParams:Ye,changedParams:tt,nextEl:nt,prevEl:ft,scrollbarEl:ht,paginationEl:gt}){const At=tt.filter(Pt=>Pt!=="children"&&Pt!=="direction"&&Pt!=="wrapperClass"),{params:xt,pagination:Et,navigation:yt,scrollbar:Ct,virtual:kt,thumbs:vt}=Be;let bt,It,wt,Rt,Tt,Bt,Dt,Lt;tt.includes("thumbs")&&Ye.thumbs&&Ye.thumbs.swiper&&xt.thumbs&&!xt.thumbs.swiper&&(bt=!0),tt.includes("controller")&&Ye.controller&&Ye.controller.control&&xt.controller&&!xt.controller.control&&(It=!0),tt.includes("pagination")&&Ye.pagination&&(Ye.pagination.el||gt)&&(xt.pagination||xt.pagination===!1)&&Et&&!Et.el&&(wt=!0),tt.includes("scrollbar")&&Ye.scrollbar&&(Ye.scrollbar.el||ht)&&(xt.scrollbar||xt.scrollbar===!1)&&Ct&&!Ct.el&&(Rt=!0),tt.includes("navigation")&&Ye.navigation&&(Ye.navigation.prevEl||ft)&&(Ye.navigation.nextEl||nt)&&(xt.navigation||xt.navigation===!1)&&yt&&!yt.prevEl&&!yt.nextEl&&(Tt=!0);const Nt=Pt=>{Be[Pt]&&(Be[Pt].destroy(),Pt==="navigation"?(Be.isElement&&(Be[Pt].prevEl.remove(),Be[Pt].nextEl.remove()),xt[Pt].prevEl=void 0,xt[Pt].nextEl=void 0,Be[Pt].prevEl=void 0,Be[Pt].nextEl=void 0):(Be.isElement&&Be[Pt].el.remove(),xt[Pt].el=void 0,Be[Pt].el=void 0))};tt.includes("loop")&&Be.isElement&&(xt.loop&&!Ye.loop?Bt=!0:!xt.loop&&Ye.loop?Dt=!0:Lt=!0),At.forEach(Pt=>{if(isObject$1(xt[Pt])&&isObject$1(Ye[Pt]))extend$2(xt[Pt],Ye[Pt]),(Pt==="navigation"||Pt==="pagination"||Pt==="scrollbar")&&"enabled"in Ye[Pt]&&!Ye[Pt].enabled&&Nt(Pt);else{const Wt=Ye[Pt];(Wt===!0||Wt===!1)&&(Pt==="navigation"||Pt==="pagination"||Pt==="scrollbar")?Wt===!1&&Nt(Pt):xt[Pt]=Ye[Pt]}}),At.includes("controller")&&!It&&Be.controller&&Be.controller.control&&xt.controller&&xt.controller.control&&(Be.controller.control=xt.controller.control),tt.includes("children")&&Le&&kt&&xt.virtual.enabled&&(kt.slides=Le,kt.update(!0)),tt.includes("children")&&Le&&xt.loop&&(Lt=!0),bt&&vt.init()&&vt.update(!0),It&&(Be.controller.control=xt.controller.control),wt&&(Be.isElement&&(!gt||typeof gt=="string")&&(gt=document.createElement("div"),gt.classList.add("swiper-pagination"),Be.el.shadowEl.appendChild(gt)),gt&&(xt.pagination.el=gt),Et.init(),Et.render(),Et.update()),Rt&&(Be.isElement&&(!ht||typeof ht=="string")&&(ht=document.createElement("div"),ht.classList.add("swiper-scrollbar"),Be.el.shadowEl.appendChild(ht)),ht&&(xt.scrollbar.el=ht),Ct.init(),Ct.updateSize(),Ct.setTranslate()),Tt&&(Be.isElement&&((!nt||typeof nt=="string")&&(nt=document.createElement("div"),nt.classList.add("swiper-button-next"),Be.el.shadowEl.appendChild(nt)),(!ft||typeof ft=="string")&&(ft=document.createElement("div"),ft.classList.add("swiper-button-prev"),Be.el.shadowEl.appendChild(ft))),nt&&(xt.navigation.nextEl=nt),ft&&(xt.navigation.prevEl=ft),yt.init(),yt.update()),tt.includes("allowSlideNext")&&(Be.allowSlideNext=Ye.allowSlideNext),tt.includes("allowSlidePrev")&&(Be.allowSlidePrev=Ye.allowSlidePrev),tt.includes("direction")&&Be.changeDirection(Ye.direction,!1),(Bt||Lt)&&Be.loopDestroy(),(Dt||Lt)&&Be.loopCreate(),Be.update()}function renderVirtual(Be,Le,Ye){if(!Ye)return null;const tt=Et=>{let yt=Et;return Et<0?yt=Le.length+Et:yt>=Le.length&&(yt=yt-Le.length),yt},nt=Be.isHorizontal()?{[Be.rtlTranslate?"right":"left"]:`${Ye.offset}px`}:{top:`${Ye.offset}px`},{from:ft,to:ht}=Ye,gt=Be.params.loop?-Le.length:0,At=Be.params.loop?Le.length*2:Le.length,xt=[];for(let Et=gt;Et<At;Et+=1)Et>=ft&&Et<=ht&&xt.push(Le[tt(Et)]);return xt.map((Et,yt)=>React.cloneElement(Et,{swiper:Be,style:nt,key:`slide-${yt}`}))}const updateOnVirtualData=Be=>{!Be||Be.destroyed||!Be.params.virtual||Be.params.virtual&&!Be.params.virtual.enabled||(Be.updateSlides(),Be.updateProgress(),Be.updateSlidesClasses(),Be.parallax&&Be.params.parallax&&Be.params.parallax.enabled&&Be.parallax.setTranslate())};function useIsomorphicLayoutEffect(Be,Le){return typeof window>"u"?React.useEffect(Be,Le):React.useLayoutEffect(Be,Le)}const SwiperSlideContext=React.createContext(null),SwiperContext=React.createContext(null);function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(Be){for(var Le=1;Le<arguments.length;Le++){var Ye=arguments[Le];for(var tt in Ye)Object.prototype.hasOwnProperty.call(Ye,tt)&&(Be[tt]=Ye[tt])}return Be},_extends$3.apply(this,arguments)}const Swiper=React.forwardRef(function(Be,Le){let{className:Ye,tag:tt="div",wrapperTag:nt="div",children:ft,onSwiper:ht,...gt}=Be===void 0?{}:Be,At=!1;const[xt,Et]=React.useState("swiper"),[yt,Ct]=React.useState(null),[kt,vt]=React.useState(!1),bt=React.useRef(!1),It=React.useRef(null),wt=React.useRef(null),Rt=React.useRef(null),Tt=React.useRef(null),Bt=React.useRef(null),Dt=React.useRef(null),Lt=React.useRef(null),Nt=React.useRef(null),{params:Pt,passedParams:Wt,rest:$t,events:Kt}=getParams(gt),{slides:Vt,slots:Ut}=getChildren(ft),_t=()=>{vt(!kt)};Object.assign(Pt.on,{_containerClasses(qt,Gt){Et(Gt)}});const Xt=()=>{Object.assign(Pt.on,Kt),At=!0;const qt={...Pt};if(delete qt.wrapperClass,wt.current=new Swiper$1(qt),wt.current.virtual&&wt.current.params.virtual.enabled){wt.current.virtual.slides=Vt;const Gt={cache:!1,slides:Vt,renderExternal:Ct,renderExternalUpdate:!1};extend$2(wt.current.params.virtual,Gt),extend$2(wt.current.originalParams.virtual,Gt)}};It.current||Xt(),wt.current&&wt.current.on("_beforeBreakpoint",_t);const Qt=()=>{At||!Kt||!wt.current||Object.keys(Kt).forEach(qt=>{wt.current.on(qt,Kt[qt])})},jt=()=>{!Kt||!wt.current||Object.keys(Kt).forEach(qt=>{wt.current.off(qt,Kt[qt])})};React.useEffect(()=>()=>{wt.current&&wt.current.off("_beforeBreakpoint",_t)}),React.useEffect(()=>{!bt.current&&wt.current&&(wt.current.emitSlidesClasses(),bt.current=!0)}),useIsomorphicLayoutEffect(()=>{if(Le&&(Le.current=It.current),!!It.current)return wt.current.destroyed&&Xt(),mountSwiper({el:It.current,nextEl:Bt.current,prevEl:Dt.current,paginationEl:Lt.current,scrollbarEl:Nt.current,swiper:wt.current},Pt),ht&&ht(wt.current),()=>{wt.current&&!wt.current.destroyed&&wt.current.destroy(!0,!1)}},[]),useIsomorphicLayoutEffect(()=>{Qt();const qt=getChangedParams(Wt,Rt.current,Vt,Tt.current,Gt=>Gt.key);return Rt.current=Wt,Tt.current=Vt,qt.length&&wt.current&&!wt.current.destroyed&&updateSwiper({swiper:wt.current,slides:Vt,passedParams:Wt,changedParams:qt,nextEl:Bt.current,prevEl:Dt.current,scrollbarEl:Nt.current,paginationEl:Lt.current}),()=>{jt()}}),useIsomorphicLayoutEffect(()=>{updateOnVirtualData(wt.current)},[yt]);function zt(){return Pt.virtual?renderVirtual(wt.current,Vt,yt):Vt.map((qt,Gt)=>React.cloneElement(qt,{swiper:wt.current,swiperSlideIndex:Gt}))}return React.createElement(tt,_extends$3({ref:It,className:uniqueClasses(`${xt}${Ye?` ${Ye}`:""}`)},$t),React.createElement(SwiperContext.Provider,{value:wt.current},Ut["container-start"],React.createElement(nt,{className:wrapperClass(Pt.wrapperClass)},Ut["wrapper-start"],zt(),Ut["wrapper-end"]),needsNavigation(Pt)&&React.createElement(React.Fragment,null,React.createElement("div",{ref:Dt,className:"swiper-button-prev"}),React.createElement("div",{ref:Bt,className:"swiper-button-next"})),needsScrollbar(Pt)&&React.createElement("div",{ref:Nt,className:"swiper-scrollbar"}),needsPagination(Pt)&&React.createElement("div",{ref:Lt,className:"swiper-pagination"}),Ut["container-end"]))});Swiper.displayName="Swiper";function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(Be){for(var Le=1;Le<arguments.length;Le++){var Ye=arguments[Le];for(var tt in Ye)Object.prototype.hasOwnProperty.call(Ye,tt)&&(Be[tt]=Ye[tt])}return Be},_extends$2.apply(this,arguments)}const SwiperSlide=React.forwardRef(function(Be,Le){let{tag:Ye="div",children:tt,className:nt="",swiper:ft,zoom:ht,lazy:gt,virtualIndex:At,swiperSlideIndex:xt,...Et}=Be===void 0?{}:Be;const yt=React.useRef(null),[Ct,kt]=React.useState("swiper-slide"),[vt,bt]=React.useState(!1);function It(Bt,Dt,Lt){Dt===yt.current&&kt(Lt)}useIsomorphicLayoutEffect(()=>{if(typeof xt<"u"&&(yt.current.swiperSlideIndex=xt),Le&&(Le.current=yt.current),!(!yt.current||!ft)){if(ft.destroyed){Ct!=="swiper-slide"&&kt("swiper-slide");return}return ft.on("_slideClass",It),()=>{ft&&ft.off("_slideClass",It)}}}),useIsomorphicLayoutEffect(()=>{ft&&yt.current&&!ft.destroyed&&kt(ft.getSlideClasses(yt.current))},[ft]);const wt={isActive:Ct.indexOf("swiper-slide-active")>=0,isVisible:Ct.indexOf("swiper-slide-visible")>=0,isPrev:Ct.indexOf("swiper-slide-prev")>=0,isNext:Ct.indexOf("swiper-slide-next")>=0},Rt=()=>typeof tt=="function"?tt(wt):tt,Tt=()=>{bt(!0)};return React.createElement(Ye,_extends$2({ref:yt,className:uniqueClasses(`${Ct}${nt?` ${nt}`:""}`),"data-swiper-slide-index":At,onLoad:Tt},Et),ht&&React.createElement(SwiperSlideContext.Provider,{value:wt},React.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof ht=="number"?ht:void 0},Rt(),gt&&!vt&&React.createElement("div",{className:"swiper-lazy-preloader"}))),!ht&&React.createElement(SwiperSlideContext.Provider,{value:wt},Rt(),gt&&!vt&&React.createElement("div",{className:"swiper-lazy-preloader"})))});SwiperSlide.displayName="SwiperSlide";const step1="data:image/svg+xml,%3csvg%20width='74'%20height='44'%20viewBox='0%200%2074%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8319_10898)'%3e%3cpath%20d='M0.227051%204.7727C0.227051%202.56356%202.01791%200.772705%204.22705%200.772705L70.147%200.772705C72.3562%200.772705%2074.147%202.56357%2074.147%204.77271V39.3327C74.147%2041.5419%2072.3562%2043.3327%2070.147%2043.3327L4.22706%2043.3327C2.01792%2043.3327%200.227051%2041.5418%200.227051%2039.3327L0.227051%204.7727Z'%20fill='white'/%3e%3cpath%20d='M0.727051%204.7727C0.727051%202.8397%202.29405%201.27271%204.22705%201.27271L70.147%201.27271C72.08%201.27271%2073.647%202.83971%2073.647%204.77271V39.3327C73.647%2041.2657%2072.08%2042.8327%2070.147%2042.8327L4.22706%2042.8327C2.29406%2042.8327%200.727051%2041.2657%200.727051%2039.3327L0.727051%204.7727Z'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.36742%2010.0223C4.36752%209.86768%204.49285%209.74243%204.64742%209.74243L69.8559%209.74243C70.0106%209.74243%2070.1359%209.86779%2070.1359%2010.0224V10.8544C70.1359%2011.009%2070.0105%2011.1344%2069.8559%2011.1344L4.64688%2011.1344C4.49217%2011.1344%204.36678%2011.0089%204.36688%2010.8542L4.36742%2010.0223Z'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='17.0227'%20width='17.08'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='22.342'%20width='17.08'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='27.6624'%20width='23.8'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='32.9827'%20width='7.56'%20height='2.52'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='4.3667'%20y='3.86255'%20width='31.36'%20height='3.08'%20rx='0.28'%20fill='%23D7D7D7'/%3e%3crect%20x='63.7876'%20y='3.70435'%20width='6.44'%20height='3.36'%20rx='0.28'%20fill='%23DBB107'/%3e%3cg%20clip-path='url(%23clip1_8319_10898)'%3e%3cg%20clip-path='url(%23clip2_8319_10898)'%3e%3crect%20x='4.30713'%20y='13.9685'%20width='19.5599'%20height='23.4718'%20rx='1.4'%20fill='%23C9C9C9'/%3e%3cpath%20d='M24.2206%2034.0174C25.1192%2035.6252%2025.6364%2039.3334%2025.6364%2039.3334H2.98291C2.98291%2039.3334%203.50035%2035.6248%204.39876%2034.0174C5.29716%2032.4099%2010.7724%2030.919%2010.7724%2030.919C11.2573%2031.7951%2012.6809%2032.5943%2014.138%2032.63C15.7193%2032.6688%2017.3401%2031.8695%2017.8443%2030.9185C17.8443%2030.9185%2023.322%2032.4095%2024.2206%2034.0174Z'%20fill='white'/%3e%3cpath%20d='M11.6467%2029.6414V29.6773C11.6368%2030.4351%2010.9989%2031.0049%209.73291%2031.3868C11.2584%2032.495%2012.7839%2033.3815%2014.3094%2033.3815C15.8349%2033.3815%2017.3604%2032.495%2018.8859%2031.3868C17.6285%2031.0045%2016.9905%2030.4338%2016.9721%2029.6747C16.9721%2029.3866%2016.9731%2026.5799%2016.9744%2026.2918C17.0653%2026.3046%2017.0576%2026.2965%2016.9744%2026.2734C16.9769%2025.3243%2016.981%2026.5667%2016.9866%2025.2697C16.9923%2023.9727%2011.5586%2022.8124%2011.6384%2026.3737C11.6395%2026.7368%2011.6416%2029.2302%2011.6467%2029.6414Z'%20fill='url(%23paint0_linear_8319_10898)'/%3e%3cpath%20d='M24.2206%2034.0174C25.1192%2035.6252%2025.6364%2039.3334%2025.6364%2039.3334H2.98291C2.98291%2039.3334%203.50035%2035.6248%204.39876%2034.0174C5.29716%2032.4099%2010.7724%2030.919%2010.7724%2030.919C10.7724%2031.8934%2012.6611%2033.2985%2014.138%2033.3236C16.1975%2033.3236%2017.8443%2031.8934%2017.8443%2030.9185C17.8443%2030.9185%2023.322%2032.4095%2024.2206%2034.0174Z'%20fill='%23007AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.0534%2026.0701C17.321%2028.1537%2015.6774%2029.617%2014.3206%2029.617C12.8015%2029.617%2011.1821%2028.0835%2010.5166%2025.9209C10.468%2025.9369%2010.4115%2025.9491%2010.3463%2025.9574C9.97084%2026.0049%209.72284%2024.9825%209.63634%2024.6008C9.62277%2024.5409%209.60695%2024.4836%209.59135%2024.427C9.50748%2024.1231%209.43001%2023.8423%209.74386%2023.3188C9.89353%2023.0691%2010.0618%2023.0312%2010.211%2023.0849C10.2713%2020.4793%2010.7708%2017.947%2014.3206%2017.947C17.9246%2017.947%2018.3845%2020.5007%2018.4327%2023.1917C18.5347%2023.2095%2018.6385%2023.2834%2018.7338%2023.4457C19.0427%2023.9722%2018.9625%2024.2522%2018.8758%2024.5554C18.8597%2024.6118%2018.8433%2024.669%2018.8292%2024.7287C18.7391%2025.1095%2018.4814%2026.1296%2018.1064%2026.0785C18.0881%2026.076%2018.0704%2026.0732%2018.0534%2026.0701Z'%20fill='url(%23paint1_linear_8319_10898)'/%3e%3c/g%3e%3c/g%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip3_8319_10898)'%3e%3cpath%20d='M65.1692%2034.8527V34.8672C65.1652%2035.1737%2064.9071%2035.4042%2064.395%2035.5587C65.0121%2036.007%2065.6292%2036.3656%2066.2463%2036.3656C66.8633%2036.3656%2067.4804%2036.007%2068.0975%2035.5587C67.5889%2035.4041%2067.3308%2035.1732%2067.3233%2034.8661C67.3233%2034.7496%2067.3237%2033.6143%2067.3243%2033.4977C67.3611%2033.5029%2067.3579%2033.4996%2067.3243%2033.4903C67.3253%2033.1064%2067.3269%2033.6089%2067.3292%2033.0843C67.3315%2032.5596%2065.1335%2032.0902%2065.1658%2033.5308C65.1662%2033.6777%2065.1671%2034.6863%2065.1692%2034.8527Z'%20fill='url(%23paint2_linear_8319_10898)'/%3e%3cpath%20d='M70.2564%2036.6232C70.6199%2037.2736%2070.8292%2038.7736%2070.8292%2038.7736H61.6655C61.6655%2038.7736%2061.8748%2037.2734%2062.2383%2036.6232C62.6017%2035.973%2064.8164%2035.3699%2064.8164%2035.3699C64.8164%2035.764%2065.5805%2036.3324%2066.1779%2036.3425C67.011%2036.3425%2067.6771%2035.764%2067.6771%2035.3696C67.6771%2035.3696%2069.8929%2035.9728%2070.2564%2036.6232Z'%20fill='%23C6C6C6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M67.6813%2033.4161C67.3844%2034.2908%2066.7176%2034.9051%2066.1672%2034.9051C65.554%2034.9051%2064.9005%2034.2676%2064.6282%2033.3668C64.6038%2033.3802%2064.572%2033.3902%2064.5316%2033.3967C64.3821%2033.4206%2064.2696%2033.0151%2064.23%2032.8636C64.2238%2032.8399%2064.2167%2032.8171%2064.2097%2032.7947C64.1722%2032.6743%2064.1376%2032.5631%2064.2562%2032.3497C64.3318%2032.2137%2064.4256%2032.2284%2064.498%2032.2804C64.5053%2031.1457%2064.6147%2029.991%2066.1672%2030.0082C67.8446%2030.0082%2067.841%2031.1465%2067.8373%2032.313C67.8372%2032.3238%2067.8372%2032.3347%2067.8372%2032.3455C67.9174%2032.2842%2068.0295%2032.254%2068.1018%2032.4149C68.2019%2032.6376%2068.158%2032.7455%2068.1104%2032.8623C68.1016%2032.8841%2068.0926%2032.9061%2068.0844%2032.9292C68.0321%2033.0768%2067.8857%2033.4713%2067.7388%2033.4349C67.717%2033.4295%2067.6979%2033.4232%2067.6813%2033.4161Z'%20fill='url(%23paint3_linear_8319_10898)'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8319_10898'%20x1='13.9035'%20y1='26.5902'%20x2='13.9035'%20y2='30.9977'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B1B1B1'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8319_10898'%20x1='10.71'%20y1='23.7275'%20x2='16.5256'%20y2='23.7495'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8319_10898'%20x1='66.0821'%20y1='33.6184'%20x2='66.0821'%20y2='35.4013'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D6D4D4'/%3e%3cstop%20offset='1'%20stop-color='%23E4E4E4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8319_10898'%20x1='64.4093'%20y1='33.0791'%20x2='66.3543'%20y2='33.0791'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CECECE'/%3e%3cstop%20offset='1'%20stop-color='%23E7E7E7'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_8319_10898'%3e%3crect%20x='0.227051'%20y='0.772461'%20width='73.7729'%20height='42.455'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10898'%3e%3crect%20x='4.3667'%20y='13.9426'%20width='19.32'%20height='23.52'%20rx='1.04397'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10898'%3e%3crect%20width='24.9189'%20height='24.9189'%20fill='white'%20transform='translate(1.8501%2013.9429)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10898'%3e%3crect%20width='10.08'%20height='10.08'%20fill='white'%20transform='translate(61.2065%2028.5022)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",step2="data:image/svg+xml,%3csvg%20width='73'%20height='42'%20viewBox='0%200%2073%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20clip-path='url(%23clip0_8319_10931)'%3e%3cg%20clip-path='url(%23clip1_8319_10931)'%3e%3cpath%20d='M-49.9917%20-40.2858C-49.9917%20-45.6521%20-45.6415%20-50.0023%20-40.2752%20-50.0023L117.375%20-50.0023C122.742%20-50.0023%20127.092%20-45.6521%20127.092%20-40.2858V42.2813C127.092%2047.6476%20122.742%2051.9979%20117.375%2051.9979L-40.2752%2051.9979C-45.6415%2051.9979%20-49.9917%2047.6476%20-49.9917%2042.2813L-49.9917%20-40.2858Z'%20fill='white'/%3e%3cpath%20d='M-48.7771%20-40.2858C-48.7771%20-44.9813%20-44.9707%20-48.7878%20-40.2752%20-48.7878L117.375%20-48.7878C122.071%20-48.7878%20125.877%20-44.9813%20125.877%20-40.2858V42.2813C125.877%2046.9768%20122.071%2050.7833%20117.375%2050.7833L-40.2752%2050.7833C-44.9707%2050.7833%20-48.7771%2046.9768%20-48.7771%2042.2813L-48.7771%20-40.2858Z'%20stroke='black'%20stroke-opacity='0.1'%20stroke-width='2.42913'/%3e%3crect%20opacity='0.25'%20x='-39.3672'%20y='-43.6262'%20width='112.625'%20height='81.4585'%20fill='url(%23pattern0_8319_10931)'/%3e%3cpath%20d='M15.5587%2020.4843H16.9621C17.2785%2020.4843%2017.5198%2020.5085%2017.6858%2020.5569C17.9089%2020.6227%2018.1%2020.7394%2018.2591%2020.9071C18.4182%2021.0749%2018.5392%2021.2807%2018.6222%2021.5245C18.7052%2021.7666%2018.7467%2022.0658%2018.7467%2022.422C18.7467%2022.735%2018.7078%2023.0048%2018.63%2023.2314C18.5349%2023.508%2018.3991%2023.732%2018.2228%2023.9032C18.0896%2024.0329%2017.9097%2024.1341%2017.6832%2024.2067C17.5137%2024.2603%2017.2872%2024.2871%2017.0036%2024.2871H15.5587V20.4843ZM16.3265%2021.1276V23.6464H16.8998C17.1143%2023.6464%2017.269%2023.6343%2017.3641%2023.6101C17.4887%2023.5789%2017.5915%2023.5262%2017.6728%2023.4518C17.7558%2023.3775%2017.8233%2023.2556%2017.8752%2023.0861C17.927%2022.9149%2017.953%2022.6823%2017.953%2022.3883C17.953%2022.0943%2017.927%2021.8686%2017.8752%2021.7113C17.8233%2021.5539%2017.7506%2021.4311%2017.6573%2021.3429C17.5639%2021.2547%2017.4454%2021.1951%2017.3019%2021.1639C17.1947%2021.1397%2016.9846%2021.1276%2016.6715%2021.1276H16.3265ZM19.2448%2022.4091C19.2448%2022.0217%2019.3027%2021.6966%2019.4186%2021.4337C19.5051%2021.24%2019.6226%2021.0662%2019.7714%2020.9123C19.9218%2020.7584%2020.0861%2020.6443%2020.2642%2020.5699C20.5011%2020.4696%2020.7744%2020.4195%2021.0839%2020.4195C21.6442%2020.4195%2022.0921%2020.5933%2022.4276%2020.9409C22.7648%2021.2884%2022.9335%2021.7718%2022.9335%2022.3909C22.9335%2023.0048%2022.7666%2023.4856%2022.4328%2023.8332C22.0991%2024.179%2021.6529%2024.352%2021.0943%2024.352C20.5288%2024.352%2020.0792%2024.1799%2019.7454%2023.8358C19.4117%2023.4899%2019.2448%2023.0143%2019.2448%2022.4091ZM20.036%2022.3831C20.036%2022.8137%2020.1354%2023.1406%2020.3343%2023.3636C20.5331%2023.585%2020.7856%2023.6957%2021.0917%2023.6957C21.3978%2023.6957%2021.6486%2023.5859%2021.844%2023.3662C22.0411%2023.1449%2022.1397%2022.8137%2022.1397%2022.3727C22.1397%2021.9369%2022.0437%2021.6118%2021.8518%2021.3974C21.6615%2021.183%2021.4082%2021.0757%2021.0917%2021.0757C20.7752%2021.0757%2020.5202%2021.1847%2020.3265%2021.4026C20.1328%2021.6187%2020.036%2021.9456%2020.036%2022.3831ZM23.5379%2020.4843H25.0579C25.3588%2020.4843%2025.5828%2020.4973%2025.7298%2020.5232C25.8785%2020.5474%2026.0108%2020.5993%2026.1267%2020.6789C26.2443%2020.7584%2026.342%2020.8648%2026.4198%2020.9979C26.4976%2021.1293%2026.5365%2021.2772%2026.5365%2021.4415C26.5365%2021.6196%2026.4881%2021.783%2026.3913%2021.9318C26.2961%2022.0805%2026.1664%2022.192%2026.0022%2022.2664C26.2339%2022.3338%2026.412%2022.4488%2026.5365%2022.6114C26.661%2022.7739%2026.7233%2022.965%2026.7233%2023.1847C26.7233%2023.3576%2026.6826%2023.5262%2026.6014%2023.6905C26.5218%2023.853%2026.412%2023.9836%2026.2719%2024.0822C26.1336%2024.179%2025.9624%2024.2387%2025.7583%2024.2612C25.6303%2024.275%2025.3217%2024.2837%2024.8323%2024.2871H23.5379V20.4843ZM24.3057%2021.1172V21.9966H24.8089C25.1081%2021.9966%2025.294%2021.9923%2025.3666%2021.9836C25.4981%2021.9681%2025.6009%2021.9231%2025.6753%2021.8488C25.7514%2021.7727%2025.7894%2021.6732%2025.7894%2021.5504C25.7894%2021.4328%2025.7566%2021.3377%2025.6909%2021.2651C25.6269%2021.1907%2025.5309%2021.1458%2025.4029%2021.1302C25.3268%2021.1216%2025.1081%2021.1172%2024.7467%2021.1172H24.3057ZM24.3057%2022.6295V23.6464H25.0164C25.2931%2023.6464%2025.4687%2023.6386%2025.543%2023.623C25.6572%2023.6023%2025.7497%2023.5521%2025.8206%2023.4726C25.8932%2023.3913%2025.9295%2023.2832%2025.9295%2023.1483C25.9295%2023.0342%2025.9019%2022.9374%2025.8465%2022.8578C25.7912%2022.7783%2025.7108%2022.7203%2025.6053%2022.684C25.5015%2022.6477%2025.275%2022.6295%2024.9256%2022.6295H24.3057ZM29.9243%2020.4687C30.2926%2020.4687%2030.5806%2020.6002%2030.7881%2020.863C31.0354%2021.1743%2031.159%2021.6905%2031.159%2022.4116C31.159%2023.1311%2031.0345%2023.6481%2030.7855%2023.9629C30.5797%2024.2223%2030.2926%2024.352%2029.9243%2024.352C29.5542%2024.352%2029.2559%2024.2102%2029.0293%2023.9265C28.8028%2023.6412%2028.6895%2023.1336%2028.6895%2022.4039C28.6895%2021.6879%2028.814%2021.1726%2029.0631%2020.8578C29.2689%2020.5984%2029.5559%2020.4687%2029.9243%2020.4687ZM29.9243%2021.0731C29.8361%2021.0731%2029.7574%2021.1017%2029.6882%2021.1587C29.6191%2021.2141%2029.5654%2021.3144%2029.5274%2021.4597C29.4772%2021.6481%2029.4522%2021.9655%2029.4522%2022.4116C29.4522%2022.8578%2029.4747%2023.1648%2029.5196%2023.3325C29.5646%2023.4985%2029.6208%2023.6092%2029.6882%2023.6645C29.7574%2023.7199%2029.8361%2023.7476%2029.9243%2023.7476C30.0125%2023.7476%2030.0912%2023.7199%2030.1603%2023.6645C30.2295%2023.6075%2030.2831%2023.5063%2030.3212%2023.3611C30.3713%2023.1743%2030.3964%2022.8578%2030.3964%2022.4116C30.3964%2021.9655%2030.3739%2021.6594%2030.3289%2021.4934C30.284%2021.3256%2030.2269%2021.2141%2030.1577%2021.1587C30.0903%2021.1017%2030.0125%2021.0731%2029.9243%2021.0731ZM32.2744%2022.2353C32.0859%2022.1557%2031.9485%2022.0468%2031.862%2021.9084C31.7773%2021.7683%2031.7349%2021.6153%2031.7349%2021.4493C31.7349%2021.1657%2031.8335%2020.9313%2032.0306%2020.7463C32.2295%2020.5613%2032.5114%2020.4687%2032.8762%2020.4687C33.2377%2020.4687%2033.5178%2020.5613%2033.7167%2020.7463C33.9173%2020.9313%2034.0176%2021.1657%2034.0176%2021.4493C34.0176%2021.6257%2033.9718%2021.783%2033.8801%2021.9214C33.7885%2022.058%2033.6596%2022.1626%2033.4936%2022.2353C33.7046%2022.32%2033.8646%2022.4436%2033.9735%2022.6062C34.0842%2022.7688%2034.1395%2022.9564%2034.1395%2023.1691C34.1395%2023.5202%2034.0271%2023.8055%2033.8023%2024.0251C33.5792%2024.2447%2033.2818%2024.3546%2032.91%2024.3546C32.5641%2024.3546%2032.2762%2024.2638%2032.0462%2024.0822C31.7747%2023.8677%2031.6389%2023.5738%2031.6389%2023.2002C31.6389%2022.9944%2031.6899%2022.8059%2031.792%2022.6347C31.894%2022.4618%2032.0548%2022.3286%2032.2744%2022.2353ZM32.4249%2021.5012C32.4249%2021.6464%2032.4655%2021.7597%2032.5468%2021.841C32.6298%2021.9222%2032.7396%2021.9629%2032.8762%2021.9629C33.0146%2021.9629%2033.1253%2021.9222%2033.2083%2021.841C33.2913%2021.758%2033.3328%2021.6438%2033.3328%2021.4986C33.3328%2021.3619%2033.2913%2021.253%2033.2083%2021.1717C33.127%2021.0887%2033.0189%2021.0472%2032.884%2021.0472C32.744%2021.0472%2032.6324%2021.0887%2032.5494%2021.1717C32.4664%2021.2547%2032.4249%2021.3645%2032.4249%2021.5012ZM32.3575%2023.1302C32.3575%2023.3308%2032.4085%2023.4873%2032.5105%2023.5997C32.6143%2023.7121%2032.7431%2023.7683%2032.897%2023.7683C33.0475%2023.7683%2033.172%2023.7147%2033.2705%2023.6075C33.3691%2023.4985%2033.4184%2023.342%2033.4184%2023.138C33.4184%2022.9598%2033.3682%2022.8172%2033.2679%2022.71C33.1676%2022.601%2033.0405%2022.5465%2032.8866%2022.5465C32.7085%2022.5465%2032.5753%2022.6079%2032.4872%2022.7307C32.4007%2022.8535%2032.3575%2022.9867%2032.3575%2023.1302ZM34.373%2024.352L35.3146%2020.4195H35.8619L34.9099%2024.352H34.373ZM36.0591%2023.278L36.7647%2023.1924C36.7871%2023.3723%2036.8477%2023.5098%2036.9462%2023.6049C37.0448%2023.7%2037.1641%2023.7476%2037.3042%2023.7476C37.4547%2023.7476%2037.5809%2023.6905%2037.6829%2023.5764C37.7867%2023.4622%2037.8386%2023.3083%2037.8386%2023.1146C37.8386%2022.9313%2037.7893%2022.786%2037.6907%2022.6788C37.5921%2022.5716%2037.472%2022.518%2037.3301%2022.518C37.2368%2022.518%2037.1252%2022.5362%2036.9955%2022.5725L37.0759%2021.9785C37.2731%2021.9836%2037.4235%2021.9413%2037.5273%2021.8513C37.631%2021.7597%2037.6829%2021.6386%2037.6829%2021.4882C37.6829%2021.3602%2037.6449%2021.2582%2037.5688%2021.1821C37.4927%2021.106%2037.3915%2021.068%2037.2653%2021.068C37.1408%2021.068%2037.0344%2021.1112%2036.9462%2021.1977C36.858%2021.2841%2036.8044%2021.4104%2036.7854%2021.5764L36.1136%2021.4622C36.1603%2021.2322%2036.2303%2021.0489%2036.3237%2020.9123C36.4188%2020.774%2036.5502%2020.6659%2036.718%2020.5881C36.8874%2020.5085%2037.0768%2020.4687%2037.286%2020.4687C37.644%2020.4687%2037.9311%2020.5829%2038.1473%2020.8112C38.3254%2020.9979%2038.4144%2021.2089%2038.4144%2021.4441C38.4144%2021.7778%2038.232%2022.0442%2037.8671%2022.243C38.085%2022.2897%2038.2588%2022.3944%2038.3885%2022.5569C38.5199%2022.7195%2038.5856%2022.9157%2038.5856%2023.1458C38.5856%2023.4795%2038.4637%2023.764%2038.2199%2023.9992C37.9761%2024.2344%2037.6726%2024.352%2037.3094%2024.352C36.9653%2024.352%2036.6799%2024.2534%2036.4534%2024.0562C36.2268%2023.8574%2036.0954%2023.598%2036.0591%2023.278ZM40.9073%2024.2871H40.1784V21.5401C39.912%2021.7891%2039.5982%2021.9733%2039.2367%2022.0926V21.4311C39.427%2021.3689%2039.6336%2021.2513%2039.8567%2021.0783C40.0798%2020.9037%2040.2328%2020.7005%2040.3158%2020.4687H40.9073V24.2871ZM41.7659%2024.352L42.7075%2020.4195H43.2548L42.3028%2024.352H41.7659ZM45.343%2024.2871H44.6141V21.5401C44.3478%2021.7891%2044.0339%2021.9733%2043.6725%2022.0926V21.4311C43.8627%2021.3689%2044.0694%2021.2513%2044.2924%2021.0783C44.5155%2020.9037%2044.6686%2020.7005%2044.7516%2020.4687H45.343V24.2871ZM46.4506%2023.4077L47.1562%2023.3299C47.1735%2023.4735%2047.2185%2023.5798%2047.2911%2023.649C47.3637%2023.7182%2047.4597%2023.7527%2047.579%2023.7527C47.7295%2023.7527%2047.8575%2023.6836%2047.9629%2023.5452C48.0684%2023.4069%2048.1359%2023.1198%2048.1653%2022.684C47.982%2022.8967%2047.7528%2023.0031%2047.4779%2023.0031C47.1787%2023.0031%2046.9202%2022.8881%2046.7023%2022.6581C46.4861%2022.4263%2046.378%2022.1254%2046.378%2021.7554C46.378%2021.3697%2046.4921%2021.0593%2046.7204%2020.8241C46.9504%2020.5872%2047.2427%2020.4687%2047.5972%2020.4687C47.9828%2020.4687%2048.2993%2020.6183%2048.5466%2020.9175C48.7939%2021.215%2048.9175%2021.7052%2048.9175%2022.3883C48.9175%2023.0835%2048.7887%2023.585%2048.531%2023.8928C48.2734%2024.2006%2047.9379%2024.3546%2047.5246%2024.3546C47.2271%2024.3546%2046.9867%2024.2759%2046.8034%2024.1185C46.6201%2023.9594%2046.5025%2023.7225%2046.4506%2023.4077ZM48.1004%2021.815C48.1004%2021.5798%2048.046%2021.3974%2047.937%2021.2677C47.8298%2021.138%2047.7053%2021.0731%2047.5635%2021.0731C47.4286%2021.0731%2047.3162%2021.1268%2047.2262%2021.234C47.1381%2021.3395%2047.094%2021.5133%2047.094%2021.7554C47.094%2022.0009%2047.1424%2022.1816%2047.2392%2022.2975C47.3361%2022.4116%2047.4571%2022.4687%2047.6024%2022.4687C47.7425%2022.4687%2047.86%2022.4134%2047.9552%2022.3027C48.052%2022.192%2048.1004%2022.0295%2048.1004%2021.815ZM50.0174%2022.2353C49.8289%2022.1557%2049.6914%2022.0468%2049.6049%2021.9084C49.5202%2021.7683%2049.4778%2021.6153%2049.4778%2021.4493C49.4778%2021.1657%2049.5764%2020.9313%2049.7736%2020.7463C49.9724%2020.5613%2050.2543%2020.4687%2050.6192%2020.4687C50.9806%2020.4687%2051.2608%2020.5613%2051.4597%2020.7463C51.6603%2020.9313%2051.7606%2021.1657%2051.7606%2021.4493C51.7606%2021.6257%2051.7147%2021.783%2051.6231%2021.9214C51.5314%2022.058%2051.4026%2022.1626%2051.2366%2022.2353C51.4475%2022.32%2051.6075%2022.4436%2051.7165%2022.6062C51.8271%2022.7688%2051.8825%2022.9564%2051.8825%2023.1691C51.8825%2023.5202%2051.7701%2023.8055%2051.5453%2024.0251C51.3222%2024.2447%2051.0247%2024.3546%2050.6529%2024.3546C50.3071%2024.3546%2050.0191%2024.2638%2049.7891%2024.0822C49.5176%2023.8677%2049.3819%2023.5738%2049.3819%2023.2002C49.3819%2022.9944%2049.4329%2022.8059%2049.5349%2022.6347C49.6369%2022.4618%2049.7978%2022.3286%2050.0174%2022.2353ZM50.1678%2021.5012C50.1678%2021.6464%2050.2085%2021.7597%2050.2898%2021.841C50.3728%2021.9222%2050.4826%2021.9629%2050.6192%2021.9629C50.7575%2021.9629%2050.8682%2021.9222%2050.9512%2021.841C51.0342%2021.758%2051.0757%2021.6438%2051.0757%2021.4986C51.0757%2021.3619%2051.0342%2021.253%2050.9512%2021.1717C50.8699%2021.0887%2050.7619%2021.0472%2050.627%2021.0472C50.4869%2021.0472%2050.3754%2021.0887%2050.2924%2021.1717C50.2093%2021.2547%2050.1678%2021.3645%2050.1678%2021.5012ZM50.1004%2023.1302C50.1004%2023.3308%2050.1514%2023.4873%2050.2534%2023.5997C50.3572%2023.7121%2050.486%2023.7683%2050.6399%2023.7683C50.7904%2023.7683%2050.9149%2023.7147%2051.0135%2023.6075C51.1121%2023.4985%2051.1613%2023.342%2051.1613%2023.138C51.1613%2022.9598%2051.1112%2022.8172%2051.0109%2022.71C50.9106%2022.601%2050.7835%2022.5465%2050.6296%2022.5465C50.4515%2022.5465%2050.3183%2022.6079%2050.2301%2022.7307C50.1436%2022.8535%2050.1004%2022.9867%2050.1004%2023.1302ZM52.3235%2023.278L53.029%2023.1924C53.0515%2023.3723%2053.112%2023.5098%2053.2106%2023.6049C53.3092%2023.7%2053.4285%2023.7476%2053.5686%2023.7476C53.719%2023.7476%2053.8453%2023.6905%2053.9473%2023.5764C54.0511%2023.4622%2054.1029%2023.3083%2054.1029%2023.1146C54.1029%2022.9313%2054.0537%2022.786%2053.9551%2022.6788C53.8565%2022.5716%2053.7363%2022.518%2053.5945%2022.518C53.5011%2022.518%2053.3896%2022.5362%2053.2599%2022.5725L53.3403%2021.9785C53.5374%2021.9836%2053.6879%2021.9413%2053.7917%2021.8513C53.8954%2021.7597%2053.9473%2021.6386%2053.9473%2021.4882C53.9473%2021.3602%2053.9093%2021.2582%2053.8332%2021.1821C53.7571%2021.106%2053.6559%2021.068%2053.5297%2021.068C53.4052%2021.068%2053.2988%2021.1112%2053.2106%2021.1977C53.1224%2021.2841%2053.0688%2021.4104%2053.0498%2021.5764L52.3779%2021.4622C52.4246%2021.2322%2052.4947%2021.0489%2052.588%2020.9123C52.6832%2020.774%2052.8146%2020.6659%2052.9823%2020.5881C53.1518%2020.5085%2053.3412%2020.4687%2053.5504%2020.4687C53.9084%2020.4687%2054.1955%2020.5829%2054.4116%2020.8112C54.5897%2020.9979%2054.6788%2021.2089%2054.6788%2021.4441C54.6788%2021.7778%2054.4964%2022.0442%2054.1315%2022.243C54.3494%2022.2897%2054.5232%2022.3944%2054.6529%2022.5569C54.7843%2022.7195%2054.85%2022.9157%2054.85%2023.1458C54.85%2023.4795%2054.7281%2023.764%2054.4843%2023.9992C54.2404%2024.2344%2053.9369%2024.352%2053.5738%2024.352C53.2296%2024.352%2052.9443%2024.2534%2052.7177%2024.0562C52.4912%2023.8574%2052.3598%2023.598%2052.3235%2023.278Z'%20fill='%23007AFF'/%3e%3cg%20clip-path='url(%23clip2_8319_10931)'%3e%3cg%20clip-path='url(%23clip3_8319_10931)'%3e%3crect%20x='-40.7822'%20y='-18.129'%20width='46.7501'%20height='56.6668'%20rx='3.54167'%20fill='%23D2D2D2'/%3e%3cpath%20d='M7.51522%2030.5187C9.67871%2034.4436%2010.9241%2043.4957%2010.9241%2043.4957H-43.6177C-43.6177%2043.4957%20-42.3719%2034.4426%20-40.2088%2030.5187C-38.0458%2026.5948%20-24.8634%2022.9554%20-24.8634%2022.9554C-23.6958%2025.0941%20-20.2684%2027.0449%20-16.76%2027.1321C-12.953%2027.2267%20-9.05053%2025.2755%20-7.83675%2022.954C-7.83675%2022.954%205.35173%2026.5938%207.51522%2030.5187Z'%20fill='white'/%3e%3cpath%20d='M7.51522%2030.5187C9.67871%2034.4436%2010.9241%2043.4957%2010.9241%2043.4957H-43.6177C-43.6177%2043.4957%20-42.3719%2034.4426%20-40.2088%2030.5187C-38.0458%2026.5948%20-24.8634%2022.9554%20-24.8634%2022.9554C-24.8634%2025.3339%20-20.3161%2028.764%20-16.76%2028.8251C-11.8017%2028.8251%20-7.83675%2025.3339%20-7.83675%2022.954C-7.83675%2022.954%205.35173%2026.5938%207.51522%2030.5187Z'%20fill='%23007AFF'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3crect%20x='0.600098'%20y='0.504761'%20width='71.9'%20height='40.9904'%20rx='3.5'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cdefs%3e%3cpattern%20id='pattern0_8319_10931'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_8319_10931'%20transform='matrix(0.00598802%200%200%200.00827909%200%20-0.000885247)'/%3e%3c/pattern%3e%3cclipPath%20id='clip0_8319_10931'%3e%3crect%20x='0.100098'%20y='0.00476074'%20width='72.9'%20height='41.9904'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10931'%3e%3crect%20x='-49.9917'%20y='-50.0001'%20width='177.084'%20height='102'%20rx='4.25001'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10931'%3e%3crect%20x='-40.0728'%20y='-18.129'%20width='46.0417'%20height='56.6668'%20rx='2.83334'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10931'%3e%3crect%20width='60.2084'%20height='60.2084'%20fill='white'%20transform='translate(-46.4478%20-18.129)'/%3e%3c/clipPath%3e%3cimage%20id='image0_8319_10931'%20width='167'%20height='121'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKcAAAB5CAYAAABcIjGzAAAAAXNSR0IArs4c6QAABj9JREFUeF7tnVvIpVMYx/cwDoMxXJhxuFAyyiElpEhckQuh3Dgkp0JqruScEqK5IBNySo5Drsgp5XSDQhQuuDNFjEMZh2FmmGRqZv/smfXt17eed/es3t9c/b81az3rWf/n17v2/lrfeheM/KcDSR1YkDQv09KBkXAKQVoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxIRTBtI6IJxpS2NiwikDaR0QzrSlMTHhlIG0Dghn2tKYmHDKQFoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxIRTBtI6IJxpS2NiwikDaR0QzrSlMTHhlIG0Dghn2tKYmHDKQFoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxISzjoFTMHwN9NfQl0K/AH0o9CPQb0C/Cb0S+lzoO6BvgV4I/SD0ztCrob+A3gX6iMJcdc51GC2cHUyao4tw1vk352jhrDNXOOv8E84e/SOc3BbXYs510EuhL4N+Cvp26Pehl0BfC70P9PLCtv4K2j8rbNOno30Z9Ea39R4J6jG0cPZortt6nbnCWeef23qP/vFb7d6Y5xfoTdDs8xvaN0PvCb0BenFhq/2jw/o4lvnwI8GPhfiL0N5lrg7pdOvik7ObT6Vewlnnn0/OHv0Tzh7N9cnZo7mGrnNAOOv8c3SPDghnj+Yaus4B4azzz9E9OiCcPZpr6DoHhLPOP0f36IBw1pl7MIbTy5/RTs1ferP9VPR/B5rH2/5G+wHQP0D/Bb1foc+BaN+1sPyv6myJGS2cdT4KZ51/c44WzjpzhbPOP+Hs0T+Gfhs/PFOYk9vux+hzNfSV0AdBvwvNk/bfo52n39ej/aXCXPyosAp9np+RZ8I5I6OFM9hot/U4Q4UzzsstkYQzztASnI9hiougP4feHfo06Iehf4V+Dfo7aP4GgEfvzkKfT6B5bO8etL8aZ8v8Iwnn/L2bHCmccV765Az2UjiDDfXJGWyo4eIcEM44L40U7IBwBhtquDgHhDPOSyMFOyCcwYYaLs4B4Yzz0kjBDghnsKGGi3NAOOO8NFKwA8IZbKjh4hwQzjgvefyMly3wVDmPrl2Bqb+Bvhj6oUI7j7S9hz7HQ38IfRg0j+0dh/a7oM+HvgD6UeizJ6y7ED+fB3099G3Ql0M/Ab3twlzhFM6tDghnHAvpIvnkHJfEJ2cCPLl9H1LYpo9BOy+GPRLtR0EfDv049InQL0M/C81jcmegnXfC34h23kv/XGFbvxntvIv+6An/eTf9mYWtnBfm8vT/6+h/zVbttl5HuHCO/RPOOpbCRwuncIZDFRXwSQTiKXe+roV/q34n+t8A/S30rdAfQfMbLT8S8LcBvDf+A4zdC3rfQs7n7GhrHY1GV6H90zmM4zZ9P/qdBH0v9HXQvE//Prf1GDyFc+yjcMYwFRZFOIUzDCYDNeSA39YbKtbQUhXOoVW8ofUKZ0PFGlqqwjm0ije0XuFsqFhDS1U4h1bxhtYrnA0Va2ipCufQKt7QeoWzoWINLVXhHFrFG1qvcDZUrKGlKpxDq3hD6xXOhoo1tFSFc2gVb2i9wtlQsYaWqnAOreINrVc4GyrW0FIVzqFVvKH1CmdDxRpaqsI5tIo3tF7hjCvWYoTi29Y4A/9+/Hf8x1Jovj+d18tsQJ+N0HtA8/3sm9G+E/Qm6D+hF0GTC87L+LtNWMc1L8P/rZ2vxcI5X+e2HyecY0+EM46rkEjCKZwhIPURhC9g5cWo3NZ+wsT7Qy8vbPFvof2Ewhb8ANrXQPNam6fRzotneT0Mb3rjDXKl97+/OGHiCvx8E3TpxbRTa+C2PtWizh2Ec2yVcHbGZjYdhVM4Z0Nax1l4gxovstp2r/loNOLbhHlPO79Nn4z5FkIzDrd13izH+F9iLO9fX4329dC8YJbbOt/bfiz63w3NjxP/NnO+Vei3EvqSjr5u6ea2/n/c2r6vcI49Ec46lsJHC6dwhkOVLSAvfV2XLbl55NPl12pTw7qtT7VoJh2Ecwc2C+dM2Js6iXAK51RI7JDIAZ+ciYphKv914B8yIqlXZ3YxPAAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",step3="data:image/svg+xml,%3csvg%20width='73'%20height='42'%20viewBox='0%200%2073%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20clip-path='url(%23clip0_8319_10967)'%3e%3cpath%20d='M0.100098%204.00354C0.100098%201.79441%201.89096%200.00354004%204.1001%200.00354004L69.0001%200.00354004C71.2092%200.00354004%2073.0001%201.7944%2073.0001%204.00354V37.9939C73.0001%2040.2031%2071.2092%2041.9939%2069.0001%2041.9939L4.1001%2041.9939C1.89097%2041.9939%200.100098%2040.2031%200.100098%2037.9939L0.100098%204.00354Z'%20fill='white'/%3e%3cpath%20d='M0.600098%204.00354C0.600098%202.07055%202.1671%200.50354%204.1001%200.50354L69.0001%200.50354C70.9331%200.50354%2072.5001%202.07054%2072.5001%204.00354V37.9939C72.5001%2039.9269%2070.9331%2041.4939%2069.0001%2041.4939L4.1001%2041.4939C2.16711%2041.4939%200.600098%2039.9269%200.600098%2037.9939L0.600098%204.00354Z'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.18382%209.02844C4.18392%208.87551%204.30791%208.75159%204.46084%208.75159L68.9329%208.75159C69.0859%208.75159%2069.2099%208.87561%2069.2099%209.02861V9.93257C69.2099%2010.0856%2069.0859%2010.2096%2068.9329%2010.2096L4.46029%2010.2096C4.30723%2010.2096%204.18318%2010.0855%204.18327%209.9324L4.18382%209.02844Z'%20fill='%23E9E9EB'/%3e%3crect%20x='62.7935'%20y='2.91858'%20width='6.4152'%20height='3.2076'%20rx='0.2916'%20fill='%23DBB107'/%3e%3crect%20opacity='0.25'%20x='4.47412'%20y='2.62854'%20width='46.3644'%20height='33.534'%20fill='url(%23pattern0_8319_10967)'/%3e%3cpath%20d='M4.60424%204.78977L5.11067%204.74053C5.14115%204.91052%205.2027%205.03536%205.29531%205.11508C5.38909%205.19479%205.51511%205.23465%205.67337%205.23465C5.84101%205.23465%205.96703%205.19948%206.05143%205.12915C6.13701%205.05764%206.1798%204.9744%206.1798%204.87945C6.1798%204.81849%206.16163%204.76691%206.12528%204.72471C6.09012%204.68133%206.02799%204.64382%205.93889%204.61217C5.87793%204.59107%205.73902%204.55355%205.52214%204.49963C5.24314%204.43046%205.04737%204.34547%204.93483%204.24466C4.77657%204.10281%204.69744%203.9299%204.69744%203.72592C4.69744%203.59463%204.73437%203.47212%204.80822%203.35841C4.88325%203.24353%204.99051%203.15619%205.13001%203.0964C5.27069%203.03662%205.44008%203.00672%205.6382%203.00672C5.96175%203.00672%206.205%203.07765%206.36795%203.21949C6.53207%203.36134%206.61823%203.55066%206.62644%203.78747L6.10594%203.81033C6.08367%203.67786%206.0356%203.5829%205.96175%203.52546C5.88907%203.46685%205.77946%203.43754%205.63292%203.43754C5.4817%203.43754%205.3633%203.4686%205.27772%203.53074C5.22263%203.57059%205.19508%203.62393%205.19508%203.69075C5.19508%203.75171%205.22087%203.80388%205.27245%203.84725C5.3381%203.90235%205.49753%203.95979%205.75074%204.01958C6.00395%204.07937%206.19093%204.1415%206.31168%204.20597C6.4336%204.26928%206.52855%204.35661%206.59654%204.46798C6.66571%204.57817%206.70029%204.71474%206.70029%204.87769C6.70029%205.0254%206.65926%205.16373%206.5772%205.29268C6.49514%205.42163%206.37908%205.51776%206.22903%205.58106C6.07898%205.64319%205.892%205.67426%205.66809%205.67426C5.3422%205.67426%205.09192%205.59923%204.91724%205.44918C4.74257%205.29796%204.63824%205.07815%204.60424%204.78977ZM7.66568%205.62854V3.48678H6.90076V3.05069H8.94933V3.48678H8.18617V5.62854H7.66568ZM11.2916%205.62854H10.7254L10.5003%205.04298H9.46984L9.25707%205.62854H8.70492L9.70898%203.05069H10.2594L11.2916%205.62854ZM10.3332%204.60865L9.97802%203.65207L9.62985%204.60865H10.3332ZM11.8297%205.62854V3.48678H11.0647V3.05069H13.1133V3.48678H12.3502V5.62854H11.8297ZM13.3982%205.62854V3.05069H15.3096V3.48678H13.9187V4.05826H15.2129V4.4926H13.9187V5.19421H15.3588V5.62854H13.3982ZM16.7023%205.62854V3.05069H17.2087L18.2638%204.77219V3.05069H18.7473V5.62854H18.2251L17.1859%203.94748V5.62854H16.7023ZM21.5714%205.62854H21.0052L20.7801%205.04298H19.7497L19.5369%205.62854H18.9847L19.9888%203.05069H20.5392L21.5714%205.62854ZM20.613%204.60865L20.2578%203.65207L19.9097%204.60865H20.613ZM21.7894%205.62854V3.05069H22.5684L23.0362%204.80911L23.4986%203.05069H24.2794V5.62854H23.7958V3.59931L23.2841%205.62854H22.783L22.273%203.59931V5.62854H21.7894ZM24.7436%205.62854V3.05069H26.655V3.48678H25.2641V4.05826H26.5583V4.4926H25.2641V5.19421H26.7043V5.62854H24.7436Z'%20fill='%23A6A6A6'/%3e%3cpath%20d='M27.0853%2029.1392H27.663C27.7933%2029.1392%2027.8926%2029.1492%2027.9609%2029.1691C28.0528%2029.1962%2028.1314%2029.2442%2028.1969%2029.3133C28.2624%2029.3823%2028.3123%2029.467%2028.3464%2029.5674C28.3806%2029.6671%2028.3977%2029.7903%2028.3977%2029.9369C28.3977%2030.0658%2028.3817%2030.1768%2028.3497%2030.2701C28.3105%2030.384%2028.2546%2030.4762%2028.182%2030.5467C28.1272%2030.6001%2028.0531%2030.6417%2027.9599%2030.6716C27.8901%2030.6937%2027.7968%2030.7047%2027.6801%2030.7047H27.0853V29.1392ZM27.4014%2029.404V30.4409H27.6374C27.7257%2030.4409%2027.7894%2030.436%2027.8285%2030.426C27.8798%2030.4132%2027.9221%2030.3915%2027.9556%2030.3609C27.9898%2030.3302%2028.0175%2030.2801%2028.0389%2030.2103C28.0603%2030.1398%2028.0709%2030.0441%2028.0709%2029.923C28.0709%2029.802%2028.0603%2029.7091%2028.0389%2029.6443C28.0175%2029.5795%2027.9876%2029.529%2027.9492%2029.4927C27.9108%2029.4564%2027.862%2029.4318%2027.8029%2029.419C27.7588%2029.409%2027.6723%2029.404%2027.5434%2029.404H27.4014ZM28.6027%2029.9316C28.6027%2029.7721%2028.6266%2029.6383%2028.6743%2029.5301C28.7099%2029.4503%2028.7583%2029.3788%2028.8195%2029.3154C28.8815%2029.2521%2028.9491%2029.2051%2029.0224%2029.1745C29.1199%2029.1332%2029.2324%2029.1125%2029.3599%2029.1125C29.5905%2029.1125%2029.7749%2029.1841%2029.913%2029.3272C30.0518%2029.4703%2030.1212%2029.6692%2030.1212%2029.9241C30.1212%2030.1768%2030.0525%2030.3747%2029.9151%2030.5178C29.7777%2030.6602%2029.5941%2030.7314%2029.3641%2030.7314C29.1313%2030.7314%2028.9462%2030.6606%2028.8088%2030.5189C28.6714%2030.3765%2028.6027%2030.1807%2028.6027%2029.9316ZM28.9284%2029.9209C28.9284%2030.0982%2028.9694%2030.2327%2029.0512%2030.3245C29.1331%2030.4157%2029.2371%2030.4612%2029.3631%2030.4612C29.4891%2030.4612%2029.5923%2030.416%2029.6727%2030.3256C29.7539%2030.2345%2029.7945%2030.0982%2029.7945%2029.9166C29.7945%2029.7372%2029.755%2029.6034%2029.6759%2029.5151C29.5976%2029.4268%2029.4933%2029.3827%2029.3631%2029.3827C29.2328%2029.3827%2029.1278%2029.4275%2029.048%2029.5172C28.9683%2029.6062%2028.9284%2029.7408%2028.9284%2029.9209ZM30.3701%2029.1392H30.9958C31.1197%2029.1392%2031.2119%2029.1446%2031.2724%2029.1552C31.3336%2029.1652%2031.3881%2029.1866%2031.4358%2029.2193C31.4842%2029.2521%2031.5244%2029.2958%2031.5565%2029.3507C31.5885%2029.4048%2031.6045%2029.4656%2031.6045%2029.5333C31.6045%2029.6066%2031.5846%2029.6739%2031.5447%2029.7351C31.5056%2029.7963%2031.4522%2029.8422%2031.3845%2029.8728C31.4799%2029.9006%2031.5533%2029.9479%2031.6045%2030.0149C31.6558%2030.0818%2031.6814%2030.1605%2031.6814%2030.2509C31.6814%2030.3221%2031.6647%2030.3915%2031.6312%2030.4591C31.5985%2030.526%2031.5533%2030.5798%2031.4956%2030.6204C31.4386%2030.6602%2031.3682%2030.6848%2031.2842%2030.694C31.2315%2030.6997%2031.1044%2030.7033%2030.9029%2030.7047H30.3701V29.1392ZM30.6862%2029.3998V29.7618H30.8933C31.0165%2029.7618%2031.093%2029.76%2031.1229%2029.7564C31.177%2029.75%2031.2194%2029.7315%2031.25%2029.7009C31.2813%2029.6696%2031.297%2029.6287%2031.297%2029.5781C31.297%2029.5297%2031.2834%2029.4905%2031.2564%2029.4606C31.2301%2029.43%2031.1905%2029.4115%2031.1379%2029.4051C31.1065%2029.4016%2031.0165%2029.3998%2030.8677%2029.3998H30.6862ZM30.6862%2030.0223V30.4409H30.9787C31.0927%2030.4409%2031.1649%2030.4377%2031.1955%2030.4313C31.2425%2030.4228%2031.2806%2030.4021%2031.3098%2030.3694C31.3397%2030.3359%2031.3546%2030.2914%2031.3546%2030.2359C31.3546%2030.1889%2031.3432%2030.1491%2031.3205%2030.1163C31.2977%2030.0836%2031.2646%2030.0597%2031.2212%2030.0448C31.1784%2030.0298%2031.0852%2030.0223%2030.9414%2030.0223H30.6862ZM32.9992%2029.1328C33.1508%2029.1328%2033.2693%2029.1869%2033.3548%2029.2951C33.4566%2029.4233%2033.5075%2029.6358%2033.5075%2029.9326C33.5075%2030.2288%2033.4562%2030.4417%2033.3537%2030.5712C33.269%2030.678%2033.1508%2030.7314%2032.9992%2030.7314C32.8468%2030.7314%2032.724%2030.673%2032.6307%2030.5563C32.5375%2030.4388%2032.4909%2030.2299%2032.4909%2029.9294C32.4909%2029.6347%2032.5421%2029.4226%2032.6446%2029.293C32.7293%2029.1862%2032.8475%2029.1328%2032.9992%2029.1328ZM32.9992%2029.3816C32.9629%2029.3816%2032.9305%2029.3934%2032.902%2029.4169C32.8735%2029.4396%2032.8514%2029.4809%2032.8358%2029.5407C32.8151%2029.6183%2032.8048%2029.749%2032.8048%2029.9326C32.8048%2030.1163%2032.8141%2030.2427%2032.8326%2030.3117C32.8511%2030.3801%2032.8742%2030.4256%2032.902%2030.4484C32.9305%2030.4712%2032.9629%2030.4826%2032.9992%2030.4826C33.0355%2030.4826%2033.0679%2030.4712%2033.0963%2030.4484C33.1248%2030.4249%2033.1469%2030.3833%2033.1625%2030.3235C33.1832%2030.2466%2033.1935%2030.1163%2033.1935%2029.9326C33.1935%2029.749%2033.1843%2029.623%2033.1657%2029.5546C33.1472%2029.4856%2033.1237%2029.4396%2033.0953%2029.4169C33.0675%2029.3934%2033.0355%2029.3816%2032.9992%2029.3816ZM33.9667%2029.86C33.8891%2029.8273%2033.8325%2029.7824%2033.7969%2029.7255C33.762%2029.6678%2033.7445%2029.6048%2033.7445%2029.5365C33.7445%2029.4197%2033.7851%2029.3232%2033.8663%2029.2471C33.9481%2029.1709%2034.0642%2029.1328%2034.2144%2029.1328C34.3632%2029.1328%2034.4785%2029.1709%2034.5604%2029.2471C34.643%2029.3232%2034.6843%2029.4197%2034.6843%2029.5365C34.6843%2029.6091%2034.6654%2029.6739%2034.6277%2029.7308C34.5899%2029.7871%2034.5369%2029.8301%2034.4686%2029.86C34.5554%2029.8949%2034.6213%2029.9458%2034.6661%2030.0127C34.7117%2030.0797%2034.7345%2030.1569%2034.7345%2030.2445C34.7345%2030.389%2034.6882%2030.5064%2034.5956%2030.5969C34.5038%2030.6873%2034.3813%2030.7325%2034.2283%2030.7325C34.0859%2030.7325%2033.9674%2030.6951%2033.8727%2030.6204C33.7609%2030.5321%2033.705%2030.411%2033.705%2030.2573C33.705%2030.1726%2033.726%2030.095%2033.768%2030.0245C33.81%2029.9533%2033.8762%2029.8985%2033.9667%2029.86ZM34.0286%2029.5578C34.0286%2029.6176%2034.0453%2029.6642%2034.0788%2029.6977C34.113%2029.7312%2034.1582%2029.7479%2034.2144%2029.7479C34.2714%2029.7479%2034.3169%2029.7312%2034.3511%2029.6977C34.3853%2029.6635%2034.4023%2029.6166%2034.4023%2029.5568C34.4023%2029.5005%2034.3853%2029.4557%2034.3511%2029.4222C34.3176%2029.388%2034.2731%2029.3709%2034.2176%2029.3709C34.1599%2029.3709%2034.114%2029.388%2034.0798%2029.4222C34.0457%2029.4564%2034.0286%2029.5016%2034.0286%2029.5578ZM34.0008%2030.2284C34.0008%2030.311%2034.0218%2030.3755%2034.0638%2030.4217C34.1065%2030.468%2034.1596%2030.4911%2034.2229%2030.4911C34.2849%2030.4911%2034.3361%2030.4691%2034.3767%2030.4249C34.4173%2030.3801%2034.4376%2030.3157%2034.4376%2030.2316C34.4376%2030.1583%2034.4169%2030.0996%2034.3756%2030.0554C34.3344%2030.0106%2034.282%2029.9882%2034.2187%2029.9882C34.1453%2029.9882%2034.0905%2030.0134%2034.0542%2030.064C34.0186%2030.1145%2034.0008%2030.1694%2034.0008%2030.2284ZM34.8306%2030.7314L35.2182%2029.1125H35.4435L35.0516%2030.7314H34.8306ZM35.5247%2030.2893L35.8151%2030.2541C35.8244%2030.3281%2035.8493%2030.3847%2035.8899%2030.4239C35.9305%2030.463%2035.9796%2030.4826%2036.0373%2030.4826C36.0992%2030.4826%2036.1512%2030.4591%2036.1932%2030.4121C36.2359%2030.3651%2036.2572%2030.3018%2036.2572%2030.222C36.2572%2030.1466%2036.2369%2030.0868%2036.1964%2030.0426C36.1558%2029.9985%2036.1063%2029.9764%2036.0479%2029.9764C36.0095%2029.9764%2035.9636%2029.9839%2035.9102%2029.9988L35.9433%2029.7543C36.0244%2029.7564%2036.0864%2029.739%2036.1291%2029.702C36.1718%2029.6642%2036.1932%2029.6144%2036.1932%2029.5525C36.1932%2029.4998%2036.1775%2029.4578%2036.1462%2029.4265C36.1149%2029.3951%2036.0732%2029.3795%2036.0212%2029.3795C35.97%2029.3795%2035.9262%2029.3973%2035.8899%2029.4329C35.8536%2029.4685%2035.8315%2029.5204%2035.8237%2029.5888L35.5471%2029.5418C35.5663%2029.4471%2035.5952%2029.3717%2035.6336%2029.3154C35.6728%2029.2585%2035.7269%2029.214%2035.7959%2029.1819C35.8657%2029.1492%2035.9436%2029.1328%2036.0298%2029.1328C36.1771%2029.1328%2036.2953%2029.1798%2036.3843%2029.2738C36.4576%2029.3507%2036.4943%2029.4375%2036.4943%2029.5343C36.4943%2029.6717%2036.4192%2029.7814%2036.269%2029.8632C36.3587%2029.8825%2036.4302%2029.9255%2036.4836%2029.9924C36.5377%2030.0594%2036.5648%2030.1402%2036.5648%2030.2348C36.5648%2030.3722%2036.5146%2030.4894%2036.4142%2030.5862C36.3138%2030.683%2036.1889%2030.7314%2036.0394%2030.7314C35.8977%2030.7314%2035.7803%2030.6908%2035.687%2030.6097C35.5937%2030.5278%2035.5396%2030.421%2035.5247%2030.2893ZM37.5205%2030.7047H37.2205V29.5738C37.1108%2029.6764%2036.9816%2029.7522%2036.8328%2029.8013V29.529C36.9111%2029.5034%2036.9962%2029.4549%2037.088%2029.3838C37.1799%2029.3119%2037.2429%2029.2282%2037.2771%2029.1328H37.5205V30.7047ZM37.874%2030.7314L38.2616%2029.1125H38.4869L38.095%2030.7314H37.874ZM39.3466%2030.7047H39.0465V29.5738C38.9369%2029.6764%2038.8077%2029.7522%2038.6589%2029.8013V29.529C38.7372%2029.5034%2038.8223%2029.4549%2038.9141%2029.3838C39.0059%2029.3119%2039.0689%2029.2282%2039.1031%2029.1328H39.3466V30.7047ZM39.8026%2030.3427L40.093%2030.3107C40.1001%2030.3698%2040.1187%2030.4135%2040.1486%2030.442C40.1785%2030.4705%2040.218%2030.4847%2040.2671%2030.4847C40.329%2030.4847%2040.3817%2030.4563%2040.4251%2030.3993C40.4686%2030.3423%2040.4963%2030.2242%2040.5084%2030.0448C40.433%2030.1323%2040.3386%2030.1761%2040.2254%2030.1761C40.1023%2030.1761%2039.9959%2030.1288%2039.9062%2030.0341C39.8172%2029.9387%2039.7727%2029.8148%2039.7727%2029.6625C39.7727%2029.5037%2039.8197%2029.3759%2039.9136%2029.2791C40.0083%2029.1816%2040.1286%2029.1328%2040.2746%2029.1328C40.4333%2029.1328%2040.5636%2029.1944%2040.6654%2029.3175C40.7672%2029.44%2040.8181%2029.6418%2040.8181%2029.923C40.8181%2030.2092%2040.7651%2030.4157%2040.659%2030.5424C40.5529%2030.6691%2040.4148%2030.7325%2040.2447%2030.7325C40.1222%2030.7325%2040.0233%2030.7001%2039.9478%2030.6353C39.8723%2030.5698%2039.8239%2030.4723%2039.8026%2030.3427ZM40.4817%2029.687C40.4817%2029.5902%2040.4593%2029.5151%2040.4145%2029.4617C40.3703%2029.4083%2040.3191%2029.3816%2040.2607%2029.3816C40.2052%2029.3816%2040.1589%2029.4037%2040.1219%2029.4478C40.0856%2029.4913%2040.0674%2029.5628%2040.0674%2029.6625C40.0674%2029.7636%2040.0873%2029.838%2040.1272%2029.8857C40.1671%2029.9326%2040.2169%2029.9561%2040.2767%2029.9561C40.3344%2029.9561%2040.3828%2029.9334%2040.4219%2029.8878C40.4618%2029.8422%2040.4817%2029.7753%2040.4817%2029.687ZM41.2709%2029.86C41.1933%2029.8273%2041.1367%2029.7824%2041.1011%2029.7255C41.0662%2029.6678%2041.0488%2029.6048%2041.0488%2029.5365C41.0488%2029.4197%2041.0894%2029.3232%2041.1705%2029.2471C41.2524%2029.1709%2041.3684%2029.1328%2041.5186%2029.1328C41.6674%2029.1328%2041.7828%2029.1709%2041.8646%2029.2471C41.9472%2029.3232%2041.9885%2029.4197%2041.9885%2029.5365C41.9885%2029.6091%2041.9696%2029.6739%2041.9319%2029.7308C41.8942%2029.7871%2041.8411%2029.8301%2041.7728%2029.86C41.8596%2029.8949%2041.9255%2029.9458%2041.9703%2030.0127C42.0159%2030.0797%2042.0387%2030.1569%2042.0387%2030.2445C42.0387%2030.389%2041.9924%2030.5064%2041.8999%2030.5969C41.808%2030.6873%2041.6856%2030.7325%2041.5325%2030.7325C41.3901%2030.7325%2041.2716%2030.6951%2041.1769%2030.6204C41.0651%2030.5321%2041.0093%2030.411%2041.0093%2030.2573C41.0093%2030.1726%2041.0303%2030.095%2041.0723%2030.0245C41.1143%2029.9533%2041.1805%2029.8985%2041.2709%2029.86ZM41.3328%2029.5578C41.3328%2029.6176%2041.3496%2029.6642%2041.383%2029.6977C41.4172%2029.7312%2041.4624%2029.7479%2041.5186%2029.7479C41.5756%2029.7479%2041.6212%2029.7312%2041.6553%2029.6977C41.6895%2029.6635%2041.7066%2029.6166%2041.7066%2029.5568C41.7066%2029.5005%2041.6895%2029.4557%2041.6553%2029.4222C41.6219%2029.388%2041.5774%2029.3709%2041.5218%2029.3709C41.4642%2029.3709%2041.4183%2029.388%2041.3841%2029.4222C41.3499%2029.4564%2041.3328%2029.5016%2041.3328%2029.5578ZM41.3051%2030.2284C41.3051%2030.311%2041.3261%2030.3755%2041.3681%2030.4217C41.4108%2030.468%2041.4638%2030.4911%2041.5272%2030.4911C41.5891%2030.4911%2041.6404%2030.4691%2041.681%2030.4249C41.7215%2030.3801%2041.7418%2030.3157%2041.7418%2030.2316C41.7418%2030.1583%2041.7212%2030.0996%2041.6799%2030.0554C41.6386%2030.0106%2041.5863%2029.9882%2041.5229%2029.9882C41.4496%2029.9882%2041.3948%2030.0134%2041.3585%2030.064C41.3229%2030.1145%2041.3051%2030.1694%2041.3051%2030.2284ZM42.2202%2030.2893L42.5107%2030.2541C42.5199%2030.3281%2042.5449%2030.3847%2042.5854%2030.4239C42.626%2030.463%2042.6751%2030.4826%2042.7328%2030.4826C42.7947%2030.4826%2042.8467%2030.4591%2042.8887%2030.4121C42.9314%2030.3651%2042.9528%2030.3018%2042.9528%2030.222C42.9528%2030.1466%2042.9325%2030.0868%2042.8919%2030.0426C42.8513%2029.9985%2042.8019%2029.9764%2042.7435%2029.9764C42.705%2029.9764%2042.6591%2029.9839%2042.6057%2029.9988L42.6388%2029.7543C42.72%2029.7564%2042.7819%2029.739%2042.8246%2029.702C42.8674%2029.6642%2042.8887%2029.6144%2042.8887%2029.5525C42.8887%2029.4998%2042.8731%2029.4578%2042.8417%2029.4265C42.8104%2029.3951%2042.7688%2029.3795%2042.7168%2029.3795C42.6655%2029.3795%2042.6217%2029.3973%2042.5854%2029.4329C42.5491%2029.4685%2042.5271%2029.5204%2042.5192%2029.5888L42.2427%2029.5418C42.2619%2029.4471%2042.2907%2029.3717%2042.3291%2029.3154C42.3683%2029.2585%2042.4224%2029.214%2042.4915%2029.1819C42.5612%2029.1492%2042.6392%2029.1328%2042.7253%2029.1328C42.8727%2029.1328%2042.9909%2029.1798%2043.0799%2029.2738C43.1532%2029.3507%2043.1899%2029.4375%2043.1899%2029.5343C43.1899%2029.6717%2043.1147%2029.7814%2042.9645%2029.8632C43.0542%2029.8825%2043.1258%2029.9255%2043.1792%2029.9924C43.2333%2030.0594%2043.2603%2030.1402%2043.2603%2030.2348C43.2603%2030.3722%2043.2101%2030.4894%2043.1098%2030.5862C43.0094%2030.683%2042.8844%2030.7314%2042.7349%2030.7314C42.5933%2030.7314%2042.4758%2030.6908%2042.3825%2030.6097C42.2893%2030.5278%2042.2352%2030.421%2042.2202%2030.2893Z'%20fill='%23007AFF'/%3e%3cg%20clip-path='url(%23clip1_8319_10967)'%3e%3cg%20clip-path='url(%23clip2_8319_10967)'%3e%3crect%20x='3.89111'%20y='13.1241'%20width='19.2456'%20height='23.328'%20rx='1.458'%20fill='%23D2D2D2'/%3e%3cpath%20d='M23.774%2033.1515C24.6646%2034.7673%2025.1773%2038.4938%2025.1773%2038.4938H2.72412C2.72412%2038.4938%203.23699%2034.7669%204.12745%2033.1515C5.0179%2031.5362%2010.4447%2030.0379%2010.4447%2030.0379C10.9253%2030.9184%2012.3363%2031.7215%2013.7806%2031.7574C15.3479%2031.7963%2016.9544%2030.993%2017.4541%2030.0374C17.4541%2030.0374%2022.8834%2031.5358%2023.774%2033.1515Z'%20fill='white'/%3e%3cpath%20d='M11.3212%2028.6495V28.6851C11.3115%2029.4389%2010.6815%2030.0056%209.43115%2030.3854C10.9377%2031.4876%2012.4444%2032.3694%2013.951%2032.3694C15.4575%2032.3694%2016.9642%2031.4876%2018.4708%2030.3854C17.2289%2030.0052%2016.5989%2029.4376%2016.5807%2028.6825C16.5807%2028.396%2016.5816%2025.6045%2016.583%2025.3179C16.6728%2025.3306%2016.6651%2025.3225%2016.583%2025.2996C16.5854%2024.3556%2016.5894%2025.5913%2016.595%2024.3013C16.6006%2023.0113%2011.2343%2021.8572%2011.313%2025.3993C11.3141%2025.7605%2011.3162%2028.2405%2011.3212%2028.6495Z'%20fill='url(%23paint0_linear_8319_10967)'/%3e%3cpath%20d='M23.774%2033.1515C24.6646%2034.7673%2025.1773%2038.4938%2025.1773%2038.4938H2.72412C2.72412%2038.4938%203.23699%2034.7669%204.12745%2033.1515C5.0179%2031.5362%2010.4447%2030.0379%2010.4447%2030.0379C10.4447%2031.0171%2012.3167%2032.4292%2013.7806%2032.4543C15.8218%2032.4543%2017.4541%2031.0171%2017.4541%2030.0374C17.4541%2030.0374%2022.8834%2031.5358%2023.774%2033.1515Z'%20fill='%23007AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.5277%2025.2645C16.8122%2027.3791%2015.1639%2028.8702%2013.8056%2028.8702C12.322%2028.8702%2010.742%2027.3833%2010.0641%2025.2733C9.68216%2025.2756%209.43571%2024.2888%209.34859%2023.9151C9.33461%2023.8551%209.31822%2023.7976%209.30207%2023.7409C9.21521%2023.4364%209.13499%2023.155%209.47015%2022.6267C9.55347%2022.4953%209.64178%2022.4217%209.72956%2022.3888C9.7844%2019.768%2010.2642%2017.2062%2013.8056%2017.2062C17.3499%2017.2062%2017.8275%2019.7169%2017.8817%2022.382C17.9702%2022.4152%2018.0589%2022.4898%2018.1419%2022.6235C18.4721%2023.1551%2018.3893%2023.4356%2018.2996%2023.7394L18.2996%2023.7394C18.2829%2023.7959%2018.266%2023.8532%2018.2514%2023.913C18.1612%2024.2845%2017.9071%2025.2628%2017.5277%2025.2645Z'%20fill='url(%23paint1_linear_8319_10967)'/%3e%3c/g%3e%3c/g%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip3_8319_10967)'%3e%3cpath%20d='M64.4011%2033.7762V33.7906C64.3973%2034.0968%2064.1534%2034.3271%2063.6694%2034.4814C64.2526%2034.9292%2064.8358%2035.2874%2065.419%2035.2874C66.0022%2035.2874%2066.5854%2034.9292%2067.1686%2034.4814C66.6879%2034.3269%2066.444%2034.0963%2066.437%2033.7896C66.437%2033.6732%2066.4374%2032.5391%2066.4379%2032.4227C66.4726%2032.4279%2066.4697%2032.4246%2066.4379%2032.4153C66.4388%2032.0318%2066.4404%2032.5338%2066.4425%2032.0097C66.4447%2031.4857%2064.3674%2031.0168%2064.3979%2032.4558C64.3983%2032.6025%2064.3991%2033.61%2064.4011%2033.7762Z'%20fill='url(%23paint2_linear_8319_10967)'/%3e%3cpath%20d='M69.5191%2035.3017C69.8776%2035.9146%2070.084%2037.3281%2070.084%2037.3281H61.0444C61.0444%2037.3281%2061.2509%2035.9144%2061.6094%2035.3017C61.9679%2034.689%2064.1527%2034.1207%2064.1527%2034.1207C64.1527%2034.4921%2064.9064%2035.0277%2065.4957%2035.0373C66.3175%2035.0373%2066.9747%2034.4921%2066.9747%2034.1205C66.9747%2034.1205%2069.1605%2034.6888%2069.5191%2035.3017Z'%20fill='%23C6C6C6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M67.0406%2032.2085C66.7509%2033.1524%2066.0183%2033.8267%2065.4179%2033.8267C64.7838%2033.8267%2064.1085%2033.1979%2063.8169%2032.3048C63.6457%2032.2712%2063.5307%2031.9204%2063.4883%2031.7821C63.481%2031.7584%2063.4726%2031.7358%2063.4643%2031.7136C63.4195%2031.5938%2063.3781%2031.4832%2063.5426%2031.2621C63.583%2031.2078%2063.6262%2031.1759%2063.6693%2031.1601C63.6775%2030.0146%2063.796%2028.8523%2065.4179%2028.8697C67.1407%2028.8697%2067.1709%2029.9771%2067.1677%2031.1331C67.2115%2031.1518%2067.2541%2031.1877%2067.2915%2031.2481C67.4366%2031.4821%2067.3859%2031.5888%2067.331%2031.7043L67.331%2031.7043C67.3208%2031.7258%2067.3105%2031.7476%2067.3012%2031.7706C67.2592%2031.8748%2067.1628%2032.1027%2067.0406%2032.2085Z'%20fill='url(%23paint3_linear_8319_10967)'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_8319_10967'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_8319_10967'%20transform='matrix(0.00598802%200%200%200.00827909%200%20-0.000885226)'/%3e%3c/pattern%3e%3clinearGradient%20id='paint0_linear_8319_10967'%20x1='13.5501'%20y1='25.6147'%20x2='13.5501'%20y2='29.9985'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B1B1B1'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8319_10967'%20x1='10.3827'%20y1='22.9837'%20x2='16.0242'%20y2='23.0044'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8319_10967'%20x1='65.2639'%20y1='32.5433'%20x2='65.2639'%20y2='34.3242'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D6D4D4'/%3e%3cstop%20offset='1'%20stop-color='%23E4E4E4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8319_10967'%20x1='63.6576'%20y1='31.9783'%20x2='65.5906'%20y2='31.9783'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CECECE'/%3e%3cstop%20offset='1'%20stop-color='%23E7E7E7'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_8319_10967'%3e%3crect%20x='0.100098'%20y='0.00476074'%20width='72.9'%20height='41.9904'%20rx='1.7496'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10967'%3e%3crect%20x='4.18311'%20y='13.1246'%20width='18.954'%20height='23.328'%20rx='1.1664'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10967'%3e%3crect%20width='24.786'%20height='24.786'%20fill='white'%20transform='translate(1.55908%2013.1244)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10967'%3e%3crect%20width='9.9144'%20height='9.9144'%20fill='white'%20transform='translate(60.4614%2027.4137)'/%3e%3c/clipPath%3e%3cimage%20id='image0_8319_10967'%20width='167'%20height='121'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKcAAAB5CAYAAABcIjGzAAAAAXNSR0IArs4c6QAABj9JREFUeF7tnVvIpVMYx/cwDoMxXJhxuFAyyiElpEhckQuh3Dgkp0JqruScEqK5IBNySo5Drsgp5XSDQhQuuDNFjEMZh2FmmGRqZv/smfXt17eed/es3t9c/b81az3rWf/n17v2/lrfeheM/KcDSR1YkDQv09KBkXAKQVoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxIRTBtI6IJxpS2NiwikDaR0QzrSlMTHhlIG0Dghn2tKYmHDKQFoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxIRTBtI6IJxpS2NiwikDaR0QzrSlMTHhlIG0Dghn2tKYmHDKQFoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxISzjoFTMHwN9NfQl0K/AH0o9CPQb0C/Cb0S+lzoO6BvgV4I/SD0ztCrob+A3gX6iMJcdc51GC2cHUyao4tw1vk352jhrDNXOOv8E84e/SOc3BbXYs510EuhL4N+Cvp26Pehl0BfC70P9PLCtv4K2j8rbNOno30Z9Ea39R4J6jG0cPZortt6nbnCWeef23qP/vFb7d6Y5xfoTdDs8xvaN0PvCb0BenFhq/2jw/o4lvnwI8GPhfiL0N5lrg7pdOvik7ObT6Vewlnnn0/OHv0Tzh7N9cnZo7mGrnNAOOv8c3SPDghnj+Yaus4B4azzz9E9OiCcPZpr6DoHhLPOP0f36IBw1pl7MIbTy5/RTs1ferP9VPR/B5rH2/5G+wHQP0D/Bb1foc+BaN+1sPyv6myJGS2cdT4KZ51/c44WzjpzhbPOP+Hs0T+Gfhs/PFOYk9vux+hzNfSV0AdBvwvNk/bfo52n39ej/aXCXPyosAp9np+RZ8I5I6OFM9hot/U4Q4UzzsstkYQzztASnI9hiougP4feHfo06Iehf4V+Dfo7aP4GgEfvzkKfT6B5bO8etL8aZ8v8Iwnn/L2bHCmccV765Az2UjiDDfXJGWyo4eIcEM44L40U7IBwBhtquDgHhDPOSyMFOyCcwYYaLs4B4Yzz0kjBDghnsKGGi3NAOOO8NFKwA8IZbKjh4hwQzjgvefyMly3wVDmPrl2Bqb+Bvhj6oUI7j7S9hz7HQ38IfRg0j+0dh/a7oM+HvgD6UeizJ6y7ED+fB3099G3Ql0M/Ab3twlzhFM6tDghnHAvpIvnkHJfEJ2cCPLl9H1LYpo9BOy+GPRLtR0EfDv049InQL0M/C81jcmegnXfC34h23kv/XGFbvxntvIv+6An/eTf9mYWtnBfm8vT/6+h/zVbttl5HuHCO/RPOOpbCRwuncIZDFRXwSQTiKXe+roV/q34n+t8A/S30rdAfQfMbLT8S8LcBvDf+A4zdC3rfQs7n7GhrHY1GV6H90zmM4zZ9P/qdBH0v9HXQvE//Prf1GDyFc+yjcMYwFRZFOIUzDCYDNeSA39YbKtbQUhXOoVW8ofUKZ0PFGlqqwjm0ije0XuFsqFhDS1U4h1bxhtYrnA0Va2ipCufQKt7QeoWzoWINLVXhHFrFG1qvcDZUrKGlKpxDq3hD6xXOhoo1tFSFc2gVb2i9wtlQsYaWqnAOreINrVc4GyrW0FIVzqFVvKH1CmdDxRpaqsI5tIo3tF7hjCvWYoTi29Y4A/9+/Hf8x1Jovj+d18tsQJ+N0HtA8/3sm9G+E/Qm6D+hF0GTC87L+LtNWMc1L8P/rZ2vxcI5X+e2HyecY0+EM46rkEjCKZwhIPURhC9g5cWo3NZ+wsT7Qy8vbPFvof2Ewhb8ANrXQPNam6fRzotneT0Mb3rjDXKl97+/OGHiCvx8E3TpxbRTa+C2PtWizh2Ec2yVcHbGZjYdhVM4Z0Nax1l4gxovstp2r/loNOLbhHlPO79Nn4z5FkIzDrd13izH+F9iLO9fX4329dC8YJbbOt/bfiz63w3NjxP/NnO+Vei3EvqSjr5u6ea2/n/c2r6vcI49Ec46lsJHC6dwhkOVLSAvfV2XLbl55NPl12pTw7qtT7VoJh2Ecwc2C+dM2Js6iXAK51RI7JDIAZ+ciYphKv914B8yIqlXZ3YxPAAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",imageSources={light:{position:"https://sdk.incode.com/sdk/tutorials/id-position.gif",shadow:"https://sdk.incode.com/sdk/tutorials/id-shadow.gif"},dark:{position:"https://sdk.incode.com/sdk/tutorials/front-dark.gif",shadow:"https://sdk.incode.com/sdk/tutorials/front-shadow-dark.gif"}};function TutorialFront$1({onSuccess:Be,token:Le={token:""},ageAssurance:Ye}){const{t:tt}=useTranslation$1();useScreenEvents({module:eventModuleNames.front,screen:eventScreenNames.frontTutorial,token:Le==null?void 0:Le.token});const nt=React.useRef(null);useAutoFocus(nt,!0);const[ft,ht]=React.useState(tt("common.continue")),[gt,At]=React.useState(()=>tt(`tutorial.front.${Ye?"ageVerification":"titleFrame"}`)),[xt,Et]=React.useState(()=>Ye?tt("tutorial.front.ageVerificationSubtitle"):null),[yt,Ct]=React.useState(!0),[kt,vt]=React.useState(null),bt=Lt=>{const Nt=options.darkMode?"dark":"light";return imageSources[Nt][Lt]},It=()=>{ht(tt("common.continue")),At(tt("tutorial.front.titleFrame")),Et(null),Ct(!0)},wt=()=>{ht(tt("common.readyToScan")),At(tt("tutorial.front.titleGlare")),Et(null),Ct(!1)},Rt=()=>{switch(kt.slides[kt.activeIndex].id){case"AGE_ASSURANCE":It(),kt.slideTo(1);break;case"FRAME_INSTRUCTIONS":wt(),Bt(),kt.slideTo(Ye?2:1);break;case"GLARE_INSTRUCTIONS":Tt();break}};React.useEffect(()=>{Le&&addEvent({token:Le==null?void 0:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"ID Preparation feedbacks"})},[]);function Tt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be(!0)}const Bt=()=>{setTimeout(()=>{var Lt,Nt;(Lt=nt.current)==null||Lt.focus(),(Nt=nt.current)==null||Nt.blur()},0)};function Dt(Lt){const Nt=Lt.activeIndex,Pt=Lt.slides[Nt],Wt=Pt==null?void 0:Pt.getAttribute("id");Wt==="GLARE_INSTRUCTIONS"&&!Ye&&wt(),Wt==="FRAME_INSTRUCTIONS"&&It()}return mobile.isDesktop()?jsxRuntimeExports.jsx(Tutorial$1,{token:Le,src:"https://sdk.incode.com/sdk/tutorials/tutorial-front-desktop.mp4",next:Tt,type:"Front",header:jsxRuntimeExports.jsx(HiddenTitle,{"aria-hidden":"true",children:"Capture Front ID Tutorial"})}):jsxRuntimeExports.jsx(RootContainer,{cssSelector:"IncodeTutorialContainerFront",children:jsxRuntimeExports.jsxs(TutorialContainer$2,{children:[jsxRuntimeExports.jsx(TutorialHeader$1,{children:jsxRuntimeExports.jsxs("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderFront",children:[jsxRuntimeExports.jsx("h1",{ref:nt,tabIndex:-1,className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleFront",children:gt}),xt?jsxRuntimeExports.jsx(TutorialSubtitle,{children:xt}):null]})}),jsxRuntimeExports.jsxs(Swiper,{cssMode:!0,autoplay:!1,className:"IncodeSwiperComponent",onSwiper:vt,pagination:!0,modules:[Pagination],onSlideChange:Dt,children:[Ye?jsxRuntimeExports.jsx(SwiperSlide,{id:"AGE_ASSURANCE",style:{flexDirection:"column"},children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",style:{alignItems:"flex-start"},children:jsxRuntimeExports.jsxs(AgeStepsWrapper,{children:[jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"1"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep1")}),jsxRuntimeExports.jsx("img",{src:step1,alt:tt("tutorial.front.ageVerificationStep1")})]}),jsxRuntimeExports.jsx(AgeStepDivder,{}),jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"2"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep2")}),jsxRuntimeExports.jsx("img",{src:step2,alt:tt("tutorial.front.ageVerificationStep2")})]}),jsxRuntimeExports.jsx(AgeStepDivder,{}),jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"3"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep3")}),jsxRuntimeExports.jsx("img",{src:step3,alt:tt("tutorial.front.ageVerificationStep3")})]})]})})}):null,jsxRuntimeExports.jsx(SwiperSlide,{id:"FRAME_INSTRUCTIONS",children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",children:jsxRuntimeExports.jsx("img",{src:bt("position"),"aria-hidden":!yt,alt:tt("tutorial.front.titleAriaFrame")})})}),jsxRuntimeExports.jsx(SwiperSlide,{id:"GLARE_INSTRUCTIONS",children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",children:jsxRuntimeExports.jsx("img",{src:bt("shadow"),alt:tt("tutorial.front.titleGlare")})})})]}),jsxRuntimeExports.jsx(FrontTutorialAction,{className:cx("IncodeTutorialButtonContainer","IncodeTutorialButtonContainerFront"),children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonFront"),onClick:Rt,children:ft})})]})})}const TutorialPapperDLHeader=({title:Be,subtitle:Le})=>jsxRuntimeExports.jsxs("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderFront",children:[jsxRuntimeExports.jsx("h1",{className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleFront",children:Be}),jsxRuntimeExports.jsx("p",{style:{fontSize:"18px"},children:Le})]}),videoUrl="https://sdk.incode.com/sdk/tutorials/paper-license-tutorial.mp4";function TutorialFront({onSuccess:Be,token:Le}){const{t:Ye}=useTranslation$1();React.useEffect(()=>{Le!=null&&Le.token&&addEvent({token:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"ID Preparation feedbacks"})},[]);function tt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be()}return jsxRuntimeExports.jsxs(TutorialContainer$2,{children:[jsxRuntimeExports.jsx(TutorialHeader$1,{children:jsxRuntimeExports.jsx(TutorialPapperDLHeader,{title:Ye("tutorial.paperDL.titleFrame"),subtitle:Ye("tutorial.paperDL.subtitle")})}),jsxRuntimeExports.jsx(VideoContainer,{children:jsxRuntimeExports.jsx("video",{preload:"auto",playsInline:!0,src:videoUrl,muted:!0,autoPlay:!0,loop:!0})}),jsxRuntimeExports.jsx(FrontTutorialAction,{className:cx("IncodeTutorialButtonContainer","IncodeTutorialButtonContainerFront"),children:jsxRuntimeExports.jsx(StyledButton$b,{className:cx("IncodeTutorialButton","IncodeTutorialButtonFront"),onClick:tt,theme:exports.theme,children:Ye("common.continue")})})]})}const TutorialPassportHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.passport1")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.passport2")})]})};function TutorialPassport({onSuccess:Be,token:Le,src:Ye,...tt}){const nt=options.darkMode?"https://sdk.incode.com/sdk/tutorials/passport-dark.mp4":"https://sdk.incode.com/sdk/tutorials/passport.gif";Ye=Ye||nt;const{t:ft}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialPassport",payload:{tutorialPassport:!0}})},[Le.token]);function ht(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{...tt,token:Le,src:Ye,header:jsxRuntimeExports.jsx(TutorialPassportHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ht,children:ft("common.continue")})})})}function addCreditCardBack({token:Be,base64Image:Le,onProgress:Ye=emptyFunc}){return exports.api.post("/omni/add/credit-card-back/v2",{base64Image:Le},{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":"application/json"},onUploadProgress:({loaded:tt,total:nt})=>Ye(tt/nt*100)}).then(tt=>tt.data).catch(tt=>Promise.reject(tt.response.data))}function addCreditCardFront({token:Be,base64Image:Le,onProgress:Ye=emptyFunc}){return exports.api.post("/omni/add/credit-card-front/v2",{base64Image:Le},{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":"application/json"},onUploadProgress:({loaded:tt,total:nt})=>Ye(tt/nt*100)}).then(tt=>tt.data).catch(tt=>Promise.reject(tt.response.data))}class IdDetectorBase{constructor(){this.pipelineProfile=null,this.currentCanvas=null}async initialize({onCapturing:Le,onFarAway:Ye,onGlare:tt,onBlur:nt,onIDNotDetected:ft,onMaskChange:ht,onDetectionStarted:gt,onSwitchToManualCapture:At,onIDTypeChange:xt,onIDSideChange:Et,onCapturingCounterValueChange:yt,idType:Ct,isFixedMask:kt,isBlurCheckEnabled:vt,isGlareCheckEnabled:bt,pipelineProfile:It,isV2:wt=!1,onCapture:Rt=()=>{},idDetectedTimeout:Tt=0,autocaptureTimeout:Bt=-1}){this.pipelineProfile=It;const Dt=this.pipelineProfile.pipelineType;this.pipelineProfile.reconfigureParams(mobile.isDesktop(),wt),await MlWasmJSApi$1.setIdCaptureCallbacks(Dt,Ye,gt,ht,nt,tt,this.getOnCapturing(Le),this.getOnCapture(Rt),this.getOnBestFrame(),ft,At,xt,Et,yt),await MlWasmJSApi$1.setIdCaptureThresholds(Dt,It.parameters.sharpnessThreshold,It.parameters.sharpnessChangeThreshold,It.parameters.glareThreshold,It.parameters.classificationThreshold,It.parameters.sideThreshold,It.parameters.iouThreshold,Tt,Bt,It.parameters.framesAggregationInterval,It.parameters.minFaceIdQualityScore),await MlWasmJSApi$1.setIdCaptureConfigParams(Dt,kt,localStorage.getItem("isIPhone14OrHigher")==="true",Ct,vt,bt,It.parameters.isIdFaceQualityCheckEnabled,It.parameters.isIouCheckEnabled),await MlWasmJSApi$1.setIdCaptureGeometryParams(Dt,It.parameters.areaDown,It.parameters.areaUp,It.parameters.areaIOSPassportUp,It.parameters.areaIOSPassportDown,It.parameters.widthIOSUp,It.parameters.widthIOSDown,It.parameters.widthDown,It.parameters.widthUp,window.outerWidth,window.outerHeight,window.innerWidth,window.innerHeight),MlWasmJSApi$1.setIdCaptureModelType(Dt,this.pipelineProfile.parameters.modelType)}async detectCommon(Le,Ye){try{this.currentCanvas=Le;const tt=Le.getImageData();await MlWasmJSApi$1.allocateImageBuffers(tt.width,tt.height),await MlWasmJSApi$1.process(tt,Ye),this.currentCanvas.release()}catch(tt){console.error(`Exception: ${tt}`)}}}class IdCapture extends IdDetectorBase{constructor(){super(...arguments),this.bestCanvas=null,this.qualityElements=null,this.bestOrientation=null}getOnBestFrame(){return(Le,Ye,tt)=>{this.bestCanvas=this.currentCanvas.clone(),this.qualityElements={glare:Ye,sharpness:Le},this.bestOrientation=tt}}getOnCapture(Le){return()=>{this.bestCanvas.updateBase64Image(),this.bestCanvas.updateBlob(),Le(this.bestCanvas,this.qualityElements,this.bestOrientation)}}getOnCapturing(Le){return()=>{Le()}}async detect(Le){this.detectCommon(Le,this.pipelineProfile.pipelineType)}}class IdVideoSelfie extends IdDetectorBase{getOnCapturing(Le){return()=>{Le(this.currentMode,this.currentCanvas.clone().getBase64Image())}}getOnCapture(Le){return()=>{}}getOnBestFrame(){return(Le,Ye,tt)=>{}}async detect(Le){this.detectCommon(Le,this.pipelineProfile.pipelineType)}updateCurrentMode(Le){this.currentMode=Le}}function getImages$1({token:Be,body:Le,onDownloadProgress:Ye}){return exports.api.post("/omni/get/images",Le,{headers:{"X-Incode-Hardware-Id":Be},onDownloadProgress:({loaded:tt,total:nt})=>{Ye==null||Ye(tt*100/nt)}}).then(tt=>tt.data)}var __webpack_require__={};__webpack_require__.d=(Be,Le)=>{for(var Ye in Le)__webpack_require__.o(Le,Ye)&&!__webpack_require__.o(Be,Ye)&&Object.defineProperty(Be,Ye,{enumerable:!0,get:Le[Ye]})},__webpack_require__.o=(Be,Le)=>Object.prototype.hasOwnProperty.call(Be,Le);var __webpack_exports__=globalThis.pdfjsLib={};__webpack_require__.d(__webpack_exports__,{AbortException:()=>AbortException,AnnotationEditorLayer:()=>AnnotationEditorLayer,AnnotationEditorParamsType:()=>AnnotationEditorParamsType,AnnotationEditorType:()=>AnnotationEditorType,AnnotationEditorUIManager:()=>AnnotationEditorUIManager,AnnotationLayer:()=>AnnotationLayer$1,AnnotationMode:()=>AnnotationMode,ColorPicker:()=>ColorPicker,DOMSVGFactory:()=>DOMSVGFactory,DrawLayer:()=>DrawLayer,FeatureTest:()=>util_FeatureTest,GlobalWorkerOptions:()=>GlobalWorkerOptions,ImageKind:()=>util_ImageKind,InvalidPDFException:()=>InvalidPDFException,MissingPDFException:()=>MissingPDFException,OPS:()=>OPS,OutputScale:()=>OutputScale,PDFDataRangeTransport:()=>PDFDataRangeTransport$1,PDFDateString:()=>PDFDateString,PDFWorker:()=>PDFWorker,PasswordResponses:()=>PasswordResponses$1,PermissionFlag:()=>PermissionFlag,PixelsPerInch:()=>PixelsPerInch,RenderingCancelledException:()=>RenderingCancelledException,TextLayer:()=>TextLayer$1,UnexpectedResponseException:()=>UnexpectedResponseException,Util:()=>Util,VerbosityLevel:()=>VerbosityLevel,XfaLayer:()=>XfaLayer,build:()=>build,createValidAbsoluteUrl:()=>createValidAbsoluteUrl,fetchData:()=>fetchData,getDocument:()=>getDocument,getFilenameFromUrl:()=>getFilenameFromUrl$1,getPdfFilenameFromUrl:()=>getPdfFilenameFromUrl,getXfaPageViewport:()=>getXfaPageViewport,isDataScheme:()=>isDataScheme,isPdfFile:()=>isPdfFile,noContextMenu:()=>noContextMenu,normalizeUnicode:()=>normalizeUnicode,setLayerDimensions:()=>setLayerDimensions,shadow:()=>shadow,version:()=>version});const isNodeJS=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),IDENTITY_MATRIX=[1,0,0,1,0,0],FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],MAX_IMAGE_SIZE_TO_CACHE=1e7,LINE_FACTOR=1.35,RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},AnnotationEditorPrefix="pdfjs_internal_editor_",AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},util_ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,WIDGET:20},AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},VerbosityLevel={ERRORS:0,WARNINGS:1,INFOS:5},OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},PasswordResponses$1={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let verbosity=VerbosityLevel.WARNINGS;function setVerbosityLevel(Be){Number.isInteger(Be)&&(verbosity=Be)}function getVerbosityLevel(){return verbosity}function info(Be){verbosity>=VerbosityLevel.INFOS&&console.log(`Info: ${Be}`)}function warn$1(Be){verbosity>=VerbosityLevel.WARNINGS&&console.log(`Warning: ${Be}`)}function unreachable$1(Be){throw new Error(Be)}function assert(Be,Le){Be||unreachable$1(Le)}function _isValidProtocol(Be){switch(Be==null?void 0:Be.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function createValidAbsoluteUrl(Be,Le=null,Ye=null){if(!Be)return null;try{if(Ye&&typeof Be=="string"){if(Ye.addDefaultProtocol&&Be.startsWith("www.")){const nt=Be.match(/\./g);(nt==null?void 0:nt.length)>=2&&(Be=`http://${Be}`)}if(Ye.tryConvertEncoding)try{Be=stringToUTF8String(Be)}catch{}}const tt=Le?new URL(Be,Le):new URL(Be);if(_isValidProtocol(tt))return tt}catch{}return null}function shadow(Be,Le,Ye,tt=!1){return Object.defineProperty(Be,Le,{value:Ye,enumerable:!tt,configurable:!0,writable:!1}),Ye}const BaseException=function(){function Le(Ye,tt){this.message=Ye,this.name=tt}return Le.prototype=new Error,Le.constructor=Le,Le}();class PasswordException extends BaseException{constructor(Le,Ye){super(Le,"PasswordException"),this.code=Ye}}class UnknownErrorException extends BaseException{constructor(Le,Ye){super(Le,"UnknownErrorException"),this.details=Ye}}class InvalidPDFException extends BaseException{constructor(Le){super(Le,"InvalidPDFException")}}class MissingPDFException extends BaseException{constructor(Le){super(Le,"MissingPDFException")}}class UnexpectedResponseException extends BaseException{constructor(Le,Ye){super(Le,"UnexpectedResponseException"),this.status=Ye}}class FormatError extends BaseException{constructor(Le){super(Le,"FormatError")}}class AbortException extends BaseException{constructor(Le){super(Le,"AbortException")}}function bytesToString(Be){(typeof Be!="object"||(Be==null?void 0:Be.length)===void 0)&&unreachable$1("Invalid argument for bytesToString");const Le=Be.length,Ye=8192;if(Le<Ye)return String.fromCharCode.apply(null,Be);const tt=[];for(let nt=0;nt<Le;nt+=Ye){const ft=Math.min(nt+Ye,Le),ht=Be.subarray(nt,ft);tt.push(String.fromCharCode.apply(null,ht))}return tt.join("")}function stringToBytes(Be){typeof Be!="string"&&unreachable$1("Invalid argument for stringToBytes");const Le=Be.length,Ye=new Uint8Array(Le);for(let tt=0;tt<Le;++tt)Ye[tt]=Be.charCodeAt(tt)&255;return Ye}function string32(Be){return String.fromCharCode(Be>>24&255,Be>>16&255,Be>>8&255,Be&255)}function objectFromMap(Be){const Le=Object.create(null);for(const[Ye,tt]of Be)Le[Ye]=tt;return Le}function isLittleEndian(){const Be=new Uint8Array(4);return Be[0]=1,new Uint32Array(Be.buffer,0,1)[0]===1}function isEvalSupported(){try{return new Function(""),!0}catch{return!1}}class util_FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",isLittleEndian())}static get isEvalSupported(){return shadow(this,"isEvalSupported",isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"?shadow(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):shadow(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var Le,Ye;return shadow(this,"isCSSRoundSupported",(Ye=(Le=globalThis.CSS)==null?void 0:Le.supports)==null?void 0:Ye.call(Le,"width: round(1.5px, 1px)"))}}const hexNumbers=Array.from(Array(256).keys(),Be=>Be.toString(16).padStart(2,"0"));class Util{static makeHexColor(Le,Ye,tt){return`#${hexNumbers[Le]}${hexNumbers[Ye]}${hexNumbers[tt]}`}static scaleMinMax(Le,Ye){let tt;Le[0]?(Le[0]<0&&(tt=Ye[0],Ye[0]=Ye[2],Ye[2]=tt),Ye[0]*=Le[0],Ye[2]*=Le[0],Le[3]<0&&(tt=Ye[1],Ye[1]=Ye[3],Ye[3]=tt),Ye[1]*=Le[3],Ye[3]*=Le[3]):(tt=Ye[0],Ye[0]=Ye[1],Ye[1]=tt,tt=Ye[2],Ye[2]=Ye[3],Ye[3]=tt,Le[1]<0&&(tt=Ye[1],Ye[1]=Ye[3],Ye[3]=tt),Ye[1]*=Le[1],Ye[3]*=Le[1],Le[2]<0&&(tt=Ye[0],Ye[0]=Ye[2],Ye[2]=tt),Ye[0]*=Le[2],Ye[2]*=Le[2]),Ye[0]+=Le[4],Ye[1]+=Le[5],Ye[2]+=Le[4],Ye[3]+=Le[5]}static transform(Le,Ye){return[Le[0]*Ye[0]+Le[2]*Ye[1],Le[1]*Ye[0]+Le[3]*Ye[1],Le[0]*Ye[2]+Le[2]*Ye[3],Le[1]*Ye[2]+Le[3]*Ye[3],Le[0]*Ye[4]+Le[2]*Ye[5]+Le[4],Le[1]*Ye[4]+Le[3]*Ye[5]+Le[5]]}static applyTransform(Le,Ye){const tt=Le[0]*Ye[0]+Le[1]*Ye[2]+Ye[4],nt=Le[0]*Ye[1]+Le[1]*Ye[3]+Ye[5];return[tt,nt]}static applyInverseTransform(Le,Ye){const tt=Ye[0]*Ye[3]-Ye[1]*Ye[2],nt=(Le[0]*Ye[3]-Le[1]*Ye[2]+Ye[2]*Ye[5]-Ye[4]*Ye[3])/tt,ft=(-Le[0]*Ye[1]+Le[1]*Ye[0]+Ye[4]*Ye[1]-Ye[5]*Ye[0])/tt;return[nt,ft]}static getAxialAlignedBoundingBox(Le,Ye){const tt=this.applyTransform(Le,Ye),nt=this.applyTransform(Le.slice(2,4),Ye),ft=this.applyTransform([Le[0],Le[3]],Ye),ht=this.applyTransform([Le[2],Le[1]],Ye);return[Math.min(tt[0],nt[0],ft[0],ht[0]),Math.min(tt[1],nt[1],ft[1],ht[1]),Math.max(tt[0],nt[0],ft[0],ht[0]),Math.max(tt[1],nt[1],ft[1],ht[1])]}static inverseTransform(Le){const Ye=Le[0]*Le[3]-Le[1]*Le[2];return[Le[3]/Ye,-Le[1]/Ye,-Le[2]/Ye,Le[0]/Ye,(Le[2]*Le[5]-Le[4]*Le[3])/Ye,(Le[4]*Le[1]-Le[5]*Le[0])/Ye]}static singularValueDecompose2dScale(Le){const Ye=[Le[0],Le[2],Le[1],Le[3]],tt=Le[0]*Ye[0]+Le[1]*Ye[2],nt=Le[0]*Ye[1]+Le[1]*Ye[3],ft=Le[2]*Ye[0]+Le[3]*Ye[2],ht=Le[2]*Ye[1]+Le[3]*Ye[3],gt=(tt+ht)/2,At=Math.sqrt((tt+ht)**2-4*(tt*ht-ft*nt))/2,xt=gt+At||1,Et=gt-At||1;return[Math.sqrt(xt),Math.sqrt(Et)]}static normalizeRect(Le){const Ye=Le.slice(0);return Le[0]>Le[2]&&(Ye[0]=Le[2],Ye[2]=Le[0]),Le[1]>Le[3]&&(Ye[1]=Le[3],Ye[3]=Le[1]),Ye}static intersect(Le,Ye){const tt=Math.max(Math.min(Le[0],Le[2]),Math.min(Ye[0],Ye[2])),nt=Math.min(Math.max(Le[0],Le[2]),Math.max(Ye[0],Ye[2]));if(tt>nt)return null;const ft=Math.max(Math.min(Le[1],Le[3]),Math.min(Ye[1],Ye[3])),ht=Math.min(Math.max(Le[1],Le[3]),Math.max(Ye[1],Ye[3]));return ft>ht?null:[tt,ft,nt,ht]}static bezierBoundingBox(Le,Ye,tt,nt,ft,ht,gt,At,xt){return xt?(xt[0]=Math.min(xt[0],Le,gt),xt[1]=Math.min(xt[1],Ye,At),xt[2]=Math.max(xt[2],Le,gt),xt[3]=Math.max(xt[3],Ye,At)):xt=[Math.min(Le,gt),Math.min(Ye,At),Math.max(Le,gt),Math.max(Ye,At)],y0(this,Ns,P9).call(this,Le,tt,ft,gt,Ye,nt,ht,At,3*(-Le+3*(tt-ft)+gt),6*(Le-2*tt+ft),3*(tt-Le),xt),y0(this,Ns,P9).call(this,Le,tt,ft,gt,Ye,nt,ht,At,3*(-Ye+3*(nt-ht)+At),6*(Ye-2*nt+ht),3*(nt-Ye),xt),xt}}Ns=new WeakSet,Yd=function(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et){if(xt<=0||xt>=1)return;const yt=1-xt,Ct=xt*xt,kt=Ct*xt,vt=yt*(yt*(yt*Le+3*xt*Ye)+3*Ct*tt)+kt*nt,bt=yt*(yt*(yt*ft+3*xt*ht)+3*Ct*gt)+kt*At;Et[0]=Math.min(Et[0],vt),Et[1]=Math.min(Et[1],bt),Et[2]=Math.max(Et[2],vt),Et[3]=Math.max(Et[3],bt)},P9=function(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct){if(Math.abs(xt)<1e-12){Math.abs(Et)>=1e-12&&y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,-yt/Et,Ct);return}const kt=Et**2-4*yt*xt;if(kt<0)return;const vt=Math.sqrt(kt),bt=2*xt;y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,(-Et+vt)/bt,Ct),y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,(-Et-vt)/bt,Ct)},k0(Util,Ns);function stringToUTF8String(Be){return decodeURIComponent(escape(Be))}let NormalizeRegex=null,NormalizationMap=null;function normalizeUnicode(Be){return NormalizeRegex||(NormalizeRegex=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,NormalizationMap=new Map([["ſt","ſt"]])),Be.replaceAll(NormalizeRegex,(Le,Ye,tt)=>Ye?Ye.normalize("NFKC"):NormalizationMap.get(tt))}function getUuid(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const Be=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(Be);else for(let Le=0;Le<32;Le++)Be[Le]=Math.floor(Math.random()*255);return bytesToString(Be)}const AnnotationPrefix="pdfjs_internal_id_",FontRenderOps={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};function toBase64Util(Be){return Uint8Array.prototype.toBase64?Be.toBase64():btoa(bytesToString(Be))}const SVG_NS="http://www.w3.org/2000/svg",d2=class d2{};Nn(d2,"CSS",96),Nn(d2,"PDF",72),Nn(d2,"PDF_TO_CSS_UNITS",d2.CSS/d2.PDF);let PixelsPerInch=d2;async function fetchData(Be,Le="text"){if(isValidFetchUrl(Be,document.baseURI)){const Ye=await fetch(Be);if(!Ye.ok)throw new Error(Ye.statusText);switch(Le){case"arraybuffer":return Ye.arrayBuffer();case"blob":return Ye.blob();case"json":return Ye.json()}return Ye.text()}return new Promise((Ye,tt)=>{const nt=new XMLHttpRequest;nt.open("GET",Be,!0),nt.responseType=Le,nt.onreadystatechange=()=>{if(nt.readyState===XMLHttpRequest.DONE){if(nt.status===200||nt.status===0){switch(Le){case"arraybuffer":case"blob":case"json":Ye(nt.response);return}Ye(nt.responseText);return}tt(new Error(nt.statusText))}},nt.send(null)})}class PageViewport{constructor({viewBox:Le,scale:Ye,rotation:tt,offsetX:nt=0,offsetY:ft=0,dontFlip:ht=!1}){this.viewBox=Le,this.scale=Ye,this.rotation=tt,this.offsetX=nt,this.offsetY=ft;const gt=(Le[2]+Le[0])/2,At=(Le[3]+Le[1])/2;let xt,Et,yt,Ct;switch(tt%=360,tt<0&&(tt+=360),tt){case 180:xt=-1,Et=0,yt=0,Ct=1;break;case 90:xt=0,Et=1,yt=1,Ct=0;break;case 270:xt=0,Et=-1,yt=-1,Ct=0;break;case 0:xt=1,Et=0,yt=0,Ct=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ht&&(yt=-yt,Ct=-Ct);let kt,vt,bt,It;xt===0?(kt=Math.abs(At-Le[1])*Ye+nt,vt=Math.abs(gt-Le[0])*Ye+ft,bt=(Le[3]-Le[1])*Ye,It=(Le[2]-Le[0])*Ye):(kt=Math.abs(gt-Le[0])*Ye+nt,vt=Math.abs(At-Le[1])*Ye+ft,bt=(Le[2]-Le[0])*Ye,It=(Le[3]-Le[1])*Ye),this.transform=[xt*Ye,Et*Ye,yt*Ye,Ct*Ye,kt-xt*Ye*gt-yt*Ye*At,vt-Et*Ye*gt-Ct*Ye*At],this.width=bt,this.height=It}get rawDims(){const{viewBox:Le}=this;return shadow(this,"rawDims",{pageWidth:Le[2]-Le[0],pageHeight:Le[3]-Le[1],pageX:Le[0],pageY:Le[1]})}clone({scale:Le=this.scale,rotation:Ye=this.rotation,offsetX:tt=this.offsetX,offsetY:nt=this.offsetY,dontFlip:ft=!1}={}){return new PageViewport({viewBox:this.viewBox.slice(),scale:Le,rotation:Ye,offsetX:tt,offsetY:nt,dontFlip:ft})}convertToViewportPoint(Le,Ye){return Util.applyTransform([Le,Ye],this.transform)}convertToViewportRectangle(Le){const Ye=Util.applyTransform([Le[0],Le[1]],this.transform),tt=Util.applyTransform([Le[2],Le[3]],this.transform);return[Ye[0],Ye[1],tt[0],tt[1]]}convertToPdfPoint(Le,Ye){return Util.applyInverseTransform([Le,Ye],this.transform)}}class RenderingCancelledException extends BaseException{constructor(Le,Ye=0){super(Le,"RenderingCancelledException"),this.extraDelay=Ye}}function isDataScheme(Be){const Le=Be.length;let Ye=0;for(;Ye<Le&&Be[Ye].trim()==="";)Ye++;return Be.substring(Ye,Ye+5).toLowerCase()==="data:"}function isPdfFile(Be){return typeof Be=="string"&&/\.pdf$/i.test(Be)}function getFilenameFromUrl$1(Be){return[Be]=Be.split(/[#?]/,1),Be.substring(Be.lastIndexOf("/")+1)}function getPdfFilenameFromUrl(Be,Le="document.pdf"){if(typeof Be!="string")return Le;if(isDataScheme(Be))return warn$1('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),Le;const Ye=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,tt=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,nt=Ye.exec(Be);let ft=tt.exec(nt[1])||tt.exec(nt[2])||tt.exec(nt[3]);if(ft&&(ft=ft[0],ft.includes("%")))try{ft=tt.exec(decodeURIComponent(ft))[0]}catch{}return ft||Le}class StatTimer{constructor(){Nn(this,"started",Object.create(null));Nn(this,"times",[])}time(Le){Le in this.started&&warn$1(`Timer is already running for ${Le}`),this.started[Le]=Date.now()}timeEnd(Le){Le in this.started||warn$1(`Timer has not been started for ${Le}`),this.times.push({name:Le,start:this.started[Le],end:Date.now()}),delete this.started[Le]}toString(){const Le=[];let Ye=0;for(const{name:tt}of this.times)Ye=Math.max(tt.length,Ye);for(const{name:tt,start:nt,end:ft}of this.times)Le.push(`${tt.padEnd(Ye)} ${ft-nt}ms
|
|
4014
|
+
`,getCircleText=(Be,Le)=>({uploading:Be("notifications.uploading"),success:Be("notifications.done"),error:Le}),Selfie$2=({onError:Be,onSuccess:Le,permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,token:gt,timeout:At,numberOfTries:xt,stream:Et,onlyCapture:yt,showCustomCameraPermissionScreen:Ct,isSecondId:kt,isRecordingEnabled:vt=!1,skipProcessFace:bt=!1,deviceId:It,maskCheckEnabled:wt=!1,eyesClosedCheckEnabled:Rt=!1,hatCheckEnabled:Tt=!1,lensesCheckEnabled:Bt=!1,isDeepsightEnabled:Dt=!1})=>{const Lt=gt==null?void 0:gt.token,Nt=React.useRef(null),Pt=React.useRef(!1),Wt=React.useRef(null),$t=React.useRef(null),[Kt,Vt]=React.useState({}),[Ut,_t]=React.useState(1),Xt=React.useRef({}),{isOnline:Qt}=useOnlineStatus({onOnline:()=>{u0(),isManualCaptureMode=!1,Xt.current.canvas&&l0(Xt.current.canvas,Xt.current.faceCoordinates)},onOffline:()=>{}}),{startRecording:jt,stopRecording:zt,recordingStarted:qt,updateMediaStream:Gt}=useMediaRecorder({token:Lt,type:"selfie"}),{startRecording:e0,stopRecording:s0}=useMediaRecorderLocally();React.useEffect(()=>{isManualCaptureMode=!1},[]),React.useEffect(()=>{Nt.current.streamUnlocked=Pt},[]),React.useEffect(()=>()=>{!Dt&&(zt==null||zt())},[Dt,zt]);async function t0(en){var Z0;if(Ut>=xt){await A0(en);return}Dt&&await((Z0=Nt.current)==null?void 0:Z0.resetWebcam(!0)),_t(Ut+1),await Yt(en),isManualCaptureMode||await u0()}const l0=throttle$2(async(en,Z0)=>{var v0,S0,H0;Xt.current.canvas=en,Xt.current.faceCoordinates=Z0;const R0=en.getBase64Image();try{addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),clearTimeout(q0.current),Jt(""),addEvent({code:"selfieCapture",token:Lt}),await onboardingAnalytics.analyzeFrame(R0),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const M0=selfieType,G0=await MlWasmJSApi$1.encryptImage(R0),{blob:K0,url:un}=en.getBlobData();if(yt)return Le({imageBase64:R0,blob:K0,encryptedImage:G0,url:un});addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureCamera,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),addEvent({token:Lt,code:"captureAttemptFinished",module:"SELFIE",payload:{logs:onboardingAnalytics.getPipelineLogs()}}),addDeviceStats(Lt,{inspectorOpened:null,frontIdStatsAnalysisStatus:"",backIdStatsAnalysisStatus:"",selfieStatsAnalysisStatus:onboardingAnalytics.getAnalysisStatus(),motionStatus:onboardingAnalytics.getMotionStatus()});const tn=await capture({token:Lt,image:G0,type:M0,encrypted:!0,faceCoordinates:Z0,metadata:onboardingAnalytics.getMetadata(),recordingId:$t.current}),cn=selfieChecks(tn,{hatCheckEnabled:Tt,lensesCheckEnabled:Bt,maskCheckEnabled:wt,eyesClosedCheckEnabled:Rt});if(cn.hasErrors){addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),r0("error"),logSelfieChecks(tn,cn,ht,Jt,n0,i0,!1),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Vt({response:tn,livenessPassed:cn.livenessPassed,imageBase64:R0}),J0&&(Pt.current=!1,isManualCaptureMode=!0);return}Jt(n0("notifications.processing"));const{faceMatch:yn,existingUser:Bn,...er}=await o0();return addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),ht(getLogObject("successCapture",{response:tn,message:"Selfie uploaded successfully"})),Jt(n0("notifications.success")),await sleep(3500),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureSuccess,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Le({...tn,...er,faceMatch:yn,existingUser:Bn,liveness:cn.livenessPassed,imageBase64:R0})}catch(M0){((S0=(v0=M0==null?void 0:M0.response)==null?void 0:v0.data)==null?void 0:S0.error)==="Maximum capture attempts reached"&&_t(xt),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureUpload,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Lt,shouldOpen:!0,payload:{moduleVersion:"1"}}),f0(M0.response?M0.response.data:n0("notifications.serverError")),r0("error"),await sleep(3e3),addScreenEvent({module:eventModuleNames.selfie,screen:eventScreenNames.faceCaptureError,token:Lt,shouldOpen:!1,payload:{moduleVersion:"1"}}),Vt({response:(H0=M0==null?void 0:M0.response)==null?void 0:H0.data,livenessPassed:null,imageBase64:R0}),J0&&(Pt.current=!1,isManualCaptureMode=!0)}},300),d0=async()=>{if(!Dt)return;const en=await s0(Lt);$t.current=en},{t:n0}=useTranslation$1(),g0=(en,Z0,R0,v0)=>{updateSession$1({token:Lt,key:"manualSelfieCheckNeeded",value:!0});const S0=getLogObject("skip",{existingUser:en,liveness:Z0,imageBase64:R0,faceMatch:v0});ht(S0),Be(S0)};async function A0({response:en,livenessPassed:Z0,imageBase64:R0}){addEvent({code:"noAttempts",token:Lt}),ht(getLogObject("noAttemps",{response:en,message:"No attempt left"}));const{faceMatch:v0,existingUser:S0}=await o0();return g0(S0,Z0,R0,v0)}async function o0(){if(bt)return{faceMatch:!1};const en=await processFace({token:Lt});kt&&await processFaceSecondId({token:Lt});const Z0=en.confidence===1,R0=en.existingUser;return{faceMatch:Z0,existingUser:R0,...en}}const{setMode:r0,resetLoading:Yt,notificationMessage:Mt,setNotificationMessage:Jt,notificationDescription:a0,setNotificationDescription:i0,handleError:f0,startAutoDetect:u0,handleManualCapture:x0,isSuccess:p0,isError:D0,isLoading:L0,isUploading:z0,shouldShowManualCapture:J0,selfieTimeoutRef:q0,hideCamera:X0}=useSelfie({timeout:At,onLog:ht,handleCapture:l0,handleNoAttemptsLeft:A0,numberOfTries:xt,webcam:Nt,isDetecting:Pt,hatCheckEnabled:Tt,lensesCheckEnabled:Bt,maskCheckEnabled:wt,eyesClosedCheckEnabled:Rt,handleStopRecordingLocally:d0,onSwitchManualCapture:()=>{Jt(""),addEvent({code:"switchToManualCaptureSelfie",token:Lt})},onManualCaptureSelfie:()=>{addEvent({code:"manualCaptureSelfie",token:Lt})}}),T0=async en=>{Wt.current=en,Dt?e0(en):vt&&(qt?await Gt(en):await jt(en))},_0=L0||D0||p0,P0=xt-Ut;if(!Qt)return jsxRuntimeExports.jsx(NoInternetError,{});const U0=()=>P0>0;return jsxRuntimeExports.jsxs(Container$f,{className:"IncodeCaptureDesktopSelfieContainer",children:[jsxRuntimeExports.jsx(SrOnlyHeading,{className:"IncodeCaptureDesktopSelfieHeading",children:n0("selfie.title")}),jsxRuntimeExports.jsxs(SelfieContainer,{className:"IncodeCaptureDesktopSelfieSelfieContainer",children:[jsxRuntimeExports.jsxs(FaceMask$2,{className:"IncodeCaptureDesktopSelfieFaceMask",isCapturing:p0,isLoading:z0,error:D0,isUploading:_0,desktop:!0,children:[z0&&jsxRuntimeExports.jsx(BordersContainer,{className:cx("IncodeCaptureSelfieBordersContainer"),children:jsxRuntimeExports.jsx(LoadingBorders,{className:"IncodeCaptureSelfieLoadingBordersContainer",mode:"uploading"})}),jsxRuntimeExports.jsx(FaceFrame$1,{src:faceFrame$1,alt:"face frame",className:cx("IncodeCaptureDesktopSelfieFaceFrame",{hidden:X0})})]}),jsxRuntimeExports.jsx(Webcam,{className:cx("IncodeCaptureDesktopSelfieWebcam",{error:D0,hidden:X0}),ref:Nt,onPlay:()=>{},videoSource:"user",isSelfie:!0,type:"desktopSelfie",permission:Ye,setPermission:tt,permissionMessage:nt,permissionBackgroundColor:ft,onLog:ht,stream:Et,onError:Be,token:Lt,onStreamReady:T0,showCustomCameraPermissionScreen:Ct,deviceId:It,isDeepsightEnabled:Dt}),X0&&z0&&jsxRuntimeExports.jsx(CameraOvalInnerText,{"aria-live":"assertive","aria-atomic":"true",className:cx("IncodeCaptureSelfieCameraOvalInnerText",{isError:D0}),children:getCircleText(n0,Mt).uploading}),Mt&&!z0&&!D0&&jsxRuntimeExports.jsx(Notification$3,{isLoading:L0,isError:D0,className:"desktop IncodeCaptureDesktopSelfieNotification",children:Mt}),D0&&U0()?jsxRuntimeExports.jsxs(BlockingErrors,{children:[jsxRuntimeExports.jsx("img",{src:warningIcon$1,alt:"Warning icon",width:"32"}),jsxRuntimeExports.jsx(ErrorTitle$1,{className:"IncodeCaptureDesktopSelfieErrorTitle",children:Mt}),jsxRuntimeExports.jsx(ErrorDescription$1,{className:"IncodeCaptureDesktopSelfieErrorDescription",children:a0})]}):D0&&P0===0&&jsxRuntimeExports.jsxs(BlockingErrors,{children:[jsxRuntimeExports.jsx("img",{src:warningIcon$1,alt:"Warning icon",width:"32"}),jsxRuntimeExports.jsx(ErrorTitle$1,{className:"IncodeCaptureDesktopSelfieErrorTitle",children:n0("notifications.selfieCaptureFailed")}),jsxRuntimeExports.jsx(ErrorDescription$1,{className:"IncodeCaptureDesktopSelfieErrorDescription",children:n0("notifications.selfieCaptureFailedDescription")})]}),D0&&jsxRuntimeExports.jsxs(RetryButtonsContainer,{className:"IncodeCaptureDesktopSelfieCaptureRetryButtonsContainer",isDesktop:!0,children:[jsxRuntimeExports.jsx(Button$c,{onClick:async()=>{await t0(Kt)},theme:exports.theme,children:U0()?n0("common.tryAgain"):n0("common.continue")}),U0()&&jsxRuntimeExports.jsxs("div",{children:[P0," ",n0("notifications.attemptsRemaining")]})]}),J0&&jsxRuntimeExports.jsx(CaptureButtonContainer,{className:"IncodeCaptureDesktopSelfieCaptureButtonContainer",initial:{scale:0},animate:{scale:1},children:jsxRuntimeExports.jsx("button",{onClick:x0,type:"button",children:jsxRuntimeExports.jsx("img",{src:CaptureButton,alt:"capture button"})})})]}),jsxRuntimeExports.jsx("canvas",{id:"canvasFrame",hidden:!0})]})};function CaptureAndTutorial$3(Be){const[Le,Ye]=useDeviceId(),[tt,nt]=React.useState(!1),{currentStep:ft,nextStep:ht}=useSteps(),{showTutorial:gt,token:At}=Be;function xt(Et){Et!=="error"&&Ye(Et),nt(!0)}return tt?jsxRuntimeExports.jsxs(Steps,{currentStep:ft,children:[gt&&jsxRuntimeExports.jsx(TutorialSelfie,{className:"IncodeCaptureDesktopSelfieTutorial",...Be,onSuccess:ht}),jsxRuntimeExports.jsx(Selfie$2,{deviceId:Le,...Be})]}):jsxRuntimeExports.jsx(ChooseCamera,{onCameraChosen:xt,token:At==null?void 0:At.token})}const CaptureDesktopSelfie=preloadScript$3(CaptureAndTutorial$3);function Selfie$1(Be){return jsxRuntimeExports.jsx(CaptureSelfie$1,{...Be})}async function handleMotionPermissions$1(){const Be=sessionStorage.getItem("cameraPermissionsGranted")==="true",Le=sessionStorage.getItem("motionSensorsPermissionsRequested")==="true";Be&&!Le&&await onboardingAnalytics.startOnboardingCheck()}function CaptureAndTutorial$2(Be){const{currentStep:Le,nextStep:Ye}=useSteps();return jsxRuntimeExports.jsxs(Steps,{currentStep:Le,children:[Be.showTutorial&&isWebRtcSupported()&&jsxRuntimeExports.jsx(TutorialSelfie,{...Be,onSuccess:async()=>{Be.isDeepsightEnabled&&await handleMotionPermissions$1(),Ye()}}),jsxRuntimeExports.jsx(Selfie$1,{...Be})]})}const TutorialBackHeader=()=>{const{t:Be}=useTranslation$1(),Le=React.useRef();return useAutoFocus(Le),jsxRuntimeExports.jsx("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderBack",children:jsxRuntimeExports.jsx("h1",{className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleBack",tabIndex:-1,"aria-label":Be("tutorial.back.titleLabel"),ref:Le,children:Be("tutorial.back.title")})})};function TutorialBack({onSuccess:Be,token:Le,...Ye}){const tt=()=>mobile.isDesktop()?"https://sdk.incode.com/sdk/tutorials/tutorial-back-desktop.mp4":options.darkMode?"https://sdk.incode.com/sdk/tutorials/back-dark.mp4":"https://sdk.incode.com/sdk/tutorials/back.gif";React.useEffect(()=>{Le!=null&&Le.token&&(addEvent({token:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"Back ID capture tutorial"}),addEvent({token:Le.token,code:"tutorialBackId",payload:{tutorialBackID:!0}}))},[Le]);function nt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"Back ID capture tutorial"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{...Ye,token:Le,src:tt(),next:nt,header:jsxRuntimeExports.jsx(TutorialBackHeader,{}),type:"Back"})}const TutorialCreditCardBackHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.creditCardBack")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.creditCardBack2")})]})};function TutorialCreditCardBack({onSuccess:Be,token:Le,src:Ye="https://sdk.incode.com/sdk/tutorials/card%20back.svg",...tt}){const{t:nt}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialCreditCardBack",payload:{tutorialCreditCardBack:!0}})},[Le.token]);function ft(){addEvent({token:Le==null?void 0:Le.token,code:"continue"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{creditCard:!0,...tt,src:Ye,header:jsxRuntimeExports.jsx(TutorialCreditCardBackHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ft,children:nt("common.continue")})})})}const TutorialCreditCardFrontHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.creditCardFront")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.creditCardFront2")})]})};function TutorialCreditCardFront({onSuccess:Be,token:Le,src:Ye="https://sdk.incode.com/sdk/tutorials/card%20front.svg",...tt}){const{t:nt}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialCreditCard",payload:{tutorialCreditCard:!0}})},[Le.token]);function ft(){addEvent({token:Le==null?void 0:Le.token,code:"continue"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{creditCard:!0,...tt,src:Ye,header:jsxRuntimeExports.jsx(TutorialCreditCardFrontHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ft,children:nt("common.continue")})})})}function isObject$3(Be){return Be!==null&&typeof Be=="object"&&"constructor"in Be&&Be.constructor===Object}function extend$4(Be={},Le={}){Object.keys(Le).forEach(Ye=>{typeof Be[Ye]>"u"?Be[Ye]=Le[Ye]:isObject$3(Le[Ye])&&isObject$3(Be[Ye])&&Object.keys(Le[Ye]).length>0&&extend$4(Be[Ye],Le[Ye])})}const ssrDocument={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function getDocument$1(){const Be=typeof document<"u"?document:{};return extend$4(Be,ssrDocument),Be}const ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(Be){return typeof setTimeout>"u"?(Be(),null):setTimeout(Be,0)},cancelAnimationFrame(Be){typeof setTimeout>"u"||clearTimeout(Be)}};function getWindow(){const Be=typeof window<"u"?window:{};return extend$4(Be,ssrWindow),Be}function deleteProps(Be){const Le=Be;Object.keys(Le).forEach(Ye=>{try{Le[Ye]=null}catch{}try{delete Le[Ye]}catch{}})}function nextTick(Be,Le=0){return setTimeout(Be,Le)}function now(){return Date.now()}function getComputedStyle$1(Be){const Le=getWindow();let Ye;return Le.getComputedStyle&&(Ye=Le.getComputedStyle(Be,null)),!Ye&&Be.currentStyle&&(Ye=Be.currentStyle),Ye||(Ye=Be.style),Ye}function getTranslate(Be,Le="x"){const Ye=getWindow();let tt,nt,ft;const ht=getComputedStyle$1(Be);return Ye.WebKitCSSMatrix?(nt=ht.transform||ht.webkitTransform,nt.split(",").length>6&&(nt=nt.split(", ").map(gt=>gt.replace(",",".")).join(", ")),ft=new Ye.WebKitCSSMatrix(nt==="none"?"":nt)):(ft=ht.MozTransform||ht.OTransform||ht.MsTransform||ht.msTransform||ht.transform||ht.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),tt=ft.toString().split(",")),Le==="x"&&(Ye.WebKitCSSMatrix?nt=ft.m41:tt.length===16?nt=parseFloat(tt[12]):nt=parseFloat(tt[4])),Le==="y"&&(Ye.WebKitCSSMatrix?nt=ft.m42:tt.length===16?nt=parseFloat(tt[13]):nt=parseFloat(tt[5])),nt||0}function isObject$2(Be){return typeof Be=="object"&&Be!==null&&Be.constructor&&Object.prototype.toString.call(Be).slice(8,-1)==="Object"}function isNode(Be){return typeof window<"u"&&typeof window.HTMLElement<"u"?Be instanceof HTMLElement:Be&&(Be.nodeType===1||Be.nodeType===11)}function extend$3(...Be){const Le=Object(Be[0]),Ye=["__proto__","constructor","prototype"];for(let tt=1;tt<Be.length;tt+=1){const nt=Be[tt];if(nt!=null&&!isNode(nt)){const ft=Object.keys(Object(nt)).filter(ht=>Ye.indexOf(ht)<0);for(let ht=0,gt=ft.length;ht<gt;ht+=1){const At=ft[ht],xt=Object.getOwnPropertyDescriptor(nt,At);xt!==void 0&&xt.enumerable&&(isObject$2(Le[At])&&isObject$2(nt[At])?nt[At].__swiper__?Le[At]=nt[At]:extend$3(Le[At],nt[At]):!isObject$2(Le[At])&&isObject$2(nt[At])?(Le[At]={},nt[At].__swiper__?Le[At]=nt[At]:extend$3(Le[At],nt[At])):Le[At]=nt[At])}}}return Le}function setCSSProperty(Be,Le,Ye){Be.style.setProperty(Le,Ye)}function animateCSSModeScroll({swiper:Be,targetPosition:Le,side:Ye}){const tt=getWindow(),nt=-Be.translate;let ft=null,ht;const gt=Be.params.speed;Be.wrapperEl.style.scrollSnapType="none",tt.cancelAnimationFrame(Be.cssModeFrameID);const At=Le>nt?"next":"prev",xt=(yt,Ct)=>At==="next"&&yt>=Ct||At==="prev"&&yt<=Ct,Et=()=>{ht=new Date().getTime(),ft===null&&(ft=ht);const yt=Math.max(Math.min((ht-ft)/gt,1),0),Ct=.5-Math.cos(yt*Math.PI)/2;let kt=nt+Ct*(Le-nt);if(xt(kt,Le)&&(kt=Le),Be.wrapperEl.scrollTo({[Ye]:kt}),xt(kt,Le)){Be.wrapperEl.style.overflow="hidden",Be.wrapperEl.style.scrollSnapType="",setTimeout(()=>{Be.wrapperEl.style.overflow="",Be.wrapperEl.scrollTo({[Ye]:kt})}),tt.cancelAnimationFrame(Be.cssModeFrameID);return}Be.cssModeFrameID=tt.requestAnimationFrame(Et)};Et()}function elementChildren(Be,Le=""){return[...Be.children].filter(Ye=>Ye.matches(Le))}function createElement(Be,Le=[]){const Ye=document.createElement(Be);return Ye.classList.add(...Array.isArray(Le)?Le:[Le]),Ye}function elementPrevAll(Be,Le){const Ye=[];for(;Be.previousElementSibling;){const tt=Be.previousElementSibling;Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),Be=tt}return Ye}function elementNextAll(Be,Le){const Ye=[];for(;Be.nextElementSibling;){const tt=Be.nextElementSibling;Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),Be=tt}return Ye}function elementStyle(Be,Le){return getWindow().getComputedStyle(Be,null).getPropertyValue(Le)}function elementIndex(Be){let Le=Be,Ye;if(Le){for(Ye=0;(Le=Le.previousSibling)!==null;)Le.nodeType===1&&(Ye+=1);return Ye}}function elementParents(Be,Le){const Ye=[];let tt=Be.parentElement;for(;tt;)Le?tt.matches(Le)&&Ye.push(tt):Ye.push(tt),tt=tt.parentElement;return Ye}function elementOuterSize(Be,Le,Ye){const tt=getWindow();return Be[Le==="width"?"offsetWidth":"offsetHeight"]+parseFloat(tt.getComputedStyle(Be,null).getPropertyValue(Le==="width"?"margin-right":"margin-top"))+parseFloat(tt.getComputedStyle(Be,null).getPropertyValue(Le==="width"?"margin-left":"margin-bottom"))}let support;function calcSupport(){const Be=getWindow(),Le=getDocument$1();return{smoothScroll:Le.documentElement&&Le.documentElement.style&&"scrollBehavior"in Le.documentElement.style,touch:!!("ontouchstart"in Be||Be.DocumentTouch&&Le instanceof Be.DocumentTouch)}}function getSupport(){return support||(support=calcSupport()),support}let deviceCached;function calcDevice({userAgent:Be}={}){const Le=getSupport(),Ye=getWindow(),tt=Ye.navigator.platform,nt=Be||Ye.navigator.userAgent,ft={ios:!1,android:!1},ht=Ye.screen.width,gt=Ye.screen.height,At=nt.match(/(Android);?[\s\/]+([\d.]+)?/);let xt=nt.match(/(iPad).*OS\s([\d_]+)/);const Et=nt.match(/(iPod)(.*OS\s([\d_]+))?/),yt=!xt&&nt.match(/(iPhone\sOS|iOS)\s([\d_]+)/),Ct=tt==="Win32";let kt=tt==="MacIntel";const vt=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!xt&&kt&&Le.touch&&vt.indexOf(`${ht}x${gt}`)>=0&&(xt=nt.match(/(Version)\/([\d.]+)/),xt||(xt=[0,1,"13_0_0"]),kt=!1),At&&!Ct&&(ft.os="android",ft.android=!0),(xt||yt||Et)&&(ft.os="ios",ft.ios=!0),ft}function getDevice(Be={}){return deviceCached||(deviceCached=calcDevice(Be)),deviceCached}let browser;function calcBrowser(){const Be=getWindow();let Le=!1;function Ye(){const tt=Be.navigator.userAgent.toLowerCase();return tt.indexOf("safari")>=0&&tt.indexOf("chrome")<0&&tt.indexOf("android")<0}if(Ye()){const tt=String(Be.navigator.userAgent);if(tt.includes("Version/")){const[nt,ft]=tt.split("Version/")[1].split(" ")[0].split(".").map(ht=>Number(ht));Le=nt<16||nt===16&&ft<2}}return{isSafari:Le||Ye(),needPerspectiveFix:Le,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(Be.navigator.userAgent)}}function getBrowser(){return browser||(browser=calcBrowser()),browser}function Resize({swiper:Be,on:Le,emit:Ye}){const tt=getWindow();let nt=null,ft=null;const ht=()=>{!Be||Be.destroyed||!Be.initialized||(Ye("beforeResize"),Ye("resize"))},gt=()=>{!Be||Be.destroyed||!Be.initialized||(nt=new ResizeObserver(Et=>{ft=tt.requestAnimationFrame(()=>{const{width:yt,height:Ct}=Be;let kt=yt,vt=Ct;Et.forEach(({contentBoxSize:bt,contentRect:It,target:wt})=>{wt&&wt!==Be.el||(kt=It?It.width:(bt[0]||bt).inlineSize,vt=It?It.height:(bt[0]||bt).blockSize)}),(kt!==yt||vt!==Ct)&&ht()})}),nt.observe(Be.el))},At=()=>{ft&&tt.cancelAnimationFrame(ft),nt&&nt.unobserve&&Be.el&&(nt.unobserve(Be.el),nt=null)},xt=()=>{!Be||Be.destroyed||!Be.initialized||Ye("orientationchange")};Le("init",()=>{if(Be.params.resizeObserver&&typeof tt.ResizeObserver<"u"){gt();return}tt.addEventListener("resize",ht),tt.addEventListener("orientationchange",xt)}),Le("destroy",()=>{At(),tt.removeEventListener("resize",ht),tt.removeEventListener("orientationchange",xt)})}function Observer({swiper:Be,extendParams:Le,on:Ye,emit:tt}){const nt=[],ft=getWindow(),ht=(xt,Et={})=>{const yt=ft.MutationObserver||ft.WebkitMutationObserver,Ct=new yt(kt=>{if(Be.__preventObserver__)return;if(kt.length===1){tt("observerUpdate",kt[0]);return}const vt=function(){tt("observerUpdate",kt[0])};ft.requestAnimationFrame?ft.requestAnimationFrame(vt):ft.setTimeout(vt,0)});Ct.observe(xt,{attributes:typeof Et.attributes>"u"?!0:Et.attributes,childList:typeof Et.childList>"u"?!0:Et.childList,characterData:typeof Et.characterData>"u"?!0:Et.characterData}),nt.push(Ct)},gt=()=>{if(Be.params.observer){if(Be.params.observeParents){const xt=elementParents(Be.el);for(let Et=0;Et<xt.length;Et+=1)ht(xt[Et])}ht(Be.el,{childList:Be.params.observeSlideChildren}),ht(Be.wrapperEl,{attributes:!1})}},At=()=>{nt.forEach(xt=>{xt.disconnect()}),nt.splice(0,nt.length)};Le({observer:!1,observeParents:!1,observeSlideChildren:!1}),Ye("init",gt),Ye("destroy",At)}const eventsEmitter={on(Be,Le,Ye){const tt=this;if(!tt.eventsListeners||tt.destroyed||typeof Le!="function")return tt;const nt=Ye?"unshift":"push";return Be.split(" ").forEach(ft=>{tt.eventsListeners[ft]||(tt.eventsListeners[ft]=[]),tt.eventsListeners[ft][nt](Le)}),tt},once(Be,Le,Ye){const tt=this;if(!tt.eventsListeners||tt.destroyed||typeof Le!="function")return tt;function nt(...ft){tt.off(Be,nt),nt.__emitterProxy&&delete nt.__emitterProxy,Le.apply(tt,ft)}return nt.__emitterProxy=Le,tt.on(Be,nt,Ye)},onAny(Be,Le){const Ye=this;if(!Ye.eventsListeners||Ye.destroyed||typeof Be!="function")return Ye;const tt=Le?"unshift":"push";return Ye.eventsAnyListeners.indexOf(Be)<0&&Ye.eventsAnyListeners[tt](Be),Ye},offAny(Be){const Le=this;if(!Le.eventsListeners||Le.destroyed||!Le.eventsAnyListeners)return Le;const Ye=Le.eventsAnyListeners.indexOf(Be);return Ye>=0&&Le.eventsAnyListeners.splice(Ye,1),Le},off(Be,Le){const Ye=this;return!Ye.eventsListeners||Ye.destroyed||!Ye.eventsListeners||Be.split(" ").forEach(tt=>{typeof Le>"u"?Ye.eventsListeners[tt]=[]:Ye.eventsListeners[tt]&&Ye.eventsListeners[tt].forEach((nt,ft)=>{(nt===Le||nt.__emitterProxy&&nt.__emitterProxy===Le)&&Ye.eventsListeners[tt].splice(ft,1)})}),Ye},emit(...Be){const Le=this;if(!Le.eventsListeners||Le.destroyed||!Le.eventsListeners)return Le;let Ye,tt,nt;return typeof Be[0]=="string"||Array.isArray(Be[0])?(Ye=Be[0],tt=Be.slice(1,Be.length),nt=Le):(Ye=Be[0].events,tt=Be[0].data,nt=Be[0].context||Le),tt.unshift(nt),(Array.isArray(Ye)?Ye:Ye.split(" ")).forEach(ht=>{Le.eventsAnyListeners&&Le.eventsAnyListeners.length&&Le.eventsAnyListeners.forEach(gt=>{gt.apply(nt,[ht,...tt])}),Le.eventsListeners&&Le.eventsListeners[ht]&&Le.eventsListeners[ht].forEach(gt=>{gt.apply(nt,tt)})}),Le}};function updateSize(){const Be=this;let Le,Ye;const tt=Be.el;typeof Be.params.width<"u"&&Be.params.width!==null?Le=Be.params.width:Le=tt.clientWidth,typeof Be.params.height<"u"&&Be.params.height!==null?Ye=Be.params.height:Ye=tt.clientHeight,!(Le===0&&Be.isHorizontal()||Ye===0&&Be.isVertical())&&(Le=Le-parseInt(elementStyle(tt,"padding-left")||0,10)-parseInt(elementStyle(tt,"padding-right")||0,10),Ye=Ye-parseInt(elementStyle(tt,"padding-top")||0,10)-parseInt(elementStyle(tt,"padding-bottom")||0,10),Number.isNaN(Le)&&(Le=0),Number.isNaN(Ye)&&(Ye=0),Object.assign(Be,{width:Le,height:Ye,size:Be.isHorizontal()?Le:Ye}))}function updateSlides(){const Be=this;function Le(Kt){return Be.isHorizontal()?Kt:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[Kt]}function Ye(Kt,Vt){return parseFloat(Kt.getPropertyValue(Le(Vt))||0)}const tt=Be.params,{wrapperEl:nt,slidesEl:ft,size:ht,rtlTranslate:gt,wrongRTL:At}=Be,xt=Be.virtual&&tt.virtual.enabled,Et=xt?Be.virtual.slides.length:Be.slides.length,yt=elementChildren(ft,`.${Be.params.slideClass}, swiper-slide`),Ct=xt?Be.virtual.slides.length:yt.length;let kt=[];const vt=[],bt=[];let It=tt.slidesOffsetBefore;typeof It=="function"&&(It=tt.slidesOffsetBefore.call(Be));let wt=tt.slidesOffsetAfter;typeof wt=="function"&&(wt=tt.slidesOffsetAfter.call(Be));const Rt=Be.snapGrid.length,Tt=Be.slidesGrid.length;let Bt=tt.spaceBetween,Dt=-It,Lt=0,Nt=0;if(typeof ht>"u")return;typeof Bt=="string"&&Bt.indexOf("%")>=0?Bt=parseFloat(Bt.replace("%",""))/100*ht:typeof Bt=="string"&&(Bt=parseFloat(Bt)),Be.virtualSize=-Bt,yt.forEach(Kt=>{gt?Kt.style.marginLeft="":Kt.style.marginRight="",Kt.style.marginBottom="",Kt.style.marginTop=""}),tt.centeredSlides&&tt.cssMode&&(setCSSProperty(nt,"--swiper-centered-offset-before",""),setCSSProperty(nt,"--swiper-centered-offset-after",""));const Pt=tt.grid&&tt.grid.rows>1&&Be.grid;Pt&&Be.grid.initSlides(Ct);let Wt;const $t=tt.slidesPerView==="auto"&&tt.breakpoints&&Object.keys(tt.breakpoints).filter(Kt=>typeof tt.breakpoints[Kt].slidesPerView<"u").length>0;for(let Kt=0;Kt<Ct;Kt+=1){Wt=0;let Vt;if(yt[Kt]&&(Vt=yt[Kt]),Pt&&Be.grid.updateSlide(Kt,Vt,Ct,Le),!(yt[Kt]&&elementStyle(Vt,"display")==="none")){if(tt.slidesPerView==="auto"){$t&&(yt[Kt].style[Le("width")]="");const Ut=getComputedStyle(Vt),_t=Vt.style.transform,Xt=Vt.style.webkitTransform;if(_t&&(Vt.style.transform="none"),Xt&&(Vt.style.webkitTransform="none"),tt.roundLengths)Wt=Be.isHorizontal()?elementOuterSize(Vt,"width"):elementOuterSize(Vt,"height");else{const Qt=Ye(Ut,"width"),jt=Ye(Ut,"padding-left"),zt=Ye(Ut,"padding-right"),qt=Ye(Ut,"margin-left"),Gt=Ye(Ut,"margin-right"),e0=Ut.getPropertyValue("box-sizing");if(e0&&e0==="border-box")Wt=Qt+qt+Gt;else{const{clientWidth:s0,offsetWidth:t0}=Vt;Wt=Qt+jt+zt+qt+Gt+(t0-s0)}}_t&&(Vt.style.transform=_t),Xt&&(Vt.style.webkitTransform=Xt),tt.roundLengths&&(Wt=Math.floor(Wt))}else Wt=(ht-(tt.slidesPerView-1)*Bt)/tt.slidesPerView,tt.roundLengths&&(Wt=Math.floor(Wt)),yt[Kt]&&(yt[Kt].style[Le("width")]=`${Wt}px`);yt[Kt]&&(yt[Kt].swiperSlideSize=Wt),bt.push(Wt),tt.centeredSlides?(Dt=Dt+Wt/2+Lt/2+Bt,Lt===0&&Kt!==0&&(Dt=Dt-ht/2-Bt),Kt===0&&(Dt=Dt-ht/2-Bt),Math.abs(Dt)<1/1e3&&(Dt=0),tt.roundLengths&&(Dt=Math.floor(Dt)),Nt%tt.slidesPerGroup===0&&kt.push(Dt),vt.push(Dt)):(tt.roundLengths&&(Dt=Math.floor(Dt)),(Nt-Math.min(Be.params.slidesPerGroupSkip,Nt))%Be.params.slidesPerGroup===0&&kt.push(Dt),vt.push(Dt),Dt=Dt+Wt+Bt),Be.virtualSize+=Wt+Bt,Lt=Wt,Nt+=1}}if(Be.virtualSize=Math.max(Be.virtualSize,ht)+wt,gt&&At&&(tt.effect==="slide"||tt.effect==="coverflow")&&(nt.style.width=`${Be.virtualSize+Bt}px`),tt.setWrapperSize&&(nt.style[Le("width")]=`${Be.virtualSize+Bt}px`),Pt&&Be.grid.updateWrapperSize(Wt,kt,Le),!tt.centeredSlides){const Kt=[];for(let Vt=0;Vt<kt.length;Vt+=1){let Ut=kt[Vt];tt.roundLengths&&(Ut=Math.floor(Ut)),kt[Vt]<=Be.virtualSize-ht&&Kt.push(Ut)}kt=Kt,Math.floor(Be.virtualSize-ht)-Math.floor(kt[kt.length-1])>1&&kt.push(Be.virtualSize-ht)}if(xt&&tt.loop){const Kt=bt[0]+Bt;if(tt.slidesPerGroup>1){const Vt=Math.ceil((Be.virtual.slidesBefore+Be.virtual.slidesAfter)/tt.slidesPerGroup),Ut=Kt*tt.slidesPerGroup;for(let _t=0;_t<Vt;_t+=1)kt.push(kt[kt.length-1]+Ut)}for(let Vt=0;Vt<Be.virtual.slidesBefore+Be.virtual.slidesAfter;Vt+=1)tt.slidesPerGroup===1&&kt.push(kt[kt.length-1]+Kt),vt.push(vt[vt.length-1]+Kt),Be.virtualSize+=Kt}if(kt.length===0&&(kt=[0]),Bt!==0){const Kt=Be.isHorizontal()&>?"marginLeft":Le("marginRight");yt.filter((Vt,Ut)=>!tt.cssMode||tt.loop?!0:Ut!==yt.length-1).forEach(Vt=>{Vt.style[Kt]=`${Bt}px`})}if(tt.centeredSlides&&tt.centeredSlidesBounds){let Kt=0;bt.forEach(Ut=>{Kt+=Ut+(Bt||0)}),Kt-=Bt;const Vt=Kt-ht;kt=kt.map(Ut=>Ut<=0?-It:Ut>Vt?Vt+wt:Ut)}if(tt.centerInsufficientSlides){let Kt=0;if(bt.forEach(Vt=>{Kt+=Vt+(Bt||0)}),Kt-=Bt,Kt<ht){const Vt=(ht-Kt)/2;kt.forEach((Ut,_t)=>{kt[_t]=Ut-Vt}),vt.forEach((Ut,_t)=>{vt[_t]=Ut+Vt})}}if(Object.assign(Be,{slides:yt,snapGrid:kt,slidesGrid:vt,slidesSizesGrid:bt}),tt.centeredSlides&&tt.cssMode&&!tt.centeredSlidesBounds){setCSSProperty(nt,"--swiper-centered-offset-before",`${-kt[0]}px`),setCSSProperty(nt,"--swiper-centered-offset-after",`${Be.size/2-bt[bt.length-1]/2}px`);const Kt=-Be.snapGrid[0],Vt=-Be.slidesGrid[0];Be.snapGrid=Be.snapGrid.map(Ut=>Ut+Kt),Be.slidesGrid=Be.slidesGrid.map(Ut=>Ut+Vt)}if(Ct!==Et&&Be.emit("slidesLengthChange"),kt.length!==Rt&&(Be.params.watchOverflow&&Be.checkOverflow(),Be.emit("snapGridLengthChange")),vt.length!==Tt&&Be.emit("slidesGridLengthChange"),tt.watchSlidesProgress&&Be.updateSlidesOffset(),!xt&&!tt.cssMode&&(tt.effect==="slide"||tt.effect==="fade")){const Kt=`${tt.containerModifierClass}backface-hidden`,Vt=Be.el.classList.contains(Kt);Ct<=tt.maxBackfaceHiddenSlides?Vt||Be.el.classList.add(Kt):Vt&&Be.el.classList.remove(Kt)}}function updateAutoHeight(Be){const Le=this,Ye=[],tt=Le.virtual&&Le.params.virtual.enabled;let nt=0,ft;typeof Be=="number"?Le.setTransition(Be):Be===!0&&Le.setTransition(Le.params.speed);const ht=gt=>tt?Le.slides[Le.getSlideIndexByData(gt)]:Le.slides[gt];if(Le.params.slidesPerView!=="auto"&&Le.params.slidesPerView>1)if(Le.params.centeredSlides)(Le.visibleSlides||[]).forEach(gt=>{Ye.push(gt)});else for(ft=0;ft<Math.ceil(Le.params.slidesPerView);ft+=1){const gt=Le.activeIndex+ft;if(gt>Le.slides.length&&!tt)break;Ye.push(ht(gt))}else Ye.push(ht(Le.activeIndex));for(ft=0;ft<Ye.length;ft+=1)if(typeof Ye[ft]<"u"){const gt=Ye[ft].offsetHeight;nt=gt>nt?gt:nt}(nt||nt===0)&&(Le.wrapperEl.style.height=`${nt}px`)}function updateSlidesOffset(){const Be=this,Le=Be.slides,Ye=Be.isElement?Be.isHorizontal()?Be.wrapperEl.offsetLeft:Be.wrapperEl.offsetTop:0;for(let tt=0;tt<Le.length;tt+=1)Le[tt].swiperSlideOffset=(Be.isHorizontal()?Le[tt].offsetLeft:Le[tt].offsetTop)-Ye-Be.cssOverflowAdjustment()}function updateSlidesProgress(Be=this&&this.translate||0){const Le=this,Ye=Le.params,{slides:tt,rtlTranslate:nt,snapGrid:ft}=Le;if(tt.length===0)return;typeof tt[0].swiperSlideOffset>"u"&&Le.updateSlidesOffset();let ht=-Be;nt&&(ht=Be),tt.forEach(At=>{At.classList.remove(Ye.slideVisibleClass)}),Le.visibleSlidesIndexes=[],Le.visibleSlides=[];let gt=Ye.spaceBetween;typeof gt=="string"&>.indexOf("%")>=0?gt=parseFloat(gt.replace("%",""))/100*Le.size:typeof gt=="string"&&(gt=parseFloat(gt));for(let At=0;At<tt.length;At+=1){const xt=tt[At];let Et=xt.swiperSlideOffset;Ye.cssMode&&Ye.centeredSlides&&(Et-=tt[0].swiperSlideOffset);const yt=(ht+(Ye.centeredSlides?Le.minTranslate():0)-Et)/(xt.swiperSlideSize+gt),Ct=(ht-ft[0]+(Ye.centeredSlides?Le.minTranslate():0)-Et)/(xt.swiperSlideSize+gt),kt=-(ht-Et),vt=kt+Le.slidesSizesGrid[At];(kt>=0&&kt<Le.size-1||vt>1&&vt<=Le.size||kt<=0&&vt>=Le.size)&&(Le.visibleSlides.push(xt),Le.visibleSlidesIndexes.push(At),tt[At].classList.add(Ye.slideVisibleClass)),xt.progress=nt?-yt:yt,xt.originalProgress=nt?-Ct:Ct}}function updateProgress(Be){const Le=this;if(typeof Be>"u"){const Et=Le.rtlTranslate?-1:1;Be=Le&&Le.translate&&Le.translate*Et||0}const Ye=Le.params,tt=Le.maxTranslate()-Le.minTranslate();let{progress:nt,isBeginning:ft,isEnd:ht,progressLoop:gt}=Le;const At=ft,xt=ht;if(tt===0)nt=0,ft=!0,ht=!0;else{nt=(Be-Le.minTranslate())/tt;const Et=Math.abs(Be-Le.minTranslate())<1,yt=Math.abs(Be-Le.maxTranslate())<1;ft=Et||nt<=0,ht=yt||nt>=1,Et&&(nt=0),yt&&(nt=1)}if(Ye.loop){const Et=Le.getSlideIndexByData(0),yt=Le.getSlideIndexByData(Le.slides.length-1),Ct=Le.slidesGrid[Et],kt=Le.slidesGrid[yt],vt=Le.slidesGrid[Le.slidesGrid.length-1],bt=Math.abs(Be);bt>=Ct?gt=(bt-Ct)/vt:gt=(bt+vt-kt)/vt,gt>1&&(gt-=1)}Object.assign(Le,{progress:nt,progressLoop:gt,isBeginning:ft,isEnd:ht}),(Ye.watchSlidesProgress||Ye.centeredSlides&&Ye.autoHeight)&&Le.updateSlidesProgress(Be),ft&&!At&&Le.emit("reachBeginning toEdge"),ht&&!xt&&Le.emit("reachEnd toEdge"),(At&&!ft||xt&&!ht)&&Le.emit("fromEdge"),Le.emit("progress",nt)}function updateSlidesClasses(){const Be=this,{slides:Le,params:Ye,slidesEl:tt,activeIndex:nt}=Be,ft=Be.virtual&&Ye.virtual.enabled,ht=At=>elementChildren(tt,`.${Ye.slideClass}${At}, swiper-slide${At}`)[0];Le.forEach(At=>{At.classList.remove(Ye.slideActiveClass,Ye.slideNextClass,Ye.slidePrevClass)});let gt;if(ft)if(Ye.loop){let At=nt-Be.virtual.slidesBefore;At<0&&(At=Be.virtual.slides.length+At),At>=Be.virtual.slides.length&&(At-=Be.virtual.slides.length),gt=ht(`[data-swiper-slide-index="${At}"]`)}else gt=ht(`[data-swiper-slide-index="${nt}"]`);else gt=Le[nt];if(gt){gt.classList.add(Ye.slideActiveClass);let At=elementNextAll(gt,`.${Ye.slideClass}, swiper-slide`)[0];Ye.loop&&!At&&(At=Le[0]),At&&At.classList.add(Ye.slideNextClass);let xt=elementPrevAll(gt,`.${Ye.slideClass}, swiper-slide`)[0];Ye.loop&&!xt===0&&(xt=Le[Le.length-1]),xt&&xt.classList.add(Ye.slidePrevClass)}Be.emitSlidesClasses()}const processLazyPreloader=(Be,Le)=>{if(!Be||Be.destroyed||!Be.params)return;const Ye=()=>Be.isElement?"swiper-slide":`.${Be.params.slideClass}`,tt=Le.closest(Ye());if(tt){const nt=tt.querySelector(`.${Be.params.lazyPreloaderClass}`);nt&&nt.remove()}},unlazy=(Be,Le)=>{if(!Be.slides[Le])return;const Ye=Be.slides[Le].querySelector('[loading="lazy"]');Ye&&Ye.removeAttribute("loading")},preload=Be=>{if(!Be||Be.destroyed||!Be.params)return;let Le=Be.params.lazyPreloadPrevNext;const Ye=Be.slides.length;if(!Ye||!Le||Le<0)return;Le=Math.min(Le,Ye);const tt=Be.params.slidesPerView==="auto"?Be.slidesPerViewDynamic():Math.ceil(Be.params.slidesPerView),nt=Be.activeIndex;if(Be.params.grid&&Be.params.grid.rows>1){const ht=nt,gt=[ht-Le];gt.push(...Array.from({length:Le}).map((At,xt)=>ht+tt+xt)),Be.slides.forEach((At,xt)=>{gt.includes(At.column)&&unlazy(Be,xt)});return}const ft=nt+tt-1;if(Be.params.rewind||Be.params.loop)for(let ht=nt-Le;ht<=ft+Le;ht+=1){const gt=(ht%Ye+Ye)%Ye;(gt<nt||gt>ft)&&unlazy(Be,gt)}else for(let ht=Math.max(nt-Le,0);ht<=Math.min(ft+Le,Ye-1);ht+=1)ht!==nt&&(ht>ft||ht<nt)&&unlazy(Be,ht)};function getActiveIndexByTranslate(Be){const{slidesGrid:Le,params:Ye}=Be,tt=Be.rtlTranslate?Be.translate:-Be.translate;let nt;for(let ft=0;ft<Le.length;ft+=1)typeof Le[ft+1]<"u"?tt>=Le[ft]&&tt<Le[ft+1]-(Le[ft+1]-Le[ft])/2?nt=ft:tt>=Le[ft]&&tt<Le[ft+1]&&(nt=ft+1):tt>=Le[ft]&&(nt=ft);return Ye.normalizeSlideIndex&&(nt<0||typeof nt>"u")&&(nt=0),nt}function updateActiveIndex(Be){const Le=this,Ye=Le.rtlTranslate?Le.translate:-Le.translate,{snapGrid:tt,params:nt,activeIndex:ft,realIndex:ht,snapIndex:gt}=Le;let At=Be,xt;const Et=Ct=>{let kt=Ct-Le.virtual.slidesBefore;return kt<0&&(kt=Le.virtual.slides.length+kt),kt>=Le.virtual.slides.length&&(kt-=Le.virtual.slides.length),kt};if(typeof At>"u"&&(At=getActiveIndexByTranslate(Le)),tt.indexOf(Ye)>=0)xt=tt.indexOf(Ye);else{const Ct=Math.min(nt.slidesPerGroupSkip,At);xt=Ct+Math.floor((At-Ct)/nt.slidesPerGroup)}if(xt>=tt.length&&(xt=tt.length-1),At===ft){xt!==gt&&(Le.snapIndex=xt,Le.emit("snapIndexChange")),Le.params.loop&&Le.virtual&&Le.params.virtual.enabled&&(Le.realIndex=Et(At));return}let yt;Le.virtual&&nt.virtual.enabled&&nt.loop?yt=Et(At):Le.slides[At]?yt=parseInt(Le.slides[At].getAttribute("data-swiper-slide-index")||At,10):yt=At,Object.assign(Le,{previousSnapIndex:gt,snapIndex:xt,previousRealIndex:ht,realIndex:yt,previousIndex:ft,activeIndex:At}),Le.initialized&&preload(Le),Le.emit("activeIndexChange"),Le.emit("snapIndexChange"),ht!==yt&&Le.emit("realIndexChange"),(Le.initialized||Le.params.runCallbacksOnInit)&&Le.emit("slideChange")}function updateClickedSlide(Be){const Le=this,Ye=Le.params,tt=Be.closest(`.${Ye.slideClass}, swiper-slide`);let nt=!1,ft;if(tt){for(let ht=0;ht<Le.slides.length;ht+=1)if(Le.slides[ht]===tt){nt=!0,ft=ht;break}}if(tt&&nt)Le.clickedSlide=tt,Le.virtual&&Le.params.virtual.enabled?Le.clickedIndex=parseInt(tt.getAttribute("data-swiper-slide-index"),10):Le.clickedIndex=ft;else{Le.clickedSlide=void 0,Le.clickedIndex=void 0;return}Ye.slideToClickedSlide&&Le.clickedIndex!==void 0&&Le.clickedIndex!==Le.activeIndex&&Le.slideToClickedSlide()}const update$2={updateSize,updateSlides,updateAutoHeight,updateSlidesOffset,updateSlidesProgress,updateProgress,updateSlidesClasses,updateActiveIndex,updateClickedSlide};function getSwiperTranslate(Be=this.isHorizontal()?"x":"y"){const Le=this,{params:Ye,rtlTranslate:tt,translate:nt,wrapperEl:ft}=Le;if(Ye.virtualTranslate)return tt?-nt:nt;if(Ye.cssMode)return nt;let ht=getTranslate(ft,Be);return ht+=Le.cssOverflowAdjustment(),tt&&(ht=-ht),ht||0}function setTranslate(Be,Le){const Ye=this,{rtlTranslate:tt,params:nt,wrapperEl:ft,progress:ht}=Ye;let gt=0,At=0;const xt=0;Ye.isHorizontal()?gt=tt?-Be:Be:At=Be,nt.roundLengths&&(gt=Math.floor(gt),At=Math.floor(At)),Ye.previousTranslate=Ye.translate,Ye.translate=Ye.isHorizontal()?gt:At,nt.cssMode?ft[Ye.isHorizontal()?"scrollLeft":"scrollTop"]=Ye.isHorizontal()?-gt:-At:nt.virtualTranslate||(Ye.isHorizontal()?gt-=Ye.cssOverflowAdjustment():At-=Ye.cssOverflowAdjustment(),ft.style.transform=`translate3d(${gt}px, ${At}px, ${xt}px)`);let Et;const yt=Ye.maxTranslate()-Ye.minTranslate();yt===0?Et=0:Et=(Be-Ye.minTranslate())/yt,Et!==ht&&Ye.updateProgress(Be),Ye.emit("setTranslate",Ye.translate,Le)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}function translateTo(Be=0,Le=this.params.speed,Ye=!0,tt=!0,nt){const ft=this,{params:ht,wrapperEl:gt}=ft;if(ft.animating&&ht.preventInteractionOnTransition)return!1;const At=ft.minTranslate(),xt=ft.maxTranslate();let Et;if(tt&&Be>At?Et=At:tt&&Be<xt?Et=xt:Et=Be,ft.updateProgress(Et),ht.cssMode){const yt=ft.isHorizontal();if(Le===0)gt[yt?"scrollLeft":"scrollTop"]=-Et;else{if(!ft.support.smoothScroll)return animateCSSModeScroll({swiper:ft,targetPosition:-Et,side:yt?"left":"top"}),!0;gt.scrollTo({[yt?"left":"top"]:-Et,behavior:"smooth"})}return!0}return Le===0?(ft.setTransition(0),ft.setTranslate(Et),Ye&&(ft.emit("beforeTransitionStart",Le,nt),ft.emit("transitionEnd"))):(ft.setTransition(Le),ft.setTranslate(Et),Ye&&(ft.emit("beforeTransitionStart",Le,nt),ft.emit("transitionStart")),ft.animating||(ft.animating=!0,ft.onTranslateToWrapperTransitionEnd||(ft.onTranslateToWrapperTransitionEnd=function(Ct){!ft||ft.destroyed||Ct.target===this&&(ft.wrapperEl.removeEventListener("transitionend",ft.onTranslateToWrapperTransitionEnd),ft.onTranslateToWrapperTransitionEnd=null,delete ft.onTranslateToWrapperTransitionEnd,Ye&&ft.emit("transitionEnd"))}),ft.wrapperEl.addEventListener("transitionend",ft.onTranslateToWrapperTransitionEnd))),!0}const translate={getTranslate:getSwiperTranslate,setTranslate,minTranslate,maxTranslate,translateTo};function setTransition(Be,Le){const Ye=this;Ye.params.cssMode||(Ye.wrapperEl.style.transitionDuration=`${Be}ms`),Ye.emit("setTransition",Be,Le)}function transitionEmit({swiper:Be,runCallbacks:Le,direction:Ye,step:tt}){const{activeIndex:nt,previousIndex:ft}=Be;let ht=Ye;if(ht||(nt>ft?ht="next":nt<ft?ht="prev":ht="reset"),Be.emit(`transition${tt}`),Le&&nt!==ft){if(ht==="reset"){Be.emit(`slideResetTransition${tt}`);return}Be.emit(`slideChangeTransition${tt}`),ht==="next"?Be.emit(`slideNextTransition${tt}`):Be.emit(`slidePrevTransition${tt}`)}}function transitionStart(Be=!0,Le){const Ye=this,{params:tt}=Ye;tt.cssMode||(tt.autoHeight&&Ye.updateAutoHeight(),transitionEmit({swiper:Ye,runCallbacks:Be,direction:Le,step:"Start"}))}function transitionEnd(Be=!0,Le){const Ye=this,{params:tt}=Ye;Ye.animating=!1,!tt.cssMode&&(Ye.setTransition(0),transitionEmit({swiper:Ye,runCallbacks:Be,direction:Le,step:"End"}))}const transition={setTransition,transitionStart,transitionEnd};function slideTo(Be=0,Le=this.params.speed,Ye=!0,tt,nt){typeof Be=="string"&&(Be=parseInt(Be,10));const ft=this;let ht=Be;ht<0&&(ht=0);const{params:gt,snapGrid:At,slidesGrid:xt,previousIndex:Et,activeIndex:yt,rtlTranslate:Ct,wrapperEl:kt,enabled:vt}=ft;if(ft.animating&>.preventInteractionOnTransition||!vt&&!tt&&!nt)return!1;const bt=Math.min(ft.params.slidesPerGroupSkip,ht);let It=bt+Math.floor((ht-bt)/ft.params.slidesPerGroup);It>=At.length&&(It=At.length-1);const wt=-At[It];if(gt.normalizeSlideIndex)for(let Tt=0;Tt<xt.length;Tt+=1){const Bt=-Math.floor(wt*100),Dt=Math.floor(xt[Tt]*100),Lt=Math.floor(xt[Tt+1]*100);typeof xt[Tt+1]<"u"?Bt>=Dt&&Bt<Lt-(Lt-Dt)/2?ht=Tt:Bt>=Dt&&Bt<Lt&&(ht=Tt+1):Bt>=Dt&&(ht=Tt)}if(ft.initialized&&ht!==yt&&(!ft.allowSlideNext&&(Ct?wt>ft.translate&&wt>ft.minTranslate():wt<ft.translate&&wt<ft.minTranslate())||!ft.allowSlidePrev&&wt>ft.translate&&wt>ft.maxTranslate()&&(yt||0)!==ht))return!1;ht!==(Et||0)&&Ye&&ft.emit("beforeSlideChangeStart"),ft.updateProgress(wt);let Rt;if(ht>yt?Rt="next":ht<yt?Rt="prev":Rt="reset",Ct&&-wt===ft.translate||!Ct&&wt===ft.translate)return ft.updateActiveIndex(ht),gt.autoHeight&&ft.updateAutoHeight(),ft.updateSlidesClasses(),gt.effect!=="slide"&&ft.setTranslate(wt),Rt!=="reset"&&(ft.transitionStart(Ye,Rt),ft.transitionEnd(Ye,Rt)),!1;if(gt.cssMode){const Tt=ft.isHorizontal(),Bt=Ct?wt:-wt;if(Le===0){const Dt=ft.virtual&&ft.params.virtual.enabled;Dt&&(ft.wrapperEl.style.scrollSnapType="none",ft._immediateVirtual=!0),Dt&&!ft._cssModeVirtualInitialSet&&ft.params.initialSlide>0?(ft._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{kt[Tt?"scrollLeft":"scrollTop"]=Bt})):kt[Tt?"scrollLeft":"scrollTop"]=Bt,Dt&&requestAnimationFrame(()=>{ft.wrapperEl.style.scrollSnapType="",ft._immediateVirtual=!1})}else{if(!ft.support.smoothScroll)return animateCSSModeScroll({swiper:ft,targetPosition:Bt,side:Tt?"left":"top"}),!0;kt.scrollTo({[Tt?"left":"top"]:Bt,behavior:"smooth"})}return!0}return ft.setTransition(Le),ft.setTranslate(wt),ft.updateActiveIndex(ht),ft.updateSlidesClasses(),ft.emit("beforeTransitionStart",Le,tt),ft.transitionStart(Ye,Rt),Le===0?ft.transitionEnd(Ye,Rt):ft.animating||(ft.animating=!0,ft.onSlideToWrapperTransitionEnd||(ft.onSlideToWrapperTransitionEnd=function(Bt){!ft||ft.destroyed||Bt.target===this&&(ft.wrapperEl.removeEventListener("transitionend",ft.onSlideToWrapperTransitionEnd),ft.onSlideToWrapperTransitionEnd=null,delete ft.onSlideToWrapperTransitionEnd,ft.transitionEnd(Ye,Rt))}),ft.wrapperEl.addEventListener("transitionend",ft.onSlideToWrapperTransitionEnd)),!0}function slideToLoop(Be=0,Le=this.params.speed,Ye=!0,tt){typeof Be=="string"&&(Be=parseInt(Be,10));const nt=this;let ft=Be;return nt.params.loop&&(nt.virtual&&nt.params.virtual.enabled?ft=ft+nt.virtual.slidesBefore:ft=nt.getSlideIndexByData(ft)),nt.slideTo(ft,Le,Ye,tt)}function slideNext(Be=this.params.speed,Le=!0,Ye){const tt=this,{enabled:nt,params:ft,animating:ht}=tt;if(!nt)return tt;let gt=ft.slidesPerGroup;ft.slidesPerView==="auto"&&ft.slidesPerGroup===1&&ft.slidesPerGroupAuto&&(gt=Math.max(tt.slidesPerViewDynamic("current",!0),1));const At=tt.activeIndex<ft.slidesPerGroupSkip?1:gt,xt=tt.virtual&&ft.virtual.enabled;if(ft.loop){if(ht&&!xt&&ft.loopPreventsSliding)return!1;tt.loopFix({direction:"next"}),tt._clientLeft=tt.wrapperEl.clientLeft}return ft.rewind&&tt.isEnd?tt.slideTo(0,Be,Le,Ye):tt.slideTo(tt.activeIndex+At,Be,Le,Ye)}function slidePrev(Be=this.params.speed,Le=!0,Ye){const tt=this,{params:nt,snapGrid:ft,slidesGrid:ht,rtlTranslate:gt,enabled:At,animating:xt}=tt;if(!At)return tt;const Et=tt.virtual&&nt.virtual.enabled;if(nt.loop){if(xt&&!Et&&nt.loopPreventsSliding)return!1;tt.loopFix({direction:"prev"}),tt._clientLeft=tt.wrapperEl.clientLeft}const yt=gt?tt.translate:-tt.translate;function Ct(wt){return wt<0?-Math.floor(Math.abs(wt)):Math.floor(wt)}const kt=Ct(yt),vt=ft.map(wt=>Ct(wt));let bt=ft[vt.indexOf(kt)-1];if(typeof bt>"u"&&nt.cssMode){let wt;ft.forEach((Rt,Tt)=>{kt>=Rt&&(wt=Tt)}),typeof wt<"u"&&(bt=ft[wt>0?wt-1:wt])}let It=0;if(typeof bt<"u"&&(It=ht.indexOf(bt),It<0&&(It=tt.activeIndex-1),nt.slidesPerView==="auto"&&nt.slidesPerGroup===1&&nt.slidesPerGroupAuto&&(It=It-tt.slidesPerViewDynamic("previous",!0)+1,It=Math.max(It,0))),nt.rewind&&tt.isBeginning){const wt=tt.params.virtual&&tt.params.virtual.enabled&&tt.virtual?tt.virtual.slides.length-1:tt.slides.length-1;return tt.slideTo(wt,Be,Le,Ye)}return tt.slideTo(It,Be,Le,Ye)}function slideReset(Be=this.params.speed,Le=!0,Ye){const tt=this;return tt.slideTo(tt.activeIndex,Be,Le,Ye)}function slideToClosest(Be=this.params.speed,Le=!0,Ye,tt=.5){const nt=this;let ft=nt.activeIndex;const ht=Math.min(nt.params.slidesPerGroupSkip,ft),gt=ht+Math.floor((ft-ht)/nt.params.slidesPerGroup),At=nt.rtlTranslate?nt.translate:-nt.translate;if(At>=nt.snapGrid[gt]){const xt=nt.snapGrid[gt],Et=nt.snapGrid[gt+1];At-xt>(Et-xt)*tt&&(ft+=nt.params.slidesPerGroup)}else{const xt=nt.snapGrid[gt-1],Et=nt.snapGrid[gt];At-xt<=(Et-xt)*tt&&(ft-=nt.params.slidesPerGroup)}return ft=Math.max(ft,0),ft=Math.min(ft,nt.slidesGrid.length-1),nt.slideTo(ft,Be,Le,Ye)}function slideToClickedSlide(){const Be=this,{params:Le,slidesEl:Ye}=Be,tt=Le.slidesPerView==="auto"?Be.slidesPerViewDynamic():Le.slidesPerView;let nt=Be.clickedIndex,ft;const ht=Be.isElement?"swiper-slide":`.${Le.slideClass}`;if(Le.loop){if(Be.animating)return;ft=parseInt(Be.clickedSlide.getAttribute("data-swiper-slide-index"),10),Le.centeredSlides?nt<Be.loopedSlides-tt/2||nt>Be.slides.length-Be.loopedSlides+tt/2?(Be.loopFix(),nt=Be.getSlideIndex(elementChildren(Ye,`${ht}[data-swiper-slide-index="${ft}"]`)[0]),nextTick(()=>{Be.slideTo(nt)})):Be.slideTo(nt):nt>Be.slides.length-tt?(Be.loopFix(),nt=Be.getSlideIndex(elementChildren(Ye,`${ht}[data-swiper-slide-index="${ft}"]`)[0]),nextTick(()=>{Be.slideTo(nt)})):Be.slideTo(nt)}else Be.slideTo(nt)}const slide={slideTo,slideToLoop,slideNext,slidePrev,slideReset,slideToClosest,slideToClickedSlide};function loopCreate(Be){const Le=this,{params:Ye,slidesEl:tt}=Le;if(!Ye.loop||Le.virtual&&Le.params.virtual.enabled)return;elementChildren(tt,`.${Ye.slideClass}, swiper-slide`).forEach((ft,ht)=>{ft.setAttribute("data-swiper-slide-index",ht)}),Le.loopFix({slideRealIndex:Be,direction:Ye.centeredSlides?void 0:"next"})}function loopFix({slideRealIndex:Be,slideTo:Le=!0,direction:Ye,setTranslate:tt,activeSlideIndex:nt,byController:ft,byMousewheel:ht}={}){const gt=this;if(!gt.params.loop)return;gt.emit("beforeLoopFix");const{slides:At,allowSlidePrev:xt,allowSlideNext:Et,slidesEl:yt,params:Ct}=gt;if(gt.allowSlidePrev=!0,gt.allowSlideNext=!0,gt.virtual&&Ct.virtual.enabled){Le&&(!Ct.centeredSlides&>.snapIndex===0?gt.slideTo(gt.virtual.slides.length,0,!1,!0):Ct.centeredSlides&>.snapIndex<Ct.slidesPerView?gt.slideTo(gt.virtual.slides.length+gt.snapIndex,0,!1,!0):gt.snapIndex===gt.snapGrid.length-1&>.slideTo(gt.virtual.slidesBefore,0,!1,!0)),gt.allowSlidePrev=xt,gt.allowSlideNext=Et,gt.emit("loopFix");return}const kt=Ct.slidesPerView==="auto"?gt.slidesPerViewDynamic():Math.ceil(parseFloat(Ct.slidesPerView,10));let vt=Ct.loopedSlides||kt;vt%Ct.slidesPerGroup!==0&&(vt+=Ct.slidesPerGroup-vt%Ct.slidesPerGroup),gt.loopedSlides=vt;const bt=[],It=[];let wt=gt.activeIndex;typeof nt>"u"?nt=gt.getSlideIndex(gt.slides.filter(Lt=>Lt.classList.contains(Ct.slideActiveClass))[0]):wt=nt;const Rt=Ye==="next"||!Ye,Tt=Ye==="prev"||!Ye;let Bt=0,Dt=0;if(nt<vt){Bt=Math.max(vt-nt,Ct.slidesPerGroup);for(let Lt=0;Lt<vt-nt;Lt+=1){const Nt=Lt-Math.floor(Lt/At.length)*At.length;bt.push(At.length-Nt-1)}}else if(nt>gt.slides.length-vt*2){Dt=Math.max(nt-(gt.slides.length-vt*2),Ct.slidesPerGroup);for(let Lt=0;Lt<Dt;Lt+=1){const Nt=Lt-Math.floor(Lt/At.length)*At.length;It.push(Nt)}}if(Tt&&bt.forEach(Lt=>{gt.slides[Lt].swiperLoopMoveDOM=!0,yt.prepend(gt.slides[Lt]),gt.slides[Lt].swiperLoopMoveDOM=!1}),Rt&&It.forEach(Lt=>{gt.slides[Lt].swiperLoopMoveDOM=!0,yt.append(gt.slides[Lt]),gt.slides[Lt].swiperLoopMoveDOM=!1}),gt.recalcSlides(),Ct.slidesPerView==="auto"&>.updateSlides(),Ct.watchSlidesProgress&>.updateSlidesOffset(),Le){if(bt.length>0&&Tt)if(typeof Be>"u"){const Lt=gt.slidesGrid[wt],Pt=gt.slidesGrid[wt+Bt]-Lt;ht?gt.setTranslate(gt.translate-Pt):(gt.slideTo(wt+Bt,0,!1,!0),tt&&(gt.touches[gt.isHorizontal()?"startX":"startY"]+=Pt))}else tt&>.slideToLoop(Be,0,!1,!0);else if(It.length>0&&Rt)if(typeof Be>"u"){const Lt=gt.slidesGrid[wt],Pt=gt.slidesGrid[wt-Dt]-Lt;ht?gt.setTranslate(gt.translate-Pt):(gt.slideTo(wt-Dt,0,!1,!0),tt&&(gt.touches[gt.isHorizontal()?"startX":"startY"]+=Pt))}else gt.slideToLoop(Be,0,!1,!0)}if(gt.allowSlidePrev=xt,gt.allowSlideNext=Et,gt.controller&>.controller.control&&!ft){const Lt={slideRealIndex:Be,slideTo:!1,direction:Ye,setTranslate:tt,activeSlideIndex:nt,byController:!0};Array.isArray(gt.controller.control)?gt.controller.control.forEach(Nt=>{!Nt.destroyed&&Nt.params.loop&&Nt.loopFix(Lt)}):gt.controller.control instanceof gt.constructor&>.controller.control.params.loop&>.controller.control.loopFix(Lt)}gt.emit("loopFix")}function loopDestroy(){const Be=this,{params:Le,slidesEl:Ye}=Be;if(!Le.loop||Be.virtual&&Be.params.virtual.enabled)return;Be.recalcSlides();const tt=[];Be.slides.forEach(nt=>{const ft=typeof nt.swiperSlideIndex>"u"?nt.getAttribute("data-swiper-slide-index")*1:nt.swiperSlideIndex;tt[ft]=nt}),Be.slides.forEach(nt=>{nt.removeAttribute("data-swiper-slide-index")}),tt.forEach(nt=>{Ye.append(nt)}),Be.recalcSlides(),Be.slideTo(Be.realIndex,0)}const loop={loopCreate,loopFix,loopDestroy};function setGrabCursor(Be){const Le=this;if(!Le.params.simulateTouch||Le.params.watchOverflow&&Le.isLocked||Le.params.cssMode)return;const Ye=Le.params.touchEventsTarget==="container"?Le.el:Le.wrapperEl;Le.isElement&&(Le.__preventObserver__=!0),Ye.style.cursor="move",Ye.style.cursor=Be?"grabbing":"grab",Le.isElement&&requestAnimationFrame(()=>{Le.__preventObserver__=!1})}function unsetGrabCursor(){const Be=this;Be.params.watchOverflow&&Be.isLocked||Be.params.cssMode||(Be.isElement&&(Be.__preventObserver__=!0),Be[Be.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",Be.isElement&&requestAnimationFrame(()=>{Be.__preventObserver__=!1}))}const grabCursor={setGrabCursor,unsetGrabCursor};function closestElement(Be,Le=this){function Ye(tt){if(!tt||tt===getDocument$1()||tt===getWindow())return null;tt.assignedSlot&&(tt=tt.assignedSlot);const nt=tt.closest(Be);return!nt&&!tt.getRootNode?null:nt||Ye(tt.getRootNode().host)}return Ye(Le)}function onTouchStart(Be){const Le=this,Ye=getDocument$1(),tt=getWindow(),nt=Le.touchEventsData;nt.evCache.push(Be);const{params:ft,touches:ht,enabled:gt}=Le;if(!gt||!ft.simulateTouch&&Be.pointerType==="mouse"||Le.animating&&ft.preventInteractionOnTransition)return;!Le.animating&&ft.cssMode&&ft.loop&&Le.loopFix();let At=Be;At.originalEvent&&(At=At.originalEvent);let xt=At.target;if(ft.touchEventsTarget==="wrapper"&&!Le.wrapperEl.contains(xt)||"which"in At&&At.which===3||"button"in At&&At.button>0||nt.isTouched&&nt.isMoved)return;const Et=!!ft.noSwipingClass&&ft.noSwipingClass!=="",yt=Be.composedPath?Be.composedPath():Be.path;Et&&At.target&&At.target.shadowRoot&&yt&&(xt=yt[0]);const Ct=ft.noSwipingSelector?ft.noSwipingSelector:`.${ft.noSwipingClass}`,kt=!!(At.target&&At.target.shadowRoot);if(ft.noSwiping&&(kt?closestElement(Ct,xt):xt.closest(Ct))){Le.allowClick=!0;return}if(ft.swipeHandler&&!xt.closest(ft.swipeHandler))return;ht.currentX=At.pageX,ht.currentY=At.pageY;const vt=ht.currentX,bt=ht.currentY,It=ft.edgeSwipeDetection||ft.iOSEdgeSwipeDetection,wt=ft.edgeSwipeThreshold||ft.iOSEdgeSwipeThreshold;if(It&&(vt<=wt||vt>=tt.innerWidth-wt))if(It==="prevent")Be.preventDefault();else return;Object.assign(nt,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),ht.startX=vt,ht.startY=bt,nt.touchStartTime=now(),Le.allowClick=!0,Le.updateSize(),Le.swipeDirection=void 0,ft.threshold>0&&(nt.allowThresholdMove=!1);let Rt=!0;xt.matches(nt.focusableElements)&&(Rt=!1,xt.nodeName==="SELECT"&&(nt.isTouched=!1)),Ye.activeElement&&Ye.activeElement.matches(nt.focusableElements)&&Ye.activeElement!==xt&&Ye.activeElement.blur();const Tt=Rt&&Le.allowTouchMove&&ft.touchStartPreventDefault;(ft.touchStartForcePreventDefault||Tt)&&!xt.isContentEditable&&At.preventDefault(),ft.freeMode&&ft.freeMode.enabled&&Le.freeMode&&Le.animating&&!ft.cssMode&&Le.freeMode.onTouchStart(),Le.emit("touchStart",At)}function onTouchMove(Be){const Le=getDocument$1(),Ye=this,tt=Ye.touchEventsData,{params:nt,touches:ft,rtlTranslate:ht,enabled:gt}=Ye;if(!gt||!nt.simulateTouch&&Be.pointerType==="mouse")return;let At=Be;if(At.originalEvent&&(At=At.originalEvent),!tt.isTouched){tt.startMoving&&tt.isScrolling&&Ye.emit("touchMoveOpposite",At);return}const xt=tt.evCache.findIndex(Lt=>Lt.pointerId===At.pointerId);xt>=0&&(tt.evCache[xt]=At);const Et=tt.evCache.length>1?tt.evCache[0]:At,yt=Et.pageX,Ct=Et.pageY;if(At.preventedByNestedSwiper){ft.startX=yt,ft.startY=Ct;return}if(!Ye.allowTouchMove){At.target.matches(tt.focusableElements)||(Ye.allowClick=!1),tt.isTouched&&(Object.assign(ft,{startX:yt,startY:Ct,prevX:Ye.touches.currentX,prevY:Ye.touches.currentY,currentX:yt,currentY:Ct}),tt.touchStartTime=now());return}if(nt.touchReleaseOnEdges&&!nt.loop){if(Ye.isVertical()){if(Ct<ft.startY&&Ye.translate<=Ye.maxTranslate()||Ct>ft.startY&&Ye.translate>=Ye.minTranslate()){tt.isTouched=!1,tt.isMoved=!1;return}}else if(yt<ft.startX&&Ye.translate<=Ye.maxTranslate()||yt>ft.startX&&Ye.translate>=Ye.minTranslate())return}if(Le.activeElement&&At.target===Le.activeElement&&At.target.matches(tt.focusableElements)){tt.isMoved=!0,Ye.allowClick=!1;return}if(tt.allowTouchCallbacks&&Ye.emit("touchMove",At),At.targetTouches&&At.targetTouches.length>1)return;ft.currentX=yt,ft.currentY=Ct;const kt=ft.currentX-ft.startX,vt=ft.currentY-ft.startY;if(Ye.params.threshold&&Math.sqrt(kt**2+vt**2)<Ye.params.threshold)return;if(typeof tt.isScrolling>"u"){let Lt;Ye.isHorizontal()&&ft.currentY===ft.startY||Ye.isVertical()&&ft.currentX===ft.startX?tt.isScrolling=!1:kt*kt+vt*vt>=25&&(Lt=Math.atan2(Math.abs(vt),Math.abs(kt))*180/Math.PI,tt.isScrolling=Ye.isHorizontal()?Lt>nt.touchAngle:90-Lt>nt.touchAngle)}if(tt.isScrolling&&Ye.emit("touchMoveOpposite",At),typeof tt.startMoving>"u"&&(ft.currentX!==ft.startX||ft.currentY!==ft.startY)&&(tt.startMoving=!0),tt.isScrolling||Ye.zoom&&Ye.params.zoom&&Ye.params.zoom.enabled&&tt.evCache.length>1){tt.isTouched=!1;return}if(!tt.startMoving)return;Ye.allowClick=!1,!nt.cssMode&&At.cancelable&&At.preventDefault(),nt.touchMoveStopPropagation&&!nt.nested&&At.stopPropagation();let bt=Ye.isHorizontal()?kt:vt,It=Ye.isHorizontal()?ft.currentX-ft.previousX:ft.currentY-ft.previousY;nt.oneWayMovement&&(bt=Math.abs(bt)*(ht?1:-1),It=Math.abs(It)*(ht?1:-1)),ft.diff=bt,bt*=nt.touchRatio,ht&&(bt=-bt,It=-It);const wt=Ye.touchesDirection;Ye.swipeDirection=bt>0?"prev":"next",Ye.touchesDirection=It>0?"prev":"next";const Rt=Ye.params.loop&&!nt.cssMode;if(!tt.isMoved){if(Rt&&Ye.loopFix({direction:Ye.swipeDirection}),tt.startTranslate=Ye.getTranslate(),Ye.setTransition(0),Ye.animating){const Lt=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});Ye.wrapperEl.dispatchEvent(Lt)}tt.allowMomentumBounce=!1,nt.grabCursor&&(Ye.allowSlideNext===!0||Ye.allowSlidePrev===!0)&&Ye.setGrabCursor(!0),Ye.emit("sliderFirstMove",At)}let Tt;tt.isMoved&&wt!==Ye.touchesDirection&&Rt&&Math.abs(bt)>=1&&(Ye.loopFix({direction:Ye.swipeDirection,setTranslate:!0}),Tt=!0),Ye.emit("sliderMove",At),tt.isMoved=!0,tt.currentTranslate=bt+tt.startTranslate;let Bt=!0,Dt=nt.resistanceRatio;if(nt.touchReleaseOnEdges&&(Dt=0),bt>0?(Rt&&!Tt&&tt.currentTranslate>(nt.centeredSlides?Ye.minTranslate()-Ye.size/2:Ye.minTranslate())&&Ye.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),tt.currentTranslate>Ye.minTranslate()&&(Bt=!1,nt.resistance&&(tt.currentTranslate=Ye.minTranslate()-1+(-Ye.minTranslate()+tt.startTranslate+bt)**Dt))):bt<0&&(Rt&&!Tt&&tt.currentTranslate<(nt.centeredSlides?Ye.maxTranslate()+Ye.size/2:Ye.maxTranslate())&&Ye.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:Ye.slides.length-(nt.slidesPerView==="auto"?Ye.slidesPerViewDynamic():Math.ceil(parseFloat(nt.slidesPerView,10)))}),tt.currentTranslate<Ye.maxTranslate()&&(Bt=!1,nt.resistance&&(tt.currentTranslate=Ye.maxTranslate()+1-(Ye.maxTranslate()-tt.startTranslate-bt)**Dt))),Bt&&(At.preventedByNestedSwiper=!0),!Ye.allowSlideNext&&Ye.swipeDirection==="next"&&tt.currentTranslate<tt.startTranslate&&(tt.currentTranslate=tt.startTranslate),!Ye.allowSlidePrev&&Ye.swipeDirection==="prev"&&tt.currentTranslate>tt.startTranslate&&(tt.currentTranslate=tt.startTranslate),!Ye.allowSlidePrev&&!Ye.allowSlideNext&&(tt.currentTranslate=tt.startTranslate),nt.threshold>0)if(Math.abs(bt)>nt.threshold||tt.allowThresholdMove){if(!tt.allowThresholdMove){tt.allowThresholdMove=!0,ft.startX=ft.currentX,ft.startY=ft.currentY,tt.currentTranslate=tt.startTranslate,ft.diff=Ye.isHorizontal()?ft.currentX-ft.startX:ft.currentY-ft.startY;return}}else{tt.currentTranslate=tt.startTranslate;return}!nt.followFinger||nt.cssMode||((nt.freeMode&&nt.freeMode.enabled&&Ye.freeMode||nt.watchSlidesProgress)&&(Ye.updateActiveIndex(),Ye.updateSlidesClasses()),nt.freeMode&&nt.freeMode.enabled&&Ye.freeMode&&Ye.freeMode.onTouchMove(),Ye.updateProgress(tt.currentTranslate),Ye.setTranslate(tt.currentTranslate))}function onTouchEnd(Be){const Le=this,Ye=Le.touchEventsData,tt=Ye.evCache.findIndex(Tt=>Tt.pointerId===Be.pointerId);if(tt>=0&&Ye.evCache.splice(tt,1),["pointercancel","pointerout","pointerleave"].includes(Be.type)&&!(Be.type==="pointercancel"&&(Le.browser.isSafari||Le.browser.isWebView)))return;const{params:nt,touches:ft,rtlTranslate:ht,slidesGrid:gt,enabled:At}=Le;if(!At||!nt.simulateTouch&&Be.pointerType==="mouse")return;let xt=Be;if(xt.originalEvent&&(xt=xt.originalEvent),Ye.allowTouchCallbacks&&Le.emit("touchEnd",xt),Ye.allowTouchCallbacks=!1,!Ye.isTouched){Ye.isMoved&&nt.grabCursor&&Le.setGrabCursor(!1),Ye.isMoved=!1,Ye.startMoving=!1;return}nt.grabCursor&&Ye.isMoved&&Ye.isTouched&&(Le.allowSlideNext===!0||Le.allowSlidePrev===!0)&&Le.setGrabCursor(!1);const Et=now(),yt=Et-Ye.touchStartTime;if(Le.allowClick){const Tt=xt.path||xt.composedPath&&xt.composedPath();Le.updateClickedSlide(Tt&&Tt[0]||xt.target),Le.emit("tap click",xt),yt<300&&Et-Ye.lastClickTime<300&&Le.emit("doubleTap doubleClick",xt)}if(Ye.lastClickTime=now(),nextTick(()=>{Le.destroyed||(Le.allowClick=!0)}),!Ye.isTouched||!Ye.isMoved||!Le.swipeDirection||ft.diff===0||Ye.currentTranslate===Ye.startTranslate){Ye.isTouched=!1,Ye.isMoved=!1,Ye.startMoving=!1;return}Ye.isTouched=!1,Ye.isMoved=!1,Ye.startMoving=!1;let Ct;if(nt.followFinger?Ct=ht?Le.translate:-Le.translate:Ct=-Ye.currentTranslate,nt.cssMode)return;if(nt.freeMode&&nt.freeMode.enabled){Le.freeMode.onTouchEnd({currentPos:Ct});return}let kt=0,vt=Le.slidesSizesGrid[0];for(let Tt=0;Tt<gt.length;Tt+=Tt<nt.slidesPerGroupSkip?1:nt.slidesPerGroup){const Bt=Tt<nt.slidesPerGroupSkip-1?1:nt.slidesPerGroup;typeof gt[Tt+Bt]<"u"?Ct>=gt[Tt]&&Ct<gt[Tt+Bt]&&(kt=Tt,vt=gt[Tt+Bt]-gt[Tt]):Ct>=gt[Tt]&&(kt=Tt,vt=gt[gt.length-1]-gt[gt.length-2])}let bt=null,It=null;nt.rewind&&(Le.isBeginning?It=nt.virtual&&nt.virtual.enabled&&Le.virtual?Le.virtual.slides.length-1:Le.slides.length-1:Le.isEnd&&(bt=0));const wt=(Ct-gt[kt])/vt,Rt=kt<nt.slidesPerGroupSkip-1?1:nt.slidesPerGroup;if(yt>nt.longSwipesMs){if(!nt.longSwipes){Le.slideTo(Le.activeIndex);return}Le.swipeDirection==="next"&&(wt>=nt.longSwipesRatio?Le.slideTo(nt.rewind&&Le.isEnd?bt:kt+Rt):Le.slideTo(kt)),Le.swipeDirection==="prev"&&(wt>1-nt.longSwipesRatio?Le.slideTo(kt+Rt):It!==null&&wt<0&&Math.abs(wt)>nt.longSwipesRatio?Le.slideTo(It):Le.slideTo(kt))}else{if(!nt.shortSwipes){Le.slideTo(Le.activeIndex);return}Le.navigation&&(xt.target===Le.navigation.nextEl||xt.target===Le.navigation.prevEl)?xt.target===Le.navigation.nextEl?Le.slideTo(kt+Rt):Le.slideTo(kt):(Le.swipeDirection==="next"&&Le.slideTo(bt!==null?bt:kt+Rt),Le.swipeDirection==="prev"&&Le.slideTo(It!==null?It:kt))}}function onResize(){const Be=this,{params:Le,el:Ye}=Be;if(Ye&&Ye.offsetWidth===0)return;Le.breakpoints&&Be.setBreakpoint();const{allowSlideNext:tt,allowSlidePrev:nt,snapGrid:ft}=Be,ht=Be.virtual&&Be.params.virtual.enabled;Be.allowSlideNext=!0,Be.allowSlidePrev=!0,Be.updateSize(),Be.updateSlides(),Be.updateSlidesClasses();const gt=ht&&Le.loop;(Le.slidesPerView==="auto"||Le.slidesPerView>1)&&Be.isEnd&&!Be.isBeginning&&!Be.params.centeredSlides&&!gt?Be.slideTo(Be.slides.length-1,0,!1,!0):Be.params.loop&&!ht?Be.slideToLoop(Be.realIndex,0,!1,!0):Be.slideTo(Be.activeIndex,0,!1,!0),Be.autoplay&&Be.autoplay.running&&Be.autoplay.paused&&(clearTimeout(Be.autoplay.resizeTimeout),Be.autoplay.resizeTimeout=setTimeout(()=>{Be.autoplay&&Be.autoplay.running&&Be.autoplay.paused&&Be.autoplay.resume()},500)),Be.allowSlidePrev=nt,Be.allowSlideNext=tt,Be.params.watchOverflow&&ft!==Be.snapGrid&&Be.checkOverflow()}function onClick(Be){const Le=this;Le.enabled&&(Le.allowClick||(Le.params.preventClicks&&Be.preventDefault(),Le.params.preventClicksPropagation&&Le.animating&&(Be.stopPropagation(),Be.stopImmediatePropagation())))}function onScroll(){const Be=this,{wrapperEl:Le,rtlTranslate:Ye,enabled:tt}=Be;if(!tt)return;Be.previousTranslate=Be.translate,Be.isHorizontal()?Be.translate=-Le.scrollLeft:Be.translate=-Le.scrollTop,Be.translate===0&&(Be.translate=0),Be.updateActiveIndex(),Be.updateSlidesClasses();let nt;const ft=Be.maxTranslate()-Be.minTranslate();ft===0?nt=0:nt=(Be.translate-Be.minTranslate())/ft,nt!==Be.progress&&Be.updateProgress(Ye?-Be.translate:Be.translate),Be.emit("setTranslate",Be.translate,!1)}function onLoad(Be){const Le=this;processLazyPreloader(Le,Be.target),!(Le.params.cssMode||Le.params.slidesPerView!=="auto"&&!Le.params.autoHeight)&&Le.update()}let dummyEventAttached=!1;function dummyEventListener(){}const events=(Be,Le)=>{const Ye=getDocument$1(),{params:tt,el:nt,wrapperEl:ft,device:ht}=Be,gt=!!tt.nested,At=Le==="on"?"addEventListener":"removeEventListener",xt=Le;nt[At]("pointerdown",Be.onTouchStart,{passive:!1}),Ye[At]("pointermove",Be.onTouchMove,{passive:!1,capture:gt}),Ye[At]("pointerup",Be.onTouchEnd,{passive:!0}),Ye[At]("pointercancel",Be.onTouchEnd,{passive:!0}),Ye[At]("pointerout",Be.onTouchEnd,{passive:!0}),Ye[At]("pointerleave",Be.onTouchEnd,{passive:!0}),(tt.preventClicks||tt.preventClicksPropagation)&&nt[At]("click",Be.onClick,!0),tt.cssMode&&ft[At]("scroll",Be.onScroll),tt.updateOnWindowResize?Be[xt](ht.ios||ht.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0):Be[xt]("observerUpdate",onResize,!0),nt[At]("load",Be.onLoad,{capture:!0})};function attachEvents(){const Be=this,Le=getDocument$1(),{params:Ye}=Be;Be.onTouchStart=onTouchStart.bind(Be),Be.onTouchMove=onTouchMove.bind(Be),Be.onTouchEnd=onTouchEnd.bind(Be),Ye.cssMode&&(Be.onScroll=onScroll.bind(Be)),Be.onClick=onClick.bind(Be),Be.onLoad=onLoad.bind(Be),dummyEventAttached||(Le.addEventListener("touchstart",dummyEventListener),dummyEventAttached=!0),events(Be,"on")}function detachEvents(){events(this,"off")}const events$1={attachEvents,detachEvents},isGridEnabled=(Be,Le)=>Be.grid&&Le.grid&&Le.grid.rows>1;function setBreakpoint(){const Be=this,{realIndex:Le,initialized:Ye,params:tt,el:nt}=Be,ft=tt.breakpoints;if(!ft||ft&&Object.keys(ft).length===0)return;const ht=Be.getBreakpoint(ft,Be.params.breakpointsBase,Be.el);if(!ht||Be.currentBreakpoint===ht)return;const At=(ht in ft?ft[ht]:void 0)||Be.originalParams,xt=isGridEnabled(Be,tt),Et=isGridEnabled(Be,At),yt=tt.enabled;xt&&!Et?(nt.classList.remove(`${tt.containerModifierClass}grid`,`${tt.containerModifierClass}grid-column`),Be.emitContainerClasses()):!xt&&Et&&(nt.classList.add(`${tt.containerModifierClass}grid`),(At.grid.fill&&At.grid.fill==="column"||!At.grid.fill&&tt.grid.fill==="column")&&nt.classList.add(`${tt.containerModifierClass}grid-column`),Be.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(bt=>{if(typeof At[bt]>"u")return;const It=tt[bt]&&tt[bt].enabled,wt=At[bt]&&At[bt].enabled;It&&!wt&&Be[bt].disable(),!It&&wt&&Be[bt].enable()});const Ct=At.direction&&At.direction!==tt.direction,kt=tt.loop&&(At.slidesPerView!==tt.slidesPerView||Ct);Ct&&Ye&&Be.changeDirection(),extend$3(Be.params,At);const vt=Be.params.enabled;Object.assign(Be,{allowTouchMove:Be.params.allowTouchMove,allowSlideNext:Be.params.allowSlideNext,allowSlidePrev:Be.params.allowSlidePrev}),yt&&!vt?Be.disable():!yt&&vt&&Be.enable(),Be.currentBreakpoint=ht,Be.emit("_beforeBreakpoint",At),kt&&Ye&&(Be.loopDestroy(),Be.loopCreate(Le),Be.updateSlides()),Be.emit("breakpoint",At)}function getBreakpoint(Be,Le="window",Ye){if(!Be||Le==="container"&&!Ye)return;let tt=!1;const nt=getWindow(),ft=Le==="window"?nt.innerHeight:Ye.clientHeight,ht=Object.keys(Be).map(gt=>{if(typeof gt=="string"&>.indexOf("@")===0){const At=parseFloat(gt.substr(1));return{value:ft*At,point:gt}}return{value:gt,point:gt}});ht.sort((gt,At)=>parseInt(gt.value,10)-parseInt(At.value,10));for(let gt=0;gt<ht.length;gt+=1){const{point:At,value:xt}=ht[gt];Le==="window"?nt.matchMedia(`(min-width: ${xt}px)`).matches&&(tt=At):xt<=Ye.clientWidth&&(tt=At)}return tt||"max"}const breakpoints={setBreakpoint,getBreakpoint};function prepareClasses(Be,Le){const Ye=[];return Be.forEach(tt=>{typeof tt=="object"?Object.keys(tt).forEach(nt=>{tt[nt]&&Ye.push(Le+nt)}):typeof tt=="string"&&Ye.push(Le+tt)}),Ye}function addClasses(){const Be=this,{classNames:Le,params:Ye,rtl:tt,el:nt,device:ft}=Be,ht=prepareClasses(["initialized",Ye.direction,{"free-mode":Be.params.freeMode&&Ye.freeMode.enabled},{autoheight:Ye.autoHeight},{rtl:tt},{grid:Ye.grid&&Ye.grid.rows>1},{"grid-column":Ye.grid&&Ye.grid.rows>1&&Ye.grid.fill==="column"},{android:ft.android},{ios:ft.ios},{"css-mode":Ye.cssMode},{centered:Ye.cssMode&&Ye.centeredSlides},{"watch-progress":Ye.watchSlidesProgress}],Ye.containerModifierClass);Le.push(...ht),nt.classList.add(...Le),Be.emitContainerClasses()}function removeClasses(){const Be=this,{el:Le,classNames:Ye}=Be;Le.classList.remove(...Ye),Be.emitContainerClasses()}const classes={addClasses,removeClasses};function checkOverflow(){const Be=this,{isLocked:Le,params:Ye}=Be,{slidesOffsetBefore:tt}=Ye;if(tt){const nt=Be.slides.length-1,ft=Be.slidesGrid[nt]+Be.slidesSizesGrid[nt]+tt*2;Be.isLocked=Be.size>ft}else Be.isLocked=Be.snapGrid.length===1;Ye.allowSlideNext===!0&&(Be.allowSlideNext=!Be.isLocked),Ye.allowSlidePrev===!0&&(Be.allowSlidePrev=!Be.isLocked),Le&&Le!==Be.isLocked&&(Be.isEnd=!1),Le!==Be.isLocked&&Be.emit(Be.isLocked?"lock":"unlock")}const checkOverflow$1={checkOverflow},defaults={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function moduleExtendParams(Be,Le){return function(tt={}){const nt=Object.keys(tt)[0],ft=tt[nt];if(typeof ft!="object"||ft===null){extend$3(Le,tt);return}if(["navigation","pagination","scrollbar"].indexOf(nt)>=0&&Be[nt]===!0&&(Be[nt]={auto:!0}),!(nt in Be&&"enabled"in ft)){extend$3(Le,tt);return}Be[nt]===!0&&(Be[nt]={enabled:!0}),typeof Be[nt]=="object"&&!("enabled"in Be[nt])&&(Be[nt].enabled=!0),Be[nt]||(Be[nt]={enabled:!1}),extend$3(Le,tt)}}const prototypes={eventsEmitter,update:update$2,translate,transition,slide,loop,grabCursor,events:events$1,breakpoints,checkOverflow:checkOverflow$1,classes},extendedDefaults={};let Swiper$1=class vo{constructor(...Le){let Ye,tt;Le.length===1&&Le[0].constructor&&Object.prototype.toString.call(Le[0]).slice(8,-1)==="Object"?tt=Le[0]:[Ye,tt]=Le,tt||(tt={}),tt=extend$3({},tt),Ye&&!tt.el&&(tt.el=Ye);const nt=getDocument$1();if(tt.el&&typeof tt.el=="string"&&nt.querySelectorAll(tt.el).length>1){const At=[];return nt.querySelectorAll(tt.el).forEach(xt=>{const Et=extend$3({},tt,{el:xt});At.push(new vo(Et))}),At}const ft=this;ft.__swiper__=!0,ft.support=getSupport(),ft.device=getDevice({userAgent:tt.userAgent}),ft.browser=getBrowser(),ft.eventsListeners={},ft.eventsAnyListeners=[],ft.modules=[...ft.__modules__],tt.modules&&Array.isArray(tt.modules)&&ft.modules.push(...tt.modules);const ht={};ft.modules.forEach(At=>{At({params:tt,swiper:ft,extendParams:moduleExtendParams(tt,ht),on:ft.on.bind(ft),once:ft.once.bind(ft),off:ft.off.bind(ft),emit:ft.emit.bind(ft)})});const gt=extend$3({},defaults,ht);return ft.params=extend$3({},gt,extendedDefaults,tt),ft.originalParams=extend$3({},ft.params),ft.passedParams=extend$3({},tt),ft.params&&ft.params.on&&Object.keys(ft.params.on).forEach(At=>{ft.on(At,ft.params.on[At])}),ft.params&&ft.params.onAny&&ft.onAny(ft.params.onAny),Object.assign(ft,{enabled:ft.params.enabled,el:Ye,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return ft.params.direction==="horizontal"},isVertical(){return ft.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:ft.params.allowSlideNext,allowSlidePrev:ft.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:ft.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:ft.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),ft.emit("_swiper"),ft.params.init&&ft.init(),ft}getSlideIndex(Le){const{slidesEl:Ye,params:tt}=this,nt=elementChildren(Ye,`.${tt.slideClass}, swiper-slide`),ft=elementIndex(nt[0]);return elementIndex(Le)-ft}getSlideIndexByData(Le){return this.getSlideIndex(this.slides.filter(Ye=>Ye.getAttribute("data-swiper-slide-index")*1===Le)[0])}recalcSlides(){const Le=this,{slidesEl:Ye,params:tt}=Le;Le.slides=elementChildren(Ye,`.${tt.slideClass}, swiper-slide`)}enable(){const Le=this;Le.enabled||(Le.enabled=!0,Le.params.grabCursor&&Le.setGrabCursor(),Le.emit("enable"))}disable(){const Le=this;Le.enabled&&(Le.enabled=!1,Le.params.grabCursor&&Le.unsetGrabCursor(),Le.emit("disable"))}setProgress(Le,Ye){const tt=this;Le=Math.min(Math.max(Le,0),1);const nt=tt.minTranslate(),ht=(tt.maxTranslate()-nt)*Le+nt;tt.translateTo(ht,typeof Ye>"u"?0:Ye),tt.updateActiveIndex(),tt.updateSlidesClasses()}emitContainerClasses(){const Le=this;if(!Le.params._emitClasses||!Le.el)return;const Ye=Le.el.className.split(" ").filter(tt=>tt.indexOf("swiper")===0||tt.indexOf(Le.params.containerModifierClass)===0);Le.emit("_containerClasses",Ye.join(" "))}getSlideClasses(Le){const Ye=this;return Ye.destroyed?"":Le.className.split(" ").filter(tt=>tt.indexOf("swiper-slide")===0||tt.indexOf(Ye.params.slideClass)===0).join(" ")}emitSlidesClasses(){const Le=this;if(!Le.params._emitClasses||!Le.el)return;const Ye=[];Le.slides.forEach(tt=>{const nt=Le.getSlideClasses(tt);Ye.push({slideEl:tt,classNames:nt}),Le.emit("_slideClass",tt,nt)}),Le.emit("_slideClasses",Ye)}slidesPerViewDynamic(Le="current",Ye=!1){const tt=this,{params:nt,slides:ft,slidesGrid:ht,slidesSizesGrid:gt,size:At,activeIndex:xt}=tt;let Et=1;if(nt.centeredSlides){let yt=ft[xt]?ft[xt].swiperSlideSize:0,Ct;for(let kt=xt+1;kt<ft.length;kt+=1)ft[kt]&&!Ct&&(yt+=ft[kt].swiperSlideSize,Et+=1,yt>At&&(Ct=!0));for(let kt=xt-1;kt>=0;kt-=1)ft[kt]&&!Ct&&(yt+=ft[kt].swiperSlideSize,Et+=1,yt>At&&(Ct=!0))}else if(Le==="current")for(let yt=xt+1;yt<ft.length;yt+=1)(Ye?ht[yt]+gt[yt]-ht[xt]<At:ht[yt]-ht[xt]<At)&&(Et+=1);else for(let yt=xt-1;yt>=0;yt-=1)ht[xt]-ht[yt]<At&&(Et+=1);return Et}update(){const Le=this;if(!Le||Le.destroyed)return;const{snapGrid:Ye,params:tt}=Le;tt.breakpoints&&Le.setBreakpoint(),[...Le.el.querySelectorAll('[loading="lazy"]')].forEach(ht=>{ht.complete&&processLazyPreloader(Le,ht)}),Le.updateSize(),Le.updateSlides(),Le.updateProgress(),Le.updateSlidesClasses();function nt(){const ht=Le.rtlTranslate?Le.translate*-1:Le.translate,gt=Math.min(Math.max(ht,Le.maxTranslate()),Le.minTranslate());Le.setTranslate(gt),Le.updateActiveIndex(),Le.updateSlidesClasses()}let ft;if(tt.freeMode&&tt.freeMode.enabled&&!tt.cssMode)nt(),tt.autoHeight&&Le.updateAutoHeight();else{if((tt.slidesPerView==="auto"||tt.slidesPerView>1)&&Le.isEnd&&!tt.centeredSlides){const ht=Le.virtual&&tt.virtual.enabled?Le.virtual.slides:Le.slides;ft=Le.slideTo(ht.length-1,0,!1,!0)}else ft=Le.slideTo(Le.activeIndex,0,!1,!0);ft||nt()}tt.watchOverflow&&Ye!==Le.snapGrid&&Le.checkOverflow(),Le.emit("update")}changeDirection(Le,Ye=!0){const tt=this,nt=tt.params.direction;return Le||(Le=nt==="horizontal"?"vertical":"horizontal"),Le===nt||Le!=="horizontal"&&Le!=="vertical"||(tt.el.classList.remove(`${tt.params.containerModifierClass}${nt}`),tt.el.classList.add(`${tt.params.containerModifierClass}${Le}`),tt.emitContainerClasses(),tt.params.direction=Le,tt.slides.forEach(ft=>{Le==="vertical"?ft.style.width="":ft.style.height=""}),tt.emit("changeDirection"),Ye&&tt.update()),tt}changeLanguageDirection(Le){const Ye=this;Ye.rtl&&Le==="rtl"||!Ye.rtl&&Le==="ltr"||(Ye.rtl=Le==="rtl",Ye.rtlTranslate=Ye.params.direction==="horizontal"&&Ye.rtl,Ye.rtl?(Ye.el.classList.add(`${Ye.params.containerModifierClass}rtl`),Ye.el.dir="rtl"):(Ye.el.classList.remove(`${Ye.params.containerModifierClass}rtl`),Ye.el.dir="ltr"),Ye.update())}mount(Le){const Ye=this;if(Ye.mounted)return!0;let tt=Le||Ye.params.el;if(typeof tt=="string"&&(tt=document.querySelector(tt)),!tt)return!1;tt.swiper=Ye,tt.shadowEl&&(Ye.isElement=!0);const nt=()=>`.${(Ye.params.wrapperClass||"").trim().split(" ").join(".")}`;let ht=tt&&tt.shadowRoot&&tt.shadowRoot.querySelector?tt.shadowRoot.querySelector(nt()):elementChildren(tt,nt())[0];return!ht&&Ye.params.createElements&&(ht=createElement("div",Ye.params.wrapperClass),tt.append(ht),elementChildren(tt,`.${Ye.params.slideClass}`).forEach(gt=>{ht.append(gt)})),Object.assign(Ye,{el:tt,wrapperEl:ht,slidesEl:Ye.isElement?tt:ht,mounted:!0,rtl:tt.dir.toLowerCase()==="rtl"||elementStyle(tt,"direction")==="rtl",rtlTranslate:Ye.params.direction==="horizontal"&&(tt.dir.toLowerCase()==="rtl"||elementStyle(tt,"direction")==="rtl"),wrongRTL:elementStyle(ht,"display")==="-webkit-box"}),!0}init(Le){const Ye=this;return Ye.initialized||Ye.mount(Le)===!1||(Ye.emit("beforeInit"),Ye.params.breakpoints&&Ye.setBreakpoint(),Ye.addClasses(),Ye.updateSize(),Ye.updateSlides(),Ye.params.watchOverflow&&Ye.checkOverflow(),Ye.params.grabCursor&&Ye.enabled&&Ye.setGrabCursor(),Ye.params.loop&&Ye.virtual&&Ye.params.virtual.enabled?Ye.slideTo(Ye.params.initialSlide+Ye.virtual.slidesBefore,0,Ye.params.runCallbacksOnInit,!1,!0):Ye.slideTo(Ye.params.initialSlide,0,Ye.params.runCallbacksOnInit,!1,!0),Ye.params.loop&&Ye.loopCreate(),Ye.attachEvents(),[...Ye.el.querySelectorAll('[loading="lazy"]')].forEach(nt=>{nt.complete?processLazyPreloader(Ye,nt):nt.addEventListener("load",ft=>{processLazyPreloader(Ye,ft.target)})}),preload(Ye),Ye.initialized=!0,preload(Ye),Ye.emit("init"),Ye.emit("afterInit")),Ye}destroy(Le=!0,Ye=!0){const tt=this,{params:nt,el:ft,wrapperEl:ht,slides:gt}=tt;return typeof tt.params>"u"||tt.destroyed||(tt.emit("beforeDestroy"),tt.initialized=!1,tt.detachEvents(),nt.loop&&tt.loopDestroy(),Ye&&(tt.removeClasses(),ft.removeAttribute("style"),ht.removeAttribute("style"),gt&>.length&>.forEach(At=>{At.classList.remove(nt.slideVisibleClass,nt.slideActiveClass,nt.slideNextClass,nt.slidePrevClass),At.removeAttribute("style"),At.removeAttribute("data-swiper-slide-index")})),tt.emit("destroy"),Object.keys(tt.eventsListeners).forEach(At=>{tt.off(At)}),Le!==!1&&(tt.el.swiper=null,deleteProps(tt)),tt.destroyed=!0),null}static extendDefaults(Le){extend$3(extendedDefaults,Le)}static get extendedDefaults(){return extendedDefaults}static get defaults(){return defaults}static installModule(Le){vo.prototype.__modules__||(vo.prototype.__modules__=[]);const Ye=vo.prototype.__modules__;typeof Le=="function"&&Ye.indexOf(Le)<0&&Ye.push(Le)}static use(Le){return Array.isArray(Le)?(Le.forEach(Ye=>vo.installModule(Ye)),vo):(vo.installModule(Le),vo)}};Object.keys(prototypes).forEach(Be=>{Object.keys(prototypes[Be]).forEach(Le=>{Swiper$1.prototype[Le]=prototypes[Be][Le]})}),Swiper$1.use([Resize,Observer]);function createElementIfNotDefined(Be,Le,Ye,tt){return Be.params.createElements&&Object.keys(tt).forEach(nt=>{if(!Ye[nt]&&Ye.auto===!0){let ft=elementChildren(Be.el,`.${tt[nt]}`)[0];ft||(ft=createElement("div",tt[nt]),ft.className=tt[nt],Be.el.append(ft)),Ye[nt]=ft,Le[nt]=ft}}),Ye}function classesToSelector(Be=""){return`.${Be.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Pagination({swiper:Be,extendParams:Le,on:Ye,emit:tt}){const nt="swiper-pagination";Le({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:wt=>wt,formatFractionTotal:wt=>wt,bulletClass:`${nt}-bullet`,bulletActiveClass:`${nt}-bullet-active`,modifierClass:`${nt}-`,currentClass:`${nt}-current`,totalClass:`${nt}-total`,hiddenClass:`${nt}-hidden`,progressbarFillClass:`${nt}-progressbar-fill`,progressbarOppositeClass:`${nt}-progressbar-opposite`,clickableClass:`${nt}-clickable`,lockClass:`${nt}-lock`,horizontalClass:`${nt}-horizontal`,verticalClass:`${nt}-vertical`,paginationDisabledClass:`${nt}-disabled`}}),Be.pagination={el:null,bullets:[]};let ft,ht=0;const gt=wt=>(Array.isArray(wt)||(wt=[wt].filter(Rt=>!!Rt)),wt);function At(){return!Be.params.pagination.el||!Be.pagination.el||Array.isArray(Be.pagination.el)&&Be.pagination.el.length===0}function xt(wt,Rt){const{bulletActiveClass:Tt}=Be.params.pagination;wt&&(wt=wt[`${Rt==="prev"?"previous":"next"}ElementSibling`],wt&&(wt.classList.add(`${Tt}-${Rt}`),wt=wt[`${Rt==="prev"?"previous":"next"}ElementSibling`],wt&&wt.classList.add(`${Tt}-${Rt}-${Rt}`)))}function Et(wt){const Rt=wt.target.closest(classesToSelector(Be.params.pagination.bulletClass));if(!Rt)return;wt.preventDefault();const Tt=elementIndex(Rt)*Be.params.slidesPerGroup;if(Be.params.loop){if(Be.realIndex===Tt)return;const Bt=Be.getSlideIndexByData(Tt),Dt=Be.getSlideIndexByData(Be.realIndex);Bt>Be.slides.length-Be.loopedSlides&&Be.loopFix({direction:Bt>Dt?"next":"prev",activeSlideIndex:Bt,slideTo:!1}),Be.slideToLoop(Tt)}else Be.slideTo(Tt)}function yt(){const wt=Be.rtl,Rt=Be.params.pagination;if(At())return;let Tt=Be.pagination.el;Tt=gt(Tt);let Bt,Dt;const Lt=Be.virtual&&Be.params.virtual.enabled?Be.virtual.slides.length:Be.slides.length,Nt=Be.params.loop?Math.ceil(Lt/Be.params.slidesPerGroup):Be.snapGrid.length;if(Be.params.loop?(Dt=Be.previousRealIndex||0,Bt=Be.params.slidesPerGroup>1?Math.floor(Be.realIndex/Be.params.slidesPerGroup):Be.realIndex):typeof Be.snapIndex<"u"?(Bt=Be.snapIndex,Dt=Be.previousSnapIndex):(Dt=Be.previousIndex||0,Bt=Be.activeIndex||0),Rt.type==="bullets"&&Be.pagination.bullets&&Be.pagination.bullets.length>0){const Pt=Be.pagination.bullets;let Wt,$t,Kt;if(Rt.dynamicBullets&&(ft=elementOuterSize(Pt[0],Be.isHorizontal()?"width":"height"),Tt.forEach(Vt=>{Vt.style[Be.isHorizontal()?"width":"height"]=`${ft*(Rt.dynamicMainBullets+4)}px`}),Rt.dynamicMainBullets>1&&Dt!==void 0&&(ht+=Bt-(Dt||0),ht>Rt.dynamicMainBullets-1?ht=Rt.dynamicMainBullets-1:ht<0&&(ht=0)),Wt=Math.max(Bt-ht,0),$t=Wt+(Math.min(Pt.length,Rt.dynamicMainBullets)-1),Kt=($t+Wt)/2),Pt.forEach(Vt=>{const Ut=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(_t=>`${Rt.bulletActiveClass}${_t}`)].map(_t=>typeof _t=="string"&&_t.includes(" ")?_t.split(" "):_t).flat();Vt.classList.remove(...Ut)}),Tt.length>1)Pt.forEach(Vt=>{const Ut=elementIndex(Vt);Ut===Bt?Vt.classList.add(...Rt.bulletActiveClass.split(" ")):Be.isElement&&Vt.setAttribute("part","bullet"),Rt.dynamicBullets&&(Ut>=Wt&&Ut<=$t&&Vt.classList.add(...`${Rt.bulletActiveClass}-main`.split(" ")),Ut===Wt&&xt(Vt,"prev"),Ut===$t&&xt(Vt,"next"))});else{const Vt=Pt[Bt];if(Vt&&Vt.classList.add(...Rt.bulletActiveClass.split(" ")),Be.isElement&&Pt.forEach((Ut,_t)=>{Ut.setAttribute("part",_t===Bt?"bullet-active":"bullet")}),Rt.dynamicBullets){const Ut=Pt[Wt],_t=Pt[$t];for(let Xt=Wt;Xt<=$t;Xt+=1)Pt[Xt]&&Pt[Xt].classList.add(...`${Rt.bulletActiveClass}-main`.split(" "));xt(Ut,"prev"),xt(_t,"next")}}if(Rt.dynamicBullets){const Vt=Math.min(Pt.length,Rt.dynamicMainBullets+4),Ut=(ft*Vt-ft)/2-Kt*ft,_t=wt?"right":"left";Pt.forEach(Xt=>{Xt.style[Be.isHorizontal()?_t:"top"]=`${Ut}px`})}}Tt.forEach((Pt,Wt)=>{if(Rt.type==="fraction"&&(Pt.querySelectorAll(classesToSelector(Rt.currentClass)).forEach($t=>{$t.textContent=Rt.formatFractionCurrent(Bt+1)}),Pt.querySelectorAll(classesToSelector(Rt.totalClass)).forEach($t=>{$t.textContent=Rt.formatFractionTotal(Nt)})),Rt.type==="progressbar"){let $t;Rt.progressbarOpposite?$t=Be.isHorizontal()?"vertical":"horizontal":$t=Be.isHorizontal()?"horizontal":"vertical";const Kt=(Bt+1)/Nt;let Vt=1,Ut=1;$t==="horizontal"?Vt=Kt:Ut=Kt,Pt.querySelectorAll(classesToSelector(Rt.progressbarFillClass)).forEach(_t=>{_t.style.transform=`translate3d(0,0,0) scaleX(${Vt}) scaleY(${Ut})`,_t.style.transitionDuration=`${Be.params.speed}ms`})}Rt.type==="custom"&&Rt.renderCustom?(Pt.innerHTML=Rt.renderCustom(Be,Bt+1,Nt),Wt===0&&tt("paginationRender",Pt)):(Wt===0&&tt("paginationRender",Pt),tt("paginationUpdate",Pt)),Be.params.watchOverflow&&Be.enabled&&Pt.classList[Be.isLocked?"add":"remove"](Rt.lockClass)})}function Ct(){const wt=Be.params.pagination;if(At())return;const Rt=Be.virtual&&Be.params.virtual.enabled?Be.virtual.slides.length:Be.slides.length;let Tt=Be.pagination.el;Tt=gt(Tt);let Bt="";if(wt.type==="bullets"){let Dt=Be.params.loop?Math.ceil(Rt/Be.params.slidesPerGroup):Be.snapGrid.length;Be.params.freeMode&&Be.params.freeMode.enabled&&Dt>Rt&&(Dt=Rt);for(let Lt=0;Lt<Dt;Lt+=1)wt.renderBullet?Bt+=wt.renderBullet.call(Be,Lt,wt.bulletClass):Bt+=`<${wt.bulletElement} ${Be.isElement?'part="bullet"':""} class="${wt.bulletClass}"></${wt.bulletElement}>`}wt.type==="fraction"&&(wt.renderFraction?Bt=wt.renderFraction.call(Be,wt.currentClass,wt.totalClass):Bt=`<span class="${wt.currentClass}"></span> / <span class="${wt.totalClass}"></span>`),wt.type==="progressbar"&&(wt.renderProgressbar?Bt=wt.renderProgressbar.call(Be,wt.progressbarFillClass):Bt=`<span class="${wt.progressbarFillClass}"></span>`),Be.pagination.bullets=[],Tt.forEach(Dt=>{wt.type!=="custom"&&(Dt.innerHTML=Bt||""),wt.type==="bullets"&&Be.pagination.bullets.push(...Dt.querySelectorAll(classesToSelector(wt.bulletClass)))}),wt.type!=="custom"&&tt("paginationRender",Tt[0])}function kt(){Be.params.pagination=createElementIfNotDefined(Be,Be.originalParams.pagination,Be.params.pagination,{el:"swiper-pagination"});const wt=Be.params.pagination;if(!wt.el)return;let Rt;typeof wt.el=="string"&&Be.isElement&&(Rt=Be.el.shadowRoot.querySelector(wt.el)),!Rt&&typeof wt.el=="string"&&(Rt=[...document.querySelectorAll(wt.el)]),Rt||(Rt=wt.el),!(!Rt||Rt.length===0)&&(Be.params.uniqueNavElements&&typeof wt.el=="string"&&Array.isArray(Rt)&&Rt.length>1&&(Rt=[...Be.el.querySelectorAll(wt.el)],Rt.length>1&&(Rt=Rt.filter(Tt=>elementParents(Tt,".swiper")[0]===Be.el)[0])),Array.isArray(Rt)&&Rt.length===1&&(Rt=Rt[0]),Object.assign(Be.pagination,{el:Rt}),Rt=gt(Rt),Rt.forEach(Tt=>{wt.type==="bullets"&&wt.clickable&&Tt.classList.add(wt.clickableClass),Tt.classList.add(wt.modifierClass+wt.type),Tt.classList.add(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass),wt.type==="bullets"&&wt.dynamicBullets&&(Tt.classList.add(`${wt.modifierClass}${wt.type}-dynamic`),ht=0,wt.dynamicMainBullets<1&&(wt.dynamicMainBullets=1)),wt.type==="progressbar"&&wt.progressbarOpposite&&Tt.classList.add(wt.progressbarOppositeClass),wt.clickable&&Tt.addEventListener("click",Et),Be.enabled||Tt.classList.add(wt.lockClass)}))}function vt(){const wt=Be.params.pagination;if(At())return;let Rt=Be.pagination.el;Rt&&(Rt=gt(Rt),Rt.forEach(Tt=>{Tt.classList.remove(wt.hiddenClass),Tt.classList.remove(wt.modifierClass+wt.type),Tt.classList.remove(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass),wt.clickable&&Tt.removeEventListener("click",Et)})),Be.pagination.bullets&&Be.pagination.bullets.forEach(Tt=>Tt.classList.remove(...wt.bulletActiveClass.split(" ")))}Ye("changeDirection",()=>{if(!Be.pagination||!Be.pagination.el)return;const wt=Be.params.pagination;let{el:Rt}=Be.pagination;Rt=gt(Rt),Rt.forEach(Tt=>{Tt.classList.remove(wt.horizontalClass,wt.verticalClass),Tt.classList.add(Be.isHorizontal()?wt.horizontalClass:wt.verticalClass)})}),Ye("init",()=>{Be.params.pagination.enabled===!1?It():(kt(),Ct(),yt())}),Ye("activeIndexChange",()=>{typeof Be.snapIndex>"u"&&yt()}),Ye("snapIndexChange",()=>{yt()}),Ye("snapGridLengthChange",()=>{Ct(),yt()}),Ye("destroy",()=>{vt()}),Ye("enable disable",()=>{let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList[Be.enabled?"remove":"add"](Be.params.pagination.lockClass)))}),Ye("lock unlock",()=>{yt()}),Ye("click",(wt,Rt)=>{const Tt=Rt.target;let{el:Bt}=Be.pagination;if(Array.isArray(Bt)||(Bt=[Bt].filter(Dt=>!!Dt)),Be.params.pagination.el&&Be.params.pagination.hideOnClick&&Bt&&Bt.length>0&&!Tt.classList.contains(Be.params.pagination.bulletClass)){if(Be.navigation&&(Be.navigation.nextEl&&Tt===Be.navigation.nextEl||Be.navigation.prevEl&&Tt===Be.navigation.prevEl))return;const Dt=Bt[0].classList.contains(Be.params.pagination.hiddenClass);tt(Dt===!0?"paginationShow":"paginationHide"),Bt.forEach(Lt=>Lt.classList.toggle(Be.params.pagination.hiddenClass))}});const bt=()=>{Be.el.classList.remove(Be.params.pagination.paginationDisabledClass);let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList.remove(Be.params.pagination.paginationDisabledClass))),kt(),Ct(),yt()},It=()=>{Be.el.classList.add(Be.params.pagination.paginationDisabledClass);let{el:wt}=Be.pagination;wt&&(wt=gt(wt),wt.forEach(Rt=>Rt.classList.add(Be.params.pagination.paginationDisabledClass))),vt()};Object.assign(Be.pagination,{enable:bt,disable:It,render:Ct,update:yt,init:kt,destroy:vt})}function isObject$1(Be){return typeof Be=="object"&&Be!==null&&Be.constructor&&Object.prototype.toString.call(Be).slice(8,-1)==="Object"}function extend$2(Be,Le){const Ye=["__proto__","constructor","prototype"];Object.keys(Le).filter(tt=>Ye.indexOf(tt)<0).forEach(tt=>{typeof Be[tt]>"u"?Be[tt]=Le[tt]:isObject$1(Le[tt])&&isObject$1(Be[tt])&&Object.keys(Le[tt]).length>0?Le[tt].__swiper__?Be[tt]=Le[tt]:extend$2(Be[tt],Le[tt]):Be[tt]=Le[tt]})}function needsNavigation(Be={}){return Be.navigation&&typeof Be.navigation.nextEl>"u"&&typeof Be.navigation.prevEl>"u"}function needsPagination(Be={}){return Be.pagination&&typeof Be.pagination.el>"u"}function needsScrollbar(Be={}){return Be.scrollbar&&typeof Be.scrollbar.el>"u"}function uniqueClasses(Be=""){const Le=Be.split(" ").map(tt=>tt.trim()).filter(tt=>!!tt),Ye=[];return Le.forEach(tt=>{Ye.indexOf(tt)<0&&Ye.push(tt)}),Ye.join(" ")}function wrapperClass(Be=""){return Be?Be.includes("swiper-wrapper")?Be:`swiper-wrapper ${Be}`:"swiper-wrapper"}const paramsList=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function getParams(Be={},Le=!0){const Ye={on:{}},tt={},nt={};extend$2(Ye,Swiper$1.defaults),extend$2(Ye,Swiper$1.extendedDefaults),Ye._emitClasses=!0,Ye.init=!1;const ft={},ht=paramsList.map(At=>At.replace(/_/,"")),gt=Object.assign({},Be);return Object.keys(gt).forEach(At=>{typeof Be[At]>"u"||(ht.indexOf(At)>=0?isObject$1(Be[At])?(Ye[At]={},nt[At]={},extend$2(Ye[At],Be[At]),extend$2(nt[At],Be[At])):(Ye[At]=Be[At],nt[At]=Be[At]):At.search(/on[A-Z]/)===0&&typeof Be[At]=="function"?Le?tt[`${At[2].toLowerCase()}${At.substr(3)}`]=Be[At]:Ye.on[`${At[2].toLowerCase()}${At.substr(3)}`]=Be[At]:ft[At]=Be[At])}),["navigation","pagination","scrollbar"].forEach(At=>{Ye[At]===!0&&(Ye[At]={}),Ye[At]===!1&&delete Ye[At]}),{params:Ye,passedParams:nt,rest:ft,events:tt}}function mountSwiper({el:Be,nextEl:Le,prevEl:Ye,paginationEl:tt,scrollbarEl:nt,swiper:ft},ht){needsNavigation(ht)&&Le&&Ye&&(ft.params.navigation.nextEl=Le,ft.originalParams.navigation.nextEl=Le,ft.params.navigation.prevEl=Ye,ft.originalParams.navigation.prevEl=Ye),needsPagination(ht)&&tt&&(ft.params.pagination.el=tt,ft.originalParams.pagination.el=tt),needsScrollbar(ht)&&nt&&(ft.params.scrollbar.el=nt,ft.originalParams.scrollbar.el=nt),ft.init(Be)}function getChangedParams(Be,Le,Ye,tt,nt){const ft=[];if(!Le)return ft;const ht=At=>{ft.indexOf(At)<0&&ft.push(At)};if(Ye&&tt){const At=tt.map(nt),xt=Ye.map(nt);At.join("")!==xt.join("")&&ht("children"),tt.length!==Ye.length&&ht("children")}return paramsList.filter(At=>At[0]==="_").map(At=>At.replace(/_/,"")).forEach(At=>{if(At in Be&&At in Le)if(isObject$1(Be[At])&&isObject$1(Le[At])){const xt=Object.keys(Be[At]),Et=Object.keys(Le[At]);xt.length!==Et.length?ht(At):(xt.forEach(yt=>{Be[At][yt]!==Le[At][yt]&&ht(At)}),Et.forEach(yt=>{Be[At][yt]!==Le[At][yt]&&ht(At)}))}else Be[At]!==Le[At]&&ht(At)}),ft}function isChildSwiperSlide(Be){return Be.type&&Be.type.displayName&&Be.type.displayName.includes("SwiperSlide")}function processChildren(Be){const Le=[];return React.Children.toArray(Be).forEach(Ye=>{isChildSwiperSlide(Ye)?Le.push(Ye):Ye.props&&Ye.props.children&&processChildren(Ye.props.children).forEach(tt=>Le.push(tt))}),Le}function getChildren(Be){const Le=[],Ye={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return React.Children.toArray(Be).forEach(tt=>{if(isChildSwiperSlide(tt))Le.push(tt);else if(tt.props&&tt.props.slot&&Ye[tt.props.slot])Ye[tt.props.slot].push(tt);else if(tt.props&&tt.props.children){const nt=processChildren(tt.props.children);nt.length>0?nt.forEach(ft=>Le.push(ft)):Ye["container-end"].push(tt)}else Ye["container-end"].push(tt)}),{slides:Le,slots:Ye}}function updateSwiper({swiper:Be,slides:Le,passedParams:Ye,changedParams:tt,nextEl:nt,prevEl:ft,scrollbarEl:ht,paginationEl:gt}){const At=tt.filter(Pt=>Pt!=="children"&&Pt!=="direction"&&Pt!=="wrapperClass"),{params:xt,pagination:Et,navigation:yt,scrollbar:Ct,virtual:kt,thumbs:vt}=Be;let bt,It,wt,Rt,Tt,Bt,Dt,Lt;tt.includes("thumbs")&&Ye.thumbs&&Ye.thumbs.swiper&&xt.thumbs&&!xt.thumbs.swiper&&(bt=!0),tt.includes("controller")&&Ye.controller&&Ye.controller.control&&xt.controller&&!xt.controller.control&&(It=!0),tt.includes("pagination")&&Ye.pagination&&(Ye.pagination.el||gt)&&(xt.pagination||xt.pagination===!1)&&Et&&!Et.el&&(wt=!0),tt.includes("scrollbar")&&Ye.scrollbar&&(Ye.scrollbar.el||ht)&&(xt.scrollbar||xt.scrollbar===!1)&&Ct&&!Ct.el&&(Rt=!0),tt.includes("navigation")&&Ye.navigation&&(Ye.navigation.prevEl||ft)&&(Ye.navigation.nextEl||nt)&&(xt.navigation||xt.navigation===!1)&&yt&&!yt.prevEl&&!yt.nextEl&&(Tt=!0);const Nt=Pt=>{Be[Pt]&&(Be[Pt].destroy(),Pt==="navigation"?(Be.isElement&&(Be[Pt].prevEl.remove(),Be[Pt].nextEl.remove()),xt[Pt].prevEl=void 0,xt[Pt].nextEl=void 0,Be[Pt].prevEl=void 0,Be[Pt].nextEl=void 0):(Be.isElement&&Be[Pt].el.remove(),xt[Pt].el=void 0,Be[Pt].el=void 0))};tt.includes("loop")&&Be.isElement&&(xt.loop&&!Ye.loop?Bt=!0:!xt.loop&&Ye.loop?Dt=!0:Lt=!0),At.forEach(Pt=>{if(isObject$1(xt[Pt])&&isObject$1(Ye[Pt]))extend$2(xt[Pt],Ye[Pt]),(Pt==="navigation"||Pt==="pagination"||Pt==="scrollbar")&&"enabled"in Ye[Pt]&&!Ye[Pt].enabled&&Nt(Pt);else{const Wt=Ye[Pt];(Wt===!0||Wt===!1)&&(Pt==="navigation"||Pt==="pagination"||Pt==="scrollbar")?Wt===!1&&Nt(Pt):xt[Pt]=Ye[Pt]}}),At.includes("controller")&&!It&&Be.controller&&Be.controller.control&&xt.controller&&xt.controller.control&&(Be.controller.control=xt.controller.control),tt.includes("children")&&Le&&kt&&xt.virtual.enabled&&(kt.slides=Le,kt.update(!0)),tt.includes("children")&&Le&&xt.loop&&(Lt=!0),bt&&vt.init()&&vt.update(!0),It&&(Be.controller.control=xt.controller.control),wt&&(Be.isElement&&(!gt||typeof gt=="string")&&(gt=document.createElement("div"),gt.classList.add("swiper-pagination"),Be.el.shadowEl.appendChild(gt)),gt&&(xt.pagination.el=gt),Et.init(),Et.render(),Et.update()),Rt&&(Be.isElement&&(!ht||typeof ht=="string")&&(ht=document.createElement("div"),ht.classList.add("swiper-scrollbar"),Be.el.shadowEl.appendChild(ht)),ht&&(xt.scrollbar.el=ht),Ct.init(),Ct.updateSize(),Ct.setTranslate()),Tt&&(Be.isElement&&((!nt||typeof nt=="string")&&(nt=document.createElement("div"),nt.classList.add("swiper-button-next"),Be.el.shadowEl.appendChild(nt)),(!ft||typeof ft=="string")&&(ft=document.createElement("div"),ft.classList.add("swiper-button-prev"),Be.el.shadowEl.appendChild(ft))),nt&&(xt.navigation.nextEl=nt),ft&&(xt.navigation.prevEl=ft),yt.init(),yt.update()),tt.includes("allowSlideNext")&&(Be.allowSlideNext=Ye.allowSlideNext),tt.includes("allowSlidePrev")&&(Be.allowSlidePrev=Ye.allowSlidePrev),tt.includes("direction")&&Be.changeDirection(Ye.direction,!1),(Bt||Lt)&&Be.loopDestroy(),(Dt||Lt)&&Be.loopCreate(),Be.update()}function renderVirtual(Be,Le,Ye){if(!Ye)return null;const tt=Et=>{let yt=Et;return Et<0?yt=Le.length+Et:yt>=Le.length&&(yt=yt-Le.length),yt},nt=Be.isHorizontal()?{[Be.rtlTranslate?"right":"left"]:`${Ye.offset}px`}:{top:`${Ye.offset}px`},{from:ft,to:ht}=Ye,gt=Be.params.loop?-Le.length:0,At=Be.params.loop?Le.length*2:Le.length,xt=[];for(let Et=gt;Et<At;Et+=1)Et>=ft&&Et<=ht&&xt.push(Le[tt(Et)]);return xt.map((Et,yt)=>React.cloneElement(Et,{swiper:Be,style:nt,key:`slide-${yt}`}))}const updateOnVirtualData=Be=>{!Be||Be.destroyed||!Be.params.virtual||Be.params.virtual&&!Be.params.virtual.enabled||(Be.updateSlides(),Be.updateProgress(),Be.updateSlidesClasses(),Be.parallax&&Be.params.parallax&&Be.params.parallax.enabled&&Be.parallax.setTranslate())};function useIsomorphicLayoutEffect(Be,Le){return typeof window>"u"?React.useEffect(Be,Le):React.useLayoutEffect(Be,Le)}const SwiperSlideContext=React.createContext(null),SwiperContext=React.createContext(null);function _extends$3(){return _extends$3=Object.assign?Object.assign.bind():function(Be){for(var Le=1;Le<arguments.length;Le++){var Ye=arguments[Le];for(var tt in Ye)Object.prototype.hasOwnProperty.call(Ye,tt)&&(Be[tt]=Ye[tt])}return Be},_extends$3.apply(this,arguments)}const Swiper=React.forwardRef(function(Be,Le){let{className:Ye,tag:tt="div",wrapperTag:nt="div",children:ft,onSwiper:ht,...gt}=Be===void 0?{}:Be,At=!1;const[xt,Et]=React.useState("swiper"),[yt,Ct]=React.useState(null),[kt,vt]=React.useState(!1),bt=React.useRef(!1),It=React.useRef(null),wt=React.useRef(null),Rt=React.useRef(null),Tt=React.useRef(null),Bt=React.useRef(null),Dt=React.useRef(null),Lt=React.useRef(null),Nt=React.useRef(null),{params:Pt,passedParams:Wt,rest:$t,events:Kt}=getParams(gt),{slides:Vt,slots:Ut}=getChildren(ft),_t=()=>{vt(!kt)};Object.assign(Pt.on,{_containerClasses(qt,Gt){Et(Gt)}});const Xt=()=>{Object.assign(Pt.on,Kt),At=!0;const qt={...Pt};if(delete qt.wrapperClass,wt.current=new Swiper$1(qt),wt.current.virtual&&wt.current.params.virtual.enabled){wt.current.virtual.slides=Vt;const Gt={cache:!1,slides:Vt,renderExternal:Ct,renderExternalUpdate:!1};extend$2(wt.current.params.virtual,Gt),extend$2(wt.current.originalParams.virtual,Gt)}};It.current||Xt(),wt.current&&wt.current.on("_beforeBreakpoint",_t);const Qt=()=>{At||!Kt||!wt.current||Object.keys(Kt).forEach(qt=>{wt.current.on(qt,Kt[qt])})},jt=()=>{!Kt||!wt.current||Object.keys(Kt).forEach(qt=>{wt.current.off(qt,Kt[qt])})};React.useEffect(()=>()=>{wt.current&&wt.current.off("_beforeBreakpoint",_t)}),React.useEffect(()=>{!bt.current&&wt.current&&(wt.current.emitSlidesClasses(),bt.current=!0)}),useIsomorphicLayoutEffect(()=>{if(Le&&(Le.current=It.current),!!It.current)return wt.current.destroyed&&Xt(),mountSwiper({el:It.current,nextEl:Bt.current,prevEl:Dt.current,paginationEl:Lt.current,scrollbarEl:Nt.current,swiper:wt.current},Pt),ht&&ht(wt.current),()=>{wt.current&&!wt.current.destroyed&&wt.current.destroy(!0,!1)}},[]),useIsomorphicLayoutEffect(()=>{Qt();const qt=getChangedParams(Wt,Rt.current,Vt,Tt.current,Gt=>Gt.key);return Rt.current=Wt,Tt.current=Vt,qt.length&&wt.current&&!wt.current.destroyed&&updateSwiper({swiper:wt.current,slides:Vt,passedParams:Wt,changedParams:qt,nextEl:Bt.current,prevEl:Dt.current,scrollbarEl:Nt.current,paginationEl:Lt.current}),()=>{jt()}}),useIsomorphicLayoutEffect(()=>{updateOnVirtualData(wt.current)},[yt]);function zt(){return Pt.virtual?renderVirtual(wt.current,Vt,yt):Vt.map((qt,Gt)=>React.cloneElement(qt,{swiper:wt.current,swiperSlideIndex:Gt}))}return React.createElement(tt,_extends$3({ref:It,className:uniqueClasses(`${xt}${Ye?` ${Ye}`:""}`)},$t),React.createElement(SwiperContext.Provider,{value:wt.current},Ut["container-start"],React.createElement(nt,{className:wrapperClass(Pt.wrapperClass)},Ut["wrapper-start"],zt(),Ut["wrapper-end"]),needsNavigation(Pt)&&React.createElement(React.Fragment,null,React.createElement("div",{ref:Dt,className:"swiper-button-prev"}),React.createElement("div",{ref:Bt,className:"swiper-button-next"})),needsScrollbar(Pt)&&React.createElement("div",{ref:Nt,className:"swiper-scrollbar"}),needsPagination(Pt)&&React.createElement("div",{ref:Lt,className:"swiper-pagination"}),Ut["container-end"]))});Swiper.displayName="Swiper";function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(Be){for(var Le=1;Le<arguments.length;Le++){var Ye=arguments[Le];for(var tt in Ye)Object.prototype.hasOwnProperty.call(Ye,tt)&&(Be[tt]=Ye[tt])}return Be},_extends$2.apply(this,arguments)}const SwiperSlide=React.forwardRef(function(Be,Le){let{tag:Ye="div",children:tt,className:nt="",swiper:ft,zoom:ht,lazy:gt,virtualIndex:At,swiperSlideIndex:xt,...Et}=Be===void 0?{}:Be;const yt=React.useRef(null),[Ct,kt]=React.useState("swiper-slide"),[vt,bt]=React.useState(!1);function It(Bt,Dt,Lt){Dt===yt.current&&kt(Lt)}useIsomorphicLayoutEffect(()=>{if(typeof xt<"u"&&(yt.current.swiperSlideIndex=xt),Le&&(Le.current=yt.current),!(!yt.current||!ft)){if(ft.destroyed){Ct!=="swiper-slide"&&kt("swiper-slide");return}return ft.on("_slideClass",It),()=>{ft&&ft.off("_slideClass",It)}}}),useIsomorphicLayoutEffect(()=>{ft&&yt.current&&!ft.destroyed&&kt(ft.getSlideClasses(yt.current))},[ft]);const wt={isActive:Ct.indexOf("swiper-slide-active")>=0,isVisible:Ct.indexOf("swiper-slide-visible")>=0,isPrev:Ct.indexOf("swiper-slide-prev")>=0,isNext:Ct.indexOf("swiper-slide-next")>=0},Rt=()=>typeof tt=="function"?tt(wt):tt,Tt=()=>{bt(!0)};return React.createElement(Ye,_extends$2({ref:yt,className:uniqueClasses(`${Ct}${nt?` ${nt}`:""}`),"data-swiper-slide-index":At,onLoad:Tt},Et),ht&&React.createElement(SwiperSlideContext.Provider,{value:wt},React.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof ht=="number"?ht:void 0},Rt(),gt&&!vt&&React.createElement("div",{className:"swiper-lazy-preloader"}))),!ht&&React.createElement(SwiperSlideContext.Provider,{value:wt},Rt(),gt&&!vt&&React.createElement("div",{className:"swiper-lazy-preloader"})))});SwiperSlide.displayName="SwiperSlide";const step1="data:image/svg+xml,%3csvg%20width='74'%20height='44'%20viewBox='0%200%2074%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8319_10898)'%3e%3cpath%20d='M0.227051%204.7727C0.227051%202.56356%202.01791%200.772705%204.22705%200.772705L70.147%200.772705C72.3562%200.772705%2074.147%202.56357%2074.147%204.77271V39.3327C74.147%2041.5419%2072.3562%2043.3327%2070.147%2043.3327L4.22706%2043.3327C2.01792%2043.3327%200.227051%2041.5418%200.227051%2039.3327L0.227051%204.7727Z'%20fill='white'/%3e%3cpath%20d='M0.727051%204.7727C0.727051%202.8397%202.29405%201.27271%204.22705%201.27271L70.147%201.27271C72.08%201.27271%2073.647%202.83971%2073.647%204.77271V39.3327C73.647%2041.2657%2072.08%2042.8327%2070.147%2042.8327L4.22706%2042.8327C2.29406%2042.8327%200.727051%2041.2657%200.727051%2039.3327L0.727051%204.7727Z'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.36742%2010.0223C4.36752%209.86768%204.49285%209.74243%204.64742%209.74243L69.8559%209.74243C70.0106%209.74243%2070.1359%209.86779%2070.1359%2010.0224V10.8544C70.1359%2011.009%2070.0105%2011.1344%2069.8559%2011.1344L4.64688%2011.1344C4.49217%2011.1344%204.36678%2011.0089%204.36688%2010.8542L4.36742%2010.0223Z'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='17.0227'%20width='17.08'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='22.342'%20width='17.08'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='27.6624'%20width='23.8'%20height='2.8'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='26.7661'%20y='32.9827'%20width='7.56'%20height='2.52'%20rx='0.28'%20fill='%23E9E9EB'/%3e%3crect%20x='4.3667'%20y='3.86255'%20width='31.36'%20height='3.08'%20rx='0.28'%20fill='%23D7D7D7'/%3e%3crect%20x='63.7876'%20y='3.70435'%20width='6.44'%20height='3.36'%20rx='0.28'%20fill='%23DBB107'/%3e%3cg%20clip-path='url(%23clip1_8319_10898)'%3e%3cg%20clip-path='url(%23clip2_8319_10898)'%3e%3crect%20x='4.30713'%20y='13.9685'%20width='19.5599'%20height='23.4718'%20rx='1.4'%20fill='%23C9C9C9'/%3e%3cpath%20d='M24.2206%2034.0174C25.1192%2035.6252%2025.6364%2039.3334%2025.6364%2039.3334H2.98291C2.98291%2039.3334%203.50035%2035.6248%204.39876%2034.0174C5.29716%2032.4099%2010.7724%2030.919%2010.7724%2030.919C11.2573%2031.7951%2012.6809%2032.5943%2014.138%2032.63C15.7193%2032.6688%2017.3401%2031.8695%2017.8443%2030.9185C17.8443%2030.9185%2023.322%2032.4095%2024.2206%2034.0174Z'%20fill='white'/%3e%3cpath%20d='M11.6467%2029.6414V29.6773C11.6368%2030.4351%2010.9989%2031.0049%209.73291%2031.3868C11.2584%2032.495%2012.7839%2033.3815%2014.3094%2033.3815C15.8349%2033.3815%2017.3604%2032.495%2018.8859%2031.3868C17.6285%2031.0045%2016.9905%2030.4338%2016.9721%2029.6747C16.9721%2029.3866%2016.9731%2026.5799%2016.9744%2026.2918C17.0653%2026.3046%2017.0576%2026.2965%2016.9744%2026.2734C16.9769%2025.3243%2016.981%2026.5667%2016.9866%2025.2697C16.9923%2023.9727%2011.5586%2022.8124%2011.6384%2026.3737C11.6395%2026.7368%2011.6416%2029.2302%2011.6467%2029.6414Z'%20fill='url(%23paint0_linear_8319_10898)'/%3e%3cpath%20d='M24.2206%2034.0174C25.1192%2035.6252%2025.6364%2039.3334%2025.6364%2039.3334H2.98291C2.98291%2039.3334%203.50035%2035.6248%204.39876%2034.0174C5.29716%2032.4099%2010.7724%2030.919%2010.7724%2030.919C10.7724%2031.8934%2012.6611%2033.2985%2014.138%2033.3236C16.1975%2033.3236%2017.8443%2031.8934%2017.8443%2030.9185C17.8443%2030.9185%2023.322%2032.4095%2024.2206%2034.0174Z'%20fill='%23007AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18.0534%2026.0701C17.321%2028.1537%2015.6774%2029.617%2014.3206%2029.617C12.8015%2029.617%2011.1821%2028.0835%2010.5166%2025.9209C10.468%2025.9369%2010.4115%2025.9491%2010.3463%2025.9574C9.97084%2026.0049%209.72284%2024.9825%209.63634%2024.6008C9.62277%2024.5409%209.60695%2024.4836%209.59135%2024.427C9.50748%2024.1231%209.43001%2023.8423%209.74386%2023.3188C9.89353%2023.0691%2010.0618%2023.0312%2010.211%2023.0849C10.2713%2020.4793%2010.7708%2017.947%2014.3206%2017.947C17.9246%2017.947%2018.3845%2020.5007%2018.4327%2023.1917C18.5347%2023.2095%2018.6385%2023.2834%2018.7338%2023.4457C19.0427%2023.9722%2018.9625%2024.2522%2018.8758%2024.5554C18.8597%2024.6118%2018.8433%2024.669%2018.8292%2024.7287C18.7391%2025.1095%2018.4814%2026.1296%2018.1064%2026.0785C18.0881%2026.076%2018.0704%2026.0732%2018.0534%2026.0701Z'%20fill='url(%23paint1_linear_8319_10898)'/%3e%3c/g%3e%3c/g%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip3_8319_10898)'%3e%3cpath%20d='M65.1692%2034.8527V34.8672C65.1652%2035.1737%2064.9071%2035.4042%2064.395%2035.5587C65.0121%2036.007%2065.6292%2036.3656%2066.2463%2036.3656C66.8633%2036.3656%2067.4804%2036.007%2068.0975%2035.5587C67.5889%2035.4041%2067.3308%2035.1732%2067.3233%2034.8661C67.3233%2034.7496%2067.3237%2033.6143%2067.3243%2033.4977C67.3611%2033.5029%2067.3579%2033.4996%2067.3243%2033.4903C67.3253%2033.1064%2067.3269%2033.6089%2067.3292%2033.0843C67.3315%2032.5596%2065.1335%2032.0902%2065.1658%2033.5308C65.1662%2033.6777%2065.1671%2034.6863%2065.1692%2034.8527Z'%20fill='url(%23paint2_linear_8319_10898)'/%3e%3cpath%20d='M70.2564%2036.6232C70.6199%2037.2736%2070.8292%2038.7736%2070.8292%2038.7736H61.6655C61.6655%2038.7736%2061.8748%2037.2734%2062.2383%2036.6232C62.6017%2035.973%2064.8164%2035.3699%2064.8164%2035.3699C64.8164%2035.764%2065.5805%2036.3324%2066.1779%2036.3425C67.011%2036.3425%2067.6771%2035.764%2067.6771%2035.3696C67.6771%2035.3696%2069.8929%2035.9728%2070.2564%2036.6232Z'%20fill='%23C6C6C6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M67.6813%2033.4161C67.3844%2034.2908%2066.7176%2034.9051%2066.1672%2034.9051C65.554%2034.9051%2064.9005%2034.2676%2064.6282%2033.3668C64.6038%2033.3802%2064.572%2033.3902%2064.5316%2033.3967C64.3821%2033.4206%2064.2696%2033.0151%2064.23%2032.8636C64.2238%2032.8399%2064.2167%2032.8171%2064.2097%2032.7947C64.1722%2032.6743%2064.1376%2032.5631%2064.2562%2032.3497C64.3318%2032.2137%2064.4256%2032.2284%2064.498%2032.2804C64.5053%2031.1457%2064.6147%2029.991%2066.1672%2030.0082C67.8446%2030.0082%2067.841%2031.1465%2067.8373%2032.313C67.8372%2032.3238%2067.8372%2032.3347%2067.8372%2032.3455C67.9174%2032.2842%2068.0295%2032.254%2068.1018%2032.4149C68.2019%2032.6376%2068.158%2032.7455%2068.1104%2032.8623C68.1016%2032.8841%2068.0926%2032.9061%2068.0844%2032.9292C68.0321%2033.0768%2067.8857%2033.4713%2067.7388%2033.4349C67.717%2033.4295%2067.6979%2033.4232%2067.6813%2033.4161Z'%20fill='url(%23paint3_linear_8319_10898)'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8319_10898'%20x1='13.9035'%20y1='26.5902'%20x2='13.9035'%20y2='30.9977'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B1B1B1'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8319_10898'%20x1='10.71'%20y1='23.7275'%20x2='16.5256'%20y2='23.7495'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8319_10898'%20x1='66.0821'%20y1='33.6184'%20x2='66.0821'%20y2='35.4013'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D6D4D4'/%3e%3cstop%20offset='1'%20stop-color='%23E4E4E4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8319_10898'%20x1='64.4093'%20y1='33.0791'%20x2='66.3543'%20y2='33.0791'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CECECE'/%3e%3cstop%20offset='1'%20stop-color='%23E7E7E7'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_8319_10898'%3e%3crect%20x='0.227051'%20y='0.772461'%20width='73.7729'%20height='42.455'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10898'%3e%3crect%20x='4.3667'%20y='13.9426'%20width='19.32'%20height='23.52'%20rx='1.04397'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10898'%3e%3crect%20width='24.9189'%20height='24.9189'%20fill='white'%20transform='translate(1.8501%2013.9429)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10898'%3e%3crect%20width='10.08'%20height='10.08'%20fill='white'%20transform='translate(61.2065%2028.5022)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",step2="data:image/svg+xml,%3csvg%20width='73'%20height='42'%20viewBox='0%200%2073%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20clip-path='url(%23clip0_8319_10931)'%3e%3cg%20clip-path='url(%23clip1_8319_10931)'%3e%3cpath%20d='M-49.9917%20-40.2858C-49.9917%20-45.6521%20-45.6415%20-50.0023%20-40.2752%20-50.0023L117.375%20-50.0023C122.742%20-50.0023%20127.092%20-45.6521%20127.092%20-40.2858V42.2813C127.092%2047.6476%20122.742%2051.9979%20117.375%2051.9979L-40.2752%2051.9979C-45.6415%2051.9979%20-49.9917%2047.6476%20-49.9917%2042.2813L-49.9917%20-40.2858Z'%20fill='white'/%3e%3cpath%20d='M-48.7771%20-40.2858C-48.7771%20-44.9813%20-44.9707%20-48.7878%20-40.2752%20-48.7878L117.375%20-48.7878C122.071%20-48.7878%20125.877%20-44.9813%20125.877%20-40.2858V42.2813C125.877%2046.9768%20122.071%2050.7833%20117.375%2050.7833L-40.2752%2050.7833C-44.9707%2050.7833%20-48.7771%2046.9768%20-48.7771%2042.2813L-48.7771%20-40.2858Z'%20stroke='black'%20stroke-opacity='0.1'%20stroke-width='2.42913'/%3e%3crect%20opacity='0.25'%20x='-39.3672'%20y='-43.6262'%20width='112.625'%20height='81.4585'%20fill='url(%23pattern0_8319_10931)'/%3e%3cpath%20d='M15.5587%2020.4843H16.9621C17.2785%2020.4843%2017.5198%2020.5085%2017.6858%2020.5569C17.9089%2020.6227%2018.1%2020.7394%2018.2591%2020.9071C18.4182%2021.0749%2018.5392%2021.2807%2018.6222%2021.5245C18.7052%2021.7666%2018.7467%2022.0658%2018.7467%2022.422C18.7467%2022.735%2018.7078%2023.0048%2018.63%2023.2314C18.5349%2023.508%2018.3991%2023.732%2018.2228%2023.9032C18.0896%2024.0329%2017.9097%2024.1341%2017.6832%2024.2067C17.5137%2024.2603%2017.2872%2024.2871%2017.0036%2024.2871H15.5587V20.4843ZM16.3265%2021.1276V23.6464H16.8998C17.1143%2023.6464%2017.269%2023.6343%2017.3641%2023.6101C17.4887%2023.5789%2017.5915%2023.5262%2017.6728%2023.4518C17.7558%2023.3775%2017.8233%2023.2556%2017.8752%2023.0861C17.927%2022.9149%2017.953%2022.6823%2017.953%2022.3883C17.953%2022.0943%2017.927%2021.8686%2017.8752%2021.7113C17.8233%2021.5539%2017.7506%2021.4311%2017.6573%2021.3429C17.5639%2021.2547%2017.4454%2021.1951%2017.3019%2021.1639C17.1947%2021.1397%2016.9846%2021.1276%2016.6715%2021.1276H16.3265ZM19.2448%2022.4091C19.2448%2022.0217%2019.3027%2021.6966%2019.4186%2021.4337C19.5051%2021.24%2019.6226%2021.0662%2019.7714%2020.9123C19.9218%2020.7584%2020.0861%2020.6443%2020.2642%2020.5699C20.5011%2020.4696%2020.7744%2020.4195%2021.0839%2020.4195C21.6442%2020.4195%2022.0921%2020.5933%2022.4276%2020.9409C22.7648%2021.2884%2022.9335%2021.7718%2022.9335%2022.3909C22.9335%2023.0048%2022.7666%2023.4856%2022.4328%2023.8332C22.0991%2024.179%2021.6529%2024.352%2021.0943%2024.352C20.5288%2024.352%2020.0792%2024.1799%2019.7454%2023.8358C19.4117%2023.4899%2019.2448%2023.0143%2019.2448%2022.4091ZM20.036%2022.3831C20.036%2022.8137%2020.1354%2023.1406%2020.3343%2023.3636C20.5331%2023.585%2020.7856%2023.6957%2021.0917%2023.6957C21.3978%2023.6957%2021.6486%2023.5859%2021.844%2023.3662C22.0411%2023.1449%2022.1397%2022.8137%2022.1397%2022.3727C22.1397%2021.9369%2022.0437%2021.6118%2021.8518%2021.3974C21.6615%2021.183%2021.4082%2021.0757%2021.0917%2021.0757C20.7752%2021.0757%2020.5202%2021.1847%2020.3265%2021.4026C20.1328%2021.6187%2020.036%2021.9456%2020.036%2022.3831ZM23.5379%2020.4843H25.0579C25.3588%2020.4843%2025.5828%2020.4973%2025.7298%2020.5232C25.8785%2020.5474%2026.0108%2020.5993%2026.1267%2020.6789C26.2443%2020.7584%2026.342%2020.8648%2026.4198%2020.9979C26.4976%2021.1293%2026.5365%2021.2772%2026.5365%2021.4415C26.5365%2021.6196%2026.4881%2021.783%2026.3913%2021.9318C26.2961%2022.0805%2026.1664%2022.192%2026.0022%2022.2664C26.2339%2022.3338%2026.412%2022.4488%2026.5365%2022.6114C26.661%2022.7739%2026.7233%2022.965%2026.7233%2023.1847C26.7233%2023.3576%2026.6826%2023.5262%2026.6014%2023.6905C26.5218%2023.853%2026.412%2023.9836%2026.2719%2024.0822C26.1336%2024.179%2025.9624%2024.2387%2025.7583%2024.2612C25.6303%2024.275%2025.3217%2024.2837%2024.8323%2024.2871H23.5379V20.4843ZM24.3057%2021.1172V21.9966H24.8089C25.1081%2021.9966%2025.294%2021.9923%2025.3666%2021.9836C25.4981%2021.9681%2025.6009%2021.9231%2025.6753%2021.8488C25.7514%2021.7727%2025.7894%2021.6732%2025.7894%2021.5504C25.7894%2021.4328%2025.7566%2021.3377%2025.6909%2021.2651C25.6269%2021.1907%2025.5309%2021.1458%2025.4029%2021.1302C25.3268%2021.1216%2025.1081%2021.1172%2024.7467%2021.1172H24.3057ZM24.3057%2022.6295V23.6464H25.0164C25.2931%2023.6464%2025.4687%2023.6386%2025.543%2023.623C25.6572%2023.6023%2025.7497%2023.5521%2025.8206%2023.4726C25.8932%2023.3913%2025.9295%2023.2832%2025.9295%2023.1483C25.9295%2023.0342%2025.9019%2022.9374%2025.8465%2022.8578C25.7912%2022.7783%2025.7108%2022.7203%2025.6053%2022.684C25.5015%2022.6477%2025.275%2022.6295%2024.9256%2022.6295H24.3057ZM29.9243%2020.4687C30.2926%2020.4687%2030.5806%2020.6002%2030.7881%2020.863C31.0354%2021.1743%2031.159%2021.6905%2031.159%2022.4116C31.159%2023.1311%2031.0345%2023.6481%2030.7855%2023.9629C30.5797%2024.2223%2030.2926%2024.352%2029.9243%2024.352C29.5542%2024.352%2029.2559%2024.2102%2029.0293%2023.9265C28.8028%2023.6412%2028.6895%2023.1336%2028.6895%2022.4039C28.6895%2021.6879%2028.814%2021.1726%2029.0631%2020.8578C29.2689%2020.5984%2029.5559%2020.4687%2029.9243%2020.4687ZM29.9243%2021.0731C29.8361%2021.0731%2029.7574%2021.1017%2029.6882%2021.1587C29.6191%2021.2141%2029.5654%2021.3144%2029.5274%2021.4597C29.4772%2021.6481%2029.4522%2021.9655%2029.4522%2022.4116C29.4522%2022.8578%2029.4747%2023.1648%2029.5196%2023.3325C29.5646%2023.4985%2029.6208%2023.6092%2029.6882%2023.6645C29.7574%2023.7199%2029.8361%2023.7476%2029.9243%2023.7476C30.0125%2023.7476%2030.0912%2023.7199%2030.1603%2023.6645C30.2295%2023.6075%2030.2831%2023.5063%2030.3212%2023.3611C30.3713%2023.1743%2030.3964%2022.8578%2030.3964%2022.4116C30.3964%2021.9655%2030.3739%2021.6594%2030.3289%2021.4934C30.284%2021.3256%2030.2269%2021.2141%2030.1577%2021.1587C30.0903%2021.1017%2030.0125%2021.0731%2029.9243%2021.0731ZM32.2744%2022.2353C32.0859%2022.1557%2031.9485%2022.0468%2031.862%2021.9084C31.7773%2021.7683%2031.7349%2021.6153%2031.7349%2021.4493C31.7349%2021.1657%2031.8335%2020.9313%2032.0306%2020.7463C32.2295%2020.5613%2032.5114%2020.4687%2032.8762%2020.4687C33.2377%2020.4687%2033.5178%2020.5613%2033.7167%2020.7463C33.9173%2020.9313%2034.0176%2021.1657%2034.0176%2021.4493C34.0176%2021.6257%2033.9718%2021.783%2033.8801%2021.9214C33.7885%2022.058%2033.6596%2022.1626%2033.4936%2022.2353C33.7046%2022.32%2033.8646%2022.4436%2033.9735%2022.6062C34.0842%2022.7688%2034.1395%2022.9564%2034.1395%2023.1691C34.1395%2023.5202%2034.0271%2023.8055%2033.8023%2024.0251C33.5792%2024.2447%2033.2818%2024.3546%2032.91%2024.3546C32.5641%2024.3546%2032.2762%2024.2638%2032.0462%2024.0822C31.7747%2023.8677%2031.6389%2023.5738%2031.6389%2023.2002C31.6389%2022.9944%2031.6899%2022.8059%2031.792%2022.6347C31.894%2022.4618%2032.0548%2022.3286%2032.2744%2022.2353ZM32.4249%2021.5012C32.4249%2021.6464%2032.4655%2021.7597%2032.5468%2021.841C32.6298%2021.9222%2032.7396%2021.9629%2032.8762%2021.9629C33.0146%2021.9629%2033.1253%2021.9222%2033.2083%2021.841C33.2913%2021.758%2033.3328%2021.6438%2033.3328%2021.4986C33.3328%2021.3619%2033.2913%2021.253%2033.2083%2021.1717C33.127%2021.0887%2033.0189%2021.0472%2032.884%2021.0472C32.744%2021.0472%2032.6324%2021.0887%2032.5494%2021.1717C32.4664%2021.2547%2032.4249%2021.3645%2032.4249%2021.5012ZM32.3575%2023.1302C32.3575%2023.3308%2032.4085%2023.4873%2032.5105%2023.5997C32.6143%2023.7121%2032.7431%2023.7683%2032.897%2023.7683C33.0475%2023.7683%2033.172%2023.7147%2033.2705%2023.6075C33.3691%2023.4985%2033.4184%2023.342%2033.4184%2023.138C33.4184%2022.9598%2033.3682%2022.8172%2033.2679%2022.71C33.1676%2022.601%2033.0405%2022.5465%2032.8866%2022.5465C32.7085%2022.5465%2032.5753%2022.6079%2032.4872%2022.7307C32.4007%2022.8535%2032.3575%2022.9867%2032.3575%2023.1302ZM34.373%2024.352L35.3146%2020.4195H35.8619L34.9099%2024.352H34.373ZM36.0591%2023.278L36.7647%2023.1924C36.7871%2023.3723%2036.8477%2023.5098%2036.9462%2023.6049C37.0448%2023.7%2037.1641%2023.7476%2037.3042%2023.7476C37.4547%2023.7476%2037.5809%2023.6905%2037.6829%2023.5764C37.7867%2023.4622%2037.8386%2023.3083%2037.8386%2023.1146C37.8386%2022.9313%2037.7893%2022.786%2037.6907%2022.6788C37.5921%2022.5716%2037.472%2022.518%2037.3301%2022.518C37.2368%2022.518%2037.1252%2022.5362%2036.9955%2022.5725L37.0759%2021.9785C37.2731%2021.9836%2037.4235%2021.9413%2037.5273%2021.8513C37.631%2021.7597%2037.6829%2021.6386%2037.6829%2021.4882C37.6829%2021.3602%2037.6449%2021.2582%2037.5688%2021.1821C37.4927%2021.106%2037.3915%2021.068%2037.2653%2021.068C37.1408%2021.068%2037.0344%2021.1112%2036.9462%2021.1977C36.858%2021.2841%2036.8044%2021.4104%2036.7854%2021.5764L36.1136%2021.4622C36.1603%2021.2322%2036.2303%2021.0489%2036.3237%2020.9123C36.4188%2020.774%2036.5502%2020.6659%2036.718%2020.5881C36.8874%2020.5085%2037.0768%2020.4687%2037.286%2020.4687C37.644%2020.4687%2037.9311%2020.5829%2038.1473%2020.8112C38.3254%2020.9979%2038.4144%2021.2089%2038.4144%2021.4441C38.4144%2021.7778%2038.232%2022.0442%2037.8671%2022.243C38.085%2022.2897%2038.2588%2022.3944%2038.3885%2022.5569C38.5199%2022.7195%2038.5856%2022.9157%2038.5856%2023.1458C38.5856%2023.4795%2038.4637%2023.764%2038.2199%2023.9992C37.9761%2024.2344%2037.6726%2024.352%2037.3094%2024.352C36.9653%2024.352%2036.6799%2024.2534%2036.4534%2024.0562C36.2268%2023.8574%2036.0954%2023.598%2036.0591%2023.278ZM40.9073%2024.2871H40.1784V21.5401C39.912%2021.7891%2039.5982%2021.9733%2039.2367%2022.0926V21.4311C39.427%2021.3689%2039.6336%2021.2513%2039.8567%2021.0783C40.0798%2020.9037%2040.2328%2020.7005%2040.3158%2020.4687H40.9073V24.2871ZM41.7659%2024.352L42.7075%2020.4195H43.2548L42.3028%2024.352H41.7659ZM45.343%2024.2871H44.6141V21.5401C44.3478%2021.7891%2044.0339%2021.9733%2043.6725%2022.0926V21.4311C43.8627%2021.3689%2044.0694%2021.2513%2044.2924%2021.0783C44.5155%2020.9037%2044.6686%2020.7005%2044.7516%2020.4687H45.343V24.2871ZM46.4506%2023.4077L47.1562%2023.3299C47.1735%2023.4735%2047.2185%2023.5798%2047.2911%2023.649C47.3637%2023.7182%2047.4597%2023.7527%2047.579%2023.7527C47.7295%2023.7527%2047.8575%2023.6836%2047.9629%2023.5452C48.0684%2023.4069%2048.1359%2023.1198%2048.1653%2022.684C47.982%2022.8967%2047.7528%2023.0031%2047.4779%2023.0031C47.1787%2023.0031%2046.9202%2022.8881%2046.7023%2022.6581C46.4861%2022.4263%2046.378%2022.1254%2046.378%2021.7554C46.378%2021.3697%2046.4921%2021.0593%2046.7204%2020.8241C46.9504%2020.5872%2047.2427%2020.4687%2047.5972%2020.4687C47.9828%2020.4687%2048.2993%2020.6183%2048.5466%2020.9175C48.7939%2021.215%2048.9175%2021.7052%2048.9175%2022.3883C48.9175%2023.0835%2048.7887%2023.585%2048.531%2023.8928C48.2734%2024.2006%2047.9379%2024.3546%2047.5246%2024.3546C47.2271%2024.3546%2046.9867%2024.2759%2046.8034%2024.1185C46.6201%2023.9594%2046.5025%2023.7225%2046.4506%2023.4077ZM48.1004%2021.815C48.1004%2021.5798%2048.046%2021.3974%2047.937%2021.2677C47.8298%2021.138%2047.7053%2021.0731%2047.5635%2021.0731C47.4286%2021.0731%2047.3162%2021.1268%2047.2262%2021.234C47.1381%2021.3395%2047.094%2021.5133%2047.094%2021.7554C47.094%2022.0009%2047.1424%2022.1816%2047.2392%2022.2975C47.3361%2022.4116%2047.4571%2022.4687%2047.6024%2022.4687C47.7425%2022.4687%2047.86%2022.4134%2047.9552%2022.3027C48.052%2022.192%2048.1004%2022.0295%2048.1004%2021.815ZM50.0174%2022.2353C49.8289%2022.1557%2049.6914%2022.0468%2049.6049%2021.9084C49.5202%2021.7683%2049.4778%2021.6153%2049.4778%2021.4493C49.4778%2021.1657%2049.5764%2020.9313%2049.7736%2020.7463C49.9724%2020.5613%2050.2543%2020.4687%2050.6192%2020.4687C50.9806%2020.4687%2051.2608%2020.5613%2051.4597%2020.7463C51.6603%2020.9313%2051.7606%2021.1657%2051.7606%2021.4493C51.7606%2021.6257%2051.7147%2021.783%2051.6231%2021.9214C51.5314%2022.058%2051.4026%2022.1626%2051.2366%2022.2353C51.4475%2022.32%2051.6075%2022.4436%2051.7165%2022.6062C51.8271%2022.7688%2051.8825%2022.9564%2051.8825%2023.1691C51.8825%2023.5202%2051.7701%2023.8055%2051.5453%2024.0251C51.3222%2024.2447%2051.0247%2024.3546%2050.6529%2024.3546C50.3071%2024.3546%2050.0191%2024.2638%2049.7891%2024.0822C49.5176%2023.8677%2049.3819%2023.5738%2049.3819%2023.2002C49.3819%2022.9944%2049.4329%2022.8059%2049.5349%2022.6347C49.6369%2022.4618%2049.7978%2022.3286%2050.0174%2022.2353ZM50.1678%2021.5012C50.1678%2021.6464%2050.2085%2021.7597%2050.2898%2021.841C50.3728%2021.9222%2050.4826%2021.9629%2050.6192%2021.9629C50.7575%2021.9629%2050.8682%2021.9222%2050.9512%2021.841C51.0342%2021.758%2051.0757%2021.6438%2051.0757%2021.4986C51.0757%2021.3619%2051.0342%2021.253%2050.9512%2021.1717C50.8699%2021.0887%2050.7619%2021.0472%2050.627%2021.0472C50.4869%2021.0472%2050.3754%2021.0887%2050.2924%2021.1717C50.2093%2021.2547%2050.1678%2021.3645%2050.1678%2021.5012ZM50.1004%2023.1302C50.1004%2023.3308%2050.1514%2023.4873%2050.2534%2023.5997C50.3572%2023.7121%2050.486%2023.7683%2050.6399%2023.7683C50.7904%2023.7683%2050.9149%2023.7147%2051.0135%2023.6075C51.1121%2023.4985%2051.1613%2023.342%2051.1613%2023.138C51.1613%2022.9598%2051.1112%2022.8172%2051.0109%2022.71C50.9106%2022.601%2050.7835%2022.5465%2050.6296%2022.5465C50.4515%2022.5465%2050.3183%2022.6079%2050.2301%2022.7307C50.1436%2022.8535%2050.1004%2022.9867%2050.1004%2023.1302ZM52.3235%2023.278L53.029%2023.1924C53.0515%2023.3723%2053.112%2023.5098%2053.2106%2023.6049C53.3092%2023.7%2053.4285%2023.7476%2053.5686%2023.7476C53.719%2023.7476%2053.8453%2023.6905%2053.9473%2023.5764C54.0511%2023.4622%2054.1029%2023.3083%2054.1029%2023.1146C54.1029%2022.9313%2054.0537%2022.786%2053.9551%2022.6788C53.8565%2022.5716%2053.7363%2022.518%2053.5945%2022.518C53.5011%2022.518%2053.3896%2022.5362%2053.2599%2022.5725L53.3403%2021.9785C53.5374%2021.9836%2053.6879%2021.9413%2053.7917%2021.8513C53.8954%2021.7597%2053.9473%2021.6386%2053.9473%2021.4882C53.9473%2021.3602%2053.9093%2021.2582%2053.8332%2021.1821C53.7571%2021.106%2053.6559%2021.068%2053.5297%2021.068C53.4052%2021.068%2053.2988%2021.1112%2053.2106%2021.1977C53.1224%2021.2841%2053.0688%2021.4104%2053.0498%2021.5764L52.3779%2021.4622C52.4246%2021.2322%2052.4947%2021.0489%2052.588%2020.9123C52.6832%2020.774%2052.8146%2020.6659%2052.9823%2020.5881C53.1518%2020.5085%2053.3412%2020.4687%2053.5504%2020.4687C53.9084%2020.4687%2054.1955%2020.5829%2054.4116%2020.8112C54.5897%2020.9979%2054.6788%2021.2089%2054.6788%2021.4441C54.6788%2021.7778%2054.4964%2022.0442%2054.1315%2022.243C54.3494%2022.2897%2054.5232%2022.3944%2054.6529%2022.5569C54.7843%2022.7195%2054.85%2022.9157%2054.85%2023.1458C54.85%2023.4795%2054.7281%2023.764%2054.4843%2023.9992C54.2404%2024.2344%2053.9369%2024.352%2053.5738%2024.352C53.2296%2024.352%2052.9443%2024.2534%2052.7177%2024.0562C52.4912%2023.8574%2052.3598%2023.598%2052.3235%2023.278Z'%20fill='%23007AFF'/%3e%3cg%20clip-path='url(%23clip2_8319_10931)'%3e%3cg%20clip-path='url(%23clip3_8319_10931)'%3e%3crect%20x='-40.7822'%20y='-18.129'%20width='46.7501'%20height='56.6668'%20rx='3.54167'%20fill='%23D2D2D2'/%3e%3cpath%20d='M7.51522%2030.5187C9.67871%2034.4436%2010.9241%2043.4957%2010.9241%2043.4957H-43.6177C-43.6177%2043.4957%20-42.3719%2034.4426%20-40.2088%2030.5187C-38.0458%2026.5948%20-24.8634%2022.9554%20-24.8634%2022.9554C-23.6958%2025.0941%20-20.2684%2027.0449%20-16.76%2027.1321C-12.953%2027.2267%20-9.05053%2025.2755%20-7.83675%2022.954C-7.83675%2022.954%205.35173%2026.5938%207.51522%2030.5187Z'%20fill='white'/%3e%3cpath%20d='M7.51522%2030.5187C9.67871%2034.4436%2010.9241%2043.4957%2010.9241%2043.4957H-43.6177C-43.6177%2043.4957%20-42.3719%2034.4426%20-40.2088%2030.5187C-38.0458%2026.5948%20-24.8634%2022.9554%20-24.8634%2022.9554C-24.8634%2025.3339%20-20.3161%2028.764%20-16.76%2028.8251C-11.8017%2028.8251%20-7.83675%2025.3339%20-7.83675%2022.954C-7.83675%2022.954%205.35173%2026.5938%207.51522%2030.5187Z'%20fill='%23007AFF'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3crect%20x='0.600098'%20y='0.504761'%20width='71.9'%20height='40.9904'%20rx='3.5'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cdefs%3e%3cpattern%20id='pattern0_8319_10931'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_8319_10931'%20transform='matrix(0.00598802%200%200%200.00827909%200%20-0.000885247)'/%3e%3c/pattern%3e%3cclipPath%20id='clip0_8319_10931'%3e%3crect%20x='0.100098'%20y='0.00476074'%20width='72.9'%20height='41.9904'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10931'%3e%3crect%20x='-49.9917'%20y='-50.0001'%20width='177.084'%20height='102'%20rx='4.25001'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10931'%3e%3crect%20x='-40.0728'%20y='-18.129'%20width='46.0417'%20height='56.6668'%20rx='2.83334'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10931'%3e%3crect%20width='60.2084'%20height='60.2084'%20fill='white'%20transform='translate(-46.4478%20-18.129)'/%3e%3c/clipPath%3e%3cimage%20id='image0_8319_10931'%20width='167'%20height='121'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKcAAAB5CAYAAABcIjGzAAAAAXNSR0IArs4c6QAABj9JREFUeF7tnVvIpVMYx/cwDoMxXJhxuFAyyiElpEhckQuh3Dgkp0JqruScEqK5IBNySo5Drsgp5XSDQhQuuDNFjEMZh2FmmGRqZv/smfXt17eed/es3t9c/b81az3rWf/n17v2/lrfeheM/KcDSR1YkDQv09KBkXAKQVoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxIRTBtI6IJxpS2NiwikDaR0QzrSlMTHhlIG0Dghn2tKYmHDKQFoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxIRTBtI6IJxpS2NiwikDaR0QzrSlMTHhlIG0Dghn2tKYmHDKQFoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxISzjoFTMHwN9NfQl0K/AH0o9CPQb0C/Cb0S+lzoO6BvgV4I/SD0ztCrob+A3gX6iMJcdc51GC2cHUyao4tw1vk352jhrDNXOOv8E84e/SOc3BbXYs510EuhL4N+Cvp26Pehl0BfC70P9PLCtv4K2j8rbNOno30Z9Ea39R4J6jG0cPZortt6nbnCWeef23qP/vFb7d6Y5xfoTdDs8xvaN0PvCb0BenFhq/2jw/o4lvnwI8GPhfiL0N5lrg7pdOvik7ObT6Vewlnnn0/OHv0Tzh7N9cnZo7mGrnNAOOv8c3SPDghnj+Yaus4B4azzz9E9OiCcPZpr6DoHhLPOP0f36IBw1pl7MIbTy5/RTs1ferP9VPR/B5rH2/5G+wHQP0D/Bb1foc+BaN+1sPyv6myJGS2cdT4KZ51/c44WzjpzhbPOP+Hs0T+Gfhs/PFOYk9vux+hzNfSV0AdBvwvNk/bfo52n39ej/aXCXPyosAp9np+RZ8I5I6OFM9hot/U4Q4UzzsstkYQzztASnI9hiougP4feHfo06Iehf4V+Dfo7aP4GgEfvzkKfT6B5bO8etL8aZ8v8Iwnn/L2bHCmccV765Az2UjiDDfXJGWyo4eIcEM44L40U7IBwBhtquDgHhDPOSyMFOyCcwYYaLs4B4Yzz0kjBDghnsKGGi3NAOOO8NFKwA8IZbKjh4hwQzjgvefyMly3wVDmPrl2Bqb+Bvhj6oUI7j7S9hz7HQ38IfRg0j+0dh/a7oM+HvgD6UeizJ6y7ED+fB3099G3Ql0M/Ab3twlzhFM6tDghnHAvpIvnkHJfEJ2cCPLl9H1LYpo9BOy+GPRLtR0EfDv049InQL0M/C81jcmegnXfC34h23kv/XGFbvxntvIv+6An/eTf9mYWtnBfm8vT/6+h/zVbttl5HuHCO/RPOOpbCRwuncIZDFRXwSQTiKXe+roV/q34n+t8A/S30rdAfQfMbLT8S8LcBvDf+A4zdC3rfQs7n7GhrHY1GV6H90zmM4zZ9P/qdBH0v9HXQvE//Prf1GDyFc+yjcMYwFRZFOIUzDCYDNeSA39YbKtbQUhXOoVW8ofUKZ0PFGlqqwjm0ije0XuFsqFhDS1U4h1bxhtYrnA0Va2ipCufQKt7QeoWzoWINLVXhHFrFG1qvcDZUrKGlKpxDq3hD6xXOhoo1tFSFc2gVb2i9wtlQsYaWqnAOreINrVc4GyrW0FIVzqFVvKH1CmdDxRpaqsI5tIo3tF7hjCvWYoTi29Y4A/9+/Hf8x1Jovj+d18tsQJ+N0HtA8/3sm9G+E/Qm6D+hF0GTC87L+LtNWMc1L8P/rZ2vxcI5X+e2HyecY0+EM46rkEjCKZwhIPURhC9g5cWo3NZ+wsT7Qy8vbPFvof2Ewhb8ANrXQPNam6fRzotneT0Mb3rjDXKl97+/OGHiCvx8E3TpxbRTa+C2PtWizh2Ec2yVcHbGZjYdhVM4Z0Nax1l4gxovstp2r/loNOLbhHlPO79Nn4z5FkIzDrd13izH+F9iLO9fX4329dC8YJbbOt/bfiz63w3NjxP/NnO+Vei3EvqSjr5u6ea2/n/c2r6vcI49Ec46lsJHC6dwhkOVLSAvfV2XLbl55NPl12pTw7qtT7VoJh2Ecwc2C+dM2Js6iXAK51RI7JDIAZ+ciYphKv914B8yIqlXZ3YxPAAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",step3="data:image/svg+xml,%3csvg%20width='73'%20height='42'%20viewBox='0%200%2073%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20clip-path='url(%23clip0_8319_10967)'%3e%3cpath%20d='M0.100098%204.00354C0.100098%201.79441%201.89096%200.00354004%204.1001%200.00354004L69.0001%200.00354004C71.2092%200.00354004%2073.0001%201.7944%2073.0001%204.00354V37.9939C73.0001%2040.2031%2071.2092%2041.9939%2069.0001%2041.9939L4.1001%2041.9939C1.89097%2041.9939%200.100098%2040.2031%200.100098%2037.9939L0.100098%204.00354Z'%20fill='white'/%3e%3cpath%20d='M0.600098%204.00354C0.600098%202.07055%202.1671%200.50354%204.1001%200.50354L69.0001%200.50354C70.9331%200.50354%2072.5001%202.07054%2072.5001%204.00354V37.9939C72.5001%2039.9269%2070.9331%2041.4939%2069.0001%2041.4939L4.1001%2041.4939C2.16711%2041.4939%200.600098%2039.9269%200.600098%2037.9939L0.600098%204.00354Z'%20stroke='black'%20stroke-opacity='0.1'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.18382%209.02844C4.18392%208.87551%204.30791%208.75159%204.46084%208.75159L68.9329%208.75159C69.0859%208.75159%2069.2099%208.87561%2069.2099%209.02861V9.93257C69.2099%2010.0856%2069.0859%2010.2096%2068.9329%2010.2096L4.46029%2010.2096C4.30723%2010.2096%204.18318%2010.0855%204.18327%209.9324L4.18382%209.02844Z'%20fill='%23E9E9EB'/%3e%3crect%20x='62.7935'%20y='2.91858'%20width='6.4152'%20height='3.2076'%20rx='0.2916'%20fill='%23DBB107'/%3e%3crect%20opacity='0.25'%20x='4.47412'%20y='2.62854'%20width='46.3644'%20height='33.534'%20fill='url(%23pattern0_8319_10967)'/%3e%3cpath%20d='M4.60424%204.78977L5.11067%204.74053C5.14115%204.91052%205.2027%205.03536%205.29531%205.11508C5.38909%205.19479%205.51511%205.23465%205.67337%205.23465C5.84101%205.23465%205.96703%205.19948%206.05143%205.12915C6.13701%205.05764%206.1798%204.9744%206.1798%204.87945C6.1798%204.81849%206.16163%204.76691%206.12528%204.72471C6.09012%204.68133%206.02799%204.64382%205.93889%204.61217C5.87793%204.59107%205.73902%204.55355%205.52214%204.49963C5.24314%204.43046%205.04737%204.34547%204.93483%204.24466C4.77657%204.10281%204.69744%203.9299%204.69744%203.72592C4.69744%203.59463%204.73437%203.47212%204.80822%203.35841C4.88325%203.24353%204.99051%203.15619%205.13001%203.0964C5.27069%203.03662%205.44008%203.00672%205.6382%203.00672C5.96175%203.00672%206.205%203.07765%206.36795%203.21949C6.53207%203.36134%206.61823%203.55066%206.62644%203.78747L6.10594%203.81033C6.08367%203.67786%206.0356%203.5829%205.96175%203.52546C5.88907%203.46685%205.77946%203.43754%205.63292%203.43754C5.4817%203.43754%205.3633%203.4686%205.27772%203.53074C5.22263%203.57059%205.19508%203.62393%205.19508%203.69075C5.19508%203.75171%205.22087%203.80388%205.27245%203.84725C5.3381%203.90235%205.49753%203.95979%205.75074%204.01958C6.00395%204.07937%206.19093%204.1415%206.31168%204.20597C6.4336%204.26928%206.52855%204.35661%206.59654%204.46798C6.66571%204.57817%206.70029%204.71474%206.70029%204.87769C6.70029%205.0254%206.65926%205.16373%206.5772%205.29268C6.49514%205.42163%206.37908%205.51776%206.22903%205.58106C6.07898%205.64319%205.892%205.67426%205.66809%205.67426C5.3422%205.67426%205.09192%205.59923%204.91724%205.44918C4.74257%205.29796%204.63824%205.07815%204.60424%204.78977ZM7.66568%205.62854V3.48678H6.90076V3.05069H8.94933V3.48678H8.18617V5.62854H7.66568ZM11.2916%205.62854H10.7254L10.5003%205.04298H9.46984L9.25707%205.62854H8.70492L9.70898%203.05069H10.2594L11.2916%205.62854ZM10.3332%204.60865L9.97802%203.65207L9.62985%204.60865H10.3332ZM11.8297%205.62854V3.48678H11.0647V3.05069H13.1133V3.48678H12.3502V5.62854H11.8297ZM13.3982%205.62854V3.05069H15.3096V3.48678H13.9187V4.05826H15.2129V4.4926H13.9187V5.19421H15.3588V5.62854H13.3982ZM16.7023%205.62854V3.05069H17.2087L18.2638%204.77219V3.05069H18.7473V5.62854H18.2251L17.1859%203.94748V5.62854H16.7023ZM21.5714%205.62854H21.0052L20.7801%205.04298H19.7497L19.5369%205.62854H18.9847L19.9888%203.05069H20.5392L21.5714%205.62854ZM20.613%204.60865L20.2578%203.65207L19.9097%204.60865H20.613ZM21.7894%205.62854V3.05069H22.5684L23.0362%204.80911L23.4986%203.05069H24.2794V5.62854H23.7958V3.59931L23.2841%205.62854H22.783L22.273%203.59931V5.62854H21.7894ZM24.7436%205.62854V3.05069H26.655V3.48678H25.2641V4.05826H26.5583V4.4926H25.2641V5.19421H26.7043V5.62854H24.7436Z'%20fill='%23A6A6A6'/%3e%3cpath%20d='M27.0853%2029.1392H27.663C27.7933%2029.1392%2027.8926%2029.1492%2027.9609%2029.1691C28.0528%2029.1962%2028.1314%2029.2442%2028.1969%2029.3133C28.2624%2029.3823%2028.3123%2029.467%2028.3464%2029.5674C28.3806%2029.6671%2028.3977%2029.7903%2028.3977%2029.9369C28.3977%2030.0658%2028.3817%2030.1768%2028.3497%2030.2701C28.3105%2030.384%2028.2546%2030.4762%2028.182%2030.5467C28.1272%2030.6001%2028.0531%2030.6417%2027.9599%2030.6716C27.8901%2030.6937%2027.7968%2030.7047%2027.6801%2030.7047H27.0853V29.1392ZM27.4014%2029.404V30.4409H27.6374C27.7257%2030.4409%2027.7894%2030.436%2027.8285%2030.426C27.8798%2030.4132%2027.9221%2030.3915%2027.9556%2030.3609C27.9898%2030.3302%2028.0175%2030.2801%2028.0389%2030.2103C28.0603%2030.1398%2028.0709%2030.0441%2028.0709%2029.923C28.0709%2029.802%2028.0603%2029.7091%2028.0389%2029.6443C28.0175%2029.5795%2027.9876%2029.529%2027.9492%2029.4927C27.9108%2029.4564%2027.862%2029.4318%2027.8029%2029.419C27.7588%2029.409%2027.6723%2029.404%2027.5434%2029.404H27.4014ZM28.6027%2029.9316C28.6027%2029.7721%2028.6266%2029.6383%2028.6743%2029.5301C28.7099%2029.4503%2028.7583%2029.3788%2028.8195%2029.3154C28.8815%2029.2521%2028.9491%2029.2051%2029.0224%2029.1745C29.1199%2029.1332%2029.2324%2029.1125%2029.3599%2029.1125C29.5905%2029.1125%2029.7749%2029.1841%2029.913%2029.3272C30.0518%2029.4703%2030.1212%2029.6692%2030.1212%2029.9241C30.1212%2030.1768%2030.0525%2030.3747%2029.9151%2030.5178C29.7777%2030.6602%2029.5941%2030.7314%2029.3641%2030.7314C29.1313%2030.7314%2028.9462%2030.6606%2028.8088%2030.5189C28.6714%2030.3765%2028.6027%2030.1807%2028.6027%2029.9316ZM28.9284%2029.9209C28.9284%2030.0982%2028.9694%2030.2327%2029.0512%2030.3245C29.1331%2030.4157%2029.2371%2030.4612%2029.3631%2030.4612C29.4891%2030.4612%2029.5923%2030.416%2029.6727%2030.3256C29.7539%2030.2345%2029.7945%2030.0982%2029.7945%2029.9166C29.7945%2029.7372%2029.755%2029.6034%2029.6759%2029.5151C29.5976%2029.4268%2029.4933%2029.3827%2029.3631%2029.3827C29.2328%2029.3827%2029.1278%2029.4275%2029.048%2029.5172C28.9683%2029.6062%2028.9284%2029.7408%2028.9284%2029.9209ZM30.3701%2029.1392H30.9958C31.1197%2029.1392%2031.2119%2029.1446%2031.2724%2029.1552C31.3336%2029.1652%2031.3881%2029.1866%2031.4358%2029.2193C31.4842%2029.2521%2031.5244%2029.2958%2031.5565%2029.3507C31.5885%2029.4048%2031.6045%2029.4656%2031.6045%2029.5333C31.6045%2029.6066%2031.5846%2029.6739%2031.5447%2029.7351C31.5056%2029.7963%2031.4522%2029.8422%2031.3845%2029.8728C31.4799%2029.9006%2031.5533%2029.9479%2031.6045%2030.0149C31.6558%2030.0818%2031.6814%2030.1605%2031.6814%2030.2509C31.6814%2030.3221%2031.6647%2030.3915%2031.6312%2030.4591C31.5985%2030.526%2031.5533%2030.5798%2031.4956%2030.6204C31.4386%2030.6602%2031.3682%2030.6848%2031.2842%2030.694C31.2315%2030.6997%2031.1044%2030.7033%2030.9029%2030.7047H30.3701V29.1392ZM30.6862%2029.3998V29.7618H30.8933C31.0165%2029.7618%2031.093%2029.76%2031.1229%2029.7564C31.177%2029.75%2031.2194%2029.7315%2031.25%2029.7009C31.2813%2029.6696%2031.297%2029.6287%2031.297%2029.5781C31.297%2029.5297%2031.2834%2029.4905%2031.2564%2029.4606C31.2301%2029.43%2031.1905%2029.4115%2031.1379%2029.4051C31.1065%2029.4016%2031.0165%2029.3998%2030.8677%2029.3998H30.6862ZM30.6862%2030.0223V30.4409H30.9787C31.0927%2030.4409%2031.1649%2030.4377%2031.1955%2030.4313C31.2425%2030.4228%2031.2806%2030.4021%2031.3098%2030.3694C31.3397%2030.3359%2031.3546%2030.2914%2031.3546%2030.2359C31.3546%2030.1889%2031.3432%2030.1491%2031.3205%2030.1163C31.2977%2030.0836%2031.2646%2030.0597%2031.2212%2030.0448C31.1784%2030.0298%2031.0852%2030.0223%2030.9414%2030.0223H30.6862ZM32.9992%2029.1328C33.1508%2029.1328%2033.2693%2029.1869%2033.3548%2029.2951C33.4566%2029.4233%2033.5075%2029.6358%2033.5075%2029.9326C33.5075%2030.2288%2033.4562%2030.4417%2033.3537%2030.5712C33.269%2030.678%2033.1508%2030.7314%2032.9992%2030.7314C32.8468%2030.7314%2032.724%2030.673%2032.6307%2030.5563C32.5375%2030.4388%2032.4909%2030.2299%2032.4909%2029.9294C32.4909%2029.6347%2032.5421%2029.4226%2032.6446%2029.293C32.7293%2029.1862%2032.8475%2029.1328%2032.9992%2029.1328ZM32.9992%2029.3816C32.9629%2029.3816%2032.9305%2029.3934%2032.902%2029.4169C32.8735%2029.4396%2032.8514%2029.4809%2032.8358%2029.5407C32.8151%2029.6183%2032.8048%2029.749%2032.8048%2029.9326C32.8048%2030.1163%2032.8141%2030.2427%2032.8326%2030.3117C32.8511%2030.3801%2032.8742%2030.4256%2032.902%2030.4484C32.9305%2030.4712%2032.9629%2030.4826%2032.9992%2030.4826C33.0355%2030.4826%2033.0679%2030.4712%2033.0963%2030.4484C33.1248%2030.4249%2033.1469%2030.3833%2033.1625%2030.3235C33.1832%2030.2466%2033.1935%2030.1163%2033.1935%2029.9326C33.1935%2029.749%2033.1843%2029.623%2033.1657%2029.5546C33.1472%2029.4856%2033.1237%2029.4396%2033.0953%2029.4169C33.0675%2029.3934%2033.0355%2029.3816%2032.9992%2029.3816ZM33.9667%2029.86C33.8891%2029.8273%2033.8325%2029.7824%2033.7969%2029.7255C33.762%2029.6678%2033.7445%2029.6048%2033.7445%2029.5365C33.7445%2029.4197%2033.7851%2029.3232%2033.8663%2029.2471C33.9481%2029.1709%2034.0642%2029.1328%2034.2144%2029.1328C34.3632%2029.1328%2034.4785%2029.1709%2034.5604%2029.2471C34.643%2029.3232%2034.6843%2029.4197%2034.6843%2029.5365C34.6843%2029.6091%2034.6654%2029.6739%2034.6277%2029.7308C34.5899%2029.7871%2034.5369%2029.8301%2034.4686%2029.86C34.5554%2029.8949%2034.6213%2029.9458%2034.6661%2030.0127C34.7117%2030.0797%2034.7345%2030.1569%2034.7345%2030.2445C34.7345%2030.389%2034.6882%2030.5064%2034.5956%2030.5969C34.5038%2030.6873%2034.3813%2030.7325%2034.2283%2030.7325C34.0859%2030.7325%2033.9674%2030.6951%2033.8727%2030.6204C33.7609%2030.5321%2033.705%2030.411%2033.705%2030.2573C33.705%2030.1726%2033.726%2030.095%2033.768%2030.0245C33.81%2029.9533%2033.8762%2029.8985%2033.9667%2029.86ZM34.0286%2029.5578C34.0286%2029.6176%2034.0453%2029.6642%2034.0788%2029.6977C34.113%2029.7312%2034.1582%2029.7479%2034.2144%2029.7479C34.2714%2029.7479%2034.3169%2029.7312%2034.3511%2029.6977C34.3853%2029.6635%2034.4023%2029.6166%2034.4023%2029.5568C34.4023%2029.5005%2034.3853%2029.4557%2034.3511%2029.4222C34.3176%2029.388%2034.2731%2029.3709%2034.2176%2029.3709C34.1599%2029.3709%2034.114%2029.388%2034.0798%2029.4222C34.0457%2029.4564%2034.0286%2029.5016%2034.0286%2029.5578ZM34.0008%2030.2284C34.0008%2030.311%2034.0218%2030.3755%2034.0638%2030.4217C34.1065%2030.468%2034.1596%2030.4911%2034.2229%2030.4911C34.2849%2030.4911%2034.3361%2030.4691%2034.3767%2030.4249C34.4173%2030.3801%2034.4376%2030.3157%2034.4376%2030.2316C34.4376%2030.1583%2034.4169%2030.0996%2034.3756%2030.0554C34.3344%2030.0106%2034.282%2029.9882%2034.2187%2029.9882C34.1453%2029.9882%2034.0905%2030.0134%2034.0542%2030.064C34.0186%2030.1145%2034.0008%2030.1694%2034.0008%2030.2284ZM34.8306%2030.7314L35.2182%2029.1125H35.4435L35.0516%2030.7314H34.8306ZM35.5247%2030.2893L35.8151%2030.2541C35.8244%2030.3281%2035.8493%2030.3847%2035.8899%2030.4239C35.9305%2030.463%2035.9796%2030.4826%2036.0373%2030.4826C36.0992%2030.4826%2036.1512%2030.4591%2036.1932%2030.4121C36.2359%2030.3651%2036.2572%2030.3018%2036.2572%2030.222C36.2572%2030.1466%2036.2369%2030.0868%2036.1964%2030.0426C36.1558%2029.9985%2036.1063%2029.9764%2036.0479%2029.9764C36.0095%2029.9764%2035.9636%2029.9839%2035.9102%2029.9988L35.9433%2029.7543C36.0244%2029.7564%2036.0864%2029.739%2036.1291%2029.702C36.1718%2029.6642%2036.1932%2029.6144%2036.1932%2029.5525C36.1932%2029.4998%2036.1775%2029.4578%2036.1462%2029.4265C36.1149%2029.3951%2036.0732%2029.3795%2036.0212%2029.3795C35.97%2029.3795%2035.9262%2029.3973%2035.8899%2029.4329C35.8536%2029.4685%2035.8315%2029.5204%2035.8237%2029.5888L35.5471%2029.5418C35.5663%2029.4471%2035.5952%2029.3717%2035.6336%2029.3154C35.6728%2029.2585%2035.7269%2029.214%2035.7959%2029.1819C35.8657%2029.1492%2035.9436%2029.1328%2036.0298%2029.1328C36.1771%2029.1328%2036.2953%2029.1798%2036.3843%2029.2738C36.4576%2029.3507%2036.4943%2029.4375%2036.4943%2029.5343C36.4943%2029.6717%2036.4192%2029.7814%2036.269%2029.8632C36.3587%2029.8825%2036.4302%2029.9255%2036.4836%2029.9924C36.5377%2030.0594%2036.5648%2030.1402%2036.5648%2030.2348C36.5648%2030.3722%2036.5146%2030.4894%2036.4142%2030.5862C36.3138%2030.683%2036.1889%2030.7314%2036.0394%2030.7314C35.8977%2030.7314%2035.7803%2030.6908%2035.687%2030.6097C35.5937%2030.5278%2035.5396%2030.421%2035.5247%2030.2893ZM37.5205%2030.7047H37.2205V29.5738C37.1108%2029.6764%2036.9816%2029.7522%2036.8328%2029.8013V29.529C36.9111%2029.5034%2036.9962%2029.4549%2037.088%2029.3838C37.1799%2029.3119%2037.2429%2029.2282%2037.2771%2029.1328H37.5205V30.7047ZM37.874%2030.7314L38.2616%2029.1125H38.4869L38.095%2030.7314H37.874ZM39.3466%2030.7047H39.0465V29.5738C38.9369%2029.6764%2038.8077%2029.7522%2038.6589%2029.8013V29.529C38.7372%2029.5034%2038.8223%2029.4549%2038.9141%2029.3838C39.0059%2029.3119%2039.0689%2029.2282%2039.1031%2029.1328H39.3466V30.7047ZM39.8026%2030.3427L40.093%2030.3107C40.1001%2030.3698%2040.1187%2030.4135%2040.1486%2030.442C40.1785%2030.4705%2040.218%2030.4847%2040.2671%2030.4847C40.329%2030.4847%2040.3817%2030.4563%2040.4251%2030.3993C40.4686%2030.3423%2040.4963%2030.2242%2040.5084%2030.0448C40.433%2030.1323%2040.3386%2030.1761%2040.2254%2030.1761C40.1023%2030.1761%2039.9959%2030.1288%2039.9062%2030.0341C39.8172%2029.9387%2039.7727%2029.8148%2039.7727%2029.6625C39.7727%2029.5037%2039.8197%2029.3759%2039.9136%2029.2791C40.0083%2029.1816%2040.1286%2029.1328%2040.2746%2029.1328C40.4333%2029.1328%2040.5636%2029.1944%2040.6654%2029.3175C40.7672%2029.44%2040.8181%2029.6418%2040.8181%2029.923C40.8181%2030.2092%2040.7651%2030.4157%2040.659%2030.5424C40.5529%2030.6691%2040.4148%2030.7325%2040.2447%2030.7325C40.1222%2030.7325%2040.0233%2030.7001%2039.9478%2030.6353C39.8723%2030.5698%2039.8239%2030.4723%2039.8026%2030.3427ZM40.4817%2029.687C40.4817%2029.5902%2040.4593%2029.5151%2040.4145%2029.4617C40.3703%2029.4083%2040.3191%2029.3816%2040.2607%2029.3816C40.2052%2029.3816%2040.1589%2029.4037%2040.1219%2029.4478C40.0856%2029.4913%2040.0674%2029.5628%2040.0674%2029.6625C40.0674%2029.7636%2040.0873%2029.838%2040.1272%2029.8857C40.1671%2029.9326%2040.2169%2029.9561%2040.2767%2029.9561C40.3344%2029.9561%2040.3828%2029.9334%2040.4219%2029.8878C40.4618%2029.8422%2040.4817%2029.7753%2040.4817%2029.687ZM41.2709%2029.86C41.1933%2029.8273%2041.1367%2029.7824%2041.1011%2029.7255C41.0662%2029.6678%2041.0488%2029.6048%2041.0488%2029.5365C41.0488%2029.4197%2041.0894%2029.3232%2041.1705%2029.2471C41.2524%2029.1709%2041.3684%2029.1328%2041.5186%2029.1328C41.6674%2029.1328%2041.7828%2029.1709%2041.8646%2029.2471C41.9472%2029.3232%2041.9885%2029.4197%2041.9885%2029.5365C41.9885%2029.6091%2041.9696%2029.6739%2041.9319%2029.7308C41.8942%2029.7871%2041.8411%2029.8301%2041.7728%2029.86C41.8596%2029.8949%2041.9255%2029.9458%2041.9703%2030.0127C42.0159%2030.0797%2042.0387%2030.1569%2042.0387%2030.2445C42.0387%2030.389%2041.9924%2030.5064%2041.8999%2030.5969C41.808%2030.6873%2041.6856%2030.7325%2041.5325%2030.7325C41.3901%2030.7325%2041.2716%2030.6951%2041.1769%2030.6204C41.0651%2030.5321%2041.0093%2030.411%2041.0093%2030.2573C41.0093%2030.1726%2041.0303%2030.095%2041.0723%2030.0245C41.1143%2029.9533%2041.1805%2029.8985%2041.2709%2029.86ZM41.3328%2029.5578C41.3328%2029.6176%2041.3496%2029.6642%2041.383%2029.6977C41.4172%2029.7312%2041.4624%2029.7479%2041.5186%2029.7479C41.5756%2029.7479%2041.6212%2029.7312%2041.6553%2029.6977C41.6895%2029.6635%2041.7066%2029.6166%2041.7066%2029.5568C41.7066%2029.5005%2041.6895%2029.4557%2041.6553%2029.4222C41.6219%2029.388%2041.5774%2029.3709%2041.5218%2029.3709C41.4642%2029.3709%2041.4183%2029.388%2041.3841%2029.4222C41.3499%2029.4564%2041.3328%2029.5016%2041.3328%2029.5578ZM41.3051%2030.2284C41.3051%2030.311%2041.3261%2030.3755%2041.3681%2030.4217C41.4108%2030.468%2041.4638%2030.4911%2041.5272%2030.4911C41.5891%2030.4911%2041.6404%2030.4691%2041.681%2030.4249C41.7215%2030.3801%2041.7418%2030.3157%2041.7418%2030.2316C41.7418%2030.1583%2041.7212%2030.0996%2041.6799%2030.0554C41.6386%2030.0106%2041.5863%2029.9882%2041.5229%2029.9882C41.4496%2029.9882%2041.3948%2030.0134%2041.3585%2030.064C41.3229%2030.1145%2041.3051%2030.1694%2041.3051%2030.2284ZM42.2202%2030.2893L42.5107%2030.2541C42.5199%2030.3281%2042.5449%2030.3847%2042.5854%2030.4239C42.626%2030.463%2042.6751%2030.4826%2042.7328%2030.4826C42.7947%2030.4826%2042.8467%2030.4591%2042.8887%2030.4121C42.9314%2030.3651%2042.9528%2030.3018%2042.9528%2030.222C42.9528%2030.1466%2042.9325%2030.0868%2042.8919%2030.0426C42.8513%2029.9985%2042.8019%2029.9764%2042.7435%2029.9764C42.705%2029.9764%2042.6591%2029.9839%2042.6057%2029.9988L42.6388%2029.7543C42.72%2029.7564%2042.7819%2029.739%2042.8246%2029.702C42.8674%2029.6642%2042.8887%2029.6144%2042.8887%2029.5525C42.8887%2029.4998%2042.8731%2029.4578%2042.8417%2029.4265C42.8104%2029.3951%2042.7688%2029.3795%2042.7168%2029.3795C42.6655%2029.3795%2042.6217%2029.3973%2042.5854%2029.4329C42.5491%2029.4685%2042.5271%2029.5204%2042.5192%2029.5888L42.2427%2029.5418C42.2619%2029.4471%2042.2907%2029.3717%2042.3291%2029.3154C42.3683%2029.2585%2042.4224%2029.214%2042.4915%2029.1819C42.5612%2029.1492%2042.6392%2029.1328%2042.7253%2029.1328C42.8727%2029.1328%2042.9909%2029.1798%2043.0799%2029.2738C43.1532%2029.3507%2043.1899%2029.4375%2043.1899%2029.5343C43.1899%2029.6717%2043.1147%2029.7814%2042.9645%2029.8632C43.0542%2029.8825%2043.1258%2029.9255%2043.1792%2029.9924C43.2333%2030.0594%2043.2603%2030.1402%2043.2603%2030.2348C43.2603%2030.3722%2043.2101%2030.4894%2043.1098%2030.5862C43.0094%2030.683%2042.8844%2030.7314%2042.7349%2030.7314C42.5933%2030.7314%2042.4758%2030.6908%2042.3825%2030.6097C42.2893%2030.5278%2042.2352%2030.421%2042.2202%2030.2893Z'%20fill='%23007AFF'/%3e%3cg%20clip-path='url(%23clip1_8319_10967)'%3e%3cg%20clip-path='url(%23clip2_8319_10967)'%3e%3crect%20x='3.89111'%20y='13.1241'%20width='19.2456'%20height='23.328'%20rx='1.458'%20fill='%23D2D2D2'/%3e%3cpath%20d='M23.774%2033.1515C24.6646%2034.7673%2025.1773%2038.4938%2025.1773%2038.4938H2.72412C2.72412%2038.4938%203.23699%2034.7669%204.12745%2033.1515C5.0179%2031.5362%2010.4447%2030.0379%2010.4447%2030.0379C10.9253%2030.9184%2012.3363%2031.7215%2013.7806%2031.7574C15.3479%2031.7963%2016.9544%2030.993%2017.4541%2030.0374C17.4541%2030.0374%2022.8834%2031.5358%2023.774%2033.1515Z'%20fill='white'/%3e%3cpath%20d='M11.3212%2028.6495V28.6851C11.3115%2029.4389%2010.6815%2030.0056%209.43115%2030.3854C10.9377%2031.4876%2012.4444%2032.3694%2013.951%2032.3694C15.4575%2032.3694%2016.9642%2031.4876%2018.4708%2030.3854C17.2289%2030.0052%2016.5989%2029.4376%2016.5807%2028.6825C16.5807%2028.396%2016.5816%2025.6045%2016.583%2025.3179C16.6728%2025.3306%2016.6651%2025.3225%2016.583%2025.2996C16.5854%2024.3556%2016.5894%2025.5913%2016.595%2024.3013C16.6006%2023.0113%2011.2343%2021.8572%2011.313%2025.3993C11.3141%2025.7605%2011.3162%2028.2405%2011.3212%2028.6495Z'%20fill='url(%23paint0_linear_8319_10967)'/%3e%3cpath%20d='M23.774%2033.1515C24.6646%2034.7673%2025.1773%2038.4938%2025.1773%2038.4938H2.72412C2.72412%2038.4938%203.23699%2034.7669%204.12745%2033.1515C5.0179%2031.5362%2010.4447%2030.0379%2010.4447%2030.0379C10.4447%2031.0171%2012.3167%2032.4292%2013.7806%2032.4543C15.8218%2032.4543%2017.4541%2031.0171%2017.4541%2030.0374C17.4541%2030.0374%2022.8834%2031.5358%2023.774%2033.1515Z'%20fill='%23007AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.5277%2025.2645C16.8122%2027.3791%2015.1639%2028.8702%2013.8056%2028.8702C12.322%2028.8702%2010.742%2027.3833%2010.0641%2025.2733C9.68216%2025.2756%209.43571%2024.2888%209.34859%2023.9151C9.33461%2023.8551%209.31822%2023.7976%209.30207%2023.7409C9.21521%2023.4364%209.13499%2023.155%209.47015%2022.6267C9.55347%2022.4953%209.64178%2022.4217%209.72956%2022.3888C9.7844%2019.768%2010.2642%2017.2062%2013.8056%2017.2062C17.3499%2017.2062%2017.8275%2019.7169%2017.8817%2022.382C17.9702%2022.4152%2018.0589%2022.4898%2018.1419%2022.6235C18.4721%2023.1551%2018.3893%2023.4356%2018.2996%2023.7394L18.2996%2023.7394C18.2829%2023.7959%2018.266%2023.8532%2018.2514%2023.913C18.1612%2024.2845%2017.9071%2025.2628%2017.5277%2025.2645Z'%20fill='url(%23paint1_linear_8319_10967)'/%3e%3c/g%3e%3c/g%3e%3cg%20opacity='0.5'%20clip-path='url(%23clip3_8319_10967)'%3e%3cpath%20d='M64.4011%2033.7762V33.7906C64.3973%2034.0968%2064.1534%2034.3271%2063.6694%2034.4814C64.2526%2034.9292%2064.8358%2035.2874%2065.419%2035.2874C66.0022%2035.2874%2066.5854%2034.9292%2067.1686%2034.4814C66.6879%2034.3269%2066.444%2034.0963%2066.437%2033.7896C66.437%2033.6732%2066.4374%2032.5391%2066.4379%2032.4227C66.4726%2032.4279%2066.4697%2032.4246%2066.4379%2032.4153C66.4388%2032.0318%2066.4404%2032.5338%2066.4425%2032.0097C66.4447%2031.4857%2064.3674%2031.0168%2064.3979%2032.4558C64.3983%2032.6025%2064.3991%2033.61%2064.4011%2033.7762Z'%20fill='url(%23paint2_linear_8319_10967)'/%3e%3cpath%20d='M69.5191%2035.3017C69.8776%2035.9146%2070.084%2037.3281%2070.084%2037.3281H61.0444C61.0444%2037.3281%2061.2509%2035.9144%2061.6094%2035.3017C61.9679%2034.689%2064.1527%2034.1207%2064.1527%2034.1207C64.1527%2034.4921%2064.9064%2035.0277%2065.4957%2035.0373C66.3175%2035.0373%2066.9747%2034.4921%2066.9747%2034.1205C66.9747%2034.1205%2069.1605%2034.6888%2069.5191%2035.3017Z'%20fill='%23C6C6C6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M67.0406%2032.2085C66.7509%2033.1524%2066.0183%2033.8267%2065.4179%2033.8267C64.7838%2033.8267%2064.1085%2033.1979%2063.8169%2032.3048C63.6457%2032.2712%2063.5307%2031.9204%2063.4883%2031.7821C63.481%2031.7584%2063.4726%2031.7358%2063.4643%2031.7136C63.4195%2031.5938%2063.3781%2031.4832%2063.5426%2031.2621C63.583%2031.2078%2063.6262%2031.1759%2063.6693%2031.1601C63.6775%2030.0146%2063.796%2028.8523%2065.4179%2028.8697C67.1407%2028.8697%2067.1709%2029.9771%2067.1677%2031.1331C67.2115%2031.1518%2067.2541%2031.1877%2067.2915%2031.2481C67.4366%2031.4821%2067.3859%2031.5888%2067.331%2031.7043L67.331%2031.7043C67.3208%2031.7258%2067.3105%2031.7476%2067.3012%2031.7706C67.2592%2031.8748%2067.1628%2032.1027%2067.0406%2032.2085Z'%20fill='url(%23paint3_linear_8319_10967)'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cpattern%20id='pattern0_8319_10967'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_8319_10967'%20transform='matrix(0.00598802%200%200%200.00827909%200%20-0.000885226)'/%3e%3c/pattern%3e%3clinearGradient%20id='paint0_linear_8319_10967'%20x1='13.5501'%20y1='25.6147'%20x2='13.5501'%20y2='29.9985'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23B1B1B1'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8319_10967'%20x1='10.3827'%20y1='22.9837'%20x2='16.0242'%20y2='23.0044'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23E0E0E0'/%3e%3cstop%20offset='1'%20stop-color='white'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8319_10967'%20x1='65.2639'%20y1='32.5433'%20x2='65.2639'%20y2='34.3242'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D6D4D4'/%3e%3cstop%20offset='1'%20stop-color='%23E4E4E4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8319_10967'%20x1='63.6576'%20y1='31.9783'%20x2='65.5906'%20y2='31.9783'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23CECECE'/%3e%3cstop%20offset='1'%20stop-color='%23E7E7E7'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_8319_10967'%3e%3crect%20x='0.100098'%20y='0.00476074'%20width='72.9'%20height='41.9904'%20rx='1.7496'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_8319_10967'%3e%3crect%20x='4.18311'%20y='13.1246'%20width='18.954'%20height='23.328'%20rx='1.1664'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip2_8319_10967'%3e%3crect%20width='24.786'%20height='24.786'%20fill='white'%20transform='translate(1.55908%2013.1244)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip3_8319_10967'%3e%3crect%20width='9.9144'%20height='9.9144'%20fill='white'%20transform='translate(60.4614%2027.4137)'/%3e%3c/clipPath%3e%3cimage%20id='image0_8319_10967'%20width='167'%20height='121'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKcAAAB5CAYAAABcIjGzAAAAAXNSR0IArs4c6QAABj9JREFUeF7tnVvIpVMYx/cwDoMxXJhxuFAyyiElpEhckQuh3Dgkp0JqruScEqK5IBNySo5Drsgp5XSDQhQuuDNFjEMZh2FmmGRqZv/smfXt17eed/es3t9c/b81az3rWf/n17v2/lrfeheM/KcDSR1YkDQv09KBkXAKQVoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxIRTBtI6IJxpS2NiwikDaR0QzrSlMTHhlIG0Dghn2tKYmHDKQFoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxIRTBtI6IJxpS2NiwikDaR0QzrSlMTHhlIG0Dghn2tKYmHDKQFoHhDNtaUxMOGUgrQPCmbY0JiacMpDWAeFMWxoTE04ZSOuAcKYtjYkJpwykdUA405bGxISzjoFTMHwN9NfQl0K/AH0o9CPQb0C/Cb0S+lzoO6BvgV4I/SD0ztCrob+A3gX6iMJcdc51GC2cHUyao4tw1vk352jhrDNXOOv8E84e/SOc3BbXYs510EuhL4N+Cvp26Pehl0BfC70P9PLCtv4K2j8rbNOno30Z9Ea39R4J6jG0cPZortt6nbnCWeef23qP/vFb7d6Y5xfoTdDs8xvaN0PvCb0BenFhq/2jw/o4lvnwI8GPhfiL0N5lrg7pdOvik7ObT6Vewlnnn0/OHv0Tzh7N9cnZo7mGrnNAOOv8c3SPDghnj+Yaus4B4azzz9E9OiCcPZpr6DoHhLPOP0f36IBw1pl7MIbTy5/RTs1ferP9VPR/B5rH2/5G+wHQP0D/Bb1foc+BaN+1sPyv6myJGS2cdT4KZ51/c44WzjpzhbPOP+Hs0T+Gfhs/PFOYk9vux+hzNfSV0AdBvwvNk/bfo52n39ej/aXCXPyosAp9np+RZ8I5I6OFM9hot/U4Q4UzzsstkYQzztASnI9hiougP4feHfo06Iehf4V+Dfo7aP4GgEfvzkKfT6B5bO8etL8aZ8v8Iwnn/L2bHCmccV765Az2UjiDDfXJGWyo4eIcEM44L40U7IBwBhtquDgHhDPOSyMFOyCcwYYaLs4B4Yzz0kjBDghnsKGGi3NAOOO8NFKwA8IZbKjh4hwQzjgvefyMly3wVDmPrl2Bqb+Bvhj6oUI7j7S9hz7HQ38IfRg0j+0dh/a7oM+HvgD6UeizJ6y7ED+fB3099G3Ql0M/Ab3twlzhFM6tDghnHAvpIvnkHJfEJ2cCPLl9H1LYpo9BOy+GPRLtR0EfDv049InQL0M/C81jcmegnXfC34h23kv/XGFbvxntvIv+6An/eTf9mYWtnBfm8vT/6+h/zVbttl5HuHCO/RPOOpbCRwuncIZDFRXwSQTiKXe+roV/q34n+t8A/S30rdAfQfMbLT8S8LcBvDf+A4zdC3rfQs7n7GhrHY1GV6H90zmM4zZ9P/qdBH0v9HXQvE//Prf1GDyFc+yjcMYwFRZFOIUzDCYDNeSA39YbKtbQUhXOoVW8ofUKZ0PFGlqqwjm0ije0XuFsqFhDS1U4h1bxhtYrnA0Va2ipCufQKt7QeoWzoWINLVXhHFrFG1qvcDZUrKGlKpxDq3hD6xXOhoo1tFSFc2gVb2i9wtlQsYaWqnAOreINrVc4GyrW0FIVzqFVvKH1CmdDxRpaqsI5tIo3tF7hjCvWYoTi29Y4A/9+/Hf8x1Jovj+d18tsQJ+N0HtA8/3sm9G+E/Qm6D+hF0GTC87L+LtNWMc1L8P/rZ2vxcI5X+e2HyecY0+EM46rkEjCKZwhIPURhC9g5cWo3NZ+wsT7Qy8vbPFvof2Ewhb8ANrXQPNam6fRzotneT0Mb3rjDXKl97+/OGHiCvx8E3TpxbRTa+C2PtWizh2Ec2yVcHbGZjYdhVM4Z0Nax1l4gxovstp2r/loNOLbhHlPO79Nn4z5FkIzDrd13izH+F9iLO9fX4329dC8YJbbOt/bfiz63w3NjxP/NnO+Vei3EvqSjr5u6ea2/n/c2r6vcI49Ec46lsJHC6dwhkOVLSAvfV2XLbl55NPl12pTw7qtT7VoJh2Ecwc2C+dM2Js6iXAK51RI7JDIAZ+ciYphKv914B8yIqlXZ3YxPAAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",imageSources={light:{position:"https://sdk.incode.com/sdk/tutorials/id-position.gif",shadow:"https://sdk.incode.com/sdk/tutorials/id-shadow.gif"},dark:{position:"https://sdk.incode.com/sdk/tutorials/front-dark.gif",shadow:"https://sdk.incode.com/sdk/tutorials/front-shadow-dark.gif"}};function TutorialFront$1({onSuccess:Be,token:Le={token:""},ageAssurance:Ye}){const{t:tt}=useTranslation$1();useScreenEvents({module:eventModuleNames.front,screen:eventScreenNames.frontTutorial,token:Le==null?void 0:Le.token});const nt=React.useRef(null);useAutoFocus(nt,!0);const[ft,ht]=React.useState(tt("common.continue")),[gt,At]=React.useState(()=>tt(`tutorial.front.${Ye?"ageVerification":"titleFrame"}`)),[xt,Et]=React.useState(()=>Ye?tt("tutorial.front.ageVerificationSubtitle"):null),[yt,Ct]=React.useState(!0),[kt,vt]=React.useState(null),bt=Lt=>{const Nt=options.darkMode?"dark":"light";return imageSources[Nt][Lt]},It=()=>{ht(tt("common.continue")),At(tt("tutorial.front.titleFrame")),Et(null),Ct(!0)},wt=()=>{ht(tt("common.readyToScan")),At(tt("tutorial.front.titleGlare")),Et(null),Ct(!1)},Rt=()=>{switch(kt.slides[kt.activeIndex].id){case"AGE_ASSURANCE":It(),kt.slideTo(1);break;case"FRAME_INSTRUCTIONS":wt(),Bt(),kt.slideTo(Ye?2:1);break;case"GLARE_INSTRUCTIONS":Tt();break}};React.useEffect(()=>{Le&&addEvent({token:Le==null?void 0:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"ID Preparation feedbacks"})},[]);function Tt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be(!0)}const Bt=()=>{setTimeout(()=>{var Lt,Nt;(Lt=nt.current)==null||Lt.focus(),(Nt=nt.current)==null||Nt.blur()},0)};function Dt(Lt){const Nt=Lt.activeIndex,Pt=Lt.slides[Nt],Wt=Pt==null?void 0:Pt.getAttribute("id");Wt==="GLARE_INSTRUCTIONS"&&!Ye&&wt(),Wt==="FRAME_INSTRUCTIONS"&&It()}return mobile.isDesktop()?jsxRuntimeExports.jsx(Tutorial$1,{token:Le,src:"https://sdk.incode.com/sdk/tutorials/tutorial-front-desktop.mp4",next:Tt,type:"Front",header:jsxRuntimeExports.jsx(HiddenTitle,{"aria-hidden":"true",children:"Capture Front ID Tutorial"})}):jsxRuntimeExports.jsx(RootContainer,{cssSelector:"IncodeTutorialContainerFront",children:jsxRuntimeExports.jsxs(TutorialContainer$2,{children:[jsxRuntimeExports.jsx(TutorialHeader$1,{children:jsxRuntimeExports.jsxs("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderFront",children:[jsxRuntimeExports.jsx("h1",{ref:nt,tabIndex:-1,className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleFront",children:gt}),xt?jsxRuntimeExports.jsx(TutorialSubtitle,{children:xt}):null]})}),jsxRuntimeExports.jsxs(Swiper,{cssMode:!0,autoplay:!1,className:"IncodeSwiperComponent",onSwiper:vt,pagination:!0,modules:[Pagination],onSlideChange:Dt,children:[Ye?jsxRuntimeExports.jsx(SwiperSlide,{id:"AGE_ASSURANCE",style:{flexDirection:"column"},children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",style:{alignItems:"flex-start"},children:jsxRuntimeExports.jsxs(AgeStepsWrapper,{children:[jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"1"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep1")}),jsxRuntimeExports.jsx("img",{src:step1,alt:tt("tutorial.front.ageVerificationStep1")})]}),jsxRuntimeExports.jsx(AgeStepDivder,{}),jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"2"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep2")}),jsxRuntimeExports.jsx("img",{src:step2,alt:tt("tutorial.front.ageVerificationStep2")})]}),jsxRuntimeExports.jsx(AgeStepDivder,{}),jsxRuntimeExports.jsxs(AgeStepContainer,{children:[jsxRuntimeExports.jsx(AgeStep,{children:"3"}),jsxRuntimeExports.jsx(AgeText,{children:tt("tutorial.front.ageVerificationStep3")}),jsxRuntimeExports.jsx("img",{src:step3,alt:tt("tutorial.front.ageVerificationStep3")})]})]})})}):null,jsxRuntimeExports.jsx(SwiperSlide,{id:"FRAME_INSTRUCTIONS",children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",children:jsxRuntimeExports.jsx("img",{src:bt("position"),"aria-hidden":!yt,alt:tt("tutorial.front.titleAriaFrame")})})}),jsxRuntimeExports.jsx(SwiperSlide,{id:"GLARE_INSTRUCTIONS",children:jsxRuntimeExports.jsx(VideoContainer,{className:"IncodeTutorialAnimationContainer",children:jsxRuntimeExports.jsx("img",{src:bt("shadow"),alt:tt("tutorial.front.titleGlare")})})})]}),jsxRuntimeExports.jsx(FrontTutorialAction,{className:cx("IncodeTutorialButtonContainer","IncodeTutorialButtonContainerFront"),children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonFront"),onClick:Rt,children:ft})})]})})}const TutorialPapperDLHeader=({title:Be,subtitle:Le})=>jsxRuntimeExports.jsxs("div",{className:"IncodeTutorialHeader IncodeTutorialHeaderFront",children:[jsxRuntimeExports.jsx("h1",{className:"IncodeText IncodeH1 IncodeTutorialHeaderTitle IncodeTutorialHeaderTitleFront",children:Be}),jsxRuntimeExports.jsx("p",{style:{fontSize:"18px"},children:Le})]}),videoUrl="https://sdk.incode.com/sdk/tutorials/paper-license-tutorial.mp4";function TutorialFront({onSuccess:Be,token:Le}){const{t:Ye}=useTranslation$1();React.useEffect(()=>{Le!=null&&Le.token&&addEvent({token:Le.token,code:"tutorialVideoStarted",payload:{tutorialFrontID:!0},module:"ID Capture",screen:"ID Preparation feedbacks"})},[]);function tt(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be()}return jsxRuntimeExports.jsxs(TutorialContainer$2,{children:[jsxRuntimeExports.jsx(TutorialHeader$1,{children:jsxRuntimeExports.jsx(TutorialPapperDLHeader,{title:Ye("tutorial.paperDL.titleFrame"),subtitle:Ye("tutorial.paperDL.subtitle")})}),jsxRuntimeExports.jsx(VideoContainer,{children:jsxRuntimeExports.jsx("video",{preload:"auto",playsInline:!0,src:videoUrl,muted:!0,autoPlay:!0,loop:!0})}),jsxRuntimeExports.jsx(FrontTutorialAction,{className:cx("IncodeTutorialButtonContainer","IncodeTutorialButtonContainerFront"),children:jsxRuntimeExports.jsx(StyledButton$b,{className:cx("IncodeTutorialButton","IncodeTutorialButtonFront"),onClick:tt,theme:exports.theme,children:Ye("common.continue")})})]})}const TutorialPassportHeader=()=>{const{t:Be}=useTranslation$1();return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h1",{children:Be("tutorial.passport1")}),jsxRuntimeExports.jsx("span",{children:Be("tutorial.passport2")})]})};function TutorialPassport({onSuccess:Be,token:Le,src:Ye,...tt}){const nt=options.darkMode?"https://sdk.incode.com/sdk/tutorials/passport-dark.mp4":"https://sdk.incode.com/sdk/tutorials/passport.gif";Ye=Ye||nt;const{t:ft}=useTranslation$1();React.useEffect(()=>{addEvent({token:Le.token,code:"tutorialPassport",payload:{tutorialPassport:!0}})},[Le.token]);function ht(){addEvent({token:Le==null?void 0:Le.token,code:"ctaTapped",payload:{cta:"Continue"},module:"ID capture",screen:"ID Preparation feedbacks"}),Be()}return jsxRuntimeExports.jsx(Tutorial$1,{...tt,token:Le,src:Ye,header:jsxRuntimeExports.jsx(TutorialPassportHeader,{}),children:jsxRuntimeExports.jsx(ButtonsContainer$6,{children:jsxRuntimeExports.jsx(StyledButton$b,{theme:exports.theme,className:cx("IncodeTutorialButton","IncodeTutorialButtonSelfie"),onClick:ht,children:ft("common.continue")})})})}function addCreditCardBack({token:Be,base64Image:Le,onProgress:Ye=emptyFunc}){return exports.api.post("/omni/add/credit-card-back/v2",{base64Image:Le},{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":"application/json"},onUploadProgress:({loaded:tt,total:nt})=>Ye(tt/nt*100)}).then(tt=>tt.data).catch(tt=>Promise.reject(tt.response.data))}function addCreditCardFront({token:Be,base64Image:Le,onProgress:Ye=emptyFunc}){return exports.api.post("/omni/add/credit-card-front/v2",{base64Image:Le},{headers:{"X-Incode-Hardware-Id":Be,"Content-Type":"application/json"},onUploadProgress:({loaded:tt,total:nt})=>Ye(tt/nt*100)}).then(tt=>tt.data).catch(tt=>Promise.reject(tt.response.data))}class IdDetectorBase{constructor(){this.pipelineProfile=null,this.currentCanvas=null}async initialize({onCapturing:Le,onFarAway:Ye,onGlare:tt,onBlur:nt,onIDNotDetected:ft,onMaskChange:ht,onDetectionStarted:gt,onSwitchToManualCapture:At,onIDTypeChange:xt,onIDSideChange:Et,onCapturingCounterValueChange:yt,idType:Ct,isFixedMask:kt,isBlurCheckEnabled:vt,isGlareCheckEnabled:bt,pipelineProfile:It,isV2:wt=!1,onCapture:Rt=()=>{},idDetectedTimeout:Tt=0,autocaptureTimeout:Bt=-1}){this.pipelineProfile=It;const Dt=this.pipelineProfile.pipelineType;this.pipelineProfile.reconfigureParams(mobile.isDesktop(),wt),await MlWasmJSApi$1.setIdCaptureCallbacks(Dt,Ye,gt,ht,nt,tt,this.getOnCapturing(Le),this.getOnCapture(Rt),this.getOnBestFrame(),ft,At,xt,Et,yt,()=>{}),await MlWasmJSApi$1.setIdCaptureThresholds(Dt,It.parameters.sharpnessThreshold,It.parameters.sharpnessChangeThreshold,It.parameters.glareThreshold,It.parameters.classificationThreshold,It.parameters.sideThreshold,It.parameters.iouThreshold,Tt,Bt,It.parameters.framesAggregationInterval,It.parameters.minFaceIdQualityScore),await MlWasmJSApi$1.setIdCaptureConfigParams(Dt,kt,localStorage.getItem("isIPhone14OrHigher")==="true",Ct,vt,bt,It.parameters.isIdFaceQualityCheckEnabled,It.parameters.isIouCheckEnabled,!1),await MlWasmJSApi$1.setIdCaptureGeometryParams(Dt,It.parameters.areaDown,It.parameters.areaUp,It.parameters.areaIOSPassportUp,It.parameters.areaIOSPassportDown,It.parameters.widthIOSUp,It.parameters.widthIOSDown,It.parameters.widthDown,It.parameters.widthUp,window.outerWidth,window.outerHeight,window.innerWidth,window.innerHeight),MlWasmJSApi$1.setIdCaptureModelType(Dt,this.pipelineProfile.parameters.modelType)}async detectCommon(Le,Ye){try{this.currentCanvas=Le;const tt=Le.getImageData();await MlWasmJSApi$1.allocateImageBuffers(tt.width,tt.height),await MlWasmJSApi$1.process(tt,Ye),this.currentCanvas.release()}catch(tt){console.error(`Exception: ${tt}`)}}}class IdCapture extends IdDetectorBase{constructor(){super(...arguments),this.bestCanvas=null,this.qualityElements=null,this.bestOrientation=null}getOnBestFrame(){return(Le,Ye,tt)=>{this.bestCanvas=this.currentCanvas.clone(),this.qualityElements={glare:Ye,sharpness:Le},this.bestOrientation=tt}}getOnCapture(Le){return()=>{this.bestCanvas.updateBase64Image(),this.bestCanvas.updateBlob(),Le(this.bestCanvas,this.qualityElements,this.bestOrientation)}}getOnCapturing(Le){return()=>{Le()}}async detect(Le){this.detectCommon(Le,this.pipelineProfile.pipelineType)}}class IdVideoSelfie extends IdDetectorBase{getOnCapturing(Le){return()=>{Le(this.currentMode,this.currentCanvas.clone().getBase64Image())}}getOnCapture(Le){return()=>{}}getOnBestFrame(){return(Le,Ye,tt)=>{}}async detect(Le){this.detectCommon(Le,this.pipelineProfile.pipelineType)}updateCurrentMode(Le){this.currentMode=Le}}function getImages$1({token:Be,body:Le,onDownloadProgress:Ye}){return exports.api.post("/omni/get/images",Le,{headers:{"X-Incode-Hardware-Id":Be},onDownloadProgress:({loaded:tt,total:nt})=>{Ye==null||Ye(tt*100/nt)}}).then(tt=>tt.data)}var __webpack_require__={};__webpack_require__.d=(Be,Le)=>{for(var Ye in Le)__webpack_require__.o(Le,Ye)&&!__webpack_require__.o(Be,Ye)&&Object.defineProperty(Be,Ye,{enumerable:!0,get:Le[Ye]})},__webpack_require__.o=(Be,Le)=>Object.prototype.hasOwnProperty.call(Be,Le);var __webpack_exports__=globalThis.pdfjsLib={};__webpack_require__.d(__webpack_exports__,{AbortException:()=>AbortException,AnnotationEditorLayer:()=>AnnotationEditorLayer,AnnotationEditorParamsType:()=>AnnotationEditorParamsType,AnnotationEditorType:()=>AnnotationEditorType,AnnotationEditorUIManager:()=>AnnotationEditorUIManager,AnnotationLayer:()=>AnnotationLayer$1,AnnotationMode:()=>AnnotationMode,ColorPicker:()=>ColorPicker,DOMSVGFactory:()=>DOMSVGFactory,DrawLayer:()=>DrawLayer,FeatureTest:()=>util_FeatureTest,GlobalWorkerOptions:()=>GlobalWorkerOptions,ImageKind:()=>util_ImageKind,InvalidPDFException:()=>InvalidPDFException,MissingPDFException:()=>MissingPDFException,OPS:()=>OPS,OutputScale:()=>OutputScale,PDFDataRangeTransport:()=>PDFDataRangeTransport$1,PDFDateString:()=>PDFDateString,PDFWorker:()=>PDFWorker,PasswordResponses:()=>PasswordResponses$1,PermissionFlag:()=>PermissionFlag,PixelsPerInch:()=>PixelsPerInch,RenderingCancelledException:()=>RenderingCancelledException,TextLayer:()=>TextLayer$1,UnexpectedResponseException:()=>UnexpectedResponseException,Util:()=>Util,VerbosityLevel:()=>VerbosityLevel,XfaLayer:()=>XfaLayer,build:()=>build,createValidAbsoluteUrl:()=>createValidAbsoluteUrl,fetchData:()=>fetchData,getDocument:()=>getDocument,getFilenameFromUrl:()=>getFilenameFromUrl$1,getPdfFilenameFromUrl:()=>getPdfFilenameFromUrl,getXfaPageViewport:()=>getXfaPageViewport,isDataScheme:()=>isDataScheme,isPdfFile:()=>isPdfFile,noContextMenu:()=>noContextMenu,normalizeUnicode:()=>normalizeUnicode,setLayerDimensions:()=>setLayerDimensions,shadow:()=>shadow,version:()=>version});const isNodeJS=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),IDENTITY_MATRIX=[1,0,0,1,0,0],FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],MAX_IMAGE_SIZE_TO_CACHE=1e7,LINE_FACTOR=1.35,RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},AnnotationEditorPrefix="pdfjs_internal_editor_",AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_DEFAULT_COLOR:32,HIGHLIGHT_THICKNESS:33,HIGHLIGHT_FREE:34,HIGHLIGHT_SHOW_ALL:35},PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},util_ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,WIDGET:20},AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},VerbosityLevel={ERRORS:0,WARNINGS:1,INFOS:5},OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93},PasswordResponses$1={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let verbosity=VerbosityLevel.WARNINGS;function setVerbosityLevel(Be){Number.isInteger(Be)&&(verbosity=Be)}function getVerbosityLevel(){return verbosity}function info(Be){verbosity>=VerbosityLevel.INFOS&&console.log(`Info: ${Be}`)}function warn$1(Be){verbosity>=VerbosityLevel.WARNINGS&&console.log(`Warning: ${Be}`)}function unreachable$1(Be){throw new Error(Be)}function assert(Be,Le){Be||unreachable$1(Le)}function _isValidProtocol(Be){switch(Be==null?void 0:Be.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function createValidAbsoluteUrl(Be,Le=null,Ye=null){if(!Be)return null;try{if(Ye&&typeof Be=="string"){if(Ye.addDefaultProtocol&&Be.startsWith("www.")){const nt=Be.match(/\./g);(nt==null?void 0:nt.length)>=2&&(Be=`http://${Be}`)}if(Ye.tryConvertEncoding)try{Be=stringToUTF8String(Be)}catch{}}const tt=Le?new URL(Be,Le):new URL(Be);if(_isValidProtocol(tt))return tt}catch{}return null}function shadow(Be,Le,Ye,tt=!1){return Object.defineProperty(Be,Le,{value:Ye,enumerable:!tt,configurable:!0,writable:!1}),Ye}const BaseException=function(){function Le(Ye,tt){this.message=Ye,this.name=tt}return Le.prototype=new Error,Le.constructor=Le,Le}();class PasswordException extends BaseException{constructor(Le,Ye){super(Le,"PasswordException"),this.code=Ye}}class UnknownErrorException extends BaseException{constructor(Le,Ye){super(Le,"UnknownErrorException"),this.details=Ye}}class InvalidPDFException extends BaseException{constructor(Le){super(Le,"InvalidPDFException")}}class MissingPDFException extends BaseException{constructor(Le){super(Le,"MissingPDFException")}}class UnexpectedResponseException extends BaseException{constructor(Le,Ye){super(Le,"UnexpectedResponseException"),this.status=Ye}}class FormatError extends BaseException{constructor(Le){super(Le,"FormatError")}}class AbortException extends BaseException{constructor(Le){super(Le,"AbortException")}}function bytesToString(Be){(typeof Be!="object"||(Be==null?void 0:Be.length)===void 0)&&unreachable$1("Invalid argument for bytesToString");const Le=Be.length,Ye=8192;if(Le<Ye)return String.fromCharCode.apply(null,Be);const tt=[];for(let nt=0;nt<Le;nt+=Ye){const ft=Math.min(nt+Ye,Le),ht=Be.subarray(nt,ft);tt.push(String.fromCharCode.apply(null,ht))}return tt.join("")}function stringToBytes(Be){typeof Be!="string"&&unreachable$1("Invalid argument for stringToBytes");const Le=Be.length,Ye=new Uint8Array(Le);for(let tt=0;tt<Le;++tt)Ye[tt]=Be.charCodeAt(tt)&255;return Ye}function string32(Be){return String.fromCharCode(Be>>24&255,Be>>16&255,Be>>8&255,Be&255)}function objectFromMap(Be){const Le=Object.create(null);for(const[Ye,tt]of Be)Le[Ye]=tt;return Le}function isLittleEndian(){const Be=new Uint8Array(4);return Be[0]=1,new Uint32Array(Be.buffer,0,1)[0]===1}function isEvalSupported(){try{return new Function(""),!0}catch{return!1}}class util_FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",isLittleEndian())}static get isEvalSupported(){return shadow(this,"isEvalSupported",isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.platform)=="string"?shadow(this,"platform",{isMac:navigator.platform.includes("Mac"),isWindows:navigator.platform.includes("Win"),isFirefox:typeof(navigator==null?void 0:navigator.userAgent)=="string"&&navigator.userAgent.includes("Firefox")}):shadow(this,"platform",{isMac:!1,isWindows:!1,isFirefox:!1})}static get isCSSRoundSupported(){var Le,Ye;return shadow(this,"isCSSRoundSupported",(Ye=(Le=globalThis.CSS)==null?void 0:Le.supports)==null?void 0:Ye.call(Le,"width: round(1.5px, 1px)"))}}const hexNumbers=Array.from(Array(256).keys(),Be=>Be.toString(16).padStart(2,"0"));class Util{static makeHexColor(Le,Ye,tt){return`#${hexNumbers[Le]}${hexNumbers[Ye]}${hexNumbers[tt]}`}static scaleMinMax(Le,Ye){let tt;Le[0]?(Le[0]<0&&(tt=Ye[0],Ye[0]=Ye[2],Ye[2]=tt),Ye[0]*=Le[0],Ye[2]*=Le[0],Le[3]<0&&(tt=Ye[1],Ye[1]=Ye[3],Ye[3]=tt),Ye[1]*=Le[3],Ye[3]*=Le[3]):(tt=Ye[0],Ye[0]=Ye[1],Ye[1]=tt,tt=Ye[2],Ye[2]=Ye[3],Ye[3]=tt,Le[1]<0&&(tt=Ye[1],Ye[1]=Ye[3],Ye[3]=tt),Ye[1]*=Le[1],Ye[3]*=Le[1],Le[2]<0&&(tt=Ye[0],Ye[0]=Ye[2],Ye[2]=tt),Ye[0]*=Le[2],Ye[2]*=Le[2]),Ye[0]+=Le[4],Ye[1]+=Le[5],Ye[2]+=Le[4],Ye[3]+=Le[5]}static transform(Le,Ye){return[Le[0]*Ye[0]+Le[2]*Ye[1],Le[1]*Ye[0]+Le[3]*Ye[1],Le[0]*Ye[2]+Le[2]*Ye[3],Le[1]*Ye[2]+Le[3]*Ye[3],Le[0]*Ye[4]+Le[2]*Ye[5]+Le[4],Le[1]*Ye[4]+Le[3]*Ye[5]+Le[5]]}static applyTransform(Le,Ye){const tt=Le[0]*Ye[0]+Le[1]*Ye[2]+Ye[4],nt=Le[0]*Ye[1]+Le[1]*Ye[3]+Ye[5];return[tt,nt]}static applyInverseTransform(Le,Ye){const tt=Ye[0]*Ye[3]-Ye[1]*Ye[2],nt=(Le[0]*Ye[3]-Le[1]*Ye[2]+Ye[2]*Ye[5]-Ye[4]*Ye[3])/tt,ft=(-Le[0]*Ye[1]+Le[1]*Ye[0]+Ye[4]*Ye[1]-Ye[5]*Ye[0])/tt;return[nt,ft]}static getAxialAlignedBoundingBox(Le,Ye){const tt=this.applyTransform(Le,Ye),nt=this.applyTransform(Le.slice(2,4),Ye),ft=this.applyTransform([Le[0],Le[3]],Ye),ht=this.applyTransform([Le[2],Le[1]],Ye);return[Math.min(tt[0],nt[0],ft[0],ht[0]),Math.min(tt[1],nt[1],ft[1],ht[1]),Math.max(tt[0],nt[0],ft[0],ht[0]),Math.max(tt[1],nt[1],ft[1],ht[1])]}static inverseTransform(Le){const Ye=Le[0]*Le[3]-Le[1]*Le[2];return[Le[3]/Ye,-Le[1]/Ye,-Le[2]/Ye,Le[0]/Ye,(Le[2]*Le[5]-Le[4]*Le[3])/Ye,(Le[4]*Le[1]-Le[5]*Le[0])/Ye]}static singularValueDecompose2dScale(Le){const Ye=[Le[0],Le[2],Le[1],Le[3]],tt=Le[0]*Ye[0]+Le[1]*Ye[2],nt=Le[0]*Ye[1]+Le[1]*Ye[3],ft=Le[2]*Ye[0]+Le[3]*Ye[2],ht=Le[2]*Ye[1]+Le[3]*Ye[3],gt=(tt+ht)/2,At=Math.sqrt((tt+ht)**2-4*(tt*ht-ft*nt))/2,xt=gt+At||1,Et=gt-At||1;return[Math.sqrt(xt),Math.sqrt(Et)]}static normalizeRect(Le){const Ye=Le.slice(0);return Le[0]>Le[2]&&(Ye[0]=Le[2],Ye[2]=Le[0]),Le[1]>Le[3]&&(Ye[1]=Le[3],Ye[3]=Le[1]),Ye}static intersect(Le,Ye){const tt=Math.max(Math.min(Le[0],Le[2]),Math.min(Ye[0],Ye[2])),nt=Math.min(Math.max(Le[0],Le[2]),Math.max(Ye[0],Ye[2]));if(tt>nt)return null;const ft=Math.max(Math.min(Le[1],Le[3]),Math.min(Ye[1],Ye[3])),ht=Math.min(Math.max(Le[1],Le[3]),Math.max(Ye[1],Ye[3]));return ft>ht?null:[tt,ft,nt,ht]}static bezierBoundingBox(Le,Ye,tt,nt,ft,ht,gt,At,xt){return xt?(xt[0]=Math.min(xt[0],Le,gt),xt[1]=Math.min(xt[1],Ye,At),xt[2]=Math.max(xt[2],Le,gt),xt[3]=Math.max(xt[3],Ye,At)):xt=[Math.min(Le,gt),Math.min(Ye,At),Math.max(Le,gt),Math.max(Ye,At)],y0(this,Ns,P9).call(this,Le,tt,ft,gt,Ye,nt,ht,At,3*(-Le+3*(tt-ft)+gt),6*(Le-2*tt+ft),3*(tt-Le),xt),y0(this,Ns,P9).call(this,Le,tt,ft,gt,Ye,nt,ht,At,3*(-Ye+3*(nt-ht)+At),6*(Ye-2*nt+ht),3*(nt-Ye),xt),xt}}Ns=new WeakSet,Yd=function(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et){if(xt<=0||xt>=1)return;const yt=1-xt,Ct=xt*xt,kt=Ct*xt,vt=yt*(yt*(yt*Le+3*xt*Ye)+3*Ct*tt)+kt*nt,bt=yt*(yt*(yt*ft+3*xt*ht)+3*Ct*gt)+kt*At;Et[0]=Math.min(Et[0],vt),Et[1]=Math.min(Et[1],bt),Et[2]=Math.max(Et[2],vt),Et[3]=Math.max(Et[3],bt)},P9=function(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct){if(Math.abs(xt)<1e-12){Math.abs(Et)>=1e-12&&y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,-yt/Et,Ct);return}const kt=Et**2-4*yt*xt;if(kt<0)return;const vt=Math.sqrt(kt),bt=2*xt;y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,(-Et+vt)/bt,Ct),y0(this,Ns,Yd).call(this,Le,Ye,tt,nt,ft,ht,gt,At,(-Et-vt)/bt,Ct)},k0(Util,Ns);function stringToUTF8String(Be){return decodeURIComponent(escape(Be))}let NormalizeRegex=null,NormalizationMap=null;function normalizeUnicode(Be){return NormalizeRegex||(NormalizeRegex=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,NormalizationMap=new Map([["ſt","ſt"]])),Be.replaceAll(NormalizeRegex,(Le,Ye,tt)=>Ye?Ye.normalize("NFKC"):NormalizationMap.get(tt))}function getUuid(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const Be=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(Be);else for(let Le=0;Le<32;Le++)Be[Le]=Math.floor(Math.random()*255);return bytesToString(Be)}const AnnotationPrefix="pdfjs_internal_id_",FontRenderOps={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};function toBase64Util(Be){return Uint8Array.prototype.toBase64?Be.toBase64():btoa(bytesToString(Be))}const SVG_NS="http://www.w3.org/2000/svg",d2=class d2{};Nn(d2,"CSS",96),Nn(d2,"PDF",72),Nn(d2,"PDF_TO_CSS_UNITS",d2.CSS/d2.PDF);let PixelsPerInch=d2;async function fetchData(Be,Le="text"){if(isValidFetchUrl(Be,document.baseURI)){const Ye=await fetch(Be);if(!Ye.ok)throw new Error(Ye.statusText);switch(Le){case"arraybuffer":return Ye.arrayBuffer();case"blob":return Ye.blob();case"json":return Ye.json()}return Ye.text()}return new Promise((Ye,tt)=>{const nt=new XMLHttpRequest;nt.open("GET",Be,!0),nt.responseType=Le,nt.onreadystatechange=()=>{if(nt.readyState===XMLHttpRequest.DONE){if(nt.status===200||nt.status===0){switch(Le){case"arraybuffer":case"blob":case"json":Ye(nt.response);return}Ye(nt.responseText);return}tt(new Error(nt.statusText))}},nt.send(null)})}class PageViewport{constructor({viewBox:Le,scale:Ye,rotation:tt,offsetX:nt=0,offsetY:ft=0,dontFlip:ht=!1}){this.viewBox=Le,this.scale=Ye,this.rotation=tt,this.offsetX=nt,this.offsetY=ft;const gt=(Le[2]+Le[0])/2,At=(Le[3]+Le[1])/2;let xt,Et,yt,Ct;switch(tt%=360,tt<0&&(tt+=360),tt){case 180:xt=-1,Et=0,yt=0,Ct=1;break;case 90:xt=0,Et=1,yt=1,Ct=0;break;case 270:xt=0,Et=-1,yt=-1,Ct=0;break;case 0:xt=1,Et=0,yt=0,Ct=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}ht&&(yt=-yt,Ct=-Ct);let kt,vt,bt,It;xt===0?(kt=Math.abs(At-Le[1])*Ye+nt,vt=Math.abs(gt-Le[0])*Ye+ft,bt=(Le[3]-Le[1])*Ye,It=(Le[2]-Le[0])*Ye):(kt=Math.abs(gt-Le[0])*Ye+nt,vt=Math.abs(At-Le[1])*Ye+ft,bt=(Le[2]-Le[0])*Ye,It=(Le[3]-Le[1])*Ye),this.transform=[xt*Ye,Et*Ye,yt*Ye,Ct*Ye,kt-xt*Ye*gt-yt*Ye*At,vt-Et*Ye*gt-Ct*Ye*At],this.width=bt,this.height=It}get rawDims(){const{viewBox:Le}=this;return shadow(this,"rawDims",{pageWidth:Le[2]-Le[0],pageHeight:Le[3]-Le[1],pageX:Le[0],pageY:Le[1]})}clone({scale:Le=this.scale,rotation:Ye=this.rotation,offsetX:tt=this.offsetX,offsetY:nt=this.offsetY,dontFlip:ft=!1}={}){return new PageViewport({viewBox:this.viewBox.slice(),scale:Le,rotation:Ye,offsetX:tt,offsetY:nt,dontFlip:ft})}convertToViewportPoint(Le,Ye){return Util.applyTransform([Le,Ye],this.transform)}convertToViewportRectangle(Le){const Ye=Util.applyTransform([Le[0],Le[1]],this.transform),tt=Util.applyTransform([Le[2],Le[3]],this.transform);return[Ye[0],Ye[1],tt[0],tt[1]]}convertToPdfPoint(Le,Ye){return Util.applyInverseTransform([Le,Ye],this.transform)}}class RenderingCancelledException extends BaseException{constructor(Le,Ye=0){super(Le,"RenderingCancelledException"),this.extraDelay=Ye}}function isDataScheme(Be){const Le=Be.length;let Ye=0;for(;Ye<Le&&Be[Ye].trim()==="";)Ye++;return Be.substring(Ye,Ye+5).toLowerCase()==="data:"}function isPdfFile(Be){return typeof Be=="string"&&/\.pdf$/i.test(Be)}function getFilenameFromUrl$1(Be){return[Be]=Be.split(/[#?]/,1),Be.substring(Be.lastIndexOf("/")+1)}function getPdfFilenameFromUrl(Be,Le="document.pdf"){if(typeof Be!="string")return Le;if(isDataScheme(Be))return warn$1('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),Le;const Ye=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,tt=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,nt=Ye.exec(Be);let ft=tt.exec(nt[1])||tt.exec(nt[2])||tt.exec(nt[3]);if(ft&&(ft=ft[0],ft.includes("%")))try{ft=tt.exec(decodeURIComponent(ft))[0]}catch{}return ft||Le}class StatTimer{constructor(){Nn(this,"started",Object.create(null));Nn(this,"times",[])}time(Le){Le in this.started&&warn$1(`Timer is already running for ${Le}`),this.started[Le]=Date.now()}timeEnd(Le){Le in this.started||warn$1(`Timer has not been started for ${Le}`),this.times.push({name:Le,start:this.started[Le],end:Date.now()}),delete this.started[Le]}toString(){const Le=[];let Ye=0;for(const{name:tt}of this.times)Ye=Math.max(tt.length,Ye);for(const{name:tt,start:nt,end:ft}of this.times)Le.push(`${tt.padEnd(Ye)} ${ft-nt}ms
|
|
4015
4015
|
`);return Le.join("")}}function isValidFetchUrl(Be,Le){try{const{protocol:Ye}=Le?new URL(Be,Le):new URL(Be);return Ye==="http:"||Ye==="https:"}catch{return!1}}function noContextMenu(Be){Be.preventDefault()}function deprecated(Be){console.log("Deprecated API usage: "+Be)}class PDFDateString{static toDateObject(Le){if(!Le||typeof Le!="string")return null;Ht(this,Jl)||C0(this,Jl,new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const Ye=Ht(this,Jl).exec(Le);if(!Ye)return null;const tt=parseInt(Ye[1],10);let nt=parseInt(Ye[2],10);nt=nt>=1&&nt<=12?nt-1:0;let ft=parseInt(Ye[3],10);ft=ft>=1&&ft<=31?ft:1;let ht=parseInt(Ye[4],10);ht=ht>=0&&ht<=23?ht:0;let gt=parseInt(Ye[5],10);gt=gt>=0&><=59?gt:0;let At=parseInt(Ye[6],10);At=At>=0&&At<=59?At:0;const xt=Ye[7]||"Z";let Et=parseInt(Ye[8],10);Et=Et>=0&&Et<=23?Et:0;let yt=parseInt(Ye[9],10)||0;return yt=yt>=0&&yt<=59?yt:0,xt==="-"?(ht+=Et,gt+=yt):xt==="+"&&(ht-=Et,gt-=yt),new Date(Date.UTC(tt,nt,ft,ht,gt,At))}}Jl=new WeakMap,k0(PDFDateString,Jl);function getXfaPageViewport(Be,{scale:Le=1,rotation:Ye=0}){const{width:tt,height:nt}=Be.attributes.style,ft=[0,0,parseInt(tt),parseInt(nt)];return new PageViewport({viewBox:ft,scale:Le,rotation:Ye})}function getRGB(Be){if(Be.startsWith("#")){const Le=parseInt(Be.slice(1),16);return[(Le&16711680)>>16,(Le&65280)>>8,Le&255]}return Be.startsWith("rgb(")?Be.slice(4,-1).split(",").map(Le=>parseInt(Le)):Be.startsWith("rgba(")?Be.slice(5,-1).split(",").map(Le=>parseInt(Le)).slice(0,3):(warn$1(`Not a valid color format: "${Be}"`),[0,0,0])}function getColorValues(Be){const Le=document.createElement("span");Le.style.visibility="hidden",document.body.append(Le);for(const Ye of Be.keys()){Le.style.color=Ye;const tt=window.getComputedStyle(Le).color;Be.set(Ye,getRGB(tt))}Le.remove()}function getCurrentTransform(Be){const{a:Le,b:Ye,c:tt,d:nt,e:ft,f:ht}=Be.getTransform();return[Le,Ye,tt,nt,ft,ht]}function getCurrentTransformInverse(Be){const{a:Le,b:Ye,c:tt,d:nt,e:ft,f:ht}=Be.getTransform().invertSelf();return[Le,Ye,tt,nt,ft,ht]}function setLayerDimensions(Be,Le,Ye=!1,tt=!0){if(Le instanceof PageViewport){const{pageWidth:nt,pageHeight:ft}=Le.rawDims,{style:ht}=Be,gt=util_FeatureTest.isCSSRoundSupported,At=`var(--scale-factor) * ${nt}px`,xt=`var(--scale-factor) * ${ft}px`,Et=gt?`round(down, ${At}, var(--scale-round-x, 1px))`:`calc(${At})`,yt=gt?`round(down, ${xt}, var(--scale-round-y, 1px))`:`calc(${xt})`;!Ye||Le.rotation%180===0?(ht.width=Et,ht.height=yt):(ht.width=yt,ht.height=Et)}tt&&Be.setAttribute("data-main-rotation",Le.rotation)}class OutputScale{constructor(){const Le=window.devicePixelRatio||1;this.sx=Le,this.sy=Le}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}}const Ds=class Ds{constructor(Le){k0(this,La);k0(this,bo,null);k0(this,p2,null);k0(this,ji);k0(this,f2,null);k0(this,ec,null);C0(this,ji,Le),Ht(Ds,tc)||C0(Ds,tc,Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button"}))}render(){const Le=C0(this,bo,document.createElement("div"));Le.classList.add("editToolbar","hidden"),Le.setAttribute("role","toolbar");const Ye=Ht(this,ji)._uiManager._signal;Le.addEventListener("contextmenu",noContextMenu,{signal:Ye}),Le.addEventListener("pointerdown",y0(Ds,qu,$5),{signal:Ye});const tt=C0(this,f2,document.createElement("div"));tt.className="buttons",Le.append(tt);const nt=Ht(this,ji).toolbarPosition;if(nt){const{style:ft}=Le,ht=Ht(this,ji)._uiManager.direction==="ltr"?1-nt[0]:nt[0];ft.insetInlineEnd=`${100*ht}%`,ft.top=`calc(${100*nt[1]}% + var(--editor-toolbar-vert-offset))`}return y0(this,La,Y5).call(this),Le}get div(){return Ht(this,bo)}hide(){var Le;Ht(this,bo).classList.add("hidden"),(Le=Ht(this,p2))==null||Le.hideDropdown()}show(){var Le;Ht(this,bo).classList.remove("hidden"),(Le=Ht(this,ec))==null||Le.shown()}async addAltText(Le){const Ye=await Le.render();y0(this,La,Zd).call(this,Ye),Ht(this,f2).prepend(Ye,Ht(this,La,_9)),C0(this,ec,Le)}addColorPicker(Le){C0(this,p2,Le);const Ye=Le.renderButton();y0(this,La,Zd).call(this,Ye),Ht(this,f2).prepend(Ye,Ht(this,La,_9))}remove(){var Le;Ht(this,bo).remove(),(Le=Ht(this,p2))==null||Le.destroy(),C0(this,p2,null)}};bo=new WeakMap,p2=new WeakMap,ji=new WeakMap,f2=new WeakMap,ec=new WeakMap,tc=new WeakMap,qu=new WeakSet,$5=function(Le){Le.stopPropagation()},La=new WeakSet,K5=function(Le){Ht(this,ji)._focusEventsAllowed=!1,Le.preventDefault(),Le.stopPropagation()},q5=function(Le){Ht(this,ji)._focusEventsAllowed=!0,Le.preventDefault(),Le.stopPropagation()},Zd=function(Le){const Ye=Ht(this,ji)._uiManager._signal;Le.addEventListener("focusin",y0(this,La,K5).bind(this),{capture:!0,signal:Ye}),Le.addEventListener("focusout",y0(this,La,q5).bind(this),{capture:!0,signal:Ye}),Le.addEventListener("contextmenu",noContextMenu,{signal:Ye})},Y5=function(){const{editorType:Le,_uiManager:Ye}=Ht(this,ji),tt=document.createElement("button");tt.className="delete",tt.tabIndex=0,tt.setAttribute("data-l10n-id",Ht(Ds,tc)[Le]),y0(this,La,Zd).call(this,tt),tt.addEventListener("click",nt=>{Ye.delete()},{signal:Ye._signal}),Ht(this,f2).append(tt)},_9=function(){const Le=document.createElement("div");return Le.className="divider",Le},k0(Ds,qu),k0(Ds,tc,null);let EditorToolbar=Ds;class HighlightToolbar{constructor(Le){k0(this,Io);k0(this,nc,null);k0(this,h2,null);k0(this,m2);C0(this,m2,Le)}show(Le,Ye,tt){const[nt,ft]=y0(this,Io,J5).call(this,Ye,tt),{style:ht}=Ht(this,h2)||C0(this,h2,y0(this,Io,Z5).call(this));Le.append(Ht(this,h2)),ht.insetInlineEnd=`${100*nt}%`,ht.top=`calc(${100*ft}% + var(--editor-toolbar-vert-offset))`}hide(){Ht(this,h2).remove()}}nc=new WeakMap,h2=new WeakMap,m2=new WeakMap,Io=new WeakSet,Z5=function(){const Le=C0(this,h2,document.createElement("div"));Le.className="editToolbar",Le.setAttribute("role","toolbar"),Le.addEventListener("contextmenu",noContextMenu,{signal:Ht(this,m2)._signal});const Ye=C0(this,nc,document.createElement("div"));return Ye.className="buttons",Le.append(Ye),y0(this,Io,e4).call(this),Le},J5=function(Le,Ye){let tt=0,nt=0;for(const ft of Le){const ht=ft.y+ft.height;if(ht<tt)continue;const gt=ft.x+(Ye?ft.width:0);if(ht>tt){nt=gt,tt=ht;continue}Ye?gt>nt&&(nt=gt):gt<nt&&(nt=gt)}return[Ye?1-nt:nt,tt]},e4=function(){const Le=document.createElement("button");Le.className="highlightButton",Le.tabIndex=0,Le.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const Ye=document.createElement("span");Le.append(Ye),Ye.className="visuallyHidden",Ye.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const tt=Ht(this,m2)._signal;Le.addEventListener("contextmenu",noContextMenu,{signal:tt}),Le.addEventListener("click",()=>{Ht(this,m2).highlightSelection("floating_button")},{signal:tt}),Ht(this,nc).append(Le)};function bindEvents(Be,Le,Ye){for(const tt of Ye)Le.addEventListener(tt,Be[tt].bind(Be))}function opacityToHex(Be){return Math.round(Math.min(255,Math.max(1,255*Be))).toString(16).padStart(2,"0")}class IdManager{constructor(){k0(this,Yu,0)}get id(){return`${AnnotationEditorPrefix}${Va(this,Yu)._++}`}}Yu=new WeakMap;const w3=class w3{constructor(){k0(this,T1);k0(this,R1,getUuid());k0(this,rc,0);k0(this,ba,null)}static get _isSVGFittingCanvas(){const Le='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>',tt=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),nt=new Image;nt.src=Le;const ft=nt.decode().then(()=>(tt.drawImage(nt,0,0,1,1,0,0,1,3),new Uint32Array(tt.getImageData(0,0,1,1).data.buffer)[0]===0));return shadow(this,"_isSVGFittingCanvas",ft)}async getFromFile(Le){const{lastModified:Ye,name:tt,size:nt,type:ft}=Le;return y0(this,T1,Jd).call(this,`${Ye}_${tt}_${nt}_${ft}`,Le)}async getFromUrl(Le){return y0(this,T1,Jd).call(this,Le,Le)}async getFromBlob(Le,Ye){const tt=await Ye;return y0(this,T1,Jd).call(this,Le,tt)}async getFromId(Le){Ht(this,ba)||C0(this,ba,new Map);const Ye=Ht(this,ba).get(Le);if(!Ye)return null;if(Ye.bitmap)return Ye.refCounter+=1,Ye;if(Ye.file)return this.getFromFile(Ye.file);if(Ye.blobPromise){const{blobPromise:tt}=Ye;return delete Ye.blobPromise,this.getFromBlob(Ye.id,tt)}return this.getFromUrl(Ye.url)}getFromCanvas(Le,Ye){Ht(this,ba)||C0(this,ba,new Map);let tt=Ht(this,ba).get(Le);if(tt!=null&&tt.bitmap)return tt.refCounter+=1,tt;const nt=new OffscreenCanvas(Ye.width,Ye.height);return nt.getContext("2d").drawImage(Ye,0,0),tt={bitmap:nt.transferToImageBitmap(),id:`image_${Ht(this,R1)}_${Va(this,rc)._++}`,refCounter:1,isSvg:!1},Ht(this,ba).set(Le,tt),Ht(this,ba).set(tt.id,tt),tt}getSvgUrl(Le){const Ye=Ht(this,ba).get(Le);return Ye!=null&&Ye.isSvg?Ye.svgUrl:null}deleteId(Le){var nt;Ht(this,ba)||C0(this,ba,new Map);const Ye=Ht(this,ba).get(Le);if(!Ye||(Ye.refCounter-=1,Ye.refCounter!==0))return;const{bitmap:tt}=Ye;if(!Ye.url&&!Ye.file){const ft=new OffscreenCanvas(tt.width,tt.height);ft.getContext("bitmaprenderer").transferFromImageBitmap(tt),Ye.blobPromise=ft.convertToBlob()}(nt=tt.close)==null||nt.call(tt),Ye.bitmap=null}isValidId(Le){return Le.startsWith(`image_${Ht(this,R1)}_`)}};R1=new WeakMap,rc=new WeakMap,ba=new WeakMap,T1=new WeakSet,Jd=async function(Le,Ye){Ht(this,ba)||C0(this,ba,new Map);let tt=Ht(this,ba).get(Le);if(tt===null)return null;if(tt!=null&&tt.bitmap)return tt.refCounter+=1,tt;try{tt||(tt={bitmap:null,id:`image_${Ht(this,R1)}_${Va(this,rc)._++}`,refCounter:0,isSvg:!1});let nt;if(typeof Ye=="string"?(tt.url=Ye,nt=await fetchData(Ye,"blob")):Ye instanceof File?nt=tt.file=Ye:Ye instanceof Blob&&(nt=Ye),nt.type==="image/svg+xml"){const ft=w3._isSVGFittingCanvas,ht=new FileReader,gt=new Image,At=new Promise((xt,Et)=>{gt.onload=()=>{tt.bitmap=gt,tt.isSvg=!0,xt()},ht.onload=async()=>{const yt=tt.svgUrl=ht.result;gt.src=await ft?`${yt}#svgView(preserveAspectRatio(none))`:yt},gt.onerror=ht.onerror=Et});ht.readAsDataURL(nt),await At}else tt.bitmap=await createImageBitmap(nt);tt.refCounter=1}catch(nt){console.error(nt),tt=null}return Ht(this,ba).set(Le,tt),tt&&Ht(this,ba).set(tt.id,tt),tt};let ImageManager=w3;class CommandManager{constructor(Le=128){k0(this,la,[]);k0(this,So,!1);k0(this,ac);k0(this,ua,-1);C0(this,ac,Le)}add({cmd:Le,undo:Ye,post:tt,mustExec:nt,type:ft=NaN,overwriteIfSameType:ht=!1,keepUndo:gt=!1}){if(nt&&Le(),Ht(this,So))return;const At={cmd:Le,undo:Ye,post:tt,type:ft};if(Ht(this,ua)===-1){Ht(this,la).length>0&&(Ht(this,la).length=0),C0(this,ua,0),Ht(this,la).push(At);return}if(ht&&Ht(this,la)[Ht(this,ua)].type===ft){gt&&(At.undo=Ht(this,la)[Ht(this,ua)].undo),Ht(this,la)[Ht(this,ua)]=At;return}const xt=Ht(this,ua)+1;xt===Ht(this,ac)?Ht(this,la).splice(0,1):(C0(this,ua,xt),xt<Ht(this,la).length&&Ht(this,la).splice(xt)),Ht(this,la).push(At)}undo(){if(Ht(this,ua)===-1)return;C0(this,So,!0);const{undo:Le,post:Ye}=Ht(this,la)[Ht(this,ua)];Le(),Ye==null||Ye(),C0(this,So,!1),C0(this,ua,Ht(this,ua)-1)}redo(){if(Ht(this,ua)<Ht(this,la).length-1){C0(this,ua,Ht(this,ua)+1),C0(this,So,!0);const{cmd:Le,post:Ye}=Ht(this,la)[Ht(this,ua)];Le(),Ye==null||Ye(),C0(this,So,!1)}}hasSomethingToUndo(){return Ht(this,ua)!==-1}hasSomethingToRedo(){return Ht(this,ua)<Ht(this,la).length-1}destroy(){C0(this,la,null)}}la=new WeakMap,So=new WeakMap,ac=new WeakMap,ua=new WeakMap;class KeyboardManager{constructor(Le){k0(this,Zu);this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:Ye}=util_FeatureTest.platform;for(const[tt,nt,ft={}]of Le)for(const ht of tt){const gt=ht.startsWith("mac+");Ye&>?(this.callbacks.set(ht.slice(4),{callback:nt,options:ft}),this.allKeys.add(ht.split("+").at(-1))):!Ye&&!gt&&(this.callbacks.set(ht,{callback:nt,options:ft}),this.allKeys.add(ht.split("+").at(-1)))}}exec(Le,Ye){if(!this.allKeys.has(Ye.key))return;const tt=this.callbacks.get(y0(this,Zu,t4).call(this,Ye));if(!tt)return;const{callback:nt,options:{bubbles:ft=!1,args:ht=[],checker:gt=null}}=tt;gt&&!gt(Le,Ye)||(nt.bind(Le,...ht,Ye)(),ft||(Ye.stopPropagation(),Ye.preventDefault()))}}Zu=new WeakSet,t4=function(Le){Le.altKey&&this.buffer.push("alt"),Le.ctrlKey&&this.buffer.push("ctrl"),Le.metaKey&&this.buffer.push("meta"),Le.shiftKey&&this.buffer.push("shift"),this.buffer.push(Le.key);const Ye=this.buffer.join("+");return this.buffer.length=0,Ye};const Ju=class Ju{get _colors(){const Le=new Map([["CanvasText",null],["Canvas",null]]);return getColorValues(Le),shadow(this,"_colors",Le)}convert(Le){const Ye=getRGB(Le);if(!window.matchMedia("(forced-colors: active)").matches)return Ye;for(const[tt,nt]of this._colors)if(nt.every((ft,ht)=>ft===Ye[ht]))return Ju._colorsMapping.get(tt);return Ye}getHexCode(Le){const Ye=this._colors.get(Le);return Ye?Util.makeHexColor(...Ye):Le}};Nn(Ju,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let ColorManager=Ju;const _1=class _1{constructor(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){k0(this,kn);k0(this,B1,new AbortController);k0(this,ri,null);k0(this,na,new Map);k0(this,ma,new Map);k0(this,O1,null);k0(this,Ls,null);k0(this,N1,null);k0(this,Fi,new CommandManager);k0(this,wo,null);k0(this,D1,0);k0(this,g2,new Set);k0(this,ss,null);k0(this,Qi,null);k0(this,A2,new Set);k0(this,ic,!1);k0(this,sc,!1);k0(this,L1,!1);k0(this,oc,null);k0(this,os,null);k0(this,Ro,null);k0(this,P1,null);k0(this,To,!1);k0(this,ls,null);k0(this,ed,new IdManager);k0(this,Bo,!1);k0(this,lc,!1);k0(this,Oo,null);k0(this,x2,null);k0(this,uc,null);k0(this,dc,null);k0(this,da,AnnotationEditorType.NONE);k0(this,vr,new Set);k0(this,Ps,null);k0(this,E2,null);k0(this,pc,null);k0(this,fc,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1});k0(this,No,[0,0]);k0(this,cs,null);k0(this,_s,null);k0(this,hc,null);k0(this,Ei,null);const Ct=this._signal=Ht(this,B1).signal;C0(this,_s,Le),C0(this,hc,Ye),C0(this,O1,tt),this._eventBus=nt,nt._on("editingaction",this.onEditingAction.bind(this),{signal:Ct}),nt._on("pagechanging",this.onPageChanging.bind(this),{signal:Ct}),nt._on("scalechanging",this.onScaleChanging.bind(this),{signal:Ct}),nt._on("rotationchanging",this.onRotationChanging.bind(this),{signal:Ct}),nt._on("setpreference",this.onSetPreference.bind(this),{signal:Ct}),nt._on("switchannotationeditorparams",kt=>this.updateParams(kt.type,kt.value),{signal:Ct}),y0(this,kn,a4).call(this),y0(this,kn,l4).call(this),y0(this,kn,j9).call(this),C0(this,Ls,ft.annotationStorage),C0(this,oc,ft.filterFactory),C0(this,E2,ht),C0(this,P1,gt||null),C0(this,ic,At),C0(this,sc,xt),C0(this,L1,Et),C0(this,dc,yt||null),this.viewParameters={realScale:PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}static get _keyboardManager(){const Le=_1.prototype,Ye=ht=>Ht(ht,_s).contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&ht.hasSomethingToControl(),tt=(ht,{target:gt})=>{if(gt instanceof HTMLInputElement){const{type:At}=gt;return At!=="text"&&At!=="number"}return!0},nt=this.TRANSLATE_SMALL,ft=this.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+a","mac+meta+a"],Le.selectAll,{checker:tt}],[["ctrl+z","mac+meta+z"],Le.undo,{checker:tt}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],Le.redo,{checker:tt}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],Le.delete,{checker:tt}],[["Enter","mac+Enter"],Le.addNewEditorFromKeyboard,{checker:(ht,{target:gt})=>!(gt instanceof HTMLButtonElement)&&Ht(ht,_s).contains(gt)&&!ht.isEnterHandled}],[[" ","mac+ "],Le.addNewEditorFromKeyboard,{checker:(ht,{target:gt})=>!(gt instanceof HTMLButtonElement)&&Ht(ht,_s).contains(document.activeElement)}],[["Escape","mac+Escape"],Le.unselectAll],[["ArrowLeft","mac+ArrowLeft"],Le.translateSelectedEditors,{args:[-nt,0],checker:Ye}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Le.translateSelectedEditors,{args:[-ft,0],checker:Ye}],[["ArrowRight","mac+ArrowRight"],Le.translateSelectedEditors,{args:[nt,0],checker:Ye}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Le.translateSelectedEditors,{args:[ft,0],checker:Ye}],[["ArrowUp","mac+ArrowUp"],Le.translateSelectedEditors,{args:[0,-nt],checker:Ye}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Le.translateSelectedEditors,{args:[0,-ft],checker:Ye}],[["ArrowDown","mac+ArrowDown"],Le.translateSelectedEditors,{args:[0,nt],checker:Ye}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Le.translateSelectedEditors,{args:[0,ft],checker:Ye}]]))}destroy(){var Le,Ye,tt,nt;(Le=Ht(this,Ei))==null||Le.resolve(),C0(this,Ei,null),(Ye=Ht(this,B1))==null||Ye.abort(),C0(this,B1,null),this._signal=null;for(const ft of Ht(this,ma).values())ft.destroy();Ht(this,ma).clear(),Ht(this,na).clear(),Ht(this,A2).clear(),C0(this,ri,null),Ht(this,vr).clear(),Ht(this,Fi).destroy(),(tt=Ht(this,O1))==null||tt.destroy(),(nt=Ht(this,ls))==null||nt.hide(),C0(this,ls,null),Ht(this,os)&&(clearTimeout(Ht(this,os)),C0(this,os,null)),Ht(this,cs)&&(clearTimeout(Ht(this,cs)),C0(this,cs,null))}combinedSignal(Le){return AbortSignal.any([this._signal,Le.signal])}get mlManager(){return Ht(this,dc)}get useNewAltTextFlow(){return Ht(this,sc)}get useNewAltTextWhenAddingImage(){return Ht(this,L1)}get hcmFilter(){return shadow(this,"hcmFilter",Ht(this,E2)?Ht(this,oc).addHCMFilter(Ht(this,E2).foreground,Ht(this,E2).background):"none")}get direction(){return shadow(this,"direction",getComputedStyle(Ht(this,_s)).direction)}get highlightColors(){return shadow(this,"highlightColors",Ht(this,P1)?new Map(Ht(this,P1).split(",").map(Le=>Le.split("=").map(Ye=>Ye.trim()))):null)}get highlightColorNames(){return shadow(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,Le=>Le.reverse())):null)}setMainHighlightColorPicker(Le){C0(this,uc,Le)}editAltText(Le,Ye=!1){var tt;(tt=Ht(this,O1))==null||tt.editAltText(this,Le,Ye)}switchToMode(Le,Ye){this._eventBus.on("annotationeditormodechanged",Ye,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:Le})}setPreference(Le,Ye){this._eventBus.dispatch("setpreference",{source:this,name:Le,value:Ye})}onSetPreference({name:Le,value:Ye}){switch(Le){case"enableNewAltTextWhenAddingImage":C0(this,L1,Ye);break}}onPageChanging({pageNumber:Le}){C0(this,D1,Le-1)}focusMainContainer(){Ht(this,_s).focus()}findParent(Le,Ye){for(const tt of Ht(this,ma).values()){const{x:nt,y:ft,width:ht,height:gt}=tt.div.getBoundingClientRect();if(Le>=nt&&Le<=nt+ht&&Ye>=ft&&Ye<=ft+gt)return tt}return null}disableUserSelect(Le=!1){Ht(this,hc).classList.toggle("noUserSelect",Le)}addShouldRescale(Le){Ht(this,A2).add(Le)}removeShouldRescale(Le){Ht(this,A2).delete(Le)}onScaleChanging({scale:Le}){this.commitOrRemove(),this.viewParameters.realScale=Le*PixelsPerInch.PDF_TO_CSS_UNITS;for(const Ye of Ht(this,A2))Ye.onScaleChanging()}onRotationChanging({pagesRotation:Le}){this.commitOrRemove(),this.viewParameters.rotation=Le}highlightSelection(Le=""){const Ye=document.getSelection();if(!Ye||Ye.isCollapsed)return;const{anchorNode:tt,anchorOffset:nt,focusNode:ft,focusOffset:ht}=Ye,gt=Ye.toString(),xt=y0(this,kn,e3).call(this,Ye).closest(".textLayer"),Et=this.getSelectionBoxes(xt);if(!Et)return;Ye.empty();const yt=y0(this,kn,M9).call(this,xt),Ct=Ht(this,da)===AnnotationEditorType.NONE,kt=()=>{yt==null||yt.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:Le,boxes:Et,anchorNode:tt,anchorOffset:nt,focusNode:ft,focusOffset:ht,text:gt}),Ct&&this.showAllEditors("highlight",!0,!0)};if(Ct){this.switchToMode(AnnotationEditorType.HIGHLIGHT,kt);return}kt()}addToAnnotationStorage(Le){!Le.isEmpty()&&Ht(this,Ls)&&!Ht(this,Ls).has(Le.id)&&Ht(this,Ls).setValue(Le.id,Le)}blur(){if(this.isShiftKeyDown=!1,Ht(this,To)&&(C0(this,To,!1),y0(this,kn,t3).call(this,"main_toolbar")),!this.hasSelection)return;const{activeElement:Le}=document;for(const Ye of Ht(this,vr))if(Ye.div.contains(Le)){C0(this,x2,[Ye,Le]),Ye._focusEventsAllowed=!1;break}}focus(){if(!Ht(this,x2))return;const[Le,Ye]=Ht(this,x2);C0(this,x2,null),Ye.addEventListener("focusin",()=>{Le._focusEventsAllowed=!0},{once:!0,signal:this._signal}),Ye.focus()}addEditListeners(){y0(this,kn,j9).call(this),y0(this,kn,F9).call(this)}removeEditListeners(){y0(this,kn,o4).call(this),y0(this,kn,Q9).call(this)}dragOver(Le){for(const{type:Ye}of Le.dataTransfer.items)for(const tt of Ht(this,Qi))if(tt.isHandlingMimeForPasting(Ye)){Le.dataTransfer.dropEffect="copy",Le.preventDefault();return}}drop(Le){for(const Ye of Le.dataTransfer.items)for(const tt of Ht(this,Qi))if(tt.isHandlingMimeForPasting(Ye.type)){tt.paste(Ye,this.currentLayer),Le.preventDefault();return}}copy(Le){var tt;if(Le.preventDefault(),(tt=Ht(this,ri))==null||tt.commitOrRemove(),!this.hasSelection)return;const Ye=[];for(const nt of Ht(this,vr)){const ft=nt.serialize(!0);ft&&Ye.push(ft)}Ye.length!==0&&Le.clipboardData.setData("application/pdfjs",JSON.stringify(Ye))}cut(Le){this.copy(Le),this.delete()}async paste(Le){Le.preventDefault();const{clipboardData:Ye}=Le;for(const ft of Ye.items)for(const ht of Ht(this,Qi))if(ht.isHandlingMimeForPasting(ft.type)){ht.paste(ft,this.currentLayer);return}let tt=Ye.getData("application/pdfjs");if(!tt)return;try{tt=JSON.parse(tt)}catch(ft){warn$1(`paste: "${ft.message}".`);return}if(!Array.isArray(tt))return;this.unselectAll();const nt=this.currentLayer;try{const ft=[];for(const At of tt){const xt=await nt.deserialize(At);if(!xt)return;ft.push(xt)}const ht=()=>{for(const At of ft)y0(this,kn,U9).call(this,At);y0(this,kn,V9).call(this,ft)},gt=()=>{for(const At of ft)At.remove()};this.addCommands({cmd:ht,undo:gt,mustExec:!0})}catch(ft){warn$1(`paste: "${ft.message}".`)}}keydown(Le){!this.isShiftKeyDown&&Le.key==="Shift"&&(this.isShiftKeyDown=!0),Ht(this,da)!==AnnotationEditorType.NONE&&!this.isEditorHandlingKeyboard&&_1._keyboardManager.exec(this,Le)}keyup(Le){this.isShiftKeyDown&&Le.key==="Shift"&&(this.isShiftKeyDown=!1,Ht(this,To)&&(C0(this,To,!1),y0(this,kn,t3).call(this,"main_toolbar")))}onEditingAction({name:Le}){switch(Le){case"undo":case"redo":case"delete":case"selectAll":this[Le]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}setEditingState(Le){Le?(y0(this,kn,i4).call(this),y0(this,kn,F9).call(this),y0(this,kn,Ha).call(this,{isEditing:Ht(this,da)!==AnnotationEditorType.NONE,isEmpty:y0(this,kn,Pu).call(this),hasSomethingToUndo:Ht(this,Fi).hasSomethingToUndo(),hasSomethingToRedo:Ht(this,Fi).hasSomethingToRedo(),hasSelectedEditor:!1})):(y0(this,kn,s4).call(this),y0(this,kn,Q9).call(this),y0(this,kn,Ha).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(Le){if(!Ht(this,Qi)){C0(this,Qi,Le);for(const Ye of Ht(this,Qi))y0(this,kn,l2).call(this,Ye.defaultPropertiesToUpdate)}}getId(){return Ht(this,ed).id}get currentLayer(){return Ht(this,ma).get(Ht(this,D1))}getLayer(Le){return Ht(this,ma).get(Le)}get currentPageIndex(){return Ht(this,D1)}addLayer(Le){Ht(this,ma).set(Le.pageIndex,Le),Ht(this,Bo)?Le.enable():Le.disable()}removeLayer(Le){Ht(this,ma).delete(Le.pageIndex)}async updateMode(Le,Ye=null,tt=!1){if(Ht(this,da)!==Le&&!(Ht(this,Ei)&&(await Ht(this,Ei).promise,!Ht(this,Ei)))){if(C0(this,Ei,Promise.withResolvers()),C0(this,da,Le),Le===AnnotationEditorType.NONE){this.setEditingState(!1),y0(this,kn,u4).call(this),Ht(this,Ei).resolve();return}this.setEditingState(!0),await y0(this,kn,c4).call(this),this.unselectAll();for(const nt of Ht(this,ma).values())nt.updateMode(Le);if(!Ye){tt&&this.addNewEditorFromKeyboard(),Ht(this,Ei).resolve();return}for(const nt of Ht(this,na).values())nt.annotationElementId===Ye?(this.setSelected(nt),nt.enterInEditMode()):nt.unselect();Ht(this,Ei).resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(Le){Le!==Ht(this,da)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:Le})}updateParams(Le,Ye){var tt;if(Ht(this,Qi)){switch(Le){case AnnotationEditorParamsType.CREATE:this.currentLayer.addNewEditor();return;case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:(tt=Ht(this,uc))==null||tt.updateColor(Ye);break;case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(Ht(this,pc)||C0(this,pc,new Map)).set(Le,Ye),this.showAllEditors("highlight",Ye);break}for(const nt of Ht(this,vr))nt.updateParams(Le,Ye);for(const nt of Ht(this,Qi))nt.updateDefaultParams(Le,Ye)}}showAllEditors(Le,Ye,tt=!1){var ft;for(const ht of Ht(this,na).values())ht.editorType===Le&&ht.show(Ye);(((ft=Ht(this,pc))==null?void 0:ft.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL))??!0)!==Ye&&y0(this,kn,l2).call(this,[[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL,Ye]])}enableWaiting(Le=!1){if(Ht(this,lc)!==Le){C0(this,lc,Le);for(const Ye of Ht(this,ma).values())Le?Ye.disableClick():Ye.enableClick(),Ye.div.classList.toggle("waiting",Le)}}getEditors(Le){const Ye=[];for(const tt of Ht(this,na).values())tt.pageIndex===Le&&Ye.push(tt);return Ye}getEditor(Le){return Ht(this,na).get(Le)}addEditor(Le){Ht(this,na).set(Le.id,Le)}removeEditor(Le){var Ye;Le.div.contains(document.activeElement)&&(Ht(this,os)&&clearTimeout(Ht(this,os)),C0(this,os,setTimeout(()=>{this.focusMainContainer(),C0(this,os,null)},0))),Ht(this,na).delete(Le.id),this.unselect(Le),(!Le.annotationElementId||!Ht(this,g2).has(Le.annotationElementId))&&((Ye=Ht(this,Ls))==null||Ye.remove(Le.id))}addDeletedAnnotationElement(Le){Ht(this,g2).add(Le.annotationElementId),this.addChangedExistingAnnotation(Le),Le.deleted=!0}isDeletedAnnotationElement(Le){return Ht(this,g2).has(Le)}removeDeletedAnnotationElement(Le){Ht(this,g2).delete(Le.annotationElementId),this.removeChangedExistingAnnotation(Le),Le.deleted=!1}setActiveEditor(Le){Ht(this,ri)!==Le&&(C0(this,ri,Le),Le&&y0(this,kn,l2).call(this,Le.propertiesToUpdate))}updateUI(Le){Ht(this,kn,d4)===Le&&y0(this,kn,l2).call(this,Le.propertiesToUpdate)}toggleSelected(Le){if(Ht(this,vr).has(Le)){Ht(this,vr).delete(Le),Le.unselect(),y0(this,kn,Ha).call(this,{hasSelectedEditor:this.hasSelection});return}Ht(this,vr).add(Le),Le.select(),y0(this,kn,l2).call(this,Le.propertiesToUpdate),y0(this,kn,Ha).call(this,{hasSelectedEditor:!0})}setSelected(Le){for(const Ye of Ht(this,vr))Ye!==Le&&Ye.unselect();Ht(this,vr).clear(),Ht(this,vr).add(Le),Le.select(),y0(this,kn,l2).call(this,Le.propertiesToUpdate),y0(this,kn,Ha).call(this,{hasSelectedEditor:!0})}isSelected(Le){return Ht(this,vr).has(Le)}get firstSelectedEditor(){return Ht(this,vr).values().next().value}unselect(Le){Le.unselect(),Ht(this,vr).delete(Le),y0(this,kn,Ha).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return Ht(this,vr).size!==0}get isEnterHandled(){return Ht(this,vr).size===1&&this.firstSelectedEditor.isEnterHandled}undo(){Ht(this,Fi).undo(),y0(this,kn,Ha).call(this,{hasSomethingToUndo:Ht(this,Fi).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:y0(this,kn,Pu).call(this)})}redo(){Ht(this,Fi).redo(),y0(this,kn,Ha).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:Ht(this,Fi).hasSomethingToRedo(),isEmpty:y0(this,kn,Pu).call(this)})}addCommands(Le){Ht(this,Fi).add(Le),y0(this,kn,Ha).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:y0(this,kn,Pu).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const Le=[...Ht(this,vr)],Ye=()=>{for(const nt of Le)nt.remove()},tt=()=>{for(const nt of Le)y0(this,kn,U9).call(this,nt)};this.addCommands({cmd:Ye,undo:tt,mustExec:!0})}commitOrRemove(){var Le;(Le=Ht(this,ri))==null||Le.commitOrRemove()}hasSomethingToControl(){return Ht(this,ri)||this.hasSelection}selectAll(){for(const Le of Ht(this,vr))Le.commit();y0(this,kn,V9).call(this,Ht(this,na).values())}unselectAll(){if(!(Ht(this,ri)&&(Ht(this,ri).commitOrRemove(),Ht(this,da)!==AnnotationEditorType.NONE))&&this.hasSelection){for(const Le of Ht(this,vr))Le.unselect();Ht(this,vr).clear(),y0(this,kn,Ha).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(Le,Ye,tt=!1){if(tt||this.commitOrRemove(),!this.hasSelection)return;Ht(this,No)[0]+=Le,Ht(this,No)[1]+=Ye;const[nt,ft]=Ht(this,No),ht=[...Ht(this,vr)],gt=1e3;Ht(this,cs)&&clearTimeout(Ht(this,cs)),C0(this,cs,setTimeout(()=>{C0(this,cs,null),Ht(this,No)[0]=Ht(this,No)[1]=0,this.addCommands({cmd:()=>{for(const At of ht)Ht(this,na).has(At.id)&&At.translateInPage(nt,ft)},undo:()=>{for(const At of ht)Ht(this,na).has(At.id)&&At.translateInPage(-nt,-ft)},mustExec:!1})},gt));for(const At of ht)At.translateInPage(Le,Ye)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),C0(this,ss,new Map);for(const Le of Ht(this,vr))Ht(this,ss).set(Le,{savedX:Le.x,savedY:Le.y,savedPageIndex:Le.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!Ht(this,ss))return!1;this.disableUserSelect(!1);const Le=Ht(this,ss);C0(this,ss,null);let Ye=!1;for(const[{x:nt,y:ft,pageIndex:ht},gt]of Le)gt.newX=nt,gt.newY=ft,gt.newPageIndex=ht,Ye||(Ye=nt!==gt.savedX||ft!==gt.savedY||ht!==gt.savedPageIndex);if(!Ye)return!1;const tt=(nt,ft,ht,gt)=>{if(Ht(this,na).has(nt.id)){const At=Ht(this,ma).get(gt);At?nt._setParentAndPosition(At,ft,ht):(nt.pageIndex=gt,nt.x=ft,nt.y=ht)}};return this.addCommands({cmd:()=>{for(const[nt,{newX:ft,newY:ht,newPageIndex:gt}]of Le)tt(nt,ft,ht,gt)},undo:()=>{for(const[nt,{savedX:ft,savedY:ht,savedPageIndex:gt}]of Le)tt(nt,ft,ht,gt)},mustExec:!0}),!0}dragSelectedEditors(Le,Ye){if(Ht(this,ss))for(const tt of Ht(this,ss).keys())tt.drag(Le,Ye)}rebuild(Le){if(Le.parent===null){const Ye=this.getLayer(Le.pageIndex);Ye?(Ye.changeParent(Le),Ye.addOrRebuild(Le)):(this.addEditor(Le),this.addToAnnotationStorage(Le),Le.rebuild())}else Le.parent.addOrRebuild(Le)}get isEditorHandlingKeyboard(){var Le;return((Le=this.getActive())==null?void 0:Le.shouldGetKeyboardEvents())||Ht(this,vr).size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(Le){return Ht(this,ri)===Le}getActive(){return Ht(this,ri)}getMode(){return Ht(this,da)}get imageManager(){return shadow(this,"imageManager",new ImageManager)}getSelectionBoxes(Le){if(!Le)return null;const Ye=document.getSelection();for(let xt=0,Et=Ye.rangeCount;xt<Et;xt++)if(!Le.contains(Ye.getRangeAt(xt).commonAncestorContainer))return null;const{x:tt,y:nt,width:ft,height:ht}=Le.getBoundingClientRect();let gt;switch(Le.getAttribute("data-main-rotation")){case"90":gt=(xt,Et,yt,Ct)=>({x:(Et-nt)/ht,y:1-(xt+yt-tt)/ft,width:Ct/ht,height:yt/ft});break;case"180":gt=(xt,Et,yt,Ct)=>({x:1-(xt+yt-tt)/ft,y:1-(Et+Ct-nt)/ht,width:yt/ft,height:Ct/ht});break;case"270":gt=(xt,Et,yt,Ct)=>({x:1-(Et+Ct-nt)/ht,y:(xt-tt)/ft,width:Ct/ht,height:yt/ft});break;default:gt=(xt,Et,yt,Ct)=>({x:(xt-tt)/ft,y:(Et-nt)/ht,width:yt/ft,height:Ct/ht});break}const At=[];for(let xt=0,Et=Ye.rangeCount;xt<Et;xt++){const yt=Ye.getRangeAt(xt);if(!yt.collapsed)for(const{x:Ct,y:kt,width:vt,height:bt}of yt.getClientRects())vt===0||bt===0||At.push(gt(Ct,kt,vt,bt))}return At.length===0?null:At}addChangedExistingAnnotation({annotationElementId:Le,id:Ye}){(Ht(this,N1)||C0(this,N1,new Map)).set(Le,Ye)}removeChangedExistingAnnotation({annotationElementId:Le}){var Ye;(Ye=Ht(this,N1))==null||Ye.delete(Le)}renderAnnotationElement(Le){var nt;const Ye=(nt=Ht(this,N1))==null?void 0:nt.get(Le.data.id);if(!Ye)return;const tt=Ht(this,Ls).getRawValue(Ye);tt&&(Ht(this,da)===AnnotationEditorType.NONE&&!tt.hasBeenModified||tt.renderAnnotationElement(Le))}};B1=new WeakMap,ri=new WeakMap,na=new WeakMap,ma=new WeakMap,O1=new WeakMap,Ls=new WeakMap,N1=new WeakMap,Fi=new WeakMap,wo=new WeakMap,D1=new WeakMap,g2=new WeakMap,ss=new WeakMap,Qi=new WeakMap,A2=new WeakMap,ic=new WeakMap,sc=new WeakMap,L1=new WeakMap,oc=new WeakMap,os=new WeakMap,Ro=new WeakMap,P1=new WeakMap,To=new WeakMap,ls=new WeakMap,ed=new WeakMap,Bo=new WeakMap,lc=new WeakMap,Oo=new WeakMap,x2=new WeakMap,uc=new WeakMap,dc=new WeakMap,da=new WeakMap,vr=new WeakMap,Ps=new WeakMap,E2=new WeakMap,pc=new WeakMap,fc=new WeakMap,No=new WeakMap,cs=new WeakMap,_s=new WeakMap,hc=new WeakMap,Ei=new WeakMap,kn=new WeakSet,e3=function({anchorNode:Le}){return Le.nodeType===Node.TEXT_NODE?Le.parentElement:Le},M9=function(Le){const{currentLayer:Ye}=this;if(Ye.hasTextLayer(Le))return Ye;for(const tt of Ht(this,ma).values())if(tt.hasTextLayer(Le))return tt;return null},n4=function(){const Le=document.getSelection();if(!Le||Le.isCollapsed)return;const tt=y0(this,kn,e3).call(this,Le).closest(".textLayer"),nt=this.getSelectionBoxes(tt);nt&&(Ht(this,ls)||C0(this,ls,new HighlightToolbar(this)),Ht(this,ls).show(tt,nt,this.direction==="ltr"))},r4=function(){var ft,ht,gt;const Le=document.getSelection();if(!Le||Le.isCollapsed){Ht(this,Ps)&&((ft=Ht(this,ls))==null||ft.hide(),C0(this,Ps,null),y0(this,kn,Ha).call(this,{hasSelectedText:!1}));return}const{anchorNode:Ye}=Le;if(Ye===Ht(this,Ps))return;const nt=y0(this,kn,e3).call(this,Le).closest(".textLayer");if(!nt){Ht(this,Ps)&&((ht=Ht(this,ls))==null||ht.hide(),C0(this,Ps,null),y0(this,kn,Ha).call(this,{hasSelectedText:!1}));return}if((gt=Ht(this,ls))==null||gt.hide(),C0(this,Ps,Ye),y0(this,kn,Ha).call(this,{hasSelectedText:!0}),!(Ht(this,da)!==AnnotationEditorType.HIGHLIGHT&&Ht(this,da)!==AnnotationEditorType.NONE)&&(Ht(this,da)===AnnotationEditorType.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),C0(this,To,this.isShiftKeyDown),!this.isShiftKeyDown)){const At=Ht(this,da)===AnnotationEditorType.HIGHLIGHT?y0(this,kn,M9).call(this,nt):null;At==null||At.toggleDrawing();const xt=new AbortController,Et=this.combinedSignal(xt),yt=Ct=>{Ct.type==="pointerup"&&Ct.button!==0||(xt.abort(),At==null||At.toggleDrawing(!0),Ct.type==="pointerup"&&y0(this,kn,t3).call(this,"main_toolbar"))};window.addEventListener("pointerup",yt,{signal:Et}),window.addEventListener("blur",yt,{signal:Et})}},t3=function(Le=""){Ht(this,da)===AnnotationEditorType.HIGHLIGHT?this.highlightSelection(Le):Ht(this,ic)&&y0(this,kn,n4).call(this)},a4=function(){document.addEventListener("selectionchange",y0(this,kn,r4).bind(this),{signal:this._signal})},i4=function(){if(Ht(this,Ro))return;C0(this,Ro,new AbortController);const Le=this.combinedSignal(Ht(this,Ro));window.addEventListener("focus",this.focus.bind(this),{signal:Le}),window.addEventListener("blur",this.blur.bind(this),{signal:Le})},s4=function(){var Le;(Le=Ht(this,Ro))==null||Le.abort(),C0(this,Ro,null)},j9=function(){if(Ht(this,Oo))return;C0(this,Oo,new AbortController);const Le=this.combinedSignal(Ht(this,Oo));window.addEventListener("keydown",this.keydown.bind(this),{signal:Le}),window.addEventListener("keyup",this.keyup.bind(this),{signal:Le})},o4=function(){var Le;(Le=Ht(this,Oo))==null||Le.abort(),C0(this,Oo,null)},F9=function(){if(Ht(this,wo))return;C0(this,wo,new AbortController);const Le=this.combinedSignal(Ht(this,wo));document.addEventListener("copy",this.copy.bind(this),{signal:Le}),document.addEventListener("cut",this.cut.bind(this),{signal:Le}),document.addEventListener("paste",this.paste.bind(this),{signal:Le})},Q9=function(){var Le;(Le=Ht(this,wo))==null||Le.abort(),C0(this,wo,null)},l4=function(){const Le=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:Le}),document.addEventListener("drop",this.drop.bind(this),{signal:Le})},Ha=function(Le){Object.entries(Le).some(([tt,nt])=>Ht(this,fc)[tt]!==nt)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(Ht(this,fc),Le)}),Ht(this,da)===AnnotationEditorType.HIGHLIGHT&&Le.hasSelectedEditor===!1&&y0(this,kn,l2).call(this,[[AnnotationEditorParamsType.HIGHLIGHT_FREE,!0]]))},l2=function(Le){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:Le})},c4=async function(){if(!Ht(this,Bo)){C0(this,Bo,!0);const Le=[];for(const Ye of Ht(this,ma).values())Le.push(Ye.enable());await Promise.all(Le);for(const Ye of Ht(this,na).values())Ye.enable()}},u4=function(){if(this.unselectAll(),Ht(this,Bo)){C0(this,Bo,!1);for(const Le of Ht(this,ma).values())Le.disable();for(const Le of Ht(this,na).values())Le.disable()}},U9=function(Le){const Ye=Ht(this,ma).get(Le.pageIndex);Ye?Ye.addOrRebuild(Le):(this.addEditor(Le),this.addToAnnotationStorage(Le))},d4=function(){let Le=null;for(Le of Ht(this,vr));return Le},Pu=function(){if(Ht(this,na).size===0)return!0;if(Ht(this,na).size===1)for(const Le of Ht(this,na).values())return Le.isEmpty();return!1},V9=function(Le){for(const Ye of Ht(this,vr))Ye.unselect();Ht(this,vr).clear();for(const Ye of Le)Ye.isEmpty()||(Ht(this,vr).add(Ye),Ye.select());y0(this,kn,Ha).call(this,{hasSelectedEditor:this.hasSelection})},Nn(_1,"TRANSLATE_SMALL",1),Nn(_1,"TRANSLATE_BIG",10);let AnnotationEditorUIManager=_1;const Pa=class Pa{constructor(Le){k0(this,Vi);k0(this,pa,null);k0(this,us,!1);k0(this,Ui,null);k0(this,M1,null);k0(this,ds,null);k0(this,ai,null);k0(this,j1,!1);k0(this,ps,null);k0(this,za,null);k0(this,Ms,null);k0(this,C2,null);k0(this,fs,!1);C0(this,za,Le),C0(this,fs,Le._uiManager.useNewAltTextFlow),Ht(Pa,Do)||C0(Pa,Do,Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"}))}static initialize(Le){Pa._l10n??(Pa._l10n=Le)}async render(){const Le=C0(this,Ui,document.createElement("button"));Le.className="altText",Le.tabIndex="0";const Ye=C0(this,M1,document.createElement("span"));Le.append(Ye),Ht(this,fs)?(Le.classList.add("new"),Le.setAttribute("data-l10n-id",Ht(Pa,Do).missing),Ye.setAttribute("data-l10n-id",Ht(Pa,Do)["missing-label"])):(Le.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),Ye.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const tt=Ht(this,za)._uiManager._signal;Le.addEventListener("contextmenu",noContextMenu,{signal:tt}),Le.addEventListener("pointerdown",ft=>ft.stopPropagation(),{signal:tt});const nt=ft=>{ft.preventDefault(),Ht(this,za)._uiManager.editAltText(Ht(this,za)),Ht(this,fs)&&Ht(this,za)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:Ht(this,Vi,_u)}})};return Le.addEventListener("click",nt,{capture:!0,signal:tt}),Le.addEventListener("keydown",ft=>{ft.target===Le&&ft.key==="Enter"&&(C0(this,j1,!0),nt(ft))},{signal:tt}),await y0(this,Vi,n3).call(this),Le}finish(){Ht(this,Ui)&&(Ht(this,Ui).focus({focusVisible:Ht(this,j1)}),C0(this,j1,!1))}isEmpty(){return Ht(this,fs)?Ht(this,pa)===null:!Ht(this,pa)&&!Ht(this,us)}hasData(){return Ht(this,fs)?Ht(this,pa)!==null||!!Ht(this,Ms):this.isEmpty()}get guessedText(){return Ht(this,Ms)}async setGuessedText(Le){Ht(this,pa)===null&&(C0(this,Ms,Le),C0(this,C2,await Pa._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:Le})),y0(this,Vi,n3).call(this))}toggleAltTextBadge(Le=!1){var Ye;if(!Ht(this,fs)||Ht(this,pa)){(Ye=Ht(this,ps))==null||Ye.remove(),C0(this,ps,null);return}if(!Ht(this,ps)){const tt=C0(this,ps,document.createElement("div"));tt.className="noAltTextBadge",Ht(this,za).div.append(tt)}Ht(this,ps).classList.toggle("hidden",!Le)}serialize(Le){let Ye=Ht(this,pa);return!Le&&Ht(this,Ms)===Ye&&(Ye=Ht(this,C2)),{altText:Ye,decorative:Ht(this,us),guessedText:Ht(this,Ms),textWithDisclaimer:Ht(this,C2)}}get data(){return{altText:Ht(this,pa),decorative:Ht(this,us)}}set data({altText:Le,decorative:Ye,guessedText:tt,textWithDisclaimer:nt,cancel:ft=!1}){tt&&(C0(this,Ms,tt),C0(this,C2,nt)),!(Ht(this,pa)===Le&&Ht(this,us)===Ye)&&(ft||(C0(this,pa,Le),C0(this,us,Ye)),y0(this,Vi,n3).call(this))}toggle(Le=!1){Ht(this,Ui)&&(!Le&&Ht(this,ai)&&(clearTimeout(Ht(this,ai)),C0(this,ai,null)),Ht(this,Ui).disabled=!Le)}shown(){Ht(this,za)._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:Ht(this,Vi,_u)}})}destroy(){var Le,Ye;(Le=Ht(this,Ui))==null||Le.remove(),C0(this,Ui,null),C0(this,M1,null),C0(this,ds,null),(Ye=Ht(this,ps))==null||Ye.remove(),C0(this,ps,null)}};pa=new WeakMap,us=new WeakMap,Ui=new WeakMap,M1=new WeakMap,ds=new WeakMap,ai=new WeakMap,j1=new WeakMap,ps=new WeakMap,za=new WeakMap,Ms=new WeakMap,C2=new WeakMap,fs=new WeakMap,Do=new WeakMap,Vi=new WeakSet,_u=function(){return Ht(this,pa)&&"added"||Ht(this,pa)===null&&this.guessedText&&"review"||"missing"},n3=async function(){var nt,ft,ht;const Le=Ht(this,Ui);if(!Le)return;if(Ht(this,fs)){if(Le.classList.toggle("done",!!Ht(this,pa)),Le.setAttribute("data-l10n-id",Ht(Pa,Do)[Ht(this,Vi,_u)]),(nt=Ht(this,M1))==null||nt.setAttribute("data-l10n-id",Ht(Pa,Do)[`${Ht(this,Vi,_u)}-label`]),!Ht(this,pa)){(ft=Ht(this,ds))==null||ft.remove();return}}else{if(!Ht(this,pa)&&!Ht(this,us)){Le.classList.remove("done"),(ht=Ht(this,ds))==null||ht.remove();return}Le.classList.add("done"),Le.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let Ye=Ht(this,ds);if(!Ye){C0(this,ds,Ye=document.createElement("span")),Ye.className="tooltip",Ye.setAttribute("role","tooltip"),Ye.id=`alt-text-tooltip-${Ht(this,za).id}`;const gt=100,At=Ht(this,za)._uiManager._signal;At.addEventListener("abort",()=>{clearTimeout(Ht(this,ai)),C0(this,ai,null)},{once:!0}),Le.addEventListener("mouseenter",()=>{C0(this,ai,setTimeout(()=>{C0(this,ai,null),Ht(this,ds).classList.add("show"),Ht(this,za)._reportTelemetry({action:"alt_text_tooltip"})},gt))},{signal:At}),Le.addEventListener("mouseleave",()=>{var xt;Ht(this,ai)&&(clearTimeout(Ht(this,ai)),C0(this,ai,null)),(xt=Ht(this,ds))==null||xt.classList.remove("show")},{signal:At})}Ht(this,us)?Ye.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(Ye.removeAttribute("data-l10n-id"),Ye.textContent=Ht(this,pa)),Ye.parentNode||Le.append(Ye);const tt=Ht(this,za).getImageForAltText();tt==null||tt.setAttribute("aria-describedby",Ye.id)},k0(Pa,Do,null),Nn(Pa,"_l10n",null);let AltText=Pa;const yr=class yr{constructor(Le){k0(this,ir);k0(this,y2,null);k0(this,Hi,null);k0(this,Ur,null);k0(this,F1,!1);k0(this,k2,!1);k0(this,ga,null);k0(this,v2,null);k0(this,Lo,null);k0(this,mc,"");k0(this,b2,!1);k0(this,Po,null);k0(this,gc,!1);k0(this,I2,!1);k0(this,js,!1);k0(this,hs,null);k0(this,Q1,0);k0(this,U1,0);k0(this,Ci,null);Nn(this,"_editToolbar",null);Nn(this,"_initialOptions",Object.create(null));Nn(this,"_initialData",null);Nn(this,"_isVisible",!0);Nn(this,"_uiManager",null);Nn(this,"_focusEventsAllowed",!0);k0(this,Ac,!1);k0(this,td,yr._zIndex++);this.parent=Le.parent,this.id=Le.id,this.width=this.height=null,this.pageIndex=Le.parent.pageIndex,this.name=Le.name,this.div=null,this._uiManager=Le.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=Le.isCentered,this._structTreeParentId=null;const{rotation:Ye,rawDims:{pageWidth:tt,pageHeight:nt,pageX:ft,pageY:ht}}=this.parent.viewport;this.rotation=Ye,this.pageRotation=(360+Ye-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[tt,nt],this.pageTranslation=[ft,ht];const[gt,At]=this.parentDimensions;this.x=Le.x/gt,this.y=Le.y/At,this.isAttachedToDOM=!1,this.deleted=!1}static get _resizerKeyboardManager(){const Le=yr.prototype._resizeWithKeyboard,Ye=AnnotationEditorUIManager.TRANSLATE_SMALL,tt=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_resizerKeyboardManager",new KeyboardManager([[["ArrowLeft","mac+ArrowLeft"],Le,{args:[-Ye,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Le,{args:[-tt,0]}],[["ArrowRight","mac+ArrowRight"],Le,{args:[Ye,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Le,{args:[tt,0]}],[["ArrowUp","mac+ArrowUp"],Le,{args:[0,-Ye]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Le,{args:[0,-tt]}],[["ArrowDown","mac+ArrowDown"],Le,{args:[0,Ye]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Le,{args:[0,tt]}],[["Escape","mac+Escape"],yr.prototype._stopResizingWithKeyboard]]))}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return shadow(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(Le){const Ye=new FakeEditor({id:Le.parent.getNextId(),parent:Le.parent,uiManager:Le._uiManager});Ye.annotationElementId=Le.annotationElementId,Ye.deleted=!0,Ye._uiManager.addToAnnotationStorage(Ye)}static initialize(Le,Ye){if(yr._l10n??(yr._l10n=Le),yr._l10nResizer||(yr._l10nResizer=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"})),yr._borderLineWidth!==-1)return;const tt=getComputedStyle(document.documentElement);yr._borderLineWidth=parseFloat(tt.getPropertyValue("--outline-width"))||0}static updateDefaultParams(Le,Ye){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(Le){return!1}static paste(Le,Ye){unreachable$1("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return Ht(this,Ac)}set _isDraggable(Le){var Ye;C0(this,Ac,Le),(Ye=this.div)==null||Ye.classList.toggle("draggable",Le)}get isEnterHandled(){return!0}center(){const[Le,Ye]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*Ye/(Le*2),this.y+=this.width*Le/(Ye*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*Ye/(Le*2),this.y-=this.width*Le/(Ye*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(Le){this._uiManager.addCommands(Le)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=Ht(this,td)}setParent(Le){Le!==null?(this.pageIndex=Le.pageIndex,this.pageDimensions=Le.pageDimensions):y0(this,ir,Mu).call(this),this.parent=Le}focusin(Le){this._focusEventsAllowed&&(Ht(this,b2)?C0(this,b2,!1):this.parent.setSelected(this))}focusout(Le){var tt;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const Ye=Le.relatedTarget;Ye!=null&&Ye.closest(`#${this.id}`)||(Le.preventDefault(),(tt=this.parent)!=null&&tt.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(Le,Ye,tt,nt){const[ft,ht]=this.parentDimensions;[tt,nt]=this.screenToPageTranslation(tt,nt),this.x=(Le+tt)/ft,this.y=(Ye+nt)/ht,this.fixAndSetPosition()}translate(Le,Ye){y0(this,ir,H9).call(this,this.parentDimensions,Le,Ye)}translateInPage(Le,Ye){Ht(this,Po)||C0(this,Po,[this.x,this.y]),y0(this,ir,H9).call(this,this.pageDimensions,Le,Ye),this.div.scrollIntoView({block:"nearest"})}drag(Le,Ye){Ht(this,Po)||C0(this,Po,[this.x,this.y]);const[tt,nt]=this.parentDimensions;if(this.x+=Le/tt,this.y+=Ye/nt,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:xt,y:Et}=this.div.getBoundingClientRect();this.parent.findNewParent(this,xt,Et)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:ft,y:ht}=this;const[gt,At]=this.getBaseTranslation();ft+=gt,ht+=At,this.div.style.left=`${(100*ft).toFixed(2)}%`,this.div.style.top=`${(100*ht).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!Ht(this,Po)&&(Ht(this,Po)[0]!==this.x||Ht(this,Po)[1]!==this.y)}getBaseTranslation(){const[Le,Ye]=this.parentDimensions,{_borderLineWidth:tt}=yr,nt=tt/Le,ft=tt/Ye;switch(this.rotation){case 90:return[-nt,ft];case 180:return[nt,ft];case 270:return[nt,-ft];default:return[-nt,-ft]}}get _mustFixPosition(){return!0}fixAndSetPosition(Le=this.rotation){const[Ye,tt]=this.pageDimensions;let{x:nt,y:ft,width:ht,height:gt}=this;if(ht*=Ye,gt*=tt,nt*=Ye,ft*=tt,this._mustFixPosition)switch(Le){case 0:nt=Math.max(0,Math.min(Ye-ht,nt)),ft=Math.max(0,Math.min(tt-gt,ft));break;case 90:nt=Math.max(0,Math.min(Ye-gt,nt)),ft=Math.min(tt,Math.max(ht,ft));break;case 180:nt=Math.min(Ye,Math.max(ht,nt)),ft=Math.min(tt,Math.max(gt,ft));break;case 270:nt=Math.min(Ye,Math.max(gt,nt)),ft=Math.max(0,Math.min(tt-ht,ft));break}this.x=nt/=Ye,this.y=ft/=tt;const[At,xt]=this.getBaseTranslation();nt+=At,ft+=xt;const{style:Et}=this.div;Et.left=`${(100*nt).toFixed(2)}%`,Et.top=`${(100*ft).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(Le,Ye){var tt;return y0(tt=yr,xc,G9).call(tt,Le,Ye,this.parentRotation)}pageTranslationToScreen(Le,Ye){var tt;return y0(tt=yr,xc,G9).call(tt,Le,Ye,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:Le,pageDimensions:[Ye,tt]}=this;return[Ye*Le,tt*Le]}setDims(Le,Ye){const[tt,nt]=this.parentDimensions;this.div.style.width=`${(100*Le/tt).toFixed(2)}%`,Ht(this,k2)||(this.div.style.height=`${(100*Ye/nt).toFixed(2)}%`)}fixDims(){const{style:Le}=this.div,{height:Ye,width:tt}=Le,nt=tt.endsWith("%"),ft=!Ht(this,k2)&&Ye.endsWith("%");if(nt&&ft)return;const[ht,gt]=this.parentDimensions;nt||(Le.width=`${(100*parseFloat(tt)/ht).toFixed(2)}%`),!Ht(this,k2)&&!ft&&(Le.height=`${(100*parseFloat(Ye)/gt).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}altTextFinish(){var Le;(Le=Ht(this,Ur))==null||Le.finish()}async addEditToolbar(){return this._editToolbar||Ht(this,I2)?this._editToolbar:(this._editToolbar=new EditorToolbar(this),this.div.append(this._editToolbar.render()),Ht(this,Ur)&&await this._editToolbar.addAltText(Ht(this,Ur)),this._editToolbar)}removeEditToolbar(){var Le;this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,(Le=Ht(this,Ur))==null||Le.destroy())}addContainer(Le){var tt;const Ye=(tt=this._editToolbar)==null?void 0:tt.div;Ye?Ye.before(Le):this.div.append(Le)}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){Ht(this,Ur)||(AltText.initialize(yr._l10n),C0(this,Ur,new AltText(this)),Ht(this,y2)&&(Ht(this,Ur).data=Ht(this,y2),C0(this,y2,null)),await this.addEditToolbar())}get altTextData(){var Le;return(Le=Ht(this,Ur))==null?void 0:Le.data}set altTextData(Le){Ht(this,Ur)&&(Ht(this,Ur).data=Le)}get guessedAltText(){var Le;return(Le=Ht(this,Ur))==null?void 0:Le.guessedText}async setGuessedAltText(Le){var Ye;await((Ye=Ht(this,Ur))==null?void 0:Ye.setGuessedText(Le))}serializeAltText(Le){var Ye;return(Ye=Ht(this,Ur))==null?void 0:Ye.serialize(Le)}hasAltText(){return!!Ht(this,Ur)&&!Ht(this,Ur).isEmpty()}hasAltTextData(){var Le;return((Le=Ht(this,Ur))==null?void 0:Le.hasData())??!1}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.tabIndex=Ht(this,F1)?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground(),y0(this,ir,K9).call(this);const[Le,Ye]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*Ye/Le).toFixed(2)}%`,this.div.style.maxHeight=`${(100*Le/Ye).toFixed(2)}%`);const[tt,nt]=this.getInitialTranslation();return this.translate(tt,nt),bindEvents(this,this.div,["pointerdown"]),this.div}pointerdown(Le){const{isMac:Ye}=util_FeatureTest.platform;if(Le.button!==0||Le.ctrlKey&&Ye){Le.preventDefault();return}if(C0(this,b2,!0),this._isDraggable){y0(this,ir,h4).call(this,Le);return}y0(this,ir,$9).call(this,Le)}get isSelected(){return this._uiManager.isSelected(this)}moveInDOM(){Ht(this,hs)&&clearTimeout(Ht(this,hs)),C0(this,hs,setTimeout(()=>{var Le;C0(this,hs,null),(Le=this.parent)==null||Le.moveEditorInDOM(this)},0))}_setParentAndPosition(Le,Ye,tt){Le.changeParent(this),this.x=Ye,this.y=tt,this.fixAndSetPosition()}getRect(Le,Ye,tt=this.rotation){const nt=this.parentScale,[ft,ht]=this.pageDimensions,[gt,At]=this.pageTranslation,xt=Le/nt,Et=Ye/nt,yt=this.x*ft,Ct=this.y*ht,kt=this.width*ft,vt=this.height*ht;switch(tt){case 0:return[yt+xt+gt,ht-Ct-Et-vt+At,yt+xt+kt+gt,ht-Ct-Et+At];case 90:return[yt+Et+gt,ht-Ct+xt+At,yt+Et+vt+gt,ht-Ct+xt+kt+At];case 180:return[yt-xt-kt+gt,ht-Ct+Et+At,yt-xt+gt,ht-Ct+Et+vt+At];case 270:return[yt-Et-vt+gt,ht-Ct-xt-kt+At,yt-Et+gt,ht-Ct-xt+At];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(Le,Ye){const[tt,nt,ft,ht]=Le,gt=ft-tt,At=ht-nt;switch(this.rotation){case 0:return[tt,Ye-ht,gt,At];case 90:return[tt,Ye-nt,At,gt];case 180:return[ft,Ye-nt,gt,At];case 270:return[ft,Ye-ht,At,gt];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){C0(this,I2,!0)}disableEditMode(){C0(this,I2,!1)}isInEditMode(){return Ht(this,I2)}shouldGetKeyboardEvents(){return Ht(this,js)}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){y0(this,ir,K9).call(this)}rotate(Le){}serializeDeleted(){var Le;return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:((Le=this._initialData)==null?void 0:Le.popupRef)||""}}serialize(Le=!1,Ye=null){unreachable$1("An editor must be serializable")}static async deserialize(Le,Ye,tt){const nt=new this.prototype.constructor({parent:Ye,id:Ye.getNextId(),uiManager:tt});nt.rotation=Le.rotation,C0(nt,y2,Le.accessibilityData);const[ft,ht]=nt.pageDimensions,[gt,At,xt,Et]=nt.getRectInCurrentCoords(Le.rect,ht);return nt.x=gt/ft,nt.y=At/ht,nt.width=xt/ft,nt.height=Et/ht,nt}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){var Le;if((Le=Ht(this,Lo))==null||Le.abort(),C0(this,Lo,null),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),Ht(this,hs)&&(clearTimeout(Ht(this,hs)),C0(this,hs,null)),y0(this,ir,Mu).call(this),this.removeEditToolbar(),Ht(this,Ci)){for(const Ye of Ht(this,Ci).values())clearTimeout(Ye);C0(this,Ci,null)}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(y0(this,ir,p4).call(this),Ht(this,ga).classList.remove("hidden"),bindEvents(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(Le){if(!this.isResizable||Le.target!==this.div||Le.key!=="Enter")return;this._uiManager.setSelected(this),C0(this,v2,{savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height});const Ye=Ht(this,ga).children;if(!Ht(this,Hi)){C0(this,Hi,Array.from(Ye));const ht=y0(this,ir,m4).bind(this),gt=y0(this,ir,g4).bind(this),At=this._uiManager._signal;for(const xt of Ht(this,Hi)){const Et=xt.getAttribute("data-resizer-name");xt.setAttribute("role","spinbutton"),xt.addEventListener("keydown",ht,{signal:At}),xt.addEventListener("blur",gt,{signal:At}),xt.addEventListener("focus",y0(this,ir,A4).bind(this,Et),{signal:At}),xt.setAttribute("data-l10n-id",yr._l10nResizer[Et])}}const tt=Ht(this,Hi)[0];let nt=0;for(const ht of Ye){if(ht===tt)break;nt++}const ft=(360-this.rotation+this.parentRotation)%360/90*(Ht(this,Hi).length/4);if(ft!==nt){if(ft<nt)for(let gt=0;gt<nt-ft;gt++)Ht(this,ga).append(Ht(this,ga).firstChild);else if(ft>nt)for(let gt=0;gt<ft-nt;gt++)Ht(this,ga).firstChild.before(Ht(this,ga).lastChild);let ht=0;for(const gt of Ye){const xt=Ht(this,Hi)[ht++].getAttribute("data-resizer-name");gt.setAttribute("data-l10n-id",yr._l10nResizer[xt])}}y0(this,ir,q9).call(this,0),C0(this,js,!0),Ht(this,ga).firstChild.focus({focusVisible:!0}),Le.preventDefault(),Le.stopImmediatePropagation()}_resizeWithKeyboard(Le,Ye){Ht(this,js)&&y0(this,ir,X9).call(this,Ht(this,mc),{movementX:Le,movementY:Ye})}_stopResizingWithKeyboard(){y0(this,ir,Mu).call(this),this.div.focus()}select(){var Le,Ye,tt;if(this.makeResizable(),(Le=this.div)==null||Le.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{var nt,ft;(nt=this.div)!=null&&nt.classList.contains("selectedEditor")&&((ft=this._editToolbar)==null||ft.show())});return}(Ye=this._editToolbar)==null||Ye.show(),(tt=Ht(this,Ur))==null||tt.toggleAltTextBadge(!1)}unselect(){var Le,Ye,tt,nt,ft;(Le=Ht(this,ga))==null||Le.classList.add("hidden"),(Ye=this.div)==null||Ye.classList.remove("selectedEditor"),(tt=this.div)!=null&&tt.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),(nt=this._editToolbar)==null||nt.hide(),(ft=Ht(this,Ur))==null||ft.toggleAltTextBadge(!0)}updateParams(Le,Ye){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return Ht(this,gc)}set isEditing(Le){C0(this,gc,Le),this.parent&&(Le?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(Le,Ye){C0(this,k2,!0);const tt=Le/Ye,{style:nt}=this.div;nt.aspectRatio=tt,nt.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(Le,Ye=!1){if(Ye){Ht(this,Ci)||C0(this,Ci,new Map);const{action:tt}=Le;let nt=Ht(this,Ci).get(tt);nt&&clearTimeout(nt),nt=setTimeout(()=>{this._reportTelemetry(Le),Ht(this,Ci).delete(tt),Ht(this,Ci).size===0&&C0(this,Ci,null)},yr._telemetryTimeout),Ht(this,Ci).set(tt,nt);return}Le.type||(Le.type=this.editorType),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:Le}})}show(Le=this._isVisible){this.div.classList.toggle("hidden",!Le),this._isVisible=Le}enable(){this.div&&(this.div.tabIndex=0),C0(this,F1,!1)}disable(){this.div&&(this.div.tabIndex=-1),C0(this,F1,!0)}renderAnnotationElement(Le){let Ye=Le.container.querySelector(".annotationContent");if(!Ye)Ye=document.createElement("div"),Ye.classList.add("annotationContent",this.editorType),Le.container.prepend(Ye);else if(Ye.nodeName==="CANVAS"){const tt=Ye;Ye=document.createElement("div"),Ye.classList.add("annotationContent",this.editorType),tt.before(Ye)}return Ye}resetAnnotationElement(Le){const{firstChild:Ye}=Le.container;(Ye==null?void 0:Ye.nodeName)==="DIV"&&Ye.classList.contains("annotationContent")&&Ye.remove()}};y2=new WeakMap,Hi=new WeakMap,Ur=new WeakMap,F1=new WeakMap,k2=new WeakMap,ga=new WeakMap,v2=new WeakMap,Lo=new WeakMap,mc=new WeakMap,b2=new WeakMap,Po=new WeakMap,gc=new WeakMap,I2=new WeakMap,js=new WeakMap,hs=new WeakMap,Q1=new WeakMap,U1=new WeakMap,Ci=new WeakMap,Ac=new WeakMap,td=new WeakMap,ir=new WeakSet,H9=function([Le,Ye],tt,nt){[tt,nt]=this.screenToPageTranslation(tt,nt),this.x+=tt/Le,this.y+=nt/Ye,this.fixAndSetPosition()},xc=new WeakSet,G9=function(Le,Ye,tt){switch(tt){case 90:return[Ye,-Le];case 180:return[-Le,-Ye];case 270:return[-Ye,Le];default:return[Le,Ye]}},z9=function(Le){switch(Le){case 90:{const[Ye,tt]=this.pageDimensions;return[0,-Ye/tt,tt/Ye,0]}case 180:return[-1,0,0,-1];case 270:{const[Ye,tt]=this.pageDimensions;return[0,Ye/tt,-tt/Ye,0]}default:return[1,0,0,1]}},p4=function(){if(Ht(this,ga))return;C0(this,ga,document.createElement("div")),Ht(this,ga).classList.add("resizers");const Le=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],Ye=this._uiManager._signal;for(const tt of Le){const nt=document.createElement("div");Ht(this,ga).append(nt),nt.classList.add("resizer",tt),nt.setAttribute("data-resizer-name",tt),nt.addEventListener("pointerdown",y0(this,ir,f4).bind(this,tt),{signal:Ye}),nt.addEventListener("contextmenu",noContextMenu,{signal:Ye}),nt.tabIndex=-1}this.div.prepend(Ht(this,ga))},f4=function(Le,Ye){var vt;Ye.preventDefault();const{isMac:tt}=util_FeatureTest.platform;if(Ye.button!==0||Ye.ctrlKey&&tt)return;(vt=Ht(this,Ur))==null||vt.toggle(!1);const nt=this._isDraggable;this._isDraggable=!1;const ft=new AbortController,ht=this._uiManager.combinedSignal(ft);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",y0(this,ir,X9).bind(this,Le),{passive:!0,capture:!0,signal:ht}),window.addEventListener("contextmenu",noContextMenu,{signal:ht});const gt=this.x,At=this.y,xt=this.width,Et=this.height,yt=this.parent.div.style.cursor,Ct=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(Ye.target).cursor;const kt=()=>{var bt;ft.abort(),this.parent.togglePointerEvents(!0),(bt=Ht(this,Ur))==null||bt.toggle(!0),this._isDraggable=nt,this.parent.div.style.cursor=yt,this.div.style.cursor=Ct,y0(this,ir,W9).call(this,gt,At,xt,Et)};window.addEventListener("pointerup",kt,{signal:ht}),window.addEventListener("blur",kt,{signal:ht})},W9=function(Le,Ye,tt,nt){const ft=this.x,ht=this.y,gt=this.width,At=this.height;ft===Le&&ht===Ye&>===tt&&At===nt||this.addCommands({cmd:()=>{this.width=gt,this.height=At,this.x=ft,this.y=ht;const[xt,Et]=this.parentDimensions;this.setDims(xt*gt,Et*At),this.fixAndSetPosition()},undo:()=>{this.width=tt,this.height=nt,this.x=Le,this.y=Ye;const[xt,Et]=this.parentDimensions;this.setDims(xt*tt,Et*nt),this.fixAndSetPosition()},mustExec:!0})},X9=function(Le,Ye){const[tt,nt]=this.parentDimensions,ft=this.x,ht=this.y,gt=this.width,At=this.height,xt=yr.MIN_SIZE/tt,Et=yr.MIN_SIZE/nt,yt=jt=>Math.round(jt*1e4)/1e4,Ct=y0(this,ir,z9).call(this,this.rotation),kt=(jt,zt)=>[Ct[0]*jt+Ct[2]*zt,Ct[1]*jt+Ct[3]*zt],vt=y0(this,ir,z9).call(this,360-this.rotation),bt=(jt,zt)=>[vt[0]*jt+vt[2]*zt,vt[1]*jt+vt[3]*zt];let It,wt,Rt=!1,Tt=!1;switch(Le){case"topLeft":Rt=!0,It=(jt,zt)=>[0,0],wt=(jt,zt)=>[jt,zt];break;case"topMiddle":It=(jt,zt)=>[jt/2,0],wt=(jt,zt)=>[jt/2,zt];break;case"topRight":Rt=!0,It=(jt,zt)=>[jt,0],wt=(jt,zt)=>[0,zt];break;case"middleRight":Tt=!0,It=(jt,zt)=>[jt,zt/2],wt=(jt,zt)=>[0,zt/2];break;case"bottomRight":Rt=!0,It=(jt,zt)=>[jt,zt],wt=(jt,zt)=>[0,0];break;case"bottomMiddle":It=(jt,zt)=>[jt/2,zt],wt=(jt,zt)=>[jt/2,0];break;case"bottomLeft":Rt=!0,It=(jt,zt)=>[0,zt],wt=(jt,zt)=>[jt,0];break;case"middleLeft":Tt=!0,It=(jt,zt)=>[0,zt/2],wt=(jt,zt)=>[jt,zt/2];break}const Bt=It(gt,At),Dt=wt(gt,At);let Lt=kt(...Dt);const Nt=yt(ft+Lt[0]),Pt=yt(ht+Lt[1]);let Wt=1,$t=1,[Kt,Vt]=this.screenToPageTranslation(Ye.movementX,Ye.movementY);if([Kt,Vt]=bt(Kt/tt,Vt/nt),Rt){const jt=Math.hypot(gt,At);Wt=$t=Math.max(Math.min(Math.hypot(Dt[0]-Bt[0]-Kt,Dt[1]-Bt[1]-Vt)/jt,1/gt,1/At),xt/gt,Et/At)}else Tt?Wt=Math.max(xt,Math.min(1,Math.abs(Dt[0]-Bt[0]-Kt)))/gt:$t=Math.max(Et,Math.min(1,Math.abs(Dt[1]-Bt[1]-Vt)))/At;const Ut=yt(gt*Wt),_t=yt(At*$t);Lt=kt(...wt(Ut,_t));const Xt=Nt-Lt[0],Qt=Pt-Lt[1];this.width=Ut,this.height=_t,this.x=Xt,this.y=Qt,this.setDims(tt*Ut,nt*_t),this.fixAndSetPosition()},$9=function(Le){const{isMac:Ye}=util_FeatureTest.platform;Le.ctrlKey&&!Ye||Le.shiftKey||Le.metaKey&&Ye?this.parent.toggleSelected(this):this.parent.setSelected(this)},h4=function(Le){const{isSelected:Ye}=this;this._uiManager.setUpDragSession();const tt=new AbortController,nt=this._uiManager.combinedSignal(tt);if(Ye){this.div.classList.add("moving"),C0(this,Q1,Le.clientX),C0(this,U1,Le.clientY);const ht=gt=>{const{clientX:At,clientY:xt}=gt,[Et,yt]=this.screenToPageTranslation(At-Ht(this,Q1),xt-Ht(this,U1));C0(this,Q1,At),C0(this,U1,xt),this._uiManager.dragSelectedEditors(Et,yt)};window.addEventListener("pointermove",ht,{passive:!0,capture:!0,signal:nt})}const ft=()=>{tt.abort(),Ye&&this.div.classList.remove("moving"),C0(this,b2,!1),this._uiManager.endDragSession()||y0(this,ir,$9).call(this,Le)};window.addEventListener("pointerup",ft,{signal:nt}),window.addEventListener("blur",ft,{signal:nt})},K9=function(){if(Ht(this,Lo)||!this.div)return;C0(this,Lo,new AbortController);const Le=this._uiManager.combinedSignal(Ht(this,Lo));this.div.addEventListener("focusin",this.focusin.bind(this),{signal:Le}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:Le})},m4=function(Le){yr._resizerKeyboardManager.exec(this,Le)},g4=function(Le){var Ye;Ht(this,js)&&((Ye=Le.relatedTarget)==null?void 0:Ye.parentNode)!==Ht(this,ga)&&y0(this,ir,Mu).call(this)},A4=function(Le){C0(this,mc,Ht(this,js)?Le:"")},q9=function(Le){if(Ht(this,Hi))for(const Ye of Ht(this,Hi))Ye.tabIndex=Le},Mu=function(){if(C0(this,js,!1),y0(this,ir,q9).call(this,-1),Ht(this,v2)){const{savedX:Le,savedY:Ye,savedWidth:tt,savedHeight:nt}=Ht(this,v2);y0(this,ir,W9).call(this,Le,Ye,tt,nt),C0(this,v2,null)}},k0(yr,xc),Nn(yr,"_l10n",null),Nn(yr,"_l10nResizer",null),Nn(yr,"_borderLineWidth",-1),Nn(yr,"_colorManager",new ColorManager),Nn(yr,"_zIndex",1),Nn(yr,"_telemetryTimeout",1e3);let AnnotationEditor=yr;class FakeEditor extends AnnotationEditor{constructor(Le){super(Le),this.annotationElementId=Le.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const SEED=3285377520,MASK_HIGH=4294901760,MASK_LOW=65535;class MurmurHash3_64{constructor(Le){this.h1=Le?Le&4294967295:SEED,this.h2=Le?Le&4294967295:SEED}update(Le){let Ye,tt;if(typeof Le=="string"){Ye=new Uint8Array(Le.length*2),tt=0;for(let bt=0,It=Le.length;bt<It;bt++){const wt=Le.charCodeAt(bt);wt<=255?Ye[tt++]=wt:(Ye[tt++]=wt>>>8,Ye[tt++]=wt&255)}}else if(ArrayBuffer.isView(Le))Ye=Le.slice(),tt=Ye.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const nt=tt>>2,ft=tt-nt*4,ht=new Uint32Array(Ye.buffer,0,nt);let gt=0,At=0,xt=this.h1,Et=this.h2;const yt=3432918353,Ct=461845907,kt=yt&MASK_LOW,vt=Ct&MASK_LOW;for(let bt=0;bt<nt;bt++)bt&1?(gt=ht[bt],gt=gt*yt&MASK_HIGH|gt*kt&MASK_LOW,gt=gt<<15|gt>>>17,gt=gt*Ct&MASK_HIGH|gt*vt&MASK_LOW,xt^=gt,xt=xt<<13|xt>>>19,xt=xt*5+3864292196):(At=ht[bt],At=At*yt&MASK_HIGH|At*kt&MASK_LOW,At=At<<15|At>>>17,At=At*Ct&MASK_HIGH|At*vt&MASK_LOW,Et^=At,Et=Et<<13|Et>>>19,Et=Et*5+3864292196);switch(gt=0,ft){case 3:gt^=Ye[nt*4+2]<<16;case 2:gt^=Ye[nt*4+1]<<8;case 1:gt^=Ye[nt*4],gt=gt*yt&MASK_HIGH|gt*kt&MASK_LOW,gt=gt<<15|gt>>>17,gt=gt*Ct&MASK_HIGH|gt*vt&MASK_LOW,nt&1?xt^=gt:Et^=gt}this.h1=xt,this.h2=Et}hexdigest(){let Le=this.h1,Ye=this.h2;return Le^=Ye>>>1,Le=Le*3981806797&MASK_HIGH|Le*36045&MASK_LOW,Ye=Ye*4283543511&MASK_HIGH|((Ye<<16|Le>>>16)*2950163797&MASK_HIGH)>>>16,Le^=Ye>>>1,Le=Le*444984403&MASK_HIGH|Le*60499&MASK_LOW,Ye=Ye*3301882366&MASK_HIGH|((Ye<<16|Le>>>16)*3120437893&MASK_HIGH)>>>16,Le^=Ye>>>1,(Le>>>0).toString(16).padStart(8,"0")+(Ye>>>0).toString(16).padStart(8,"0")}}const SerializableEmpty=Object.freeze({map:null,hash:"",transfer:void 0});class AnnotationStorage{constructor(){k0(this,nd);k0(this,S2,!1);k0(this,w2,null);k0(this,fa,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(Le,Ye){const tt=Ht(this,fa).get(Le);return tt===void 0?Ye:Object.assign(Ye,tt)}getRawValue(Le){return Ht(this,fa).get(Le)}remove(Le){if(Ht(this,fa).delete(Le),Ht(this,fa).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const Ye of Ht(this,fa).values())if(Ye instanceof AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(Le,Ye){const tt=Ht(this,fa).get(Le);let nt=!1;if(tt!==void 0)for(const[ft,ht]of Object.entries(Ye))tt[ft]!==ht&&(nt=!0,tt[ft]=ht);else nt=!0,Ht(this,fa).set(Le,Ye);nt&&y0(this,nd,x4).call(this),Ye instanceof AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(Ye.constructor._type)}has(Le){return Ht(this,fa).has(Le)}getAll(){return Ht(this,fa).size>0?objectFromMap(Ht(this,fa)):null}setAll(Le){for(const[Ye,tt]of Object.entries(Le))this.setValue(Ye,tt)}get size(){return Ht(this,fa).size}resetModified(){Ht(this,S2)&&(C0(this,S2,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new PrintAnnotationStorage(this)}get serializable(){if(Ht(this,fa).size===0)return SerializableEmpty;const Le=new Map,Ye=new MurmurHash3_64,tt=[],nt=Object.create(null);let ft=!1;for(const[ht,gt]of Ht(this,fa)){const At=gt instanceof AnnotationEditor?gt.serialize(!1,nt):gt;At&&(Le.set(ht,At),Ye.update(`${ht}:${JSON.stringify(At)}`),ft||(ft=!!At.bitmap))}if(ft)for(const ht of Le.values())ht.bitmap&&tt.push(ht.bitmap);return Le.size>0?{map:Le,hash:Ye.hexdigest(),transfer:tt}:SerializableEmpty}get editorStats(){let Le=null;const Ye=new Map;for(const tt of Ht(this,fa).values()){if(!(tt instanceof AnnotationEditor))continue;const nt=tt.telemetryFinalData;if(!nt)continue;const{type:ft}=nt;Ye.has(ft)||Ye.set(ft,Object.getPrototypeOf(tt).constructor),Le||(Le=Object.create(null));const ht=Le[ft]||(Le[ft]=new Map);for(const[gt,At]of Object.entries(nt)){if(gt==="type")continue;let xt=ht.get(gt);xt||(xt=new Map,ht.set(gt,xt));const Et=xt.get(At)??0;xt.set(At,Et+1)}}for(const[tt,nt]of Ye)Le[tt]=nt.computeTelemetryFinalData(Le[tt]);return Le}resetModifiedIds(){C0(this,w2,null)}get modifiedIds(){if(Ht(this,w2))return Ht(this,w2);const Le=[];for(const Ye of Ht(this,fa).values())!(Ye instanceof AnnotationEditor)||!Ye.annotationElementId||!Ye.serialize()||Le.push(Ye.annotationElementId);return C0(this,w2,{ids:new Set(Le),hash:Le.join(",")})}}S2=new WeakMap,w2=new WeakMap,fa=new WeakMap,nd=new WeakSet,x4=function(){Ht(this,S2)||(C0(this,S2,!0),typeof this.onSetModified=="function"&&this.onSetModified())};class PrintAnnotationStorage extends AnnotationStorage{constructor(Ye){super();k0(this,Ec);const{map:tt,hash:nt,transfer:ft}=Ye.serializable,ht=structuredClone(tt,ft?{transfer:ft}:null);C0(this,Ec,{map:ht,hash:nt,transfer:ft})}get print(){unreachable$1("Should not call PrintAnnotationStorage.print")}get serializable(){return Ht(this,Ec)}get modifiedIds(){return shadow(this,"modifiedIds",{ids:new Set,hash:""})}}Ec=new WeakMap;class FontLoader{constructor({ownerDocument:Le=globalThis.document,styleElement:Ye=null}){k0(this,V1,new Set);this._document=Le,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(Le){this.nativeFontFaces.add(Le),this._document.fonts.add(Le)}removeNativeFontFace(Le){this.nativeFontFaces.delete(Le),this._document.fonts.delete(Le)}insertRule(Le){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const Ye=this.styleElement.sheet;Ye.insertRule(Le,Ye.cssRules.length)}clear(){for(const Le of this.nativeFontFaces)this._document.fonts.delete(Le);this.nativeFontFaces.clear(),Ht(this,V1).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:Le,_inspectFont:Ye}){if(!(!Le||Ht(this,V1).has(Le.loadedName))){if(assert(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:tt,src:nt,style:ft}=Le,ht=new FontFace(tt,nt,ft);this.addNativeFontFace(ht);try{await ht.load(),Ht(this,V1).add(tt),Ye==null||Ye(Le)}catch{warn$1(`Cannot load system font: ${Le.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(ht)}return}unreachable$1("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(Le){if(Le.attached||Le.missingFile&&!Le.systemFontInfo)return;if(Le.attached=!0,Le.systemFontInfo){await this.loadSystemFont(Le);return}if(this.isFontLoadingAPISupported){const tt=Le.createNativeFontFace();if(tt){this.addNativeFontFace(tt);try{await tt.loaded}catch(nt){throw warn$1(`Failed to load font '${tt.family}': '${nt}'.`),Le.disableFontFace=!0,nt}}return}const Ye=Le.createFontFaceRule();if(Ye){if(this.insertRule(Ye),this.isSyncFontLoadingSupported)return;await new Promise(tt=>{const nt=this._queueLoadingCallback(tt);this._prepareFontLoadEvent(Le,nt)})}}get isFontLoadingAPISupported(){var Ye;const Le=!!((Ye=this._document)!=null&&Ye.fonts);return shadow(this,"isFontLoadingAPISupported",Le)}get isSyncFontLoadingSupported(){let Le=!1;return(isNodeJS||typeof navigator<"u"&&typeof(navigator==null?void 0:navigator.userAgent)=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(Le=!0),shadow(this,"isSyncFontLoadingSupported",Le)}_queueLoadingCallback(Le){function Ye(){for(assert(!nt.done,"completeRequest() cannot be called twice."),nt.done=!0;tt.length>0&&tt[0].done;){const ft=tt.shift();setTimeout(ft.callback,0)}}const{loadingRequests:tt}=this,nt={done:!1,complete:Ye,callback:Le};return tt.push(nt),nt}get _loadTestFont(){const Le=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return shadow(this,"_loadTestFont",Le)}_prepareFontLoadEvent(Le,Ye){function tt(Bt,Dt){return Bt.charCodeAt(Dt)<<24|Bt.charCodeAt(Dt+1)<<16|Bt.charCodeAt(Dt+2)<<8|Bt.charCodeAt(Dt+3)&255}function nt(Bt,Dt,Lt,Nt){const Pt=Bt.substring(0,Dt),Wt=Bt.substring(Dt+Lt);return Pt+Nt+Wt}let ft,ht;const gt=this._document.createElement("canvas");gt.width=1,gt.height=1;const At=gt.getContext("2d");let xt=0;function Et(Bt,Dt){if(++xt>30){warn$1("Load test font never loaded."),Dt();return}if(At.font="30px "+Bt,At.fillText(".",0,20),At.getImageData(0,0,1,1).data[3]>0){Dt();return}setTimeout(Et.bind(null,Bt,Dt))}const yt=`lt${Date.now()}${this.loadTestFontId++}`;let Ct=this._loadTestFont;Ct=nt(Ct,976,yt.length,yt);const vt=16,bt=1482184792;let It=tt(Ct,vt);for(ft=0,ht=yt.length-3;ft<ht;ft+=4)It=It-bt+tt(yt,ft)|0;ft<yt.length&&(It=It-bt+tt(yt+"XXX",ft)|0),Ct=nt(Ct,vt,4,string32(It));const wt=`url(data:font/opentype;base64,${btoa(Ct)});`,Rt=`@font-face {font-family:"${yt}";src:${wt}}`;this.insertRule(Rt);const Tt=this._document.createElement("div");Tt.style.visibility="hidden",Tt.style.width=Tt.style.height="10px",Tt.style.position="absolute",Tt.style.top=Tt.style.left="0px";for(const Bt of[Le.loadedName,yt]){const Dt=this._document.createElement("span");Dt.textContent="Hi",Dt.style.fontFamily=Bt,Tt.append(Dt)}this._document.body.append(Tt),Et(yt,()=>{Tt.remove(),Ye.complete()})}}V1=new WeakMap;class FontFaceObject{constructor(Le,{disableFontFace:Ye=!1,inspectFont:tt=null}){this.compiledGlyphs=Object.create(null);for(const nt in Le)this[nt]=Le[nt];this.disableFontFace=Ye===!0,this._inspectFont=tt}createNativeFontFace(){var Ye;if(!this.data||this.disableFontFace)return null;let Le;if(!this.cssFontInfo)Le=new FontFace(this.loadedName,this.data,{});else{const tt={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(tt.style=`oblique ${this.cssFontInfo.italicAngle}deg`),Le=new FontFace(this.cssFontInfo.fontFamily,this.data,tt)}return(Ye=this._inspectFont)==null||Ye.call(this,this),Le}createFontFaceRule(){var tt;if(!this.data||this.disableFontFace)return null;const Le=`url(data:${this.mimetype};base64,${toBase64Util(this.data)});`;let Ye;if(!this.cssFontInfo)Ye=`@font-face {font-family:"${this.loadedName}";src:${Le}}`;else{let nt=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(nt+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),Ye=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${nt}src:${Le}}`}return(tt=this._inspectFont)==null||tt.call(this,this,Le),Ye}getPathGenerator(Le,Ye){if(this.compiledGlyphs[Ye]!==void 0)return this.compiledGlyphs[Ye];let tt;try{tt=Le.get(this.loadedName+"_path_"+Ye)}catch(ft){warn$1(`getPathGenerator - ignoring character: "${ft}".`)}if(!Array.isArray(tt)||tt.length===0)return this.compiledGlyphs[Ye]=function(ft,ht){};const nt=[];for(let ft=0,ht=tt.length;ft<ht;)switch(tt[ft++]){case FontRenderOps.BEZIER_CURVE_TO:{const[gt,At,xt,Et,yt,Ct]=tt.slice(ft,ft+6);nt.push(kt=>kt.bezierCurveTo(gt,At,xt,Et,yt,Ct)),ft+=6}break;case FontRenderOps.MOVE_TO:{const[gt,At]=tt.slice(ft,ft+2);nt.push(xt=>xt.moveTo(gt,At)),ft+=2}break;case FontRenderOps.LINE_TO:{const[gt,At]=tt.slice(ft,ft+2);nt.push(xt=>xt.lineTo(gt,At)),ft+=2}break;case FontRenderOps.QUADRATIC_CURVE_TO:{const[gt,At,xt,Et]=tt.slice(ft,ft+4);nt.push(yt=>yt.quadraticCurveTo(gt,At,xt,Et)),ft+=4}break;case FontRenderOps.RESTORE:nt.push(gt=>gt.restore());break;case FontRenderOps.SAVE:nt.push(gt=>gt.save());break;case FontRenderOps.SCALE:assert(nt.length===2,"Scale command is only valid at the third position.");break;case FontRenderOps.TRANSFORM:{const[gt,At,xt,Et,yt,Ct]=tt.slice(ft,ft+6);nt.push(kt=>kt.transform(gt,At,xt,Et,yt,Ct)),ft+=6}break;case FontRenderOps.TRANSLATE:{const[gt,At]=tt.slice(ft,ft+2);nt.push(xt=>xt.translate(gt,At)),ft+=2}break}return this.compiledGlyphs[Ye]=function(ht,gt){nt[0](ht),nt[1](ht),ht.scale(gt,-gt);for(let At=2,xt=nt.length;At<xt;At++)nt[At](ht)}}}class BaseCanvasFactory{constructor({enableHWA:Le=!1}){k0(this,Cc,!1);C0(this,Cc,Le)}create(Le,Ye){if(Le<=0||Ye<=0)throw new Error("Invalid canvas size");const tt=this._createCanvas(Le,Ye);return{canvas:tt,context:tt.getContext("2d",{willReadFrequently:!Ht(this,Cc)})}}reset(Le,Ye,tt){if(!Le.canvas)throw new Error("Canvas is not specified");if(Ye<=0||tt<=0)throw new Error("Invalid canvas size");Le.canvas.width=Ye,Le.canvas.height=tt}destroy(Le){if(!Le.canvas)throw new Error("Canvas is not specified");Le.canvas.width=0,Le.canvas.height=0,Le.canvas=null,Le.context=null}_createCanvas(Le,Ye){unreachable$1("Abstract method `_createCanvas` called.")}}Cc=new WeakMap;class DOMCanvasFactory extends BaseCanvasFactory{constructor({ownerDocument:Le=globalThis.document,enableHWA:Ye=!1}){super({enableHWA:Ye}),this._document=Le}_createCanvas(Le,Ye){const tt=this._document.createElement("canvas");return tt.width=Le,tt.height=Ye,tt}}class BaseCMapReaderFactory{constructor({baseUrl:Le=null,isCompressed:Ye=!0}){this.baseUrl=Le,this.isCompressed=Ye}async fetch({name:Le}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!Le)throw new Error("CMap name must be specified.");const Ye=this.baseUrl+Le+(this.isCompressed?".bcmap":"");return this._fetch(Ye).then(tt=>({cMapData:tt,isCompressed:this.isCompressed})).catch(tt=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${Ye}`)})}async _fetch(Le){unreachable$1("Abstract method `_fetch` called.")}}class DOMCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(Le){const Ye=await fetchData(Le,this.isCompressed?"arraybuffer":"text");return Ye instanceof ArrayBuffer?new Uint8Array(Ye):stringToBytes(Ye)}}class BaseFilterFactory{addFilter(Le){return"none"}addHCMFilter(Le,Ye){return"none"}addAlphaFilter(Le){return"none"}addLuminosityFilter(Le){return"none"}addHighlightHCMFilter(Le,Ye,tt,nt,ft){return"none"}destroy(Le=!1){}}class DOMFilterFactory extends BaseFilterFactory{constructor({docId:Ye,ownerDocument:tt=globalThis.document}){super();k0(this,In);k0(this,R2);k0(this,T2);k0(this,ms);k0(this,Fs);k0(this,Ia);k0(this,rd);k0(this,B2,0);C0(this,Fs,Ye),C0(this,Ia,tt)}addFilter(Ye){if(!Ye)return"none";let tt=Ht(this,In,Na).get(Ye);if(tt)return tt;const[nt,ft,ht]=y0(this,In,r3).call(this,Ye),gt=Ye.length===1?nt:`${nt}${ft}${ht}`;if(tt=Ht(this,In,Na).get(gt),tt)return Ht(this,In,Na).set(Ye,tt),tt;const At=`g_${Ht(this,Fs)}_transfer_map_${Va(this,B2)._++}`,xt=y0(this,In,$l).call(this,At);Ht(this,In,Na).set(Ye,xt),Ht(this,In,Na).set(gt,xt);const Et=y0(this,In,Kl).call(this,At);return y0(this,In,Fu).call(this,nt,ft,ht,Et),xt}addHCMFilter(Ye,tt){var vt;const nt=`${Ye}-${tt}`,ft="base";let ht=Ht(this,In,Wl).get(ft);if((ht==null?void 0:ht.key)===nt||(ht?((vt=ht.filter)==null||vt.remove(),ht.key=nt,ht.url="none",ht.filter=null):(ht={key:nt,url:"none",filter:null},Ht(this,In,Wl).set(ft,ht)),!Ye||!tt))return ht.url;const gt=y0(this,In,Qu).call(this,Ye);Ye=Util.makeHexColor(...gt);const At=y0(this,In,Qu).call(this,tt);if(tt=Util.makeHexColor(...At),Ht(this,In,Xl).style.color="",Ye==="#000000"&&tt==="#ffffff"||Ye===tt)return ht.url;const xt=new Array(256);for(let bt=0;bt<=255;bt++){const It=bt/255;xt[bt]=It<=.03928?It/12.92:((It+.055)/1.055)**2.4}const Et=xt.join(","),yt=`g_${Ht(this,Fs)}_hcm_filter`,Ct=ht.filter=y0(this,In,Kl).call(this,yt);y0(this,In,Fu).call(this,Et,Et,Et,Ct),y0(this,In,Y9).call(this,Ct);const kt=(bt,It)=>{const wt=gt[bt]/255,Rt=At[bt]/255,Tt=new Array(It+1);for(let Bt=0;Bt<=It;Bt++)Tt[Bt]=wt+Bt/It*(Rt-wt);return Tt.join(",")};return y0(this,In,Fu).call(this,kt(0,5),kt(1,5),kt(2,5),Ct),ht.url=y0(this,In,$l).call(this,yt),ht.url}addAlphaFilter(Ye){let tt=Ht(this,In,Na).get(Ye);if(tt)return tt;const[nt]=y0(this,In,r3).call(this,[Ye]),ft=`alpha_${nt}`;if(tt=Ht(this,In,Na).get(ft),tt)return Ht(this,In,Na).set(Ye,tt),tt;const ht=`g_${Ht(this,Fs)}_alpha_map_${Va(this,B2)._++}`,gt=y0(this,In,$l).call(this,ht);Ht(this,In,Na).set(Ye,gt),Ht(this,In,Na).set(ft,gt);const At=y0(this,In,Kl).call(this,ht);return y0(this,In,Z9).call(this,nt,At),gt}addLuminosityFilter(Ye){let tt=Ht(this,In,Na).get(Ye||"luminosity");if(tt)return tt;let nt,ft;if(Ye?([nt]=y0(this,In,r3).call(this,[Ye]),ft=`luminosity_${nt}`):ft="luminosity",tt=Ht(this,In,Na).get(ft),tt)return Ht(this,In,Na).set(Ye,tt),tt;const ht=`g_${Ht(this,Fs)}_luminosity_map_${Va(this,B2)._++}`,gt=y0(this,In,$l).call(this,ht);Ht(this,In,Na).set(Ye,gt),Ht(this,In,Na).set(ft,gt);const At=y0(this,In,Kl).call(this,ht);return y0(this,In,E4).call(this,At),Ye&&y0(this,In,Z9).call(this,nt,At),gt}addHighlightHCMFilter(Ye,tt,nt,ft,ht){var Rt;const gt=`${tt}-${nt}-${ft}-${ht}`;let At=Ht(this,In,Wl).get(Ye);if((At==null?void 0:At.key)===gt||(At?((Rt=At.filter)==null||Rt.remove(),At.key=gt,At.url="none",At.filter=null):(At={key:gt,url:"none",filter:null},Ht(this,In,Wl).set(Ye,At)),!tt||!nt))return At.url;const[xt,Et]=[tt,nt].map(y0(this,In,Qu).bind(this));let yt=Math.round(.2126*xt[0]+.7152*xt[1]+.0722*xt[2]),Ct=Math.round(.2126*Et[0]+.7152*Et[1]+.0722*Et[2]),[kt,vt]=[ft,ht].map(y0(this,In,Qu).bind(this));Ct<yt&&([yt,Ct,kt,vt]=[Ct,yt,vt,kt]),Ht(this,In,Xl).style.color="";const bt=(Tt,Bt,Dt)=>{const Lt=new Array(256),Nt=(Ct-yt)/Dt,Pt=Tt/255,Wt=(Bt-Tt)/(255*Dt);let $t=0;for(let Kt=0;Kt<=Dt;Kt++){const Vt=Math.round(yt+Kt*Nt),Ut=Pt+Kt*Wt;for(let _t=$t;_t<=Vt;_t++)Lt[_t]=Ut;$t=Vt+1}for(let Kt=$t;Kt<256;Kt++)Lt[Kt]=Lt[$t-1];return Lt.join(",")},It=`g_${Ht(this,Fs)}_hcm_${Ye}_filter`,wt=At.filter=y0(this,In,Kl).call(this,It);return y0(this,In,Y9).call(this,wt),y0(this,In,Fu).call(this,bt(kt[0],vt[0],5),bt(kt[1],vt[1],5),bt(kt[2],vt[2],5),wt),At.url=y0(this,In,$l).call(this,It),At.url}destroy(Ye=!1){Ye&&Ht(this,In,Wl).size!==0||(Ht(this,ms)&&(Ht(this,ms).parentNode.parentNode.remove(),C0(this,ms,null)),Ht(this,T2)&&(Ht(this,T2).clear(),C0(this,T2,null)),C0(this,B2,0))}}R2=new WeakMap,T2=new WeakMap,ms=new WeakMap,Fs=new WeakMap,Ia=new WeakMap,rd=new WeakMap,B2=new WeakMap,In=new WeakSet,Na=function(){return Ht(this,T2)||C0(this,T2,new Map)},Wl=function(){return Ht(this,rd)||C0(this,rd,new Map)},Xl=function(){if(!Ht(this,ms)){const Ye=Ht(this,Ia).createElement("div"),{style:tt}=Ye;tt.visibility="hidden",tt.contain="strict",tt.width=tt.height=0,tt.position="absolute",tt.top=tt.left=0,tt.zIndex=-1;const nt=Ht(this,Ia).createElementNS(SVG_NS,"svg");nt.setAttribute("width",0),nt.setAttribute("height",0),C0(this,ms,Ht(this,Ia).createElementNS(SVG_NS,"defs")),Ye.append(nt),nt.append(Ht(this,ms)),Ht(this,Ia).body.append(Ye)}return Ht(this,ms)},r3=function(Ye){if(Ye.length===1){const xt=Ye[0],Et=new Array(256);for(let Ct=0;Ct<256;Ct++)Et[Ct]=xt[Ct]/255;const yt=Et.join(",");return[yt,yt,yt]}const[tt,nt,ft]=Ye,ht=new Array(256),gt=new Array(256),At=new Array(256);for(let xt=0;xt<256;xt++)ht[xt]=tt[xt]/255,gt[xt]=nt[xt]/255,At[xt]=ft[xt]/255;return[ht.join(","),gt.join(","),At.join(",")]},$l=function(Ye){if(Ht(this,R2)===void 0){C0(this,R2,"");const tt=Ht(this,Ia).URL;tt!==Ht(this,Ia).baseURI&&(isDataScheme(tt)?warn$1('#createUrl: ignore "data:"-URL for performance reasons.'):C0(this,R2,tt.split("#",1)[0]))}return`url(${Ht(this,R2)}#${Ye})`},E4=function(Ye){const tt=Ht(this,Ia).createElementNS(SVG_NS,"feColorMatrix");tt.setAttribute("type","matrix"),tt.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),Ye.append(tt)},Y9=function(Ye){const tt=Ht(this,Ia).createElementNS(SVG_NS,"feColorMatrix");tt.setAttribute("type","matrix"),tt.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),Ye.append(tt)},Kl=function(Ye){const tt=Ht(this,Ia).createElementNS(SVG_NS,"filter");return tt.setAttribute("color-interpolation-filters","sRGB"),tt.setAttribute("id",Ye),Ht(this,In,Xl).append(tt),tt},ju=function(Ye,tt,nt){const ft=Ht(this,Ia).createElementNS(SVG_NS,tt);ft.setAttribute("type","discrete"),ft.setAttribute("tableValues",nt),Ye.append(ft)},Fu=function(Ye,tt,nt,ft){const ht=Ht(this,Ia).createElementNS(SVG_NS,"feComponentTransfer");ft.append(ht),y0(this,In,ju).call(this,ht,"feFuncR",Ye),y0(this,In,ju).call(this,ht,"feFuncG",tt),y0(this,In,ju).call(this,ht,"feFuncB",nt)},Z9=function(Ye,tt){const nt=Ht(this,Ia).createElementNS(SVG_NS,"feComponentTransfer");tt.append(nt),y0(this,In,ju).call(this,nt,"feFuncA",Ye)},Qu=function(Ye){return Ht(this,In,Xl).style.color=Ye,getRGB(getComputedStyle(Ht(this,In,Xl)).getPropertyValue("color"))};class BaseStandardFontDataFactory{constructor({baseUrl:Le=null}){this.baseUrl=Le}async fetch({filename:Le}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!Le)throw new Error("Font filename must be specified.");const Ye=`${this.baseUrl}${Le}`;return this._fetch(Ye).catch(tt=>{throw new Error(`Unable to load font data at: ${Ye}`)})}async _fetch(Le){unreachable$1("Abstract method `_fetch` called.")}}class DOMStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(Le){const Ye=await fetchData(Le,"arraybuffer");return new Uint8Array(Ye)}}if(isNodeJS){var packageCapability=Promise.withResolvers(),packageMap=null;(async()=>{const Le=await Promise.resolve().then(()=>__viteBrowserExternal$1),Ye=await Promise.resolve().then(()=>__viteBrowserExternal$1),tt=await Promise.resolve().then(()=>__viteBrowserExternal$1),nt=await Promise.resolve().then(()=>__viteBrowserExternal$1);let ft,ht;return new Map(Object.entries({fs:Le,http:Ye,https:tt,url:nt,canvas:ft,path2d:ht}))})().then(Le=>{packageMap=Le,packageCapability.resolve()},Le=>{warn$1(`loadPackages: ${Le}`),packageMap=new Map,packageCapability.resolve()})}class NodePackages{static get promise(){return packageCapability.promise}static get(Le){return packageMap==null?void 0:packageMap.get(Le)}}async function node_utils_fetchData(Be){const Ye=await NodePackages.get("fs").promises.readFile(Be);return new Uint8Array(Ye)}class NodeFilterFactory extends BaseFilterFactory{}class NodeCanvasFactory extends BaseCanvasFactory{_createCanvas(Le,Ye){return NodePackages.get("canvas").createCanvas(Le,Ye)}}class NodeCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(Le){return node_utils_fetchData(Le)}}class NodeStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(Le){return node_utils_fetchData(Le)}}const PathType={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function applyBoundingBox(Be,Le){if(!Le)return;const Ye=Le[2]-Le[0],tt=Le[3]-Le[1],nt=new Path2D;nt.rect(Le[0],Le[1],Ye,tt),Be.clip(nt)}class BaseShadingPattern{getPattern(){unreachable$1("Abstract method `getPattern` called.")}}class RadialAxialShadingPattern extends BaseShadingPattern{constructor(Le){super(),this._type=Le[1],this._bbox=Le[2],this._colorStops=Le[3],this._p0=Le[4],this._p1=Le[5],this._r0=Le[6],this._r1=Le[7],this.matrix=null}_createGradient(Le){let Ye;this._type==="axial"?Ye=Le.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(Ye=Le.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const tt of this._colorStops)Ye.addColorStop(tt[0],tt[1]);return Ye}getPattern(Le,Ye,tt,nt){let ft;if(nt===PathType.STROKE||nt===PathType.FILL){const ht=Ye.current.getClippedPathBoundingBox(nt,getCurrentTransform(Le))||[0,0,0,0],gt=Math.ceil(ht[2]-ht[0])||1,At=Math.ceil(ht[3]-ht[1])||1,xt=Ye.cachedCanvases.getCanvas("pattern",gt,At),Et=xt.context;Et.clearRect(0,0,Et.canvas.width,Et.canvas.height),Et.beginPath(),Et.rect(0,0,Et.canvas.width,Et.canvas.height),Et.translate(-ht[0],-ht[1]),tt=Util.transform(tt,[1,0,0,1,ht[0],ht[1]]),Et.transform(...Ye.baseTransform),this.matrix&&Et.transform(...this.matrix),applyBoundingBox(Et,this._bbox),Et.fillStyle=this._createGradient(Et),Et.fill(),ft=Le.createPattern(xt.canvas,"no-repeat");const yt=new DOMMatrix(tt);ft.setTransform(yt)}else applyBoundingBox(Le,this._bbox),ft=this._createGradient(Le);return ft}}function drawTriangle(Be,Le,Ye,tt,nt,ft,ht,gt){const At=Le.coords,xt=Le.colors,Et=Be.data,yt=Be.width*4;let Ct;At[Ye+1]>At[tt+1]&&(Ct=Ye,Ye=tt,tt=Ct,Ct=ft,ft=ht,ht=Ct),At[tt+1]>At[nt+1]&&(Ct=tt,tt=nt,nt=Ct,Ct=ht,ht=gt,gt=Ct),At[Ye+1]>At[tt+1]&&(Ct=Ye,Ye=tt,tt=Ct,Ct=ft,ft=ht,ht=Ct);const kt=(At[Ye]+Le.offsetX)*Le.scaleX,vt=(At[Ye+1]+Le.offsetY)*Le.scaleY,bt=(At[tt]+Le.offsetX)*Le.scaleX,It=(At[tt+1]+Le.offsetY)*Le.scaleY,wt=(At[nt]+Le.offsetX)*Le.scaleX,Rt=(At[nt+1]+Le.offsetY)*Le.scaleY;if(vt>=Rt)return;const Tt=xt[ft],Bt=xt[ft+1],Dt=xt[ft+2],Lt=xt[ht],Nt=xt[ht+1],Pt=xt[ht+2],Wt=xt[gt],$t=xt[gt+1],Kt=xt[gt+2],Vt=Math.round(vt),Ut=Math.round(Rt);let _t,Xt,Qt,jt,zt,qt,Gt,e0;for(let s0=Vt;s0<=Ut;s0++){if(s0<It){const g0=s0<vt?0:(vt-s0)/(vt-It);_t=kt-(kt-bt)*g0,Xt=Tt-(Tt-Lt)*g0,Qt=Bt-(Bt-Nt)*g0,jt=Dt-(Dt-Pt)*g0}else{let g0;s0>Rt?g0=1:It===Rt?g0=0:g0=(It-s0)/(It-Rt),_t=bt-(bt-wt)*g0,Xt=Lt-(Lt-Wt)*g0,Qt=Nt-(Nt-$t)*g0,jt=Pt-(Pt-Kt)*g0}let t0;s0<vt?t0=0:s0>Rt?t0=1:t0=(vt-s0)/(vt-Rt),zt=kt-(kt-wt)*t0,qt=Tt-(Tt-Wt)*t0,Gt=Bt-(Bt-$t)*t0,e0=Dt-(Dt-Kt)*t0;const l0=Math.round(Math.min(_t,zt)),d0=Math.round(Math.max(_t,zt));let n0=yt*s0+l0*4;for(let g0=l0;g0<=d0;g0++)t0=(_t-g0)/(_t-zt),t0<0?t0=0:t0>1&&(t0=1),Et[n0++]=Xt-(Xt-qt)*t0|0,Et[n0++]=Qt-(Qt-Gt)*t0|0,Et[n0++]=jt-(jt-e0)*t0|0,Et[n0++]=255}}function drawFigure(Be,Le,Ye){const tt=Le.coords,nt=Le.colors;let ft,ht;switch(Le.type){case"lattice":const gt=Le.verticesPerRow,At=Math.floor(tt.length/gt)-1,xt=gt-1;for(ft=0;ft<At;ft++){let Et=ft*gt;for(let yt=0;yt<xt;yt++,Et++)drawTriangle(Be,Ye,tt[Et],tt[Et+1],tt[Et+gt],nt[Et],nt[Et+1],nt[Et+gt]),drawTriangle(Be,Ye,tt[Et+gt+1],tt[Et+1],tt[Et+gt],nt[Et+gt+1],nt[Et+1],nt[Et+gt])}break;case"triangles":for(ft=0,ht=tt.length;ft<ht;ft+=3)drawTriangle(Be,Ye,tt[ft],tt[ft+1],tt[ft+2],nt[ft],nt[ft+1],nt[ft+2]);break;default:throw new Error("illegal figure")}}class MeshShadingPattern extends BaseShadingPattern{constructor(Le){super(),this._coords=Le[2],this._colors=Le[3],this._figures=Le[4],this._bounds=Le[5],this._bbox=Le[7],this._background=Le[8],this.matrix=null}_createMeshCanvas(Le,Ye,tt){const gt=Math.floor(this._bounds[0]),At=Math.floor(this._bounds[1]),xt=Math.ceil(this._bounds[2])-gt,Et=Math.ceil(this._bounds[3])-At,yt=Math.min(Math.ceil(Math.abs(xt*Le[0]*1.1)),3e3),Ct=Math.min(Math.ceil(Math.abs(Et*Le[1]*1.1)),3e3),kt=xt/yt,vt=Et/Ct,bt={coords:this._coords,colors:this._colors,offsetX:-gt,offsetY:-At,scaleX:1/kt,scaleY:1/vt},It=yt+2*2,wt=Ct+2*2,Rt=tt.getCanvas("mesh",It,wt),Tt=Rt.context,Bt=Tt.createImageData(yt,Ct);if(Ye){const Lt=Bt.data;for(let Nt=0,Pt=Lt.length;Nt<Pt;Nt+=4)Lt[Nt]=Ye[0],Lt[Nt+1]=Ye[1],Lt[Nt+2]=Ye[2],Lt[Nt+3]=255}for(const Lt of this._figures)drawFigure(Bt,Lt,bt);return Tt.putImageData(Bt,2,2),{canvas:Rt.canvas,offsetX:gt-2*kt,offsetY:At-2*vt,scaleX:kt,scaleY:vt}}getPattern(Le,Ye,tt,nt){applyBoundingBox(Le,this._bbox);let ft;if(nt===PathType.SHADING)ft=Util.singularValueDecompose2dScale(getCurrentTransform(Le));else if(ft=Util.singularValueDecompose2dScale(Ye.baseTransform),this.matrix){const gt=Util.singularValueDecompose2dScale(this.matrix);ft=[ft[0]*gt[0],ft[1]*gt[1]]}const ht=this._createMeshCanvas(ft,nt===PathType.SHADING?null:this._background,Ye.cachedCanvases);return nt!==PathType.SHADING&&(Le.setTransform(...Ye.baseTransform),this.matrix&&Le.transform(...this.matrix)),Le.translate(ht.offsetX,ht.offsetY),Le.scale(ht.scaleX,ht.scaleY),Le.createPattern(ht.canvas,"no-repeat")}}class DummyShadingPattern extends BaseShadingPattern{getPattern(){return"hotpink"}}function getShadingPattern(Be){switch(Be[0]){case"RadialAxial":return new RadialAxialShadingPattern(Be);case"Mesh":return new MeshShadingPattern(Be);case"Dummy":return new DummyShadingPattern}throw new Error(`Unknown IR type: ${Be[0]}`)}const PaintType={COLORED:1,UNCOLORED:2},ad=class ad{constructor(Le,Ye,tt,nt,ft){this.operatorList=Le[2],this.matrix=Le[3],this.bbox=Le[4],this.xstep=Le[5],this.ystep=Le[6],this.paintType=Le[7],this.tilingType=Le[8],this.color=Ye,this.ctx=tt,this.canvasGraphicsFactory=nt,this.baseTransform=ft}createPatternCanvas(Le){const{bbox:Ye,operatorList:tt,paintType:nt,tilingType:ft,color:ht,canvasGraphicsFactory:gt}=this;let{xstep:At,ystep:xt}=this;At=Math.abs(At),xt=Math.abs(xt),info("TilingType: "+ft);const Et=Ye[0],yt=Ye[1],Ct=Ye[2],kt=Ye[3],vt=Ct-Et,bt=kt-yt,It=Util.singularValueDecompose2dScale(this.matrix),wt=Util.singularValueDecompose2dScale(this.baseTransform),Rt=It[0]*wt[0],Tt=It[1]*wt[1];let Bt=vt,Dt=bt,Lt=!1,Nt=!1;const Pt=Math.ceil(At*Rt),Wt=Math.ceil(xt*Tt),$t=Math.ceil(vt*Rt),Kt=Math.ceil(bt*Tt);Pt>=$t?Bt=At:Lt=!0,Wt>=Kt?Dt=xt:Nt=!0;const Vt=this.getSizeAndScale(Bt,this.ctx.canvas.width,Rt),Ut=this.getSizeAndScale(Dt,this.ctx.canvas.height,Tt),_t=Le.cachedCanvases.getCanvas("pattern",Vt.size,Ut.size),Xt=_t.context,Qt=gt.createCanvasGraphics(Xt);if(Qt.groupLevel=Le.groupLevel,this.setFillAndStrokeStyleToContext(Qt,nt,ht),Xt.translate(-Vt.scale*Et,-Ut.scale*yt),Qt.transform(Vt.scale,0,0,Ut.scale,0,0),Xt.save(),this.clipBbox(Qt,Et,yt,Ct,kt),Qt.baseTransform=getCurrentTransform(Qt.ctx),Qt.executeOperatorList(tt),Qt.endDrawing(),Xt.restore(),Lt||Nt){const jt=_t.canvas;Lt&&(Bt=At),Nt&&(Dt=xt);const zt=this.getSizeAndScale(Bt,this.ctx.canvas.width,Rt),qt=this.getSizeAndScale(Dt,this.ctx.canvas.height,Tt),Gt=zt.size,e0=qt.size,s0=Le.cachedCanvases.getCanvas("pattern-workaround",Gt,e0),t0=s0.context,l0=Lt?Math.floor(vt/At):0,d0=Nt?Math.floor(bt/xt):0;for(let n0=0;n0<=l0;n0++)for(let g0=0;g0<=d0;g0++)t0.drawImage(jt,Gt*n0,e0*g0,Gt,e0,0,0,Gt,e0);return{canvas:s0.canvas,scaleX:zt.scale,scaleY:qt.scale,offsetX:Et,offsetY:yt}}return{canvas:_t.canvas,scaleX:Vt.scale,scaleY:Ut.scale,offsetX:Et,offsetY:yt}}getSizeAndScale(Le,Ye,tt){const nt=Math.max(ad.MAX_PATTERN_SIZE,Ye);let ft=Math.ceil(Le*tt);return ft>=nt?ft=nt:tt=ft/Le,{scale:tt,size:ft}}clipBbox(Le,Ye,tt,nt,ft){const ht=nt-Ye,gt=ft-tt;Le.ctx.rect(Ye,tt,ht,gt),Le.current.updateRectMinMax(getCurrentTransform(Le.ctx),[Ye,tt,nt,ft]),Le.clip(),Le.endPath()}setFillAndStrokeStyleToContext(Le,Ye,tt){const nt=Le.ctx,ft=Le.current;switch(Ye){case PaintType.COLORED:const ht=this.ctx;nt.fillStyle=ht.fillStyle,nt.strokeStyle=ht.strokeStyle,ft.fillColor=ht.fillStyle,ft.strokeColor=ht.strokeStyle;break;case PaintType.UNCOLORED:const gt=Util.makeHexColor(tt[0],tt[1],tt[2]);nt.fillStyle=gt,nt.strokeStyle=gt,ft.fillColor=gt,ft.strokeColor=gt;break;default:throw new FormatError(`Unsupported paint type: ${Ye}`)}}getPattern(Le,Ye,tt,nt){let ft=tt;nt!==PathType.SHADING&&(ft=Util.transform(ft,Ye.baseTransform),this.matrix&&(ft=Util.transform(ft,this.matrix)));const ht=this.createPatternCanvas(Ye);let gt=new DOMMatrix(ft);gt=gt.translate(ht.offsetX,ht.offsetY),gt=gt.scale(1/ht.scaleX,1/ht.scaleY);const At=Le.createPattern(ht.canvas,"repeat");return At.setTransform(gt),At}};Nn(ad,"MAX_PATTERN_SIZE",3e3);let TilingPattern=ad;function convertBlackAndWhiteToRGBA({src:Be,srcPos:Le=0,dest:Ye,width:tt,height:nt,nonBlackColor:ft=4294967295,inverseDecode:ht=!1}){const gt=util_FeatureTest.isLittleEndian?4278190080:255,[At,xt]=ht?[ft,gt]:[gt,ft],Et=tt>>3,yt=tt&7,Ct=Be.length;Ye=new Uint32Array(Ye.buffer);let kt=0;for(let vt=0;vt<nt;vt++){for(const It=Le+Et;Le<It;Le++){const wt=Le<Ct?Be[Le]:255;Ye[kt++]=wt&128?xt:At,Ye[kt++]=wt&64?xt:At,Ye[kt++]=wt&32?xt:At,Ye[kt++]=wt&16?xt:At,Ye[kt++]=wt&8?xt:At,Ye[kt++]=wt&4?xt:At,Ye[kt++]=wt&2?xt:At,Ye[kt++]=wt&1?xt:At}if(yt===0)continue;const bt=Le<Ct?Be[Le++]:255;for(let It=0;It<yt;It++)Ye[kt++]=bt&1<<7-It?xt:At}return{srcPos:Le,destPos:kt}}const MIN_FONT_SIZE=16,MAX_FONT_SIZE=100,EXECUTION_TIME=15,EXECUTION_STEPS=10,MAX_SIZE_TO_COMPILE=1e3,FULL_CHUNK_HEIGHT=16;function mirrorContextOperations(Be,Le){if(Be._removeMirroring)throw new Error("Context is already forwarding operations.");Be.__originalSave=Be.save,Be.__originalRestore=Be.restore,Be.__originalRotate=Be.rotate,Be.__originalScale=Be.scale,Be.__originalTranslate=Be.translate,Be.__originalTransform=Be.transform,Be.__originalSetTransform=Be.setTransform,Be.__originalResetTransform=Be.resetTransform,Be.__originalClip=Be.clip,Be.__originalMoveTo=Be.moveTo,Be.__originalLineTo=Be.lineTo,Be.__originalBezierCurveTo=Be.bezierCurveTo,Be.__originalRect=Be.rect,Be.__originalClosePath=Be.closePath,Be.__originalBeginPath=Be.beginPath,Be._removeMirroring=()=>{Be.save=Be.__originalSave,Be.restore=Be.__originalRestore,Be.rotate=Be.__originalRotate,Be.scale=Be.__originalScale,Be.translate=Be.__originalTranslate,Be.transform=Be.__originalTransform,Be.setTransform=Be.__originalSetTransform,Be.resetTransform=Be.__originalResetTransform,Be.clip=Be.__originalClip,Be.moveTo=Be.__originalMoveTo,Be.lineTo=Be.__originalLineTo,Be.bezierCurveTo=Be.__originalBezierCurveTo,Be.rect=Be.__originalRect,Be.closePath=Be.__originalClosePath,Be.beginPath=Be.__originalBeginPath,delete Be._removeMirroring},Be.save=function(){Le.save(),this.__originalSave()},Be.restore=function(){Le.restore(),this.__originalRestore()},Be.translate=function(tt,nt){Le.translate(tt,nt),this.__originalTranslate(tt,nt)},Be.scale=function(tt,nt){Le.scale(tt,nt),this.__originalScale(tt,nt)},Be.transform=function(tt,nt,ft,ht,gt,At){Le.transform(tt,nt,ft,ht,gt,At),this.__originalTransform(tt,nt,ft,ht,gt,At)},Be.setTransform=function(tt,nt,ft,ht,gt,At){Le.setTransform(tt,nt,ft,ht,gt,At),this.__originalSetTransform(tt,nt,ft,ht,gt,At)},Be.resetTransform=function(){Le.resetTransform(),this.__originalResetTransform()},Be.rotate=function(tt){Le.rotate(tt),this.__originalRotate(tt)},Be.clip=function(tt){Le.clip(tt),this.__originalClip(tt)},Be.moveTo=function(Ye,tt){Le.moveTo(Ye,tt),this.__originalMoveTo(Ye,tt)},Be.lineTo=function(Ye,tt){Le.lineTo(Ye,tt),this.__originalLineTo(Ye,tt)},Be.bezierCurveTo=function(Ye,tt,nt,ft,ht,gt){Le.bezierCurveTo(Ye,tt,nt,ft,ht,gt),this.__originalBezierCurveTo(Ye,tt,nt,ft,ht,gt)},Be.rect=function(Ye,tt,nt,ft){Le.rect(Ye,tt,nt,ft),this.__originalRect(Ye,tt,nt,ft)},Be.closePath=function(){Le.closePath(),this.__originalClosePath()},Be.beginPath=function(){Le.beginPath(),this.__originalBeginPath()}}class CachedCanvases{constructor(Le){this.canvasFactory=Le,this.cache=Object.create(null)}getCanvas(Le,Ye,tt){let nt;return this.cache[Le]!==void 0?(nt=this.cache[Le],this.canvasFactory.reset(nt,Ye,tt)):(nt=this.canvasFactory.create(Ye,tt),this.cache[Le]=nt),nt}delete(Le){delete this.cache[Le]}clear(){for(const Le in this.cache){const Ye=this.cache[Le];this.canvasFactory.destroy(Ye),delete this.cache[Le]}}}function drawImageAtIntegerCoords(Be,Le,Ye,tt,nt,ft,ht,gt,At,xt){const[Et,yt,Ct,kt,vt,bt]=getCurrentTransform(Be);if(yt===0&&Ct===0){const Rt=ht*Et+vt,Tt=Math.round(Rt),Bt=gt*kt+bt,Dt=Math.round(Bt),Lt=(ht+At)*Et+vt,Nt=Math.abs(Math.round(Lt)-Tt)||1,Pt=(gt+xt)*kt+bt,Wt=Math.abs(Math.round(Pt)-Dt)||1;return Be.setTransform(Math.sign(Et),0,0,Math.sign(kt),Tt,Dt),Be.drawImage(Le,Ye,tt,nt,ft,0,0,Nt,Wt),Be.setTransform(Et,yt,Ct,kt,vt,bt),[Nt,Wt]}if(Et===0&&kt===0){const Rt=gt*Ct+vt,Tt=Math.round(Rt),Bt=ht*yt+bt,Dt=Math.round(Bt),Lt=(gt+xt)*Ct+vt,Nt=Math.abs(Math.round(Lt)-Tt)||1,Pt=(ht+At)*yt+bt,Wt=Math.abs(Math.round(Pt)-Dt)||1;return Be.setTransform(0,Math.sign(yt),Math.sign(Ct),0,Tt,Dt),Be.drawImage(Le,Ye,tt,nt,ft,0,0,Wt,Nt),Be.setTransform(Et,yt,Ct,kt,vt,bt),[Wt,Nt]}Be.drawImage(Le,Ye,tt,nt,ft,ht,gt,At,xt);const It=Math.hypot(Et,yt),wt=Math.hypot(Ct,kt);return[It*At,wt*xt]}function compileType3Glyph(Be){const{width:Le,height:Ye}=Be;if(Le>MAX_SIZE_TO_COMPILE||Ye>MAX_SIZE_TO_COMPILE)return null;const tt=1e3,nt=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),ft=Le+1;let ht=new Uint8Array(ft*(Ye+1)),gt,At,xt;const Et=Le+7&-8;let yt=new Uint8Array(Et*Ye),Ct=0;for(const wt of Be.data){let Rt=128;for(;Rt>0;)yt[Ct++]=wt&Rt?0:255,Rt>>=1}let kt=0;for(Ct=0,yt[Ct]!==0&&(ht[0]=1,++kt),At=1;At<Le;At++)yt[Ct]!==yt[Ct+1]&&(ht[At]=yt[Ct]?2:1,++kt),Ct++;for(yt[Ct]!==0&&(ht[At]=2,++kt),gt=1;gt<Ye;gt++){Ct=gt*Et,xt=gt*ft,yt[Ct-Et]!==yt[Ct]&&(ht[xt]=yt[Ct]?1:8,++kt);let wt=(yt[Ct]?4:0)+(yt[Ct-Et]?8:0);for(At=1;At<Le;At++)wt=(wt>>2)+(yt[Ct+1]?4:0)+(yt[Ct-Et+1]?8:0),nt[wt]&&(ht[xt+At]=nt[wt],++kt),Ct++;if(yt[Ct-Et]!==yt[Ct]&&(ht[xt+At]=yt[Ct]?2:4,++kt),kt>tt)return null}for(Ct=Et*(Ye-1),xt=gt*ft,yt[Ct]!==0&&(ht[xt]=8,++kt),At=1;At<Le;At++)yt[Ct]!==yt[Ct+1]&&(ht[xt+At]=yt[Ct]?4:8,++kt),Ct++;if(yt[Ct]!==0&&(ht[xt+At]=4,++kt),kt>tt)return null;const vt=new Int32Array([0,ft,-1,0,-ft,0,0,0,1]),bt=new Path2D;for(gt=0;kt&><=Ye;gt++){let wt=gt*ft;const Rt=wt+Le;for(;wt<Rt&&!ht[wt];)wt++;if(wt===Rt)continue;bt.moveTo(wt%ft,gt);const Tt=wt;let Bt=ht[wt];do{const Dt=vt[Bt];do wt+=Dt;while(!ht[wt]);const Lt=ht[wt];Lt!==5&&Lt!==10?(Bt=Lt,ht[wt]=0):(Bt=Lt&51*Bt>>4,ht[wt]&=Bt>>2|Bt<<2),bt.lineTo(wt%ft,wt/ft|0),ht[wt]||--kt}while(Tt!==wt);--gt}return yt=null,ht=null,function(wt){wt.save(),wt.scale(1/Le,-1/Ye),wt.translate(0,-Ye),wt.fill(bt),wt.beginPath(),wt.restore()}}class CanvasExtraState{constructor(Le,Ye){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,Le,Ye])}clone(){const Le=Object.create(this);return Le.clipBox=this.clipBox.slice(),Le}setCurrentPoint(Le,Ye){this.x=Le,this.y=Ye}updatePathMinMax(Le,Ye,tt){[Ye,tt]=Util.applyTransform([Ye,tt],Le),this.minX=Math.min(this.minX,Ye),this.minY=Math.min(this.minY,tt),this.maxX=Math.max(this.maxX,Ye),this.maxY=Math.max(this.maxY,tt)}updateRectMinMax(Le,Ye){const tt=Util.applyTransform(Ye,Le),nt=Util.applyTransform(Ye.slice(2),Le),ft=Util.applyTransform([Ye[0],Ye[3]],Le),ht=Util.applyTransform([Ye[2],Ye[1]],Le);this.minX=Math.min(this.minX,tt[0],nt[0],ft[0],ht[0]),this.minY=Math.min(this.minY,tt[1],nt[1],ft[1],ht[1]),this.maxX=Math.max(this.maxX,tt[0],nt[0],ft[0],ht[0]),this.maxY=Math.max(this.maxY,tt[1],nt[1],ft[1],ht[1])}updateScalingPathMinMax(Le,Ye){Util.scaleMinMax(Le,Ye),this.minX=Math.min(this.minX,Ye[0]),this.minY=Math.min(this.minY,Ye[1]),this.maxX=Math.max(this.maxX,Ye[2]),this.maxY=Math.max(this.maxY,Ye[3])}updateCurvePathMinMax(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et){const yt=Util.bezierBoundingBox(Ye,tt,nt,ft,ht,gt,At,xt,Et);Et||this.updateRectMinMax(Le,yt)}getPathBoundingBox(Le=PathType.FILL,Ye=null){const tt=[this.minX,this.minY,this.maxX,this.maxY];if(Le===PathType.STROKE){Ye||unreachable$1("Stroke bounding box must include transform.");const nt=Util.singularValueDecompose2dScale(Ye),ft=nt[0]*this.lineWidth/2,ht=nt[1]*this.lineWidth/2;tt[0]-=ft,tt[1]-=ht,tt[2]+=ft,tt[3]+=ht}return tt}updateClipFromPath(){const Le=Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(Le||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(Le){this.clipBox=Le,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(Le=PathType.FILL,Ye=null){return Util.intersect(this.clipBox,this.getPathBoundingBox(Le,Ye))}}function putBinaryImageData(Be,Le){if(typeof ImageData<"u"&&Le instanceof ImageData){Be.putImageData(Le,0,0);return}const Ye=Le.height,tt=Le.width,nt=Ye%FULL_CHUNK_HEIGHT,ft=(Ye-nt)/FULL_CHUNK_HEIGHT,ht=nt===0?ft:ft+1,gt=Be.createImageData(tt,FULL_CHUNK_HEIGHT);let At=0,xt;const Et=Le.data,yt=gt.data;let Ct,kt,vt,bt;if(Le.kind===util_ImageKind.GRAYSCALE_1BPP){const It=Et.byteLength,wt=new Uint32Array(yt.buffer,0,yt.byteLength>>2),Rt=wt.length,Tt=tt+7>>3,Bt=4294967295,Dt=util_FeatureTest.isLittleEndian?4278190080:255;for(Ct=0;Ct<ht;Ct++){for(vt=Ct<ft?FULL_CHUNK_HEIGHT:nt,xt=0,kt=0;kt<vt;kt++){const Lt=It-At;let Nt=0;const Pt=Lt>Tt?tt:Lt*8-7,Wt=Pt&-8;let $t=0,Kt=0;for(;Nt<Wt;Nt+=8)Kt=Et[At++],wt[xt++]=Kt&128?Bt:Dt,wt[xt++]=Kt&64?Bt:Dt,wt[xt++]=Kt&32?Bt:Dt,wt[xt++]=Kt&16?Bt:Dt,wt[xt++]=Kt&8?Bt:Dt,wt[xt++]=Kt&4?Bt:Dt,wt[xt++]=Kt&2?Bt:Dt,wt[xt++]=Kt&1?Bt:Dt;for(;Nt<Pt;Nt++)$t===0&&(Kt=Et[At++],$t=128),wt[xt++]=Kt&$t?Bt:Dt,$t>>=1}for(;xt<Rt;)wt[xt++]=0;Be.putImageData(gt,0,Ct*FULL_CHUNK_HEIGHT)}}else if(Le.kind===util_ImageKind.RGBA_32BPP){for(kt=0,bt=tt*FULL_CHUNK_HEIGHT*4,Ct=0;Ct<ft;Ct++)yt.set(Et.subarray(At,At+bt)),At+=bt,Be.putImageData(gt,0,kt),kt+=FULL_CHUNK_HEIGHT;Ct<ht&&(bt=tt*nt*4,yt.set(Et.subarray(At,At+bt)),Be.putImageData(gt,0,kt))}else if(Le.kind===util_ImageKind.RGB_24BPP)for(vt=FULL_CHUNK_HEIGHT,bt=tt*vt,Ct=0;Ct<ht;Ct++){for(Ct>=ft&&(vt=nt,bt=tt*vt),xt=0,kt=bt;kt--;)yt[xt++]=Et[At++],yt[xt++]=Et[At++],yt[xt++]=Et[At++],yt[xt++]=255;Be.putImageData(gt,0,Ct*FULL_CHUNK_HEIGHT)}else throw new Error(`bad image kind: ${Le.kind}`)}function putBinaryImageMask(Be,Le){if(Le.bitmap){Be.drawImage(Le.bitmap,0,0);return}const Ye=Le.height,tt=Le.width,nt=Ye%FULL_CHUNK_HEIGHT,ft=(Ye-nt)/FULL_CHUNK_HEIGHT,ht=nt===0?ft:ft+1,gt=Be.createImageData(tt,FULL_CHUNK_HEIGHT);let At=0;const xt=Le.data,Et=gt.data;for(let yt=0;yt<ht;yt++){const Ct=yt<ft?FULL_CHUNK_HEIGHT:nt;({srcPos:At}=convertBlackAndWhiteToRGBA({src:xt,srcPos:At,dest:Et,width:tt,height:Ct,nonBlackColor:0})),Be.putImageData(gt,0,yt*FULL_CHUNK_HEIGHT)}}function copyCtxState(Be,Le){const Ye=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const tt of Ye)Be[tt]!==void 0&&(Le[tt]=Be[tt]);Be.setLineDash!==void 0&&(Le.setLineDash(Be.getLineDash()),Le.lineDashOffset=Be.lineDashOffset)}function resetCtxToDefault(Be){if(Be.strokeStyle=Be.fillStyle="#000000",Be.fillRule="nonzero",Be.globalAlpha=1,Be.lineWidth=1,Be.lineCap="butt",Be.lineJoin="miter",Be.miterLimit=10,Be.globalCompositeOperation="source-over",Be.font="10px sans-serif",Be.setLineDash!==void 0&&(Be.setLineDash([]),Be.lineDashOffset=0),!isNodeJS){const{filter:Le}=Be;Le!=="none"&&Le!==""&&(Be.filter="none")}}function getImageSmoothingEnabled(Be,Le){if(Le)return!0;const Ye=Util.singularValueDecompose2dScale(Be);Ye[0]=Math.fround(Ye[0]),Ye[1]=Math.fround(Ye[1]);const tt=Math.fround((globalThis.devicePixelRatio||1)*PixelsPerInch.PDF_TO_CSS_UNITS);return Ye[0]<=tt&&Ye[1]<=tt}const LINE_CAP_STYLES=["butt","round","square"],LINE_JOIN_STYLES=["miter","round","bevel"],NORMAL_CLIP={},EO_CLIP={},R3=class R3{constructor(Le,Ye,tt,nt,ft,{optionalContentConfig:ht,markedContentStack:gt=null},At,xt){k0(this,_o);this.ctx=Le,this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=Ye,this.objs=tt,this.canvasFactory=nt,this.filterFactory=ft,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=gt||[],this.optionalContentConfig=ht,this.cachedCanvases=new CachedCanvases(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=At,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=xt,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(Le,Ye=null){return typeof Le=="string"?Le.startsWith("g_")?this.commonObjs.get(Le):this.objs.get(Le):Ye}beginDrawing({transform:Le,viewport:Ye,transparency:tt=!1,background:nt=null}){const ft=this.ctx.canvas.width,ht=this.ctx.canvas.height,gt=this.ctx.fillStyle;if(this.ctx.fillStyle=nt||"#ffffff",this.ctx.fillRect(0,0,ft,ht),this.ctx.fillStyle=gt,tt){const At=this.cachedCanvases.getCanvas("transparent",ft,ht);this.compositeCtx=this.ctx,this.transparentCanvas=At.canvas,this.ctx=At.context,this.ctx.save(),this.ctx.transform(...getCurrentTransform(this.compositeCtx))}this.ctx.save(),resetCtxToDefault(this.ctx),Le&&(this.ctx.transform(...Le),this.outputScaleX=Le[0],this.outputScaleY=Le[0]),this.ctx.transform(...Ye.transform),this.viewportScale=Ye.scale,this.baseTransform=getCurrentTransform(this.ctx)}executeOperatorList(Le,Ye,tt,nt){const ft=Le.argsArray,ht=Le.fnArray;let gt=Ye||0;const At=ft.length;if(At===gt)return gt;const xt=At-gt>EXECUTION_STEPS&&typeof tt=="function",Et=xt?Date.now()+EXECUTION_TIME:0;let yt=0;const Ct=this.commonObjs,kt=this.objs;let vt;for(;;){if(nt!==void 0&>===nt.nextBreakPoint)return nt.breakIt(gt,tt),gt;if(vt=ht[gt],vt!==OPS.dependency)this[vt].apply(this,ft[gt]);else for(const bt of ft[gt]){const It=bt.startsWith("g_")?Ct:kt;if(!It.has(bt))return It.get(bt,tt),gt}if(gt++,gt===At)return gt;if(xt&&++yt>EXECUTION_STEPS){if(Date.now()>Et)return tt(),gt;yt=0}}}endDrawing(){y0(this,_o,J9).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const Le of this._cachedBitmapsMap.values()){for(const Ye of Le.values())typeof HTMLCanvasElement<"u"&&Ye instanceof HTMLCanvasElement&&(Ye.width=Ye.height=0);Le.clear()}this._cachedBitmapsMap.clear(),y0(this,_o,ep).call(this)}_scaleImage(Le,Ye){const tt=Le.width??Le.displayWidth,nt=Le.height??Le.displayHeight;let ft=Math.max(Math.hypot(Ye[0],Ye[1]),1),ht=Math.max(Math.hypot(Ye[2],Ye[3]),1),gt=tt,At=nt,xt="prescale1",Et,yt;for(;ft>2&>>1||ht>2&&At>1;){let Ct=gt,kt=At;ft>2&>>1&&(Ct=gt>=16384?Math.floor(gt/2)-1||1:Math.ceil(gt/2),ft/=gt/Ct),ht>2&&At>1&&(kt=At>=16384?Math.floor(At/2)-1||1:Math.ceil(At)/2,ht/=At/kt),Et=this.cachedCanvases.getCanvas(xt,Ct,kt),yt=Et.context,yt.clearRect(0,0,Ct,kt),yt.drawImage(Le,0,0,gt,At,0,0,Ct,kt),Le=Et.canvas,gt=Ct,At=kt,xt=xt==="prescale1"?"prescale2":"prescale1"}return{img:Le,paintWidth:gt,paintHeight:At}}_createMaskCanvas(Le){const Ye=this.ctx,{width:tt,height:nt}=Le,ft=this.current.fillColor,ht=this.current.patternFill,gt=getCurrentTransform(Ye);let At,xt,Et,yt;if((Le.bitmap||Le.data)&&Le.count>1){const Pt=Le.bitmap||Le.data.buffer;xt=JSON.stringify(ht?gt:[gt.slice(0,4),ft]),At=this._cachedBitmapsMap.get(Pt),At||(At=new Map,this._cachedBitmapsMap.set(Pt,At));const Wt=At.get(xt);if(Wt&&!ht){const $t=Math.round(Math.min(gt[0],gt[2])+gt[4]),Kt=Math.round(Math.min(gt[1],gt[3])+gt[5]);return{canvas:Wt,offsetX:$t,offsetY:Kt}}Et=Wt}Et||(yt=this.cachedCanvases.getCanvas("maskCanvas",tt,nt),putBinaryImageMask(yt.context,Le));let Ct=Util.transform(gt,[1/tt,0,0,-1/nt,0,0]);Ct=Util.transform(Ct,[1,0,0,1,0,-nt]);const[kt,vt,bt,It]=Util.getAxialAlignedBoundingBox([0,0,tt,nt],Ct),wt=Math.round(bt-kt)||1,Rt=Math.round(It-vt)||1,Tt=this.cachedCanvases.getCanvas("fillCanvas",wt,Rt),Bt=Tt.context,Dt=kt,Lt=vt;Bt.translate(-Dt,-Lt),Bt.transform(...Ct),Et||(Et=this._scaleImage(yt.canvas,getCurrentTransformInverse(Bt)),Et=Et.img,At&&ht&&At.set(xt,Et)),Bt.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(Bt),Le.interpolate),drawImageAtIntegerCoords(Bt,Et,0,0,Et.width,Et.height,0,0,tt,nt),Bt.globalCompositeOperation="source-in";const Nt=Util.transform(getCurrentTransformInverse(Bt),[1,0,0,1,-Dt,-Lt]);return Bt.fillStyle=ht?ft.getPattern(Ye,this,Nt,PathType.FILL):ft,Bt.fillRect(0,0,tt,nt),At&&!ht&&(this.cachedCanvases.delete("fillCanvas"),At.set(xt,Tt.canvas)),{canvas:Tt.canvas,offsetX:Math.round(Dt),offsetY:Math.round(Lt)}}setLineWidth(Le){Le!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=Le,this.ctx.lineWidth=Le}setLineCap(Le){this.ctx.lineCap=LINE_CAP_STYLES[Le]}setLineJoin(Le){this.ctx.lineJoin=LINE_JOIN_STYLES[Le]}setMiterLimit(Le){this.ctx.miterLimit=Le}setDash(Le,Ye){const tt=this.ctx;tt.setLineDash!==void 0&&(tt.setLineDash(Le),tt.lineDashOffset=Ye)}setRenderingIntent(Le){}setFlatness(Le){}setGState(Le){for(const[Ye,tt]of Le)switch(Ye){case"LW":this.setLineWidth(tt);break;case"LC":this.setLineCap(tt);break;case"LJ":this.setLineJoin(tt);break;case"ML":this.setMiterLimit(tt);break;case"D":this.setDash(tt[0],tt[1]);break;case"RI":this.setRenderingIntent(tt);break;case"FL":this.setFlatness(tt);break;case"Font":this.setFont(tt[0],tt[1]);break;case"CA":this.current.strokeAlpha=tt;break;case"ca":this.current.fillAlpha=tt,this.ctx.globalAlpha=tt;break;case"BM":this.ctx.globalCompositeOperation=tt;break;case"SMask":this.current.activeSMask=tt?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(tt);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const Le=this.inSMaskMode;this.current.activeSMask&&!Le?this.beginSMaskMode():!this.current.activeSMask&&Le&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const Le=this.ctx.canvas.width,Ye=this.ctx.canvas.height,tt="smaskGroupAt"+this.groupLevel,nt=this.cachedCanvases.getCanvas(tt,Le,Ye);this.suspendedCtx=this.ctx,this.ctx=nt.context;const ft=this.ctx;ft.setTransform(...getCurrentTransform(this.suspendedCtx)),copyCtxState(this.suspendedCtx,ft),mirrorContextOperations(ft,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),copyCtxState(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(Le){if(!this.current.activeSMask)return;Le?(Le[0]=Math.floor(Le[0]),Le[1]=Math.floor(Le[1]),Le[2]=Math.ceil(Le[2]),Le[3]=Math.ceil(Le[3])):Le=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const Ye=this.current.activeSMask,tt=this.suspendedCtx;this.composeSMask(tt,Ye,this.ctx,Le),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(Le,Ye,tt,nt){const ft=nt[0],ht=nt[1],gt=nt[2]-ft,At=nt[3]-ht;gt===0||At===0||(this.genericComposeSMask(Ye.context,tt,gt,At,Ye.subtype,Ye.backdrop,Ye.transferMap,ft,ht,Ye.offsetX,Ye.offsetY),Le.save(),Le.globalAlpha=1,Le.globalCompositeOperation="source-over",Le.setTransform(1,0,0,1,0,0),Le.drawImage(tt.canvas,0,0),Le.restore())}genericComposeSMask(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){let Ct=Le.canvas,kt=At-Et,vt=xt-yt;if(ht){const It=Util.makeHexColor(...ht);if(kt<0||vt<0||kt+tt>Ct.width||vt+nt>Ct.height){const wt=this.cachedCanvases.getCanvas("maskExtension",tt,nt),Rt=wt.context;Rt.drawImage(Ct,-kt,-vt),Rt.globalCompositeOperation="destination-atop",Rt.fillStyle=It,Rt.fillRect(0,0,tt,nt),Rt.globalCompositeOperation="source-over",Ct=wt.canvas,kt=vt=0}else{Le.save(),Le.globalAlpha=1,Le.setTransform(1,0,0,1,0,0);const wt=new Path2D;wt.rect(kt,vt,tt,nt),Le.clip(wt),Le.globalCompositeOperation="destination-atop",Le.fillStyle=It,Le.fillRect(kt,vt,tt,nt),Le.restore()}}Ye.save(),Ye.globalAlpha=1,Ye.setTransform(1,0,0,1,0,0),ft==="Alpha"&>?Ye.filter=this.filterFactory.addAlphaFilter(gt):ft==="Luminosity"&&(Ye.filter=this.filterFactory.addLuminosityFilter(gt));const bt=new Path2D;bt.rect(At,xt,tt,nt),Ye.clip(bt),Ye.globalCompositeOperation="destination-in",Ye.drawImage(Ct,kt,vt,tt,nt,At,xt,tt,nt),Ye.restore()}save(){this.inSMaskMode?(copyCtxState(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const Le=this.current;this.stateStack.push(Le),this.current=Le.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),copyCtxState(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(Le,Ye,tt,nt,ft,ht){this.ctx.transform(Le,Ye,tt,nt,ft,ht),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(Le,Ye,tt){const nt=this.ctx,ft=this.current;let ht=ft.x,gt=ft.y,At,xt;const Et=getCurrentTransform(nt),yt=Et[0]===0&&Et[3]===0||Et[1]===0&&Et[2]===0,Ct=yt?tt.slice(0):null;for(let kt=0,vt=0,bt=Le.length;kt<bt;kt++)switch(Le[kt]|0){case OPS.rectangle:ht=Ye[vt++],gt=Ye[vt++];const It=Ye[vt++],wt=Ye[vt++],Rt=ht+It,Tt=gt+wt;nt.moveTo(ht,gt),It===0||wt===0?nt.lineTo(Rt,Tt):(nt.lineTo(Rt,gt),nt.lineTo(Rt,Tt),nt.lineTo(ht,Tt)),yt||ft.updateRectMinMax(Et,[ht,gt,Rt,Tt]),nt.closePath();break;case OPS.moveTo:ht=Ye[vt++],gt=Ye[vt++],nt.moveTo(ht,gt),yt||ft.updatePathMinMax(Et,ht,gt);break;case OPS.lineTo:ht=Ye[vt++],gt=Ye[vt++],nt.lineTo(ht,gt),yt||ft.updatePathMinMax(Et,ht,gt);break;case OPS.curveTo:At=ht,xt=gt,ht=Ye[vt+4],gt=Ye[vt+5],nt.bezierCurveTo(Ye[vt],Ye[vt+1],Ye[vt+2],Ye[vt+3],ht,gt),ft.updateCurvePathMinMax(Et,At,xt,Ye[vt],Ye[vt+1],Ye[vt+2],Ye[vt+3],ht,gt,Ct),vt+=6;break;case OPS.curveTo2:At=ht,xt=gt,nt.bezierCurveTo(ht,gt,Ye[vt],Ye[vt+1],Ye[vt+2],Ye[vt+3]),ft.updateCurvePathMinMax(Et,At,xt,ht,gt,Ye[vt],Ye[vt+1],Ye[vt+2],Ye[vt+3],Ct),ht=Ye[vt+2],gt=Ye[vt+3],vt+=4;break;case OPS.curveTo3:At=ht,xt=gt,ht=Ye[vt+2],gt=Ye[vt+3],nt.bezierCurveTo(Ye[vt],Ye[vt+1],ht,gt,ht,gt),ft.updateCurvePathMinMax(Et,At,xt,Ye[vt],Ye[vt+1],ht,gt,ht,gt,Ct),vt+=4;break;case OPS.closePath:nt.closePath();break}yt&&ft.updateScalingPathMinMax(Et,Ct),ft.setCurrentPoint(ht,gt)}closePath(){this.ctx.closePath()}stroke(Le=!0){const Ye=this.ctx,tt=this.current.strokeColor;Ye.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof tt=="object"&&(tt!=null&&tt.getPattern)?(Ye.save(),Ye.strokeStyle=tt.getPattern(Ye,this,getCurrentTransformInverse(Ye),PathType.STROKE),this.rescaleAndStroke(!1),Ye.restore()):this.rescaleAndStroke(!0)),Le&&this.consumePath(this.current.getClippedPathBoundingBox()),Ye.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(Le=!0){const Ye=this.ctx,tt=this.current.fillColor,nt=this.current.patternFill;let ft=!1;nt&&(Ye.save(),Ye.fillStyle=tt.getPattern(Ye,this,getCurrentTransformInverse(Ye),PathType.FILL),ft=!0);const ht=this.current.getClippedPathBoundingBox();this.contentVisible&&ht!==null&&(this.pendingEOFill?(Ye.fill("evenodd"),this.pendingEOFill=!1):Ye.fill()),ft&&Ye.restore(),Le&&this.consumePath(ht)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=NORMAL_CLIP}eoClip(){this.pendingClip=EO_CLIP}beginText(){this.current.textMatrix=IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const Le=this.pendingTextPaths,Ye=this.ctx;if(Le===void 0){Ye.beginPath();return}Ye.save(),Ye.beginPath();for(const tt of Le)Ye.setTransform(...tt.transform),Ye.translate(tt.x,tt.y),tt.addToPath(Ye,tt.fontSize);Ye.restore(),Ye.clip(),Ye.beginPath(),delete this.pendingTextPaths}setCharSpacing(Le){this.current.charSpacing=Le}setWordSpacing(Le){this.current.wordSpacing=Le}setHScale(Le){this.current.textHScale=Le/100}setLeading(Le){this.current.leading=-Le}setFont(Le,Ye){var Et;const tt=this.commonObjs.get(Le),nt=this.current;if(!tt)throw new Error(`Can't find font for ${Le}`);if(nt.fontMatrix=tt.fontMatrix||FONT_IDENTITY_MATRIX,(nt.fontMatrix[0]===0||nt.fontMatrix[3]===0)&&warn$1("Invalid font matrix for font "+Le),Ye<0?(Ye=-Ye,nt.fontDirection=-1):nt.fontDirection=1,this.current.font=tt,this.current.fontSize=Ye,tt.isType3Font)return;const ft=tt.loadedName||"sans-serif",ht=((Et=tt.systemFontInfo)==null?void 0:Et.css)||`"${ft}", ${tt.fallbackName}`;let gt="normal";tt.black?gt="900":tt.bold&&(gt="bold");const At=tt.italic?"italic":"normal";let xt=Ye;Ye<MIN_FONT_SIZE?xt=MIN_FONT_SIZE:Ye>MAX_FONT_SIZE&&(xt=MAX_FONT_SIZE),this.current.fontSizeScale=Ye/xt,this.ctx.font=`${At} ${gt} ${xt}px ${ht}`}setTextRenderingMode(Le){this.current.textRenderingMode=Le}setTextRise(Le){this.current.textRise=Le}moveText(Le,Ye){this.current.x=this.current.lineX+=Le,this.current.y=this.current.lineY+=Ye}setLeadingMoveText(Le,Ye){this.setLeading(-Ye),this.moveText(Le,Ye)}setTextMatrix(Le,Ye,tt,nt,ft,ht){this.current.textMatrix=[Le,Ye,tt,nt,ft,ht],this.current.textMatrixScale=Math.hypot(Le,Ye),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(Le,Ye,tt,nt){const ft=this.ctx,ht=this.current,gt=ht.font,At=ht.textRenderingMode,xt=ht.fontSize/ht.fontSizeScale,Et=At&TextRenderingMode.FILL_STROKE_MASK,yt=!!(At&TextRenderingMode.ADD_TO_PATH_FLAG),Ct=ht.patternFill&&!gt.missingFile;let kt;(gt.disableFontFace||yt||Ct)&&(kt=gt.getPathGenerator(this.commonObjs,Le)),gt.disableFontFace||Ct?(ft.save(),ft.translate(Ye,tt),ft.beginPath(),kt(ft,xt),nt&&ft.setTransform(...nt),(Et===TextRenderingMode.FILL||Et===TextRenderingMode.FILL_STROKE)&&ft.fill(),(Et===TextRenderingMode.STROKE||Et===TextRenderingMode.FILL_STROKE)&&ft.stroke(),ft.restore()):((Et===TextRenderingMode.FILL||Et===TextRenderingMode.FILL_STROKE)&&ft.fillText(Le,Ye,tt),(Et===TextRenderingMode.STROKE||Et===TextRenderingMode.FILL_STROKE)&&ft.strokeText(Le,Ye,tt)),yt&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:getCurrentTransform(ft),x:Ye,y:tt,fontSize:xt,addToPath:kt})}get isFontSubpixelAAEnabled(){const{context:Le}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);Le.scale(1.5,1),Le.fillText("I",0,10);const Ye=Le.getImageData(0,0,10,10).data;let tt=!1;for(let nt=3;nt<Ye.length;nt+=4)if(Ye[nt]>0&&Ye[nt]<255){tt=!0;break}return shadow(this,"isFontSubpixelAAEnabled",tt)}showText(Le){const Ye=this.current,tt=Ye.font;if(tt.isType3Font)return this.showType3Text(Le);const nt=Ye.fontSize;if(nt===0)return;const ft=this.ctx,ht=Ye.fontSizeScale,gt=Ye.charSpacing,At=Ye.wordSpacing,xt=Ye.fontDirection,Et=Ye.textHScale*xt,yt=Le.length,Ct=tt.vertical,kt=Ct?1:-1,vt=tt.defaultVMetrics,bt=nt*Ye.fontMatrix[0],It=Ye.textRenderingMode===TextRenderingMode.FILL&&!tt.disableFontFace&&!Ye.patternFill;ft.save(),ft.transform(...Ye.textMatrix),ft.translate(Ye.x,Ye.y+Ye.textRise),xt>0?ft.scale(Et,-1):ft.scale(Et,1);let wt;if(Ye.patternFill){ft.save();const Lt=Ye.fillColor.getPattern(ft,this,getCurrentTransformInverse(ft),PathType.FILL);wt=getCurrentTransform(ft),ft.restore(),ft.fillStyle=Lt}let Rt=Ye.lineWidth;const Tt=Ye.textMatrixScale;if(Tt===0||Rt===0){const Lt=Ye.textRenderingMode&TextRenderingMode.FILL_STROKE_MASK;(Lt===TextRenderingMode.STROKE||Lt===TextRenderingMode.FILL_STROKE)&&(Rt=this.getSinglePixelWidth())}else Rt/=Tt;if(ht!==1&&(ft.scale(ht,ht),Rt/=ht),ft.lineWidth=Rt,tt.isInvalidPDFjsFont){const Lt=[];let Nt=0;for(const Pt of Le)Lt.push(Pt.unicode),Nt+=Pt.width;ft.fillText(Lt.join(""),0,0),Ye.x+=Nt*bt*Et,ft.restore(),this.compose();return}let Bt=0,Dt;for(Dt=0;Dt<yt;++Dt){const Lt=Le[Dt];if(typeof Lt=="number"){Bt+=kt*Lt*nt/1e3;continue}let Nt=!1;const Pt=(Lt.isSpace?At:0)+gt,Wt=Lt.fontChar,$t=Lt.accent;let Kt,Vt,Ut=Lt.width;if(Ct){const Xt=Lt.vmetric||vt,Qt=-(Lt.vmetric?Xt[1]:Ut*.5)*bt,jt=Xt[2]*bt;Ut=Xt?-Xt[0]:Ut,Kt=Qt/ht,Vt=(Bt+jt)/ht}else Kt=Bt/ht,Vt=0;if(tt.remeasure&&Ut>0){const Xt=ft.measureText(Wt).width*1e3/nt*ht;if(Ut<Xt&&this.isFontSubpixelAAEnabled){const Qt=Ut/Xt;Nt=!0,ft.save(),ft.scale(Qt,1),Kt/=Qt}else Ut!==Xt&&(Kt+=(Ut-Xt)/2e3*nt/ht)}if(this.contentVisible&&(Lt.isInFont||tt.missingFile)){if(It&&!$t)ft.fillText(Wt,Kt,Vt);else if(this.paintChar(Wt,Kt,Vt,wt),$t){const Xt=Kt+nt*$t.offset.x/ht,Qt=Vt-nt*$t.offset.y/ht;this.paintChar($t.fontChar,Xt,Qt,wt)}}const _t=Ct?Ut*bt-Pt*xt:Ut*bt+Pt*xt;Bt+=_t,Nt&&ft.restore()}Ct?Ye.y-=Bt:Ye.x+=Bt*Et,ft.restore(),this.compose()}showType3Text(Le){const Ye=this.ctx,tt=this.current,nt=tt.font,ft=tt.fontSize,ht=tt.fontDirection,gt=nt.vertical?1:-1,At=tt.charSpacing,xt=tt.wordSpacing,Et=tt.textHScale*ht,yt=tt.fontMatrix||FONT_IDENTITY_MATRIX,Ct=Le.length,kt=tt.textRenderingMode===TextRenderingMode.INVISIBLE;let vt,bt,It,wt;if(!(kt||ft===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,Ye.save(),Ye.transform(...tt.textMatrix),Ye.translate(tt.x,tt.y),Ye.scale(Et,ht),vt=0;vt<Ct;++vt){if(bt=Le[vt],typeof bt=="number"){wt=gt*bt*ft/1e3,this.ctx.translate(wt,0),tt.x+=wt*Et;continue}const Rt=(bt.isSpace?xt:0)+At,Tt=nt.charProcOperatorList[bt.operatorListId];if(!Tt){warn$1(`Type3 character "${bt.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=bt,this.save(),Ye.scale(ft,ft),Ye.transform(...yt),this.executeOperatorList(Tt),this.restore()),It=Util.applyTransform([bt.width,0],yt)[0]*ft+Rt,Ye.translate(It,0),tt.x+=It*Et}Ye.restore(),this.processingType3=null}}setCharWidth(Le,Ye){}setCharWidthAndBounds(Le,Ye,tt,nt,ft,ht){this.ctx.rect(tt,nt,ft-tt,ht-nt),this.ctx.clip(),this.endPath()}getColorN_Pattern(Le){let Ye;if(Le[0]==="TilingPattern"){const tt=Le[1],nt=this.baseTransform||getCurrentTransform(this.ctx),ft={createCanvasGraphics:ht=>new R3(ht,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};Ye=new TilingPattern(Le,tt,this.ctx,ft,nt)}else Ye=this._getPattern(Le[1],Le[2]);return Ye}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(Le,Ye,tt){this.ctx.strokeStyle=this.current.strokeColor=Util.makeHexColor(Le,Ye,tt)}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent"}setFillRGBColor(Le,Ye,tt){this.ctx.fillStyle=this.current.fillColor=Util.makeHexColor(Le,Ye,tt),this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(Le,Ye=null){let tt;return this.cachedPatterns.has(Le)?tt=this.cachedPatterns.get(Le):(tt=getShadingPattern(this.getObject(Le)),this.cachedPatterns.set(Le,tt)),Ye&&(tt.matrix=Ye),tt}shadingFill(Le){if(!this.contentVisible)return;const Ye=this.ctx;this.save();const tt=this._getPattern(Le);Ye.fillStyle=tt.getPattern(Ye,this,getCurrentTransformInverse(Ye),PathType.SHADING);const nt=getCurrentTransformInverse(Ye);if(nt){const{width:ft,height:ht}=Ye.canvas,[gt,At,xt,Et]=Util.getAxialAlignedBoundingBox([0,0,ft,ht],nt);this.ctx.fillRect(gt,At,xt-gt,Et-At)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){unreachable$1("Should not call beginInlineImage")}beginImageData(){unreachable$1("Should not call beginImageData")}paintFormXObjectBegin(Le,Ye){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Le&&this.transform(...Le),this.baseTransform=getCurrentTransform(this.ctx),Ye)){const tt=Ye[2]-Ye[0],nt=Ye[3]-Ye[1];this.ctx.rect(Ye[0],Ye[1],tt,nt),this.current.updateRectMinMax(getCurrentTransform(this.ctx),Ye),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(Le){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const Ye=this.ctx;Le.isolated||info("TODO: Support non-isolated groups."),Le.knockout&&warn$1("Knockout groups not supported.");const tt=getCurrentTransform(Ye);if(Le.matrix&&Ye.transform(...Le.matrix),!Le.bbox)throw new Error("Bounding box is required.");let nt=Util.getAxialAlignedBoundingBox(Le.bbox,getCurrentTransform(Ye));const ft=[0,0,Ye.canvas.width,Ye.canvas.height];nt=Util.intersect(nt,ft)||[0,0,0,0];const ht=Math.floor(nt[0]),gt=Math.floor(nt[1]),At=Math.max(Math.ceil(nt[2])-ht,1),xt=Math.max(Math.ceil(nt[3])-gt,1);this.current.startNewPathAndClipBox([0,0,At,xt]);let Et="groupAt"+this.groupLevel;Le.smask&&(Et+="_smask_"+this.smaskCounter++%2);const yt=this.cachedCanvases.getCanvas(Et,At,xt),Ct=yt.context;Ct.translate(-ht,-gt),Ct.transform(...tt),Le.smask?this.smaskStack.push({canvas:yt.canvas,context:Ct,offsetX:ht,offsetY:gt,subtype:Le.smask.subtype,backdrop:Le.smask.backdrop,transferMap:Le.smask.transferMap||null,startTransformInverse:null}):(Ye.setTransform(1,0,0,1,0,0),Ye.translate(ht,gt),Ye.save()),copyCtxState(Ye,Ct),this.ctx=Ct,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(Ye),this.groupLevel++}endGroup(Le){if(!this.contentVisible)return;this.groupLevel--;const Ye=this.ctx,tt=this.groupStack.pop();if(this.ctx=tt,this.ctx.imageSmoothingEnabled=!1,Le.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const nt=getCurrentTransform(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...nt);const ft=Util.getAxialAlignedBoundingBox([0,0,Ye.canvas.width,Ye.canvas.height],nt);this.ctx.drawImage(Ye.canvas,0,0),this.ctx.restore(),this.compose(ft)}}beginAnnotation(Le,Ye,tt,nt,ft){if(y0(this,_o,J9).call(this),resetCtxToDefault(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Ye){const ht=Ye[2]-Ye[0],gt=Ye[3]-Ye[1];if(ft&&this.annotationCanvasMap){tt=tt.slice(),tt[4]-=Ye[0],tt[5]-=Ye[1],Ye=Ye.slice(),Ye[0]=Ye[1]=0,Ye[2]=ht,Ye[3]=gt;const[At,xt]=Util.singularValueDecompose2dScale(getCurrentTransform(this.ctx)),{viewportScale:Et}=this,yt=Math.ceil(ht*this.outputScaleX*Et),Ct=Math.ceil(gt*this.outputScaleY*Et);this.annotationCanvas=this.canvasFactory.create(yt,Ct);const{canvas:kt,context:vt}=this.annotationCanvas;this.annotationCanvasMap.set(Le,kt),this.annotationCanvas.savedCtx=this.ctx,this.ctx=vt,this.ctx.save(),this.ctx.setTransform(At,0,0,-xt,0,gt*xt),resetCtxToDefault(this.ctx)}else resetCtxToDefault(this.ctx),this.endPath(),this.ctx.rect(Ye[0],Ye[1],ht,gt),this.ctx.clip(),this.ctx.beginPath()}this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...tt),this.transform(...nt)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),y0(this,_o,ep).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(Le){if(!this.contentVisible)return;const Ye=Le.count;Le=this.getObject(Le.data,Le),Le.count=Ye;const tt=this.ctx,nt=this.processingType3;if(nt&&(nt.compiled===void 0&&(nt.compiled=compileType3Glyph(Le)),nt.compiled)){nt.compiled(tt);return}const ft=this._createMaskCanvas(Le),ht=ft.canvas;tt.save(),tt.setTransform(1,0,0,1,0,0),tt.drawImage(ht,ft.offsetX,ft.offsetY),tt.restore(),this.compose()}paintImageMaskXObjectRepeat(Le,Ye,tt=0,nt=0,ft,ht){if(!this.contentVisible)return;Le=this.getObject(Le.data,Le);const gt=this.ctx;gt.save();const At=getCurrentTransform(gt);gt.transform(Ye,tt,nt,ft,0,0);const xt=this._createMaskCanvas(Le);gt.setTransform(1,0,0,1,xt.offsetX-At[4],xt.offsetY-At[5]);for(let Et=0,yt=ht.length;Et<yt;Et+=2){const Ct=Util.transform(At,[Ye,tt,nt,ft,ht[Et],ht[Et+1]]),[kt,vt]=Util.applyTransform([0,0],Ct);gt.drawImage(xt.canvas,kt,vt)}gt.restore(),this.compose()}paintImageMaskXObjectGroup(Le){if(!this.contentVisible)return;const Ye=this.ctx,tt=this.current.fillColor,nt=this.current.patternFill;for(const ft of Le){const{data:ht,width:gt,height:At,transform:xt}=ft,Et=this.cachedCanvases.getCanvas("maskCanvas",gt,At),yt=Et.context;yt.save();const Ct=this.getObject(ht,ft);putBinaryImageMask(yt,Ct),yt.globalCompositeOperation="source-in",yt.fillStyle=nt?tt.getPattern(yt,this,getCurrentTransformInverse(Ye),PathType.FILL):tt,yt.fillRect(0,0,gt,At),yt.restore(),Ye.save(),Ye.transform(...xt),Ye.scale(1,-1),drawImageAtIntegerCoords(Ye,Et.canvas,0,0,gt,At,0,-1,1,1),Ye.restore()}this.compose()}paintImageXObject(Le){if(!this.contentVisible)return;const Ye=this.getObject(Le);if(!Ye){warn$1("Dependent image isn't ready yet");return}this.paintInlineImageXObject(Ye)}paintImageXObjectRepeat(Le,Ye,tt,nt){if(!this.contentVisible)return;const ft=this.getObject(Le);if(!ft){warn$1("Dependent image isn't ready yet");return}const ht=ft.width,gt=ft.height,At=[];for(let xt=0,Et=nt.length;xt<Et;xt+=2)At.push({transform:[Ye,0,0,tt,nt[xt],nt[xt+1]],x:0,y:0,w:ht,h:gt});this.paintInlineImageXObjectGroup(ft,At)}applyTransferMapsToCanvas(Le){return this.current.transferMaps!=="none"&&(Le.filter=this.current.transferMaps,Le.drawImage(Le.canvas,0,0),Le.filter="none"),Le.canvas}applyTransferMapsToBitmap(Le){if(this.current.transferMaps==="none")return Le.bitmap;const{bitmap:Ye,width:tt,height:nt}=Le,ft=this.cachedCanvases.getCanvas("inlineImage",tt,nt),ht=ft.context;return ht.filter=this.current.transferMaps,ht.drawImage(Ye,0,0),ht.filter="none",ft.canvas}paintInlineImageXObject(Le){if(!this.contentVisible)return;const Ye=Le.width,tt=Le.height,nt=this.ctx;if(this.save(),!isNodeJS){const{filter:gt}=nt;gt!=="none"&>!==""&&(nt.filter="none")}nt.scale(1/Ye,-1/tt);let ft;if(Le.bitmap)ft=this.applyTransferMapsToBitmap(Le);else if(typeof HTMLElement=="function"&&Le instanceof HTMLElement||!Le.data)ft=Le;else{const At=this.cachedCanvases.getCanvas("inlineImage",Ye,tt).context;putBinaryImageData(At,Le),ft=this.applyTransferMapsToCanvas(At)}const ht=this._scaleImage(ft,getCurrentTransformInverse(nt));nt.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(nt),Le.interpolate),drawImageAtIntegerCoords(nt,ht.img,0,0,ht.paintWidth,ht.paintHeight,0,-tt,Ye,tt),this.compose(),this.restore()}paintInlineImageXObjectGroup(Le,Ye){if(!this.contentVisible)return;const tt=this.ctx;let nt;if(Le.bitmap)nt=Le.bitmap;else{const ft=Le.width,ht=Le.height,At=this.cachedCanvases.getCanvas("inlineImage",ft,ht).context;putBinaryImageData(At,Le),nt=this.applyTransferMapsToCanvas(At)}for(const ft of Ye)tt.save(),tt.transform(...ft.transform),tt.scale(1,-1),drawImageAtIntegerCoords(tt,nt,ft.x,ft.y,ft.w,ft.h,0,-1,1,1),tt.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(Le){}markPointProps(Le,Ye){}beginMarkedContent(Le){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(Le,Ye){Le==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(Ye)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(Le){const Ye=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(Le);const tt=this.ctx;this.pendingClip&&(Ye||(this.pendingClip===EO_CLIP?tt.clip("evenodd"):tt.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),tt.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const Le=getCurrentTransform(this.ctx);if(Le[1]===0&&Le[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(Le[0]),Math.abs(Le[3]));else{const Ye=Math.abs(Le[0]*Le[3]-Le[2]*Le[1]),tt=Math.hypot(Le[0],Le[2]),nt=Math.hypot(Le[1],Le[3]);this._cachedGetSinglePixelWidth=Math.max(tt,nt)/Ye}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:Le}=this.current,{a:Ye,b:tt,c:nt,d:ft}=this.ctx.getTransform();let ht,gt;if(tt===0&&nt===0){const At=Math.abs(Ye),xt=Math.abs(ft);if(At===xt)if(Le===0)ht=gt=1/At;else{const Et=At*Le;ht=gt=Et<1?1/Et:1}else if(Le===0)ht=1/At,gt=1/xt;else{const Et=At*Le,yt=xt*Le;ht=Et<1?1/Et:1,gt=yt<1?1/yt:1}}else{const At=Math.abs(Ye*ft-tt*nt),xt=Math.hypot(Ye,tt),Et=Math.hypot(nt,ft);if(Le===0)ht=Et/At,gt=xt/At;else{const yt=Le*At;ht=Et>yt?Et/yt:1,gt=xt>yt?xt/yt:1}}this._cachedScaleForStroking[0]=ht,this._cachedScaleForStroking[1]=gt}return this._cachedScaleForStroking}rescaleAndStroke(Le){const{ctx:Ye}=this,{lineWidth:tt}=this.current,[nt,ft]=this.getScaleForStroking();if(Ye.lineWidth=tt||1,nt===1&&ft===1){Ye.stroke();return}const ht=Ye.getLineDash();if(Le&&Ye.save(),Ye.scale(nt,ft),ht.length>0){const gt=Math.max(nt,ft);Ye.setLineDash(ht.map(At=>At/gt)),Ye.lineDashOffset/=gt}Ye.stroke(),Le&&Ye.restore()}isContentVisible(){for(let Le=this.markedContentStack.length-1;Le>=0;Le--)if(!this.markedContentStack[Le].visible)return!1;return!0}};_o=new WeakSet,J9=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},ep=function(){if(this.pageColors){const Le=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(Le!=="none"){const Ye=this.ctx.filter;this.ctx.filter=Le,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=Ye}}};let CanvasGraphics=R3;for(const Be in OPS)CanvasGraphics.prototype[Be]!==void 0&&(CanvasGraphics.prototype[OPS[Be]]=CanvasGraphics.prototype[Be]);class GlobalWorkerOptions{static get workerPort(){return Ht(this,yc)}static set workerPort(Le){if(!(typeof Worker<"u"&&Le instanceof Worker)&&Le!==null)throw new Error("Invalid `workerPort` type.");C0(this,yc,Le)}static get workerSrc(){return Ht(this,kc)}static set workerSrc(Le){if(typeof Le!="string")throw new Error("Invalid `workerSrc` type.");C0(this,kc,Le)}}yc=new WeakMap,kc=new WeakMap,k0(GlobalWorkerOptions,yc,null),k0(GlobalWorkerOptions,kc,"");const CallbackKind={DATA:1,ERROR:2},StreamKind={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function wrapReason(Be){switch(Be instanceof Error||typeof Be=="object"&&Be!==null||unreachable$1('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),Be.name){case"AbortException":return new AbortException(Be.message);case"MissingPDFException":return new MissingPDFException(Be.message);case"PasswordException":return new PasswordException(Be.message,Be.code);case"UnexpectedResponseException":return new UnexpectedResponseException(Be.message,Be.status);case"UnknownErrorException":return new UnknownErrorException(Be.message,Be.details);default:return new UnknownErrorException(Be.message,Be.toString())}}class MessageHandler{constructor(Le,Ye,tt){k0(this,yi);k0(this,H1,new AbortController);this.sourceName=Le,this.targetName=Ye,this.comObj=tt,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),tt.addEventListener("message",y0(this,yi,C4).bind(this),{signal:Ht(this,H1).signal})}on(Le,Ye){const tt=this.actionHandler;if(tt[Le])throw new Error(`There is already an actionName called "${Le}"`);tt[Le]=Ye}send(Le,Ye,tt){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:Le,data:Ye},tt)}sendWithPromise(Le,Ye,tt){const nt=this.callbackId++,ft=Promise.withResolvers();this.callbackCapabilities[nt]=ft;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:Le,callbackId:nt,data:Ye},tt)}catch(ht){ft.reject(ht)}return ft.promise}sendWithStream(Le,Ye,tt,nt){const ft=this.streamId++,ht=this.sourceName,gt=this.targetName,At=this.comObj;return new ReadableStream({start:xt=>{const Et=Promise.withResolvers();return this.streamControllers[ft]={controller:xt,startCall:Et,pullCall:null,cancelCall:null,isClosed:!1},At.postMessage({sourceName:ht,targetName:gt,action:Le,streamId:ft,data:Ye,desiredSize:xt.desiredSize},nt),Et.promise},pull:xt=>{const Et=Promise.withResolvers();return this.streamControllers[ft].pullCall=Et,At.postMessage({sourceName:ht,targetName:gt,stream:StreamKind.PULL,streamId:ft,desiredSize:xt.desiredSize}),Et.promise},cancel:xt=>{assert(xt instanceof Error,"cancel must have a valid reason");const Et=Promise.withResolvers();return this.streamControllers[ft].cancelCall=Et,this.streamControllers[ft].isClosed=!0,At.postMessage({sourceName:ht,targetName:gt,stream:StreamKind.CANCEL,streamId:ft,reason:wrapReason(xt)}),Et.promise}},tt)}destroy(){var Le;(Le=Ht(this,H1))==null||Le.abort(),C0(this,H1,null)}}H1=new WeakMap,yi=new WeakSet,C4=function({data:Le}){if(Le.targetName!==this.sourceName)return;if(Le.stream){y0(this,yi,k4).call(this,Le);return}if(Le.callback){const tt=Le.callbackId,nt=this.callbackCapabilities[tt];if(!nt)throw new Error(`Cannot resolve callback ${tt}`);if(delete this.callbackCapabilities[tt],Le.callback===CallbackKind.DATA)nt.resolve(Le.data);else if(Le.callback===CallbackKind.ERROR)nt.reject(wrapReason(Le.reason));else throw new Error("Unexpected callback case");return}const Ye=this.actionHandler[Le.action];if(!Ye)throw new Error(`Unknown action from worker: ${Le.action}`);if(Le.callbackId){const tt=this.sourceName,nt=Le.sourceName,ft=this.comObj;new Promise(function(ht){ht(Ye(Le.data))}).then(function(ht){ft.postMessage({sourceName:tt,targetName:nt,callback:CallbackKind.DATA,callbackId:Le.callbackId,data:ht})},function(ht){ft.postMessage({sourceName:tt,targetName:nt,callback:CallbackKind.ERROR,callbackId:Le.callbackId,reason:wrapReason(ht)})});return}if(Le.streamId){y0(this,yi,y4).call(this,Le);return}Ye(Le.data)},y4=function(Le){const Ye=Le.streamId,tt=this.sourceName,nt=Le.sourceName,ft=this.comObj,ht=this,gt=this.actionHandler[Le.action],At={enqueue(xt,Et=1,yt){if(this.isCancelled)return;const Ct=this.desiredSize;this.desiredSize-=Et,Ct>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.ENQUEUE,streamId:Ye,chunk:xt},yt)},close(){this.isCancelled||(this.isCancelled=!0,ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.CLOSE,streamId:Ye}),delete ht.streamSinks[Ye])},error(xt){assert(xt instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.ERROR,streamId:Ye,reason:wrapReason(xt)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:Le.desiredSize,ready:null};At.sinkCapability.resolve(),At.ready=At.sinkCapability.promise,this.streamSinks[Ye]=At,new Promise(function(xt){xt(gt(Le.data,At))}).then(function(){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.START_COMPLETE,streamId:Ye,success:!0})},function(xt){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.START_COMPLETE,streamId:Ye,reason:wrapReason(xt)})})},k4=function(Le){const Ye=Le.streamId,tt=this.sourceName,nt=Le.sourceName,ft=this.comObj,ht=this.streamControllers[Ye],gt=this.streamSinks[Ye];switch(Le.stream){case StreamKind.START_COMPLETE:Le.success?ht.startCall.resolve():ht.startCall.reject(wrapReason(Le.reason));break;case StreamKind.PULL_COMPLETE:Le.success?ht.pullCall.resolve():ht.pullCall.reject(wrapReason(Le.reason));break;case StreamKind.PULL:if(!gt){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.PULL_COMPLETE,streamId:Ye,success:!0});break}gt.desiredSize<=0&&Le.desiredSize>0&>.sinkCapability.resolve(),gt.desiredSize=Le.desiredSize,new Promise(function(At){var xt;At((xt=gt.onPull)==null?void 0:xt.call(gt))}).then(function(){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.PULL_COMPLETE,streamId:Ye,success:!0})},function(At){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.PULL_COMPLETE,streamId:Ye,reason:wrapReason(At)})});break;case StreamKind.ENQUEUE:if(assert(ht,"enqueue should have stream controller"),ht.isClosed)break;ht.controller.enqueue(Le.chunk);break;case StreamKind.CLOSE:if(assert(ht,"close should have stream controller"),ht.isClosed)break;ht.isClosed=!0,ht.controller.close(),y0(this,yi,a3).call(this,ht,Ye);break;case StreamKind.ERROR:assert(ht,"error should have stream controller"),ht.controller.error(wrapReason(Le.reason)),y0(this,yi,a3).call(this,ht,Ye);break;case StreamKind.CANCEL_COMPLETE:Le.success?ht.cancelCall.resolve():ht.cancelCall.reject(wrapReason(Le.reason)),y0(this,yi,a3).call(this,ht,Ye);break;case StreamKind.CANCEL:if(!gt)break;new Promise(function(At){var xt;At((xt=gt.onCancel)==null?void 0:xt.call(gt,wrapReason(Le.reason)))}).then(function(){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.CANCEL_COMPLETE,streamId:Ye,success:!0})},function(At){ft.postMessage({sourceName:tt,targetName:nt,stream:StreamKind.CANCEL_COMPLETE,streamId:Ye,reason:wrapReason(At)})}),gt.sinkCapability.reject(wrapReason(Le.reason)),gt.isCancelled=!0,delete this.streamSinks[Ye];break;default:throw new Error("Unexpected stream case")}},a3=async function(Le,Ye){var tt,nt,ft;await Promise.allSettled([(tt=Le.startCall)==null?void 0:tt.promise,(nt=Le.pullCall)==null?void 0:nt.promise,(ft=Le.cancelCall)==null?void 0:ft.promise]),delete this.streamControllers[Ye]};class Metadata{constructor({parsedData:Le,rawData:Ye}){k0(this,O2);k0(this,vc);C0(this,O2,Le),C0(this,vc,Ye)}getRaw(){return Ht(this,vc)}get(Le){return Ht(this,O2).get(Le)??null}getAll(){return objectFromMap(Ht(this,O2))}has(Le){return Ht(this,O2).has(Le)}}O2=new WeakMap,vc=new WeakMap;const INTERNAL=Symbol("INTERNAL");class OptionalContentGroup{constructor(Le,{name:Ye,intent:tt,usage:nt,rbGroups:ft}){k0(this,bc,!1);k0(this,Ic,!1);k0(this,Sc,!1);k0(this,G1,!0);C0(this,bc,!!(Le&RenderingIntentFlag.DISPLAY)),C0(this,Ic,!!(Le&RenderingIntentFlag.PRINT)),this.name=Ye,this.intent=tt,this.usage=nt,this.rbGroups=ft}get visible(){if(Ht(this,Sc))return Ht(this,G1);if(!Ht(this,G1))return!1;const{print:Le,view:Ye}=this.usage;return Ht(this,bc)?(Ye==null?void 0:Ye.viewState)!=="OFF":Ht(this,Ic)?(Le==null?void 0:Le.printState)!=="OFF":!0}_setVisible(Le,Ye,tt=!1){Le!==INTERNAL&&unreachable$1("Internal method `_setVisible` called."),C0(this,Sc,tt),C0(this,G1,Ye)}}bc=new WeakMap,Ic=new WeakMap,Sc=new WeakMap,G1=new WeakMap;class OptionalContentConfig{constructor(Le,Ye=RenderingIntentFlag.DISPLAY){k0(this,wc);k0(this,Mo,null);k0(this,br,new Map);k0(this,z1,null);k0(this,W1,null);if(this.renderingIntent=Ye,this.name=null,this.creator=null,Le!==null){this.name=Le.name,this.creator=Le.creator,C0(this,W1,Le.order);for(const tt of Le.groups)Ht(this,br).set(tt.id,new OptionalContentGroup(Ye,tt));if(Le.baseState==="OFF")for(const tt of Ht(this,br).values())tt._setVisible(INTERNAL,!1);for(const tt of Le.on)Ht(this,br).get(tt)._setVisible(INTERNAL,!0);for(const tt of Le.off)Ht(this,br).get(tt)._setVisible(INTERNAL,!1);C0(this,z1,this.getHash())}}isVisible(Le){if(Ht(this,br).size===0)return!0;if(!Le)return info("Optional content group not defined."),!0;if(Le.type==="OCG")return Ht(this,br).has(Le.id)?Ht(this,br).get(Le.id).visible:(warn$1(`Optional content group not found: ${Le.id}`),!0);if(Le.type==="OCMD"){if(Le.expression)return y0(this,wc,tp).call(this,Le.expression);if(!Le.policy||Le.policy==="AnyOn"){for(const Ye of Le.ids){if(!Ht(this,br).has(Ye))return warn$1(`Optional content group not found: ${Ye}`),!0;if(Ht(this,br).get(Ye).visible)return!0}return!1}else if(Le.policy==="AllOn"){for(const Ye of Le.ids){if(!Ht(this,br).has(Ye))return warn$1(`Optional content group not found: ${Ye}`),!0;if(!Ht(this,br).get(Ye).visible)return!1}return!0}else if(Le.policy==="AnyOff"){for(const Ye of Le.ids){if(!Ht(this,br).has(Ye))return warn$1(`Optional content group not found: ${Ye}`),!0;if(!Ht(this,br).get(Ye).visible)return!0}return!1}else if(Le.policy==="AllOff"){for(const Ye of Le.ids){if(!Ht(this,br).has(Ye))return warn$1(`Optional content group not found: ${Ye}`),!0;if(Ht(this,br).get(Ye).visible)return!1}return!0}return warn$1(`Unknown optional content policy ${Le.policy}.`),!0}return warn$1(`Unknown group type ${Le.type}.`),!0}setVisibility(Le,Ye=!0,tt=!0){var ft;const nt=Ht(this,br).get(Le);if(!nt){warn$1(`Optional content group not found: ${Le}`);return}if(tt&&Ye&&nt.rbGroups.length)for(const ht of nt.rbGroups)for(const gt of ht)gt!==Le&&((ft=Ht(this,br).get(gt))==null||ft._setVisible(INTERNAL,!1,!0));nt._setVisible(INTERNAL,!!Ye,!0),C0(this,Mo,null)}setOCGState({state:Le,preserveRB:Ye}){let tt;for(const nt of Le){switch(nt){case"ON":case"OFF":case"Toggle":tt=nt;continue}const ft=Ht(this,br).get(nt);if(ft)switch(tt){case"ON":this.setVisibility(nt,!0,Ye);break;case"OFF":this.setVisibility(nt,!1,Ye);break;case"Toggle":this.setVisibility(nt,!ft.visible,Ye);break}}C0(this,Mo,null)}get hasInitialVisibility(){return Ht(this,z1)===null||this.getHash()===Ht(this,z1)}getOrder(){return Ht(this,br).size?Ht(this,W1)?Ht(this,W1).slice():[...Ht(this,br).keys()]:null}getGroups(){return Ht(this,br).size>0?objectFromMap(Ht(this,br)):null}getGroup(Le){return Ht(this,br).get(Le)||null}getHash(){if(Ht(this,Mo)!==null)return Ht(this,Mo);const Le=new MurmurHash3_64;for(const[Ye,tt]of Ht(this,br))Le.update(`${Ye}:${tt.visible}`);return C0(this,Mo,Le.hexdigest())}}Mo=new WeakMap,br=new WeakMap,z1=new WeakMap,W1=new WeakMap,wc=new WeakSet,tp=function(Le){const Ye=Le.length;if(Ye<2)return!0;const tt=Le[0];for(let nt=1;nt<Ye;nt++){const ft=Le[nt];let ht;if(Array.isArray(ft))ht=y0(this,wc,tp).call(this,ft);else if(Ht(this,br).has(ft))ht=Ht(this,br).get(ft).visible;else return warn$1(`Optional content group not found: ${ft}`),!0;switch(tt){case"And":if(!ht)return!1;break;case"Or":if(ht)return!0;break;case"Not":return!ht;default:return!0}}return tt==="And"};class PDFDataTransportStream{constructor(Le,{disableRange:Ye=!1,disableStream:tt=!1}){assert(Le,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:nt,initialData:ft,progressiveDone:ht,contentDispositionFilename:gt}=Le;if(this._queuedChunks=[],this._progressiveDone=ht,this._contentDispositionFilename=gt,(ft==null?void 0:ft.length)>0){const At=ft instanceof Uint8Array&&ft.byteLength===ft.buffer.byteLength?ft.buffer:new Uint8Array(ft).buffer;this._queuedChunks.push(At)}this._pdfDataRangeTransport=Le,this._isStreamingSupported=!tt,this._isRangeSupported=!Ye,this._contentLength=nt,this._fullRequestReader=null,this._rangeReaders=[],Le.addRangeListener((At,xt)=>{this._onReceiveData({begin:At,chunk:xt})}),Le.addProgressListener((At,xt)=>{this._onProgress({loaded:At,total:xt})}),Le.addProgressiveReadListener(At=>{this._onReceiveData({chunk:At})}),Le.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),Le.transportReady()}_onReceiveData({begin:Le,chunk:Ye}){const tt=Ye instanceof Uint8Array&&Ye.byteLength===Ye.buffer.byteLength?Ye.buffer:new Uint8Array(Ye).buffer;if(Le===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(tt):this._queuedChunks.push(tt);else{const nt=this._rangeReaders.some(function(ft){return ft._begin!==Le?!1:(ft._enqueue(tt),!0)});assert(nt,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var Le;return((Le=this._fullRequestReader)==null?void 0:Le._loaded)??0}_onProgress(Le){var Ye,tt,nt,ft;Le.total===void 0?(tt=(Ye=this._rangeReaders[0])==null?void 0:Ye.onProgress)==null||tt.call(Ye,{loaded:Le.loaded}):(ft=(nt=this._fullRequestReader)==null?void 0:nt.onProgress)==null||ft.call(nt,{loaded:Le.loaded,total:Le.total})}_onProgressiveDone(){var Le;(Le=this._fullRequestReader)==null||Le.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(Le){const Ye=this._rangeReaders.indexOf(Le);Ye>=0&&this._rangeReaders.splice(Ye,1)}getFullReader(){assert(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const Le=this._queuedChunks;return this._queuedChunks=null,new PDFDataTransportStreamReader(this,Le,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(Le,Ye){if(Ye<=this._progressiveDataLength)return null;const tt=new PDFDataTransportStreamRangeReader(this,Le,Ye);return this._pdfDataRangeTransport.requestDataRange(Le,Ye),this._rangeReaders.push(tt),tt}cancelAllRequests(Le){var Ye;(Ye=this._fullRequestReader)==null||Ye.cancel(Le);for(const tt of this._rangeReaders.slice(0))tt.cancel(Le);this._pdfDataRangeTransport.abort()}}class PDFDataTransportStreamReader{constructor(Le,Ye,tt=!1,nt=null){this._stream=Le,this._done=tt||!1,this._filename=isPdfFile(nt)?nt:null,this._queuedChunks=Ye||[],this._loaded=0;for(const ft of this._queuedChunks)this._loaded+=ft.byteLength;this._requests=[],this._headersReady=Promise.resolve(),Le._fullRequestReader=this,this.onProgress=null}_enqueue(Le){this._done||(this._requests.length>0?this._requests.shift().resolve({value:Le,done:!1}):this._queuedChunks.push(Le),this._loaded+=Le.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const Le=Promise.withResolvers();return this._requests.push(Le),Le.promise}cancel(Le){this._done=!0;for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class PDFDataTransportStreamRangeReader{constructor(Le,Ye,tt){this._stream=Le,this._begin=Ye,this._end=tt,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(Le){if(!this._done){if(this._requests.length===0)this._queuedChunk=Le;else{this._requests.shift().resolve({value:Le,done:!1});for(const tt of this._requests)tt.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const Ye=this._queuedChunk;return this._queuedChunk=null,{value:Ye,done:!1}}if(this._done)return{value:void 0,done:!0};const Le=Promise.withResolvers();return this._requests.push(Le),Le.promise}cancel(Le){this._done=!0;for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function getFilenameFromContentDispositionHeader(Be){let Le=!0,Ye=tt("filename\\*","i").exec(Be);if(Ye){Ye=Ye[1];let Et=gt(Ye);return Et=unescape(Et),Et=At(Et),Et=xt(Et),ft(Et)}if(Ye=ht(Be),Ye){const Et=xt(Ye);return ft(Et)}if(Ye=tt("filename","i").exec(Be),Ye){Ye=Ye[1];let Et=gt(Ye);return Et=xt(Et),ft(Et)}function tt(Et,yt){return new RegExp("(?:^|;)\\s*"+Et+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',yt)}function nt(Et,yt){if(Et){if(!/^[\x00-\xFF]+$/.test(yt))return yt;try{const Ct=new TextDecoder(Et,{fatal:!0}),kt=stringToBytes(yt);yt=Ct.decode(kt),Le=!1}catch{}}return yt}function ft(Et){return Le&&/[\x80-\xff]/.test(Et)&&(Et=nt("utf-8",Et),Le&&(Et=nt("iso-8859-1",Et))),Et}function ht(Et){const yt=[];let Ct;const kt=tt("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(Ct=kt.exec(Et))!==null;){let[,bt,It,wt]=Ct;if(bt=parseInt(bt,10),bt in yt){if(bt===0)break;continue}yt[bt]=[It,wt]}const vt=[];for(let bt=0;bt<yt.length&&bt in yt;++bt){let[It,wt]=yt[bt];wt=gt(wt),It&&(wt=unescape(wt),bt===0&&(wt=At(wt))),vt.push(wt)}return vt.join("")}function gt(Et){if(Et.startsWith('"')){const yt=Et.slice(1).split('\\"');for(let Ct=0;Ct<yt.length;++Ct){const kt=yt[Ct].indexOf('"');kt!==-1&&(yt[Ct]=yt[Ct].slice(0,kt),yt.length=Ct+1),yt[Ct]=yt[Ct].replaceAll(/\\(.)/g,"$1")}Et=yt.join('"')}return Et}function At(Et){const yt=Et.indexOf("'");if(yt===-1)return Et;const Ct=Et.slice(0,yt),vt=Et.slice(yt+1).replace(/^[^']*'/,"");return nt(Ct,vt)}function xt(Et){return!Et.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(Et)?Et:Et.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(yt,Ct,kt,vt){if(kt==="q"||kt==="Q")return vt=vt.replaceAll("_"," "),vt=vt.replaceAll(/=([0-9a-fA-F]{2})/g,function(bt,It){return String.fromCharCode(parseInt(It,16))}),nt(Ct,vt);try{vt=atob(vt)}catch{}return nt(Ct,vt)})}return""}function createHeaders(Be,Le){const Ye=new Headers;if(!Be||!Le||typeof Le!="object")return Ye;for(const tt in Le){const nt=Le[tt];nt!==void 0&&Ye.append(tt,nt)}return Ye}function validateRangeRequestCapabilities({responseHeaders:Be,isHttp:Le,rangeChunkSize:Ye,disableRange:tt}){const nt={allowRangeRequests:!1,suggestedLength:void 0},ft=parseInt(Be.get("Content-Length"),10);return!Number.isInteger(ft)||(nt.suggestedLength=ft,ft<=2*Ye)||tt||!Le||Be.get("Accept-Ranges")!=="bytes"||(Be.get("Content-Encoding")||"identity")!=="identity"||(nt.allowRangeRequests=!0),nt}function extractFilenameFromHeader(Be){const Le=Be.get("Content-Disposition");if(Le){let Ye=getFilenameFromContentDispositionHeader(Le);if(Ye.includes("%"))try{Ye=decodeURIComponent(Ye)}catch{}if(isPdfFile(Ye))return Ye}return null}function createResponseStatusError(Be,Le){return Be===404||Be===0&&Le.startsWith("file:")?new MissingPDFException('Missing PDF "'+Le+'".'):new UnexpectedResponseException(`Unexpected server response (${Be}) while retrieving PDF "${Le}".`,Be)}function validateResponseStatus(Be){return Be===200||Be===206}function createFetchOptions(Be,Le,Ye){return{method:"GET",headers:Be,signal:Ye.signal,mode:"cors",credentials:Le?"include":"same-origin",redirect:"follow"}}function getArrayBuffer(Be){return Be instanceof Uint8Array?Be.buffer:Be instanceof ArrayBuffer?Be:(warn$1(`getArrayBuffer - unexpected data format: ${Be}`),new Uint8Array(Be).buffer)}class PDFFetchStream{constructor(Le){this.source=Le,this.isHttp=/^https?:/i.test(Le.url),this.headers=createHeaders(this.isHttp,Le.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var Le;return((Le=this._fullRequestReader)==null?void 0:Le._loaded)??0}getFullReader(){return assert(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new PDFFetchStreamReader(this),this._fullRequestReader}getRangeReader(Le,Ye){if(Ye<=this._progressiveDataLength)return null;const tt=new PDFFetchStreamRangeReader(this,Le,Ye);return this._rangeRequestReaders.push(tt),tt}cancelAllRequests(Le){var Ye;(Ye=this._fullRequestReader)==null||Ye.cancel(Le);for(const tt of this._rangeRequestReaders.slice(0))tt.cancel(Le)}}class PDFFetchStreamReader{constructor(Le){this._stream=Le,this._reader=null,this._loaded=0,this._filename=null;const Ye=Le.source;this._withCredentials=Ye.withCredentials||!1,this._contentLength=Ye.length,this._headersCapability=Promise.withResolvers(),this._disableRange=Ye.disableRange||!1,this._rangeChunkSize=Ye.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!Ye.disableStream,this._isRangeSupported=!Ye.disableRange;const tt=new Headers(Le.headers),nt=Ye.url;fetch(nt,createFetchOptions(tt,this._withCredentials,this._abortController)).then(ft=>{if(!validateResponseStatus(ft.status))throw createResponseStatusError(ft.status,nt);this._reader=ft.body.getReader(),this._headersCapability.resolve();const ht=ft.headers,{allowRangeRequests:gt,suggestedLength:At}=validateRangeRequestCapabilities({responseHeaders:ht,isHttp:Le.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=gt,this._contentLength=At||this._contentLength,this._filename=extractFilenameFromHeader(ht),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var tt;await this._headersCapability.promise;const{value:Le,done:Ye}=await this._reader.read();return Ye?{value:Le,done:Ye}:(this._loaded+=Le.byteLength,(tt=this.onProgress)==null||tt.call(this,{loaded:this._loaded,total:this._contentLength}),{value:getArrayBuffer(Le),done:!1})}cancel(Le){var Ye;(Ye=this._reader)==null||Ye.cancel(Le),this._abortController.abort()}}class PDFFetchStreamRangeReader{constructor(Le,Ye,tt){this._stream=Le,this._reader=null,this._loaded=0;const nt=Le.source;this._withCredentials=nt.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!nt.disableStream,this._abortController=new AbortController;const ft=new Headers(Le.headers);ft.append("Range",`bytes=${Ye}-${tt-1}`);const ht=nt.url;fetch(ht,createFetchOptions(ft,this._withCredentials,this._abortController)).then(gt=>{if(!validateResponseStatus(gt.status))throw createResponseStatusError(gt.status,ht);this._readCapability.resolve(),this._reader=gt.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var tt;await this._readCapability.promise;const{value:Le,done:Ye}=await this._reader.read();return Ye?{value:Le,done:Ye}:(this._loaded+=Le.byteLength,(tt=this.onProgress)==null||tt.call(this,{loaded:this._loaded}),{value:getArrayBuffer(Le),done:!1})}cancel(Le){var Ye;(Ye=this._reader)==null||Ye.cancel(Le),this._abortController.abort()}}const OK_RESPONSE=200,PARTIAL_CONTENT_RESPONSE=206;function network_getArrayBuffer(Be){const Le=Be.response;return typeof Le!="string"?Le:stringToBytes(Le).buffer}class NetworkManager{constructor({url:Le,httpHeaders:Ye,withCredentials:tt}){this.url=Le,this.isHttp=/^https?:/i.test(Le),this.headers=createHeaders(this.isHttp,Ye),this.withCredentials=tt||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(Le,Ye,tt){const nt={begin:Le,end:Ye};for(const ft in tt)nt[ft]=tt[ft];return this.request(nt)}requestFull(Le){return this.request(Le)}request(Le){const Ye=new XMLHttpRequest,tt=this.currXhrId++,nt=this.pendingRequests[tt]={xhr:Ye};Ye.open("GET",this.url),Ye.withCredentials=this.withCredentials;for(const[ft,ht]of this.headers)Ye.setRequestHeader(ft,ht);return this.isHttp&&"begin"in Le&&"end"in Le?(Ye.setRequestHeader("Range",`bytes=${Le.begin}-${Le.end-1}`),nt.expectedStatus=PARTIAL_CONTENT_RESPONSE):nt.expectedStatus=OK_RESPONSE,Ye.responseType="arraybuffer",Le.onError&&(Ye.onerror=function(ft){Le.onError(Ye.status)}),Ye.onreadystatechange=this.onStateChange.bind(this,tt),Ye.onprogress=this.onProgress.bind(this,tt),nt.onHeadersReceived=Le.onHeadersReceived,nt.onDone=Le.onDone,nt.onError=Le.onError,nt.onProgress=Le.onProgress,Ye.send(null),tt}onProgress(Le,Ye){var nt;const tt=this.pendingRequests[Le];tt&&((nt=tt.onProgress)==null||nt.call(tt,Ye))}onStateChange(Le,Ye){var At,xt,Et;const tt=this.pendingRequests[Le];if(!tt)return;const nt=tt.xhr;if(nt.readyState>=2&&tt.onHeadersReceived&&(tt.onHeadersReceived(),delete tt.onHeadersReceived),nt.readyState!==4||!(Le in this.pendingRequests))return;if(delete this.pendingRequests[Le],nt.status===0&&this.isHttp){(At=tt.onError)==null||At.call(tt,nt.status);return}const ft=nt.status||OK_RESPONSE;if(!(ft===OK_RESPONSE&&tt.expectedStatus===PARTIAL_CONTENT_RESPONSE)&&ft!==tt.expectedStatus){(xt=tt.onError)==null||xt.call(tt,nt.status);return}const gt=network_getArrayBuffer(nt);if(ft===PARTIAL_CONTENT_RESPONSE){const yt=nt.getResponseHeader("Content-Range"),Ct=/bytes (\d+)-(\d+)\/(\d+)/.exec(yt);tt.onDone({begin:parseInt(Ct[1],10),chunk:gt})}else gt?tt.onDone({begin:0,chunk:gt}):(Et=tt.onError)==null||Et.call(tt,nt.status)}getRequestXhr(Le){return this.pendingRequests[Le].xhr}isPendingRequest(Le){return Le in this.pendingRequests}abortRequest(Le){const Ye=this.pendingRequests[Le].xhr;delete this.pendingRequests[Le],Ye.abort()}}class PDFNetworkStream{constructor(Le){this._source=Le,this._manager=new NetworkManager(Le),this._rangeChunkSize=Le.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(Le){const Ye=this._rangeRequestReaders.indexOf(Le);Ye>=0&&this._rangeRequestReaders.splice(Ye,1)}getFullReader(){return assert(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new PDFNetworkStreamFullRequestReader(this._manager,this._source),this._fullRequestReader}getRangeReader(Le,Ye){const tt=new PDFNetworkStreamRangeRequestReader(this._manager,Le,Ye);return tt.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(tt),tt}cancelAllRequests(Le){var Ye;(Ye=this._fullRequestReader)==null||Ye.cancel(Le);for(const tt of this._rangeRequestReaders.slice(0))tt.cancel(Le)}}class PDFNetworkStreamFullRequestReader{constructor(Le,Ye){this._manager=Le;const tt={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=Ye.url,this._fullRequestId=Le.requestFull(tt),this._headersCapability=Promise.withResolvers(),this._disableRange=Ye.disableRange||!1,this._contentLength=Ye.length,this._rangeChunkSize=Ye.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const Le=this._fullRequestId,Ye=this._manager.getRequestXhr(Le),tt=new Headers(Ye.getAllResponseHeaders().trim().split(/[\r\n]+/).map(ht=>{const[gt,...At]=ht.split(": ");return[gt,At.join(": ")]})),{allowRangeRequests:nt,suggestedLength:ft}=validateRangeRequestCapabilities({responseHeaders:tt,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});nt&&(this._isRangeSupported=!0),this._contentLength=ft||this._contentLength,this._filename=extractFilenameFromHeader(tt),this._isRangeSupported&&this._manager.abortRequest(Le),this._headersCapability.resolve()}_onDone(Le){if(Le&&(this._requests.length>0?this._requests.shift().resolve({value:Le.chunk,done:!1}):this._cachedChunks.push(Le.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(Le){this._storedError=createResponseStatusError(Le,this._url),this._headersCapability.reject(this._storedError);for(const Ye of this._requests)Ye.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(Le){var Ye;(Ye=this.onProgress)==null||Ye.call(this,{loaded:Le.loaded,total:Le.lengthComputable?Le.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const Le=Promise.withResolvers();return this._requests.push(Le),Le.promise}cancel(Le){this._done=!0,this._headersCapability.reject(Le);for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class PDFNetworkStreamRangeRequestReader{constructor(Le,Ye,tt){this._manager=Le;const nt={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=Le.url,this._requestId=Le.requestRange(Ye,tt,nt),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var Le;(Le=this.onClosed)==null||Le.call(this,this)}_onDone(Le){const Ye=Le.chunk;this._requests.length>0?this._requests.shift().resolve({value:Ye,done:!1}):this._queuedChunk=Ye,this._done=!0;for(const tt of this._requests)tt.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(Le){this._storedError=createResponseStatusError(Le,this._url);for(const Ye of this._requests)Ye.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(Le){var Ye;this.isStreamingSupported||(Ye=this.onProgress)==null||Ye.call(this,{loaded:Le.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const Ye=this._queuedChunk;return this._queuedChunk=null,{value:Ye,done:!1}}if(this._done)return{value:void 0,done:!0};const Le=Promise.withResolvers();return this._requests.push(Le),Le.promise}cancel(Le){this._done=!0;for(const Ye of this._requests)Ye.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const urlRegex=/^[a-z][a-z0-9\-+.]+:/i;function parseUrlOrPath(Be){if(urlRegex.test(Be))return new URL(Be);const Le=NodePackages.get("url");return new URL(Le.pathToFileURL(Be))}function createRequest(Be,Le,Ye){return Be.protocol==="http:"?NodePackages.get("http").request(Be,{headers:Le},Ye):NodePackages.get("https").request(Be,{headers:Le},Ye)}class PDFNodeStream{constructor(Le){this.source=Le,this.url=parseUrlOrPath(Le.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.headers=createHeaders(this.isHttp,Le.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var Le;return((Le=this._fullRequestReader)==null?void 0:Le._loaded)??0}getFullReader(){return assert(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new PDFNodeStreamFsFullReader(this):new PDFNodeStreamFullReader(this),this._fullRequestReader}getRangeReader(Le,Ye){if(Ye<=this._progressiveDataLength)return null;const tt=this.isFsUrl?new PDFNodeStreamFsRangeReader(this,Le,Ye):new PDFNodeStreamRangeReader(this,Le,Ye);return this._rangeRequestReaders.push(tt),tt}cancelAllRequests(Le){var Ye;(Ye=this._fullRequestReader)==null||Ye.cancel(Le);for(const tt of this._rangeRequestReaders.slice(0))tt.cancel(Le)}}class BaseFullReader{constructor(Le){this._url=Le.url,this._done=!1,this._storedError=null,this.onProgress=null;const Ye=Le.source;this._contentLength=Ye.length,this._loaded=0,this._filename=null,this._disableRange=Ye.disableRange||!1,this._rangeChunkSize=Ye.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!Ye.disableStream,this._isRangeSupported=!Ye.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var tt;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const Le=this._readableStream.read();return Le===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=Le.length,(tt=this.onProgress)==null||tt.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(Le).buffer,done:!1})}cancel(Le){if(!this._readableStream){this._error(Le);return}this._readableStream.destroy(Le)}_error(Le){this._storedError=Le,this._readCapability.resolve()}_setReadableStream(Le){this._readableStream=Le,Le.on("readable",()=>{this._readCapability.resolve()}),Le.on("end",()=>{Le.destroy(),this._done=!0,this._readCapability.resolve()}),Le.on("error",Ye=>{this._error(Ye)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class BaseRangeReader{constructor(Le){this._url=Le.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const Ye=Le.source;this._isStreamingSupported=!Ye.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var tt;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const Le=this._readableStream.read();return Le===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=Le.length,(tt=this.onProgress)==null||tt.call(this,{loaded:this._loaded}),{value:new Uint8Array(Le).buffer,done:!1})}cancel(Le){if(!this._readableStream){this._error(Le);return}this._readableStream.destroy(Le)}_error(Le){this._storedError=Le,this._readCapability.resolve()}_setReadableStream(Le){this._readableStream=Le,Le.on("readable",()=>{this._readCapability.resolve()}),Le.on("end",()=>{Le.destroy(),this._done=!0,this._readCapability.resolve()}),Le.on("error",Ye=>{this._error(Ye)}),this._storedError&&this._readableStream.destroy(this._storedError)}}class PDFNodeStreamFullReader extends BaseFullReader{constructor(Le){super(Le);const Ye=Object.fromEntries(Le.headers),tt=nt=>{if(nt.statusCode===404){const At=new MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=At,this._headersCapability.reject(At);return}this._headersCapability.resolve(),this._setReadableStream(nt);const ft=new Headers(this._readableStream.headers),{allowRangeRequests:ht,suggestedLength:gt}=validateRangeRequestCapabilities({responseHeaders:ft,isHttp:Le.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=ht,this._contentLength=gt||this._contentLength,this._filename=extractFilenameFromHeader(ft)};this._request=createRequest(this._url,Ye,tt),this._request.on("error",nt=>{this._storedError=nt,this._headersCapability.reject(nt)}),this._request.end()}}class PDFNodeStreamRangeReader extends BaseRangeReader{constructor(Le,Ye,tt){super(Le);const nt=Object.fromEntries(Le.headers);nt.Range=`bytes=${Ye}-${tt-1}`;const ft=ht=>{if(ht.statusCode===404){const gt=new MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=gt;return}this._setReadableStream(ht)};this._request=createRequest(this._url,nt,ft),this._request.on("error",ht=>{this._storedError=ht}),this._request.end()}}class PDFNodeStreamFsFullReader extends BaseFullReader{constructor(Le){super(Le);const Ye=NodePackages.get("fs");Ye.promises.lstat(this._url).then(tt=>{this._contentLength=tt.size,this._setReadableStream(Ye.createReadStream(this._url)),this._headersCapability.resolve()},tt=>{tt.code==="ENOENT"&&(tt=new MissingPDFException(`Missing PDF "${this._url}".`)),this._storedError=tt,this._headersCapability.reject(tt)})}}class PDFNodeStreamFsRangeReader extends BaseRangeReader{constructor(Le,Ye,tt){super(Le);const nt=NodePackages.get("fs");this._setReadableStream(nt.createReadStream(this._url,{start:Ye,end:tt-1}))}}const MAX_TEXT_DIVS_TO_RENDER=1e5,DEFAULT_FONT_SIZE=30,DEFAULT_FONT_ASCENT=.8;let TextLayer$1=(Xr=class{constructor({textContentSource:Le,container:Ye,viewport:tt}){k0(this,Us);k0(this,jo,Promise.withResolvers());k0(this,Wa,null);k0(this,Rc,!1);k0(this,Tc,!!((Pp=globalThis.FontInspector)!=null&&Pp.enabled));k0(this,N2,null);k0(this,Qs,null);k0(this,Bc,0);k0(this,Oc,0);k0(this,D2,null);k0(this,X1,null);k0(this,$1,0);k0(this,Fo,0);k0(this,K1,Object.create(null));k0(this,Nc,[]);k0(this,q1,null);k0(this,L2,[]);k0(this,Dc,new WeakMap);k0(this,Lc,null);var At;if(Le instanceof ReadableStream)C0(this,q1,Le);else if(typeof Le=="object")C0(this,q1,new ReadableStream({start(xt){xt.enqueue(Le),xt.close()}}));else throw new Error('No "textContentSource" parameter specified.');C0(this,Wa,C0(this,X1,Ye)),C0(this,Fo,tt.scale*(globalThis.devicePixelRatio||1)),C0(this,$1,tt.rotation),C0(this,Qs,{div:null,properties:null,ctx:null});const{pageWidth:nt,pageHeight:ft,pageX:ht,pageY:gt}=tt.rawDims;C0(this,Lc,[1,0,0,-1,-ht,gt+ft]),C0(this,Oc,nt),C0(this,Bc,ft),y0(At=Xr,ii,S4).call(At),setLayerDimensions(Ye,tt),Ht(this,jo).promise.finally(()=>{Ht(Xr,Y1).delete(this),C0(this,Qs,null),C0(this,K1,null)}).catch(()=>{})}static get fontFamilyMap(){const{isWindows:Le,isFirefox:Ye}=util_FeatureTest.platform;return shadow(this,"fontFamilyMap",new Map([["sans-serif",`${Le&&Ye?"Calibri, ":""}sans-serif`],["monospace",`${Le&&Ye?"Lucida Console, ":""}monospace`]]))}render(){const Le=()=>{Ht(this,D2).read().then(({value:Ye,done:tt})=>{if(tt){Ht(this,jo).resolve();return}Ht(this,N2)??C0(this,N2,Ye.lang),Object.assign(Ht(this,K1),Ye.styles),y0(this,Us,b4).call(this,Ye.items),Le()},Ht(this,jo).reject)};return C0(this,D2,Ht(this,q1).getReader()),Ht(Xr,Y1).add(this),Le(),Ht(this,jo).promise}update({viewport:Le,onBefore:Ye=null}){var ft;const tt=Le.scale*(globalThis.devicePixelRatio||1),nt=Le.rotation;if(nt!==Ht(this,$1)&&(Ye==null||Ye(),C0(this,$1,nt),setLayerDimensions(Ht(this,X1),{rotation:nt})),tt!==Ht(this,Fo)){Ye==null||Ye(),C0(this,Fo,tt);const ht={div:null,properties:null,ctx:y0(ft=Xr,ii,i3).call(ft,Ht(this,N2))};for(const gt of Ht(this,L2))ht.properties=Ht(this,Dc).get(gt),ht.div=gt,y0(this,Us,np).call(this,ht)}}cancel(){var Ye;const Le=new AbortException("TextLayer task cancelled.");(Ye=Ht(this,D2))==null||Ye.cancel(Le).catch(()=>{}),C0(this,D2,null),Ht(this,jo).reject(Le)}get textDivs(){return Ht(this,L2)}get textContentItemsStr(){return Ht(this,Nc)}static cleanup(){if(!(Ht(this,Y1).size>0)){Ht(this,P2).clear();for(const{canvas:Le}of Ht(this,_2).values())Le.remove();Ht(this,_2).clear()}}},jo=new WeakMap,Wa=new WeakMap,Rc=new WeakMap,Tc=new WeakMap,N2=new WeakMap,Qs=new WeakMap,Bc=new WeakMap,Oc=new WeakMap,D2=new WeakMap,X1=new WeakMap,$1=new WeakMap,Fo=new WeakMap,K1=new WeakMap,Nc=new WeakMap,q1=new WeakMap,L2=new WeakMap,Dc=new WeakMap,Lc=new WeakMap,P2=new WeakMap,_2=new WeakMap,Pc=new WeakMap,Qo=new WeakMap,Y1=new WeakMap,Us=new WeakSet,b4=function(Le){var nt,ft;if(Ht(this,Rc))return;(ft=Ht(this,Qs)).ctx??(ft.ctx=y0(nt=Xr,ii,i3).call(nt,Ht(this,N2)));const Ye=Ht(this,L2),tt=Ht(this,Nc);for(const ht of Le){if(Ye.length>MAX_TEXT_DIVS_TO_RENDER){warn$1("Ignoring additional textDivs for performance reasons."),C0(this,Rc,!0);return}if(ht.str===void 0){if(ht.type==="beginMarkedContentProps"||ht.type==="beginMarkedContent"){const gt=Ht(this,Wa);C0(this,Wa,document.createElement("span")),Ht(this,Wa).classList.add("markedContent"),ht.id!==null&&Ht(this,Wa).setAttribute("id",`${ht.id}`),gt.append(Ht(this,Wa))}else ht.type==="endMarkedContent"&&C0(this,Wa,Ht(this,Wa).parentNode);continue}tt.push(ht.str),y0(this,Us,I4).call(this,ht)}},I4=function(Le){var bt;const Ye=document.createElement("span"),tt={angle:0,canvasWidth:0,hasText:Le.str!=="",hasEOL:Le.hasEOL,fontSize:0};Ht(this,L2).push(Ye);const nt=Util.transform(Ht(this,Lc),Le.transform);let ft=Math.atan2(nt[1],nt[0]);const ht=Ht(this,K1)[Le.fontName];ht.vertical&&(ft+=Math.PI/2);let gt=Ht(this,Tc)&&ht.fontSubstitution||ht.fontFamily;gt=Xr.fontFamilyMap.get(gt)||gt;const At=Math.hypot(nt[2],nt[3]),xt=At*y0(bt=Xr,ii,w4).call(bt,gt,Ht(this,N2));let Et,yt;ft===0?(Et=nt[4],yt=nt[5]-xt):(Et=nt[4]+xt*Math.sin(ft),yt=nt[5]-xt*Math.cos(ft));const Ct="calc(var(--scale-factor)*",kt=Ye.style;Ht(this,Wa)===Ht(this,X1)?(kt.left=`${(100*Et/Ht(this,Oc)).toFixed(2)}%`,kt.top=`${(100*yt/Ht(this,Bc)).toFixed(2)}%`):(kt.left=`${Ct}${Et.toFixed(2)}px)`,kt.top=`${Ct}${yt.toFixed(2)}px)`),kt.fontSize=`${Ct}${(Ht(Xr,Qo)*At).toFixed(2)}px)`,kt.fontFamily=gt,tt.fontSize=At,Ye.setAttribute("role","presentation"),Ye.textContent=Le.str,Ye.dir=Le.dir,Ht(this,Tc)&&(Ye.dataset.fontName=ht.fontSubstitutionLoadedName||Le.fontName),ft!==0&&(tt.angle=ft*(180/Math.PI));let vt=!1;if(Le.str.length>1)vt=!0;else if(Le.str!==" "&&Le.transform[0]!==Le.transform[3]){const It=Math.abs(Le.transform[0]),wt=Math.abs(Le.transform[3]);It!==wt&&Math.max(It,wt)/Math.min(It,wt)>1.5&&(vt=!0)}if(vt&&(tt.canvasWidth=ht.vertical?Le.height:Le.width),Ht(this,Dc).set(Ye,tt),Ht(this,Qs).div=Ye,Ht(this,Qs).properties=tt,y0(this,Us,np).call(this,Ht(this,Qs)),tt.hasText&&Ht(this,Wa).append(Ye),tt.hasEOL){const It=document.createElement("br");It.setAttribute("role","presentation"),Ht(this,Wa).append(It)}},np=function(Le){var gt;const{div:Ye,properties:tt,ctx:nt}=Le,{style:ft}=Ye;let ht="";if(Ht(Xr,Qo)>1&&(ht=`scale(${1/Ht(Xr,Qo)})`),tt.canvasWidth!==0&&tt.hasText){const{fontFamily:At}=ft,{canvasWidth:xt,fontSize:Et}=tt;y0(gt=Xr,ii,rp).call(gt,nt,Et*Ht(this,Fo),At);const{width:yt}=nt.measureText(Ye.textContent);yt>0&&(ht=`scaleX(${xt*Ht(this,Fo)/yt}) ${ht}`)}tt.angle!==0&&(ht=`rotate(${tt.angle}deg) ${ht}`),ht.length>0&&(ft.transform=ht)},ii=new WeakSet,i3=function(Le=null){let Ye=Ht(this,_2).get(Le||(Le=""));if(!Ye){const tt=document.createElement("canvas");tt.className="hiddenCanvasElement",tt.lang=Le,document.body.append(tt),Ye=tt.getContext("2d",{alpha:!1,willReadFrequently:!0}),Ht(this,_2).set(Le,Ye),Ht(this,Pc).set(Ye,{size:0,family:""})}return Ye},rp=function(Le,Ye,tt){const nt=Ht(this,Pc).get(Le);Ye===nt.size&&tt===nt.family||(Le.font=`${Ye}px ${tt}`,nt.size=Ye,nt.family=tt)},S4=function(){if(Ht(this,Qo)!==null)return;const Le=document.createElement("div");Le.style.opacity=0,Le.style.lineHeight=1,Le.style.fontSize="1px",Le.style.position="absolute",Le.textContent="X",document.body.append(Le),C0(this,Qo,Le.getBoundingClientRect().height),Le.remove()},w4=function(Le,Ye){const tt=Ht(this,P2).get(Le);if(tt)return tt;const nt=y0(this,ii,i3).call(this,Ye);nt.canvas.width=nt.canvas.height=DEFAULT_FONT_SIZE,y0(this,ii,rp).call(this,nt,DEFAULT_FONT_SIZE,Le);const ft=nt.measureText("");let ht=ft.fontBoundingBoxAscent,gt=Math.abs(ft.fontBoundingBoxDescent);if(ht){const Et=ht/(ht+gt);return Ht(this,P2).set(Le,Et),nt.canvas.width=nt.canvas.height=0,Et}nt.strokeStyle="red",nt.clearRect(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE),nt.strokeText("g",0,0);let At=nt.getImageData(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE).data;gt=0;for(let Et=At.length-1-3;Et>=0;Et-=4)if(At[Et]>0){gt=Math.ceil(Et/4/DEFAULT_FONT_SIZE);break}nt.clearRect(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE),nt.strokeText("A",0,DEFAULT_FONT_SIZE),At=nt.getImageData(0,0,DEFAULT_FONT_SIZE,DEFAULT_FONT_SIZE).data,ht=0;for(let Et=0,yt=At.length;Et<yt;Et+=4)if(At[Et]>0){ht=DEFAULT_FONT_SIZE-Math.floor(Et/4/DEFAULT_FONT_SIZE);break}nt.canvas.width=nt.canvas.height=0;const xt=ht?ht/(ht+gt):DEFAULT_FONT_ASCENT;return Ht(this,P2).set(Le,xt),xt},k0(Xr,ii),k0(Xr,P2,new Map),k0(Xr,_2,new Map),k0(Xr,Pc,new WeakMap),k0(Xr,Qo,null),k0(Xr,Y1,new Set),Xr);class XfaText{static textContent(Le){const Ye=[],tt={items:Ye,styles:Object.create(null)};function nt(ft){var At;if(!ft)return;let ht=null;const gt=ft.name;if(gt==="#text")ht=ft.value;else if(XfaText.shouldBuildText(gt))(At=ft==null?void 0:ft.attributes)!=null&&At.textContent?ht=ft.attributes.textContent:ft.value&&(ht=ft.value);else return;if(ht!==null&&Ye.push({str:ht}),!!ft.children)for(const xt of ft.children)nt(xt)}return nt(Le),tt}static shouldBuildText(Le){return!(Le==="textarea"||Le==="input"||Le==="option"||Le==="select")}}const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=isNodeJS?NodeCanvasFactory:DOMCanvasFactory,DefaultCMapReaderFactory=isNodeJS?NodeCMapReaderFactory:DOMCMapReaderFactory,DefaultFilterFactory=isNodeJS?NodeFilterFactory:DOMFilterFactory,DefaultStandardFontDataFactory=isNodeJS?NodeStandardFontDataFactory:DOMStandardFontDataFactory;function getDocument(Be={}){typeof Be=="string"||Be instanceof URL?Be={url:Be}:(Be instanceof ArrayBuffer||ArrayBuffer.isView(Be))&&(Be={data:Be});const Le=new PDFDocumentLoadingTask,{docId:Ye}=Le,tt=Be.url?getUrlProp(Be.url):null,nt=Be.data?getDataProp(Be.data):null,ft=Be.httpHeaders||null,ht=Be.withCredentials===!0,gt=Be.password??null,At=Be.range instanceof PDFDataRangeTransport$1?Be.range:null,xt=Number.isInteger(Be.rangeChunkSize)&&Be.rangeChunkSize>0?Be.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let Et=Be.worker instanceof PDFWorker?Be.worker:null;const yt=Be.verbosity,Ct=typeof Be.docBaseUrl=="string"&&!isDataScheme(Be.docBaseUrl)?Be.docBaseUrl:null,kt=typeof Be.cMapUrl=="string"?Be.cMapUrl:null,vt=Be.cMapPacked!==!1,bt=Be.CMapReaderFactory||DefaultCMapReaderFactory,It=typeof Be.standardFontDataUrl=="string"?Be.standardFontDataUrl:null,wt=Be.StandardFontDataFactory||DefaultStandardFontDataFactory,Rt=Be.stopAtErrors!==!0,Tt=Number.isInteger(Be.maxImageSize)&&Be.maxImageSize>-1?Be.maxImageSize:-1,Bt=Be.isEvalSupported!==!1,Dt=typeof Be.isOffscreenCanvasSupported=="boolean"?Be.isOffscreenCanvasSupported:!isNodeJS,Lt=typeof Be.isChrome=="boolean"?Be.isChrome:!util_FeatureTest.platform.isFirefox&&typeof window<"u"&&!!(window!=null&&window.chrome),Nt=Number.isInteger(Be.canvasMaxAreaInBytes)?Be.canvasMaxAreaInBytes:-1,Pt=typeof Be.disableFontFace=="boolean"?Be.disableFontFace:isNodeJS,Wt=Be.fontExtraProperties===!0,$t=Be.enableXfa===!0,Kt=Be.ownerDocument||globalThis.document,Vt=Be.disableRange===!0,Ut=Be.disableStream===!0,_t=Be.disableAutoFetch===!0,Xt=Be.pdfBug===!0,Qt=Be.CanvasFactory||DefaultCanvasFactory,jt=Be.FilterFactory||DefaultFilterFactory,zt=Be.enableHWA===!0,qt=At?At.length:Be.length??NaN,Gt=typeof Be.useSystemFonts=="boolean"?Be.useSystemFonts:!isNodeJS&&!Pt,e0=typeof Be.useWorkerFetch=="boolean"?Be.useWorkerFetch:bt===DOMCMapReaderFactory&&wt===DOMStandardFontDataFactory&&kt&&It&&isValidFetchUrl(kt,document.baseURI)&&isValidFetchUrl(It,document.baseURI);Be.canvasFactory&&deprecated("`canvasFactory`-instance option, please use `CanvasFactory` instead."),Be.filterFactory&&deprecated("`filterFactory`-instance option, please use `FilterFactory` instead.");const s0=null;setVerbosityLevel(yt);const t0={canvasFactory:new Qt({ownerDocument:Kt,enableHWA:zt}),filterFactory:new jt({docId:Ye,ownerDocument:Kt}),cMapReaderFactory:e0?null:new bt({baseUrl:kt,isCompressed:vt}),standardFontDataFactory:e0?null:new wt({baseUrl:It})};if(!Et){const n0={verbosity:yt,port:GlobalWorkerOptions.workerPort};Et=n0.port?PDFWorker.fromPort(n0):new PDFWorker(n0),Le._worker=Et}const l0={docId:Ye,apiVersion:"4.8.69",data:nt,password:gt,disableAutoFetch:_t,rangeChunkSize:xt,length:qt,docBaseUrl:Ct,enableXfa:$t,evaluatorOptions:{maxImageSize:Tt,disableFontFace:Pt,ignoreErrors:Rt,isEvalSupported:Bt,isOffscreenCanvasSupported:Dt,isChrome:Lt,canvasMaxAreaInBytes:Nt,fontExtraProperties:Wt,useSystemFonts:Gt,cMapUrl:e0?kt:null,standardFontDataUrl:e0?It:null}},d0={disableFontFace:Pt,fontExtraProperties:Wt,ownerDocument:Kt,pdfBug:Xt,styleElement:s0,loadingParams:{disableAutoFetch:_t,enableXfa:$t}};return Et.promise.then(function(){if(Le.destroyed)throw new Error("Loading aborted");if(Et.destroyed)throw new Error("Worker was destroyed");const n0=Et.messageHandler.sendWithPromise("GetDocRequest",l0,nt?[nt.buffer]:null);let g0;if(At)g0=new PDFDataTransportStream(At,{disableRange:Vt,disableStream:Ut});else if(!nt){if(!tt)throw new Error("getDocument - no `url` parameter provided.");let A0;isNodeJS?A0=typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype&&isValidFetchUrl(tt)?PDFFetchStream:PDFNodeStream:A0=isValidFetchUrl(tt)?PDFFetchStream:PDFNetworkStream,g0=new A0({url:tt,length:qt,httpHeaders:ft,withCredentials:ht,rangeChunkSize:xt,disableRange:Vt,disableStream:Ut})}return n0.then(A0=>{if(Le.destroyed)throw new Error("Loading aborted");if(Et.destroyed)throw new Error("Worker was destroyed");const o0=new MessageHandler(Ye,A0,Et.port),r0=new WorkerTransport(o0,Le,g0,d0,t0);Le._transport=r0,o0.send("Ready",null)})}).catch(Le._capability.reject),Le}function getUrlProp(Be){if(Be instanceof URL)return Be.href;try{return new URL(Be,window.location).href}catch{if(isNodeJS&&typeof Be=="string")return Be}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(Be){if(isNodeJS&&typeof Buffer<"u"&&Be instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(Be instanceof Uint8Array&&Be.byteLength===Be.buffer.byteLength)return Be;if(typeof Be=="string")return stringToBytes(Be);if(Be instanceof ArrayBuffer||ArrayBuffer.isView(Be)||typeof Be=="object"&&!isNaN(Be==null?void 0:Be.length))return new Uint8Array(Be);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function isRefProxy(Be){return typeof Be=="object"&&Number.isInteger(Be==null?void 0:Be.num)&&Be.num>=0&&Number.isInteger(Be==null?void 0:Be.gen)&&Be.gen>=0}const od=class od{constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${Va(od,sd)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var Le,Ye,tt;this.destroyed=!0;try{(Le=this._worker)!=null&&Le.port&&(this._worker._pendingDestroy=!0),await((Ye=this._transport)==null?void 0:Ye.destroy())}catch(nt){throw(tt=this._worker)!=null&&tt.port&&delete this._worker._pendingDestroy,nt}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};sd=new WeakMap,k0(od,sd,0);let PDFDocumentLoadingTask=od,PDFDataRangeTransport$1=class{constructor(Le,Ye,tt=!1,nt=null){this.length=Le,this.initialData=Ye,this.progressiveDone=tt,this.contentDispositionFilename=nt,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(Le){this._rangeListeners.push(Le)}addProgressListener(Le){this._progressListeners.push(Le)}addProgressiveReadListener(Le){this._progressiveReadListeners.push(Le)}addProgressiveDoneListener(Le){this._progressiveDoneListeners.push(Le)}onDataRange(Le,Ye){for(const tt of this._rangeListeners)tt(Le,Ye)}onDataProgress(Le,Ye){this._readyCapability.promise.then(()=>{for(const tt of this._progressListeners)tt(Le,Ye)})}onDataProgressiveRead(Le){this._readyCapability.promise.then(()=>{for(const Ye of this._progressiveReadListeners)Ye(Le)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const Le of this._progressiveDoneListeners)Le()})}transportReady(){this._readyCapability.resolve()}requestDataRange(Le,Ye){unreachable$1("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}};class PDFDocumentProxy{constructor(Le,Ye){this._pdfInfo=Le,this._transport=Ye}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(Le){return this._transport.getPage(Le)}getPageIndex(Le){return this._transport.getPageIndex(Le)}getDestinations(){return this._transport.getDestinations()}getDestination(Le){return this._transport.getDestination(Le)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:Le="display"}={}){const{renderingIntent:Ye}=this._transport.getRenderingIntent(Le);return this._transport.getOptionalContentConfig(Ye)}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(Le=!1){return this._transport.startCleanup(Le||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(Le){return this._transport.cachedPageNumber(Le)}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class PDFPageProxy{constructor(Le,Ye,tt,nt=!1){k0(this,ki);k0(this,Uo,null);k0(this,Vs,!1);this._pageIndex=Le,this._pageInfo=Ye,this._transport=tt,this._stats=nt?new StatTimer:null,this._pdfBug=nt,this.commonObjs=tt.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:Le,rotation:Ye=this.rotate,offsetX:tt=0,offsetY:nt=0,dontFlip:ft=!1}={}){return new PageViewport({viewBox:this.view,scale:Le,rotation:Ye,offsetX:tt,offsetY:nt,dontFlip:ft})}getAnnotations({intent:Le="display"}={}){const{renderingIntent:Ye}=this._transport.getRenderingIntent(Le);return this._transport.getAnnotations(this._pageIndex,Ye)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var Le;return((Le=this._transport._htmlForXfa)==null?void 0:Le.children[this._pageIndex])||null}render({canvasContext:Le,viewport:Ye,intent:tt="display",annotationMode:nt=AnnotationMode.ENABLE,transform:ft=null,background:ht=null,optionalContentConfigPromise:gt=null,annotationCanvasMap:At=null,pageColors:xt=null,printAnnotationStorage:Et=null,isEditing:yt=!1}){var Bt,Dt;(Bt=this._stats)==null||Bt.time("Overall");const Ct=this._transport.getRenderingIntent(tt,nt,Et,yt),{renderingIntent:kt,cacheKey:vt}=Ct;C0(this,Vs,!1),y0(this,ki,s3).call(this),gt||(gt=this._transport.getOptionalContentConfig(kt));let bt=this._intentStates.get(vt);bt||(bt=Object.create(null),this._intentStates.set(vt,bt)),bt.streamReaderCancelTimeout&&(clearTimeout(bt.streamReaderCancelTimeout),bt.streamReaderCancelTimeout=null);const It=!!(kt&RenderingIntentFlag.PRINT);bt.displayReadyCapability||(bt.displayReadyCapability=Promise.withResolvers(),bt.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(Dt=this._stats)==null||Dt.time("Page Request"),this._pumpOperatorList(Ct));const wt=Lt=>{var Nt;bt.renderTasks.delete(Rt),(this._maybeCleanupAfterRender||It)&&C0(this,Vs,!0),y0(this,ki,ql).call(this,!It),Lt?(Rt.capability.reject(Lt),this._abortOperatorList({intentState:bt,reason:Lt instanceof Error?Lt:new Error(Lt)})):Rt.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),(Nt=globalThis.Stats)!=null&&Nt.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},Rt=new InternalRenderTask({callback:wt,params:{canvasContext:Le,viewport:Ye,transform:ft,background:ht},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:At,operatorList:bt.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!It,pdfBug:this._pdfBug,pageColors:xt});(bt.renderTasks||(bt.renderTasks=new Set)).add(Rt);const Tt=Rt.task;return Promise.all([bt.displayReadyCapability.promise,gt]).then(([Lt,Nt])=>{var Pt;if(this.destroyed){wt();return}if((Pt=this._stats)==null||Pt.time("Rendering"),!(Nt.renderingIntent&kt))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");Rt.initializeGraphics({transparency:Lt,optionalContentConfig:Nt}),Rt.operatorListChanged()}).catch(wt),Tt}getOperatorList({intent:Le="display",annotationMode:Ye=AnnotationMode.ENABLE,printAnnotationStorage:tt=null,isEditing:nt=!1}={}){var xt;function ft(){gt.operatorList.lastChunk&&(gt.opListReadCapability.resolve(gt.operatorList),gt.renderTasks.delete(At))}const ht=this._transport.getRenderingIntent(Le,Ye,tt,nt,!0);let gt=this._intentStates.get(ht.cacheKey);gt||(gt=Object.create(null),this._intentStates.set(ht.cacheKey,gt));let At;return gt.opListReadCapability||(At=Object.create(null),At.operatorListChanged=ft,gt.opListReadCapability=Promise.withResolvers(),(gt.renderTasks||(gt.renderTasks=new Set)).add(At),gt.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(xt=this._stats)==null||xt.time("Page Request"),this._pumpOperatorList(ht)),gt.opListReadCapability.promise}streamTextContent({includeMarkedContent:Le=!1,disableNormalization:Ye=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:Le===!0,disableNormalization:Ye===!0},{highWaterMark:100,size(nt){return nt.items.length}})}getTextContent(Le={}){if(this._transport._htmlForXfa)return this.getXfa().then(tt=>XfaText.textContent(tt));const Ye=this.streamTextContent(Le);return new Promise(function(tt,nt){function ft(){ht.read().then(function({value:At,done:xt}){if(xt){tt(gt);return}gt.lang??(gt.lang=At.lang),Object.assign(gt.styles,At.styles),gt.items.push(...At.items),ft()},nt)}const ht=Ye.getReader(),gt={items:[],styles:Object.create(null),lang:null};ft()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const Le=[];for(const Ye of this._intentStates.values())if(this._abortOperatorList({intentState:Ye,reason:new Error("Page was destroyed."),force:!0}),!Ye.opListReadCapability)for(const tt of Ye.renderTasks)Le.push(tt.completed),tt.cancel();return this.objs.clear(),C0(this,Vs,!1),y0(this,ki,s3).call(this),Promise.all(Le)}cleanup(Le=!1){C0(this,Vs,!0);const Ye=y0(this,ki,ql).call(this,!1);return Le&&Ye&&this._stats&&(this._stats=new StatTimer),Ye}_startRenderPage(Le,Ye){var nt,ft;const tt=this._intentStates.get(Ye);tt&&((nt=this._stats)==null||nt.timeEnd("Page Request"),(ft=tt.displayReadyCapability)==null||ft.resolve(Le))}_renderPageChunk(Le,Ye){for(let tt=0,nt=Le.length;tt<nt;tt++)Ye.operatorList.fnArray.push(Le.fnArray[tt]),Ye.operatorList.argsArray.push(Le.argsArray[tt]);Ye.operatorList.lastChunk=Le.lastChunk,Ye.operatorList.separateAnnots=Le.separateAnnots;for(const tt of Ye.renderTasks)tt.operatorListChanged();Le.lastChunk&&y0(this,ki,ql).call(this,!0)}_pumpOperatorList({renderingIntent:Le,cacheKey:Ye,annotationStorageSerializable:tt,modifiedIds:nt}){const{map:ft,transfer:ht}=tt,At=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:Le,cacheKey:Ye,annotationStorage:ft,modifiedIds:nt},ht).getReader(),xt=this._intentStates.get(Ye);xt.streamReader=At;const Et=()=>{At.read().then(({value:yt,done:Ct})=>{if(Ct){xt.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(yt,xt),Et())},yt=>{if(xt.streamReader=null,!this._transport.destroyed){if(xt.operatorList){xt.operatorList.lastChunk=!0;for(const Ct of xt.renderTasks)Ct.operatorListChanged();y0(this,ki,ql).call(this,!0)}if(xt.displayReadyCapability)xt.displayReadyCapability.reject(yt);else if(xt.opListReadCapability)xt.opListReadCapability.reject(yt);else throw yt}})};Et()}_abortOperatorList({intentState:Le,reason:Ye,force:tt=!1}){if(Le.streamReader){if(Le.streamReaderCancelTimeout&&(clearTimeout(Le.streamReaderCancelTimeout),Le.streamReaderCancelTimeout=null),!tt){if(Le.renderTasks.size>0)return;if(Ye instanceof RenderingCancelledException){let nt=RENDERING_CANCELLED_TIMEOUT;Ye.extraDelay>0&&Ye.extraDelay<1e3&&(nt+=Ye.extraDelay),Le.streamReaderCancelTimeout=setTimeout(()=>{Le.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:Le,reason:Ye,force:!0})},nt);return}}if(Le.streamReader.cancel(new AbortException(Ye.message)).catch(()=>{}),Le.streamReader=null,!this._transport.destroyed){for(const[nt,ft]of this._intentStates)if(ft===Le){this._intentStates.delete(nt);break}this.cleanup()}}}get stats(){return this._stats}}Uo=new WeakMap,Vs=new WeakMap,ki=new WeakSet,ql=function(Le=!1){if(y0(this,ki,s3).call(this),!Ht(this,Vs)||this.destroyed)return!1;if(Le)return C0(this,Uo,setTimeout(()=>{C0(this,Uo,null),y0(this,ki,ql).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:Ye,operatorList:tt}of this._intentStates.values())if(Ye.size>0||!tt.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),C0(this,Vs,!1),!0},s3=function(){Ht(this,Uo)&&(clearTimeout(Ht(this,Uo)),C0(this,Uo,null))};class LoopbackPort{constructor(){k0(this,Hs,new Map);k0(this,ld,Promise.resolve())}postMessage(Le,Ye){const tt={data:structuredClone(Le,Ye?{transfer:Ye}:null)};Ht(this,ld).then(()=>{for(const[nt]of Ht(this,Hs))nt.call(this,tt)})}addEventListener(Le,Ye,tt=null){let nt=null;if((tt==null?void 0:tt.signal)instanceof AbortSignal){const{signal:ft}=tt;if(ft.aborted){warn$1("LoopbackPort - cannot use an `aborted` signal.");return}const ht=()=>this.removeEventListener(Le,Ye);nt=()=>ft.removeEventListener("abort",ht),ft.addEventListener("abort",ht)}Ht(this,Hs).set(Ye,nt)}removeEventListener(Le,Ye){const tt=Ht(this,Hs).get(Ye);tt==null||tt(),Ht(this,Hs).delete(Ye)}terminate(){for(const[,Le]of Ht(this,Hs))Le==null||Le();Ht(this,Hs).clear()}}Hs=new WeakMap,ld=new WeakMap;const jr=class jr{constructor({name:Le=null,port:Ye=null,verbosity:tt=getVerbosityLevel()}={}){k0(this,Z1);var nt;if(this.name=Le,this.destroyed=!1,this.verbosity=tt,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,Ye){if((nt=Ht(jr,j2))!=null&&nt.has(Ye))throw new Error("Cannot use more than one PDFWorker per port.");(Ht(jr,j2)||C0(jr,j2,new WeakMap)).set(Ye,this),this._initializeFromPort(Ye);return}this._initialize()}get promise(){return isNodeJS?Promise.all([NodePackages.promise,this._readyCapability.promise]):this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(Le){this._port=Le,this._messageHandler=new MessageHandler("main","worker",Le),this._messageHandler.on("ready",function(){}),y0(this,Z1,o3).call(this)}_initialize(){if(Ht(jr,M2)||Ht(jr,J1,l3)){this._setupFakeWorker();return}let{workerSrc:Le}=jr;try{jr._isSameOrigin(window.location.href,Le)||(Le=jr._createCDNWrapper(new URL(Le,window.location).href));const Ye=new Worker(Le,{type:"module"}),tt=new MessageHandler("main","worker",Ye),nt=()=>{ft.abort(),tt.destroy(),Ye.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},ft=new AbortController;Ye.addEventListener("error",()=>{this._webWorker||nt()},{signal:ft.signal}),tt.on("test",gt=>{if(ft.abort(),this.destroyed||!gt){nt();return}this._messageHandler=tt,this._port=Ye,this._webWorker=Ye,y0(this,Z1,o3).call(this)}),tt.on("ready",gt=>{if(ft.abort(),this.destroyed){nt();return}try{ht()}catch{this._setupFakeWorker()}});const ht=()=>{const gt=new Uint8Array;tt.send("test",gt,[gt.buffer])};ht();return}catch{info("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){Ht(jr,M2)||(warn$1("Setting up fake worker."),C0(jr,M2,!0)),jr._setupFakeWorkerGlobal.then(Le=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const Ye=new LoopbackPort;this._port=Ye;const tt=`fake${Va(jr,cd)._++}`,nt=new MessageHandler(tt+"_worker",tt,Ye);Le.setup(nt,Ye),this._messageHandler=new MessageHandler(tt,tt+"_worker",Ye),y0(this,Z1,o3).call(this)}).catch(Le=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${Le.message}".`))})}destroy(){var Le;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(Le=Ht(jr,j2))==null||Le.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(Le){var tt;if(!(Le!=null&&Le.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const Ye=(tt=Ht(this,j2))==null?void 0:tt.get(Le.port);if(Ye){if(Ye._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return Ye}return new jr(Le)}static get workerSrc(){if(GlobalWorkerOptions.workerSrc)return GlobalWorkerOptions.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return shadow(this,"_setupFakeWorkerGlobal",(async()=>Ht(this,J1,l3)?Ht(this,J1,l3):(await import(this.workerSrc)).WorkerMessageHandler)())}};cd=new WeakMap,M2=new WeakMap,j2=new WeakMap,Z1=new WeakSet,o3=function(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})},J1=new WeakSet,l3=function(){var Le;try{return((Le=globalThis.pdfjsWorker)==null?void 0:Le.WorkerMessageHandler)||null}catch{return null}},k0(jr,J1),k0(jr,cd,0),k0(jr,M2,!1),k0(jr,j2),isNodeJS&&(C0(jr,M2,!0),GlobalWorkerOptions.workerSrc||(GlobalWorkerOptions.workerSrc="./pdf.worker.mjs")),jr._isSameOrigin=(Le,Ye)=>{let tt;try{if(tt=new URL(Le),!tt.origin||tt.origin==="null")return!1}catch{return!1}const nt=new URL(Ye,tt);return tt.origin===nt.origin},jr._createCDNWrapper=Le=>{const Ye=`await import("${Le}");`;return URL.createObjectURL(new Blob([Ye],{type:"text/javascript"}))};let PDFWorker=jr;class WorkerTransport{constructor(Le,Ye,tt,nt,ft){k0(this,F2);k0(this,Gs,new Map);k0(this,gs,new Map);k0(this,el,new Map);k0(this,tl,new Map);k0(this,As,null);this.messageHandler=Le,this.loadingTask=Ye,this.commonObjs=new PDFObjects,this.fontLoader=new FontLoader({ownerDocument:nt.ownerDocument,styleElement:nt.styleElement}),this.loadingParams=nt.loadingParams,this._params=nt,this.canvasFactory=ft.canvasFactory,this.filterFactory=ft.filterFactory,this.cMapReaderFactory=ft.cMapReaderFactory,this.standardFontDataFactory=ft.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=tt,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}get annotationStorage(){return shadow(this,"annotationStorage",new AnnotationStorage)}getRenderingIntent(Le,Ye=AnnotationMode.ENABLE,tt=null,nt=!1,ft=!1){let ht=RenderingIntentFlag.DISPLAY,gt=SerializableEmpty;switch(Le){case"any":ht=RenderingIntentFlag.ANY;break;case"display":break;case"print":ht=RenderingIntentFlag.PRINT;break;default:warn$1(`getRenderingIntent - invalid intent: ${Le}`)}const At=ht&RenderingIntentFlag.PRINT&&tt instanceof PrintAnnotationStorage?tt:this.annotationStorage;switch(Ye){case AnnotationMode.DISABLE:ht+=RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case AnnotationMode.ENABLE:break;case AnnotationMode.ENABLE_FORMS:ht+=RenderingIntentFlag.ANNOTATIONS_FORMS;break;case AnnotationMode.ENABLE_STORAGE:ht+=RenderingIntentFlag.ANNOTATIONS_STORAGE,gt=At.serializable;break;default:warn$1(`getRenderingIntent - invalid annotationMode: ${Ye}`)}nt&&(ht+=RenderingIntentFlag.IS_EDITING),ft&&(ht+=RenderingIntentFlag.OPLIST);const{ids:xt,hash:Et}=At.modifiedIds,yt=[ht,gt.hash,Et];return{renderingIntent:ht,cacheKey:yt.join("_"),annotationStorageSerializable:gt,modifiedIds:xt}}destroy(){var tt;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),(tt=Ht(this,As))==null||tt.reject(new Error("Worker was destroyed during onPassword callback"));const Le=[];for(const nt of Ht(this,gs).values())Le.push(nt._destroy());Ht(this,gs).clear(),Ht(this,el).clear(),Ht(this,tl).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const Ye=this.messageHandler.sendWithPromise("Terminate",null);return Le.push(Ye),Promise.all(Le).then(()=>{var nt;this.commonObjs.clear(),this.fontLoader.clear(),Ht(this,Gs).clear(),this.filterFactory.destroy(),TextLayer$1.cleanup(),(nt=this._networkStream)==null||nt.cancelAllRequests(new AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:Le,loadingTask:Ye}=this;Le.on("GetReader",(tt,nt)=>{assert(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=ft=>{this._lastProgress={loaded:ft.loaded,total:ft.total}},nt.onPull=()=>{this._fullReader.read().then(function({value:ft,done:ht}){if(ht){nt.close();return}assert(ft instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),nt.enqueue(new Uint8Array(ft),1,[ft])}).catch(ft=>{nt.error(ft)})},nt.onCancel=ft=>{this._fullReader.cancel(ft),nt.ready.catch(ht=>{if(!this.destroyed)throw ht})}}),Le.on("ReaderHeadersReady",async tt=>{var gt;await this._fullReader.headersReady;const{isStreamingSupported:nt,isRangeSupported:ft,contentLength:ht}=this._fullReader;return(!nt||!ft)&&(this._lastProgress&&((gt=Ye.onProgress)==null||gt.call(Ye,this._lastProgress)),this._fullReader.onProgress=At=>{var xt;(xt=Ye.onProgress)==null||xt.call(Ye,{loaded:At.loaded,total:At.total})}),{isStreamingSupported:nt,isRangeSupported:ft,contentLength:ht}}),Le.on("GetRangeReader",(tt,nt)=>{assert(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const ft=this._networkStream.getRangeReader(tt.begin,tt.end);if(!ft){nt.close();return}nt.onPull=()=>{ft.read().then(function({value:ht,done:gt}){if(gt){nt.close();return}assert(ht instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),nt.enqueue(new Uint8Array(ht),1,[ht])}).catch(ht=>{nt.error(ht)})},nt.onCancel=ht=>{ft.cancel(ht),nt.ready.catch(gt=>{if(!this.destroyed)throw gt})}}),Le.on("GetDoc",({pdfInfo:tt})=>{this._numPages=tt.numPages,this._htmlForXfa=tt.htmlForXfa,delete tt.htmlForXfa,Ye._capability.resolve(new PDFDocumentProxy(tt,this))}),Le.on("DocException",function(tt){let nt;switch(tt.name){case"PasswordException":nt=new PasswordException(tt.message,tt.code);break;case"InvalidPDFException":nt=new InvalidPDFException(tt.message);break;case"MissingPDFException":nt=new MissingPDFException(tt.message);break;case"UnexpectedResponseException":nt=new UnexpectedResponseException(tt.message,tt.status);break;case"UnknownErrorException":nt=new UnknownErrorException(tt.message,tt.details);break;default:unreachable$1("DocException - expected a valid Error.")}Ye._capability.reject(nt)}),Le.on("PasswordRequest",tt=>{if(C0(this,As,Promise.withResolvers()),Ye.onPassword){const nt=ft=>{ft instanceof Error?Ht(this,As).reject(ft):Ht(this,As).resolve({password:ft})};try{Ye.onPassword(nt,tt.code)}catch(ft){Ht(this,As).reject(ft)}}else Ht(this,As).reject(new PasswordException(tt.message,tt.code));return Ht(this,As).promise}),Le.on("DataLoaded",tt=>{var nt;(nt=Ye.onProgress)==null||nt.call(Ye,{loaded:tt.length,total:tt.length}),this.downloadInfoCapability.resolve(tt)}),Le.on("StartRenderPage",tt=>{if(this.destroyed)return;Ht(this,gs).get(tt.pageIndex)._startRenderPage(tt.transparency,tt.cacheKey)}),Le.on("commonobj",([tt,nt,ft])=>{var ht;if(this.destroyed||this.commonObjs.has(tt))return null;switch(nt){case"Font":const{disableFontFace:gt,fontExtraProperties:At,pdfBug:xt}=this._params;if("error"in ft){const kt=ft.error;warn$1(`Error during font loading: ${kt}`),this.commonObjs.resolve(tt,kt);break}const Et=xt&&((ht=globalThis.FontInspector)!=null&&ht.enabled)?(kt,vt)=>globalThis.FontInspector.fontAdded(kt,vt):null,yt=new FontFaceObject(ft,{disableFontFace:gt,inspectFont:Et});this.fontLoader.bind(yt).catch(()=>Le.sendWithPromise("FontFallback",{id:tt})).finally(()=>{!At&&yt.data&&(yt.data=null),this.commonObjs.resolve(tt,yt)});break;case"CopyLocalImage":const{imageRef:Ct}=ft;assert(Ct,"The imageRef must be defined.");for(const kt of Ht(this,gs).values())for(const[,vt]of kt.objs)if((vt==null?void 0:vt.ref)===Ct)return vt.dataLen?(this.commonObjs.resolve(tt,structuredClone(vt)),vt.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(tt,ft);break;default:throw new Error(`Got unknown common object type ${nt}`)}return null}),Le.on("obj",([tt,nt,ft,ht])=>{var At;if(this.destroyed)return;const gt=Ht(this,gs).get(nt);if(!gt.objs.has(tt)){if(gt._intentStates.size===0){(At=ht==null?void 0:ht.bitmap)==null||At.close();return}switch(ft){case"Image":gt.objs.resolve(tt,ht),(ht==null?void 0:ht.dataLen)>MAX_IMAGE_SIZE_TO_CACHE&&(gt._maybeCleanupAfterRender=!0);break;case"Pattern":gt.objs.resolve(tt,ht);break;default:throw new Error(`Got unknown object type ${ft}`)}}}),Le.on("DocProgress",tt=>{var nt;this.destroyed||(nt=Ye.onProgress)==null||nt.call(Ye,{loaded:tt.loaded,total:tt.total})}),Le.on("FetchBuiltInCMap",async tt=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.cMapReaderFactory)throw new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.");return this.cMapReaderFactory.fetch(tt)}),Le.on("FetchStandardFontData",async tt=>{if(this.destroyed)throw new Error("Worker was destroyed.");if(!this.standardFontDataFactory)throw new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.");return this.standardFontDataFactory.fetch(tt)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var tt;this.annotationStorage.size<=0&&warn$1("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:Le,transfer:Ye}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:Le,filename:((tt=this._fullReader)==null?void 0:tt.filename)??null},Ye).finally(()=>{this.annotationStorage.resetModified()})}getPage(Le){if(!Number.isInteger(Le)||Le<=0||Le>this._numPages)return Promise.reject(new Error("Invalid page request."));const Ye=Le-1,tt=Ht(this,el).get(Ye);if(tt)return tt;const nt=this.messageHandler.sendWithPromise("GetPage",{pageIndex:Ye}).then(ft=>{if(this.destroyed)throw new Error("Transport destroyed");ft.refStr&&Ht(this,tl).set(ft.refStr,Le);const ht=new PDFPageProxy(Ye,ft,this,this._params.pdfBug);return Ht(this,gs).set(Ye,ht),ht});return Ht(this,el).set(Ye,nt),nt}getPageIndex(Le){return isRefProxy(Le)?this.messageHandler.sendWithPromise("GetPageIndex",{num:Le.num,gen:Le.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(Le,Ye){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:Le,intent:Ye})}getFieldObjects(){return y0(this,F2,Uu).call(this,"GetFieldObjects")}hasJSActions(){return y0(this,F2,Uu).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(Le){return typeof Le!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:Le})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return y0(this,F2,Uu).call(this,"GetDocJSActions")}getPageJSActions(Le){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:Le})}getStructTree(Le){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:Le})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(Le){return y0(this,F2,Uu).call(this,"GetOptionalContentConfig").then(Ye=>new OptionalContentConfig(Ye,Le))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const Le="GetMetadata",Ye=Ht(this,Gs).get(Le);if(Ye)return Ye;const tt=this.messageHandler.sendWithPromise(Le,null).then(nt=>{var ft,ht;return{info:nt[0],metadata:nt[1]?new Metadata(nt[1]):null,contentDispositionFilename:((ft=this._fullReader)==null?void 0:ft.filename)??null,contentLength:((ht=this._fullReader)==null?void 0:ht.contentLength)??null}});return Ht(this,Gs).set(Le,tt),tt}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(Le=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const Ye of Ht(this,gs).values())if(!Ye.cleanup())throw new Error(`startCleanup: Page ${Ye.pageNumber} is currently rendering.`);this.commonObjs.clear(),Le||this.fontLoader.clear(),Ht(this,Gs).clear(),this.filterFactory.destroy(!0),TextLayer$1.cleanup()}}cachedPageNumber(Le){if(!isRefProxy(Le))return null;const Ye=Le.gen===0?`${Le.num}R`:`${Le.num}R${Le.gen}`;return Ht(this,tl).get(Ye)??null}}Gs=new WeakMap,gs=new WeakMap,el=new WeakMap,tl=new WeakMap,As=new WeakMap,F2=new WeakSet,Uu=function(Le,Ye=null){const tt=Ht(this,Gs).get(Le);if(tt)return tt;const nt=this.messageHandler.sendWithPromise(Le,Ye);return Ht(this,Gs).set(Le,nt),nt};const INITIAL_DATA=Symbol("INITIAL_DATA");class PDFObjects{constructor(){k0(this,_c);k0(this,Gi,Object.create(null))}get(Le,Ye=null){if(Ye){const nt=y0(this,_c,ap).call(this,Le);return nt.promise.then(()=>Ye(nt.data)),null}const tt=Ht(this,Gi)[Le];if(!tt||tt.data===INITIAL_DATA)throw new Error(`Requesting object that isn't resolved yet ${Le}.`);return tt.data}has(Le){const Ye=Ht(this,Gi)[Le];return!!Ye&&Ye.data!==INITIAL_DATA}resolve(Le,Ye=null){const tt=y0(this,_c,ap).call(this,Le);tt.data=Ye,tt.resolve()}clear(){var Le;for(const Ye in Ht(this,Gi)){const{data:tt}=Ht(this,Gi)[Ye];(Le=tt==null?void 0:tt.bitmap)==null||Le.close()}C0(this,Gi,Object.create(null))}*[Symbol.iterator](){for(const Le in Ht(this,Gi)){const{data:Ye}=Ht(this,Gi)[Le];Ye!==INITIAL_DATA&&(yield[Le,Ye])}}}Gi=new WeakMap,_c=new WeakSet,ap=function(Le){var Ye;return(Ye=Ht(this,Gi))[Le]||(Ye[Le]={...Promise.withResolvers(),data:INITIAL_DATA})};class RenderTask{constructor(Le){k0(this,Vo,null);C0(this,Vo,Le),this.onContinue=null}get promise(){return Ht(this,Vo).capability.promise}cancel(Le=0){Ht(this,Vo).cancel(null,Le)}get separateAnnots(){const{separateAnnots:Le}=Ht(this,Vo).operatorList;if(!Le)return!1;const{annotationCanvasMap:Ye}=Ht(this,Vo);return Le.form||Le.canvas&&(Ye==null?void 0:Ye.size)>0}}Vo=new WeakMap;const U2=class U2{constructor({callback:Le,params:Ye,objs:tt,commonObjs:nt,annotationCanvasMap:ft,operatorList:ht,pageIndex:gt,canvasFactory:At,filterFactory:xt,useRequestAnimationFrame:Et=!1,pdfBug:yt=!1,pageColors:Ct=null}){k0(this,Ho,null);this.callback=Le,this.params=Ye,this.objs=tt,this.commonObjs=nt,this.annotationCanvasMap=ft,this.operatorListIdx=null,this.operatorList=ht,this._pageIndex=gt,this.canvasFactory=At,this.filterFactory=xt,this._pdfBug=yt,this.pageColors=Ct,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=Et===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=Ye.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:Le=!1,optionalContentConfig:Ye}){var gt,At;if(this.cancelled)return;if(this._canvas){if(Ht(U2,Q2).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");Ht(U2,Q2).add(this._canvas)}this._pdfBug&&((gt=globalThis.StepperManager)!=null&>.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:tt,viewport:nt,transform:ft,background:ht}=this.params;this.gfx=new CanvasGraphics(tt,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:Ye},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:ft,viewport:nt,transparency:Le,background:ht}),this.operatorListIdx=0,this.graphicsReady=!0,(At=this.graphicsReadyCallback)==null||At.call(this)}cancel(Le=null,Ye=0){var tt;this.running=!1,this.cancelled=!0,(tt=this.gfx)==null||tt.endDrawing(),Ht(this,Ho)&&(window.cancelAnimationFrame(Ht(this,Ho)),C0(this,Ho,null)),Ht(U2,Q2).delete(this._canvas),this.callback(Le||new RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,Ye))}operatorListChanged(){var Le;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(Le=this.stepper)==null||Le.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?C0(this,Ho,window.requestAnimationFrame(()=>{C0(this,Ho,null),this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),Ht(U2,Q2).delete(this._canvas),this.callback())))}};Ho=new WeakMap,Q2=new WeakMap,k0(U2,Q2,new WeakSet);let InternalRenderTask=U2;const version="4.8.69",build="3634dab10";function makeColorComp(Be){return Math.floor(Math.max(0,Math.min(1,Be))*255).toString(16).padStart(2,"0")}function scaleAndClamp(Be){return Math.max(0,Math.min(255,255*Be))}class ColorConverters{static CMYK_G([Le,Ye,tt,nt]){return["G",1-Math.min(1,.3*Le+.59*tt+.11*Ye+nt)]}static G_CMYK([Le]){return["CMYK",0,0,0,1-Le]}static G_RGB([Le]){return["RGB",Le,Le,Le]}static G_rgb([Le]){return Le=scaleAndClamp(Le),[Le,Le,Le]}static G_HTML([Le]){const Ye=makeColorComp(Le);return`#${Ye}${Ye}${Ye}`}static RGB_G([Le,Ye,tt]){return["G",.3*Le+.59*Ye+.11*tt]}static RGB_rgb(Le){return Le.map(scaleAndClamp)}static RGB_HTML(Le){return`#${Le.map(makeColorComp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([Le,Ye,tt,nt]){return["RGB",1-Math.min(1,Le+nt),1-Math.min(1,tt+nt),1-Math.min(1,Ye+nt)]}static CMYK_rgb([Le,Ye,tt,nt]){return[scaleAndClamp(1-Math.min(1,Le+nt)),scaleAndClamp(1-Math.min(1,tt+nt)),scaleAndClamp(1-Math.min(1,Ye+nt))]}static CMYK_HTML(Le){const Ye=this.CMYK_RGB(Le).slice(1);return this.RGB_HTML(Ye)}static RGB_CMYK([Le,Ye,tt]){const nt=1-Le,ft=1-Ye,ht=1-tt,gt=Math.min(nt,ft,ht);return["CMYK",nt,ft,ht,gt]}}class BaseSVGFactory{create(Le,Ye,tt=!1){if(Le<=0||Ye<=0)throw new Error("Invalid SVG dimensions");const nt=this._createSVG("svg:svg");return nt.setAttribute("version","1.1"),tt||(nt.setAttribute("width",`${Le}px`),nt.setAttribute("height",`${Ye}px`)),nt.setAttribute("preserveAspectRatio","none"),nt.setAttribute("viewBox",`0 0 ${Le} ${Ye}`),nt}createElement(Le){if(typeof Le!="string")throw new Error("Invalid SVG element type");return this._createSVG(Le)}_createSVG(Le){unreachable$1("Abstract method `_createSVG` called.")}}class DOMSVGFactory extends BaseSVGFactory{_createSVG(Le){return document.createElementNS(SVG_NS,Le)}}class XfaLayer{static setupStorage(Le,Ye,tt,nt,ft){const ht=nt.getValue(Ye,{value:null});switch(tt.name){case"textarea":if(ht.value!==null&&(Le.textContent=ht.value),ft==="print")break;Le.addEventListener("input",gt=>{nt.setValue(Ye,{value:gt.target.value})});break;case"input":if(tt.attributes.type==="radio"||tt.attributes.type==="checkbox"){if(ht.value===tt.attributes.xfaOn?Le.setAttribute("checked",!0):ht.value===tt.attributes.xfaOff&&Le.removeAttribute("checked"),ft==="print")break;Le.addEventListener("change",gt=>{nt.setValue(Ye,{value:gt.target.checked?gt.target.getAttribute("xfaOn"):gt.target.getAttribute("xfaOff")})})}else{if(ht.value!==null&&Le.setAttribute("value",ht.value),ft==="print")break;Le.addEventListener("input",gt=>{nt.setValue(Ye,{value:gt.target.value})})}break;case"select":if(ht.value!==null){Le.setAttribute("value",ht.value);for(const gt of tt.children)gt.attributes.value===ht.value?gt.attributes.selected=!0:gt.attributes.hasOwnProperty("selected")&&delete gt.attributes.selected}Le.addEventListener("input",gt=>{const At=gt.target.options,xt=At.selectedIndex===-1?"":At[At.selectedIndex].value;nt.setValue(Ye,{value:xt})});break}}static setAttributes({html:Le,element:Ye,storage:tt=null,intent:nt,linkService:ft}){const{attributes:ht}=Ye,gt=Le instanceof HTMLAnchorElement;ht.type==="radio"&&(ht.name=`${ht.name}-${nt}`);for(const[At,xt]of Object.entries(ht))if(xt!=null)switch(At){case"class":xt.length&&Le.setAttribute(At,xt.join(" "));break;case"dataId":break;case"id":Le.setAttribute("data-element-id",xt);break;case"style":Object.assign(Le.style,xt);break;case"textContent":Le.textContent=xt;break;default:(!gt||At!=="href"&&At!=="newWindow")&&Le.setAttribute(At,xt)}gt&&ft.addLinkAttributes(Le,ht.href,ht.newWindow),tt&&ht.dataId&&this.setupStorage(Le,ht.dataId,Ye,tt)}static render(Le){var yt,Ct;const Ye=Le.annotationStorage,tt=Le.linkService,nt=Le.xfaHtml,ft=Le.intent||"display",ht=document.createElement(nt.name);nt.attributes&&this.setAttributes({html:ht,element:nt,intent:ft,linkService:tt});const gt=ft!=="richText",At=Le.div;if(At.append(ht),Le.viewport){const kt=`matrix(${Le.viewport.transform.join(",")})`;At.style.transform=kt}gt&&At.setAttribute("class","xfaLayer xfaFont");const xt=[];if(nt.children.length===0){if(nt.value){const kt=document.createTextNode(nt.value);ht.append(kt),gt&&XfaText.shouldBuildText(nt.name)&&xt.push(kt)}return{textDivs:xt}}const Et=[[nt,-1,ht]];for(;Et.length>0;){const[kt,vt,bt]=Et.at(-1);if(vt+1===kt.children.length){Et.pop();continue}const It=kt.children[++Et.at(-1)[1]];if(It===null)continue;const{name:wt}=It;if(wt==="#text"){const Tt=document.createTextNode(It.value);xt.push(Tt),bt.append(Tt);continue}const Rt=(yt=It==null?void 0:It.attributes)!=null&&yt.xmlns?document.createElementNS(It.attributes.xmlns,wt):document.createElement(wt);if(bt.append(Rt),It.attributes&&this.setAttributes({html:Rt,element:It,storage:Ye,intent:ft,linkService:tt}),((Ct=It.children)==null?void 0:Ct.length)>0)Et.push([It,-1,Rt]);else if(It.value){const Tt=document.createTextNode(It.value);gt&&XfaText.shouldBuildText(wt)&&xt.push(Tt),Rt.append(Tt)}}for(const kt of At.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))kt.setAttribute("readOnly",!0);return{textDivs:xt}}static update(Le){const Ye=`matrix(${Le.viewport.transform.join(",")})`;Le.div.style.transform=Ye,Le.div.hidden=!1}}const DEFAULT_TAB_INDEX=1e3,annotation_layer_DEFAULT_FONT_SIZE=9,GetElementsByNameSet=new WeakSet;function getRectDims(Be){return{width:Be[2]-Be[0],height:Be[3]-Be[1]}}class AnnotationElementFactory{static create(Le){switch(Le.data.annotationType){case AnnotationType.LINK:return new LinkAnnotationElement(Le);case AnnotationType.TEXT:return new TextAnnotationElement(Le);case AnnotationType.WIDGET:switch(Le.data.fieldType){case"Tx":return new TextWidgetAnnotationElement(Le);case"Btn":return Le.data.radioButton?new RadioButtonWidgetAnnotationElement(Le):Le.data.checkBox?new CheckboxWidgetAnnotationElement(Le):new PushButtonWidgetAnnotationElement(Le);case"Ch":return new ChoiceWidgetAnnotationElement(Le);case"Sig":return new SignatureWidgetAnnotationElement(Le)}return new WidgetAnnotationElement(Le);case AnnotationType.POPUP:return new PopupAnnotationElement(Le);case AnnotationType.FREETEXT:return new FreeTextAnnotationElement(Le);case AnnotationType.LINE:return new LineAnnotationElement(Le);case AnnotationType.SQUARE:return new SquareAnnotationElement(Le);case AnnotationType.CIRCLE:return new CircleAnnotationElement(Le);case AnnotationType.POLYLINE:return new PolylineAnnotationElement(Le);case AnnotationType.CARET:return new CaretAnnotationElement(Le);case AnnotationType.INK:return new InkAnnotationElement(Le);case AnnotationType.POLYGON:return new PolygonAnnotationElement(Le);case AnnotationType.HIGHLIGHT:return new HighlightAnnotationElement(Le);case AnnotationType.UNDERLINE:return new UnderlineAnnotationElement(Le);case AnnotationType.SQUIGGLY:return new SquigglyAnnotationElement(Le);case AnnotationType.STRIKEOUT:return new StrikeOutAnnotationElement(Le);case AnnotationType.STAMP:return new StampAnnotationElement(Le);case AnnotationType.FILEATTACHMENT:return new FileAttachmentAnnotationElement(Le);default:return new AnnotationElement(Le)}}}const T3=class T3{constructor(Le,{isRenderable:Ye=!1,ignoreBorder:tt=!1,createQuadrilaterals:nt=!1}={}){k0(this,Mc);k0(this,V2,null);k0(this,nl,!1);k0(this,rl,null);this.isRenderable=Ye,this.data=Le.data,this.layer=Le.layer,this.linkService=Le.linkService,this.downloadManager=Le.downloadManager,this.imageResourcesPath=Le.imageResourcesPath,this.renderForms=Le.renderForms,this.svgFactory=Le.svgFactory,this.annotationStorage=Le.annotationStorage,this.enableScripting=Le.enableScripting,this.hasJSActions=Le.hasJSActions,this._fieldObjects=Le.fieldObjects,this.parent=Le.parent,Ye&&(this.container=this._createContainer(tt)),nt&&this._createQuadrilaterals()}static _hasPopupData({titleObj:Le,contentsObj:Ye,richText:tt}){return!!(Le!=null&&Le.str||Ye!=null&&Ye.str||tt!=null&&tt.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return T3._hasPopupData(this.data)}updateEdited(Le){var tt;if(!this.container)return;Ht(this,V2)||C0(this,V2,{rect:this.data.rect.slice(0)});const{rect:Ye}=Le;Ye&&y0(this,Mc,sp).call(this,Ye),(tt=Ht(this,rl))==null||tt.popup.updateEdited(Le)}resetEdited(){var Le;Ht(this,V2)&&(y0(this,Mc,sp).call(this,Ht(this,V2).rect),(Le=Ht(this,rl))==null||Le.popup.resetEdited(),C0(this,V2,null))}_createContainer(Le){const{data:Ye,parent:{page:tt,viewport:nt}}=this,ft=document.createElement("section");ft.setAttribute("data-annotation-id",Ye.id),this instanceof WidgetAnnotationElement||(ft.tabIndex=DEFAULT_TAB_INDEX);const{style:ht}=ft;if(ht.zIndex=this.parent.zIndex++,Ye.alternativeText&&(ft.title=Ye.alternativeText),Ye.noRotate&&ft.classList.add("norotate"),!Ye.rect||this instanceof PopupAnnotationElement){const{rotation:bt}=Ye;return!Ye.hasOwnCanvas&&bt!==0&&this.setRotation(bt,ft),ft}const{width:gt,height:At}=getRectDims(Ye.rect);if(!Le&&Ye.borderStyle.width>0){ht.borderWidth=`${Ye.borderStyle.width}px`;const bt=Ye.borderStyle.horizontalCornerRadius,It=Ye.borderStyle.verticalCornerRadius;if(bt>0||It>0){const Rt=`calc(${bt}px * var(--scale-factor)) / calc(${It}px * var(--scale-factor))`;ht.borderRadius=Rt}else if(this instanceof RadioButtonWidgetAnnotationElement){const Rt=`calc(${gt}px * var(--scale-factor)) / calc(${At}px * var(--scale-factor))`;ht.borderRadius=Rt}switch(Ye.borderStyle.style){case AnnotationBorderStyleType.SOLID:ht.borderStyle="solid";break;case AnnotationBorderStyleType.DASHED:ht.borderStyle="dashed";break;case AnnotationBorderStyleType.BEVELED:warn$1("Unimplemented border style: beveled");break;case AnnotationBorderStyleType.INSET:warn$1("Unimplemented border style: inset");break;case AnnotationBorderStyleType.UNDERLINE:ht.borderBottomStyle="solid";break}const wt=Ye.borderColor||null;wt?(C0(this,nl,!0),ht.borderColor=Util.makeHexColor(wt[0]|0,wt[1]|0,wt[2]|0)):ht.borderWidth=0}const xt=Util.normalizeRect([Ye.rect[0],tt.view[3]-Ye.rect[1]+tt.view[1],Ye.rect[2],tt.view[3]-Ye.rect[3]+tt.view[1]]),{pageWidth:Et,pageHeight:yt,pageX:Ct,pageY:kt}=nt.rawDims;ht.left=`${100*(xt[0]-Ct)/Et}%`,ht.top=`${100*(xt[1]-kt)/yt}%`;const{rotation:vt}=Ye;return Ye.hasOwnCanvas||vt===0?(ht.width=`${100*gt/Et}%`,ht.height=`${100*At/yt}%`):this.setRotation(vt,ft),ft}setRotation(Le,Ye=this.container){if(!this.data.rect)return;const{pageWidth:tt,pageHeight:nt}=this.parent.viewport.rawDims,{width:ft,height:ht}=getRectDims(this.data.rect);let gt,At;Le%180===0?(gt=100*ft/tt,At=100*ht/nt):(gt=100*ht/tt,At=100*ft/nt),Ye.style.width=`${gt}%`,Ye.style.height=`${At}%`,Ye.setAttribute("data-main-rotation",(360-Le)%360)}get _commonActions(){const Le=(Ye,tt,nt)=>{const ft=nt.detail[Ye],ht=ft[0],gt=ft.slice(1);nt.target.style[tt]=ColorConverters[`${ht}_HTML`](gt),this.annotationStorage.setValue(this.data.id,{[tt]:ColorConverters[`${ht}_rgb`](gt)})};return shadow(this,"_commonActions",{display:Ye=>{const{display:tt}=Ye.detail,nt=tt%2===1;this.container.style.visibility=nt?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:nt,noPrint:tt===1||tt===2})},print:Ye=>{this.annotationStorage.setValue(this.data.id,{noPrint:!Ye.detail.print})},hidden:Ye=>{const{hidden:tt}=Ye.detail;this.container.style.visibility=tt?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:tt,noView:tt})},focus:Ye=>{setTimeout(()=>Ye.target.focus({preventScroll:!1}),0)},userName:Ye=>{Ye.target.title=Ye.detail.userName},readonly:Ye=>{Ye.target.disabled=Ye.detail.readonly},required:Ye=>{this._setRequired(Ye.target,Ye.detail.required)},bgColor:Ye=>{Le("bgColor","backgroundColor",Ye)},fillColor:Ye=>{Le("fillColor","backgroundColor",Ye)},fgColor:Ye=>{Le("fgColor","color",Ye)},textColor:Ye=>{Le("textColor","color",Ye)},borderColor:Ye=>{Le("borderColor","borderColor",Ye)},strokeColor:Ye=>{Le("strokeColor","borderColor",Ye)},rotation:Ye=>{const tt=Ye.detail.rotation;this.setRotation(tt),this.annotationStorage.setValue(this.data.id,{rotation:tt})}})}_dispatchEventFromSandbox(Le,Ye){const tt=this._commonActions;for(const nt of Object.keys(Ye.detail)){const ft=Le[nt]||tt[nt];ft==null||ft(Ye)}}_setDefaultPropertiesFromJS(Le){if(!this.enableScripting)return;const Ye=this.annotationStorage.getRawValue(this.data.id);if(!Ye)return;const tt=this._commonActions;for(const[nt,ft]of Object.entries(Ye)){const ht=tt[nt];if(ht){const gt={detail:{[nt]:ft},target:Le};ht(gt),delete Ye[nt]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:Le}=this.data;if(!Le)return;const[Ye,tt,nt,ft]=this.data.rect.map(bt=>Math.fround(bt));if(Le.length===8){const[bt,It,wt,Rt]=Le.subarray(2,6);if(nt===bt&&ft===It&&Ye===wt&&tt===Rt)return}const{style:ht}=this.container;let gt;if(Ht(this,nl)){const{borderColor:bt,borderWidth:It}=ht;ht.borderWidth=0,gt=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${bt}" stroke-width="${It}">`],this.container.classList.add("hasBorder")}const At=nt-Ye,xt=ft-tt,{svgFactory:Et}=this,yt=Et.createElement("svg");yt.classList.add("quadrilateralsContainer"),yt.setAttribute("width",0),yt.setAttribute("height",0);const Ct=Et.createElement("defs");yt.append(Ct);const kt=Et.createElement("clipPath"),vt=`clippath_${this.data.id}`;kt.setAttribute("id",vt),kt.setAttribute("clipPathUnits","objectBoundingBox"),Ct.append(kt);for(let bt=2,It=Le.length;bt<It;bt+=8){const wt=Le[bt],Rt=Le[bt+1],Tt=Le[bt+2],Bt=Le[bt+3],Dt=Et.createElement("rect"),Lt=(Tt-Ye)/At,Nt=(ft-Rt)/xt,Pt=(wt-Tt)/At,Wt=(Rt-Bt)/xt;Dt.setAttribute("x",Lt),Dt.setAttribute("y",Nt),Dt.setAttribute("width",Pt),Dt.setAttribute("height",Wt),kt.append(Dt),gt==null||gt.push(`<rect vector-effect="non-scaling-stroke" x="${Lt}" y="${Nt}" width="${Pt}" height="${Wt}"/>`)}Ht(this,nl)&&(gt.push("</g></svg>')"),ht.backgroundImage=gt.join("")),this.container.append(yt),this.container.style.clipPath=`url(#${vt})`}_createPopup(){const{data:Le}=this,Ye=C0(this,rl,new PopupAnnotationElement({data:{color:Le.color,titleObj:Le.titleObj,modificationDate:Le.modificationDate,contentsObj:Le.contentsObj,richText:Le.richText,parentRect:Le.rect,borderStyle:0,id:`popup_${Le.id}`,rotation:Le.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(Ye.render())}render(){unreachable$1("Abstract method `AnnotationElement.render` called")}_getElementsByName(Le,Ye=null){const tt=[];if(this._fieldObjects){const nt=this._fieldObjects[Le];if(nt)for(const{page:ft,id:ht,exportValues:gt}of nt){if(ft===-1||ht===Ye)continue;const At=typeof gt=="string"?gt:null,xt=document.querySelector(`[data-element-id="${ht}"]`);if(xt&&!GetElementsByNameSet.has(xt)){warn$1(`_getElementsByName - element not allowed: ${ht}`);continue}tt.push({id:ht,exportValue:At,domElement:xt})}return tt}for(const nt of document.getElementsByName(Le)){const{exportValue:ft}=nt,ht=nt.getAttribute("data-element-id");ht!==Ye&&GetElementsByNameSet.has(nt)&&tt.push({id:ht,exportValue:ft,domElement:nt})}return tt}show(){var Le;this.container&&(this.container.hidden=!1),(Le=this.popup)==null||Le.maybeShow()}hide(){var Le;this.container&&(this.container.hidden=!0),(Le=this.popup)==null||Le.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const Le=this.getElementsToTriggerPopup();if(Array.isArray(Le))for(const Ye of Le)Ye.classList.add("highlightArea");else Le.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:Le,data:{id:Ye}}=this;this.container.addEventListener("dblclick",()=>{var tt;(tt=this.linkService.eventBus)==null||tt.dispatch("switchannotationeditormode",{source:this,mode:Le,editId:Ye})})}};V2=new WeakMap,nl=new WeakMap,rl=new WeakMap,Mc=new WeakSet,sp=function(Le){const{container:{style:Ye},data:{rect:tt,rotation:nt},parent:{viewport:{rawDims:{pageWidth:ft,pageHeight:ht,pageX:gt,pageY:At}}}}=this;tt==null||tt.splice(0,4,...Le);const{width:xt,height:Et}=getRectDims(Le);Ye.left=`${100*(Le[0]-gt)/ft}%`,Ye.top=`${100*(ht-Le[3]+At)/ht}%`,nt===0?(Ye.width=`${100*xt/ft}%`,Ye.height=`${100*Et/ht}%`):this.setRotation(nt)};let AnnotationElement=T3;class LinkAnnotationElement extends AnnotationElement{constructor(Ye,tt=null){super(Ye,{isRenderable:!0,ignoreBorder:!!(tt!=null&&tt.ignoreBorder),createQuadrilaterals:!0});k0(this,si);this.isTooltipOnly=Ye.data.isTooltipOnly}render(){const{data:Ye,linkService:tt}=this,nt=document.createElement("a");nt.setAttribute("data-element-id",Ye.id);let ft=!1;return Ye.url?(tt.addLinkAttributes(nt,Ye.url,Ye.newWindow),ft=!0):Ye.action?(this._bindNamedAction(nt,Ye.action),ft=!0):Ye.attachment?(y0(this,si,R4).call(this,nt,Ye.attachment,Ye.attachmentDest),ft=!0):Ye.setOCGState?(y0(this,si,T4).call(this,nt,Ye.setOCGState),ft=!0):Ye.dest?(this._bindLink(nt,Ye.dest),ft=!0):(Ye.actions&&(Ye.actions.Action||Ye.actions["Mouse Up"]||Ye.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(nt,Ye),ft=!0),Ye.resetForm?(this._bindResetFormAction(nt,Ye.resetForm),ft=!0):this.isTooltipOnly&&!ft&&(this._bindLink(nt,""),ft=!0)),this.container.classList.add("linkAnnotation"),ft&&this.container.append(nt),this.container}_bindLink(Ye,tt){Ye.href=this.linkService.getDestinationHash(tt),Ye.onclick=()=>(tt&&this.linkService.goToDestination(tt),!1),(tt||tt==="")&&y0(this,si,b1).call(this)}_bindNamedAction(Ye,tt){Ye.href=this.linkService.getAnchorUrl(""),Ye.onclick=()=>(this.linkService.executeNamedAction(tt),!1),y0(this,si,b1).call(this)}_bindJSAction(Ye,tt){Ye.href=this.linkService.getAnchorUrl("");const nt=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const ft of Object.keys(tt.actions)){const ht=nt.get(ft);ht&&(Ye[ht]=()=>{var gt;return(gt=this.linkService.eventBus)==null||gt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:tt.id,name:ft}}),!1})}Ye.onclick||(Ye.onclick=()=>!1),y0(this,si,b1).call(this)}_bindResetFormAction(Ye,tt){const nt=Ye.onclick;if(nt||(Ye.href=this.linkService.getAnchorUrl("")),y0(this,si,b1).call(this),!this._fieldObjects){warn$1('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),nt||(Ye.onclick=()=>!1);return}Ye.onclick=()=>{var yt;nt==null||nt();const{fields:ft,refs:ht,include:gt}=tt,At=[];if(ft.length!==0||ht.length!==0){const Ct=new Set(ht);for(const kt of ft){const vt=this._fieldObjects[kt]||[];for(const{id:bt}of vt)Ct.add(bt)}for(const kt of Object.values(this._fieldObjects))for(const vt of kt)Ct.has(vt.id)===gt&&At.push(vt)}else for(const Ct of Object.values(this._fieldObjects))At.push(...Ct);const xt=this.annotationStorage,Et=[];for(const Ct of At){const{id:kt}=Ct;switch(Et.push(kt),Ct.type){case"text":{const bt=Ct.defaultValue||"";xt.setValue(kt,{value:bt});break}case"checkbox":case"radiobutton":{const bt=Ct.defaultValue===Ct.exportValues;xt.setValue(kt,{value:bt});break}case"combobox":case"listbox":{const bt=Ct.defaultValue||"";xt.setValue(kt,{value:bt});break}default:continue}const vt=document.querySelector(`[data-element-id="${kt}"]`);if(vt){if(!GetElementsByNameSet.has(vt)){warn$1(`_bindResetFormAction - element not allowed: ${kt}`);continue}}else continue;vt.dispatchEvent(new Event("resetform"))}return this.enableScripting&&((yt=this.linkService.eventBus)==null||yt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:Et,name:"ResetForm"}})),!1}}}si=new WeakSet,b1=function(){this.container.setAttribute("data-internal-link","")},R4=function(Ye,tt,nt=null){Ye.href=this.linkService.getAnchorUrl(""),tt.description&&(Ye.title=tt.description),Ye.onclick=()=>{var ft;return(ft=this.downloadManager)==null||ft.openOrDownloadData(tt.content,tt.filename,nt),!1},y0(this,si,b1).call(this)},T4=function(Ye,tt){Ye.href=this.linkService.getAnchorUrl(""),Ye.onclick=()=>(this.linkService.executeSetOCGState(tt),!1),y0(this,si,b1).call(this)};class TextAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const Le=document.createElement("img");return Le.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",Le.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),Le.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(Le),this.container}}class WidgetAnnotationElement extends AnnotationElement{render(){return this.container}showElementAndHideCanvas(Le){var Ye;this.data.hasOwnCanvas&&(((Ye=Le.previousSibling)==null?void 0:Ye.nodeName)==="CANVAS"&&(Le.previousSibling.hidden=!0),Le.hidden=!1)}_getKeyModifier(Le){return util_FeatureTest.platform.isMac?Le.metaKey:Le.ctrlKey}_setEventListener(Le,Ye,tt,nt,ft){tt.includes("mouse")?Le.addEventListener(tt,ht=>{var gt;(gt=this.linkService.eventBus)==null||gt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:nt,value:ft(ht),shift:ht.shiftKey,modifier:this._getKeyModifier(ht)}})}):Le.addEventListener(tt,ht=>{var gt;if(tt==="blur"){if(!Ye.focused||!ht.relatedTarget)return;Ye.focused=!1}else if(tt==="focus"){if(Ye.focused)return;Ye.focused=!0}ft&&((gt=this.linkService.eventBus)==null||gt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:nt,value:ft(ht)}}))})}_setEventListeners(Le,Ye,tt,nt){var ft,ht,gt;for(const[At,xt]of tt)(xt==="Action"||(ft=this.data.actions)!=null&&ft[xt])&&((xt==="Focus"||xt==="Blur")&&(Ye||(Ye={focused:!1})),this._setEventListener(Le,Ye,At,xt,nt),xt==="Focus"&&!((ht=this.data.actions)!=null&&ht.Blur)?this._setEventListener(Le,Ye,"blur","Blur",null):xt==="Blur"&&!((gt=this.data.actions)!=null&>.Focus)&&this._setEventListener(Le,Ye,"focus","Focus",null))}_setBackgroundColor(Le){const Ye=this.data.backgroundColor||null;Le.style.backgroundColor=Ye===null?"transparent":Util.makeHexColor(Ye[0],Ye[1],Ye[2])}_setTextStyle(Le){const Ye=["left","center","right"],{fontColor:tt}=this.data.defaultAppearanceData,nt=this.data.defaultAppearanceData.fontSize||annotation_layer_DEFAULT_FONT_SIZE,ft=Le.style;let ht;const gt=2,At=xt=>Math.round(10*xt)/10;if(this.data.multiLine){const xt=Math.abs(this.data.rect[3]-this.data.rect[1]-gt),Et=Math.round(xt/(LINE_FACTOR*nt))||1,yt=xt/Et;ht=Math.min(nt,At(yt/LINE_FACTOR))}else{const xt=Math.abs(this.data.rect[3]-this.data.rect[1]-gt);ht=Math.min(nt,At(xt/LINE_FACTOR))}ft.fontSize=`calc(${ht}px * var(--scale-factor))`,ft.color=Util.makeHexColor(tt[0],tt[1],tt[2]),this.data.textAlignment!==null&&(ft.textAlign=Ye[this.data.textAlignment])}_setRequired(Le,Ye){Ye?Le.setAttribute("required",!0):Le.removeAttribute("required"),Le.setAttribute("aria-required",Ye)}}class TextWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){const Ye=Le.renderForms||Le.data.hasOwnCanvas||!Le.data.hasAppearance&&!!Le.data.fieldValue;super(Le,{isRenderable:Ye})}setPropertyOnSiblings(Le,Ye,tt,nt){const ft=this.annotationStorage;for(const ht of this._getElementsByName(Le.name,Le.id))ht.domElement&&(ht.domElement[Ye]=tt),ft.setValue(ht.id,{[nt]:tt})}render(){var nt,ft;const Le=this.annotationStorage,Ye=this.data.id;this.container.classList.add("textWidgetAnnotation");let tt=null;if(this.renderForms){const ht=Le.getValue(Ye,{value:this.data.fieldValue});let gt=ht.value||"";const At=Le.getValue(Ye,{charLimit:this.data.maxLen}).charLimit;At&>.length>At&&(gt=gt.slice(0,At));let xt=ht.formattedValue||((nt=this.data.textContent)==null?void 0:nt.join(`
|
|
4016
4016
|
`))||null;xt&&this.data.comb&&(xt=xt.replaceAll(/\s+/g,""));const Et={userValue:gt,formattedValue:xt,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(tt=document.createElement("textarea"),tt.textContent=xt??gt,this.data.doNotScroll&&(tt.style.overflowY="hidden")):(tt=document.createElement("input"),tt.type="text",tt.setAttribute("value",xt??gt),this.data.doNotScroll&&(tt.style.overflowX="hidden")),this.data.hasOwnCanvas&&(tt.hidden=!0),GetElementsByNameSet.add(tt),tt.setAttribute("data-element-id",Ye),tt.disabled=this.data.readOnly,tt.name=this.data.fieldName,tt.tabIndex=DEFAULT_TAB_INDEX,this._setRequired(tt,this.data.required),At&&(tt.maxLength=At),tt.addEventListener("input",Ct=>{Le.setValue(Ye,{value:Ct.target.value}),this.setPropertyOnSiblings(tt,"value",Ct.target.value,"value"),Et.formattedValue=null}),tt.addEventListener("resetform",Ct=>{const kt=this.data.defaultFieldValue??"";tt.value=Et.userValue=kt,Et.formattedValue=null});let yt=Ct=>{const{formattedValue:kt}=Et;kt!=null&&(Ct.target.value=kt),Ct.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){tt.addEventListener("focus",kt=>{var bt;if(Et.focused)return;const{target:vt}=kt;Et.userValue&&(vt.value=Et.userValue),Et.lastCommittedValue=vt.value,Et.commitKey=1,(bt=this.data.actions)!=null&&bt.Focus||(Et.focused=!0)}),tt.addEventListener("updatefromsandbox",kt=>{this.showElementAndHideCanvas(kt.target);const vt={value(bt){Et.userValue=bt.detail.value??"",Le.setValue(Ye,{value:Et.userValue.toString()}),bt.target.value=Et.userValue},formattedValue(bt){const{formattedValue:It}=bt.detail;Et.formattedValue=It,It!=null&&bt.target!==document.activeElement&&(bt.target.value=It),Le.setValue(Ye,{formattedValue:It})},selRange(bt){bt.target.setSelectionRange(...bt.detail.selRange)},charLimit:bt=>{var Tt;const{charLimit:It}=bt.detail,{target:wt}=bt;if(It===0){wt.removeAttribute("maxLength");return}wt.setAttribute("maxLength",It);let Rt=Et.userValue;!Rt||Rt.length<=It||(Rt=Rt.slice(0,It),wt.value=Et.userValue=Rt,Le.setValue(Ye,{value:Rt}),(Tt=this.linkService.eventBus)==null||Tt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:Rt,willCommit:!0,commitKey:1,selStart:wt.selectionStart,selEnd:wt.selectionEnd}}))}};this._dispatchEventFromSandbox(vt,kt)}),tt.addEventListener("keydown",kt=>{var It;Et.commitKey=1;let vt=-1;if(kt.key==="Escape"?vt=0:kt.key==="Enter"&&!this.data.multiLine?vt=2:kt.key==="Tab"&&(Et.commitKey=3),vt===-1)return;const{value:bt}=kt.target;Et.lastCommittedValue!==bt&&(Et.lastCommittedValue=bt,Et.userValue=bt,(It=this.linkService.eventBus)==null||It.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:bt,willCommit:!0,commitKey:vt,selStart:kt.target.selectionStart,selEnd:kt.target.selectionEnd}}))});const Ct=yt;yt=null,tt.addEventListener("blur",kt=>{var bt,It;if(!Et.focused||!kt.relatedTarget)return;(bt=this.data.actions)!=null&&bt.Blur||(Et.focused=!1);const{value:vt}=kt.target;Et.userValue=vt,Et.lastCommittedValue!==vt&&((It=this.linkService.eventBus)==null||It.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:vt,willCommit:!0,commitKey:Et.commitKey,selStart:kt.target.selectionStart,selEnd:kt.target.selectionEnd}})),Ct(kt)}),(ft=this.data.actions)!=null&&ft.Keystroke&&tt.addEventListener("beforeinput",kt=>{var Dt;Et.lastCommittedValue=null;const{data:vt,target:bt}=kt,{value:It,selectionStart:wt,selectionEnd:Rt}=bt;let Tt=wt,Bt=Rt;switch(kt.inputType){case"deleteWordBackward":{const Lt=It.substring(0,wt).match(/\w*[^\w]*$/);Lt&&(Tt-=Lt[0].length);break}case"deleteWordForward":{const Lt=It.substring(wt).match(/^[^\w]*\w*/);Lt&&(Bt+=Lt[0].length);break}case"deleteContentBackward":wt===Rt&&(Tt-=1);break;case"deleteContentForward":wt===Rt&&(Bt+=1);break}kt.preventDefault(),(Dt=this.linkService.eventBus)==null||Dt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:It,change:vt||"",willCommit:!1,selStart:Tt,selEnd:Bt}})}),this._setEventListeners(tt,Et,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],kt=>kt.target.value)}if(yt&&tt.addEventListener("blur",yt),this.data.comb){const kt=(this.data.rect[2]-this.data.rect[0])/At;tt.classList.add("comb"),tt.style.letterSpacing=`calc(${kt}px * var(--scale-factor) - 1ch)`}}else tt=document.createElement("div"),tt.textContent=this.data.fieldValue,tt.style.verticalAlign="middle",tt.style.display="table-cell",this.data.hasOwnCanvas&&(tt.hidden=!0);return this._setTextStyle(tt),this._setBackgroundColor(tt),this._setDefaultPropertiesFromJS(tt),this.container.append(tt),this.container}}class SignatureWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){super(Le,{isRenderable:!!Le.data.hasOwnCanvas})}}class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){super(Le,{isRenderable:Le.renderForms})}render(){const Le=this.annotationStorage,Ye=this.data,tt=Ye.id;let nt=Le.getValue(tt,{value:Ye.exportValue===Ye.fieldValue}).value;typeof nt=="string"&&(nt=nt!=="Off",Le.setValue(tt,{value:nt})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const ft=document.createElement("input");return GetElementsByNameSet.add(ft),ft.setAttribute("data-element-id",tt),ft.disabled=Ye.readOnly,this._setRequired(ft,this.data.required),ft.type="checkbox",ft.name=Ye.fieldName,nt&&ft.setAttribute("checked",!0),ft.setAttribute("exportValue",Ye.exportValue),ft.tabIndex=DEFAULT_TAB_INDEX,ft.addEventListener("change",ht=>{const{name:gt,checked:At}=ht.target;for(const xt of this._getElementsByName(gt,tt)){const Et=At&&xt.exportValue===Ye.exportValue;xt.domElement&&(xt.domElement.checked=Et),Le.setValue(xt.id,{value:Et})}Le.setValue(tt,{value:At})}),ft.addEventListener("resetform",ht=>{const gt=Ye.defaultFieldValue||"Off";ht.target.checked=gt===Ye.exportValue}),this.enableScripting&&this.hasJSActions&&(ft.addEventListener("updatefromsandbox",ht=>{const gt={value(At){At.target.checked=At.detail.value!=="Off",Le.setValue(tt,{value:At.target.checked})}};this._dispatchEventFromSandbox(gt,ht)}),this._setEventListeners(ft,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],ht=>ht.target.checked)),this._setBackgroundColor(ft),this._setDefaultPropertiesFromJS(ft),this.container.append(ft),this.container}}class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){super(Le,{isRenderable:Le.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const Le=this.annotationStorage,Ye=this.data,tt=Ye.id;let nt=Le.getValue(tt,{value:Ye.fieldValue===Ye.buttonValue}).value;if(typeof nt=="string"&&(nt=nt!==Ye.buttonValue,Le.setValue(tt,{value:nt})),nt)for(const ht of this._getElementsByName(Ye.fieldName,tt))Le.setValue(ht.id,{value:!1});const ft=document.createElement("input");if(GetElementsByNameSet.add(ft),ft.setAttribute("data-element-id",tt),ft.disabled=Ye.readOnly,this._setRequired(ft,this.data.required),ft.type="radio",ft.name=Ye.fieldName,nt&&ft.setAttribute("checked",!0),ft.tabIndex=DEFAULT_TAB_INDEX,ft.addEventListener("change",ht=>{const{name:gt,checked:At}=ht.target;for(const xt of this._getElementsByName(gt,tt))Le.setValue(xt.id,{value:!1});Le.setValue(tt,{value:At})}),ft.addEventListener("resetform",ht=>{const gt=Ye.defaultFieldValue;ht.target.checked=gt!=null&>===Ye.buttonValue}),this.enableScripting&&this.hasJSActions){const ht=Ye.buttonValue;ft.addEventListener("updatefromsandbox",gt=>{const At={value:xt=>{const Et=ht===xt.detail.value;for(const yt of this._getElementsByName(xt.target.name)){const Ct=Et&&yt.id===tt;yt.domElement&&(yt.domElement.checked=Ct),Le.setValue(yt.id,{value:Ct})}}};this._dispatchEventFromSandbox(At,gt)}),this._setEventListeners(ft,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],gt=>gt.target.checked)}return this._setBackgroundColor(ft),this._setDefaultPropertiesFromJS(ft),this.container.append(ft),this.container}}class PushButtonWidgetAnnotationElement extends LinkAnnotationElement{constructor(Le){super(Le,{ignoreBorder:Le.data.hasAppearance})}render(){const Le=super.render();Le.classList.add("buttonWidgetAnnotation","pushButton");const Ye=Le.lastChild;return this.enableScripting&&this.hasJSActions&&Ye&&(this._setDefaultPropertiesFromJS(Ye),Ye.addEventListener("updatefromsandbox",tt=>{this._dispatchEventFromSandbox({},tt)})),Le}}class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement{constructor(Le){super(Le,{isRenderable:Le.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const Le=this.annotationStorage,Ye=this.data.id,tt=Le.getValue(Ye,{value:this.data.fieldValue}),nt=document.createElement("select");GetElementsByNameSet.add(nt),nt.setAttribute("data-element-id",Ye),nt.disabled=this.data.readOnly,this._setRequired(nt,this.data.required),nt.name=this.data.fieldName,nt.tabIndex=DEFAULT_TAB_INDEX;let ft=this.data.combo&&this.data.options.length>0;this.data.combo||(nt.size=this.data.options.length,this.data.multiSelect&&(nt.multiple=!0)),nt.addEventListener("resetform",Et=>{const yt=this.data.defaultFieldValue;for(const Ct of nt.options)Ct.selected=Ct.value===yt});for(const Et of this.data.options){const yt=document.createElement("option");yt.textContent=Et.displayValue,yt.value=Et.exportValue,tt.value.includes(Et.exportValue)&&(yt.setAttribute("selected",!0),ft=!1),nt.append(yt)}let ht=null;if(ft){const Et=document.createElement("option");Et.value=" ",Et.setAttribute("hidden",!0),Et.setAttribute("selected",!0),nt.prepend(Et),ht=()=>{Et.remove(),nt.removeEventListener("input",ht),ht=null},nt.addEventListener("input",ht)}const gt=Et=>{const yt=Et?"value":"textContent",{options:Ct,multiple:kt}=nt;return kt?Array.prototype.filter.call(Ct,vt=>vt.selected).map(vt=>vt[yt]):Ct.selectedIndex===-1?null:Ct[Ct.selectedIndex][yt]};let At=gt(!1);const xt=Et=>{const yt=Et.target.options;return Array.prototype.map.call(yt,Ct=>({displayValue:Ct.textContent,exportValue:Ct.value}))};return this.enableScripting&&this.hasJSActions?(nt.addEventListener("updatefromsandbox",Et=>{const yt={value(Ct){ht==null||ht();const kt=Ct.detail.value,vt=new Set(Array.isArray(kt)?kt:[kt]);for(const bt of nt.options)bt.selected=vt.has(bt.value);Le.setValue(Ye,{value:gt(!0)}),At=gt(!1)},multipleSelection(Ct){nt.multiple=!0},remove(Ct){const kt=nt.options,vt=Ct.detail.remove;kt[vt].selected=!1,nt.remove(vt),kt.length>0&&Array.prototype.findIndex.call(kt,It=>It.selected)===-1&&(kt[0].selected=!0),Le.setValue(Ye,{value:gt(!0),items:xt(Ct)}),At=gt(!1)},clear(Ct){for(;nt.length!==0;)nt.remove(0);Le.setValue(Ye,{value:null,items:[]}),At=gt(!1)},insert(Ct){const{index:kt,displayValue:vt,exportValue:bt}=Ct.detail.insert,It=nt.children[kt],wt=document.createElement("option");wt.textContent=vt,wt.value=bt,It?It.before(wt):nt.append(wt),Le.setValue(Ye,{value:gt(!0),items:xt(Ct)}),At=gt(!1)},items(Ct){const{items:kt}=Ct.detail;for(;nt.length!==0;)nt.remove(0);for(const vt of kt){const{displayValue:bt,exportValue:It}=vt,wt=document.createElement("option");wt.textContent=bt,wt.value=It,nt.append(wt)}nt.options.length>0&&(nt.options[0].selected=!0),Le.setValue(Ye,{value:gt(!0),items:xt(Ct)}),At=gt(!1)},indices(Ct){const kt=new Set(Ct.detail.indices);for(const vt of Ct.target.options)vt.selected=kt.has(vt.index);Le.setValue(Ye,{value:gt(!0)}),At=gt(!1)},editable(Ct){Ct.target.disabled=!Ct.detail.editable}};this._dispatchEventFromSandbox(yt,Et)}),nt.addEventListener("input",Et=>{var kt;const yt=gt(!0),Ct=gt(!1);Le.setValue(Ye,{value:yt}),Et.preventDefault(),(kt=this.linkService.eventBus)==null||kt.dispatch("dispatcheventinsandbox",{source:this,detail:{id:Ye,name:"Keystroke",value:At,change:Ct,changeEx:yt,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(nt,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],Et=>Et.target.value)):nt.addEventListener("input",function(Et){Le.setValue(Ye,{value:gt(!0)})}),this.data.combo&&this._setTextStyle(nt),this._setBackgroundColor(nt),this._setDefaultPropertiesFromJS(nt),this.container.append(nt),this.container}}class PopupAnnotationElement extends AnnotationElement{constructor(Le){const{data:Ye,elements:tt}=Le;super(Le,{isRenderable:AnnotationElement._hasPopupData(Ye)}),this.elements=tt,this.popup=null}render(){this.container.classList.add("popupAnnotation");const Le=this.popup=new PopupElement({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),Ye=[];for(const tt of this.elements)tt.popup=Le,tt.container.ariaHasPopup="dialog",Ye.push(tt.data.id),tt.addHighlightArea();return this.container.setAttribute("aria-controls",Ye.map(tt=>`${AnnotationPrefix}${tt}`).join(",")),this.container}}class PopupElement{constructor({container:Le,color:Ye,elements:tt,titleObj:nt,modificationDate:ft,contentsObj:ht,richText:gt,parent:At,rect:xt,parentRect:Et,open:yt}){k0(this,wr);k0(this,al,y0(this,wr,N4).bind(this));k0(this,ud,y0(this,wr,cp).bind(this));k0(this,dd,y0(this,wr,d3).bind(this));k0(this,il,y0(this,wr,u3).bind(this));k0(this,H2,null);k0(this,$r,null);k0(this,zs,null);k0(this,sl,null);k0(this,jc,null);k0(this,Fc,null);k0(this,ol,null);k0(this,Ws,!1);k0(this,zi,null);k0(this,Xs,null);k0(this,Qc,null);k0(this,$s,null);k0(this,Uc,null);k0(this,G2,null);k0(this,z2,!1);var Ct;C0(this,$r,Le),C0(this,Uc,nt),C0(this,zs,ht),C0(this,$s,gt),C0(this,Fc,At),C0(this,H2,Ye),C0(this,Qc,xt),C0(this,ol,Et),C0(this,jc,tt),C0(this,sl,PDFDateString.toDateObject(ft)),this.trigger=tt.flatMap(kt=>kt.getElementsToTriggerPopup());for(const kt of this.trigger)kt.addEventListener("click",Ht(this,il)),kt.addEventListener("mouseenter",Ht(this,dd)),kt.addEventListener("mouseleave",Ht(this,ud)),kt.classList.add("popupTriggerArea");for(const kt of tt)(Ct=kt.container)==null||Ct.addEventListener("keydown",Ht(this,al));Ht(this,$r).hidden=!0,yt&&y0(this,wr,u3).call(this)}render(){if(Ht(this,zi))return;const Le=C0(this,zi,document.createElement("div"));if(Le.className="popup",Ht(this,H2)){const ft=Le.style.outlineColor=Util.makeHexColor(...Ht(this,H2));CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?Le.style.backgroundColor=`color-mix(in srgb, ${ft} 30%, white)`:Le.style.backgroundColor=Util.makeHexColor(...Ht(this,H2).map(gt=>Math.floor(.7*(255-gt)+gt)))}const Ye=document.createElement("span");Ye.className="header";const tt=document.createElement("h1");if(Ye.append(tt),{dir:tt.dir,str:tt.textContent}=Ht(this,Uc),Le.append(Ye),Ht(this,sl)){const ft=document.createElement("span");ft.classList.add("popupDate"),ft.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),ft.setAttribute("data-l10n-args",JSON.stringify({dateObj:Ht(this,sl).valueOf()})),Ye.append(ft)}const nt=Ht(this,wr,c3);if(nt)XfaLayer.render({xfaHtml:nt,intent:"richText",div:Le}),Le.lastChild.classList.add("richText","popupContent");else{const ft=this._formatContents(Ht(this,zs));Le.append(ft)}Ht(this,$r).append(Le)}_formatContents({str:Le,dir:Ye}){const tt=document.createElement("p");tt.classList.add("popupContent"),tt.dir=Ye;const nt=Le.split(/(?:\r\n?|\n)/);for(let ft=0,ht=nt.length;ft<ht;++ft){const gt=nt[ft];tt.append(document.createTextNode(gt)),ft<ht-1&&tt.append(document.createElement("br"))}return tt}updateEdited({rect:Le,popupContent:Ye}){var tt;Ht(this,G2)||C0(this,G2,{contentsObj:Ht(this,zs),richText:Ht(this,$s)}),Le&&C0(this,Xs,null),Ye&&(C0(this,$s,y0(this,wr,O4).call(this,Ye)),C0(this,zs,null)),(tt=Ht(this,zi))==null||tt.remove(),C0(this,zi,null)}resetEdited(){var Le;Ht(this,G2)&&({contentsObj:Va(this,zs)._,richText:Va(this,$s)._}=Ht(this,G2),C0(this,G2,null),(Le=Ht(this,zi))==null||Le.remove(),C0(this,zi,null),C0(this,Xs,null))}forceHide(){C0(this,z2,this.isVisible),Ht(this,z2)&&(Ht(this,$r).hidden=!0)}maybeShow(){Ht(this,z2)&&(Ht(this,zi)||y0(this,wr,d3).call(this),C0(this,z2,!1),Ht(this,$r).hidden=!1)}get isVisible(){return Ht(this,$r).hidden===!1}}al=new WeakMap,ud=new WeakMap,dd=new WeakMap,il=new WeakMap,H2=new WeakMap,$r=new WeakMap,zs=new WeakMap,sl=new WeakMap,jc=new WeakMap,Fc=new WeakMap,ol=new WeakMap,Ws=new WeakMap,zi=new WeakMap,Xs=new WeakMap,Qc=new WeakMap,$s=new WeakMap,Uc=new WeakMap,G2=new WeakMap,z2=new WeakMap,wr=new WeakSet,c3=function(){const Le=Ht(this,$s),Ye=Ht(this,zs);return Le!=null&&Le.str&&(!(Ye!=null&&Ye.str)||Ye.str===Le.str)&&Ht(this,$s).html||null},lp=function(){var Le,Ye,tt;return((tt=(Ye=(Le=Ht(this,wr,c3))==null?void 0:Le.attributes)==null?void 0:Ye.style)==null?void 0:tt.fontSize)||0},B4=function(){var Le,Ye,tt;return((tt=(Ye=(Le=Ht(this,wr,c3))==null?void 0:Le.attributes)==null?void 0:Ye.style)==null?void 0:tt.color)||null},O4=function(Le){const Ye=[],tt={str:Le,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:Ye}]}},nt={style:{color:Ht(this,wr,B4),fontSize:Ht(this,wr,lp)?`calc(${Ht(this,wr,lp)}px * var(--scale-factor))`:""}};for(const ft of Le.split(`
|
|
4017
4017
|
`))Ye.push({name:"span",value:ft,attributes:nt});return tt},N4=function(Le){Le.altKey||Le.shiftKey||Le.ctrlKey||Le.metaKey||(Le.key==="Enter"||Le.key==="Escape"&&Ht(this,Ws))&&y0(this,wr,u3).call(this)},D4=function(){if(Ht(this,Xs)!==null)return;const{page:{view:Le},viewport:{rawDims:{pageWidth:Ye,pageHeight:tt,pageX:nt,pageY:ft}}}=Ht(this,Fc);let ht=!!Ht(this,ol),gt=ht?Ht(this,ol):Ht(this,Qc);for(const vt of Ht(this,jc))if(!gt||Util.intersect(vt.data.rect,gt)!==null){gt=vt.data.rect,ht=!0;break}const At=Util.normalizeRect([gt[0],Le[3]-gt[1]+Le[1],gt[2],Le[3]-gt[3]+Le[1]]),Et=ht?gt[2]-gt[0]+5:0,yt=At[0]+Et,Ct=At[1];C0(this,Xs,[100*(yt-nt)/Ye,100*(Ct-ft)/tt]);const{style:kt}=Ht(this,$r);kt.left=`${Ht(this,Xs)[0]}%`,kt.top=`${Ht(this,Xs)[1]}%`},u3=function(){C0(this,Ws,!Ht(this,Ws)),Ht(this,Ws)?(y0(this,wr,d3).call(this),Ht(this,$r).addEventListener("click",Ht(this,il)),Ht(this,$r).addEventListener("keydown",Ht(this,al))):(y0(this,wr,cp).call(this),Ht(this,$r).removeEventListener("click",Ht(this,il)),Ht(this,$r).removeEventListener("keydown",Ht(this,al)))},d3=function(){Ht(this,zi)||this.render(),this.isVisible?Ht(this,Ws)&&Ht(this,$r).classList.add("focused"):(y0(this,wr,D4).call(this),Ht(this,$r).hidden=!1,Ht(this,$r).style.zIndex=parseInt(Ht(this,$r).style.zIndex)+1e3)},cp=function(){Ht(this,$r).classList.remove("focused"),!(Ht(this,Ws)||!this.isVisible)&&(Ht(this,$r).hidden=!0,Ht(this,$r).style.zIndex=parseInt(Ht(this,$r).style.zIndex)-1e3)};class FreeTextAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0}),this.textContent=Le.data.textContent,this.textPosition=Le.data.textPosition,this.annotationEditorType=AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const Le=document.createElement("div");Le.classList.add("annotationTextContent"),Le.setAttribute("role","comment");for(const Ye of this.textContent){const tt=document.createElement("span");tt.textContent=Ye,Le.append(tt)}this.container.append(Le)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class LineAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});k0(this,Vc,null)}render(){this.container.classList.add("lineAnnotation");const Ye=this.data,{width:tt,height:nt}=getRectDims(Ye.rect),ft=this.svgFactory.create(tt,nt,!0),ht=C0(this,Vc,this.svgFactory.createElement("svg:line"));return ht.setAttribute("x1",Ye.rect[2]-Ye.lineCoordinates[0]),ht.setAttribute("y1",Ye.rect[3]-Ye.lineCoordinates[1]),ht.setAttribute("x2",Ye.rect[2]-Ye.lineCoordinates[2]),ht.setAttribute("y2",Ye.rect[3]-Ye.lineCoordinates[3]),ht.setAttribute("stroke-width",Ye.borderStyle.width||1),ht.setAttribute("stroke","transparent"),ht.setAttribute("fill","transparent"),ft.append(ht),this.container.append(ft),!Ye.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Ht(this,Vc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Vc=new WeakMap;class SquareAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});k0(this,Hc,null)}render(){this.container.classList.add("squareAnnotation");const Ye=this.data,{width:tt,height:nt}=getRectDims(Ye.rect),ft=this.svgFactory.create(tt,nt,!0),ht=Ye.borderStyle.width,gt=C0(this,Hc,this.svgFactory.createElement("svg:rect"));return gt.setAttribute("x",ht/2),gt.setAttribute("y",ht/2),gt.setAttribute("width",tt-ht),gt.setAttribute("height",nt-ht),gt.setAttribute("stroke-width",ht||1),gt.setAttribute("stroke","transparent"),gt.setAttribute("fill","transparent"),ft.append(gt),this.container.append(ft),!Ye.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Ht(this,Hc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Hc=new WeakMap;class CircleAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});k0(this,Gc,null)}render(){this.container.classList.add("circleAnnotation");const Ye=this.data,{width:tt,height:nt}=getRectDims(Ye.rect),ft=this.svgFactory.create(tt,nt,!0),ht=Ye.borderStyle.width,gt=C0(this,Gc,this.svgFactory.createElement("svg:ellipse"));return gt.setAttribute("cx",tt/2),gt.setAttribute("cy",nt/2),gt.setAttribute("rx",tt/2-ht/2),gt.setAttribute("ry",nt/2-ht/2),gt.setAttribute("stroke-width",ht||1),gt.setAttribute("stroke","transparent"),gt.setAttribute("fill","transparent"),ft.append(gt),this.container.append(ft),!Ye.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Ht(this,Gc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Gc=new WeakMap;class PolylineAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});k0(this,zc,null);this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:Ye,vertices:tt,borderStyle:nt,popupRef:ft}}=this;if(!tt)return this.container;const{width:ht,height:gt}=getRectDims(Ye),At=this.svgFactory.create(ht,gt,!0);let xt=[];for(let yt=0,Ct=tt.length;yt<Ct;yt+=2){const kt=tt[yt]-Ye[0],vt=Ye[3]-tt[yt+1];xt.push(`${kt},${vt}`)}xt=xt.join(" ");const Et=C0(this,zc,this.svgFactory.createElement(this.svgElementName));return Et.setAttribute("points",xt),Et.setAttribute("stroke-width",nt.width||1),Et.setAttribute("stroke","transparent"),Et.setAttribute("fill","transparent"),At.append(Et),this.container.append(At),!ft&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return Ht(this,zc)}addHighlightArea(){this.container.classList.add("highlightArea")}}zc=new WeakMap;class PolygonAnnotationElement extends PolylineAnnotationElement{constructor(Le){super(Le),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class CaretAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class InkAnnotationElement extends AnnotationElement{constructor(Ye){super(Ye,{isRenderable:!0,ignoreBorder:!0});k0(this,Wc,[]);this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?AnnotationEditorType.HIGHLIGHT:AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:Ye,inkLists:tt,borderStyle:nt,popupRef:ft}}=this,{width:ht,height:gt}=getRectDims(Ye),At=this.svgFactory.create(ht,gt,!0);for(const xt of tt){let Et=[];for(let Ct=0,kt=xt.length;Ct<kt;Ct+=2){const vt=xt[Ct]-Ye[0],bt=Ye[3]-xt[Ct+1];Et.push(`${vt},${bt}`)}Et=Et.join(" ");const yt=this.svgFactory.createElement(this.svgElementName);Ht(this,Wc).push(yt),yt.setAttribute("points",Et),yt.setAttribute("stroke-width",nt.width||1),yt.setAttribute("stroke","transparent"),yt.setAttribute("fill","transparent"),At.append(yt)}return!ft&&this.hasPopupData&&this._createPopup(),this.container.append(At),this._editOnDoubleClick(),this.container}getElementsToTriggerPopup(){return Ht(this,Wc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Wc=new WeakMap;class HighlightAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=AnnotationEditorType.HIGHLIGHT}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),this.container}}class UnderlineAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class SquigglyAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class StrikeOutAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class StampAnnotationElement extends AnnotationElement{constructor(Le){super(Le,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=AnnotationEditorType.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class FileAttachmentAnnotationElement extends AnnotationElement{constructor(Ye){var nt;super(Ye,{isRenderable:!0});k0(this,$c);k0(this,Xc,null);const{file:tt}=this.data;this.filename=tt.filename,this.content=tt.content,(nt=this.linkService.eventBus)==null||nt.dispatch("fileattachmentannotation",{source:this,...tt})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:Ye,data:tt}=this;let nt;tt.hasAppearance||tt.fillAlpha===0?nt=document.createElement("div"):(nt=document.createElement("img"),nt.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(tt.name)?"paperclip":"pushpin"}.svg`,tt.fillAlpha&&tt.fillAlpha<1&&(nt.style=`filter: opacity(${Math.round(tt.fillAlpha*100)}%);`)),nt.addEventListener("dblclick",y0(this,$c,up).bind(this)),C0(this,Xc,nt);const{isMac:ft}=util_FeatureTest.platform;return Ye.addEventListener("keydown",ht=>{ht.key==="Enter"&&(ft?ht.metaKey:ht.ctrlKey)&&y0(this,$c,up).call(this)}),!tt.popupRef&&this.hasPopupData?this._createPopup():nt.classList.add("popupTriggerArea"),Ye.append(nt),Ye}getElementsToTriggerPopup(){return Ht(this,Xc)}addHighlightArea(){this.container.classList.add("highlightArea")}}Xc=new WeakMap,$c=new WeakSet,up=function(){var Ye;(Ye=this.downloadManager)==null||Ye.openOrDownloadData(this.content,this.filename)};let AnnotationLayer$1=(_p=class{constructor({div:Le,accessibilityManager:Ye,annotationCanvasMap:tt,annotationEditorUIManager:nt,page:ft,viewport:ht,structTreeLayer:gt}){k0(this,$2);k0(this,Kc,null);k0(this,W2,null);k0(this,X2,new Map);k0(this,qc,null);this.div=Le,C0(this,Kc,Ye),C0(this,W2,tt),C0(this,qc,gt||null),this.page=ft,this.viewport=ht,this.zIndex=0,this._annotationEditorUIManager=nt}hasEditableAnnotations(){return Ht(this,X2).size>0}async render(Le){var ht;const{annotations:Ye}=Le,tt=this.div;setLayerDimensions(tt,this.viewport);const nt=new Map,ft={data:null,layer:tt,linkService:Le.linkService,downloadManager:Le.downloadManager,imageResourcesPath:Le.imageResourcesPath||"",renderForms:Le.renderForms!==!1,svgFactory:new DOMSVGFactory,annotationStorage:Le.annotationStorage||new AnnotationStorage,enableScripting:Le.enableScripting===!0,hasJSActions:Le.hasJSActions,fieldObjects:Le.fieldObjects,parent:this,elements:null};for(const gt of Ye){if(gt.noHTML)continue;const At=gt.annotationType===AnnotationType.POPUP;if(At){const yt=nt.get(gt.id);if(!yt)continue;ft.elements=yt}else{const{width:yt,height:Ct}=getRectDims(gt.rect);if(yt<=0||Ct<=0)continue}ft.data=gt;const xt=AnnotationElementFactory.create(ft);if(!xt.isRenderable)continue;if(!At&>.popupRef){const yt=nt.get(gt.popupRef);yt?yt.push(xt):nt.set(gt.popupRef,[xt])}const Et=xt.render();gt.hidden&&(Et.style.visibility="hidden"),await y0(this,$2,L4).call(this,Et,gt.id),xt._isEditable&&(Ht(this,X2).set(xt.data.id,xt),(ht=this._annotationEditorUIManager)==null||ht.renderAnnotationElement(xt))}y0(this,$2,dp).call(this)}update({viewport:Le}){const Ye=this.div;this.viewport=Le,setLayerDimensions(Ye,{rotation:Le.rotation}),y0(this,$2,dp).call(this),Ye.hidden=!1}getEditableAnnotations(){return Array.from(Ht(this,X2).values())}getEditableAnnotation(Le){return Ht(this,X2).get(Le)}},Kc=new WeakMap,W2=new WeakMap,X2=new WeakMap,qc=new WeakMap,$2=new WeakSet,L4=async function(Le,Ye){var ht,gt;const tt=Le.firstChild||Le,nt=tt.id=`${AnnotationPrefix}${Ye}`,ft=await((ht=Ht(this,qc))==null?void 0:ht.getAriaAttributes(nt));if(ft)for(const[At,xt]of ft)tt.setAttribute(At,xt);this.div.append(Le),(gt=Ht(this,Kc))==null||gt.moveElementInDOM(this.div,Le,tt,!1)},dp=function(){if(!Ht(this,W2))return;const Le=this.div;for(const[Ye,tt]of Ht(this,W2)){const nt=Le.querySelector(`[data-annotation-id="${Ye}"]`);if(!nt)continue;tt.className="annotationContent";const{firstChild:ft}=nt;ft?ft.nodeName==="CANVAS"?ft.replaceWith(tt):ft.classList.contains("annotationContent")?ft.after(tt):ft.before(tt):nt.append(tt)}Ht(this,W2).clear()},_p);const EOL_PATTERN=/\r\n?|\n/g,Or=class Or extends AnnotationEditor{constructor(Ye){super({...Ye,name:"freeTextEditor"});k0(this,Jr);k0(this,Wi);k0(this,oi,"");k0(this,Yc,`${this.id}-editor`);k0(this,K2,null);k0(this,li);C0(this,Wi,Ye.color||Or._defaultColor||AnnotationEditor._defaultLineColor),C0(this,li,Ye.fontSize||Or._defaultFontSize)}static get _keyboardManager(){const Ye=Or.prototype,tt=ht=>ht.isEmpty(),nt=AnnotationEditorUIManager.TRANSLATE_SMALL,ft=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],Ye.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],Ye.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],Ye._translateEmpty,{args:[-nt,0],checker:tt}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],Ye._translateEmpty,{args:[-ft,0],checker:tt}],[["ArrowRight","mac+ArrowRight"],Ye._translateEmpty,{args:[nt,0],checker:tt}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],Ye._translateEmpty,{args:[ft,0],checker:tt}],[["ArrowUp","mac+ArrowUp"],Ye._translateEmpty,{args:[0,-nt],checker:tt}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],Ye._translateEmpty,{args:[0,-ft],checker:tt}],[["ArrowDown","mac+ArrowDown"],Ye._translateEmpty,{args:[0,nt],checker:tt}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],Ye._translateEmpty,{args:[0,ft],checker:tt}]]))}static initialize(Ye,tt){AnnotationEditor.initialize(Ye,tt);const nt=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(nt.getPropertyValue("--freetext-padding"))}static updateDefaultParams(Ye,tt){switch(Ye){case AnnotationEditorParamsType.FREETEXT_SIZE:Or._defaultFontSize=tt;break;case AnnotationEditorParamsType.FREETEXT_COLOR:Or._defaultColor=tt;break}}updateParams(Ye,tt){switch(Ye){case AnnotationEditorParamsType.FREETEXT_SIZE:y0(this,Jr,P4).call(this,tt);break;case AnnotationEditorParamsType.FREETEXT_COLOR:y0(this,Jr,_4).call(this,tt);break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,Or._defaultFontSize],[AnnotationEditorParamsType.FREETEXT_COLOR,Or._defaultColor||AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,Ht(this,li)],[AnnotationEditorParamsType.FREETEXT_COLOR,Ht(this,Wi)]]}_translateEmpty(Ye,tt){this._uiManager.translateSelectedEditors(Ye,tt,!0)}getInitialTranslation(){const Ye=this.parentScale;return[-Or._internalPadding*Ye,-(Or._internalPadding+Ht(this,li))*Ye]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(this.isInEditMode())return;this.parent.setEditingState(!1),this.parent.updateToolbar(AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),C0(this,K2,new AbortController);const Ye=this._uiManager.combinedSignal(Ht(this,K2));this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:Ye}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:Ye}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:Ye}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:Ye}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:Ye})}disableEditMode(){var Ye;this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",Ht(this,Yc)),this._isDraggable=!0,(Ye=Ht(this,K2))==null||Ye.abort(),C0(this,K2,null),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(Ye){this._focusEventsAllowed&&(super.focusin(Ye),Ye.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var Ye;this.width||(this.enableEditMode(),this.editorDiv.focus(),(Ye=this._initialOptions)!=null&&Ye.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const Ye=Ht(this,oi),tt=C0(this,oi,y0(this,Jr,M4).call(this).trimEnd());if(Ye===tt)return;const nt=ft=>{if(C0(this,oi,ft),!ft){this.remove();return}y0(this,Jr,h3).call(this),this._uiManager.rebuild(this),y0(this,Jr,p3).call(this)};this.addCommands({cmd:()=>{nt(tt)},undo:()=>{nt(Ye)},mustExec:!1}),y0(this,Jr,p3).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(Ye){this.enterInEditMode()}keydown(Ye){Ye.target===this.div&&Ye.key==="Enter"&&(this.enterInEditMode(),Ye.preventDefault())}editorDivKeydown(Ye){Or._keyboardManager.exec(this,Ye)}editorDivFocus(Ye){this.isEditing=!0}editorDivBlur(Ye){this.isEditing=!1}editorDivInput(Ye){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let Ye,tt;this.width&&(Ye=this.x,tt=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",Ht(this,Yc)),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:nt}=this.editorDiv;if(nt.fontSize=`calc(${Ht(this,li)}px * var(--scale-factor))`,nt.color=Ht(this,Wi),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),bindEvents(this,this.div,["dblclick","keydown"]),this.width){const[ft,ht]=this.parentDimensions;if(this.annotationElementId){const{position:gt}=this._initialData;let[At,xt]=this.getInitialTranslation();[At,xt]=this.pageTranslationToScreen(At,xt);const[Et,yt]=this.pageDimensions,[Ct,kt]=this.pageTranslation;let vt,bt;switch(this.rotation){case 0:vt=Ye+(gt[0]-Ct)/Et,bt=tt+this.height-(gt[1]-kt)/yt;break;case 90:vt=Ye+(gt[0]-Ct)/Et,bt=tt-(gt[1]-kt)/yt,[At,xt]=[xt,-At];break;case 180:vt=Ye-this.width+(gt[0]-Ct)/Et,bt=tt-(gt[1]-kt)/yt,[At,xt]=[-At,-xt];break;case 270:vt=Ye+(gt[0]-Ct-this.height*yt)/Et,bt=tt+(gt[1]-kt-this.width*Et)/yt,[At,xt]=[-xt,At];break}this.setAt(vt*ft,bt*ht,At,xt)}else this.setAt(Ye*ft,tt*ht,this.width*ft,this.height*ht);y0(this,Jr,h3).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}editorDivPaste(Ye){var vt,bt,It;const tt=Ye.clipboardData||window.clipboardData,{types:nt}=tt;if(nt.length===1&&nt[0]==="text/plain")return;Ye.preventDefault();const ft=y0(vt=Or,Ks,pp).call(vt,tt.getData("text")||"").replaceAll(EOL_PATTERN,`
|