@zeniai/web-cockpit-ui 2.2.85-prod → 2.2.86-dev
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/assets/CreditAgentRoutes-DVK05wzd.js +4 -0
- package/dist/assets/{Preview-C87fss3s.js → Preview-C3mogCl7.js} +1 -1
- package/dist/assets/{ScreenRoutes-D0DCex3b.js → ScreenRoutes-BDGsW7bh.js} +3 -3
- package/dist/assets/SignInScreen-B1vBHooR.js +1 -0
- package/dist/assets/{analytics-Dv6GSt6p.js → analytics-Bj_rJm9Z.js} +1 -1
- package/dist/assets/{analyticsHelper-BhOHT3Pf.js → analyticsHelper-kX1v1J50.js} +1 -1
- package/dist/assets/{core-BJaW7og8.js → core-YUrKrvFN.js} +1 -1
- package/dist/assets/{dash.all.min-DUM9Z2Kv.js → dash.all.min-DQAsE-z7.js} +1 -1
- package/dist/assets/{empty-CMizcH8e.js → empty-D5aJp-dl.js} +1 -1
- package/dist/assets/{empty-QMDeLXcb.js → empty-UXCszasc.js} +1 -1
- package/dist/assets/epic-DmXasjZd.js +2 -0
- package/dist/assets/{index-CsfKltgB.js → index-4Gwk2AsQ.js} +1 -1
- package/dist/assets/{index-CtZnR1fi.js → index-BfGC71zy.js} +1 -1
- package/dist/assets/{index-B5H93U1P.js → index-BhCBsLMw.js} +2 -2
- package/dist/assets/{index-BP90QcpP.js → index-Cq3K0p9F.js} +1 -1
- package/dist/assets/{index-DgpkkkrA.js → index-DSt-Ar3e.js} +1 -1
- package/dist/assets/{index-BYQLHBT7.js → index-NzlQkOcd.js} +8 -8
- package/dist/assets/{index-C9g30wO0.js → index-mhh4sXEX.js} +1 -1
- package/dist/assets/{lexical-Bg4f4SdF.js → lexical-CCz0WrLz.js} +1 -1
- package/dist/assets/{liveblocks-OzRoYgpI.js → liveblocks-DUIjr5gg.js} +1 -1
- package/dist/assets/{lottie-Cu59chq9.js → lottie-Z4l1fO_H.js} +1 -1
- package/dist/assets/{mui-nq7xMQGX.js → mui-DgE_q3_s.js} +1 -1
- package/dist/assets/{react-D1SnxGje.js → react-8Z7SRL1T.js} +1 -1
- package/dist/assets/{react-D9GlvWcO.js → react-BWHU-m1i.js} +1 -1
- package/dist/assets/{react-BxXelrYe.js → react-BatFF67-.js} +1 -1
- package/dist/assets/{react-DVl5_0TF.js → react-BoA6FreU.js} +1 -1
- package/dist/assets/{react-C9SF_2f5.js → react-Bs1D6ait.js} +1 -1
- package/dist/assets/{react-DbRg0F2Q.js → react-Bx4fgib_.js} +2 -2
- package/dist/assets/{react-DCU_bbfe.js → react-CYi68l9E.js} +1 -1
- package/dist/assets/{react-Byo0fUco.js → react-PLZS4Krs.js} +1 -1
- package/dist/assets/{recharts-BO1t-dIh.js → recharts-DTU5HhCK.js} +1 -1
- package/dist/assets/{sentry-Dux2yZ_T.js → sentry-DmwgbQso.js} +1 -1
- package/dist/assets/{url-CpHhDEQU.js → url-DLzso7lY.js} +1 -1
- package/dist/assets/{url-DjUMKG_g.js → url-DSTijktM.js} +1 -1
- package/dist/assets/{utils-BMuyIqNr.js → utils-BMMMDr1T.js} +1 -1
- package/dist/assets/{zeni-epic-state-BDc5fyK0.js → zeni-epic-state-0DOV9t3Z.js} +4 -4
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/CreditAgentRoutes-C-J2ULu6.js +0 -4
- package/dist/assets/SignInScreen-DNfbPV4r.js +0 -1
- package/dist/assets/epic-DUnjX59U.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/empty-
|
|
2
|
-
import{R as A,b as If,a as g,r as dd,g as mY,p as Xu,d as iee,f as VWe,s as ree,w as QWe,i as UWe,S as WWe,j as GWe,k as YWe,l as KWe,m as qWe}from"./sentry-Dux2yZ_T.js";import{j as fo,_ as wbe,a as Ud,u as bbe,T as ZWe,C as JWe,b as XWe,c as lL,d as dL,e as eGe,f as tGe,g as vbe,h as oGe,i as iGe,L as rGe,k as nee,l as nGe,m as aGe,n as sGe,P as lGe,o as dGe,p as cGe,q as Cbe,r as pGe,s as hGe,I as aee,t as uGe,v as mGe,w as gGe,x as fGe,y as xGe,z as yGe,A as Abe,B as wGe,D as bGe,E as vGe}from"./liveblocks-OzRoYgpI.js";import{f as $be,r as Pn,P as fn,R as CGe,u as cL,g as Ph,h as AGe,i as gY,j as $Ge,k as kGe,l as VB,N as SGe,m as EGe,n as LGe,B as IGe}from"./core-BJaW7og8.js";import{H as jk,ba as rf,bb as jGe,bc as see,bd as Gf,be as ci,bf as kbe,bg as Bi,bh as pL,bi as MGe,bj as qh,bk as BGe,bl as DGe,bm as c6,bn as Cm,bo as i8,bp as Sbe,bq as TGe,br as w1,bs as Ebe,bt as PGe,bu as Yf,bv as eb,bw as Wr,bx as p6,by as ph,bz as lee,bA as zGe,bB as RGe,bC as Mk,bD as dQ,bE as FGe,bF as OGe,bG as NGe,bH as HGe,bI as fY,bJ as Lbe,bK as _Ge,bL as $y,bM as VGe,bN as Ibe,bO as cQ,bP as dee,bQ as cee,bR as pee,bS as Ja,bT as xY,bU as jbe,bV as Mbe,bW as yY,bX as r8,bY as hL,bZ as wY,b_ as bY,b$ as vY,c0 as CY,c1 as QGe,c2 as pQ,c3 as UGe,c4 as Bbe,c5 as uL,c6 as j1,c7 as M1,c8 as Bk,c9 as Dbe,ca as Tbe,cb as WGe,cc as AY,cd as $Y,ce as GGe,cf as YGe,cg as A1,ch as tb,ci as ob,cj as KGe,ck as qGe,cl as ZGe,cm as JGe,cn as XGe,co as eYe,cp as tYe,cq as Fv,cr as Pbe,cs as zbe,ct as oYe,cu as iYe,cv as Rbe,cw as Fbe,cx as rYe,cy as nYe,cz as aYe,cA as Obe,cB as Nbe,cC as sYe,cD as lYe,cE as Hbe,cF as _be,cG as dYe,cH as hee,cI as cYe,cJ as pYe,cK as Jy,cL as hYe,cM as Vbe,cN as uYe,cO as Qbe,cP as mYe,cQ as uee,cR as gYe,cS as Ube,cT as Wbe,cU as Gbe,cV as Ybe,cW as Kbe,cX as fYe,cY as qbe,cZ as xYe,c_ as yYe,c$ as wYe,d0 as Zbe,d1 as hQ,d2 as bYe,d3 as Jbe,d4 as Xbe,d5 as vYe,d6 as CYe,d7 as AYe,d8 as $Ye,d9 as kYe,da as SYe,db as EYe,dc as LYe,v as IYe,dd as mL,de as uQ,df as mQ,dg as jYe,dh as MYe,di as BYe,dj as DYe,dk as TYe,dl as PYe,dm as zYe,dn as RYe,dp as FYe,dq as OYe,dr as mee,ds as NYe,dt as HYe,du as _Ye,dv as VYe,dw as QYe}from"./zeni-epic-state-BDc5fyK0.js";import{j as Ho,c as de,k as _t,u as lt,n as r,F as UYe,C as ni,a as eve,b as gee,T as WYe,d as tve,e as ove,f as ive,g as GYe,M as rve,G as gL,h as YYe,P as Kf,i as jf,S as nve,l as KYe,m as qYe,o as ZYe,p as JYe,D as XYe,q as eKe,s as ave}from"./mui-nq7xMQGX.js";import{r as tKe,m as hh}from"./analytics-Dv6GSt6p.js";import{L as gQ}from"./lottie-Cu59chq9.js";import{r as ma}from"./lexical-Bg4f4SdF.js";import{F as Or,c as fL,P as oKe,R as fQ,G as Dk,X as bn,Y as vn,H as rd,I as Tk,J as hm,K as K1,L as sve,M as iKe,N as rKe,O as vs,Q as kY,S as SY,U as B1,V as nKe}from"./recharts-BO1t-dIh.js";import{r as aKe}from"./utils-BMuyIqNr.js";(function(){try{var e=typeof window<"u"?window:typeof If<"u"?If:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f1fdfb12-ed37-4f95-8cfd-c7fe95b740ae",e._sentryDebugIdIdentifier="sentry-dbid-f1fdfb12-ed37-4f95-8cfd-c7fe95b740ae")}catch{}})();(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&n(d)}).observe(document,{childList:!0,subtree:!0});function i(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(a){if(a.ep)return;a.ep=!0;const l=i(a);fetch(a.href,l)}})();var Ov={},fee;function sKe(){if(fee)return Ov;fee=1;var e=$be();return Ov.createRoot=e.createRoot,Ov.hydrateRoot=e.hydrateRoot,Ov}var lKe=sKe(),Kl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof If<"u"?If:typeof self<"u"?self:{};function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xee={exports:{}},t9={},yee;function dKe(){if(yee)return t9;yee=1;var e=A,t=Symbol.for("react.element"),i=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(c,p,h){var u,m={},f=null,x=null;h!==void 0&&(f=""+h),p.key!==void 0&&(f=""+p.key),p.ref!==void 0&&(x=p.ref);for(u in p)n.call(p,u)&&!l.hasOwnProperty(u)&&(m[u]=p[u]);if(c&&c.defaultProps)for(u in p=c.defaultProps,p)m[u]===void 0&&(m[u]=p[u]);return{$$typeof:t,type:c,key:f,ref:x,props:m,_owner:a.current}}return t9.Fragment=i,t9.jsx=d,t9.jsxs=d,t9}var wee;function lve(){return wee||(wee=1,xee.exports=dKe()),xee.exports}var s=lve();const cKe=g.createContext(null),QB={didCatch:!1,error:null};let pKe=class extends g.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=QB}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var i,n,a=arguments.length,l=new Array(a),d=0;d<a;d++)l[d]=arguments[d];(i=(n=this.props).onReset)===null||i===void 0||i.call(n,{args:l,reason:"imperative-api"}),this.setState(QB)}}componentDidCatch(t,i){var n,a;(n=(a=this.props).onError)===null||n===void 0||n.call(a,t,i)}componentDidUpdate(t,i){const{didCatch:n}=this.state,{resetKeys:a}=this.props;if(n&&i.error!==null&&hKe(t.resetKeys,a)){var l,d;(l=(d=this.props).onReset)===null||l===void 0||l.call(d,{next:a,prev:t.resetKeys,reason:"keys"}),this.setState(QB)}}render(){const{children:t,fallbackRender:i,FallbackComponent:n,fallback:a}=this.props,{didCatch:l,error:d}=this.state;let c=t;if(l){const p={error:d,resetErrorBoundary:this.resetErrorBoundary};if(typeof i=="function")c=i(p);else if(n)c=g.createElement(n,p);else if(a!==void 0)c=a;else throw d}return g.createElement(cKe.Provider,{value:{didCatch:l,error:d,resetErrorBoundary:this.resetErrorBoundary}},c)}};function hKe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((i,n)=>!Object.is(i,t[n]))}var Z$={exports:{}},uKe=Z$.exports,bee;function mKe(){return bee||(bee=1,(function(e,t){typeof document<"u"&&typeof navigator<"u"&&(function(i,n){e.exports=n()})(uKe,(function(){var i="http://www.w3.org/2000/svg",n="",a=!1,l=-999999,d=function(M){a=!!M},c=function(){return a},p=function(M){n=M},h=function(){return n};function u(M){return document.createElement(M)}function m(M,_){var K,oe=M.length,se;for(K=0;K<oe;K+=1){se=M[K].prototype;for(var re in se)Object.prototype.hasOwnProperty.call(se,re)&&(_.prototype[re]=se[re])}}function f(M){function _(){}return _.prototype=M,_}var x=(function(){function M(_){this.audios=[],this.audioFactory=_,this._volume=1,this._isMuted=!1}return M.prototype={addAudio:function(_){this.audios.push(_)},pause:function(){var _,K=this.audios.length;for(_=0;_<K;_+=1)this.audios[_].pause()},resume:function(){var _,K=this.audios.length;for(_=0;_<K;_+=1)this.audios[_].resume()},setRate:function(_){var K,oe=this.audios.length;for(K=0;K<oe;K+=1)this.audios[K].setRate(_)},createAudio:function(_){return this.audioFactory?this.audioFactory(_):window.Howl?new window.Howl({src:[_]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(_){this.audioFactory=_},setVolume:function(_){this._volume=_,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var _,K=this.audios.length;for(_=0;_<K;_+=1)this.audios[_].volume(this._volume*(this._isMuted?0:1))}},function(){return new M}})(),y=(function(){function M(K,oe){var se=0,re=[],be;switch(K){case"int16":case"uint8c":be=1;break;default:be=1.1;break}for(se=0;se<oe;se+=1)re.push(be);return re}function _(K,oe){return K==="float32"?new Float32Array(oe):K==="int16"?new Int16Array(oe):K==="uint8c"?new Uint8ClampedArray(oe):M(K,oe)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?_:M})();function w(M){return Array.apply(null,{length:M})}var b=!0,C=null,k="",L=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),S=Math.pow,j=Math.sqrt,I=Math.floor,P=Math.min,B=150,T=Math.PI/180,D=.5519;function R(M,_,K,oe){this.type=M,this.currentTime=_,this.totalTime=K,this.direction=oe<0?-1:1}function G(M,_){this.type=M,this.direction=_<0?-1:1}function q(M,_,K,oe){this.type=M,this.currentLoop=K,this.totalLoops=_,this.direction=oe<0?-1:1}function Z(M,_,K){this.type=M,this.firstFrame=_,this.totalFrames=K}function H(M,_){this.type=M,this.target=_}function V(M,_){this.type="renderFrameError",this.nativeError=M,this.currentTime=_}function N(M){this.type="configError",this.nativeError=M}var O=(function(){var M=0;return function(){return M+=1,k+"__lottie_element_"+M}})();function z(M,_,K){var oe,se,re,be,De,we,Ke,et;switch(be=Math.floor(M*6),De=M*6-be,we=K*(1-_),Ke=K*(1-De*_),et=K*(1-(1-De)*_),be%6){case 0:oe=K,se=et,re=we;break;case 1:oe=Ke,se=K,re=we;break;case 2:oe=we,se=K,re=et;break;case 3:oe=we,se=Ke,re=K;break;case 4:oe=et,se=we,re=K;break;case 5:oe=K,se=we,re=Ke;break}return[oe,se,re]}function F(M,_,K){var oe=Math.max(M,_,K),se=Math.min(M,_,K),re=oe-se,be,De=oe===0?0:re/oe,we=oe/255;switch(oe){case se:be=0;break;case M:be=_-K+re*(_<K?6:0),be/=6*re;break;case _:be=K-M+re*2,be/=6*re;break;case K:be=M-_+re*4,be/=6*re;break}return[be,De,we]}function te(M,_){var K=F(M[0]*255,M[1]*255,M[2]*255);return K[1]+=_,K[1]>1?K[1]=1:K[1]<=0&&(K[1]=0),z(K[0],K[1],K[2])}function Y(M,_){var K=F(M[0]*255,M[1]*255,M[2]*255);return K[2]+=_,K[2]>1?K[2]=1:K[2]<0&&(K[2]=0),z(K[0],K[1],K[2])}function W(M,_){var K=F(M[0]*255,M[1]*255,M[2]*255);return K[0]+=_/360,K[0]>1?K[0]-=1:K[0]<0&&(K[0]+=1),z(K[0],K[1],K[2])}(function(){var M=[],_,K;for(_=0;_<256;_+=1)K=_.toString(16),M[_]=K.length===1?"0"+K:K;return function(oe,se,re){return oe<0&&(oe=0),se<0&&(se=0),re<0&&(re=0),"#"+M[oe]+M[se]+M[re]}})();var ee=function(M){b=!!M},J=function(){return b},ne=function(M){C=M},ye=function(){return C},me=function(M){B=M},he=function(){return B},pe=function(M){k=M};function xe(M){return document.createElementNS(i,M)}function ve(M){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},ve(M)}var le=(function(){var M=1,_=[],K,oe,se={onmessage:function(){},postMessage:function(Le){K({data:Le})}},re={postMessage:function(Le){se.onmessage({data:Le})}};function be(Le){if(window.Worker&&window.Blob&&c()){var nt=new Blob(["var _workerSelf = self; self.onmessage = ",Le.toString()],{type:"text/javascript"}),dt=URL.createObjectURL(nt);return new Worker(dt)}return K=Le,se}function De(){oe||(oe=be(function(Le){function nt(){function ot(Mt,Ut){var Re,Ue,ge=Mt.length,_e,ft,ct,ti;for(Ue=0;Ue<ge;Ue+=1)if(Re=Mt[Ue],"ks"in Re&&!Re.completed){if(Re.completed=!0,Re.hasMask){var go=Re.masksProperties;for(ft=go.length,_e=0;_e<ft;_e+=1)if(go[_e].pt.k.i)Be(go[_e].pt.k);else for(ti=go[_e].pt.k.length,ct=0;ct<ti;ct+=1)go[_e].pt.k[ct].s&&Be(go[_e].pt.k[ct].s[0]),go[_e].pt.k[ct].e&&Be(go[_e].pt.k[ct].e[0])}Re.ty===0?(Re.layers=Ee(Re.refId,Ut),ot(Re.layers,Ut)):Re.ty===4?Se(Re.shapes):Re.ty===5&&lo(Re)}}function ht(Mt,Ut){if(Mt){var Re=0,Ue=Mt.length;for(Re=0;Re<Ue;Re+=1)Mt[Re].t===1&&(Mt[Re].data.layers=Ee(Mt[Re].data.refId,Ut),ot(Mt[Re].data.layers,Ut))}}function Qe(Mt,Ut){for(var Re=0,Ue=Ut.length;Re<Ue;){if(Ut[Re].id===Mt)return Ut[Re];Re+=1}return null}function Ee(Mt,Ut){var Re=Qe(Mt,Ut);return Re?Re.layers.__used?JSON.parse(JSON.stringify(Re.layers)):(Re.layers.__used=!0,Re.layers):null}function Se(Mt){var Ut,Re=Mt.length,Ue,ge;for(Ut=Re-1;Ut>=0;Ut-=1)if(Mt[Ut].ty==="sh")if(Mt[Ut].ks.k.i)Be(Mt[Ut].ks.k);else for(ge=Mt[Ut].ks.k.length,Ue=0;Ue<ge;Ue+=1)Mt[Ut].ks.k[Ue].s&&Be(Mt[Ut].ks.k[Ue].s[0]),Mt[Ut].ks.k[Ue].e&&Be(Mt[Ut].ks.k[Ue].e[0]);else Mt[Ut].ty==="gr"&&Se(Mt[Ut].it)}function Be(Mt){var Ut,Re=Mt.i.length;for(Ut=0;Ut<Re;Ut+=1)Mt.i[Ut][0]+=Mt.v[Ut][0],Mt.i[Ut][1]+=Mt.v[Ut][1],Mt.o[Ut][0]+=Mt.v[Ut][0],Mt.o[Ut][1]+=Mt.v[Ut][1]}function Ye(Mt,Ut){var Re=Ut?Ut.split("."):[100,100,100];return Mt[0]>Re[0]?!0:Re[0]>Mt[0]?!1:Mt[1]>Re[1]?!0:Re[1]>Mt[1]?!1:Mt[2]>Re[2]?!0:Re[2]>Mt[2]?!1:null}var mt=(function(){var Mt=[4,4,14];function Ut(Ue){var ge=Ue.t.d;Ue.t.d={k:[{s:ge,t:0}]}}function Re(Ue){var ge,_e=Ue.length;for(ge=0;ge<_e;ge+=1)Ue[ge].ty===5&&Ut(Ue[ge])}return function(Ue){if(Ye(Mt,Ue.v)&&(Re(Ue.layers),Ue.assets)){var ge,_e=Ue.assets.length;for(ge=0;ge<_e;ge+=1)Ue.assets[ge].layers&&Re(Ue.assets[ge].layers)}}})(),$t=(function(){var Mt=[4,7,99];return function(Ut){if(Ut.chars&&!Ye(Mt,Ut.v)){var Re,Ue=Ut.chars.length;for(Re=0;Re<Ue;Re+=1){var ge=Ut.chars[Re];ge.data&&ge.data.shapes&&(Se(ge.data.shapes),ge.data.ip=0,ge.data.op=99999,ge.data.st=0,ge.data.sr=1,ge.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},Ut.chars[Re].t||(ge.data.shapes.push({ty:"no"}),ge.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}})(),kt=(function(){var Mt=[5,7,15];function Ut(Ue){var ge=Ue.t.p;typeof ge.a=="number"&&(ge.a={a:0,k:ge.a}),typeof ge.p=="number"&&(ge.p={a:0,k:ge.p}),typeof ge.r=="number"&&(ge.r={a:0,k:ge.r})}function Re(Ue){var ge,_e=Ue.length;for(ge=0;ge<_e;ge+=1)Ue[ge].ty===5&&Ut(Ue[ge])}return function(Ue){if(Ye(Mt,Ue.v)&&(Re(Ue.layers),Ue.assets)){var ge,_e=Ue.assets.length;for(ge=0;ge<_e;ge+=1)Ue.assets[ge].layers&&Re(Ue.assets[ge].layers)}}})(),qt=(function(){var Mt=[4,1,9];function Ut(Ue){var ge,_e=Ue.length,ft,ct;for(ge=0;ge<_e;ge+=1)if(Ue[ge].ty==="gr")Ut(Ue[ge].it);else if(Ue[ge].ty==="fl"||Ue[ge].ty==="st")if(Ue[ge].c.k&&Ue[ge].c.k[0].i)for(ct=Ue[ge].c.k.length,ft=0;ft<ct;ft+=1)Ue[ge].c.k[ft].s&&(Ue[ge].c.k[ft].s[0]/=255,Ue[ge].c.k[ft].s[1]/=255,Ue[ge].c.k[ft].s[2]/=255,Ue[ge].c.k[ft].s[3]/=255),Ue[ge].c.k[ft].e&&(Ue[ge].c.k[ft].e[0]/=255,Ue[ge].c.k[ft].e[1]/=255,Ue[ge].c.k[ft].e[2]/=255,Ue[ge].c.k[ft].e[3]/=255);else Ue[ge].c.k[0]/=255,Ue[ge].c.k[1]/=255,Ue[ge].c.k[2]/=255,Ue[ge].c.k[3]/=255}function Re(Ue){var ge,_e=Ue.length;for(ge=0;ge<_e;ge+=1)Ue[ge].ty===4&&Ut(Ue[ge].shapes)}return function(Ue){if(Ye(Mt,Ue.v)&&(Re(Ue.layers),Ue.assets)){var ge,_e=Ue.assets.length;for(ge=0;ge<_e;ge+=1)Ue.assets[ge].layers&&Re(Ue.assets[ge].layers)}}})(),Eo=(function(){var Mt=[4,4,18];function Ut(Ue){var ge,_e=Ue.length,ft,ct;for(ge=_e-1;ge>=0;ge-=1)if(Ue[ge].ty==="sh")if(Ue[ge].ks.k.i)Ue[ge].ks.k.c=Ue[ge].closed;else for(ct=Ue[ge].ks.k.length,ft=0;ft<ct;ft+=1)Ue[ge].ks.k[ft].s&&(Ue[ge].ks.k[ft].s[0].c=Ue[ge].closed),Ue[ge].ks.k[ft].e&&(Ue[ge].ks.k[ft].e[0].c=Ue[ge].closed);else Ue[ge].ty==="gr"&&Ut(Ue[ge].it)}function Re(Ue){var ge,_e,ft=Ue.length,ct,ti,go,Gi;for(_e=0;_e<ft;_e+=1){if(ge=Ue[_e],ge.hasMask){var yi=ge.masksProperties;for(ti=yi.length,ct=0;ct<ti;ct+=1)if(yi[ct].pt.k.i)yi[ct].pt.k.c=yi[ct].cl;else for(Gi=yi[ct].pt.k.length,go=0;go<Gi;go+=1)yi[ct].pt.k[go].s&&(yi[ct].pt.k[go].s[0].c=yi[ct].cl),yi[ct].pt.k[go].e&&(yi[ct].pt.k[go].e[0].c=yi[ct].cl)}ge.ty===4&&Ut(ge.shapes)}}return function(Ue){if(Ye(Mt,Ue.v)&&(Re(Ue.layers),Ue.assets)){var ge,_e=Ue.assets.length;for(ge=0;ge<_e;ge+=1)Ue.assets[ge].layers&&Re(Ue.assets[ge].layers)}}})();function wo(Mt){Mt.__complete||(qt(Mt),mt(Mt),$t(Mt),kt(Mt),Eo(Mt),ot(Mt.layers,Mt.assets),ht(Mt.chars,Mt.assets),Mt.__complete=!0)}function lo(Mt){Mt.t.a.length===0&&"m"in Mt.t.p}var Mo={};return Mo.completeData=wo,Mo.checkColors=qt,Mo.checkChars=$t,Mo.checkPathProperties=kt,Mo.checkShapes=Eo,Mo.completeLayers=ot,Mo}if(re.dataManager||(re.dataManager=nt()),re.assetLoader||(re.assetLoader=(function(){function ot(Qe){var Ee=Qe.getResponseHeader("content-type");return Ee&&Qe.responseType==="json"&&Ee.indexOf("json")!==-1||Qe.response&&ve(Qe.response)==="object"?Qe.response:Qe.response&&typeof Qe.response=="string"?JSON.parse(Qe.response):Qe.responseText?JSON.parse(Qe.responseText):null}function ht(Qe,Ee,Se,Be){var Ye,mt=new XMLHttpRequest;try{mt.responseType="json"}catch{}mt.onreadystatechange=function(){if(mt.readyState===4)if(mt.status===200)Ye=ot(mt),Se(Ye);else try{Ye=ot(mt),Se(Ye)}catch($t){Be&&Be($t)}};try{mt.open(["G","E","T"].join(""),Qe,!0)}catch{mt.open(["G","E","T"].join(""),Ee+"/"+Qe,!0)}mt.send()}return{load:ht}})()),Le.data.type==="loadAnimation")re.assetLoader.load(Le.data.path,Le.data.fullPath,function(ot){re.dataManager.completeData(ot),re.postMessage({id:Le.data.id,payload:ot,status:"success"})},function(){re.postMessage({id:Le.data.id,status:"error"})});else if(Le.data.type==="complete"){var dt=Le.data.animation;re.dataManager.completeData(dt),re.postMessage({id:Le.data.id,payload:dt,status:"success"})}else Le.data.type==="loadData"&&re.assetLoader.load(Le.data.path,Le.data.fullPath,function(ot){re.postMessage({id:Le.data.id,payload:ot,status:"success"})},function(){re.postMessage({id:Le.data.id,status:"error"})})}),oe.onmessage=function(Le){var nt=Le.data,dt=nt.id,ot=_[dt];_[dt]=null,nt.status==="success"?ot.onComplete(nt.payload):ot.onError&&ot.onError()})}function we(Le,nt){M+=1;var dt="processId_"+M;return _[dt]={onComplete:Le,onError:nt},dt}function Ke(Le,nt,dt){De();var ot=we(nt,dt);oe.postMessage({type:"loadAnimation",path:Le,fullPath:window.location.origin+window.location.pathname,id:ot})}function et(Le,nt,dt){De();var ot=we(nt,dt);oe.postMessage({type:"loadData",path:Le,fullPath:window.location.origin+window.location.pathname,id:ot})}function st(Le,nt,dt){De();var ot=we(nt,dt);oe.postMessage({type:"complete",animation:Le,id:ot})}return{loadAnimation:Ke,loadData:et,completeAnimation:st}})(),ae=(function(){var M=(function(){var Qe=u("canvas");Qe.width=1,Qe.height=1;var Ee=Qe.getContext("2d");return Ee.fillStyle="rgba(0,0,0,0)",Ee.fillRect(0,0,1,1),Qe})();function _(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function K(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function oe(Qe,Ee,Se){var Be="";if(Qe.e)Be=Qe.p;else if(Ee){var Ye=Qe.p;Ye.indexOf("images/")!==-1&&(Ye=Ye.split("/")[1]),Be=Ee+Ye}else Be=Se,Be+=Qe.u?Qe.u:"",Be+=Qe.p;return Be}function se(Qe){var Ee=0,Se=setInterval((function(){var Be=Qe.getBBox();(Be.width||Ee>500)&&(this._imageLoaded(),clearInterval(Se)),Ee+=1}).bind(this),50)}function re(Qe){var Ee=oe(Qe,this.assetsPath,this.path),Se=xe("image");L?this.testImageLoaded(Se):Se.addEventListener("load",this._imageLoaded,!1),Se.addEventListener("error",(function(){Be.img=M,this._imageLoaded()}).bind(this),!1),Se.setAttributeNS("http://www.w3.org/1999/xlink","href",Ee),this._elementHelper.append?this._elementHelper.append(Se):this._elementHelper.appendChild(Se);var Be={img:Se,assetData:Qe};return Be}function be(Qe){var Ee=oe(Qe,this.assetsPath,this.path),Se=u("img");Se.crossOrigin="anonymous",Se.addEventListener("load",this._imageLoaded,!1),Se.addEventListener("error",(function(){Be.img=M,this._imageLoaded()}).bind(this),!1),Se.src=Ee;var Be={img:Se,assetData:Qe};return Be}function De(Qe){var Ee={assetData:Qe},Se=oe(Qe,this.assetsPath,this.path);return le.loadData(Se,(function(Be){Ee.img=Be,this._footageLoaded()}).bind(this),(function(){Ee.img={},this._footageLoaded()}).bind(this)),Ee}function we(Qe,Ee){this.imagesLoadedCb=Ee;var Se,Be=Qe.length;for(Se=0;Se<Be;Se+=1)Qe[Se].layers||(!Qe[Se].t||Qe[Se].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(Qe[Se]))):Qe[Se].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(Qe[Se]))))}function Ke(Qe){this.path=Qe||""}function et(Qe){this.assetsPath=Qe||""}function st(Qe){for(var Ee=0,Se=this.images.length;Ee<Se;){if(this.images[Ee].assetData===Qe)return this.images[Ee].img;Ee+=1}return null}function Le(){this.imagesLoadedCb=null,this.images.length=0}function nt(){return this.totalImages===this.loadedAssets}function dt(){return this.totalFootages===this.loadedFootagesCount}function ot(Qe,Ee){Qe==="svg"?(this._elementHelper=Ee,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function ht(){this._imageLoaded=_.bind(this),this._footageLoaded=K.bind(this),this.testImageLoaded=se.bind(this),this.createFootageData=De.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return ht.prototype={loadAssets:we,setAssetsPath:et,setPath:Ke,loadedImages:nt,loadedFootages:dt,destroy:Le,getAsset:st,createImgData:be,createImageData:re,imageLoaded:_,footageLoaded:K,setCacheType:ot},ht})();function fe(){}fe.prototype={triggerEvent:function(M,_){if(this._cbs[M])for(var K=this._cbs[M],oe=0;oe<K.length;oe+=1)K[oe](_)},addEventListener:function(M,_){return this._cbs[M]||(this._cbs[M]=[]),this._cbs[M].push(_),(function(){this.removeEventListener(M,_)}).bind(this)},removeEventListener:function(M,_){if(!_)this._cbs[M]=null;else if(this._cbs[M]){for(var K=0,oe=this._cbs[M].length;K<oe;)this._cbs[M][K]===_&&(this._cbs[M].splice(K,1),K-=1,oe-=1),K+=1;this._cbs[M].length||(this._cbs[M]=null)}}};var ke=(function(){function M(_){for(var K=_.split(`\r
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/empty-D5aJp-dl.js","assets/sentry-DmwgbQso.js","assets/empty-UXCszasc.js","assets/index-Cq3K0p9F.js","assets/index-DSt-Ar3e.js","assets/zeni-epic-state-0DOV9t3Z.js","assets/core-YUrKrvFN.js","assets/utils-BMMMDr1T.js","assets/recharts-DTU5HhCK.js","assets/url-DSTijktM.js","assets/index-4Gwk2AsQ.js","assets/index-BfGC71zy.js","assets/url-DLzso7lY.js","assets/index-BhCBsLMw.js","assets/ScreenRoutes-BDGsW7bh.js","assets/liveblocks-DUIjr5gg.js","assets/analyticsHelper-kX1v1J50.js","assets/mui-DgE_q3_s.js","assets/SignInScreen-B1vBHooR.js","assets/analytics-Bj_rJm9Z.js","assets/lottie-Z4l1fO_H.js","assets/lexical-CCz0WrLz.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{R as A,b as If,a as g,r as dd,g as mY,p as Xu,d as iee,f as VWe,s as ree,w as QWe,i as UWe,S as WWe,j as GWe,k as YWe,l as KWe,m as qWe}from"./sentry-DmwgbQso.js";import{j as fo,_ as wbe,a as Ud,u as bbe,T as ZWe,C as JWe,b as XWe,c as lL,d as dL,e as eGe,f as tGe,g as vbe,h as oGe,i as iGe,L as rGe,k as nee,l as nGe,m as aGe,n as sGe,P as lGe,o as dGe,p as cGe,q as Cbe,r as pGe,s as hGe,I as aee,t as uGe,v as mGe,w as gGe,x as fGe,y as xGe,z as yGe,A as Abe,B as wGe,D as bGe,E as vGe}from"./liveblocks-DUIjr5gg.js";import{f as $be,r as Pn,P as fn,R as CGe,u as cL,g as Ph,h as AGe,i as gY,j as $Ge,k as kGe,l as VB,N as SGe,m as EGe,n as LGe,B as IGe}from"./core-YUrKrvFN.js";import{H as jk,ba as rf,bb as jGe,bc as see,bd as Gf,be as ci,bf as kbe,bg as Bi,bh as pL,bi as MGe,bj as qh,bk as BGe,bl as DGe,bm as c6,bn as Cm,bo as i8,bp as Sbe,bq as TGe,br as w1,bs as Ebe,bt as PGe,bu as Yf,bv as eb,bw as Wr,bx as p6,by as ph,bz as lee,bA as zGe,bB as RGe,bC as Mk,bD as dQ,bE as FGe,bF as OGe,bG as NGe,bH as HGe,bI as fY,bJ as Lbe,bK as _Ge,bL as $y,bM as VGe,bN as Ibe,bO as cQ,bP as dee,bQ as cee,bR as pee,bS as Ja,bT as xY,bU as jbe,bV as Mbe,bW as yY,bX as r8,bY as hL,bZ as wY,b_ as bY,b$ as vY,c0 as CY,c1 as QGe,c2 as pQ,c3 as UGe,c4 as Bbe,c5 as uL,c6 as j1,c7 as M1,c8 as Bk,c9 as Dbe,ca as Tbe,cb as WGe,cc as AY,cd as $Y,ce as GGe,cf as YGe,cg as A1,ch as tb,ci as ob,cj as KGe,ck as qGe,cl as ZGe,cm as JGe,cn as XGe,co as eYe,cp as tYe,cq as Fv,cr as Pbe,cs as zbe,ct as oYe,cu as iYe,cv as Rbe,cw as Fbe,cx as rYe,cy as nYe,cz as aYe,cA as Obe,cB as Nbe,cC as sYe,cD as lYe,cE as Hbe,cF as _be,cG as dYe,cH as hee,cI as cYe,cJ as pYe,cK as Jy,cL as hYe,cM as Vbe,cN as uYe,cO as Qbe,cP as mYe,cQ as uee,cR as gYe,cS as Ube,cT as Wbe,cU as Gbe,cV as Ybe,cW as Kbe,cX as fYe,cY as qbe,cZ as xYe,c_ as yYe,c$ as wYe,d0 as Zbe,d1 as hQ,d2 as bYe,d3 as Jbe,d4 as Xbe,d5 as vYe,d6 as CYe,d7 as AYe,d8 as $Ye,d9 as kYe,da as SYe,db as EYe,dc as LYe,v as IYe,dd as mL,de as uQ,df as mQ,dg as jYe,dh as MYe,di as BYe,dj as DYe,dk as TYe,dl as PYe,dm as zYe,dn as RYe,dp as FYe,dq as OYe,dr as mee,ds as NYe,dt as HYe,du as _Ye,dv as VYe,dw as QYe}from"./zeni-epic-state-0DOV9t3Z.js";import{j as Ho,c as de,k as _t,u as lt,n as r,F as UYe,C as ni,a as eve,b as gee,T as WYe,d as tve,e as ove,f as ive,g as GYe,M as rve,G as gL,h as YYe,P as Kf,i as jf,S as nve,l as KYe,m as qYe,o as ZYe,p as JYe,D as XYe,q as eKe,s as ave}from"./mui-DgE_q3_s.js";import{r as tKe,m as hh}from"./analytics-Bj_rJm9Z.js";import{L as gQ}from"./lottie-Z4l1fO_H.js";import{r as ma}from"./lexical-CCz0WrLz.js";import{F as Or,c as fL,P as oKe,R as fQ,G as Dk,X as bn,Y as vn,H as rd,I as Tk,J as hm,K as K1,L as sve,M as iKe,N as rKe,O as vs,Q as kY,S as SY,U as B1,V as nKe}from"./recharts-DTU5HhCK.js";import{r as aKe}from"./utils-BMMMDr1T.js";(function(){try{var e=typeof window<"u"?window:typeof If<"u"?If:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="53408562-beac-4c55-9852-1bdb225521d9",e._sentryDebugIdIdentifier="sentry-dbid-53408562-beac-4c55-9852-1bdb225521d9")}catch{}})();(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&n(d)}).observe(document,{childList:!0,subtree:!0});function i(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(a){if(a.ep)return;a.ep=!0;const l=i(a);fetch(a.href,l)}})();var Ov={},fee;function sKe(){if(fee)return Ov;fee=1;var e=$be();return Ov.createRoot=e.createRoot,Ov.hydrateRoot=e.hydrateRoot,Ov}var lKe=sKe(),Kl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof If<"u"?If:typeof self<"u"?self:{};function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xee={exports:{}},t9={},yee;function dKe(){if(yee)return t9;yee=1;var e=A,t=Symbol.for("react.element"),i=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(c,p,h){var u,m={},f=null,x=null;h!==void 0&&(f=""+h),p.key!==void 0&&(f=""+p.key),p.ref!==void 0&&(x=p.ref);for(u in p)n.call(p,u)&&!l.hasOwnProperty(u)&&(m[u]=p[u]);if(c&&c.defaultProps)for(u in p=c.defaultProps,p)m[u]===void 0&&(m[u]=p[u]);return{$$typeof:t,type:c,key:f,ref:x,props:m,_owner:a.current}}return t9.Fragment=i,t9.jsx=d,t9.jsxs=d,t9}var wee;function lve(){return wee||(wee=1,xee.exports=dKe()),xee.exports}var s=lve();const cKe=g.createContext(null),QB={didCatch:!1,error:null};let pKe=class extends g.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=QB}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var i,n,a=arguments.length,l=new Array(a),d=0;d<a;d++)l[d]=arguments[d];(i=(n=this.props).onReset)===null||i===void 0||i.call(n,{args:l,reason:"imperative-api"}),this.setState(QB)}}componentDidCatch(t,i){var n,a;(n=(a=this.props).onError)===null||n===void 0||n.call(a,t,i)}componentDidUpdate(t,i){const{didCatch:n}=this.state,{resetKeys:a}=this.props;if(n&&i.error!==null&&hKe(t.resetKeys,a)){var l,d;(l=(d=this.props).onReset)===null||l===void 0||l.call(d,{next:a,prev:t.resetKeys,reason:"keys"}),this.setState(QB)}}render(){const{children:t,fallbackRender:i,FallbackComponent:n,fallback:a}=this.props,{didCatch:l,error:d}=this.state;let c=t;if(l){const p={error:d,resetErrorBoundary:this.resetErrorBoundary};if(typeof i=="function")c=i(p);else if(n)c=g.createElement(n,p);else if(a!==void 0)c=a;else throw d}return g.createElement(cKe.Provider,{value:{didCatch:l,error:d,resetErrorBoundary:this.resetErrorBoundary}},c)}};function hKe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((i,n)=>!Object.is(i,t[n]))}var Z$={exports:{}},uKe=Z$.exports,bee;function mKe(){return bee||(bee=1,(function(e,t){typeof document<"u"&&typeof navigator<"u"&&(function(i,n){e.exports=n()})(uKe,(function(){var i="http://www.w3.org/2000/svg",n="",a=!1,l=-999999,d=function(M){a=!!M},c=function(){return a},p=function(M){n=M},h=function(){return n};function u(M){return document.createElement(M)}function m(M,_){var K,oe=M.length,se;for(K=0;K<oe;K+=1){se=M[K].prototype;for(var re in se)Object.prototype.hasOwnProperty.call(se,re)&&(_.prototype[re]=se[re])}}function f(M){function _(){}return _.prototype=M,_}var x=(function(){function M(_){this.audios=[],this.audioFactory=_,this._volume=1,this._isMuted=!1}return M.prototype={addAudio:function(_){this.audios.push(_)},pause:function(){var _,K=this.audios.length;for(_=0;_<K;_+=1)this.audios[_].pause()},resume:function(){var _,K=this.audios.length;for(_=0;_<K;_+=1)this.audios[_].resume()},setRate:function(_){var K,oe=this.audios.length;for(K=0;K<oe;K+=1)this.audios[K].setRate(_)},createAudio:function(_){return this.audioFactory?this.audioFactory(_):window.Howl?new window.Howl({src:[_]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(_){this.audioFactory=_},setVolume:function(_){this._volume=_,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var _,K=this.audios.length;for(_=0;_<K;_+=1)this.audios[_].volume(this._volume*(this._isMuted?0:1))}},function(){return new M}})(),y=(function(){function M(K,oe){var se=0,re=[],be;switch(K){case"int16":case"uint8c":be=1;break;default:be=1.1;break}for(se=0;se<oe;se+=1)re.push(be);return re}function _(K,oe){return K==="float32"?new Float32Array(oe):K==="int16"?new Int16Array(oe):K==="uint8c"?new Uint8ClampedArray(oe):M(K,oe)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?_:M})();function w(M){return Array.apply(null,{length:M})}var b=!0,C=null,k="",L=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),S=Math.pow,j=Math.sqrt,I=Math.floor,P=Math.min,B=150,T=Math.PI/180,D=.5519;function R(M,_,K,oe){this.type=M,this.currentTime=_,this.totalTime=K,this.direction=oe<0?-1:1}function G(M,_){this.type=M,this.direction=_<0?-1:1}function q(M,_,K,oe){this.type=M,this.currentLoop=K,this.totalLoops=_,this.direction=oe<0?-1:1}function Z(M,_,K){this.type=M,this.firstFrame=_,this.totalFrames=K}function H(M,_){this.type=M,this.target=_}function V(M,_){this.type="renderFrameError",this.nativeError=M,this.currentTime=_}function N(M){this.type="configError",this.nativeError=M}var O=(function(){var M=0;return function(){return M+=1,k+"__lottie_element_"+M}})();function z(M,_,K){var oe,se,re,be,De,we,Ke,et;switch(be=Math.floor(M*6),De=M*6-be,we=K*(1-_),Ke=K*(1-De*_),et=K*(1-(1-De)*_),be%6){case 0:oe=K,se=et,re=we;break;case 1:oe=Ke,se=K,re=we;break;case 2:oe=we,se=K,re=et;break;case 3:oe=we,se=Ke,re=K;break;case 4:oe=et,se=we,re=K;break;case 5:oe=K,se=we,re=Ke;break}return[oe,se,re]}function F(M,_,K){var oe=Math.max(M,_,K),se=Math.min(M,_,K),re=oe-se,be,De=oe===0?0:re/oe,we=oe/255;switch(oe){case se:be=0;break;case M:be=_-K+re*(_<K?6:0),be/=6*re;break;case _:be=K-M+re*2,be/=6*re;break;case K:be=M-_+re*4,be/=6*re;break}return[be,De,we]}function te(M,_){var K=F(M[0]*255,M[1]*255,M[2]*255);return K[1]+=_,K[1]>1?K[1]=1:K[1]<=0&&(K[1]=0),z(K[0],K[1],K[2])}function Y(M,_){var K=F(M[0]*255,M[1]*255,M[2]*255);return K[2]+=_,K[2]>1?K[2]=1:K[2]<0&&(K[2]=0),z(K[0],K[1],K[2])}function W(M,_){var K=F(M[0]*255,M[1]*255,M[2]*255);return K[0]+=_/360,K[0]>1?K[0]-=1:K[0]<0&&(K[0]+=1),z(K[0],K[1],K[2])}(function(){var M=[],_,K;for(_=0;_<256;_+=1)K=_.toString(16),M[_]=K.length===1?"0"+K:K;return function(oe,se,re){return oe<0&&(oe=0),se<0&&(se=0),re<0&&(re=0),"#"+M[oe]+M[se]+M[re]}})();var ee=function(M){b=!!M},J=function(){return b},ne=function(M){C=M},ye=function(){return C},me=function(M){B=M},he=function(){return B},pe=function(M){k=M};function xe(M){return document.createElementNS(i,M)}function ve(M){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},ve(M)}var le=(function(){var M=1,_=[],K,oe,se={onmessage:function(){},postMessage:function(Le){K({data:Le})}},re={postMessage:function(Le){se.onmessage({data:Le})}};function be(Le){if(window.Worker&&window.Blob&&c()){var nt=new Blob(["var _workerSelf = self; self.onmessage = ",Le.toString()],{type:"text/javascript"}),dt=URL.createObjectURL(nt);return new Worker(dt)}return K=Le,se}function De(){oe||(oe=be(function(Le){function nt(){function ot(Mt,Ut){var Re,Ue,ge=Mt.length,_e,ft,ct,ti;for(Ue=0;Ue<ge;Ue+=1)if(Re=Mt[Ue],"ks"in Re&&!Re.completed){if(Re.completed=!0,Re.hasMask){var go=Re.masksProperties;for(ft=go.length,_e=0;_e<ft;_e+=1)if(go[_e].pt.k.i)Be(go[_e].pt.k);else for(ti=go[_e].pt.k.length,ct=0;ct<ti;ct+=1)go[_e].pt.k[ct].s&&Be(go[_e].pt.k[ct].s[0]),go[_e].pt.k[ct].e&&Be(go[_e].pt.k[ct].e[0])}Re.ty===0?(Re.layers=Ee(Re.refId,Ut),ot(Re.layers,Ut)):Re.ty===4?Se(Re.shapes):Re.ty===5&&lo(Re)}}function ht(Mt,Ut){if(Mt){var Re=0,Ue=Mt.length;for(Re=0;Re<Ue;Re+=1)Mt[Re].t===1&&(Mt[Re].data.layers=Ee(Mt[Re].data.refId,Ut),ot(Mt[Re].data.layers,Ut))}}function Qe(Mt,Ut){for(var Re=0,Ue=Ut.length;Re<Ue;){if(Ut[Re].id===Mt)return Ut[Re];Re+=1}return null}function Ee(Mt,Ut){var Re=Qe(Mt,Ut);return Re?Re.layers.__used?JSON.parse(JSON.stringify(Re.layers)):(Re.layers.__used=!0,Re.layers):null}function Se(Mt){var Ut,Re=Mt.length,Ue,ge;for(Ut=Re-1;Ut>=0;Ut-=1)if(Mt[Ut].ty==="sh")if(Mt[Ut].ks.k.i)Be(Mt[Ut].ks.k);else for(ge=Mt[Ut].ks.k.length,Ue=0;Ue<ge;Ue+=1)Mt[Ut].ks.k[Ue].s&&Be(Mt[Ut].ks.k[Ue].s[0]),Mt[Ut].ks.k[Ue].e&&Be(Mt[Ut].ks.k[Ue].e[0]);else Mt[Ut].ty==="gr"&&Se(Mt[Ut].it)}function Be(Mt){var Ut,Re=Mt.i.length;for(Ut=0;Ut<Re;Ut+=1)Mt.i[Ut][0]+=Mt.v[Ut][0],Mt.i[Ut][1]+=Mt.v[Ut][1],Mt.o[Ut][0]+=Mt.v[Ut][0],Mt.o[Ut][1]+=Mt.v[Ut][1]}function Ye(Mt,Ut){var Re=Ut?Ut.split("."):[100,100,100];return Mt[0]>Re[0]?!0:Re[0]>Mt[0]?!1:Mt[1]>Re[1]?!0:Re[1]>Mt[1]?!1:Mt[2]>Re[2]?!0:Re[2]>Mt[2]?!1:null}var mt=(function(){var Mt=[4,4,14];function Ut(Ue){var ge=Ue.t.d;Ue.t.d={k:[{s:ge,t:0}]}}function Re(Ue){var ge,_e=Ue.length;for(ge=0;ge<_e;ge+=1)Ue[ge].ty===5&&Ut(Ue[ge])}return function(Ue){if(Ye(Mt,Ue.v)&&(Re(Ue.layers),Ue.assets)){var ge,_e=Ue.assets.length;for(ge=0;ge<_e;ge+=1)Ue.assets[ge].layers&&Re(Ue.assets[ge].layers)}}})(),$t=(function(){var Mt=[4,7,99];return function(Ut){if(Ut.chars&&!Ye(Mt,Ut.v)){var Re,Ue=Ut.chars.length;for(Re=0;Re<Ue;Re+=1){var ge=Ut.chars[Re];ge.data&&ge.data.shapes&&(Se(ge.data.shapes),ge.data.ip=0,ge.data.op=99999,ge.data.st=0,ge.data.sr=1,ge.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},Ut.chars[Re].t||(ge.data.shapes.push({ty:"no"}),ge.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}})(),kt=(function(){var Mt=[5,7,15];function Ut(Ue){var ge=Ue.t.p;typeof ge.a=="number"&&(ge.a={a:0,k:ge.a}),typeof ge.p=="number"&&(ge.p={a:0,k:ge.p}),typeof ge.r=="number"&&(ge.r={a:0,k:ge.r})}function Re(Ue){var ge,_e=Ue.length;for(ge=0;ge<_e;ge+=1)Ue[ge].ty===5&&Ut(Ue[ge])}return function(Ue){if(Ye(Mt,Ue.v)&&(Re(Ue.layers),Ue.assets)){var ge,_e=Ue.assets.length;for(ge=0;ge<_e;ge+=1)Ue.assets[ge].layers&&Re(Ue.assets[ge].layers)}}})(),qt=(function(){var Mt=[4,1,9];function Ut(Ue){var ge,_e=Ue.length,ft,ct;for(ge=0;ge<_e;ge+=1)if(Ue[ge].ty==="gr")Ut(Ue[ge].it);else if(Ue[ge].ty==="fl"||Ue[ge].ty==="st")if(Ue[ge].c.k&&Ue[ge].c.k[0].i)for(ct=Ue[ge].c.k.length,ft=0;ft<ct;ft+=1)Ue[ge].c.k[ft].s&&(Ue[ge].c.k[ft].s[0]/=255,Ue[ge].c.k[ft].s[1]/=255,Ue[ge].c.k[ft].s[2]/=255,Ue[ge].c.k[ft].s[3]/=255),Ue[ge].c.k[ft].e&&(Ue[ge].c.k[ft].e[0]/=255,Ue[ge].c.k[ft].e[1]/=255,Ue[ge].c.k[ft].e[2]/=255,Ue[ge].c.k[ft].e[3]/=255);else Ue[ge].c.k[0]/=255,Ue[ge].c.k[1]/=255,Ue[ge].c.k[2]/=255,Ue[ge].c.k[3]/=255}function Re(Ue){var ge,_e=Ue.length;for(ge=0;ge<_e;ge+=1)Ue[ge].ty===4&&Ut(Ue[ge].shapes)}return function(Ue){if(Ye(Mt,Ue.v)&&(Re(Ue.layers),Ue.assets)){var ge,_e=Ue.assets.length;for(ge=0;ge<_e;ge+=1)Ue.assets[ge].layers&&Re(Ue.assets[ge].layers)}}})(),Eo=(function(){var Mt=[4,4,18];function Ut(Ue){var ge,_e=Ue.length,ft,ct;for(ge=_e-1;ge>=0;ge-=1)if(Ue[ge].ty==="sh")if(Ue[ge].ks.k.i)Ue[ge].ks.k.c=Ue[ge].closed;else for(ct=Ue[ge].ks.k.length,ft=0;ft<ct;ft+=1)Ue[ge].ks.k[ft].s&&(Ue[ge].ks.k[ft].s[0].c=Ue[ge].closed),Ue[ge].ks.k[ft].e&&(Ue[ge].ks.k[ft].e[0].c=Ue[ge].closed);else Ue[ge].ty==="gr"&&Ut(Ue[ge].it)}function Re(Ue){var ge,_e,ft=Ue.length,ct,ti,go,Gi;for(_e=0;_e<ft;_e+=1){if(ge=Ue[_e],ge.hasMask){var yi=ge.masksProperties;for(ti=yi.length,ct=0;ct<ti;ct+=1)if(yi[ct].pt.k.i)yi[ct].pt.k.c=yi[ct].cl;else for(Gi=yi[ct].pt.k.length,go=0;go<Gi;go+=1)yi[ct].pt.k[go].s&&(yi[ct].pt.k[go].s[0].c=yi[ct].cl),yi[ct].pt.k[go].e&&(yi[ct].pt.k[go].e[0].c=yi[ct].cl)}ge.ty===4&&Ut(ge.shapes)}}return function(Ue){if(Ye(Mt,Ue.v)&&(Re(Ue.layers),Ue.assets)){var ge,_e=Ue.assets.length;for(ge=0;ge<_e;ge+=1)Ue.assets[ge].layers&&Re(Ue.assets[ge].layers)}}})();function wo(Mt){Mt.__complete||(qt(Mt),mt(Mt),$t(Mt),kt(Mt),Eo(Mt),ot(Mt.layers,Mt.assets),ht(Mt.chars,Mt.assets),Mt.__complete=!0)}function lo(Mt){Mt.t.a.length===0&&"m"in Mt.t.p}var Mo={};return Mo.completeData=wo,Mo.checkColors=qt,Mo.checkChars=$t,Mo.checkPathProperties=kt,Mo.checkShapes=Eo,Mo.completeLayers=ot,Mo}if(re.dataManager||(re.dataManager=nt()),re.assetLoader||(re.assetLoader=(function(){function ot(Qe){var Ee=Qe.getResponseHeader("content-type");return Ee&&Qe.responseType==="json"&&Ee.indexOf("json")!==-1||Qe.response&&ve(Qe.response)==="object"?Qe.response:Qe.response&&typeof Qe.response=="string"?JSON.parse(Qe.response):Qe.responseText?JSON.parse(Qe.responseText):null}function ht(Qe,Ee,Se,Be){var Ye,mt=new XMLHttpRequest;try{mt.responseType="json"}catch{}mt.onreadystatechange=function(){if(mt.readyState===4)if(mt.status===200)Ye=ot(mt),Se(Ye);else try{Ye=ot(mt),Se(Ye)}catch($t){Be&&Be($t)}};try{mt.open(["G","E","T"].join(""),Qe,!0)}catch{mt.open(["G","E","T"].join(""),Ee+"/"+Qe,!0)}mt.send()}return{load:ht}})()),Le.data.type==="loadAnimation")re.assetLoader.load(Le.data.path,Le.data.fullPath,function(ot){re.dataManager.completeData(ot),re.postMessage({id:Le.data.id,payload:ot,status:"success"})},function(){re.postMessage({id:Le.data.id,status:"error"})});else if(Le.data.type==="complete"){var dt=Le.data.animation;re.dataManager.completeData(dt),re.postMessage({id:Le.data.id,payload:dt,status:"success"})}else Le.data.type==="loadData"&&re.assetLoader.load(Le.data.path,Le.data.fullPath,function(ot){re.postMessage({id:Le.data.id,payload:ot,status:"success"})},function(){re.postMessage({id:Le.data.id,status:"error"})})}),oe.onmessage=function(Le){var nt=Le.data,dt=nt.id,ot=_[dt];_[dt]=null,nt.status==="success"?ot.onComplete(nt.payload):ot.onError&&ot.onError()})}function we(Le,nt){M+=1;var dt="processId_"+M;return _[dt]={onComplete:Le,onError:nt},dt}function Ke(Le,nt,dt){De();var ot=we(nt,dt);oe.postMessage({type:"loadAnimation",path:Le,fullPath:window.location.origin+window.location.pathname,id:ot})}function et(Le,nt,dt){De();var ot=we(nt,dt);oe.postMessage({type:"loadData",path:Le,fullPath:window.location.origin+window.location.pathname,id:ot})}function st(Le,nt,dt){De();var ot=we(nt,dt);oe.postMessage({type:"complete",animation:Le,id:ot})}return{loadAnimation:Ke,loadData:et,completeAnimation:st}})(),ae=(function(){var M=(function(){var Qe=u("canvas");Qe.width=1,Qe.height=1;var Ee=Qe.getContext("2d");return Ee.fillStyle="rgba(0,0,0,0)",Ee.fillRect(0,0,1,1),Qe})();function _(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function K(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function oe(Qe,Ee,Se){var Be="";if(Qe.e)Be=Qe.p;else if(Ee){var Ye=Qe.p;Ye.indexOf("images/")!==-1&&(Ye=Ye.split("/")[1]),Be=Ee+Ye}else Be=Se,Be+=Qe.u?Qe.u:"",Be+=Qe.p;return Be}function se(Qe){var Ee=0,Se=setInterval((function(){var Be=Qe.getBBox();(Be.width||Ee>500)&&(this._imageLoaded(),clearInterval(Se)),Ee+=1}).bind(this),50)}function re(Qe){var Ee=oe(Qe,this.assetsPath,this.path),Se=xe("image");L?this.testImageLoaded(Se):Se.addEventListener("load",this._imageLoaded,!1),Se.addEventListener("error",(function(){Be.img=M,this._imageLoaded()}).bind(this),!1),Se.setAttributeNS("http://www.w3.org/1999/xlink","href",Ee),this._elementHelper.append?this._elementHelper.append(Se):this._elementHelper.appendChild(Se);var Be={img:Se,assetData:Qe};return Be}function be(Qe){var Ee=oe(Qe,this.assetsPath,this.path),Se=u("img");Se.crossOrigin="anonymous",Se.addEventListener("load",this._imageLoaded,!1),Se.addEventListener("error",(function(){Be.img=M,this._imageLoaded()}).bind(this),!1),Se.src=Ee;var Be={img:Se,assetData:Qe};return Be}function De(Qe){var Ee={assetData:Qe},Se=oe(Qe,this.assetsPath,this.path);return le.loadData(Se,(function(Be){Ee.img=Be,this._footageLoaded()}).bind(this),(function(){Ee.img={},this._footageLoaded()}).bind(this)),Ee}function we(Qe,Ee){this.imagesLoadedCb=Ee;var Se,Be=Qe.length;for(Se=0;Se<Be;Se+=1)Qe[Se].layers||(!Qe[Se].t||Qe[Se].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(Qe[Se]))):Qe[Se].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(Qe[Se]))))}function Ke(Qe){this.path=Qe||""}function et(Qe){this.assetsPath=Qe||""}function st(Qe){for(var Ee=0,Se=this.images.length;Ee<Se;){if(this.images[Ee].assetData===Qe)return this.images[Ee].img;Ee+=1}return null}function Le(){this.imagesLoadedCb=null,this.images.length=0}function nt(){return this.totalImages===this.loadedAssets}function dt(){return this.totalFootages===this.loadedFootagesCount}function ot(Qe,Ee){Qe==="svg"?(this._elementHelper=Ee,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function ht(){this._imageLoaded=_.bind(this),this._footageLoaded=K.bind(this),this.testImageLoaded=se.bind(this),this.createFootageData=De.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return ht.prototype={loadAssets:we,setAssetsPath:et,setPath:Ke,loadedImages:nt,loadedFootages:dt,destroy:Le,getAsset:st,createImgData:be,createImageData:re,imageLoaded:_,footageLoaded:K,setCacheType:ot},ht})();function fe(){}fe.prototype={triggerEvent:function(M,_){if(this._cbs[M])for(var K=this._cbs[M],oe=0;oe<K.length;oe+=1)K[oe](_)},addEventListener:function(M,_){return this._cbs[M]||(this._cbs[M]=[]),this._cbs[M].push(_),(function(){this.removeEventListener(M,_)}).bind(this)},removeEventListener:function(M,_){if(!_)this._cbs[M]=null;else if(this._cbs[M]){for(var K=0,oe=this._cbs[M].length;K<oe;)this._cbs[M][K]===_&&(this._cbs[M].splice(K,1),K-=1,oe-=1),K+=1;this._cbs[M].length||(this._cbs[M]=null)}}};var ke=(function(){function M(_){for(var K=_.split(`\r
|
|
3
3
|
`),oe={},se,re=0,be=0;be<K.length;be+=1)se=K[be].split(":"),se.length===2&&(oe[se[0]]=se[1].trim(),re+=1);if(re===0)throw new Error;return oe}return function(_){for(var K=[],oe=0;oe<_.length;oe+=1){var se=_[oe],re={time:se.tm,duration:se.dr};try{re.payload=JSON.parse(_[oe].cm)}catch{try{re.payload=M(_[oe].cm)}catch{re.payload={name:_[oe].cm}}}K.push(re)}return K}})(),ie=(function(){function M(_){this.compositions.push(_)}return function(){function _(K){for(var oe=0,se=this.compositions.length;oe<se;){if(this.compositions[oe].data&&this.compositions[oe].data.nm===K)return this.compositions[oe].prepareFrame&&this.compositions[oe].data.xt&&this.compositions[oe].prepareFrame(this.currentFrame),this.compositions[oe].compInterface;oe+=1}return null}return _.compositions=[],_.currentFrame=0,_.registerComposition=M,_}})(),ue={},je=function(M,_){ue[M]=_};function Me(M){return ue[M]}function Ce(){if(ue.canvas)return"canvas";for(var M in ue)if(ue[M])return M;return""}function Te(M){"@babel/helpers - typeof";return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},Te(M)}var Fe=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=O(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=J(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ie(),this.imagePreloader=new ae,this.audioController=x(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new R("drawnFrame",0,0,0),this.expressionsPlugin=ye()};m([fe],Fe),Fe.prototype.setParams=function(M){(M.wrapper||M.container)&&(this.wrapper=M.wrapper||M.container);var _="svg";M.animType?_=M.animType:M.renderer&&(_=M.renderer);var K=Me(_);this.renderer=new K(this,M.rendererSettings),this.imagePreloader.setCacheType(_,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=_,M.loop===""||M.loop===null||M.loop===void 0||M.loop===!0?this.loop=!0:M.loop===!1?this.loop=!1:this.loop=parseInt(M.loop,10),this.autoplay="autoplay"in M?M.autoplay:!0,this.name=M.name?M.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(M,"autoloadSegments")?M.autoloadSegments:!0,this.assetsPath=M.assetsPath,this.initialSegment=M.initialSegment,M.audioFactory&&this.audioController.setAudioFactory(M.audioFactory),M.animationData?this.setupAnimation(M.animationData):M.path&&(M.path.lastIndexOf("\\")!==-1?this.path=M.path.substr(0,M.path.lastIndexOf("\\")+1):this.path=M.path.substr(0,M.path.lastIndexOf("/")+1),this.fileName=M.path.substr(M.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),le.loadAnimation(M.path,this.configAnimation,this.onSetupError))},Fe.prototype.onSetupError=function(){this.trigger("data_failed")},Fe.prototype.setupAnimation=function(M){le.completeAnimation(M,this.configAnimation)},Fe.prototype.setData=function(M,_){_&&Te(_)!=="object"&&(_=JSON.parse(_));var K={wrapper:M,animationData:_},oe=M.attributes;K.path=oe.getNamedItem("data-animation-path")?oe.getNamedItem("data-animation-path").value:oe.getNamedItem("data-bm-path")?oe.getNamedItem("data-bm-path").value:oe.getNamedItem("bm-path")?oe.getNamedItem("bm-path").value:"",K.animType=oe.getNamedItem("data-anim-type")?oe.getNamedItem("data-anim-type").value:oe.getNamedItem("data-bm-type")?oe.getNamedItem("data-bm-type").value:oe.getNamedItem("bm-type")?oe.getNamedItem("bm-type").value:oe.getNamedItem("data-bm-renderer")?oe.getNamedItem("data-bm-renderer").value:oe.getNamedItem("bm-renderer")?oe.getNamedItem("bm-renderer").value:Ce()||"canvas";var se=oe.getNamedItem("data-anim-loop")?oe.getNamedItem("data-anim-loop").value:oe.getNamedItem("data-bm-loop")?oe.getNamedItem("data-bm-loop").value:oe.getNamedItem("bm-loop")?oe.getNamedItem("bm-loop").value:"";se==="false"?K.loop=!1:se==="true"?K.loop=!0:se!==""&&(K.loop=parseInt(se,10));var re=oe.getNamedItem("data-anim-autoplay")?oe.getNamedItem("data-anim-autoplay").value:oe.getNamedItem("data-bm-autoplay")?oe.getNamedItem("data-bm-autoplay").value:oe.getNamedItem("bm-autoplay")?oe.getNamedItem("bm-autoplay").value:!0;K.autoplay=re!=="false",K.name=oe.getNamedItem("data-name")?oe.getNamedItem("data-name").value:oe.getNamedItem("data-bm-name")?oe.getNamedItem("data-bm-name").value:oe.getNamedItem("bm-name")?oe.getNamedItem("bm-name").value:"";var be=oe.getNamedItem("data-anim-prerender")?oe.getNamedItem("data-anim-prerender").value:oe.getNamedItem("data-bm-prerender")?oe.getNamedItem("data-bm-prerender").value:oe.getNamedItem("bm-prerender")?oe.getNamedItem("bm-prerender").value:"";be==="false"&&(K.prerender=!1),K.path?this.setParams(K):this.trigger("destroy")},Fe.prototype.includeLayers=function(M){M.op>this.animationData.op&&(this.animationData.op=M.op,this.totalFrames=Math.floor(M.op-this.animationData.ip));var _=this.animationData.layers,K,oe=_.length,se=M.layers,re,be=se.length;for(re=0;re<be;re+=1)for(K=0;K<oe;){if(_[K].id===se[re].id){_[K]=se[re];break}K+=1}if((M.chars||M.fonts)&&(this.renderer.globalData.fontManager.addChars(M.chars),this.renderer.globalData.fontManager.addFonts(M.fonts,this.renderer.globalData.defs)),M.assets)for(oe=M.assets.length,K=0;K<oe;K+=1)this.animationData.assets.push(M.assets[K]);this.animationData.__complete=!1,le.completeAnimation(this.animationData,this.onSegmentComplete)},Fe.prototype.onSegmentComplete=function(M){this.animationData=M;var _=ye();_&&_.initExpressions(this),this.loadNextSegment()},Fe.prototype.loadNextSegment=function(){var M=this.animationData.segments;if(!M||M.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var _=M.shift();this.timeCompleted=_.time*this.frameRate;var K=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,le.loadData(K,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},Fe.prototype.loadSegments=function(){var M=this.animationData.segments;M||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},Fe.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},Fe.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},Fe.prototype.configAnimation=function(M){if(this.renderer)try{this.animationData=M,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(M),M.assets||(M.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(M.assets),this.markers=ke(M.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(_){this.triggerConfigError(_)}},Fe.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},Fe.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var M=ye();M&&M.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},Fe.prototype.resize=function(M,_){var K=typeof M=="number"?M:void 0,oe=typeof _=="number"?_:void 0;this.renderer.updateContainerSize(K,oe)},Fe.prototype.setSubframe=function(M){this.isSubframeEnabled=!!M},Fe.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},Fe.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(M){this.triggerRenderFrameError(M)}},Fe.prototype.play=function(M){M&&this.name!==M||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},Fe.prototype.pause=function(M){M&&this.name!==M||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},Fe.prototype.togglePause=function(M){M&&this.name!==M||(this.isPaused===!0?this.play():this.pause())},Fe.prototype.stop=function(M){M&&this.name!==M||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},Fe.prototype.getMarkerData=function(M){for(var _,K=0;K<this.markers.length;K+=1)if(_=this.markers[K],_.payload&&_.payload.name===M)return _;return null},Fe.prototype.goToAndStop=function(M,_,K){if(!(K&&this.name!==K)){var oe=Number(M);if(isNaN(oe)){var se=this.getMarkerData(M);se&&this.goToAndStop(se.time,!0)}else _?this.setCurrentRawFrameValue(M):this.setCurrentRawFrameValue(M*this.frameModifier);this.pause()}},Fe.prototype.goToAndPlay=function(M,_,K){if(!(K&&this.name!==K)){var oe=Number(M);if(isNaN(oe)){var se=this.getMarkerData(M);se&&(se.duration?this.playSegments([se.time,se.time+se.duration],!0):this.goToAndStop(se.time,!0))}else this.goToAndStop(oe,_,K);this.play()}},Fe.prototype.advanceTime=function(M){if(!(this.isPaused===!0||this.isLoaded===!1)){var _=this.currentRawFrame+M*this.frameModifier,K=!1;_>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(_>this.totalFrames?_%this.totalFrames:0)||(K=!0,_=this.totalFrames-1):_>=this.totalFrames?(this.playCount+=1,this.checkSegments(_%this.totalFrames)||(this.setCurrentRawFrameValue(_%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(_):_<0?this.checkSegments(_%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+_%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(K=!0,_=0)):this.setCurrentRawFrameValue(_),K&&(this.setCurrentRawFrameValue(_),this.pause(),this.trigger("complete"))}},Fe.prototype.adjustSegment=function(M,_){this.playCount=0,M[1]<M[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=M[0]-M[1],this.timeCompleted=this.totalFrames,this.firstFrame=M[1],this.setCurrentRawFrameValue(this.totalFrames-.001-_)):M[1]>M[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=M[1]-M[0],this.timeCompleted=this.totalFrames,this.firstFrame=M[0],this.setCurrentRawFrameValue(.001+_)),this.trigger("segmentStart")},Fe.prototype.setSegment=function(M,_){var K=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<M?K=M:this.currentRawFrame+this.firstFrame>_&&(K=_-M)),this.firstFrame=M,this.totalFrames=_-M,this.timeCompleted=this.totalFrames,K!==-1&&this.goToAndStop(K,!0)},Fe.prototype.playSegments=function(M,_){if(_&&(this.segments.length=0),Te(M[0])==="object"){var K,oe=M.length;for(K=0;K<oe;K+=1)this.segments.push(M[K])}else this.segments.push(M);this.segments.length&&_&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},Fe.prototype.resetSegments=function(M){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),M&&this.checkSegments(0)},Fe.prototype.checkSegments=function(M){return this.segments.length?(this.adjustSegment(this.segments.shift(),M),!0):!1},Fe.prototype.destroy=function(M){M&&this.name!==M||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},Fe.prototype.setCurrentRawFrameValue=function(M){this.currentRawFrame=M,this.gotoFrame()},Fe.prototype.setSpeed=function(M){this.playSpeed=M,this.updaFrameModifier()},Fe.prototype.setDirection=function(M){this.playDirection=M<0?-1:1,this.updaFrameModifier()},Fe.prototype.setLoop=function(M){this.loop=M},Fe.prototype.setVolume=function(M,_){_&&this.name!==_||this.audioController.setVolume(M)},Fe.prototype.getVolume=function(){return this.audioController.getVolume()},Fe.prototype.mute=function(M){M&&this.name!==M||this.audioController.mute()},Fe.prototype.unmute=function(M){M&&this.name!==M||this.audioController.unmute()},Fe.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},Fe.prototype.getPath=function(){return this.path},Fe.prototype.getAssetsPath=function(M){var _="";if(M.e)_=M.p;else if(this.assetsPath){var K=M.p;K.indexOf("images/")!==-1&&(K=K.split("/")[1]),_=this.assetsPath+K}else _=this.path,_+=M.u?M.u:"",_+=M.p;return _},Fe.prototype.getAssetData=function(M){for(var _=0,K=this.assets.length;_<K;){if(M===this.assets[_].id)return this.assets[_];_+=1}return null},Fe.prototype.hide=function(){this.renderer.hide()},Fe.prototype.show=function(){this.renderer.show()},Fe.prototype.getDuration=function(M){return M?this.totalFrames:this.totalFrames/this.frameRate},Fe.prototype.updateDocumentData=function(M,_,K){try{var oe=this.renderer.getElementByPath(M);oe.updateDocumentData(_,K)}catch{}},Fe.prototype.trigger=function(M){if(this._cbs&&this._cbs[M])switch(M){case"enterFrame":this.triggerEvent(M,new R(M,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(M,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(M,new q(M,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(M,new G(M,this.frameMult));break;case"segmentStart":this.triggerEvent(M,new Z(M,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(M,new H(M,this));break;default:this.triggerEvent(M)}M==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new R(M,this.currentFrame,this.totalFrames,this.frameMult)),M==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new q(M,this.loop,this.playCount,this.frameMult)),M==="complete"&&this.onComplete&&this.onComplete.call(this,new G(M,this.frameMult)),M==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new Z(M,this.firstFrame,this.totalFrames)),M==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new H(M,this))},Fe.prototype.triggerRenderFrameError=function(M){var _=new V(M,this.currentFrame);this.triggerEvent("error",_),this.onError&&this.onError.call(this,_)},Fe.prototype.triggerConfigError=function(M){var _=new N(M,this.currentFrame);this.triggerEvent("error",_),this.onError&&this.onError.call(this,_)};var tt=(function(){var M={},_=[],K=0,oe=0,se=0,re=!0,be=!1;function De(Re){for(var Ue=0,ge=Re.target;Ue<oe;)_[Ue].animation===ge&&(_.splice(Ue,1),Ue-=1,oe-=1,ge.isPaused||st()),Ue+=1}function we(Re,Ue){if(!Re)return null;for(var ge=0;ge<oe;){if(_[ge].elem===Re&&_[ge].elem!==null)return _[ge].animation;ge+=1}var _e=new Fe;return Le(_e,Re),_e.setData(Re,Ue),_e}function Ke(){var Re,Ue=_.length,ge=[];for(Re=0;Re<Ue;Re+=1)ge.push(_[Re].animation);return ge}function et(){se+=1,Eo()}function st(){se-=1}function Le(Re,Ue){Re.addEventListener("destroy",De),Re.addEventListener("_active",et),Re.addEventListener("_idle",st),_.push({elem:Ue,animation:Re}),oe+=1}function nt(Re){var Ue=new Fe;return Le(Ue,null),Ue.setParams(Re),Ue}function dt(Re,Ue){var ge;for(ge=0;ge<oe;ge+=1)_[ge].animation.setSpeed(Re,Ue)}function ot(Re,Ue){var ge;for(ge=0;ge<oe;ge+=1)_[ge].animation.setDirection(Re,Ue)}function ht(Re){var Ue;for(Ue=0;Ue<oe;Ue+=1)_[Ue].animation.play(Re)}function Qe(Re){var Ue=Re-K,ge;for(ge=0;ge<oe;ge+=1)_[ge].animation.advanceTime(Ue);K=Re,se&&!be?window.requestAnimationFrame(Qe):re=!0}function Ee(Re){K=Re,window.requestAnimationFrame(Qe)}function Se(Re){var Ue;for(Ue=0;Ue<oe;Ue+=1)_[Ue].animation.pause(Re)}function Be(Re,Ue,ge){var _e;for(_e=0;_e<oe;_e+=1)_[_e].animation.goToAndStop(Re,Ue,ge)}function Ye(Re){var Ue;for(Ue=0;Ue<oe;Ue+=1)_[Ue].animation.stop(Re)}function mt(Re){var Ue;for(Ue=0;Ue<oe;Ue+=1)_[Ue].animation.togglePause(Re)}function $t(Re){var Ue;for(Ue=oe-1;Ue>=0;Ue-=1)_[Ue].animation.destroy(Re)}function kt(Re,Ue,ge){var _e=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),ft,ct=_e.length;for(ft=0;ft<ct;ft+=1)ge&&_e[ft].setAttribute("data-bm-type",ge),we(_e[ft],Re);if(Ue&&ct===0){ge||(ge="svg");var ti=document.getElementsByTagName("body")[0];ti.innerText="";var go=u("div");go.style.width="100%",go.style.height="100%",go.setAttribute("data-bm-type",ge),ti.appendChild(go),we(go,Re)}}function qt(){var Re;for(Re=0;Re<oe;Re+=1)_[Re].animation.resize()}function Eo(){!be&&se&&re&&(window.requestAnimationFrame(Ee),re=!1)}function wo(){be=!0}function lo(){be=!1,Eo()}function Mo(Re,Ue){var ge;for(ge=0;ge<oe;ge+=1)_[ge].animation.setVolume(Re,Ue)}function Mt(Re){var Ue;for(Ue=0;Ue<oe;Ue+=1)_[Ue].animation.mute(Re)}function Ut(Re){var Ue;for(Ue=0;Ue<oe;Ue+=1)_[Ue].animation.unmute(Re)}return M.registerAnimation=we,M.loadAnimation=nt,M.setSpeed=dt,M.setDirection=ot,M.play=ht,M.pause=Se,M.stop=Ye,M.togglePause=mt,M.searchAnimations=kt,M.resize=qt,M.goToAndStop=Be,M.destroy=$t,M.freeze=wo,M.unfreeze=lo,M.setVolume=Mo,M.mute=Mt,M.unmute=Ut,M.getRegisteredAnimations=Ke,M})(),Je=(function(){var M={};M.getBezierEasing=K;var _={};function K(Ee,Se,Be,Ye,mt){var $t=mt||("bez_"+Ee+"_"+Se+"_"+Be+"_"+Ye).replace(/\./g,"p");if(_[$t])return _[$t];var kt=new Qe([Ee,Se,Be,Ye]);return _[$t]=kt,kt}var oe=4,se=.001,re=1e-7,be=10,De=11,we=1/(De-1),Ke=typeof Float32Array=="function";function et(Ee,Se){return 1-3*Se+3*Ee}function st(Ee,Se){return 3*Se-6*Ee}function Le(Ee){return 3*Ee}function nt(Ee,Se,Be){return((et(Se,Be)*Ee+st(Se,Be))*Ee+Le(Se))*Ee}function dt(Ee,Se,Be){return 3*et(Se,Be)*Ee*Ee+2*st(Se,Be)*Ee+Le(Se)}function ot(Ee,Se,Be,Ye,mt){var $t,kt,qt=0;do kt=Se+(Be-Se)/2,$t=nt(kt,Ye,mt)-Ee,$t>0?Be=kt:Se=kt;while(Math.abs($t)>re&&++qt<be);return kt}function ht(Ee,Se,Be,Ye){for(var mt=0;mt<oe;++mt){var $t=dt(Se,Be,Ye);if($t===0)return Se;var kt=nt(Se,Be,Ye)-Ee;Se-=kt/$t}return Se}function Qe(Ee){this._p=Ee,this._mSampleValues=Ke?new Float32Array(De):new Array(De),this._precomputed=!1,this.get=this.get.bind(this)}return Qe.prototype={get:function(Ee){var Se=this._p[0],Be=this._p[1],Ye=this._p[2],mt=this._p[3];return this._precomputed||this._precompute(),Se===Be&&Ye===mt?Ee:Ee===0?0:Ee===1?1:nt(this._getTForX(Ee),Be,mt)},_precompute:function(){var Ee=this._p[0],Se=this._p[1],Be=this._p[2],Ye=this._p[3];this._precomputed=!0,(Ee!==Se||Be!==Ye)&&this._calcSampleValues()},_calcSampleValues:function(){for(var Ee=this._p[0],Se=this._p[2],Be=0;Be<De;++Be)this._mSampleValues[Be]=nt(Be*we,Ee,Se)},_getTForX:function(Ee){for(var Se=this._p[0],Be=this._p[2],Ye=this._mSampleValues,mt=0,$t=1,kt=De-1;$t!==kt&&Ye[$t]<=Ee;++$t)mt+=we;--$t;var qt=(Ee-Ye[$t])/(Ye[$t+1]-Ye[$t]),Eo=mt+qt*we,wo=dt(Eo,Se,Be);return wo>=se?ht(Ee,Eo,Se,Be):wo===0?Eo:ot(Ee,mt,mt+we,Se,Be)}},M})(),ze=(function(){function M(_){return _.concat(w(_.length))}return{double:M}})(),qe=(function(){return function(M,_,K){var oe=0,se=M,re=w(se),be={newElement:De,release:we};function De(){var Ke;return oe?(oe-=1,Ke=re[oe]):Ke=_(),Ke}function we(Ke){oe===se&&(re=ze.double(re),se*=2),K&&K(Ke),re[oe]=Ke,oe+=1}return be}})(),$e=(function(){function M(){return{addedLength:0,percents:y("float32",he()),lengths:y("float32",he())}}return qe(8,M)})(),Ne=(function(){function M(){return{lengths:[],totalLength:0}}function _(K){var oe,se=K.lengths.length;for(oe=0;oe<se;oe+=1)$e.release(K.lengths[oe]);K.lengths.length=0}return qe(8,M,_)})();function at(){var M=Math;function _(Le,nt,dt,ot,ht,Qe){var Ee=Le*ot+nt*ht+dt*Qe-ht*ot-Qe*Le-dt*nt;return Ee>-.001&&Ee<.001}function K(Le,nt,dt,ot,ht,Qe,Ee,Se,Be){if(dt===0&&Qe===0&&Be===0)return _(Le,nt,ot,ht,Ee,Se);var Ye=M.sqrt(M.pow(ot-Le,2)+M.pow(ht-nt,2)+M.pow(Qe-dt,2)),mt=M.sqrt(M.pow(Ee-Le,2)+M.pow(Se-nt,2)+M.pow(Be-dt,2)),$t=M.sqrt(M.pow(Ee-ot,2)+M.pow(Se-ht,2)+M.pow(Be-Qe,2)),kt;return Ye>mt?Ye>$t?kt=Ye-mt-$t:kt=$t-mt-Ye:$t>mt?kt=$t-mt-Ye:kt=mt-Ye-$t,kt>-1e-4&&kt<1e-4}var oe=(function(){return function(Le,nt,dt,ot){var ht=he(),Qe,Ee,Se,Be,Ye,mt=0,$t,kt=[],qt=[],Eo=$e.newElement();for(Se=dt.length,Qe=0;Qe<ht;Qe+=1){for(Ye=Qe/(ht-1),$t=0,Ee=0;Ee<Se;Ee+=1)Be=S(1-Ye,3)*Le[Ee]+3*S(1-Ye,2)*Ye*dt[Ee]+3*(1-Ye)*S(Ye,2)*ot[Ee]+S(Ye,3)*nt[Ee],kt[Ee]=Be,qt[Ee]!==null&&($t+=S(kt[Ee]-qt[Ee],2)),qt[Ee]=kt[Ee];$t&&($t=j($t),mt+=$t),Eo.percents[Qe]=Ye,Eo.lengths[Qe]=mt}return Eo.addedLength=mt,Eo}})();function se(Le){var nt=Ne.newElement(),dt=Le.c,ot=Le.v,ht=Le.o,Qe=Le.i,Ee,Se=Le._length,Be=nt.lengths,Ye=0;for(Ee=0;Ee<Se-1;Ee+=1)Be[Ee]=oe(ot[Ee],ot[Ee+1],ht[Ee],Qe[Ee+1]),Ye+=Be[Ee].addedLength;return dt&&Se&&(Be[Ee]=oe(ot[Ee],ot[0],ht[Ee],Qe[0]),Ye+=Be[Ee].addedLength),nt.totalLength=Ye,nt}function re(Le){this.segmentLength=0,this.points=new Array(Le)}function be(Le,nt){this.partialLength=Le,this.point=nt}var De=(function(){var Le={};return function(nt,dt,ot,ht){var Qe=(nt[0]+"_"+nt[1]+"_"+dt[0]+"_"+dt[1]+"_"+ot[0]+"_"+ot[1]+"_"+ht[0]+"_"+ht[1]).replace(/\./g,"p");if(!Le[Qe]){var Ee=he(),Se,Be,Ye,mt,$t,kt=0,qt,Eo,wo=null;nt.length===2&&(nt[0]!==dt[0]||nt[1]!==dt[1])&&_(nt[0],nt[1],dt[0],dt[1],nt[0]+ot[0],nt[1]+ot[1])&&_(nt[0],nt[1],dt[0],dt[1],dt[0]+ht[0],dt[1]+ht[1])&&(Ee=2);var lo=new re(Ee);for(Ye=ot.length,Se=0;Se<Ee;Se+=1){for(Eo=w(Ye),$t=Se/(Ee-1),qt=0,Be=0;Be<Ye;Be+=1)mt=S(1-$t,3)*nt[Be]+3*S(1-$t,2)*$t*(nt[Be]+ot[Be])+3*(1-$t)*S($t,2)*(dt[Be]+ht[Be])+S($t,3)*dt[Be],Eo[Be]=mt,wo!==null&&(qt+=S(Eo[Be]-wo[Be],2));qt=j(qt),kt+=qt,lo.points[Se]=new be(qt,Eo),wo=Eo}lo.segmentLength=kt,Le[Qe]=lo}return Le[Qe]}})();function we(Le,nt){var dt=nt.percents,ot=nt.lengths,ht=dt.length,Qe=I((ht-1)*Le),Ee=Le*nt.addedLength,Se=0;if(Qe===ht-1||Qe===0||Ee===ot[Qe])return dt[Qe];for(var Be=ot[Qe]>Ee?-1:1,Ye=!0;Ye;)if(ot[Qe]<=Ee&&ot[Qe+1]>Ee?(Se=(Ee-ot[Qe])/(ot[Qe+1]-ot[Qe]),Ye=!1):Qe+=Be,Qe<0||Qe>=ht-1){if(Qe===ht-1)return dt[Qe];Ye=!1}return dt[Qe]+(dt[Qe+1]-dt[Qe])*Se}function Ke(Le,nt,dt,ot,ht,Qe){var Ee=we(ht,Qe),Se=1-Ee,Be=M.round((Se*Se*Se*Le[0]+(Ee*Se*Se+Se*Ee*Se+Se*Se*Ee)*dt[0]+(Ee*Ee*Se+Se*Ee*Ee+Ee*Se*Ee)*ot[0]+Ee*Ee*Ee*nt[0])*1e3)/1e3,Ye=M.round((Se*Se*Se*Le[1]+(Ee*Se*Se+Se*Ee*Se+Se*Se*Ee)*dt[1]+(Ee*Ee*Se+Se*Ee*Ee+Ee*Se*Ee)*ot[1]+Ee*Ee*Ee*nt[1])*1e3)/1e3;return[Be,Ye]}var et=y("float32",8);function st(Le,nt,dt,ot,ht,Qe,Ee){ht<0?ht=0:ht>1&&(ht=1);var Se=we(ht,Ee);Qe=Qe>1?1:Qe;var Be=we(Qe,Ee),Ye,mt=Le.length,$t=1-Se,kt=1-Be,qt=$t*$t*$t,Eo=Se*$t*$t*3,wo=Se*Se*$t*3,lo=Se*Se*Se,Mo=$t*$t*kt,Mt=Se*$t*kt+$t*Se*kt+$t*$t*Be,Ut=Se*Se*kt+$t*Se*Be+Se*$t*Be,Re=Se*Se*Be,Ue=$t*kt*kt,ge=Se*kt*kt+$t*Be*kt+$t*kt*Be,_e=Se*Be*kt+$t*Be*Be+Se*kt*Be,ft=Se*Be*Be,ct=kt*kt*kt,ti=Be*kt*kt+kt*Be*kt+kt*kt*Be,go=Be*Be*kt+kt*Be*Be+Be*kt*Be,Gi=Be*Be*Be;for(Ye=0;Ye<mt;Ye+=1)et[Ye*4]=M.round((qt*Le[Ye]+Eo*dt[Ye]+wo*ot[Ye]+lo*nt[Ye])*1e3)/1e3,et[Ye*4+1]=M.round((Mo*Le[Ye]+Mt*dt[Ye]+Ut*ot[Ye]+Re*nt[Ye])*1e3)/1e3,et[Ye*4+2]=M.round((Ue*Le[Ye]+ge*dt[Ye]+_e*ot[Ye]+ft*nt[Ye])*1e3)/1e3,et[Ye*4+3]=M.round((ct*Le[Ye]+ti*dt[Ye]+go*ot[Ye]+Gi*nt[Ye])*1e3)/1e3;return et}return{getSegmentsLength:se,getNewSegment:st,getPointInSegment:Ke,buildBezierData:De,pointOnLine2D:_,pointOnLine3D:K}}var Oe=at(),rt=l,ut=Math.abs;function Ge(M,_){var K=this.offsetTime,oe;this.propType==="multidimensional"&&(oe=y("float32",this.pv.length));for(var se=_.lastIndex,re=se,be=this.keyframes.length-1,De=!0,we,Ke,et;De;){if(we=this.keyframes[re],Ke=this.keyframes[re+1],re===be-1&&M>=Ke.t-K){we.h&&(we=Ke),se=0;break}if(Ke.t-K>M){se=re;break}re<be-1?re+=1:(se=0,De=!1)}et=this.keyframesMetadata[re]||{};var st,Le,nt,dt,ot,ht,Qe=Ke.t-K,Ee=we.t-K,Se;if(we.to){et.bezierData||(et.bezierData=Oe.buildBezierData(we.s,Ke.s||we.e,we.to,we.ti));var Be=et.bezierData;if(M>=Qe||M<Ee){var Ye=M>=Qe?Be.points.length-1:0;for(Le=Be.points[Ye].point.length,st=0;st<Le;st+=1)oe[st]=Be.points[Ye].point[st]}else{et.__fnct?ht=et.__fnct:(ht=Je.getBezierEasing(we.o.x,we.o.y,we.i.x,we.i.y,we.n).get,et.__fnct=ht),nt=ht((M-Ee)/(Qe-Ee));var mt=Be.segmentLength*nt,$t,kt=_.lastFrame<M&&_._lastKeyframeIndex===re?_._lastAddedLength:0;for(ot=_.lastFrame<M&&_._lastKeyframeIndex===re?_._lastPoint:0,De=!0,dt=Be.points.length;De;){if(kt+=Be.points[ot].partialLength,mt===0||nt===0||ot===Be.points.length-1){for(Le=Be.points[ot].point.length,st=0;st<Le;st+=1)oe[st]=Be.points[ot].point[st];break}else if(mt>=kt&&mt<kt+Be.points[ot+1].partialLength){for($t=(mt-kt)/Be.points[ot+1].partialLength,Le=Be.points[ot].point.length,st=0;st<Le;st+=1)oe[st]=Be.points[ot].point[st]+(Be.points[ot+1].point[st]-Be.points[ot].point[st])*$t;break}ot<dt-1?ot+=1:De=!1}_._lastPoint=ot,_._lastAddedLength=kt-Be.points[ot].partialLength,_._lastKeyframeIndex=re}}else{var qt,Eo,wo,lo,Mo;if(be=we.s.length,Se=Ke.s||we.e,this.sh&&we.h!==1)if(M>=Qe)oe[0]=Se[0],oe[1]=Se[1],oe[2]=Se[2];else if(M<=Ee)oe[0]=we.s[0],oe[1]=we.s[1],oe[2]=we.s[2];else{var Mt=zt(we.s),Ut=zt(Se),Re=(M-Ee)/(Qe-Ee);Tt(oe,gt(Mt,Ut,Re))}else for(re=0;re<be;re+=1)we.h!==1&&(M>=Qe?nt=1:M<Ee?nt=0:(we.o.x.constructor===Array?(et.__fnct||(et.__fnct=[]),et.__fnct[re]?ht=et.__fnct[re]:(qt=we.o.x[re]===void 0?we.o.x[0]:we.o.x[re],Eo=we.o.y[re]===void 0?we.o.y[0]:we.o.y[re],wo=we.i.x[re]===void 0?we.i.x[0]:we.i.x[re],lo=we.i.y[re]===void 0?we.i.y[0]:we.i.y[re],ht=Je.getBezierEasing(qt,Eo,wo,lo).get,et.__fnct[re]=ht)):et.__fnct?ht=et.__fnct:(qt=we.o.x,Eo=we.o.y,wo=we.i.x,lo=we.i.y,ht=Je.getBezierEasing(qt,Eo,wo,lo).get,we.keyframeMetadata=ht),nt=ht((M-Ee)/(Qe-Ee)))),Se=Ke.s||we.e,Mo=we.h===1?we.s[re]:we.s[re]+(Se[re]-we.s[re])*nt,this.propType==="multidimensional"?oe[re]=Mo:oe=Mo}return _.lastIndex=se,oe}function gt(M,_,K){var oe=[],se=M[0],re=M[1],be=M[2],De=M[3],we=_[0],Ke=_[1],et=_[2],st=_[3],Le,nt,dt,ot,ht;return nt=se*we+re*Ke+be*et+De*st,nt<0&&(nt=-nt,we=-we,Ke=-Ke,et=-et,st=-st),1-nt>1e-6?(Le=Math.acos(nt),dt=Math.sin(Le),ot=Math.sin((1-K)*Le)/dt,ht=Math.sin(K*Le)/dt):(ot=1-K,ht=K),oe[0]=ot*se+ht*we,oe[1]=ot*re+ht*Ke,oe[2]=ot*be+ht*et,oe[3]=ot*De+ht*st,oe}function Tt(M,_){var K=_[0],oe=_[1],se=_[2],re=_[3],be=Math.atan2(2*oe*re-2*K*se,1-2*oe*oe-2*se*se),De=Math.asin(2*K*oe+2*se*re),we=Math.atan2(2*K*re-2*oe*se,1-2*K*K-2*se*se);M[0]=be/T,M[1]=De/T,M[2]=we/T}function zt(M){var _=M[0]*T,K=M[1]*T,oe=M[2]*T,se=Math.cos(_/2),re=Math.cos(K/2),be=Math.cos(oe/2),De=Math.sin(_/2),we=Math.sin(K/2),Ke=Math.sin(oe/2),et=se*re*be-De*we*Ke,st=De*we*be+se*re*Ke,Le=De*re*be+se*we*Ke,nt=se*we*be-De*re*Ke;return[st,Le,nt,et]}function Lt(){var M=this.comp.renderedFrame-this.offsetTime,_=this.keyframes[0].t-this.offsetTime,K=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(M===this._caching.lastFrame||this._caching.lastFrame!==rt&&(this._caching.lastFrame>=K&&M>=K||this._caching.lastFrame<_&&M<_))){this._caching.lastFrame>=M&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var oe=this.interpolateValue(M,this._caching);this.pv=oe}return this._caching.lastFrame=M,this.pv}function yt(M){var _;if(this.propType==="unidimensional")_=M*this.mult,ut(this.v-_)>1e-5&&(this.v=_,this._mdf=!0);else for(var K=0,oe=this.v.length;K<oe;)_=M[K]*this.mult,ut(this.v[K]-_)>1e-5&&(this.v[K]=_,this._mdf=!0),K+=1}function Kt(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var M,_=this.effectsSequence.length,K=this.kf?this.pv:this.data.k;for(M=0;M<_;M+=1)K=this.effectsSequence[M](K);this.setVValue(K),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function Jt(M){this.effectsSequence.push(M),this.container.addDynamicProperty(this)}function Po(M,_,K,oe){this.propType="unidimensional",this.mult=K||1,this.data=_,this.v=K?_.k*K:_.k,this.pv=_.k,this._mdf=!1,this.elem=M,this.container=oe,this.comp=M.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=Kt,this.setVValue=yt,this.addEffect=Jt}function No(M,_,K,oe){this.propType="multidimensional",this.mult=K||1,this.data=_,this._mdf=!1,this.elem=M,this.container=oe,this.comp=M.comp,this.k=!1,this.kf=!1,this.frameId=-1;var se,re=_.k.length;for(this.v=y("float32",re),this.pv=y("float32",re),this.vel=y("float32",re),se=0;se<re;se+=1)this.v[se]=_.k[se]*this.mult,this.pv[se]=_.k[se];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=Kt,this.setVValue=yt,this.addEffect=Jt}function wt(M,_,K,oe){this.propType="unidimensional",this.keyframes=_.k,this.keyframesMetadata=[],this.offsetTime=M.data.st,this.frameId=-1,this._caching={lastFrame:rt,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=_,this.mult=K||1,this.elem=M,this.container=oe,this.comp=M.comp,this.v=rt,this.pv=rt,this._isFirstFrame=!0,this.getValue=Kt,this.setVValue=yt,this.interpolateValue=Ge,this.effectsSequence=[Lt.bind(this)],this.addEffect=Jt}function Fo(M,_,K,oe){this.propType="multidimensional";var se,re=_.k.length,be,De,we,Ke;for(se=0;se<re-1;se+=1)_.k[se].to&&_.k[se].s&&_.k[se+1]&&_.k[se+1].s&&(be=_.k[se].s,De=_.k[se+1].s,we=_.k[se].to,Ke=_.k[se].ti,(be.length===2&&!(be[0]===De[0]&&be[1]===De[1])&&Oe.pointOnLine2D(be[0],be[1],De[0],De[1],be[0]+we[0],be[1]+we[1])&&Oe.pointOnLine2D(be[0],be[1],De[0],De[1],De[0]+Ke[0],De[1]+Ke[1])||be.length===3&&!(be[0]===De[0]&&be[1]===De[1]&&be[2]===De[2])&&Oe.pointOnLine3D(be[0],be[1],be[2],De[0],De[1],De[2],be[0]+we[0],be[1]+we[1],be[2]+we[2])&&Oe.pointOnLine3D(be[0],be[1],be[2],De[0],De[1],De[2],De[0]+Ke[0],De[1]+Ke[1],De[2]+Ke[2]))&&(_.k[se].to=null,_.k[se].ti=null),be[0]===De[0]&&be[1]===De[1]&&we[0]===0&&we[1]===0&&Ke[0]===0&&Ke[1]===0&&(be.length===2||be[2]===De[2]&&we[2]===0&&Ke[2]===0)&&(_.k[se].to=null,_.k[se].ti=null));this.effectsSequence=[Lt.bind(this)],this.data=_,this.keyframes=_.k,this.keyframesMetadata=[],this.offsetTime=M.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=K||1,this.elem=M,this.container=oe,this.comp=M.comp,this.getValue=Kt,this.setVValue=yt,this.interpolateValue=Ge,this.frameId=-1;var et=_.k[0].s.length;for(this.v=y("float32",et),this.pv=y("float32",et),se=0;se<et;se+=1)this.v[se]=rt,this.pv[se]=rt;this._caching={lastFrame:rt,lastIndex:0,value:y("float32",et)},this.addEffect=Jt}var jt=(function(){function M(K,oe,se,re,be){oe.sid&&(oe=K.globalData.slotManager.getProp(oe));var De;if(!oe.k.length)De=new Po(K,oe,re,be);else if(typeof oe.k[0]=="number")De=new No(K,oe,re,be);else switch(se){case 0:De=new wt(K,oe,re,be);break;case 1:De=new Fo(K,oe,re,be);break}return De.effectsSequence.length&&be.addDynamicProperty(De),De}var _={getProp:M};return _})();function qo(){}qo.prototype={addDynamicProperty:function(M){this.dynamicProperties.indexOf(M)===-1&&(this.dynamicProperties.push(M),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var M,_=this.dynamicProperties.length;for(M=0;M<_;M+=1)this.dynamicProperties[M].getValue(),this.dynamicProperties[M]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(M){this.container=M,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var yr=(function(){function M(){return y("float32",2)}return qe(8,M)})();function ei(){this.c=!1,this._length=0,this._maxLength=8,this.v=w(this._maxLength),this.o=w(this._maxLength),this.i=w(this._maxLength)}ei.prototype.setPathData=function(M,_){this.c=M,this.setLength(_);for(var K=0;K<_;)this.v[K]=yr.newElement(),this.o[K]=yr.newElement(),this.i[K]=yr.newElement(),K+=1},ei.prototype.setLength=function(M){for(;this._maxLength<M;)this.doubleArrayLength();this._length=M},ei.prototype.doubleArrayLength=function(){this.v=this.v.concat(w(this._maxLength)),this.i=this.i.concat(w(this._maxLength)),this.o=this.o.concat(w(this._maxLength)),this._maxLength*=2},ei.prototype.setXYAt=function(M,_,K,oe,se){var re;switch(this._length=Math.max(this._length,oe+1),this._length>=this._maxLength&&this.doubleArrayLength(),K){case"v":re=this.v;break;case"i":re=this.i;break;case"o":re=this.o;break;default:re=[];break}(!re[oe]||re[oe]&&!se)&&(re[oe]=yr.newElement()),re[oe][0]=M,re[oe][1]=_},ei.prototype.setTripleAt=function(M,_,K,oe,se,re,be,De){this.setXYAt(M,_,"v",be,De),this.setXYAt(K,oe,"o",be,De),this.setXYAt(se,re,"i",be,De)},ei.prototype.reverse=function(){var M=new ei;M.setPathData(this.c,this._length);var _=this.v,K=this.o,oe=this.i,se=0;this.c&&(M.setTripleAt(_[0][0],_[0][1],oe[0][0],oe[0][1],K[0][0],K[0][1],0,!1),se=1);var re=this._length-1,be=this._length,De;for(De=se;De<be;De+=1)M.setTripleAt(_[re][0],_[re][1],oe[re][0],oe[re][1],K[re][0],K[re][1],De,!1),re-=1;return M},ei.prototype.length=function(){return this._length};var mo=(function(){function M(){return new ei}function _(se){var re=se._length,be;for(be=0;be<re;be+=1)yr.release(se.v[be]),yr.release(se.i[be]),yr.release(se.o[be]),se.v[be]=null,se.i[be]=null,se.o[be]=null;se._length=0,se.c=!1}function K(se){var re=oe.newElement(),be,De=se._length===void 0?se.v.length:se._length;for(re.setLength(De),re.c=se.c,be=0;be<De;be+=1)re.setTripleAt(se.v[be][0],se.v[be][1],se.o[be][0],se.o[be][1],se.i[be][0],se.i[be][1],be);return re}var oe=qe(4,M,_);return oe.clone=K,oe})();function Oi(){this._length=0,this._maxLength=4,this.shapes=w(this._maxLength)}Oi.prototype.addShape=function(M){this._length===this._maxLength&&(this.shapes=this.shapes.concat(w(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=M,this._length+=1},Oi.prototype.releaseShapes=function(){var M;for(M=0;M<this._length;M+=1)mo.release(this.shapes[M]);this._length=0};var jo=(function(){var M={newShapeCollection:se,release:re},_=0,K=4,oe=w(K);function se(){var be;return _?(_-=1,be=oe[_]):be=new Oi,be}function re(be){var De,we=be._length;for(De=0;De<we;De+=1)mo.release(be.shapes[De]);be._length=0,_===K&&(oe=ze.double(oe),K*=2),oe[_]=be,_+=1}return M})(),wr=(function(){var M=-999999;function _(Qe,Ee,Se){var Be=Se.lastIndex,Ye,mt,$t,kt,qt,Eo,wo,lo,Mo,Mt=this.keyframes;if(Qe<Mt[0].t-this.offsetTime)Ye=Mt[0].s[0],$t=!0,Be=0;else if(Qe>=Mt[Mt.length-1].t-this.offsetTime)Ye=Mt[Mt.length-1].s?Mt[Mt.length-1].s[0]:Mt[Mt.length-2].e[0],$t=!0;else{for(var Ut=Be,Re=Mt.length-1,Ue=!0,ge,_e,ft;Ue&&(ge=Mt[Ut],_e=Mt[Ut+1],!(_e.t-this.offsetTime>Qe));)Ut<Re-1?Ut+=1:Ue=!1;if(ft=this.keyframesMetadata[Ut]||{},$t=ge.h===1,Be=Ut,!$t){if(Qe>=_e.t-this.offsetTime)lo=1;else if(Qe<ge.t-this.offsetTime)lo=0;else{var ct;ft.__fnct?ct=ft.__fnct:(ct=Je.getBezierEasing(ge.o.x,ge.o.y,ge.i.x,ge.i.y).get,ft.__fnct=ct),lo=ct((Qe-(ge.t-this.offsetTime))/(_e.t-this.offsetTime-(ge.t-this.offsetTime)))}mt=_e.s?_e.s[0]:ge.e[0]}Ye=ge.s[0]}for(Eo=Ee._length,wo=Ye.i[0].length,Se.lastIndex=Be,kt=0;kt<Eo;kt+=1)for(qt=0;qt<wo;qt+=1)Mo=$t?Ye.i[kt][qt]:Ye.i[kt][qt]+(mt.i[kt][qt]-Ye.i[kt][qt])*lo,Ee.i[kt][qt]=Mo,Mo=$t?Ye.o[kt][qt]:Ye.o[kt][qt]+(mt.o[kt][qt]-Ye.o[kt][qt])*lo,Ee.o[kt][qt]=Mo,Mo=$t?Ye.v[kt][qt]:Ye.v[kt][qt]+(mt.v[kt][qt]-Ye.v[kt][qt])*lo,Ee.v[kt][qt]=Mo}function K(){var Qe=this.comp.renderedFrame-this.offsetTime,Ee=this.keyframes[0].t-this.offsetTime,Se=this.keyframes[this.keyframes.length-1].t-this.offsetTime,Be=this._caching.lastFrame;return Be!==M&&(Be<Ee&&Qe<Ee||Be>Se&&Qe>Se)||(this._caching.lastIndex=Be<Qe?this._caching.lastIndex:0,this.interpolateShape(Qe,this.pv,this._caching)),this._caching.lastFrame=Qe,this.pv}function oe(){this.paths=this.localShapeCollection}function se(Qe,Ee){if(Qe._length!==Ee._length||Qe.c!==Ee.c)return!1;var Se,Be=Qe._length;for(Se=0;Se<Be;Se+=1)if(Qe.v[Se][0]!==Ee.v[Se][0]||Qe.v[Se][1]!==Ee.v[Se][1]||Qe.o[Se][0]!==Ee.o[Se][0]||Qe.o[Se][1]!==Ee.o[Se][1]||Qe.i[Se][0]!==Ee.i[Se][0]||Qe.i[Se][1]!==Ee.i[Se][1])return!1;return!0}function re(Qe){se(this.v,Qe)||(this.v=mo.clone(Qe),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function be(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var Qe;this.kf?Qe=this.pv:this.data.ks?Qe=this.data.ks.k:Qe=this.data.pt.k;var Ee,Se=this.effectsSequence.length;for(Ee=0;Ee<Se;Ee+=1)Qe=this.effectsSequence[Ee](Qe);this.setVValue(Qe),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function De(Qe,Ee,Se){this.propType="shape",this.comp=Qe.comp,this.container=Qe,this.elem=Qe,this.data=Ee,this.k=!1,this.kf=!1,this._mdf=!1;var Be=Se===3?Ee.pt.k:Ee.ks.k;this.v=mo.clone(Be),this.pv=mo.clone(this.v),this.localShapeCollection=jo.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=oe,this.effectsSequence=[]}function we(Qe){this.effectsSequence.push(Qe),this.container.addDynamicProperty(this)}De.prototype.interpolateShape=_,De.prototype.getValue=be,De.prototype.setVValue=re,De.prototype.addEffect=we;function Ke(Qe,Ee,Se){this.propType="shape",this.comp=Qe.comp,this.elem=Qe,this.container=Qe,this.offsetTime=Qe.data.st,this.keyframes=Se===3?Ee.pt.k:Ee.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var Be=this.keyframes[0].s[0].i.length;this.v=mo.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,Be),this.pv=mo.clone(this.v),this.localShapeCollection=jo.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=M,this.reset=oe,this._caching={lastFrame:M,lastIndex:0},this.effectsSequence=[K.bind(this)]}Ke.prototype.getValue=be,Ke.prototype.interpolateShape=_,Ke.prototype.setVValue=re,Ke.prototype.addEffect=we;var et=(function(){var Qe=D;function Ee(Se,Be){this.v=mo.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=jo.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=Be.d,this.elem=Se,this.comp=Se.comp,this.frameId=-1,this.initDynamicPropertyContainer(Se),this.p=jt.getProp(Se,Be.p,1,0,this),this.s=jt.getProp(Se,Be.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return Ee.prototype={reset:oe,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var Se=this.p.v[0],Be=this.p.v[1],Ye=this.s.v[0]/2,mt=this.s.v[1]/2,$t=this.d!==3,kt=this.v;kt.v[0][0]=Se,kt.v[0][1]=Be-mt,kt.v[1][0]=$t?Se+Ye:Se-Ye,kt.v[1][1]=Be,kt.v[2][0]=Se,kt.v[2][1]=Be+mt,kt.v[3][0]=$t?Se-Ye:Se+Ye,kt.v[3][1]=Be,kt.i[0][0]=$t?Se-Ye*Qe:Se+Ye*Qe,kt.i[0][1]=Be-mt,kt.i[1][0]=$t?Se+Ye:Se-Ye,kt.i[1][1]=Be-mt*Qe,kt.i[2][0]=$t?Se+Ye*Qe:Se-Ye*Qe,kt.i[2][1]=Be+mt,kt.i[3][0]=$t?Se-Ye:Se+Ye,kt.i[3][1]=Be+mt*Qe,kt.o[0][0]=$t?Se+Ye*Qe:Se-Ye*Qe,kt.o[0][1]=Be-mt,kt.o[1][0]=$t?Se+Ye:Se-Ye,kt.o[1][1]=Be+mt*Qe,kt.o[2][0]=$t?Se-Ye*Qe:Se+Ye*Qe,kt.o[2][1]=Be+mt,kt.o[3][0]=$t?Se-Ye:Se+Ye,kt.o[3][1]=Be-mt*Qe}},m([qo],Ee),Ee})(),st=(function(){function Qe(Ee,Se){this.v=mo.newElement(),this.v.setPathData(!0,0),this.elem=Ee,this.comp=Ee.comp,this.data=Se,this.frameId=-1,this.d=Se.d,this.initDynamicPropertyContainer(Ee),Se.sy===1?(this.ir=jt.getProp(Ee,Se.ir,0,0,this),this.is=jt.getProp(Ee,Se.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=jt.getProp(Ee,Se.pt,0,0,this),this.p=jt.getProp(Ee,Se.p,1,0,this),this.r=jt.getProp(Ee,Se.r,0,T,this),this.or=jt.getProp(Ee,Se.or,0,0,this),this.os=jt.getProp(Ee,Se.os,0,.01,this),this.localShapeCollection=jo.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return Qe.prototype={reset:oe,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var Ee=Math.floor(this.pt.v)*2,Se=Math.PI*2/Ee,Be=!0,Ye=this.or.v,mt=this.ir.v,$t=this.os.v,kt=this.is.v,qt=2*Math.PI*Ye/(Ee*2),Eo=2*Math.PI*mt/(Ee*2),wo,lo,Mo,Mt,Ut=-Math.PI/2;Ut+=this.r.v;var Re=this.data.d===3?-1:1;for(this.v._length=0,wo=0;wo<Ee;wo+=1){lo=Be?Ye:mt,Mo=Be?$t:kt,Mt=Be?qt:Eo;var Ue=lo*Math.cos(Ut),ge=lo*Math.sin(Ut),_e=Ue===0&&ge===0?0:ge/Math.sqrt(Ue*Ue+ge*ge),ft=Ue===0&&ge===0?0:-Ue/Math.sqrt(Ue*Ue+ge*ge);Ue+=+this.p.v[0],ge+=+this.p.v[1],this.v.setTripleAt(Ue,ge,Ue-_e*Mt*Mo*Re,ge-ft*Mt*Mo*Re,Ue+_e*Mt*Mo*Re,ge+ft*Mt*Mo*Re,wo,!0),Be=!Be,Ut+=Se*Re}},convertPolygonToPath:function(){var Ee=Math.floor(this.pt.v),Se=Math.PI*2/Ee,Be=this.or.v,Ye=this.os.v,mt=2*Math.PI*Be/(Ee*4),$t,kt=-Math.PI*.5,qt=this.data.d===3?-1:1;for(kt+=this.r.v,this.v._length=0,$t=0;$t<Ee;$t+=1){var Eo=Be*Math.cos(kt),wo=Be*Math.sin(kt),lo=Eo===0&&wo===0?0:wo/Math.sqrt(Eo*Eo+wo*wo),Mo=Eo===0&&wo===0?0:-Eo/Math.sqrt(Eo*Eo+wo*wo);Eo+=+this.p.v[0],wo+=+this.p.v[1],this.v.setTripleAt(Eo,wo,Eo-lo*mt*Ye*qt,wo-Mo*mt*Ye*qt,Eo+lo*mt*Ye*qt,wo+Mo*mt*Ye*qt,$t,!0),kt+=Se*qt}this.paths.length=0,this.paths[0]=this.v}},m([qo],Qe),Qe})(),Le=(function(){function Qe(Ee,Se){this.v=mo.newElement(),this.v.c=!0,this.localShapeCollection=jo.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=Ee,this.comp=Ee.comp,this.frameId=-1,this.d=Se.d,this.initDynamicPropertyContainer(Ee),this.p=jt.getProp(Ee,Se.p,1,0,this),this.s=jt.getProp(Ee,Se.s,1,0,this),this.r=jt.getProp(Ee,Se.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return Qe.prototype={convertRectToPath:function(){var Ee=this.p.v[0],Se=this.p.v[1],Be=this.s.v[0]/2,Ye=this.s.v[1]/2,mt=P(Be,Ye,this.r.v),$t=mt*(1-D);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(Ee+Be,Se-Ye+mt,Ee+Be,Se-Ye+mt,Ee+Be,Se-Ye+$t,0,!0),this.v.setTripleAt(Ee+Be,Se+Ye-mt,Ee+Be,Se+Ye-$t,Ee+Be,Se+Ye-mt,1,!0),mt!==0?(this.v.setTripleAt(Ee+Be-mt,Se+Ye,Ee+Be-mt,Se+Ye,Ee+Be-$t,Se+Ye,2,!0),this.v.setTripleAt(Ee-Be+mt,Se+Ye,Ee-Be+$t,Se+Ye,Ee-Be+mt,Se+Ye,3,!0),this.v.setTripleAt(Ee-Be,Se+Ye-mt,Ee-Be,Se+Ye-mt,Ee-Be,Se+Ye-$t,4,!0),this.v.setTripleAt(Ee-Be,Se-Ye+mt,Ee-Be,Se-Ye+$t,Ee-Be,Se-Ye+mt,5,!0),this.v.setTripleAt(Ee-Be+mt,Se-Ye,Ee-Be+mt,Se-Ye,Ee-Be+$t,Se-Ye,6,!0),this.v.setTripleAt(Ee+Be-mt,Se-Ye,Ee+Be-$t,Se-Ye,Ee+Be-mt,Se-Ye,7,!0)):(this.v.setTripleAt(Ee-Be,Se+Ye,Ee-Be+$t,Se+Ye,Ee-Be,Se+Ye,2),this.v.setTripleAt(Ee-Be,Se-Ye,Ee-Be,Se-Ye+$t,Ee-Be,Se-Ye,3))):(this.v.setTripleAt(Ee+Be,Se-Ye+mt,Ee+Be,Se-Ye+$t,Ee+Be,Se-Ye+mt,0,!0),mt!==0?(this.v.setTripleAt(Ee+Be-mt,Se-Ye,Ee+Be-mt,Se-Ye,Ee+Be-$t,Se-Ye,1,!0),this.v.setTripleAt(Ee-Be+mt,Se-Ye,Ee-Be+$t,Se-Ye,Ee-Be+mt,Se-Ye,2,!0),this.v.setTripleAt(Ee-Be,Se-Ye+mt,Ee-Be,Se-Ye+mt,Ee-Be,Se-Ye+$t,3,!0),this.v.setTripleAt(Ee-Be,Se+Ye-mt,Ee-Be,Se+Ye-$t,Ee-Be,Se+Ye-mt,4,!0),this.v.setTripleAt(Ee-Be+mt,Se+Ye,Ee-Be+mt,Se+Ye,Ee-Be+$t,Se+Ye,5,!0),this.v.setTripleAt(Ee+Be-mt,Se+Ye,Ee+Be-$t,Se+Ye,Ee+Be-mt,Se+Ye,6,!0),this.v.setTripleAt(Ee+Be,Se+Ye-mt,Ee+Be,Se+Ye-mt,Ee+Be,Se+Ye-$t,7,!0)):(this.v.setTripleAt(Ee-Be,Se-Ye,Ee-Be+$t,Se-Ye,Ee-Be,Se-Ye,1,!0),this.v.setTripleAt(Ee-Be,Se+Ye,Ee-Be,Se+Ye-$t,Ee-Be,Se+Ye,2,!0),this.v.setTripleAt(Ee+Be,Se+Ye,Ee+Be-$t,Se+Ye,Ee+Be,Se+Ye,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:oe},m([qo],Qe),Qe})();function nt(Qe,Ee,Se){var Be;if(Se===3||Se===4){var Ye=Se===3?Ee.pt:Ee.ks,mt=Ye.k;mt.length?Be=new Ke(Qe,Ee,Se):Be=new De(Qe,Ee,Se)}else Se===5?Be=new Le(Qe,Ee):Se===6?Be=new et(Qe,Ee):Se===7&&(Be=new st(Qe,Ee));return Be.k&&Qe.addDynamicProperty(Be),Be}function dt(){return De}function ot(){return Ke}var ht={};return ht.getShapeProp=nt,ht.getConstructorFunction=dt,ht.getKeyframedConstructorFunction=ot,ht})(),$r=(function(){var M=Math.cos,_=Math.sin,K=Math.tan,oe=Math.round;function se(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function re(ge){if(ge===0)return this;var _e=M(ge),ft=_(ge);return this._t(_e,-ft,0,0,ft,_e,0,0,0,0,1,0,0,0,0,1)}function be(ge){if(ge===0)return this;var _e=M(ge),ft=_(ge);return this._t(1,0,0,0,0,_e,-ft,0,0,ft,_e,0,0,0,0,1)}function De(ge){if(ge===0)return this;var _e=M(ge),ft=_(ge);return this._t(_e,0,ft,0,0,1,0,0,-ft,0,_e,0,0,0,0,1)}function we(ge){if(ge===0)return this;var _e=M(ge),ft=_(ge);return this._t(_e,-ft,0,0,ft,_e,0,0,0,0,1,0,0,0,0,1)}function Ke(ge,_e){return this._t(1,_e,ge,1,0,0)}function et(ge,_e){return this.shear(K(ge),K(_e))}function st(ge,_e){var ft=M(_e),ct=_(_e);return this._t(ft,ct,0,0,-ct,ft,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,K(ge),1,0,0,0,0,1,0,0,0,0,1)._t(ft,-ct,0,0,ct,ft,0,0,0,0,1,0,0,0,0,1)}function Le(ge,_e,ft){return!ft&&ft!==0&&(ft=1),ge===1&&_e===1&&ft===1?this:this._t(ge,0,0,0,0,_e,0,0,0,0,ft,0,0,0,0,1)}function nt(ge,_e,ft,ct,ti,go,Gi,yi,ea,xa,Il,Yp,jl,hs,vd,jr){return this.props[0]=ge,this.props[1]=_e,this.props[2]=ft,this.props[3]=ct,this.props[4]=ti,this.props[5]=go,this.props[6]=Gi,this.props[7]=yi,this.props[8]=ea,this.props[9]=xa,this.props[10]=Il,this.props[11]=Yp,this.props[12]=jl,this.props[13]=hs,this.props[14]=vd,this.props[15]=jr,this}function dt(ge,_e,ft){return ft=ft||0,ge!==0||_e!==0||ft!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,ge,_e,ft,1):this}function ot(ge,_e,ft,ct,ti,go,Gi,yi,ea,xa,Il,Yp,jl,hs,vd,jr){var yo=this.props;if(ge===1&&_e===0&&ft===0&&ct===0&&ti===0&&go===1&&Gi===0&&yi===0&&ea===0&&xa===0&&Il===1&&Yp===0)return yo[12]=yo[12]*ge+yo[15]*jl,yo[13]=yo[13]*go+yo[15]*hs,yo[14]=yo[14]*Il+yo[15]*vd,yo[15]*=jr,this._identityCalculated=!1,this;var Lu=yo[0],l0=yo[1],Iu=yo[2],Kp=yo[3],ju=yo[4],Mu=yo[5],Ml=yo[6],d0=yo[7],c0=yo[8],l1=yo[9],p0=yo[10],d1=yo[11],Vg=yo[12],Pv=yo[13],zv=yo[14],Rv=yo[15];return yo[0]=Lu*ge+l0*ti+Iu*ea+Kp*jl,yo[1]=Lu*_e+l0*go+Iu*xa+Kp*hs,yo[2]=Lu*ft+l0*Gi+Iu*Il+Kp*vd,yo[3]=Lu*ct+l0*yi+Iu*Yp+Kp*jr,yo[4]=ju*ge+Mu*ti+Ml*ea+d0*jl,yo[5]=ju*_e+Mu*go+Ml*xa+d0*hs,yo[6]=ju*ft+Mu*Gi+Ml*Il+d0*vd,yo[7]=ju*ct+Mu*yi+Ml*Yp+d0*jr,yo[8]=c0*ge+l1*ti+p0*ea+d1*jl,yo[9]=c0*_e+l1*go+p0*xa+d1*hs,yo[10]=c0*ft+l1*Gi+p0*Il+d1*vd,yo[11]=c0*ct+l1*yi+p0*Yp+d1*jr,yo[12]=Vg*ge+Pv*ti+zv*ea+Rv*jl,yo[13]=Vg*_e+Pv*go+zv*xa+Rv*hs,yo[14]=Vg*ft+Pv*Gi+zv*Il+Rv*vd,yo[15]=Vg*ct+Pv*yi+zv*Yp+Rv*jr,this._identityCalculated=!1,this}function ht(ge){var _e=ge.props;return this.transform(_e[0],_e[1],_e[2],_e[3],_e[4],_e[5],_e[6],_e[7],_e[8],_e[9],_e[10],_e[11],_e[12],_e[13],_e[14],_e[15])}function Qe(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function Ee(ge){for(var _e=0;_e<16;){if(ge.props[_e]!==this.props[_e])return!1;_e+=1}return!0}function Se(ge){var _e;for(_e=0;_e<16;_e+=1)ge.props[_e]=this.props[_e];return ge}function Be(ge){var _e;for(_e=0;_e<16;_e+=1)this.props[_e]=ge[_e]}function Ye(ge,_e,ft){return{x:ge*this.props[0]+_e*this.props[4]+ft*this.props[8]+this.props[12],y:ge*this.props[1]+_e*this.props[5]+ft*this.props[9]+this.props[13],z:ge*this.props[2]+_e*this.props[6]+ft*this.props[10]+this.props[14]}}function mt(ge,_e,ft){return ge*this.props[0]+_e*this.props[4]+ft*this.props[8]+this.props[12]}function $t(ge,_e,ft){return ge*this.props[1]+_e*this.props[5]+ft*this.props[9]+this.props[13]}function kt(ge,_e,ft){return ge*this.props[2]+_e*this.props[6]+ft*this.props[10]+this.props[14]}function qt(){var ge=this.props[0]*this.props[5]-this.props[1]*this.props[4],_e=this.props[5]/ge,ft=-this.props[1]/ge,ct=-this.props[4]/ge,ti=this.props[0]/ge,go=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/ge,Gi=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/ge,yi=new $r;return yi.props[0]=_e,yi.props[1]=ft,yi.props[4]=ct,yi.props[5]=ti,yi.props[12]=go,yi.props[13]=Gi,yi}function Eo(ge){var _e=this.getInverseMatrix();return _e.applyToPointArray(ge[0],ge[1],ge[2]||0)}function wo(ge){var _e,ft=ge.length,ct=[];for(_e=0;_e<ft;_e+=1)ct[_e]=Eo(ge[_e]);return ct}function lo(ge,_e,ft){var ct=y("float32",6);if(this.isIdentity())ct[0]=ge[0],ct[1]=ge[1],ct[2]=_e[0],ct[3]=_e[1],ct[4]=ft[0],ct[5]=ft[1];else{var ti=this.props[0],go=this.props[1],Gi=this.props[4],yi=this.props[5],ea=this.props[12],xa=this.props[13];ct[0]=ge[0]*ti+ge[1]*Gi+ea,ct[1]=ge[0]*go+ge[1]*yi+xa,ct[2]=_e[0]*ti+_e[1]*Gi+ea,ct[3]=_e[0]*go+_e[1]*yi+xa,ct[4]=ft[0]*ti+ft[1]*Gi+ea,ct[5]=ft[0]*go+ft[1]*yi+xa}return ct}function Mo(ge,_e,ft){var ct;return this.isIdentity()?ct=[ge,_e,ft]:ct=[ge*this.props[0]+_e*this.props[4]+ft*this.props[8]+this.props[12],ge*this.props[1]+_e*this.props[5]+ft*this.props[9]+this.props[13],ge*this.props[2]+_e*this.props[6]+ft*this.props[10]+this.props[14]],ct}function Mt(ge,_e){if(this.isIdentity())return ge+","+_e;var ft=this.props;return Math.round((ge*ft[0]+_e*ft[4]+ft[12])*100)/100+","+Math.round((ge*ft[1]+_e*ft[5]+ft[13])*100)/100}function Ut(){for(var ge=0,_e=this.props,ft="matrix3d(",ct=1e4;ge<16;)ft+=oe(_e[ge]*ct)/ct,ft+=ge===15?")":",",ge+=1;return ft}function Re(ge){var _e=1e4;return ge<1e-6&&ge>0||ge>-1e-6&&ge<0?oe(ge*_e)/_e:ge}function Ue(){var ge=this.props,_e=Re(ge[0]),ft=Re(ge[1]),ct=Re(ge[4]),ti=Re(ge[5]),go=Re(ge[12]),Gi=Re(ge[13]);return"matrix("+_e+","+ft+","+ct+","+ti+","+go+","+Gi+")"}return function(){this.reset=se,this.rotate=re,this.rotateX=be,this.rotateY=De,this.rotateZ=we,this.skew=et,this.skewFromAxis=st,this.shear=Ke,this.scale=Le,this.setTransform=nt,this.translate=dt,this.transform=ot,this.multiply=ht,this.applyToPoint=Ye,this.applyToX=mt,this.applyToY=$t,this.applyToZ=kt,this.applyToPointArray=Mo,this.applyToTriplePoints=lo,this.applyToPointStringified=Mt,this.toCSS=Ut,this.to2dCSS=Ue,this.clone=Se,this.cloneFromProps=Be,this.equals=Ee,this.inversePoints=wo,this.inversePoint=Eo,this.getInverseMatrix=qt,this._t=this.transform,this.isIdentity=Qe,this._identity=!0,this._identityCalculated=!1,this.props=y("float32",16),this.reset()}})();function kn(M){"@babel/helpers - typeof";return kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},kn(M)}var Zo={};function Qo(M){p(M)}function eo(){tt.searchAnimations()}function un(M){ee(M)}function Qr(M){pe(M)}function Jr(M){return tt.loadAnimation(M)}function tc(M){if(typeof M=="string")switch(M){case"high":me(200);break;default:case"medium":me(50);break;case"low":me(10);break}else!isNaN(M)&&M>1&&me(M)}function to(){return typeof navigator<"u"}function Ms(M,_){M==="expressions"&&ne(_)}function Fg(M){switch(M){case"propertyFactory":return jt;case"shapePropertyFactory":return wr;case"matrix":return $r;default:return null}}Zo.play=tt.play,Zo.pause=tt.pause,Zo.setLocationHref=Qo,Zo.togglePause=tt.togglePause,Zo.setSpeed=tt.setSpeed,Zo.setDirection=tt.setDirection,Zo.stop=tt.stop,Zo.searchAnimations=eo,Zo.registerAnimation=tt.registerAnimation,Zo.loadAnimation=Jr,Zo.setSubframeRendering=un,Zo.resize=tt.resize,Zo.goToAndStop=tt.goToAndStop,Zo.destroy=tt.destroy,Zo.setQuality=tc,Zo.inBrowser=to,Zo.installPlugin=Ms,Zo.freeze=tt.freeze,Zo.unfreeze=tt.unfreeze,Zo.setVolume=tt.setVolume,Zo.mute=tt.mute,Zo.unmute=tt.unmute,Zo.getRegisteredAnimations=tt.getRegisteredAnimations,Zo.useWebWorker=d,Zo.setIDPrefix=Qr,Zo.__getFactory=Fg,Zo.version="5.13.0";function $u(){document.readyState==="complete"&&(clearInterval(TB),eo())}function BB(M){for(var _=kv.split("&"),K=0;K<_.length;K+=1){var oe=_[K].split("=");if(decodeURIComponent(oe[0])==M)return decodeURIComponent(oe[1])}return null}var kv="";{var Q8=document.getElementsByTagName("script"),DB=Q8.length-1,Sv=Q8[DB]||{src:""};kv=Sv.src?Sv.src.replace(/^[^\?]+\??/,""):"",BB("renderer")}var TB=setInterval($u,100);try{kn(t)!=="object"&&(window.bodymovin=Zo)}catch{}var Wp=(function(){var M={},_={};M.registerModifier=K,M.getModifier=oe;function K(se,re){_[se]||(_[se]=re)}function oe(se,re,be){return new _[se](re,be)}return M})();function Bs(){}Bs.prototype.initModifierProperties=function(){},Bs.prototype.addShapeToModifier=function(){},Bs.prototype.addShape=function(M){if(!this.closed){M.sh.container.addDynamicProperty(M.sh);var _={shape:M.sh,data:M,localShapeCollection:jo.newShapeCollection()};this.shapes.push(_),this.addShapeToModifier(_),this._isAnimated&&M.setAsAnimated()}},Bs.prototype.init=function(M,_){this.shapes=[],this.elem=M,this.initDynamicPropertyContainer(M),this.initModifierProperties(M,_),this.frameId=l,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Bs.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},m([qo],Bs);function bd(){}m([Bs],bd),bd.prototype.initModifierProperties=function(M,_){this.s=jt.getProp(M,_.s,0,.01,this),this.e=jt.getProp(M,_.e,0,.01,this),this.o=jt.getProp(M,_.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=_.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},bd.prototype.addShapeToModifier=function(M){M.pathsData=[]},bd.prototype.calculateShapeEdges=function(M,_,K,oe,se){var re=[];_<=1?re.push({s:M,e:_}):M>=1?re.push({s:M-1,e:_-1}):(re.push({s:M,e:1}),re.push({s:0,e:_-1}));var be=[],De,we=re.length,Ke;for(De=0;De<we;De+=1)if(Ke=re[De],!(Ke.e*se<oe||Ke.s*se>oe+K)){var et,st;Ke.s*se<=oe?et=0:et=(Ke.s*se-oe)/K,Ke.e*se>=oe+K?st=1:st=(Ke.e*se-oe)/K,be.push([et,st])}return be.length||be.push([0,0]),be},bd.prototype.releasePathsData=function(M){var _,K=M.length;for(_=0;_<K;_+=1)Ne.release(M[_]);return M.length=0,M},bd.prototype.processShapes=function(M){var _,K;if(this._mdf||M){var oe=this.o.v%360/360;if(oe<0&&(oe+=1),this.s.v>1?_=1+oe:this.s.v<0?_=0+oe:_=this.s.v+oe,this.e.v>1?K=1+oe:this.e.v<0?K=0+oe:K=this.e.v+oe,_>K){var se=_;_=K,K=se}_=Math.round(_*1e4)*1e-4,K=Math.round(K*1e4)*1e-4,this.sValue=_,this.eValue=K}else _=this.sValue,K=this.eValue;var re,be,De=this.shapes.length,we,Ke,et,st,Le,nt=0;if(K===_)for(be=0;be<De;be+=1)this.shapes[be].localShapeCollection.releaseShapes(),this.shapes[be].shape._mdf=!0,this.shapes[be].shape.paths=this.shapes[be].localShapeCollection,this._mdf&&(this.shapes[be].pathsData.length=0);else if(K===1&&_===0||K===0&&_===1){if(this._mdf)for(be=0;be<De;be+=1)this.shapes[be].pathsData.length=0,this.shapes[be].shape._mdf=!0}else{var dt=[],ot,ht;for(be=0;be<De;be+=1)if(ot=this.shapes[be],!ot.shape._mdf&&!this._mdf&&!M&&this.m!==2)ot.shape.paths=ot.localShapeCollection;else{if(re=ot.shape.paths,Ke=re._length,Le=0,!ot.shape._mdf&&ot.pathsData.length)Le=ot.totalShapeLength;else{for(et=this.releasePathsData(ot.pathsData),we=0;we<Ke;we+=1)st=Oe.getSegmentsLength(re.shapes[we]),et.push(st),Le+=st.totalLength;ot.totalShapeLength=Le,ot.pathsData=et}nt+=Le,ot.shape._mdf=!0}var Qe=_,Ee=K,Se=0,Be;for(be=De-1;be>=0;be-=1)if(ot=this.shapes[be],ot.shape._mdf){for(ht=ot.localShapeCollection,ht.releaseShapes(),this.m===2&&De>1?(Be=this.calculateShapeEdges(_,K,ot.totalShapeLength,Se,nt),Se+=ot.totalShapeLength):Be=[[Qe,Ee]],Ke=Be.length,we=0;we<Ke;we+=1){Qe=Be[we][0],Ee=Be[we][1],dt.length=0,Ee<=1?dt.push({s:ot.totalShapeLength*Qe,e:ot.totalShapeLength*Ee}):Qe>=1?dt.push({s:ot.totalShapeLength*(Qe-1),e:ot.totalShapeLength*(Ee-1)}):(dt.push({s:ot.totalShapeLength*Qe,e:ot.totalShapeLength}),dt.push({s:0,e:ot.totalShapeLength*(Ee-1)}));var Ye=this.addShapes(ot,dt[0]);if(dt[0].s!==dt[0].e){if(dt.length>1){var mt=ot.shape.paths.shapes[ot.shape.paths._length-1];if(mt.c){var $t=Ye.pop();this.addPaths(Ye,ht),Ye=this.addShapes(ot,dt[1],$t)}else this.addPaths(Ye,ht),Ye=this.addShapes(ot,dt[1])}this.addPaths(Ye,ht)}}ot.shape.paths=ht}}},bd.prototype.addPaths=function(M,_){var K,oe=M.length;for(K=0;K<oe;K+=1)_.addShape(M[K])},bd.prototype.addSegment=function(M,_,K,oe,se,re,be){se.setXYAt(_[0],_[1],"o",re),se.setXYAt(K[0],K[1],"i",re+1),be&&se.setXYAt(M[0],M[1],"v",re),se.setXYAt(oe[0],oe[1],"v",re+1)},bd.prototype.addSegmentFromArray=function(M,_,K,oe){_.setXYAt(M[1],M[5],"o",K),_.setXYAt(M[2],M[6],"i",K+1),oe&&_.setXYAt(M[0],M[4],"v",K),_.setXYAt(M[3],M[7],"v",K+1)},bd.prototype.addShapes=function(M,_,K){var oe=M.pathsData,se=M.shape.paths.shapes,re,be=M.shape.paths._length,De,we,Ke=0,et,st,Le,nt,dt=[],ot,ht=!0;for(K?(st=K._length,ot=K._length):(K=mo.newElement(),st=0,ot=0),dt.push(K),re=0;re<be;re+=1){for(Le=oe[re].lengths,K.c=se[re].c,we=se[re].c?Le.length:Le.length+1,De=1;De<we;De+=1)if(et=Le[De-1],Ke+et.addedLength<_.s)Ke+=et.addedLength,K.c=!1;else if(Ke>_.e){K.c=!1;break}else _.s<=Ke&&_.e>=Ke+et.addedLength?(this.addSegment(se[re].v[De-1],se[re].o[De-1],se[re].i[De],se[re].v[De],K,st,ht),ht=!1):(nt=Oe.getNewSegment(se[re].v[De-1],se[re].v[De],se[re].o[De-1],se[re].i[De],(_.s-Ke)/et.addedLength,(_.e-Ke)/et.addedLength,Le[De-1]),this.addSegmentFromArray(nt,K,st,ht),ht=!1,K.c=!1),Ke+=et.addedLength,st+=1;if(se[re].c&&Le.length){if(et=Le[De-1],Ke<=_.e){var Qe=Le[De-1].addedLength;_.s<=Ke&&_.e>=Ke+Qe?(this.addSegment(se[re].v[De-1],se[re].o[De-1],se[re].i[0],se[re].v[0],K,st,ht),ht=!1):(nt=Oe.getNewSegment(se[re].v[De-1],se[re].v[0],se[re].o[De-1],se[re].i[0],(_.s-Ke)/Qe,(_.e-Ke)/Qe,Le[De-1]),this.addSegmentFromArray(nt,K,st,ht),ht=!1,K.c=!1)}else K.c=!1;Ke+=et.addedLength,st+=1}if(K._length&&(K.setXYAt(K.v[ot][0],K.v[ot][1],"i",ot),K.setXYAt(K.v[K._length-1][0],K.v[K._length-1][1],"o",K._length-1)),Ke>_.e)break;re<be-1&&(K=mo.newElement(),ht=!0,dt.push(K),st=0)}return dt};function Gp(){}m([Bs],Gp),Gp.prototype.initModifierProperties=function(M,_){this.getValue=this.processKeys,this.amount=jt.getProp(M,_.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},Gp.prototype.processPath=function(M,_){var K=_/100,oe=[0,0],se=M._length,re=0;for(re=0;re<se;re+=1)oe[0]+=M.v[re][0],oe[1]+=M.v[re][1];oe[0]/=se,oe[1]/=se;var be=mo.newElement();be.c=M.c;var De,we,Ke,et,st,Le;for(re=0;re<se;re+=1)De=M.v[re][0]+(oe[0]-M.v[re][0])*K,we=M.v[re][1]+(oe[1]-M.v[re][1])*K,Ke=M.o[re][0]+(oe[0]-M.o[re][0])*-K,et=M.o[re][1]+(oe[1]-M.o[re][1])*-K,st=M.i[re][0]+(oe[0]-M.i[re][0])*-K,Le=M.i[re][1]+(oe[1]-M.i[re][1])*-K,be.setTripleAt(De,we,Ke,et,st,Le,re);return be},Gp.prototype.processShapes=function(M){var _,K,oe=this.shapes.length,se,re,be=this.amount.v;if(be!==0){var De,we;for(K=0;K<oe;K+=1){if(De=this.shapes[K],we=De.localShapeCollection,!(!De.shape._mdf&&!this._mdf&&!M))for(we.releaseShapes(),De.shape._mdf=!0,_=De.shape.paths.shapes,re=De.shape.paths._length,se=0;se<re;se+=1)we.addShape(this.processPath(_[se],be));De.shape.paths=De.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var z4=(function(){var M=[0,0];function _(we){var Ke=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||Ke,this.a&&we.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&we.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&we.skewFromAxis(-this.sk.v,this.sa.v),this.r?we.rotate(-this.r.v):we.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?we.translate(this.px.v,this.py.v,-this.pz.v):we.translate(this.px.v,this.py.v,0):we.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function K(we){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||we){var Ke;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var et,st;if(Ke=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(et=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/Ke,0),st=this.p.getValueAtTime(this.p.keyframes[0].t/Ke,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(et=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/Ke,0),st=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/Ke,0)):(et=this.p.pv,st=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/Ke,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){et=[],st=[];var Le=this.px,nt=this.py;Le._caching.lastFrame+Le.offsetTime<=Le.keyframes[0].t?(et[0]=Le.getValueAtTime((Le.keyframes[0].t+.01)/Ke,0),et[1]=nt.getValueAtTime((nt.keyframes[0].t+.01)/Ke,0),st[0]=Le.getValueAtTime(Le.keyframes[0].t/Ke,0),st[1]=nt.getValueAtTime(nt.keyframes[0].t/Ke,0)):Le._caching.lastFrame+Le.offsetTime>=Le.keyframes[Le.keyframes.length-1].t?(et[0]=Le.getValueAtTime(Le.keyframes[Le.keyframes.length-1].t/Ke,0),et[1]=nt.getValueAtTime(nt.keyframes[nt.keyframes.length-1].t/Ke,0),st[0]=Le.getValueAtTime((Le.keyframes[Le.keyframes.length-1].t-.01)/Ke,0),st[1]=nt.getValueAtTime((nt.keyframes[nt.keyframes.length-1].t-.01)/Ke,0)):(et=[Le.pv,nt.pv],st[0]=Le.getValueAtTime((Le._caching.lastFrame+Le.offsetTime-.01)/Ke,Le.offsetTime),st[1]=nt.getValueAtTime((nt._caching.lastFrame+nt.offsetTime-.01)/Ke,nt.offsetTime))}else st=M,et=st;this.v.rotate(-Math.atan2(et[1]-st[1],et[0]-st[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function oe(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function se(){}function re(we){this._addDynamicProperty(we),this.elem.addDynamicProperty(we),this._isDirty=!0}function be(we,Ke,et){if(this.elem=we,this.frameId=-1,this.propType="transform",this.data=Ke,this.v=new $r,this.pre=new $r,this.appliedTransformations=0,this.initDynamicPropertyContainer(et||we),Ke.p&&Ke.p.s?(this.px=jt.getProp(we,Ke.p.x,0,0,this),this.py=jt.getProp(we,Ke.p.y,0,0,this),Ke.p.z&&(this.pz=jt.getProp(we,Ke.p.z,0,0,this))):this.p=jt.getProp(we,Ke.p||{k:[0,0,0]},1,0,this),Ke.rx){if(this.rx=jt.getProp(we,Ke.rx,0,T,this),this.ry=jt.getProp(we,Ke.ry,0,T,this),this.rz=jt.getProp(we,Ke.rz,0,T,this),Ke.or.k[0].ti){var st,Le=Ke.or.k.length;for(st=0;st<Le;st+=1)Ke.or.k[st].to=null,Ke.or.k[st].ti=null}this.or=jt.getProp(we,Ke.or,1,T,this),this.or.sh=!0}else this.r=jt.getProp(we,Ke.r||{k:0},0,T,this);Ke.sk&&(this.sk=jt.getProp(we,Ke.sk,0,T,this),this.sa=jt.getProp(we,Ke.sa,0,T,this)),this.a=jt.getProp(we,Ke.a||{k:[0,0,0]},1,0,this),this.s=jt.getProp(we,Ke.s||{k:[100,100,100]},1,.01,this),Ke.o?this.o=jt.getProp(we,Ke.o,0,.01,we):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}be.prototype={applyToMatrix:_,getValue:K,precalculateMatrix:oe,autoOrient:se},m([qo],be),be.prototype.addDynamicProperty=re,be.prototype._addDynamicProperty=qo.prototype.addDynamicProperty;function De(we,Ke,et){return new be(we,Ke,et)}return{getTransformProperty:De}})();function oc(){}m([Bs],oc),oc.prototype.initModifierProperties=function(M,_){this.getValue=this.processKeys,this.c=jt.getProp(M,_.c,0,null,this),this.o=jt.getProp(M,_.o,0,null,this),this.tr=z4.getTransformProperty(M,_.tr,this),this.so=jt.getProp(M,_.tr.so,0,.01,this),this.eo=jt.getProp(M,_.tr.eo,0,.01,this),this.data=_,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new $r,this.rMatrix=new $r,this.sMatrix=new $r,this.tMatrix=new $r,this.matrix=new $r},oc.prototype.applyTransforms=function(M,_,K,oe,se,re){var be=re?-1:1,De=oe.s.v[0]+(1-oe.s.v[0])*(1-se),we=oe.s.v[1]+(1-oe.s.v[1])*(1-se);M.translate(oe.p.v[0]*be*se,oe.p.v[1]*be*se,oe.p.v[2]),_.translate(-oe.a.v[0],-oe.a.v[1],oe.a.v[2]),_.rotate(-oe.r.v*be*se),_.translate(oe.a.v[0],oe.a.v[1],oe.a.v[2]),K.translate(-oe.a.v[0],-oe.a.v[1],oe.a.v[2]),K.scale(re?1/De:De,re?1/we:we),K.translate(oe.a.v[0],oe.a.v[1],oe.a.v[2])},oc.prototype.init=function(M,_,K,oe){for(this.elem=M,this.arr=_,this.pos=K,this.elemsData=oe,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(M),this.initModifierProperties(M,_[K]);K>0;)K-=1,this._elements.unshift(_[K]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},oc.prototype.resetElements=function(M){var _,K=M.length;for(_=0;_<K;_+=1)M[_]._processed=!1,M[_].ty==="gr"&&this.resetElements(M[_].it)},oc.prototype.cloneElements=function(M){var _=JSON.parse(JSON.stringify(M));return this.resetElements(_),_},oc.prototype.changeGroupRender=function(M,_){var K,oe=M.length;for(K=0;K<oe;K+=1)M[K]._render=_,M[K].ty==="gr"&&this.changeGroupRender(M[K].it,_)},oc.prototype.processShapes=function(M){var _,K,oe,se,re,be=!1;if(this._mdf||M){var De=Math.ceil(this.c.v);if(this._groups.length<De){for(;this._groups.length<De;){var we={it:this.cloneElements(this._elements),ty:"gr"};we.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,we),this._groups.splice(0,0,we),this._currentCopies+=1}this.elem.reloadShapes(),be=!0}re=0;var Ke;for(oe=0;oe<=this._groups.length-1;oe+=1){if(Ke=re<De,this._groups[oe]._render=Ke,this.changeGroupRender(this._groups[oe].it,Ke),!Ke){var et=this.elemsData[oe].it,st=et[et.length-1];st.transform.op.v!==0?(st.transform.op._mdf=!0,st.transform.op.v=0):st.transform.op._mdf=!1}re+=1}this._currentCopies=De;var Le=this.o.v,nt=Le%1,dt=Le>0?Math.floor(Le):Math.ceil(Le),ot=this.pMatrix.props,ht=this.rMatrix.props,Qe=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var Ee=0;if(Le>0){for(;Ee<dt;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),Ee+=1;nt&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,nt,!1),Ee+=nt)}else if(Le<0){for(;Ee>dt;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),Ee-=1;nt&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-nt,!0),Ee-=nt)}oe=this.data.m===1?0:this._currentCopies-1,se=this.data.m===1?1:-1,re=this._currentCopies;for(var Se,Be;re;){if(_=this.elemsData[oe].it,K=_[_.length-1].transform.mProps.v.props,Be=K.length,_[_.length-1].transform.mProps._mdf=!0,_[_.length-1].transform.op._mdf=!0,_[_.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(oe/(this._currentCopies-1)),Ee!==0){for((oe!==0&&se===1||oe!==this._currentCopies-1&&se===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(ht[0],ht[1],ht[2],ht[3],ht[4],ht[5],ht[6],ht[7],ht[8],ht[9],ht[10],ht[11],ht[12],ht[13],ht[14],ht[15]),this.matrix.transform(Qe[0],Qe[1],Qe[2],Qe[3],Qe[4],Qe[5],Qe[6],Qe[7],Qe[8],Qe[9],Qe[10],Qe[11],Qe[12],Qe[13],Qe[14],Qe[15]),this.matrix.transform(ot[0],ot[1],ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],ot[8],ot[9],ot[10],ot[11],ot[12],ot[13],ot[14],ot[15]),Se=0;Se<Be;Se+=1)K[Se]=this.matrix.props[Se];this.matrix.reset()}else for(this.matrix.reset(),Se=0;Se<Be;Se+=1)K[Se]=this.matrix.props[Se];Ee+=1,re-=1,oe+=se}}else for(re=this._currentCopies,oe=0,se=1;re;)_=this.elemsData[oe].it,K=_[_.length-1].transform.mProps.v.props,_[_.length-1].transform.mProps._mdf=!1,_[_.length-1].transform.op._mdf=!1,re-=1,oe+=se;return be},oc.prototype.addShape=function(){};function t0(){}m([Bs],t0),t0.prototype.initModifierProperties=function(M,_){this.getValue=this.processKeys,this.rd=jt.getProp(M,_.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},t0.prototype.processPath=function(M,_){var K=mo.newElement();K.c=M.c;var oe,se=M._length,re,be,De,we,Ke,et,st=0,Le,nt,dt,ot,ht,Qe;for(oe=0;oe<se;oe+=1)re=M.v[oe],De=M.o[oe],be=M.i[oe],re[0]===De[0]&&re[1]===De[1]&&re[0]===be[0]&&re[1]===be[1]?(oe===0||oe===se-1)&&!M.c?(K.setTripleAt(re[0],re[1],De[0],De[1],be[0],be[1],st),st+=1):(oe===0?we=M.v[se-1]:we=M.v[oe-1],Ke=Math.sqrt(Math.pow(re[0]-we[0],2)+Math.pow(re[1]-we[1],2)),et=Ke?Math.min(Ke/2,_)/Ke:0,ht=re[0]+(we[0]-re[0])*et,Le=ht,Qe=re[1]-(re[1]-we[1])*et,nt=Qe,dt=Le-(Le-re[0])*D,ot=nt-(nt-re[1])*D,K.setTripleAt(Le,nt,dt,ot,ht,Qe,st),st+=1,oe===se-1?we=M.v[0]:we=M.v[oe+1],Ke=Math.sqrt(Math.pow(re[0]-we[0],2)+Math.pow(re[1]-we[1],2)),et=Ke?Math.min(Ke/2,_)/Ke:0,dt=re[0]+(we[0]-re[0])*et,Le=dt,ot=re[1]+(we[1]-re[1])*et,nt=ot,ht=Le-(Le-re[0])*D,Qe=nt-(nt-re[1])*D,K.setTripleAt(Le,nt,dt,ot,ht,Qe,st),st+=1):(K.setTripleAt(M.v[oe][0],M.v[oe][1],M.o[oe][0],M.o[oe][1],M.i[oe][0],M.i[oe][1],st),st+=1);return K},t0.prototype.processShapes=function(M){var _,K,oe=this.shapes.length,se,re,be=this.rd.v;if(be!==0){var De,we;for(K=0;K<oe;K+=1){if(De=this.shapes[K],we=De.localShapeCollection,!(!De.shape._mdf&&!this._mdf&&!M))for(we.releaseShapes(),De.shape._mdf=!0,_=De.shape.paths.shapes,re=De.shape.paths._length,se=0;se<re;se+=1)we.addShape(this.processPath(_[se],be));De.shape.paths=De.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function Og(M,_){return Math.abs(M-_)*1e5<=Math.min(Math.abs(M),Math.abs(_))}function U8(M){return Math.abs(M)<=1e-5}function R4(M,_,K){return M*(1-K)+_*K}function s1(M,_,K){return[R4(M[0],_[0],K),R4(M[1],_[1],K)]}function PB(M,_,K){if(M===0)return[];var oe=_*_-4*M*K;if(oe<0)return[];var se=-_/(2*M);if(oe===0)return[se];var re=Math.sqrt(oe)/(2*M);return[se-re,se+re]}function W8(M,_,K,oe){return[-M+3*_-3*K+oe,3*M-6*_+3*K,-3*M+3*_,M]}function Ev(M){return new nn(M,M,M,M,!1)}function nn(M,_,K,oe,se){se&&ui(M,_)&&(_=s1(M,oe,1/3)),se&&ui(K,oe)&&(K=s1(M,oe,2/3));var re=W8(M[0],_[0],K[0],oe[0]),be=W8(M[1],_[1],K[1],oe[1]);this.a=[re[0],be[0]],this.b=[re[1],be[1]],this.c=[re[2],be[2]],this.d=[re[3],be[3]],this.points=[M,_,K,oe]}nn.prototype.point=function(M){return[((this.a[0]*M+this.b[0])*M+this.c[0])*M+this.d[0],((this.a[1]*M+this.b[1])*M+this.c[1])*M+this.d[1]]},nn.prototype.derivative=function(M){return[(3*M*this.a[0]+2*this.b[0])*M+this.c[0],(3*M*this.a[1]+2*this.b[1])*M+this.c[1]]},nn.prototype.tangentAngle=function(M){var _=this.derivative(M);return Math.atan2(_[1],_[0])},nn.prototype.normalAngle=function(M){var _=this.derivative(M);return Math.atan2(_[0],_[1])},nn.prototype.inflectionPoints=function(){var M=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(U8(M))return[];var _=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/M,K=_*_-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/M;if(K<0)return[];var oe=Math.sqrt(K);return U8(oe)?oe>0&&oe<1?[_]:[]:[_-oe,_+oe].filter(function(se){return se>0&&se<1})},nn.prototype.split=function(M){if(M<=0)return[Ev(this.points[0]),this];if(M>=1)return[this,Ev(this.points[this.points.length-1])];var _=s1(this.points[0],this.points[1],M),K=s1(this.points[1],this.points[2],M),oe=s1(this.points[2],this.points[3],M),se=s1(_,K,M),re=s1(K,oe,M),be=s1(se,re,M);return[new nn(this.points[0],_,se,be,!0),new nn(be,re,oe,this.points[3],!0)]};function Lv(M,_){var K=M.points[0][_],oe=M.points[M.points.length-1][_];if(K>oe){var se=oe;oe=K,K=se}for(var re=PB(3*M.a[_],2*M.b[_],M.c[_]),be=0;be<re.length;be+=1)if(re[be]>0&&re[be]<1){var De=M.point(re[be])[_];De<K?K=De:De>oe&&(oe=De)}return{min:K,max:oe}}nn.prototype.bounds=function(){return{x:Lv(this,0),y:Lv(this,1)}},nn.prototype.boundingBox=function(){var M=this.bounds();return{left:M.x.min,right:M.x.max,top:M.y.min,bottom:M.y.max,width:M.x.max-M.x.min,height:M.y.max-M.y.min,cx:(M.x.max+M.x.min)/2,cy:(M.y.max+M.y.min)/2}};function o0(M,_,K){var oe=M.boundingBox();return{cx:oe.cx,cy:oe.cy,width:oe.width,height:oe.height,bez:M,t:(_+K)/2,t1:_,t2:K}}function Iv(M){var _=M.bez.split(.5);return[o0(_[0],M.t1,M.t),o0(_[1],M.t,M.t2)]}function jv(M,_){return Math.abs(M.cx-_.cx)*2<M.width+_.width&&Math.abs(M.cy-_.cy)*2<M.height+_.height}function i0(M,_,K,oe,se,re){if(jv(M,_)){if(K>=re||M.width<=oe&&M.height<=oe&&_.width<=oe&&_.height<=oe){se.push([M.t,_.t]);return}var be=Iv(M),De=Iv(_);i0(be[0],De[0],K+1,oe,se,re),i0(be[0],De[1],K+1,oe,se,re),i0(be[1],De[0],K+1,oe,se,re),i0(be[1],De[1],K+1,oe,se,re)}}nn.prototype.intersections=function(M,_,K){_===void 0&&(_=2),K===void 0&&(K=7);var oe=[];return i0(o0(this,0,1),o0(M,0,1),0,_,oe,K),oe},nn.shapeSegment=function(M,_){var K=(_+1)%M.length();return new nn(M.v[_],M.o[_],M.i[K],M.v[K],!0)},nn.shapeSegmentInverted=function(M,_){var K=(_+1)%M.length();return new nn(M.v[K],M.i[K],M.o[_],M.v[_],!0)};function At(M,_){return[M[1]*_[2]-M[2]*_[1],M[2]*_[0]-M[0]*_[2],M[0]*_[1]-M[1]*_[0]]}function Rt(M,_,K,oe){var se=[M[0],M[1],1],re=[_[0],_[1],1],be=[K[0],K[1],1],De=[oe[0],oe[1],1],we=At(At(se,re),At(be,De));return U8(we[2])?null:[we[0]/we[2],we[1]/we[2]]}function bo(M,_,K){return[M[0]+Math.cos(_)*K,M[1]-Math.sin(_)*K]}function xi(M,_){return Math.hypot(M[0]-_[0],M[1]-_[1])}function ui(M,_){return Og(M[0],_[0])&&Og(M[1],_[1])}function Sn(){}m([Bs],Sn),Sn.prototype.initModifierProperties=function(M,_){this.getValue=this.processKeys,this.amplitude=jt.getProp(M,_.s,0,null,this),this.frequency=jt.getProp(M,_.r,0,null,this),this.pointsType=jt.getProp(M,_.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function Mv(M,_,K,oe,se,re,be){var De=K-Math.PI/2,we=K+Math.PI/2,Ke=_[0]+Math.cos(K)*oe*se,et=_[1]-Math.sin(K)*oe*se;M.setTripleAt(Ke,et,Ke+Math.cos(De)*re,et-Math.sin(De)*re,Ke+Math.cos(we)*be,et-Math.sin(we)*be,M.length())}function ku(M,_){var K=[_[0]-M[0],_[1]-M[1]],oe=-Math.PI*.5,se=[Math.cos(oe)*K[0]-Math.sin(oe)*K[1],Math.sin(oe)*K[0]+Math.cos(oe)*K[1]];return se}function Bv(M,_){var K=_===0?M.length()-1:_-1,oe=(_+1)%M.length(),se=M.v[K],re=M.v[oe],be=ku(se,re);return Math.atan2(0,1)-Math.atan2(be[1],be[0])}function RX(M,_,K,oe,se,re,be){var De=Bv(_,K),we=_.v[K%_._length],Ke=_.v[K===0?_._length-1:K-1],et=_.v[(K+1)%_._length],st=re===2?Math.sqrt(Math.pow(we[0]-Ke[0],2)+Math.pow(we[1]-Ke[1],2)):0,Le=re===2?Math.sqrt(Math.pow(we[0]-et[0],2)+Math.pow(we[1]-et[1],2)):0;Mv(M,_.v[K%_._length],De,be,oe,Le/((se+1)*2),st/((se+1)*2))}function $We(M,_,K,oe,se,re){for(var be=0;be<oe;be+=1){var De=(be+1)/(oe+1),we=se===2?Math.sqrt(Math.pow(_.points[3][0]-_.points[0][0],2)+Math.pow(_.points[3][1]-_.points[0][1],2)):0,Ke=_.normalAngle(De),et=_.point(De);Mv(M,et,Ke,re,K,we/((oe+1)*2),we/((oe+1)*2)),re=-re}return re}Sn.prototype.processPath=function(M,_,K,oe){var se=M._length,re=mo.newElement();if(re.c=M.c,M.c||(se-=1),se===0)return re;var be=-1,De=nn.shapeSegment(M,0);RX(re,M,0,_,K,oe,be);for(var we=0;we<se;we+=1)be=$We(re,De,_,K,oe,-be),we===se-1&&!M.c?De=null:De=nn.shapeSegment(M,(we+1)%se),RX(re,M,we+1,_,K,oe,be);return re},Sn.prototype.processShapes=function(M){var _,K,oe=this.shapes.length,se,re,be=this.amplitude.v,De=Math.max(0,Math.round(this.frequency.v)),we=this.pointsType.v;if(be!==0){var Ke,et;for(K=0;K<oe;K+=1){if(Ke=this.shapes[K],et=Ke.localShapeCollection,!(!Ke.shape._mdf&&!this._mdf&&!M))for(et.releaseShapes(),Ke.shape._mdf=!0,_=Ke.shape.paths.shapes,re=Ke.shape.paths._length,se=0;se<re;se+=1)et.addShape(this.processPath(_[se],be,De,we));Ke.shape.paths=Ke.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function zB(M,_,K){var oe=Math.atan2(_[0]-M[0],_[1]-M[1]);return[bo(M,oe,K),bo(_,oe,K)]}function F4(M,_){var K,oe,se,re,be,De,we;we=zB(M.points[0],M.points[1],_),K=we[0],oe=we[1],we=zB(M.points[1],M.points[2],_),se=we[0],re=we[1],we=zB(M.points[2],M.points[3],_),be=we[0],De=we[1];var Ke=Rt(K,oe,se,re);Ke===null&&(Ke=oe);var et=Rt(be,De,se,re);return et===null&&(et=be),new nn(K,Ke,et,De)}function FX(M,_,K,oe,se){var re=_.points[3],be=K.points[0];if(oe===3||ui(re,be))return re;if(oe===2){var De=-_.tangentAngle(1),we=-K.tangentAngle(0)+Math.PI,Ke=Rt(re,bo(re,De+Math.PI/2,100),be,bo(be,De+Math.PI/2,100)),et=Ke?xi(Ke,re):xi(re,be)/2,st=bo(re,De,2*et*D);return M.setXYAt(st[0],st[1],"o",M.length()-1),st=bo(be,we,2*et*D),M.setTripleAt(be[0],be[1],be[0],be[1],st[0],st[1],M.length()),be}var Le=ui(re,_.points[2])?_.points[0]:_.points[2],nt=ui(be,K.points[1])?K.points[3]:K.points[1],dt=Rt(Le,re,be,nt);return dt&&xi(dt,re)<se?(M.setTripleAt(dt[0],dt[1],dt[0],dt[1],dt[0],dt[1],M.length()),dt):re}function OX(M,_){var K=M.intersections(_);return K.length&&Og(K[0][0],1)&&K.shift(),K.length?K[0]:null}function NX(M,_){var K=M.slice(),oe=_.slice(),se=OX(M[M.length-1],_[0]);return se&&(K[M.length-1]=M[M.length-1].split(se[0])[0],oe[0]=_[0].split(se[1])[1]),M.length>1&&_.length>1&&(se=OX(M[0],_[_.length-1]),se)?[[M[0].split(se[0])[0]],[_[_.length-1].split(se[1])[1]]]:[K,oe]}function kWe(M){for(var _,K=1;K<M.length;K+=1)_=NX(M[K-1],M[K]),M[K-1]=_[0],M[K]=_[1];return M.length>1&&(_=NX(M[M.length-1],M[0]),M[M.length-1]=_[0],M[0]=_[1]),M}function HX(M,_){var K=M.inflectionPoints(),oe,se,re,be;if(K.length===0)return[F4(M,_)];if(K.length===1||Og(K[1],1))return re=M.split(K[0]),oe=re[0],se=re[1],[F4(oe,_),F4(se,_)];re=M.split(K[0]),oe=re[0];var De=(K[1]-K[0])/(1-K[0]);return re=re[1].split(De),be=re[0],se=re[1],[F4(oe,_),F4(be,_),F4(se,_)]}function G8(){}m([Bs],G8),G8.prototype.initModifierProperties=function(M,_){this.getValue=this.processKeys,this.amount=jt.getProp(M,_.a,0,null,this),this.miterLimit=jt.getProp(M,_.ml,0,null,this),this.lineJoin=_.lj,this._isAnimated=this.amount.effectsSequence.length!==0},G8.prototype.processPath=function(M,_,K,oe){var se=mo.newElement();se.c=M.c;var re=M.length();M.c||(re-=1);var be,De,we,Ke=[];for(be=0;be<re;be+=1)we=nn.shapeSegment(M,be),Ke.push(HX(we,_));if(!M.c)for(be=re-1;be>=0;be-=1)we=nn.shapeSegmentInverted(M,be),Ke.push(HX(we,_));Ke=kWe(Ke);var et=null,st=null;for(be=0;be<Ke.length;be+=1){var Le=Ke[be];for(st&&(et=FX(se,st,Le[0],K,oe)),st=Le[Le.length-1],De=0;De<Le.length;De+=1)we=Le[De],et&&ui(we.points[0],et)?se.setXYAt(we.points[1][0],we.points[1][1],"o",se.length()-1):se.setTripleAt(we.points[0][0],we.points[0][1],we.points[1][0],we.points[1][1],we.points[0][0],we.points[0][1],se.length()),se.setTripleAt(we.points[3][0],we.points[3][1],we.points[3][0],we.points[3][1],we.points[2][0],we.points[2][1],se.length()),et=we.points[3]}return Ke.length&&FX(se,st,Ke[0][0],K,oe),se},G8.prototype.processShapes=function(M){var _,K,oe=this.shapes.length,se,re,be=this.amount.v,De=this.miterLimit.v,we=this.lineJoin;if(be!==0){var Ke,et;for(K=0;K<oe;K+=1){if(Ke=this.shapes[K],et=Ke.localShapeCollection,!(!Ke.shape._mdf&&!this._mdf&&!M))for(et.releaseShapes(),Ke.shape._mdf=!0,_=Ke.shape.paths.shapes,re=Ke.shape.paths._length,se=0;se<re;se+=1)et.addShape(this.processPath(_[se],be,we,De));Ke.shape.paths=Ke.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function _X(M){for(var _=M.fStyle?M.fStyle.split(" "):[],K="normal",oe="normal",se=_.length,re,be=0;be<se;be+=1)switch(re=_[be].toLowerCase(),re){case"italic":oe="italic";break;case"bold":K="700";break;case"black":K="900";break;case"medium":K="500";break;case"regular":case"normal":K="400";break;case"light":case"thin":K="200";break}return{style:oe,weight:M.fWeight||K}}var Ng=(function(){var M=5e3,_={w:0,size:0,shapes:[],data:{shapes:[]}},K=[];K=K.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var oe=127988,se=917631,re=917601,be=917626,De=65039,we=8205,Ke=127462,et=127487,st=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function Le(Re){var Ue=Re.split(","),ge,_e=Ue.length,ft=[];for(ge=0;ge<_e;ge+=1)Ue[ge]!=="sans-serif"&&Ue[ge]!=="monospace"&&ft.push(Ue[ge]);return ft.join(",")}function nt(Re,Ue){var ge=u("span");ge.setAttribute("aria-hidden",!0),ge.style.fontFamily=Ue;var _e=u("span");_e.innerText="giItT1WQy@!-/#",ge.style.position="absolute",ge.style.left="-10000px",ge.style.top="-10000px",ge.style.fontSize="300px",ge.style.fontVariant="normal",ge.style.fontStyle="normal",ge.style.fontWeight="normal",ge.style.letterSpacing="0",ge.appendChild(_e),document.body.appendChild(ge);var ft=_e.offsetWidth;return _e.style.fontFamily=Le(Re)+", "+Ue,{node:_e,w:ft,parent:ge}}function dt(){var Re,Ue=this.fonts.length,ge,_e,ft=Ue;for(Re=0;Re<Ue;Re+=1)this.fonts[Re].loaded?ft-=1:this.fonts[Re].fOrigin==="n"||this.fonts[Re].origin===0?this.fonts[Re].loaded=!0:(ge=this.fonts[Re].monoCase.node,_e=this.fonts[Re].monoCase.w,ge.offsetWidth!==_e?(ft-=1,this.fonts[Re].loaded=!0):(ge=this.fonts[Re].sansCase.node,_e=this.fonts[Re].sansCase.w,ge.offsetWidth!==_e&&(ft-=1,this.fonts[Re].loaded=!0)),this.fonts[Re].loaded&&(this.fonts[Re].sansCase.parent.parentNode.removeChild(this.fonts[Re].sansCase.parent),this.fonts[Re].monoCase.parent.parentNode.removeChild(this.fonts[Re].monoCase.parent)));ft!==0&&Date.now()-this.initTime<M?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function ot(Re,Ue){var ge=document.body&&Ue?"svg":"canvas",_e,ft=_X(Re);if(ge==="svg"){var ct=xe("text");ct.style.fontSize="100px",ct.setAttribute("font-family",Re.fFamily),ct.setAttribute("font-style",ft.style),ct.setAttribute("font-weight",ft.weight),ct.textContent="1",Re.fClass?(ct.style.fontFamily="inherit",ct.setAttribute("class",Re.fClass)):ct.style.fontFamily=Re.fFamily,Ue.appendChild(ct),_e=ct}else{var ti=new OffscreenCanvas(500,500).getContext("2d");ti.font=ft.style+" "+ft.weight+" 100px "+Re.fFamily,_e=ti}function go(Gi){return ge==="svg"?(_e.textContent=Gi,_e.getComputedTextLength()):_e.measureText(Gi).width}return{measureText:go}}function ht(Re,Ue){if(!Re){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=Re.list;return}if(!document.body){this.isLoaded=!0,Re.list.forEach(function(Il){Il.helper=ot(Il),Il.cache={}}),this.fonts=Re.list;return}var ge=Re.list,_e,ft=ge.length,ct=ft;for(_e=0;_e<ft;_e+=1){var ti=!0,go,Gi;if(ge[_e].loaded=!1,ge[_e].monoCase=nt(ge[_e].fFamily,"monospace"),ge[_e].sansCase=nt(ge[_e].fFamily,"sans-serif"),!ge[_e].fPath)ge[_e].loaded=!0,ct-=1;else if(ge[_e].fOrigin==="p"||ge[_e].origin===3){if(go=document.querySelectorAll('style[f-forigin="p"][f-family="'+ge[_e].fFamily+'"], style[f-origin="3"][f-family="'+ge[_e].fFamily+'"]'),go.length>0&&(ti=!1),ti){var yi=u("style");yi.setAttribute("f-forigin",ge[_e].fOrigin),yi.setAttribute("f-origin",ge[_e].origin),yi.setAttribute("f-family",ge[_e].fFamily),yi.type="text/css",yi.innerText="@font-face {font-family: "+ge[_e].fFamily+"; font-style: normal; src: url('"+ge[_e].fPath+"');}",Ue.appendChild(yi)}}else if(ge[_e].fOrigin==="g"||ge[_e].origin===1){for(go=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),Gi=0;Gi<go.length;Gi+=1)go[Gi].href.indexOf(ge[_e].fPath)!==-1&&(ti=!1);if(ti){var ea=u("link");ea.setAttribute("f-forigin",ge[_e].fOrigin),ea.setAttribute("f-origin",ge[_e].origin),ea.type="text/css",ea.rel="stylesheet",ea.href=ge[_e].fPath,document.body.appendChild(ea)}}else if(ge[_e].fOrigin==="t"||ge[_e].origin===2){for(go=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),Gi=0;Gi<go.length;Gi+=1)ge[_e].fPath===go[Gi].src&&(ti=!1);if(ti){var xa=u("link");xa.setAttribute("f-forigin",ge[_e].fOrigin),xa.setAttribute("f-origin",ge[_e].origin),xa.setAttribute("rel","stylesheet"),xa.setAttribute("href",ge[_e].fPath),Ue.appendChild(xa)}}ge[_e].helper=ot(ge[_e],Ue),ge[_e].cache={},this.fonts.push(ge[_e])}ct===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function Qe(Re){if(Re){this.chars||(this.chars=[]);var Ue,ge=Re.length,_e,ft=this.chars.length,ct;for(Ue=0;Ue<ge;Ue+=1){for(_e=0,ct=!1;_e<ft;)this.chars[_e].style===Re[Ue].style&&this.chars[_e].fFamily===Re[Ue].fFamily&&this.chars[_e].ch===Re[Ue].ch&&(ct=!0),_e+=1;ct||(this.chars.push(Re[Ue]),ft+=1)}}}function Ee(Re,Ue,ge){for(var _e=0,ft=this.chars.length;_e<ft;){if(this.chars[_e].ch===Re&&this.chars[_e].style===Ue&&this.chars[_e].fFamily===ge)return this.chars[_e];_e+=1}return(typeof Re=="string"&&Re.charCodeAt(0)!==13||!Re)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",Re,Ue,ge)),_}function Se(Re,Ue,ge){var _e=this.getFontByName(Ue),ft=Re;if(!_e.cache[ft]){var ct=_e.helper;if(Re===" "){var ti=ct.measureText("|"+Re+"|"),go=ct.measureText("||");_e.cache[ft]=(ti-go)/100}else _e.cache[ft]=ct.measureText(Re)/100}return _e.cache[ft]*ge}function Be(Re){for(var Ue=0,ge=this.fonts.length;Ue<ge;){if(this.fonts[Ue].fName===Re)return this.fonts[Ue];Ue+=1}return this.fonts[0]}function Ye(Re){var Ue=0,ge=Re.charCodeAt(0);if(ge>=55296&&ge<=56319){var _e=Re.charCodeAt(1);_e>=56320&&_e<=57343&&(Ue=(ge-55296)*1024+_e-56320+65536)}return Ue}function mt(Re,Ue){var ge=Re.toString(16)+Ue.toString(16);return st.indexOf(ge)!==-1}function $t(Re){return Re===we}function kt(Re){return Re===De}function qt(Re){var Ue=Ye(Re);return Ue>=Ke&&Ue<=et}function Eo(Re){return qt(Re.substr(0,2))&&qt(Re.substr(2,2))}function wo(Re){return K.indexOf(Re)!==-1}function lo(Re,Ue){var ge=Ye(Re.substr(Ue,2));if(ge!==oe)return!1;var _e=0;for(Ue+=2;_e<5;){if(ge=Ye(Re.substr(Ue,2)),ge<re||ge>be)return!1;_e+=1,Ue+=2}return Ye(Re.substr(Ue,2))===se}function Mo(){this.isLoaded=!0}var Mt=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};Mt.isModifier=mt,Mt.isZeroWidthJoiner=$t,Mt.isFlagEmoji=Eo,Mt.isRegionalCode=qt,Mt.isCombinedCharacter=wo,Mt.isRegionalFlag=lo,Mt.isVariationSelector=kt,Mt.BLACK_FLAG_CODE_POINT=oe;var Ut={addChars:Qe,addFonts:ht,getCharData:Ee,getFontByName:Be,measureText:Se,checkLoadedFonts:dt,setIsLoaded:Mo};return Mt.prototype=Ut,Mt})();function VX(M){this.animationData=M}VX.prototype.getProp=function(M){return this.animationData.slots&&this.animationData.slots[M.sid]?Object.assign(M,this.animationData.slots[M.sid].p):M};function SWe(M){return new VX(M)}function Dv(){}Dv.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(M){this.renderableComponents.indexOf(M)===-1&&this.renderableComponents.push(M)},removeRenderableComponent:function(M){this.renderableComponents.indexOf(M)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(M),1)},prepareRenderableFrame:function(M){this.checkLayerLimits(M)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(M){this.data.ip-this.data.st<=M&&this.data.op-this.data.st>M?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var M,_=this.renderableComponents.length;for(M=0;M<_;M+=1)this.renderableComponents[M].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var RB=(function(){var M={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(_){return M[_]||""}})();function EWe(M,_,K){this.p=jt.getProp(_,M.v,0,0,K)}function LWe(M,_,K){this.p=jt.getProp(_,M.v,0,0,K)}function IWe(M,_,K){this.p=jt.getProp(_,M.v,1,0,K)}function jWe(M,_,K){this.p=jt.getProp(_,M.v,1,0,K)}function MWe(M,_,K){this.p=jt.getProp(_,M.v,0,0,K)}function BWe(M,_,K){this.p=jt.getProp(_,M.v,0,0,K)}function DWe(M,_,K){this.p=jt.getProp(_,M.v,0,0,K)}function TWe(){this.p={}}function QX(M,_){var K=M.ef||[];this.effectElements=[];var oe,se=K.length,re;for(oe=0;oe<se;oe+=1)re=new Y8(K[oe],_),this.effectElements.push(re)}function Y8(M,_){this.init(M,_)}m([qo],Y8),Y8.prototype.getValue=Y8.prototype.iterateDynamicProperties,Y8.prototype.init=function(M,_){this.data=M,this.effectElements=[],this.initDynamicPropertyContainer(_);var K,oe=this.data.ef.length,se,re=this.data.ef;for(K=0;K<oe;K+=1){switch(se=null,re[K].ty){case 0:se=new EWe(re[K],_,this);break;case 1:se=new LWe(re[K],_,this);break;case 2:se=new IWe(re[K],_,this);break;case 3:se=new jWe(re[K],_,this);break;case 4:case 7:se=new DWe(re[K],_,this);break;case 10:se=new MWe(re[K],_,this);break;case 11:se=new BWe(re[K],_,this);break;case 5:se=new QX(re[K],_);break;default:se=new TWe(re[K]);break}se&&this.effectElements.push(se)}};function r0(){}r0.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var M=0,_=this.data.masksProperties.length;M<_;){if(this.data.masksProperties[M].mode!=="n"&&this.data.masksProperties[M].cl!==!1)return!0;M+=1}return!1},initExpressions:function(){},setBlendMode:function(){var M=RB(this.data.bm),_=this.baseElement||this.layerElement;_.style["mix-blend-mode"]=M},initBaseData:function(M,_,K){this.globalData=_,this.comp=K,this.data=M,this.layerId=O(),this.data.sr||(this.data.sr=1),this.effectsManager=new QX(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function n0(){}n0.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(M,_){var K,oe=this.dynamicProperties.length;for(K=0;K<oe;K+=1)(_||this._isParent&&this.dynamicProperties[K].propType==="transform")&&(this.dynamicProperties[K].getValue(),this.dynamicProperties[K]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(M){this.dynamicProperties.indexOf(M)===-1&&this.dynamicProperties.push(M)}};function a0(M,_,K){this.initFrame(),this.initRenderable(),this.assetData=_.getAssetData(M.refId),this.footageData=_.imageLoader.getAsset(this.assetData),this.initBaseData(M,_,K)}a0.prototype.prepareFrame=function(){},m([Dv,r0,n0],a0),a0.prototype.getBaseElement=function(){return null},a0.prototype.renderFrame=function(){},a0.prototype.destroy=function(){},a0.prototype.initExpressions=function(){},a0.prototype.getFootageData=function(){return this.footageData};function Ll(M,_,K){this.initFrame(),this.initRenderable(),this.assetData=_.getAssetData(M.refId),this.initBaseData(M,_,K),this._isPlaying=!1,this._canPlay=!1;var oe=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(oe),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=M.tm?jt.getProp(this,M.tm,0,_.frameRate,this):{_placeholder:!0},this.lv=jt.getProp(this,M.au&&M.au.lv?M.au.lv:{k:[100]},1,.01,this)}Ll.prototype.prepareFrame=function(M){if(this.prepareRenderableFrame(M,!0),this.prepareProperties(M,!0),this.tm._placeholder)this._currentTime=M/this.data.sr;else{var _=this.tm.v;this._currentTime=_}this._volume=this.lv.v[0];var K=this._volume*this._volumeMultiplier;this._previousVolume!==K&&(this._previousVolume=K,this.audio.volume(K))},m([Dv,r0,n0],Ll),Ll.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},Ll.prototype.show=function(){},Ll.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},Ll.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},Ll.prototype.resume=function(){this._canPlay=!0},Ll.prototype.setRate=function(M){this.audio.rate(M)},Ll.prototype.volume=function(M){this._volumeMultiplier=M,this._previousVolume=M*this._volume,this.audio.volume(this._previousVolume)},Ll.prototype.getBaseElement=function(){return null},Ll.prototype.destroy=function(){},Ll.prototype.sourceRectAtTime=function(){},Ll.prototype.initExpressions=function(){};function Ds(){}Ds.prototype.checkLayers=function(M){var _,K=this.layers.length,oe;for(this.completeLayers=!0,_=K-1;_>=0;_-=1)this.elements[_]||(oe=this.layers[_],oe.ip-oe.st<=M-this.layers[_].st&&oe.op-oe.st>M-this.layers[_].st&&this.buildItem(_)),this.completeLayers=this.elements[_]?this.completeLayers:!1;this.checkPendingElements()},Ds.prototype.createItem=function(M){switch(M.ty){case 2:return this.createImage(M);case 0:return this.createComp(M);case 1:return this.createSolid(M);case 3:return this.createNull(M);case 4:return this.createShape(M);case 5:return this.createText(M);case 6:return this.createAudio(M);case 13:return this.createCamera(M);case 15:return this.createFootage(M);default:return this.createNull(M)}},Ds.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},Ds.prototype.createAudio=function(M){return new Ll(M,this.globalData,this)},Ds.prototype.createFootage=function(M){return new a0(M,this.globalData,this)},Ds.prototype.buildAllItems=function(){var M,_=this.layers.length;for(M=0;M<_;M+=1)this.buildItem(M);this.checkPendingElements()},Ds.prototype.includeLayers=function(M){this.completeLayers=!1;var _,K=M.length,oe,se=this.layers.length;for(_=0;_<K;_+=1)for(oe=0;oe<se;){if(this.layers[oe].id===M[_].id){this.layers[oe]=M[_];break}oe+=1}},Ds.prototype.setProjectInterface=function(M){this.globalData.projectInterface=M},Ds.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},Ds.prototype.buildElementParenting=function(M,_,K){for(var oe=this.elements,se=this.layers,re=0,be=se.length;re<be;)se[re].ind==_&&(!oe[re]||oe[re]===!0?(this.buildItem(re),this.addPendingElement(M)):(K.push(oe[re]),oe[re].setAsParent(),se[re].parent!==void 0?this.buildElementParenting(M,se[re].parent,K):M.setHierarchy(K))),re+=1},Ds.prototype.addPendingElement=function(M){this.pendingElements.push(M)},Ds.prototype.searchExtraCompositions=function(M){var _,K=M.length;for(_=0;_<K;_+=1)if(M[_].xt){var oe=this.createComp(M[_]);oe.initExpressions(),this.globalData.projectInterface.registerComposition(oe)}},Ds.prototype.getElementById=function(M){var _,K=this.elements.length;for(_=0;_<K;_+=1)if(this.elements[_].data.ind===M)return this.elements[_];return null},Ds.prototype.getElementByPath=function(M){var _=M.shift(),K;if(typeof _=="number")K=this.elements[_];else{var oe,se=this.elements.length;for(oe=0;oe<se;oe+=1)if(this.elements[oe].data.nm===_){K=this.elements[oe];break}}return M.length===0?K:K.getElementByPath(M)},Ds.prototype.setupGlobalData=function(M,_){this.globalData.fontManager=new Ng,this.globalData.slotManager=SWe(M),this.globalData.fontManager.addChars(M.chars),this.globalData.fontManager.addFonts(M.fonts,_),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=M.fr,this.globalData.nm=M.nm,this.globalData.compSize={w:M.w,h:M.h}};var PWe={TRANSFORM_EFFECT:"transformEFfect"};function O4(){}O4.prototype={initTransform:function(){var M=new $r;this.finalTransform={mProp:this.data.ks?z4.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:M,localMat:M,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var M,_=this.finalTransform.mat,K=0,oe=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;K<oe;){if(this.hierarchy[K].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}K+=1}if(this.finalTransform._matMdf)for(M=this.finalTransform.mProp.v.props,_.cloneFromProps(M),K=0;K<oe;K+=1)_.multiply(this.hierarchy[K].finalTransform.mProp.v)}(!this.localTransforms||this.finalTransform._matMdf)&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var M=0,_=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;M<_;)this.localTransforms[M]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[M]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),M+=1;if(this.finalTransform._localMatMdf){var K=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(K),M=1;M<_;M+=1){var oe=this.localTransforms[M].matrix;K.multiply(oe)}K.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var se=this.finalTransform.localOpacity;for(M=0;M<_;M+=1)se*=this.localTransforms[M].opacity*.01;this.finalTransform.localOpacity=se}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var M=this.renderableEffectsManager.getEffects(PWe.TRANSFORM_EFFECT);if(M.length){this.localTransforms=[],this.finalTransform.localMat=new $r;var _=0,K=M.length;for(_=0;_<K;_+=1)this.localTransforms.push(M[_])}}},globalToLocal:function(M){var _=[];_.push(this.finalTransform);for(var K=!0,oe=this.comp;K;)oe.finalTransform?(oe.data.hasMask&&_.splice(0,0,oe.finalTransform),oe=oe.comp):K=!1;var se,re=_.length,be;for(se=0;se<re;se+=1)be=_[se].mat.applyToPointArray(0,0,0),M=[M[0]-be[0],M[1]-be[1],0];return M},mHelper:new $r};function Hg(M,_,K){this.data=M,this.element=_,this.globalData=K,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var oe=this.globalData.defs,se,re=this.masksProperties?this.masksProperties.length:0;this.viewData=w(re),this.solidPath="";var be,De=this.masksProperties,we=0,Ke=[],et,st,Le=O(),nt,dt,ot,ht,Qe="clipPath",Ee="clip-path";for(se=0;se<re;se+=1)if((De[se].mode!=="a"&&De[se].mode!=="n"||De[se].inv||De[se].o.k!==100||De[se].o.x)&&(Qe="mask",Ee="mask"),(De[se].mode==="s"||De[se].mode==="i")&&we===0?(nt=xe("rect"),nt.setAttribute("fill","#ffffff"),nt.setAttribute("width",this.element.comp.data.w||0),nt.setAttribute("height",this.element.comp.data.h||0),Ke.push(nt)):nt=null,be=xe("path"),De[se].mode==="n")this.viewData[se]={op:jt.getProp(this.element,De[se].o,0,.01,this.element),prop:wr.getShapeProp(this.element,De[se],3),elem:be,lastPath:""},oe.appendChild(be);else{we+=1,be.setAttribute("fill",De[se].mode==="s"?"#000000":"#ffffff"),be.setAttribute("clip-rule","nonzero");var Se;if(De[se].x.k!==0?(Qe="mask",Ee="mask",ht=jt.getProp(this.element,De[se].x,0,null,this.element),Se=O(),dt=xe("filter"),dt.setAttribute("id",Se),ot=xe("feMorphology"),ot.setAttribute("operator","erode"),ot.setAttribute("in","SourceGraphic"),ot.setAttribute("radius","0"),dt.appendChild(ot),oe.appendChild(dt),be.setAttribute("stroke",De[se].mode==="s"?"#000000":"#ffffff")):(ot=null,ht=null),this.storedData[se]={elem:be,x:ht,expan:ot,lastPath:"",lastOperator:"",filterId:Se,lastRadius:0},De[se].mode==="i"){st=Ke.length;var Be=xe("g");for(et=0;et<st;et+=1)Be.appendChild(Ke[et]);var Ye=xe("mask");Ye.setAttribute("mask-type","alpha"),Ye.setAttribute("id",Le+"_"+we),Ye.appendChild(be),oe.appendChild(Ye),Be.setAttribute("mask","url("+h()+"#"+Le+"_"+we+")"),Ke.length=0,Ke.push(Be)}else Ke.push(be);De[se].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[se]={elem:be,lastPath:"",op:jt.getProp(this.element,De[se].o,0,.01,this.element),prop:wr.getShapeProp(this.element,De[se],3),invRect:nt},this.viewData[se].prop.k||this.drawPath(De[se],this.viewData[se].prop.v,this.viewData[se])}for(this.maskElement=xe(Qe),re=Ke.length,se=0;se<re;se+=1)this.maskElement.appendChild(Ke[se]);we>0&&(this.maskElement.setAttribute("id",Le),this.element.maskedElement.setAttribute(Ee,"url("+h()+"#"+Le+")"),oe.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}Hg.prototype.getMaskProperty=function(M){return this.viewData[M].prop},Hg.prototype.renderFrame=function(M){var _=this.element.finalTransform.mat,K,oe=this.masksProperties.length;for(K=0;K<oe;K+=1)if((this.viewData[K].prop._mdf||M)&&this.drawPath(this.masksProperties[K],this.viewData[K].prop.v,this.viewData[K]),(this.viewData[K].op._mdf||M)&&this.viewData[K].elem.setAttribute("fill-opacity",this.viewData[K].op.v),this.masksProperties[K].mode!=="n"&&(this.viewData[K].invRect&&(this.element.finalTransform.mProp._mdf||M)&&this.viewData[K].invRect.setAttribute("transform",_.getInverseMatrix().to2dCSS()),this.storedData[K].x&&(this.storedData[K].x._mdf||M))){var se=this.storedData[K].expan;this.storedData[K].x.v<0?(this.storedData[K].lastOperator!=="erode"&&(this.storedData[K].lastOperator="erode",this.storedData[K].elem.setAttribute("filter","url("+h()+"#"+this.storedData[K].filterId+")")),se.setAttribute("radius",-this.storedData[K].x.v)):(this.storedData[K].lastOperator!=="dilate"&&(this.storedData[K].lastOperator="dilate",this.storedData[K].elem.setAttribute("filter",null)),this.storedData[K].elem.setAttribute("stroke-width",this.storedData[K].x.v*2))}},Hg.prototype.getMaskelement=function(){return this.maskElement},Hg.prototype.createLayerSolidPath=function(){var M="M0,0 ";return M+=" h"+this.globalData.compSize.w,M+=" v"+this.globalData.compSize.h,M+=" h-"+this.globalData.compSize.w,M+=" v-"+this.globalData.compSize.h+" ",M},Hg.prototype.drawPath=function(M,_,K){var oe=" M"+_.v[0][0]+","+_.v[0][1],se,re;for(re=_._length,se=1;se<re;se+=1)oe+=" C"+_.o[se-1][0]+","+_.o[se-1][1]+" "+_.i[se][0]+","+_.i[se][1]+" "+_.v[se][0]+","+_.v[se][1];if(_.c&&re>1&&(oe+=" C"+_.o[se-1][0]+","+_.o[se-1][1]+" "+_.i[0][0]+","+_.i[0][1]+" "+_.v[0][0]+","+_.v[0][1]),K.lastPath!==oe){var be="";K.elem&&(_.c&&(be=M.inv?this.solidPath+oe:oe),K.elem.setAttribute("d",be)),K.lastPath=oe}},Hg.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var K8=(function(){var M={};M.createFilter=_,M.createAlphaToLuminanceFilter=K;function _(oe,se){var re=xe("filter");return re.setAttribute("id",oe),se!==!0&&(re.setAttribute("filterUnits","objectBoundingBox"),re.setAttribute("x","0%"),re.setAttribute("y","0%"),re.setAttribute("width","100%"),re.setAttribute("height","100%")),re}function K(){var oe=xe("feColorMatrix");return oe.setAttribute("type","matrix"),oe.setAttribute("color-interpolation-filters","sRGB"),oe.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),oe}return M})(),UX=(function(){var M={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(M.maskType=!1),/firefox/i.test(navigator.userAgent)&&(M.svgLumaHidden=!1),M})(),FB={},WX="filter_result_";function OB(M){var _,K="SourceGraphic",oe=M.data.ef?M.data.ef.length:0,se=O(),re=K8.createFilter(se,!0),be=0;this.filters=[];var De;for(_=0;_<oe;_+=1){De=null;var we=M.data.ef[_].ty;if(FB[we]){var Ke=FB[we].effect;De=new Ke(re,M.effectsManager.effectElements[_],M,WX+be,K),K=WX+be,FB[we].countsAsEffect&&(be+=1)}De&&this.filters.push(De)}be&&(M.globalData.defs.appendChild(re),M.layerElement.setAttribute("filter","url("+h()+"#"+se+")")),this.filters.length&&M.addRenderableComponent(this)}OB.prototype.renderFrame=function(M){var _,K=this.filters.length;for(_=0;_<K;_+=1)this.filters[_].renderFrame(M)},OB.prototype.getEffects=function(M){var _,K=this.filters.length,oe=[];for(_=0;_<K;_+=1)this.filters[_].type===M&&oe.push(this.filters[_]);return oe};function q8(){}q8.prototype={initRendererElement:function(){this.layerElement=xe("g")},createContainerElements:function(){this.matteElement=xe("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var M=null;if(this.data.td){this.matteMasks={};var _=xe("g");_.setAttribute("id",this.layerId),_.appendChild(this.layerElement),M=_,this.globalData.defs.appendChild(_)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),M=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var K=xe("clipPath"),oe=xe("path");oe.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var se=O();if(K.setAttribute("id",se),K.appendChild(oe),this.globalData.defs.appendChild(K),this.checkMasks()){var re=xe("g");re.setAttribute("clip-path","url("+h()+"#"+se+")"),re.appendChild(this.layerElement),this.transformedElement=re,M?M.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+h()+"#"+se+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new Hg(this.data,this,this.globalData),this.renderableEffectsManager=new OB(this),this.searchEffectTransforms()},getMatte:function(M){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[M]){var _=this.layerId+"_"+M,K,oe,se,re;if(M===1||M===3){var be=xe("mask");be.setAttribute("id",_),be.setAttribute("mask-type",M===3?"luminance":"alpha"),se=xe("use"),se.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),be.appendChild(se),this.globalData.defs.appendChild(be),!UX.maskType&&M===1&&(be.setAttribute("mask-type","luminance"),K=O(),oe=K8.createFilter(K),this.globalData.defs.appendChild(oe),oe.appendChild(K8.createAlphaToLuminanceFilter()),re=xe("g"),re.appendChild(se),be.appendChild(re),re.setAttribute("filter","url("+h()+"#"+K+")"))}else if(M===2){var De=xe("mask");De.setAttribute("id",_),De.setAttribute("mask-type","alpha");var we=xe("g");De.appendChild(we),K=O(),oe=K8.createFilter(K);var Ke=xe("feComponentTransfer");Ke.setAttribute("in","SourceGraphic"),oe.appendChild(Ke);var et=xe("feFuncA");et.setAttribute("type","table"),et.setAttribute("tableValues","1.0 0.0"),Ke.appendChild(et),this.globalData.defs.appendChild(oe);var st=xe("rect");st.setAttribute("width",this.comp.data.w),st.setAttribute("height",this.comp.data.h),st.setAttribute("x","0"),st.setAttribute("y","0"),st.setAttribute("fill","#ffffff"),st.setAttribute("opacity","0"),we.setAttribute("filter","url("+h()+"#"+K+")"),we.appendChild(st),se=xe("use"),se.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),we.appendChild(se),UX.maskType||(De.setAttribute("mask-type","luminance"),oe.appendChild(K8.createAlphaToLuminanceFilter()),re=xe("g"),we.appendChild(st),re.appendChild(this.layerElement),we.appendChild(re)),this.globalData.defs.appendChild(De)}this.matteMasks[M]=_}return this.matteMasks[M]},setMatte:function(M){this.matteElement&&this.matteElement.setAttribute("mask","url("+h()+"#"+M+")")}};function N4(){}N4.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(M){this.hierarchy=M},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function Z8(){}(function(){var M={initElement:function(_,K,oe){this.initFrame(),this.initBaseData(_,K,oe),this.initTransform(_,K,oe),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var _=this.baseElement||this.layerElement;_.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var _=this.baseElement||this.layerElement;_.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(_){this._mdf=!1,this.prepareRenderableFrame(_),this.prepareProperties(_,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};m([Dv,f(M)],Z8)})();function J8(M,_,K){this.assetData=_.getAssetData(M.refId),this.assetData&&this.assetData.sid&&(this.assetData=_.slotManager.getProp(this.assetData)),this.initElement(M,_,K),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}m([r0,O4,q8,N4,n0,Z8],J8),J8.prototype.createContent=function(){var M=this.globalData.getAssetsPath(this.assetData);this.innerElem=xe("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",M),this.layerElement.appendChild(this.innerElem)},J8.prototype.sourceRectAtTime=function(){return this.sourceRect};function zWe(M,_){this.elem=M,this.pos=_}function GX(){}GX.prototype={addShapeToModifiers:function(M){var _,K=this.shapeModifiers.length;for(_=0;_<K;_+=1)this.shapeModifiers[_].addShape(M)},isShapeInAnimatedModifiers:function(M){for(var _=0,K=this.shapeModifiers.length;_<K;)if(this.shapeModifiers[_].isAnimatedWithShape(M))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var M,_=this.shapes.length;for(M=0;M<_;M+=1)this.shapes[M].sh.reset();_=this.shapeModifiers.length;var K;for(M=_-1;M>=0&&(K=this.shapeModifiers[M].processShapes(this._isFirstFrame),!K);M-=1);}},searchProcessedElement:function(M){for(var _=this.processedElements,K=0,oe=_.length;K<oe;){if(_[K].elem===M)return _[K].pos;K+=1}return 0},addProcessedElement:function(M,_){for(var K=this.processedElements,oe=K.length;oe;)if(oe-=1,K[oe].elem===M){K[oe].pos=_;return}K.push(new zWe(M,_))},prepareFrame:function(M){this.prepareRenderableFrame(M),this.prepareProperties(M,this.isInRange)}};var YX={1:"butt",2:"round",3:"square"},KX={1:"miter",2:"round",3:"bevel"};function qX(M,_,K){this.caches=[],this.styles=[],this.transformers=M,this.lStr="",this.sh=K,this.lvl=_,this._isAnimated=!!K.k;for(var oe=0,se=M.length;oe<se;){if(M[oe].mProps.dynamicProperties.length){this._isAnimated=!0;break}oe+=1}}qX.prototype.setAsAnimated=function(){this._isAnimated=!0};function ZX(M,_){this.data=M,this.type=M.ty,this.d="",this.lvl=_,this._mdf=!1,this.closed=M.hd===!0,this.pElem=xe("path"),this.msElem=null}ZX.prototype.reset=function(){this.d="",this._mdf=!1};function Tv(M,_,K,oe){this.elem=M,this.frameId=-1,this.dataProps=w(_.length),this.renderer=K,this.k=!1,this.dashStr="",this.dashArray=y("float32",_.length?_.length-1:0),this.dashoffset=y("float32",1),this.initDynamicPropertyContainer(oe);var se,re=_.length||0,be;for(se=0;se<re;se+=1)be=jt.getProp(M,_[se].v,0,0,this),this.k=be.k||this.k,this.dataProps[se]={n:_[se].n,p:be};this.k||this.getValue(!0),this._isAnimated=this.k}Tv.prototype.getValue=function(M){if(!(this.elem.globalData.frameId===this.frameId&&!M)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||M,this._mdf)){var _=0,K=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),_=0;_<K;_+=1)this.dataProps[_].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[_].p.v:this.dashArray[_]=this.dataProps[_].p.v:this.dashoffset[0]=this.dataProps[_].p.v}},m([qo],Tv);function JX(M,_,K){this.initDynamicPropertyContainer(M),this.getValue=this.iterateDynamicProperties,this.o=jt.getProp(M,_.o,0,.01,this),this.w=jt.getProp(M,_.w,0,null,this),this.d=new Tv(M,_.d||{},"svg",this),this.c=jt.getProp(M,_.c,1,255,this),this.style=K,this._isAnimated=!!this._isAnimated}m([qo],JX);function XX(M,_,K){this.initDynamicPropertyContainer(M),this.getValue=this.iterateDynamicProperties,this.o=jt.getProp(M,_.o,0,.01,this),this.c=jt.getProp(M,_.c,1,255,this),this.style=K}m([qo],XX);function eee(M,_,K){this.initDynamicPropertyContainer(M),this.getValue=this.iterateDynamicProperties,this.style=K}m([qo],eee);function X8(M,_,K){this.data=_,this.c=y("uint8c",_.p*4);var oe=_.k.k[0].s?_.k.k[0].s.length-_.p*4:_.k.k.length-_.p*4;this.o=y("float32",oe),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=oe,this.initDynamicPropertyContainer(K),this.prop=jt.getProp(M,_.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}X8.prototype.comparePoints=function(M,_){for(var K=0,oe=this.o.length/2,se;K<oe;){if(se=Math.abs(M[K*4]-M[_*4+K*2]),se>.01)return!1;K+=1}return!0},X8.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var M=0,_=this.data.k.k.length;M<_;){if(!this.comparePoints(this.data.k.k[M].s,this.data.p))return!1;M+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},X8.prototype.getValue=function(M){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||M){var _,K=this.data.p*4,oe,se;for(_=0;_<K;_+=1)oe=_%4===0?100:255,se=Math.round(this.prop.v[_]*oe),this.c[_]!==se&&(this.c[_]=se,this._cmdf=!M);if(this.o.length)for(K=this.prop.v.length,_=this.data.p*4;_<K;_+=1)oe=_%2===0?100:1,se=_%2===0?Math.round(this.prop.v[_]*100):this.prop.v[_],this.o[_-this.data.p*4]!==se&&(this.o[_-this.data.p*4]=se,this._omdf=!M);this._mdf=!M}},m([qo],X8);function H4(M,_,K){this.initDynamicPropertyContainer(M),this.getValue=this.iterateDynamicProperties,this.initGradientData(M,_,K)}H4.prototype.initGradientData=function(M,_,K){this.o=jt.getProp(M,_.o,0,.01,this),this.s=jt.getProp(M,_.s,1,null,this),this.e=jt.getProp(M,_.e,1,null,this),this.h=jt.getProp(M,_.h||{k:0},0,.01,this),this.a=jt.getProp(M,_.a||{k:0},0,T,this),this.g=new X8(M,_.g,this),this.style=K,this.stops=[],this.setGradientData(K.pElem,_),this.setGradientOpacity(_,K),this._isAnimated=!!this._isAnimated},H4.prototype.setGradientData=function(M,_){var K=O(),oe=xe(_.t===1?"linearGradient":"radialGradient");oe.setAttribute("id",K),oe.setAttribute("spreadMethod","pad"),oe.setAttribute("gradientUnits","userSpaceOnUse");var se=[],re,be,De;for(De=_.g.p*4,be=0;be<De;be+=4)re=xe("stop"),oe.appendChild(re),se.push(re);M.setAttribute(_.ty==="gf"?"fill":"stroke","url("+h()+"#"+K+")"),this.gf=oe,this.cst=se},H4.prototype.setGradientOpacity=function(M,_){if(this.g._hasOpacity&&!this.g._collapsable){var K,oe,se,re=xe("mask"),be=xe("path");re.appendChild(be);var De=O(),we=O();re.setAttribute("id",we);var Ke=xe(M.t===1?"linearGradient":"radialGradient");Ke.setAttribute("id",De),Ke.setAttribute("spreadMethod","pad"),Ke.setAttribute("gradientUnits","userSpaceOnUse"),se=M.g.k.k[0].s?M.g.k.k[0].s.length:M.g.k.k.length;var et=this.stops;for(oe=M.g.p*4;oe<se;oe+=2)K=xe("stop"),K.setAttribute("stop-color","rgb(255,255,255)"),Ke.appendChild(K),et.push(K);be.setAttribute(M.ty==="gf"?"fill":"stroke","url("+h()+"#"+De+")"),M.ty==="gs"&&(be.setAttribute("stroke-linecap",YX[M.lc||2]),be.setAttribute("stroke-linejoin",KX[M.lj||2]),M.lj===1&&be.setAttribute("stroke-miterlimit",M.ml)),this.of=Ke,this.ms=re,this.ost=et,this.maskId=we,_.msElem=be}},m([qo],H4);function tee(M,_,K){this.initDynamicPropertyContainer(M),this.getValue=this.iterateDynamicProperties,this.w=jt.getProp(M,_.w,0,null,this),this.d=new Tv(M,_.d||{},"svg",this),this.initGradientData(M,_,K),this._isAnimated=!!this._isAnimated}m([H4,qo],tee);function RWe(){this.it=[],this.prevViewData=[],this.gr=xe("g")}function FWe(M,_,K){this.transform={mProps:M,op:_,container:K},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var oee=function(M,_,K,oe){if(_===0)return"";var se=M.o,re=M.i,be=M.v,De,we=" M"+oe.applyToPointStringified(be[0][0],be[0][1]);for(De=1;De<_;De+=1)we+=" C"+oe.applyToPointStringified(se[De-1][0],se[De-1][1])+" "+oe.applyToPointStringified(re[De][0],re[De][1])+" "+oe.applyToPointStringified(be[De][0],be[De][1]);return K&&_&&(we+=" C"+oe.applyToPointStringified(se[De-1][0],se[De-1][1])+" "+oe.applyToPointStringified(re[0][0],re[0][1])+" "+oe.applyToPointStringified(be[0][0],be[0][1]),we+="z"),we},OWe=(function(){var M=new $r,_=new $r,K={createRenderFunction:oe};function oe(st){switch(st.ty){case"fl":return De;case"gf":return Ke;case"gs":return we;case"st":return et;case"sh":case"el":case"rc":case"sr":return be;case"tr":return se;case"no":return re;default:return null}}function se(st,Le,nt){(nt||Le.transform.op._mdf)&&Le.transform.container.setAttribute("opacity",Le.transform.op.v),(nt||Le.transform.mProps._mdf)&&Le.transform.container.setAttribute("transform",Le.transform.mProps.v.to2dCSS())}function re(){}function be(st,Le,nt){var dt,ot,ht,Qe,Ee,Se,Be=Le.styles.length,Ye=Le.lvl,mt,$t,kt,qt;for(Se=0;Se<Be;Se+=1){if(Qe=Le.sh._mdf||nt,Le.styles[Se].lvl<Ye){for($t=_.reset(),kt=Ye-Le.styles[Se].lvl,qt=Le.transformers.length-1;!Qe&&kt>0;)Qe=Le.transformers[qt].mProps._mdf||Qe,kt-=1,qt-=1;if(Qe)for(kt=Ye-Le.styles[Se].lvl,qt=Le.transformers.length-1;kt>0;)$t.multiply(Le.transformers[qt].mProps.v),kt-=1,qt-=1}else $t=M;if(mt=Le.sh.paths,ot=mt._length,Qe){for(ht="",dt=0;dt<ot;dt+=1)Ee=mt.shapes[dt],Ee&&Ee._length&&(ht+=oee(Ee,Ee._length,Ee.c,$t));Le.caches[Se]=ht}else ht=Le.caches[Se];Le.styles[Se].d+=st.hd===!0?"":ht,Le.styles[Se]._mdf=Qe||Le.styles[Se]._mdf}}function De(st,Le,nt){var dt=Le.style;(Le.c._mdf||nt)&&dt.pElem.setAttribute("fill","rgb("+I(Le.c.v[0])+","+I(Le.c.v[1])+","+I(Le.c.v[2])+")"),(Le.o._mdf||nt)&&dt.pElem.setAttribute("fill-opacity",Le.o.v)}function we(st,Le,nt){Ke(st,Le,nt),et(st,Le,nt)}function Ke(st,Le,nt){var dt=Le.gf,ot=Le.g._hasOpacity,ht=Le.s.v,Qe=Le.e.v;if(Le.o._mdf||nt){var Ee=st.ty==="gf"?"fill-opacity":"stroke-opacity";Le.style.pElem.setAttribute(Ee,Le.o.v)}if(Le.s._mdf||nt){var Se=st.t===1?"x1":"cx",Be=Se==="x1"?"y1":"cy";dt.setAttribute(Se,ht[0]),dt.setAttribute(Be,ht[1]),ot&&!Le.g._collapsable&&(Le.of.setAttribute(Se,ht[0]),Le.of.setAttribute(Be,ht[1]))}var Ye,mt,$t,kt;if(Le.g._cmdf||nt){Ye=Le.cst;var qt=Le.g.c;for($t=Ye.length,mt=0;mt<$t;mt+=1)kt=Ye[mt],kt.setAttribute("offset",qt[mt*4]+"%"),kt.setAttribute("stop-color","rgb("+qt[mt*4+1]+","+qt[mt*4+2]+","+qt[mt*4+3]+")")}if(ot&&(Le.g._omdf||nt)){var Eo=Le.g.o;for(Le.g._collapsable?Ye=Le.cst:Ye=Le.ost,$t=Ye.length,mt=0;mt<$t;mt+=1)kt=Ye[mt],Le.g._collapsable||kt.setAttribute("offset",Eo[mt*2]+"%"),kt.setAttribute("stop-opacity",Eo[mt*2+1])}if(st.t===1)(Le.e._mdf||nt)&&(dt.setAttribute("x2",Qe[0]),dt.setAttribute("y2",Qe[1]),ot&&!Le.g._collapsable&&(Le.of.setAttribute("x2",Qe[0]),Le.of.setAttribute("y2",Qe[1])));else{var wo;if((Le.s._mdf||Le.e._mdf||nt)&&(wo=Math.sqrt(Math.pow(ht[0]-Qe[0],2)+Math.pow(ht[1]-Qe[1],2)),dt.setAttribute("r",wo),ot&&!Le.g._collapsable&&Le.of.setAttribute("r",wo)),Le.s._mdf||Le.e._mdf||Le.h._mdf||Le.a._mdf||nt){wo||(wo=Math.sqrt(Math.pow(ht[0]-Qe[0],2)+Math.pow(ht[1]-Qe[1],2)));var lo=Math.atan2(Qe[1]-ht[1],Qe[0]-ht[0]),Mo=Le.h.v;Mo>=1?Mo=.99:Mo<=-1&&(Mo=-.99);var Mt=wo*Mo,Ut=Math.cos(lo+Le.a.v)*Mt+ht[0],Re=Math.sin(lo+Le.a.v)*Mt+ht[1];dt.setAttribute("fx",Ut),dt.setAttribute("fy",Re),ot&&!Le.g._collapsable&&(Le.of.setAttribute("fx",Ut),Le.of.setAttribute("fy",Re))}}}function et(st,Le,nt){var dt=Le.style,ot=Le.d;ot&&(ot._mdf||nt)&&ot.dashStr&&(dt.pElem.setAttribute("stroke-dasharray",ot.dashStr),dt.pElem.setAttribute("stroke-dashoffset",ot.dashoffset[0])),Le.c&&(Le.c._mdf||nt)&&dt.pElem.setAttribute("stroke","rgb("+I(Le.c.v[0])+","+I(Le.c.v[1])+","+I(Le.c.v[2])+")"),(Le.o._mdf||nt)&&dt.pElem.setAttribute("stroke-opacity",Le.o.v),(Le.w._mdf||nt)&&(dt.pElem.setAttribute("stroke-width",Le.w.v),dt.msElem&&dt.msElem.setAttribute("stroke-width",Le.w.v))}return K})();function Xn(M,_,K){this.shapes=[],this.shapesData=M.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(M,_,K),this.prevViewData=[]}m([r0,O4,q8,GX,N4,n0,Z8],Xn),Xn.prototype.initSecondaryElement=function(){},Xn.prototype.identityMatrix=new $r,Xn.prototype.buildExpressionInterface=function(){},Xn.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},Xn.prototype.filterUniqueShapes=function(){var M,_=this.shapes.length,K,oe,se=this.stylesList.length,re,be=[],De=!1;for(oe=0;oe<se;oe+=1){for(re=this.stylesList[oe],De=!1,be.length=0,M=0;M<_;M+=1)K=this.shapes[M],K.styles.indexOf(re)!==-1&&(be.push(K),De=K._isAnimated||De);be.length>1&&De&&this.setShapesAsAnimated(be)}},Xn.prototype.setShapesAsAnimated=function(M){var _,K=M.length;for(_=0;_<K;_+=1)M[_].setAsAnimated()},Xn.prototype.createStyleElement=function(M,_){var K,oe=new ZX(M,_),se=oe.pElem;if(M.ty==="st")K=new JX(this,M,oe);else if(M.ty==="fl")K=new XX(this,M,oe);else if(M.ty==="gf"||M.ty==="gs"){var re=M.ty==="gf"?H4:tee;K=new re(this,M,oe),this.globalData.defs.appendChild(K.gf),K.maskId&&(this.globalData.defs.appendChild(K.ms),this.globalData.defs.appendChild(K.of),se.setAttribute("mask","url("+h()+"#"+K.maskId+")"))}else M.ty==="no"&&(K=new eee(this,M,oe));return(M.ty==="st"||M.ty==="gs")&&(se.setAttribute("stroke-linecap",YX[M.lc||2]),se.setAttribute("stroke-linejoin",KX[M.lj||2]),se.setAttribute("fill-opacity","0"),M.lj===1&&se.setAttribute("stroke-miterlimit",M.ml)),M.r===2&&se.setAttribute("fill-rule","evenodd"),M.ln&&se.setAttribute("id",M.ln),M.cl&&se.setAttribute("class",M.cl),M.bm&&(se.style["mix-blend-mode"]=RB(M.bm)),this.stylesList.push(oe),this.addToAnimatedContents(M,K),K},Xn.prototype.createGroupElement=function(M){var _=new RWe;return M.ln&&_.gr.setAttribute("id",M.ln),M.cl&&_.gr.setAttribute("class",M.cl),M.bm&&(_.gr.style["mix-blend-mode"]=RB(M.bm)),_},Xn.prototype.createTransformElement=function(M,_){var K=z4.getTransformProperty(this,M,this),oe=new FWe(K,K.o,_);return this.addToAnimatedContents(M,oe),oe},Xn.prototype.createShapeElement=function(M,_,K){var oe=4;M.ty==="rc"?oe=5:M.ty==="el"?oe=6:M.ty==="sr"&&(oe=7);var se=wr.getShapeProp(this,M,oe,this),re=new qX(_,K,se);return this.shapes.push(re),this.addShapeToModifiers(re),this.addToAnimatedContents(M,re),re},Xn.prototype.addToAnimatedContents=function(M,_){for(var K=0,oe=this.animatedContents.length;K<oe;){if(this.animatedContents[K].element===_)return;K+=1}this.animatedContents.push({fn:OWe.createRenderFunction(M),element:_,data:M})},Xn.prototype.setElementStyles=function(M){var _=M.styles,K,oe=this.stylesList.length;for(K=0;K<oe;K+=1)_.indexOf(this.stylesList[K])===-1&&!this.stylesList[K].closed&&_.push(this.stylesList[K])},Xn.prototype.reloadShapes=function(){this._isFirstFrame=!0;var M,_=this.itemsData.length;for(M=0;M<_;M+=1)this.prevViewData[M]=this.itemsData[M];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),_=this.dynamicProperties.length,M=0;M<_;M+=1)this.dynamicProperties[M].getValue();this.renderModifiers()},Xn.prototype.searchShapes=function(M,_,K,oe,se,re,be){var De=[].concat(re),we,Ke=M.length-1,et,st,Le=[],nt=[],dt,ot,ht;for(we=Ke;we>=0;we-=1){if(ht=this.searchProcessedElement(M[we]),ht?_[we]=K[ht-1]:M[we]._render=be,M[we].ty==="fl"||M[we].ty==="st"||M[we].ty==="gf"||M[we].ty==="gs"||M[we].ty==="no")ht?_[we].style.closed=M[we].hd:_[we]=this.createStyleElement(M[we],se),M[we]._render&&_[we].style.pElem.parentNode!==oe&&oe.appendChild(_[we].style.pElem),Le.push(_[we].style);else if(M[we].ty==="gr"){if(!ht)_[we]=this.createGroupElement(M[we]);else for(st=_[we].it.length,et=0;et<st;et+=1)_[we].prevViewData[et]=_[we].it[et];this.searchShapes(M[we].it,_[we].it,_[we].prevViewData,_[we].gr,se+1,De,be),M[we]._render&&_[we].gr.parentNode!==oe&&oe.appendChild(_[we].gr)}else M[we].ty==="tr"?(ht||(_[we]=this.createTransformElement(M[we],oe)),dt=_[we].transform,De.push(dt)):M[we].ty==="sh"||M[we].ty==="rc"||M[we].ty==="el"||M[we].ty==="sr"?(ht||(_[we]=this.createShapeElement(M[we],De,se)),this.setElementStyles(_[we])):M[we].ty==="tm"||M[we].ty==="rd"||M[we].ty==="ms"||M[we].ty==="pb"||M[we].ty==="zz"||M[we].ty==="op"?(ht?(ot=_[we],ot.closed=!1):(ot=Wp.getModifier(M[we].ty),ot.init(this,M[we]),_[we]=ot,this.shapeModifiers.push(ot)),nt.push(ot)):M[we].ty==="rp"&&(ht?(ot=_[we],ot.closed=!0):(ot=Wp.getModifier(M[we].ty),_[we]=ot,ot.init(this,M,we,_),this.shapeModifiers.push(ot),be=!1),nt.push(ot));this.addProcessedElement(M[we],we+1)}for(Ke=Le.length,we=0;we<Ke;we+=1)Le[we].closed=!0;for(Ke=nt.length,we=0;we<Ke;we+=1)nt[we].closed=!0},Xn.prototype.renderInnerContent=function(){this.renderModifiers();var M,_=this.stylesList.length;for(M=0;M<_;M+=1)this.stylesList[M].reset();for(this.renderShape(),M=0;M<_;M+=1)(this.stylesList[M]._mdf||this._isFirstFrame)&&(this.stylesList[M].msElem&&(this.stylesList[M].msElem.setAttribute("d",this.stylesList[M].d),this.stylesList[M].d="M0 0"+this.stylesList[M].d),this.stylesList[M].pElem.setAttribute("d",this.stylesList[M].d||"M0 0"))},Xn.prototype.renderShape=function(){var M,_=this.animatedContents.length,K;for(M=0;M<_;M+=1)K=this.animatedContents[M],(this._isFirstFrame||K.element._isAnimated)&&K.data!==!0&&K.fn(K.data,K.element,this._isFirstFrame)},Xn.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function NB(M,_,K,oe,se,re){this.o=M,this.sw=_,this.sc=K,this.fc=oe,this.m=se,this.p=re,this._mdf={o:!0,sw:!!_,sc:!!K,fc:!!oe,m:!0,p:!0}}NB.prototype.update=function(M,_,K,oe,se,re){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var be=!1;return this.o!==M&&(this.o=M,this._mdf.o=!0,be=!0),this.sw!==_&&(this.sw=_,this._mdf.sw=!0,be=!0),this.sc!==K&&(this.sc=K,this._mdf.sc=!0,be=!0),this.fc!==oe&&(this.fc=oe,this._mdf.fc=!0,be=!0),this.m!==se&&(this.m=se,this._mdf.m=!0,be=!0),re.length&&(this.p[0]!==re[0]||this.p[1]!==re[1]||this.p[4]!==re[4]||this.p[5]!==re[5]||this.p[12]!==re[12]||this.p[13]!==re[13])&&(this.p=re,this._mdf.p=!0,be=!0),be};function Xs(M,_){this._frameId=l,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,_.d&&_.d.sid&&(_.d=M.globalData.slotManager.getProp(_.d)),this.data=_,this.elem=M,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}Xs.prototype.defaultBoxWidth=[0,0],Xs.prototype.copyData=function(M,_){for(var K in _)Object.prototype.hasOwnProperty.call(_,K)&&(M[K]=_[K]);return M},Xs.prototype.setCurrentData=function(M){M.__complete||this.completeTextData(M),this.currentData=M,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},Xs.prototype.searchProperty=function(){return this.searchKeyframes()},Xs.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},Xs.prototype.addEffect=function(M){this.effectsSequence.push(M),this.elem.addDynamicProperty(this)},Xs.prototype.getValue=function(M){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!M)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var _=this.currentData,K=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var oe,se=this.effectsSequence.length,re=M||this.data.d.k[this.keysIndex].s;for(oe=0;oe<se;oe+=1)K!==this.keysIndex?re=this.effectsSequence[oe](re,re.t):re=this.effectsSequence[oe](this.currentData,re.t);_!==re&&this.setCurrentData(re),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},Xs.prototype.getKeyframeValue=function(){for(var M=this.data.d.k,_=this.elem.comp.renderedFrame,K=0,oe=M.length;K<=oe-1&&!(K===oe-1||M[K+1].t>_);)K+=1;return this.keysIndex!==K&&(this.keysIndex=K),this.data.d.k[this.keysIndex].s},Xs.prototype.buildFinalText=function(M){for(var _=[],K=0,oe=M.length,se,re,be=!1,De=!1,we="";K<oe;)be=De,De=!1,se=M.charCodeAt(K),we=M.charAt(K),Ng.isCombinedCharacter(se)?be=!0:se>=55296&&se<=56319?Ng.isRegionalFlag(M,K)?we=M.substr(K,14):(re=M.charCodeAt(K+1),re>=56320&&re<=57343&&(Ng.isModifier(se,re)?(we=M.substr(K,2),be=!0):Ng.isFlagEmoji(M.substr(K,4))?we=M.substr(K,4):we=M.substr(K,2))):se>56319?(re=M.charCodeAt(K+1),Ng.isVariationSelector(se)&&(be=!0)):Ng.isZeroWidthJoiner(se)&&(be=!0,De=!0),be?(_[_.length-1]+=we,be=!1):_.push(we),K+=we.length;return _},Xs.prototype.completeTextData=function(M){M.__complete=!0;var _=this.elem.globalData.fontManager,K=this.data,oe=[],se,re,be,De=0,we,Ke=K.m.g,et=0,st=0,Le=0,nt=[],dt=0,ot=0,ht,Qe,Ee=_.getFontByName(M.f),Se,Be=0,Ye=_X(Ee);M.fWeight=Ye.weight,M.fStyle=Ye.style,M.finalSize=M.s,M.finalText=this.buildFinalText(M.t),re=M.finalText.length,M.finalLineHeight=M.lh;var mt=M.tr/1e3*M.finalSize,$t;if(M.sz)for(var kt=!0,qt=M.sz[0],Eo=M.sz[1],wo,lo;kt;){lo=this.buildFinalText(M.t),wo=0,dt=0,re=lo.length,mt=M.tr/1e3*M.finalSize;var Mo=-1;for(se=0;se<re;se+=1)$t=lo[se].charCodeAt(0),be=!1,lo[se]===" "?Mo=se:($t===13||$t===3)&&(dt=0,be=!0,wo+=M.finalLineHeight||M.finalSize*1.2),_.chars?(Se=_.getCharData(lo[se],Ee.fStyle,Ee.fFamily),Be=be?0:Se.w*M.finalSize/100):Be=_.measureText(lo[se],M.f,M.finalSize),dt+Be>qt&&lo[se]!==" "?(Mo===-1?re+=1:se=Mo,wo+=M.finalLineHeight||M.finalSize*1.2,lo.splice(se,Mo===se?1:0,"\r"),Mo=-1,dt=0):(dt+=Be,dt+=mt);wo+=Ee.ascent*M.finalSize/100,this.canResize&&M.finalSize>this.minimumFontSize&&Eo<wo?(M.finalSize-=1,M.finalLineHeight=M.finalSize*M.lh/M.s):(M.finalText=lo,re=M.finalText.length,kt=!1)}dt=-mt,Be=0;var Mt=0,Ut;for(se=0;se<re;se+=1)if(be=!1,Ut=M.finalText[se],$t=Ut.charCodeAt(0),$t===13||$t===3?(Mt=0,nt.push(dt),ot=dt>ot?dt:ot,dt=-2*mt,we="",be=!0,Le+=1):we=Ut,_.chars?(Se=_.getCharData(Ut,Ee.fStyle,_.getFontByName(M.f).fFamily),Be=be?0:Se.w*M.finalSize/100):Be=_.measureText(we,M.f,M.finalSize),Ut===" "?Mt+=Be+mt:(dt+=Be+mt+Mt,Mt=0),oe.push({l:Be,an:Be,add:et,n:be,anIndexes:[],val:we,line:Le,animatorJustifyOffset:0}),Ke==2){if(et+=Be,we===""||we===" "||se===re-1){for((we===""||we===" ")&&(et-=Be);st<=se;)oe[st].an=et,oe[st].ind=De,oe[st].extra=Be,st+=1;De+=1,et=0}}else if(Ke==3){if(et+=Be,we===""||se===re-1){for(we===""&&(et-=Be);st<=se;)oe[st].an=et,oe[st].ind=De,oe[st].extra=Be,st+=1;et=0,De+=1}}else oe[De].ind=De,oe[De].extra=0,De+=1;if(M.l=oe,ot=dt>ot?dt:ot,nt.push(dt),M.sz)M.boxWidth=M.sz[0],M.justifyOffset=0;else switch(M.boxWidth=ot,M.j){case 1:M.justifyOffset=-M.boxWidth;break;case 2:M.justifyOffset=-M.boxWidth/2;break;default:M.justifyOffset=0}M.lineWidths=nt;var Re=K.a,Ue,ge;Qe=Re.length;var _e,ft,ct=[];for(ht=0;ht<Qe;ht+=1){for(Ue=Re[ht],Ue.a.sc&&(M.strokeColorAnim=!0),Ue.a.sw&&(M.strokeWidthAnim=!0),(Ue.a.fc||Ue.a.fh||Ue.a.fs||Ue.a.fb)&&(M.fillColorAnim=!0),ft=0,_e=Ue.s.b,se=0;se<re;se+=1)ge=oe[se],ge.anIndexes[ht]=ft,(_e==1&&ge.val!==""||_e==2&&ge.val!==""&&ge.val!==" "||_e==3&&(ge.n||ge.val==" "||se==re-1)||_e==4&&(ge.n||se==re-1))&&(Ue.s.rn===1&&ct.push(ft),ft+=1);K.a[ht].s.totalChars=ft;var ti=-1,go;if(Ue.s.rn===1)for(se=0;se<re;se+=1)ge=oe[se],ti!=ge.anIndexes[ht]&&(ti=ge.anIndexes[ht],go=ct.splice(Math.floor(Math.random()*ct.length),1)[0]),ge.anIndexes[ht]=go}M.yOffset=M.finalLineHeight||M.finalSize*1.2,M.ls=M.ls||0,M.ascent=Ee.ascent*M.finalSize/100},Xs.prototype.updateDocumentData=function(M,_){_=_===void 0?this.keysIndex:_;var K=this.copyData({},this.data.d.k[_].s);K=this.copyData(K,M),this.data.d.k[_].s=K,this.recalculate(_),this.setCurrentData(K),this.elem.addDynamicProperty(this)},Xs.prototype.recalculate=function(M){var _=this.data.d.k[M].s;_.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(_)},Xs.prototype.canResizeFont=function(M){this.canResize=M,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},Xs.prototype.setMinimumFontSize=function(M){this.minimumFontSize=Math.floor(M)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var NWe=(function(){var M=Math.max,_=Math.min,K=Math.floor;function oe(re,be){this._currentTextLength=-1,this.k=!1,this.data=be,this.elem=re,this.comp=re.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(re),this.s=jt.getProp(re,be.s||{k:0},0,0,this),"e"in be?this.e=jt.getProp(re,be.e,0,0,this):this.e={v:100},this.o=jt.getProp(re,be.o||{k:0},0,0,this),this.xe=jt.getProp(re,be.xe||{k:0},0,0,this),this.ne=jt.getProp(re,be.ne||{k:0},0,0,this),this.sm=jt.getProp(re,be.sm||{k:100},0,0,this),this.a=jt.getProp(re,be.a,0,.01,this),this.dynamicProperties.length||this.getValue()}oe.prototype={getMult:function(re){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var be=0,De=0,we=1,Ke=1;this.ne.v>0?be=this.ne.v/100:De=-this.ne.v/100,this.xe.v>0?we=1-this.xe.v/100:Ke=1+this.xe.v/100;var et=Je.getBezierEasing(be,De,we,Ke).get,st=0,Le=this.finalS,nt=this.finalE,dt=this.data.sh;if(dt===2)nt===Le?st=re>=nt?1:0:st=M(0,_(.5/(nt-Le)+(re-Le)/(nt-Le),1)),st=et(st);else if(dt===3)nt===Le?st=re>=nt?0:1:st=1-M(0,_(.5/(nt-Le)+(re-Le)/(nt-Le),1)),st=et(st);else if(dt===4)nt===Le?st=0:(st=M(0,_(.5/(nt-Le)+(re-Le)/(nt-Le),1)),st<.5?st*=2:st=1-2*(st-.5)),st=et(st);else if(dt===5){if(nt===Le)st=0;else{var ot=nt-Le;re=_(M(0,re+.5-Le),nt-Le);var ht=-ot/2+re,Qe=ot/2;st=Math.sqrt(1-ht*ht/(Qe*Qe))}st=et(st)}else dt===6?(nt===Le?st=0:(re=_(M(0,re+.5-Le),nt-Le),st=(1+Math.cos(Math.PI+Math.PI*2*re/(nt-Le)))/2),st=et(st)):(re>=K(Le)&&(re-Le<0?st=M(0,_(_(nt,1)-(Le-re),1)):st=M(0,_(nt-re,1))),st=et(st));if(this.sm.v!==100){var Ee=this.sm.v*.01;Ee===0&&(Ee=1e-8);var Se=.5-Ee*.5;st<Se?st=0:(st=(st-Se)/Ee,st>1&&(st=1))}return st*this.a.v},getValue:function(re){this.iterateDynamicProperties(),this._mdf=re||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,re&&this.data.r===2&&(this.e.v=this._currentTextLength);var be=this.data.r===2?1:100/this.data.totalChars,De=this.o.v/be,we=this.s.v/be+De,Ke=this.e.v/be+De;if(we>Ke){var et=we;we=Ke,Ke=et}this.finalS=we,this.finalE=Ke}},m([qo],oe);function se(re,be,De){return new oe(re,be)}return{getTextSelectorProp:se}})();function HWe(M,_,K){var oe={propType:!1},se=jt.getProp,re=_.a;this.a={r:re.r?se(M,re.r,0,T,K):oe,rx:re.rx?se(M,re.rx,0,T,K):oe,ry:re.ry?se(M,re.ry,0,T,K):oe,sk:re.sk?se(M,re.sk,0,T,K):oe,sa:re.sa?se(M,re.sa,0,T,K):oe,s:re.s?se(M,re.s,1,.01,K):oe,a:re.a?se(M,re.a,1,0,K):oe,o:re.o?se(M,re.o,0,.01,K):oe,p:re.p?se(M,re.p,1,0,K):oe,sw:re.sw?se(M,re.sw,0,0,K):oe,sc:re.sc?se(M,re.sc,1,0,K):oe,fc:re.fc?se(M,re.fc,1,0,K):oe,fh:re.fh?se(M,re.fh,0,0,K):oe,fs:re.fs?se(M,re.fs,0,.01,K):oe,fb:re.fb?se(M,re.fb,0,.01,K):oe,t:re.t?se(M,re.t,0,0,K):oe},this.s=NWe.getTextSelectorProp(M,_.s,K),this.s.t=_.s.t}function _g(M,_,K){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=M,this._renderType=_,this._elem=K,this._animatorsData=w(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(K)}_g.prototype.searchProperties=function(){var M,_=this._textData.a.length,K,oe=jt.getProp;for(M=0;M<_;M+=1)K=this._textData.a[M],this._animatorsData[M]=new HWe(this._elem,K,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:oe(this._elem,this._textData.p.a,0,0,this),f:oe(this._elem,this._textData.p.f,0,0,this),l:oe(this._elem,this._textData.p.l,0,0,this),r:oe(this._elem,this._textData.p.r,0,0,this),p:oe(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=oe(this._elem,this._textData.m.a,1,0,this)},_g.prototype.getMeasures=function(M,_){if(this.lettersChangedFlag=_,!(!this._mdf&&!this._isFirstFrame&&!_&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var K=this._moreOptions.alignment.v,oe=this._animatorsData,se=this._textData,re=this.mHelper,be=this._renderType,De=this.renderedLetters.length,we,Ke,et,st,Le=M.l,nt,dt,ot,ht,Qe,Ee,Se,Be,Ye,mt,$t,kt,qt,Eo,wo;if(this._hasMaskedPath){if(wo=this._pathData.m,!this._pathData.n||this._pathData._mdf){var lo=wo.v;this._pathData.r.v&&(lo=lo.reverse()),nt={tLength:0,segments:[]},st=lo._length-1;var Mo;for(kt=0,et=0;et<st;et+=1)Mo=Oe.buildBezierData(lo.v[et],lo.v[et+1],[lo.o[et][0]-lo.v[et][0],lo.o[et][1]-lo.v[et][1]],[lo.i[et+1][0]-lo.v[et+1][0],lo.i[et+1][1]-lo.v[et+1][1]]),nt.tLength+=Mo.segmentLength,nt.segments.push(Mo),kt+=Mo.segmentLength;et=st,wo.v.c&&(Mo=Oe.buildBezierData(lo.v[et],lo.v[0],[lo.o[et][0]-lo.v[et][0],lo.o[et][1]-lo.v[et][1]],[lo.i[0][0]-lo.v[0][0],lo.i[0][1]-lo.v[0][1]]),nt.tLength+=Mo.segmentLength,nt.segments.push(Mo),kt+=Mo.segmentLength),this._pathData.pi=nt}if(nt=this._pathData.pi,dt=this._pathData.f.v,Se=0,Ee=1,ht=0,Qe=!0,mt=nt.segments,dt<0&&wo.v.c)for(nt.tLength<Math.abs(dt)&&(dt=-Math.abs(dt)%nt.tLength),Se=mt.length-1,Ye=mt[Se].points,Ee=Ye.length-1;dt<0;)dt+=Ye[Ee].partialLength,Ee-=1,Ee<0&&(Se-=1,Ye=mt[Se].points,Ee=Ye.length-1);Ye=mt[Se].points,Be=Ye[Ee-1],ot=Ye[Ee],$t=ot.partialLength}st=Le.length,we=0,Ke=0;var Mt=M.finalSize*1.2*.714,Ut=!0,Re,Ue,ge,_e,ft;_e=oe.length;var ct,ti=-1,go,Gi,yi,ea=dt,xa=Se,Il=Ee,Yp=-1,jl,hs,vd,jr,yo,Lu,l0,Iu,Kp="",ju=this.defaultPropsArray,Mu;if(M.j===2||M.j===1){var Ml=0,d0=0,c0=M.j===2?-.5:-1,l1=0,p0=!0;for(et=0;et<st;et+=1)if(Le[et].n){for(Ml&&(Ml+=d0);l1<et;)Le[l1].animatorJustifyOffset=Ml,l1+=1;Ml=0,p0=!0}else{for(ge=0;ge<_e;ge+=1)Re=oe[ge].a,Re.t.propType&&(p0&&M.j===2&&(d0+=Re.t.v*c0),Ue=oe[ge].s,ct=Ue.getMult(Le[et].anIndexes[ge],se.a[ge].s.totalChars),ct.length?Ml+=Re.t.v*ct[0]*c0:Ml+=Re.t.v*ct*c0);p0=!1}for(Ml&&(Ml+=d0);l1<et;)Le[l1].animatorJustifyOffset=Ml,l1+=1}for(et=0;et<st;et+=1){if(re.reset(),jl=1,Le[et].n)we=0,Ke+=M.yOffset,Ke+=Ut?1:0,dt=ea,Ut=!1,this._hasMaskedPath&&(Se=xa,Ee=Il,Ye=mt[Se].points,Be=Ye[Ee-1],ot=Ye[Ee],$t=ot.partialLength,ht=0),Kp="",Iu="",Lu="",Mu="",ju=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Yp!==Le[et].line){switch(M.j){case 1:dt+=kt-M.lineWidths[Le[et].line];break;case 2:dt+=(kt-M.lineWidths[Le[et].line])/2;break}Yp=Le[et].line}ti!==Le[et].ind&&(Le[ti]&&(dt+=Le[ti].extra),dt+=Le[et].an/2,ti=Le[et].ind),dt+=K[0]*Le[et].an*.005;var d1=0;for(ge=0;ge<_e;ge+=1)Re=oe[ge].a,Re.p.propType&&(Ue=oe[ge].s,ct=Ue.getMult(Le[et].anIndexes[ge],se.a[ge].s.totalChars),ct.length?d1+=Re.p.v[0]*ct[0]:d1+=Re.p.v[0]*ct),Re.a.propType&&(Ue=oe[ge].s,ct=Ue.getMult(Le[et].anIndexes[ge],se.a[ge].s.totalChars),ct.length?d1+=Re.a.v[0]*ct[0]:d1+=Re.a.v[0]*ct);for(Qe=!0,this._pathData.a.v&&(dt=Le[0].an*.5+(kt-this._pathData.f.v-Le[0].an*.5-Le[Le.length-1].an*.5)*ti/(st-1),dt+=this._pathData.f.v);Qe;)ht+$t>=dt+d1||!Ye?(qt=(dt+d1-ht)/ot.partialLength,Gi=Be.point[0]+(ot.point[0]-Be.point[0])*qt,yi=Be.point[1]+(ot.point[1]-Be.point[1])*qt,re.translate(-K[0]*Le[et].an*.005,-(K[1]*Mt)*.01),Qe=!1):Ye&&(ht+=ot.partialLength,Ee+=1,Ee>=Ye.length&&(Ee=0,Se+=1,mt[Se]?Ye=mt[Se].points:wo.v.c?(Ee=0,Se=0,Ye=mt[Se].points):(ht-=ot.partialLength,Ye=null)),Ye&&(Be=ot,ot=Ye[Ee],$t=ot.partialLength));go=Le[et].an/2-Le[et].add,re.translate(-go,0,0)}else go=Le[et].an/2-Le[et].add,re.translate(-go,0,0),re.translate(-K[0]*Le[et].an*.005,-K[1]*Mt*.01,0);for(ge=0;ge<_e;ge+=1)Re=oe[ge].a,Re.t.propType&&(Ue=oe[ge].s,ct=Ue.getMult(Le[et].anIndexes[ge],se.a[ge].s.totalChars),(we!==0||M.j!==0)&&(this._hasMaskedPath?ct.length?dt+=Re.t.v*ct[0]:dt+=Re.t.v*ct:ct.length?we+=Re.t.v*ct[0]:we+=Re.t.v*ct));for(M.strokeWidthAnim&&(vd=M.sw||0),M.strokeColorAnim&&(M.sc?hs=[M.sc[0],M.sc[1],M.sc[2]]:hs=[0,0,0]),M.fillColorAnim&&M.fc&&(jr=[M.fc[0],M.fc[1],M.fc[2]]),ge=0;ge<_e;ge+=1)Re=oe[ge].a,Re.a.propType&&(Ue=oe[ge].s,ct=Ue.getMult(Le[et].anIndexes[ge],se.a[ge].s.totalChars),ct.length?re.translate(-Re.a.v[0]*ct[0],-Re.a.v[1]*ct[1],Re.a.v[2]*ct[2]):re.translate(-Re.a.v[0]*ct,-Re.a.v[1]*ct,Re.a.v[2]*ct));for(ge=0;ge<_e;ge+=1)Re=oe[ge].a,Re.s.propType&&(Ue=oe[ge].s,ct=Ue.getMult(Le[et].anIndexes[ge],se.a[ge].s.totalChars),ct.length?re.scale(1+(Re.s.v[0]-1)*ct[0],1+(Re.s.v[1]-1)*ct[1],1):re.scale(1+(Re.s.v[0]-1)*ct,1+(Re.s.v[1]-1)*ct,1));for(ge=0;ge<_e;ge+=1){if(Re=oe[ge].a,Ue=oe[ge].s,ct=Ue.getMult(Le[et].anIndexes[ge],se.a[ge].s.totalChars),Re.sk.propType&&(ct.length?re.skewFromAxis(-Re.sk.v*ct[0],Re.sa.v*ct[1]):re.skewFromAxis(-Re.sk.v*ct,Re.sa.v*ct)),Re.r.propType&&(ct.length?re.rotateZ(-Re.r.v*ct[2]):re.rotateZ(-Re.r.v*ct)),Re.ry.propType&&(ct.length?re.rotateY(Re.ry.v*ct[1]):re.rotateY(Re.ry.v*ct)),Re.rx.propType&&(ct.length?re.rotateX(Re.rx.v*ct[0]):re.rotateX(Re.rx.v*ct)),Re.o.propType&&(ct.length?jl+=(Re.o.v*ct[0]-jl)*ct[0]:jl+=(Re.o.v*ct-jl)*ct),M.strokeWidthAnim&&Re.sw.propType&&(ct.length?vd+=Re.sw.v*ct[0]:vd+=Re.sw.v*ct),M.strokeColorAnim&&Re.sc.propType)for(yo=0;yo<3;yo+=1)ct.length?hs[yo]+=(Re.sc.v[yo]-hs[yo])*ct[0]:hs[yo]+=(Re.sc.v[yo]-hs[yo])*ct;if(M.fillColorAnim&&M.fc){if(Re.fc.propType)for(yo=0;yo<3;yo+=1)ct.length?jr[yo]+=(Re.fc.v[yo]-jr[yo])*ct[0]:jr[yo]+=(Re.fc.v[yo]-jr[yo])*ct;Re.fh.propType&&(ct.length?jr=W(jr,Re.fh.v*ct[0]):jr=W(jr,Re.fh.v*ct)),Re.fs.propType&&(ct.length?jr=te(jr,Re.fs.v*ct[0]):jr=te(jr,Re.fs.v*ct)),Re.fb.propType&&(ct.length?jr=Y(jr,Re.fb.v*ct[0]):jr=Y(jr,Re.fb.v*ct))}}for(ge=0;ge<_e;ge+=1)Re=oe[ge].a,Re.p.propType&&(Ue=oe[ge].s,ct=Ue.getMult(Le[et].anIndexes[ge],se.a[ge].s.totalChars),this._hasMaskedPath?ct.length?re.translate(0,Re.p.v[1]*ct[0],-Re.p.v[2]*ct[1]):re.translate(0,Re.p.v[1]*ct,-Re.p.v[2]*ct):ct.length?re.translate(Re.p.v[0]*ct[0],Re.p.v[1]*ct[1],-Re.p.v[2]*ct[2]):re.translate(Re.p.v[0]*ct,Re.p.v[1]*ct,-Re.p.v[2]*ct));if(M.strokeWidthAnim&&(Lu=vd<0?0:vd),M.strokeColorAnim&&(l0="rgb("+Math.round(hs[0]*255)+","+Math.round(hs[1]*255)+","+Math.round(hs[2]*255)+")"),M.fillColorAnim&&M.fc&&(Iu="rgb("+Math.round(jr[0]*255)+","+Math.round(jr[1]*255)+","+Math.round(jr[2]*255)+")"),this._hasMaskedPath){if(re.translate(0,-M.ls),re.translate(0,K[1]*Mt*.01+Ke,0),this._pathData.p.v){Eo=(ot.point[1]-Be.point[1])/(ot.point[0]-Be.point[0]);var Vg=Math.atan(Eo)*180/Math.PI;ot.point[0]<Be.point[0]&&(Vg+=180),re.rotate(-Vg*Math.PI/180)}re.translate(Gi,yi,0),dt-=K[0]*Le[et].an*.005,Le[et+1]&&ti!==Le[et+1].ind&&(dt+=Le[et].an/2,dt+=M.tr*.001*M.finalSize)}else{switch(re.translate(we,Ke,0),M.ps&&re.translate(M.ps[0],M.ps[1]+M.ascent,0),M.j){case 1:re.translate(Le[et].animatorJustifyOffset+M.justifyOffset+(M.boxWidth-M.lineWidths[Le[et].line]),0,0);break;case 2:re.translate(Le[et].animatorJustifyOffset+M.justifyOffset+(M.boxWidth-M.lineWidths[Le[et].line])/2,0,0);break}re.translate(0,-M.ls),re.translate(go,0,0),re.translate(K[0]*Le[et].an*.005,K[1]*Mt*.01,0),we+=Le[et].l+M.tr*.001*M.finalSize}be==="html"?Kp=re.toCSS():be==="svg"?Kp=re.to2dCSS():ju=[re.props[0],re.props[1],re.props[2],re.props[3],re.props[4],re.props[5],re.props[6],re.props[7],re.props[8],re.props[9],re.props[10],re.props[11],re.props[12],re.props[13],re.props[14],re.props[15]],Mu=jl}De<=et?(ft=new NB(Mu,Lu,l0,Iu,Kp,ju),this.renderedLetters.push(ft),De+=1,this.lettersChangedFlag=!0):(ft=this.renderedLetters[et],this.lettersChangedFlag=ft.update(Mu,Lu,l0,Iu,Kp,ju)||this.lettersChangedFlag)}}},_g.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},_g.prototype.mHelper=new $r,_g.prototype.defaultPropsArray=[],m([qo],_g);function ic(){}ic.prototype.initElement=function(M,_,K){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(M,_,K),this.textProperty=new Xs(this,M.t,this.dynamicProperties),this.textAnimator=new _g(M.t,this.renderType,this),this.initTransform(M,_,K),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ic.prototype.prepareFrame=function(M){this._mdf=!1,this.prepareRenderableFrame(M),this.prepareProperties(M,this.isInRange)},ic.prototype.createPathShape=function(M,_){var K,oe=_.length,se,re="";for(K=0;K<oe;K+=1)_[K].ty==="sh"&&(se=_[K].ks.k,re+=oee(se,se.i.length,!0,M));return re},ic.prototype.updateDocumentData=function(M,_){this.textProperty.updateDocumentData(M,_)},ic.prototype.canResizeFont=function(M){this.textProperty.canResizeFont(M)},ic.prototype.setMinimumFontSize=function(M){this.textProperty.setMinimumFontSize(M)},ic.prototype.applyTextPropertiesToMatrix=function(M,_,K,oe,se){switch(M.ps&&_.translate(M.ps[0],M.ps[1]+M.ascent,0),_.translate(0,-M.ls,0),M.j){case 1:_.translate(M.justifyOffset+(M.boxWidth-M.lineWidths[K]),0,0);break;case 2:_.translate(M.justifyOffset+(M.boxWidth-M.lineWidths[K])/2,0,0);break}_.translate(oe,se,0)},ic.prototype.buildColor=function(M){return"rgb("+Math.round(M[0]*255)+","+Math.round(M[1]*255)+","+Math.round(M[2]*255)+")"},ic.prototype.emptyProp=new NB,ic.prototype.destroy=function(){},ic.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var _We={shapes:[]};function Su(M,_,K){this.textSpans=[],this.renderType="svg",this.initElement(M,_,K)}m([r0,O4,q8,N4,n0,Z8,ic],Su),Su.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=xe("text"))},Su.prototype.buildTextContents=function(M){for(var _=0,K=M.length,oe=[],se="";_<K;)M[_]==="\r"||M[_]===""?(oe.push(se),se=""):se+=M[_],_+=1;return oe.push(se),oe},Su.prototype.buildShapeData=function(M,_){if(M.shapes&&M.shapes.length){var K=M.shapes[0];if(K.it){var oe=K.it[K.it.length-1];oe.s&&(oe.s.k[0]=_,oe.s.k[1]=_)}}return M},Su.prototype.buildNewText=function(){this.addDynamicProperty(this);var M,_,K=this.textProperty.currentData;this.renderedLetters=w(K?K.l.length:0),K.fc?this.layerElement.setAttribute("fill",this.buildColor(K.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),K.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(K.sc)),this.layerElement.setAttribute("stroke-width",K.sw)),this.layerElement.setAttribute("font-size",K.finalSize);var oe=this.globalData.fontManager.getFontByName(K.f);if(oe.fClass)this.layerElement.setAttribute("class",oe.fClass);else{this.layerElement.setAttribute("font-family",oe.fFamily);var se=K.fWeight,re=K.fStyle;this.layerElement.setAttribute("font-style",re),this.layerElement.setAttribute("font-weight",se)}this.layerElement.setAttribute("aria-label",K.t);var be=K.l||[],De=!!this.globalData.fontManager.chars;_=be.length;var we,Ke=this.mHelper,et="",st=this.data.singleShape,Le=0,nt=0,dt=!0,ot=K.tr*.001*K.finalSize;if(st&&!De&&!K.sz){var ht=this.textContainer,Qe="start";switch(K.j){case 1:Qe="end";break;case 2:Qe="middle";break;default:Qe="start";break}ht.setAttribute("text-anchor",Qe),ht.setAttribute("letter-spacing",ot);var Ee=this.buildTextContents(K.finalText);for(_=Ee.length,nt=K.ps?K.ps[1]+K.ascent:0,M=0;M<_;M+=1)we=this.textSpans[M].span||xe("tspan"),we.textContent=Ee[M],we.setAttribute("x",0),we.setAttribute("y",nt),we.style.display="inherit",ht.appendChild(we),this.textSpans[M]||(this.textSpans[M]={span:null,glyph:null}),this.textSpans[M].span=we,nt+=K.finalLineHeight;this.layerElement.appendChild(ht)}else{var Se=this.textSpans.length,Be;for(M=0;M<_;M+=1){if(this.textSpans[M]||(this.textSpans[M]={span:null,childSpan:null,glyph:null}),!De||!st||M===0){if(we=Se>M?this.textSpans[M].span:xe(De?"g":"text"),Se<=M){if(we.setAttribute("stroke-linecap","butt"),we.setAttribute("stroke-linejoin","round"),we.setAttribute("stroke-miterlimit","4"),this.textSpans[M].span=we,De){var Ye=xe("g");we.appendChild(Ye),this.textSpans[M].childSpan=Ye}this.textSpans[M].span=we,this.layerElement.appendChild(we)}we.style.display="inherit"}if(Ke.reset(),st&&(be[M].n&&(Le=-ot,nt+=K.yOffset,nt+=dt?1:0,dt=!1),this.applyTextPropertiesToMatrix(K,Ke,be[M].line,Le,nt),Le+=be[M].l||0,Le+=ot),De){Be=this.globalData.fontManager.getCharData(K.finalText[M],oe.fStyle,this.globalData.fontManager.getFontByName(K.f).fFamily);var mt;if(Be.t===1)mt=new e9(Be.data,this.globalData,this);else{var $t=_We;Be.data&&Be.data.shapes&&($t=this.buildShapeData(Be.data,K.finalSize)),mt=new Xn($t,this.globalData,this)}if(this.textSpans[M].glyph){var kt=this.textSpans[M].glyph;this.textSpans[M].childSpan.removeChild(kt.layerElement),kt.destroy()}this.textSpans[M].glyph=mt,mt._debug=!0,mt.prepareFrame(0),mt.renderFrame(),this.textSpans[M].childSpan.appendChild(mt.layerElement),Be.t===1&&this.textSpans[M].childSpan.setAttribute("transform","scale("+K.finalSize/100+","+K.finalSize/100+")")}else st&&we.setAttribute("transform","translate("+Ke.props[12]+","+Ke.props[13]+")"),we.textContent=be[M].val,we.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}st&&we&&we.setAttribute("d",et)}for(;M<this.textSpans.length;)this.textSpans[M].span.style.display="none",M+=1;this._sizeChanged=!0},Su.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var M=this.layerElement.getBBox();this.bbox={top:M.y,left:M.x,width:M.width,height:M.height}}return this.bbox},Su.prototype.getValue=function(){var M,_=this.textSpans.length,K;for(this.renderedFrame=this.comp.renderedFrame,M=0;M<_;M+=1)K=this.textSpans[M].glyph,K&&(K.prepareFrame(this.comp.renderedFrame-this.data.st),K._mdf&&(this._mdf=!0))},Su.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var M,_,K=this.textAnimator.renderedLetters,oe=this.textProperty.currentData.l;_=oe.length;var se,re,be;for(M=0;M<_;M+=1)oe[M].n||(se=K[M],re=this.textSpans[M].span,be=this.textSpans[M].glyph,be&&be.renderFrame(),se._mdf.m&&re.setAttribute("transform",se.m),se._mdf.o&&re.setAttribute("opacity",se.o),se._mdf.sw&&re.setAttribute("stroke-width",se.sw),se._mdf.sc&&re.setAttribute("stroke",se.sc),se._mdf.fc&&re.setAttribute("fill",se.fc))}};function HB(M,_,K){this.initElement(M,_,K)}m([J8],HB),HB.prototype.createContent=function(){var M=xe("rect");M.setAttribute("width",this.data.sw),M.setAttribute("height",this.data.sh),M.setAttribute("fill",this.data.sc),this.layerElement.appendChild(M)};function s0(M,_,K){this.initFrame(),this.initBaseData(M,_,K),this.initFrame(),this.initTransform(M,_,K),this.initHierarchy()}s0.prototype.prepareFrame=function(M){this.prepareProperties(M,!0)},s0.prototype.renderFrame=function(){},s0.prototype.getBaseElement=function(){return null},s0.prototype.destroy=function(){},s0.prototype.sourceRectAtTime=function(){},s0.prototype.hide=function(){},m([r0,O4,N4,n0],s0);function Oa(){}m([Ds],Oa),Oa.prototype.createNull=function(M){return new s0(M,this.globalData,this)},Oa.prototype.createShape=function(M){return new Xn(M,this.globalData,this)},Oa.prototype.createText=function(M){return new Su(M,this.globalData,this)},Oa.prototype.createImage=function(M){return new J8(M,this.globalData,this)},Oa.prototype.createSolid=function(M){return new HB(M,this.globalData,this)},Oa.prototype.configAnimation=function(M){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+M.w+" "+M.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",M.w),this.svgElement.setAttribute("height",M.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var _=this.globalData.defs;this.setupGlobalData(M,_),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=M;var K=xe("clipPath"),oe=xe("rect");oe.setAttribute("width",M.w),oe.setAttribute("height",M.h),oe.setAttribute("x",0),oe.setAttribute("y",0);var se=O();K.setAttribute("id",se),K.appendChild(oe),this.layerElement.setAttribute("clip-path","url("+h()+"#"+se+")"),_.appendChild(K),this.layers=M.layers,this.elements=w(M.layers.length)},Oa.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var M,_=this.layers?this.layers.length:0;for(M=0;M<_;M+=1)this.elements[M]&&this.elements[M].destroy&&this.elements[M].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},Oa.prototype.updateContainerSize=function(){},Oa.prototype.findIndexByInd=function(M){var _=0,K=this.layers.length;for(_=0;_<K;_+=1)if(this.layers[_].ind===M)return _;return-1},Oa.prototype.buildItem=function(M){var _=this.elements;if(!(_[M]||this.layers[M].ty===99)){_[M]=!0;var K=this.createItem(this.layers[M]);if(_[M]=K,ye()&&(this.layers[M].ty===0&&this.globalData.projectInterface.registerComposition(K),K.initExpressions()),this.appendElementInPos(K,M),this.layers[M].tt){var oe="tp"in this.layers[M]?this.findIndexByInd(this.layers[M].tp):M-1;if(oe===-1)return;if(!this.elements[oe]||this.elements[oe]===!0)this.buildItem(oe),this.addPendingElement(K);else{var se=_[oe],re=se.getMatte(this.layers[M].tt);K.setMatte(re)}}}},Oa.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var M=this.pendingElements.pop();if(M.checkParenting(),M.data.tt)for(var _=0,K=this.elements.length;_<K;){if(this.elements[_]===M){var oe="tp"in M.data?this.findIndexByInd(M.data.tp):_-1,se=this.elements[oe],re=se.getMatte(this.layers[_].tt);M.setMatte(re);break}_+=1}}},Oa.prototype.renderFrame=function(M){if(!(this.renderedFrame===M||this.destroyed)){M===null?M=this.renderedFrame:this.renderedFrame=M,this.globalData.frameNum=M,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=M,this.globalData._mdf=!1;var _,K=this.layers.length;for(this.completeLayers||this.checkLayers(M),_=K-1;_>=0;_-=1)(this.completeLayers||this.elements[_])&&this.elements[_].prepareFrame(M-this.layers[_].st);if(this.globalData._mdf)for(_=0;_<K;_+=1)(this.completeLayers||this.elements[_])&&this.elements[_].renderFrame()}},Oa.prototype.appendElementInPos=function(M,_){var K=M.getBaseElement();if(K){for(var oe=0,se;oe<_;)this.elements[oe]&&this.elements[oe]!==!0&&this.elements[oe].getBaseElement()&&(se=this.elements[oe].getBaseElement()),oe+=1;se?this.layerElement.insertBefore(K,se):this.layerElement.appendChild(K)}},Oa.prototype.hide=function(){this.layerElement.style.display="none"},Oa.prototype.show=function(){this.layerElement.style.display="block"};function Eu(){}m([r0,O4,N4,n0,Z8],Eu),Eu.prototype.initElement=function(M,_,K){this.initFrame(),this.initBaseData(M,_,K),this.initTransform(M,_,K),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!_.progressiveLoad)&&this.buildAllItems(),this.hide()},Eu.prototype.prepareFrame=function(M){if(this._mdf=!1,this.prepareRenderableFrame(M),this.prepareProperties(M,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=M/this.data.sr;else{var _=this.tm.v;_===this.data.op&&(_=this.data.op-1),this.renderedFrame=_}var K,oe=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),K=oe-1;K>=0;K-=1)(this.completeLayers||this.elements[K])&&(this.elements[K].prepareFrame(this.renderedFrame-this.layers[K].st),this.elements[K]._mdf&&(this._mdf=!0))}},Eu.prototype.renderInnerContent=function(){var M,_=this.layers.length;for(M=0;M<_;M+=1)(this.completeLayers||this.elements[M])&&this.elements[M].renderFrame()},Eu.prototype.setElements=function(M){this.elements=M},Eu.prototype.getElements=function(){return this.elements},Eu.prototype.destroyElements=function(){var M,_=this.layers.length;for(M=0;M<_;M+=1)this.elements[M]&&this.elements[M].destroy()},Eu.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function e9(M,_,K){this.layers=M.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?w(this.layers.length):[],this.initElement(M,_,K),this.tm=M.tm?jt.getProp(this,M.tm,0,_.frameRate,this):{_placeholder:!0}}m([Oa,Eu,q8],e9),e9.prototype.createComp=function(M){return new e9(M,this.globalData,this)};function _B(M,_){this.animationItem=M,this.layers=null,this.renderedFrame=-1,this.svgElement=xe("svg");var K="";if(_&&_.title){var oe=xe("title"),se=O();oe.setAttribute("id",se),oe.textContent=_.title,this.svgElement.appendChild(oe),K+=se}if(_&&_.description){var re=xe("desc"),be=O();re.setAttribute("id",be),re.textContent=_.description,this.svgElement.appendChild(re),K+=" "+be}K&&this.svgElement.setAttribute("aria-labelledby",K);var De=xe("defs");this.svgElement.appendChild(De);var we=xe("g");this.svgElement.appendChild(we),this.layerElement=we,this.renderConfig={preserveAspectRatio:_&&_.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:_&&_.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:_&&_.contentVisibility||"visible",progressiveLoad:_&&_.progressiveLoad||!1,hideOnTransparent:!(_&&_.hideOnTransparent===!1),viewBoxOnly:_&&_.viewBoxOnly||!1,viewBoxSize:_&&_.viewBoxSize||!1,className:_&&_.className||"",id:_&&_.id||"",focusable:_&&_.focusable,filterSize:{width:_&&_.filterSize&&_.filterSize.width||"100%",height:_&&_.filterSize&&_.filterSize.height||"100%",x:_&&_.filterSize&&_.filterSize.x||"0%",y:_&&_.filterSize&&_.filterSize.y||"0%"},width:_&&_.width,height:_&&_.height,runExpressions:!_||_.runExpressions===void 0||_.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:De,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}return m([Oa],_B),_B.prototype.createComp=function(M){return new e9(M,this.globalData,this)},je("svg",_B),Wp.registerModifier("tm",bd),Wp.registerModifier("pb",Gp),Wp.registerModifier("rp",oc),Wp.registerModifier("rd",t0),Wp.registerModifier("zz",Sn),Wp.registerModifier("op",G8),Zo}))})(Z$,Z$.exports)),Z$.exports}var vee,Cee;function gKe(){return Cee||(Cee=1,vee=function e(t,i){if(t===i)return!0;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(t.constructor!==i.constructor)return!1;var n,a,l;if(Array.isArray(t)){if(n=t.length,n!=i.length)return!1;for(a=n;a--!==0;)if(!e(t[a],i[a]))return!1;return!0}if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(a of t.entries())if(!i.has(a[0]))return!1;for(a of t.entries())if(!e(a[1],i.get(a[0])))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(a of t.entries())if(!i.has(a[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(i)){if(n=t.length,n!=i.length)return!1;for(a=n;a--!==0;)if(t[a]!==i[a])return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if(l=Object.keys(t),n=l.length,n!==Object.keys(i).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(i,l[a]))return!1;for(a=n;a--!==0;){var d=l[a];if(!(d==="_owner"&&t.$$typeof)&&!e(t[d],i[d]))return!1}return!0}return t!==t&&i!==i}),vee}var UB,Aee;function fKe(){if(Aee)return UB;Aee=1,UB=t;function e(n){return n instanceof jk?jk.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function t(n){if(n=n||{},n.circles)return i(n);const a=new Map;if(a.set(Date,h=>new Date(h)),a.set(Map,(h,u)=>new Map(d(Array.from(h),u))),a.set(Set,(h,u)=>new Set(d(Array.from(h),u))),n.constructorHandlers)for(const h of n.constructorHandlers)a.set(h[0],h[1]);let l=null;return n.proto?p:c;function d(h,u){const m=Object.keys(h),f=new Array(m.length);for(let x=0;x<m.length;x++){const y=m[x],w=h[y];typeof w!="object"||w===null?f[y]=w:w.constructor!==Object&&(l=a.get(w.constructor))?f[y]=l(w,u):ArrayBuffer.isView(w)?f[y]=e(w):f[y]=u(w)}return f}function c(h){if(typeof h!="object"||h===null)return h;if(Array.isArray(h))return d(h,c);if(h.constructor!==Object&&(l=a.get(h.constructor)))return l(h,c);const u={};for(const m in h){if(Object.hasOwnProperty.call(h,m)===!1)continue;const f=h[m];typeof f!="object"||f===null?u[m]=f:f.constructor!==Object&&(l=a.get(f.constructor))?u[m]=l(f,c):ArrayBuffer.isView(f)?u[m]=e(f):u[m]=c(f)}return u}function p(h){if(typeof h!="object"||h===null)return h;if(Array.isArray(h))return d(h,p);if(h.constructor!==Object&&(l=a.get(h.constructor)))return l(h,p);const u={};for(const m in h){const f=h[m];typeof f!="object"||f===null?u[m]=f:f.constructor!==Object&&(l=a.get(f.constructor))?u[m]=l(f,p):ArrayBuffer.isView(f)?u[m]=e(f):u[m]=p(f)}return u}}function i(n){const a=[],l=[],d=new Map;if(d.set(Date,m=>new Date(m)),d.set(Map,(m,f)=>new Map(p(Array.from(m),f))),d.set(Set,(m,f)=>new Set(p(Array.from(m),f))),n.constructorHandlers)for(const m of n.constructorHandlers)d.set(m[0],m[1]);let c=null;return n.proto?u:h;function p(m,f){const x=Object.keys(m),y=new Array(x.length);for(let w=0;w<x.length;w++){const b=x[w],C=m[b];if(typeof C!="object"||C===null)y[b]=C;else if(C.constructor!==Object&&(c=d.get(C.constructor)))y[b]=c(C,f);else if(ArrayBuffer.isView(C))y[b]=e(C);else{const k=a.indexOf(C);k!==-1?y[b]=l[k]:y[b]=f(C)}}return y}function h(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return p(m,h);if(m.constructor!==Object&&(c=d.get(m.constructor)))return c(m,h);const f={};a.push(m),l.push(f);for(const x in m){if(Object.hasOwnProperty.call(m,x)===!1)continue;const y=m[x];if(typeof y!="object"||y===null)f[x]=y;else if(y.constructor!==Object&&(c=d.get(y.constructor)))f[x]=c(y,h);else if(ArrayBuffer.isView(y))f[x]=e(y);else{const w=a.indexOf(y);w!==-1?f[x]=l[w]:f[x]=h(y)}}return a.pop(),l.pop(),f}function u(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return p(m,u);if(m.constructor!==Object&&(c=d.get(m.constructor)))return c(m,u);const f={};a.push(m),l.push(f);for(const x in m){const y=m[x];if(typeof y!="object"||y===null)f[x]=y;else if(y.constructor!==Object&&(c=d.get(y.constructor)))f[x]=c(y,u);else if(ArrayBuffer.isView(y))f[x]=e(y);else{const w=a.indexOf(y);w!==-1?f[x]=l[w]:f[x]=u(y)}}return a.pop(),l.pop(),f}}return UB}var $ee,kee;function xKe(){return kee||(kee=1,$ee=fKe()()),$ee}var WB,See;function yKe(){if(See)return WB;See=1;function e(f){return f&&typeof f=="object"&&"default"in f?f.default:f}var t=e(mKe()),i=A,n=e(i),a=e(gKe()),l=e(xKe());function d(){return d=Object.assign?Object.assign.bind():function(f){for(var x=1;x<arguments.length;x++){var y=arguments[x];for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(f[w]=y[w])}return f},d.apply(this,arguments)}function c(f,x){if(f==null)return{};var y={},w=Object.keys(f),b,C;for(C=0;C<w.length;C++)b=w[C],!(x.indexOf(b)>=0)&&(y[b]=f[b]);return y}var p={},h=function(){},u=function(f){var x=f.loadAnimation,y=i.memo(i.forwardRef(function(w,b){var C=w.play,k=C===void 0?null:C,L=w.speed,S=L===void 0?1:L,j=w.direction,I=j===void 0?1:j,P=w.segments,B=P===void 0?null:P,T=w.goTo,D=T===void 0?null:T,R=w.useSubframes,G=R===void 0?!0:R,q=w.renderer,Z=q===void 0?"svg":q,H=w.loop,V=H===void 0?!0:H,N=w.rendererSettings,O=N===void 0?p:N,z=w.audioFactory,F=w.onLoad,te=F===void 0?h:F,Y=w.onComplete,W=Y===void 0?h:Y,ee=w.onLoopComplete,J=ee===void 0?h:ee,ne=w.onEnterFrame,ye=ne===void 0?h:ne,me=w.onSegmentStart,he=me===void 0?h:me,pe=c(w,["play","speed","direction","segments","goTo","useSubframes","renderer","loop","rendererSettings","audioFactory","onLoad","onComplete","onLoopComplete","onEnterFrame","onSegmentStart"]),xe=pe,ve,le;if("animationData"in pe){var ae=pe;ve=ae.animationData,xe=c(ae,["animationData"])}if("path"in pe){var fe=pe;le=fe.path,xe=c(fe,["path"])}var ke=i.useRef(null),ie=i.useRef(),ue=i.useCallback(function(){if(ie.current==null)throw new Error("Lottie ref is not set");return ie.current},[]),je=i.useState(!1),Me=je[0],Ce=je[1],Te=i.useState(B),Fe=Te[0],tt=Te[1];i.useEffect(function(){a(Fe,B)||tt(B)},[B,Fe]);var Je=i.useState(O),ze=Je[0],qe=Je[1];i.useEffect(function(){a(ze,O)||qe(O)},[O,ze]),i.useEffect(function(){return function(){return ue().removeEventListener("complete",W)}},[ue,W]),i.useEffect(function(){return function(){return ue().removeEventListener("loopComplete",J)}},[ue,J]),i.useEffect(function(){return function(){return ue().removeEventListener("enterFrame",ye)}},[ue,ye]),i.useEffect(function(){return function(){return ue().removeEventListener("segmentStart",he)}},[ue,he]),i.useEffect(function(){return function(){return ue().removeEventListener("DOMLoaded",te)}},[ue,te]);var $e=i.useCallback(function(at){ie.current=at,typeof b=="function"?b(at):b!=null&&(b.current=at)},[b]);i.useEffect(function(){function at(){return ve==null||typeof ve!="object"?ve:"default"in ve&&typeof ve.default=="object"?l(ve.default):l(ve)}if(ke.current==null)throw new Error("animElementRef is not set");var Oe=x(d({animationData:at(),path:le,container:ke.current,renderer:Z,loop:!1,autoplay:!1,rendererSettings:ze},z?{audioFactory:z}:{}));$e(Oe);var rt=function(){return Ce(!0)};return ue().addEventListener("DOMLoaded",rt),function(){ue().removeEventListener("DOMLoaded",rt),Ce(!1),ue().destroy(),$e(void 0)}},[V,Z,ze,ve,le,z,$e,ue]),i.useEffect(function(){ue().addEventListener("DOMLoaded",te)},[ue,te]),i.useEffect(function(){ue().addEventListener("complete",W)},[ue,W]),i.useEffect(function(){ue().addEventListener("loopComplete",J)},[ue,J]),i.useEffect(function(){ue().addEventListener("enterFrame",ye)},[ue,ye]),i.useEffect(function(){ue().addEventListener("segmentStart",he)},[ue,he]),i.useEffect(function(){Me&&(ue().loop=V)},[Me,V,ue]);var Ne=i.useRef(!1);return i.useEffect(function(){if(!Me)return;function at(Ge){ue().goToAndPlay(Ge,!0),ue().setDirection(I)}if(k===!0){var Oe=!0;if(Fe){if(ue().playSegments(Fe,Oe),Ne.current=!0,I===-1){var rt=typeof Fe[1]=="number"?Fe[1]:Fe[1][1];at(rt)}}else if(Ne.current&&ue().resetSegments(Oe),Ne.current=!1,I===-1){var ut=ue().getDuration(!0);at(ut)}else ue().play()}else k===!1&&ue().pause()},[k,Fe,Me,I,ue]),i.useEffect(function(){Me&&(Number.isNaN(S)||ue().setSpeed(S))},[S,Me,ue]),i.useEffect(function(){Me&&ue().setDirection(I)},[I,ue,Me]),i.useEffect(function(){if(Me&&D!=null){var at=!0;k?ue().goToAndPlay(D,at):ue().goToAndStop(D,at)}},[ue,D,k,Me]),i.useEffect(function(){ue().setSubframe&&ue().setSubframe(G)},[ue,G]),n.createElement("div",d({},xe,{ref:ke}))}));return y},m=u(t);return WB=m,WB}var wKe=yKe();const ga=Fi(wKe);var GB,Eee;function bKe(){if(Eee)return GB;Eee=1;function e(){this.__data__=[],this.size=0}return GB=e,GB}var YB,Lee;function xL(){if(Lee)return YB;Lee=1;function e(t,i){return t===i||t!==t&&i!==i}return YB=e,YB}var KB,Iee;function yL(){if(Iee)return KB;Iee=1;var e=xL();function t(i,n){for(var a=i.length;a--;)if(e(i[a][0],n))return a;return-1}return KB=t,KB}var qB,jee;function vKe(){if(jee)return qB;jee=1;var e=yL(),t=Array.prototype,i=t.splice;function n(a){var l=this.__data__,d=e(l,a);if(d<0)return!1;var c=l.length-1;return d==c?l.pop():i.call(l,d,1),--this.size,!0}return qB=n,qB}var ZB,Mee;function CKe(){if(Mee)return ZB;Mee=1;var e=yL();function t(i){var n=this.__data__,a=e(n,i);return a<0?void 0:n[a][1]}return ZB=t,ZB}var JB,Bee;function AKe(){if(Bee)return JB;Bee=1;var e=yL();function t(i){return e(this.__data__,i)>-1}return JB=t,JB}var XB,Dee;function $Ke(){if(Dee)return XB;Dee=1;var e=yL();function t(i,n){var a=this.__data__,l=e(a,i);return l<0?(++this.size,a.push([i,n])):a[l][1]=n,this}return XB=t,XB}var eD,Tee;function wL(){if(Tee)return eD;Tee=1;var e=bKe(),t=vKe(),i=CKe(),n=AKe(),a=$Ke();function l(d){var c=-1,p=d==null?0:d.length;for(this.clear();++c<p;){var h=d[c];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=i,l.prototype.has=n,l.prototype.set=a,eD=l,eD}var tD,Pee;function kKe(){if(Pee)return tD;Pee=1;var e=wL();function t(){this.__data__=new e,this.size=0}return tD=t,tD}var oD,zee;function SKe(){if(zee)return oD;zee=1;function e(t){var i=this.__data__,n=i.delete(t);return this.size=i.size,n}return oD=e,oD}var iD,Ree;function EKe(){if(Ree)return iD;Ree=1;function e(t){return this.__data__.get(t)}return iD=e,iD}var rD,Fee;function LKe(){if(Fee)return rD;Fee=1;function e(t){return this.__data__.has(t)}return rD=e,rD}var nD,Oee;function dve(){if(Oee)return nD;Oee=1;var e=typeof Kl=="object"&&Kl&&Kl.Object===Object&&Kl;return nD=e,nD}var aD,Nee;function q1(){if(Nee)return aD;Nee=1;var e=dve(),t=typeof self=="object"&&self&&self.Object===Object&&self,i=e||t||Function("return this")();return aD=i,aD}var sD,Hee;function n8(){if(Hee)return sD;Hee=1;var e=q1(),t=e.Symbol;return sD=t,sD}var lD,_ee;function IKe(){if(_ee)return lD;_ee=1;var e=n8(),t=Object.prototype,i=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function l(d){var c=i.call(d,a),p=d[a];try{d[a]=void 0;var h=!0}catch{}var u=n.call(d);return h&&(c?d[a]=p:delete d[a]),u}return lD=l,lD}var dD,Vee;function jKe(){if(Vee)return dD;Vee=1;var e=Object.prototype,t=e.toString;function i(n){return t.call(n)}return dD=i,dD}var cD,Qee;function a8(){if(Qee)return cD;Qee=1;var e=n8(),t=IKe(),i=jKe(),n="[object Null]",a="[object Undefined]",l=e?e.toStringTag:void 0;function d(c){return c==null?c===void 0?a:n:l&&l in Object(c)?t(c):i(c)}return cD=d,cD}var pD,Uee;function Z1(){if(Uee)return pD;Uee=1;function e(t){var i=typeof t;return t!=null&&(i=="object"||i=="function")}return pD=e,pD}var hD,Wee;function cve(){if(Wee)return hD;Wee=1;var e=a8(),t=Z1(),i="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",l="[object Proxy]";function d(c){if(!t(c))return!1;var p=e(c);return p==n||p==a||p==i||p==l}return hD=d,hD}var uD,Gee;function MKe(){if(Gee)return uD;Gee=1;var e=q1(),t=e["__core-js_shared__"];return uD=t,uD}var mD,Yee;function BKe(){if(Yee)return mD;Yee=1;var e=MKe(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function i(n){return!!t&&t in n}return mD=i,mD}var gD,Kee;function pve(){if(Kee)return gD;Kee=1;var e=Function.prototype,t=e.toString;function i(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return gD=i,gD}var fD,qee;function DKe(){if(qee)return fD;qee=1;var e=cve(),t=BKe(),i=Z1(),n=pve(),a=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,d=Function.prototype,c=Object.prototype,p=d.toString,h=c.hasOwnProperty,u=RegExp("^"+p.call(h).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(f){if(!i(f)||t(f))return!1;var x=e(f)?u:l;return x.test(n(f))}return fD=m,fD}var xD,Zee;function TKe(){if(Zee)return xD;Zee=1;function e(t,i){return t?.[i]}return xD=e,xD}var yD,Jee;function qf(){if(Jee)return yD;Jee=1;var e=DKe(),t=TKe();function i(n,a){var l=t(n,a);return e(l)?l:void 0}return yD=i,yD}var wD,Xee;function EY(){if(Xee)return wD;Xee=1;var e=qf(),t=q1(),i=e(t,"Map");return wD=i,wD}var bD,ete;function bL(){if(ete)return bD;ete=1;var e=qf(),t=e(Object,"create");return bD=t,bD}var vD,tte;function PKe(){if(tte)return vD;tte=1;var e=bL();function t(){this.__data__=e?e(null):{},this.size=0}return vD=t,vD}var CD,ote;function zKe(){if(ote)return CD;ote=1;function e(t){var i=this.has(t)&&delete this.__data__[t];return this.size-=i?1:0,i}return CD=e,CD}var AD,ite;function RKe(){if(ite)return AD;ite=1;var e=bL(),t="__lodash_hash_undefined__",i=Object.prototype,n=i.hasOwnProperty;function a(l){var d=this.__data__;if(e){var c=d[l];return c===t?void 0:c}return n.call(d,l)?d[l]:void 0}return AD=a,AD}var $D,rte;function FKe(){if(rte)return $D;rte=1;var e=bL(),t=Object.prototype,i=t.hasOwnProperty;function n(a){var l=this.__data__;return e?l[a]!==void 0:i.call(l,a)}return $D=n,$D}var kD,nte;function OKe(){if(nte)return kD;nte=1;var e=bL(),t="__lodash_hash_undefined__";function i(n,a){var l=this.__data__;return this.size+=this.has(n)?0:1,l[n]=e&&a===void 0?t:a,this}return kD=i,kD}var SD,ate;function NKe(){if(ate)return SD;ate=1;var e=PKe(),t=zKe(),i=RKe(),n=FKe(),a=OKe();function l(d){var c=-1,p=d==null?0:d.length;for(this.clear();++c<p;){var h=d[c];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=i,l.prototype.has=n,l.prototype.set=a,SD=l,SD}var ED,ste;function HKe(){if(ste)return ED;ste=1;var e=NKe(),t=wL(),i=EY();function n(){this.size=0,this.__data__={hash:new e,map:new(i||t),string:new e}}return ED=n,ED}var LD,lte;function _Ke(){if(lte)return LD;lte=1;function e(t){var i=typeof t;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?t!=="__proto__":t===null}return LD=e,LD}var ID,dte;function vL(){if(dte)return ID;dte=1;var e=_Ke();function t(i,n){var a=i.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return ID=t,ID}var jD,cte;function VKe(){if(cte)return jD;cte=1;var e=vL();function t(i){var n=e(this,i).delete(i);return this.size-=n?1:0,n}return jD=t,jD}var MD,pte;function QKe(){if(pte)return MD;pte=1;var e=vL();function t(i){return e(this,i).get(i)}return MD=t,MD}var BD,hte;function UKe(){if(hte)return BD;hte=1;var e=vL();function t(i){return e(this,i).has(i)}return BD=t,BD}var DD,ute;function WKe(){if(ute)return DD;ute=1;var e=vL();function t(i,n){var a=e(this,i),l=a.size;return a.set(i,n),this.size+=a.size==l?0:1,this}return DD=t,DD}var TD,mte;function LY(){if(mte)return TD;mte=1;var e=HKe(),t=VKe(),i=QKe(),n=UKe(),a=WKe();function l(d){var c=-1,p=d==null?0:d.length;for(this.clear();++c<p;){var h=d[c];this.set(h[0],h[1])}}return l.prototype.clear=e,l.prototype.delete=t,l.prototype.get=i,l.prototype.has=n,l.prototype.set=a,TD=l,TD}var PD,gte;function GKe(){if(gte)return PD;gte=1;var e=wL(),t=EY(),i=LY(),n=200;function a(l,d){var c=this.__data__;if(c instanceof e){var p=c.__data__;if(!t||p.length<n-1)return p.push([l,d]),this.size=++c.size,this;c=this.__data__=new i(p)}return c.set(l,d),this.size=c.size,this}return PD=a,PD}var zD,fte;function IY(){if(fte)return zD;fte=1;var e=wL(),t=kKe(),i=SKe(),n=EKe(),a=LKe(),l=GKe();function d(c){var p=this.__data__=new e(c);this.size=p.size}return d.prototype.clear=t,d.prototype.delete=i,d.prototype.get=n,d.prototype.has=a,d.prototype.set=l,zD=d,zD}var RD,xte;function YKe(){if(xte)return RD;xte=1;var e="__lodash_hash_undefined__";function t(i){return this.__data__.set(i,e),this}return RD=t,RD}var FD,yte;function KKe(){if(yte)return FD;yte=1;function e(t){return this.__data__.has(t)}return FD=e,FD}var OD,wte;function hve(){if(wte)return OD;wte=1;var e=LY(),t=YKe(),i=KKe();function n(a){var l=-1,d=a==null?0:a.length;for(this.__data__=new e;++l<d;)this.add(a[l])}return n.prototype.add=n.prototype.push=t,n.prototype.has=i,OD=n,OD}var ND,bte;function qKe(){if(bte)return ND;bte=1;function e(t,i){for(var n=-1,a=t==null?0:t.length;++n<a;)if(i(t[n],n,t))return!0;return!1}return ND=e,ND}var HD,vte;function uve(){if(vte)return HD;vte=1;function e(t,i){return t.has(i)}return HD=e,HD}var _D,Cte;function mve(){if(Cte)return _D;Cte=1;var e=hve(),t=qKe(),i=uve(),n=1,a=2;function l(d,c,p,h,u,m){var f=p&n,x=d.length,y=c.length;if(x!=y&&!(f&&y>x))return!1;var w=m.get(d),b=m.get(c);if(w&&b)return w==c&&b==d;var C=-1,k=!0,L=p&a?new e:void 0;for(m.set(d,c),m.set(c,d);++C<x;){var S=d[C],j=c[C];if(h)var I=f?h(j,S,C,c,d,m):h(S,j,C,d,c,m);if(I!==void 0){if(I)continue;k=!1;break}if(L){if(!t(c,function(P,B){if(!i(L,B)&&(S===P||u(S,P,p,h,m)))return L.push(B)})){k=!1;break}}else if(!(S===j||u(S,j,p,h,m))){k=!1;break}}return m.delete(d),m.delete(c),k}return _D=l,_D}var VD,Ate;function gve(){if(Ate)return VD;Ate=1;var e=q1(),t=e.Uint8Array;return VD=t,VD}var QD,$te;function ZKe(){if($te)return QD;$te=1;function e(t){var i=-1,n=Array(t.size);return t.forEach(function(a,l){n[++i]=[l,a]}),n}return QD=e,QD}var UD,kte;function jY(){if(kte)return UD;kte=1;function e(t){var i=-1,n=Array(t.size);return t.forEach(function(a){n[++i]=a}),n}return UD=e,UD}var WD,Ste;function JKe(){if(Ste)return WD;Ste=1;var e=n8(),t=gve(),i=xL(),n=mve(),a=ZKe(),l=jY(),d=1,c=2,p="[object Boolean]",h="[object Date]",u="[object Error]",m="[object Map]",f="[object Number]",x="[object RegExp]",y="[object Set]",w="[object String]",b="[object Symbol]",C="[object ArrayBuffer]",k="[object DataView]",L=e?e.prototype:void 0,S=L?L.valueOf:void 0;function j(I,P,B,T,D,R,G){switch(B){case k:if(I.byteLength!=P.byteLength||I.byteOffset!=P.byteOffset)return!1;I=I.buffer,P=P.buffer;case C:return!(I.byteLength!=P.byteLength||!R(new t(I),new t(P)));case p:case h:case f:return i(+I,+P);case u:return I.name==P.name&&I.message==P.message;case x:case w:return I==P+"";case m:var q=a;case y:var Z=T&d;if(q||(q=l),I.size!=P.size&&!Z)return!1;var H=G.get(I);if(H)return H==P;T|=c,G.set(I,P);var V=n(q(I),q(P),T,D,R,G);return G.delete(I),V;case b:if(S)return S.call(I)==S.call(P)}return!1}return WD=j,WD}var GD,Ete;function MY(){if(Ete)return GD;Ete=1;function e(t,i){for(var n=-1,a=i.length,l=t.length;++n<a;)t[l+n]=i[n];return t}return GD=e,GD}var YD,Lte;function Ls(){if(Lte)return YD;Lte=1;var e=Array.isArray;return YD=e,YD}var KD,Ite;function fve(){if(Ite)return KD;Ite=1;var e=MY(),t=Ls();function i(n,a,l){var d=a(n);return t(n)?d:e(d,l(n))}return KD=i,KD}var qD,jte;function BY(){if(jte)return qD;jte=1;function e(t,i){for(var n=-1,a=t==null?0:t.length,l=0,d=[];++n<a;){var c=t[n];i(c,n,t)&&(d[l++]=c)}return d}return qD=e,qD}var ZD,Mte;function xve(){if(Mte)return ZD;Mte=1;function e(){return[]}return ZD=e,ZD}var JD,Bte;function DY(){if(Bte)return JD;Bte=1;var e=BY(),t=xve(),i=Object.prototype,n=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,l=a?function(d){return d==null?[]:(d=Object(d),e(a(d),function(c){return n.call(d,c)}))}:t;return JD=l,JD}var XD,Dte;function yve(){if(Dte)return XD;Dte=1;function e(t,i){for(var n=-1,a=Array(t);++n<t;)a[n]=i(n);return a}return XD=e,XD}var eT,Tte;function z2(){if(Tte)return eT;Tte=1;function e(t){return t!=null&&typeof t=="object"}return eT=e,eT}var tT,Pte;function XKe(){if(Pte)return tT;Pte=1;var e=a8(),t=z2(),i="[object Arguments]";function n(a){return t(a)&&e(a)==i}return tT=n,tT}var oT,zte;function TY(){if(zte)return oT;zte=1;var e=XKe(),t=z2(),i=Object.prototype,n=i.hasOwnProperty,a=i.propertyIsEnumerable,l=e((function(){return arguments})())?e:function(d){return t(d)&&n.call(d,"callee")&&!a.call(d,"callee")};return oT=l,oT}var J$={exports:{}},iT,Rte;function eqe(){if(Rte)return iT;Rte=1;function e(){return!1}return iT=e,iT}J$.exports;var Fte;function PY(){return Fte||(Fte=1,(function(e,t){var i=q1(),n=eqe(),a=t&&!t.nodeType&&t,l=a&&!0&&e&&!e.nodeType&&e,d=l&&l.exports===a,c=d?i.Buffer:void 0,p=c?c.isBuffer:void 0,h=p||n;e.exports=h})(J$,J$.exports)),J$.exports}var rT,Ote;function ib(){if(Ote)return rT;Ote=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function i(n,a){var l=typeof n;return a=a??e,!!a&&(l=="number"||l!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return rT=i,rT}var nT,Nte;function zY(){if(Nte)return nT;Nte=1;var e=9007199254740991;function t(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=e}return nT=t,nT}var aT,Hte;function tqe(){if(Hte)return aT;Hte=1;var e=a8(),t=zY(),i=z2(),n="[object Arguments]",a="[object Array]",l="[object Boolean]",d="[object Date]",c="[object Error]",p="[object Function]",h="[object Map]",u="[object Number]",m="[object Object]",f="[object RegExp]",x="[object Set]",y="[object String]",w="[object WeakMap]",b="[object ArrayBuffer]",C="[object DataView]",k="[object Float32Array]",L="[object Float64Array]",S="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",P="[object Uint8Array]",B="[object Uint8ClampedArray]",T="[object Uint16Array]",D="[object Uint32Array]",R={};R[k]=R[L]=R[S]=R[j]=R[I]=R[P]=R[B]=R[T]=R[D]=!0,R[n]=R[a]=R[b]=R[l]=R[C]=R[d]=R[c]=R[p]=R[h]=R[u]=R[m]=R[f]=R[x]=R[y]=R[w]=!1;function G(q){return i(q)&&t(q.length)&&!!R[e(q)]}return aT=G,aT}var sT,_te;function CL(){if(_te)return sT;_te=1;function e(t){return function(i){return t(i)}}return sT=e,sT}var X$={exports:{}};X$.exports;var Vte;function RY(){return Vte||(Vte=1,(function(e,t){var i=dve(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,l=a&&a.exports===n,d=l&&i.process,c=(function(){try{var p=a&&a.require&&a.require("util").types;return p||d&&d.binding&&d.binding("util")}catch{}})();e.exports=c})(X$,X$.exports)),X$.exports}var lT,Qte;function wve(){if(Qte)return lT;Qte=1;var e=tqe(),t=CL(),i=RY(),n=i&&i.isTypedArray,a=n?t(n):e;return lT=a,lT}var dT,Ute;function bve(){if(Ute)return dT;Ute=1;var e=yve(),t=TY(),i=Ls(),n=PY(),a=ib(),l=wve(),d=Object.prototype,c=d.hasOwnProperty;function p(h,u){var m=i(h),f=!m&&t(h),x=!m&&!f&&n(h),y=!m&&!f&&!x&&l(h),w=m||f||x||y,b=w?e(h.length,String):[],C=b.length;for(var k in h)(u||c.call(h,k))&&!(w&&(k=="length"||x&&(k=="offset"||k=="parent")||y&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||a(k,C)))&&b.push(k);return b}return dT=p,dT}var cT,Wte;function FY(){if(Wte)return cT;Wte=1;var e=Object.prototype;function t(i){var n=i&&i.constructor,a=typeof n=="function"&&n.prototype||e;return i===a}return cT=t,cT}var pT,Gte;function vve(){if(Gte)return pT;Gte=1;function e(t,i){return function(n){return t(i(n))}}return pT=e,pT}var hT,Yte;function oqe(){if(Yte)return hT;Yte=1;var e=vve(),t=e(Object.keys,Object);return hT=t,hT}var uT,Kte;function iqe(){if(Kte)return uT;Kte=1;var e=FY(),t=oqe(),i=Object.prototype,n=i.hasOwnProperty;function a(l){if(!e(l))return t(l);var d=[];for(var c in Object(l))n.call(l,c)&&c!="constructor"&&d.push(c);return d}return uT=a,uT}var mT,qte;function s8(){if(qte)return mT;qte=1;var e=cve(),t=zY();function i(n){return n!=null&&t(n.length)&&!e(n)}return mT=i,mT}var gT,Zte;function rb(){if(Zte)return gT;Zte=1;var e=bve(),t=iqe(),i=s8();function n(a){return i(a)?e(a):t(a)}return gT=n,gT}var fT,Jte;function Cve(){if(Jte)return fT;Jte=1;var e=fve(),t=DY(),i=rb();function n(a){return e(a,i,t)}return fT=n,fT}var xT,Xte;function rqe(){if(Xte)return xT;Xte=1;var e=Cve(),t=1,i=Object.prototype,n=i.hasOwnProperty;function a(l,d,c,p,h,u){var m=c&t,f=e(l),x=f.length,y=e(d),w=y.length;if(x!=w&&!m)return!1;for(var b=x;b--;){var C=f[b];if(!(m?C in d:n.call(d,C)))return!1}var k=u.get(l),L=u.get(d);if(k&&L)return k==d&&L==l;var S=!0;u.set(l,d),u.set(d,l);for(var j=m;++b<x;){C=f[b];var I=l[C],P=d[C];if(p)var B=m?p(P,I,C,d,l,u):p(I,P,C,l,d,u);if(!(B===void 0?I===P||h(I,P,c,p,u):B)){S=!1;break}j||(j=C=="constructor")}if(S&&!j){var T=l.constructor,D=d.constructor;T!=D&&"constructor"in l&&"constructor"in d&&!(typeof T=="function"&&T instanceof T&&typeof D=="function"&&D instanceof D)&&(S=!1)}return u.delete(l),u.delete(d),S}return xT=a,xT}var yT,eoe;function nqe(){if(eoe)return yT;eoe=1;var e=qf(),t=q1(),i=e(t,"DataView");return yT=i,yT}var wT,toe;function aqe(){if(toe)return wT;toe=1;var e=qf(),t=q1(),i=e(t,"Promise");return wT=i,wT}var bT,ooe;function Ave(){if(ooe)return bT;ooe=1;var e=qf(),t=q1(),i=e(t,"Set");return bT=i,bT}var vT,ioe;function sqe(){if(ioe)return vT;ioe=1;var e=qf(),t=q1(),i=e(t,"WeakMap");return vT=i,vT}var CT,roe;function AL(){if(roe)return CT;roe=1;var e=nqe(),t=EY(),i=aqe(),n=Ave(),a=sqe(),l=a8(),d=pve(),c="[object Map]",p="[object Object]",h="[object Promise]",u="[object Set]",m="[object WeakMap]",f="[object DataView]",x=d(e),y=d(t),w=d(i),b=d(n),C=d(a),k=l;return(e&&k(new e(new ArrayBuffer(1)))!=f||t&&k(new t)!=c||i&&k(i.resolve())!=h||n&&k(new n)!=u||a&&k(new a)!=m)&&(k=function(L){var S=l(L),j=S==p?L.constructor:void 0,I=j?d(j):"";if(I)switch(I){case x:return f;case y:return c;case w:return h;case b:return u;case C:return m}return S}),CT=k,CT}var AT,noe;function lqe(){if(noe)return AT;noe=1;var e=IY(),t=mve(),i=JKe(),n=rqe(),a=AL(),l=Ls(),d=PY(),c=wve(),p=1,h="[object Arguments]",u="[object Array]",m="[object Object]",f=Object.prototype,x=f.hasOwnProperty;function y(w,b,C,k,L,S){var j=l(w),I=l(b),P=j?u:a(w),B=I?u:a(b);P=P==h?m:P,B=B==h?m:B;var T=P==m,D=B==m,R=P==B;if(R&&d(w)){if(!d(b))return!1;j=!0,T=!1}if(R&&!T)return S||(S=new e),j||c(w)?t(w,b,C,k,L,S):i(w,b,P,C,k,L,S);if(!(C&p)){var G=T&&x.call(w,"__wrapped__"),q=D&&x.call(b,"__wrapped__");if(G||q){var Z=G?w.value():w,H=q?b.value():b;return S||(S=new e),L(Z,H,C,k,S)}}return R?(S||(S=new e),n(w,b,C,k,L,S)):!1}return AT=y,AT}var $T,aoe;function OY(){if(aoe)return $T;aoe=1;var e=lqe(),t=z2();function i(n,a,l,d,c){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,l,d,i,c)}return $T=i,$T}var kT,soe;function dqe(){if(soe)return kT;soe=1;var e=OY();function t(i,n){return e(i,n)}return kT=t,kT}var cqe=dqe();const Co=Fi(cqe);var ST,loe;function pqe(){if(loe)return ST;loe=1;var e=q1(),t=function(){return e.Date.now()};return ST=t,ST}var ET,doe;function hqe(){if(doe)return ET;doe=1;var e=/\s/;function t(i){for(var n=i.length;n--&&e.test(i.charAt(n)););return n}return ET=t,ET}var LT,coe;function uqe(){if(coe)return LT;coe=1;var e=hqe(),t=/^\s+/;function i(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return LT=i,LT}var IT,poe;function nb(){if(poe)return IT;poe=1;var e=a8(),t=z2(),i="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==i}return IT=n,IT}var jT,hoe;function $ve(){if(hoe)return jT;hoe=1;var e=uqe(),t=Z1(),i=nb(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;function p(h){if(typeof h=="number")return h;if(i(h))return n;if(t(h)){var u=typeof h.valueOf=="function"?h.valueOf():h;h=t(u)?u+"":u}if(typeof h!="string")return h===0?h:+h;h=e(h);var m=l.test(h);return m||d.test(h)?c(h.slice(2),m?2:8):a.test(h)?n:+h}return jT=p,jT}var MT,uoe;function kve(){if(uoe)return MT;uoe=1;var e=Z1(),t=pqe(),i=$ve(),n="Expected a function",a=Math.max,l=Math.min;function d(c,p,h){var u,m,f,x,y,w,b=0,C=!1,k=!1,L=!0;if(typeof c!="function")throw new TypeError(n);p=i(p)||0,e(h)&&(C=!!h.leading,k="maxWait"in h,f=k?a(i(h.maxWait)||0,p):f,L="trailing"in h?!!h.trailing:L);function S(q){var Z=u,H=m;return u=m=void 0,b=q,x=c.apply(H,Z),x}function j(q){return b=q,y=setTimeout(B,p),C?S(q):x}function I(q){var Z=q-w,H=q-b,V=p-Z;return k?l(V,f-H):V}function P(q){var Z=q-w,H=q-b;return w===void 0||Z>=p||Z<0||k&&H>=f}function B(){var q=t();if(P(q))return T(q);y=setTimeout(B,I(q))}function T(q){return y=void 0,L&&u?S(q):(u=m=void 0,x)}function D(){y!==void 0&&clearTimeout(y),b=0,u=w=m=y=void 0}function R(){return y===void 0?x:T(t())}function G(){var q=t(),Z=P(q);if(u=arguments,m=this,w=q,Z){if(y===void 0)return j(w);if(k)return clearTimeout(y),y=setTimeout(B,p),S(w)}return y===void 0&&(y=setTimeout(B,p)),x}return G.cancel=D,G.flush=R,G}return MT=d,MT}var mqe=kve();const Zf=Fi(mqe);var BT,moe;function Sve(){if(moe)return BT;moe=1;function e(){}return BT=e,BT}var gqe=Sve();const $L=Fi(gqe);var DT,goe;function Eve(){if(goe)return DT;goe=1;function e(t,i){for(var n=-1,a=t==null?0:t.length;++n<a&&i(t[n],n,t)!==!1;);return t}return DT=e,DT}var TT,foe;function Lve(){if(foe)return TT;foe=1;var e=qf(),t=(function(){try{var i=e(Object,"defineProperty");return i({},"",{}),i}catch{}})();return TT=t,TT}var PT,xoe;function NY(){if(xoe)return PT;xoe=1;var e=Lve();function t(i,n,a){n=="__proto__"&&e?e(i,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):i[n]=a}return PT=t,PT}var zT,yoe;function HY(){if(yoe)return zT;yoe=1;var e=NY(),t=xL(),i=Object.prototype,n=i.hasOwnProperty;function a(l,d,c){var p=l[d];(!(n.call(l,d)&&t(p,c))||c===void 0&&!(d in l))&&e(l,d,c)}return zT=a,zT}var RT,woe;function ab(){if(woe)return RT;woe=1;var e=HY(),t=NY();function i(n,a,l,d){var c=!l;l||(l={});for(var p=-1,h=a.length;++p<h;){var u=a[p],m=d?d(l[u],n[u],u,l,n):void 0;m===void 0&&(m=n[u]),c?t(l,u,m):e(l,u,m)}return l}return RT=i,RT}var FT,boe;function fqe(){if(boe)return FT;boe=1;var e=ab(),t=rb();function i(n,a){return n&&e(a,t(a),n)}return FT=i,FT}var OT,voe;function xqe(){if(voe)return OT;voe=1;function e(t){var i=[];if(t!=null)for(var n in Object(t))i.push(n);return i}return OT=e,OT}var NT,Coe;function yqe(){if(Coe)return NT;Coe=1;var e=Z1(),t=FY(),i=xqe(),n=Object.prototype,a=n.hasOwnProperty;function l(d){if(!e(d))return i(d);var c=t(d),p=[];for(var h in d)h=="constructor"&&(c||!a.call(d,h))||p.push(h);return p}return NT=l,NT}var HT,Aoe;function _Y(){if(Aoe)return HT;Aoe=1;var e=bve(),t=yqe(),i=s8();function n(a){return i(a)?e(a,!0):t(a)}return HT=n,HT}var _T,$oe;function wqe(){if($oe)return _T;$oe=1;var e=ab(),t=_Y();function i(n,a){return n&&e(a,t(a),n)}return _T=i,_T}var ek={exports:{}};ek.exports;var koe;function bqe(){return koe||(koe=1,(function(e,t){var i=q1(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,l=a&&a.exports===n,d=l?i.Buffer:void 0,c=d?d.allocUnsafe:void 0;function p(h,u){if(u)return h.slice();var m=h.length,f=c?c(m):new h.constructor(m);return h.copy(f),f}e.exports=p})(ek,ek.exports)),ek.exports}var VT,Soe;function vqe(){if(Soe)return VT;Soe=1;function e(t,i){var n=-1,a=t.length;for(i||(i=Array(a));++n<a;)i[n]=t[n];return i}return VT=e,VT}var QT,Eoe;function Cqe(){if(Eoe)return QT;Eoe=1;var e=ab(),t=DY();function i(n,a){return e(n,t(n),a)}return QT=i,QT}var UT,Loe;function VY(){if(Loe)return UT;Loe=1;var e=vve(),t=e(Object.getPrototypeOf,Object);return UT=t,UT}var WT,Ioe;function Ive(){if(Ioe)return WT;Ioe=1;var e=MY(),t=VY(),i=DY(),n=xve(),a=Object.getOwnPropertySymbols,l=a?function(d){for(var c=[];d;)e(c,i(d)),d=t(d);return c}:n;return WT=l,WT}var GT,joe;function Aqe(){if(joe)return GT;joe=1;var e=ab(),t=Ive();function i(n,a){return e(n,t(n),a)}return GT=i,GT}var YT,Moe;function QY(){if(Moe)return YT;Moe=1;var e=fve(),t=Ive(),i=_Y();function n(a){return e(a,i,t)}return YT=n,YT}var KT,Boe;function $qe(){if(Boe)return KT;Boe=1;var e=Object.prototype,t=e.hasOwnProperty;function i(n){var a=n.length,l=new n.constructor(a);return a&&typeof n[0]=="string"&&t.call(n,"index")&&(l.index=n.index,l.input=n.input),l}return KT=i,KT}var qT,Doe;function UY(){if(Doe)return qT;Doe=1;var e=gve();function t(i){var n=new i.constructor(i.byteLength);return new e(n).set(new e(i)),n}return qT=t,qT}var ZT,Toe;function kqe(){if(Toe)return ZT;Toe=1;var e=UY();function t(i,n){var a=n?e(i.buffer):i.buffer;return new i.constructor(a,i.byteOffset,i.byteLength)}return ZT=t,ZT}var JT,Poe;function Sqe(){if(Poe)return JT;Poe=1;var e=/\w*$/;function t(i){var n=new i.constructor(i.source,e.exec(i));return n.lastIndex=i.lastIndex,n}return JT=t,JT}var XT,zoe;function Eqe(){if(zoe)return XT;zoe=1;var e=n8(),t=e?e.prototype:void 0,i=t?t.valueOf:void 0;function n(a){return i?Object(i.call(a)):{}}return XT=n,XT}var eP,Roe;function Lqe(){if(Roe)return eP;Roe=1;var e=UY();function t(i,n){var a=n?e(i.buffer):i.buffer;return new i.constructor(a,i.byteOffset,i.length)}return eP=t,eP}var tP,Foe;function Iqe(){if(Foe)return tP;Foe=1;var e=UY(),t=kqe(),i=Sqe(),n=Eqe(),a=Lqe(),l="[object Boolean]",d="[object Date]",c="[object Map]",p="[object Number]",h="[object RegExp]",u="[object Set]",m="[object String]",f="[object Symbol]",x="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",b="[object Float64Array]",C="[object Int8Array]",k="[object Int16Array]",L="[object Int32Array]",S="[object Uint8Array]",j="[object Uint8ClampedArray]",I="[object Uint16Array]",P="[object Uint32Array]";function B(T,D,R){var G=T.constructor;switch(D){case x:return e(T);case l:case d:return new G(+T);case y:return t(T,R);case w:case b:case C:case k:case L:case S:case j:case I:case P:return a(T,R);case c:return new G;case p:case m:return new G(T);case h:return i(T);case u:return new G;case f:return n(T)}}return tP=B,tP}var oP,Ooe;function jqe(){if(Ooe)return oP;Ooe=1;var e=Z1(),t=Object.create,i=(function(){function n(){}return function(a){if(!e(a))return{};if(t)return t(a);n.prototype=a;var l=new n;return n.prototype=void 0,l}})();return oP=i,oP}var iP,Noe;function Mqe(){if(Noe)return iP;Noe=1;var e=jqe(),t=VY(),i=FY();function n(a){return typeof a.constructor=="function"&&!i(a)?e(t(a)):{}}return iP=n,iP}var rP,Hoe;function Bqe(){if(Hoe)return rP;Hoe=1;var e=AL(),t=z2(),i="[object Map]";function n(a){return t(a)&&e(a)==i}return rP=n,rP}var nP,_oe;function Dqe(){if(_oe)return nP;_oe=1;var e=Bqe(),t=CL(),i=RY(),n=i&&i.isMap,a=n?t(n):e;return nP=a,nP}var aP,Voe;function Tqe(){if(Voe)return aP;Voe=1;var e=AL(),t=z2(),i="[object Set]";function n(a){return t(a)&&e(a)==i}return aP=n,aP}var sP,Qoe;function Pqe(){if(Qoe)return sP;Qoe=1;var e=Tqe(),t=CL(),i=RY(),n=i&&i.isSet,a=n?t(n):e;return sP=a,sP}var lP,Uoe;function jve(){if(Uoe)return lP;Uoe=1;var e=IY(),t=Eve(),i=HY(),n=fqe(),a=wqe(),l=bqe(),d=vqe(),c=Cqe(),p=Aqe(),h=Cve(),u=QY(),m=AL(),f=$qe(),x=Iqe(),y=Mqe(),w=Ls(),b=PY(),C=Dqe(),k=Z1(),L=Pqe(),S=rb(),j=_Y(),I=1,P=2,B=4,T="[object Arguments]",D="[object Array]",R="[object Boolean]",G="[object Date]",q="[object Error]",Z="[object Function]",H="[object GeneratorFunction]",V="[object Map]",N="[object Number]",O="[object Object]",z="[object RegExp]",F="[object Set]",te="[object String]",Y="[object Symbol]",W="[object WeakMap]",ee="[object ArrayBuffer]",J="[object DataView]",ne="[object Float32Array]",ye="[object Float64Array]",me="[object Int8Array]",he="[object Int16Array]",pe="[object Int32Array]",xe="[object Uint8Array]",ve="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",fe={};fe[T]=fe[D]=fe[ee]=fe[J]=fe[R]=fe[G]=fe[ne]=fe[ye]=fe[me]=fe[he]=fe[pe]=fe[V]=fe[N]=fe[O]=fe[z]=fe[F]=fe[te]=fe[Y]=fe[xe]=fe[ve]=fe[le]=fe[ae]=!0,fe[q]=fe[Z]=fe[W]=!1;function ke(ie,ue,je,Me,Ce,Te){var Fe,tt=ue&I,Je=ue&P,ze=ue&B;if(je&&(Fe=Ce?je(ie,Me,Ce,Te):je(ie)),Fe!==void 0)return Fe;if(!k(ie))return ie;var qe=w(ie);if(qe){if(Fe=f(ie),!tt)return d(ie,Fe)}else{var $e=m(ie),Ne=$e==Z||$e==H;if(b(ie))return l(ie,tt);if($e==O||$e==T||Ne&&!Ce){if(Fe=Je||Ne?{}:y(ie),!tt)return Je?p(ie,a(Fe,ie)):c(ie,n(Fe,ie))}else{if(!fe[$e])return Ce?ie:{};Fe=x(ie,$e,tt)}}Te||(Te=new e);var at=Te.get(ie);if(at)return at;Te.set(ie,Fe),L(ie)?ie.forEach(function(ut){Fe.add(ke(ut,ue,je,ut,ie,Te))}):C(ie)&&ie.forEach(function(ut,Ge){Fe.set(Ge,ke(ut,ue,je,Ge,ie,Te))});var Oe=ze?Je?u:h:Je?j:S,rt=qe?void 0:Oe(ie);return t(rt||ie,function(ut,Ge){rt&&(Ge=ut,ut=ie[Ge]),i(Fe,Ge,ke(ut,ue,je,Ge,ie,Te))}),Fe}return lP=ke,lP}var dP,Woe;function zqe(){if(Woe)return dP;Woe=1;var e=jve(),t=1,i=4;function n(a){return e(a,t|i)}return dP=n,dP}var Rqe=zqe();const Vn=Fi(Rqe);var cP,Goe;function Fqe(){if(Goe)return cP;Goe=1;var e=Object.prototype,t=e.hasOwnProperty;function i(n,a){return n!=null&&t.call(n,a)}return cP=i,cP}var pP,Yoe;function WY(){if(Yoe)return pP;Yoe=1;var e=Ls(),t=nb(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(l,d){if(e(l))return!1;var c=typeof l;return c=="number"||c=="symbol"||c=="boolean"||l==null||t(l)?!0:n.test(l)||!i.test(l)||d!=null&&l in Object(d)}return pP=a,pP}var hP,Koe;function Oqe(){if(Koe)return hP;Koe=1;var e=LY(),t="Expected a function";function i(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var l=function(){var d=arguments,c=a?a.apply(this,d):d[0],p=l.cache;if(p.has(c))return p.get(c);var h=n.apply(this,d);return l.cache=p.set(c,h)||p,h};return l.cache=new(i.Cache||e),l}return i.Cache=e,hP=i,hP}var uP,qoe;function Nqe(){if(qoe)return uP;qoe=1;var e=Oqe(),t=500;function i(n){var a=e(n,function(d){return l.size===t&&l.clear(),d}),l=a.cache;return a}return uP=i,uP}var mP,Zoe;function Hqe(){if(Zoe)return mP;Zoe=1;var e=Nqe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,n=e(function(a){var l=[];return a.charCodeAt(0)===46&&l.push(""),a.replace(t,function(d,c,p,h){l.push(p?h.replace(i,"$1"):c||d)}),l});return mP=n,mP}var gP,Joe;function Jf(){if(Joe)return gP;Joe=1;function e(t,i){for(var n=-1,a=t==null?0:t.length,l=Array(a);++n<a;)l[n]=i(t[n],n,t);return l}return gP=e,gP}var fP,Xoe;function Mve(){if(Xoe)return fP;Xoe=1;var e=n8(),t=Jf(),i=Ls(),n=nb(),a=e?e.prototype:void 0,l=a?a.toString:void 0;function d(c){if(typeof c=="string")return c;if(i(c))return t(c,d)+"";if(n(c))return l?l.call(c):"";var p=c+"";return p=="0"&&1/c==-1/0?"-0":p}return fP=d,fP}var xP,eie;function Bve(){if(eie)return xP;eie=1;var e=Mve();function t(i){return i==null?"":e(i)}return xP=t,xP}var yP,tie;function l8(){if(tie)return yP;tie=1;var e=Ls(),t=WY(),i=Hqe(),n=Bve();function a(l,d){return e(l)?l:t(l,d)?[l]:i(n(l))}return yP=a,yP}var wP,oie;function d8(){if(oie)return wP;oie=1;var e=nb();function t(i){if(typeof i=="string"||e(i))return i;var n=i+"";return n=="0"&&1/i==-1/0?"-0":n}return wP=t,wP}var bP,iie;function Dve(){if(iie)return bP;iie=1;var e=l8(),t=TY(),i=Ls(),n=ib(),a=zY(),l=d8();function d(c,p,h){p=e(p,c);for(var u=-1,m=p.length,f=!1;++u<m;){var x=l(p[u]);if(!(f=c!=null&&h(c,x)))break;c=c[x]}return f||++u!=m?f:(m=c==null?0:c.length,!!m&&a(m)&&n(x,m)&&(i(c)||t(c)))}return bP=d,bP}var vP,rie;function _qe(){if(rie)return vP;rie=1;var e=Fqe(),t=Dve();function i(n,a){return n!=null&&t(n,a,e)}return vP=i,vP}var Vqe=_qe();const Gt=Fi(Vqe);var CP,nie;function Qqe(){if(nie)return CP;nie=1;var e="Expected a function";function t(i,n,a){if(typeof i!="function")throw new TypeError(e);return setTimeout(function(){i.apply(void 0,a)},n)}return CP=t,CP}var AP,aie;function c8(){if(aie)return AP;aie=1;function e(t){return t}return AP=e,AP}var $P,sie;function Tve(){if(sie)return $P;sie=1;function e(t,i,n){switch(n.length){case 0:return t.call(i);case 1:return t.call(i,n[0]);case 2:return t.call(i,n[0],n[1]);case 3:return t.call(i,n[0],n[1],n[2])}return t.apply(i,n)}return $P=e,$P}var kP,lie;function Pve(){if(lie)return kP;lie=1;var e=Tve(),t=Math.max;function i(n,a,l){return a=t(a===void 0?n.length-1:a,0),function(){for(var d=arguments,c=-1,p=t(d.length-a,0),h=Array(p);++c<p;)h[c]=d[a+c];c=-1;for(var u=Array(a+1);++c<a;)u[c]=d[c];return u[a]=l(h),e(n,this,u)}}return kP=i,kP}var SP,die;function Uqe(){if(die)return SP;die=1;function e(t){return function(){return t}}return SP=e,SP}var EP,cie;function Wqe(){if(cie)return EP;cie=1;var e=Uqe(),t=Lve(),i=c8(),n=t?function(a,l){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(l),writable:!0})}:i;return EP=n,EP}var LP,pie;function Gqe(){if(pie)return LP;pie=1;var e=800,t=16,i=Date.now;function n(a){var l=0,d=0;return function(){var c=i(),p=t-(c-d);if(d=c,p>0){if(++l>=e)return arguments[0]}else l=0;return a.apply(void 0,arguments)}}return LP=n,LP}var IP,hie;function zve(){if(hie)return IP;hie=1;var e=Wqe(),t=Gqe(),i=t(e);return IP=i,IP}var jP,uie;function Rve(){if(uie)return jP;uie=1;var e=c8(),t=Pve(),i=zve();function n(a,l){return i(t(a,l,e),a+"")}return jP=n,jP}var MP,mie;function Yqe(){if(mie)return MP;mie=1;var e=Qqe(),t=Rve(),i=t(function(n,a){return e(n,1,a)});return MP=i,MP}var Kqe=Yqe();const $a=Fi(Kqe);var BP,gie;function sb(){if(gie)return BP;gie=1;var e=l8(),t=d8();function i(n,a){a=e(a,n);for(var l=0,d=a.length;n!=null&&l<d;)n=n[t(a[l++])];return l&&l==d?n:void 0}return BP=i,BP}var DP,fie;function Fve(){if(fie)return DP;fie=1;var e=sb();function t(i,n,a){var l=i==null?void 0:e(i,n);return l===void 0?a:l}return DP=t,DP}var qqe=Fve();const Mf=Fi(qqe);var TP,xie;function Ove(){if(xie)return TP;xie=1;var e=IY(),t=OY(),i=1,n=2;function a(l,d,c,p){var h=c.length,u=h,m=!p;if(l==null)return!u;for(l=Object(l);h--;){var f=c[h];if(m&&f[2]?f[1]!==l[f[0]]:!(f[0]in l))return!1}for(;++h<u;){f=c[h];var x=f[0],y=l[x],w=f[1];if(m&&f[2]){if(y===void 0&&!(x in l))return!1}else{var b=new e;if(p)var C=p(y,w,x,l,d,b);if(!(C===void 0?t(w,y,i|n,p,b):C))return!1}}return!0}return TP=a,TP}var PP,yie;function Nve(){if(yie)return PP;yie=1;var e=Z1();function t(i){return i===i&&!e(i)}return PP=t,PP}var zP,wie;function Hve(){if(wie)return zP;wie=1;var e=Nve(),t=rb();function i(n){for(var a=t(n),l=a.length;l--;){var d=a[l],c=n[d];a[l]=[d,c,e(c)]}return a}return zP=i,zP}var RP,bie;function Zqe(){if(bie)return RP;bie=1;var e=Ove(),t=Hve();function i(n,a,l){return l=typeof l=="function"?l:void 0,e(n,a,t(a),l)}return RP=i,RP}Zqe();var FP,vie;function Jqe(){if(vie)return FP;vie=1;function e(t,i){for(var n,a=-1,l=t.length;++a<l;){var d=i(t[a]);d!==void 0&&(n=n===void 0?d:n+d)}return n}return FP=e,FP}var OP,Cie;function Xqe(){if(Cie)return OP;Cie=1;var e=Jqe(),t=c8();function i(n){return n&&n.length?e(n,t):0}return OP=i,OP}Xqe();var NP,Aie;function GY(){if(Aie)return NP;Aie=1;function e(t,i,n){var a=-1,l=t.length;i<0&&(i=-i>l?0:l+i),n=n>l?l:n,n<0&&(n+=l),l=i>n?0:n-i>>>0,i>>>=0;for(var d=Array(l);++a<l;)d[a]=t[a+i];return d}return NP=e,NP}var HP,$ie;function _ve(){if($ie)return HP;$ie=1;var e=xL(),t=s8(),i=ib(),n=Z1();function a(l,d,c){if(!n(c))return!1;var p=typeof d;return(p=="number"?t(c)&&i(d,c.length):p=="string"&&d in c)?e(c[d],l):!1}return HP=a,HP}var _P,kie;function eZe(){if(kie)return _P;kie=1;var e=$ve(),t=1/0,i=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var l=a<0?-1:1;return l*i}return a===a?a:0}return _P=n,_P}var VP,Sie;function kL(){if(Sie)return VP;Sie=1;var e=eZe();function t(i){var n=e(i),a=n%1;return n===n?a?n-a:n:0}return VP=t,VP}var QP,Eie;function tZe(){if(Eie)return QP;Eie=1;var e=GY(),t=_ve(),i=kL(),n=Math.ceil,a=Math.max;function l(d,c,p){(p?t(d,c,p):c===void 0)?c=1:c=a(i(c),0);var h=d==null?0:d.length;if(!h||c<1)return[];for(var u=0,m=0,f=Array(n(h/c));u<h;)f[m++]=e(d,u,u+=c);return f}return QP=l,QP}var oZe=tZe();const iZe=Fi(oZe);var UP,Lie;function rZe(){if(Lie)return UP;Lie=1;function e(t){for(var i=-1,n=t==null?0:t.length,a=0,l=[];++i<n;){var d=t[i];d&&(l[a++]=d)}return l}return UP=e,UP}var nZe=rZe();const aZe=Fi(nZe);var WP,Iie;function sZe(){if(Iie)return WP;Iie=1;function e(t){return function(i,n,a){for(var l=-1,d=Object(i),c=a(i),p=c.length;p--;){var h=c[t?p:++l];if(n(d[h],h,d)===!1)break}return i}}return WP=e,WP}var GP,jie;function lZe(){if(jie)return GP;jie=1;var e=sZe(),t=e();return GP=t,GP}var YP,Mie;function Vve(){if(Mie)return YP;Mie=1;var e=lZe(),t=rb();function i(n,a){return n&&e(n,a,t)}return YP=i,YP}var KP,Bie;function dZe(){if(Bie)return KP;Bie=1;var e=s8();function t(i,n){return function(a,l){if(a==null)return a;if(!e(a))return i(a,l);for(var d=a.length,c=n?d:-1,p=Object(a);(n?c--:++c<d)&&l(p[c],c,p)!==!1;);return a}}return KP=t,KP}var qP,Die;function lb(){if(Die)return qP;Die=1;var e=Vve(),t=dZe(),i=t(e);return qP=i,qP}var ZP,Tie;function Qve(){if(Tie)return ZP;Tie=1;var e=c8();function t(i){return typeof i=="function"?i:e}return ZP=t,ZP}var JP,Pie;function cZe(){if(Pie)return JP;Pie=1;var e=Eve(),t=lb(),i=Qve(),n=Ls();function a(l,d){var c=n(l)?e:t;return c(l,i(d))}return JP=a,JP}var zie,Rie;function pZe(){return Rie||(Rie=1,zie=cZe()),zie}var hZe=pZe();const uZe=Fi(hZe);var XP,Fie;function mZe(){if(Fie)return XP;Fie=1;function e(t,i,n,a){var l=-1,d=t==null?0:t.length;for(a&&d&&(n=t[++l]);++l<d;)n=i(n,t[l],l,t);return n}return XP=e,XP}var ez,Oie;function Uve(){if(Oie)return ez;Oie=1;function e(t,i){return function(n){return n==null?!1:n[t]===i&&(i!==void 0||t in Object(n))}}return ez=e,ez}var tz,Nie;function gZe(){if(Nie)return tz;Nie=1;var e=Ove(),t=Hve(),i=Uve();function n(a){var l=t(a);return l.length==1&&l[0][2]?i(l[0][0],l[0][1]):function(d){return d===a||e(d,a,l)}}return tz=n,tz}var oz,Hie;function fZe(){if(Hie)return oz;Hie=1;function e(t,i){return t!=null&&i in Object(t)}return oz=e,oz}var iz,_ie;function xZe(){if(_ie)return iz;_ie=1;var e=fZe(),t=Dve();function i(n,a){return n!=null&&t(n,a,e)}return iz=i,iz}var rz,Vie;function yZe(){if(Vie)return rz;Vie=1;var e=OY(),t=Fve(),i=xZe(),n=WY(),a=Nve(),l=Uve(),d=d8(),c=1,p=2;function h(u,m){return n(u)&&a(m)?l(d(u),m):function(f){var x=t(f,u);return x===void 0&&x===m?i(f,u):e(m,x,c|p)}}return rz=h,rz}var nz,Qie;function YY(){if(Qie)return nz;Qie=1;function e(t){return function(i){return i?.[t]}}return nz=e,nz}var az,Uie;function wZe(){if(Uie)return az;Uie=1;var e=sb();function t(i){return function(n){return e(n,i)}}return az=t,az}var sz,Wie;function bZe(){if(Wie)return sz;Wie=1;var e=YY(),t=wZe(),i=WY(),n=d8();function a(l){return i(l)?e(n(l)):t(l)}return sz=a,sz}var lz,Gie;function Tm(){if(Gie)return lz;Gie=1;var e=gZe(),t=yZe(),i=c8(),n=Ls(),a=bZe();function l(d){return typeof d=="function"?d:d==null?i:typeof d=="object"?n(d)?t(d[0],d[1]):e(d):a(d)}return lz=l,lz}var dz,Yie;function vZe(){if(Yie)return dz;Yie=1;function e(t,i,n,a,l){return l(t,function(d,c,p){n=a?(a=!1,d):i(n,d,c,p)}),n}return dz=e,dz}var cz,Kie;function CZe(){if(Kie)return cz;Kie=1;var e=mZe(),t=lb(),i=Tm(),n=vZe(),a=Ls();function l(d,c,p){var h=a(d)?e:n,u=arguments.length<3;return h(d,i(c,4),p,u,t)}return cz=l,cz}var AZe=CZe();const qie=Fi(AZe);var pz,Zie;function $Ze(){if(Zie)return pz;Zie=1;var e=s8(),t=z2();function i(n){return t(n)&&e(n)}return pz=i,pz}var hz,Jie;function kZe(){if(Jie)return hz;Jie=1;var e=BY(),t=Jf(),i=YY(),n=yve(),a=$Ze(),l=Math.max;function d(c){if(!(c&&c.length))return[];var p=0;return c=e(c,function(h){if(a(h))return p=l(h.length,p),!0}),n(p,function(h){return t(c,i(h))})}return hz=d,hz}var uz,Xie;function SZe(){if(Xie)return uz;Xie=1;var e=Tve(),t=Jf(),i=kZe();function n(a,l){if(!(a&&a.length))return[];var d=i(a);return l==null?d:t(d,function(c){return e(l,void 0,c)})}return uz=n,uz}var mz,ere;function EZe(){if(ere)return mz;ere=1;var e=Rve(),t=SZe(),i=e(function(n){var a=n.length,l=a>1?n[a-1]:void 0;return l=typeof l=="function"?(n.pop(),l):void 0,t(n,l)});return mz=i,mz}var LZe=EZe();const IZe=Fi(LZe);var gz,tre;function jZe(){if(tre)return gz;tre=1;var e=Vve(),t=Qve();function i(n,a){return n&&e(n,t(a))}return gz=i,gz}var MZe=jZe();const Wve=Fi(MZe);var fz,ore;function Gve(){if(ore)return fz;ore=1;var e=lb(),t=s8();function i(n,a){var l=-1,d=t(n)?Array(n.length):[];return e(n,function(c,p,h){d[++l]=a(c,p,h)}),d}return fz=i,fz}var xz,ire;function Yve(){if(ire)return xz;ire=1;var e=Jf(),t=Tm(),i=Gve(),n=Ls();function a(l,d){var c=n(l)?e:i;return c(l,t(d,3))}return xz=a,xz}var BZe=Yve();const KY=Fi(BZe);var yz,rre;function DZe(){if(rre)return yz;rre=1;var e=HY(),t=l8(),i=ib(),n=Z1(),a=d8();function l(d,c,p,h){if(!n(d))return d;c=t(c,d);for(var u=-1,m=c.length,f=m-1,x=d;x!=null&&++u<m;){var y=a(c[u]),w=p;if(y==="__proto__"||y==="constructor"||y==="prototype")return d;if(u!=f){var b=x[y];w=h?h(b,y,x):void 0,w===void 0&&(w=n(b)?b:i(c[u+1])?[]:{})}e(x,y,w),x=x[y]}return d}return yz=l,yz}var wz,nre;function TZe(){if(nre)return wz;nre=1;var e=sb(),t=DZe(),i=l8();function n(a,l,d){for(var c=-1,p=l.length,h={};++c<p;){var u=l[c],m=e(a,u);d(m,u)&&t(h,i(u,a),m)}return h}return wz=n,wz}var bz,are;function PZe(){if(are)return bz;are=1;var e=Jf(),t=Tm(),i=TZe(),n=QY();function a(l,d){if(l==null)return{};var c=e(n(l),function(p){return[p]});return d=t(d),i(l,c,function(p,h){return d(p,h[0])})}return bz=a,bz}var zZe=PZe();const Pk=Fi(zZe);var vz,sre;function RZe(){if(sre)return vz;sre=1;var e=kve(),t=Z1(),i="Expected a function";function n(a,l,d){var c=!0,p=!0;if(typeof a!="function")throw new TypeError(i);return t(d)&&(c="leading"in d?!!d.leading:c,p="trailing"in d?!!d.trailing:p),e(a,l,{leading:c,maxWait:l,trailing:p})}return vz=n,vz}var FZe=RZe();const OZe=Fi(FZe);var Cz,lre;function NZe(){if(lre)return Cz;lre=1;var e=lb();function t(i,n){var a=[];return e(i,function(l,d,c){n(l,d,c)&&a.push(l)}),a}return Cz=t,Cz}var Az,dre;function HZe(){if(dre)return Az;dre=1;var e=BY(),t=NZe(),i=Tm(),n=Ls();function a(l,d){var c=n(l)?e:t;return c(l,i(d,3))}return Az=a,Az}var _Ze=HZe();const VZe=Fi(_Ze);var $z,cre;function QZe(){if(cre)return $z;cre=1;function e(t,i,n,a){for(var l=-1,d=t==null?0:t.length;++l<d;){var c=t[l];i(a,c,n(c),t)}return a}return $z=e,$z}var kz,pre;function UZe(){if(pre)return kz;pre=1;var e=lb();function t(i,n,a,l){return e(i,function(d,c,p){n(l,d,a(d),p)}),l}return kz=t,kz}var Sz,hre;function WZe(){if(hre)return Sz;hre=1;var e=QZe(),t=UZe(),i=Tm(),n=Ls();function a(l,d){return function(c,p){var h=n(c)?e:t,u=d?d():{};return h(c,l,i(p,2),u)}}return Sz=a,Sz}var Ez,ure;function GZe(){if(ure)return Ez;ure=1;var e=NY(),t=WZe(),i=Object.prototype,n=i.hasOwnProperty,a=t(function(l,d,c){n.call(l,c)?l[c].push(d):e(l,c,[d])});return Ez=a,Ez}var YZe=GZe();const KZe=Fi(YZe);var Lz,mre;function qZe(){if(mre)return Lz;mre=1;function e(t,i){var n=t.length;for(t.sort(i);n--;)t[n]=t[n].value;return t}return Lz=e,Lz}var Iz,gre;function ZZe(){if(gre)return Iz;gre=1;var e=nb();function t(i,n){if(i!==n){var a=i!==void 0,l=i===null,d=i===i,c=e(i),p=n!==void 0,h=n===null,u=n===n,m=e(n);if(!h&&!m&&!c&&i>n||c&&p&&u&&!h&&!m||l&&p&&u||!a&&u||!d)return 1;if(!l&&!c&&!m&&i<n||m&&a&&d&&!l&&!c||h&&a&&d||!p&&d||!u)return-1}return 0}return Iz=t,Iz}var jz,fre;function JZe(){if(fre)return jz;fre=1;var e=ZZe();function t(i,n,a){for(var l=-1,d=i.criteria,c=n.criteria,p=d.length,h=a.length;++l<p;){var u=e(d[l],c[l]);if(u){if(l>=h)return u;var m=a[l];return u*(m=="desc"?-1:1)}}return i.index-n.index}return jz=t,jz}var Mz,xre;function XZe(){if(xre)return Mz;xre=1;var e=Jf(),t=sb(),i=Tm(),n=Gve(),a=qZe(),l=CL(),d=JZe(),c=c8(),p=Ls();function h(u,m,f){m.length?m=e(m,function(w){return p(w)?function(b){return t(b,w.length===1?w[0]:w)}:w}):m=[c];var x=-1;m=e(m,l(i));var y=n(u,function(w,b,C){var k=e(m,function(L){return L(w)});return{criteria:k,index:++x,value:w}});return a(y,function(w,b){return d(w,b,f)})}return Mz=h,Mz}var Bz,yre;function eJe(){if(yre)return Bz;yre=1;var e=XZe(),t=Ls();function i(n,a,l,d){return n==null?[]:(t(a)||(a=a==null?[]:[a]),l=d?void 0:l,t(l)||(l=l==null?[]:[l]),e(n,a,l))}return Bz=i,Bz}var tJe=eJe();const oJe=Fi(tJe);var Dz,wre;function iJe(){if(wre)return Dz;wre=1;function e(t,i,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),i!==void 0&&(t=t>=i?t:i)),t}return Dz=e,Dz}var Tz,bre;function rJe(){if(bre)return Tz;bre=1;var e=iJe(),t=kL(),i=4294967295;function n(a){return a?e(t(a),0,i):0}return Tz=n,Tz}var Pz,vre;function nJe(){if(vre)return Pz;vre=1;var e=kL(),t=rJe();function i(n,a,l,d){var c=n.length;for(l=e(l),l<0&&(l=-l>c?0:c+l),d=d===void 0||d>c?c:e(d),d<0&&(d+=c),d=l>d?0:t(d);l<d;)n[l++]=a;return n}return Pz=i,Pz}var zz,Cre;function aJe(){if(Cre)return zz;Cre=1;var e=nJe(),t=_ve();function i(n,a,l,d){var c=n==null?0:n.length;return c?(l&&typeof l!="number"&&t(n,a,l)&&(l=0,d=c),e(n,a,l,d)):[]}return zz=i,zz}var sJe=aJe();const Kve=Fi(sJe);var Rz,Are;function lJe(){if(Are)return Rz;Are=1;function e(t){var i=t==null?0:t.length;return i?t[i-1]:void 0}return Rz=e,Rz}var Fz,$re;function dJe(){if($re)return Fz;$re=1;var e=sb(),t=GY();function i(n,a){return a.length<2?n:e(n,t(a,0,-1))}return Fz=i,Fz}var Oz,kre;function qve(){if(kre)return Oz;kre=1;var e=l8(),t=lJe(),i=dJe(),n=d8(),a=Object.prototype,l=a.hasOwnProperty;function d(c,p){p=e(p,c);var h=-1,u=p.length;if(!u)return!0;for(;++h<u;){var m=n(p[h]);if(m==="__proto__"&&!l.call(c,"__proto__")||(m==="constructor"||m==="prototype")&&h<u-1)return!1}var f=i(c,p);return f==null||delete f[n(t(p))]}return Oz=d,Oz}var Nz,Sre;function cJe(){if(Sre)return Nz;Sre=1;var e=qve(),t=ib(),i=Array.prototype,n=i.splice;function a(l,d){for(var c=l?d.length:0,p=c-1;c--;){var h=d[c];if(c==p||h!==u){var u=h;t(h)?n.call(l,h,1):e(l,h)}}return l}return Nz=a,Nz}var Hz,Ere;function pJe(){if(Ere)return Hz;Ere=1;var e=Tm(),t=cJe();function i(n,a){var l=[];if(!(n&&n.length))return l;var d=-1,c=[],p=n.length;for(a=e(a,3);++d<p;){var h=n[d];a(h,d,n)&&(l.push(h),c.push(d))}return t(n,c),l}return Hz=i,Hz}var hJe=pJe();const Zve=Fi(hJe);var _z,Lre;function uJe(){if(Lre)return _z;Lre=1;var e=a8(),t=VY(),i=z2(),n="[object Object]",a=Function.prototype,l=Object.prototype,d=a.toString,c=l.hasOwnProperty,p=d.call(Object);function h(u){if(!i(u)||e(u)!=n)return!1;var m=t(u);if(m===null)return!0;var f=c.call(m,"constructor")&&m.constructor;return typeof f=="function"&&f instanceof f&&d.call(f)==p}return _z=h,_z}var Vz,Ire;function mJe(){if(Ire)return Vz;Ire=1;var e=uJe();function t(i){return e(i)?void 0:i}return Vz=t,Vz}var Qz,jre;function gJe(){if(jre)return Qz;jre=1;var e=n8(),t=TY(),i=Ls(),n=e?e.isConcatSpreadable:void 0;function a(l){return i(l)||t(l)||!!(n&&l&&l[n])}return Qz=a,Qz}var Uz,Mre;function Jve(){if(Mre)return Uz;Mre=1;var e=MY(),t=gJe();function i(n,a,l,d,c){var p=-1,h=n.length;for(l||(l=t),c||(c=[]);++p<h;){var u=n[p];a>0&&l(u)?a>1?i(u,a-1,l,d,c):e(c,u):d||(c[c.length]=u)}return c}return Uz=i,Uz}var Wz,Bre;function Xve(){if(Bre)return Wz;Bre=1;var e=Jve();function t(i){var n=i==null?0:i.length;return n?e(i,1):[]}return Wz=t,Wz}var Gz,Dre;function fJe(){if(Dre)return Gz;Dre=1;var e=Xve(),t=Pve(),i=zve();function n(a){return i(t(a,void 0,e),a+"")}return Gz=n,Gz}var Yz,Tre;function xJe(){if(Tre)return Yz;Tre=1;var e=Jf(),t=jve(),i=qve(),n=l8(),a=ab(),l=mJe(),d=fJe(),c=QY(),p=1,h=2,u=4,m=d(function(f,x){var y={};if(f==null)return y;var w=!1;x=e(x,function(C){return C=n(C,f),w||(w=C.length>1),C}),a(f,c(f),y),w&&(y=t(y,p|h|u,l));for(var b=x.length;b--;)i(y,x[b]);return y});return Yz=m,Yz}xJe();var Kz,Pre;function yJe(){if(Pre)return Kz;Pre=1;var e=Jve(),t=Yve();function i(n,a){return e(t(n,a),1)}return Kz=i,Kz}yJe();var qz,zre;function wJe(){if(zre)return qz;zre=1;function e(t,i,n,a){for(var l=t.length,d=n+(a?1:-1);a?d--:++d<l;)if(i(t[d],d,t))return d;return-1}return qz=e,qz}var Zz,Rre;function bJe(){if(Rre)return Zz;Rre=1;function e(t){return t!==t}return Zz=e,Zz}var Jz,Fre;function vJe(){if(Fre)return Jz;Fre=1;function e(t,i,n){for(var a=n-1,l=t.length;++a<l;)if(t[a]===i)return a;return-1}return Jz=e,Jz}var Xz,Ore;function CJe(){if(Ore)return Xz;Ore=1;var e=wJe(),t=bJe(),i=vJe();function n(a,l,d){return l===l?i(a,l,d):e(a,t,d)}return Xz=n,Xz}var eR,Nre;function AJe(){if(Nre)return eR;Nre=1;var e=CJe();function t(i,n){var a=i==null?0:i.length;return!!a&&e(i,n,0)>-1}return eR=t,eR}var tR,Hre;function $Je(){if(Hre)return tR;Hre=1;function e(t,i,n){for(var a=-1,l=t==null?0:t.length;++a<l;)if(n(i,t[a]))return!0;return!1}return tR=e,tR}var oR,_re;function kJe(){if(_re)return oR;_re=1;var e=Ave(),t=Sve(),i=jY(),n=1/0,a=e&&1/i(new e([,-0]))[1]==n?function(l){return new e(l)}:t;return oR=a,oR}var iR,Vre;function eCe(){if(Vre)return iR;Vre=1;var e=hve(),t=AJe(),i=$Je(),n=uve(),a=kJe(),l=jY(),d=200;function c(p,h,u){var m=-1,f=t,x=p.length,y=!0,w=[],b=w;if(u)y=!1,f=i;else if(x>=d){var C=h?null:a(p);if(C)return l(C);y=!1,f=n,b=new e}else b=h?[]:w;e:for(;++m<x;){var k=p[m],L=h?h(k):k;if(k=u||k!==0?k:0,y&&L===L){for(var S=b.length;S--;)if(b[S]===L)continue e;h&&b.push(L),w.push(k)}else f(b,L,u)||(b!==w&&b.push(L),w.push(k))}return w}return iR=c,iR}var rR,Qre;function SJe(){if(Qre)return rR;Qre=1;var e=Tm(),t=eCe();function i(n,a){return n&&n.length?t(n,e(a,2)):[]}return rR=i,rR}var EJe=SJe();const LJe=Fi(EJe);Xve();var nR,Ure;function IJe(){if(Ure)return nR;Ure=1;var e=eCe();function t(i){return i&&i.length?e(i):[]}return nR=t,nR}IJe();var aR,Wre;function jJe(){if(Wre)return aR;Wre=1;var e=9007199254740991,t=Math.floor;function i(n,a){var l="";if(!n||a<1||a>e)return l;do a%2&&(l+=n),a=t(a/2),a&&(n+=n);while(a);return l}return aR=i,aR}var sR,Gre;function MJe(){if(Gre)return sR;Gre=1;var e=GY();function t(i,n,a){var l=i.length;return a=a===void 0?l:a,!n&&a>=l?i:e(i,n,a)}return sR=t,sR}var lR,Yre;function qY(){if(Yre)return lR;Yre=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+i+n,l="\\ufe0e\\ufe0f",d="\\u200d",c=RegExp("["+d+e+a+l+"]");function p(h){return c.test(h)}return lR=p,lR}var dR,Kre;function BJe(){if(Kre)return dR;Kre=1;var e=YY(),t=e("length");return dR=t,dR}var cR,qre;function DJe(){if(qre)return cR;qre=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+i+n,l="\\ufe0e\\ufe0f",d="["+e+"]",c="["+a+"]",p="\\ud83c[\\udffb-\\udfff]",h="(?:"+c+"|"+p+")",u="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",y=h+"?",w="["+l+"]?",b="(?:"+x+"(?:"+[u,m,f].join("|")+")"+w+y+")*",C=w+y+b,k="(?:"+[u+c+"?",c,m,f,d].join("|")+")",L=RegExp(p+"(?="+p+")|"+k+C,"g");function S(j){for(var I=L.lastIndex=0;L.test(j);)++I;return I}return cR=S,cR}var pR,Zre;function tCe(){if(Zre)return pR;Zre=1;var e=BJe(),t=qY(),i=DJe();function n(a){return t(a)?i(a):e(a)}return pR=n,pR}var hR,Jre;function TJe(){if(Jre)return hR;Jre=1;function e(t){return t.split("")}return hR=e,hR}var uR,Xre;function PJe(){if(Xre)return uR;Xre=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+i+n,l="\\ufe0e\\ufe0f",d="["+e+"]",c="["+a+"]",p="\\ud83c[\\udffb-\\udfff]",h="(?:"+c+"|"+p+")",u="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",x="\\u200d",y=h+"?",w="["+l+"]?",b="(?:"+x+"(?:"+[u,m,f].join("|")+")"+w+y+")*",C=w+y+b,k="(?:"+[u+c+"?",c,m,f,d].join("|")+")",L=RegExp(p+"(?="+p+")|"+k+C,"g");function S(j){return j.match(L)||[]}return uR=S,uR}var mR,ene;function zJe(){if(ene)return mR;ene=1;var e=TJe(),t=qY(),i=PJe();function n(a){return t(a)?i(a):e(a)}return mR=n,mR}var gR,tne;function RJe(){if(tne)return gR;tne=1;var e=jJe(),t=Mve(),i=MJe(),n=qY(),a=tCe(),l=zJe(),d=Math.ceil;function c(p,h){h=h===void 0?" ":t(h);var u=h.length;if(u<2)return u?e(h,p):h;var m=e(h,d(p/a(h)));return n(h)?i(l(m),0,p).join(""):m.slice(0,p)}return gR=c,gR}var fR,one;function FJe(){if(one)return fR;one=1;var e=RJe(),t=tCe(),i=kL(),n=Bve();function a(l,d,c){l=n(l),d=i(d);var p=d?t(l):0;return d&&p<d?e(d-p,c)+l:l}return fR=a,fR}var OJe=FJe();const ine=Fi(OJe);var db=e=>e.type==="checkbox",S7=e=>e instanceof Date,hl=e=>e==null;const oCe=e=>typeof e=="object";var ja=e=>!hl(e)&&!Array.isArray(e)&&oCe(e)&&!S7(e),iCe=e=>ja(e)&&e.target?db(e.target)?e.target.checked:e.target.value:e,NJe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rCe=(e,t)=>e.has(NJe(t)),HJe=e=>{const t=e.constructor&&e.constructor.prototype;return ja(t)&&t.hasOwnProperty("isPrototypeOf")},ZY=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Gl(e){let t;const i=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ZY&&(e instanceof Blob||e instanceof FileList))&&(i||ja(e)))if(t=i?[]:{},!Array.isArray(e)&&!HJe(e))t=e;else for(const n in e)t[n]=Gl(e[n]);else return e;return t}var p8=e=>Array.isArray(e)?e.filter(Boolean):[],tn=e=>e===void 0,oo=(e,t,i)=>{if(!t||!ja(e))return i;const n=p8(t.split(/[,[\].]+?/)).reduce((a,l)=>hl(a)?a:a[l],e);return tn(n)||n===e?tn(e[t])?i:e[t]:n};const zk={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},kc={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},nCe=A.createContext(null),Ot=()=>A.useContext(nCe),Cr=e=>{const{children:t,...i}=e;return A.createElement(nCe.Provider,{value:i},t)};var aCe=(e,t,i,n=!0)=>{const a={defaultValues:t._defaultValues};for(const l in e)Object.defineProperty(a,l,{get:()=>{const d=l;return t._proxyFormState[d]!==kc.all&&(t._proxyFormState[d]=!n||kc.all),i&&(i[d]=!0),e[d]}});return a},jd=e=>ja(e)&&!Object.keys(e).length,sCe=(e,t,i,n)=>{i(e);const{name:a,...l}=e;return jd(l)||Object.keys(l).length>=Object.keys(t).length||Object.keys(l).find(d=>t[d]===(!n||kc.all))},zd=e=>Array.isArray(e)?e:[e],lCe=(e,t,i)=>i&&t?e===t:!e||!t||e===t||zd(e).some(n=>n&&(n.startsWith(t)||t.startsWith(n)));function SL(e){const t=A.useRef(e);t.current=e,A.useEffect(()=>{const i=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{i&&i.unsubscribe()}},[e.disabled])}function _Je(e){const t=Ot(),{control:i=t.control,disabled:n,name:a,exact:l}=e||{},[d,c]=A.useState(i._formState),p=A.useRef(!0),h=A.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=A.useRef(a);return u.current=a,SL({disabled:n,next:m=>p.current&&lCe(u.current,m.name,l)&&sCe(m,h.current,i._updateFormState)&&c({...i._formState,...m}),subject:i._subjects.state}),A.useEffect(()=>(p.current=!0,h.current.isValid&&i._updateValid(!0),()=>{p.current=!1}),[i]),aCe(d,i,h.current,!1)}var zh=e=>typeof e=="string",dCe=(e,t,i,n,a)=>zh(e)?(n&&t.watch.add(e),oo(i,e,a)):Array.isArray(e)?e.map(l=>(n&&t.watch.add(l),oo(i,l))):(n&&(t.watchAll=!0),i);function EL(e){const t=Ot(),{control:i=t.control,name:n,defaultValue:a,disabled:l,exact:d}=e||{},c=A.useRef(n);c.current=n,SL({disabled:l,subject:i._subjects.values,next:u=>{lCe(c.current,u.name,d)&&h(Gl(dCe(c.current,i._names,u.values||i._formValues,!1,a)))}});const[p,h]=A.useState(i._getWatch(n,a));return A.useEffect(()=>i._removeUnmounted()),p}var JY=e=>/^\w*$/.test(e),cCe=e=>p8(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Rr(e,t,i){let n=-1;const a=JY(t)?[t]:cCe(t),l=a.length,d=l-1;for(;++n<l;){const c=a[n];let p=i;if(n!==d){const h=e[c];p=ja(h)||Array.isArray(h)?h:isNaN(+a[n+1])?{}:[]}e[c]=p,e=e[c]}return e}function VJe(e){const t=Ot(),{name:i,control:n=t.control,shouldUnregister:a}=e,l=rCe(n._names.array,i),d=EL({control:n,name:i,defaultValue:oo(n._formValues,i,oo(n._defaultValues,i,e.defaultValue)),exact:!0}),c=_Je({control:n,name:i}),p=A.useRef(n.register(i,{...e.rules,value:d}));return A.useEffect(()=>{const h=n._options.shouldUnregister||a,u=(m,f)=>{const x=oo(n._fields,m);x&&(x._f.mount=f)};if(u(i,!0),h){const m=Gl(oo(n._options.defaultValues,i));Rr(n._defaultValues,i,m),tn(oo(n._formValues,i))&&Rr(n._formValues,i,m)}return()=>{(l?h&&!n._state.action:h)?n.unregister(i):u(i,!1)}},[i,n,l,a]),{field:{name:i,value:d,onChange:A.useCallback(h=>p.current.onChange({target:{value:iCe(h),name:i},type:zk.CHANGE}),[i]),onBlur:A.useCallback(()=>p.current.onBlur({target:{value:oo(n._formValues,i),name:i},type:zk.BLUR}),[i,n]),ref:h=>{const u=oo(n._fields,i);u&&h&&(u._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:m=>h.setCustomValidity(m),reportValidity:()=>h.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!oo(c.errors,i)},isDirty:{enumerable:!0,get:()=>!!oo(c.dirtyFields,i)},isTouched:{enumerable:!0,get:()=>!!oo(c.touchedFields,i)},error:{enumerable:!0,get:()=>oo(c.errors,i)}})}}const Pi=e=>e.render(VJe(e));var QJe=(e,t,i,n,a)=>t?{...i[e],types:{...i[e]&&i[e].types?i[e].types:{},[n]:a||!0}}:{};const Rk=(e,t,i)=>{for(const n of i||Object.keys(e)){const a=oo(e,n);if(a){const{_f:l,...d}=a;if(l&&t(l.name)){if(l.ref.focus){l.ref.focus();break}else if(l.refs&&l.refs[0].focus){l.refs[0].focus();break}}else ja(d)&&Rk(d,t)}}};var h0=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const i=(Math.random()*16+e)%16|0;return(t=="x"?i:i&3|8).toString(16)})},xR=(e,t,i={})=>i.shouldFocus||tn(i.shouldFocus)?i.focusName||`${e}.${tn(i.focusIndex)?t:i.focusIndex}.`:"",xQ=e=>({isOnSubmit:!e||e===kc.onSubmit,isOnBlur:e===kc.onBlur,isOnChange:e===kc.onChange,isOnAll:e===kc.all,isOnTouch:e===kc.onTouched}),yQ=(e,t,i)=>!i&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length)))),pCe=(e,t,i)=>{const n=p8(oo(e,i));return Rr(n,"root",t[i]),Rr(e,i,n),e},V7=e=>typeof e=="boolean",XY=e=>e.type==="file",em=e=>typeof e=="function",Fk=e=>{if(!ZY)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},tk=e=>zh(e),eK=e=>e.type==="radio",Ok=e=>e instanceof RegExp;const rne={value:!1,isValid:!1},nne={value:!0,isValid:!0};var hCe=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(i=>i&&i.checked&&!i.disabled).map(i=>i.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!tn(e[0].attributes.value)?tn(e[0].value)||e[0].value===""?nne:{value:e[0].value,isValid:!0}:nne:rne}return rne};const ane={isValid:!1,value:null};var uCe=e=>Array.isArray(e)?e.reduce((t,i)=>i&&i.checked&&!i.disabled?{isValid:!0,value:i.value}:t,ane):ane;function sne(e,t,i="validate"){if(tk(e)||Array.isArray(e)&&e.every(tk)||V7(e)&&!e)return{type:i,message:tk(e)?e:"",ref:t}}var _4=e=>ja(e)&&!Ok(e)?e:{value:e,message:""},wQ=async(e,t,i,n,a)=>{const{ref:l,refs:d,required:c,maxLength:p,minLength:h,min:u,max:m,pattern:f,validate:x,name:y,valueAsNumber:w,mount:b,disabled:C}=e._f,k=oo(t,y);if(!b||C)return{};const L=d?d[0]:l,S=G=>{n&&L.reportValidity&&(L.setCustomValidity(V7(G)?"":G||""),L.reportValidity())},j={},I=eK(l),P=db(l),B=I||P,T=(w||XY(l))&&tn(l.value)&&tn(k)||Fk(l)&&l.value===""||k===""||Array.isArray(k)&&!k.length,D=QJe.bind(null,y,i,j),R=(G,q,Z,H=Bu.maxLength,V=Bu.minLength)=>{const N=G?q:Z;j[y]={type:G?H:V,message:N,ref:l,...D(G?H:V,N)}};if(a?!Array.isArray(k)||!k.length:c&&(!B&&(T||hl(k))||V7(k)&&!k||P&&!hCe(d).isValid||I&&!uCe(d).isValid)){const{value:G,message:q}=tk(c)?{value:!!c,message:c}:_4(c);if(G&&(j[y]={type:Bu.required,message:q,ref:L,...D(Bu.required,q)},!i))return S(q),j}if(!T&&(!hl(u)||!hl(m))){let G,q;const Z=_4(m),H=_4(u);if(!hl(k)&&!isNaN(k)){const V=l.valueAsNumber||k&&+k;hl(Z.value)||(G=V>Z.value),hl(H.value)||(q=V<H.value)}else{const V=l.valueAsDate||new Date(k),N=F=>new Date(new Date().toDateString()+" "+F),O=l.type=="time",z=l.type=="week";zh(Z.value)&&k&&(G=O?N(k)>N(Z.value):z?k>Z.value:V>new Date(Z.value)),zh(H.value)&&k&&(q=O?N(k)<N(H.value):z?k<H.value:V<new Date(H.value))}if((G||q)&&(R(!!G,Z.message,H.message,Bu.max,Bu.min),!i))return S(j[y].message),j}if((p||h)&&!T&&(zh(k)||a&&Array.isArray(k))){const G=_4(p),q=_4(h),Z=!hl(G.value)&&k.length>+G.value,H=!hl(q.value)&&k.length<+q.value;if((Z||H)&&(R(Z,G.message,q.message),!i))return S(j[y].message),j}if(f&&!T&&zh(k)){const{value:G,message:q}=_4(f);if(Ok(G)&&!k.match(G)&&(j[y]={type:Bu.pattern,message:q,ref:l,...D(Bu.pattern,q)},!i))return S(q),j}if(x){if(em(x)){const G=await x(k,t),q=sne(G,L);if(q&&(j[y]={...q,...D(Bu.validate,q.message)},!i))return S(q.message),j}else if(ja(x)){let G={};for(const q in x){if(!jd(G)&&!i)break;const Z=sne(await x[q](k,t),L,q);Z&&(G={...Z,...D(q,Z.message)},S(Z.message),i&&(j[y]=G))}if(!jd(G)&&(j[y]={ref:L,...G},!i))return j}}return S(!0),j};function yR(e,t){return[...e,...zd(t)]}var wR=e=>Array.isArray(e)?e.map(()=>{}):void 0;function bR(e,t,i){return[...e.slice(0,t),...zd(i),...e.slice(t)]}var vR=(e,t,i)=>Array.isArray(e)?(tn(e[i])&&(e[i]=void 0),e.splice(i,0,e.splice(t,1)[0]),e):[];function CR(e,t){return[...zd(t),...zd(e)]}function UJe(e,t){let i=0;const n=[...e];for(const a of t)n.splice(a-i,1),i++;return p8(n).length?n:[]}var AR=(e,t)=>tn(t)?[]:UJe(e,zd(t).sort((i,n)=>i-n)),$R=(e,t,i)=>{e[t]=[e[i],e[i]=e[t]][0]};function WJe(e,t){const i=t.slice(0,-1).length;let n=0;for(;n<i;)e=tn(e)?n++:e[t[n++]];return e}function GJe(e){for(const t in e)if(!tn(e[t]))return!1;return!0}function Ga(e,t){const i=Array.isArray(t)?t:JY(t)?[t]:cCe(t),n=i.length===1?e:WJe(e,i),a=i.length-1,l=i[a];return n&&delete n[l],a!==0&&(ja(n)&&jd(n)||Array.isArray(n)&&GJe(n))&&Ga(e,i.slice(0,-1)),e}var lne=(e,t,i)=>(e[t]=i,e);function tK(e){const t=Ot(),{control:i=t.control,name:n,keyName:a="id",shouldUnregister:l}=e,[d,c]=A.useState(i._getFieldArray(n)),p=A.useRef(i._getFieldArray(n).map(h0)),h=A.useRef(d),u=A.useRef(n),m=A.useRef(!1);u.current=n,h.current=d,i._names.array.add(n),e.rules&&i.register(n,e.rules),SL({next:({values:j,name:I})=>{if(I===u.current||!I){const P=oo(j,u.current);Array.isArray(P)&&(c(P),p.current=P.map(h0))}},subject:i._subjects.array});const f=A.useCallback(j=>{m.current=!0,i._updateFieldArray(n,j)},[i,n]),x=(j,I)=>{const P=zd(Gl(j)),B=yR(i._getFieldArray(n),P);i._names.focus=xR(n,B.length-1,I),p.current=yR(p.current,P.map(h0)),f(B),c(B),i._updateFieldArray(n,B,yR,{argA:wR(j)})},y=(j,I)=>{const P=zd(Gl(j)),B=CR(i._getFieldArray(n),P);i._names.focus=xR(n,0,I),p.current=CR(p.current,P.map(h0)),f(B),c(B),i._updateFieldArray(n,B,CR,{argA:wR(j)})},w=j=>{const I=AR(i._getFieldArray(n),j);p.current=AR(p.current,j),f(I),c(I),i._updateFieldArray(n,I,AR,{argA:j})},b=(j,I,P)=>{const B=zd(Gl(I)),T=bR(i._getFieldArray(n),j,B);i._names.focus=xR(n,j,P),p.current=bR(p.current,j,B.map(h0)),f(T),c(T),i._updateFieldArray(n,T,bR,{argA:j,argB:wR(I)})},C=(j,I)=>{const P=i._getFieldArray(n);$R(P,j,I),$R(p.current,j,I),f(P),c(P),i._updateFieldArray(n,P,$R,{argA:j,argB:I},!1)},k=(j,I)=>{const P=i._getFieldArray(n);vR(P,j,I),vR(p.current,j,I),f(P),c(P),i._updateFieldArray(n,P,vR,{argA:j,argB:I},!1)},L=(j,I)=>{const P=Gl(I),B=lne(i._getFieldArray(n),j,P);p.current=[...B].map((T,D)=>!T||D===j?h0():p.current[D]),f(B),c([...B]),i._updateFieldArray(n,B,lne,{argA:j,argB:P},!0,!1)},S=j=>{const I=zd(Gl(j));p.current=I.map(h0),f([...I]),c([...I]),i._updateFieldArray(n,[...I],P=>P,{},!0,!1)};return A.useEffect(()=>{if(i._state.action=!1,yQ(n,i._names)&&i._subjects.state.next({...i._formState}),m.current&&(!xQ(i._options.mode).isOnSubmit||i._formState.isSubmitted))if(i._options.resolver)i._executeSchema([n]).then(j=>{const I=oo(j.errors,n),P=oo(i._formState.errors,n);(P?!I&&P.type:I&&I.type)&&(I?Rr(i._formState.errors,n,I):Ga(i._formState.errors,n),i._subjects.state.next({errors:i._formState.errors}))});else{const j=oo(i._fields,n);j&&j._f&&wQ(j,i._formValues,i._options.criteriaMode===kc.all,i._options.shouldUseNativeValidation,!0).then(I=>!jd(I)&&i._subjects.state.next({errors:pCe(i._formState.errors,I,n)}))}i._subjects.values.next({name:n,values:{...i._formValues}}),i._names.focus&&Rk(i._fields,j=>!!j&&j.startsWith(i._names.focus||"")),i._names.focus="",i._updateValid()},[d,n,i]),A.useEffect(()=>(!oo(i._formValues,n)&&i._updateFieldArray(n),()=>{(i._options.shouldUnregister||l)&&i.unregister(n)}),[n,i,a,l]),{swap:A.useCallback(C,[f,n,i]),move:A.useCallback(k,[f,n,i]),prepend:A.useCallback(y,[f,n,i]),append:A.useCallback(x,[f,n,i]),remove:A.useCallback(w,[f,n,i]),insert:A.useCallback(b,[f,n,i]),update:A.useCallback(L,[f,n,i]),replace:A.useCallback(S,[f,n,i]),fields:A.useMemo(()=>d.map((j,I)=>({...j,[a]:p.current[I]||h0()})),[d,a])}}function kR(){let e=[];return{get observers(){return e},next:t=>{for(const i of e)i.next&&i.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(i=>i!==t)}}),unsubscribe:()=>{e=[]}}}var Nk=e=>hl(e)||!oCe(e);function nf(e,t){if(Nk(e)||Nk(t))return e===t;if(S7(e)&&S7(t))return e.getTime()===t.getTime();const i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(const a of i){const l=e[a];if(!n.includes(a))return!1;if(a!=="ref"){const d=t[a];if(S7(l)&&S7(d)||ja(l)&&ja(d)||Array.isArray(l)&&Array.isArray(d)?!nf(l,d):l!==d)return!1}}return!0}var mCe=e=>e.type==="select-multiple",YJe=e=>eK(e)||db(e),SR=e=>Fk(e)&&e.isConnected,gCe=e=>{for(const t in e)if(em(e[t]))return!0;return!1};function Hk(e,t={}){const i=Array.isArray(e);if(ja(e)||i)for(const n in e)Array.isArray(e[n])||ja(e[n])&&!gCe(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Hk(e[n],t[n])):hl(e[n])||(t[n]=!0);return t}function fCe(e,t,i){const n=Array.isArray(e);if(ja(e)||n)for(const a in e)Array.isArray(e[a])||ja(e[a])&&!gCe(e[a])?tn(t)||Nk(i[a])?i[a]=Array.isArray(e[a])?Hk(e[a],[]):{...Hk(e[a])}:fCe(e[a],hl(t)?{}:t[a],i[a]):i[a]=!nf(e[a],t[a]);return i}var ER=(e,t)=>fCe(e,t,Hk(t)),xCe=(e,{valueAsNumber:t,valueAsDate:i,setValueAs:n})=>tn(e)?e:t?e===""?NaN:e&&+e:i&&zh(e)?new Date(e):n?n(e):e;function LR(e){const t=e.ref;if(!(e.refs?e.refs.every(i=>i.disabled):t.disabled))return XY(t)?t.files:eK(t)?uCe(e.refs).value:mCe(t)?[...t.selectedOptions].map(({value:i})=>i):db(t)?hCe(e.refs).value:xCe(tn(t.value)?e.ref.value:t.value,e)}var KJe=(e,t,i,n)=>{const a={};for(const l of e){const d=oo(t,l);d&&Rr(a,l,d._f)}return{criteriaMode:i,names:[...e],fields:a,shouldUseNativeValidation:n}},o9=e=>tn(e)?e:Ok(e)?e.source:ja(e)?Ok(e.value)?e.value.source:e.value:e,qJe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function dne(e,t,i){const n=oo(e,i);if(n||JY(i))return{error:n,name:i};const a=i.split(".");for(;a.length;){const l=a.join("."),d=oo(t,l),c=oo(e,l);if(d&&!Array.isArray(d)&&i!==l)return{name:i};if(c&&c.type)return{name:l,error:c};a.pop()}return{name:i}}var ZJe=(e,t,i,n,a)=>a.isOnAll?!1:!i&&a.isOnTouch?!(t||e):(i?n.isOnBlur:a.isOnBlur)?!e:(i?n.isOnChange:a.isOnChange)?e:!0,JJe=(e,t)=>!p8(oo(e,t)).length&&Ga(e,t);const XJe={mode:kc.onSubmit,reValidateMode:kc.onChange,shouldFocusError:!0};function eXe(e={},t){let i={...XJe,...e},n={submitCount:0,isDirty:!1,isLoading:em(i.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},a={},l=ja(i.defaultValues)||ja(i.values)?Gl(i.defaultValues||i.values)||{}:{},d=i.shouldUnregister?{}:Gl(l),c={action:!1,mount:!1,watch:!1},p={mount:new Set,unMount:new Set,array:new Set,watch:new Set},h,u=0;const m={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:kR(),array:kR(),state:kR()},x=e.resetOptions&&e.resetOptions.keepDirtyValues,y=xQ(i.mode),w=xQ(i.reValidateMode),b=i.criteriaMode===kc.all,C=le=>ae=>{clearTimeout(u),u=setTimeout(le,ae)},k=async le=>{if(m.isValid||le){const ae=i.resolver?jd((await T()).errors):await R(a,!0);ae!==n.isValid&&f.state.next({isValid:ae})}},L=le=>m.isValidating&&f.state.next({isValidating:le}),S=(le,ae=[],fe,ke,ie=!0,ue=!0)=>{if(ke&&fe){if(c.action=!0,ue&&Array.isArray(oo(a,le))){const je=fe(oo(a,le),ke.argA,ke.argB);ie&&Rr(a,le,je)}if(ue&&Array.isArray(oo(n.errors,le))){const je=fe(oo(n.errors,le),ke.argA,ke.argB);ie&&Rr(n.errors,le,je),JJe(n.errors,le)}if(m.touchedFields&&ue&&Array.isArray(oo(n.touchedFields,le))){const je=fe(oo(n.touchedFields,le),ke.argA,ke.argB);ie&&Rr(n.touchedFields,le,je)}m.dirtyFields&&(n.dirtyFields=ER(l,d)),f.state.next({name:le,isDirty:q(le,ae),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Rr(d,le,ae)},j=(le,ae)=>{Rr(n.errors,le,ae),f.state.next({errors:n.errors})},I=(le,ae,fe,ke)=>{const ie=oo(a,le);if(ie){const ue=oo(d,le,tn(fe)?oo(l,le):fe);tn(ue)||ke&&ke.defaultChecked||ae?Rr(d,le,ae?ue:LR(ie._f)):V(le,ue),c.mount&&k()}},P=(le,ae,fe,ke,ie)=>{let ue=!1,je=!1;const Me={name:le};if(!fe||ke){m.isDirty&&(je=n.isDirty,n.isDirty=Me.isDirty=q(),ue=je!==Me.isDirty);const Ce=nf(oo(l,le),ae);je=oo(n.dirtyFields,le),Ce?Ga(n.dirtyFields,le):Rr(n.dirtyFields,le,!0),Me.dirtyFields=n.dirtyFields,ue=ue||m.dirtyFields&&je!==!Ce}if(fe){const Ce=oo(n.touchedFields,le);Ce||(Rr(n.touchedFields,le,fe),Me.touchedFields=n.touchedFields,ue=ue||m.touchedFields&&Ce!==fe)}return ue&&ie&&f.state.next(Me),ue?Me:{}},B=(le,ae,fe,ke)=>{const ie=oo(n.errors,le),ue=m.isValid&&V7(ae)&&n.isValid!==ae;if(e.delayError&&fe?(h=C(()=>j(le,fe)),h(e.delayError)):(clearTimeout(u),h=null,fe?Rr(n.errors,le,fe):Ga(n.errors,le)),(fe?!nf(ie,fe):ie)||!jd(ke)||ue){const je={...ke,...ue&&V7(ae)?{isValid:ae}:{},errors:n.errors,name:le};n={...n,...je},f.state.next(je)}L(!1)},T=async le=>i.resolver(d,i.context,KJe(le||p.mount,a,i.criteriaMode,i.shouldUseNativeValidation)),D=async le=>{const{errors:ae}=await T();if(le)for(const fe of le){const ke=oo(ae,fe);ke?Rr(n.errors,fe,ke):Ga(n.errors,fe)}else n.errors=ae;return ae},R=async(le,ae,fe={valid:!0})=>{for(const ke in le){const ie=le[ke];if(ie){const{_f:ue,...je}=ie;if(ue){const Me=p.array.has(ue.name),Ce=await wQ(ie,d,b,i.shouldUseNativeValidation&&!ae,Me);if(Ce[ue.name]&&(fe.valid=!1,ae))break;!ae&&(oo(Ce,ue.name)?Me?pCe(n.errors,Ce,ue.name):Rr(n.errors,ue.name,Ce[ue.name]):Ga(n.errors,ue.name))}je&&await R(je,ae,fe)}}return fe.valid},G=()=>{for(const le of p.unMount){const ae=oo(a,le);ae&&(ae._f.refs?ae._f.refs.every(fe=>!SR(fe)):!SR(ae._f.ref))&&ne(le)}p.unMount=new Set},q=(le,ae)=>(le&&ae&&Rr(d,le,ae),!nf(te(),l)),Z=(le,ae,fe)=>dCe(le,p,{...c.mount?d:tn(ae)?l:zh(le)?{[le]:ae}:ae},fe,ae),H=le=>p8(oo(c.mount?d:l,le,e.shouldUnregister?oo(l,le,[]):[])),V=(le,ae,fe={})=>{const ke=oo(a,le);let ie=ae;if(ke){const ue=ke._f;ue&&(!ue.disabled&&Rr(d,le,xCe(ae,ue)),ie=Fk(ue.ref)&&hl(ae)?"":ae,mCe(ue.ref)?[...ue.ref.options].forEach(je=>je.selected=ie.includes(je.value)):ue.refs?db(ue.ref)?ue.refs.length>1?ue.refs.forEach(je=>(!je.defaultChecked||!je.disabled)&&(je.checked=Array.isArray(ie)?!!ie.find(Me=>Me===je.value):ie===je.value)):ue.refs[0]&&(ue.refs[0].checked=!!ie):ue.refs.forEach(je=>je.checked=je.value===ie):XY(ue.ref)?ue.ref.value="":(ue.ref.value=ie,ue.ref.type||f.values.next({name:le,values:{...d}})))}(fe.shouldDirty||fe.shouldTouch)&&P(le,ie,fe.shouldTouch,fe.shouldDirty,!0),fe.shouldValidate&&F(le)},N=(le,ae,fe)=>{for(const ke in ae){const ie=ae[ke],ue=`${le}.${ke}`,je=oo(a,ue);(p.array.has(le)||!Nk(ie)||je&&!je._f)&&!S7(ie)?N(ue,ie,fe):V(ue,ie,fe)}},O=(le,ae,fe={})=>{const ke=oo(a,le),ie=p.array.has(le),ue=Gl(ae);Rr(d,le,ue),ie?(f.array.next({name:le,values:{...d}}),(m.isDirty||m.dirtyFields)&&fe.shouldDirty&&f.state.next({name:le,dirtyFields:ER(l,d),isDirty:q(le,ue)})):ke&&!ke._f&&!hl(ue)?N(le,ue,fe):V(le,ue,fe),yQ(le,p)&&f.state.next({...n}),f.values.next({name:le,values:{...d}}),!c.mount&&t()},z=async le=>{const ae=le.target;let fe=ae.name,ke=!0;const ie=oo(a,fe),ue=()=>ae.type?LR(ie._f):iCe(le);if(ie){let je,Me;const Ce=ue(),Te=le.type===zk.BLUR||le.type===zk.FOCUS_OUT,Fe=!qJe(ie._f)&&!i.resolver&&!oo(n.errors,fe)&&!ie._f.deps||ZJe(Te,oo(n.touchedFields,fe),n.isSubmitted,w,y),tt=yQ(fe,p,Te);Rr(d,fe,Ce),Te?(ie._f.onBlur&&ie._f.onBlur(le),h&&h(0)):ie._f.onChange&&ie._f.onChange(le);const Je=P(fe,Ce,Te,!1),ze=!jd(Je)||tt;if(!Te&&f.values.next({name:fe,type:le.type,values:{...d}}),Fe)return m.isValid&&k(),ze&&f.state.next({name:fe,...tt?{}:Je});if(!Te&&tt&&f.state.next({...n}),L(!0),i.resolver){const{errors:qe}=await T([fe]),$e=dne(n.errors,a,fe),Ne=dne(qe,a,$e.name||fe);je=Ne.error,fe=Ne.name,Me=jd(qe)}else je=(await wQ(ie,d,b,i.shouldUseNativeValidation))[fe],ke=isNaN(Ce)||Ce===oo(d,fe,Ce),ke&&(je?Me=!1:m.isValid&&(Me=await R(a,!0)));ke&&(ie._f.deps&&F(ie._f.deps),B(fe,Me,je,Je))}},F=async(le,ae={})=>{let fe,ke;const ie=zd(le);if(L(!0),i.resolver){const ue=await D(tn(le)?le:ie);fe=jd(ue),ke=le?!ie.some(je=>oo(ue,je)):fe}else le?(ke=(await Promise.all(ie.map(async ue=>{const je=oo(a,ue);return await R(je&&je._f?{[ue]:je}:je)}))).every(Boolean),!(!ke&&!n.isValid)&&k()):ke=fe=await R(a);return f.state.next({...!zh(le)||m.isValid&&fe!==n.isValid?{}:{name:le},...i.resolver||!le?{isValid:fe}:{},errors:n.errors,isValidating:!1}),ae.shouldFocus&&!ke&&Rk(a,ue=>ue&&oo(n.errors,ue),le?ie:p.mount),ke},te=le=>{const ae={...l,...c.mount?d:{}};return tn(le)?ae:zh(le)?oo(ae,le):le.map(fe=>oo(ae,fe))},Y=(le,ae)=>({invalid:!!oo((ae||n).errors,le),isDirty:!!oo((ae||n).dirtyFields,le),isTouched:!!oo((ae||n).touchedFields,le),error:oo((ae||n).errors,le)}),W=le=>{le&&zd(le).forEach(ae=>Ga(n.errors,ae)),f.state.next({errors:le?n.errors:{}})},ee=(le,ae,fe)=>{const ke=(oo(a,le,{_f:{}})._f||{}).ref;Rr(n.errors,le,{...ae,ref:ke}),f.state.next({name:le,errors:n.errors,isValid:!1}),fe&&fe.shouldFocus&&ke&&ke.focus&&ke.focus()},J=(le,ae)=>em(le)?f.values.subscribe({next:fe=>le(Z(void 0,ae),fe)}):Z(le,ae,!0),ne=(le,ae={})=>{for(const fe of le?zd(le):p.mount)p.mount.delete(fe),p.array.delete(fe),ae.keepValue||(Ga(a,fe),Ga(d,fe)),!ae.keepError&&Ga(n.errors,fe),!ae.keepDirty&&Ga(n.dirtyFields,fe),!ae.keepTouched&&Ga(n.touchedFields,fe),!i.shouldUnregister&&!ae.keepDefaultValue&&Ga(l,fe);f.values.next({values:{...d}}),f.state.next({...n,...ae.keepDirty?{isDirty:q()}:{}}),!ae.keepIsValid&&k()},ye=(le,ae={})=>{let fe=oo(a,le);const ke=V7(ae.disabled);return Rr(a,le,{...fe||{},_f:{...fe&&fe._f?fe._f:{ref:{name:le}},name:le,mount:!0,...ae}}),p.mount.add(le),fe?ke&&Rr(d,le,ae.disabled?void 0:oo(d,le,LR(fe._f))):I(le,!0,ae.value),{...ke?{disabled:ae.disabled}:{},...i.shouldUseNativeValidation?{required:!!ae.required,min:o9(ae.min),max:o9(ae.max),minLength:o9(ae.minLength),maxLength:o9(ae.maxLength),pattern:o9(ae.pattern)}:{},name:le,onChange:z,onBlur:z,ref:ie=>{if(ie){ye(le,ae),fe=oo(a,le);const ue=tn(ie.value)&&ie.querySelectorAll&&ie.querySelectorAll("input,select,textarea")[0]||ie,je=YJe(ue),Me=fe._f.refs||[];if(je?Me.find(Ce=>Ce===ue):ue===fe._f.ref)return;Rr(a,le,{_f:{...fe._f,...je?{refs:[...Me.filter(SR),ue,...Array.isArray(oo(l,le))?[{}]:[]],ref:{type:ue.type,name:le}}:{ref:ue}}}),I(le,!1,void 0,ue)}else fe=oo(a,le,{}),fe._f&&(fe._f.mount=!1),(i.shouldUnregister||ae.shouldUnregister)&&!(rCe(p.array,le)&&c.action)&&p.unMount.add(le)}}},me=()=>i.shouldFocusError&&Rk(a,le=>le&&oo(n.errors,le),p.mount),he=(le,ae)=>async fe=>{fe&&(fe.preventDefault&&fe.preventDefault(),fe.persist&&fe.persist());let ke=Gl(d);if(f.state.next({isSubmitting:!0}),i.resolver){const{errors:ie,values:ue}=await T();n.errors=ie,ke=ue}else await R(a);Ga(n.errors,"root"),jd(n.errors)?(f.state.next({errors:{}}),await le(ke,fe)):(ae&&await ae({...n.errors},fe),me(),setTimeout(me)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:jd(n.errors),submitCount:n.submitCount+1,errors:n.errors})},pe=(le,ae={})=>{oo(a,le)&&(tn(ae.defaultValue)?O(le,oo(l,le)):(O(le,ae.defaultValue),Rr(l,le,ae.defaultValue)),ae.keepTouched||Ga(n.touchedFields,le),ae.keepDirty||(Ga(n.dirtyFields,le),n.isDirty=ae.defaultValue?q(le,oo(l,le)):q()),ae.keepError||(Ga(n.errors,le),m.isValid&&k()),f.state.next({...n}))},xe=(le,ae={})=>{const fe=le||l,ke=Gl(fe),ie=le&&!jd(le)?ke:l;if(ae.keepDefaultValues||(l=fe),!ae.keepValues){if(ae.keepDirtyValues||x)for(const ue of p.mount)oo(n.dirtyFields,ue)?Rr(ie,ue,oo(d,ue)):O(ue,oo(ie,ue));else{if(ZY&&tn(le))for(const ue of p.mount){const je=oo(a,ue);if(je&&je._f){const Me=Array.isArray(je._f.refs)?je._f.refs[0]:je._f.ref;if(Fk(Me)){const Ce=Me.closest("form");if(Ce){Ce.reset();break}}}}a={}}d=e.shouldUnregister?ae.keepDefaultValues?Gl(l):{}:ke,f.array.next({values:{...ie}}),f.values.next({values:{...ie}})}p={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!c.mount&&t(),c.mount=!m.isValid||!!ae.keepIsValid,c.watch=!!e.shouldUnregister,f.state.next({submitCount:ae.keepSubmitCount?n.submitCount:0,isDirty:ae.keepDirty?n.isDirty:!!(ae.keepDefaultValues&&!nf(le,l)),isSubmitted:ae.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ae.keepDirtyValues?n.dirtyFields:ae.keepDefaultValues&&le?ER(l,le):{},touchedFields:ae.keepTouched?n.touchedFields:{},errors:ae.keepErrors?n.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},ve=(le,ae)=>xe(em(le)?le(d):le,ae);return{control:{register:ye,unregister:ne,getFieldState:Y,_executeSchema:T,_getWatch:Z,_getDirty:q,_updateValid:k,_removeUnmounted:G,_updateFieldArray:S,_getFieldArray:H,_reset:xe,_resetDefaultValues:()=>em(i.defaultValues)&&i.defaultValues().then(le=>{ve(le,i.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:le=>{n={...n,...le}},_subjects:f,_proxyFormState:m,get _fields(){return a},get _formValues(){return d},get _state(){return c},set _state(le){c=le},get _defaultValues(){return l},get _names(){return p},set _names(le){p=le},get _formState(){return n},set _formState(le){n=le},get _options(){return i},set _options(le){i={...i,...le}}},trigger:F,register:ye,handleSubmit:he,watch:J,setValue:O,getValues:te,reset:ve,resetField:pe,clearErrors:W,unregister:ne,setError:ee,setFocus:(le,ae={})=>{const fe=oo(a,le),ke=fe&&fe._f;if(ke){const ie=ke.refs?ke.refs[0]:ke.ref;ie.focus&&(ie.focus(),ae.shouldSelect&&ie.select())}},getFieldState:Y}}function Ar(e={}){const t=A.useRef(),[i,n]=A.useState({isDirty:!1,isValidating:!1,isLoading:em(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:em(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...eXe(e,()=>n(l=>({...l}))),formState:i});const a=t.current.control;return a._options=e,SL({subject:a._subjects.state,next:l=>{sCe(l,a._proxyFormState,a._updateFormState,!0)&&n({...a._formState})}}),A.useEffect(()=>{e.values&&!nf(e.values,a._defaultValues)?a._reset(e.values,a._options.resetOptions):a._resetDefaultValues()},[e.values,a]),A.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=aCe(i,a),t.current}let Lc;typeof window<"u"?Lc=window:typeof self<"u"?Lc=self:Lc=If;let bQ=null,vQ=null;const cne=20,IR=Lc.clearTimeout,pne=Lc.setTimeout,jR=Lc.cancelAnimationFrame||Lc.mozCancelAnimationFrame||Lc.webkitCancelAnimationFrame,hne=Lc.requestAnimationFrame||Lc.mozRequestAnimationFrame||Lc.webkitRequestAnimationFrame;jR==null||hne==null?(bQ=IR,vQ=function(e){return pne(e,cne)}):(bQ=function([e,t]){jR(e),IR(t)},vQ=function(e){const t=hne(function(){IR(i),e()}),i=pne(function(){jR(t),e()},cne);return[t,i]});function tXe(e){let t,i,n,a,l,d,c;const p=typeof document<"u"&&document.attachEvent;if(!p){d=function(w){const b=w.__resizeTriggers__,C=b.firstElementChild,k=b.lastElementChild,L=C.firstElementChild;k.scrollLeft=k.scrollWidth,k.scrollTop=k.scrollHeight,L.style.width=C.offsetWidth+1+"px",L.style.height=C.offsetHeight+1+"px",C.scrollLeft=C.scrollWidth,C.scrollTop=C.scrollHeight},l=function(w){return w.offsetWidth!==w.__resizeLast__.width||w.offsetHeight!==w.__resizeLast__.height},c=function(w){if(w.target.className&&typeof w.target.className.indexOf=="function"&&w.target.className.indexOf("contract-trigger")<0&&w.target.className.indexOf("expand-trigger")<0)return;const b=this;d(this),this.__resizeRAF__&&bQ(this.__resizeRAF__),this.__resizeRAF__=vQ(function(){l(b)&&(b.__resizeLast__.width=b.offsetWidth,b.__resizeLast__.height=b.offsetHeight,b.__resizeListeners__.forEach(function(C){C.call(b,w)}))})};let u=!1,m="";n="animationstart";const f="Webkit Moz O ms".split(" ");let x="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),y="";{const w=document.createElement("fakeelement");if(w.style.animationName!==void 0&&(u=!0),u===!1){for(let b=0;b<f.length;b++)if(w.style[f[b]+"AnimationName"]!==void 0){y=f[b],m="-"+y.toLowerCase()+"-",n=x[b],u=!0;break}}}i="resizeanim",t="@"+m+"keyframes "+i+" { from { opacity: 0; } to { opacity: 0; } } ",a=m+"animation: 1ms "+i+"; "}const h=function(u){if(!u.getElementById("detectElementResize")){const m=(t||"")+".resize-triggers { "+(a||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',f=u.head||u.getElementsByTagName("head")[0],x=u.createElement("style");x.id="detectElementResize",x.type="text/css",e!=null&&x.setAttribute("nonce",e),x.styleSheet?x.styleSheet.cssText=m:x.appendChild(u.createTextNode(m)),f.appendChild(x)}};return{addResizeListener:function(u,m){if(p)u.attachEvent("onresize",m);else{if(!u.__resizeTriggers__){const f=u.ownerDocument,x=Lc.getComputedStyle(u);x&&x.position==="static"&&(u.style.position="relative"),h(f),u.__resizeLast__={},u.__resizeListeners__=[],(u.__resizeTriggers__=f.createElement("div")).className="resize-triggers";const y=f.createElement("div");y.className="expand-trigger",y.appendChild(f.createElement("div"));const w=f.createElement("div");w.className="contract-trigger",u.__resizeTriggers__.appendChild(y),u.__resizeTriggers__.appendChild(w),u.appendChild(u.__resizeTriggers__),d(u),u.addEventListener("scroll",c,!0),n&&(u.__resizeTriggers__.__animationListener__=function(b){b.animationName===i&&d(u)},u.__resizeTriggers__.addEventListener(n,u.__resizeTriggers__.__animationListener__))}u.__resizeListeners__.push(m)}},removeResizeListener:function(u,m){if(p)u.detachEvent("onresize",m);else if(u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(m),1),!u.__resizeListeners__.length){u.removeEventListener("scroll",c,!0),u.__resizeTriggers__.__animationListener__&&(u.__resizeTriggers__.removeEventListener(n,u.__resizeTriggers__.__animationListener__),u.__resizeTriggers__.__animationListener__=null);try{u.__resizeTriggers__=!u.removeChild(u.__resizeTriggers__)}catch{}}}}}let vr=class extends g.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._didLogDeprecationWarning=!1,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:i,disableWidth:n,onResize:a}=this.props;if(this._parentNode){const l=window.getComputedStyle(this._parentNode)||{},d=parseFloat(l.paddingLeft||"0"),c=parseFloat(l.paddingRight||"0"),p=parseFloat(l.paddingTop||"0"),h=parseFloat(l.paddingBottom||"0"),u=this._parentNode.getBoundingClientRect(),m=u.height-p-h,f=u.width-d-c;if(!i&&this.state.height!==m||!n&&this.state.width!==f){this.setState({height:m,width:f});const x=()=>{this._didLogDeprecationWarning||(this._didLogDeprecationWarning=!0,console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"))};typeof a=="function"&&a({height:m,width:f,get scaledHeight(){return x(),m},get scaledWidth(){return x(),f}})}}},this._setRef=i=>{this._autoSizer=i}}componentDidMount(){const{nonce:t}=this.props,i=this._autoSizer?this._autoSizer.parentNode:null;if(i!=null&&i.ownerDocument&&i.ownerDocument.defaultView&&i instanceof i.ownerDocument.defaultView.HTMLElement){this._parentNode=i;const n=i.ownerDocument.defaultView.ResizeObserver;n!=null?(this._resizeObserver=new n(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(i)):(this._detectElementResize=tXe(t),this._detectElementResize.addResizeListener(i,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:i,defaultWidth:n,disableHeight:a=!1,disableWidth:l=!1,doNotBailOutOnEmptyChildren:d=!1,nonce:c,onResize:p,style:h={},tagName:u="div",...m}=this.props,{height:f,width:x}=this.state,y={overflow:"visible"},w={};let b=!1;return a||(f===0&&(b=!0),y.height=0,w.height=f,w.scaledHeight=f),l||(x===0&&(b=!0),y.width=0,w.width=x,w.scaledWidth=x),d&&(b=!1),g.createElement(u,{ref:this._setRef,style:{...y,...h},...m},!b&&t(w))}};function _d(e){"@babel/helpers - typeof";return _d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_d(e)}function CQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function oK(e,t){if(e){if(typeof e=="string")return CQ(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?CQ(e,t):void 0}}function une(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=oK(e))||t){i&&(e=i);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(p){throw p},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,d=!0,c=!1;return{s:function(){i=i.call(e)},n:function(){var p=i.next();return d=p.done,p},e:function(p){c=!0,l=p},f:function(){try{d||i.return==null||i.return()}finally{if(c)throw l}}}}function ro(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _k(e,t){return _k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},_k(e,t)}function er(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_k(e,t)}function Vk(e){return Vk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vk(e)}function yCe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yCe=function(){return!!e})()}function oXe(e,t){if(t&&(_d(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ro(e)}function tr(e){var t=yCe();return function(){var i,n=Vk(e);if(t){var a=Vk(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return oXe(this,i)}}function Vi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iXe(e,t){if(_d(e)!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var n=i.call(e,t);if(_d(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wCe(e){var t=iXe(e,"string");return _d(t)=="symbol"?t:t+""}function mne(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wCe(n.key),n)}}function Qi(e,t,i){return t&&mne(e.prototype,t),i&&mne(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zt(e,t,i){return(t=wCe(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function gne(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),i.push.apply(i,n)}return i}function ko(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?gne(Object(i),!0).forEach(function(n){Zt(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):gne(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}function rXe(e){if(Array.isArray(e))return e}function nXe(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var n,a,l,d,c=[],p=!0,h=!1;try{if(l=(i=i.call(e)).next,t===0){if(Object(i)!==i)return;p=!1}else for(;!(p=(n=l.call(i)).done)&&(c.push(n.value),c.length!==t);p=!0);}catch(u){h=!0,a=u}finally{try{if(!p&&i.return!=null&&(d=i.return(),Object(d)!==d))return}finally{if(h)throw a}}return c}}function aXe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qa(e,t){return rXe(e)||nXe(e,t)||oK(e,t)||aXe()}function Qk(e,t){if(e==null)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;i[n]=e[n]}return i}function J1(e,t){if(e==null)return{};var i,n,a=Qk(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)i=l[n],t.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(a[i]=e[i])}return a}function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},Do.apply(null,arguments)}function sXe(e){if(Array.isArray(e))return CQ(e)}function lXe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -85,7 +85,7 @@ self.addEventListener('message', async (e) => {
|
|
|
85
85
|
}
|
|
86
86
|
})
|
|
87
87
|
`;let fO;function R$t(e,t){return new Promise(((i,n)=>{fO||(fO=(function(l){const d=[];return d.push(l),URL.createObjectURL(new Blob(d))})(z$t));const a=new Worker(fO);a.addEventListener("message",(function(l){if(t.signal&&t.signal.aborted)a.terminate();else if(l.data.progress===void 0){if(l.data.error)return n(new Error(l.data.error)),void a.terminate();i(l.data.file),a.terminate()}else t.onProgress(l.data.progress)})),a.addEventListener("error",n),t.signal&&t.signal.addEventListener("abort",(()=>{n(t.signal.reason),a.terminate()})),a.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})}))}function zs(e,t){return new Promise((function(i,n){let a,l,d,c,p,h;if(a={...t},d=0,{onProgress:c}=a,a.maxSizeMB=a.maxSizeMB||Number.POSITIVE_INFINITY,p=typeof a.useWebWorker!="boolean"||a.useWebWorker,delete a.useWebWorker,a.onProgress=x=>{d=x,typeof c=="function"&&c(d)},!(e instanceof Blob||e instanceof P$t))return n(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return n(new Error("The file given is not an image"));if(h=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!p||typeof Worker!="function"||h)return kpe(e,a).then((function(x){try{return l=x,f.call(this)}catch(y){return n(y)}}).bind(this),n);var u=(function(){try{return f.call(this)}catch(x){return n(x)}}).bind(this),m=function(x){try{return kpe(e,a).then((function(y){try{return l=y,u()}catch(w){return n(w)}}),n)}catch(y){return n(y)}};try{return a.libURL=a.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",R$t(e,a).then((function(x){try{return l=x,u()}catch{return m()}}),m)}catch{m()}function f(){try{l.name=e.name,l.lastModified=e.lastModified}catch{}try{a.preserveExif&&e.type==="image/jpeg"&&(!a.fileType||a.fileType&&a.fileType===e.type)&&(l=Yje(e,l))}catch{}return i(l)}}))}zs.getDataUrlFromFile=Jje,zs.getFilefromDataUrl=KK,zs.loadImage=Xje,zs.drawImageInCanvas=tMe,zs.drawFileInCanvas=AS,zs.canvasToFile=$S,zs.getExifOrientation=oMe,zs.handleMaxWidthOrHeight=iMe,zs.followExifOrientation=rMe,zs.cleanupCanvasMemory=uh,zs.isAutoOrientationInBrowser=j7,zs.approximateBelowMaximumCanvasSizeOfBrowser=eMe,zs.copyExifWithoutOrientation=Yje,zs.getBrowserName=sf,zs.version="2.0.2";var My={};My.d=(e,t)=>{for(var i in t)My.o(t,i)&&!My.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})};My.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var ai=globalThis.pdfjsLib={};My.d(ai,{AbortException:()=>i4,AnnotationEditorLayer:()=>Ku,AnnotationEditorParamsType:()=>pi,AnnotationEditorType:()=>Zi,AnnotationEditorUIManager:()=>km,AnnotationLayer:()=>PSt,AnnotationMode:()=>Y0,CMapCompressionType:()=>IU,ColorPicker:()=>dh,DOMSVGFactory:()=>JK,DrawLayer:()=>Fs,FeatureTest:()=>ql,GlobalWorkerOptions:()=>vw,ImageKind:()=>hk,InvalidPDFException:()=>aMe,MissingPDFException:()=>o4,OPS:()=>v1,Outliner:()=>RU,PDFDataRangeTransport:()=>AMe,PDFDateString:()=>hMe,PDFWorker:()=>mc,PasswordResponses:()=>H$t,PermissionFlag:()=>N$t,PixelsPerInch:()=>$6,RenderingCancelledException:()=>XK,TextLayer:()=>ES,UnexpectedResponseException:()=>oI,Util:()=>$o,VerbosityLevel:()=>XL,XfaLayer:()=>kMe,build:()=>gSt,createValidAbsoluteUrl:()=>U$t,fetchData:()=>lI,getDocument:()=>aSt,getFilenameFromUrl:()=>tkt,getPdfFilenameFromUrl:()=>okt,getXfaPageViewport:()=>ikt,isDataScheme:()=>eq,isPdfFile:()=>tq,noContextMenu:()=>od,normalizeUnicode:()=>Z$t,renderTextLayer:()=>Zkt,setLayerDimensions:()=>Pf,shadow:()=>ar,updateTextLayer:()=>Jkt,version:()=>mSt});const Us=typeof Xu=="object"&&Xu+""=="[object process]"&&!Xu.versions.nw&&!(Xu.versions.electron&&Xu.type&&Xu.type!=="browser"),nMe=[1,0,0,1,0,0],LU=[.001,0,0,.001,0,0],F$t=1e7,xO=1.35,cc={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},Y0={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},O$t="pdfjs_internal_editor_",Zi={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15},pi={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},N$t={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},Rs={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},hk={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},ba={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},N9={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},XL={ERRORS:0,WARNINGS:1,INFOS:5},IU={NONE:0,BINARY:1},v1={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},H$t={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let eI=XL.WARNINGS;function _$t(e){Number.isInteger(e)&&(eI=e)}function V$t(){return eI}function tI(e){eI>=XL.INFOS&&console.log(`Info: ${e}`)}function zi(e){eI>=XL.WARNINGS&&console.log(`Warning: ${e}`)}function Dr(e){throw new Error(e)}function ka(e,t){e||Dr(t)}function Q$t(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function U$t(e,t=null,i=null){if(!e)return null;try{if(i&&typeof e=="string"&&(i.addDefaultProtocol&&e.startsWith("www.")&&e.match(/\./g)?.length>=2&&(e=`http://${e}`),i.tryConvertEncoding))try{e=q$t(e)}catch{}const n=t?new URL(e,t):new URL(e);if(Q$t(n))return n}catch{}return null}function ar(e,t,i,n=!1){return Object.defineProperty(e,t,{value:i,enumerable:!n,configurable:!0,writable:!1}),i}const Om=(function(){function t(i,n){this.constructor===t&&Dr("Cannot initialize BaseException."),this.message=i,this.name=n}return t.prototype=new Error,t.constructor=t,t})();class jU extends Om{constructor(t,i){super(t,"PasswordException"),this.code=i}}class MU extends Om{constructor(t,i){super(t,"UnknownErrorException"),this.details=i}}class aMe extends Om{constructor(t){super(t,"InvalidPDFException")}}class o4 extends Om{constructor(t){super(t,"MissingPDFException")}}class oI extends Om{constructor(t,i){super(t,"UnexpectedResponseException"),this.status=i}}class W$t extends Om{constructor(t){super(t,"FormatError")}}class i4 extends Om{constructor(t){super(t,"AbortException")}}function sMe(e){(typeof e!="object"||e?.length===void 0)&&Dr("Invalid argument for bytesToString");const t=e.length,i=8192;if(t<i)return String.fromCharCode.apply(null,e);const n=[];for(let a=0;a<t;a+=i){const l=Math.min(a+i,t),d=e.subarray(a,l);n.push(String.fromCharCode.apply(null,d))}return n.join("")}function iI(e){typeof e!="string"&&Dr("Invalid argument for stringToBytes");const t=e.length,i=new Uint8Array(t);for(let n=0;n<t;++n)i[n]=e.charCodeAt(n)&255;return i}function G$t(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function qK(e){const t=Object.create(null);for(const[i,n]of e)t[i]=n;return t}function Y$t(){const e=new Uint8Array(4);return e[0]=1,new Uint32Array(e.buffer,0,1)[0]===1}function K$t(){try{return new Function(""),!0}catch{return!1}}class ql{static get isLittleEndian(){return ar(this,"isLittleEndian",Y$t())}static get isEvalSupported(){return ar(this,"isEvalSupported",K$t())}static get isOffscreenCanvasSupported(){return ar(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator<"u"&&typeof navigator?.platform=="string"?ar(this,"platform",{isMac:navigator.platform.includes("Mac")}):ar(this,"platform",{isMac:!1})}static get isCSSRoundSupported(){return ar(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const yO=Array.from(Array(256).keys(),e=>e.toString(16).padStart(2,"0"));class $o{static makeHexColor(t,i,n){return`#${yO[t]}${yO[i]}${yO[n]}`}static scaleMinMax(t,i){let n;t[0]?(t[0]<0&&(n=i[0],i[0]=i[2],i[2]=n),i[0]*=t[0],i[2]*=t[0],t[3]<0&&(n=i[1],i[1]=i[3],i[3]=n),i[1]*=t[3],i[3]*=t[3]):(n=i[0],i[0]=i[1],i[1]=n,n=i[2],i[2]=i[3],i[3]=n,t[1]<0&&(n=i[1],i[1]=i[3],i[3]=n),i[1]*=t[1],i[3]*=t[1],t[2]<0&&(n=i[0],i[0]=i[2],i[2]=n),i[0]*=t[2],i[2]*=t[2]),i[0]+=t[4],i[1]+=t[5],i[2]+=t[4],i[3]+=t[5]}static transform(t,i){return[t[0]*i[0]+t[2]*i[1],t[1]*i[0]+t[3]*i[1],t[0]*i[2]+t[2]*i[3],t[1]*i[2]+t[3]*i[3],t[0]*i[4]+t[2]*i[5]+t[4],t[1]*i[4]+t[3]*i[5]+t[5]]}static applyTransform(t,i){const n=t[0]*i[0]+t[1]*i[2]+i[4],a=t[0]*i[1]+t[1]*i[3]+i[5];return[n,a]}static applyInverseTransform(t,i){const n=i[0]*i[3]-i[1]*i[2],a=(t[0]*i[3]-t[1]*i[2]+i[2]*i[5]-i[4]*i[3])/n,l=(-t[0]*i[1]+t[1]*i[0]+i[4]*i[1]-i[5]*i[0])/n;return[a,l]}static getAxialAlignedBoundingBox(t,i){const n=this.applyTransform(t,i),a=this.applyTransform(t.slice(2,4),i),l=this.applyTransform([t[0],t[3]],i),d=this.applyTransform([t[2],t[1]],i);return[Math.min(n[0],a[0],l[0],d[0]),Math.min(n[1],a[1],l[1],d[1]),Math.max(n[0],a[0],l[0],d[0]),Math.max(n[1],a[1],l[1],d[1])]}static inverseTransform(t){const i=t[0]*t[3]-t[1]*t[2];return[t[3]/i,-t[1]/i,-t[2]/i,t[0]/i,(t[2]*t[5]-t[4]*t[3])/i,(t[4]*t[1]-t[5]*t[0])/i]}static singularValueDecompose2dScale(t){const i=[t[0],t[2],t[1],t[3]],n=t[0]*i[0]+t[1]*i[2],a=t[0]*i[1]+t[1]*i[3],l=t[2]*i[0]+t[3]*i[2],d=t[2]*i[1]+t[3]*i[3],c=(n+d)/2,p=Math.sqrt((n+d)**2-4*(n*d-l*a))/2,h=c+p||1,u=c-p||1;return[Math.sqrt(h),Math.sqrt(u)]}static normalizeRect(t){const i=t.slice(0);return t[0]>t[2]&&(i[0]=t[2],i[2]=t[0]),t[1]>t[3]&&(i[1]=t[3],i[3]=t[1]),i}static intersect(t,i){const n=Math.max(Math.min(t[0],t[2]),Math.min(i[0],i[2])),a=Math.min(Math.max(t[0],t[2]),Math.max(i[0],i[2]));if(n>a)return null;const l=Math.max(Math.min(t[1],t[3]),Math.min(i[1],i[3])),d=Math.min(Math.max(t[1],t[3]),Math.max(i[1],i[3]));return l>d?null:[n,l,a,d]}static#e(t,i,n,a,l,d,c,p,h,u){if(h<=0||h>=1)return;const m=1-h,f=h*h,x=f*h,y=m*(m*(m*t+3*h*i)+3*f*n)+x*a,w=m*(m*(m*l+3*h*d)+3*f*c)+x*p;u[0]=Math.min(u[0],y),u[1]=Math.min(u[1],w),u[2]=Math.max(u[2],y),u[3]=Math.max(u[3],w)}static#t(t,i,n,a,l,d,c,p,h,u,m,f){if(Math.abs(h)<1e-12){Math.abs(u)>=1e-12&&this.#e(t,i,n,a,l,d,c,p,-m/u,f);return}const x=u**2-4*m*h;if(x<0)return;const y=Math.sqrt(x),w=2*h;this.#e(t,i,n,a,l,d,c,p,(-u+y)/w,f),this.#e(t,i,n,a,l,d,c,p,(-u-y)/w,f)}static bezierBoundingBox(t,i,n,a,l,d,c,p,h){return h?(h[0]=Math.min(h[0],t,c),h[1]=Math.min(h[1],i,p),h[2]=Math.max(h[2],t,c),h[3]=Math.max(h[3],i,p)):h=[Math.min(t,c),Math.min(i,p),Math.max(t,c),Math.max(i,p)],this.#t(t,n,l,c,i,a,d,p,3*(-t+3*(n-l)+c),6*(t-2*n+l),3*(n-t),h),this.#t(t,n,l,c,i,a,d,p,3*(-i+3*(a-d)+p),6*(i-2*a+d),3*(a-i),h),h}}function q$t(e){return decodeURIComponent(escape(e))}let wO=null,Spe=null;function Z$t(e){return wO||(wO=/([\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,Spe=new Map([["ſt","ſt"]])),e.replaceAll(wO,(t,i,n)=>i?i.normalize("NFKC"):Spe.get(n))}function J$t(){if(typeof crypto<"u"&&typeof crypto?.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(32);if(typeof crypto<"u"&&typeof crypto?.getRandomValues=="function")crypto.getRandomValues(e);else for(let t=0;t<32;t++)e[t]=Math.floor(Math.random()*255);return sMe(e)}const lMe="pdfjs_internal_id_",Ru={BEZIER_CURVE_TO:0,MOVE_TO:1,LINE_TO:2,QUADRATIC_CURVE_TO:3,RESTORE:4,SAVE:5,SCALE:6,TRANSFORM:7,TRANSLATE:8};class rI{constructor(){this.constructor===rI&&Dr("Cannot initialize BaseFilterFactory.")}addFilter(t){return"none"}addHCMFilter(t,i){return"none"}addAlphaFilter(t){return"none"}addLuminosityFilter(t){return"none"}addHighlightHCMFilter(t,i,n,a,l){return"none"}destroy(t=!1){}}class nI{#e=!1;constructor({enableHWA:t=!1}={}){this.constructor===nI&&Dr("Cannot initialize BaseCanvasFactory."),this.#e=t}create(t,i){if(t<=0||i<=0)throw new Error("Invalid canvas size");const n=this._createCanvas(t,i);return{canvas:n,context:n.getContext("2d",{willReadFrequently:!this.#e})}}reset(t,i,n){if(!t.canvas)throw new Error("Canvas is not specified");if(i<=0||n<=0)throw new Error("Invalid canvas size");t.canvas.width=i,t.canvas.height=n}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}_createCanvas(t,i){Dr("Abstract method `_createCanvas` called.")}}class aI{constructor({baseUrl:t=null,isCompressed:i=!0}){this.constructor===aI&&Dr("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=t,this.isCompressed=i}async fetch({name:t}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");const i=this.baseUrl+t+(this.isCompressed?".bcmap":""),n=this.isCompressed?IU.BINARY:IU.NONE;return this._fetchData(i,n).catch(a=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${i}`)})}_fetchData(t,i){Dr("Abstract method `_fetchData` called.")}}class sI{constructor({baseUrl:t=null}){this.constructor===sI&&Dr("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=t}async fetch({filename:t}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!t)throw new Error("Font filename must be specified.");const i=`${this.baseUrl}${t}`;return this._fetchData(i).catch(n=>{throw new Error(`Unable to load font data at: ${i}`)})}_fetchData(t){Dr("Abstract method `_fetchData` called.")}}class ZK{constructor(){this.constructor===ZK&&Dr("Cannot initialize BaseSVGFactory.")}create(t,i,n=!1){if(t<=0||i<=0)throw new Error("Invalid SVG dimensions");const a=this._createSVG("svg:svg");return a.setAttribute("version","1.1"),n||(a.setAttribute("width",`${t}px`),a.setAttribute("height",`${i}px`)),a.setAttribute("preserveAspectRatio","none"),a.setAttribute("viewBox",`0 0 ${t} ${i}`),a}createElement(t){if(typeof t!="string")throw new Error("Invalid SVG element type");return this._createSVG(t)}_createSVG(t){Dr("Abstract method `_createSVG` called.")}}const Qu="http://www.w3.org/2000/svg";class $6{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}class X$t extends rI{#e;#t;#o;#r;#s;#i=0;constructor({docId:t,ownerDocument:i=globalThis.document}={}){super(),this.#o=t,this.#r=i}get#n(){return this.#e||=new Map}get#l(){return this.#s||=new Map}get#c(){if(!this.#t){const t=this.#r.createElement("div"),{style:i}=t;i.visibility="hidden",i.contain="strict",i.width=i.height=0,i.position="absolute",i.top=i.left=0,i.zIndex=-1;const n=this.#r.createElementNS(Qu,"svg");n.setAttribute("width",0),n.setAttribute("height",0),this.#t=this.#r.createElementNS(Qu,"defs"),t.append(n),n.append(this.#t),this.#r.body.append(t)}return this.#t}#p(t){if(t.length===1){const p=t[0],h=new Array(256);for(let m=0;m<256;m++)h[m]=p[m]/255;const u=h.join(",");return[u,u,u]}const[i,n,a]=t,l=new Array(256),d=new Array(256),c=new Array(256);for(let p=0;p<256;p++)l[p]=i[p]/255,d[p]=n[p]/255,c[p]=a[p]/255;return[l.join(","),d.join(","),c.join(",")]}addFilter(t){if(!t)return"none";let i=this.#n.get(t);if(i)return i;const[n,a,l]=this.#p(t),d=t.length===1?n:`${n}${a}${l}`;if(i=this.#n.get(d),i)return this.#n.set(t,i),i;const c=`g_${this.#o}_transfer_map_${this.#i++}`,p=`url(#${c})`;this.#n.set(t,p),this.#n.set(d,p);const h=this.#a(c);return this.#f(n,a,l,h),p}addHCMFilter(t,i){const n=`${t}-${i}`,a="base";let l=this.#l.get(a);if(l?.key===n||(l?(l.filter?.remove(),l.key=n,l.url="none",l.filter=null):(l={key:n,url:"none",filter:null},this.#l.set(a,l)),!t||!i))return l.url;const d=this.#y(t);t=$o.makeHexColor(...d);const c=this.#y(i);if(i=$o.makeHexColor(...c),this.#c.style.color="",t==="#000000"&&i==="#ffffff"||t===i)return l.url;const p=new Array(256);for(let x=0;x<=255;x++){const y=x/255;p[x]=y<=.03928?y/12.92:((y+.055)/1.055)**2.4}const h=p.join(","),u=`g_${this.#o}_hcm_filter`,m=l.filter=this.#a(u);this.#f(h,h,h,m),this.#d(m);const f=(x,y)=>{const w=d[x]/255,b=c[x]/255,C=new Array(y+1);for(let k=0;k<=y;k++)C[k]=w+k/y*(b-w);return C.join(",")};return this.#f(f(0,5),f(1,5),f(2,5),m),l.url=`url(#${u})`,l.url}addAlphaFilter(t){let i=this.#n.get(t);if(i)return i;const[n]=this.#p([t]),a=`alpha_${n}`;if(i=this.#n.get(a),i)return this.#n.set(t,i),i;const l=`g_${this.#o}_alpha_map_${this.#i++}`,d=`url(#${l})`;this.#n.set(t,d),this.#n.set(a,d);const c=this.#a(l);return this.#h(n,c),d}addLuminosityFilter(t){let i=this.#n.get(t||"luminosity");if(i)return i;let n,a;if(t?([n]=this.#p([t]),a=`luminosity_${n}`):a="luminosity",i=this.#n.get(a),i)return this.#n.set(t,i),i;const l=`g_${this.#o}_luminosity_map_${this.#i++}`,d=`url(#${l})`;this.#n.set(t,d),this.#n.set(a,d);const c=this.#a(l);return this.#u(c),t&&this.#h(n,c),d}addHighlightHCMFilter(t,i,n,a,l){const d=`${i}-${n}-${a}-${l}`;let c=this.#l.get(t);if(c?.key===d||(c?(c.filter?.remove(),c.key=d,c.url="none",c.filter=null):(c={key:d,url:"none",filter:null},this.#l.set(t,c)),!i||!n))return c.url;const[p,h]=[i,n].map(this.#y.bind(this));let u=Math.round(.2126*p[0]+.7152*p[1]+.0722*p[2]),m=Math.round(.2126*h[0]+.7152*h[1]+.0722*h[2]),[f,x]=[a,l].map(this.#y.bind(this));m<u&&([u,m,f,x]=[m,u,x,f]),this.#c.style.color="";const y=(C,k,L)=>{const S=new Array(256),j=(m-u)/L,I=C/255,P=(k-C)/(255*L);let B=0;for(let T=0;T<=L;T++){const D=Math.round(u+T*j),R=I+T*P;for(let G=B;G<=D;G++)S[G]=R;B=D+1}for(let T=B;T<256;T++)S[T]=S[B-1];return S.join(",")},w=`g_${this.#o}_hcm_${t}_filter`,b=c.filter=this.#a(w);return this.#d(b),this.#f(y(f[0],x[0],5),y(f[1],x[1],5),y(f[2],x[2],5),b),c.url=`url(#${w})`,c.url}destroy(t=!1){t&&this.#l.size!==0||(this.#t&&(this.#t.parentNode.parentNode.remove(),this.#t=null),this.#e&&(this.#e.clear(),this.#e=null),this.#i=0)}#u(t){const i=this.#r.createElementNS(Qu,"feColorMatrix");i.setAttribute("type","matrix"),i.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"),t.append(i)}#d(t){const i=this.#r.createElementNS(Qu,"feColorMatrix");i.setAttribute("type","matrix"),i.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"),t.append(i)}#a(t){const i=this.#r.createElementNS(Qu,"filter");return i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("id",t),this.#c.append(i),i}#m(t,i,n){const a=this.#r.createElementNS(Qu,i);a.setAttribute("type","discrete"),a.setAttribute("tableValues",n),t.append(a)}#f(t,i,n,a){const l=this.#r.createElementNS(Qu,"feComponentTransfer");a.append(l),this.#m(l,"feFuncR",t),this.#m(l,"feFuncG",i),this.#m(l,"feFuncB",n)}#h(t,i){const n=this.#r.createElementNS(Qu,"feComponentTransfer");i.append(n),this.#m(n,"feFuncA",t)}#y(t){return this.#c.style.color=t,oq(getComputedStyle(this.#c).getPropertyValue("color"))}}class ekt extends nI{constructor({ownerDocument:t=globalThis.document,enableHWA:i=!1}={}){super({enableHWA:i}),this._document=t}_createCanvas(t,i){const n=this._document.createElement("canvas");return n.width=t,n.height=i,n}}async function lI(e,t="text"){if(Wx(e,document.baseURI)){const i=await fetch(e);if(!i.ok)throw new Error(i.statusText);switch(t){case"arraybuffer":return i.arrayBuffer();case"blob":return i.blob();case"json":return i.json()}return i.text()}return new Promise((i,n)=>{const a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType=t,a.onreadystatechange=()=>{if(a.readyState===XMLHttpRequest.DONE){if(a.status===200||a.status===0){switch(t){case"arraybuffer":case"blob":case"json":i(a.response);return}i(a.responseText);return}n(new Error(a.statusText))}},a.send(null)})}class dMe extends aI{_fetchData(t,i){return lI(t,this.isCompressed?"arraybuffer":"text").then(n=>({cMapData:n instanceof ArrayBuffer?new Uint8Array(n):iI(n),compressionType:i}))}}class cMe extends sI{_fetchData(t){return lI(t,"arraybuffer").then(i=>new Uint8Array(i))}}class JK extends ZK{_createSVG(t){return document.createElementNS(Qu,t)}}class kb{constructor({viewBox:t,scale:i,rotation:n,offsetX:a=0,offsetY:l=0,dontFlip:d=!1}){this.viewBox=t,this.scale=i,this.rotation=n,this.offsetX=a,this.offsetY=l;const c=(t[2]+t[0])/2,p=(t[3]+t[1])/2;let h,u,m,f;switch(n%=360,n<0&&(n+=360),n){case 180:h=-1,u=0,m=0,f=1;break;case 90:h=0,u=1,m=1,f=0;break;case 270:h=0,u=-1,m=-1,f=0;break;case 0:h=1,u=0,m=0,f=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}d&&(m=-m,f=-f);let x,y,w,b;h===0?(x=Math.abs(p-t[1])*i+a,y=Math.abs(c-t[0])*i+l,w=(t[3]-t[1])*i,b=(t[2]-t[0])*i):(x=Math.abs(c-t[0])*i+a,y=Math.abs(p-t[1])*i+l,w=(t[2]-t[0])*i,b=(t[3]-t[1])*i),this.transform=[h*i,u*i,m*i,f*i,x-h*i*c-m*i*p,y-u*i*c-f*i*p],this.width=w,this.height=b}get rawDims(){const{viewBox:t}=this;return ar(this,"rawDims",{pageWidth:t[2]-t[0],pageHeight:t[3]-t[1],pageX:t[0],pageY:t[1]})}clone({scale:t=this.scale,rotation:i=this.rotation,offsetX:n=this.offsetX,offsetY:a=this.offsetY,dontFlip:l=!1}={}){return new kb({viewBox:this.viewBox.slice(),scale:t,rotation:i,offsetX:n,offsetY:a,dontFlip:l})}convertToViewportPoint(t,i){return $o.applyTransform([t,i],this.transform)}convertToViewportRectangle(t){const i=$o.applyTransform([t[0],t[1]],this.transform),n=$o.applyTransform([t[2],t[3]],this.transform);return[i[0],i[1],n[0],n[1]]}convertToPdfPoint(t,i){return $o.applyInverseTransform([t,i],this.transform)}}class XK extends Om{constructor(t,i=0){super(t,"RenderingCancelledException"),this.extraDelay=i}}function eq(e){const t=e.length;let i=0;for(;i<t&&e[i].trim()==="";)i++;return e.substring(i,i+5).toLowerCase()==="data:"}function tq(e){return typeof e=="string"&&/\.pdf$/i.test(e)}function tkt(e){return[e]=e.split(/[#?]/,1),e.substring(e.lastIndexOf("/")+1)}function okt(e,t="document.pdf"){if(typeof e!="string")return t;if(eq(e))return zi('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const i=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/,n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,a=i.exec(e);let l=n.exec(a[1])||n.exec(a[2])||n.exec(a[3]);if(l&&(l=l[0],l.includes("%")))try{l=n.exec(decodeURIComponent(l))[0]}catch{}return l||t}class Epe{started=Object.create(null);times=[];time(t){t in this.started&&zi(`Timer is already running for ${t}`),this.started[t]=Date.now()}timeEnd(t){t in this.started||zi(`Timer has not been started for ${t}`),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let i=0;for(const{name:n}of this.times)i=Math.max(n.length,i);for(const{name:n,start:a,end:l}of this.times)t.push(`${n.padEnd(i)} ${l-a}ms
|
|
88
|
-
`);return t.join("")}}function Wx(e,t){try{const{protocol:i}=t?new URL(e,t):new URL(e);return i==="http:"||i==="https:"}catch{return!1}}function od(e){e.preventDefault()}function pMe(e){console.log("Deprecated API usage: "+e)}let Lpe;class hMe{static toDateObject(t){if(!t||typeof t!="string")return null;Lpe||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const i=Lpe.exec(t);if(!i)return null;const n=parseInt(i[1],10);let a=parseInt(i[2],10);a=a>=1&&a<=12?a-1:0;let l=parseInt(i[3],10);l=l>=1&&l<=31?l:1;let d=parseInt(i[4],10);d=d>=0&&d<=23?d:0;let c=parseInt(i[5],10);c=c>=0&&c<=59?c:0;let p=parseInt(i[6],10);p=p>=0&&p<=59?p:0;const h=i[7]||"Z";let u=parseInt(i[8],10);u=u>=0&&u<=23?u:0;let m=parseInt(i[9],10)||0;return m=m>=0&&m<=59?m:0,h==="-"?(d+=u,c+=m):h==="+"&&(d-=u,c-=m),new Date(Date.UTC(n,a,l,d,c,p))}}function ikt(e,{scale:t=1,rotation:i=0}){const{width:n,height:a}=e.attributes.style,l=[0,0,parseInt(n),parseInt(a)];return new kb({viewBox:l,scale:t,rotation:i})}function oq(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map(t=>parseInt(t)):e.startsWith("rgba(")?e.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(zi(`Not a valid color format: "${e}"`),[0,0,0])}function rkt(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const i of e.keys()){t.style.color=i;const n=window.getComputedStyle(t).color;e.set(i,oq(n))}t.remove()}function gn(e){const{a:t,b:i,c:n,d:a,e:l,f:d}=e.getTransform();return[t,i,n,a,l,d]}function Fu(e){const{a:t,b:i,c:n,d:a,e:l,f:d}=e.getTransform().invertSelf();return[t,i,n,a,l,d]}function Pf(e,t,i=!1,n=!0){if(t instanceof kb){const{pageWidth:a,pageHeight:l}=t.rawDims,{style:d}=e,c=ql.isCSSRoundSupported,p=`var(--scale-factor) * ${a}px`,h=`var(--scale-factor) * ${l}px`,u=c?`round(${p}, 1px)`:`calc(${p})`,m=c?`round(${h}, 1px)`:`calc(${h})`;!i||t.rotation%180===0?(d.width=u,d.height=m):(d.width=m,d.height=u)}n&&e.setAttribute("data-main-rotation",t.rotation)}class iq{#e=null;#t=null;#o;#r=null;constructor(t){this.#o=t}render(){const t=this.#e=document.createElement("div");t.className="editToolbar",t.setAttribute("role","toolbar");const i=this.#o._uiManager._signal;t.addEventListener("contextmenu",od,{signal:i}),t.addEventListener("pointerdown",iq.#s,{signal:i});const n=this.#r=document.createElement("div");n.className="buttons",t.append(n);const a=this.#o.toolbarPosition;if(a){const{style:l}=t,d=this.#o._uiManager.direction==="ltr"?1-a[0]:a[0];l.insetInlineEnd=`${100*d}%`,l.top=`calc(${100*a[1]}% + var(--editor-toolbar-vert-offset))`}return this.#c(),t}static#s(t){t.stopPropagation()}#i(t){this.#o._focusEventsAllowed=!1,t.preventDefault(),t.stopPropagation()}#n(t){this.#o._focusEventsAllowed=!0,t.preventDefault(),t.stopPropagation()}#l(t){const i=this.#o._uiManager._signal;t.addEventListener("focusin",this.#i.bind(this),{capture:!0,signal:i}),t.addEventListener("focusout",this.#n.bind(this),{capture:!0,signal:i}),t.addEventListener("contextmenu",od,{signal:i})}hide(){this.#e.classList.add("hidden"),this.#t?.hideDropdown()}show(){this.#e.classList.remove("hidden")}#c(){const t=document.createElement("button");t.className="delete",t.tabIndex=0,t.setAttribute("data-l10n-id",`pdfjs-editor-remove-${this.#o.editorType}-button`),this.#l(t),t.addEventListener("click",i=>{this.#o._uiManager.delete()},{signal:this.#o._uiManager._signal}),this.#r.append(t)}get#p(){const t=document.createElement("div");return t.className="divider",t}addAltTextButton(t){this.#l(t),this.#r.prepend(t,this.#p)}addColorPicker(t){this.#t=t;const i=t.renderButton();this.#l(i),this.#r.prepend(i,this.#p)}remove(){this.#e.remove(),this.#t?.destroy(),this.#t=null}}class nkt{#e=null;#t=null;#o;constructor(t){this.#o=t}#r(){const t=this.#t=document.createElement("div");t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",od,{signal:this.#o._signal});const i=this.#e=document.createElement("div");return i.className="buttons",t.append(i),this.#i(),t}#s(t,i){let n=0,a=0;for(const l of t){const d=l.y+l.height;if(d<n)continue;const c=l.x+(i?l.width:0);if(d>n){a=c,n=d;continue}i?c>a&&(a=c):c<a&&(a=c)}return[i?1-a:a,n]}show(t,i,n){const[a,l]=this.#s(i,n),{style:d}=this.#t||=this.#r();t.append(this.#t),d.insetInlineEnd=`${100*a}%`,d.top=`calc(${100*l}% + var(--editor-toolbar-vert-offset))`}hide(){this.#t.remove()}#i(){const t=document.createElement("button");t.className="highlightButton",t.tabIndex=0,t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const i=document.createElement("span");t.append(i),i.className="visuallyHidden",i.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const n=this.#o._signal;t.addEventListener("contextmenu",od,{signal:n}),t.addEventListener("click",()=>{this.#o.highlightSelection("floating_button")},{signal:n}),this.#e.append(t)}}function kS(e,t,i){for(const n of i)t.addEventListener(n,e[n].bind(e))}function akt(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")}class skt{#e=0;get id(){return`${O$t}${this.#e++}`}}class rq{#e=J$t();#t=0;#o=null;static get _isSVGFittingCanvas(){const t='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>',n=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),a=new Image;a.src=t;const l=a.decode().then(()=>(n.drawImage(a,0,0,1,1,0,0,1,3),new Uint32Array(n.getImageData(0,0,1,1).data.buffer)[0]===0));return ar(this,"_isSVGFittingCanvas",l)}async#r(t,i){this.#o||=new Map;let n=this.#o.get(t);if(n===null)return null;if(n?.bitmap)return n.refCounter+=1,n;try{n||={bitmap:null,id:`image_${this.#e}_${this.#t++}`,refCounter:0,isSvg:!1};let a;if(typeof i=="string"?(n.url=i,a=await lI(i,"blob")):a=n.file=i,a.type==="image/svg+xml"){const l=rq._isSVGFittingCanvas,d=new FileReader,c=new Image,p=new Promise((h,u)=>{c.onload=()=>{n.bitmap=c,n.isSvg=!0,h()},d.onload=async()=>{const m=n.svgUrl=d.result;c.src=await l?`${m}#svgView(preserveAspectRatio(none))`:m},c.onerror=d.onerror=u});d.readAsDataURL(a),await p}else n.bitmap=await createImageBitmap(a);n.refCounter=1}catch(a){console.error(a),n=null}return this.#o.set(t,n),n&&this.#o.set(n.id,n),n}async getFromFile(t){const{lastModified:i,name:n,size:a,type:l}=t;return this.#r(`${i}_${n}_${a}_${l}`,t)}async getFromUrl(t){return this.#r(t,t)}async getFromId(t){this.#o||=new Map;const i=this.#o.get(t);return i?i.bitmap?(i.refCounter+=1,i):i.file?this.getFromFile(i.file):this.getFromUrl(i.url):null}getSvgUrl(t){const i=this.#o.get(t);return i?.isSvg?i.svgUrl:null}deleteId(t){this.#o||=new Map;const i=this.#o.get(t);i&&(i.refCounter-=1,i.refCounter===0&&(i.bitmap=null))}isValidId(t){return t.startsWith(`image_${this.#e}_`)}}class lkt{#e=[];#t=!1;#o;#r=-1;constructor(t=128){this.#o=t}add({cmd:t,undo:i,post:n,mustExec:a,type:l=NaN,overwriteIfSameType:d=!1,keepUndo:c=!1}){if(a&&t(),this.#t)return;const p={cmd:t,undo:i,post:n,type:l};if(this.#r===-1){this.#e.length>0&&(this.#e.length=0),this.#r=0,this.#e.push(p);return}if(d&&this.#e[this.#r].type===l){c&&(p.undo=this.#e[this.#r].undo),this.#e[this.#r]=p;return}const h=this.#r+1;h===this.#o?this.#e.splice(0,1):(this.#r=h,h<this.#e.length&&this.#e.splice(h)),this.#e.push(p)}undo(){if(this.#r===-1)return;this.#t=!0;const{undo:t,post:i}=this.#e[this.#r];t(),i?.(),this.#t=!1,this.#r-=1}redo(){if(this.#r<this.#e.length-1){this.#r+=1,this.#t=!0;const{cmd:t,post:i}=this.#e[this.#r];t(),i?.(),this.#t=!1}}hasSomethingToUndo(){return this.#r!==-1}hasSomethingToRedo(){return this.#r<this.#e.length-1}destroy(){this.#e=null}}class Sb{constructor(t){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:i}=ql.platform;for(const[n,a,l={}]of t)for(const d of n){const c=d.startsWith("mac+");i&&c?(this.callbacks.set(d.slice(4),{callback:a,options:l}),this.allKeys.add(d.split("+").at(-1))):!i&&!c&&(this.callbacks.set(d,{callback:a,options:l}),this.allKeys.add(d.split("+").at(-1)))}}#e(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const i=this.buffer.join("+");return this.buffer.length=0,i}exec(t,i){if(!this.allKeys.has(i.key))return;const n=this.callbacks.get(this.#e(i));if(!n)return;const{callback:a,options:{bubbles:l=!1,args:d=[],checker:c=null}}=n;c&&!c(t,i)||(a.bind(t,...d,i)(),l||(i.stopPropagation(),i.preventDefault()))}}class nq{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return rkt(t),ar(this,"_colors",t)}convert(t){const i=oq(t);if(!window.matchMedia("(forced-colors: active)").matches)return i;for(const[n,a]of this._colors)if(a.every((l,d)=>l===i[d]))return nq._colorsMapping.get(n);return i}getHexCode(t){const i=this._colors.get(t);return i?$o.makeHexColor(...i):t}}class km{#e=new AbortController;#t=null;#o=new Map;#r=new Map;#s=null;#i=null;#n=null;#l=new lkt;#c=0;#p=new Set;#u=null;#d=null;#a=new Set;#m=!1;#f=null;#h=null;#y=null;#g=!1;#w=null;#v=new skt;#A=!1;#k=!1;#S=null;#j=null;#$=null;#b=Zi.NONE;#x=new Set;#C=null;#E=null;#L=null;#B=this.blur.bind(this);#M=this.focus.bind(this);#P=this.copy.bind(this);#D=this.cut.bind(this);#z=this.paste.bind(this);#T=this.keydown.bind(this);#Q=this.keyup.bind(this);#U=this.onEditingAction.bind(this);#_=this.onPageChanging.bind(this);#N=this.onScaleChanging.bind(this);#R=this.onRotationChanging.bind(this);#K={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#V=[0,0];#F=null;#H=null;#q=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=km.prototype,i=d=>d.#H.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&d.hasSomethingToControl(),n=(d,{target:c})=>{if(c instanceof HTMLInputElement){const{type:p}=c;return p!=="text"&&p!=="number"}return!0},a=this.TRANSLATE_SMALL,l=this.TRANSLATE_BIG;return ar(this,"_keyboardManager",new Sb([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:n}],[["ctrl+z","mac+meta+z"],t.undo,{checker:n}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:n}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:n}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(d,{target:c})=>!(c instanceof HTMLButtonElement)&&d.#H.contains(c)&&!d.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(d,{target:c})=>!(c instanceof HTMLButtonElement)&&d.#H.contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-a,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-l,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[a,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[l,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-a],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-l],checker:i}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,a],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,l],checker:i}]]))}constructor(t,i,n,a,l,d,c,p,h){this._signal=this.#e.signal,this.#H=t,this.#q=i,this.#s=n,this._eventBus=a,this._eventBus._on("editingaction",this.#U),this._eventBus._on("pagechanging",this.#_),this._eventBus._on("scalechanging",this.#N),this._eventBus._on("rotationchanging",this.#R),this.#re(),this.#le(),this.#Z(),this.#i=l.annotationStorage,this.#f=l.filterFactory,this.#E=d,this.#y=c||null,this.#m=p,this.#$=h||null,this.viewParameters={realScale:$6.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}destroy(){this.#e?.abort(),this.#e=null,this._signal=null,this._eventBus._off("editingaction",this.#U),this._eventBus._off("pagechanging",this.#_),this._eventBus._off("scalechanging",this.#N),this._eventBus._off("rotationchanging",this.#R);for(const t of this.#r.values())t.destroy();this.#r.clear(),this.#o.clear(),this.#a.clear(),this.#t=null,this.#x.clear(),this.#l.destroy(),this.#s?.destroy(),this.#w?.hide(),this.#w=null,this.#h&&(clearTimeout(this.#h),this.#h=null),this.#F&&(clearTimeout(this.#F),this.#F=null)}async mlGuess(t){return this.#$?.guess(t)||null}get hasMLManager(){return!!this.#$}get hcmFilter(){return ar(this,"hcmFilter",this.#E?this.#f.addHCMFilter(this.#E.foreground,this.#E.background):"none")}get direction(){return ar(this,"direction",getComputedStyle(this.#H).direction)}get highlightColors(){return ar(this,"highlightColors",this.#y?new Map(this.#y.split(",").map(t=>t.split("=").map(i=>i.trim()))):null)}get highlightColorNames(){return ar(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}setMainHighlightColorPicker(t){this.#j=t}editAltText(t){this.#s?.editAltText(this,t)}onPageChanging({pageNumber:t}){this.#c=t-1}focusMainContainer(){this.#H.focus()}findParent(t,i){for(const n of this.#r.values()){const{x:a,y:l,width:d,height:c}=n.div.getBoundingClientRect();if(t>=a&&t<=a+d&&i>=l&&i<=l+c)return n}return null}disableUserSelect(t=!1){this.#q.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#a.add(t)}removeShouldRescale(t){this.#a.delete(t)}onScaleChanging({scale:t}){this.commitOrRemove(),this.viewParameters.realScale=t*$6.PDF_TO_CSS_UNITS;for(const i of this.#a)i.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}#G({anchorNode:t}){return t.nodeType===Node.TEXT_NODE?t.parentElement:t}highlightSelection(t=""){const i=document.getSelection();if(!i||i.isCollapsed)return;const{anchorNode:n,anchorOffset:a,focusNode:l,focusOffset:d}=i,c=i.toString(),h=this.#G(i).closest(".textLayer"),u=this.getSelectionBoxes(h);if(u){i.empty(),this.#b===Zi.NONE&&(this._eventBus.dispatch("showannotationeditorui",{source:this,mode:Zi.HIGHLIGHT}),this.showAllEditors("highlight",!0,!0));for(const m of this.#r.values())if(m.hasTextLayer(h)){m.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:u,anchorNode:n,anchorOffset:a,focusNode:l,focusOffset:d,text:c});break}}}#oe(){const t=document.getSelection();if(!t||t.isCollapsed)return;const n=this.#G(t).closest(".textLayer"),a=this.getSelectionBoxes(n);a&&(this.#w||=new nkt(this),this.#w.show(n,a,this.direction==="ltr"))}addToAnnotationStorage(t){!t.isEmpty()&&this.#i&&!this.#i.has(t.id)&&this.#i.setValue(t.id,t)}#ie(){const t=document.getSelection();if(!t||t.isCollapsed){this.#C&&(this.#w?.hide(),this.#C=null,this.#I({hasSelectedText:!1}));return}const{anchorNode:i}=t;if(i===this.#C)return;if(!this.#G(t).closest(".textLayer")){this.#C&&(this.#w?.hide(),this.#C=null,this.#I({hasSelectedText:!1}));return}if(this.#w?.hide(),this.#C=i,this.#I({hasSelectedText:!0}),!(this.#b!==Zi.HIGHLIGHT&&this.#b!==Zi.NONE)&&(this.#b===Zi.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#g=this.isShiftKeyDown,!this.isShiftKeyDown)){const l=this._signal,d=c=>{c.type==="pointerup"&&c.button!==0||(window.removeEventListener("pointerup",d),window.removeEventListener("blur",d),c.type==="pointerup"&&this.#Y("main_toolbar"))};window.addEventListener("pointerup",d,{signal:l}),window.addEventListener("blur",d,{signal:l})}}#Y(t=""){this.#b===Zi.HIGHLIGHT?this.highlightSelection(t):this.#m&&this.#oe()}#re(){document.addEventListener("selectionchange",this.#ie.bind(this),{signal:this._signal})}#ne(){const t=this._signal;window.addEventListener("focus",this.#M,{signal:t}),window.addEventListener("blur",this.#B,{signal:t})}#ae(){window.removeEventListener("focus",this.#M),window.removeEventListener("blur",this.#B)}blur(){if(this.isShiftKeyDown=!1,this.#g&&(this.#g=!1,this.#Y("main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const i of this.#x)if(i.div.contains(t)){this.#S=[i,t],i._focusEventsAllowed=!1;break}}focus(){if(!this.#S)return;const[t,i]=this.#S;this.#S=null,i.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),i.focus()}#Z(){const t=this._signal;window.addEventListener("keydown",this.#T,{signal:t}),window.addEventListener("keyup",this.#Q,{signal:t})}#se(){window.removeEventListener("keydown",this.#T),window.removeEventListener("keyup",this.#Q)}#J(){const t=this._signal;document.addEventListener("copy",this.#P,{signal:t}),document.addEventListener("cut",this.#D,{signal:t}),document.addEventListener("paste",this.#z,{signal:t})}#X(){document.removeEventListener("copy",this.#P),document.removeEventListener("cut",this.#D),document.removeEventListener("paste",this.#z)}#le(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}addEditListeners(){this.#Z(),this.#J()}removeEditListeners(){this.#se(),this.#X()}dragOver(t){for(const{type:i}of t.dataTransfer.items)for(const n of this.#d)if(n.isHandlingMimeForPasting(i)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const i of t.dataTransfer.items)for(const n of this.#d)if(n.isHandlingMimeForPasting(i.type)){n.paste(i,this.currentLayer),t.preventDefault();return}}copy(t){if(t.preventDefault(),this.#t?.commitOrRemove(),!this.hasSelection)return;const i=[];for(const n of this.#x){const a=n.serialize(!0);a&&i.push(a)}i.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(i))}cut(t){this.copy(t),this.delete()}paste(t){t.preventDefault();const{clipboardData:i}=t;for(const l of i.items)for(const d of this.#d)if(d.isHandlingMimeForPasting(l.type)){d.paste(l,this.currentLayer);return}let n=i.getData("application/pdfjs");if(!n)return;try{n=JSON.parse(n)}catch(l){zi(`paste: "${l.message}".`);return}if(!Array.isArray(n))return;this.unselectAll();const a=this.currentLayer;try{const l=[];for(const p of n){const h=a.deserialize(p);if(!h)return;l.push(h)}const d=()=>{for(const p of l)this.#ee(p);this.#te(l)},c=()=>{for(const p of l)p.remove()};this.addCommands({cmd:d,undo:c,mustExec:!0})}catch(l){zi(`paste: "${l.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),this.#b!==Zi.NONE&&!this.isEditorHandlingKeyboard&&km._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,this.#g&&(this.#g=!1,this.#Y("main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#I(t){Object.entries(t).some(([n,a])=>this.#K[n]!==a)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#K,t)}),this.#b===Zi.HIGHLIGHT&&t.hasSelectedEditor===!1&&this.#O([[pi.HIGHLIGHT_FREE,!0]]))}#O(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#ne(),this.#J(),this.#I({isEditing:this.#b!==Zi.NONE,isEmpty:this.#W(),hasSomethingToUndo:this.#l.hasSomethingToUndo(),hasSomethingToRedo:this.#l.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#ae(),this.#X(),this.#I({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#d){this.#d=t;for(const i of this.#d)this.#O(i.defaultPropertiesToUpdate)}}getId(){return this.#v.id}get currentLayer(){return this.#r.get(this.#c)}getLayer(t){return this.#r.get(t)}get currentPageIndex(){return this.#c}addLayer(t){this.#r.set(t.pageIndex,t),this.#A?t.enable():t.disable()}removeLayer(t){this.#r.delete(t.pageIndex)}updateMode(t,i=null,n=!1){if(this.#b!==t){if(this.#b=t,t===Zi.NONE){this.setEditingState(!1),this.#ce();return}this.setEditingState(!0),this.#de(),this.unselectAll();for(const a of this.#r.values())a.updateMode(t);if(!i&&n){this.addNewEditorFromKeyboard();return}if(i){for(const a of this.#o.values())if(a.annotationElementId===i){this.setSelected(a),a.enterInEditMode();break}}}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t!==this.#b&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,i){if(this.#d){switch(t){case pi.CREATE:this.currentLayer.addNewEditor();return;case pi.HIGHLIGHT_DEFAULT_COLOR:this.#j?.updateColor(i);break;case pi.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#L||=new Map).set(t,i),this.showAllEditors("highlight",i);break}for(const n of this.#x)n.updateParams(t,i);for(const n of this.#d)n.updateDefaultParams(t,i)}}showAllEditors(t,i,n=!1){for(const l of this.#o.values())l.editorType===t&&l.show(i);(this.#L?.get(pi.HIGHLIGHT_SHOW_ALL)??!0)!==i&&this.#O([[pi.HIGHLIGHT_SHOW_ALL,i]])}enableWaiting(t=!1){if(this.#k!==t){this.#k=t;for(const i of this.#r.values())t?i.disableClick():i.enableClick(),i.div.classList.toggle("waiting",t)}}#de(){if(!this.#A){this.#A=!0;for(const t of this.#r.values())t.enable();for(const t of this.#o.values())t.enable()}}#ce(){if(this.unselectAll(),this.#A){this.#A=!1;for(const t of this.#r.values())t.disable();for(const t of this.#o.values())t.disable()}}getEditors(t){const i=[];for(const n of this.#o.values())n.pageIndex===t&&i.push(n);return i}getEditor(t){return this.#o.get(t)}addEditor(t){this.#o.set(t.id,t)}removeEditor(t){t.div.contains(document.activeElement)&&(this.#h&&clearTimeout(this.#h),this.#h=setTimeout(()=>{this.focusMainContainer(),this.#h=null},0)),this.#o.delete(t.id),this.unselect(t),(!t.annotationElementId||!this.#p.has(t.annotationElementId))&&this.#i?.remove(t.id)}addDeletedAnnotationElement(t){this.#p.add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return this.#p.has(t)}removeDeletedAnnotationElement(t){this.#p.delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}#ee(t){const i=this.#r.get(t.pageIndex);i?i.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}setActiveEditor(t){this.#t!==t&&(this.#t=t,t&&this.#O(t.propertiesToUpdate))}get#pe(){let t=null;for(t of this.#x);return t}updateUI(t){this.#pe===t&&this.#O(t.propertiesToUpdate)}toggleSelected(t){if(this.#x.has(t)){this.#x.delete(t),t.unselect(),this.#I({hasSelectedEditor:this.hasSelection});return}this.#x.add(t),t.select(),this.#O(t.propertiesToUpdate),this.#I({hasSelectedEditor:!0})}setSelected(t){for(const i of this.#x)i!==t&&i.unselect();this.#x.clear(),this.#x.add(t),t.select(),this.#O(t.propertiesToUpdate),this.#I({hasSelectedEditor:!0})}isSelected(t){return this.#x.has(t)}get firstSelectedEditor(){return this.#x.values().next().value}unselect(t){t.unselect(),this.#x.delete(t),this.#I({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#x.size!==0}get isEnterHandled(){return this.#x.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#l.undo(),this.#I({hasSomethingToUndo:this.#l.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#W()})}redo(){this.#l.redo(),this.#I({hasSomethingToUndo:!0,hasSomethingToRedo:this.#l.hasSomethingToRedo(),isEmpty:this.#W()})}addCommands(t){this.#l.add(t),this.#I({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#W()})}#W(){if(this.#o.size===0)return!0;if(this.#o.size===1)for(const t of this.#o.values())return t.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const t=[...this.#x],i=()=>{for(const a of t)a.remove()},n=()=>{for(const a of t)this.#ee(a)};this.addCommands({cmd:i,undo:n,mustExec:!0})}commitOrRemove(){this.#t?.commitOrRemove()}hasSomethingToControl(){return this.#t||this.hasSelection}#te(t){for(const i of this.#x)i.unselect();this.#x.clear();for(const i of t)i.isEmpty()||(this.#x.add(i),i.select());this.#I({hasSelectedEditor:this.hasSelection})}selectAll(){for(const t of this.#x)t.commit();this.#te(this.#o.values())}unselectAll(){if(!(this.#t&&(this.#t.commitOrRemove(),this.#b!==Zi.NONE))&&this.hasSelection){for(const t of this.#x)t.unselect();this.#x.clear(),this.#I({hasSelectedEditor:!1})}}translateSelectedEditors(t,i,n=!1){if(n||this.commitOrRemove(),!this.hasSelection)return;this.#V[0]+=t,this.#V[1]+=i;const[a,l]=this.#V,d=[...this.#x],c=1e3;this.#F&&clearTimeout(this.#F),this.#F=setTimeout(()=>{this.#F=null,this.#V[0]=this.#V[1]=0,this.addCommands({cmd:()=>{for(const p of d)this.#o.has(p.id)&&p.translateInPage(a,l)},undo:()=>{for(const p of d)this.#o.has(p.id)&&p.translateInPage(-a,-l)},mustExec:!1})},c);for(const p of d)p.translateInPage(t,i)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#u=new Map;for(const t of this.#x)this.#u.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#u)return!1;this.disableUserSelect(!1);const t=this.#u;this.#u=null;let i=!1;for(const[{x:a,y:l,pageIndex:d},c]of t)c.newX=a,c.newY=l,c.newPageIndex=d,i||=a!==c.savedX||l!==c.savedY||d!==c.savedPageIndex;if(!i)return!1;const n=(a,l,d,c)=>{if(this.#o.has(a.id)){const p=this.#r.get(c);p?a._setParentAndPosition(p,l,d):(a.pageIndex=c,a.x=l,a.y=d)}};return this.addCommands({cmd:()=>{for(const[a,{newX:l,newY:d,newPageIndex:c}]of t)n(a,l,d,c)},undo:()=>{for(const[a,{savedX:l,savedY:d,savedPageIndex:c}]of t)n(a,l,d,c)},mustExec:!0}),!0}dragSelectedEditors(t,i){if(this.#u)for(const n of this.#u.keys())n.drag(t,i)}rebuild(t){if(t.parent===null){const i=this.getLayer(t.pageIndex);i?(i.changeParent(t),i.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#x.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return this.#t===t}getActive(){return this.#t}getMode(){return this.#b}get imageManager(){return ar(this,"imageManager",new rq)}getSelectionBoxes(t){if(!t)return null;const i=document.getSelection();for(let h=0,u=i.rangeCount;h<u;h++)if(!t.contains(i.getRangeAt(h).commonAncestorContainer))return null;const{x:n,y:a,width:l,height:d}=t.getBoundingClientRect();let c;switch(t.getAttribute("data-main-rotation")){case"90":c=(h,u,m,f)=>({x:(u-a)/d,y:1-(h+m-n)/l,width:f/d,height:m/l});break;case"180":c=(h,u,m,f)=>({x:1-(h+m-n)/l,y:1-(u+f-a)/d,width:m/l,height:f/d});break;case"270":c=(h,u,m,f)=>({x:1-(u+f-a)/d,y:(h-n)/l,width:f/d,height:m/l});break;default:c=(h,u,m,f)=>({x:(h-n)/l,y:(u-a)/d,width:m/l,height:f/d});break}const p=[];for(let h=0,u=i.rangeCount;h<u;h++){const m=i.getRangeAt(h);if(!m.collapsed)for(const{x:f,y:x,width:y,height:w}of m.getClientRects())y===0||w===0||p.push(c(f,x,y,w))}return p.length===0?null:p}addChangedExistingAnnotation({annotationElementId:t,id:i}){(this.#n||=new Map).set(t,i)}removeChangedExistingAnnotation({annotationElementId:t}){this.#n?.delete(t)}renderAnnotationElement(t){const i=this.#n?.get(t.data.id);if(!i)return;const n=this.#i.getRawValue(i);n&&(this.#b===Zi.NONE&&!n.hasBeenModified||n.renderAnnotationElement(t))}}class lf{#e="";#t=!1;#o=null;#r=null;#s=null;#i=!1;#n=null;static _l10nPromise=null;constructor(t){this.#n=t}static initialize(t){lf._l10nPromise||=t}async render(){const t=this.#o=document.createElement("button");t.className="altText";const i=await lf._l10nPromise.get("pdfjs-editor-alt-text-button-label");t.textContent=i,t.setAttribute("aria-label",i),t.tabIndex="0";const n=this.#n._uiManager._signal;t.addEventListener("contextmenu",od,{signal:n}),t.addEventListener("pointerdown",l=>l.stopPropagation(),{signal:n});const a=l=>{l.preventDefault(),this.#n._uiManager.editAltText(this.#n)};return t.addEventListener("click",a,{capture:!0,signal:n}),t.addEventListener("keydown",l=>{l.target===t&&l.key==="Enter"&&(this.#i=!0,a(l))},{signal:n}),await this.#l(),t}finish(){this.#o&&(this.#o.focus({focusVisible:this.#i}),this.#i=!1)}isEmpty(){return!this.#e&&!this.#t}get data(){return{altText:this.#e,decorative:this.#t}}set data({altText:t,decorative:i}){this.#e===t&&this.#t===i||(this.#e=t,this.#t=i,this.#l())}toggle(t=!1){this.#o&&(!t&&this.#s&&(clearTimeout(this.#s),this.#s=null),this.#o.disabled=!t)}destroy(){this.#o?.remove(),this.#o=null,this.#r=null}async#l(){const t=this.#o;if(!t)return;if(!this.#e&&!this.#t){t.classList.remove("done"),this.#r?.remove();return}t.classList.add("done"),lf._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(a=>{t.setAttribute("aria-label",a)});let i=this.#r;if(!i){this.#r=i=document.createElement("span"),i.className="tooltip",i.setAttribute("role","tooltip");const a=i.id=`alt-text-tooltip-${this.#n.id}`;t.setAttribute("aria-describedby",a);const l=100,d=this.#n._uiManager._signal;d.addEventListener("abort",()=>{clearTimeout(this.#s),this.#s=null},{once:!0}),t.addEventListener("mouseenter",()=>{this.#s=setTimeout(()=>{this.#s=null,this.#r.classList.add("show"),this.#n._reportTelemetry({action:"alt_text_tooltip"})},l)},{signal:d}),t.addEventListener("mouseleave",()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.#r?.classList.remove("show")},{signal:d})}i.innerText=this.#t?await lf._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):this.#e,i.parentNode||t.append(i),this.#n.getImageForAltText()?.setAttribute("aria-describedby",i.id)}}class li{#e=null;#t=null;#o=null;#r=!1;#s=!1;#i=null;#n=null;#l=this.focusin.bind(this);#c=this.focusout.bind(this);#p=null;#u="";#d=!1;#a=null;#m=!1;#f=!1;#h=!1;#y=null;#g=0;#w=0;#v=null;_initialOptions=Object.create(null);_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#A=!1;#k=li._zIndex++;static _borderLineWidth=-1;static _colorManager=new nq;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const t=li.prototype._resizeWithKeyboard,i=km.TRANSLATE_SMALL,n=km.TRANSLATE_BIG;return ar(this,"_resizerKeyboardManager",new Sb([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-i,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[i,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-i]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,i]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,n]}],[["Escape","mac+Escape"],li.prototype._stopResizingWithKeyboard]]))}constructor(t){this.constructor===li&&Dr("Cannot initialize AnnotationEditor."),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:i,rawDims:{pageWidth:n,pageHeight:a,pageX:l,pageY:d}}=this.parent.viewport;this.rotation=i,this.pageRotation=(360+i-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[n,a],this.pageTranslation=[l,d];const[c,p]=this.parentDimensions;this.x=t.x/c,this.y=t.y/p,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return ar(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const i=new dkt({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});i.annotationElementId=t.annotationElementId,i.deleted=!0,i._uiManager.addToAnnotationStorage(i)}static initialize(t,i,n){if(li._l10nPromise||=new Map(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-resizer-label-topLeft","pdfjs-editor-resizer-label-topMiddle","pdfjs-editor-resizer-label-topRight","pdfjs-editor-resizer-label-middleRight","pdfjs-editor-resizer-label-bottomRight","pdfjs-editor-resizer-label-bottomMiddle","pdfjs-editor-resizer-label-bottomLeft","pdfjs-editor-resizer-label-middleLeft"].map(l=>[l,t.get(l.replaceAll(/([A-Z])/g,d=>`-${d.toLowerCase()}`))])),n?.strings)for(const l of n.strings)li._l10nPromise.set(l,t.get(l));if(li._borderLineWidth!==-1)return;const a=getComputedStyle(document.documentElement);li._borderLineWidth=parseFloat(a.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,i){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,i){Dr("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#A}set _isDraggable(t){this.#A=t,this.div?.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,i]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*i/(t*2),this.y+=this.width*t/(i*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*i/(t*2),this.y-=this.width*t/(i*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#k}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):this.#T(),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#d?this.#d=!1:this.parent.setSelected(this))}focusout(t){!this._focusEventsAllowed||!this.isAttachedToDOM||t.relatedTarget?.closest(`#${this.id}`)||(t.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,i,n,a){const[l,d]=this.parentDimensions;[n,a]=this.screenToPageTranslation(n,a),this.x=(t+n)/l,this.y=(i+a)/d,this.fixAndSetPosition()}#S([t,i],n,a){[n,a]=this.screenToPageTranslation(n,a),this.x+=n/t,this.y+=a/i,this.fixAndSetPosition()}translate(t,i){this.#S(this.parentDimensions,t,i)}translateInPage(t,i){this.#a||=[this.x,this.y],this.#S(this.pageDimensions,t,i),this.div.scrollIntoView({block:"nearest"})}drag(t,i){this.#a||=[this.x,this.y];const[n,a]=this.parentDimensions;if(this.x+=t/n,this.y+=i/a,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:h,y:u}=this.div.getBoundingClientRect();this.parent.findNewParent(this,h,u)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:l,y:d}=this;const[c,p]=this.getBaseTranslation();l+=c,d+=p,this.div.style.left=`${(100*l).toFixed(2)}%`,this.div.style.top=`${(100*d).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!this.#a&&(this.#a[0]!==this.x||this.#a[1]!==this.y)}getBaseTranslation(){const[t,i]=this.parentDimensions,{_borderLineWidth:n}=li,a=n/t,l=n/i;switch(this.rotation){case 90:return[-a,l];case 180:return[a,l];case 270:return[a,-l];default:return[-a,-l]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const[i,n]=this.pageDimensions;let{x:a,y:l,width:d,height:c}=this;if(d*=i,c*=n,a*=i,l*=n,this._mustFixPosition)switch(t){case 0:a=Math.max(0,Math.min(i-d,a)),l=Math.max(0,Math.min(n-c,l));break;case 90:a=Math.max(0,Math.min(i-c,a)),l=Math.min(n,Math.max(d,l));break;case 180:a=Math.min(i,Math.max(d,a)),l=Math.min(n,Math.max(c,l));break;case 270:a=Math.min(i,Math.max(c,a)),l=Math.max(0,Math.min(n-d,l));break}this.x=a/=i,this.y=l/=n;const[p,h]=this.getBaseTranslation();a+=p,l+=h;const{style:u}=this.div;u.left=`${(100*a).toFixed(2)}%`,u.top=`${(100*l).toFixed(2)}%`,this.moveInDOM()}static#j(t,i,n){switch(n){case 90:return[i,-t];case 180:return[-t,-i];case 270:return[-i,t];default:return[t,i]}}screenToPageTranslation(t,i){return li.#j(t,i,this.parentRotation)}pageTranslationToScreen(t,i){return li.#j(t,i,360-this.parentRotation)}#$(t){switch(t){case 90:{const[i,n]=this.pageDimensions;return[0,-i/n,n/i,0]}case 180:return[-1,0,0,-1];case 270:{const[i,n]=this.pageDimensions;return[0,i/n,-n/i,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[i,n]}=this,a=i*t,l=n*t;return ql.isCSSRoundSupported?[Math.round(a),Math.round(l)]:[a,l]}setDims(t,i){const[n,a]=this.parentDimensions;this.div.style.width=`${(100*t/n).toFixed(2)}%`,this.#s||(this.div.style.height=`${(100*i/a).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:i,width:n}=t,a=n.endsWith("%"),l=!this.#s&&i.endsWith("%");if(a&&l)return;const[d,c]=this.parentDimensions;a||(t.width=`${(100*parseFloat(n)/d).toFixed(2)}%`),!this.#s&&!l&&(t.height=`${(100*parseFloat(i)/c).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#b(){if(this.#i)return;this.#i=document.createElement("div"),this.#i.classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],i=this._uiManager._signal;for(const n of t){const a=document.createElement("div");this.#i.append(a),a.classList.add("resizer",n),a.setAttribute("data-resizer-name",n),a.addEventListener("pointerdown",this.#x.bind(this,n),{signal:i}),a.addEventListener("contextmenu",od,{signal:i}),a.tabIndex=-1}this.div.prepend(this.#i)}#x(t,i){i.preventDefault();const{isMac:n}=ql.platform;if(i.button!==0||i.ctrlKey&&n)return;this.#o?.toggle(!1);const a=this.#E.bind(this,t),l=this._isDraggable;this._isDraggable=!1;const d=this._uiManager._signal,c={passive:!0,capture:!0,signal:d};this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",a,c),window.addEventListener("contextmenu",od,{signal:d});const p=this.x,h=this.y,u=this.width,m=this.height,f=this.parent.div.style.cursor,x=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(i.target).cursor;const y=()=>{this.parent.togglePointerEvents(!0),this.#o?.toggle(!0),this._isDraggable=l,window.removeEventListener("pointerup",y),window.removeEventListener("blur",y),window.removeEventListener("pointermove",a,c),window.removeEventListener("contextmenu",od),this.parent.div.style.cursor=f,this.div.style.cursor=x,this.#C(p,h,u,m)};window.addEventListener("pointerup",y,{signal:d}),window.addEventListener("blur",y,{signal:d})}#C(t,i,n,a){const l=this.x,d=this.y,c=this.width,p=this.height;l===t&&d===i&&c===n&&p===a||this.addCommands({cmd:()=>{this.width=c,this.height=p,this.x=l,this.y=d;const[h,u]=this.parentDimensions;this.setDims(h*c,u*p),this.fixAndSetPosition()},undo:()=>{this.width=n,this.height=a,this.x=t,this.y=i;const[h,u]=this.parentDimensions;this.setDims(h*n,u*a),this.fixAndSetPosition()},mustExec:!0})}#E(t,i){const[n,a]=this.parentDimensions,l=this.x,d=this.y,c=this.width,p=this.height,h=li.MIN_SIZE/n,u=li.MIN_SIZE/a,m=N=>Math.round(N*1e4)/1e4,f=this.#$(this.rotation),x=(N,O)=>[f[0]*N+f[2]*O,f[1]*N+f[3]*O],y=this.#$(360-this.rotation),w=(N,O)=>[y[0]*N+y[2]*O,y[1]*N+y[3]*O];let b,C,k=!1,L=!1;switch(t){case"topLeft":k=!0,b=(N,O)=>[0,0],C=(N,O)=>[N,O];break;case"topMiddle":b=(N,O)=>[N/2,0],C=(N,O)=>[N/2,O];break;case"topRight":k=!0,b=(N,O)=>[N,0],C=(N,O)=>[0,O];break;case"middleRight":L=!0,b=(N,O)=>[N,O/2],C=(N,O)=>[0,O/2];break;case"bottomRight":k=!0,b=(N,O)=>[N,O],C=(N,O)=>[0,0];break;case"bottomMiddle":b=(N,O)=>[N/2,O],C=(N,O)=>[N/2,0];break;case"bottomLeft":k=!0,b=(N,O)=>[0,O],C=(N,O)=>[N,0];break;case"middleLeft":L=!0,b=(N,O)=>[0,O/2],C=(N,O)=>[N,O/2];break}const S=b(c,p),j=C(c,p);let I=x(...j);const P=m(l+I[0]),B=m(d+I[1]);let T=1,D=1,[R,G]=this.screenToPageTranslation(i.movementX,i.movementY);if([R,G]=w(R/n,G/a),k){const N=Math.hypot(c,p);T=D=Math.max(Math.min(Math.hypot(j[0]-S[0]-R,j[1]-S[1]-G)/N,1/c,1/p),h/c,u/p)}else L?T=Math.max(h,Math.min(1,Math.abs(j[0]-S[0]-R)))/c:D=Math.max(u,Math.min(1,Math.abs(j[1]-S[1]-G)))/p;const q=m(c*T),Z=m(p*D);I=x(...C(q,Z));const H=P-I[0],V=B-I[1];this.width=q,this.height=Z,this.x=H,this.y=V,this.setDims(n*q,a*Z),this.fixAndSetPosition()}altTextFinish(){this.#o?.finish()}async addEditToolbar(){return this.#p||this.#f?this.#p:(this.#p=new iq(this),this.div.append(this.#p.render()),this.#o&&this.#p.addAltTextButton(await this.#o.render()),this.#p)}removeEditToolbar(){this.#p&&(this.#p.remove(),this.#p=null,this.#o?.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){this.#o||(lf.initialize(li._l10nPromise),this.#o=new lf(this),this.#e&&(this.#o.data=this.#e,this.#e=null),await this.addEditToolbar())}get altTextData(){return this.#o?.data}set altTextData(t){this.#o&&(this.#o.data=t)}hasAltText(){return!this.#o?.isEmpty()}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=this.#r?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground();const t=this._uiManager._signal;this.div.addEventListener("focusin",this.#l,{signal:t}),this.div.addEventListener("focusout",this.#c,{signal:t});const[i,n]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*n/i).toFixed(2)}%`,this.div.style.maxHeight=`${(100*i/n).toFixed(2)}%`);const[a,l]=this.getInitialTranslation();return this.translate(a,l),kS(this,this.div,["pointerdown"]),this.div}pointerdown(t){const{isMac:i}=ql.platform;if(t.button!==0||t.ctrlKey&&i){t.preventDefault();return}if(this.#d=!0,this._isDraggable){this.#B(t);return}this.#L(t)}#L(t){const{isMac:i}=ql.platform;t.ctrlKey&&!i||t.shiftKey||t.metaKey&&i?this.parent.toggleSelected(this):this.parent.setSelected(this)}#B(t){const i=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let n,a;const l=this._uiManager._signal;i&&(this.div.classList.add("moving"),n={passive:!0,capture:!0,signal:l},this.#g=t.clientX,this.#w=t.clientY,a=c=>{const{clientX:p,clientY:h}=c,[u,m]=this.screenToPageTranslation(p-this.#g,h-this.#w);this.#g=p,this.#w=h,this._uiManager.dragSelectedEditors(u,m)},window.addEventListener("pointermove",a,n));const d=()=>{window.removeEventListener("pointerup",d),window.removeEventListener("blur",d),i&&(this.div.classList.remove("moving"),window.removeEventListener("pointermove",a,n)),this.#d=!1,this._uiManager.endDragSession()||this.#L(t)};window.addEventListener("pointerup",d,{signal:l}),window.addEventListener("blur",d,{signal:l})}moveInDOM(){this.#y&&clearTimeout(this.#y),this.#y=setTimeout(()=>{this.#y=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(t,i,n){t.changeParent(this),this.x=i,this.y=n,this.fixAndSetPosition()}getRect(t,i,n=this.rotation){const a=this.parentScale,[l,d]=this.pageDimensions,[c,p]=this.pageTranslation,h=t/a,u=i/a,m=this.x*l,f=this.y*d,x=this.width*l,y=this.height*d;switch(n){case 0:return[m+h+c,d-f-u-y+p,m+h+x+c,d-f-u+p];case 90:return[m+u+c,d-f+h+p,m+u+y+c,d-f+h+x+p];case 180:return[m-h-x+c,d-f+u+p,m-h+c,d-f+u+y+p];case 270:return[m-u-y+c,d-f-h-x+p,m-u+c,d-f-h+p];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,i){const[n,a,l,d]=t,c=l-n,p=d-a;switch(this.rotation){case 0:return[n,i-d,c,p];case 90:return[n,i-a,p,c];case 180:return[l,i-a,c,p];case 270:return[l,i-d,p,c];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#f=!0}disableEditMode(){this.#f=!1}isInEditMode(){return this.#f}shouldGetKeyboardEvents(){return this.#h}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){const t=this._uiManager._signal;this.div?.addEventListener("focusin",this.#l,{signal:t}),this.div?.addEventListener("focusout",this.#c,{signal:t})}rotate(t){}serialize(t=!1,i=null){Dr("An editor must be serializable")}static deserialize(t,i,n){const a=new this.prototype.constructor({parent:i,id:i.getNextId(),uiManager:n});a.rotation=t.rotation,a.#e=t.accessibilityData;const[l,d]=a.pageDimensions,[c,p,h,u]=a.getRectInCurrentCoords(t.rect,d);return a.x=c/l,a.y=p/d,a.width=h/l,a.height=u/d,a}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.div.removeEventListener("focusin",this.#l),this.div.removeEventListener("focusout",this.#c),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#y&&(clearTimeout(this.#y),this.#y=null),this.#T(),this.removeEditToolbar(),this.#v){for(const t of this.#v.values())clearTimeout(t);this.#v=null}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#b(),this.#i.classList.remove("hidden"),kS(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),this.#n={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const i=this.#i.children;if(!this.#t){this.#t=Array.from(i);const d=this.#M.bind(this),c=this.#P.bind(this),p=this._uiManager._signal;for(const h of this.#t){const u=h.getAttribute("data-resizer-name");h.setAttribute("role","spinbutton"),h.addEventListener("keydown",d,{signal:p}),h.addEventListener("blur",c,{signal:p}),h.addEventListener("focus",this.#D.bind(this,u),{signal:p}),li._l10nPromise.get(`pdfjs-editor-resizer-label-${u}`).then(m=>h.setAttribute("aria-label",m))}}const n=this.#t[0];let a=0;for(const d of i){if(d===n)break;a++}const l=(360-this.rotation+this.parentRotation)%360/90*(this.#t.length/4);if(l!==a){if(l<a)for(let c=0;c<a-l;c++)this.#i.append(this.#i.firstChild);else if(l>a)for(let c=0;c<l-a;c++)this.#i.firstChild.before(this.#i.lastChild);let d=0;for(const c of i){const h=this.#t[d++].getAttribute("data-resizer-name");li._l10nPromise.get(`pdfjs-editor-resizer-label-${h}`).then(u=>c.setAttribute("aria-label",u))}}this.#z(0),this.#h=!0,this.#i.firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}#M(t){li._resizerKeyboardManager.exec(this,t)}#P(t){this.#h&&t.relatedTarget?.parentNode!==this.#i&&this.#T()}#D(t){this.#u=this.#h?t:""}#z(t){if(this.#t)for(const i of this.#t)i.tabIndex=t}_resizeWithKeyboard(t,i){this.#h&&this.#E(this.#u,{movementX:t,movementY:i})}#T(){if(this.#h=!1,this.#z(-1),this.#n){const{savedX:t,savedY:i,savedWidth:n,savedHeight:a}=this.#n;this.#C(t,i,n,a),this.#n=null}}_stopResizingWithKeyboard(){this.#T(),this.div.focus()}select(){if(this.makeResizable(),this.div?.classList.add("selectedEditor"),!this.#p){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this.#p?.show()});return}this.#p?.show()}unselect(){this.#i?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this.#p?.hide()}updateParams(t,i){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return this.#m}set isEditing(t){this.#m=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,i){this.#s=!0;const n=t/i,{style:a}=this.div;a.aspectRatio=n,a.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,i=!1){if(i){this.#v||=new Map;const{action:n}=t;let a=this.#v.get(n);a&&clearTimeout(a),a=setTimeout(()=>{this._reportTelemetry(t),this.#v.delete(n),this.#v.size===0&&(this.#v=null)},li._telemetryTimeout),this.#v.set(n,a);return}t.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),this.#r=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#r=!0}renderAnnotationElement(t){let i=t.container.querySelector(".annotationContent");if(!i)i=document.createElement("div"),i.classList.add("annotationContent",this.editorType),t.container.prepend(i);else if(i.nodeName==="CANVAS"){const n=i;i=document.createElement("div"),i.classList.add("annotationContent",this.editorType),n.before(i)}return i}resetAnnotationElement(t){const{firstChild:i}=t.container;i.nodeName==="DIV"&&i.classList.contains("annotationContent")&&i.remove()}}class dkt extends li{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const Ipe=3285377520,rc=4294901760,Xp=65535;class uMe{constructor(t){this.h1=t?t&4294967295:Ipe,this.h2=t?t&4294967295:Ipe}update(t){let i,n;if(typeof t=="string"){i=new Uint8Array(t.length*2),n=0;for(let w=0,b=t.length;w<b;w++){const C=t.charCodeAt(w);C<=255?i[n++]=C:(i[n++]=C>>>8,i[n++]=C&255)}}else if(ArrayBuffer.isView(t))i=t.slice(),n=i.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const a=n>>2,l=n-a*4,d=new Uint32Array(i.buffer,0,a);let c=0,p=0,h=this.h1,u=this.h2;const m=3432918353,f=461845907,x=m&Xp,y=f&Xp;for(let w=0;w<a;w++)w&1?(c=d[w],c=c*m&rc|c*x&Xp,c=c<<15|c>>>17,c=c*f&rc|c*y&Xp,h^=c,h=h<<13|h>>>19,h=h*5+3864292196):(p=d[w],p=p*m&rc|p*x&Xp,p=p<<15|p>>>17,p=p*f&rc|p*y&Xp,u^=p,u=u<<13|u>>>19,u=u*5+3864292196);switch(c=0,l){case 3:c^=i[a*4+2]<<16;case 2:c^=i[a*4+1]<<8;case 1:c^=i[a*4],c=c*m&rc|c*x&Xp,c=c<<15|c>>>17,c=c*f&rc|c*y&Xp,a&1?h^=c:u^=c}this.h1=h,this.h2=u}hexdigest(){let t=this.h1,i=this.h2;return t^=i>>>1,t=t*3981806797&rc|t*36045&Xp,i=i*4283543511&rc|((i<<16|t>>>16)*2950163797&rc)>>>16,t^=i>>>1,t=t*444984403&rc|t*60499&Xp,i=i*3301882366&rc|((i<<16|t>>>16)*3120437893&rc)>>>16,t^=i>>>1,(t>>>0).toString(16).padStart(8,"0")+(i>>>0).toString(16).padStart(8,"0")}}const BU=Object.freeze({map:null,hash:"",transfer:void 0});class aq{#e=!1;#t=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,i){const n=this.#t.get(t);return n===void 0?i:Object.assign(i,n)}getRawValue(t){return this.#t.get(t)}remove(t){if(this.#t.delete(t),this.#t.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const i of this.#t.values())if(i instanceof li)return;this.onAnnotationEditor(null)}}setValue(t,i){const n=this.#t.get(t);let a=!1;if(n!==void 0)for(const[l,d]of Object.entries(i))n[l]!==d&&(a=!0,n[l]=d);else a=!0,this.#t.set(t,i);a&&this.#o(),i instanceof li&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(i.constructor._type)}has(t){return this.#t.has(t)}getAll(){return this.#t.size>0?qK(this.#t):null}setAll(t){for(const[i,n]of Object.entries(t))this.setValue(i,n)}get size(){return this.#t.size}#o(){this.#e||(this.#e=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#e&&(this.#e=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new mMe(this)}get serializable(){if(this.#t.size===0)return BU;const t=new Map,i=new uMe,n=[],a=Object.create(null);let l=!1;for(const[d,c]of this.#t){const p=c instanceof li?c.serialize(!1,a):c;p&&(t.set(d,p),i.update(`${d}:${JSON.stringify(p)}`),l||=!!p.bitmap)}if(l)for(const d of t.values())d.bitmap&&n.push(d.bitmap);return t.size>0?{map:t,hash:i.hexdigest(),transfer:n}:BU}get editorStats(){let t=null;const i=new Map;for(const n of this.#t.values()){if(!(n instanceof li))continue;const a=n.telemetryFinalData;if(!a)continue;const{type:l}=a;i.has(l)||i.set(l,Object.getPrototypeOf(n).constructor),t||=Object.create(null);const d=t[l]||=new Map;for(const[c,p]of Object.entries(a)){if(c==="type")continue;let h=d.get(c);h||(h=new Map,d.set(c,h));const u=h.get(p)??0;h.set(p,u+1)}}for(const[n,a]of i)t[n]=a.computeTelemetryFinalData(t[n]);return t}}class mMe extends aq{#e;constructor(t){super();const{map:i,hash:n,transfer:a}=t.serializable,l=structuredClone(i,a?{transfer:a}:null);this.#e={map:l,hash:n,transfer:a}}get print(){Dr("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#e}}class ckt{#e=new Set;constructor({ownerDocument:t=globalThis.document,styleElement:i=null}){this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const i=this.styleElement.sheet;i.insertRule(t,i.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#e.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,_inspectFont:i}){if(!(!t||this.#e.has(t.loadedName))){if(ka(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:n,src:a,style:l}=t,d=new FontFace(n,a,l);this.addNativeFontFace(d);try{await d.load(),this.#e.add(n),i?.(t)}catch{zi(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(d)}return}Dr("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const n=t.createNativeFontFace();if(n){this.addNativeFontFace(n);try{await n.loaded}catch(a){throw zi(`Failed to load font '${n.family}': '${a}'.`),t.disableFontFace=!0,a}}return}const i=t.createFontFaceRule();if(i){if(this.insertRule(i),this.isSyncFontLoadingSupported)return;await new Promise(n=>{const a=this._queueLoadingCallback(n);this._prepareFontLoadEvent(t,a)})}}get isFontLoadingAPISupported(){const t=!!this._document?.fonts;return ar(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let t=!1;return(Us||typeof navigator<"u"&&typeof navigator?.userAgent=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0),ar(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){function i(){for(ka(!a.done,"completeRequest() cannot be called twice."),a.done=!0;n.length>0&&n[0].done;){const l=n.shift();setTimeout(l.callback,0)}}const{loadingRequests:n}=this,a={done:!1,complete:i,callback:t};return n.push(a),a}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return ar(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,i){function n(S,j){return S.charCodeAt(j)<<24|S.charCodeAt(j+1)<<16|S.charCodeAt(j+2)<<8|S.charCodeAt(j+3)&255}function a(S,j,I,P){const B=S.substring(0,j),T=S.substring(j+I);return B+P+T}let l,d;const c=this._document.createElement("canvas");c.width=1,c.height=1;const p=c.getContext("2d");let h=0;function u(S,j){if(++h>30){zi("Load test font never loaded."),j();return}if(p.font="30px "+S,p.fillText(".",0,20),p.getImageData(0,0,1,1).data[3]>0){j();return}setTimeout(u.bind(null,S,j))}const m=`lt${Date.now()}${this.loadTestFontId++}`;let f=this._loadTestFont;f=a(f,976,m.length,m);const y=16,w=1482184792;let b=n(f,y);for(l=0,d=m.length-3;l<d;l+=4)b=b-w+n(m,l)|0;l<m.length&&(b=b-w+n(m+"XXX",l)|0),f=a(f,y,4,G$t(b));const C=`url(data:font/opentype;base64,${btoa(f)});`,k=`@font-face {font-family:"${m}";src:${C}}`;this.insertRule(k);const L=this._document.createElement("div");L.style.visibility="hidden",L.style.width=L.style.height="10px",L.style.position="absolute",L.style.top=L.style.left="0px";for(const S of[t.loadedName,m]){const j=this._document.createElement("span");j.textContent="Hi",j.style.fontFamily=S,L.append(j)}this._document.body.append(L),u(m,()=>{L.remove(),i.complete()})}}class pkt{constructor(t,{disableFontFace:i=!1,inspectFont:n=null}){this.compiledGlyphs=Object.create(null);for(const a in t)this[a]=t[a];this.disableFontFace=i===!0,this._inspectFont=n}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const i={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(i.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,i)}return this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=sMe(this.data),i=`url(data:${this.mimetype};base64,${btoa(t)});`;let n;if(!this.cssFontInfo)n=`@font-face {font-family:"${this.loadedName}";src:${i}}`;else{let a=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(a+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),n=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${a}src:${i}}`}return this._inspectFont?.(this,i),n}getPathGenerator(t,i){if(this.compiledGlyphs[i]!==void 0)return this.compiledGlyphs[i];let n;try{n=t.get(this.loadedName+"_path_"+i)}catch(l){zi(`getPathGenerator - ignoring character: "${l}".`)}if(!Array.isArray(n)||n.length===0)return this.compiledGlyphs[i]=function(l,d){};const a=[];for(let l=0,d=n.length;l<d;)switch(n[l++]){case Ru.BEZIER_CURVE_TO:{const[c,p,h,u,m,f]=n.slice(l,l+6);a.push(x=>x.bezierCurveTo(c,p,h,u,m,f)),l+=6}break;case Ru.MOVE_TO:{const[c,p]=n.slice(l,l+2);a.push(h=>h.moveTo(c,p)),l+=2}break;case Ru.LINE_TO:{const[c,p]=n.slice(l,l+2);a.push(h=>h.lineTo(c,p)),l+=2}break;case Ru.QUADRATIC_CURVE_TO:{const[c,p,h,u]=n.slice(l,l+4);a.push(m=>m.quadraticCurveTo(c,p,h,u)),l+=4}break;case Ru.RESTORE:a.push(c=>c.restore());break;case Ru.SAVE:a.push(c=>c.save());break;case Ru.SCALE:ka(a.length===2,"Scale command is only valid at the third position.");break;case Ru.TRANSFORM:{const[c,p,h,u,m,f]=n.slice(l,l+6);a.push(x=>x.transform(c,p,h,u,m,f)),l+=6}break;case Ru.TRANSLATE:{const[c,p]=n.slice(l,l+2);a.push(h=>h.translate(c,p)),l+=2}break}return this.compiledGlyphs[i]=function(d,c){a[0](d),a[1](d),d.scale(c,-c);for(let p=2,h=a.length;p<h;p++)a[p](d)}}}if(Us){var DU=Promise.withResolvers(),TU=null;(async()=>{const t=await rf(()=>import("./empty-CMizcH8e.js").then(c=>c.e),__vite__mapDeps([0,1,2])),i=await rf(()=>import("./index-BP90QcpP.js").then(c=>c.i),__vite__mapDeps([3,1,4,5,6,7,8,9])),n=await rf(()=>import("./index-CsfKltgB.js").then(c=>c.i),__vite__mapDeps([10,1,11,4,5,6,7,8,9])),a=await rf(()=>import("./url-CpHhDEQU.js").then(c=>c.u),__vite__mapDeps([12,1,9,7,5,6,8]));let l,d;return new Map(Object.entries({fs:t,http:i,https:n,url:a,canvas:l,path2d:d}))})().then(t=>{TU=t,DU.resolve()},t=>{zi(`loadPackages: ${t}`),TU=new Map,DU.resolve()})}class Jh{static get promise(){return DU.promise}static get(t){return TU?.get(t)}}const gMe=function(e){return Jh.get("fs").promises.readFile(e).then(i=>new Uint8Array(i))};class hkt extends rI{}class ukt extends nI{_createCanvas(t,i){return Jh.get("canvas").createCanvas(t,i)}}class mkt extends aI{_fetchData(t,i){return gMe(t).then(n=>({cMapData:n,compressionType:i}))}}class gkt extends sI{_fetchData(t){return gMe(t)}}const ml={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function PU(e,t){if(!t)return;const i=t[2]-t[0],n=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],i,n),e.clip(a)}class Eb{constructor(){this.constructor===Eb&&Dr("Cannot initialize BaseShadingPattern.")}getPattern(){Dr("Abstract method `getPattern` called.")}}class fkt extends Eb{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let i;this._type==="axial"?i=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(i=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const n of this._colorStops)i.addColorStop(n[0],n[1]);return i}getPattern(t,i,n,a){let l;if(a===ml.STROKE||a===ml.FILL){const d=i.current.getClippedPathBoundingBox(a,gn(t))||[0,0,0,0],c=Math.ceil(d[2]-d[0])||1,p=Math.ceil(d[3]-d[1])||1,h=i.cachedCanvases.getCanvas("pattern",c,p,!0),u=h.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-d[0],-d[1]),n=$o.transform(n,[1,0,0,1,d[0],d[1]]),u.transform(...i.baseTransform),this.matrix&&u.transform(...this.matrix),PU(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),l=t.createPattern(h.canvas,"no-repeat");const m=new DOMMatrix(n);l.setTransform(m)}else PU(t,this._bbox),l=this._createGradient(t);return l}}function bO(e,t,i,n,a,l,d,c){const p=t.coords,h=t.colors,u=e.data,m=e.width*4;let f;p[i+1]>p[n+1]&&(f=i,i=n,n=f,f=l,l=d,d=f),p[n+1]>p[a+1]&&(f=n,n=a,a=f,f=d,d=c,c=f),p[i+1]>p[n+1]&&(f=i,i=n,n=f,f=l,l=d,d=f);const x=(p[i]+t.offsetX)*t.scaleX,y=(p[i+1]+t.offsetY)*t.scaleY,w=(p[n]+t.offsetX)*t.scaleX,b=(p[n+1]+t.offsetY)*t.scaleY,C=(p[a]+t.offsetX)*t.scaleX,k=(p[a+1]+t.offsetY)*t.scaleY;if(y>=k)return;const L=h[l],S=h[l+1],j=h[l+2],I=h[d],P=h[d+1],B=h[d+2],T=h[c],D=h[c+1],R=h[c+2],G=Math.round(y),q=Math.round(k);let Z,H,V,N,O,z,F,te;for(let Y=G;Y<=q;Y++){if(Y<b){const ye=Y<y?0:(y-Y)/(y-b);Z=x-(x-w)*ye,H=L-(L-I)*ye,V=S-(S-P)*ye,N=j-(j-B)*ye}else{let ye;Y>k?ye=1:b===k?ye=0:ye=(b-Y)/(b-k),Z=w-(w-C)*ye,H=I-(I-T)*ye,V=P-(P-D)*ye,N=B-(B-R)*ye}let W;Y<y?W=0:Y>k?W=1:W=(y-Y)/(y-k),O=x-(x-C)*W,z=L-(L-T)*W,F=S-(S-D)*W,te=j-(j-R)*W;const ee=Math.round(Math.min(Z,O)),J=Math.round(Math.max(Z,O));let ne=m*Y+ee*4;for(let ye=ee;ye<=J;ye++)W=(Z-ye)/(Z-O),W<0?W=0:W>1&&(W=1),u[ne++]=H-(H-z)*W|0,u[ne++]=V-(V-F)*W|0,u[ne++]=N-(N-te)*W|0,u[ne++]=255}}function xkt(e,t,i){const n=t.coords,a=t.colors;let l,d;switch(t.type){case"lattice":const c=t.verticesPerRow,p=Math.floor(n.length/c)-1,h=c-1;for(l=0;l<p;l++){let u=l*c;for(let m=0;m<h;m++,u++)bO(e,i,n[u],n[u+1],n[u+c],a[u],a[u+1],a[u+c]),bO(e,i,n[u+c+1],n[u+1],n[u+c],a[u+c+1],a[u+1],a[u+c])}break;case"triangles":for(l=0,d=n.length;l<d;l+=3)bO(e,i,n[l],n[l+1],n[l+2],a[l],a[l+1],a[l+2]);break;default:throw new Error("illegal figure")}}class ykt extends Eb{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[7],this._background=t[8],this.matrix=null}_createMeshCanvas(t,i,n){const c=Math.floor(this._bounds[0]),p=Math.floor(this._bounds[1]),h=Math.ceil(this._bounds[2])-c,u=Math.ceil(this._bounds[3])-p,m=Math.min(Math.ceil(Math.abs(h*t[0]*1.1)),3e3),f=Math.min(Math.ceil(Math.abs(u*t[1]*1.1)),3e3),x=h/m,y=u/f,w={coords:this._coords,colors:this._colors,offsetX:-c,offsetY:-p,scaleX:1/x,scaleY:1/y},b=m+4,C=f+4,k=n.getCanvas("mesh",b,C,!1),L=k.context,S=L.createImageData(m,f);if(i){const I=S.data;for(let P=0,B=I.length;P<B;P+=4)I[P]=i[0],I[P+1]=i[1],I[P+2]=i[2],I[P+3]=255}for(const I of this._figures)xkt(S,I,w);return L.putImageData(S,2,2),{canvas:k.canvas,offsetX:c-2*x,offsetY:p-2*y,scaleX:x,scaleY:y}}getPattern(t,i,n,a){PU(t,this._bbox);let l;if(a===ml.SHADING)l=$o.singularValueDecompose2dScale(gn(t));else if(l=$o.singularValueDecompose2dScale(i.baseTransform),this.matrix){const c=$o.singularValueDecompose2dScale(this.matrix);l=[l[0]*c[0],l[1]*c[1]]}const d=this._createMeshCanvas(l,a===ml.SHADING?null:this._background,i.cachedCanvases);return a!==ml.SHADING&&(t.setTransform(...i.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(d.offsetX,d.offsetY),t.scale(d.scaleX,d.scaleY),t.createPattern(d.canvas,"no-repeat")}}class wkt extends Eb{getPattern(){return"hotpink"}}function bkt(e){switch(e[0]){case"RadialAxial":return new fkt(e);case"Mesh":return new ykt(e);case"Dummy":return new wkt}throw new Error(`Unknown IR type: ${e[0]}`)}const jpe={COLORED:1,UNCOLORED:2};class sq{static MAX_PATTERN_SIZE=3e3;constructor(t,i,n,a,l){this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=i,this.ctx=n,this.canvasGraphicsFactory=a,this.baseTransform=l}createPatternCanvas(t){const i=this.operatorList,n=this.bbox,a=this.xstep,l=this.ystep,d=this.paintType,c=this.tilingType,p=this.color,h=this.canvasGraphicsFactory;tI("TilingType: "+c);const u=n[0],m=n[1],f=n[2],x=n[3],y=$o.singularValueDecompose2dScale(this.matrix),w=$o.singularValueDecompose2dScale(this.baseTransform),b=[y[0]*w[0],y[1]*w[1]],C=this.getSizeAndScale(a,this.ctx.canvas.width,b[0]),k=this.getSizeAndScale(l,this.ctx.canvas.height,b[1]),L=t.cachedCanvases.getCanvas("pattern",C.size,k.size,!0),S=L.context,j=h.createCanvasGraphics(S);j.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(j,d,p);let I=u,P=m,B=f,T=x;return u<0&&(I=0,B+=Math.abs(u)),m<0&&(P=0,T+=Math.abs(m)),S.translate(-(C.scale*I),-(k.scale*P)),j.transform(C.scale,0,0,k.scale,0,0),S.save(),this.clipBbox(j,I,P,B,T),j.baseTransform=gn(j.ctx),j.executeOperatorList(i),j.endDrawing(),{canvas:L.canvas,scaleX:C.scale,scaleY:k.scale,offsetX:I,offsetY:P}}getSizeAndScale(t,i,n){t=Math.abs(t);const a=Math.max(sq.MAX_PATTERN_SIZE,i);let l=Math.ceil(t*n);return l>=a?l=a:n=l/t,{scale:n,size:l}}clipBbox(t,i,n,a,l){const d=a-i,c=l-n;t.ctx.rect(i,n,d,c),t.current.updateRectMinMax(gn(t.ctx),[i,n,a,l]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,i,n){const a=t.ctx,l=t.current;switch(i){case jpe.COLORED:const d=this.ctx;a.fillStyle=d.fillStyle,a.strokeStyle=d.strokeStyle,l.fillColor=d.fillStyle,l.strokeColor=d.strokeStyle;break;case jpe.UNCOLORED:const c=$o.makeHexColor(n[0],n[1],n[2]);a.fillStyle=c,a.strokeStyle=c,l.fillColor=c,l.strokeColor=c;break;default:throw new W$t(`Unsupported paint type: ${i}`)}}getPattern(t,i,n,a){let l=n;a!==ml.SHADING&&(l=$o.transform(l,i.baseTransform),this.matrix&&(l=$o.transform(l,this.matrix)));const d=this.createPatternCanvas(i);let c=new DOMMatrix(l);c=c.translate(d.offsetX,d.offsetY),c=c.scale(1/d.scaleX,1/d.scaleY);const p=t.createPattern(d.canvas,"repeat");return p.setTransform(c),p}}function vkt({src:e,srcPos:t=0,dest:i,width:n,height:a,nonBlackColor:l=4294967295,inverseDecode:d=!1}){const c=ql.isLittleEndian?4278190080:255,[p,h]=d?[l,c]:[c,l],u=n>>3,m=n&7,f=e.length;i=new Uint32Array(i.buffer);let x=0;for(let y=0;y<a;y++){for(const b=t+u;t<b;t++){const C=t<f?e[t]:255;i[x++]=C&128?h:p,i[x++]=C&64?h:p,i[x++]=C&32?h:p,i[x++]=C&16?h:p,i[x++]=C&8?h:p,i[x++]=C&4?h:p,i[x++]=C&2?h:p,i[x++]=C&1?h:p}if(m===0)continue;const w=t<f?e[t++]:255;for(let b=0;b<m;b++)i[x++]=w&1<<7-b?h:p}return{srcPos:t,destPos:x}}const Mpe=16,Bpe=100,Ckt=15,Dpe=10,Tpe=1e3,Ol=16;function Akt(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(n,a){t.translate(n,a),this.__originalTranslate(n,a)},e.scale=function(n,a){t.scale(n,a),this.__originalScale(n,a)},e.transform=function(n,a,l,d,c,p){t.transform(n,a,l,d,c,p),this.__originalTransform(n,a,l,d,c,p)},e.setTransform=function(n,a,l,d,c,p){t.setTransform(n,a,l,d,c,p),this.__originalSetTransform(n,a,l,d,c,p)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(n){t.rotate(n),this.__originalRotate(n)},e.clip=function(n){t.clip(n),this.__originalClip(n)},e.moveTo=function(i,n){t.moveTo(i,n),this.__originalMoveTo(i,n)},e.lineTo=function(i,n){t.lineTo(i,n),this.__originalLineTo(i,n)},e.bezierCurveTo=function(i,n,a,l,d,c){t.bezierCurveTo(i,n,a,l,d,c),this.__originalBezierCurveTo(i,n,a,l,d,c)},e.rect=function(i,n,a,l){t.rect(i,n,a,l),this.__originalRect(i,n,a,l)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class $kt{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,i,n){let a;return this.cache[t]!==void 0?(a=this.cache[t],this.canvasFactory.reset(a,i,n)):(a=this.canvasFactory.create(i,n),this.cache[t]=a),a}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const i=this.cache[t];this.canvasFactory.destroy(i),delete this.cache[t]}}}function bC(e,t,i,n,a,l,d,c,p,h){const[u,m,f,x,y,w]=gn(e);if(m===0&&f===0){const k=d*u+y,L=Math.round(k),S=c*x+w,j=Math.round(S),I=(d+p)*u+y,P=Math.abs(Math.round(I)-L)||1,B=(c+h)*x+w,T=Math.abs(Math.round(B)-j)||1;return e.setTransform(Math.sign(u),0,0,Math.sign(x),L,j),e.drawImage(t,i,n,a,l,0,0,P,T),e.setTransform(u,m,f,x,y,w),[P,T]}if(u===0&&x===0){const k=c*f+y,L=Math.round(k),S=d*m+w,j=Math.round(S),I=(c+h)*f+y,P=Math.abs(Math.round(I)-L)||1,B=(d+p)*m+w,T=Math.abs(Math.round(B)-j)||1;return e.setTransform(0,Math.sign(m),Math.sign(f),0,L,j),e.drawImage(t,i,n,a,l,0,0,T,P),e.setTransform(u,m,f,x,y,w),[T,P]}e.drawImage(t,i,n,a,l,d,c,p,h);const b=Math.hypot(u,m),C=Math.hypot(f,x);return[b*p,C*h]}function kkt(e){const{width:t,height:i}=e;if(t>Tpe||i>Tpe)return null;const n=1e3,a=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),l=t+1;let d=new Uint8Array(l*(i+1)),c,p,h;const u=t+7&-8;let m=new Uint8Array(u*i),f=0;for(const C of e.data){let k=128;for(;k>0;)m[f++]=C&k?0:255,k>>=1}let x=0;for(f=0,m[f]!==0&&(d[0]=1,++x),p=1;p<t;p++)m[f]!==m[f+1]&&(d[p]=m[f]?2:1,++x),f++;for(m[f]!==0&&(d[p]=2,++x),c=1;c<i;c++){f=c*u,h=c*l,m[f-u]!==m[f]&&(d[h]=m[f]?1:8,++x);let C=(m[f]?4:0)+(m[f-u]?8:0);for(p=1;p<t;p++)C=(C>>2)+(m[f+1]?4:0)+(m[f-u+1]?8:0),a[C]&&(d[h+p]=a[C],++x),f++;if(m[f-u]!==m[f]&&(d[h+p]=m[f]?2:4,++x),x>n)return null}for(f=u*(i-1),h=c*l,m[f]!==0&&(d[h]=8,++x),p=1;p<t;p++)m[f]!==m[f+1]&&(d[h+p]=m[f]?4:8,++x),f++;if(m[f]!==0&&(d[h+p]=4,++x),x>n)return null;const y=new Int32Array([0,l,-1,0,-l,0,0,0,1]),w=new Path2D;for(c=0;x&&c<=i;c++){let C=c*l;const k=C+t;for(;C<k&&!d[C];)C++;if(C===k)continue;w.moveTo(C%l,c);const L=C;let S=d[C];do{const j=y[S];do C+=j;while(!d[C]);const I=d[C];I!==5&&I!==10?(S=I,d[C]=0):(S=I&51*S>>4,d[C]&=S>>2|S<<2),w.lineTo(C%l,C/l|0),d[C]||--x}while(L!==C);--c}return m=null,d=null,function(C){C.save(),C.scale(1/t,-1/i),C.translate(0,-i),C.fill(w),C.beginPath(),C.restore()}}class Ppe{constructor(t,i){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=nMe,this.textMatrixScale=1,this.fontMatrix=LU,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=Rs.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,t,i])}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t}setCurrentPoint(t,i){this.x=t,this.y=i}updatePathMinMax(t,i,n){[i,n]=$o.applyTransform([i,n],t),this.minX=Math.min(this.minX,i),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,i),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(t,i){const n=$o.applyTransform(i,t),a=$o.applyTransform(i.slice(2),t),l=$o.applyTransform([i[0],i[3]],t),d=$o.applyTransform([i[2],i[1]],t);this.minX=Math.min(this.minX,n[0],a[0],l[0],d[0]),this.minY=Math.min(this.minY,n[1],a[1],l[1],d[1]),this.maxX=Math.max(this.maxX,n[0],a[0],l[0],d[0]),this.maxY=Math.max(this.maxY,n[1],a[1],l[1],d[1])}updateScalingPathMinMax(t,i){$o.scaleMinMax(t,i),this.minX=Math.min(this.minX,i[0]),this.minY=Math.min(this.minY,i[1]),this.maxX=Math.max(this.maxX,i[2]),this.maxY=Math.max(this.maxY,i[3])}updateCurvePathMinMax(t,i,n,a,l,d,c,p,h,u){const m=$o.bezierBoundingBox(i,n,a,l,d,c,p,h,u);u||this.updateRectMinMax(t,m)}getPathBoundingBox(t=ml.FILL,i=null){const n=[this.minX,this.minY,this.maxX,this.maxY];if(t===ml.STROKE){i||Dr("Stroke bounding box must include transform.");const a=$o.singularValueDecompose2dScale(i),l=a[0]*this.lineWidth/2,d=a[1]*this.lineWidth/2;n[0]-=l,n[1]-=d,n[2]+=l,n[3]+=d}return n}updateClipFromPath(){const t=$o.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(t=ml.FILL,i=null){return $o.intersect(this.clipBox,this.getPathBoundingBox(t,i))}}function zpe(e,t){if(typeof ImageData<"u"&&t instanceof ImageData){e.putImageData(t,0,0);return}const i=t.height,n=t.width,a=i%Ol,l=(i-a)/Ol,d=a===0?l:l+1,c=e.createImageData(n,Ol);let p=0,h;const u=t.data,m=c.data;let f,x,y,w;if(t.kind===hk.GRAYSCALE_1BPP){const b=u.byteLength,C=new Uint32Array(m.buffer,0,m.byteLength>>2),k=C.length,L=n+7>>3,S=4294967295,j=ql.isLittleEndian?4278190080:255;for(f=0;f<d;f++){for(y=f<l?Ol:a,h=0,x=0;x<y;x++){const I=b-p;let P=0;const B=I>L?n:I*8-7,T=B&-8;let D=0,R=0;for(;P<T;P+=8)R=u[p++],C[h++]=R&128?S:j,C[h++]=R&64?S:j,C[h++]=R&32?S:j,C[h++]=R&16?S:j,C[h++]=R&8?S:j,C[h++]=R&4?S:j,C[h++]=R&2?S:j,C[h++]=R&1?S:j;for(;P<B;P++)D===0&&(R=u[p++],D=128),C[h++]=R&D?S:j,D>>=1}for(;h<k;)C[h++]=0;e.putImageData(c,0,f*Ol)}}else if(t.kind===hk.RGBA_32BPP){for(x=0,w=n*Ol*4,f=0;f<l;f++)m.set(u.subarray(p,p+w)),p+=w,e.putImageData(c,0,x),x+=Ol;f<d&&(w=n*a*4,m.set(u.subarray(p,p+w)),e.putImageData(c,0,x))}else if(t.kind===hk.RGB_24BPP)for(y=Ol,w=n*y,f=0;f<d;f++){for(f>=l&&(y=a,w=n*y),h=0,x=w;x--;)m[h++]=u[p++],m[h++]=u[p++],m[h++]=u[p++],m[h++]=255;e.putImageData(c,0,f*Ol)}else throw new Error(`bad image kind: ${t.kind}`)}function Rpe(e,t){if(t.bitmap){e.drawImage(t.bitmap,0,0);return}const i=t.height,n=t.width,a=i%Ol,l=(i-a)/Ol,d=a===0?l:l+1,c=e.createImageData(n,Ol);let p=0;const h=t.data,u=c.data;for(let m=0;m<d;m++){const f=m<l?Ol:a;({srcPos:p}=vkt({src:h,srcPos:p,dest:u,width:n,height:f,nonBlackColor:0})),e.putImageData(c,0,m*Ol)}}function H9(e,t){const i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const n of i)e[n]!==void 0&&(t[n]=e[n]);e.setLineDash!==void 0&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function vC(e){if(e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",e.setLineDash!==void 0&&(e.setLineDash([]),e.lineDashOffset=0),!Us){const{filter:t}=e;t!=="none"&&t!==""&&(e.filter="none")}}function Fpe(e,t){if(t)return!0;const i=$o.singularValueDecompose2dScale(e);i[0]=Math.fround(i[0]),i[1]=Math.fround(i[1]);const n=Math.fround((globalThis.devicePixelRatio||1)*$6.PDF_TO_CSS_UNITS);return i[0]<=n&&i[1]<=n}const Skt=["butt","round","square"],Ekt=["miter","round","bevel"],Lkt={},Ope={};class Y7{constructor(t,i,n,a,l,{optionalContentConfig:d,markedContentStack:c=null},p,h){this.ctx=t,this.current=new Ppe(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=i,this.objs=n,this.canvasFactory=a,this.filterFactory=l,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=c||[],this.optionalContentConfig=d,this.cachedCanvases=new $kt(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=p,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=h,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t,i=null){return typeof t=="string"?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):i}beginDrawing({transform:t,viewport:i,transparency:n=!1,background:a=null}){const l=this.ctx.canvas.width,d=this.ctx.canvas.height,c=this.ctx.fillStyle;if(this.ctx.fillStyle=a||"#ffffff",this.ctx.fillRect(0,0,l,d),this.ctx.fillStyle=c,n){const p=this.cachedCanvases.getCanvas("transparent",l,d);this.compositeCtx=this.ctx,this.transparentCanvas=p.canvas,this.ctx=p.context,this.ctx.save(),this.ctx.transform(...gn(this.compositeCtx))}this.ctx.save(),vC(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...i.transform),this.viewportScale=i.scale,this.baseTransform=gn(this.ctx)}executeOperatorList(t,i,n,a){const l=t.argsArray,d=t.fnArray;let c=i||0;const p=l.length;if(p===c)return c;const h=p-c>Dpe&&typeof n=="function",u=h?Date.now()+Ckt:0;let m=0;const f=this.commonObjs,x=this.objs;let y;for(;;){if(a!==void 0&&c===a.nextBreakPoint)return a.breakIt(c,n),c;if(y=d[c],y!==v1.dependency)this[y].apply(this,l[c]);else for(const w of l[c]){const b=w.startsWith("g_")?f:x;if(!b.has(w))return b.get(w,n),c}if(c++,c===p)return c;if(h&&++m>Dpe){if(Date.now()>u)return n(),c;m=0}}}#e(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();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)}endDrawing(){this.#e(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const i of t.values())typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement&&(i.width=i.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#t()}#t(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const i=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=i}}}_scaleImage(t,i){const n=t.width,a=t.height;let l=Math.max(Math.hypot(i[0],i[1]),1),d=Math.max(Math.hypot(i[2],i[3]),1),c=n,p=a,h="prescale1",u,m;for(;l>2&&c>1||d>2&&p>1;){let f=c,x=p;l>2&&c>1&&(f=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c/2),l/=c/f),d>2&&p>1&&(x=p>=16384?Math.floor(p/2)-1||1:Math.ceil(p)/2,d/=p/x),u=this.cachedCanvases.getCanvas(h,f,x),m=u.context,m.clearRect(0,0,f,x),m.drawImage(t,0,0,c,p,0,0,f,x),t=u.canvas,c=f,p=x,h=h==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:c,paintHeight:p}}_createMaskCanvas(t){const i=this.ctx,{width:n,height:a}=t,l=this.current.fillColor,d=this.current.patternFill,c=gn(i);let p,h,u,m;if((t.bitmap||t.data)&&t.count>1){const B=t.bitmap||t.data.buffer;h=JSON.stringify(d?c:[c.slice(0,4),l]),p=this._cachedBitmapsMap.get(B),p||(p=new Map,this._cachedBitmapsMap.set(B,p));const T=p.get(h);if(T&&!d){const D=Math.round(Math.min(c[0],c[2])+c[4]),R=Math.round(Math.min(c[1],c[3])+c[5]);return{canvas:T,offsetX:D,offsetY:R}}u=T}u||(m=this.cachedCanvases.getCanvas("maskCanvas",n,a),Rpe(m.context,t));let f=$o.transform(c,[1/n,0,0,-1/a,0,0]);f=$o.transform(f,[1,0,0,1,0,-a]);const[x,y,w,b]=$o.getAxialAlignedBoundingBox([0,0,n,a],f),C=Math.round(w-x)||1,k=Math.round(b-y)||1,L=this.cachedCanvases.getCanvas("fillCanvas",C,k),S=L.context,j=x,I=y;S.translate(-j,-I),S.transform(...f),u||(u=this._scaleImage(m.canvas,Fu(S)),u=u.img,p&&d&&p.set(h,u)),S.imageSmoothingEnabled=Fpe(gn(S),t.interpolate),bC(S,u,0,0,u.width,u.height,0,0,n,a),S.globalCompositeOperation="source-in";const P=$o.transform(Fu(S),[1,0,0,1,-j,-I]);return S.fillStyle=d?l.getPattern(i,this,P,ml.FILL):l,S.fillRect(0,0,n,a),p&&!d&&(this.cachedCanvases.delete("fillCanvas"),p.set(h,L.canvas)),{canvas:L.canvas,offsetX:Math.round(j),offsetY:Math.round(I)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=Skt[t]}setLineJoin(t){this.ctx.lineJoin=Ekt[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,i){const n=this.ctx;n.setLineDash!==void 0&&(n.setLineDash(t),n.lineDashOffset=i)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[i,n]of t)switch(i){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=n;break;case"ca":this.current.fillAlpha=n,this.ctx.globalAlpha=n;break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(n);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,i=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,a=this.cachedCanvases.getCanvas(n,t,i);this.suspendedCtx=this.ctx,this.ctx=a.context;const l=this.ctx;l.setTransform(...gn(this.suspendedCtx)),H9(this.suspendedCtx,l),Akt(l,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(),H9(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const i=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,i,this.ctx,t),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(t,i,n,a){const l=a[0],d=a[1],c=a[2]-l,p=a[3]-d;c===0||p===0||(this.genericComposeSMask(i.context,n,c,p,i.subtype,i.backdrop,i.transferMap,l,d,i.offsetX,i.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(n.canvas,0,0),t.restore())}genericComposeSMask(t,i,n,a,l,d,c,p,h,u,m){let f=t.canvas,x=p-u,y=h-m;if(d){if(x<0||y<0||x+n>f.width||y+a>f.height){const b=this.cachedCanvases.getCanvas("maskExtension",n,a),C=b.context;C.drawImage(f,-x,-y),d.some(k=>k!==0)&&(C.globalCompositeOperation="destination-atop",C.fillStyle=$o.makeHexColor(...d),C.fillRect(0,0,n,a),C.globalCompositeOperation="source-over"),f=b.canvas,x=y=0}else if(d.some(b=>b!==0)){t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const b=new Path2D;b.rect(x,y,n,a),t.clip(b),t.globalCompositeOperation="destination-atop",t.fillStyle=$o.makeHexColor(...d),t.fillRect(x,y,n,a),t.restore()}}i.save(),i.globalAlpha=1,i.setTransform(1,0,0,1,0,0),l==="Alpha"&&c?i.filter=this.filterFactory.addAlphaFilter(c):l==="Luminosity"&&(i.filter=this.filterFactory.addLuminosityFilter(c));const w=new Path2D;w.rect(p,h,n,a),i.clip(w),i.globalCompositeOperation="destination-in",i.drawImage(f,x,y,n,a,p,h,n,a),i.restore()}save(){this.inSMaskMode?(H9(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),H9(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,i,n,a,l,d){this.ctx.transform(t,i,n,a,l,d),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,i,n){const a=this.ctx,l=this.current;let d=l.x,c=l.y,p,h;const u=gn(a),m=u[0]===0&&u[3]===0||u[1]===0&&u[2]===0,f=m?n.slice(0):null;for(let x=0,y=0,w=t.length;x<w;x++)switch(t[x]|0){case v1.rectangle:d=i[y++],c=i[y++];const b=i[y++],C=i[y++],k=d+b,L=c+C;a.moveTo(d,c),b===0||C===0?a.lineTo(k,L):(a.lineTo(k,c),a.lineTo(k,L),a.lineTo(d,L)),m||l.updateRectMinMax(u,[d,c,k,L]),a.closePath();break;case v1.moveTo:d=i[y++],c=i[y++],a.moveTo(d,c),m||l.updatePathMinMax(u,d,c);break;case v1.lineTo:d=i[y++],c=i[y++],a.lineTo(d,c),m||l.updatePathMinMax(u,d,c);break;case v1.curveTo:p=d,h=c,d=i[y+4],c=i[y+5],a.bezierCurveTo(i[y],i[y+1],i[y+2],i[y+3],d,c),l.updateCurvePathMinMax(u,p,h,i[y],i[y+1],i[y+2],i[y+3],d,c,f),y+=6;break;case v1.curveTo2:p=d,h=c,a.bezierCurveTo(d,c,i[y],i[y+1],i[y+2],i[y+3]),l.updateCurvePathMinMax(u,p,h,d,c,i[y],i[y+1],i[y+2],i[y+3],f),d=i[y+2],c=i[y+3],y+=4;break;case v1.curveTo3:p=d,h=c,d=i[y+2],c=i[y+3],a.bezierCurveTo(i[y],i[y+1],d,c,d,c),l.updateCurvePathMinMax(u,p,h,i[y],i[y+1],d,c,d,c,f),y+=4;break;case v1.closePath:a.closePath();break}m&&l.updateScalingPathMinMax(u,f),l.setCurrentPoint(d,c)}closePath(){this.ctx.closePath()}stroke(t=!0){const i=this.ctx,n=this.current.strokeColor;i.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof n=="object"&&n?.getPattern?(i.save(),i.strokeStyle=n.getPattern(i,this,Fu(i),ml.STROKE),this.rescaleAndStroke(!1),i.restore()):this.rescaleAndStroke(!0)),t&&this.consumePath(this.current.getClippedPathBoundingBox()),i.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(t=!0){const i=this.ctx,n=this.current.fillColor,a=this.current.patternFill;let l=!1;a&&(i.save(),i.fillStyle=n.getPattern(i,this,Fu(i),ml.FILL),l=!0);const d=this.current.getClippedPathBoundingBox();this.contentVisible&&d!==null&&(this.pendingEOFill?(i.fill("evenodd"),this.pendingEOFill=!1):i.fill()),l&&i.restore(),t&&this.consumePath(d)}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=Lkt}eoClip(){this.pendingClip=Ope}beginText(){this.current.textMatrix=nMe,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,i=this.ctx;if(t===void 0){i.beginPath();return}i.save(),i.beginPath();for(const n of t)i.setTransform(...n.transform),i.translate(n.x,n.y),n.addToPath(i,n.fontSize);i.restore(),i.clip(),i.beginPath(),delete this.pendingTextPaths}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,i){const n=this.commonObjs.get(t),a=this.current;if(!n)throw new Error(`Can't find font for ${t}`);if(a.fontMatrix=n.fontMatrix||LU,(a.fontMatrix[0]===0||a.fontMatrix[3]===0)&&zi("Invalid font matrix for font "+t),i<0?(i=-i,a.fontDirection=-1):a.fontDirection=1,this.current.font=n,this.current.fontSize=i,n.isType3Font)return;const l=n.loadedName||"sans-serif",d=n.systemFontInfo?.css||`"${l}", ${n.fallbackName}`;let c="normal";n.black?c="900":n.bold&&(c="bold");const p=n.italic?"italic":"normal";let h=i;i<Mpe?h=Mpe:i>Bpe&&(h=Bpe),this.current.fontSizeScale=i/h,this.ctx.font=`${p} ${c} ${h}px ${d}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,i){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=i}setLeadingMoveText(t,i){this.setLeading(-i),this.moveText(t,i)}setTextMatrix(t,i,n,a,l,d){this.current.textMatrix=[t,i,n,a,l,d],this.current.textMatrixScale=Math.hypot(t,i),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,i,n,a){const l=this.ctx,d=this.current,c=d.font,p=d.textRenderingMode,h=d.fontSize/d.fontSizeScale,u=p&Rs.FILL_STROKE_MASK,m=!!(p&Rs.ADD_TO_PATH_FLAG),f=d.patternFill&&!c.missingFile;let x;(c.disableFontFace||m||f)&&(x=c.getPathGenerator(this.commonObjs,t)),c.disableFontFace||f?(l.save(),l.translate(i,n),l.beginPath(),x(l,h),a&&l.setTransform(...a),(u===Rs.FILL||u===Rs.FILL_STROKE)&&l.fill(),(u===Rs.STROKE||u===Rs.FILL_STROKE)&&l.stroke(),l.restore()):((u===Rs.FILL||u===Rs.FILL_STROKE)&&l.fillText(t,i,n),(u===Rs.STROKE||u===Rs.FILL_STROKE)&&l.strokeText(t,i,n)),m&&(this.pendingTextPaths||=[]).push({transform:gn(l),x:i,y:n,fontSize:h,addToPath:x})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const i=t.getImageData(0,0,10,10).data;let n=!1;for(let a=3;a<i.length;a+=4)if(i[a]>0&&i[a]<255){n=!0;break}return ar(this,"isFontSubpixelAAEnabled",n)}showText(t){const i=this.current,n=i.font;if(n.isType3Font)return this.showType3Text(t);const a=i.fontSize;if(a===0)return;const l=this.ctx,d=i.fontSizeScale,c=i.charSpacing,p=i.wordSpacing,h=i.fontDirection,u=i.textHScale*h,m=t.length,f=n.vertical,x=f?1:-1,y=n.defaultVMetrics,w=a*i.fontMatrix[0],b=i.textRenderingMode===Rs.FILL&&!n.disableFontFace&&!i.patternFill;l.save(),l.transform(...i.textMatrix),l.translate(i.x,i.y+i.textRise),h>0?l.scale(u,-1):l.scale(u,1);let C;if(i.patternFill){l.save();const I=i.fillColor.getPattern(l,this,Fu(l),ml.FILL);C=gn(l),l.restore(),l.fillStyle=I}let k=i.lineWidth;const L=i.textMatrixScale;if(L===0||k===0){const I=i.textRenderingMode&Rs.FILL_STROKE_MASK;(I===Rs.STROKE||I===Rs.FILL_STROKE)&&(k=this.getSinglePixelWidth())}else k/=L;if(d!==1&&(l.scale(d,d),k/=d),l.lineWidth=k,n.isInvalidPDFjsFont){const I=[];let P=0;for(const B of t)I.push(B.unicode),P+=B.width;l.fillText(I.join(""),0,0),i.x+=P*w*u,l.restore(),this.compose();return}let S=0,j;for(j=0;j<m;++j){const I=t[j];if(typeof I=="number"){S+=x*I*a/1e3;continue}let P=!1;const B=(I.isSpace?p:0)+c,T=I.fontChar,D=I.accent;let R,G,q=I.width;if(f){const H=I.vmetric||y,V=-(I.vmetric?H[1]:q*.5)*w,N=H[2]*w;q=H?-H[0]:q,R=V/d,G=(S+N)/d}else R=S/d,G=0;if(n.remeasure&&q>0){const H=l.measureText(T).width*1e3/a*d;if(q<H&&this.isFontSubpixelAAEnabled){const V=q/H;P=!0,l.save(),l.scale(V,1),R/=V}else q!==H&&(R+=(q-H)/2e3*a/d)}if(this.contentVisible&&(I.isInFont||n.missingFile)){if(b&&!D)l.fillText(T,R,G);else if(this.paintChar(T,R,G,C),D){const H=R+a*D.offset.x/d,V=G-a*D.offset.y/d;this.paintChar(D.fontChar,H,V,C)}}const Z=f?q*w-B*h:q*w+B*h;S+=Z,P&&l.restore()}f?i.y-=S:i.x+=S*u,l.restore(),this.compose()}showType3Text(t){const i=this.ctx,n=this.current,a=n.font,l=n.fontSize,d=n.fontDirection,c=a.vertical?1:-1,p=n.charSpacing,h=n.wordSpacing,u=n.textHScale*d,m=n.fontMatrix||LU,f=t.length,x=n.textRenderingMode===Rs.INVISIBLE;let y,w,b,C;if(!(x||l===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,i.save(),i.transform(...n.textMatrix),i.translate(n.x,n.y),i.scale(u,d),y=0;y<f;++y){if(w=t[y],typeof w=="number"){C=c*w*l/1e3,this.ctx.translate(C,0),n.x+=C*u;continue}const k=(w.isSpace?h:0)+p,L=a.charProcOperatorList[w.operatorListId];if(!L){zi(`Type3 character "${w.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=w,this.save(),i.scale(l,l),i.transform(...m),this.executeOperatorList(L),this.restore()),b=$o.applyTransform([w.width,0],m)[0]*l+k,i.translate(b,0),n.x+=b*u}i.restore(),this.processingType3=null}}setCharWidth(t,i){}setCharWidthAndBounds(t,i,n,a,l,d){this.ctx.rect(n,a,l-n,d-a),this.ctx.clip(),this.endPath()}getColorN_Pattern(t){let i;if(t[0]==="TilingPattern"){const n=t[1],a=this.baseTransform||gn(this.ctx),l={createCanvasGraphics:d=>new Y7(d,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};i=new sq(t,n,this.ctx,l,a)}else i=this._getPattern(t[1],t[2]);return i}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,i,n){const a=$o.makeHexColor(t,i,n);this.ctx.strokeStyle=a,this.current.strokeColor=a}setFillRGBColor(t,i,n){const a=$o.makeHexColor(t,i,n);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}_getPattern(t,i=null){let n;return this.cachedPatterns.has(t)?n=this.cachedPatterns.get(t):(n=bkt(this.getObject(t)),this.cachedPatterns.set(t,n)),i&&(n.matrix=i),n}shadingFill(t){if(!this.contentVisible)return;const i=this.ctx;this.save();const n=this._getPattern(t);i.fillStyle=n.getPattern(i,this,Fu(i),ml.SHADING);const a=Fu(i);if(a){const{width:l,height:d}=i.canvas,[c,p,h,u]=$o.getAxialAlignedBoundingBox([0,0,l,d],a);this.ctx.fillRect(c,p,h-c,u-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Dr("Should not call beginInlineImage")}beginImageData(){Dr("Should not call beginImageData")}paintFormXObjectBegin(t,i){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=gn(this.ctx),i)){const n=i[2]-i[0],a=i[3]-i[1];this.ctx.rect(i[0],i[1],n,a),this.current.updateRectMinMax(gn(this.ctx),i),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const i=this.ctx;t.isolated||tI("TODO: Support non-isolated groups."),t.knockout&&zi("Knockout groups not supported.");const n=gn(i);if(t.matrix&&i.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let a=$o.getAxialAlignedBoundingBox(t.bbox,gn(i));const l=[0,0,i.canvas.width,i.canvas.height];a=$o.intersect(a,l)||[0,0,0,0];const d=Math.floor(a[0]),c=Math.floor(a[1]),p=Math.max(Math.ceil(a[2])-d,1),h=Math.max(Math.ceil(a[3])-c,1);this.current.startNewPathAndClipBox([0,0,p,h]);let u="groupAt"+this.groupLevel;t.smask&&(u+="_smask_"+this.smaskCounter++%2);const m=this.cachedCanvases.getCanvas(u,p,h),f=m.context;f.translate(-d,-c),f.transform(...n),t.smask?this.smaskStack.push({canvas:m.canvas,context:f,offsetX:d,offsetY:c,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(i.setTransform(1,0,0,1,0,0),i.translate(d,c),i.save()),H9(i,f),this.ctx=f,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const i=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const a=gn(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...a);const l=$o.getAxialAlignedBoundingBox([0,0,i.canvas.width,i.canvas.height],a);this.ctx.drawImage(i.canvas,0,0),this.ctx.restore(),this.compose(l)}}beginAnnotation(t,i,n,a,l){if(this.#e(),vC(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),i){const d=i[2]-i[0],c=i[3]-i[1];if(l&&this.annotationCanvasMap){n=n.slice(),n[4]-=i[0],n[5]-=i[1],i=i.slice(),i[0]=i[1]=0,i[2]=d,i[3]=c;const[p,h]=$o.singularValueDecompose2dScale(gn(this.ctx)),{viewportScale:u}=this,m=Math.ceil(d*this.outputScaleX*u),f=Math.ceil(c*this.outputScaleY*u);this.annotationCanvas=this.canvasFactory.create(m,f);const{canvas:x,context:y}=this.annotationCanvas;this.annotationCanvasMap.set(t,x),this.annotationCanvas.savedCtx=this.ctx,this.ctx=y,this.ctx.save(),this.ctx.setTransform(p,0,0,-h,0,c*h),vC(this.ctx)}else vC(this.ctx),this.ctx.rect(i[0],i[1],d,c),this.ctx.clip(),this.endPath()}this.current=new Ppe(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...a)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#t(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const i=t.count;t=this.getObject(t.data,t),t.count=i;const n=this.ctx,a=this.processingType3;if(a&&(a.compiled===void 0&&(a.compiled=kkt(t)),a.compiled)){a.compiled(n);return}const l=this._createMaskCanvas(t),d=l.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(d,l.offsetX,l.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(t,i,n=0,a=0,l,d){if(!this.contentVisible)return;t=this.getObject(t.data,t);const c=this.ctx;c.save();const p=gn(c);c.transform(i,n,a,l,0,0);const h=this._createMaskCanvas(t);c.setTransform(1,0,0,1,h.offsetX-p[4],h.offsetY-p[5]);for(let u=0,m=d.length;u<m;u+=2){const f=$o.transform(p,[i,n,a,l,d[u],d[u+1]]),[x,y]=$o.applyTransform([0,0],f);c.drawImage(h.canvas,x,y)}c.restore(),this.compose()}paintImageMaskXObjectGroup(t){if(!this.contentVisible)return;const i=this.ctx,n=this.current.fillColor,a=this.current.patternFill;for(const l of t){const{data:d,width:c,height:p,transform:h}=l,u=this.cachedCanvases.getCanvas("maskCanvas",c,p),m=u.context;m.save();const f=this.getObject(d,l);Rpe(m,f),m.globalCompositeOperation="source-in",m.fillStyle=a?n.getPattern(m,this,Fu(i),ml.FILL):n,m.fillRect(0,0,c,p),m.restore(),i.save(),i.transform(...h),i.scale(1,-1),bC(i,u.canvas,0,0,c,p,0,-1,1,1),i.restore()}this.compose()}paintImageXObject(t){if(!this.contentVisible)return;const i=this.getObject(t);if(!i){zi("Dependent image isn't ready yet");return}this.paintInlineImageXObject(i)}paintImageXObjectRepeat(t,i,n,a){if(!this.contentVisible)return;const l=this.getObject(t);if(!l){zi("Dependent image isn't ready yet");return}const d=l.width,c=l.height,p=[];for(let h=0,u=a.length;h<u;h+=2)p.push({transform:[i,0,0,n,a[h],a[h+1]],x:0,y:0,w:d,h:c});this.paintInlineImageXObjectGroup(l,p)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return t.bitmap;const{bitmap:i,width:n,height:a}=t,l=this.cachedCanvases.getCanvas("inlineImage",n,a),d=l.context;return d.filter=this.current.transferMaps,d.drawImage(i,0,0),d.filter="none",l.canvas}paintInlineImageXObject(t){if(!this.contentVisible)return;const i=t.width,n=t.height,a=this.ctx;if(this.save(),!Us){const{filter:c}=a;c!=="none"&&c!==""&&(a.filter="none")}a.scale(1/i,-1/n);let l;if(t.bitmap)l=this.applyTransferMapsToBitmap(t);else if(typeof HTMLElement=="function"&&t instanceof HTMLElement||!t.data)l=t;else{const p=this.cachedCanvases.getCanvas("inlineImage",i,n).context;zpe(p,t),l=this.applyTransferMapsToCanvas(p)}const d=this._scaleImage(l,Fu(a));a.imageSmoothingEnabled=Fpe(gn(a),t.interpolate),bC(a,d.img,0,0,d.paintWidth,d.paintHeight,0,-n,i,n),this.compose(),this.restore()}paintInlineImageXObjectGroup(t,i){if(!this.contentVisible)return;const n=this.ctx;let a;if(t.bitmap)a=t.bitmap;else{const l=t.width,d=t.height,p=this.cachedCanvases.getCanvas("inlineImage",l,d).context;zpe(p,t),a=this.applyTransferMapsToCanvas(p)}for(const l of i)n.save(),n.transform(...l.transform),n.scale(1,-1),bC(n,a,l.x,l.y,l.w,l.h,0,-1,1,1),n.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t){}markPointProps(t,i){}beginMarkedContent(t){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,i){t==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(i)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(t){const i=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(t);const n=this.ctx;this.pendingClip&&(i||(this.pendingClip===Ope?n.clip("evenodd"):n.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),n.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=gn(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const i=Math.abs(t[0]*t[3]-t[2]*t[1]),n=Math.hypot(t[0],t[2]),a=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(n,a)/i}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:t}=this.current,{a:i,b:n,c:a,d:l}=this.ctx.getTransform();let d,c;if(n===0&&a===0){const p=Math.abs(i),h=Math.abs(l);if(p===h)if(t===0)d=c=1/p;else{const u=p*t;d=c=u<1?1/u:1}else if(t===0)d=1/p,c=1/h;else{const u=p*t,m=h*t;d=u<1?1/u:1,c=m<1?1/m:1}}else{const p=Math.abs(i*l-n*a),h=Math.hypot(i,n),u=Math.hypot(a,l);if(t===0)d=u/p,c=h/p;else{const m=t*p;d=u>m?u/m:1,c=h>m?h/m:1}}this._cachedScaleForStroking[0]=d,this._cachedScaleForStroking[1]=c}return this._cachedScaleForStroking}rescaleAndStroke(t){const{ctx:i}=this,{lineWidth:n}=this.current,[a,l]=this.getScaleForStroking();if(i.lineWidth=n||1,a===1&&l===1){i.stroke();return}const d=i.getLineDash();if(t&&i.save(),i.scale(a,l),d.length>0){const c=Math.max(a,l);i.setLineDash(d.map(p=>p/c)),i.lineDashOffset/=c}i.stroke(),t&&i.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}for(const e in v1)Y7.prototype[e]!==void 0&&(Y7.prototype[v1[e]]=Y7.prototype[e]);class vw{static#e=null;static#t="";static get workerPort(){return this.#e}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");this.#e=t}static get workerSrc(){return this.#t}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");this.#t=t}}const CC={DATA:1,ERROR:2},ta={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function $d(e){switch(e instanceof Error||typeof e=="object"&&e!==null||Dr('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new i4(e.message);case"MissingPDFException":return new o4(e.message);case"PasswordException":return new jU(e.message,e.code);case"UnexpectedResponseException":return new oI(e.message,e.status);case"UnknownErrorException":return new MU(e.message,e.details);default:return new MU(e.message,e.toString())}}class Gx{constructor(t,i,n){this.sourceName=t,this.targetName=i,this.comObj=n,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),this._onComObjOnMessage=a=>{const l=a.data;if(l.targetName!==this.sourceName)return;if(l.stream){this.#t(l);return}if(l.callback){const c=l.callbackId,p=this.callbackCapabilities[c];if(!p)throw new Error(`Cannot resolve callback ${c}`);if(delete this.callbackCapabilities[c],l.callback===CC.DATA)p.resolve(l.data);else if(l.callback===CC.ERROR)p.reject($d(l.reason));else throw new Error("Unexpected callback case");return}const d=this.actionHandler[l.action];if(!d)throw new Error(`Unknown action from worker: ${l.action}`);if(l.callbackId){const c=this.sourceName,p=l.sourceName;new Promise(function(h){h(d(l.data))}).then(function(h){n.postMessage({sourceName:c,targetName:p,callback:CC.DATA,callbackId:l.callbackId,data:h})},function(h){n.postMessage({sourceName:c,targetName:p,callback:CC.ERROR,callbackId:l.callbackId,reason:$d(h)})});return}if(l.streamId){this.#e(l);return}d(l.data)},n.addEventListener("message",this._onComObjOnMessage)}on(t,i){const n=this.actionHandler;if(n[t])throw new Error(`There is already an actionName called "${t}"`);n[t]=i}send(t,i,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:i},n)}sendWithPromise(t,i,n){const a=this.callbackId++,l=Promise.withResolvers();this.callbackCapabilities[a]=l;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:a,data:i},n)}catch(d){l.reject(d)}return l.promise}sendWithStream(t,i,n,a){const l=this.streamId++,d=this.sourceName,c=this.targetName,p=this.comObj;return new ReadableStream({start:h=>{const u=Promise.withResolvers();return this.streamControllers[l]={controller:h,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},p.postMessage({sourceName:d,targetName:c,action:t,streamId:l,data:i,desiredSize:h.desiredSize},a),u.promise},pull:h=>{const u=Promise.withResolvers();return this.streamControllers[l].pullCall=u,p.postMessage({sourceName:d,targetName:c,stream:ta.PULL,streamId:l,desiredSize:h.desiredSize}),u.promise},cancel:h=>{ka(h instanceof Error,"cancel must have a valid reason");const u=Promise.withResolvers();return this.streamControllers[l].cancelCall=u,this.streamControllers[l].isClosed=!0,p.postMessage({sourceName:d,targetName:c,stream:ta.CANCEL,streamId:l,reason:$d(h)}),u.promise}},n)}#e(t){const i=t.streamId,n=this.sourceName,a=t.sourceName,l=this.comObj,d=this,c=this.actionHandler[t.action],p={enqueue(h,u=1,m){if(this.isCancelled)return;const f=this.desiredSize;this.desiredSize-=u,f>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),l.postMessage({sourceName:n,targetName:a,stream:ta.ENQUEUE,streamId:i,chunk:h},m)},close(){this.isCancelled||(this.isCancelled=!0,l.postMessage({sourceName:n,targetName:a,stream:ta.CLOSE,streamId:i}),delete d.streamSinks[i])},error(h){ka(h instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,l.postMessage({sourceName:n,targetName:a,stream:ta.ERROR,streamId:i,reason:$d(h)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};p.sinkCapability.resolve(),p.ready=p.sinkCapability.promise,this.streamSinks[i]=p,new Promise(function(h){h(c(t.data,p))}).then(function(){l.postMessage({sourceName:n,targetName:a,stream:ta.START_COMPLETE,streamId:i,success:!0})},function(h){l.postMessage({sourceName:n,targetName:a,stream:ta.START_COMPLETE,streamId:i,reason:$d(h)})})}#t(t){const i=t.streamId,n=this.sourceName,a=t.sourceName,l=this.comObj,d=this.streamControllers[i],c=this.streamSinks[i];switch(t.stream){case ta.START_COMPLETE:t.success?d.startCall.resolve():d.startCall.reject($d(t.reason));break;case ta.PULL_COMPLETE:t.success?d.pullCall.resolve():d.pullCall.reject($d(t.reason));break;case ta.PULL:if(!c){l.postMessage({sourceName:n,targetName:a,stream:ta.PULL_COMPLETE,streamId:i,success:!0});break}c.desiredSize<=0&&t.desiredSize>0&&c.sinkCapability.resolve(),c.desiredSize=t.desiredSize,new Promise(function(p){p(c.onPull?.())}).then(function(){l.postMessage({sourceName:n,targetName:a,stream:ta.PULL_COMPLETE,streamId:i,success:!0})},function(p){l.postMessage({sourceName:n,targetName:a,stream:ta.PULL_COMPLETE,streamId:i,reason:$d(p)})});break;case ta.ENQUEUE:if(ka(d,"enqueue should have stream controller"),d.isClosed)break;d.controller.enqueue(t.chunk);break;case ta.CLOSE:if(ka(d,"close should have stream controller"),d.isClosed)break;d.isClosed=!0,d.controller.close(),this.#o(d,i);break;case ta.ERROR:ka(d,"error should have stream controller"),d.controller.error($d(t.reason)),this.#o(d,i);break;case ta.CANCEL_COMPLETE:t.success?d.cancelCall.resolve():d.cancelCall.reject($d(t.reason)),this.#o(d,i);break;case ta.CANCEL:if(!c)break;new Promise(function(p){p(c.onCancel?.($d(t.reason)))}).then(function(){l.postMessage({sourceName:n,targetName:a,stream:ta.CANCEL_COMPLETE,streamId:i,success:!0})},function(p){l.postMessage({sourceName:n,targetName:a,stream:ta.CANCEL_COMPLETE,streamId:i,reason:$d(p)})}),c.sinkCapability.reject($d(t.reason)),c.isCancelled=!0,delete this.streamSinks[i];break;default:throw new Error("Unexpected stream case")}}async#o(t,i){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[i]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}class Ikt{#e;#t;constructor({parsedData:t,rawData:i}){this.#e=t,this.#t=i}getRaw(){return this.#t}get(t){return this.#e.get(t)??null}getAll(){return qK(this.#e)}has(t){return this.#e.has(t)}}const z0=Symbol("INTERNAL");class jkt{#e=!1;#t=!1;#o=!1;#r=!0;constructor(t,{name:i,intent:n,usage:a}){this.#e=!!(t&cc.DISPLAY),this.#t=!!(t&cc.PRINT),this.name=i,this.intent=n,this.usage=a}get visible(){if(this.#o)return this.#r;if(!this.#r)return!1;const{print:t,view:i}=this.usage;return this.#e?i?.viewState!=="OFF":this.#t?t?.printState!=="OFF":!0}_setVisible(t,i,n=!1){t!==z0&&Dr("Internal method `_setVisible` called."),this.#o=n,this.#r=i}}class Mkt{#e=null;#t=new Map;#o=null;#r=null;constructor(t,i=cc.DISPLAY){if(this.renderingIntent=i,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,this.#r=t.order;for(const n of t.groups)this.#t.set(n.id,new jkt(i,n));if(t.baseState==="OFF")for(const n of this.#t.values())n._setVisible(z0,!1);for(const n of t.on)this.#t.get(n)._setVisible(z0,!0);for(const n of t.off)this.#t.get(n)._setVisible(z0,!1);this.#o=this.getHash()}}#s(t){const i=t.length;if(i<2)return!0;const n=t[0];for(let a=1;a<i;a++){const l=t[a];let d;if(Array.isArray(l))d=this.#s(l);else if(this.#t.has(l))d=this.#t.get(l).visible;else return zi(`Optional content group not found: ${l}`),!0;switch(n){case"And":if(!d)return!1;break;case"Or":if(d)return!0;break;case"Not":return!d;default:return!0}}return n==="And"}isVisible(t){if(this.#t.size===0)return!0;if(!t)return tI("Optional content group not defined."),!0;if(t.type==="OCG")return this.#t.has(t.id)?this.#t.get(t.id).visible:(zi(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return this.#s(t.expression);if(!t.policy||t.policy==="AnyOn"){for(const i of t.ids){if(!this.#t.has(i))return zi(`Optional content group not found: ${i}`),!0;if(this.#t.get(i).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const i of t.ids){if(!this.#t.has(i))return zi(`Optional content group not found: ${i}`),!0;if(!this.#t.get(i).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const i of t.ids){if(!this.#t.has(i))return zi(`Optional content group not found: ${i}`),!0;if(!this.#t.get(i).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const i of t.ids){if(!this.#t.has(i))return zi(`Optional content group not found: ${i}`),!0;if(this.#t.get(i).visible)return!1}return!0}return zi(`Unknown optional content policy ${t.policy}.`),!0}return zi(`Unknown group type ${t.type}.`),!0}setVisibility(t,i=!0){const n=this.#t.get(t);if(!n){zi(`Optional content group not found: ${t}`);return}n._setVisible(z0,!!i,!0),this.#e=null}setOCGState({state:t,preserveRB:i}){let n;for(const a of t){switch(a){case"ON":case"OFF":case"Toggle":n=a;continue}const l=this.#t.get(a);if(l)switch(n){case"ON":l._setVisible(z0,!0);break;case"OFF":l._setVisible(z0,!1);break;case"Toggle":l._setVisible(z0,!l.visible);break}}this.#e=null}get hasInitialVisibility(){return this.#o===null||this.getHash()===this.#o}getOrder(){return this.#t.size?this.#r?this.#r.slice():[...this.#t.keys()]:null}getGroups(){return this.#t.size>0?qK(this.#t):null}getGroup(t){return this.#t.get(t)||null}getHash(){if(this.#e!==null)return this.#e;const t=new uMe;for(const[i,n]of this.#t)t.update(`${i}:${n.visible}`);return this.#e=t.hexdigest()}}class Bkt{constructor(t,{disableRange:i=!1,disableStream:n=!1}){ka(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:a,initialData:l,progressiveDone:d,contentDispositionFilename:c}=t;if(this._queuedChunks=[],this._progressiveDone=d,this._contentDispositionFilename=c,l?.length>0){const p=l instanceof Uint8Array&&l.byteLength===l.buffer.byteLength?l.buffer:new Uint8Array(l).buffer;this._queuedChunks.push(p)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!n,this._isRangeSupported=!i,this._contentLength=a,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((p,h)=>{this._onReceiveData({begin:p,chunk:h})}),t.addProgressListener((p,h)=>{this._onProgress({loaded:p,total:h})}),t.addProgressiveReadListener(p=>{this._onReceiveData({chunk:p})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:i}){const n=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n);else{const a=this._rangeReaders.some(function(l){return l._begin!==t?!1:(l._enqueue(n),!0)});ka(a,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){t.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const i=this._rangeReaders.indexOf(t);i>=0&&this._rangeReaders.splice(i,1)}getFullReader(){ka(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new Dkt(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const n=new Tkt(this,t,i);return this._pdfDataRangeTransport.requestDataRange(t,i),this._rangeReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeReaders.slice(0))i.cancel(t);this._pdfDataRangeTransport.abort()}}class Dkt{constructor(t,i,n=!1,a=null){this._stream=t,this._done=n||!1,this._filename=tq(a)?a:null,this._queuedChunks=i||[],this._loaded=0;for(const l of this._queuedChunks)this._loaded+=l.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.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 t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class Tkt{constructor(t,i,n){this._stream=t,this._begin=i,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const n of this._requests)n.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 i=this._queuedChunk;return this._queuedChunk=null,{value:i,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function Pkt(e){let t=!0,i=n("filename\\*","i").exec(e);if(i){i=i[1];let u=c(i);return u=unescape(u),u=p(u),u=h(u),l(u)}if(i=d(e),i){const u=h(i);return l(u)}if(i=n("filename","i").exec(e),i){i=i[1];let u=c(i);return u=h(u),l(u)}function n(u,m){return new RegExp("(?:^|;)\\s*"+u+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',m)}function a(u,m){if(u){if(!/^[\x00-\xFF]+$/.test(m))return m;try{const f=new TextDecoder(u,{fatal:!0}),x=iI(m);m=f.decode(x),t=!1}catch{}}return m}function l(u){return t&&/[\x80-\xff]/.test(u)&&(u=a("utf-8",u),t&&(u=a("iso-8859-1",u))),u}function d(u){const m=[];let f;const x=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(f=x.exec(u))!==null;){let[,w,b,C]=f;if(w=parseInt(w,10),w in m){if(w===0)break;continue}m[w]=[b,C]}const y=[];for(let w=0;w<m.length&&w in m;++w){let[b,C]=m[w];C=c(C),b&&(C=unescape(C),w===0&&(C=p(C))),y.push(C)}return y.join("")}function c(u){if(u.startsWith('"')){const m=u.slice(1).split('\\"');for(let f=0;f<m.length;++f){const x=m[f].indexOf('"');x!==-1&&(m[f]=m[f].slice(0,x),m.length=f+1),m[f]=m[f].replaceAll(/\\(.)/g,"$1")}u=m.join('"')}return u}function p(u){const m=u.indexOf("'");if(m===-1)return u;const f=u.slice(0,m),y=u.slice(m+1).replace(/^[^']*'/,"");return a(f,y)}function h(u){return!u.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(u)?u:u.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(m,f,x,y){if(x==="q"||x==="Q")return y=y.replaceAll("_"," "),y=y.replaceAll(/=([0-9a-fA-F]{2})/g,function(w,b){return String.fromCharCode(parseInt(b,16))}),a(f,y);try{y=atob(y)}catch{}return a(f,y)})}return""}function lq({getResponseHeader:e,isHttp:t,rangeChunkSize:i,disableRange:n}){const a={allowRangeRequests:!1,suggestedLength:void 0},l=parseInt(e("Content-Length"),10);return!Number.isInteger(l)||(a.suggestedLength=l,l<=2*i)||n||!t||e("Accept-Ranges")!=="bytes"||(e("Content-Encoding")||"identity")!=="identity"||(a.allowRangeRequests=!0),a}function dq(e){const t=e("Content-Disposition");if(t){let i=Pkt(t);if(i.includes("%"))try{i=decodeURIComponent(i)}catch{}if(tq(i))return i}return null}function dI(e,t){return e===404||e===0&&t.startsWith("file:")?new o4('Missing PDF "'+t+'".'):new oI(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)}function fMe(e){return e===200||e===206}function xMe(e,t,i){return{method:"GET",headers:e,signal:i.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function yMe(e){const t=new Headers;for(const i in e){const n=e[i];n!==void 0&&t.append(i,n)}return t}function wMe(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(zi(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}class Npe{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return ka(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new zkt(this),this._fullRequestReader}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const n=new Rkt(this,t,i);return this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class zkt{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const i=t.source;this._withCredentials=i.withCredentials||!1,this._contentLength=i.length,this._headersCapability=Promise.withResolvers(),this._disableRange=i.disableRange||!1,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!i.disableStream,this._isRangeSupported=!i.disableRange,this._headers=yMe(this._stream.httpHeaders);const n=i.url;fetch(n,xMe(this._headers,this._withCredentials,this._abortController)).then(a=>{if(!fMe(a.status))throw dI(a.status,n);this._reader=a.body.getReader(),this._headersCapability.resolve();const l=p=>a.headers.get(p),{allowRangeRequests:d,suggestedLength:c}=lq({getResponseHeader:l,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=d,this._contentLength=c||this._contentLength,this._filename=dq(l),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new i4("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(){await this._headersCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:wMe(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class Rkt{constructor(t,i,n){this._stream=t,this._reader=null,this._loaded=0;const a=t.source;this._withCredentials=a.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!a.disableStream,this._abortController=new AbortController,this._headers=yMe(this._stream.httpHeaders),this._headers.append("Range",`bytes=${i}-${n-1}`);const l=a.url;fetch(l,xMe(this._headers,this._withCredentials,this._abortController)).then(d=>{if(!fMe(d.status))throw dI(d.status,l);this._readCapability.resolve(),this._reader=d.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:wMe(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}const vO=200,CO=206;function Fkt(e){const t=e.response;return typeof t!="string"?t:iI(t).buffer}class Okt{constructor(t,i={}){this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&i.httpHeaders||Object.create(null),this.withCredentials=i.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,i,n){const a={begin:t,end:i};for(const l in n)a[l]=n[l];return this.request(a)}requestFull(t){return this.request(t)}request(t){const i=new XMLHttpRequest,n=this.currXhrId++,a=this.pendingRequests[n]={xhr:i};i.open("GET",this.url),i.withCredentials=this.withCredentials;for(const l in this.httpHeaders){const d=this.httpHeaders[l];d!==void 0&&i.setRequestHeader(l,d)}return this.isHttp&&"begin"in t&&"end"in t?(i.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),a.expectedStatus=CO):a.expectedStatus=vO,i.responseType="arraybuffer",t.onError&&(i.onerror=function(l){t.onError(i.status)}),i.onreadystatechange=this.onStateChange.bind(this,n),i.onprogress=this.onProgress.bind(this,n),a.onHeadersReceived=t.onHeadersReceived,a.onDone=t.onDone,a.onError=t.onError,a.onProgress=t.onProgress,i.send(null),n}onProgress(t,i){const n=this.pendingRequests[t];n&&n.onProgress?.(i)}onStateChange(t,i){const n=this.pendingRequests[t];if(!n)return;const a=n.xhr;if(a.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),a.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],a.status===0&&this.isHttp){n.onError?.(a.status);return}const l=a.status||vO;if(!(l===vO&&n.expectedStatus===CO)&&l!==n.expectedStatus){n.onError?.(a.status);return}const c=Fkt(a);if(l===CO){const p=a.getResponseHeader("Content-Range"),h=/bytes (\d+)-(\d+)\/(\d+)/.exec(p);n.onDone({begin:parseInt(h[1],10),chunk:c})}else c?n.onDone({begin:0,chunk:c}):n.onError?.(a.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const i=this.pendingRequests[t].xhr;delete this.pendingRequests[t],i.abort()}}class Nkt{constructor(t){this._source=t,this._manager=new Okt(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const i=this._rangeRequestReaders.indexOf(t);i>=0&&this._rangeRequestReaders.splice(i,1)}getFullReader(){return ka(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new Hkt(this._manager,this._source),this._fullRequestReader}getRangeReader(t,i){const n=new _kt(this._manager,t,i);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class Hkt{constructor(t,i){this._manager=t;const n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=i.url,this._fullRequestId=t.requestFull(n),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=i.disableRange||!1,this._contentLength=i.length,this._rangeChunkSize=i.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 t=this._fullRequestId,i=this._manager.getRequestXhr(t),n=d=>i.getResponseHeader(d),{allowRangeRequests:a,suggestedLength:l}=lq({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});a&&(this._isRangeSupported=!0),this._contentLength=l||this._contentLength,this._filename=dq(n),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=dI(t,this._url),this._headersReceivedCapability.reject(this._storedError);for(const i of this._requests)i.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.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._headersReceivedCapability.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 t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersReceivedCapability.reject(t);for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class _kt{constructor(t,i,n){this._manager=t;const a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(i,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(t){const i=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:i,done:!1}):this._queuedChunk=i,this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError=dI(t,this._url);for(const i of this._requests)i.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const i=this._queuedChunk;return this._queuedChunk=null,{value:i,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const bMe=/^file:\/\/\/[a-zA-Z]:\//;function Vkt(e){const t=Jh.get("url"),i=t.parse(e);return i.protocol==="file:"||i.host?i:/^[a-z]:[/\\]/i.test(e)?t.parse(`file:///${e}`):(i.host||(i.protocol="file:"),i)}class Qkt{constructor(t){this.source=t,this.url=Vkt(t.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return ka(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new Gkt(this):new Ukt(this),this._fullRequestReader}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const n=this.isFsUrl?new Ykt(this,t,i):new Wkt(this,t,i);return this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class vMe{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const i=t.source;this._contentLength=i.length,this._loaded=0,this._filename=null,this._disableRange=i.disableRange||!1,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!i.disableStream,this._isRangeSupported=!i.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(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",i=>{this._error(i)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i4("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class CMe{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const i=t.source;this._isStreamingSupported=!i.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",i=>{this._error(i)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function SS(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class Ukt extends vMe{constructor(t){super(t);const i=n=>{if(n.statusCode===404){const c=new o4(`Missing PDF "${this._url}".`);this._storedError=c,this._headersCapability.reject(c);return}this._headersCapability.resolve(),this._setReadableStream(n);const a=c=>this._readableStream.headers[c.toLowerCase()],{allowRangeRequests:l,suggestedLength:d}=lq({getResponseHeader:a,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=l,this._contentLength=d||this._contentLength,this._filename=dq(a)};if(this._request=null,this._url.protocol==="http:"){const n=Jh.get("http");this._request=n.request(SS(this._url,t.httpHeaders),i)}else{const n=Jh.get("https");this._request=n.request(SS(this._url,t.httpHeaders),i)}this._request.on("error",n=>{this._storedError=n,this._headersCapability.reject(n)}),this._request.end()}}class Wkt extends CMe{constructor(t,i,n){super(t),this._httpHeaders={};for(const l in t.httpHeaders){const d=t.httpHeaders[l];d!==void 0&&(this._httpHeaders[l]=d)}this._httpHeaders.Range=`bytes=${i}-${n-1}`;const a=l=>{if(l.statusCode===404){const d=new o4(`Missing PDF "${this._url}".`);this._storedError=d;return}this._setReadableStream(l)};if(this._request=null,this._url.protocol==="http:"){const l=Jh.get("http");this._request=l.request(SS(this._url,this._httpHeaders),a)}else{const l=Jh.get("https");this._request=l.request(SS(this._url,this._httpHeaders),a)}this._request.on("error",l=>{this._storedError=l}),this._request.end()}}class Gkt extends vMe{constructor(t){super(t);let i=decodeURIComponent(this._url.path);bMe.test(this._url.href)&&(i=i.replace(/^\//,""));const n=Jh.get("fs");n.promises.lstat(i).then(a=>{this._contentLength=a.size,this._setReadableStream(n.createReadStream(i)),this._headersCapability.resolve()},a=>{a.code==="ENOENT"&&(a=new o4(`Missing PDF "${i}".`)),this._storedError=a,this._headersCapability.reject(a)})}}class Ykt extends CMe{constructor(t,i,n){super(t);let a=decodeURIComponent(this._url.path);bMe.test(this._url.href)&&(a=a.replace(/^\//,""));const l=Jh.get("fs");this._setReadableStream(l.createReadStream(a,{start:i,end:n-1}))}}const Kkt=1e5,Bl=30,qkt=.8;let ES=class rh{#e=Promise.withResolvers();#t=null;#o=!1;#r=!!globalThis.FontInspector?.enabled;#s=null;#i=null;#n=0;#l=0;#c=null;#p=null;#u=0;#d=0;#a=Object.create(null);#m=[];#f=null;#h=[];#y=new WeakMap;#g=null;static#w=new Map;static#v=new Map;static#A=null;static#k=new Set;constructor({textContentSource:t,container:i,viewport:n}){if(t instanceof ReadableStream)this.#f=t;else if(typeof t=="object")this.#f=new ReadableStream({start(p){p.enqueue(t),p.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#t=this.#p=i,this.#d=n.scale*(globalThis.devicePixelRatio||1),this.#u=n.rotation,this.#i={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null};const{pageWidth:a,pageHeight:l,pageX:d,pageY:c}=n.rawDims;this.#g=[1,0,0,-1,-d,c+l],this.#l=a,this.#n=l,rh.#x(),Pf(i,n),this.#e.promise.catch(()=>{}).then(()=>{rh.#k.delete(this),this.#i=null,this.#a=null})}render(){const t=()=>{this.#c.read().then(({value:i,done:n})=>{if(n){this.#e.resolve();return}this.#s??=i.lang,Object.assign(this.#a,i.styles),this.#S(i.items),t()},this.#e.reject)};return this.#c=this.#f.getReader(),rh.#k.add(this),t(),this.#e.promise}update({viewport:t,onBefore:i=null}){const n=t.scale*(globalThis.devicePixelRatio||1),a=t.rotation;if(a!==this.#u&&(i?.(),this.#u=a,Pf(this.#p,{rotation:a})),n!==this.#d){i?.(),this.#d=n;const l={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:rh.#b(this.#s)};for(const d of this.#h)l.properties=this.#y.get(d),l.div=d,this.#$(l)}}cancel(){const t=new i4("TextLayer task cancelled.");this.#c?.cancel(t).catch(()=>{}),this.#c=null,this.#e.reject(t)}get textDivs(){return this.#h}get textContentItemsStr(){return this.#m}#S(t){if(this.#o)return;this.#i.ctx??=rh.#b(this.#s);const i=this.#h,n=this.#m;for(const a of t){if(i.length>Kkt){zi("Ignoring additional textDivs for performance reasons."),this.#o=!0;return}if(a.str===void 0){if(a.type==="beginMarkedContentProps"||a.type==="beginMarkedContent"){const l=this.#t;this.#t=document.createElement("span"),this.#t.classList.add("markedContent"),a.id!==null&&this.#t.setAttribute("id",`${a.id}`),l.append(this.#t)}else a.type==="endMarkedContent"&&(this.#t=this.#t.parentNode);continue}n.push(a.str),this.#j(a)}}#j(t){const i=document.createElement("span"),n={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};this.#h.push(i);const a=$o.transform(this.#g,t.transform);let l=Math.atan2(a[1],a[0]);const d=this.#a[t.fontName];d.vertical&&(l+=Math.PI/2);const c=this.#r&&d.fontSubstitution||d.fontFamily,p=Math.hypot(a[2],a[3]),h=p*rh.#C(c,this.#s);let u,m;l===0?(u=a[4],m=a[5]-h):(u=a[4]+h*Math.sin(l),m=a[5]-h*Math.cos(l));const f="calc(var(--scale-factor)*",x=i.style;this.#t===this.#p?(x.left=`${(100*u/this.#l).toFixed(2)}%`,x.top=`${(100*m/this.#n).toFixed(2)}%`):(x.left=`${f}${u.toFixed(2)}px)`,x.top=`${f}${m.toFixed(2)}px)`),x.fontSize=`${f}${(rh.#A*p).toFixed(2)}px)`,x.fontFamily=c,n.fontSize=p,i.setAttribute("role","presentation"),i.textContent=t.str,i.dir=t.dir,this.#r&&(i.dataset.fontName=d.fontSubstitutionLoadedName||t.fontName),l!==0&&(n.angle=l*(180/Math.PI));let y=!1;if(t.str.length>1)y=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const w=Math.abs(t.transform[0]),b=Math.abs(t.transform[3]);w!==b&&Math.max(w,b)/Math.min(w,b)>1.5&&(y=!0)}if(y&&(n.canvasWidth=d.vertical?t.height:t.width),this.#y.set(i,n),this.#i.div=i,this.#i.properties=n,this.#$(this.#i),n.hasText&&this.#t.append(i),n.hasEOL){const w=document.createElement("br");w.setAttribute("role","presentation"),this.#t.append(w)}}#$(t){const{div:i,properties:n,ctx:a,prevFontSize:l,prevFontFamily:d}=t,{style:c}=i;let p="";if(rh.#A>1&&(p=`scale(${1/rh.#A})`),n.canvasWidth!==0&&n.hasText){const{fontFamily:h}=c,{canvasWidth:u,fontSize:m}=n;(l!==m||d!==h)&&(a.font=`${m*this.#d}px ${h}`,t.prevFontSize=m,t.prevFontFamily=h);const{width:f}=a.measureText(i.textContent);f>0&&(p=`scaleX(${u*this.#d/f}) ${p}`)}n.angle!==0&&(p=`rotate(${n.angle}deg) ${p}`),p.length>0&&(c.transform=p)}static cleanup(){if(!(this.#k.size>0)){this.#w.clear();for(const{canvas:t}of this.#v.values())t.remove();this.#v.clear()}}static#b(t=null){let i=this.#v.get(t||="");if(!i){const n=document.createElement("canvas");n.className="hiddenCanvasElement",n.lang=t,document.body.append(n),i=n.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#v.set(t,i)}return i}static#x(){if(this.#A!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.textContent="X",document.body.append(t),this.#A=t.getBoundingClientRect().height,t.remove()}static#C(t,i){const n=this.#w.get(t);if(n)return n;const a=this.#b(i),l=a.font;a.canvas.width=a.canvas.height=Bl,a.font=`${Bl}px ${t}`;const d=a.measureText("");let c=d.fontBoundingBoxAscent,p=Math.abs(d.fontBoundingBoxDescent);if(c){const m=c/(c+p);return this.#w.set(t,m),a.canvas.width=a.canvas.height=0,a.font=l,m}a.strokeStyle="red",a.clearRect(0,0,Bl,Bl),a.strokeText("g",0,0);let h=a.getImageData(0,0,Bl,Bl).data;p=0;for(let m=h.length-1-3;m>=0;m-=4)if(h[m]>0){p=Math.ceil(m/4/Bl);break}a.clearRect(0,0,Bl,Bl),a.strokeText("A",0,Bl),h=a.getImageData(0,0,Bl,Bl).data,c=0;for(let m=0,f=h.length;m<f;m+=4)if(h[m]>0){c=Bl-Math.floor(m/4/Bl);break}a.canvas.width=a.canvas.height=0,a.font=l;const u=c?c/(c+p):qkt;return this.#w.set(t,u),u}};function Zkt(){pMe("`renderTextLayer`, please use `TextLayer` instead.");const{textContentSource:e,container:t,viewport:i,...n}=arguments[0],a=Object.keys(n);a.length>0&&zi("Ignoring `renderTextLayer` parameters: "+a.join(", "));const l=new ES({textContentSource:e,container:t,viewport:i}),{textDivs:d,textContentItemsStr:c}=l;return{promise:l.render(),textDivs:d,textContentItemsStr:c}}function Jkt(){pMe("`updateTextLayer`, please use `TextLayer` instead.")}class Cw{static textContent(t){const i=[],n={items:i,styles:Object.create(null)};function a(l){if(!l)return;let d=null;const c=l.name;if(c==="#text")d=l.value;else if(Cw.shouldBuildText(c))l?.attributes?.textContent?d=l.attributes.textContent:l.value&&(d=l.value);else return;if(d!==null&&i.push({str:d}),!!l.children)for(const p of l.children)a(p)}return a(t),n}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const Xkt=65536,eSt=100,tSt=5e3,oSt=Us?ukt:ekt,iSt=Us?mkt:dMe,rSt=Us?hkt:X$t,nSt=Us?gkt:cMe;function aSt(e={}){typeof e=="string"||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});const t=new cq,{docId:i}=t,n=e.url?sSt(e.url):null,a=e.data?lSt(e.data):null,l=e.httpHeaders||null,d=e.withCredentials===!0,c=e.password??null,p=e.range instanceof AMe?e.range:null,h=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:Xkt;let u=e.worker instanceof mc?e.worker:null;const m=e.verbosity,f=typeof e.docBaseUrl=="string"&&!eq(e.docBaseUrl)?e.docBaseUrl:null,x=typeof e.cMapUrl=="string"?e.cMapUrl:null,y=e.cMapPacked!==!1,w=e.CMapReaderFactory||iSt,b=typeof e.standardFontDataUrl=="string"?e.standardFontDataUrl:null,C=e.StandardFontDataFactory||nSt,k=e.stopAtErrors!==!0,L=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,S=e.isEvalSupported!==!1,j=typeof e.isOffscreenCanvasSupported=="boolean"?e.isOffscreenCanvasSupported:!Us,I=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,P=typeof e.disableFontFace=="boolean"?e.disableFontFace:Us,B=e.fontExtraProperties===!0,T=e.enableXfa===!0,D=e.ownerDocument||globalThis.document,R=e.disableRange===!0,G=e.disableStream===!0,q=e.disableAutoFetch===!0,Z=e.pdfBug===!0,H=e.enableHWA===!0,V=p?p.length:e.length??NaN,N=typeof e.useSystemFonts=="boolean"?e.useSystemFonts:!Us&&!P,O=typeof e.useWorkerFetch=="boolean"?e.useWorkerFetch:w===dMe&&C===cMe&&x&&b&&Wx(x,document.baseURI)&&Wx(b,document.baseURI),z=e.canvasFactory||new oSt({ownerDocument:D,enableHWA:H}),F=e.filterFactory||new rSt({docId:i,ownerDocument:D}),te=null;_$t(m);const Y={canvasFactory:z,filterFactory:F};if(O||(Y.cMapReaderFactory=new w({baseUrl:x,isCompressed:y}),Y.standardFontDataFactory=new C({baseUrl:b})),!u){const J={verbosity:m,port:vw.workerPort};u=J.port?mc.fromPort(J):new mc(J),t._worker=u}const W={docId:i,apiVersion:"4.4.168",data:a,password:c,disableAutoFetch:q,rangeChunkSize:h,length:V,docBaseUrl:f,enableXfa:T,evaluatorOptions:{maxImageSize:L,disableFontFace:P,ignoreErrors:k,isEvalSupported:S,isOffscreenCanvasSupported:j,canvasMaxAreaInBytes:I,fontExtraProperties:B,useSystemFonts:N,cMapUrl:O?x:null,standardFontDataUrl:O?b:null}},ee={disableFontFace:P,fontExtraProperties:B,ownerDocument:D,pdfBug:Z,styleElement:te,loadingParams:{disableAutoFetch:q,enableXfa:T}};return u.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const J=u.messageHandler.sendWithPromise("GetDocRequest",W,a?[a.buffer]:null);let ne;if(p)ne=new Bkt(p,{disableRange:R,disableStream:G});else if(!a){if(!n)throw new Error("getDocument - no `url` parameter provided.");ne=(me=>Us?function(){return typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype}()&&Wx(me.url)?new Npe(me):new Qkt(me):Wx(me.url)?new Npe(me):new Nkt(me))({url:n,length:V,httpHeaders:l,withCredentials:d,rangeChunkSize:h,disableRange:R,disableStream:G})}return J.then(ye=>{if(t.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const me=new Gx(i,ye,u.port),he=new hSt(me,t,ne,ee,Y);t._transport=he,me.send("Ready",null)})}).catch(t._capability.reject),t}function sSt(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(Us&&typeof e=="string")return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function lSt(e){if(Us&&typeof jk<"u"&&e instanceof jk)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if(typeof e=="string")return iI(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof e=="object"&&!isNaN(e?.length))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function Hpe(e){return typeof e=="object"&&Number.isInteger(e?.num)&&e.num>=0&&Number.isInteger(e?.gen)&&e.gen>=0}class cq{static#e=0;constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${cq.#e++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(t){throw this._worker?.port&&delete this._worker._pendingDestroy,t}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}let AMe=class{constructor(t,i,n=!1,a=null){this.length=t,this.initialData=i,this.progressiveDone=n,this.contentDispositionFilename=a,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,i){for(const n of this._rangeListeners)n(t,i)}onDataProgress(t,i){this._readyCapability.promise.then(()=>{for(const n of this._progressListeners)n(t,i)})}onDataProgressiveRead(t){this._readyCapability.promise.then(()=>{for(const i of this._progressiveReadListeners)i(t)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const t of this._progressiveDoneListeners)t()})}transportReady(){this._readyCapability.resolve()}requestDataRange(t,i){Dr("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}};class dSt{constructor(t,i){this._pdfInfo=t,this._transport=i}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return ar(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}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:t="display"}={}){const{renderingIntent:i}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(i)}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(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}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 cSt{#e=null;#t=!1;constructor(t,i,n,a=!1){this._pageIndex=t,this._pageInfo=i,this._transport=n,this._stats=a?new Epe:null,this._pdfBug=a,this.commonObjs=n.commonObjs,this.objs=new $Me,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:t,rotation:i=this.rotate,offsetX:n=0,offsetY:a=0,dontFlip:l=!1}={}){return new kb({viewBox:this.view,scale:t,rotation:i,offsetX:n,offsetY:a,dontFlip:l})}getAnnotations({intent:t="display"}={}){const{renderingIntent:i}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,i)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return ar(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:t,viewport:i,intent:n="display",annotationMode:a=Y0.ENABLE,transform:l=null,background:d=null,optionalContentConfigPromise:c=null,annotationCanvasMap:p=null,pageColors:h=null,printAnnotationStorage:u=null}){this._stats?.time("Overall");const m=this._transport.getRenderingIntent(n,a,u),{renderingIntent:f,cacheKey:x}=m;this.#t=!1,this.#r(),c||=this._transport.getOptionalContentConfig(f);let y=this._intentStates.get(x);y||(y=Object.create(null),this._intentStates.set(x,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);const w=!!(f&cc.PRINT);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(m));const b=L=>{y.renderTasks.delete(C),(this._maybeCleanupAfterRender||w)&&(this.#t=!0),this.#o(!w),L?(C.capability.reject(L),this._abortOperatorList({intentState:y,reason:L instanceof Error?L:new Error(L)})):C.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},C=new M7({callback:b,params:{canvasContext:t,viewport:i,transform:l,background:d},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:p,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!w,pdfBug:this._pdfBug,pageColors:h});(y.renderTasks||=new Set).add(C);const k=C.task;return Promise.all([y.displayReadyCapability.promise,c]).then(([L,S])=>{if(this.destroyed){b();return}if(this._stats?.time("Rendering"),!(S.renderingIntent&f))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");C.initializeGraphics({transparency:L,optionalContentConfig:S}),C.operatorListChanged()}).catch(b),k}getOperatorList({intent:t="display",annotationMode:i=Y0.ENABLE,printAnnotationStorage:n=null}={}){function a(){d.operatorList.lastChunk&&(d.opListReadCapability.resolve(d.operatorList),d.renderTasks.delete(c))}const l=this._transport.getRenderingIntent(t,i,n,!0);let d=this._intentStates.get(l.cacheKey);d||(d=Object.create(null),this._intentStates.set(l.cacheKey,d));let c;return d.opListReadCapability||(c=Object.create(null),c.operatorListChanged=a,d.opListReadCapability=Promise.withResolvers(),(d.renderTasks||=new Set).add(c),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(l)),d.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:i=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:i===!0},{highWaterMark:100,size(a){return a.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(n=>Cw.textContent(n));const i=this.streamTextContent(t);return new Promise(function(n,a){function l(){d.read().then(function({value:p,done:h}){if(h){n(c);return}c.lang??=p.lang,Object.assign(c.styles,p.styles),c.items.push(...p.items),l()},a)}const d=i.getReader(),c={items:[],styles:Object.create(null),lang:null};l()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const i of this._intentStates.values())if(this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0}),!i.opListReadCapability)for(const n of i.renderTasks)t.push(n.completed),n.cancel();return this.objs.clear(),this.#t=!1,this.#r(),Promise.all(t)}cleanup(t=!1){this.#t=!0;const i=this.#o(!1);return t&&i&&(this._stats&&=new Epe),i}#o(t=!1){if(this.#r(),!this.#t||this.destroyed)return!1;if(t)return this.#e=setTimeout(()=>{this.#e=null,this.#o(!1)},tSt),!1;for(const{renderTasks:i,operatorList:n}of this._intentStates.values())if(i.size>0||!n.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#t=!1,!0}#r(){this.#e&&(clearTimeout(this.#e),this.#e=null)}_startRenderPage(t,i){const n=this._intentStates.get(i);n&&(this._stats?.timeEnd("Page Request"),n.displayReadyCapability?.resolve(t))}_renderPageChunk(t,i){for(let n=0,a=t.length;n<a;n++)i.operatorList.fnArray.push(t.fnArray[n]),i.operatorList.argsArray.push(t.argsArray[n]);i.operatorList.lastChunk=t.lastChunk,i.operatorList.separateAnnots=t.separateAnnots;for(const n of i.renderTasks)n.operatorListChanged();t.lastChunk&&this.#o(!0)}_pumpOperatorList({renderingIntent:t,cacheKey:i,annotationStorageSerializable:n}){const{map:a,transfer:l}=n,c=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:i,annotationStorage:a},l).getReader(),p=this._intentStates.get(i);p.streamReader=c;const h=()=>{c.read().then(({value:u,done:m})=>{if(m){p.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(u,p),h())},u=>{if(p.streamReader=null,!this._transport.destroyed){if(p.operatorList){p.operatorList.lastChunk=!0;for(const m of p.renderTasks)m.operatorListChanged();this.#o(!0)}if(p.displayReadyCapability)p.displayReadyCapability.reject(u);else if(p.opListReadCapability)p.opListReadCapability.reject(u);else throw u}})};h()}_abortOperatorList({intentState:t,reason:i,force:n=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!n){if(t.renderTasks.size>0)return;if(i instanceof XK){let a=eSt;i.extraDelay>0&&i.extraDelay<1e3&&(a+=i.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:i,force:!0})},a);return}}if(t.streamReader.cancel(new i4(i.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[a,l]of this._intentStates)if(l===t){this._intentStates.delete(a);break}this.cleanup()}}}get stats(){return this._stats}}class pSt{#e=new Set;#t=Promise.resolve();postMessage(t,i){const n={data:structuredClone(t,i?{transfer:i}:null)};this.#t.then(()=>{for(const a of this.#e)a.call(this,n)})}addEventListener(t,i){this.#e.add(i)}removeEventListener(t,i){this.#e.delete(i)}terminate(){this.#e.clear()}}const o2={isWorkerDisabled:!1,fakeWorkerId:0};Us&&(o2.isWorkerDisabled=!0,vw.workerSrc||="./pdf.worker.mjs"),o2.isSameOrigin=function(e,t){let i;try{if(i=new URL(e),!i.origin||i.origin==="null")return!1}catch{return!1}const n=new URL(t,i);return i.origin===n.origin},o2.createCDNWrapper=function(e){const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};class mc{static#e;constructor({name:t=null,port:i=null,verbosity:n=V$t()}={}){if(this.name=t,this.destroyed=!1,this.verbosity=n,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,i){if(mc.#e?.has(i))throw new Error("Cannot use more than one PDFWorker per port.");(mc.#e||=new WeakMap).set(i,this),this._initializeFromPort(i);return}this._initialize()}get promise(){return Us?Promise.all([Jh.promise,this._readyCapability.promise]):this._readyCapability.promise}#t(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new Gx("main","worker",t),this._messageHandler.on("ready",function(){}),this.#t()}_initialize(){if(o2.isWorkerDisabled||mc.#o){this._setupFakeWorker();return}let{workerSrc:t}=mc;try{o2.isSameOrigin(window.location.href,t)||(t=o2.createCDNWrapper(new URL(t,window.location).href));const i=new Worker(t,{type:"module"}),n=new Gx("main","worker",i),a=()=>{l.abort(),n.destroy(),i.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},l=new AbortController;i.addEventListener("error",()=>{this._webWorker||a()},{signal:l.signal}),n.on("test",c=>{if(l.abort(),this.destroyed||!c){a();return}this._messageHandler=n,this._port=i,this._webWorker=i,this.#t()}),n.on("ready",c=>{if(l.abort(),this.destroyed){a();return}try{d()}catch{this._setupFakeWorker()}});const d=()=>{const c=new Uint8Array;n.send("test",c,[c.buffer])};d();return}catch{tI("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){o2.isWorkerDisabled||(zi("Setting up fake worker."),o2.isWorkerDisabled=!0),mc._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const i=new pSt;this._port=i;const n=`fake${o2.fakeWorkerId++}`,a=new Gx(n+"_worker",n,i);t.setup(a,i),this._messageHandler=new Gx(n,n+"_worker",i),this.#t()}).catch(t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),mc.#e?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){if(!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const i=this.#e?.get(t.port);if(i){if(i._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return i}return new mc(t)}static get workerSrc(){if(vw.workerSrc)return vw.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#o(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return ar(this,"_setupFakeWorkerGlobal",(async()=>this.#o?this.#o:(await import(this.workerSrc)).WorkerMessageHandler)())}}class hSt{#e=new Map;#t=new Map;#o=new Map;#r=new Map;#s=null;constructor(t,i,n,a,l){this.messageHandler=t,this.loadingTask=i,this.commonObjs=new $Me,this.fontLoader=new ckt({ownerDocument:a.ownerDocument,styleElement:a.styleElement}),this.loadingParams=a.loadingParams,this._params=a,this.canvasFactory=l.canvasFactory,this.filterFactory=l.filterFactory,this.cMapReaderFactory=l.cMapReaderFactory,this.standardFontDataFactory=l.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}#i(t,i=null){const n=this.#e.get(t);if(n)return n;const a=this.messageHandler.sendWithPromise(t,i);return this.#e.set(t,a),a}get annotationStorage(){return ar(this,"annotationStorage",new aq)}getRenderingIntent(t,i=Y0.ENABLE,n=null,a=!1){let l=cc.DISPLAY,d=BU;switch(t){case"any":l=cc.ANY;break;case"display":break;case"print":l=cc.PRINT;break;default:zi(`getRenderingIntent - invalid intent: ${t}`)}switch(i){case Y0.DISABLE:l+=cc.ANNOTATIONS_DISABLE;break;case Y0.ENABLE:break;case Y0.ENABLE_FORMS:l+=cc.ANNOTATIONS_FORMS;break;case Y0.ENABLE_STORAGE:l+=cc.ANNOTATIONS_STORAGE,d=(l&cc.PRINT&&n instanceof mMe?n:this.annotationStorage).serializable;break;default:zi(`getRenderingIntent - invalid annotationMode: ${i}`)}return a&&(l+=cc.OPLIST),{renderingIntent:l,cacheKey:`${l}_${d.hash}`,annotationStorageSerializable:d}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#s?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const n of this.#t.values())t.push(n._destroy());this.#t.clear(),this.#o.clear(),this.#r.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const i=this.messageHandler.sendWithPromise("Terminate",null);return t.push(i),Promise.all(t).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(),ES.cleanup(),this._networkStream?.cancelAllRequests(new i4("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:i}=this;t.on("GetReader",(n,a)=>{ka(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=l=>{this._lastProgress={loaded:l.loaded,total:l.total}},a.onPull=()=>{this._fullReader.read().then(function({value:l,done:d}){if(d){a.close();return}ka(l instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),a.enqueue(new Uint8Array(l),1,[l])}).catch(l=>{a.error(l)})},a.onCancel=l=>{this._fullReader.cancel(l),a.ready.catch(d=>{if(!this.destroyed)throw d})}}),t.on("ReaderHeadersReady",n=>{const a=Promise.withResolvers(),l=this._fullReader;return l.headersReady.then(()=>{(!l.isStreamingSupported||!l.isRangeSupported)&&(this._lastProgress&&i.onProgress?.(this._lastProgress),l.onProgress=d=>{i.onProgress?.({loaded:d.loaded,total:d.total})}),a.resolve({isStreamingSupported:l.isStreamingSupported,isRangeSupported:l.isRangeSupported,contentLength:l.contentLength})},a.reject),a.promise}),t.on("GetRangeReader",(n,a)=>{ka(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const l=this._networkStream.getRangeReader(n.begin,n.end);if(!l){a.close();return}a.onPull=()=>{l.read().then(function({value:d,done:c}){if(c){a.close();return}ka(d instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),a.enqueue(new Uint8Array(d),1,[d])}).catch(d=>{a.error(d)})},a.onCancel=d=>{l.cancel(d),a.ready.catch(c=>{if(!this.destroyed)throw c})}}),t.on("GetDoc",({pdfInfo:n})=>{this._numPages=n.numPages,this._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,i._capability.resolve(new dSt(n,this))}),t.on("DocException",function(n){let a;switch(n.name){case"PasswordException":a=new jU(n.message,n.code);break;case"InvalidPDFException":a=new aMe(n.message);break;case"MissingPDFException":a=new o4(n.message);break;case"UnexpectedResponseException":a=new oI(n.message,n.status);break;case"UnknownErrorException":a=new MU(n.message,n.details);break;default:Dr("DocException - expected a valid Error.")}i._capability.reject(a)}),t.on("PasswordRequest",n=>{if(this.#s=Promise.withResolvers(),i.onPassword){const a=l=>{l instanceof Error?this.#s.reject(l):this.#s.resolve({password:l})};try{i.onPassword(a,n.code)}catch(l){this.#s.reject(l)}}else this.#s.reject(new jU(n.message,n.code));return this.#s.promise}),t.on("DataLoaded",n=>{i.onProgress?.({loaded:n.length,total:n.length}),this.downloadInfoCapability.resolve(n)}),t.on("StartRenderPage",n=>{if(this.destroyed)return;this.#t.get(n.pageIndex)._startRenderPage(n.transparency,n.cacheKey)}),t.on("commonobj",([n,a,l])=>{if(this.destroyed||this.commonObjs.has(n))return null;switch(a){case"Font":const{disableFontFace:d,fontExtraProperties:c,pdfBug:p}=this._params;if("error"in l){const f=l.error;zi(`Error during font loading: ${f}`),this.commonObjs.resolve(n,f);break}const h=p&&globalThis.FontInspector?.enabled?(f,x)=>globalThis.FontInspector.fontAdded(f,x):null,u=new pkt(l,{disableFontFace:d,inspectFont:h});this.fontLoader.bind(u).catch(()=>t.sendWithPromise("FontFallback",{id:n})).finally(()=>{!c&&u.data&&(u.data=null),this.commonObjs.resolve(n,u)});break;case"CopyLocalImage":const{imageRef:m}=l;ka(m,"The imageRef must be defined.");for(const f of this.#t.values())for(const[,x]of f.objs)if(x?.ref===m)return x.dataLen?(this.commonObjs.resolve(n,structuredClone(x)),x.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(n,l);break;default:throw new Error(`Got unknown common object type ${a}`)}return null}),t.on("obj",([n,a,l,d])=>{if(this.destroyed)return;const c=this.#t.get(a);if(!c.objs.has(n)){if(c._intentStates.size===0){d?.bitmap?.close();return}switch(l){case"Image":c.objs.resolve(n,d),d?.dataLen>F$t&&(c._maybeCleanupAfterRender=!0);break;case"Pattern":c.objs.resolve(n,d);break;default:throw new Error(`Got unknown object type ${l}`)}}}),t.on("DocProgress",n=>{this.destroyed||i.onProgress?.({loaded:n.loaded,total:n.total})}),t.on("FetchBuiltInCMap",n=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(n):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),t.on("FetchStandardFontData",n=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(n):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&zi("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:i}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},i).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const i=t-1,n=this.#o.get(i);if(n)return n;const a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:i}).then(l=>{if(this.destroyed)throw new Error("Transport destroyed");l.refStr&&this.#r.set(l.refStr,t);const d=new cSt(i,l,this,this._params.pdfBug);return this.#t.set(i,d),d});return this.#o.set(i,a),a}getPageIndex(t){return Hpe(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,i){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:i})}getFieldObjects(){return this.#i("GetFieldObjects")}hasJSActions(){return this.#i("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}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 this.#i("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return this.#i("GetOptionalContentConfig").then(i=>new Mkt(i,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",i=this.#e.get(t);if(i)return i;const n=this.messageHandler.sendWithPromise(t,null).then(a=>({info:a[0],metadata:a[1]?new Ikt(a[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#e.set(t,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const i of this.#t.values())if(!i.cleanup())throw new Error(`startCleanup: Page ${i.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(!0),ES.cleanup()}}cachedPageNumber(t){if(!Hpe(t))return null;const i=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return this.#r.get(i)??null}}const AC=Symbol("INITIAL_DATA");class $Me{#e=Object.create(null);#t(t){return this.#e[t]||={...Promise.withResolvers(),data:AC}}get(t,i=null){if(i){const a=this.#t(t);return a.promise.then(()=>i(a.data)),null}const n=this.#e[t];if(!n||n.data===AC)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return n.data}has(t){const i=this.#e[t];return!!i&&i.data!==AC}resolve(t,i=null){const n=this.#t(t);n.data=i,n.resolve()}clear(){for(const t in this.#e){const{data:i}=this.#e[t];i?.bitmap?.close()}this.#e=Object.create(null)}*[Symbol.iterator](){for(const t in this.#e){const{data:i}=this.#e[t];i!==AC&&(yield[t,i])}}}class uSt{#e=null;constructor(t){this.#e=t,this.onContinue=null}get promise(){return this.#e.capability.promise}cancel(t=0){this.#e.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#e.operatorList;if(!t)return!1;const{annotationCanvasMap:i}=this.#e;return t.form||t.canvas&&i?.size>0}}class M7{#e=null;static#t=new WeakSet;constructor({callback:t,params:i,objs:n,commonObjs:a,annotationCanvasMap:l,operatorList:d,pageIndex:c,canvasFactory:p,filterFactory:h,useRequestAnimationFrame:u=!1,pdfBug:m=!1,pageColors:f=null}){this.callback=t,this.params=i,this.objs=n,this.commonObjs=a,this.annotationCanvasMap=l,this.operatorListIdx=null,this.operatorList=d,this._pageIndex=c,this.canvasFactory=p,this.filterFactory=h,this._pdfBug=m,this.pageColors=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=u===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new uSt(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=i.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:i}){if(this.cancelled)return;if(this._canvas){if(M7.#t.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.");M7.#t.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:n,viewport:a,transform:l,background:d}=this.params;this.gfx=new Y7(n,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:i},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:l,viewport:a,transparency:t,background:d}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(t=null,i=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null),M7.#t.delete(this._canvas),this.callback(t||new XK(`Rendering cancelled, page ${this._pageIndex+1}`,i))}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.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?this.#e=window.requestAnimationFrame(()=>{this.#e=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(),M7.#t.delete(this._canvas),this.callback())))}}const mSt="4.4.168",gSt="19fbc8998";function _pe(e){return Math.floor(Math.max(0,Math.min(1,e))*255).toString(16).padStart(2,"0")}function _9(e){return Math.max(0,Math.min(255,255*e))}class Vpe{static CMYK_G([t,i,n,a]){return["G",1-Math.min(1,.3*t+.59*n+.11*i+a)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=_9(t),[t,t,t]}static G_HTML([t]){const i=_pe(t);return`#${i}${i}${i}`}static RGB_G([t,i,n]){return["G",.3*t+.59*i+.11*n]}static RGB_rgb(t){return t.map(_9)}static RGB_HTML(t){return`#${t.map(_pe).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,i,n,a]){return["RGB",1-Math.min(1,t+a),1-Math.min(1,n+a),1-Math.min(1,i+a)]}static CMYK_rgb([t,i,n,a]){return[_9(1-Math.min(1,t+a)),_9(1-Math.min(1,n+a)),_9(1-Math.min(1,i+a))]}static CMYK_HTML(t){const i=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(i)}static RGB_CMYK([t,i,n]){const a=1-t,l=1-i,d=1-n,c=Math.min(a,l,d);return["CMYK",a,l,d,c]}}class kMe{static setupStorage(t,i,n,a,l){const d=a.getValue(i,{value:null});switch(n.name){case"textarea":if(d.value!==null&&(t.textContent=d.value),l==="print")break;t.addEventListener("input",c=>{a.setValue(i,{value:c.target.value})});break;case"input":if(n.attributes.type==="radio"||n.attributes.type==="checkbox"){if(d.value===n.attributes.xfaOn?t.setAttribute("checked",!0):d.value===n.attributes.xfaOff&&t.removeAttribute("checked"),l==="print")break;t.addEventListener("change",c=>{a.setValue(i,{value:c.target.checked?c.target.getAttribute("xfaOn"):c.target.getAttribute("xfaOff")})})}else{if(d.value!==null&&t.setAttribute("value",d.value),l==="print")break;t.addEventListener("input",c=>{a.setValue(i,{value:c.target.value})})}break;case"select":if(d.value!==null){t.setAttribute("value",d.value);for(const c of n.children)c.attributes.value===d.value?c.attributes.selected=!0:c.attributes.hasOwnProperty("selected")&&delete c.attributes.selected}t.addEventListener("input",c=>{const p=c.target.options,h=p.selectedIndex===-1?"":p[p.selectedIndex].value;a.setValue(i,{value:h})});break}}static setAttributes({html:t,element:i,storage:n=null,intent:a,linkService:l}){const{attributes:d}=i,c=t instanceof HTMLAnchorElement;d.type==="radio"&&(d.name=`${d.name}-${a}`);for(const[p,h]of Object.entries(d))if(h!=null)switch(p){case"class":h.length&&t.setAttribute(p,h.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",h);break;case"style":Object.assign(t.style,h);break;case"textContent":t.textContent=h;break;default:(!c||p!=="href"&&p!=="newWindow")&&t.setAttribute(p,h)}c&&l.addLinkAttributes(t,d.href,d.newWindow),n&&d.dataId&&this.setupStorage(t,d.dataId,i,n)}static render(t){const i=t.annotationStorage,n=t.linkService,a=t.xfaHtml,l=t.intent||"display",d=document.createElement(a.name);a.attributes&&this.setAttributes({html:d,element:a,intent:l,linkService:n});const c=l!=="richText",p=t.div;if(p.append(d),t.viewport){const m=`matrix(${t.viewport.transform.join(",")})`;p.style.transform=m}c&&p.setAttribute("class","xfaLayer xfaFont");const h=[];if(a.children.length===0){if(a.value){const m=document.createTextNode(a.value);d.append(m),c&&Cw.shouldBuildText(a.name)&&h.push(m)}return{textDivs:h}}const u=[[a,-1,d]];for(;u.length>0;){const[m,f,x]=u.at(-1);if(f+1===m.children.length){u.pop();continue}const y=m.children[++u.at(-1)[1]];if(y===null)continue;const{name:w}=y;if(w==="#text"){const C=document.createTextNode(y.value);h.push(C),x.append(C);continue}const b=y?.attributes?.xmlns?document.createElementNS(y.attributes.xmlns,w):document.createElement(w);if(x.append(b),y.attributes&&this.setAttributes({html:b,element:y,storage:i,intent:l,linkService:n}),y.children?.length>0)u.push([y,-1,b]);else if(y.value){const C=document.createTextNode(y.value);c&&Cw.shouldBuildText(w)&&h.push(C),b.append(C)}}for(const m of p.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))m.setAttribute("readOnly",!0);return{textDivs:h}}static update(t){const i=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=i,t.div.hidden=!1}}const Lb=1e3,fSt=9,zf=new WeakSet;function k2(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class xSt{static create(t){switch(t.data.annotationType){case ba.LINK:return new SMe(t);case ba.TEXT:return new ySt(t);case ba.WIDGET:switch(t.data.fieldType){case"Tx":return new wSt(t);case"Btn":return t.data.radioButton?new EMe(t):t.data.checkBox?new vSt(t):new CSt(t);case"Ch":return new ASt(t);case"Sig":return new bSt(t)}return new r4(t);case ba.POPUP:return new zU(t);case ba.FREETEXT:return new LMe(t);case ba.LINE:return new kSt(t);case ba.SQUARE:return new SSt(t);case ba.CIRCLE:return new ESt(t);case ba.POLYLINE:return new IMe(t);case ba.CARET:return new ISt(t);case ba.INK:return new jMe(t);case ba.POLYGON:return new LSt(t);case ba.HIGHLIGHT:return new jSt(t);case ba.UNDERLINE:return new MSt(t);case ba.SQUIGGLY:return new BSt(t);case ba.STRIKEOUT:return new DSt(t);case ba.STAMP:return new MMe(t);case ba.FILEATTACHMENT:return new TSt(t);default:return new Gn(t)}}}class Gn{#e=null;#t=!1;#o=null;constructor(t,{isRenderable:i=!1,ignoreBorder:n=!1,createQuadrilaterals:a=!1}={}){this.isRenderable=i,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,i&&(this.container=this._createContainer(n)),a&&this._createQuadrilaterals()}static _hasPopupData({titleObj:t,contentsObj:i,richText:n}){return!!(t?.str||i?.str||n?.str)}get hasPopupData(){return Gn._hasPopupData(this.data)}updateEdited(t){if(!this.container)return;this.#e||={rect:this.data.rect.slice(0)};const{rect:i}=t;i&&this.#r(i),this.#o?.popup.updateEdited(t)}resetEdited(){this.#e&&(this.#r(this.#e.rect),this.#o?.popup.resetEdited(),this.#e=null)}#r(t){const{container:{style:i},data:{rect:n,rotation:a},parent:{viewport:{rawDims:{pageWidth:l,pageHeight:d,pageX:c,pageY:p}}}}=this;n?.splice(0,4,...t);const{width:h,height:u}=k2(t);i.left=`${100*(t[0]-c)/l}%`,i.top=`${100*(d-t[3]+p)/d}%`,a===0?(i.width=`${100*h/l}%`,i.height=`${100*u/d}%`):this.setRotation(a)}_createContainer(t){const{data:i,parent:{page:n,viewport:a}}=this,l=document.createElement("section");l.setAttribute("data-annotation-id",i.id),this instanceof r4||(l.tabIndex=Lb);const{style:d}=l;if(d.zIndex=this.parent.zIndex++,i.popupRef&&l.setAttribute("aria-haspopup","dialog"),i.alternativeText&&(l.title=i.alternativeText),i.noRotate&&l.classList.add("norotate"),!i.rect||this instanceof zU){const{rotation:w}=i;return!i.hasOwnCanvas&&w!==0&&this.setRotation(w,l),l}const{width:c,height:p}=k2(i.rect);if(!t&&i.borderStyle.width>0){d.borderWidth=`${i.borderStyle.width}px`;const w=i.borderStyle.horizontalCornerRadius,b=i.borderStyle.verticalCornerRadius;if(w>0||b>0){const k=`calc(${w}px * var(--scale-factor)) / calc(${b}px * var(--scale-factor))`;d.borderRadius=k}else if(this instanceof EMe){const k=`calc(${c}px * var(--scale-factor)) / calc(${p}px * var(--scale-factor))`;d.borderRadius=k}switch(i.borderStyle.style){case N9.SOLID:d.borderStyle="solid";break;case N9.DASHED:d.borderStyle="dashed";break;case N9.BEVELED:zi("Unimplemented border style: beveled");break;case N9.INSET:zi("Unimplemented border style: inset");break;case N9.UNDERLINE:d.borderBottomStyle="solid";break}const C=i.borderColor||null;C?(this.#t=!0,d.borderColor=$o.makeHexColor(C[0]|0,C[1]|0,C[2]|0)):d.borderWidth=0}const h=$o.normalizeRect([i.rect[0],n.view[3]-i.rect[1]+n.view[1],i.rect[2],n.view[3]-i.rect[3]+n.view[1]]),{pageWidth:u,pageHeight:m,pageX:f,pageY:x}=a.rawDims;d.left=`${100*(h[0]-f)/u}%`,d.top=`${100*(h[1]-x)/m}%`;const{rotation:y}=i;return i.hasOwnCanvas||y===0?(d.width=`${100*c/u}%`,d.height=`${100*p/m}%`):this.setRotation(y,l),l}setRotation(t,i=this.container){if(!this.data.rect)return;const{pageWidth:n,pageHeight:a}=this.parent.viewport.rawDims,{width:l,height:d}=k2(this.data.rect);let c,p;t%180===0?(c=100*l/n,p=100*d/a):(c=100*d/n,p=100*l/a),i.style.width=`${c}%`,i.style.height=`${p}%`,i.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(i,n,a)=>{const l=a.detail[i],d=l[0],c=l.slice(1);a.target.style[n]=Vpe[`${d}_HTML`](c),this.annotationStorage.setValue(this.data.id,{[n]:Vpe[`${d}_rgb`](c)})};return ar(this,"_commonActions",{display:i=>{const{display:n}=i.detail,a=n%2===1;this.container.style.visibility=a?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:a,noPrint:n===1||n===2})},print:i=>{this.annotationStorage.setValue(this.data.id,{noPrint:!i.detail.print})},hidden:i=>{const{hidden:n}=i.detail;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:n,noView:n})},focus:i=>{setTimeout(()=>i.target.focus({preventScroll:!1}),0)},userName:i=>{i.target.title=i.detail.userName},readonly:i=>{i.target.disabled=i.detail.readonly},required:i=>{this._setRequired(i.target,i.detail.required)},bgColor:i=>{t("bgColor","backgroundColor",i)},fillColor:i=>{t("fillColor","backgroundColor",i)},fgColor:i=>{t("fgColor","color",i)},textColor:i=>{t("textColor","color",i)},borderColor:i=>{t("borderColor","borderColor",i)},strokeColor:i=>{t("strokeColor","borderColor",i)},rotation:i=>{const n=i.detail.rotation;this.setRotation(n),this.annotationStorage.setValue(this.data.id,{rotation:n})}})}_dispatchEventFromSandbox(t,i){const n=this._commonActions;for(const a of Object.keys(i.detail))(t[a]||n[a])?.(i)}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const i=this.annotationStorage.getRawValue(this.data.id);if(!i)return;const n=this._commonActions;for(const[a,l]of Object.entries(i)){const d=n[a];if(d){const c={detail:{[a]:l},target:t};d(c),delete i[a]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[i,n,a,l]=this.data.rect.map(w=>Math.fround(w));if(t.length===8){const[w,b,C,k]=t.subarray(2,6);if(a===w&&l===b&&i===C&&n===k)return}const{style:d}=this.container;let c;if(this.#t){const{borderColor:w,borderWidth:b}=d;d.borderWidth=0,c=["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="${w}" stroke-width="${b}">`],this.container.classList.add("hasBorder")}const p=a-i,h=l-n,{svgFactory:u}=this,m=u.createElement("svg");m.classList.add("quadrilateralsContainer"),m.setAttribute("width",0),m.setAttribute("height",0);const f=u.createElement("defs");m.append(f);const x=u.createElement("clipPath"),y=`clippath_${this.data.id}`;x.setAttribute("id",y),x.setAttribute("clipPathUnits","objectBoundingBox"),f.append(x);for(let w=2,b=t.length;w<b;w+=8){const C=t[w],k=t[w+1],L=t[w+2],S=t[w+3],j=u.createElement("rect"),I=(L-i)/p,P=(l-k)/h,B=(C-L)/p,T=(k-S)/h;j.setAttribute("x",I),j.setAttribute("y",P),j.setAttribute("width",B),j.setAttribute("height",T),x.append(j),c?.push(`<rect vector-effect="non-scaling-stroke" x="${I}" y="${P}" width="${B}" height="${T}"/>`)}this.#t&&(c.push("</g></svg>')"),d.backgroundImage=c.join("")),this.container.append(m),this.container.style.clipPath=`url(#${y})`}_createPopup(){const{container:t,data:i}=this;t.setAttribute("aria-haspopup","dialog");const n=this.#o=new zU({data:{color:i.color,titleObj:i.titleObj,modificationDate:i.modificationDate,contentsObj:i.contentsObj,richText:i.richText,parentRect:i.rect,borderStyle:0,id:`popup_${i.id}`,rotation:i.rotation},parent:this.parent,elements:[this]});this.parent.div.append(n.render())}render(){Dr("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,i=null){const n=[];if(this._fieldObjects){const a=this._fieldObjects[t];if(a)for(const{page:l,id:d,exportValues:c}of a){if(l===-1||d===i)continue;const p=typeof c=="string"?c:null,h=document.querySelector(`[data-element-id="${d}"]`);if(h&&!zf.has(h)){zi(`_getElementsByName - element not allowed: ${d}`);continue}n.push({id:d,exportValue:p,domElement:h})}return n}for(const a of document.getElementsByName(t)){const{exportValue:l}=a,d=a.getAttribute("data-element-id");d!==i&&zf.has(a)&&n.push({id:d,exportValue:l,domElement:a})}return n}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const i of t)i.classList.add("highlightArea");else t.classList.add("highlightArea")}get _isEditable(){return!1}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:i}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:i})})}}class SMe extends Gn{constructor(t,i=null){super(t,{isRenderable:!0,ignoreBorder:!!i?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:i}=this,n=document.createElement("a");n.setAttribute("data-element-id",t.id);let a=!1;return t.url?(i.addLinkAttributes(n,t.url,t.newWindow),a=!0):t.action?(this._bindNamedAction(n,t.action),a=!0):t.attachment?(this.#t(n,t.attachment,t.attachmentDest),a=!0):t.setOCGState?(this.#o(n,t.setOCGState),a=!0):t.dest?(this._bindLink(n,t.dest),a=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,t),a=!0),t.resetForm?(this._bindResetFormAction(n,t.resetForm),a=!0):this.isTooltipOnly&&!a&&(this._bindLink(n,""),a=!0)),this.container.classList.add("linkAnnotation"),a&&this.container.append(n),this.container}#e(){this.container.setAttribute("data-internal-link","")}_bindLink(t,i){t.href=this.linkService.getDestinationHash(i),t.onclick=()=>(i&&this.linkService.goToDestination(i),!1),(i||i==="")&&this.#e()}_bindNamedAction(t,i){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(i),!1),this.#e()}#t(t,i,n=null){t.href=this.linkService.getAnchorUrl(""),i.description&&(t.title=i.description),t.onclick=()=>(this.downloadManager?.openOrDownloadData(i.content,i.filename,n),!1),this.#e()}#o(t,i){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(i),!1),this.#e()}_bindJSAction(t,i){t.href=this.linkService.getAnchorUrl("");const n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const a of Object.keys(i.actions)){const l=n.get(a);l&&(t[l]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i.id,name:a}}),!1))}t.onclick||(t.onclick=()=>!1),this.#e()}_bindResetFormAction(t,i){const n=t.onclick;if(n||(t.href=this.linkService.getAnchorUrl("")),this.#e(),!this._fieldObjects){zi('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),n||(t.onclick=()=>!1);return}t.onclick=()=>{n?.();const{fields:a,refs:l,include:d}=i,c=[];if(a.length!==0||l.length!==0){const u=new Set(l);for(const m of a){const f=this._fieldObjects[m]||[];for(const{id:x}of f)u.add(x)}for(const m of Object.values(this._fieldObjects))for(const f of m)u.has(f.id)===d&&c.push(f)}else for(const u of Object.values(this._fieldObjects))c.push(...u);const p=this.annotationStorage,h=[];for(const u of c){const{id:m}=u;switch(h.push(m),u.type){case"text":{const x=u.defaultValue||"";p.setValue(m,{value:x});break}case"checkbox":case"radiobutton":{const x=u.defaultValue===u.exportValues;p.setValue(m,{value:x});break}case"combobox":case"listbox":{const x=u.defaultValue||"";p.setValue(m,{value:x});break}default:continue}const f=document.querySelector(`[data-element-id="${m}"]`);if(f){if(!zf.has(f)){zi(`_bindResetFormAction - element not allowed: ${m}`);continue}}else continue;f.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:h,name:"ResetForm"}}),!1}}}class ySt extends Gn{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class r4 extends Gn{render(){return this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&(t.previousSibling?.nodeName==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return ql.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,i,n,a,l){n.includes("mouse")?t.addEventListener(n,d=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a,value:l(d),shift:d.shiftKey,modifier:this._getKeyModifier(d)}})}):t.addEventListener(n,d=>{if(n==="blur"){if(!i.focused||!d.relatedTarget)return;i.focused=!1}else if(n==="focus"){if(i.focused)return;i.focused=!0}l&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a,value:l(d)}})})}_setEventListeners(t,i,n,a){for(const[l,d]of n)(d==="Action"||this.data.actions?.[d])&&((d==="Focus"||d==="Blur")&&(i||={focused:!1}),this._setEventListener(t,i,l,d,a),d==="Focus"&&!this.data.actions?.Blur?this._setEventListener(t,i,"blur","Blur",null):d==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(t,i,"focus","Focus",null))}_setBackgroundColor(t){const i=this.data.backgroundColor||null;t.style.backgroundColor=i===null?"transparent":$o.makeHexColor(i[0],i[1],i[2])}_setTextStyle(t){const i=["left","center","right"],{fontColor:n}=this.data.defaultAppearanceData,a=this.data.defaultAppearanceData.fontSize||fSt,l=t.style;let d;const c=2,p=h=>Math.round(10*h)/10;if(this.data.multiLine){const h=Math.abs(this.data.rect[3]-this.data.rect[1]-c),u=Math.round(h/(xO*a))||1,m=h/u;d=Math.min(a,p(m/xO))}else{const h=Math.abs(this.data.rect[3]-this.data.rect[1]-c);d=Math.min(a,p(h/xO))}l.fontSize=`calc(${d}px * var(--scale-factor))`,l.color=$o.makeHexColor(n[0],n[1],n[2]),this.data.textAlignment!==null&&(l.textAlign=i[this.data.textAlignment])}_setRequired(t,i){i?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",i)}}class wSt extends r4{constructor(t){const i=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:i})}setPropertyOnSiblings(t,i,n,a){const l=this.annotationStorage;for(const d of this._getElementsByName(t.name,t.id))d.domElement&&(d.domElement[i]=n),l.setValue(d.id,{[a]:n})}render(){const t=this.annotationStorage,i=this.data.id;this.container.classList.add("textWidgetAnnotation");let n=null;if(this.renderForms){const a=t.getValue(i,{value:this.data.fieldValue});let l=a.value||"";const d=t.getValue(i,{charLimit:this.data.maxLen}).charLimit;d&&l.length>d&&(l=l.slice(0,d));let c=a.formattedValue||this.data.textContent?.join(`
|
|
88
|
+
`);return t.join("")}}function Wx(e,t){try{const{protocol:i}=t?new URL(e,t):new URL(e);return i==="http:"||i==="https:"}catch{return!1}}function od(e){e.preventDefault()}function pMe(e){console.log("Deprecated API usage: "+e)}let Lpe;class hMe{static toDateObject(t){if(!t||typeof t!="string")return null;Lpe||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const i=Lpe.exec(t);if(!i)return null;const n=parseInt(i[1],10);let a=parseInt(i[2],10);a=a>=1&&a<=12?a-1:0;let l=parseInt(i[3],10);l=l>=1&&l<=31?l:1;let d=parseInt(i[4],10);d=d>=0&&d<=23?d:0;let c=parseInt(i[5],10);c=c>=0&&c<=59?c:0;let p=parseInt(i[6],10);p=p>=0&&p<=59?p:0;const h=i[7]||"Z";let u=parseInt(i[8],10);u=u>=0&&u<=23?u:0;let m=parseInt(i[9],10)||0;return m=m>=0&&m<=59?m:0,h==="-"?(d+=u,c+=m):h==="+"&&(d-=u,c-=m),new Date(Date.UTC(n,a,l,d,c,p))}}function ikt(e,{scale:t=1,rotation:i=0}){const{width:n,height:a}=e.attributes.style,l=[0,0,parseInt(n),parseInt(a)];return new kb({viewBox:l,scale:t,rotation:i})}function oq(e){if(e.startsWith("#")){const t=parseInt(e.slice(1),16);return[(t&16711680)>>16,(t&65280)>>8,t&255]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map(t=>parseInt(t)):e.startsWith("rgba(")?e.slice(5,-1).split(",").map(t=>parseInt(t)).slice(0,3):(zi(`Not a valid color format: "${e}"`),[0,0,0])}function rkt(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const i of e.keys()){t.style.color=i;const n=window.getComputedStyle(t).color;e.set(i,oq(n))}t.remove()}function gn(e){const{a:t,b:i,c:n,d:a,e:l,f:d}=e.getTransform();return[t,i,n,a,l,d]}function Fu(e){const{a:t,b:i,c:n,d:a,e:l,f:d}=e.getTransform().invertSelf();return[t,i,n,a,l,d]}function Pf(e,t,i=!1,n=!0){if(t instanceof kb){const{pageWidth:a,pageHeight:l}=t.rawDims,{style:d}=e,c=ql.isCSSRoundSupported,p=`var(--scale-factor) * ${a}px`,h=`var(--scale-factor) * ${l}px`,u=c?`round(${p}, 1px)`:`calc(${p})`,m=c?`round(${h}, 1px)`:`calc(${h})`;!i||t.rotation%180===0?(d.width=u,d.height=m):(d.width=m,d.height=u)}n&&e.setAttribute("data-main-rotation",t.rotation)}class iq{#e=null;#t=null;#o;#r=null;constructor(t){this.#o=t}render(){const t=this.#e=document.createElement("div");t.className="editToolbar",t.setAttribute("role","toolbar");const i=this.#o._uiManager._signal;t.addEventListener("contextmenu",od,{signal:i}),t.addEventListener("pointerdown",iq.#s,{signal:i});const n=this.#r=document.createElement("div");n.className="buttons",t.append(n);const a=this.#o.toolbarPosition;if(a){const{style:l}=t,d=this.#o._uiManager.direction==="ltr"?1-a[0]:a[0];l.insetInlineEnd=`${100*d}%`,l.top=`calc(${100*a[1]}% + var(--editor-toolbar-vert-offset))`}return this.#c(),t}static#s(t){t.stopPropagation()}#i(t){this.#o._focusEventsAllowed=!1,t.preventDefault(),t.stopPropagation()}#n(t){this.#o._focusEventsAllowed=!0,t.preventDefault(),t.stopPropagation()}#l(t){const i=this.#o._uiManager._signal;t.addEventListener("focusin",this.#i.bind(this),{capture:!0,signal:i}),t.addEventListener("focusout",this.#n.bind(this),{capture:!0,signal:i}),t.addEventListener("contextmenu",od,{signal:i})}hide(){this.#e.classList.add("hidden"),this.#t?.hideDropdown()}show(){this.#e.classList.remove("hidden")}#c(){const t=document.createElement("button");t.className="delete",t.tabIndex=0,t.setAttribute("data-l10n-id",`pdfjs-editor-remove-${this.#o.editorType}-button`),this.#l(t),t.addEventListener("click",i=>{this.#o._uiManager.delete()},{signal:this.#o._uiManager._signal}),this.#r.append(t)}get#p(){const t=document.createElement("div");return t.className="divider",t}addAltTextButton(t){this.#l(t),this.#r.prepend(t,this.#p)}addColorPicker(t){this.#t=t;const i=t.renderButton();this.#l(i),this.#r.prepend(i,this.#p)}remove(){this.#e.remove(),this.#t?.destroy(),this.#t=null}}class nkt{#e=null;#t=null;#o;constructor(t){this.#o=t}#r(){const t=this.#t=document.createElement("div");t.className="editToolbar",t.setAttribute("role","toolbar"),t.addEventListener("contextmenu",od,{signal:this.#o._signal});const i=this.#e=document.createElement("div");return i.className="buttons",t.append(i),this.#i(),t}#s(t,i){let n=0,a=0;for(const l of t){const d=l.y+l.height;if(d<n)continue;const c=l.x+(i?l.width:0);if(d>n){a=c,n=d;continue}i?c>a&&(a=c):c<a&&(a=c)}return[i?1-a:a,n]}show(t,i,n){const[a,l]=this.#s(i,n),{style:d}=this.#t||=this.#r();t.append(this.#t),d.insetInlineEnd=`${100*a}%`,d.top=`calc(${100*l}% + var(--editor-toolbar-vert-offset))`}hide(){this.#t.remove()}#i(){const t=document.createElement("button");t.className="highlightButton",t.tabIndex=0,t.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const i=document.createElement("span");t.append(i),i.className="visuallyHidden",i.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const n=this.#o._signal;t.addEventListener("contextmenu",od,{signal:n}),t.addEventListener("click",()=>{this.#o.highlightSelection("floating_button")},{signal:n}),this.#e.append(t)}}function kS(e,t,i){for(const n of i)t.addEventListener(n,e[n].bind(e))}function akt(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")}class skt{#e=0;get id(){return`${O$t}${this.#e++}`}}class rq{#e=J$t();#t=0;#o=null;static get _isSVGFittingCanvas(){const t='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>',n=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),a=new Image;a.src=t;const l=a.decode().then(()=>(n.drawImage(a,0,0,1,1,0,0,1,3),new Uint32Array(n.getImageData(0,0,1,1).data.buffer)[0]===0));return ar(this,"_isSVGFittingCanvas",l)}async#r(t,i){this.#o||=new Map;let n=this.#o.get(t);if(n===null)return null;if(n?.bitmap)return n.refCounter+=1,n;try{n||={bitmap:null,id:`image_${this.#e}_${this.#t++}`,refCounter:0,isSvg:!1};let a;if(typeof i=="string"?(n.url=i,a=await lI(i,"blob")):a=n.file=i,a.type==="image/svg+xml"){const l=rq._isSVGFittingCanvas,d=new FileReader,c=new Image,p=new Promise((h,u)=>{c.onload=()=>{n.bitmap=c,n.isSvg=!0,h()},d.onload=async()=>{const m=n.svgUrl=d.result;c.src=await l?`${m}#svgView(preserveAspectRatio(none))`:m},c.onerror=d.onerror=u});d.readAsDataURL(a),await p}else n.bitmap=await createImageBitmap(a);n.refCounter=1}catch(a){console.error(a),n=null}return this.#o.set(t,n),n&&this.#o.set(n.id,n),n}async getFromFile(t){const{lastModified:i,name:n,size:a,type:l}=t;return this.#r(`${i}_${n}_${a}_${l}`,t)}async getFromUrl(t){return this.#r(t,t)}async getFromId(t){this.#o||=new Map;const i=this.#o.get(t);return i?i.bitmap?(i.refCounter+=1,i):i.file?this.getFromFile(i.file):this.getFromUrl(i.url):null}getSvgUrl(t){const i=this.#o.get(t);return i?.isSvg?i.svgUrl:null}deleteId(t){this.#o||=new Map;const i=this.#o.get(t);i&&(i.refCounter-=1,i.refCounter===0&&(i.bitmap=null))}isValidId(t){return t.startsWith(`image_${this.#e}_`)}}class lkt{#e=[];#t=!1;#o;#r=-1;constructor(t=128){this.#o=t}add({cmd:t,undo:i,post:n,mustExec:a,type:l=NaN,overwriteIfSameType:d=!1,keepUndo:c=!1}){if(a&&t(),this.#t)return;const p={cmd:t,undo:i,post:n,type:l};if(this.#r===-1){this.#e.length>0&&(this.#e.length=0),this.#r=0,this.#e.push(p);return}if(d&&this.#e[this.#r].type===l){c&&(p.undo=this.#e[this.#r].undo),this.#e[this.#r]=p;return}const h=this.#r+1;h===this.#o?this.#e.splice(0,1):(this.#r=h,h<this.#e.length&&this.#e.splice(h)),this.#e.push(p)}undo(){if(this.#r===-1)return;this.#t=!0;const{undo:t,post:i}=this.#e[this.#r];t(),i?.(),this.#t=!1,this.#r-=1}redo(){if(this.#r<this.#e.length-1){this.#r+=1,this.#t=!0;const{cmd:t,post:i}=this.#e[this.#r];t(),i?.(),this.#t=!1}}hasSomethingToUndo(){return this.#r!==-1}hasSomethingToRedo(){return this.#r<this.#e.length-1}destroy(){this.#e=null}}class Sb{constructor(t){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac:i}=ql.platform;for(const[n,a,l={}]of t)for(const d of n){const c=d.startsWith("mac+");i&&c?(this.callbacks.set(d.slice(4),{callback:a,options:l}),this.allKeys.add(d.split("+").at(-1))):!i&&!c&&(this.callbacks.set(d,{callback:a,options:l}),this.allKeys.add(d.split("+").at(-1)))}}#e(t){t.altKey&&this.buffer.push("alt"),t.ctrlKey&&this.buffer.push("ctrl"),t.metaKey&&this.buffer.push("meta"),t.shiftKey&&this.buffer.push("shift"),this.buffer.push(t.key);const i=this.buffer.join("+");return this.buffer.length=0,i}exec(t,i){if(!this.allKeys.has(i.key))return;const n=this.callbacks.get(this.#e(i));if(!n)return;const{callback:a,options:{bubbles:l=!1,args:d=[],checker:c=null}}=n;c&&!c(t,i)||(a.bind(t,...d,i)(),l||(i.stopPropagation(),i.preventDefault()))}}class nq{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const t=new Map([["CanvasText",null],["Canvas",null]]);return rkt(t),ar(this,"_colors",t)}convert(t){const i=oq(t);if(!window.matchMedia("(forced-colors: active)").matches)return i;for(const[n,a]of this._colors)if(a.every((l,d)=>l===i[d]))return nq._colorsMapping.get(n);return i}getHexCode(t){const i=this._colors.get(t);return i?$o.makeHexColor(...i):t}}class km{#e=new AbortController;#t=null;#o=new Map;#r=new Map;#s=null;#i=null;#n=null;#l=new lkt;#c=0;#p=new Set;#u=null;#d=null;#a=new Set;#m=!1;#f=null;#h=null;#y=null;#g=!1;#w=null;#v=new skt;#A=!1;#k=!1;#S=null;#j=null;#$=null;#b=Zi.NONE;#x=new Set;#C=null;#E=null;#L=null;#B=this.blur.bind(this);#M=this.focus.bind(this);#P=this.copy.bind(this);#D=this.cut.bind(this);#z=this.paste.bind(this);#T=this.keydown.bind(this);#Q=this.keyup.bind(this);#U=this.onEditingAction.bind(this);#_=this.onPageChanging.bind(this);#N=this.onScaleChanging.bind(this);#R=this.onRotationChanging.bind(this);#K={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#V=[0,0];#F=null;#H=null;#q=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const t=km.prototype,i=d=>d.#H.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&d.hasSomethingToControl(),n=(d,{target:c})=>{if(c instanceof HTMLInputElement){const{type:p}=c;return p!=="text"&&p!=="number"}return!0},a=this.TRANSLATE_SMALL,l=this.TRANSLATE_BIG;return ar(this,"_keyboardManager",new Sb([[["ctrl+a","mac+meta+a"],t.selectAll,{checker:n}],[["ctrl+z","mac+meta+z"],t.undo,{checker:n}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],t.redo,{checker:n}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],t.delete,{checker:n}],[["Enter","mac+Enter"],t.addNewEditorFromKeyboard,{checker:(d,{target:c})=>!(c instanceof HTMLButtonElement)&&d.#H.contains(c)&&!d.isEnterHandled}],[[" ","mac+ "],t.addNewEditorFromKeyboard,{checker:(d,{target:c})=>!(c instanceof HTMLButtonElement)&&d.#H.contains(document.activeElement)}],[["Escape","mac+Escape"],t.unselectAll],[["ArrowLeft","mac+ArrowLeft"],t.translateSelectedEditors,{args:[-a,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t.translateSelectedEditors,{args:[-l,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t.translateSelectedEditors,{args:[a,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t.translateSelectedEditors,{args:[l,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t.translateSelectedEditors,{args:[0,-a],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t.translateSelectedEditors,{args:[0,-l],checker:i}],[["ArrowDown","mac+ArrowDown"],t.translateSelectedEditors,{args:[0,a],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t.translateSelectedEditors,{args:[0,l],checker:i}]]))}constructor(t,i,n,a,l,d,c,p,h){this._signal=this.#e.signal,this.#H=t,this.#q=i,this.#s=n,this._eventBus=a,this._eventBus._on("editingaction",this.#U),this._eventBus._on("pagechanging",this.#_),this._eventBus._on("scalechanging",this.#N),this._eventBus._on("rotationchanging",this.#R),this.#re(),this.#le(),this.#Z(),this.#i=l.annotationStorage,this.#f=l.filterFactory,this.#E=d,this.#y=c||null,this.#m=p,this.#$=h||null,this.viewParameters={realScale:$6.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1}destroy(){this.#e?.abort(),this.#e=null,this._signal=null,this._eventBus._off("editingaction",this.#U),this._eventBus._off("pagechanging",this.#_),this._eventBus._off("scalechanging",this.#N),this._eventBus._off("rotationchanging",this.#R);for(const t of this.#r.values())t.destroy();this.#r.clear(),this.#o.clear(),this.#a.clear(),this.#t=null,this.#x.clear(),this.#l.destroy(),this.#s?.destroy(),this.#w?.hide(),this.#w=null,this.#h&&(clearTimeout(this.#h),this.#h=null),this.#F&&(clearTimeout(this.#F),this.#F=null)}async mlGuess(t){return this.#$?.guess(t)||null}get hasMLManager(){return!!this.#$}get hcmFilter(){return ar(this,"hcmFilter",this.#E?this.#f.addHCMFilter(this.#E.foreground,this.#E.background):"none")}get direction(){return ar(this,"direction",getComputedStyle(this.#H).direction)}get highlightColors(){return ar(this,"highlightColors",this.#y?new Map(this.#y.split(",").map(t=>t.split("=").map(i=>i.trim()))):null)}get highlightColorNames(){return ar(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,t=>t.reverse())):null)}setMainHighlightColorPicker(t){this.#j=t}editAltText(t){this.#s?.editAltText(this,t)}onPageChanging({pageNumber:t}){this.#c=t-1}focusMainContainer(){this.#H.focus()}findParent(t,i){for(const n of this.#r.values()){const{x:a,y:l,width:d,height:c}=n.div.getBoundingClientRect();if(t>=a&&t<=a+d&&i>=l&&i<=l+c)return n}return null}disableUserSelect(t=!1){this.#q.classList.toggle("noUserSelect",t)}addShouldRescale(t){this.#a.add(t)}removeShouldRescale(t){this.#a.delete(t)}onScaleChanging({scale:t}){this.commitOrRemove(),this.viewParameters.realScale=t*$6.PDF_TO_CSS_UNITS;for(const i of this.#a)i.onScaleChanging()}onRotationChanging({pagesRotation:t}){this.commitOrRemove(),this.viewParameters.rotation=t}#G({anchorNode:t}){return t.nodeType===Node.TEXT_NODE?t.parentElement:t}highlightSelection(t=""){const i=document.getSelection();if(!i||i.isCollapsed)return;const{anchorNode:n,anchorOffset:a,focusNode:l,focusOffset:d}=i,c=i.toString(),h=this.#G(i).closest(".textLayer"),u=this.getSelectionBoxes(h);if(u){i.empty(),this.#b===Zi.NONE&&(this._eventBus.dispatch("showannotationeditorui",{source:this,mode:Zi.HIGHLIGHT}),this.showAllEditors("highlight",!0,!0));for(const m of this.#r.values())if(m.hasTextLayer(h)){m.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:t,boxes:u,anchorNode:n,anchorOffset:a,focusNode:l,focusOffset:d,text:c});break}}}#oe(){const t=document.getSelection();if(!t||t.isCollapsed)return;const n=this.#G(t).closest(".textLayer"),a=this.getSelectionBoxes(n);a&&(this.#w||=new nkt(this),this.#w.show(n,a,this.direction==="ltr"))}addToAnnotationStorage(t){!t.isEmpty()&&this.#i&&!this.#i.has(t.id)&&this.#i.setValue(t.id,t)}#ie(){const t=document.getSelection();if(!t||t.isCollapsed){this.#C&&(this.#w?.hide(),this.#C=null,this.#I({hasSelectedText:!1}));return}const{anchorNode:i}=t;if(i===this.#C)return;if(!this.#G(t).closest(".textLayer")){this.#C&&(this.#w?.hide(),this.#C=null,this.#I({hasSelectedText:!1}));return}if(this.#w?.hide(),this.#C=i,this.#I({hasSelectedText:!0}),!(this.#b!==Zi.HIGHLIGHT&&this.#b!==Zi.NONE)&&(this.#b===Zi.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#g=this.isShiftKeyDown,!this.isShiftKeyDown)){const l=this._signal,d=c=>{c.type==="pointerup"&&c.button!==0||(window.removeEventListener("pointerup",d),window.removeEventListener("blur",d),c.type==="pointerup"&&this.#Y("main_toolbar"))};window.addEventListener("pointerup",d,{signal:l}),window.addEventListener("blur",d,{signal:l})}}#Y(t=""){this.#b===Zi.HIGHLIGHT?this.highlightSelection(t):this.#m&&this.#oe()}#re(){document.addEventListener("selectionchange",this.#ie.bind(this),{signal:this._signal})}#ne(){const t=this._signal;window.addEventListener("focus",this.#M,{signal:t}),window.addEventListener("blur",this.#B,{signal:t})}#ae(){window.removeEventListener("focus",this.#M),window.removeEventListener("blur",this.#B)}blur(){if(this.isShiftKeyDown=!1,this.#g&&(this.#g=!1,this.#Y("main_toolbar")),!this.hasSelection)return;const{activeElement:t}=document;for(const i of this.#x)if(i.div.contains(t)){this.#S=[i,t],i._focusEventsAllowed=!1;break}}focus(){if(!this.#S)return;const[t,i]=this.#S;this.#S=null,i.addEventListener("focusin",()=>{t._focusEventsAllowed=!0},{once:!0,signal:this._signal}),i.focus()}#Z(){const t=this._signal;window.addEventListener("keydown",this.#T,{signal:t}),window.addEventListener("keyup",this.#Q,{signal:t})}#se(){window.removeEventListener("keydown",this.#T),window.removeEventListener("keyup",this.#Q)}#J(){const t=this._signal;document.addEventListener("copy",this.#P,{signal:t}),document.addEventListener("cut",this.#D,{signal:t}),document.addEventListener("paste",this.#z,{signal:t})}#X(){document.removeEventListener("copy",this.#P),document.removeEventListener("cut",this.#D),document.removeEventListener("paste",this.#z)}#le(){const t=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:t}),document.addEventListener("drop",this.drop.bind(this),{signal:t})}addEditListeners(){this.#Z(),this.#J()}removeEditListeners(){this.#se(),this.#X()}dragOver(t){for(const{type:i}of t.dataTransfer.items)for(const n of this.#d)if(n.isHandlingMimeForPasting(i)){t.dataTransfer.dropEffect="copy",t.preventDefault();return}}drop(t){for(const i of t.dataTransfer.items)for(const n of this.#d)if(n.isHandlingMimeForPasting(i.type)){n.paste(i,this.currentLayer),t.preventDefault();return}}copy(t){if(t.preventDefault(),this.#t?.commitOrRemove(),!this.hasSelection)return;const i=[];for(const n of this.#x){const a=n.serialize(!0);a&&i.push(a)}i.length!==0&&t.clipboardData.setData("application/pdfjs",JSON.stringify(i))}cut(t){this.copy(t),this.delete()}paste(t){t.preventDefault();const{clipboardData:i}=t;for(const l of i.items)for(const d of this.#d)if(d.isHandlingMimeForPasting(l.type)){d.paste(l,this.currentLayer);return}let n=i.getData("application/pdfjs");if(!n)return;try{n=JSON.parse(n)}catch(l){zi(`paste: "${l.message}".`);return}if(!Array.isArray(n))return;this.unselectAll();const a=this.currentLayer;try{const l=[];for(const p of n){const h=a.deserialize(p);if(!h)return;l.push(h)}const d=()=>{for(const p of l)this.#ee(p);this.#te(l)},c=()=>{for(const p of l)p.remove()};this.addCommands({cmd:d,undo:c,mustExec:!0})}catch(l){zi(`paste: "${l.message}".`)}}keydown(t){!this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!0),this.#b!==Zi.NONE&&!this.isEditorHandlingKeyboard&&km._keyboardManager.exec(this,t)}keyup(t){this.isShiftKeyDown&&t.key==="Shift"&&(this.isShiftKeyDown=!1,this.#g&&(this.#g=!1,this.#Y("main_toolbar")))}onEditingAction({name:t}){switch(t){case"undo":case"redo":case"delete":case"selectAll":this[t]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#I(t){Object.entries(t).some(([n,a])=>this.#K[n]!==a)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#K,t)}),this.#b===Zi.HIGHLIGHT&&t.hasSelectedEditor===!1&&this.#O([[pi.HIGHLIGHT_FREE,!0]]))}#O(t){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:t})}setEditingState(t){t?(this.#ne(),this.#J(),this.#I({isEditing:this.#b!==Zi.NONE,isEmpty:this.#W(),hasSomethingToUndo:this.#l.hasSomethingToUndo(),hasSomethingToRedo:this.#l.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#ae(),this.#X(),this.#I({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(t){if(!this.#d){this.#d=t;for(const i of this.#d)this.#O(i.defaultPropertiesToUpdate)}}getId(){return this.#v.id}get currentLayer(){return this.#r.get(this.#c)}getLayer(t){return this.#r.get(t)}get currentPageIndex(){return this.#c}addLayer(t){this.#r.set(t.pageIndex,t),this.#A?t.enable():t.disable()}removeLayer(t){this.#r.delete(t.pageIndex)}updateMode(t,i=null,n=!1){if(this.#b!==t){if(this.#b=t,t===Zi.NONE){this.setEditingState(!1),this.#ce();return}this.setEditingState(!0),this.#de(),this.unselectAll();for(const a of this.#r.values())a.updateMode(t);if(!i&&n){this.addNewEditorFromKeyboard();return}if(i){for(const a of this.#o.values())if(a.annotationElementId===i){this.setSelected(a),a.enterInEditMode();break}}}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(t){t!==this.#b&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:t})}updateParams(t,i){if(this.#d){switch(t){case pi.CREATE:this.currentLayer.addNewEditor();return;case pi.HIGHLIGHT_DEFAULT_COLOR:this.#j?.updateColor(i);break;case pi.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#L||=new Map).set(t,i),this.showAllEditors("highlight",i);break}for(const n of this.#x)n.updateParams(t,i);for(const n of this.#d)n.updateDefaultParams(t,i)}}showAllEditors(t,i,n=!1){for(const l of this.#o.values())l.editorType===t&&l.show(i);(this.#L?.get(pi.HIGHLIGHT_SHOW_ALL)??!0)!==i&&this.#O([[pi.HIGHLIGHT_SHOW_ALL,i]])}enableWaiting(t=!1){if(this.#k!==t){this.#k=t;for(const i of this.#r.values())t?i.disableClick():i.enableClick(),i.div.classList.toggle("waiting",t)}}#de(){if(!this.#A){this.#A=!0;for(const t of this.#r.values())t.enable();for(const t of this.#o.values())t.enable()}}#ce(){if(this.unselectAll(),this.#A){this.#A=!1;for(const t of this.#r.values())t.disable();for(const t of this.#o.values())t.disable()}}getEditors(t){const i=[];for(const n of this.#o.values())n.pageIndex===t&&i.push(n);return i}getEditor(t){return this.#o.get(t)}addEditor(t){this.#o.set(t.id,t)}removeEditor(t){t.div.contains(document.activeElement)&&(this.#h&&clearTimeout(this.#h),this.#h=setTimeout(()=>{this.focusMainContainer(),this.#h=null},0)),this.#o.delete(t.id),this.unselect(t),(!t.annotationElementId||!this.#p.has(t.annotationElementId))&&this.#i?.remove(t.id)}addDeletedAnnotationElement(t){this.#p.add(t.annotationElementId),this.addChangedExistingAnnotation(t),t.deleted=!0}isDeletedAnnotationElement(t){return this.#p.has(t)}removeDeletedAnnotationElement(t){this.#p.delete(t.annotationElementId),this.removeChangedExistingAnnotation(t),t.deleted=!1}#ee(t){const i=this.#r.get(t.pageIndex);i?i.addOrRebuild(t):(this.addEditor(t),this.addToAnnotationStorage(t))}setActiveEditor(t){this.#t!==t&&(this.#t=t,t&&this.#O(t.propertiesToUpdate))}get#pe(){let t=null;for(t of this.#x);return t}updateUI(t){this.#pe===t&&this.#O(t.propertiesToUpdate)}toggleSelected(t){if(this.#x.has(t)){this.#x.delete(t),t.unselect(),this.#I({hasSelectedEditor:this.hasSelection});return}this.#x.add(t),t.select(),this.#O(t.propertiesToUpdate),this.#I({hasSelectedEditor:!0})}setSelected(t){for(const i of this.#x)i!==t&&i.unselect();this.#x.clear(),this.#x.add(t),t.select(),this.#O(t.propertiesToUpdate),this.#I({hasSelectedEditor:!0})}isSelected(t){return this.#x.has(t)}get firstSelectedEditor(){return this.#x.values().next().value}unselect(t){t.unselect(),this.#x.delete(t),this.#I({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#x.size!==0}get isEnterHandled(){return this.#x.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#l.undo(),this.#I({hasSomethingToUndo:this.#l.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#W()})}redo(){this.#l.redo(),this.#I({hasSomethingToUndo:!0,hasSomethingToRedo:this.#l.hasSomethingToRedo(),isEmpty:this.#W()})}addCommands(t){this.#l.add(t),this.#I({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#W()})}#W(){if(this.#o.size===0)return!0;if(this.#o.size===1)for(const t of this.#o.values())return t.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const t=[...this.#x],i=()=>{for(const a of t)a.remove()},n=()=>{for(const a of t)this.#ee(a)};this.addCommands({cmd:i,undo:n,mustExec:!0})}commitOrRemove(){this.#t?.commitOrRemove()}hasSomethingToControl(){return this.#t||this.hasSelection}#te(t){for(const i of this.#x)i.unselect();this.#x.clear();for(const i of t)i.isEmpty()||(this.#x.add(i),i.select());this.#I({hasSelectedEditor:this.hasSelection})}selectAll(){for(const t of this.#x)t.commit();this.#te(this.#o.values())}unselectAll(){if(!(this.#t&&(this.#t.commitOrRemove(),this.#b!==Zi.NONE))&&this.hasSelection){for(const t of this.#x)t.unselect();this.#x.clear(),this.#I({hasSelectedEditor:!1})}}translateSelectedEditors(t,i,n=!1){if(n||this.commitOrRemove(),!this.hasSelection)return;this.#V[0]+=t,this.#V[1]+=i;const[a,l]=this.#V,d=[...this.#x],c=1e3;this.#F&&clearTimeout(this.#F),this.#F=setTimeout(()=>{this.#F=null,this.#V[0]=this.#V[1]=0,this.addCommands({cmd:()=>{for(const p of d)this.#o.has(p.id)&&p.translateInPage(a,l)},undo:()=>{for(const p of d)this.#o.has(p.id)&&p.translateInPage(-a,-l)},mustExec:!1})},c);for(const p of d)p.translateInPage(t,i)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#u=new Map;for(const t of this.#x)this.#u.set(t,{savedX:t.x,savedY:t.y,savedPageIndex:t.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#u)return!1;this.disableUserSelect(!1);const t=this.#u;this.#u=null;let i=!1;for(const[{x:a,y:l,pageIndex:d},c]of t)c.newX=a,c.newY=l,c.newPageIndex=d,i||=a!==c.savedX||l!==c.savedY||d!==c.savedPageIndex;if(!i)return!1;const n=(a,l,d,c)=>{if(this.#o.has(a.id)){const p=this.#r.get(c);p?a._setParentAndPosition(p,l,d):(a.pageIndex=c,a.x=l,a.y=d)}};return this.addCommands({cmd:()=>{for(const[a,{newX:l,newY:d,newPageIndex:c}]of t)n(a,l,d,c)},undo:()=>{for(const[a,{savedX:l,savedY:d,savedPageIndex:c}]of t)n(a,l,d,c)},mustExec:!0}),!0}dragSelectedEditors(t,i){if(this.#u)for(const n of this.#u.keys())n.drag(t,i)}rebuild(t){if(t.parent===null){const i=this.getLayer(t.pageIndex);i?(i.changeParent(t),i.addOrRebuild(t)):(this.addEditor(t),this.addToAnnotationStorage(t),t.rebuild())}else t.parent.addOrRebuild(t)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#x.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(t){return this.#t===t}getActive(){return this.#t}getMode(){return this.#b}get imageManager(){return ar(this,"imageManager",new rq)}getSelectionBoxes(t){if(!t)return null;const i=document.getSelection();for(let h=0,u=i.rangeCount;h<u;h++)if(!t.contains(i.getRangeAt(h).commonAncestorContainer))return null;const{x:n,y:a,width:l,height:d}=t.getBoundingClientRect();let c;switch(t.getAttribute("data-main-rotation")){case"90":c=(h,u,m,f)=>({x:(u-a)/d,y:1-(h+m-n)/l,width:f/d,height:m/l});break;case"180":c=(h,u,m,f)=>({x:1-(h+m-n)/l,y:1-(u+f-a)/d,width:m/l,height:f/d});break;case"270":c=(h,u,m,f)=>({x:1-(u+f-a)/d,y:(h-n)/l,width:f/d,height:m/l});break;default:c=(h,u,m,f)=>({x:(h-n)/l,y:(u-a)/d,width:m/l,height:f/d});break}const p=[];for(let h=0,u=i.rangeCount;h<u;h++){const m=i.getRangeAt(h);if(!m.collapsed)for(const{x:f,y:x,width:y,height:w}of m.getClientRects())y===0||w===0||p.push(c(f,x,y,w))}return p.length===0?null:p}addChangedExistingAnnotation({annotationElementId:t,id:i}){(this.#n||=new Map).set(t,i)}removeChangedExistingAnnotation({annotationElementId:t}){this.#n?.delete(t)}renderAnnotationElement(t){const i=this.#n?.get(t.data.id);if(!i)return;const n=this.#i.getRawValue(i);n&&(this.#b===Zi.NONE&&!n.hasBeenModified||n.renderAnnotationElement(t))}}class lf{#e="";#t=!1;#o=null;#r=null;#s=null;#i=!1;#n=null;static _l10nPromise=null;constructor(t){this.#n=t}static initialize(t){lf._l10nPromise||=t}async render(){const t=this.#o=document.createElement("button");t.className="altText";const i=await lf._l10nPromise.get("pdfjs-editor-alt-text-button-label");t.textContent=i,t.setAttribute("aria-label",i),t.tabIndex="0";const n=this.#n._uiManager._signal;t.addEventListener("contextmenu",od,{signal:n}),t.addEventListener("pointerdown",l=>l.stopPropagation(),{signal:n});const a=l=>{l.preventDefault(),this.#n._uiManager.editAltText(this.#n)};return t.addEventListener("click",a,{capture:!0,signal:n}),t.addEventListener("keydown",l=>{l.target===t&&l.key==="Enter"&&(this.#i=!0,a(l))},{signal:n}),await this.#l(),t}finish(){this.#o&&(this.#o.focus({focusVisible:this.#i}),this.#i=!1)}isEmpty(){return!this.#e&&!this.#t}get data(){return{altText:this.#e,decorative:this.#t}}set data({altText:t,decorative:i}){this.#e===t&&this.#t===i||(this.#e=t,this.#t=i,this.#l())}toggle(t=!1){this.#o&&(!t&&this.#s&&(clearTimeout(this.#s),this.#s=null),this.#o.disabled=!t)}destroy(){this.#o?.remove(),this.#o=null,this.#r=null}async#l(){const t=this.#o;if(!t)return;if(!this.#e&&!this.#t){t.classList.remove("done"),this.#r?.remove();return}t.classList.add("done"),lf._l10nPromise.get("pdfjs-editor-alt-text-edit-button-label").then(a=>{t.setAttribute("aria-label",a)});let i=this.#r;if(!i){this.#r=i=document.createElement("span"),i.className="tooltip",i.setAttribute("role","tooltip");const a=i.id=`alt-text-tooltip-${this.#n.id}`;t.setAttribute("aria-describedby",a);const l=100,d=this.#n._uiManager._signal;d.addEventListener("abort",()=>{clearTimeout(this.#s),this.#s=null},{once:!0}),t.addEventListener("mouseenter",()=>{this.#s=setTimeout(()=>{this.#s=null,this.#r.classList.add("show"),this.#n._reportTelemetry({action:"alt_text_tooltip"})},l)},{signal:d}),t.addEventListener("mouseleave",()=>{this.#s&&(clearTimeout(this.#s),this.#s=null),this.#r?.classList.remove("show")},{signal:d})}i.innerText=this.#t?await lf._l10nPromise.get("pdfjs-editor-alt-text-decorative-tooltip"):this.#e,i.parentNode||t.append(i),this.#n.getImageForAltText()?.setAttribute("aria-describedby",i.id)}}class li{#e=null;#t=null;#o=null;#r=!1;#s=!1;#i=null;#n=null;#l=this.focusin.bind(this);#c=this.focusout.bind(this);#p=null;#u="";#d=!1;#a=null;#m=!1;#f=!1;#h=!1;#y=null;#g=0;#w=0;#v=null;_initialOptions=Object.create(null);_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#A=!1;#k=li._zIndex++;static _borderLineWidth=-1;static _colorManager=new nq;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const t=li.prototype._resizeWithKeyboard,i=km.TRANSLATE_SMALL,n=km.TRANSLATE_BIG;return ar(this,"_resizerKeyboardManager",new Sb([[["ArrowLeft","mac+ArrowLeft"],t,{args:[-i,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t,{args:[-n,0]}],[["ArrowRight","mac+ArrowRight"],t,{args:[i,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t,{args:[n,0]}],[["ArrowUp","mac+ArrowUp"],t,{args:[0,-i]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t,{args:[0,-n]}],[["ArrowDown","mac+ArrowDown"],t,{args:[0,i]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t,{args:[0,n]}],[["Escape","mac+Escape"],li.prototype._stopResizingWithKeyboard]]))}constructor(t){this.constructor===li&&Dr("Cannot initialize AnnotationEditor."),this.parent=t.parent,this.id=t.id,this.width=this.height=null,this.pageIndex=t.parent.pageIndex,this.name=t.name,this.div=null,this._uiManager=t.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=t.isCentered,this._structTreeParentId=null;const{rotation:i,rawDims:{pageWidth:n,pageHeight:a,pageX:l,pageY:d}}=this.parent.viewport;this.rotation=i,this.pageRotation=(360+i-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[n,a],this.pageTranslation=[l,d];const[c,p]=this.parentDimensions;this.x=t.x/c,this.y=t.y/p,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return ar(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(t){const i=new dkt({id:t.parent.getNextId(),parent:t.parent,uiManager:t._uiManager});i.annotationElementId=t.annotationElementId,i.deleted=!0,i._uiManager.addToAnnotationStorage(i)}static initialize(t,i,n){if(li._l10nPromise||=new Map(["pdfjs-editor-alt-text-button-label","pdfjs-editor-alt-text-edit-button-label","pdfjs-editor-alt-text-decorative-tooltip","pdfjs-editor-resizer-label-topLeft","pdfjs-editor-resizer-label-topMiddle","pdfjs-editor-resizer-label-topRight","pdfjs-editor-resizer-label-middleRight","pdfjs-editor-resizer-label-bottomRight","pdfjs-editor-resizer-label-bottomMiddle","pdfjs-editor-resizer-label-bottomLeft","pdfjs-editor-resizer-label-middleLeft"].map(l=>[l,t.get(l.replaceAll(/([A-Z])/g,d=>`-${d.toLowerCase()}`))])),n?.strings)for(const l of n.strings)li._l10nPromise.set(l,t.get(l));if(li._borderLineWidth!==-1)return;const a=getComputedStyle(document.documentElement);li._borderLineWidth=parseFloat(a.getPropertyValue("--outline-width"))||0}static updateDefaultParams(t,i){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(t){return!1}static paste(t,i){Dr("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#A}set _isDraggable(t){this.#A=t,this.div?.classList.toggle("draggable",t)}get isEnterHandled(){return!0}center(){const[t,i]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*i/(t*2),this.y+=this.width*t/(i*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*i/(t*2),this.y-=this.width*t/(i*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(t){this._uiManager.addCommands(t)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#k}setParent(t){t!==null?(this.pageIndex=t.pageIndex,this.pageDimensions=t.pageDimensions):this.#T(),this.parent=t}focusin(t){this._focusEventsAllowed&&(this.#d?this.#d=!1:this.parent.setSelected(this))}focusout(t){!this._focusEventsAllowed||!this.isAttachedToDOM||t.relatedTarget?.closest(`#${this.id}`)||(t.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(t,i,n,a){const[l,d]=this.parentDimensions;[n,a]=this.screenToPageTranslation(n,a),this.x=(t+n)/l,this.y=(i+a)/d,this.fixAndSetPosition()}#S([t,i],n,a){[n,a]=this.screenToPageTranslation(n,a),this.x+=n/t,this.y+=a/i,this.fixAndSetPosition()}translate(t,i){this.#S(this.parentDimensions,t,i)}translateInPage(t,i){this.#a||=[this.x,this.y],this.#S(this.pageDimensions,t,i),this.div.scrollIntoView({block:"nearest"})}drag(t,i){this.#a||=[this.x,this.y];const[n,a]=this.parentDimensions;if(this.x+=t/n,this.y+=i/a,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:h,y:u}=this.div.getBoundingClientRect();this.parent.findNewParent(this,h,u)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:l,y:d}=this;const[c,p]=this.getBaseTranslation();l+=c,d+=p,this.div.style.left=`${(100*l).toFixed(2)}%`,this.div.style.top=`${(100*d).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}get _hasBeenMoved(){return!!this.#a&&(this.#a[0]!==this.x||this.#a[1]!==this.y)}getBaseTranslation(){const[t,i]=this.parentDimensions,{_borderLineWidth:n}=li,a=n/t,l=n/i;switch(this.rotation){case 90:return[-a,l];case 180:return[a,l];case 270:return[a,-l];default:return[-a,-l]}}get _mustFixPosition(){return!0}fixAndSetPosition(t=this.rotation){const[i,n]=this.pageDimensions;let{x:a,y:l,width:d,height:c}=this;if(d*=i,c*=n,a*=i,l*=n,this._mustFixPosition)switch(t){case 0:a=Math.max(0,Math.min(i-d,a)),l=Math.max(0,Math.min(n-c,l));break;case 90:a=Math.max(0,Math.min(i-c,a)),l=Math.min(n,Math.max(d,l));break;case 180:a=Math.min(i,Math.max(d,a)),l=Math.min(n,Math.max(c,l));break;case 270:a=Math.min(i,Math.max(c,a)),l=Math.max(0,Math.min(n-d,l));break}this.x=a/=i,this.y=l/=n;const[p,h]=this.getBaseTranslation();a+=p,l+=h;const{style:u}=this.div;u.left=`${(100*a).toFixed(2)}%`,u.top=`${(100*l).toFixed(2)}%`,this.moveInDOM()}static#j(t,i,n){switch(n){case 90:return[i,-t];case 180:return[-t,-i];case 270:return[-i,t];default:return[t,i]}}screenToPageTranslation(t,i){return li.#j(t,i,this.parentRotation)}pageTranslationToScreen(t,i){return li.#j(t,i,360-this.parentRotation)}#$(t){switch(t){case 90:{const[i,n]=this.pageDimensions;return[0,-i/n,n/i,0]}case 180:return[-1,0,0,-1];case 270:{const[i,n]=this.pageDimensions;return[0,i/n,-n/i,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:t,pageDimensions:[i,n]}=this,a=i*t,l=n*t;return ql.isCSSRoundSupported?[Math.round(a),Math.round(l)]:[a,l]}setDims(t,i){const[n,a]=this.parentDimensions;this.div.style.width=`${(100*t/n).toFixed(2)}%`,this.#s||(this.div.style.height=`${(100*i/a).toFixed(2)}%`)}fixDims(){const{style:t}=this.div,{height:i,width:n}=t,a=n.endsWith("%"),l=!this.#s&&i.endsWith("%");if(a&&l)return;const[d,c]=this.parentDimensions;a||(t.width=`${(100*parseFloat(n)/d).toFixed(2)}%`),!this.#s&&!l&&(t.height=`${(100*parseFloat(i)/c).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#b(){if(this.#i)return;this.#i=document.createElement("div"),this.#i.classList.add("resizers");const t=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],i=this._uiManager._signal;for(const n of t){const a=document.createElement("div");this.#i.append(a),a.classList.add("resizer",n),a.setAttribute("data-resizer-name",n),a.addEventListener("pointerdown",this.#x.bind(this,n),{signal:i}),a.addEventListener("contextmenu",od,{signal:i}),a.tabIndex=-1}this.div.prepend(this.#i)}#x(t,i){i.preventDefault();const{isMac:n}=ql.platform;if(i.button!==0||i.ctrlKey&&n)return;this.#o?.toggle(!1);const a=this.#E.bind(this,t),l=this._isDraggable;this._isDraggable=!1;const d=this._uiManager._signal,c={passive:!0,capture:!0,signal:d};this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",a,c),window.addEventListener("contextmenu",od,{signal:d});const p=this.x,h=this.y,u=this.width,m=this.height,f=this.parent.div.style.cursor,x=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(i.target).cursor;const y=()=>{this.parent.togglePointerEvents(!0),this.#o?.toggle(!0),this._isDraggable=l,window.removeEventListener("pointerup",y),window.removeEventListener("blur",y),window.removeEventListener("pointermove",a,c),window.removeEventListener("contextmenu",od),this.parent.div.style.cursor=f,this.div.style.cursor=x,this.#C(p,h,u,m)};window.addEventListener("pointerup",y,{signal:d}),window.addEventListener("blur",y,{signal:d})}#C(t,i,n,a){const l=this.x,d=this.y,c=this.width,p=this.height;l===t&&d===i&&c===n&&p===a||this.addCommands({cmd:()=>{this.width=c,this.height=p,this.x=l,this.y=d;const[h,u]=this.parentDimensions;this.setDims(h*c,u*p),this.fixAndSetPosition()},undo:()=>{this.width=n,this.height=a,this.x=t,this.y=i;const[h,u]=this.parentDimensions;this.setDims(h*n,u*a),this.fixAndSetPosition()},mustExec:!0})}#E(t,i){const[n,a]=this.parentDimensions,l=this.x,d=this.y,c=this.width,p=this.height,h=li.MIN_SIZE/n,u=li.MIN_SIZE/a,m=N=>Math.round(N*1e4)/1e4,f=this.#$(this.rotation),x=(N,O)=>[f[0]*N+f[2]*O,f[1]*N+f[3]*O],y=this.#$(360-this.rotation),w=(N,O)=>[y[0]*N+y[2]*O,y[1]*N+y[3]*O];let b,C,k=!1,L=!1;switch(t){case"topLeft":k=!0,b=(N,O)=>[0,0],C=(N,O)=>[N,O];break;case"topMiddle":b=(N,O)=>[N/2,0],C=(N,O)=>[N/2,O];break;case"topRight":k=!0,b=(N,O)=>[N,0],C=(N,O)=>[0,O];break;case"middleRight":L=!0,b=(N,O)=>[N,O/2],C=(N,O)=>[0,O/2];break;case"bottomRight":k=!0,b=(N,O)=>[N,O],C=(N,O)=>[0,0];break;case"bottomMiddle":b=(N,O)=>[N/2,O],C=(N,O)=>[N/2,0];break;case"bottomLeft":k=!0,b=(N,O)=>[0,O],C=(N,O)=>[N,0];break;case"middleLeft":L=!0,b=(N,O)=>[0,O/2],C=(N,O)=>[N,O/2];break}const S=b(c,p),j=C(c,p);let I=x(...j);const P=m(l+I[0]),B=m(d+I[1]);let T=1,D=1,[R,G]=this.screenToPageTranslation(i.movementX,i.movementY);if([R,G]=w(R/n,G/a),k){const N=Math.hypot(c,p);T=D=Math.max(Math.min(Math.hypot(j[0]-S[0]-R,j[1]-S[1]-G)/N,1/c,1/p),h/c,u/p)}else L?T=Math.max(h,Math.min(1,Math.abs(j[0]-S[0]-R)))/c:D=Math.max(u,Math.min(1,Math.abs(j[1]-S[1]-G)))/p;const q=m(c*T),Z=m(p*D);I=x(...C(q,Z));const H=P-I[0],V=B-I[1];this.width=q,this.height=Z,this.x=H,this.y=V,this.setDims(n*q,a*Z),this.fixAndSetPosition()}altTextFinish(){this.#o?.finish()}async addEditToolbar(){return this.#p||this.#f?this.#p:(this.#p=new iq(this),this.div.append(this.#p.render()),this.#o&&this.#p.addAltTextButton(await this.#o.render()),this.#p)}removeEditToolbar(){this.#p&&(this.#p.remove(),this.#p=null,this.#o?.destroy())}getClientDimensions(){return this.div.getBoundingClientRect()}async addAltTextButton(){this.#o||(lf.initialize(li._l10nPromise),this.#o=new lf(this),this.#e&&(this.#o.data=this.#e,this.#e=null),await this.addEditToolbar())}get altTextData(){return this.#o?.data}set altTextData(t){this.#o&&(this.#o.data=t)}hasAltText(){return!this.#o?.isEmpty()}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=this.#r?-1:0,this._isVisible||this.div.classList.add("hidden"),this.setInForeground();const t=this._uiManager._signal;this.div.addEventListener("focusin",this.#l,{signal:t}),this.div.addEventListener("focusout",this.#c,{signal:t});const[i,n]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*n/i).toFixed(2)}%`,this.div.style.maxHeight=`${(100*i/n).toFixed(2)}%`);const[a,l]=this.getInitialTranslation();return this.translate(a,l),kS(this,this.div,["pointerdown"]),this.div}pointerdown(t){const{isMac:i}=ql.platform;if(t.button!==0||t.ctrlKey&&i){t.preventDefault();return}if(this.#d=!0,this._isDraggable){this.#B(t);return}this.#L(t)}#L(t){const{isMac:i}=ql.platform;t.ctrlKey&&!i||t.shiftKey||t.metaKey&&i?this.parent.toggleSelected(this):this.parent.setSelected(this)}#B(t){const i=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let n,a;const l=this._uiManager._signal;i&&(this.div.classList.add("moving"),n={passive:!0,capture:!0,signal:l},this.#g=t.clientX,this.#w=t.clientY,a=c=>{const{clientX:p,clientY:h}=c,[u,m]=this.screenToPageTranslation(p-this.#g,h-this.#w);this.#g=p,this.#w=h,this._uiManager.dragSelectedEditors(u,m)},window.addEventListener("pointermove",a,n));const d=()=>{window.removeEventListener("pointerup",d),window.removeEventListener("blur",d),i&&(this.div.classList.remove("moving"),window.removeEventListener("pointermove",a,n)),this.#d=!1,this._uiManager.endDragSession()||this.#L(t)};window.addEventListener("pointerup",d,{signal:l}),window.addEventListener("blur",d,{signal:l})}moveInDOM(){this.#y&&clearTimeout(this.#y),this.#y=setTimeout(()=>{this.#y=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(t,i,n){t.changeParent(this),this.x=i,this.y=n,this.fixAndSetPosition()}getRect(t,i,n=this.rotation){const a=this.parentScale,[l,d]=this.pageDimensions,[c,p]=this.pageTranslation,h=t/a,u=i/a,m=this.x*l,f=this.y*d,x=this.width*l,y=this.height*d;switch(n){case 0:return[m+h+c,d-f-u-y+p,m+h+x+c,d-f-u+p];case 90:return[m+u+c,d-f+h+p,m+u+y+c,d-f+h+x+p];case 180:return[m-h-x+c,d-f+u+p,m-h+c,d-f+u+y+p];case 270:return[m-u-y+c,d-f-h-x+p,m-u+c,d-f-h+p];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(t,i){const[n,a,l,d]=t,c=l-n,p=d-a;switch(this.rotation){case 0:return[n,i-d,c,p];case 90:return[n,i-a,p,c];case 180:return[l,i-a,c,p];case 270:return[l,i-d,p,c];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#f=!0}disableEditMode(){this.#f=!1}isInEditMode(){return this.#f}shouldGetKeyboardEvents(){return this.#h}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){const t=this._uiManager._signal;this.div?.addEventListener("focusin",this.#l,{signal:t}),this.div?.addEventListener("focusout",this.#c,{signal:t})}rotate(t){}serialize(t=!1,i=null){Dr("An editor must be serializable")}static deserialize(t,i,n){const a=new this.prototype.constructor({parent:i,id:i.getNextId(),uiManager:n});a.rotation=t.rotation,a.#e=t.accessibilityData;const[l,d]=a.pageDimensions,[c,p,h,u]=a.getRectInCurrentCoords(t.rect,d);return a.x=c/l,a.y=p/d,a.width=h/l,a.height=u/d,a}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.div.removeEventListener("focusin",this.#l),this.div.removeEventListener("focusout",this.#c),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#y&&(clearTimeout(this.#y),this.#y=null),this.#T(),this.removeEditToolbar(),this.#v){for(const t of this.#v.values())clearTimeout(t);this.#v=null}this.parent=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#b(),this.#i.classList.remove("hidden"),kS(this,this.div,["keydown"]))}get toolbarPosition(){return null}keydown(t){if(!this.isResizable||t.target!==this.div||t.key!=="Enter")return;this._uiManager.setSelected(this),this.#n={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const i=this.#i.children;if(!this.#t){this.#t=Array.from(i);const d=this.#M.bind(this),c=this.#P.bind(this),p=this._uiManager._signal;for(const h of this.#t){const u=h.getAttribute("data-resizer-name");h.setAttribute("role","spinbutton"),h.addEventListener("keydown",d,{signal:p}),h.addEventListener("blur",c,{signal:p}),h.addEventListener("focus",this.#D.bind(this,u),{signal:p}),li._l10nPromise.get(`pdfjs-editor-resizer-label-${u}`).then(m=>h.setAttribute("aria-label",m))}}const n=this.#t[0];let a=0;for(const d of i){if(d===n)break;a++}const l=(360-this.rotation+this.parentRotation)%360/90*(this.#t.length/4);if(l!==a){if(l<a)for(let c=0;c<a-l;c++)this.#i.append(this.#i.firstChild);else if(l>a)for(let c=0;c<l-a;c++)this.#i.firstChild.before(this.#i.lastChild);let d=0;for(const c of i){const h=this.#t[d++].getAttribute("data-resizer-name");li._l10nPromise.get(`pdfjs-editor-resizer-label-${h}`).then(u=>c.setAttribute("aria-label",u))}}this.#z(0),this.#h=!0,this.#i.firstChild.focus({focusVisible:!0}),t.preventDefault(),t.stopImmediatePropagation()}#M(t){li._resizerKeyboardManager.exec(this,t)}#P(t){this.#h&&t.relatedTarget?.parentNode!==this.#i&&this.#T()}#D(t){this.#u=this.#h?t:""}#z(t){if(this.#t)for(const i of this.#t)i.tabIndex=t}_resizeWithKeyboard(t,i){this.#h&&this.#E(this.#u,{movementX:t,movementY:i})}#T(){if(this.#h=!1,this.#z(-1),this.#n){const{savedX:t,savedY:i,savedWidth:n,savedHeight:a}=this.#n;this.#C(t,i,n,a),this.#n=null}}_stopResizingWithKeyboard(){this.#T(),this.div.focus()}select(){if(this.makeResizable(),this.div?.classList.add("selectedEditor"),!this.#p){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this.#p?.show()});return}this.#p?.show()}unselect(){this.#i?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this.#p?.hide()}updateParams(t,i){}disableEditing(){}enableEditing(){}enterInEditMode(){}getImageForAltText(){return null}get contentDiv(){return this.div}get isEditing(){return this.#m}set isEditing(t){this.#m=t,this.parent&&(t?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(t,i){this.#s=!0;const n=t/i,{style:a}=this.div;a.aspectRatio=n,a.height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(t,i=!1){if(i){this.#v||=new Map;const{action:n}=t;let a=this.#v.get(n);a&&clearTimeout(a),a=setTimeout(()=>{this._reportTelemetry(t),this.#v.delete(n),this.#v.size===0&&(this.#v=null)},li._telemetryTimeout),this.#v.set(n,a);return}t.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:t}})}show(t=this._isVisible){this.div.classList.toggle("hidden",!t),this._isVisible=t}enable(){this.div&&(this.div.tabIndex=0),this.#r=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#r=!0}renderAnnotationElement(t){let i=t.container.querySelector(".annotationContent");if(!i)i=document.createElement("div"),i.classList.add("annotationContent",this.editorType),t.container.prepend(i);else if(i.nodeName==="CANVAS"){const n=i;i=document.createElement("div"),i.classList.add("annotationContent",this.editorType),n.before(i)}return i}resetAnnotationElement(t){const{firstChild:i}=t.container;i.nodeName==="DIV"&&i.classList.contains("annotationContent")&&i.remove()}}class dkt extends li{constructor(t){super(t),this.annotationElementId=t.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}const Ipe=3285377520,rc=4294901760,Xp=65535;class uMe{constructor(t){this.h1=t?t&4294967295:Ipe,this.h2=t?t&4294967295:Ipe}update(t){let i,n;if(typeof t=="string"){i=new Uint8Array(t.length*2),n=0;for(let w=0,b=t.length;w<b;w++){const C=t.charCodeAt(w);C<=255?i[n++]=C:(i[n++]=C>>>8,i[n++]=C&255)}}else if(ArrayBuffer.isView(t))i=t.slice(),n=i.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const a=n>>2,l=n-a*4,d=new Uint32Array(i.buffer,0,a);let c=0,p=0,h=this.h1,u=this.h2;const m=3432918353,f=461845907,x=m&Xp,y=f&Xp;for(let w=0;w<a;w++)w&1?(c=d[w],c=c*m&rc|c*x&Xp,c=c<<15|c>>>17,c=c*f&rc|c*y&Xp,h^=c,h=h<<13|h>>>19,h=h*5+3864292196):(p=d[w],p=p*m&rc|p*x&Xp,p=p<<15|p>>>17,p=p*f&rc|p*y&Xp,u^=p,u=u<<13|u>>>19,u=u*5+3864292196);switch(c=0,l){case 3:c^=i[a*4+2]<<16;case 2:c^=i[a*4+1]<<8;case 1:c^=i[a*4],c=c*m&rc|c*x&Xp,c=c<<15|c>>>17,c=c*f&rc|c*y&Xp,a&1?h^=c:u^=c}this.h1=h,this.h2=u}hexdigest(){let t=this.h1,i=this.h2;return t^=i>>>1,t=t*3981806797&rc|t*36045&Xp,i=i*4283543511&rc|((i<<16|t>>>16)*2950163797&rc)>>>16,t^=i>>>1,t=t*444984403&rc|t*60499&Xp,i=i*3301882366&rc|((i<<16|t>>>16)*3120437893&rc)>>>16,t^=i>>>1,(t>>>0).toString(16).padStart(8,"0")+(i>>>0).toString(16).padStart(8,"0")}}const BU=Object.freeze({map:null,hash:"",transfer:void 0});class aq{#e=!1;#t=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(t,i){const n=this.#t.get(t);return n===void 0?i:Object.assign(i,n)}getRawValue(t){return this.#t.get(t)}remove(t){if(this.#t.delete(t),this.#t.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const i of this.#t.values())if(i instanceof li)return;this.onAnnotationEditor(null)}}setValue(t,i){const n=this.#t.get(t);let a=!1;if(n!==void 0)for(const[l,d]of Object.entries(i))n[l]!==d&&(a=!0,n[l]=d);else a=!0,this.#t.set(t,i);a&&this.#o(),i instanceof li&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(i.constructor._type)}has(t){return this.#t.has(t)}getAll(){return this.#t.size>0?qK(this.#t):null}setAll(t){for(const[i,n]of Object.entries(t))this.setValue(i,n)}get size(){return this.#t.size}#o(){this.#e||(this.#e=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#e&&(this.#e=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new mMe(this)}get serializable(){if(this.#t.size===0)return BU;const t=new Map,i=new uMe,n=[],a=Object.create(null);let l=!1;for(const[d,c]of this.#t){const p=c instanceof li?c.serialize(!1,a):c;p&&(t.set(d,p),i.update(`${d}:${JSON.stringify(p)}`),l||=!!p.bitmap)}if(l)for(const d of t.values())d.bitmap&&n.push(d.bitmap);return t.size>0?{map:t,hash:i.hexdigest(),transfer:n}:BU}get editorStats(){let t=null;const i=new Map;for(const n of this.#t.values()){if(!(n instanceof li))continue;const a=n.telemetryFinalData;if(!a)continue;const{type:l}=a;i.has(l)||i.set(l,Object.getPrototypeOf(n).constructor),t||=Object.create(null);const d=t[l]||=new Map;for(const[c,p]of Object.entries(a)){if(c==="type")continue;let h=d.get(c);h||(h=new Map,d.set(c,h));const u=h.get(p)??0;h.set(p,u+1)}}for(const[n,a]of i)t[n]=a.computeTelemetryFinalData(t[n]);return t}}class mMe extends aq{#e;constructor(t){super();const{map:i,hash:n,transfer:a}=t.serializable,l=structuredClone(i,a?{transfer:a}:null);this.#e={map:l,hash:n,transfer:a}}get print(){Dr("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#e}}class ckt{#e=new Set;constructor({ownerDocument:t=globalThis.document,styleElement:i=null}){this._document=t,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(t){this.nativeFontFaces.add(t),this._document.fonts.add(t)}removeNativeFontFace(t){this.nativeFontFaces.delete(t),this._document.fonts.delete(t)}insertRule(t){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const i=this.styleElement.sheet;i.insertRule(t,i.cssRules.length)}clear(){for(const t of this.nativeFontFaces)this._document.fonts.delete(t);this.nativeFontFaces.clear(),this.#e.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:t,_inspectFont:i}){if(!(!t||this.#e.has(t.loadedName))){if(ka(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:n,src:a,style:l}=t,d=new FontFace(n,a,l);this.addNativeFontFace(d);try{await d.load(),this.#e.add(n),i?.(t)}catch{zi(`Cannot load system font: ${t.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(d)}return}Dr("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(t){if(t.attached||t.missingFile&&!t.systemFontInfo)return;if(t.attached=!0,t.systemFontInfo){await this.loadSystemFont(t);return}if(this.isFontLoadingAPISupported){const n=t.createNativeFontFace();if(n){this.addNativeFontFace(n);try{await n.loaded}catch(a){throw zi(`Failed to load font '${n.family}': '${a}'.`),t.disableFontFace=!0,a}}return}const i=t.createFontFaceRule();if(i){if(this.insertRule(i),this.isSyncFontLoadingSupported)return;await new Promise(n=>{const a=this._queueLoadingCallback(n);this._prepareFontLoadEvent(t,a)})}}get isFontLoadingAPISupported(){const t=!!this._document?.fonts;return ar(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){let t=!1;return(Us||typeof navigator<"u"&&typeof navigator?.userAgent=="string"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(t=!0),ar(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){function i(){for(ka(!a.done,"completeRequest() cannot be called twice."),a.done=!0;n.length>0&&n[0].done;){const l=n.shift();setTimeout(l.callback,0)}}const{loadingRequests:n}=this,a={done:!1,complete:i,callback:t};return n.push(a),a}get _loadTestFont(){const t=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return ar(this,"_loadTestFont",t)}_prepareFontLoadEvent(t,i){function n(S,j){return S.charCodeAt(j)<<24|S.charCodeAt(j+1)<<16|S.charCodeAt(j+2)<<8|S.charCodeAt(j+3)&255}function a(S,j,I,P){const B=S.substring(0,j),T=S.substring(j+I);return B+P+T}let l,d;const c=this._document.createElement("canvas");c.width=1,c.height=1;const p=c.getContext("2d");let h=0;function u(S,j){if(++h>30){zi("Load test font never loaded."),j();return}if(p.font="30px "+S,p.fillText(".",0,20),p.getImageData(0,0,1,1).data[3]>0){j();return}setTimeout(u.bind(null,S,j))}const m=`lt${Date.now()}${this.loadTestFontId++}`;let f=this._loadTestFont;f=a(f,976,m.length,m);const y=16,w=1482184792;let b=n(f,y);for(l=0,d=m.length-3;l<d;l+=4)b=b-w+n(m,l)|0;l<m.length&&(b=b-w+n(m+"XXX",l)|0),f=a(f,y,4,G$t(b));const C=`url(data:font/opentype;base64,${btoa(f)});`,k=`@font-face {font-family:"${m}";src:${C}}`;this.insertRule(k);const L=this._document.createElement("div");L.style.visibility="hidden",L.style.width=L.style.height="10px",L.style.position="absolute",L.style.top=L.style.left="0px";for(const S of[t.loadedName,m]){const j=this._document.createElement("span");j.textContent="Hi",j.style.fontFamily=S,L.append(j)}this._document.body.append(L),u(m,()=>{L.remove(),i.complete()})}}class pkt{constructor(t,{disableFontFace:i=!1,inspectFont:n=null}){this.compiledGlyphs=Object.create(null);for(const a in t)this[a]=t[a];this.disableFontFace=i===!0,this._inspectFont=n}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let t;if(!this.cssFontInfo)t=new FontFace(this.loadedName,this.data,{});else{const i={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(i.style=`oblique ${this.cssFontInfo.italicAngle}deg`),t=new FontFace(this.cssFontInfo.fontFamily,this.data,i)}return this._inspectFont?.(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=sMe(this.data),i=`url(data:${this.mimetype};base64,${btoa(t)});`;let n;if(!this.cssFontInfo)n=`@font-face {font-family:"${this.loadedName}";src:${i}}`;else{let a=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(a+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),n=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${a}src:${i}}`}return this._inspectFont?.(this,i),n}getPathGenerator(t,i){if(this.compiledGlyphs[i]!==void 0)return this.compiledGlyphs[i];let n;try{n=t.get(this.loadedName+"_path_"+i)}catch(l){zi(`getPathGenerator - ignoring character: "${l}".`)}if(!Array.isArray(n)||n.length===0)return this.compiledGlyphs[i]=function(l,d){};const a=[];for(let l=0,d=n.length;l<d;)switch(n[l++]){case Ru.BEZIER_CURVE_TO:{const[c,p,h,u,m,f]=n.slice(l,l+6);a.push(x=>x.bezierCurveTo(c,p,h,u,m,f)),l+=6}break;case Ru.MOVE_TO:{const[c,p]=n.slice(l,l+2);a.push(h=>h.moveTo(c,p)),l+=2}break;case Ru.LINE_TO:{const[c,p]=n.slice(l,l+2);a.push(h=>h.lineTo(c,p)),l+=2}break;case Ru.QUADRATIC_CURVE_TO:{const[c,p,h,u]=n.slice(l,l+4);a.push(m=>m.quadraticCurveTo(c,p,h,u)),l+=4}break;case Ru.RESTORE:a.push(c=>c.restore());break;case Ru.SAVE:a.push(c=>c.save());break;case Ru.SCALE:ka(a.length===2,"Scale command is only valid at the third position.");break;case Ru.TRANSFORM:{const[c,p,h,u,m,f]=n.slice(l,l+6);a.push(x=>x.transform(c,p,h,u,m,f)),l+=6}break;case Ru.TRANSLATE:{const[c,p]=n.slice(l,l+2);a.push(h=>h.translate(c,p)),l+=2}break}return this.compiledGlyphs[i]=function(d,c){a[0](d),a[1](d),d.scale(c,-c);for(let p=2,h=a.length;p<h;p++)a[p](d)}}}if(Us){var DU=Promise.withResolvers(),TU=null;(async()=>{const t=await rf(()=>import("./empty-D5aJp-dl.js").then(c=>c.e),__vite__mapDeps([0,1,2])),i=await rf(()=>import("./index-Cq3K0p9F.js").then(c=>c.i),__vite__mapDeps([3,1,4,5,6,7,8,9])),n=await rf(()=>import("./index-4Gwk2AsQ.js").then(c=>c.i),__vite__mapDeps([10,1,11,4,5,6,7,8,9])),a=await rf(()=>import("./url-DLzso7lY.js").then(c=>c.u),__vite__mapDeps([12,1,9,7,5,6,8]));let l,d;return new Map(Object.entries({fs:t,http:i,https:n,url:a,canvas:l,path2d:d}))})().then(t=>{TU=t,DU.resolve()},t=>{zi(`loadPackages: ${t}`),TU=new Map,DU.resolve()})}class Jh{static get promise(){return DU.promise}static get(t){return TU?.get(t)}}const gMe=function(e){return Jh.get("fs").promises.readFile(e).then(i=>new Uint8Array(i))};class hkt extends rI{}class ukt extends nI{_createCanvas(t,i){return Jh.get("canvas").createCanvas(t,i)}}class mkt extends aI{_fetchData(t,i){return gMe(t).then(n=>({cMapData:n,compressionType:i}))}}class gkt extends sI{_fetchData(t){return gMe(t)}}const ml={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function PU(e,t){if(!t)return;const i=t[2]-t[0],n=t[3]-t[1],a=new Path2D;a.rect(t[0],t[1],i,n),e.clip(a)}class Eb{constructor(){this.constructor===Eb&&Dr("Cannot initialize BaseShadingPattern.")}getPattern(){Dr("Abstract method `getPattern` called.")}}class fkt extends Eb{constructor(t){super(),this._type=t[1],this._bbox=t[2],this._colorStops=t[3],this._p0=t[4],this._p1=t[5],this._r0=t[6],this._r1=t[7],this.matrix=null}_createGradient(t){let i;this._type==="axial"?i=t.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(i=t.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const n of this._colorStops)i.addColorStop(n[0],n[1]);return i}getPattern(t,i,n,a){let l;if(a===ml.STROKE||a===ml.FILL){const d=i.current.getClippedPathBoundingBox(a,gn(t))||[0,0,0,0],c=Math.ceil(d[2]-d[0])||1,p=Math.ceil(d[3]-d[1])||1,h=i.cachedCanvases.getCanvas("pattern",c,p,!0),u=h.context;u.clearRect(0,0,u.canvas.width,u.canvas.height),u.beginPath(),u.rect(0,0,u.canvas.width,u.canvas.height),u.translate(-d[0],-d[1]),n=$o.transform(n,[1,0,0,1,d[0],d[1]]),u.transform(...i.baseTransform),this.matrix&&u.transform(...this.matrix),PU(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),l=t.createPattern(h.canvas,"no-repeat");const m=new DOMMatrix(n);l.setTransform(m)}else PU(t,this._bbox),l=this._createGradient(t);return l}}function bO(e,t,i,n,a,l,d,c){const p=t.coords,h=t.colors,u=e.data,m=e.width*4;let f;p[i+1]>p[n+1]&&(f=i,i=n,n=f,f=l,l=d,d=f),p[n+1]>p[a+1]&&(f=n,n=a,a=f,f=d,d=c,c=f),p[i+1]>p[n+1]&&(f=i,i=n,n=f,f=l,l=d,d=f);const x=(p[i]+t.offsetX)*t.scaleX,y=(p[i+1]+t.offsetY)*t.scaleY,w=(p[n]+t.offsetX)*t.scaleX,b=(p[n+1]+t.offsetY)*t.scaleY,C=(p[a]+t.offsetX)*t.scaleX,k=(p[a+1]+t.offsetY)*t.scaleY;if(y>=k)return;const L=h[l],S=h[l+1],j=h[l+2],I=h[d],P=h[d+1],B=h[d+2],T=h[c],D=h[c+1],R=h[c+2],G=Math.round(y),q=Math.round(k);let Z,H,V,N,O,z,F,te;for(let Y=G;Y<=q;Y++){if(Y<b){const ye=Y<y?0:(y-Y)/(y-b);Z=x-(x-w)*ye,H=L-(L-I)*ye,V=S-(S-P)*ye,N=j-(j-B)*ye}else{let ye;Y>k?ye=1:b===k?ye=0:ye=(b-Y)/(b-k),Z=w-(w-C)*ye,H=I-(I-T)*ye,V=P-(P-D)*ye,N=B-(B-R)*ye}let W;Y<y?W=0:Y>k?W=1:W=(y-Y)/(y-k),O=x-(x-C)*W,z=L-(L-T)*W,F=S-(S-D)*W,te=j-(j-R)*W;const ee=Math.round(Math.min(Z,O)),J=Math.round(Math.max(Z,O));let ne=m*Y+ee*4;for(let ye=ee;ye<=J;ye++)W=(Z-ye)/(Z-O),W<0?W=0:W>1&&(W=1),u[ne++]=H-(H-z)*W|0,u[ne++]=V-(V-F)*W|0,u[ne++]=N-(N-te)*W|0,u[ne++]=255}}function xkt(e,t,i){const n=t.coords,a=t.colors;let l,d;switch(t.type){case"lattice":const c=t.verticesPerRow,p=Math.floor(n.length/c)-1,h=c-1;for(l=0;l<p;l++){let u=l*c;for(let m=0;m<h;m++,u++)bO(e,i,n[u],n[u+1],n[u+c],a[u],a[u+1],a[u+c]),bO(e,i,n[u+c+1],n[u+1],n[u+c],a[u+c+1],a[u+1],a[u+c])}break;case"triangles":for(l=0,d=n.length;l<d;l+=3)bO(e,i,n[l],n[l+1],n[l+2],a[l],a[l+1],a[l+2]);break;default:throw new Error("illegal figure")}}class ykt extends Eb{constructor(t){super(),this._coords=t[2],this._colors=t[3],this._figures=t[4],this._bounds=t[5],this._bbox=t[7],this._background=t[8],this.matrix=null}_createMeshCanvas(t,i,n){const c=Math.floor(this._bounds[0]),p=Math.floor(this._bounds[1]),h=Math.ceil(this._bounds[2])-c,u=Math.ceil(this._bounds[3])-p,m=Math.min(Math.ceil(Math.abs(h*t[0]*1.1)),3e3),f=Math.min(Math.ceil(Math.abs(u*t[1]*1.1)),3e3),x=h/m,y=u/f,w={coords:this._coords,colors:this._colors,offsetX:-c,offsetY:-p,scaleX:1/x,scaleY:1/y},b=m+4,C=f+4,k=n.getCanvas("mesh",b,C,!1),L=k.context,S=L.createImageData(m,f);if(i){const I=S.data;for(let P=0,B=I.length;P<B;P+=4)I[P]=i[0],I[P+1]=i[1],I[P+2]=i[2],I[P+3]=255}for(const I of this._figures)xkt(S,I,w);return L.putImageData(S,2,2),{canvas:k.canvas,offsetX:c-2*x,offsetY:p-2*y,scaleX:x,scaleY:y}}getPattern(t,i,n,a){PU(t,this._bbox);let l;if(a===ml.SHADING)l=$o.singularValueDecompose2dScale(gn(t));else if(l=$o.singularValueDecompose2dScale(i.baseTransform),this.matrix){const c=$o.singularValueDecompose2dScale(this.matrix);l=[l[0]*c[0],l[1]*c[1]]}const d=this._createMeshCanvas(l,a===ml.SHADING?null:this._background,i.cachedCanvases);return a!==ml.SHADING&&(t.setTransform(...i.baseTransform),this.matrix&&t.transform(...this.matrix)),t.translate(d.offsetX,d.offsetY),t.scale(d.scaleX,d.scaleY),t.createPattern(d.canvas,"no-repeat")}}class wkt extends Eb{getPattern(){return"hotpink"}}function bkt(e){switch(e[0]){case"RadialAxial":return new fkt(e);case"Mesh":return new ykt(e);case"Dummy":return new wkt}throw new Error(`Unknown IR type: ${e[0]}`)}const jpe={COLORED:1,UNCOLORED:2};class sq{static MAX_PATTERN_SIZE=3e3;constructor(t,i,n,a,l){this.operatorList=t[2],this.matrix=t[3],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=i,this.ctx=n,this.canvasGraphicsFactory=a,this.baseTransform=l}createPatternCanvas(t){const i=this.operatorList,n=this.bbox,a=this.xstep,l=this.ystep,d=this.paintType,c=this.tilingType,p=this.color,h=this.canvasGraphicsFactory;tI("TilingType: "+c);const u=n[0],m=n[1],f=n[2],x=n[3],y=$o.singularValueDecompose2dScale(this.matrix),w=$o.singularValueDecompose2dScale(this.baseTransform),b=[y[0]*w[0],y[1]*w[1]],C=this.getSizeAndScale(a,this.ctx.canvas.width,b[0]),k=this.getSizeAndScale(l,this.ctx.canvas.height,b[1]),L=t.cachedCanvases.getCanvas("pattern",C.size,k.size,!0),S=L.context,j=h.createCanvasGraphics(S);j.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(j,d,p);let I=u,P=m,B=f,T=x;return u<0&&(I=0,B+=Math.abs(u)),m<0&&(P=0,T+=Math.abs(m)),S.translate(-(C.scale*I),-(k.scale*P)),j.transform(C.scale,0,0,k.scale,0,0),S.save(),this.clipBbox(j,I,P,B,T),j.baseTransform=gn(j.ctx),j.executeOperatorList(i),j.endDrawing(),{canvas:L.canvas,scaleX:C.scale,scaleY:k.scale,offsetX:I,offsetY:P}}getSizeAndScale(t,i,n){t=Math.abs(t);const a=Math.max(sq.MAX_PATTERN_SIZE,i);let l=Math.ceil(t*n);return l>=a?l=a:n=l/t,{scale:n,size:l}}clipBbox(t,i,n,a,l){const d=a-i,c=l-n;t.ctx.rect(i,n,d,c),t.current.updateRectMinMax(gn(t.ctx),[i,n,a,l]),t.clip(),t.endPath()}setFillAndStrokeStyleToContext(t,i,n){const a=t.ctx,l=t.current;switch(i){case jpe.COLORED:const d=this.ctx;a.fillStyle=d.fillStyle,a.strokeStyle=d.strokeStyle,l.fillColor=d.fillStyle,l.strokeColor=d.strokeStyle;break;case jpe.UNCOLORED:const c=$o.makeHexColor(n[0],n[1],n[2]);a.fillStyle=c,a.strokeStyle=c,l.fillColor=c,l.strokeColor=c;break;default:throw new W$t(`Unsupported paint type: ${i}`)}}getPattern(t,i,n,a){let l=n;a!==ml.SHADING&&(l=$o.transform(l,i.baseTransform),this.matrix&&(l=$o.transform(l,this.matrix)));const d=this.createPatternCanvas(i);let c=new DOMMatrix(l);c=c.translate(d.offsetX,d.offsetY),c=c.scale(1/d.scaleX,1/d.scaleY);const p=t.createPattern(d.canvas,"repeat");return p.setTransform(c),p}}function vkt({src:e,srcPos:t=0,dest:i,width:n,height:a,nonBlackColor:l=4294967295,inverseDecode:d=!1}){const c=ql.isLittleEndian?4278190080:255,[p,h]=d?[l,c]:[c,l],u=n>>3,m=n&7,f=e.length;i=new Uint32Array(i.buffer);let x=0;for(let y=0;y<a;y++){for(const b=t+u;t<b;t++){const C=t<f?e[t]:255;i[x++]=C&128?h:p,i[x++]=C&64?h:p,i[x++]=C&32?h:p,i[x++]=C&16?h:p,i[x++]=C&8?h:p,i[x++]=C&4?h:p,i[x++]=C&2?h:p,i[x++]=C&1?h:p}if(m===0)continue;const w=t<f?e[t++]:255;for(let b=0;b<m;b++)i[x++]=w&1<<7-b?h:p}return{srcPos:t,destPos:x}}const Mpe=16,Bpe=100,Ckt=15,Dpe=10,Tpe=1e3,Ol=16;function Akt(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(n,a){t.translate(n,a),this.__originalTranslate(n,a)},e.scale=function(n,a){t.scale(n,a),this.__originalScale(n,a)},e.transform=function(n,a,l,d,c,p){t.transform(n,a,l,d,c,p),this.__originalTransform(n,a,l,d,c,p)},e.setTransform=function(n,a,l,d,c,p){t.setTransform(n,a,l,d,c,p),this.__originalSetTransform(n,a,l,d,c,p)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(n){t.rotate(n),this.__originalRotate(n)},e.clip=function(n){t.clip(n),this.__originalClip(n)},e.moveTo=function(i,n){t.moveTo(i,n),this.__originalMoveTo(i,n)},e.lineTo=function(i,n){t.lineTo(i,n),this.__originalLineTo(i,n)},e.bezierCurveTo=function(i,n,a,l,d,c){t.bezierCurveTo(i,n,a,l,d,c),this.__originalBezierCurveTo(i,n,a,l,d,c)},e.rect=function(i,n,a,l){t.rect(i,n,a,l),this.__originalRect(i,n,a,l)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}class $kt{constructor(t){this.canvasFactory=t,this.cache=Object.create(null)}getCanvas(t,i,n){let a;return this.cache[t]!==void 0?(a=this.cache[t],this.canvasFactory.reset(a,i,n)):(a=this.canvasFactory.create(i,n),this.cache[t]=a),a}delete(t){delete this.cache[t]}clear(){for(const t in this.cache){const i=this.cache[t];this.canvasFactory.destroy(i),delete this.cache[t]}}}function bC(e,t,i,n,a,l,d,c,p,h){const[u,m,f,x,y,w]=gn(e);if(m===0&&f===0){const k=d*u+y,L=Math.round(k),S=c*x+w,j=Math.round(S),I=(d+p)*u+y,P=Math.abs(Math.round(I)-L)||1,B=(c+h)*x+w,T=Math.abs(Math.round(B)-j)||1;return e.setTransform(Math.sign(u),0,0,Math.sign(x),L,j),e.drawImage(t,i,n,a,l,0,0,P,T),e.setTransform(u,m,f,x,y,w),[P,T]}if(u===0&&x===0){const k=c*f+y,L=Math.round(k),S=d*m+w,j=Math.round(S),I=(c+h)*f+y,P=Math.abs(Math.round(I)-L)||1,B=(d+p)*m+w,T=Math.abs(Math.round(B)-j)||1;return e.setTransform(0,Math.sign(m),Math.sign(f),0,L,j),e.drawImage(t,i,n,a,l,0,0,T,P),e.setTransform(u,m,f,x,y,w),[T,P]}e.drawImage(t,i,n,a,l,d,c,p,h);const b=Math.hypot(u,m),C=Math.hypot(f,x);return[b*p,C*h]}function kkt(e){const{width:t,height:i}=e;if(t>Tpe||i>Tpe)return null;const n=1e3,a=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),l=t+1;let d=new Uint8Array(l*(i+1)),c,p,h;const u=t+7&-8;let m=new Uint8Array(u*i),f=0;for(const C of e.data){let k=128;for(;k>0;)m[f++]=C&k?0:255,k>>=1}let x=0;for(f=0,m[f]!==0&&(d[0]=1,++x),p=1;p<t;p++)m[f]!==m[f+1]&&(d[p]=m[f]?2:1,++x),f++;for(m[f]!==0&&(d[p]=2,++x),c=1;c<i;c++){f=c*u,h=c*l,m[f-u]!==m[f]&&(d[h]=m[f]?1:8,++x);let C=(m[f]?4:0)+(m[f-u]?8:0);for(p=1;p<t;p++)C=(C>>2)+(m[f+1]?4:0)+(m[f-u+1]?8:0),a[C]&&(d[h+p]=a[C],++x),f++;if(m[f-u]!==m[f]&&(d[h+p]=m[f]?2:4,++x),x>n)return null}for(f=u*(i-1),h=c*l,m[f]!==0&&(d[h]=8,++x),p=1;p<t;p++)m[f]!==m[f+1]&&(d[h+p]=m[f]?4:8,++x),f++;if(m[f]!==0&&(d[h+p]=4,++x),x>n)return null;const y=new Int32Array([0,l,-1,0,-l,0,0,0,1]),w=new Path2D;for(c=0;x&&c<=i;c++){let C=c*l;const k=C+t;for(;C<k&&!d[C];)C++;if(C===k)continue;w.moveTo(C%l,c);const L=C;let S=d[C];do{const j=y[S];do C+=j;while(!d[C]);const I=d[C];I!==5&&I!==10?(S=I,d[C]=0):(S=I&51*S>>4,d[C]&=S>>2|S<<2),w.lineTo(C%l,C/l|0),d[C]||--x}while(L!==C);--c}return m=null,d=null,function(C){C.save(),C.scale(1/t,-1/i),C.translate(0,-i),C.fill(w),C.beginPath(),C.restore()}}class Ppe{constructor(t,i){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=nMe,this.textMatrixScale=1,this.fontMatrix=LU,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=Rs.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,t,i])}clone(){const t=Object.create(this);return t.clipBox=this.clipBox.slice(),t}setCurrentPoint(t,i){this.x=t,this.y=i}updatePathMinMax(t,i,n){[i,n]=$o.applyTransform([i,n],t),this.minX=Math.min(this.minX,i),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,i),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(t,i){const n=$o.applyTransform(i,t),a=$o.applyTransform(i.slice(2),t),l=$o.applyTransform([i[0],i[3]],t),d=$o.applyTransform([i[2],i[1]],t);this.minX=Math.min(this.minX,n[0],a[0],l[0],d[0]),this.minY=Math.min(this.minY,n[1],a[1],l[1],d[1]),this.maxX=Math.max(this.maxX,n[0],a[0],l[0],d[0]),this.maxY=Math.max(this.maxY,n[1],a[1],l[1],d[1])}updateScalingPathMinMax(t,i){$o.scaleMinMax(t,i),this.minX=Math.min(this.minX,i[0]),this.minY=Math.min(this.minY,i[1]),this.maxX=Math.max(this.maxX,i[2]),this.maxY=Math.max(this.maxY,i[3])}updateCurvePathMinMax(t,i,n,a,l,d,c,p,h,u){const m=$o.bezierBoundingBox(i,n,a,l,d,c,p,h,u);u||this.updateRectMinMax(t,m)}getPathBoundingBox(t=ml.FILL,i=null){const n=[this.minX,this.minY,this.maxX,this.maxY];if(t===ml.STROKE){i||Dr("Stroke bounding box must include transform.");const a=$o.singularValueDecompose2dScale(i),l=a[0]*this.lineWidth/2,d=a[1]*this.lineWidth/2;n[0]-=l,n[1]-=d,n[2]+=l,n[3]+=d}return n}updateClipFromPath(){const t=$o.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(t||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(t){this.clipBox=t,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(t=ml.FILL,i=null){return $o.intersect(this.clipBox,this.getPathBoundingBox(t,i))}}function zpe(e,t){if(typeof ImageData<"u"&&t instanceof ImageData){e.putImageData(t,0,0);return}const i=t.height,n=t.width,a=i%Ol,l=(i-a)/Ol,d=a===0?l:l+1,c=e.createImageData(n,Ol);let p=0,h;const u=t.data,m=c.data;let f,x,y,w;if(t.kind===hk.GRAYSCALE_1BPP){const b=u.byteLength,C=new Uint32Array(m.buffer,0,m.byteLength>>2),k=C.length,L=n+7>>3,S=4294967295,j=ql.isLittleEndian?4278190080:255;for(f=0;f<d;f++){for(y=f<l?Ol:a,h=0,x=0;x<y;x++){const I=b-p;let P=0;const B=I>L?n:I*8-7,T=B&-8;let D=0,R=0;for(;P<T;P+=8)R=u[p++],C[h++]=R&128?S:j,C[h++]=R&64?S:j,C[h++]=R&32?S:j,C[h++]=R&16?S:j,C[h++]=R&8?S:j,C[h++]=R&4?S:j,C[h++]=R&2?S:j,C[h++]=R&1?S:j;for(;P<B;P++)D===0&&(R=u[p++],D=128),C[h++]=R&D?S:j,D>>=1}for(;h<k;)C[h++]=0;e.putImageData(c,0,f*Ol)}}else if(t.kind===hk.RGBA_32BPP){for(x=0,w=n*Ol*4,f=0;f<l;f++)m.set(u.subarray(p,p+w)),p+=w,e.putImageData(c,0,x),x+=Ol;f<d&&(w=n*a*4,m.set(u.subarray(p,p+w)),e.putImageData(c,0,x))}else if(t.kind===hk.RGB_24BPP)for(y=Ol,w=n*y,f=0;f<d;f++){for(f>=l&&(y=a,w=n*y),h=0,x=w;x--;)m[h++]=u[p++],m[h++]=u[p++],m[h++]=u[p++],m[h++]=255;e.putImageData(c,0,f*Ol)}else throw new Error(`bad image kind: ${t.kind}`)}function Rpe(e,t){if(t.bitmap){e.drawImage(t.bitmap,0,0);return}const i=t.height,n=t.width,a=i%Ol,l=(i-a)/Ol,d=a===0?l:l+1,c=e.createImageData(n,Ol);let p=0;const h=t.data,u=c.data;for(let m=0;m<d;m++){const f=m<l?Ol:a;({srcPos:p}=vkt({src:h,srcPos:p,dest:u,width:n,height:f,nonBlackColor:0})),e.putImageData(c,0,m*Ol)}}function H9(e,t){const i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const n of i)e[n]!==void 0&&(t[n]=e[n]);e.setLineDash!==void 0&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function vC(e){if(e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",e.setLineDash!==void 0&&(e.setLineDash([]),e.lineDashOffset=0),!Us){const{filter:t}=e;t!=="none"&&t!==""&&(e.filter="none")}}function Fpe(e,t){if(t)return!0;const i=$o.singularValueDecompose2dScale(e);i[0]=Math.fround(i[0]),i[1]=Math.fround(i[1]);const n=Math.fround((globalThis.devicePixelRatio||1)*$6.PDF_TO_CSS_UNITS);return i[0]<=n&&i[1]<=n}const Skt=["butt","round","square"],Ekt=["miter","round","bevel"],Lkt={},Ope={};class Y7{constructor(t,i,n,a,l,{optionalContentConfig:d,markedContentStack:c=null},p,h){this.ctx=t,this.current=new Ppe(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=i,this.objs=n,this.canvasFactory=a,this.filterFactory=l,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=c||[],this.optionalContentConfig=d,this.cachedCanvases=new $kt(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=p,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=h,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(t,i=null){return typeof t=="string"?t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t):i}beginDrawing({transform:t,viewport:i,transparency:n=!1,background:a=null}){const l=this.ctx.canvas.width,d=this.ctx.canvas.height,c=this.ctx.fillStyle;if(this.ctx.fillStyle=a||"#ffffff",this.ctx.fillRect(0,0,l,d),this.ctx.fillStyle=c,n){const p=this.cachedCanvases.getCanvas("transparent",l,d);this.compositeCtx=this.ctx,this.transparentCanvas=p.canvas,this.ctx=p.context,this.ctx.save(),this.ctx.transform(...gn(this.compositeCtx))}this.ctx.save(),vC(this.ctx),t&&(this.ctx.transform(...t),this.outputScaleX=t[0],this.outputScaleY=t[0]),this.ctx.transform(...i.transform),this.viewportScale=i.scale,this.baseTransform=gn(this.ctx)}executeOperatorList(t,i,n,a){const l=t.argsArray,d=t.fnArray;let c=i||0;const p=l.length;if(p===c)return c;const h=p-c>Dpe&&typeof n=="function",u=h?Date.now()+Ckt:0;let m=0;const f=this.commonObjs,x=this.objs;let y;for(;;){if(a!==void 0&&c===a.nextBreakPoint)return a.breakIt(c,n),c;if(y=d[c],y!==v1.dependency)this[y].apply(this,l[c]);else for(const w of l[c]){const b=w.startsWith("g_")?f:x;if(!b.has(w))return b.get(w,n),c}if(c++,c===p)return c;if(h&&++m>Dpe){if(Date.now()>u)return n(),c;m=0}}}#e(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();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)}endDrawing(){this.#e(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const t of this._cachedBitmapsMap.values()){for(const i of t.values())typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement&&(i.width=i.height=0);t.clear()}this._cachedBitmapsMap.clear(),this.#t()}#t(){if(this.pageColors){const t=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(t!=="none"){const i=this.ctx.filter;this.ctx.filter=t,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=i}}}_scaleImage(t,i){const n=t.width,a=t.height;let l=Math.max(Math.hypot(i[0],i[1]),1),d=Math.max(Math.hypot(i[2],i[3]),1),c=n,p=a,h="prescale1",u,m;for(;l>2&&c>1||d>2&&p>1;){let f=c,x=p;l>2&&c>1&&(f=c>=16384?Math.floor(c/2)-1||1:Math.ceil(c/2),l/=c/f),d>2&&p>1&&(x=p>=16384?Math.floor(p/2)-1||1:Math.ceil(p)/2,d/=p/x),u=this.cachedCanvases.getCanvas(h,f,x),m=u.context,m.clearRect(0,0,f,x),m.drawImage(t,0,0,c,p,0,0,f,x),t=u.canvas,c=f,p=x,h=h==="prescale1"?"prescale2":"prescale1"}return{img:t,paintWidth:c,paintHeight:p}}_createMaskCanvas(t){const i=this.ctx,{width:n,height:a}=t,l=this.current.fillColor,d=this.current.patternFill,c=gn(i);let p,h,u,m;if((t.bitmap||t.data)&&t.count>1){const B=t.bitmap||t.data.buffer;h=JSON.stringify(d?c:[c.slice(0,4),l]),p=this._cachedBitmapsMap.get(B),p||(p=new Map,this._cachedBitmapsMap.set(B,p));const T=p.get(h);if(T&&!d){const D=Math.round(Math.min(c[0],c[2])+c[4]),R=Math.round(Math.min(c[1],c[3])+c[5]);return{canvas:T,offsetX:D,offsetY:R}}u=T}u||(m=this.cachedCanvases.getCanvas("maskCanvas",n,a),Rpe(m.context,t));let f=$o.transform(c,[1/n,0,0,-1/a,0,0]);f=$o.transform(f,[1,0,0,1,0,-a]);const[x,y,w,b]=$o.getAxialAlignedBoundingBox([0,0,n,a],f),C=Math.round(w-x)||1,k=Math.round(b-y)||1,L=this.cachedCanvases.getCanvas("fillCanvas",C,k),S=L.context,j=x,I=y;S.translate(-j,-I),S.transform(...f),u||(u=this._scaleImage(m.canvas,Fu(S)),u=u.img,p&&d&&p.set(h,u)),S.imageSmoothingEnabled=Fpe(gn(S),t.interpolate),bC(S,u,0,0,u.width,u.height,0,0,n,a),S.globalCompositeOperation="source-in";const P=$o.transform(Fu(S),[1,0,0,1,-j,-I]);return S.fillStyle=d?l.getPattern(i,this,P,ml.FILL):l,S.fillRect(0,0,n,a),p&&!d&&(this.cachedCanvases.delete("fillCanvas"),p.set(h,L.canvas)),{canvas:L.canvas,offsetX:Math.round(j),offsetY:Math.round(I)}}setLineWidth(t){t!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=t,this.ctx.lineWidth=t}setLineCap(t){this.ctx.lineCap=Skt[t]}setLineJoin(t){this.ctx.lineJoin=Ekt[t]}setMiterLimit(t){this.ctx.miterLimit=t}setDash(t,i){const n=this.ctx;n.setLineDash!==void 0&&(n.setLineDash(t),n.lineDashOffset=i)}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[i,n]of t)switch(i){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=n;break;case"ca":this.current.fillAlpha=n,this.ctx.globalAlpha=n;break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(n);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const t=this.inSMaskMode;this.current.activeSMask&&!t?this.beginSMaskMode():!this.current.activeSMask&&t&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const t=this.ctx.canvas.width,i=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,a=this.cachedCanvases.getCanvas(n,t,i);this.suspendedCtx=this.ctx,this.ctx=a.context;const l=this.ctx;l.setTransform(...gn(this.suspendedCtx)),H9(this.suspendedCtx,l),Akt(l,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(),H9(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(t){if(!this.current.activeSMask)return;t?(t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.ceil(t[2]),t[3]=Math.ceil(t[3])):t=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const i=this.current.activeSMask,n=this.suspendedCtx;this.composeSMask(n,i,this.ctx,t),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(t,i,n,a){const l=a[0],d=a[1],c=a[2]-l,p=a[3]-d;c===0||p===0||(this.genericComposeSMask(i.context,n,c,p,i.subtype,i.backdrop,i.transferMap,l,d,i.offsetX,i.offsetY),t.save(),t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),t.drawImage(n.canvas,0,0),t.restore())}genericComposeSMask(t,i,n,a,l,d,c,p,h,u,m){let f=t.canvas,x=p-u,y=h-m;if(d){if(x<0||y<0||x+n>f.width||y+a>f.height){const b=this.cachedCanvases.getCanvas("maskExtension",n,a),C=b.context;C.drawImage(f,-x,-y),d.some(k=>k!==0)&&(C.globalCompositeOperation="destination-atop",C.fillStyle=$o.makeHexColor(...d),C.fillRect(0,0,n,a),C.globalCompositeOperation="source-over"),f=b.canvas,x=y=0}else if(d.some(b=>b!==0)){t.save(),t.globalAlpha=1,t.setTransform(1,0,0,1,0,0);const b=new Path2D;b.rect(x,y,n,a),t.clip(b),t.globalCompositeOperation="destination-atop",t.fillStyle=$o.makeHexColor(...d),t.fillRect(x,y,n,a),t.restore()}}i.save(),i.globalAlpha=1,i.setTransform(1,0,0,1,0,0),l==="Alpha"&&c?i.filter=this.filterFactory.addAlphaFilter(c):l==="Luminosity"&&(i.filter=this.filterFactory.addLuminosityFilter(c));const w=new Path2D;w.rect(p,h,n,a),i.clip(w),i.globalCompositeOperation="destination-in",i.drawImage(f,x,y,n,a,p,h,n,a),i.restore()}save(){this.inSMaskMode?(H9(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const t=this.current;this.stateStack.push(t),this.current=t.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),H9(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(t,i,n,a,l,d){this.ctx.transform(t,i,n,a,l,d),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(t,i,n){const a=this.ctx,l=this.current;let d=l.x,c=l.y,p,h;const u=gn(a),m=u[0]===0&&u[3]===0||u[1]===0&&u[2]===0,f=m?n.slice(0):null;for(let x=0,y=0,w=t.length;x<w;x++)switch(t[x]|0){case v1.rectangle:d=i[y++],c=i[y++];const b=i[y++],C=i[y++],k=d+b,L=c+C;a.moveTo(d,c),b===0||C===0?a.lineTo(k,L):(a.lineTo(k,c),a.lineTo(k,L),a.lineTo(d,L)),m||l.updateRectMinMax(u,[d,c,k,L]),a.closePath();break;case v1.moveTo:d=i[y++],c=i[y++],a.moveTo(d,c),m||l.updatePathMinMax(u,d,c);break;case v1.lineTo:d=i[y++],c=i[y++],a.lineTo(d,c),m||l.updatePathMinMax(u,d,c);break;case v1.curveTo:p=d,h=c,d=i[y+4],c=i[y+5],a.bezierCurveTo(i[y],i[y+1],i[y+2],i[y+3],d,c),l.updateCurvePathMinMax(u,p,h,i[y],i[y+1],i[y+2],i[y+3],d,c,f),y+=6;break;case v1.curveTo2:p=d,h=c,a.bezierCurveTo(d,c,i[y],i[y+1],i[y+2],i[y+3]),l.updateCurvePathMinMax(u,p,h,d,c,i[y],i[y+1],i[y+2],i[y+3],f),d=i[y+2],c=i[y+3],y+=4;break;case v1.curveTo3:p=d,h=c,d=i[y+2],c=i[y+3],a.bezierCurveTo(i[y],i[y+1],d,c,d,c),l.updateCurvePathMinMax(u,p,h,i[y],i[y+1],d,c,d,c,f),y+=4;break;case v1.closePath:a.closePath();break}m&&l.updateScalingPathMinMax(u,f),l.setCurrentPoint(d,c)}closePath(){this.ctx.closePath()}stroke(t=!0){const i=this.ctx,n=this.current.strokeColor;i.globalAlpha=this.current.strokeAlpha,this.contentVisible&&(typeof n=="object"&&n?.getPattern?(i.save(),i.strokeStyle=n.getPattern(i,this,Fu(i),ml.STROKE),this.rescaleAndStroke(!1),i.restore()):this.rescaleAndStroke(!0)),t&&this.consumePath(this.current.getClippedPathBoundingBox()),i.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(t=!0){const i=this.ctx,n=this.current.fillColor,a=this.current.patternFill;let l=!1;a&&(i.save(),i.fillStyle=n.getPattern(i,this,Fu(i),ml.FILL),l=!0);const d=this.current.getClippedPathBoundingBox();this.contentVisible&&d!==null&&(this.pendingEOFill?(i.fill("evenodd"),this.pendingEOFill=!1):i.fill()),l&&i.restore(),t&&this.consumePath(d)}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=Lkt}eoClip(){this.pendingClip=Ope}beginText(){this.current.textMatrix=nMe,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const t=this.pendingTextPaths,i=this.ctx;if(t===void 0){i.beginPath();return}i.save(),i.beginPath();for(const n of t)i.setTransform(...n.transform),i.translate(n.x,n.y),n.addToPath(i,n.fontSize);i.restore(),i.clip(),i.beginPath(),delete this.pendingTextPaths}setCharSpacing(t){this.current.charSpacing=t}setWordSpacing(t){this.current.wordSpacing=t}setHScale(t){this.current.textHScale=t/100}setLeading(t){this.current.leading=-t}setFont(t,i){const n=this.commonObjs.get(t),a=this.current;if(!n)throw new Error(`Can't find font for ${t}`);if(a.fontMatrix=n.fontMatrix||LU,(a.fontMatrix[0]===0||a.fontMatrix[3]===0)&&zi("Invalid font matrix for font "+t),i<0?(i=-i,a.fontDirection=-1):a.fontDirection=1,this.current.font=n,this.current.fontSize=i,n.isType3Font)return;const l=n.loadedName||"sans-serif",d=n.systemFontInfo?.css||`"${l}", ${n.fallbackName}`;let c="normal";n.black?c="900":n.bold&&(c="bold");const p=n.italic?"italic":"normal";let h=i;i<Mpe?h=Mpe:i>Bpe&&(h=Bpe),this.current.fontSizeScale=i/h,this.ctx.font=`${p} ${c} ${h}px ${d}`}setTextRenderingMode(t){this.current.textRenderingMode=t}setTextRise(t){this.current.textRise=t}moveText(t,i){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=i}setLeadingMoveText(t,i){this.setLeading(-i),this.moveText(t,i)}setTextMatrix(t,i,n,a,l,d){this.current.textMatrix=[t,i,n,a,l,d],this.current.textMatrixScale=Math.hypot(t,i),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(t,i,n,a){const l=this.ctx,d=this.current,c=d.font,p=d.textRenderingMode,h=d.fontSize/d.fontSizeScale,u=p&Rs.FILL_STROKE_MASK,m=!!(p&Rs.ADD_TO_PATH_FLAG),f=d.patternFill&&!c.missingFile;let x;(c.disableFontFace||m||f)&&(x=c.getPathGenerator(this.commonObjs,t)),c.disableFontFace||f?(l.save(),l.translate(i,n),l.beginPath(),x(l,h),a&&l.setTransform(...a),(u===Rs.FILL||u===Rs.FILL_STROKE)&&l.fill(),(u===Rs.STROKE||u===Rs.FILL_STROKE)&&l.stroke(),l.restore()):((u===Rs.FILL||u===Rs.FILL_STROKE)&&l.fillText(t,i,n),(u===Rs.STROKE||u===Rs.FILL_STROKE)&&l.strokeText(t,i,n)),m&&(this.pendingTextPaths||=[]).push({transform:gn(l),x:i,y:n,fontSize:h,addToPath:x})}get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);const i=t.getImageData(0,0,10,10).data;let n=!1;for(let a=3;a<i.length;a+=4)if(i[a]>0&&i[a]<255){n=!0;break}return ar(this,"isFontSubpixelAAEnabled",n)}showText(t){const i=this.current,n=i.font;if(n.isType3Font)return this.showType3Text(t);const a=i.fontSize;if(a===0)return;const l=this.ctx,d=i.fontSizeScale,c=i.charSpacing,p=i.wordSpacing,h=i.fontDirection,u=i.textHScale*h,m=t.length,f=n.vertical,x=f?1:-1,y=n.defaultVMetrics,w=a*i.fontMatrix[0],b=i.textRenderingMode===Rs.FILL&&!n.disableFontFace&&!i.patternFill;l.save(),l.transform(...i.textMatrix),l.translate(i.x,i.y+i.textRise),h>0?l.scale(u,-1):l.scale(u,1);let C;if(i.patternFill){l.save();const I=i.fillColor.getPattern(l,this,Fu(l),ml.FILL);C=gn(l),l.restore(),l.fillStyle=I}let k=i.lineWidth;const L=i.textMatrixScale;if(L===0||k===0){const I=i.textRenderingMode&Rs.FILL_STROKE_MASK;(I===Rs.STROKE||I===Rs.FILL_STROKE)&&(k=this.getSinglePixelWidth())}else k/=L;if(d!==1&&(l.scale(d,d),k/=d),l.lineWidth=k,n.isInvalidPDFjsFont){const I=[];let P=0;for(const B of t)I.push(B.unicode),P+=B.width;l.fillText(I.join(""),0,0),i.x+=P*w*u,l.restore(),this.compose();return}let S=0,j;for(j=0;j<m;++j){const I=t[j];if(typeof I=="number"){S+=x*I*a/1e3;continue}let P=!1;const B=(I.isSpace?p:0)+c,T=I.fontChar,D=I.accent;let R,G,q=I.width;if(f){const H=I.vmetric||y,V=-(I.vmetric?H[1]:q*.5)*w,N=H[2]*w;q=H?-H[0]:q,R=V/d,G=(S+N)/d}else R=S/d,G=0;if(n.remeasure&&q>0){const H=l.measureText(T).width*1e3/a*d;if(q<H&&this.isFontSubpixelAAEnabled){const V=q/H;P=!0,l.save(),l.scale(V,1),R/=V}else q!==H&&(R+=(q-H)/2e3*a/d)}if(this.contentVisible&&(I.isInFont||n.missingFile)){if(b&&!D)l.fillText(T,R,G);else if(this.paintChar(T,R,G,C),D){const H=R+a*D.offset.x/d,V=G-a*D.offset.y/d;this.paintChar(D.fontChar,H,V,C)}}const Z=f?q*w-B*h:q*w+B*h;S+=Z,P&&l.restore()}f?i.y-=S:i.x+=S*u,l.restore(),this.compose()}showType3Text(t){const i=this.ctx,n=this.current,a=n.font,l=n.fontSize,d=n.fontDirection,c=a.vertical?1:-1,p=n.charSpacing,h=n.wordSpacing,u=n.textHScale*d,m=n.fontMatrix||LU,f=t.length,x=n.textRenderingMode===Rs.INVISIBLE;let y,w,b,C;if(!(x||l===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,i.save(),i.transform(...n.textMatrix),i.translate(n.x,n.y),i.scale(u,d),y=0;y<f;++y){if(w=t[y],typeof w=="number"){C=c*w*l/1e3,this.ctx.translate(C,0),n.x+=C*u;continue}const k=(w.isSpace?h:0)+p,L=a.charProcOperatorList[w.operatorListId];if(!L){zi(`Type3 character "${w.operatorListId}" is not available.`);continue}this.contentVisible&&(this.processingType3=w,this.save(),i.scale(l,l),i.transform(...m),this.executeOperatorList(L),this.restore()),b=$o.applyTransform([w.width,0],m)[0]*l+k,i.translate(b,0),n.x+=b*u}i.restore(),this.processingType3=null}}setCharWidth(t,i){}setCharWidthAndBounds(t,i,n,a,l,d){this.ctx.rect(n,a,l-n,d-a),this.ctx.clip(),this.endPath()}getColorN_Pattern(t){let i;if(t[0]==="TilingPattern"){const n=t[1],a=this.baseTransform||gn(this.ctx),l={createCanvasGraphics:d=>new Y7(d,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};i=new sq(t,n,this.ctx,l,a)}else i=this._getPattern(t[1],t[2]);return i}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(t,i,n){const a=$o.makeHexColor(t,i,n);this.ctx.strokeStyle=a,this.current.strokeColor=a}setFillRGBColor(t,i,n){const a=$o.makeHexColor(t,i,n);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1}_getPattern(t,i=null){let n;return this.cachedPatterns.has(t)?n=this.cachedPatterns.get(t):(n=bkt(this.getObject(t)),this.cachedPatterns.set(t,n)),i&&(n.matrix=i),n}shadingFill(t){if(!this.contentVisible)return;const i=this.ctx;this.save();const n=this._getPattern(t);i.fillStyle=n.getPattern(i,this,Fu(i),ml.SHADING);const a=Fu(i);if(a){const{width:l,height:d}=i.canvas,[c,p,h,u]=$o.getAxialAlignedBoundingBox([0,0,l,d],a);this.ctx.fillRect(c,p,h-c,u-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){Dr("Should not call beginInlineImage")}beginImageData(){Dr("Should not call beginImageData")}paintFormXObjectBegin(t,i){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),t&&this.transform(...t),this.baseTransform=gn(this.ctx),i)){const n=i[2]-i[0],a=i[3]-i[1];this.ctx.rect(i[0],i[1],n,a),this.current.updateRectMinMax(gn(this.ctx),i),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(t){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const i=this.ctx;t.isolated||tI("TODO: Support non-isolated groups."),t.knockout&&zi("Knockout groups not supported.");const n=gn(i);if(t.matrix&&i.transform(...t.matrix),!t.bbox)throw new Error("Bounding box is required.");let a=$o.getAxialAlignedBoundingBox(t.bbox,gn(i));const l=[0,0,i.canvas.width,i.canvas.height];a=$o.intersect(a,l)||[0,0,0,0];const d=Math.floor(a[0]),c=Math.floor(a[1]),p=Math.max(Math.ceil(a[2])-d,1),h=Math.max(Math.ceil(a[3])-c,1);this.current.startNewPathAndClipBox([0,0,p,h]);let u="groupAt"+this.groupLevel;t.smask&&(u+="_smask_"+this.smaskCounter++%2);const m=this.cachedCanvases.getCanvas(u,p,h),f=m.context;f.translate(-d,-c),f.transform(...n),t.smask?this.smaskStack.push({canvas:m.canvas,context:f,offsetX:d,offsetY:c,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(i.setTransform(1,0,0,1,0,0),i.translate(d,c),i.save()),H9(i,f),this.ctx=f,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++}endGroup(t){if(!this.contentVisible)return;this.groupLevel--;const i=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,t.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const a=gn(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...a);const l=$o.getAxialAlignedBoundingBox([0,0,i.canvas.width,i.canvas.height],a);this.ctx.drawImage(i.canvas,0,0),this.ctx.restore(),this.compose(l)}}beginAnnotation(t,i,n,a,l){if(this.#e(),vC(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),i){const d=i[2]-i[0],c=i[3]-i[1];if(l&&this.annotationCanvasMap){n=n.slice(),n[4]-=i[0],n[5]-=i[1],i=i.slice(),i[0]=i[1]=0,i[2]=d,i[3]=c;const[p,h]=$o.singularValueDecompose2dScale(gn(this.ctx)),{viewportScale:u}=this,m=Math.ceil(d*this.outputScaleX*u),f=Math.ceil(c*this.outputScaleY*u);this.annotationCanvas=this.canvasFactory.create(m,f);const{canvas:x,context:y}=this.annotationCanvas;this.annotationCanvasMap.set(t,x),this.annotationCanvas.savedCtx=this.ctx,this.ctx=y,this.ctx.save(),this.ctx.setTransform(p,0,0,-h,0,c*h),vC(this.ctx)}else vC(this.ctx),this.ctx.rect(i[0],i[1],d,c),this.ctx.clip(),this.endPath()}this.current=new Ppe(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...a)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#t(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(t){if(!this.contentVisible)return;const i=t.count;t=this.getObject(t.data,t),t.count=i;const n=this.ctx,a=this.processingType3;if(a&&(a.compiled===void 0&&(a.compiled=kkt(t)),a.compiled)){a.compiled(n);return}const l=this._createMaskCanvas(t),d=l.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(d,l.offsetX,l.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(t,i,n=0,a=0,l,d){if(!this.contentVisible)return;t=this.getObject(t.data,t);const c=this.ctx;c.save();const p=gn(c);c.transform(i,n,a,l,0,0);const h=this._createMaskCanvas(t);c.setTransform(1,0,0,1,h.offsetX-p[4],h.offsetY-p[5]);for(let u=0,m=d.length;u<m;u+=2){const f=$o.transform(p,[i,n,a,l,d[u],d[u+1]]),[x,y]=$o.applyTransform([0,0],f);c.drawImage(h.canvas,x,y)}c.restore(),this.compose()}paintImageMaskXObjectGroup(t){if(!this.contentVisible)return;const i=this.ctx,n=this.current.fillColor,a=this.current.patternFill;for(const l of t){const{data:d,width:c,height:p,transform:h}=l,u=this.cachedCanvases.getCanvas("maskCanvas",c,p),m=u.context;m.save();const f=this.getObject(d,l);Rpe(m,f),m.globalCompositeOperation="source-in",m.fillStyle=a?n.getPattern(m,this,Fu(i),ml.FILL):n,m.fillRect(0,0,c,p),m.restore(),i.save(),i.transform(...h),i.scale(1,-1),bC(i,u.canvas,0,0,c,p,0,-1,1,1),i.restore()}this.compose()}paintImageXObject(t){if(!this.contentVisible)return;const i=this.getObject(t);if(!i){zi("Dependent image isn't ready yet");return}this.paintInlineImageXObject(i)}paintImageXObjectRepeat(t,i,n,a){if(!this.contentVisible)return;const l=this.getObject(t);if(!l){zi("Dependent image isn't ready yet");return}const d=l.width,c=l.height,p=[];for(let h=0,u=a.length;h<u;h+=2)p.push({transform:[i,0,0,n,a[h],a[h+1]],x:0,y:0,w:d,h:c});this.paintInlineImageXObjectGroup(l,p)}applyTransferMapsToCanvas(t){return this.current.transferMaps!=="none"&&(t.filter=this.current.transferMaps,t.drawImage(t.canvas,0,0),t.filter="none"),t.canvas}applyTransferMapsToBitmap(t){if(this.current.transferMaps==="none")return t.bitmap;const{bitmap:i,width:n,height:a}=t,l=this.cachedCanvases.getCanvas("inlineImage",n,a),d=l.context;return d.filter=this.current.transferMaps,d.drawImage(i,0,0),d.filter="none",l.canvas}paintInlineImageXObject(t){if(!this.contentVisible)return;const i=t.width,n=t.height,a=this.ctx;if(this.save(),!Us){const{filter:c}=a;c!=="none"&&c!==""&&(a.filter="none")}a.scale(1/i,-1/n);let l;if(t.bitmap)l=this.applyTransferMapsToBitmap(t);else if(typeof HTMLElement=="function"&&t instanceof HTMLElement||!t.data)l=t;else{const p=this.cachedCanvases.getCanvas("inlineImage",i,n).context;zpe(p,t),l=this.applyTransferMapsToCanvas(p)}const d=this._scaleImage(l,Fu(a));a.imageSmoothingEnabled=Fpe(gn(a),t.interpolate),bC(a,d.img,0,0,d.paintWidth,d.paintHeight,0,-n,i,n),this.compose(),this.restore()}paintInlineImageXObjectGroup(t,i){if(!this.contentVisible)return;const n=this.ctx;let a;if(t.bitmap)a=t.bitmap;else{const l=t.width,d=t.height,p=this.cachedCanvases.getCanvas("inlineImage",l,d).context;zpe(p,t),a=this.applyTransferMapsToCanvas(p)}for(const l of i)n.save(),n.transform(...l.transform),n.scale(1,-1),bC(n,a,l.x,l.y,l.w,l.h,0,-1,1,1),n.restore();this.compose()}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(t){}markPointProps(t,i){}beginMarkedContent(t){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(t,i){t==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(i)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(t){const i=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(t);const n=this.ctx;this.pendingClip&&(i||(this.pendingClip===Ope?n.clip("evenodd"):n.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),n.beginPath()}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const t=gn(this.ctx);if(t[1]===0&&t[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(t[0]),Math.abs(t[3]));else{const i=Math.abs(t[0]*t[3]-t[2]*t[1]),n=Math.hypot(t[0],t[2]),a=Math.hypot(t[1],t[3]);this._cachedGetSinglePixelWidth=Math.max(n,a)/i}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth:t}=this.current,{a:i,b:n,c:a,d:l}=this.ctx.getTransform();let d,c;if(n===0&&a===0){const p=Math.abs(i),h=Math.abs(l);if(p===h)if(t===0)d=c=1/p;else{const u=p*t;d=c=u<1?1/u:1}else if(t===0)d=1/p,c=1/h;else{const u=p*t,m=h*t;d=u<1?1/u:1,c=m<1?1/m:1}}else{const p=Math.abs(i*l-n*a),h=Math.hypot(i,n),u=Math.hypot(a,l);if(t===0)d=u/p,c=h/p;else{const m=t*p;d=u>m?u/m:1,c=h>m?h/m:1}}this._cachedScaleForStroking[0]=d,this._cachedScaleForStroking[1]=c}return this._cachedScaleForStroking}rescaleAndStroke(t){const{ctx:i}=this,{lineWidth:n}=this.current,[a,l]=this.getScaleForStroking();if(i.lineWidth=n||1,a===1&&l===1){i.stroke();return}const d=i.getLineDash();if(t&&i.save(),i.scale(a,l),d.length>0){const c=Math.max(a,l);i.setLineDash(d.map(p=>p/c)),i.lineDashOffset/=c}i.stroke(),t&&i.restore()}isContentVisible(){for(let t=this.markedContentStack.length-1;t>=0;t--)if(!this.markedContentStack[t].visible)return!1;return!0}}for(const e in v1)Y7.prototype[e]!==void 0&&(Y7.prototype[v1[e]]=Y7.prototype[e]);class vw{static#e=null;static#t="";static get workerPort(){return this.#e}static set workerPort(t){if(!(typeof Worker<"u"&&t instanceof Worker)&&t!==null)throw new Error("Invalid `workerPort` type.");this.#e=t}static get workerSrc(){return this.#t}static set workerSrc(t){if(typeof t!="string")throw new Error("Invalid `workerSrc` type.");this.#t=t}}const CC={DATA:1,ERROR:2},ta={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function $d(e){switch(e instanceof Error||typeof e=="object"&&e!==null||Dr('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new i4(e.message);case"MissingPDFException":return new o4(e.message);case"PasswordException":return new jU(e.message,e.code);case"UnexpectedResponseException":return new oI(e.message,e.status);case"UnknownErrorException":return new MU(e.message,e.details);default:return new MU(e.message,e.toString())}}class Gx{constructor(t,i,n){this.sourceName=t,this.targetName=i,this.comObj=n,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),this._onComObjOnMessage=a=>{const l=a.data;if(l.targetName!==this.sourceName)return;if(l.stream){this.#t(l);return}if(l.callback){const c=l.callbackId,p=this.callbackCapabilities[c];if(!p)throw new Error(`Cannot resolve callback ${c}`);if(delete this.callbackCapabilities[c],l.callback===CC.DATA)p.resolve(l.data);else if(l.callback===CC.ERROR)p.reject($d(l.reason));else throw new Error("Unexpected callback case");return}const d=this.actionHandler[l.action];if(!d)throw new Error(`Unknown action from worker: ${l.action}`);if(l.callbackId){const c=this.sourceName,p=l.sourceName;new Promise(function(h){h(d(l.data))}).then(function(h){n.postMessage({sourceName:c,targetName:p,callback:CC.DATA,callbackId:l.callbackId,data:h})},function(h){n.postMessage({sourceName:c,targetName:p,callback:CC.ERROR,callbackId:l.callbackId,reason:$d(h)})});return}if(l.streamId){this.#e(l);return}d(l.data)},n.addEventListener("message",this._onComObjOnMessage)}on(t,i){const n=this.actionHandler;if(n[t])throw new Error(`There is already an actionName called "${t}"`);n[t]=i}send(t,i,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:i},n)}sendWithPromise(t,i,n){const a=this.callbackId++,l=Promise.withResolvers();this.callbackCapabilities[a]=l;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:a,data:i},n)}catch(d){l.reject(d)}return l.promise}sendWithStream(t,i,n,a){const l=this.streamId++,d=this.sourceName,c=this.targetName,p=this.comObj;return new ReadableStream({start:h=>{const u=Promise.withResolvers();return this.streamControllers[l]={controller:h,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},p.postMessage({sourceName:d,targetName:c,action:t,streamId:l,data:i,desiredSize:h.desiredSize},a),u.promise},pull:h=>{const u=Promise.withResolvers();return this.streamControllers[l].pullCall=u,p.postMessage({sourceName:d,targetName:c,stream:ta.PULL,streamId:l,desiredSize:h.desiredSize}),u.promise},cancel:h=>{ka(h instanceof Error,"cancel must have a valid reason");const u=Promise.withResolvers();return this.streamControllers[l].cancelCall=u,this.streamControllers[l].isClosed=!0,p.postMessage({sourceName:d,targetName:c,stream:ta.CANCEL,streamId:l,reason:$d(h)}),u.promise}},n)}#e(t){const i=t.streamId,n=this.sourceName,a=t.sourceName,l=this.comObj,d=this,c=this.actionHandler[t.action],p={enqueue(h,u=1,m){if(this.isCancelled)return;const f=this.desiredSize;this.desiredSize-=u,f>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),l.postMessage({sourceName:n,targetName:a,stream:ta.ENQUEUE,streamId:i,chunk:h},m)},close(){this.isCancelled||(this.isCancelled=!0,l.postMessage({sourceName:n,targetName:a,stream:ta.CLOSE,streamId:i}),delete d.streamSinks[i])},error(h){ka(h instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,l.postMessage({sourceName:n,targetName:a,stream:ta.ERROR,streamId:i,reason:$d(h)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};p.sinkCapability.resolve(),p.ready=p.sinkCapability.promise,this.streamSinks[i]=p,new Promise(function(h){h(c(t.data,p))}).then(function(){l.postMessage({sourceName:n,targetName:a,stream:ta.START_COMPLETE,streamId:i,success:!0})},function(h){l.postMessage({sourceName:n,targetName:a,stream:ta.START_COMPLETE,streamId:i,reason:$d(h)})})}#t(t){const i=t.streamId,n=this.sourceName,a=t.sourceName,l=this.comObj,d=this.streamControllers[i],c=this.streamSinks[i];switch(t.stream){case ta.START_COMPLETE:t.success?d.startCall.resolve():d.startCall.reject($d(t.reason));break;case ta.PULL_COMPLETE:t.success?d.pullCall.resolve():d.pullCall.reject($d(t.reason));break;case ta.PULL:if(!c){l.postMessage({sourceName:n,targetName:a,stream:ta.PULL_COMPLETE,streamId:i,success:!0});break}c.desiredSize<=0&&t.desiredSize>0&&c.sinkCapability.resolve(),c.desiredSize=t.desiredSize,new Promise(function(p){p(c.onPull?.())}).then(function(){l.postMessage({sourceName:n,targetName:a,stream:ta.PULL_COMPLETE,streamId:i,success:!0})},function(p){l.postMessage({sourceName:n,targetName:a,stream:ta.PULL_COMPLETE,streamId:i,reason:$d(p)})});break;case ta.ENQUEUE:if(ka(d,"enqueue should have stream controller"),d.isClosed)break;d.controller.enqueue(t.chunk);break;case ta.CLOSE:if(ka(d,"close should have stream controller"),d.isClosed)break;d.isClosed=!0,d.controller.close(),this.#o(d,i);break;case ta.ERROR:ka(d,"error should have stream controller"),d.controller.error($d(t.reason)),this.#o(d,i);break;case ta.CANCEL_COMPLETE:t.success?d.cancelCall.resolve():d.cancelCall.reject($d(t.reason)),this.#o(d,i);break;case ta.CANCEL:if(!c)break;new Promise(function(p){p(c.onCancel?.($d(t.reason)))}).then(function(){l.postMessage({sourceName:n,targetName:a,stream:ta.CANCEL_COMPLETE,streamId:i,success:!0})},function(p){l.postMessage({sourceName:n,targetName:a,stream:ta.CANCEL_COMPLETE,streamId:i,reason:$d(p)})}),c.sinkCapability.reject($d(t.reason)),c.isCancelled=!0,delete this.streamSinks[i];break;default:throw new Error("Unexpected stream case")}}async#o(t,i){await Promise.allSettled([t.startCall?.promise,t.pullCall?.promise,t.cancelCall?.promise]),delete this.streamControllers[i]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}class Ikt{#e;#t;constructor({parsedData:t,rawData:i}){this.#e=t,this.#t=i}getRaw(){return this.#t}get(t){return this.#e.get(t)??null}getAll(){return qK(this.#e)}has(t){return this.#e.has(t)}}const z0=Symbol("INTERNAL");class jkt{#e=!1;#t=!1;#o=!1;#r=!0;constructor(t,{name:i,intent:n,usage:a}){this.#e=!!(t&cc.DISPLAY),this.#t=!!(t&cc.PRINT),this.name=i,this.intent=n,this.usage=a}get visible(){if(this.#o)return this.#r;if(!this.#r)return!1;const{print:t,view:i}=this.usage;return this.#e?i?.viewState!=="OFF":this.#t?t?.printState!=="OFF":!0}_setVisible(t,i,n=!1){t!==z0&&Dr("Internal method `_setVisible` called."),this.#o=n,this.#r=i}}class Mkt{#e=null;#t=new Map;#o=null;#r=null;constructor(t,i=cc.DISPLAY){if(this.renderingIntent=i,this.name=null,this.creator=null,t!==null){this.name=t.name,this.creator=t.creator,this.#r=t.order;for(const n of t.groups)this.#t.set(n.id,new jkt(i,n));if(t.baseState==="OFF")for(const n of this.#t.values())n._setVisible(z0,!1);for(const n of t.on)this.#t.get(n)._setVisible(z0,!0);for(const n of t.off)this.#t.get(n)._setVisible(z0,!1);this.#o=this.getHash()}}#s(t){const i=t.length;if(i<2)return!0;const n=t[0];for(let a=1;a<i;a++){const l=t[a];let d;if(Array.isArray(l))d=this.#s(l);else if(this.#t.has(l))d=this.#t.get(l).visible;else return zi(`Optional content group not found: ${l}`),!0;switch(n){case"And":if(!d)return!1;break;case"Or":if(d)return!0;break;case"Not":return!d;default:return!0}}return n==="And"}isVisible(t){if(this.#t.size===0)return!0;if(!t)return tI("Optional content group not defined."),!0;if(t.type==="OCG")return this.#t.has(t.id)?this.#t.get(t.id).visible:(zi(`Optional content group not found: ${t.id}`),!0);if(t.type==="OCMD"){if(t.expression)return this.#s(t.expression);if(!t.policy||t.policy==="AnyOn"){for(const i of t.ids){if(!this.#t.has(i))return zi(`Optional content group not found: ${i}`),!0;if(this.#t.get(i).visible)return!0}return!1}else if(t.policy==="AllOn"){for(const i of t.ids){if(!this.#t.has(i))return zi(`Optional content group not found: ${i}`),!0;if(!this.#t.get(i).visible)return!1}return!0}else if(t.policy==="AnyOff"){for(const i of t.ids){if(!this.#t.has(i))return zi(`Optional content group not found: ${i}`),!0;if(!this.#t.get(i).visible)return!0}return!1}else if(t.policy==="AllOff"){for(const i of t.ids){if(!this.#t.has(i))return zi(`Optional content group not found: ${i}`),!0;if(this.#t.get(i).visible)return!1}return!0}return zi(`Unknown optional content policy ${t.policy}.`),!0}return zi(`Unknown group type ${t.type}.`),!0}setVisibility(t,i=!0){const n=this.#t.get(t);if(!n){zi(`Optional content group not found: ${t}`);return}n._setVisible(z0,!!i,!0),this.#e=null}setOCGState({state:t,preserveRB:i}){let n;for(const a of t){switch(a){case"ON":case"OFF":case"Toggle":n=a;continue}const l=this.#t.get(a);if(l)switch(n){case"ON":l._setVisible(z0,!0);break;case"OFF":l._setVisible(z0,!1);break;case"Toggle":l._setVisible(z0,!l.visible);break}}this.#e=null}get hasInitialVisibility(){return this.#o===null||this.getHash()===this.#o}getOrder(){return this.#t.size?this.#r?this.#r.slice():[...this.#t.keys()]:null}getGroups(){return this.#t.size>0?qK(this.#t):null}getGroup(t){return this.#t.get(t)||null}getHash(){if(this.#e!==null)return this.#e;const t=new uMe;for(const[i,n]of this.#t)t.update(`${i}:${n.visible}`);return this.#e=t.hexdigest()}}class Bkt{constructor(t,{disableRange:i=!1,disableStream:n=!1}){ka(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length:a,initialData:l,progressiveDone:d,contentDispositionFilename:c}=t;if(this._queuedChunks=[],this._progressiveDone=d,this._contentDispositionFilename=c,l?.length>0){const p=l instanceof Uint8Array&&l.byteLength===l.buffer.byteLength?l.buffer:new Uint8Array(l).buffer;this._queuedChunks.push(p)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!n,this._isRangeSupported=!i,this._contentLength=a,this._fullRequestReader=null,this._rangeReaders=[],t.addRangeListener((p,h)=>{this._onReceiveData({begin:p,chunk:h})}),t.addProgressListener((p,h)=>{this._onProgress({loaded:p,total:h})}),t.addProgressiveReadListener(p=>{this._onReceiveData({chunk:p})}),t.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),t.transportReady()}_onReceiveData({begin:t,chunk:i}){const n=i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i.buffer:new Uint8Array(i).buffer;if(t===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n);else{const a=this._rangeReaders.some(function(l){return l._begin!==t?!1:(l._enqueue(n),!0)});ka(a,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(t){t.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:t.loaded}):this._fullRequestReader?.onProgress?.({loaded:t.loaded,total:t.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const i=this._rangeReaders.indexOf(t);i>=0&&this._rangeReaders.splice(i,1)}getFullReader(){ka(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new Dkt(this,t,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const n=new Tkt(this,t,i);return this._pdfDataRangeTransport.requestDataRange(t,i),this._rangeReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeReaders.slice(0))i.cancel(t);this._pdfDataRangeTransport.abort()}}class Dkt{constructor(t,i,n=!1,a=null){this._stream=t,this._done=n||!1,this._filename=tq(a)?a:null,this._queuedChunks=i||[],this._loaded=0;for(const l of this._queuedChunks)this._loaded+=l.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.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 t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class Tkt{constructor(t,i,n){this._stream=t,this._begin=i,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){if(!this._done){if(this._requests.length===0)this._queuedChunk=t;else{this._requests.shift().resolve({value:t,done:!1});for(const n of this._requests)n.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 i=this._queuedChunk;return this._queuedChunk=null,{value:i,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function Pkt(e){let t=!0,i=n("filename\\*","i").exec(e);if(i){i=i[1];let u=c(i);return u=unescape(u),u=p(u),u=h(u),l(u)}if(i=d(e),i){const u=h(i);return l(u)}if(i=n("filename","i").exec(e),i){i=i[1];let u=c(i);return u=h(u),l(u)}function n(u,m){return new RegExp("(?:^|;)\\s*"+u+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',m)}function a(u,m){if(u){if(!/^[\x00-\xFF]+$/.test(m))return m;try{const f=new TextDecoder(u,{fatal:!0}),x=iI(m);m=f.decode(x),t=!1}catch{}}return m}function l(u){return t&&/[\x80-\xff]/.test(u)&&(u=a("utf-8",u),t&&(u=a("iso-8859-1",u))),u}function d(u){const m=[];let f;const x=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(f=x.exec(u))!==null;){let[,w,b,C]=f;if(w=parseInt(w,10),w in m){if(w===0)break;continue}m[w]=[b,C]}const y=[];for(let w=0;w<m.length&&w in m;++w){let[b,C]=m[w];C=c(C),b&&(C=unescape(C),w===0&&(C=p(C))),y.push(C)}return y.join("")}function c(u){if(u.startsWith('"')){const m=u.slice(1).split('\\"');for(let f=0;f<m.length;++f){const x=m[f].indexOf('"');x!==-1&&(m[f]=m[f].slice(0,x),m.length=f+1),m[f]=m[f].replaceAll(/\\(.)/g,"$1")}u=m.join('"')}return u}function p(u){const m=u.indexOf("'");if(m===-1)return u;const f=u.slice(0,m),y=u.slice(m+1).replace(/^[^']*'/,"");return a(f,y)}function h(u){return!u.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(u)?u:u.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(m,f,x,y){if(x==="q"||x==="Q")return y=y.replaceAll("_"," "),y=y.replaceAll(/=([0-9a-fA-F]{2})/g,function(w,b){return String.fromCharCode(parseInt(b,16))}),a(f,y);try{y=atob(y)}catch{}return a(f,y)})}return""}function lq({getResponseHeader:e,isHttp:t,rangeChunkSize:i,disableRange:n}){const a={allowRangeRequests:!1,suggestedLength:void 0},l=parseInt(e("Content-Length"),10);return!Number.isInteger(l)||(a.suggestedLength=l,l<=2*i)||n||!t||e("Accept-Ranges")!=="bytes"||(e("Content-Encoding")||"identity")!=="identity"||(a.allowRangeRequests=!0),a}function dq(e){const t=e("Content-Disposition");if(t){let i=Pkt(t);if(i.includes("%"))try{i=decodeURIComponent(i)}catch{}if(tq(i))return i}return null}function dI(e,t){return e===404||e===0&&t.startsWith("file:")?new o4('Missing PDF "'+t+'".'):new oI(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)}function fMe(e){return e===200||e===206}function xMe(e,t,i){return{method:"GET",headers:e,signal:i.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function yMe(e){const t=new Headers;for(const i in e){const n=e[i];n!==void 0&&t.append(i,n)}return t}function wMe(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:(zi(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}class Npe{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return ka(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new zkt(this),this._fullRequestReader}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const n=new Rkt(this,t,i);return this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class zkt{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const i=t.source;this._withCredentials=i.withCredentials||!1,this._contentLength=i.length,this._headersCapability=Promise.withResolvers(),this._disableRange=i.disableRange||!1,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!i.disableStream,this._isRangeSupported=!i.disableRange,this._headers=yMe(this._stream.httpHeaders);const n=i.url;fetch(n,xMe(this._headers,this._withCredentials,this._abortController)).then(a=>{if(!fMe(a.status))throw dI(a.status,n);this._reader=a.body.getReader(),this._headersCapability.resolve();const l=p=>a.headers.get(p),{allowRangeRequests:d,suggestedLength:c}=lq({getResponseHeader:l,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=d,this._contentLength=c||this._contentLength,this._filename=dq(l),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new i4("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(){await this._headersCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:wMe(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}class Rkt{constructor(t,i,n){this._stream=t,this._reader=null,this._loaded=0;const a=t.source;this._withCredentials=a.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!a.disableStream,this._abortController=new AbortController,this._headers=yMe(this._stream.httpHeaders),this._headers.append("Range",`bytes=${i}-${n-1}`);const l=a.url;fetch(l,xMe(this._headers,this._withCredentials,this._abortController)).then(d=>{if(!fMe(d.status))throw dI(d.status,l);this._readCapability.resolve(),this._reader=d.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:i}=await this._reader.read();return i?{value:t,done:i}:(this._loaded+=t.byteLength,this.onProgress?.({loaded:this._loaded}),{value:wMe(t),done:!1})}cancel(t){this._reader?.cancel(t),this._abortController.abort()}}const vO=200,CO=206;function Fkt(e){const t=e.response;return typeof t!="string"?t:iI(t).buffer}class Okt{constructor(t,i={}){this.url=t,this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&i.httpHeaders||Object.create(null),this.withCredentials=i.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,i,n){const a={begin:t,end:i};for(const l in n)a[l]=n[l];return this.request(a)}requestFull(t){return this.request(t)}request(t){const i=new XMLHttpRequest,n=this.currXhrId++,a=this.pendingRequests[n]={xhr:i};i.open("GET",this.url),i.withCredentials=this.withCredentials;for(const l in this.httpHeaders){const d=this.httpHeaders[l];d!==void 0&&i.setRequestHeader(l,d)}return this.isHttp&&"begin"in t&&"end"in t?(i.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),a.expectedStatus=CO):a.expectedStatus=vO,i.responseType="arraybuffer",t.onError&&(i.onerror=function(l){t.onError(i.status)}),i.onreadystatechange=this.onStateChange.bind(this,n),i.onprogress=this.onProgress.bind(this,n),a.onHeadersReceived=t.onHeadersReceived,a.onDone=t.onDone,a.onError=t.onError,a.onProgress=t.onProgress,i.send(null),n}onProgress(t,i){const n=this.pendingRequests[t];n&&n.onProgress?.(i)}onStateChange(t,i){const n=this.pendingRequests[t];if(!n)return;const a=n.xhr;if(a.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),a.readyState!==4||!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],a.status===0&&this.isHttp){n.onError?.(a.status);return}const l=a.status||vO;if(!(l===vO&&n.expectedStatus===CO)&&l!==n.expectedStatus){n.onError?.(a.status);return}const c=Fkt(a);if(l===CO){const p=a.getResponseHeader("Content-Range"),h=/bytes (\d+)-(\d+)\/(\d+)/.exec(p);n.onDone({begin:parseInt(h[1],10),chunk:c})}else c?n.onDone({begin:0,chunk:c}):n.onError?.(a.status)}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortRequest(t){const i=this.pendingRequests[t].xhr;delete this.pendingRequests[t],i.abort()}}class Nkt{constructor(t){this._source=t,this._manager=new Okt(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const i=this._rangeRequestReaders.indexOf(t);i>=0&&this._rangeRequestReaders.splice(i,1)}getFullReader(){return ka(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new Hkt(this._manager,this._source),this._fullRequestReader}getRangeReader(t,i){const n=new _kt(this._manager,t,i);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class Hkt{constructor(t,i){this._manager=t;const n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=i.url,this._fullRequestId=t.requestFull(n),this._headersReceivedCapability=Promise.withResolvers(),this._disableRange=i.disableRange||!1,this._contentLength=i.length,this._rangeChunkSize=i.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 t=this._fullRequestId,i=this._manager.getRequestXhr(t),n=d=>i.getResponseHeader(d),{allowRangeRequests:a,suggestedLength:l}=lq({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});a&&(this._isRangeSupported=!0),this._contentLength=l||this._contentLength,this._filename=dq(n),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){if(t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(t){this._storedError=dI(t,this._url),this._headersReceivedCapability.reject(this._storedError);for(const i of this._requests)i.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(t){this.onProgress?.({loaded:t.loaded,total:t.lengthComputable?t.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._headersReceivedCapability.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 t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersReceivedCapability.reject(t);for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class _kt{constructor(t,i,n){this._manager=t;const a={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._requestId=t.requestRange(i,n,a),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(t){const i=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:i,done:!1}):this._queuedChunk=i,this._done=!0;for(const n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(t){this._storedError=dI(t,this._url);for(const i of this._requests)i.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(t){this.isStreamingSupported||this.onProgress?.({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const i=this._queuedChunk;return this._queuedChunk=null,{value:i,done:!1}}if(this._done)return{value:void 0,done:!0};const t=Promise.withResolvers();return this._requests.push(t),t.promise}cancel(t){this._done=!0;for(const i of this._requests)i.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const bMe=/^file:\/\/\/[a-zA-Z]:\//;function Vkt(e){const t=Jh.get("url"),i=t.parse(e);return i.protocol==="file:"||i.host?i:/^[a-z]:[/\\]/i.test(e)?t.parse(`file:///${e}`):(i.host||(i.protocol="file:"),i)}class Qkt{constructor(t){this.source=t,this.url=Vkt(t.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return ka(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new Gkt(this):new Ukt(this),this._fullRequestReader}getRangeReader(t,i){if(i<=this._progressiveDataLength)return null;const n=this.isFsUrl?new Ykt(this,t,i):new Wkt(this,t,i);return this._rangeRequestReaders.push(n),n}cancelAllRequests(t){this._fullRequestReader?.cancel(t);for(const i of this._rangeRequestReaders.slice(0))i.cancel(t)}}class vMe{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const i=t.source;this._contentLength=i.length,this._loaded=0,this._filename=null,this._disableRange=i.disableRange||!1,this._rangeChunkSize=i.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!i.disableStream,this._isRangeSupported=!i.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(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",i=>{this._error(i)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new i4("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class CMe{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const i=t.source;this._isStreamingSupported=!i.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return t===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=t.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){if(!this._readableStream){this._error(t);return}this._readableStream.destroy(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",i=>{this._error(i)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function SS(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class Ukt extends vMe{constructor(t){super(t);const i=n=>{if(n.statusCode===404){const c=new o4(`Missing PDF "${this._url}".`);this._storedError=c,this._headersCapability.reject(c);return}this._headersCapability.resolve(),this._setReadableStream(n);const a=c=>this._readableStream.headers[c.toLowerCase()],{allowRangeRequests:l,suggestedLength:d}=lq({getResponseHeader:a,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=l,this._contentLength=d||this._contentLength,this._filename=dq(a)};if(this._request=null,this._url.protocol==="http:"){const n=Jh.get("http");this._request=n.request(SS(this._url,t.httpHeaders),i)}else{const n=Jh.get("https");this._request=n.request(SS(this._url,t.httpHeaders),i)}this._request.on("error",n=>{this._storedError=n,this._headersCapability.reject(n)}),this._request.end()}}class Wkt extends CMe{constructor(t,i,n){super(t),this._httpHeaders={};for(const l in t.httpHeaders){const d=t.httpHeaders[l];d!==void 0&&(this._httpHeaders[l]=d)}this._httpHeaders.Range=`bytes=${i}-${n-1}`;const a=l=>{if(l.statusCode===404){const d=new o4(`Missing PDF "${this._url}".`);this._storedError=d;return}this._setReadableStream(l)};if(this._request=null,this._url.protocol==="http:"){const l=Jh.get("http");this._request=l.request(SS(this._url,this._httpHeaders),a)}else{const l=Jh.get("https");this._request=l.request(SS(this._url,this._httpHeaders),a)}this._request.on("error",l=>{this._storedError=l}),this._request.end()}}class Gkt extends vMe{constructor(t){super(t);let i=decodeURIComponent(this._url.path);bMe.test(this._url.href)&&(i=i.replace(/^\//,""));const n=Jh.get("fs");n.promises.lstat(i).then(a=>{this._contentLength=a.size,this._setReadableStream(n.createReadStream(i)),this._headersCapability.resolve()},a=>{a.code==="ENOENT"&&(a=new o4(`Missing PDF "${i}".`)),this._storedError=a,this._headersCapability.reject(a)})}}class Ykt extends CMe{constructor(t,i,n){super(t);let a=decodeURIComponent(this._url.path);bMe.test(this._url.href)&&(a=a.replace(/^\//,""));const l=Jh.get("fs");this._setReadableStream(l.createReadStream(a,{start:i,end:n-1}))}}const Kkt=1e5,Bl=30,qkt=.8;let ES=class rh{#e=Promise.withResolvers();#t=null;#o=!1;#r=!!globalThis.FontInspector?.enabled;#s=null;#i=null;#n=0;#l=0;#c=null;#p=null;#u=0;#d=0;#a=Object.create(null);#m=[];#f=null;#h=[];#y=new WeakMap;#g=null;static#w=new Map;static#v=new Map;static#A=null;static#k=new Set;constructor({textContentSource:t,container:i,viewport:n}){if(t instanceof ReadableStream)this.#f=t;else if(typeof t=="object")this.#f=new ReadableStream({start(p){p.enqueue(t),p.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#t=this.#p=i,this.#d=n.scale*(globalThis.devicePixelRatio||1),this.#u=n.rotation,this.#i={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:null};const{pageWidth:a,pageHeight:l,pageX:d,pageY:c}=n.rawDims;this.#g=[1,0,0,-1,-d,c+l],this.#l=a,this.#n=l,rh.#x(),Pf(i,n),this.#e.promise.catch(()=>{}).then(()=>{rh.#k.delete(this),this.#i=null,this.#a=null})}render(){const t=()=>{this.#c.read().then(({value:i,done:n})=>{if(n){this.#e.resolve();return}this.#s??=i.lang,Object.assign(this.#a,i.styles),this.#S(i.items),t()},this.#e.reject)};return this.#c=this.#f.getReader(),rh.#k.add(this),t(),this.#e.promise}update({viewport:t,onBefore:i=null}){const n=t.scale*(globalThis.devicePixelRatio||1),a=t.rotation;if(a!==this.#u&&(i?.(),this.#u=a,Pf(this.#p,{rotation:a})),n!==this.#d){i?.(),this.#d=n;const l={prevFontSize:null,prevFontFamily:null,div:null,properties:null,ctx:rh.#b(this.#s)};for(const d of this.#h)l.properties=this.#y.get(d),l.div=d,this.#$(l)}}cancel(){const t=new i4("TextLayer task cancelled.");this.#c?.cancel(t).catch(()=>{}),this.#c=null,this.#e.reject(t)}get textDivs(){return this.#h}get textContentItemsStr(){return this.#m}#S(t){if(this.#o)return;this.#i.ctx??=rh.#b(this.#s);const i=this.#h,n=this.#m;for(const a of t){if(i.length>Kkt){zi("Ignoring additional textDivs for performance reasons."),this.#o=!0;return}if(a.str===void 0){if(a.type==="beginMarkedContentProps"||a.type==="beginMarkedContent"){const l=this.#t;this.#t=document.createElement("span"),this.#t.classList.add("markedContent"),a.id!==null&&this.#t.setAttribute("id",`${a.id}`),l.append(this.#t)}else a.type==="endMarkedContent"&&(this.#t=this.#t.parentNode);continue}n.push(a.str),this.#j(a)}}#j(t){const i=document.createElement("span"),n={angle:0,canvasWidth:0,hasText:t.str!=="",hasEOL:t.hasEOL,fontSize:0};this.#h.push(i);const a=$o.transform(this.#g,t.transform);let l=Math.atan2(a[1],a[0]);const d=this.#a[t.fontName];d.vertical&&(l+=Math.PI/2);const c=this.#r&&d.fontSubstitution||d.fontFamily,p=Math.hypot(a[2],a[3]),h=p*rh.#C(c,this.#s);let u,m;l===0?(u=a[4],m=a[5]-h):(u=a[4]+h*Math.sin(l),m=a[5]-h*Math.cos(l));const f="calc(var(--scale-factor)*",x=i.style;this.#t===this.#p?(x.left=`${(100*u/this.#l).toFixed(2)}%`,x.top=`${(100*m/this.#n).toFixed(2)}%`):(x.left=`${f}${u.toFixed(2)}px)`,x.top=`${f}${m.toFixed(2)}px)`),x.fontSize=`${f}${(rh.#A*p).toFixed(2)}px)`,x.fontFamily=c,n.fontSize=p,i.setAttribute("role","presentation"),i.textContent=t.str,i.dir=t.dir,this.#r&&(i.dataset.fontName=d.fontSubstitutionLoadedName||t.fontName),l!==0&&(n.angle=l*(180/Math.PI));let y=!1;if(t.str.length>1)y=!0;else if(t.str!==" "&&t.transform[0]!==t.transform[3]){const w=Math.abs(t.transform[0]),b=Math.abs(t.transform[3]);w!==b&&Math.max(w,b)/Math.min(w,b)>1.5&&(y=!0)}if(y&&(n.canvasWidth=d.vertical?t.height:t.width),this.#y.set(i,n),this.#i.div=i,this.#i.properties=n,this.#$(this.#i),n.hasText&&this.#t.append(i),n.hasEOL){const w=document.createElement("br");w.setAttribute("role","presentation"),this.#t.append(w)}}#$(t){const{div:i,properties:n,ctx:a,prevFontSize:l,prevFontFamily:d}=t,{style:c}=i;let p="";if(rh.#A>1&&(p=`scale(${1/rh.#A})`),n.canvasWidth!==0&&n.hasText){const{fontFamily:h}=c,{canvasWidth:u,fontSize:m}=n;(l!==m||d!==h)&&(a.font=`${m*this.#d}px ${h}`,t.prevFontSize=m,t.prevFontFamily=h);const{width:f}=a.measureText(i.textContent);f>0&&(p=`scaleX(${u*this.#d/f}) ${p}`)}n.angle!==0&&(p=`rotate(${n.angle}deg) ${p}`),p.length>0&&(c.transform=p)}static cleanup(){if(!(this.#k.size>0)){this.#w.clear();for(const{canvas:t}of this.#v.values())t.remove();this.#v.clear()}}static#b(t=null){let i=this.#v.get(t||="");if(!i){const n=document.createElement("canvas");n.className="hiddenCanvasElement",n.lang=t,document.body.append(n),i=n.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#v.set(t,i)}return i}static#x(){if(this.#A!==null)return;const t=document.createElement("div");t.style.opacity=0,t.style.lineHeight=1,t.style.fontSize="1px",t.textContent="X",document.body.append(t),this.#A=t.getBoundingClientRect().height,t.remove()}static#C(t,i){const n=this.#w.get(t);if(n)return n;const a=this.#b(i),l=a.font;a.canvas.width=a.canvas.height=Bl,a.font=`${Bl}px ${t}`;const d=a.measureText("");let c=d.fontBoundingBoxAscent,p=Math.abs(d.fontBoundingBoxDescent);if(c){const m=c/(c+p);return this.#w.set(t,m),a.canvas.width=a.canvas.height=0,a.font=l,m}a.strokeStyle="red",a.clearRect(0,0,Bl,Bl),a.strokeText("g",0,0);let h=a.getImageData(0,0,Bl,Bl).data;p=0;for(let m=h.length-1-3;m>=0;m-=4)if(h[m]>0){p=Math.ceil(m/4/Bl);break}a.clearRect(0,0,Bl,Bl),a.strokeText("A",0,Bl),h=a.getImageData(0,0,Bl,Bl).data,c=0;for(let m=0,f=h.length;m<f;m+=4)if(h[m]>0){c=Bl-Math.floor(m/4/Bl);break}a.canvas.width=a.canvas.height=0,a.font=l;const u=c?c/(c+p):qkt;return this.#w.set(t,u),u}};function Zkt(){pMe("`renderTextLayer`, please use `TextLayer` instead.");const{textContentSource:e,container:t,viewport:i,...n}=arguments[0],a=Object.keys(n);a.length>0&&zi("Ignoring `renderTextLayer` parameters: "+a.join(", "));const l=new ES({textContentSource:e,container:t,viewport:i}),{textDivs:d,textContentItemsStr:c}=l;return{promise:l.render(),textDivs:d,textContentItemsStr:c}}function Jkt(){pMe("`updateTextLayer`, please use `TextLayer` instead.")}class Cw{static textContent(t){const i=[],n={items:i,styles:Object.create(null)};function a(l){if(!l)return;let d=null;const c=l.name;if(c==="#text")d=l.value;else if(Cw.shouldBuildText(c))l?.attributes?.textContent?d=l.attributes.textContent:l.value&&(d=l.value);else return;if(d!==null&&i.push({str:d}),!!l.children)for(const p of l.children)a(p)}return a(t),n}static shouldBuildText(t){return!(t==="textarea"||t==="input"||t==="option"||t==="select")}}const Xkt=65536,eSt=100,tSt=5e3,oSt=Us?ukt:ekt,iSt=Us?mkt:dMe,rSt=Us?hkt:X$t,nSt=Us?gkt:cMe;function aSt(e={}){typeof e=="string"||e instanceof URL?e={url:e}:(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});const t=new cq,{docId:i}=t,n=e.url?sSt(e.url):null,a=e.data?lSt(e.data):null,l=e.httpHeaders||null,d=e.withCredentials===!0,c=e.password??null,p=e.range instanceof AMe?e.range:null,h=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:Xkt;let u=e.worker instanceof mc?e.worker:null;const m=e.verbosity,f=typeof e.docBaseUrl=="string"&&!eq(e.docBaseUrl)?e.docBaseUrl:null,x=typeof e.cMapUrl=="string"?e.cMapUrl:null,y=e.cMapPacked!==!1,w=e.CMapReaderFactory||iSt,b=typeof e.standardFontDataUrl=="string"?e.standardFontDataUrl:null,C=e.StandardFontDataFactory||nSt,k=e.stopAtErrors!==!0,L=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,S=e.isEvalSupported!==!1,j=typeof e.isOffscreenCanvasSupported=="boolean"?e.isOffscreenCanvasSupported:!Us,I=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,P=typeof e.disableFontFace=="boolean"?e.disableFontFace:Us,B=e.fontExtraProperties===!0,T=e.enableXfa===!0,D=e.ownerDocument||globalThis.document,R=e.disableRange===!0,G=e.disableStream===!0,q=e.disableAutoFetch===!0,Z=e.pdfBug===!0,H=e.enableHWA===!0,V=p?p.length:e.length??NaN,N=typeof e.useSystemFonts=="boolean"?e.useSystemFonts:!Us&&!P,O=typeof e.useWorkerFetch=="boolean"?e.useWorkerFetch:w===dMe&&C===cMe&&x&&b&&Wx(x,document.baseURI)&&Wx(b,document.baseURI),z=e.canvasFactory||new oSt({ownerDocument:D,enableHWA:H}),F=e.filterFactory||new rSt({docId:i,ownerDocument:D}),te=null;_$t(m);const Y={canvasFactory:z,filterFactory:F};if(O||(Y.cMapReaderFactory=new w({baseUrl:x,isCompressed:y}),Y.standardFontDataFactory=new C({baseUrl:b})),!u){const J={verbosity:m,port:vw.workerPort};u=J.port?mc.fromPort(J):new mc(J),t._worker=u}const W={docId:i,apiVersion:"4.4.168",data:a,password:c,disableAutoFetch:q,rangeChunkSize:h,length:V,docBaseUrl:f,enableXfa:T,evaluatorOptions:{maxImageSize:L,disableFontFace:P,ignoreErrors:k,isEvalSupported:S,isOffscreenCanvasSupported:j,canvasMaxAreaInBytes:I,fontExtraProperties:B,useSystemFonts:N,cMapUrl:O?x:null,standardFontDataUrl:O?b:null}},ee={disableFontFace:P,fontExtraProperties:B,ownerDocument:D,pdfBug:Z,styleElement:te,loadingParams:{disableAutoFetch:q,enableXfa:T}};return u.promise.then(function(){if(t.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const J=u.messageHandler.sendWithPromise("GetDocRequest",W,a?[a.buffer]:null);let ne;if(p)ne=new Bkt(p,{disableRange:R,disableStream:G});else if(!a){if(!n)throw new Error("getDocument - no `url` parameter provided.");ne=(me=>Us?function(){return typeof fetch<"u"&&typeof Response<"u"&&"body"in Response.prototype}()&&Wx(me.url)?new Npe(me):new Qkt(me):Wx(me.url)?new Npe(me):new Nkt(me))({url:n,length:V,httpHeaders:l,withCredentials:d,rangeChunkSize:h,disableRange:R,disableStream:G})}return J.then(ye=>{if(t.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");const me=new Gx(i,ye,u.port),he=new hSt(me,t,ne,ee,Y);t._transport=he,me.send("Ready",null)})}).catch(t._capability.reject),t}function sSt(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(Us&&typeof e=="string")return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function lSt(e){if(Us&&typeof jk<"u"&&e instanceof jk)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if(typeof e=="string")return iI(e);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof e=="object"&&!isNaN(e?.length))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function Hpe(e){return typeof e=="object"&&Number.isInteger(e?.num)&&e.num>=0&&Number.isInteger(e?.gen)&&e.gen>=0}class cq{static#e=0;constructor(){this._capability=Promise.withResolvers(),this._transport=null,this._worker=null,this.docId=`d${cq.#e++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(t){throw this._worker?.port&&delete this._worker._pendingDestroy,t}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}let AMe=class{constructor(t,i,n=!1,a=null){this.length=t,this.initialData=i,this.progressiveDone=n,this.contentDispositionFilename=a,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=Promise.withResolvers()}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,i){for(const n of this._rangeListeners)n(t,i)}onDataProgress(t,i){this._readyCapability.promise.then(()=>{for(const n of this._progressListeners)n(t,i)})}onDataProgressiveRead(t){this._readyCapability.promise.then(()=>{for(const i of this._progressiveReadListeners)i(t)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const t of this._progressiveDoneListeners)t()})}transportReady(){this._readyCapability.resolve()}requestDataRange(t,i){Dr("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}};class dSt{constructor(t,i){this._pdfInfo=t,this._transport=i}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return ar(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}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:t="display"}={}){const{renderingIntent:i}=this._transport.getRenderingIntent(t);return this._transport.getOptionalContentConfig(i)}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(t=!1){return this._transport.startCleanup(t||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(t){return this._transport.cachedPageNumber(t)}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 cSt{#e=null;#t=!1;constructor(t,i,n,a=!1){this._pageIndex=t,this._pageInfo=i,this._transport=n,this._stats=a?new Epe:null,this._pdfBug=a,this.commonObjs=n.commonObjs,this.objs=new $Me,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:t,rotation:i=this.rotate,offsetX:n=0,offsetY:a=0,dontFlip:l=!1}={}){return new kb({viewBox:this.view,scale:t,rotation:i,offsetX:n,offsetY:a,dontFlip:l})}getAnnotations({intent:t="display"}={}){const{renderingIntent:i}=this._transport.getRenderingIntent(t);return this._transport.getAnnotations(this._pageIndex,i)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return ar(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:t,viewport:i,intent:n="display",annotationMode:a=Y0.ENABLE,transform:l=null,background:d=null,optionalContentConfigPromise:c=null,annotationCanvasMap:p=null,pageColors:h=null,printAnnotationStorage:u=null}){this._stats?.time("Overall");const m=this._transport.getRenderingIntent(n,a,u),{renderingIntent:f,cacheKey:x}=m;this.#t=!1,this.#r(),c||=this._transport.getOptionalContentConfig(f);let y=this._intentStates.get(x);y||(y=Object.create(null),this._intentStates.set(x,y)),y.streamReaderCancelTimeout&&(clearTimeout(y.streamReaderCancelTimeout),y.streamReaderCancelTimeout=null);const w=!!(f&cc.PRINT);y.displayReadyCapability||(y.displayReadyCapability=Promise.withResolvers(),y.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(m));const b=L=>{y.renderTasks.delete(C),(this._maybeCleanupAfterRender||w)&&(this.#t=!0),this.#o(!w),L?(C.capability.reject(L),this._abortOperatorList({intentState:y,reason:L instanceof Error?L:new Error(L)})):C.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},C=new M7({callback:b,params:{canvasContext:t,viewport:i,transform:l,background:d},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:p,operatorList:y.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!w,pdfBug:this._pdfBug,pageColors:h});(y.renderTasks||=new Set).add(C);const k=C.task;return Promise.all([y.displayReadyCapability.promise,c]).then(([L,S])=>{if(this.destroyed){b();return}if(this._stats?.time("Rendering"),!(S.renderingIntent&f))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");C.initializeGraphics({transparency:L,optionalContentConfig:S}),C.operatorListChanged()}).catch(b),k}getOperatorList({intent:t="display",annotationMode:i=Y0.ENABLE,printAnnotationStorage:n=null}={}){function a(){d.operatorList.lastChunk&&(d.opListReadCapability.resolve(d.operatorList),d.renderTasks.delete(c))}const l=this._transport.getRenderingIntent(t,i,n,!0);let d=this._intentStates.get(l.cacheKey);d||(d=Object.create(null),this._intentStates.set(l.cacheKey,d));let c;return d.opListReadCapability||(c=Object.create(null),c.operatorListChanged=a,d.opListReadCapability=Promise.withResolvers(),(d.renderTasks||=new Set).add(c),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(l)),d.opListReadCapability.promise}streamTextContent({includeMarkedContent:t=!1,disableNormalization:i=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:t===!0,disableNormalization:i===!0},{highWaterMark:100,size(a){return a.items.length}})}getTextContent(t={}){if(this._transport._htmlForXfa)return this.getXfa().then(n=>Cw.textContent(n));const i=this.streamTextContent(t);return new Promise(function(n,a){function l(){d.read().then(function({value:p,done:h}){if(h){n(c);return}c.lang??=p.lang,Object.assign(c.styles,p.styles),c.items.push(...p.items),l()},a)}const d=i.getReader(),c={items:[],styles:Object.create(null),lang:null};l()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const t=[];for(const i of this._intentStates.values())if(this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0}),!i.opListReadCapability)for(const n of i.renderTasks)t.push(n.completed),n.cancel();return this.objs.clear(),this.#t=!1,this.#r(),Promise.all(t)}cleanup(t=!1){this.#t=!0;const i=this.#o(!1);return t&&i&&(this._stats&&=new Epe),i}#o(t=!1){if(this.#r(),!this.#t||this.destroyed)return!1;if(t)return this.#e=setTimeout(()=>{this.#e=null,this.#o(!1)},tSt),!1;for(const{renderTasks:i,operatorList:n}of this._intentStates.values())if(i.size>0||!n.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#t=!1,!0}#r(){this.#e&&(clearTimeout(this.#e),this.#e=null)}_startRenderPage(t,i){const n=this._intentStates.get(i);n&&(this._stats?.timeEnd("Page Request"),n.displayReadyCapability?.resolve(t))}_renderPageChunk(t,i){for(let n=0,a=t.length;n<a;n++)i.operatorList.fnArray.push(t.fnArray[n]),i.operatorList.argsArray.push(t.argsArray[n]);i.operatorList.lastChunk=t.lastChunk,i.operatorList.separateAnnots=t.separateAnnots;for(const n of i.renderTasks)n.operatorListChanged();t.lastChunk&&this.#o(!0)}_pumpOperatorList({renderingIntent:t,cacheKey:i,annotationStorageSerializable:n}){const{map:a,transfer:l}=n,c=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:t,cacheKey:i,annotationStorage:a},l).getReader(),p=this._intentStates.get(i);p.streamReader=c;const h=()=>{c.read().then(({value:u,done:m})=>{if(m){p.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(u,p),h())},u=>{if(p.streamReader=null,!this._transport.destroyed){if(p.operatorList){p.operatorList.lastChunk=!0;for(const m of p.renderTasks)m.operatorListChanged();this.#o(!0)}if(p.displayReadyCapability)p.displayReadyCapability.reject(u);else if(p.opListReadCapability)p.opListReadCapability.reject(u);else throw u}})};h()}_abortOperatorList({intentState:t,reason:i,force:n=!1}){if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!n){if(t.renderTasks.size>0)return;if(i instanceof XK){let a=eSt;i.extraDelay>0&&i.extraDelay<1e3&&(a+=i.extraDelay),t.streamReaderCancelTimeout=setTimeout(()=>{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:i,force:!0})},a);return}}if(t.streamReader.cancel(new i4(i.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[a,l]of this._intentStates)if(l===t){this._intentStates.delete(a);break}this.cleanup()}}}get stats(){return this._stats}}class pSt{#e=new Set;#t=Promise.resolve();postMessage(t,i){const n={data:structuredClone(t,i?{transfer:i}:null)};this.#t.then(()=>{for(const a of this.#e)a.call(this,n)})}addEventListener(t,i){this.#e.add(i)}removeEventListener(t,i){this.#e.delete(i)}terminate(){this.#e.clear()}}const o2={isWorkerDisabled:!1,fakeWorkerId:0};Us&&(o2.isWorkerDisabled=!0,vw.workerSrc||="./pdf.worker.mjs"),o2.isSameOrigin=function(e,t){let i;try{if(i=new URL(e),!i.origin||i.origin==="null")return!1}catch{return!1}const n=new URL(t,i);return i.origin===n.origin},o2.createCDNWrapper=function(e){const t=`await import("${e}");`;return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};class mc{static#e;constructor({name:t=null,port:i=null,verbosity:n=V$t()}={}){if(this.name=t,this.destroyed=!1,this.verbosity=n,this._readyCapability=Promise.withResolvers(),this._port=null,this._webWorker=null,this._messageHandler=null,i){if(mc.#e?.has(i))throw new Error("Cannot use more than one PDFWorker per port.");(mc.#e||=new WeakMap).set(i,this),this._initializeFromPort(i);return}this._initialize()}get promise(){return Us?Promise.all([Jh.promise,this._readyCapability.promise]):this._readyCapability.promise}#t(){this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new Gx("main","worker",t),this._messageHandler.on("ready",function(){}),this.#t()}_initialize(){if(o2.isWorkerDisabled||mc.#o){this._setupFakeWorker();return}let{workerSrc:t}=mc;try{o2.isSameOrigin(window.location.href,t)||(t=o2.createCDNWrapper(new URL(t,window.location).href));const i=new Worker(t,{type:"module"}),n=new Gx("main","worker",i),a=()=>{l.abort(),n.destroy(),i.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},l=new AbortController;i.addEventListener("error",()=>{this._webWorker||a()},{signal:l.signal}),n.on("test",c=>{if(l.abort(),this.destroyed||!c){a();return}this._messageHandler=n,this._port=i,this._webWorker=i,this.#t()}),n.on("ready",c=>{if(l.abort(),this.destroyed){a();return}try{d()}catch{this._setupFakeWorker()}});const d=()=>{const c=new Uint8Array;n.send("test",c,[c.buffer])};d();return}catch{tI("The worker has been disabled.")}this._setupFakeWorker()}_setupFakeWorker(){o2.isWorkerDisabled||(zi("Setting up fake worker."),o2.isWorkerDisabled=!0),mc._setupFakeWorkerGlobal.then(t=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const i=new pSt;this._port=i;const n=`fake${o2.fakeWorkerId++}`,a=new Gx(n+"_worker",n,i);t.setup(a,i),this._messageHandler=new Gx(n,n+"_worker",i),this.#t()}).catch(t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),mc.#e?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){if(!t?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");const i=this.#e?.get(t.port);if(i){if(i._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return i}return new mc(t)}static get workerSrc(){if(vw.workerSrc)return vw.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#o(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return ar(this,"_setupFakeWorkerGlobal",(async()=>this.#o?this.#o:(await import(this.workerSrc)).WorkerMessageHandler)())}}class hSt{#e=new Map;#t=new Map;#o=new Map;#r=new Map;#s=null;constructor(t,i,n,a,l){this.messageHandler=t,this.loadingTask=i,this.commonObjs=new $Me,this.fontLoader=new ckt({ownerDocument:a.ownerDocument,styleElement:a.styleElement}),this.loadingParams=a.loadingParams,this._params=a,this.canvasFactory=l.canvasFactory,this.filterFactory=l.filterFactory,this.cMapReaderFactory=l.cMapReaderFactory,this.standardFontDataFactory=l.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.setupMessageHandler()}#i(t,i=null){const n=this.#e.get(t);if(n)return n;const a=this.messageHandler.sendWithPromise(t,i);return this.#e.set(t,a),a}get annotationStorage(){return ar(this,"annotationStorage",new aq)}getRenderingIntent(t,i=Y0.ENABLE,n=null,a=!1){let l=cc.DISPLAY,d=BU;switch(t){case"any":l=cc.ANY;break;case"display":break;case"print":l=cc.PRINT;break;default:zi(`getRenderingIntent - invalid intent: ${t}`)}switch(i){case Y0.DISABLE:l+=cc.ANNOTATIONS_DISABLE;break;case Y0.ENABLE:break;case Y0.ENABLE_FORMS:l+=cc.ANNOTATIONS_FORMS;break;case Y0.ENABLE_STORAGE:l+=cc.ANNOTATIONS_STORAGE,d=(l&cc.PRINT&&n instanceof mMe?n:this.annotationStorage).serializable;break;default:zi(`getRenderingIntent - invalid annotationMode: ${i}`)}return a&&(l+=cc.OPLIST),{renderingIntent:l,cacheKey:`${l}_${d.hash}`,annotationStorageSerializable:d}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#s?.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];for(const n of this.#t.values())t.push(n._destroy());this.#t.clear(),this.#o.clear(),this.#r.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const i=this.messageHandler.sendWithPromise("Terminate",null);return t.push(i),Promise.all(t).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(),ES.cleanup(),this._networkStream?.cancelAllRequests(new i4("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:i}=this;t.on("GetReader",(n,a)=>{ka(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=l=>{this._lastProgress={loaded:l.loaded,total:l.total}},a.onPull=()=>{this._fullReader.read().then(function({value:l,done:d}){if(d){a.close();return}ka(l instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),a.enqueue(new Uint8Array(l),1,[l])}).catch(l=>{a.error(l)})},a.onCancel=l=>{this._fullReader.cancel(l),a.ready.catch(d=>{if(!this.destroyed)throw d})}}),t.on("ReaderHeadersReady",n=>{const a=Promise.withResolvers(),l=this._fullReader;return l.headersReady.then(()=>{(!l.isStreamingSupported||!l.isRangeSupported)&&(this._lastProgress&&i.onProgress?.(this._lastProgress),l.onProgress=d=>{i.onProgress?.({loaded:d.loaded,total:d.total})}),a.resolve({isStreamingSupported:l.isStreamingSupported,isRangeSupported:l.isRangeSupported,contentLength:l.contentLength})},a.reject),a.promise}),t.on("GetRangeReader",(n,a)=>{ka(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const l=this._networkStream.getRangeReader(n.begin,n.end);if(!l){a.close();return}a.onPull=()=>{l.read().then(function({value:d,done:c}){if(c){a.close();return}ka(d instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),a.enqueue(new Uint8Array(d),1,[d])}).catch(d=>{a.error(d)})},a.onCancel=d=>{l.cancel(d),a.ready.catch(c=>{if(!this.destroyed)throw c})}}),t.on("GetDoc",({pdfInfo:n})=>{this._numPages=n.numPages,this._htmlForXfa=n.htmlForXfa,delete n.htmlForXfa,i._capability.resolve(new dSt(n,this))}),t.on("DocException",function(n){let a;switch(n.name){case"PasswordException":a=new jU(n.message,n.code);break;case"InvalidPDFException":a=new aMe(n.message);break;case"MissingPDFException":a=new o4(n.message);break;case"UnexpectedResponseException":a=new oI(n.message,n.status);break;case"UnknownErrorException":a=new MU(n.message,n.details);break;default:Dr("DocException - expected a valid Error.")}i._capability.reject(a)}),t.on("PasswordRequest",n=>{if(this.#s=Promise.withResolvers(),i.onPassword){const a=l=>{l instanceof Error?this.#s.reject(l):this.#s.resolve({password:l})};try{i.onPassword(a,n.code)}catch(l){this.#s.reject(l)}}else this.#s.reject(new jU(n.message,n.code));return this.#s.promise}),t.on("DataLoaded",n=>{i.onProgress?.({loaded:n.length,total:n.length}),this.downloadInfoCapability.resolve(n)}),t.on("StartRenderPage",n=>{if(this.destroyed)return;this.#t.get(n.pageIndex)._startRenderPage(n.transparency,n.cacheKey)}),t.on("commonobj",([n,a,l])=>{if(this.destroyed||this.commonObjs.has(n))return null;switch(a){case"Font":const{disableFontFace:d,fontExtraProperties:c,pdfBug:p}=this._params;if("error"in l){const f=l.error;zi(`Error during font loading: ${f}`),this.commonObjs.resolve(n,f);break}const h=p&&globalThis.FontInspector?.enabled?(f,x)=>globalThis.FontInspector.fontAdded(f,x):null,u=new pkt(l,{disableFontFace:d,inspectFont:h});this.fontLoader.bind(u).catch(()=>t.sendWithPromise("FontFallback",{id:n})).finally(()=>{!c&&u.data&&(u.data=null),this.commonObjs.resolve(n,u)});break;case"CopyLocalImage":const{imageRef:m}=l;ka(m,"The imageRef must be defined.");for(const f of this.#t.values())for(const[,x]of f.objs)if(x?.ref===m)return x.dataLen?(this.commonObjs.resolve(n,structuredClone(x)),x.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(n,l);break;default:throw new Error(`Got unknown common object type ${a}`)}return null}),t.on("obj",([n,a,l,d])=>{if(this.destroyed)return;const c=this.#t.get(a);if(!c.objs.has(n)){if(c._intentStates.size===0){d?.bitmap?.close();return}switch(l){case"Image":c.objs.resolve(n,d),d?.dataLen>F$t&&(c._maybeCleanupAfterRender=!0);break;case"Pattern":c.objs.resolve(n,d);break;default:throw new Error(`Got unknown object type ${l}`)}}}),t.on("DocProgress",n=>{this.destroyed||i.onProgress?.({loaded:n.loaded,total:n.total})}),t.on("FetchBuiltInCMap",n=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(n):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),t.on("FetchStandardFontData",n=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(n):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&zi("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:t,transfer:i}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:t,filename:this._fullReader?.filename??null},i).finally(()=>{this.annotationStorage.resetModified()})}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request."));const i=t-1,n=this.#o.get(i);if(n)return n;const a=this.messageHandler.sendWithPromise("GetPage",{pageIndex:i}).then(l=>{if(this.destroyed)throw new Error("Transport destroyed");l.refStr&&this.#r.set(l.refStr,t);const d=new cSt(i,l,this,this._params.pdfBug);return this.#t.set(i,d),d});return this.#o.set(i,a),a}getPageIndex(t){return Hpe(t)?this.messageHandler.sendWithPromise("GetPageIndex",{num:t.num,gen:t.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(t,i){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:i})}getFieldObjects(){return this.#i("GetFieldObjects")}hasJSActions(){return this.#i("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return typeof t!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}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 this.#i("GetDocJSActions")}getPageJSActions(t){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:t})}getStructTree(t){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:t})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(t){return this.#i("GetOptionalContentConfig").then(i=>new Mkt(i,t))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const t="GetMetadata",i=this.#e.get(t);if(i)return i;const n=this.messageHandler.sendWithPromise(t,null).then(a=>({info:a[0],metadata:a[1]?new Ikt(a[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#e.set(t,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(t=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const i of this.#t.values())if(!i.cleanup())throw new Error(`startCleanup: Page ${i.pageNumber} is currently rendering.`);this.commonObjs.clear(),t||this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(!0),ES.cleanup()}}cachedPageNumber(t){if(!Hpe(t))return null;const i=t.gen===0?`${t.num}R`:`${t.num}R${t.gen}`;return this.#r.get(i)??null}}const AC=Symbol("INITIAL_DATA");class $Me{#e=Object.create(null);#t(t){return this.#e[t]||={...Promise.withResolvers(),data:AC}}get(t,i=null){if(i){const a=this.#t(t);return a.promise.then(()=>i(a.data)),null}const n=this.#e[t];if(!n||n.data===AC)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return n.data}has(t){const i=this.#e[t];return!!i&&i.data!==AC}resolve(t,i=null){const n=this.#t(t);n.data=i,n.resolve()}clear(){for(const t in this.#e){const{data:i}=this.#e[t];i?.bitmap?.close()}this.#e=Object.create(null)}*[Symbol.iterator](){for(const t in this.#e){const{data:i}=this.#e[t];i!==AC&&(yield[t,i])}}}class uSt{#e=null;constructor(t){this.#e=t,this.onContinue=null}get promise(){return this.#e.capability.promise}cancel(t=0){this.#e.cancel(null,t)}get separateAnnots(){const{separateAnnots:t}=this.#e.operatorList;if(!t)return!1;const{annotationCanvasMap:i}=this.#e;return t.form||t.canvas&&i?.size>0}}class M7{#e=null;static#t=new WeakSet;constructor({callback:t,params:i,objs:n,commonObjs:a,annotationCanvasMap:l,operatorList:d,pageIndex:c,canvasFactory:p,filterFactory:h,useRequestAnimationFrame:u=!1,pdfBug:m=!1,pageColors:f=null}){this.callback=t,this.params=i,this.objs=n,this.commonObjs=a,this.annotationCanvasMap=l,this.operatorListIdx=null,this.operatorList=d,this._pageIndex=c,this.canvasFactory=p,this.filterFactory=h,this._pdfBug=m,this.pageColors=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=u===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new uSt(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=i.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:t=!1,optionalContentConfig:i}){if(this.cancelled)return;if(this._canvas){if(M7.#t.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.");M7.#t.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:n,viewport:a,transform:l,background:d}=this.params;this.gfx=new Y7(n,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:i},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:l,viewport:a,transparency:t,background:d}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(t=null,i=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null),M7.#t.delete(this._canvas),this.callback(t||new XK(`Rendering cancelled, page ${this._pageIndex+1}`,i))}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.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?this.#e=window.requestAnimationFrame(()=>{this.#e=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(),M7.#t.delete(this._canvas),this.callback())))}}const mSt="4.4.168",gSt="19fbc8998";function _pe(e){return Math.floor(Math.max(0,Math.min(1,e))*255).toString(16).padStart(2,"0")}function _9(e){return Math.max(0,Math.min(255,255*e))}class Vpe{static CMYK_G([t,i,n,a]){return["G",1-Math.min(1,.3*t+.59*n+.11*i+a)]}static G_CMYK([t]){return["CMYK",0,0,0,1-t]}static G_RGB([t]){return["RGB",t,t,t]}static G_rgb([t]){return t=_9(t),[t,t,t]}static G_HTML([t]){const i=_pe(t);return`#${i}${i}${i}`}static RGB_G([t,i,n]){return["G",.3*t+.59*i+.11*n]}static RGB_rgb(t){return t.map(_9)}static RGB_HTML(t){return`#${t.map(_pe).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([t,i,n,a]){return["RGB",1-Math.min(1,t+a),1-Math.min(1,n+a),1-Math.min(1,i+a)]}static CMYK_rgb([t,i,n,a]){return[_9(1-Math.min(1,t+a)),_9(1-Math.min(1,n+a)),_9(1-Math.min(1,i+a))]}static CMYK_HTML(t){const i=this.CMYK_RGB(t).slice(1);return this.RGB_HTML(i)}static RGB_CMYK([t,i,n]){const a=1-t,l=1-i,d=1-n,c=Math.min(a,l,d);return["CMYK",a,l,d,c]}}class kMe{static setupStorage(t,i,n,a,l){const d=a.getValue(i,{value:null});switch(n.name){case"textarea":if(d.value!==null&&(t.textContent=d.value),l==="print")break;t.addEventListener("input",c=>{a.setValue(i,{value:c.target.value})});break;case"input":if(n.attributes.type==="radio"||n.attributes.type==="checkbox"){if(d.value===n.attributes.xfaOn?t.setAttribute("checked",!0):d.value===n.attributes.xfaOff&&t.removeAttribute("checked"),l==="print")break;t.addEventListener("change",c=>{a.setValue(i,{value:c.target.checked?c.target.getAttribute("xfaOn"):c.target.getAttribute("xfaOff")})})}else{if(d.value!==null&&t.setAttribute("value",d.value),l==="print")break;t.addEventListener("input",c=>{a.setValue(i,{value:c.target.value})})}break;case"select":if(d.value!==null){t.setAttribute("value",d.value);for(const c of n.children)c.attributes.value===d.value?c.attributes.selected=!0:c.attributes.hasOwnProperty("selected")&&delete c.attributes.selected}t.addEventListener("input",c=>{const p=c.target.options,h=p.selectedIndex===-1?"":p[p.selectedIndex].value;a.setValue(i,{value:h})});break}}static setAttributes({html:t,element:i,storage:n=null,intent:a,linkService:l}){const{attributes:d}=i,c=t instanceof HTMLAnchorElement;d.type==="radio"&&(d.name=`${d.name}-${a}`);for(const[p,h]of Object.entries(d))if(h!=null)switch(p){case"class":h.length&&t.setAttribute(p,h.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",h);break;case"style":Object.assign(t.style,h);break;case"textContent":t.textContent=h;break;default:(!c||p!=="href"&&p!=="newWindow")&&t.setAttribute(p,h)}c&&l.addLinkAttributes(t,d.href,d.newWindow),n&&d.dataId&&this.setupStorage(t,d.dataId,i,n)}static render(t){const i=t.annotationStorage,n=t.linkService,a=t.xfaHtml,l=t.intent||"display",d=document.createElement(a.name);a.attributes&&this.setAttributes({html:d,element:a,intent:l,linkService:n});const c=l!=="richText",p=t.div;if(p.append(d),t.viewport){const m=`matrix(${t.viewport.transform.join(",")})`;p.style.transform=m}c&&p.setAttribute("class","xfaLayer xfaFont");const h=[];if(a.children.length===0){if(a.value){const m=document.createTextNode(a.value);d.append(m),c&&Cw.shouldBuildText(a.name)&&h.push(m)}return{textDivs:h}}const u=[[a,-1,d]];for(;u.length>0;){const[m,f,x]=u.at(-1);if(f+1===m.children.length){u.pop();continue}const y=m.children[++u.at(-1)[1]];if(y===null)continue;const{name:w}=y;if(w==="#text"){const C=document.createTextNode(y.value);h.push(C),x.append(C);continue}const b=y?.attributes?.xmlns?document.createElementNS(y.attributes.xmlns,w):document.createElement(w);if(x.append(b),y.attributes&&this.setAttributes({html:b,element:y,storage:i,intent:l,linkService:n}),y.children?.length>0)u.push([y,-1,b]);else if(y.value){const C=document.createTextNode(y.value);c&&Cw.shouldBuildText(w)&&h.push(C),b.append(C)}}for(const m of p.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))m.setAttribute("readOnly",!0);return{textDivs:h}}static update(t){const i=`matrix(${t.viewport.transform.join(",")})`;t.div.style.transform=i,t.div.hidden=!1}}const Lb=1e3,fSt=9,zf=new WeakSet;function k2(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class xSt{static create(t){switch(t.data.annotationType){case ba.LINK:return new SMe(t);case ba.TEXT:return new ySt(t);case ba.WIDGET:switch(t.data.fieldType){case"Tx":return new wSt(t);case"Btn":return t.data.radioButton?new EMe(t):t.data.checkBox?new vSt(t):new CSt(t);case"Ch":return new ASt(t);case"Sig":return new bSt(t)}return new r4(t);case ba.POPUP:return new zU(t);case ba.FREETEXT:return new LMe(t);case ba.LINE:return new kSt(t);case ba.SQUARE:return new SSt(t);case ba.CIRCLE:return new ESt(t);case ba.POLYLINE:return new IMe(t);case ba.CARET:return new ISt(t);case ba.INK:return new jMe(t);case ba.POLYGON:return new LSt(t);case ba.HIGHLIGHT:return new jSt(t);case ba.UNDERLINE:return new MSt(t);case ba.SQUIGGLY:return new BSt(t);case ba.STRIKEOUT:return new DSt(t);case ba.STAMP:return new MMe(t);case ba.FILEATTACHMENT:return new TSt(t);default:return new Gn(t)}}}class Gn{#e=null;#t=!1;#o=null;constructor(t,{isRenderable:i=!1,ignoreBorder:n=!1,createQuadrilaterals:a=!1}={}){this.isRenderable=i,this.data=t.data,this.layer=t.layer,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderForms=t.renderForms,this.svgFactory=t.svgFactory,this.annotationStorage=t.annotationStorage,this.enableScripting=t.enableScripting,this.hasJSActions=t.hasJSActions,this._fieldObjects=t.fieldObjects,this.parent=t.parent,i&&(this.container=this._createContainer(n)),a&&this._createQuadrilaterals()}static _hasPopupData({titleObj:t,contentsObj:i,richText:n}){return!!(t?.str||i?.str||n?.str)}get hasPopupData(){return Gn._hasPopupData(this.data)}updateEdited(t){if(!this.container)return;this.#e||={rect:this.data.rect.slice(0)};const{rect:i}=t;i&&this.#r(i),this.#o?.popup.updateEdited(t)}resetEdited(){this.#e&&(this.#r(this.#e.rect),this.#o?.popup.resetEdited(),this.#e=null)}#r(t){const{container:{style:i},data:{rect:n,rotation:a},parent:{viewport:{rawDims:{pageWidth:l,pageHeight:d,pageX:c,pageY:p}}}}=this;n?.splice(0,4,...t);const{width:h,height:u}=k2(t);i.left=`${100*(t[0]-c)/l}%`,i.top=`${100*(d-t[3]+p)/d}%`,a===0?(i.width=`${100*h/l}%`,i.height=`${100*u/d}%`):this.setRotation(a)}_createContainer(t){const{data:i,parent:{page:n,viewport:a}}=this,l=document.createElement("section");l.setAttribute("data-annotation-id",i.id),this instanceof r4||(l.tabIndex=Lb);const{style:d}=l;if(d.zIndex=this.parent.zIndex++,i.popupRef&&l.setAttribute("aria-haspopup","dialog"),i.alternativeText&&(l.title=i.alternativeText),i.noRotate&&l.classList.add("norotate"),!i.rect||this instanceof zU){const{rotation:w}=i;return!i.hasOwnCanvas&&w!==0&&this.setRotation(w,l),l}const{width:c,height:p}=k2(i.rect);if(!t&&i.borderStyle.width>0){d.borderWidth=`${i.borderStyle.width}px`;const w=i.borderStyle.horizontalCornerRadius,b=i.borderStyle.verticalCornerRadius;if(w>0||b>0){const k=`calc(${w}px * var(--scale-factor)) / calc(${b}px * var(--scale-factor))`;d.borderRadius=k}else if(this instanceof EMe){const k=`calc(${c}px * var(--scale-factor)) / calc(${p}px * var(--scale-factor))`;d.borderRadius=k}switch(i.borderStyle.style){case N9.SOLID:d.borderStyle="solid";break;case N9.DASHED:d.borderStyle="dashed";break;case N9.BEVELED:zi("Unimplemented border style: beveled");break;case N9.INSET:zi("Unimplemented border style: inset");break;case N9.UNDERLINE:d.borderBottomStyle="solid";break}const C=i.borderColor||null;C?(this.#t=!0,d.borderColor=$o.makeHexColor(C[0]|0,C[1]|0,C[2]|0)):d.borderWidth=0}const h=$o.normalizeRect([i.rect[0],n.view[3]-i.rect[1]+n.view[1],i.rect[2],n.view[3]-i.rect[3]+n.view[1]]),{pageWidth:u,pageHeight:m,pageX:f,pageY:x}=a.rawDims;d.left=`${100*(h[0]-f)/u}%`,d.top=`${100*(h[1]-x)/m}%`;const{rotation:y}=i;return i.hasOwnCanvas||y===0?(d.width=`${100*c/u}%`,d.height=`${100*p/m}%`):this.setRotation(y,l),l}setRotation(t,i=this.container){if(!this.data.rect)return;const{pageWidth:n,pageHeight:a}=this.parent.viewport.rawDims,{width:l,height:d}=k2(this.data.rect);let c,p;t%180===0?(c=100*l/n,p=100*d/a):(c=100*d/n,p=100*l/a),i.style.width=`${c}%`,i.style.height=`${p}%`,i.setAttribute("data-main-rotation",(360-t)%360)}get _commonActions(){const t=(i,n,a)=>{const l=a.detail[i],d=l[0],c=l.slice(1);a.target.style[n]=Vpe[`${d}_HTML`](c),this.annotationStorage.setValue(this.data.id,{[n]:Vpe[`${d}_rgb`](c)})};return ar(this,"_commonActions",{display:i=>{const{display:n}=i.detail,a=n%2===1;this.container.style.visibility=a?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:a,noPrint:n===1||n===2})},print:i=>{this.annotationStorage.setValue(this.data.id,{noPrint:!i.detail.print})},hidden:i=>{const{hidden:n}=i.detail;this.container.style.visibility=n?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:n,noView:n})},focus:i=>{setTimeout(()=>i.target.focus({preventScroll:!1}),0)},userName:i=>{i.target.title=i.detail.userName},readonly:i=>{i.target.disabled=i.detail.readonly},required:i=>{this._setRequired(i.target,i.detail.required)},bgColor:i=>{t("bgColor","backgroundColor",i)},fillColor:i=>{t("fillColor","backgroundColor",i)},fgColor:i=>{t("fgColor","color",i)},textColor:i=>{t("textColor","color",i)},borderColor:i=>{t("borderColor","borderColor",i)},strokeColor:i=>{t("strokeColor","borderColor",i)},rotation:i=>{const n=i.detail.rotation;this.setRotation(n),this.annotationStorage.setValue(this.data.id,{rotation:n})}})}_dispatchEventFromSandbox(t,i){const n=this._commonActions;for(const a of Object.keys(i.detail))(t[a]||n[a])?.(i)}_setDefaultPropertiesFromJS(t){if(!this.enableScripting)return;const i=this.annotationStorage.getRawValue(this.data.id);if(!i)return;const n=this._commonActions;for(const[a,l]of Object.entries(i)){const d=n[a];if(d){const c={detail:{[a]:l},target:t};d(c),delete i[a]}}}_createQuadrilaterals(){if(!this.container)return;const{quadPoints:t}=this.data;if(!t)return;const[i,n,a,l]=this.data.rect.map(w=>Math.fround(w));if(t.length===8){const[w,b,C,k]=t.subarray(2,6);if(a===w&&l===b&&i===C&&n===k)return}const{style:d}=this.container;let c;if(this.#t){const{borderColor:w,borderWidth:b}=d;d.borderWidth=0,c=["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="${w}" stroke-width="${b}">`],this.container.classList.add("hasBorder")}const p=a-i,h=l-n,{svgFactory:u}=this,m=u.createElement("svg");m.classList.add("quadrilateralsContainer"),m.setAttribute("width",0),m.setAttribute("height",0);const f=u.createElement("defs");m.append(f);const x=u.createElement("clipPath"),y=`clippath_${this.data.id}`;x.setAttribute("id",y),x.setAttribute("clipPathUnits","objectBoundingBox"),f.append(x);for(let w=2,b=t.length;w<b;w+=8){const C=t[w],k=t[w+1],L=t[w+2],S=t[w+3],j=u.createElement("rect"),I=(L-i)/p,P=(l-k)/h,B=(C-L)/p,T=(k-S)/h;j.setAttribute("x",I),j.setAttribute("y",P),j.setAttribute("width",B),j.setAttribute("height",T),x.append(j),c?.push(`<rect vector-effect="non-scaling-stroke" x="${I}" y="${P}" width="${B}" height="${T}"/>`)}this.#t&&(c.push("</g></svg>')"),d.backgroundImage=c.join("")),this.container.append(m),this.container.style.clipPath=`url(#${y})`}_createPopup(){const{container:t,data:i}=this;t.setAttribute("aria-haspopup","dialog");const n=this.#o=new zU({data:{color:i.color,titleObj:i.titleObj,modificationDate:i.modificationDate,contentsObj:i.contentsObj,richText:i.richText,parentRect:i.rect,borderStyle:0,id:`popup_${i.id}`,rotation:i.rotation},parent:this.parent,elements:[this]});this.parent.div.append(n.render())}render(){Dr("Abstract method `AnnotationElement.render` called")}_getElementsByName(t,i=null){const n=[];if(this._fieldObjects){const a=this._fieldObjects[t];if(a)for(const{page:l,id:d,exportValues:c}of a){if(l===-1||d===i)continue;const p=typeof c=="string"?c:null,h=document.querySelector(`[data-element-id="${d}"]`);if(h&&!zf.has(h)){zi(`_getElementsByName - element not allowed: ${d}`);continue}n.push({id:d,exportValue:p,domElement:h})}return n}for(const a of document.getElementsByName(t)){const{exportValue:l}=a,d=a.getAttribute("data-element-id");d!==i&&zf.has(a)&&n.push({id:d,exportValue:l,domElement:a})}return n}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){const t=this.getElementsToTriggerPopup();if(Array.isArray(t))for(const i of t)i.classList.add("highlightArea");else t.classList.add("highlightArea")}get _isEditable(){return!1}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:t,data:{id:i}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:t,editId:i})})}}class SMe extends Gn{constructor(t,i=null){super(t,{isRenderable:!0,ignoreBorder:!!i?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=t.data.isTooltipOnly}render(){const{data:t,linkService:i}=this,n=document.createElement("a");n.setAttribute("data-element-id",t.id);let a=!1;return t.url?(i.addLinkAttributes(n,t.url,t.newWindow),a=!0):t.action?(this._bindNamedAction(n,t.action),a=!0):t.attachment?(this.#t(n,t.attachment,t.attachmentDest),a=!0):t.setOCGState?(this.#o(n,t.setOCGState),a=!0):t.dest?(this._bindLink(n,t.dest),a=!0):(t.actions&&(t.actions.Action||t.actions["Mouse Up"]||t.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,t),a=!0),t.resetForm?(this._bindResetFormAction(n,t.resetForm),a=!0):this.isTooltipOnly&&!a&&(this._bindLink(n,""),a=!0)),this.container.classList.add("linkAnnotation"),a&&this.container.append(n),this.container}#e(){this.container.setAttribute("data-internal-link","")}_bindLink(t,i){t.href=this.linkService.getDestinationHash(i),t.onclick=()=>(i&&this.linkService.goToDestination(i),!1),(i||i==="")&&this.#e()}_bindNamedAction(t,i){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(i),!1),this.#e()}#t(t,i,n=null){t.href=this.linkService.getAnchorUrl(""),i.description&&(t.title=i.description),t.onclick=()=>(this.downloadManager?.openOrDownloadData(i.content,i.filename,n),!1),this.#e()}#o(t,i){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeSetOCGState(i),!1),this.#e()}_bindJSAction(t,i){t.href=this.linkService.getAnchorUrl("");const n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const a of Object.keys(i.actions)){const l=n.get(a);l&&(t[l]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i.id,name:a}}),!1))}t.onclick||(t.onclick=()=>!1),this.#e()}_bindResetFormAction(t,i){const n=t.onclick;if(n||(t.href=this.linkService.getAnchorUrl("")),this.#e(),!this._fieldObjects){zi('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),n||(t.onclick=()=>!1);return}t.onclick=()=>{n?.();const{fields:a,refs:l,include:d}=i,c=[];if(a.length!==0||l.length!==0){const u=new Set(l);for(const m of a){const f=this._fieldObjects[m]||[];for(const{id:x}of f)u.add(x)}for(const m of Object.values(this._fieldObjects))for(const f of m)u.has(f.id)===d&&c.push(f)}else for(const u of Object.values(this._fieldObjects))c.push(...u);const p=this.annotationStorage,h=[];for(const u of c){const{id:m}=u;switch(h.push(m),u.type){case"text":{const x=u.defaultValue||"";p.setValue(m,{value:x});break}case"checkbox":case"radiobutton":{const x=u.defaultValue===u.exportValues;p.setValue(m,{value:x});break}case"combobox":case"listbox":{const x=u.defaultValue||"";p.setValue(m,{value:x});break}default:continue}const f=document.querySelector(`[data-element-id="${m}"]`);if(f){if(!zf.has(f)){zi(`_bindResetFormAction - element not allowed: ${m}`);continue}}else continue;f.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:h,name:"ResetForm"}}),!1}}}class ySt extends Gn{constructor(t){super(t,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const t=document.createElement("img");return t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),t.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(t),this.container}}class r4 extends Gn{render(){return this.container}showElementAndHideCanvas(t){this.data.hasOwnCanvas&&(t.previousSibling?.nodeName==="CANVAS"&&(t.previousSibling.hidden=!0),t.hidden=!1)}_getKeyModifier(t){return ql.platform.isMac?t.metaKey:t.ctrlKey}_setEventListener(t,i,n,a,l){n.includes("mouse")?t.addEventListener(n,d=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a,value:l(d),shift:d.shiftKey,modifier:this._getKeyModifier(d)}})}):t.addEventListener(n,d=>{if(n==="blur"){if(!i.focused||!d.relatedTarget)return;i.focused=!1}else if(n==="focus"){if(i.focused)return;i.focused=!0}l&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:a,value:l(d)}})})}_setEventListeners(t,i,n,a){for(const[l,d]of n)(d==="Action"||this.data.actions?.[d])&&((d==="Focus"||d==="Blur")&&(i||={focused:!1}),this._setEventListener(t,i,l,d,a),d==="Focus"&&!this.data.actions?.Blur?this._setEventListener(t,i,"blur","Blur",null):d==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(t,i,"focus","Focus",null))}_setBackgroundColor(t){const i=this.data.backgroundColor||null;t.style.backgroundColor=i===null?"transparent":$o.makeHexColor(i[0],i[1],i[2])}_setTextStyle(t){const i=["left","center","right"],{fontColor:n}=this.data.defaultAppearanceData,a=this.data.defaultAppearanceData.fontSize||fSt,l=t.style;let d;const c=2,p=h=>Math.round(10*h)/10;if(this.data.multiLine){const h=Math.abs(this.data.rect[3]-this.data.rect[1]-c),u=Math.round(h/(xO*a))||1,m=h/u;d=Math.min(a,p(m/xO))}else{const h=Math.abs(this.data.rect[3]-this.data.rect[1]-c);d=Math.min(a,p(h/xO))}l.fontSize=`calc(${d}px * var(--scale-factor))`,l.color=$o.makeHexColor(n[0],n[1],n[2]),this.data.textAlignment!==null&&(l.textAlign=i[this.data.textAlignment])}_setRequired(t,i){i?t.setAttribute("required",!0):t.removeAttribute("required"),t.setAttribute("aria-required",i)}}class wSt extends r4{constructor(t){const i=t.renderForms||t.data.hasOwnCanvas||!t.data.hasAppearance&&!!t.data.fieldValue;super(t,{isRenderable:i})}setPropertyOnSiblings(t,i,n,a){const l=this.annotationStorage;for(const d of this._getElementsByName(t.name,t.id))d.domElement&&(d.domElement[i]=n),l.setValue(d.id,{[a]:n})}render(){const t=this.annotationStorage,i=this.data.id;this.container.classList.add("textWidgetAnnotation");let n=null;if(this.renderForms){const a=t.getValue(i,{value:this.data.fieldValue});let l=a.value||"";const d=t.getValue(i,{charLimit:this.data.maxLen}).charLimit;d&&l.length>d&&(l=l.slice(0,d));let c=a.formattedValue||this.data.textContent?.join(`
|
|
89
89
|
`)||null;c&&this.data.comb&&(c=c.replaceAll(/\s+/g,""));const p={userValue:l,formattedValue:c,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(n=document.createElement("textarea"),n.textContent=c??l,this.data.doNotScroll&&(n.style.overflowY="hidden")):(n=document.createElement("input"),n.type="text",n.setAttribute("value",c??l),this.data.doNotScroll&&(n.style.overflowX="hidden")),this.data.hasOwnCanvas&&(n.hidden=!0),zf.add(n),n.setAttribute("data-element-id",i),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=Lb,this._setRequired(n,this.data.required),d&&(n.maxLength=d),n.addEventListener("input",u=>{t.setValue(i,{value:u.target.value}),this.setPropertyOnSiblings(n,"value",u.target.value,"value"),p.formattedValue=null}),n.addEventListener("resetform",u=>{const m=this.data.defaultFieldValue??"";n.value=p.userValue=m,p.formattedValue=null});let h=u=>{const{formattedValue:m}=p;m!=null&&(u.target.value=m),u.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",m=>{if(p.focused)return;const{target:f}=m;p.userValue&&(f.value=p.userValue),p.lastCommittedValue=f.value,p.commitKey=1,this.data.actions?.Focus||(p.focused=!0)}),n.addEventListener("updatefromsandbox",m=>{this.showElementAndHideCanvas(m.target);const f={value(x){p.userValue=x.detail.value??"",t.setValue(i,{value:p.userValue.toString()}),x.target.value=p.userValue},formattedValue(x){const{formattedValue:y}=x.detail;p.formattedValue=y,y!=null&&x.target!==document.activeElement&&(x.target.value=y),t.setValue(i,{formattedValue:y})},selRange(x){x.target.setSelectionRange(...x.detail.selRange)},charLimit:x=>{const{charLimit:y}=x.detail,{target:w}=x;if(y===0){w.removeAttribute("maxLength");return}w.setAttribute("maxLength",y);let b=p.userValue;!b||b.length<=y||(b=b.slice(0,y),w.value=p.userValue=b,t.setValue(i,{value:b}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:b,willCommit:!0,commitKey:1,selStart:w.selectionStart,selEnd:w.selectionEnd}}))}};this._dispatchEventFromSandbox(f,m)}),n.addEventListener("keydown",m=>{p.commitKey=1;let f=-1;if(m.key==="Escape"?f=0:m.key==="Enter"&&!this.data.multiLine?f=2:m.key==="Tab"&&(p.commitKey=3),f===-1)return;const{value:x}=m.target;p.lastCommittedValue!==x&&(p.lastCommittedValue=x,p.userValue=x,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:x,willCommit:!0,commitKey:f,selStart:m.target.selectionStart,selEnd:m.target.selectionEnd}}))});const u=h;h=null,n.addEventListener("blur",m=>{if(!p.focused||!m.relatedTarget)return;this.data.actions?.Blur||(p.focused=!1);const{value:f}=m.target;p.userValue=f,p.lastCommittedValue!==f&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:f,willCommit:!0,commitKey:p.commitKey,selStart:m.target.selectionStart,selEnd:m.target.selectionEnd}}),u(m)}),this.data.actions?.Keystroke&&n.addEventListener("beforeinput",m=>{p.lastCommittedValue=null;const{data:f,target:x}=m,{value:y,selectionStart:w,selectionEnd:b}=x;let C=w,k=b;switch(m.inputType){case"deleteWordBackward":{const L=y.substring(0,w).match(/\w*[^\w]*$/);L&&(C-=L[0].length);break}case"deleteWordForward":{const L=y.substring(w).match(/^[^\w]*\w*/);L&&(k+=L[0].length);break}case"deleteContentBackward":w===b&&(C-=1);break;case"deleteContentForward":w===b&&(k+=1);break}m.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:y,change:f||"",willCommit:!1,selStart:C,selEnd:k}})}),this._setEventListeners(n,p,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],m=>m.target.value)}if(h&&n.addEventListener("blur",h),this.data.comb){const m=(this.data.rect[2]-this.data.rect[0])/d;n.classList.add("comb"),n.style.letterSpacing=`calc(${m}px * var(--scale-factor) - 1ch)`}}else n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell",this.data.hasOwnCanvas&&(n.hidden=!0);return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class bSt extends r4{constructor(t){super(t,{isRenderable:!!t.data.hasOwnCanvas})}}class vSt extends r4{constructor(t){super(t,{isRenderable:t.renderForms})}render(){const t=this.annotationStorage,i=this.data,n=i.id;let a=t.getValue(n,{value:i.exportValue===i.fieldValue}).value;typeof a=="string"&&(a=a!=="Off",t.setValue(n,{value:a})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const l=document.createElement("input");return zf.add(l),l.setAttribute("data-element-id",n),l.disabled=i.readOnly,this._setRequired(l,this.data.required),l.type="checkbox",l.name=i.fieldName,a&&l.setAttribute("checked",!0),l.setAttribute("exportValue",i.exportValue),l.tabIndex=Lb,l.addEventListener("change",d=>{const{name:c,checked:p}=d.target;for(const h of this._getElementsByName(c,n)){const u=p&&h.exportValue===i.exportValue;h.domElement&&(h.domElement.checked=u),t.setValue(h.id,{value:u})}t.setValue(n,{value:p})}),l.addEventListener("resetform",d=>{const c=i.defaultFieldValue||"Off";d.target.checked=c===i.exportValue}),this.enableScripting&&this.hasJSActions&&(l.addEventListener("updatefromsandbox",d=>{const c={value(p){p.target.checked=p.detail.value!=="Off",t.setValue(n,{value:p.target.checked})}};this._dispatchEventFromSandbox(c,d)}),this._setEventListeners(l,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],d=>d.target.checked)),this._setBackgroundColor(l),this._setDefaultPropertiesFromJS(l),this.container.append(l),this.container}}class EMe extends r4{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const t=this.annotationStorage,i=this.data,n=i.id;let a=t.getValue(n,{value:i.fieldValue===i.buttonValue}).value;if(typeof a=="string"&&(a=a!==i.buttonValue,t.setValue(n,{value:a})),a)for(const d of this._getElementsByName(i.fieldName,n))t.setValue(d.id,{value:!1});const l=document.createElement("input");if(zf.add(l),l.setAttribute("data-element-id",n),l.disabled=i.readOnly,this._setRequired(l,this.data.required),l.type="radio",l.name=i.fieldName,a&&l.setAttribute("checked",!0),l.tabIndex=Lb,l.addEventListener("change",d=>{const{name:c,checked:p}=d.target;for(const h of this._getElementsByName(c,n))t.setValue(h.id,{value:!1});t.setValue(n,{value:p})}),l.addEventListener("resetform",d=>{const c=i.defaultFieldValue;d.target.checked=c!=null&&c===i.buttonValue}),this.enableScripting&&this.hasJSActions){const d=i.buttonValue;l.addEventListener("updatefromsandbox",c=>{const p={value:h=>{const u=d===h.detail.value;for(const m of this._getElementsByName(h.target.name)){const f=u&&m.id===n;m.domElement&&(m.domElement.checked=f),t.setValue(m.id,{value:f})}}};this._dispatchEventFromSandbox(p,c)}),this._setEventListeners(l,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],c=>c.target.checked)}return this._setBackgroundColor(l),this._setDefaultPropertiesFromJS(l),this.container.append(l),this.container}}class CSt extends SMe{constructor(t){super(t,{ignoreBorder:t.data.hasAppearance})}render(){const t=super.render();t.classList.add("buttonWidgetAnnotation","pushButton");const i=t.lastChild;return this.enableScripting&&this.hasJSActions&&i&&(this._setDefaultPropertiesFromJS(i),i.addEventListener("updatefromsandbox",n=>{this._dispatchEventFromSandbox({},n)})),t}}class ASt extends r4{constructor(t){super(t,{isRenderable:t.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const t=this.annotationStorage,i=this.data.id,n=t.getValue(i,{value:this.data.fieldValue}),a=document.createElement("select");zf.add(a),a.setAttribute("data-element-id",i),a.disabled=this.data.readOnly,this._setRequired(a,this.data.required),a.name=this.data.fieldName,a.tabIndex=Lb;let l=this.data.combo&&this.data.options.length>0;this.data.combo||(a.size=this.data.options.length,this.data.multiSelect&&(a.multiple=!0)),a.addEventListener("resetform",u=>{const m=this.data.defaultFieldValue;for(const f of a.options)f.selected=f.value===m});for(const u of this.data.options){const m=document.createElement("option");m.textContent=u.displayValue,m.value=u.exportValue,n.value.includes(u.exportValue)&&(m.setAttribute("selected",!0),l=!1),a.append(m)}let d=null;if(l){const u=document.createElement("option");u.value=" ",u.setAttribute("hidden",!0),u.setAttribute("selected",!0),a.prepend(u),d=()=>{u.remove(),a.removeEventListener("input",d),d=null},a.addEventListener("input",d)}const c=u=>{const m=u?"value":"textContent",{options:f,multiple:x}=a;return x?Array.prototype.filter.call(f,y=>y.selected).map(y=>y[m]):f.selectedIndex===-1?null:f[f.selectedIndex][m]};let p=c(!1);const h=u=>{const m=u.target.options;return Array.prototype.map.call(m,f=>({displayValue:f.textContent,exportValue:f.value}))};return this.enableScripting&&this.hasJSActions?(a.addEventListener("updatefromsandbox",u=>{const m={value(f){d?.();const x=f.detail.value,y=new Set(Array.isArray(x)?x:[x]);for(const w of a.options)w.selected=y.has(w.value);t.setValue(i,{value:c(!0)}),p=c(!1)},multipleSelection(f){a.multiple=!0},remove(f){const x=a.options,y=f.detail.remove;x[y].selected=!1,a.remove(y),x.length>0&&Array.prototype.findIndex.call(x,b=>b.selected)===-1&&(x[0].selected=!0),t.setValue(i,{value:c(!0),items:h(f)}),p=c(!1)},clear(f){for(;a.length!==0;)a.remove(0);t.setValue(i,{value:null,items:[]}),p=c(!1)},insert(f){const{index:x,displayValue:y,exportValue:w}=f.detail.insert,b=a.children[x],C=document.createElement("option");C.textContent=y,C.value=w,b?b.before(C):a.append(C),t.setValue(i,{value:c(!0),items:h(f)}),p=c(!1)},items(f){const{items:x}=f.detail;for(;a.length!==0;)a.remove(0);for(const y of x){const{displayValue:w,exportValue:b}=y,C=document.createElement("option");C.textContent=w,C.value=b,a.append(C)}a.options.length>0&&(a.options[0].selected=!0),t.setValue(i,{value:c(!0),items:h(f)}),p=c(!1)},indices(f){const x=new Set(f.detail.indices);for(const y of f.target.options)y.selected=x.has(y.index);t.setValue(i,{value:c(!0)}),p=c(!1)},editable(f){f.target.disabled=!f.detail.editable}};this._dispatchEventFromSandbox(m,u)}),a.addEventListener("input",u=>{const m=c(!0),f=c(!1);t.setValue(i,{value:m}),u.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:i,name:"Keystroke",value:p,change:f,changeEx:m,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(a,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],u=>u.target.value)):a.addEventListener("input",function(u){t.setValue(i,{value:c(!0)})}),this.data.combo&&this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class zU extends Gn{constructor(t){const{data:i,elements:n}=t;super(t,{isRenderable:Gn._hasPopupData(i)}),this.elements=n,this.popup=null}render(){this.container.classList.add("popupAnnotation");const t=this.popup=new $St({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}),i=[];for(const n of this.elements)n.popup=t,i.push(n.data.id),n.addHighlightArea();return this.container.setAttribute("aria-controls",i.map(n=>`${lMe}${n}`).join(",")),this.container}}class $St{#e=this.#j.bind(this);#t=this.#C.bind(this);#o=this.#x.bind(this);#r=this.#b.bind(this);#s=null;#i=null;#n=null;#l=null;#c=null;#p=null;#u=null;#d=!1;#a=null;#m=null;#f=null;#h=null;#y=null;#g=null;#w=!1;constructor({container:t,color:i,elements:n,titleObj:a,modificationDate:l,contentsObj:d,richText:c,parent:p,rect:h,parentRect:u,open:m}){this.#i=t,this.#y=a,this.#n=d,this.#h=c,this.#p=p,this.#s=i,this.#f=h,this.#u=u,this.#c=n,this.#l=hMe.toDateObject(l),this.trigger=n.flatMap(f=>f.getElementsToTriggerPopup());for(const f of this.trigger)f.addEventListener("click",this.#r),f.addEventListener("mouseenter",this.#o),f.addEventListener("mouseleave",this.#t),f.classList.add("popupTriggerArea");for(const f of n)f.container?.addEventListener("keydown",this.#e);this.#i.hidden=!0,m&&this.#b()}render(){if(this.#a)return;const t=this.#a=document.createElement("div");if(t.className="popup",this.#s){const l=t.style.outlineColor=$o.makeHexColor(...this.#s);CSS.supports("background-color","color-mix(in srgb, red 30%, white)")?t.style.backgroundColor=`color-mix(in srgb, ${l} 30%, white)`:t.style.backgroundColor=$o.makeHexColor(...this.#s.map(c=>Math.floor(.7*(255-c)+c)))}const i=document.createElement("span");i.className="header";const n=document.createElement("h1");if(i.append(n),{dir:n.dir,str:n.textContent}=this.#y,t.append(i),this.#l){const l=document.createElement("span");l.classList.add("popupDate"),l.setAttribute("data-l10n-id","pdfjs-annotation-date-string"),l.setAttribute("data-l10n-args",JSON.stringify({date:this.#l.toLocaleDateString(),time:this.#l.toLocaleTimeString()})),i.append(l)}const a=this.#v;if(a)kMe.render({xfaHtml:a,intent:"richText",div:t}),t.lastChild.classList.add("richText","popupContent");else{const l=this._formatContents(this.#n);t.append(l)}this.#i.append(t)}get#v(){const t=this.#h,i=this.#n;return t?.str&&(!i?.str||i.str===t.str)&&this.#h.html||null}get#A(){return this.#v?.attributes?.style?.fontSize||0}get#k(){return this.#v?.attributes?.style?.color||null}#S(t){const i=[],n={str:t,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:i}]}},a={style:{color:this.#k,fontSize:this.#A?`calc(${this.#A}px * var(--scale-factor))`:""}};for(const l of t.split(`
|
|
90
90
|
`))i.push({name:"span",value:l,attributes:a});return n}_formatContents({str:t,dir:i}){const n=document.createElement("p");n.classList.add("popupContent"),n.dir=i;const a=t.split(/(?:\r\n?|\n)/);for(let l=0,d=a.length;l<d;++l){const c=a[l];n.append(document.createTextNode(c)),l<d-1&&n.append(document.createElement("br"))}return n}#j(t){t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||(t.key==="Enter"||t.key==="Escape"&&this.#d)&&this.#b()}updateEdited({rect:t,popupContent:i}){this.#g||={contentsObj:this.#n,richText:this.#h},t&&(this.#m=null),i&&(this.#h=this.#S(i),this.#n=null),this.#a?.remove(),this.#a=null}resetEdited(){this.#g&&({contentsObj:this.#n,richText:this.#h}=this.#g,this.#g=null,this.#a?.remove(),this.#a=null,this.#m=null)}#$(){if(this.#m!==null)return;const{page:{view:t},viewport:{rawDims:{pageWidth:i,pageHeight:n,pageX:a,pageY:l}}}=this.#p;let d=!!this.#u,c=d?this.#u:this.#f;for(const y of this.#c)if(!c||$o.intersect(y.data.rect,c)!==null){c=y.data.rect,d=!0;break}const p=$o.normalizeRect([c[0],t[3]-c[1]+t[1],c[2],t[3]-c[3]+t[1]]),u=d?c[2]-c[0]+5:0,m=p[0]+u,f=p[1];this.#m=[100*(m-a)/i,100*(f-l)/n];const{style:x}=this.#i;x.left=`${this.#m[0]}%`,x.top=`${this.#m[1]}%`}#b(){this.#d=!this.#d,this.#d?(this.#x(),this.#i.addEventListener("click",this.#r),this.#i.addEventListener("keydown",this.#e)):(this.#C(),this.#i.removeEventListener("click",this.#r),this.#i.removeEventListener("keydown",this.#e))}#x(){this.#a||this.render(),this.isVisible?this.#d&&this.#i.classList.add("focused"):(this.#$(),this.#i.hidden=!1,this.#i.style.zIndex=parseInt(this.#i.style.zIndex)+1e3)}#C(){this.#i.classList.remove("focused"),!(this.#d||!this.isVisible)&&(this.#i.hidden=!0,this.#i.style.zIndex=parseInt(this.#i.style.zIndex)-1e3)}forceHide(){this.#w=this.isVisible,this.#w&&(this.#i.hidden=!0)}maybeShow(){this.#w&&(this.#a||this.#x(),this.#w=!1,this.#i.hidden=!1)}get isVisible(){return this.#i.hidden===!1}}class LMe extends Gn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.textContent=t.data.textContent,this.textPosition=t.data.textPosition,this.annotationEditorType=Zi.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const t=document.createElement("div");t.classList.add("annotationTextContent"),t.setAttribute("role","comment");for(const i of this.textContent){const n=document.createElement("span");n.textContent=i,t.append(n)}this.container.append(t)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}get _isEditable(){return this.data.hasOwnCanvas}}class kSt extends Gn{#e=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");const t=this.data,{width:i,height:n}=k2(t.rect),a=this.svgFactory.create(i,n,!0),l=this.#e=this.svgFactory.createElement("svg:line");return l.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),l.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),l.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),l.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),l.setAttribute("stroke-width",t.borderStyle.width||1),l.setAttribute("stroke","transparent"),l.setAttribute("fill","transparent"),a.append(l),this.container.append(a),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class SSt extends Gn{#e=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const t=this.data,{width:i,height:n}=k2(t.rect),a=this.svgFactory.create(i,n,!0),l=t.borderStyle.width,d=this.#e=this.svgFactory.createElement("svg:rect");return d.setAttribute("x",l/2),d.setAttribute("y",l/2),d.setAttribute("width",i-l),d.setAttribute("height",n-l),d.setAttribute("stroke-width",l||1),d.setAttribute("stroke","transparent"),d.setAttribute("fill","transparent"),a.append(d),this.container.append(a),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class ESt extends Gn{#e=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const t=this.data,{width:i,height:n}=k2(t.rect),a=this.svgFactory.create(i,n,!0),l=t.borderStyle.width,d=this.#e=this.svgFactory.createElement("svg:ellipse");return d.setAttribute("cx",i/2),d.setAttribute("cy",n/2),d.setAttribute("rx",i/2-l/2),d.setAttribute("ry",n/2-l/2),d.setAttribute("stroke-width",l||1),d.setAttribute("stroke","transparent"),d.setAttribute("fill","transparent"),a.append(d),this.container.append(a),!t.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class IMe extends Gn{#e=null;constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,vertices:i,borderStyle:n,popupRef:a}}=this;if(!i)return this.container;const{width:l,height:d}=k2(t),c=this.svgFactory.create(l,d,!0);let p=[];for(let u=0,m=i.length;u<m;u+=2){const f=i[u]-t[0],x=t[3]-i[u+1];p.push(`${f},${x}`)}p=p.join(" ");const h=this.#e=this.svgFactory.createElement(this.svgElementName);return h.setAttribute("points",p),h.setAttribute("stroke-width",n.width||1),h.setAttribute("stroke","transparent"),h.setAttribute("fill","transparent"),c.append(h),this.container.append(c),!a&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class LSt extends IMe{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class ISt extends Gn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class jMe extends Gn{#e=[];constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=Zi.INK}render(){this.container.classList.add(this.containerClassName);const{data:{rect:t,inkLists:i,borderStyle:n,popupRef:a}}=this,{width:l,height:d}=k2(t),c=this.svgFactory.create(l,d,!0);for(const p of i){let h=[];for(let m=0,f=p.length;m<f;m+=2){const x=p[m]-t[0],y=t[3]-p[m+1];h.push(`${x},${y}`)}h=h.join(" ");const u=this.svgFactory.createElement(this.svgElementName);this.#e.push(u),u.setAttribute("points",h),u.setAttribute("stroke-width",n.width||1),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),!a&&this.hasPopupData&&this._createPopup(),c.append(u)}return this.container.append(c),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}}class jSt extends Gn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class MSt extends Gn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class BSt extends Gn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class DSt extends Gn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class MMe extends Gn{constructor(t){super(t,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class TSt extends Gn{#e=null;constructor(t){super(t,{isRenderable:!0});const{file:i}=this.data;this.filename=i.filename,this.content=i.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...i})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:t,data:i}=this;let n;i.hasAppearance||i.fillAlpha===0?n=document.createElement("div"):(n=document.createElement("img"),n.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(i.name)?"paperclip":"pushpin"}.svg`,i.fillAlpha&&i.fillAlpha<1&&(n.style=`filter: opacity(${Math.round(i.fillAlpha*100)}%);`)),n.addEventListener("dblclick",this.#t.bind(this)),this.#e=n;const{isMac:a}=ql.platform;return t.addEventListener("keydown",l=>{l.key==="Enter"&&(a?l.metaKey:l.ctrlKey)&&this.#t()}),!i.popupRef&&this.hasPopupData?this._createPopup():n.classList.add("popupTriggerArea"),t.append(n),t}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}#t(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}let PSt=class{#e=null;#t=null;#o=new Map;constructor({div:t,accessibilityManager:i,annotationCanvasMap:n,annotationEditorUIManager:a,page:l,viewport:d}){this.div=t,this.#e=i,this.#t=n,this.page=l,this.viewport=d,this.zIndex=0,this._annotationEditorUIManager=a}#r(t,i){const n=t.firstChild||t;n.id=`${lMe}${i}`,this.div.append(t),this.#e?.moveElementInDOM(this.div,t,n,!1)}async render(t){const{annotations:i}=t,n=this.div;Pf(n,this.viewport);const a=new Map,l={data:null,layer:n,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderForms:t.renderForms!==!1,svgFactory:new JK,annotationStorage:t.annotationStorage||new aq,enableScripting:t.enableScripting===!0,hasJSActions:t.hasJSActions,fieldObjects:t.fieldObjects,parent:this,elements:null};for(const d of i){if(d.noHTML)continue;const c=d.annotationType===ba.POPUP;if(c){const u=a.get(d.id);if(!u)continue;l.elements=u}else{const{width:u,height:m}=k2(d.rect);if(u<=0||m<=0)continue}l.data=d;const p=xSt.create(l);if(!p.isRenderable)continue;if(!c&&d.popupRef){const u=a.get(d.popupRef);u?u.push(p):a.set(d.popupRef,[p])}const h=p.render();d.hidden&&(h.style.visibility="hidden"),this.#r(h,d.id),p.annotationEditorType>0&&(this.#o.set(p.data.id,p),this._annotationEditorUIManager?.renderAnnotationElement(p))}this.#s()}update({viewport:t}){const i=this.div;this.viewport=t,Pf(i,{rotation:t.rotation}),this.#s(),i.hidden=!1}#s(){if(!this.#t)return;const t=this.div;for(const[i,n]of this.#t){const a=t.querySelector(`[data-annotation-id="${i}"]`);if(!a)continue;n.className="annotationContent";const{firstChild:l}=a;l?l.nodeName==="CANVAS"?l.replaceWith(n):l.classList.contains("annotationContent")?l.after(n):l.before(n):a.append(n)}this.#t.clear()}getEditableAnnotations(){return Array.from(this.#o.values())}getEditableAnnotation(t){return this.#o.get(t)}};const $C=/\r\n?|\n/g;class Ca extends li{#e=this.editorDivBlur.bind(this);#t=this.editorDivFocus.bind(this);#o=this.editorDivInput.bind(this);#r=this.editorDivKeydown.bind(this);#s=this.editorDivPaste.bind(this);#i;#n="";#l=`${this.id}-editor`;#c;#p=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const t=Ca.prototype,i=l=>l.isEmpty(),n=km.TRANSLATE_SMALL,a=km.TRANSLATE_BIG;return ar(this,"_keyboardManager",new Sb([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],t.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],t.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],t._translateEmpty,{args:[-n,0],checker:i}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],t._translateEmpty,{args:[-a,0],checker:i}],[["ArrowRight","mac+ArrowRight"],t._translateEmpty,{args:[n,0],checker:i}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],t._translateEmpty,{args:[a,0],checker:i}],[["ArrowUp","mac+ArrowUp"],t._translateEmpty,{args:[0,-n],checker:i}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],t._translateEmpty,{args:[0,-a],checker:i}],[["ArrowDown","mac+ArrowDown"],t._translateEmpty,{args:[0,n],checker:i}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],t._translateEmpty,{args:[0,a],checker:i}]]))}static _type="freetext";static _editorType=Zi.FREETEXT;constructor(t){super({...t,name:"freeTextEditor"}),this.#i=t.color||Ca._defaultColor||li._defaultLineColor,this.#c=t.fontSize||Ca._defaultFontSize}static initialize(t,i){li.initialize(t,i,{strings:["pdfjs-free-text-default-content"]});const n=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(n.getPropertyValue("--freetext-padding"))}static updateDefaultParams(t,i){switch(t){case pi.FREETEXT_SIZE:Ca._defaultFontSize=i;break;case pi.FREETEXT_COLOR:Ca._defaultColor=i;break}}updateParams(t,i){switch(t){case pi.FREETEXT_SIZE:this.#u(i);break;case pi.FREETEXT_COLOR:this.#d(i);break}}static get defaultPropertiesToUpdate(){return[[pi.FREETEXT_SIZE,Ca._defaultFontSize],[pi.FREETEXT_COLOR,Ca._defaultColor||li._defaultLineColor]]}get propertiesToUpdate(){return[[pi.FREETEXT_SIZE,this.#c],[pi.FREETEXT_COLOR,this.#i]]}#u(t){const i=a=>{this.editorDiv.style.fontSize=`calc(${a}px * var(--scale-factor))`,this.translate(0,-(a-this.#c)*this.parentScale),this.#c=a,this.#m()},n=this.#c;this.addCommands({cmd:i.bind(this,t),undo:i.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:pi.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#d(t){const i=a=>{this.#i=this.editorDiv.style.color=a},n=this.#i;this.addCommands({cmd:i.bind(this,t),undo:i.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:pi.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(t,i){this._uiManager.translateSelectedEditors(t,i,!0)}getInitialTranslation(){const t=this.parentScale;return[-Ca._internalPadding*t,-(Ca._internalPadding+this.#c)*t]}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(Zi.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant");const t=this._uiManager._signal;this.editorDiv.addEventListener("keydown",this.#r,{signal:t}),this.editorDiv.addEventListener("focus",this.#t,{signal:t}),this.editorDiv.addEventListener("blur",this.#e,{signal:t}),this.editorDiv.addEventListener("input",this.#o,{signal:t}),this.editorDiv.addEventListener("paste",this.#s,{signal:t})}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#l),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#r),this.editorDiv.removeEventListener("focus",this.#t),this.editorDiv.removeEventListener("blur",this.#e),this.editorDiv.removeEventListener("input",this.#o),this.editorDiv.removeEventListener("paste",this.#s),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"))}focusin(t){this._focusEventsAllowed&&(super.focusin(t),t.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.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()}#a(){const t=[];this.editorDiv.normalize();for(const i of this.editorDiv.childNodes)t.push(Ca.#f(i));return t.join(`
|
|
91
91
|
`)}#m(){const[t,i]=this.parentDimensions;let n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{const{currentLayer:a,div:l}=this,d=l.style.display,c=l.classList.contains("hidden");l.classList.remove("hidden"),l.style.display="hidden",a.div.append(this.div),n=l.getBoundingClientRect(),l.remove(),l.style.display=d,l.classList.toggle("hidden",c)}this.rotation%180===this.parentRotation%180?(this.width=n.width/t,this.height=n.height/i):(this.width=n.height/t,this.height=n.width/i),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const t=this.#n,i=this.#n=this.#a().trimEnd();if(t===i)return;const n=a=>{if(this.#n=a,!a){this.remove();return}this.#h(),this._uiManager.rebuild(this),this.#m()};this.addCommands({cmd:()=>{n(i)},undo:()=>{n(t)},mustExec:!1}),this.#m()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(t){this.enterInEditMode()}keydown(t){t.target===this.div&&t.key==="Enter"&&(this.enterInEditMode(),t.preventDefault())}editorDivKeydown(t){Ca._keyboardManager.exec(this,t)}editorDivFocus(t){this.isEditing=!0}editorDivBlur(t){this.isEditing=!1}editorDivInput(t){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 t,i;this.width&&(t=this.x,i=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#l),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text"),this.enableEditing(),li._l10nPromise.get("pdfjs-free-text-default-content").then(a=>this.editorDiv?.setAttribute("default-content",a)),this.editorDiv.contentEditable=!0;const{style:n}=this.editorDiv;if(n.fontSize=`calc(${this.#c}px * var(--scale-factor))`,n.color=this.#i,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),kS(this,this.div,["dblclick","keydown"]),this.width){const[a,l]=this.parentDimensions;if(this.annotationElementId){const{position:d}=this.#p;let[c,p]=this.getInitialTranslation();[c,p]=this.pageTranslationToScreen(c,p);const[h,u]=this.pageDimensions,[m,f]=this.pageTranslation;let x,y;switch(this.rotation){case 0:x=t+(d[0]-m)/h,y=i+this.height-(d[1]-f)/u;break;case 90:x=t+(d[0]-m)/h,y=i-(d[1]-f)/u,[c,p]=[p,-c];break;case 180:x=t-this.width+(d[0]-m)/h,y=i-(d[1]-f)/u,[c,p]=[-c,-p];break;case 270:x=t+(d[0]-m-this.height*u)/h,y=i+(d[1]-f-this.width*h)/u,[c,p]=[-p,c];break}this.setAt(x*a,y*l,c,p)}else this.setAt(t*a,i*l,this.width*a,this.height*l);this.#h(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#f(t){return(t.nodeType===Node.TEXT_NODE?t.nodeValue:t.innerText).replaceAll($C,"")}editorDivPaste(t){const i=t.clipboardData||window.clipboardData,{types:n}=i;if(n.length===1&&n[0]==="text/plain")return;t.preventDefault();const a=Ca.#g(i.getData("text")||"").replaceAll($C,`
|
|
@@ -144,7 +144,7 @@ _failed_count_ Transaction failed.`},transactionsUpdated_transactionsFailed:{suc
|
|
|
144
144
|
_failed_count_ Transactions failed.`},transactionCategorized_transactionUpdated_transactionFailed:{success:"",failed:"",notification:`_categorized_count_ Transaction categorized.
|
|
145
145
|
_updated_count_ Transaction updated.
|
|
146
146
|
_failed_count_ Transaction failed.`},people_invite_people:{success:"Invitation sent",failed:"",notification:""},people_invite_multiple_people:{success:"Users invited",failed:"",notification:""},people_update_person:{success:"User info changed",failed:"",notification:""},people_delete_person:{success:"User deleted",failed:"",notification:""},reimbursement_updated:{success:"Reimbursement saved",failed:"_api-error_.",notification:""},reimbursement_approved:{success:"Reimbursement approved",failed:"_api-error_.",notification:""},reimbursement_rejected:{success:"Reimbursement rejected",failed:"_api-error_.",notification:""},reimbursement_sent_for_approval:{success:"Reimbursement sent for approval",failed:"_api-error_.",notification:""},reimbursement_deleted:{success:"Reimbursement deleted",failed:"_api-error_.",notification:""},reimbursement_cancelled:{success:"Reimbursement canceled",failed:"_api-error_.",notification:""},reimbursement_cancelled_deleted:{success:"Reimbursement canceled and deleted",failed:"_api-error_.",notification:""},reimbursement_bulk_submit:{success:"_count_ _report_ will be _action_. You'll be notified once it's done.",failed:"_api-error_.",notification:""},reimbursement_bulk_processed:{success:"_report_ _has_ been _action_. The page will refresh now to reflect updates.",failed:"_api-error_.",notification:""},save_reconcile_for_later:{success:"Reconciliation saved",failed:"Reconciliation not saved. Please try again!",notification:""},reconcile:{success:"_reconcile_account_ reconciliation in progress.",failed:"Reconciliation failed for _reconcile_account_",notification:""},exclude_transaction:{success:"Transaction excluded",failed:"Transaction exclusion failed",notification:""},account_added:{success:"Account added successfully",failed:"",notification:""},issue_charge_card:{success:"New _card_ issued for _user-name_",failed:"",notification:""},issue_charge_cards:{success:"New cards issued",failed:"Couldn't create cards. _api-error_.",notification:""},charge_card_auto_pay_enable:{success:"Early payment enabled",failed:"",notification:""},charge_card_auto_pay_disable:{success:"Early payment disabled",failed:"",notification:""},business_verification_save:{success:"Business Verification Details saved successfully.",failed:"Couldn't save Business Verification Details. Please try again.",notification:""},business_verification_submit:{success:"Business Verification Details submitted successfully.",failed:"Couldn't submit Business Verification Details. Please try again.",notification:""},business_verification_from_bills_submit:{success:"Verified successfully.",failed:"Couldn't submit Business Verification Details. Please try again.",notification:""},plaid_connection:{success:"",failed:"Something went wrong! Please try again.",notification:""},bill_pay_setup:{success:"",failed:"Failed to load Bill Pay Setup Details! Please try again.",notification:""},zeni_accounts_setup:{success:"",failed:"Failed to load Zeni Accounts Setup Details! Please try again.",notification:""},bill_pay_approval_create:{success:"Approval Rule created successfully.",failed:"Couldn't create Approval Rule! Please try again.",notification:""},bill_pay_duplicate_approval_create:{success:"Approval Rule created successfully.",failed:"_api-error_",notification:""},bill_pay_approval_update:{success:"Approval Rule updated successfully.",failed:"Couldn't update Approval Rule! Please try again.",notification:""},update_zeni_account_nickname:{success:"Zeni Account nickname updated successfully",failed:"_api-error_.",notification:""},create_checking_account:{success:"New Business Account Added",failed:"_api-error_.",notification:""},deposit_check:{success:"Check Deposit Successful",failed:"_api-error_.",notification:""},bill_pay_duplicate_approval_update:{success:"Approval Rule updated successfully.",failed:"_api-error_",notification:""},bill_pay_approval_delete:{success:"Approval Rule deleted successfully.",failed:"Couldn't delete Approval Rule! Please try again.",notification:""},bill_pay_approval_reorder:{success:"Approval rules reordered.",failed:"Couldn't reorder Approval Rules. Please try again.",notification:""},reimbursement_setup:{success:"",failed:"Failed to load Reimbursements Setup Details! Please try again.",notification:""},reimbursement_approval_create:{success:"Approval Rule created successfully.",failed:"Couldn't create Approval Rule! Please try again.",notification:""},reimbursement_duplicate_approval_create:{success:"Approval Rule created successfully.",failed:"_api-error_",notification:""},reimbursement_approval_update:{success:"Approval Rule updated successfully.",failed:"Couldn't update Approval Rule! Please try again.",notification:""},reimbursement_duplicate_approval_update:{success:"Approval Rule updated successfully.",failed:"_api-error_",notification:""},reimbursement_approval_delete:{success:"Approval Rule deleted successfully.",failed:"Couldn't delete Approval Rule! Please try again.",notification:""},reimbursement_approval_reorder:{success:"Approval rules reordered.",failed:"Couldn't reorder Approval Rules. Please try again.",notification:""},reimbursement_create_mileage:{success:"Mileage rate added successfully.",failed:"_api-error_.",notification:""},reimbursement_update_mileage:{success:"Mileage rate updated successfully.",failed:"_api-error_.",notification:""},reimbursement_accept_term:{success:"",failed:"_api-error_.",notification:""},reimbursement_accept_employee_term:{success:"",failed:"_api-error_.",notification:""},cockpit_month_end_email_sent:{success:"Zeni Insights sent successfully for _company-name_.",failed:"",notification:""},cockpit_month_end_email_save:{success:"Zeni Insights saved successfully for _company-name_.",failed:"",notification:""},cockpit_month_end_email_attachment_upload:{success:"",failed:"Sorry, the file you uploaded is too large. Maximum file size allowed is 700KB",notification:""},audit_score_updated:{success:"Audit Score updated",failed:"",notification:""},create_bank_account_ach:{success:"ACH account added successfully.",failed:"",notification:""},unlink_deposit_account:{success:"",failed:"_api-error_.",notification:""},create_bank_account_wire:{success:"_wire-type_ wire account added successfully.",failed:"",notification:""},create_bank_account_international:{success:"_wire-type_ wire account added successfully.",failed:"",notification:""},bill_pay_updated:{success:"Bill saved",failed:"_api-error_.",notification:""},bill_pay_deleted:{success:"Bill deleted",failed:"_api-error_.",notification:""},bill_pay_bulk_submit:{success:"_count_ _bill_ will be _action_. You'll be notified once it's done.",failed:"_api-error_.",notification:""},bill_pay_bulk_processed:{success:"_bill_ _has_ been _action_. The page will refresh now to reflect updates.",failed:"_api-error_.",notification:""},bill_pay_cancelled_deleted:{success:"Bill canceled and deleted",failed:"_api-error_.",notification:""},bill_pay_cancelled:{success:"Bill canceled",failed:"_api-error_.",notification:""},bill_pay_approved:{success:"Bill approved",failed:"_api-error_.",notification:""},bill_pay_rejected:{success:"Bill rejected",failed:"_api-error_.",notification:""},bill_pay_sent_for_approval:{success:"Bill sent for approval",failed:"_api-error_.",notification:""},bill_pay_accept_term:{success:"",failed:"_api-error_.",notification:""},bill_pay_refund:{success:"Refund process initiated",failed:"_api-error_.",notification:""},bill_pay_retry:{success:"Payment retried",failed:"_api-error_.",notification:""},bill_pay_marked_as_paid:{success:"Bill marked as paid",failed:"_api-error_.",notification:""},update_vendor:{success:"Vendor updated successfully.",failed:"_api-error_.",notification:""},data_refresh_update:{success:"Data refreshed",failed:"_api-error_.",notification:""},delete_bank_account:{success:"Bank account deleted successfully.",failed:"_api-error_.",notification:""},update_debit_card_pin_attempt:{success:"PIN changed successfully",failed:"_api-error_.",notification:""},set_debit_card_pin:{success:"PIN set successfully",failed:"_api-error_.",notification:""},create_bank_account:{success:"",failed:"_api-error_.",notification:""},send_email_magic_link_to_user:{success:"",failed:"_api-error_.",notification:""},qbo_connection_already_linked:{success:"",failed:"This QuickBooks company is already connected to another active tenant.",notification:""},qbo_connection_failed:{success:"",failed:"Unable to connect QuickBooks. Please try again.",notification:""},accounting_projects_qbo_reconnect_failed:{success:"",failed:"Couldn't reconnect QuickBooks. Try again.",notification:""},complete_profile_done:{success:"Profile details saved.",failed:"_api-error_.",notification:""},zeni_account_accept_term:{success:"",failed:"_api-error_.",notification:""},transfer_money:{success:"",failed:"_api-error_.",notification:""},create_vendor:{success:"Vendor created successfully.",failed:"_api-error_.",notification:""},onboarding_customer_view:{success:"Onboarding Business Details fetched successfully.",failed:"Couldn't fetch Onboarding Business Details. Please try again.",notification:""},onboarding_customer_view_complete:{success:"Onboarding status updated successfully.",failed:"Couldn't update Onboarding status. Please try again.",notification:""},onboarding_customer_identity_verification_save:{success:"Onboarding Identity Details saved successfully.",failed:"Couldn't save Onboarding Identity Details. Please try again.",notification:""},onboarding_customer_identity_verification_submit:{success:"Onboarding Identity Details submitted successfully.",failed:"Couldn't submit Onboarding Identity Details. Please try again.",notification:""},onboarding_customer_business_verification_save:{success:"Onboarding Business Details saved successfully.",failed:"Couldn't save Onboarding Business Details. Please try again.",notification:""},onboarding_customer_business_verification_submit:{success:"Onboarding Business Details submitted successfully.",failed:"Couldn't submit Onboarding Business Details. Please try again.",notification:""},retry_bank_account_connection:{success:"Bank account connection completed successfully.",failed:"Bank account connection failed.",notification:""},dashboard_invite_sent:{success:"Dashboard invite sent to _user-name_ for _company-name_ successfully.",failed:"Dashboard invite failed",notification:""},onboarding_info_saved:{success:"Saved successfully",failed:"Save failed",notification:""},approve_original_merchant:{success:'Review request for "_merchant_name_" is approved successfully.',failed:"_api-error_.",notification:""},approve_global_merchant:{success:'Review request for "_original_merchant_name_" to "_approved_merchant_name_" is approved successfully.',failed:"_api-error_.",notification:""},reject_global_merchant:{success:'Vendor "_merchant_name_" review rejected',failed:"_api-error_.",notification:""},create_global_merchant:{success:'Vendor "_global_merchant_name_" successfully added to global list.',failed:"_api-error_.",notification:""},fetch_global_merchant_no_recommendation:{success:'There are no recommendations for the name "_global_merchant_name_".',failed:"_api-error_.",notification:""},save_vendor_sent_for_review:{success:'Vendor "_vendor_name_" sent for the review.',failed:"_api-error_.",notification:""},save_vendor_renamed:{success:'Vendor "_old_vendor_name_" renamed to "_updated_vendor_name_."',failed:"_api-error_.",notification:""},save_vendor_marked_as_employee:{success:"Marked as employee",failed:"_api-error_.",notification:""},save_vendor_marked_as_local_contractor:{success:"Marked as local contractor",failed:"_api-error_.",notification:""},charge_card_setup:{success:"",failed:"Failed to load Cards Setup Details! Please try again.",notification:""},charge_card_receipt_upload:{success:"Card receipt uploaded",failed:"_api-error_.",notification:""},charge_card_resend_invite:{success:"Card invite resent",failed:"_api-error_.",notification:""},charge_card_revoke_invite:{success:"Card invite revoked",failed:"_api-error_.",notification:""},card_policy_created:{success:"New policy created",failed:"_api-error_.",notification:""},card_policy_updated:{success:"Policy updated",failed:"_api-error_.",notification:""},card_policy_deleted:{success:"Policy deleted",failed:"_api-error_.",notification:""},charge_card_update_limit:{success:"Card limit updated to _amount_",failed:"Limit updation failed with _api-error_.",notification:""},charge_cards_update_limit:{success:"Limit updated for _number_of_cards_",failed:"Limit updation failed with _api-error_.",notification:""},update_charge_card_name:{success:'Card _masked_card_number_ renamed to "_new_card_name_"',failed:"Card name updation failed with _api-error_.",notification:""},update_charge_card_name_card_user:{success:'Card renamed to "_new_card_name_"',failed:"Card name updation failed with _api-error_.",notification:""},lock_charge_card:{success:"Card _masked_card_number_ locked",failed:"Card lock failed with _api-error_.",notification:""},lock_charge_card_card_user:{success:"Card locked",failed:"Card lock failed with _api-error_.",notification:""},unlock_charge_card:{success:"Card _masked_card_number_ unlocked",failed:"Card unlock failed with _api-error_.",notification:""},unlock_charge_card_card_user:{success:"Card unlocked",failed:"Card unlock failed with _api-error_.",notification:""},close_charge_card:{success:"Card _masked_card_number_ closed",failed:"Card close failed with _api-error_.",notification:""},unlock_charge_cards:{success:"_number_of_cards_ unlocked",failed:"Cards unlock failed with _api-error_.",notification:""},lock_charge_cards:{success:"_number_of_cards_ locked",failed:"Cards lock failed with _api-error_.",notification:""},close_charge_cards:{success:"_number_of_cards_ closed",failed:"Cards close failed with _api-error_.",notification:""},revoke_invite_charge_cards:{success:"Invite revoked for _number_of_cards_",failed:"Invite revoke failed with _api-error_.",notification:""},create_schedule:{success:'Schedule created for "_vendor_name_"',failed:"Schedule creation failed with _api-error_.",notification:""},save_schedule:{success:'Schedule saved for "_vendor_name_"',failed:"Save schedule failed with _api-error_.",notification:""},je_posted:{success:"JE Posted",failed:"JE Posting failed with _api-error_.",notification:""},actual_matching_match_and_reverse:{success:"Reversed _count_ accruals from _vendor_name_",failed:"Could not reverse accruals from _vendor_name_",notification:"Reversed _count_ accruals from _vendor_name_. Some could not be reversed."},actual_matching_undo_reversal:{success:"Undid _count_ reversal(s) for _vendor_name_",failed:"Could not undo reversal(s) for _vendor_name_",notification:"Undid _count_ reversal(s) for _vendor_name_. Some could not be undone."},actual_matching_ignore_suggestion:{success:"Ignored match suggestion for _vendor_name_",failed:"Could not ignore match suggestion for _vendor_name_",notification:""},ignore_schedule:{success:"Schedule Ignored",failed:"Schedule Ignore failed with _api-error_.",notification:""},revert_schedule:{success:"Schedule reverted",failed:"Revert failed with _api-error_.",notification:""},ignore_accrual:{success:"Accrual skipped",failed:"Skip accrual failed with _api-error_.",notification:""},revert_accrual:{success:"Accrual reverted",failed:"Revert accrual failed with _api-error_.",notification:""},delete_schedule:{success:'Schedule deleted for "_vendor_name_"',failed:"Delete schedule failed with _api-error_.",notification:""},mark_as_complete_schedule:{success:'Schedule marked as completed for "_vendor_name_"',failed:"Mark as complete schedule failed with _api-error_.",notification:""},cancel_journal_entry:{success:"Accrual Canceled",failed:"Accrual Cancel failed with _api-error_.",notification:""},charge_card_accept_term:{success:"",failed:"_api-error_.",notification:""},charge_card_express_interest:{success:"Interest expressed successfully",failed:"_api-error_.",notification:""},save_task_detail:{success:"",failed:"_api-error_.",notification:""},fetch_task_detail:{success:"Task details fetched successfully.",failed:"_api-error_.",notification:""},delete_task:{success:"",failed:"_api-error_.",notification:""},archive_task:{success:"",failed:"_api-error_.",notification:""},snooze_task:{success:"Task snoozed until _snoozed_until_",failed:"_api-error_.",notification:""},unsnooze_task:{success:"Task unsnoozed",failed:"_api-error_.",notification:""},update_charge_card:{success:"",failed:"_api-error_.",notification:""},notification_settings_saved:{success:"Notification Settings Saved",failed:"_api-error_.",notification:""},referral_invite_sent:{success:"Referral Invite Sent",failed:"_api-error_.",notification:""},notification_mark_as_read:{success:"Notifications marked as read successfully.",failed:"Something went wrong! Please try again.",notification:""},settings_accounting_accounts_updated:{success:"Accounts saved",failed:"",notification:""},task_group_creation_success:{success:"Task group created successfully",failed:"Task group creation failed",notification:""},task_group_deletion_success:{success:"Task group deleted successfully",failed:"Task group deletion failed",notification:""},task_group_update_success:{success:"Task group updated successfully",failed:"Task group update failed",notification:""},primary_funding_account_updated:{success:"Bank account updated for _productType_.",failed:"",notification:""},task_time_spent_validation:{success:"",failed:"Time can't exceed 99h 59m",notification:""},missing_receipts_attachment:{success:"",failed:"Failed to upload attachment__message__ please try again!",notification:""},flux_analysis_reviewed:{success:"_vendors_count_ _vendor_ reviewed",failed:"_api-error_.",notification:""},flux_analysis_unreviewed:{success:"_vendors_count_ _vendor_ unreviewed",failed:"_api-error_.",notification:""},express_pay_submit:{success:"Payment scheduled",failed:"_api-error_.",notification:""},recon_transaction_categorize:{success:"Transaction reviewed",failed:"_api-error_.",notification:""},recon_transaction_match:{success:"Transaction matched",failed:"_api-error_.",notification:""},ai_cfo_create_session_and_submit:{success:"",failed:"Something went wrong, please try again!",notification:""},ai_cfo_chat_session_deleted:{success:"Chat session deleted successfully",failed:"_api-error_.",notification:""},treasury_setup:{success:"",failed:"Failed to load Treasury Setup Details! Please try again.",notification:""},treasury_accept_term:{success:"Treasury Terms accepted successfully.",failed:"Failed to accept terms. Please try again.",notification:""},treasury_transfer_money:{success:"Transfer initiated.",failed:"Transfer failed. Please try again.",notification:""},treasury_transfer_money_failed:{success:"",failed:"Transfer failed. Please try again.",notification:""},auto_transfer_rule_create:{success:"Auto transfer rule created successfully.",failed:"_api-error_.",notification:""},auto_transfer_rule_update:{success:"Auto transfer rule updated successfully.",failed:"_api-error_.",notification:""},auto_transfer_rule_delete:{success:"Rule deleted.",failed:"_api-error_.",notification:""},auto_transfer_rule_pause:{success:'Rule paused "__ruleName__"',failed:"_api-error_.",notification:""},auto_transfer_rule_resume:{success:'Rule resumed "__ruleName__"',failed:"_api-error_.",notification:""},treasury_update_portfolio_allocation:{success:"Portfolio allocation updated.",failed:"Portfolio allocation update failed. Please try again!",notification:""},reports_resync:{success:"",failed:"Something went wrong. Please try again.",notification:"No new data available."},invalid_phone_number:{success:"",failed:"Invalid phone number",notification:""},create_transfer_entry:{success:`Expense deleted.
|
|
147
|
-
Transfer created.`,failed:"Unable to create transfer. Please try again.",notification:""},create_transaction:{success:"Transaction created.",failed:"Unable to create transaction. _api-error_",notification:""},accounting_classes_enabled_update:{success:"Accounting Classes setting updated.",failed:"Couldn't update Accounting Classes setting. Please try again.",notification:""},accounting_projects_enabled_update:{success:"Projects setting updated.",failed:"Couldn't update Projects setting. Please try again.",notification:""},accounting_projects_qbo_not_enabled:{success:"",failed:"Please enable projects in QBO before enabling in the Zeni dashboard!",notification:""},capitalization_threshold_update:{success:"Capitalization threshold updated.",failed:"Couldn't update capitalization threshold. Please try again.",notification:""},account_excluded_from_reconciliation:{success:"_account-name_ excluded",failed:"Account exclusion failed",notification:""},account_included_in_reconciliation:{success:"_account-name_ included",failed:"Account inclusion failed",notification:""},confirm_statement_mapping:{success:"",failed:"Couldn't confirm account mapping. Please try again.",notification:""},statement_parsing_in_progress:{success:"_account_name_ parsing in progress",failed:"",notification:""},statement_parsing_complete:{success:"_account_name_ parsing complete. Review _transaction_count_ transactions",failed:"",notification:""},ai_accountant_trigger_job:{success:"AI Accountant job triggered",failed:"Couldn't trigger the job. __reason__",notification:""},credit_agent_update_profile:{success:"Card profile updated successfully.",failed:"Couldn't update card profile. Please try again.",notification:""},credit_agent_save_macro:{success:"Credit agent prompt saved.",failed:"Couldn't save prompt. Please try again.",notification:""},credit_agent_schedule_cron:{success:"Credit score analysis started.",failed:"Couldn't start analysis. Please try again.",notification:""},oauth_consent_approve:{success:"",failed:"OAuth authorization failed. __reason__",notification:""},oauth_consent_invalid_request:{success:"",failed:"Invalid OAuth request. __reason__",notification:""},create_sub_task:{success:"Subtask created successfully",failed:"Subtask creation failed",notification:""},invoicing_dunning_case_resolved:{success:"Dunning case resolved.",failed:"_api-error_.",notification:""},invoicing_dunning_retry:{success:"Payment retry started.",failed:"_api-error_.",notification:""},invoicing_dunning_cancel:{success:"Dunning case cancelled.",failed:"_api-error_.",notification:""},invoicing_dunning_settings_save:{success:"Dunning settings saved.",failed:"_api-error_.",notification:""},invoicing_qbo_backfill:{success:"QuickBooks backfill started.",failed:"_api-error_.",notification:""},invoicing_qbo_sync_health_retry:{success:"Sync task retried.",failed:"_api-error_.",notification:""},invoicing_qbo_settings_save:{success:"QuickBooks settings saved.",failed:"_api-error_.",notification:""},invoicing_branding_save:{success:"Branding settings saved.",failed:"_api-error_.",notification:""},invoicing_discount_archive:{success:"Discount archived.",failed:"_api-error_.",notification:""},invoicing_discount_unarchive:{success:"Discount unarchived.",failed:"_api-error_.",notification:""},invoicing_discount_delete:{success:"Discount deleted.",failed:"_api-error_.",notification:""},invoicing_invoice_reminder_sent:{success:"Reminder sent.",failed:"_api-error_.",notification:""},invoicing_invoice_regenerated:{success:"Invoice regenerated.",failed:"_api-error_.",notification:""},invoicing_invoice_voided:{success:"Invoice voided.",failed:"_api-error_.",notification:""},invoicing_catalog_item_saved:{success:"Product saved.",failed:"_api-error_.",notification:""},invoicing_customer_saved:{success:"Customer saved.",failed:"_api-error_.",notification:""},invoicing_subscription_saved:{success:"Subscription saved.",failed:"_api-error_.",notification:""},invoicing_coupon_saved:{success:"Coupon saved.",failed:"_api-error_.",notification:""},invoicing_invoice_saved:{success:"Invoice saved.",failed:"_api-error_.",notification:""},invoicing_subscription_activated:{success:"Subscription activated.",failed:"_api-error_.",notification:""},invoicing_subscription_cancellation_removed:{success:"Scheduled cancellation removed.",failed:"_api-error_.",notification:""},invoicing_subscription_cancelled:{success:"Subscription cancelled.",failed:"_api-error_.",notification:""},invoicing_subscription_non_renewing:{success:"Subscription set to non-renewing.",failed:"_api-error_.",notification:""},invoicing_subscription_paused:{success:"Subscription paused.",failed:"_api-error_.",notification:""},invoicing_subscription_reactivated:{success:"Subscription reactivated.",failed:"_api-error_.",notification:""},invoicing_subscription_resumed:{success:"Subscription resumed.",failed:"_api-error_.",notification:""},invoicing_subscription_term_end_changed:{success:"Term end updated.",failed:"_api-error_.",notification:""},invoicing_credit_note_saved:{success:"Credit note issued.",failed:"_api-error_.",notification:""},invoicing_payment_recorded:{success:"Payment recorded.",failed:"_api-error_.",notification:""},invoicing_data_import_download:{success:"",failed:"_api-error_.",notification:""}},currency:{currencyCode:"USD",currencySymbol:"$",currency:"United States Dollar",countryCode:"US"},format:{ssnFormat:"###-##-####",tinFormat:"##-#######"},status:{pending:"Pending",reviewed:"Reviewed"},cancel:"Cancel",confirm:"Confirm",continue:"Continue",proceed:"Proceed",next:"Next",noText:"--",privacy:"Zeni Privacy Policy",terms:"Terms and Conditions",privacyPolicyUrl:"https://www.zeni.ai/legal/privacy-policy",termsUrl:"https://www.zeni.ai/legal/terms-of-service",footer:{approve:"Approve",reject:"Reject",resubmit:"Resubmit",continueAnyway:"Continue Anyway",inReview:"In Review",sentForReview:"Sent for Review",linkCard:"Link Card",markAsUnReviewed:"Mark as Unreviewed",markAsReviewed:"Mark as Reviewed",saveForLater:"Save for Later",reconcile:"Reconcile",noThanks:"No, Thanks",letsGetStarted:"Let's Get Started"},completeText:"Complete",incompleteText:"Incomplete",notInitiatedText:"Not Initiated",pendingReviewText:"Pending Review",pendingVerificationText:"Pending Verification",retry:"Retry",verified:"Verified",validation:{emailAddressRequired:"Email address required",invalidEmailAddress:"Invalid email address",invalidUrlAddress:"Invalid URL"},needHelp:{text:"Need Help",hoverPrefix:"Experiencing issues?",hoverSuffix:" Schedule a call"},confirmationPopup:{discardTitle:"Discard unsaved changes?",discardDescription:"Changes are not automatically saved. Your changes will be lost if you continue.",discard:"Discard",areYouSureYouWantToRemove:"Are you sure you want to remove?",areYouSureYouWantToDeleteThis:"Are you sure you want to delete this bank account?",areYouSureYouWantToOverwriteThe:"Are you sure you want to overwrite the data?",previewEmail:"Preview email?",areYouSure:"Are you sure?"},via:"via",cockpit:"cockpit",analytics:"Analytics",filters:{noOptions:"No Options",noMatchesFound:"No Matches Found",userProfileAltText:"Failed to load"},updated:"Updated",hoursAgo:"hours ago",minutesAgo:"a few minutes ago",noMatches:"Nothing matched your search. Please try again!",noReport:"No _item-name_ to display yet!",reloadPage:{label:"Something went wrong, please try again!"},settings:{title:{accounting:"Accounting",approvalRules:"Approval Rules",bankConnections:"Bank Connections",integrations:"Integrations",myProfile:"My Profile",myBankConnections:"My Bank Connections"},subtitle:{myProfile:"Profile Details"},label:{primary:"Primary",billPay:"Bill Pay",noManager:"No Manager"},infoText:{accounting:"Quick access to manage the company's accounting-related settings",approvalRules:"Quick access to manage the multi-level approval rules for bills & reimbursements to make Zeni work better for you",businessVerification:"Financial regulations require Zeni to collect both identity & company details to verify your business",companyDetails:"Quick access to manage the company's detailed information"},bankConnectionHeader:{productType:"Products",primaryAccount:"Primary Account",linkAccount:"QBO Linked Account",balance:"Balance"},bankConnectionListHeader:{other:"Other Connections"},productNameByType:{bill_pay:"Bill Pay",reimbursement:"Reimbursements",zeni_accounts:"Checking",zeni_treasury:"Treasury",charge_cards:"Cards"},otherAccount:{subTitle:"Not assigned",subTitleSmall:"not assigned",remove:"Remove Connection"},notifications:{sectionTitle:{reminders:"Reminders",monthEndInsights:"Month-end Insights"},frequency:{biWeekly:"Bi-Weekly"},mode:{email:"Email",dashboard:"Dashboard"},taskNotifications:{sectionTitle:"Task Notifications",groupCount:"({active}/{total})",channelLabels:{slack:"Slack"},frequencyLabels:{instant:"Instant",daily:"Daily"},expandGroupAriaLabel:"Expand {group}",collapseGroupAriaLabel:"Collapse {group}"},reminders:{missingReceiptNotification:"Missing Receipts:",pendingTaskNotification:"Pending Tasks:",uncategorizedTransactionNotification:"Uncategorized Transactions:",pendingBillApprovalNotification:"Bill Approvals:",pendingReimbursementApprovalNotification:"Reimbursement Approvals:"},monthEndInsights:{labels:{notifyMe:"Notify Me:",notifyOthers:"Notify Others:"},userFieldPlaceholder:"Who should receive this email?",stopReceivingEmailsText:"To stop receiving this email, reach out to",stopReceivingMonthEndInsightsSubject:"Stop Month End Insights"},reminderFrequencyOptions:[{label:"Daily",value:"daily"},{label:"Weekly",value:"weekly"},{label:"Bi-weekly",value:"bi-weekly"},{label:"Monthly",value:"monthly"}]},integrations:{aiAgents:{accountant:{tagline:"Day-to-day books",description:"Runs your books continuously — categorizes transactions, reconciles bank and card feeds, drafts journal entries, and manages AP/AR aging without manual intervention.",tags:["Auto categorization","Reconciliation","Receipt matching","Journal entries","Bill drafting","AP/AR aging","Flux analysis"]},cfo:{tagline:"Strategic finance",description:"Answers any financial question in real time — builds forecasts, surfaces weekly and monthly insights, analyzes vendor exposure, and tracks collections and cash position.",tags:["Any financial question","Forecasting","Monthly insights","Spend analysis","Vendor exposure","Collections"]}},progress:{headlineTemplate:"{connected} of {total} areas connected — your AI agents are running at {coverage}% coverage",description:"{total} areas need attention. Each connection unlocks new AI capabilities — the more you connect, the less manual work for your team."},tabs:{ledger:{title:"Ledger",pillTitle:"Ledger",description:"Connect your ledger and watch your AI team go to work."},banks:{title:"Banks and corporate cards",pillTitle:"Banks and cards",description:"Connect any accounts you have access to."},revenue:{title:"Revenue and payments",pillTitle:"Revenue & payments",description:"Connect any tools you use — mix and match as needed."},payroll:{title:"Payroll and HR",pillTitle:"Payroll and HR",description:"People costs and headcount intelligence."},email:{title:"Email and calendar",pillTitle:"Email and calendar",description:"Financial context that lives outside your ledger."}},badges:{connected:"Connected",notConnected:"Not Connected",comingSoon:"Coming Soon",active:"Active",inactive:"Inactive"},aiCapabilityHeader:{heading:"What your AI Agents can see",subheadingConnected:"{{areasConnected}} connected — connect more areas to unlock full AI capability.",subheadingEmpty:"Connect any area to unlock AI capabilities.",footnote:"Connect what you use — you do not need all five areas for AI Agents to deliver value."},recommended:{first:"Recommended first",second:"Recommended second",third:"Recommended third",fourth:"Recommended fourth",fallback:"Recommended next"},aiBenefits:{ledger:{accountant:"AI Accountant runs your books continuously, no manual work.",cfo:"AI CFO grounds every answer in your live general ledger."},banks:{accountant:"AI Accountant does faster close through automatic reconciliation.",cfo:"AI CFO answers with real time precision."},revenue:{accountant:"AI Accountant drafts revenue JEs and matches invoices automatically.",cfo:"AI CFO tracks MRR, churn, and ARR in real time."},payroll:{accountant:"AI Accountant handles payroll journal entries automatically.",cfo:"AI CFO tracks headcount cost in real time."},email:{accountant:"AI Accountant handles every emailed receipt, invoice, and itinerary.",cfo:"AI CFO catches commitments and gaps before the close.",accountantBullets:[{iconKey:"receipt-email",text:"Receipts matched and auto-drafted JEs"},{iconKey:"calendar",text:"Calendar context on every expense"},{iconKey:"bills",text:"Vendor invoices ingested and journalized"},{iconKey:"reimbursements",text:"Travel expenses built automatically"}],cfoBullets:[{iconKey:"notification",text:"Subscription renewal radar"},{iconKey:"search",text:"Pre close gap detection"}]},unlocksAccountantCta:"What it unlocks for AI Accountant",unlocksCfoCta:"What it unlocks for AI CFO",unlocksCombinedCta:"What it unlocks for AI Accountant + AI CFO"},plaidCard:{title:"Bank accounts and credit cards",subtitle:"Connected via Plaid — covers checking, savings, and all major credit cards.",worksWithLabel:"Works with",worksWithInstitutions:["Chase","Wells Fargo","Bank of America","Amex","Citi","Capital One","+12,000 more"],accountMaskSuffix:" · Connected via Plaid",addAccountButton:"Add account or card",loadingState:"Loading your bank accounts…",emptyStateNotConnected:"Connect your first bank account to get started.",connectButton:"Connect via Plaid"},corporateSpend:{heading:"Corporate spend platforms",subtitle:"Native direct connections — richer than Plaid because receipts are already matched, spend is pre-categorized, and employee analytics are included.",directConnectionNote:"Direct connection — not via Plaid"},emailCard:{title:"Connect your inbox and calendar",subtitle:"Read only — receipts and invoices only — nothing stored."},actions:{configure:"Configure",connect:"Connect",disconnect:"Disconnect",notifyMe:"Notify Me",notifyMeQueued:"We'll notify you",reconnect:"Reconnect"},disconnectDialog:{title:"Disconnect {connectorName}",description:"Are you sure you want to disconnect {connectorName}? Zeni will no longer be able to query your {connectorName} data through AI CFO chat. You can reconnect at any time.",disconnecting:"Disconnecting..."},comingSoonFooter:"Coming soon",cards:{quickbooks:{name:"QuickBooks Online",description:"Read and write ledger of record. Invoices, expenses, GL, chart of accounts, journal entries.",capability:"Activates AI Accountant auto categorization, reconciliation, and the full journal entry engine — gives AI CFO its financial foundation for every answer and forecast.",footerText:"Takes about 2 mins",refreshTooltip:"Sync QuickBooks changes to your dashboard"},netsuite:{name:"NetSuite",description:"Enterprise ERP — multi entity consolidation, advanced revenue recognition, GL across subsidiaries.",capability:"Enables both AI Agents to operate across subsidiaries with consolidated close and multi entity reporting.",footerText:"For multi-entity companies"},plaid:{name:"Plaid",description:"Bank account connections — cash balances, real-time transactions, statement-level history.",capability:"Feeds AI Accountant the daily cash and card activity that powers reconciliation, missing-receipt detection, and live balance views for AI CFO.",footerText:"Takes about 1 min"},brex:{name:"Brex",description:"Corporate card and spend management — real time transactions, receipts, spend controls, and employee analytics.",capability:"AI Accountant gets receipt data already attached and spend categorized at source — significantly higher reconciliation accuracy than a bank feed alone."},ramp:{name:"Ramp",description:"Corporate card and spend management — real time transactions, receipt matching, vendor management, and savings insights.",capability:"AI Accountant accesses Ramp's already categorized spend and matched receipts — fewer corrections, cleaner journal entries, faster close."},chargebee:{description:"Subscription analytics — MRR, ARR, churn, active subscriptions.",capability:"AI Accountant handles subscription revenue journal entries each month — AI CFO gains full ARR waterfall for churn analysis and forecasting.",dialog:{title:"Connect ChargeBee",description:"Enter your ChargeBee site and API key to connect. You can find your API key in ChargeBee under Settings › Configure ChargeBee › API Keys.",siteLabel:"Site / Subdomain",sitePlaceholder:"your-site",siteHintPrefix:"The subdomain of your ChargeBee URL: ",siteHintSuffix:".chargebee.com",apiKeyLabel:"API Key",apiKeyPlaceholder:"Enter your API key",readOnlyRecommendation:"We recommend using a read-only API key — Zeni only needs read access to your subscription data. In ChargeBee, select “Read-Only Key” when creating the key."}},stripe:{name:"Stripe",description:"Payment processing — charges, refunds, payouts, disputes, MRR.",capability:"AI Accountant reconciles every payment and handles all related journal entries — AI CFO tracks real time MRR and payment trends.",dialog:{title:"Connect Stripe",description:"Enter a Stripe restricted API key. Create one in Stripe under Developers › API keys › Create restricted key. Grant read-only access to Charges, Refunds, Disputes, Payouts, and Balance.",apiKeyLabel:"Restricted API Key",apiKeyPlaceholder:"rk_live_...",readOnlyRecommendation:"We recommend a restricted key with read-only scopes only — Zeni never needs write access to your Stripe account."}},mercury:{name:"Mercury",description:"Business banking — account balances, transactions, statements.",capability:"Feeds AI Accountant daily Mercury cash and card activity for reconciliation and gives AI CFO live cash balances across accounts.",dialog:{title:"Connect Mercury",description:"Enter a Mercury API token. Create one in Mercury under Settings › Tokens & API › New token. Grant read-only access to Accounts and Transactions.",apiKeyLabel:"API Token",apiKeyPlaceholder:"secret-token-...",readOnlyRecommendation:"We recommend a read-only token — Zeni never needs write access to your Mercury accounts."}},paypal:{name:"PayPal",description:"Online payments — balance, transaction history, payouts.",capability:"Lets AI CFO see PayPal collected revenue, refunds, and payouts alongside Stripe and bank cash.",dialog:{title:"Connect PayPal",description:"Enter your PayPal REST API client ID and secret. Create them in the PayPal Developer dashboard under Apps & Credentials › Live › Create App. Enable Transaction Search, Invoicing, Subscriptions, and Disputes Read on the app.",clientIdLabel:"Client ID",clientIdPlaceholder:"AeA1...",clientSecretLabel:"Secret",clientSecretPlaceholder:"Enter your client secret",readOnlyRecommendation:"Zeni only needs read access to your PayPal data — leave write features (e.g. Payments) disabled on the app you create."}},hubspot:{name:"HubSpot",description:"CRM and sales pipeline — deals, contacts, close rates, forecasting.",capability:"AI CFO connects pipeline to actuals for precise revenue forecasts and close rate analysis."},billDotCom:{name:"Bill.com",description:"AP and AR workflows — vendor bills, customer invoices, payments, approvals.",capability:"AI Accountant drafts bills, handles all AP and AR journal entries, and tracks aging — AI CFO surfaces vendor insights and cash flow forecasts."},gusto:{name:"Gusto",description:"Payroll, benefits, contractor pay — runs, taxes, and headcount.",capability:"Gives AI Accountant payroll-aware journal entries and lets AI CFO break down compensation by team and role."},rippling:{name:"Rippling",description:"HRIS, payroll, and IT — unified people data.",capability:"Lets AI CFO trace headcount, role, and comp changes through the financial picture — no manual spreadsheets."},moreProviders:{name:"More providers",description:"ADP, Paychex, Justworks and others — tell us what you use.",requestButtonLabel:"Request"},gmail:{name:"Gmail",description:"Email context — invoice attachments, vendor threads, payment confirmations.",capability:"Feeds AI Accountant the supporting docs sitting in inbox threads — receipts, bills, and payment confirmations land in the ledger automatically."},outlook:{name:"Microsoft 365",description:"Outlook — Exchange — Microsoft Calendar",capability:"AI Accountant reads receipt emails to match transactions and determine the right accounting treatment, then drafts the correct journal entry without anyone asking."}},connectorTooltips:{accountantSectionLabel:"AI Accountant",cfoSectionLabel:"AI CFO",quickbooks:{heading:"What you unlock by connecting QuickBooks",accountantBullets:["Auto-categorizes every transaction into your chart of accounts.","Reconciles bank, card, and ledger lines end-to-end.","Drafts the journal entries that close your books."],cfoBullets:["Grounds every forecast and answer in your live ledger.","Powers cash, burn, and runway in the dashboard."]},netsuite:{heading:"What you will unlock by connecting NetSuite",accountantBullets:["Consolidates close across every subsidiary in your structure.","Drafts multi-entity GL with intercompany eliminations.","Handles advanced revenue recognition schedules."],cfoBullets:["Rolls cash, burn, and runway up across all subsidiaries.","Forecasts respect entity-level transfer pricing and FX."]},plaid:{heading:"What you unlock by connecting banks & cards",accountantBullets:["Live bank and card feeds give AI Accountant everything it needs to automatically reconcile every transaction the moment it lands.","No waiting for exports, no manual matching at month end.","Each account connected means more transactions reconciled automatically and a close that takes days instead of weeks."],cfoBullets:["Every connected account gives AI CFO live cash position, accurate burn rate, and runway answers based on what is actually in the bank right now and not last month's close.","The richer your data, the more precise every answer becomes."]},brex:{heading:"What you unlock by connecting Brex",accountantBullets:["Receipts arrive pre-attached — no chasing employees at month end.","Spend is categorized at source, with merchant and policy context.","Reconciliation accuracy lifts significantly vs. a bank feed alone."],cfoBullets:["Burn drilldowns by department, employee, and vendor.","Live policy-violation flags surface in the cash review."]},ramp:{heading:"What you unlock by connecting Ramp",accountantBullets:["Matched receipts and pre-categorized spend arrive ready to post.","Vendor management context cleans up duplicates and renames.","Fewer corrections in the close — journal entries land cleaner."],cfoBullets:["Vendor-level spend forecasts with renewal and contract dates.","Savings insights flow into the runway model automatically."]},mercury:{heading:"What you unlock by connecting Mercury",accountantBullets:["Direct Mercury feed gives AI Accountant transaction details without Plaid latency.","Wires, ACH, and card spend reconcile against the ledger automatically."],cfoBullets:["Live operating cash, runway, and reserve balances in the dashboard.","Treasury yield surfaces in cash position views."]},stripe:{heading:"What you unlock by connecting Stripe",accountantBullets:["Reconciles every charge, refund, payout, and dispute end-to-end.","Posts the fee and Stripe-balance journal entries for you.","Handles foreign-currency settlements and FX gain/loss."],cfoBullets:["Live MRR and payment-trend telemetry in the dashboard.","Dispute and refund signal feeds churn and risk forecasts."]},paypal:{heading:"What you unlock by connecting PayPal",accountantBullets:["PayPal sales, refunds, and fees post to the ledger automatically.","Multi-currency conversions are matched and journaled per ASC 830."],cfoBullets:["PayPal-driven revenue and refunds flow into MRR and churn metrics.","Held-funds visibility in the cash position view."]},hubspot:{heading:"What you unlock by connecting Hubspot",accountantBullets:[],cfoBullets:["Live MRR and payment-trend telemetry in the dashboard.","Dispute and refund signal feeds churn and risk forecasts."]},chargebee:{heading:"What you unlock by connecting Chargebee",accountantBullets:["Monthly subscription revenue journal entries posted automatically.","Deferred revenue + accrual schedules drafted from your billing data.","Refunds, credits, and proration handled per ASC 606."],cfoBullets:["Full ARR waterfall — new, expansion, contraction, churn.","Cohort churn and forecast scenarios in the dashboard."]},billDotCom:{heading:"What you unlock by connecting Bill.com",accountantBullets:["Monthly subscription revenue journal entries posted automatically.","Deferred revenue + accrual schedules drafted from your billing data.","Refunds, credits, and proration handled per ASC 606."],cfoBullets:["Full ARR waterfall — new, expansion, contraction, churn.","Cohort churn and forecast scenarios in the dashboard."]},gusto:{heading:"What you unlock by connecting Gusto",accountantBullets:["Every pay run drafts journal entries across salaries, benefits, taxes, and contractor payments.","Tax filings and benefits accruals land in the ledger every period."],cfoBullets:["Fully-loaded cost per head by department, live.","Headcount spend vs. budget answers without spreadsheets."]},rippling:{heading:"What you unlock by connecting Rippling",accountantBullets:["Payroll, benefits, and contractor payments post journal entries automatically.","Stock-comp and equity events flow into the ledger as configured."],cfoBullets:["Fully-loaded comp visibility by department, role, and location.","Headcount-driven runway scenarios update in real time."]},gmail:{heading:"What you unlock by connecting Gmail",accountantBullets:["Receipts to JEs — reads receipt emails, matches them to transactions, drafts the journal entry.","Calendar context cross-checks client, event, and business purpose on every expense.","Invoice attachments are detected, parsed into Bills, and journaled on arrival.","Travel reports are built automatically from flight and hotel confirmations."],cfoBullets:["Renewal radar surfaces upcoming renewals and pricing changes before charges hit.","Pre-close gap scan catches unreconciled invoices and receipts before month end."]},outlook:{heading:"What you unlock by connecting Outlook",accountantBullets:["Reads receipt emails to match transactions and draft the right journal entry.","Detects invoice attachments and posts them straight into AP.","Builds travel reports from flight and hotel confirmations."],cfoBullets:["Renewal radar surfaces upcoming renewals and pricing changes before charges hit.","Pre-close gap scan catches unreconciled invoices and receipts before month end."]}},areaTooltips:{ledger:{heading:"What you unlock by connecting your ledger",accountantBullets:["Categorizes every transaction into your chart of accounts.","Reconciles bank, card, and GL lines and drafts journal entries."],cfoBullets:["Grounds every forecast and answer in your live ledger.","Powers cash, burn, and runway in the dashboard."]},banks:{heading:"What you unlock by connecting banks & cards",accountantBullets:["Live bank and card feeds give AI Accountant everything it needs to automatically reconcile every transaction the moment it lands. No waiting for exports, no manual matching at month end. Each account connected means more transactions reconciled automatically and a close that takes days instead of weeks."],cfoBullets:["Every connected account gives AI CFO live cash position, accurate burn rate, and runway answers based on what is actually in the bank right now and not last month's close. The richer your data, the more precise every answer becomes."]},revenue:{heading:"What you unlock by connecting revenue & payments",accountantBullets:["Charges, refunds, payouts, and disputes reconcile end-to-end.","Subscription billing posts revenue and deferred-revenue schedules per ASC 606."],cfoBullets:["Full ARR waterfall — new, expansion, contraction, churn.","Live MRR and payment-trend telemetry in the dashboard."]},payroll:{heading:"What you unlock by connecting payroll & HR tools",accountantBullets:["Every pay run generates journal entries across salaries, benefits, taxes, and contractor payments. AI Accountant reads your payroll data and automatically drafts, schedules, and maintains all of these every period — so your books reflect payroll costs accurately without anyone entering a line item."],cfoBullets:['With payroll connected, AI CFO can answer "what is our fully loaded cost per head by department?" and "how does headcount spend compare to budget?" with live data and not a spreadsheet someone pulled last week.']},email:{heading:"What you unlock by connecting email & calendar tools",accountantBullets:[{title:"Receipts to JEs",body:"Reads receipt emails, matches them to transactions, drafts the right journal entry."},{title:"Calendar",body:"When a receipt arrives, cross-checks your calendar to prefill client, event, and business purpose on every expense."},{title:"Invoices auto-posted",body:"Detects invoice attachments, parses them into Bills, and posts the journal entry on arrival right away."},{title:"Travel reports built",body:"Reconciles flight and hotel confirmations to build full travel reports — name, dates, purpose prefilled."}],cfoBullets:[{title:"Renewal radar",body:"Surfaces renewal and pricing-change emails before charges hit your card."},{title:"Pre-close gap scan",body:"Scans for unreconciled invoices and receipts before month end — gaps land pre-close, not after."}]}}}},copyToClipBoard:{copied:"Copied"},aiAgentsActivatingPage:{navTitle:"AI Agents are activating",sidebar:{connectLedger:"Connect Ledger",connectLedgerSubtitle:"Quickbooks or Netsuite",connectDataSource:"Connect Data Sources",connectDataSourceSubtitle:"Bank, revenue, payroll and more...",setUpBilling:"Set up billing",setUpBillingSubtitle:"Your zeni subscription",verify:"Verify",verifySubtitle:"Unlock your finance stack"},ledgerSection:{title:"QBO connected. Your AI team is reading your books.",subtitle:"Your finance graph and personalized AI models are being built. Here's what's happening right now.",readyInLabel:"Will be ready in 2 hrs",workingPillLabel:"Working",buildingPillLabel:"Building",readingCountsSubtitle:"Reading __transactionCount__ transactions and __glAccountCount__ GL accounts.",rows:[{title:"Reading chart of accounts and transactions",subtitle:"Reading your chart of accounts and transactions."},{title:"Building your company's finance graph",subtitle:"Finance graph built — vendors, accounts, and cash flow patterns mapped."},{title:"Configuring reconciliation and flux analysis",subtitle:"Reconciliation engine configured and flux analysis running."},{title:"AI CFO financial foundation established",subtitle:"AI CFO financial foundation established — ready to answer questions."}]},backgroundSection:{title:"Deeper AI work running in the background",subtitle:"No action required!",readyInLabel:"Will be ready in 2-4 hrs",startingPillLabel:"Starting",rows:[{title:"Fine-tuning LLM models for {tenantName}",subtitle:"Personalizing to your vendors, accounts, and transaction patterns — informed by 1,000+ Zeni customers and $20B in transactions."},{title:"Configuring RAG-based financial knowledge graph",subtitle:"Building a retrieval layer over your entire financial history — directly improves AI Accountant's transaction categorization accuracy."},{title:"Creating personalized financial context for {tenantName}",subtitle:"Your AI Agents will know your industry, seasonality, vendor relationships, and close patterns before you ask a single question."}]},footerButtonLabel:"Continue to connect more sources"},monthsByIndex:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"},oauthConsent:{invalidRequestTitle:"Invalid Authorization Request",authorizeTitle:"Authorize __clientName__",accessSubtitle:"wants to access your Zeni financial data.",signedOutHeadlineSuffix:"wants to access your Zeni financial data",signInToContinue:"Sign in to continue",signIn:"Sign In",signedInAs:"Signed in as __email__",permissionsLabel:"This will allow __clientName__ to:",permissionReadFinancials:"Read your financial data and reports",permissionAccessTransactions:"Access transaction and account information",permissionQueryAi:"Query your Zeni AI assistant on your behalf",selectCompany:"Select a company",company:"Company",allow:"Allow",deny:"Deny"}},download:{errorMessages:{fileDownloadError:"Download __feature__ Failed with"},defaultFileName:"Report.xlsx"},balanceCard:{cashBalanceSectionTitle:"Total Cash Balance",cardBalanceSectionTitle:"Total Card Balance",comparedTo:"compared to",noBalanceText:"No balance data to display yet!"},insightsCard:{vs:"vs",askSomethingElse:"Ask something else?",no_data:{label:"Cash, Opex, Revenue, COS, and Cash In Cash Out Insights, will appear once you have sufficient financial activity. Stay tuned! 💸"}},timeframe:{day:"Days",week:"Weeks",free_range:"Time period"},compareSwitchLabel:"Compare",compareMode:{compare_mode_percent:"Percentage"},chartCard:{no_data_available:"No data available!",no_data_available_for:"No data available for",forecast_dropdown:{forecast_source:"Via Quickbooks",forecast_invalid_issue:"This period is not in the time frame of the actuals. Please view it via the Forecast tab."},netBurnOrIncome:{expenses:"OPEX",no_data_available:"A minimum of one-month data is required!"},netBurnOrIncomeCalculator:{title:"Burn Rate Calculator",accounting_method:{label:"Configure Burn Rate, Runway, and Cash Zero date based on below options:",ebitda:"EBITDA"},time_span_id_for_average:{label:"Further configure Burn Rate, Runway, and Cash Zero date based on below options:",last_month:"Last month",last_completed_month:"Last completed month",average_of_last_2_months:"Average of last 2 completed months",average_of_last_3_months:"Average of last 3 completed months",under_review_last_month_label:"(Including Under Review)"}},no_data:{revenue:"No revenues to display yet, but thrift is a great revenue. Fight On!🤘",cash_in_cash_out:"No cash in cash out to display yet!",cash_position:"No cash position to display yet!",net_burn_or_income:"No net burn to display yet!",operating_expenses:"No operating expenses to display yet!",top_expenses:{this_week_to_date:"No expenses this week 🤷",last_week:"No expenses last week 🤷",this_month_to_date:"No expenses this month 🤷",last_month:"No expenses last month 🤷",last_3_months:"No expenses last 3 months 🤷",last_6_months:"No expenses last 6 months 🤷",last_12_months:"No expenses last 12 months 🤷",this_year_to_date:"No expenses this year 🤷",last_year:"No expenses last year 🤷"},aging_report:"No data to display yet!"}},drawerMenus:{home:"Home",users_and_roles:"Users & Roles",storybooks:"Storybooks",new_chat:"New Chat",explore:"Explore",search_chats:"Search Chats",command_center:"AI Close",task_checklist:"Task Checklist",reconciliation:"Reconciliations",invoicing_settings_quickbooks:"QBO Configuration"},drawerMenuSubtitles:{rewards:"Earn up to __reward-amount__ per referral"},drawerGroups:{finance:"Finance",spend_management:"Spend Management",ai_intelligence:"AI Intelligence",close_management:"Your AI Agents",banking:"Banking",administration:"Administration",personal_settings:"Personal Settings",ai_cfo:"",invoicing_setup:"Setup"},dashboardDropDownList:{menuOption:{logout:{value:"logout"},my_profile:{value:"my_profile"},referrals:{label:"Referrals",value:"referrals",referralSubText:{earn:"Earn up to __reward-amount__",suffix:" for every new company you refer to Zeni"}}}},transactionType:{creditMemo:"Credit Memo",salesReceipt:"Sales Receipt",vendorCredit:"Vendor Credit",journalEntry:"Journal Entry"},signIn:{heading:"Welcome to Zeni",confirmationLinkSent:"Sign-in link sent",message:"Your financial dashboard is just one step away. Get started.",autoLogoutHeading:"You've been logged out",autoLogoutMessagePrefix:"For your security, this session expired after ",autoLogoutMessageSuffix:" of inactivity.",signInSecurelyMessage:"Choose an account to sign in securely",signInGoogleButton:"Sign In With Google",signInMicrosoftButton:"Sign In With Microsoft",termsPrivacyFinePrintPart:"By creating an account on Zeni, you confirm that you ",agreeWith:"agree with our ",privacyPolicy:"privacy policy",signInError:`Couldn’t sign-in to your account.
|
|
147
|
+
Transfer created.`,failed:"Unable to create transfer. Please try again.",notification:""},create_transaction:{success:"Transaction created.",failed:"Unable to create transaction. _api-error_",notification:""},accounting_classes_enabled_update:{success:"Accounting Classes setting updated.",failed:"Couldn't update Accounting Classes setting. Please try again.",notification:""},accounting_projects_enabled_update:{success:"Projects setting updated.",failed:"Couldn't update Projects setting. Please try again.",notification:""},auto_review_income_without_customer_update:{success:"Customers setting updated.",failed:"Couldn't update Customers setting. Please try again.",notification:""},accounting_projects_qbo_not_enabled:{success:"",failed:"Please enable projects in QBO before enabling in the Zeni dashboard!",notification:""},capitalization_threshold_update:{success:"Capitalization threshold updated.",failed:"Couldn't update capitalization threshold. Please try again.",notification:""},account_excluded_from_reconciliation:{success:"_account-name_ excluded",failed:"Account exclusion failed",notification:""},account_included_in_reconciliation:{success:"_account-name_ included",failed:"Account inclusion failed",notification:""},confirm_statement_mapping:{success:"",failed:"Couldn't confirm account mapping. Please try again.",notification:""},statement_parsing_in_progress:{success:"_account_name_ parsing in progress",failed:"",notification:""},statement_parsing_complete:{success:"_account_name_ parsing complete. Review _transaction_count_ transactions",failed:"",notification:""},ai_accountant_trigger_job:{success:"AI Accountant job triggered",failed:"Couldn't trigger the job. __reason__",notification:""},credit_agent_update_profile:{success:"Card profile updated successfully.",failed:"Couldn't update card profile. Please try again.",notification:""},credit_agent_save_macro:{success:"Credit agent prompt saved.",failed:"Couldn't save prompt. Please try again.",notification:""},credit_agent_schedule_cron:{success:"Credit score analysis started.",failed:"Couldn't start analysis. Please try again.",notification:""},oauth_consent_approve:{success:"",failed:"OAuth authorization failed. __reason__",notification:""},oauth_consent_invalid_request:{success:"",failed:"Invalid OAuth request. __reason__",notification:""},create_sub_task:{success:"Subtask created successfully",failed:"Subtask creation failed",notification:""},invoicing_dunning_case_resolved:{success:"Dunning case resolved.",failed:"_api-error_.",notification:""},invoicing_dunning_retry:{success:"Payment retry started.",failed:"_api-error_.",notification:""},invoicing_dunning_cancel:{success:"Dunning case cancelled.",failed:"_api-error_.",notification:""},invoicing_dunning_settings_save:{success:"Dunning settings saved.",failed:"_api-error_.",notification:""},invoicing_qbo_backfill:{success:"QuickBooks backfill started.",failed:"_api-error_.",notification:""},invoicing_qbo_sync_health_retry:{success:"Sync task retried.",failed:"_api-error_.",notification:""},invoicing_qbo_settings_save:{success:"QuickBooks settings saved.",failed:"_api-error_.",notification:""},invoicing_branding_save:{success:"Branding settings saved.",failed:"_api-error_.",notification:""},invoicing_discount_archive:{success:"Discount archived.",failed:"_api-error_.",notification:""},invoicing_discount_unarchive:{success:"Discount unarchived.",failed:"_api-error_.",notification:""},invoicing_discount_delete:{success:"Discount deleted.",failed:"_api-error_.",notification:""},invoicing_invoice_reminder_sent:{success:"Reminder sent.",failed:"_api-error_.",notification:""},invoicing_invoice_regenerated:{success:"Invoice regenerated.",failed:"_api-error_.",notification:""},invoicing_invoice_voided:{success:"Invoice voided.",failed:"_api-error_.",notification:""},invoicing_catalog_item_saved:{success:"Product saved.",failed:"_api-error_.",notification:""},invoicing_customer_saved:{success:"Customer saved.",failed:"_api-error_.",notification:""},invoicing_subscription_saved:{success:"Subscription saved.",failed:"_api-error_.",notification:""},invoicing_coupon_saved:{success:"Coupon saved.",failed:"_api-error_.",notification:""},invoicing_invoice_saved:{success:"Invoice saved.",failed:"_api-error_.",notification:""},invoicing_subscription_activated:{success:"Subscription activated.",failed:"_api-error_.",notification:""},invoicing_subscription_cancellation_removed:{success:"Scheduled cancellation removed.",failed:"_api-error_.",notification:""},invoicing_subscription_cancelled:{success:"Subscription cancelled.",failed:"_api-error_.",notification:""},invoicing_subscription_non_renewing:{success:"Subscription set to non-renewing.",failed:"_api-error_.",notification:""},invoicing_subscription_paused:{success:"Subscription paused.",failed:"_api-error_.",notification:""},invoicing_subscription_reactivated:{success:"Subscription reactivated.",failed:"_api-error_.",notification:""},invoicing_subscription_resumed:{success:"Subscription resumed.",failed:"_api-error_.",notification:""},invoicing_subscription_term_end_changed:{success:"Term end updated.",failed:"_api-error_.",notification:""},invoicing_credit_note_saved:{success:"Credit note issued.",failed:"_api-error_.",notification:""},invoicing_payment_recorded:{success:"Payment recorded.",failed:"_api-error_.",notification:""},invoicing_data_import_download:{success:"",failed:"_api-error_.",notification:""}},currency:{currencyCode:"USD",currencySymbol:"$",currency:"United States Dollar",countryCode:"US"},format:{ssnFormat:"###-##-####",tinFormat:"##-#######"},status:{pending:"Pending",reviewed:"Reviewed"},cancel:"Cancel",confirm:"Confirm",continue:"Continue",proceed:"Proceed",next:"Next",noText:"--",privacy:"Zeni Privacy Policy",terms:"Terms and Conditions",privacyPolicyUrl:"https://www.zeni.ai/legal/privacy-policy",termsUrl:"https://www.zeni.ai/legal/terms-of-service",footer:{approve:"Approve",reject:"Reject",resubmit:"Resubmit",continueAnyway:"Continue Anyway",inReview:"In Review",sentForReview:"Sent for Review",linkCard:"Link Card",markAsUnReviewed:"Mark as Unreviewed",markAsReviewed:"Mark as Reviewed",saveForLater:"Save for Later",reconcile:"Reconcile",noThanks:"No, Thanks",letsGetStarted:"Let's Get Started"},completeText:"Complete",incompleteText:"Incomplete",notInitiatedText:"Not Initiated",pendingReviewText:"Pending Review",pendingVerificationText:"Pending Verification",retry:"Retry",verified:"Verified",validation:{emailAddressRequired:"Email address required",invalidEmailAddress:"Invalid email address",invalidUrlAddress:"Invalid URL"},needHelp:{text:"Need Help",hoverPrefix:"Experiencing issues?",hoverSuffix:" Schedule a call"},confirmationPopup:{discardTitle:"Discard unsaved changes?",discardDescription:"Changes are not automatically saved. Your changes will be lost if you continue.",discard:"Discard",areYouSureYouWantToRemove:"Are you sure you want to remove?",areYouSureYouWantToDeleteThis:"Are you sure you want to delete this bank account?",areYouSureYouWantToOverwriteThe:"Are you sure you want to overwrite the data?",previewEmail:"Preview email?",areYouSure:"Are you sure?"},via:"via",cockpit:"cockpit",analytics:"Analytics",filters:{noOptions:"No Options",noMatchesFound:"No Matches Found",userProfileAltText:"Failed to load"},updated:"Updated",hoursAgo:"hours ago",minutesAgo:"a few minutes ago",noMatches:"Nothing matched your search. Please try again!",noReport:"No _item-name_ to display yet!",reloadPage:{label:"Something went wrong, please try again!"},settings:{title:{accounting:"Accounting",approvalRules:"Approval Rules",bankConnections:"Bank Connections",integrations:"Integrations",myProfile:"My Profile",myBankConnections:"My Bank Connections"},subtitle:{myProfile:"Profile Details"},label:{primary:"Primary",billPay:"Bill Pay",noManager:"No Manager"},infoText:{accounting:"Quick access to manage the company's accounting-related settings",approvalRules:"Quick access to manage the multi-level approval rules for bills & reimbursements to make Zeni work better for you",businessVerification:"Financial regulations require Zeni to collect both identity & company details to verify your business",companyDetails:"Quick access to manage the company's detailed information"},bankConnectionHeader:{productType:"Products",primaryAccount:"Primary Account",linkAccount:"QBO Linked Account",balance:"Balance"},bankConnectionListHeader:{other:"Other Connections"},productNameByType:{bill_pay:"Bill Pay",reimbursement:"Reimbursements",zeni_accounts:"Checking",zeni_treasury:"Treasury",charge_cards:"Cards"},otherAccount:{subTitle:"Not assigned",subTitleSmall:"not assigned",remove:"Remove Connection"},notifications:{sectionTitle:{reminders:"Reminders",monthEndInsights:"Month-end Insights"},frequency:{biWeekly:"Bi-Weekly"},mode:{email:"Email",dashboard:"Dashboard"},taskNotifications:{sectionTitle:"Task Notifications",groupCount:"({active}/{total})",channelLabels:{slack:"Slack"},frequencyLabels:{instant:"Instant",daily:"Daily"},expandGroupAriaLabel:"Expand {group}",collapseGroupAriaLabel:"Collapse {group}"},reminders:{missingReceiptNotification:"Missing Receipts:",pendingTaskNotification:"Pending Tasks:",uncategorizedTransactionNotification:"Uncategorized Transactions:",pendingBillApprovalNotification:"Bill Approvals:",pendingReimbursementApprovalNotification:"Reimbursement Approvals:"},monthEndInsights:{labels:{notifyMe:"Notify Me:",notifyOthers:"Notify Others:"},userFieldPlaceholder:"Who should receive this email?",stopReceivingEmailsText:"To stop receiving this email, reach out to",stopReceivingMonthEndInsightsSubject:"Stop Month End Insights"},reminderFrequencyOptions:[{label:"Daily",value:"daily"},{label:"Weekly",value:"weekly"},{label:"Bi-weekly",value:"bi-weekly"},{label:"Monthly",value:"monthly"}]},integrations:{aiAgents:{accountant:{tagline:"Day-to-day books",description:"Runs your books continuously — categorizes transactions, reconciles bank and card feeds, drafts journal entries, and manages AP/AR aging without manual intervention.",tags:["Auto categorization","Reconciliation","Receipt matching","Journal entries","Bill drafting","AP/AR aging","Flux analysis"]},cfo:{tagline:"Strategic finance",description:"Answers any financial question in real time — builds forecasts, surfaces weekly and monthly insights, analyzes vendor exposure, and tracks collections and cash position.",tags:["Any financial question","Forecasting","Monthly insights","Spend analysis","Vendor exposure","Collections"]}},progress:{headlineTemplate:"{connected} of {total} areas connected — your AI agents are running at {coverage}% coverage",description:"{total} areas need attention. Each connection unlocks new AI capabilities — the more you connect, the less manual work for your team."},tabs:{ledger:{title:"Ledger",pillTitle:"Ledger",description:"Connect your ledger and watch your AI team go to work."},banks:{title:"Banks and corporate cards",pillTitle:"Banks and cards",description:"Connect any accounts you have access to."},revenue:{title:"Revenue and payments",pillTitle:"Revenue & payments",description:"Connect any tools you use — mix and match as needed."},payroll:{title:"Payroll and HR",pillTitle:"Payroll and HR",description:"People costs and headcount intelligence."},email:{title:"Email and calendar",pillTitle:"Email and calendar",description:"Financial context that lives outside your ledger."}},badges:{connected:"Connected",notConnected:"Not Connected",comingSoon:"Coming Soon",active:"Active",inactive:"Inactive"},aiCapabilityHeader:{heading:"What your AI Agents can see",subheadingConnected:"{{areasConnected}} connected — connect more areas to unlock full AI capability.",subheadingEmpty:"Connect any area to unlock AI capabilities.",footnote:"Connect what you use — you do not need all five areas for AI Agents to deliver value."},recommended:{first:"Recommended first",second:"Recommended second",third:"Recommended third",fourth:"Recommended fourth",fallback:"Recommended next"},aiBenefits:{ledger:{accountant:"AI Accountant runs your books continuously, no manual work.",cfo:"AI CFO grounds every answer in your live general ledger."},banks:{accountant:"AI Accountant does faster close through automatic reconciliation.",cfo:"AI CFO answers with real time precision."},revenue:{accountant:"AI Accountant drafts revenue JEs and matches invoices automatically.",cfo:"AI CFO tracks MRR, churn, and ARR in real time."},payroll:{accountant:"AI Accountant handles payroll journal entries automatically.",cfo:"AI CFO tracks headcount cost in real time."},email:{accountant:"AI Accountant handles every emailed receipt, invoice, and itinerary.",cfo:"AI CFO catches commitments and gaps before the close.",accountantBullets:[{iconKey:"receipt-email",text:"Receipts matched and auto-drafted JEs"},{iconKey:"calendar",text:"Calendar context on every expense"},{iconKey:"bills",text:"Vendor invoices ingested and journalized"},{iconKey:"reimbursements",text:"Travel expenses built automatically"}],cfoBullets:[{iconKey:"notification",text:"Subscription renewal radar"},{iconKey:"search",text:"Pre close gap detection"}]},unlocksAccountantCta:"What it unlocks for AI Accountant",unlocksCfoCta:"What it unlocks for AI CFO",unlocksCombinedCta:"What it unlocks for AI Accountant + AI CFO"},plaidCard:{title:"Bank accounts and credit cards",subtitle:"Connected via Plaid — covers checking, savings, and all major credit cards.",worksWithLabel:"Works with",worksWithInstitutions:["Chase","Wells Fargo","Bank of America","Amex","Citi","Capital One","+12,000 more"],accountMaskSuffix:" · Connected via Plaid",addAccountButton:"Add account or card",loadingState:"Loading your bank accounts…",emptyStateNotConnected:"Connect your first bank account to get started.",connectButton:"Connect via Plaid"},corporateSpend:{heading:"Corporate spend platforms",subtitle:"Native direct connections — richer than Plaid because receipts are already matched, spend is pre-categorized, and employee analytics are included.",directConnectionNote:"Direct connection — not via Plaid"},emailCard:{title:"Connect your inbox and calendar",subtitle:"Read only — receipts and invoices only — nothing stored."},actions:{configure:"Configure",connect:"Connect",disconnect:"Disconnect",notifyMe:"Notify Me",notifyMeQueued:"We'll notify you",reconnect:"Reconnect"},disconnectDialog:{title:"Disconnect {connectorName}",description:"Are you sure you want to disconnect {connectorName}? Zeni will no longer be able to query your {connectorName} data through AI CFO chat. You can reconnect at any time.",disconnecting:"Disconnecting..."},comingSoonFooter:"Coming soon",cards:{quickbooks:{name:"QuickBooks Online",description:"Read and write ledger of record. Invoices, expenses, GL, chart of accounts, journal entries.",capability:"Activates AI Accountant auto categorization, reconciliation, and the full journal entry engine — gives AI CFO its financial foundation for every answer and forecast.",footerText:"Takes about 2 mins",refreshTooltip:"Sync QuickBooks changes to your dashboard"},netsuite:{name:"NetSuite",description:"Enterprise ERP — multi entity consolidation, advanced revenue recognition, GL across subsidiaries.",capability:"Enables both AI Agents to operate across subsidiaries with consolidated close and multi entity reporting.",footerText:"For multi-entity companies"},plaid:{name:"Plaid",description:"Bank account connections — cash balances, real-time transactions, statement-level history.",capability:"Feeds AI Accountant the daily cash and card activity that powers reconciliation, missing-receipt detection, and live balance views for AI CFO.",footerText:"Takes about 1 min"},brex:{name:"Brex",description:"Corporate card and spend management — real time transactions, receipts, spend controls, and employee analytics.",capability:"AI Accountant gets receipt data already attached and spend categorized at source — significantly higher reconciliation accuracy than a bank feed alone."},ramp:{name:"Ramp",description:"Corporate card and spend management — real time transactions, receipt matching, vendor management, and savings insights.",capability:"AI Accountant accesses Ramp's already categorized spend and matched receipts — fewer corrections, cleaner journal entries, faster close."},chargebee:{description:"Subscription analytics — MRR, ARR, churn, active subscriptions.",capability:"AI Accountant handles subscription revenue journal entries each month — AI CFO gains full ARR waterfall for churn analysis and forecasting.",dialog:{title:"Connect ChargeBee",description:"Enter your ChargeBee site and API key to connect. You can find your API key in ChargeBee under Settings › Configure ChargeBee › API Keys.",siteLabel:"Site / Subdomain",sitePlaceholder:"your-site",siteHintPrefix:"The subdomain of your ChargeBee URL: ",siteHintSuffix:".chargebee.com",apiKeyLabel:"API Key",apiKeyPlaceholder:"Enter your API key",readOnlyRecommendation:"We recommend using a read-only API key — Zeni only needs read access to your subscription data. In ChargeBee, select “Read-Only Key” when creating the key."}},stripe:{name:"Stripe",description:"Payment processing — charges, refunds, payouts, disputes, MRR.",capability:"AI Accountant reconciles every payment and handles all related journal entries — AI CFO tracks real time MRR and payment trends.",dialog:{title:"Connect Stripe",description:"Enter a Stripe restricted API key. Create one in Stripe under Developers › API keys › Create restricted key. Grant read-only access to Charges, Refunds, Disputes, Payouts, and Balance.",apiKeyLabel:"Restricted API Key",apiKeyPlaceholder:"rk_live_...",readOnlyRecommendation:"We recommend a restricted key with read-only scopes only — Zeni never needs write access to your Stripe account."}},mercury:{name:"Mercury",description:"Business banking — account balances, transactions, statements.",capability:"Feeds AI Accountant daily Mercury cash and card activity for reconciliation and gives AI CFO live cash balances across accounts.",dialog:{title:"Connect Mercury",description:"Enter a Mercury API token. Create one in Mercury under Settings › Tokens & API › New token. Grant read-only access to Accounts and Transactions.",apiKeyLabel:"API Token",apiKeyPlaceholder:"secret-token-...",readOnlyRecommendation:"We recommend a read-only token — Zeni never needs write access to your Mercury accounts."}},paypal:{name:"PayPal",description:"Online payments — balance, transaction history, payouts.",capability:"Lets AI CFO see PayPal collected revenue, refunds, and payouts alongside Stripe and bank cash.",dialog:{title:"Connect PayPal",description:"Enter your PayPal REST API client ID and secret. Create them in the PayPal Developer dashboard under Apps & Credentials › Live › Create App. Enable Transaction Search, Invoicing, Subscriptions, and Disputes Read on the app.",clientIdLabel:"Client ID",clientIdPlaceholder:"AeA1...",clientSecretLabel:"Secret",clientSecretPlaceholder:"Enter your client secret",readOnlyRecommendation:"Zeni only needs read access to your PayPal data — leave write features (e.g. Payments) disabled on the app you create."}},hubspot:{name:"HubSpot",description:"CRM and sales pipeline — deals, contacts, close rates, forecasting.",capability:"AI CFO connects pipeline to actuals for precise revenue forecasts and close rate analysis."},billDotCom:{name:"Bill.com",description:"AP and AR workflows — vendor bills, customer invoices, payments, approvals.",capability:"AI Accountant drafts bills, handles all AP and AR journal entries, and tracks aging — AI CFO surfaces vendor insights and cash flow forecasts."},gusto:{name:"Gusto",description:"Payroll, benefits, contractor pay — runs, taxes, and headcount.",capability:"Gives AI Accountant payroll-aware journal entries and lets AI CFO break down compensation by team and role."},rippling:{name:"Rippling",description:"HRIS, payroll, and IT — unified people data.",capability:"Lets AI CFO trace headcount, role, and comp changes through the financial picture — no manual spreadsheets."},moreProviders:{name:"More providers",description:"ADP, Paychex, Justworks and others — tell us what you use.",requestButtonLabel:"Request"},gmail:{name:"Gmail",description:"Email context — invoice attachments, vendor threads, payment confirmations.",capability:"Feeds AI Accountant the supporting docs sitting in inbox threads — receipts, bills, and payment confirmations land in the ledger automatically."},outlook:{name:"Microsoft 365",description:"Outlook — Exchange — Microsoft Calendar",capability:"AI Accountant reads receipt emails to match transactions and determine the right accounting treatment, then drafts the correct journal entry without anyone asking."}},connectorTooltips:{accountantSectionLabel:"AI Accountant",cfoSectionLabel:"AI CFO",quickbooks:{heading:"What you unlock by connecting QuickBooks",accountantBullets:["Auto-categorizes every transaction into your chart of accounts.","Reconciles bank, card, and ledger lines end-to-end.","Drafts the journal entries that close your books."],cfoBullets:["Grounds every forecast and answer in your live ledger.","Powers cash, burn, and runway in the dashboard."]},netsuite:{heading:"What you will unlock by connecting NetSuite",accountantBullets:["Consolidates close across every subsidiary in your structure.","Drafts multi-entity GL with intercompany eliminations.","Handles advanced revenue recognition schedules."],cfoBullets:["Rolls cash, burn, and runway up across all subsidiaries.","Forecasts respect entity-level transfer pricing and FX."]},plaid:{heading:"What you unlock by connecting banks & cards",accountantBullets:["Live bank and card feeds give AI Accountant everything it needs to automatically reconcile every transaction the moment it lands.","No waiting for exports, no manual matching at month end.","Each account connected means more transactions reconciled automatically and a close that takes days instead of weeks."],cfoBullets:["Every connected account gives AI CFO live cash position, accurate burn rate, and runway answers based on what is actually in the bank right now and not last month's close.","The richer your data, the more precise every answer becomes."]},brex:{heading:"What you unlock by connecting Brex",accountantBullets:["Receipts arrive pre-attached — no chasing employees at month end.","Spend is categorized at source, with merchant and policy context.","Reconciliation accuracy lifts significantly vs. a bank feed alone."],cfoBullets:["Burn drilldowns by department, employee, and vendor.","Live policy-violation flags surface in the cash review."]},ramp:{heading:"What you unlock by connecting Ramp",accountantBullets:["Matched receipts and pre-categorized spend arrive ready to post.","Vendor management context cleans up duplicates and renames.","Fewer corrections in the close — journal entries land cleaner."],cfoBullets:["Vendor-level spend forecasts with renewal and contract dates.","Savings insights flow into the runway model automatically."]},mercury:{heading:"What you unlock by connecting Mercury",accountantBullets:["Direct Mercury feed gives AI Accountant transaction details without Plaid latency.","Wires, ACH, and card spend reconcile against the ledger automatically."],cfoBullets:["Live operating cash, runway, and reserve balances in the dashboard.","Treasury yield surfaces in cash position views."]},stripe:{heading:"What you unlock by connecting Stripe",accountantBullets:["Reconciles every charge, refund, payout, and dispute end-to-end.","Posts the fee and Stripe-balance journal entries for you.","Handles foreign-currency settlements and FX gain/loss."],cfoBullets:["Live MRR and payment-trend telemetry in the dashboard.","Dispute and refund signal feeds churn and risk forecasts."]},paypal:{heading:"What you unlock by connecting PayPal",accountantBullets:["PayPal sales, refunds, and fees post to the ledger automatically.","Multi-currency conversions are matched and journaled per ASC 830."],cfoBullets:["PayPal-driven revenue and refunds flow into MRR and churn metrics.","Held-funds visibility in the cash position view."]},hubspot:{heading:"What you unlock by connecting Hubspot",accountantBullets:[],cfoBullets:["Live MRR and payment-trend telemetry in the dashboard.","Dispute and refund signal feeds churn and risk forecasts."]},chargebee:{heading:"What you unlock by connecting Chargebee",accountantBullets:["Monthly subscription revenue journal entries posted automatically.","Deferred revenue + accrual schedules drafted from your billing data.","Refunds, credits, and proration handled per ASC 606."],cfoBullets:["Full ARR waterfall — new, expansion, contraction, churn.","Cohort churn and forecast scenarios in the dashboard."]},billDotCom:{heading:"What you unlock by connecting Bill.com",accountantBullets:["Monthly subscription revenue journal entries posted automatically.","Deferred revenue + accrual schedules drafted from your billing data.","Refunds, credits, and proration handled per ASC 606."],cfoBullets:["Full ARR waterfall — new, expansion, contraction, churn.","Cohort churn and forecast scenarios in the dashboard."]},gusto:{heading:"What you unlock by connecting Gusto",accountantBullets:["Every pay run drafts journal entries across salaries, benefits, taxes, and contractor payments.","Tax filings and benefits accruals land in the ledger every period."],cfoBullets:["Fully-loaded cost per head by department, live.","Headcount spend vs. budget answers without spreadsheets."]},rippling:{heading:"What you unlock by connecting Rippling",accountantBullets:["Payroll, benefits, and contractor payments post journal entries automatically.","Stock-comp and equity events flow into the ledger as configured."],cfoBullets:["Fully-loaded comp visibility by department, role, and location.","Headcount-driven runway scenarios update in real time."]},gmail:{heading:"What you unlock by connecting Gmail",accountantBullets:["Receipts to JEs — reads receipt emails, matches them to transactions, drafts the journal entry.","Calendar context cross-checks client, event, and business purpose on every expense.","Invoice attachments are detected, parsed into Bills, and journaled on arrival.","Travel reports are built automatically from flight and hotel confirmations."],cfoBullets:["Renewal radar surfaces upcoming renewals and pricing changes before charges hit.","Pre-close gap scan catches unreconciled invoices and receipts before month end."]},outlook:{heading:"What you unlock by connecting Outlook",accountantBullets:["Reads receipt emails to match transactions and draft the right journal entry.","Detects invoice attachments and posts them straight into AP.","Builds travel reports from flight and hotel confirmations."],cfoBullets:["Renewal radar surfaces upcoming renewals and pricing changes before charges hit.","Pre-close gap scan catches unreconciled invoices and receipts before month end."]}},areaTooltips:{ledger:{heading:"What you unlock by connecting your ledger",accountantBullets:["Categorizes every transaction into your chart of accounts.","Reconciles bank, card, and GL lines and drafts journal entries."],cfoBullets:["Grounds every forecast and answer in your live ledger.","Powers cash, burn, and runway in the dashboard."]},banks:{heading:"What you unlock by connecting banks & cards",accountantBullets:["Live bank and card feeds give AI Accountant everything it needs to automatically reconcile every transaction the moment it lands. No waiting for exports, no manual matching at month end. Each account connected means more transactions reconciled automatically and a close that takes days instead of weeks."],cfoBullets:["Every connected account gives AI CFO live cash position, accurate burn rate, and runway answers based on what is actually in the bank right now and not last month's close. The richer your data, the more precise every answer becomes."]},revenue:{heading:"What you unlock by connecting revenue & payments",accountantBullets:["Charges, refunds, payouts, and disputes reconcile end-to-end.","Subscription billing posts revenue and deferred-revenue schedules per ASC 606."],cfoBullets:["Full ARR waterfall — new, expansion, contraction, churn.","Live MRR and payment-trend telemetry in the dashboard."]},payroll:{heading:"What you unlock by connecting payroll & HR tools",accountantBullets:["Every pay run generates journal entries across salaries, benefits, taxes, and contractor payments. AI Accountant reads your payroll data and automatically drafts, schedules, and maintains all of these every period — so your books reflect payroll costs accurately without anyone entering a line item."],cfoBullets:['With payroll connected, AI CFO can answer "what is our fully loaded cost per head by department?" and "how does headcount spend compare to budget?" with live data and not a spreadsheet someone pulled last week.']},email:{heading:"What you unlock by connecting email & calendar tools",accountantBullets:[{title:"Receipts to JEs",body:"Reads receipt emails, matches them to transactions, drafts the right journal entry."},{title:"Calendar",body:"When a receipt arrives, cross-checks your calendar to prefill client, event, and business purpose on every expense."},{title:"Invoices auto-posted",body:"Detects invoice attachments, parses them into Bills, and posts the journal entry on arrival right away."},{title:"Travel reports built",body:"Reconciles flight and hotel confirmations to build full travel reports — name, dates, purpose prefilled."}],cfoBullets:[{title:"Renewal radar",body:"Surfaces renewal and pricing-change emails before charges hit your card."},{title:"Pre-close gap scan",body:"Scans for unreconciled invoices and receipts before month end — gaps land pre-close, not after."}]}}}},copyToClipBoard:{copied:"Copied"},aiAgentsActivatingPage:{navTitle:"AI Agents are activating",sidebar:{connectLedger:"Connect Ledger",connectLedgerSubtitle:"Quickbooks or Netsuite",connectDataSource:"Connect Data Sources",connectDataSourceSubtitle:"Bank, revenue, payroll and more...",setUpBilling:"Set up billing",setUpBillingSubtitle:"Your zeni subscription",verify:"Verify",verifySubtitle:"Unlock your finance stack"},ledgerSection:{title:"QBO connected. Your AI team is reading your books.",subtitle:"Your finance graph and personalized AI models are being built. Here's what's happening right now.",readyInLabel:"Will be ready in 2 hrs",workingPillLabel:"Working",buildingPillLabel:"Building",readingCountsSubtitle:"Reading __transactionCount__ transactions and __glAccountCount__ GL accounts.",rows:[{title:"Reading chart of accounts and transactions",subtitle:"Reading your chart of accounts and transactions."},{title:"Building your company's finance graph",subtitle:"Finance graph built — vendors, accounts, and cash flow patterns mapped."},{title:"Configuring reconciliation and flux analysis",subtitle:"Reconciliation engine configured and flux analysis running."},{title:"AI CFO financial foundation established",subtitle:"AI CFO financial foundation established — ready to answer questions."}]},backgroundSection:{title:"Deeper AI work running in the background",subtitle:"No action required!",readyInLabel:"Will be ready in 2-4 hrs",startingPillLabel:"Starting",rows:[{title:"Fine-tuning LLM models for {tenantName}",subtitle:"Personalizing to your vendors, accounts, and transaction patterns — informed by 1,000+ Zeni customers and $20B in transactions."},{title:"Configuring RAG-based financial knowledge graph",subtitle:"Building a retrieval layer over your entire financial history — directly improves AI Accountant's transaction categorization accuracy."},{title:"Creating personalized financial context for {tenantName}",subtitle:"Your AI Agents will know your industry, seasonality, vendor relationships, and close patterns before you ask a single question."}]},footerButtonLabel:"Continue to connect more sources"},monthsByIndex:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"},oauthConsent:{invalidRequestTitle:"Invalid Authorization Request",authorizeTitle:"Authorize __clientName__",accessSubtitle:"wants to access your Zeni financial data.",signedOutHeadlineSuffix:"wants to access your Zeni financial data",signInToContinue:"Sign in to continue",signIn:"Sign In",signedInAs:"Signed in as __email__",permissionsLabel:"This will allow __clientName__ to:",permissionReadFinancials:"Read your financial data and reports",permissionAccessTransactions:"Access transaction and account information",permissionQueryAi:"Query your Zeni AI assistant on your behalf",selectCompany:"Select a company",company:"Company",allow:"Allow",deny:"Deny"}},download:{errorMessages:{fileDownloadError:"Download __feature__ Failed with"},defaultFileName:"Report.xlsx"},balanceCard:{cashBalanceSectionTitle:"Total Cash Balance",cardBalanceSectionTitle:"Total Card Balance",comparedTo:"compared to",noBalanceText:"No balance data to display yet!"},insightsCard:{vs:"vs",askSomethingElse:"Ask something else?",no_data:{label:"Cash, Opex, Revenue, COS, and Cash In Cash Out Insights, will appear once you have sufficient financial activity. Stay tuned! 💸"}},timeframe:{day:"Days",week:"Weeks",free_range:"Time period"},compareSwitchLabel:"Compare",compareMode:{compare_mode_percent:"Percentage"},chartCard:{no_data_available:"No data available!",no_data_available_for:"No data available for",forecast_dropdown:{forecast_source:"Via Quickbooks",forecast_invalid_issue:"This period is not in the time frame of the actuals. Please view it via the Forecast tab."},netBurnOrIncome:{expenses:"OPEX",no_data_available:"A minimum of one-month data is required!"},netBurnOrIncomeCalculator:{title:"Burn Rate Calculator",accounting_method:{label:"Configure Burn Rate, Runway, and Cash Zero date based on below options:",ebitda:"EBITDA"},time_span_id_for_average:{label:"Further configure Burn Rate, Runway, and Cash Zero date based on below options:",last_month:"Last month",last_completed_month:"Last completed month",average_of_last_2_months:"Average of last 2 completed months",average_of_last_3_months:"Average of last 3 completed months",under_review_last_month_label:"(Including Under Review)"}},no_data:{revenue:"No revenues to display yet, but thrift is a great revenue. Fight On!🤘",cash_in_cash_out:"No cash in cash out to display yet!",cash_position:"No cash position to display yet!",net_burn_or_income:"No net burn to display yet!",operating_expenses:"No operating expenses to display yet!",top_expenses:{this_week_to_date:"No expenses this week 🤷",last_week:"No expenses last week 🤷",this_month_to_date:"No expenses this month 🤷",last_month:"No expenses last month 🤷",last_3_months:"No expenses last 3 months 🤷",last_6_months:"No expenses last 6 months 🤷",last_12_months:"No expenses last 12 months 🤷",this_year_to_date:"No expenses this year 🤷",last_year:"No expenses last year 🤷"},aging_report:"No data to display yet!"}},drawerMenus:{home:"Home",users_and_roles:"Users & Roles",storybooks:"Storybooks",new_chat:"New Chat",explore:"Explore",search_chats:"Search Chats",command_center:"AI Close",task_checklist:"Task Checklist",reconciliation:"Reconciliations",invoicing_settings_quickbooks:"QBO Configuration"},drawerMenuSubtitles:{rewards:"Earn up to __reward-amount__ per referral"},drawerGroups:{finance:"Finance",spend_management:"Spend Management",ai_intelligence:"AI Intelligence",close_management:"Your AI Agents",banking:"Banking",administration:"Administration",personal_settings:"Personal Settings",ai_cfo:"",invoicing_setup:"Setup"},dashboardDropDownList:{menuOption:{logout:{value:"logout"},my_profile:{value:"my_profile"},referrals:{label:"Referrals",value:"referrals",referralSubText:{earn:"Earn up to __reward-amount__",suffix:" for every new company you refer to Zeni"}}}},transactionType:{creditMemo:"Credit Memo",salesReceipt:"Sales Receipt",vendorCredit:"Vendor Credit",journalEntry:"Journal Entry"},signIn:{heading:"Welcome to Zeni",confirmationLinkSent:"Sign-in link sent",message:"Your financial dashboard is just one step away. Get started.",autoLogoutHeading:"You've been logged out",autoLogoutMessagePrefix:"For your security, this session expired after ",autoLogoutMessageSuffix:" of inactivity.",signInSecurelyMessage:"Choose an account to sign in securely",signInGoogleButton:"Sign In With Google",signInMicrosoftButton:"Sign In With Microsoft",termsPrivacyFinePrintPart:"By creating an account on Zeni, you confirm that you ",agreeWith:"agree with our ",privacyPolicy:"privacy policy",signInError:`Couldn’t sign-in to your account.
|
|
148
148
|
Please try again.`,signInAuthError:`Authorization failed, and sign-in is restricted.
|
|
149
149
|
Please try and authorize again.`,emailNotFoundPopup:{title:`If an account exists for this email,
|
|
150
150
|
we've sent you a sign-in link.`,subtitleLine1:"Didn't receive an email?",subtitleLine2:"It may take minutes for email to arrive.",checkSpam:"Check your spam or junk folder",confirmEmail:"Make sure you entered the correct email address",checkAccess:"Check your Zeni Admin for access",contactZeni:"If you're onboarding, reach out to our sales executives."},magicLinkSent:{primaryMessage:"A secure sign in link has been sent to __email__ to access the dashboard.",secondaryMessage:"If you can't see the email, check your spam/junk folder.",resendLinkCountdown:"Resend Link in __seconds__s",resendLink:"Resend Link",attemptsRemaining:"(__remaining__/__total__) attempt(s) remaining",resendLimitExceededRedirecting:"Resend Limit exceeded. Redirecting you in __seconds__s"},workEmailExample:"name@workemail.com",magicLinkExpired:"Your sign-in link has expired. Please try again.",magicLinkExpiredHeading:"This sign-in link has expired",magicLinkAlreadyUsedHeading:"This sign-in link has already been used",magicLinkAlreadyUsedMessage:"For security reasons, sign-in links can only be used once.",requestNewLink:"Request a new link",workEmailLink:"Sign in using email",workEmailSubText:"For users without Google/Microsoft access.",googleOrMicrosoftLink:"Sign in using Google or Microsoft",continueAs:"Continue as"},billPayPromoCard:{aipoweredInvoice:{prefix:"AI-powered invoice processing helps create bills in seconds."},multiLevelApproval:{prefix:"Multi-level approval flows allows you to stay in control of payments."},financeTeam:{prefix:"Fully managed by your expert Zeni Finance Team."},fastestWay:{prefix:"Fastest way to pay your vendors and contractors, 100% free"}},reimbursementPromoCard:{aiPowered:{prefix:"AI powered receipts processing helps you create reports in seconds."},multiLevel:{prefix:"Multi-level approval flows allow you to stay in control of payments."},reimburse:{prefix:"Reimburse employees at lightning speed, absolutely free"}},treasuryPromoCard:{introModal:{dontShowAgain:"Don't show this again",remindMeLater:"Remind me later"},watchVideo:{prefix:"Watch how Zeni Treasury helps you earn more."},highYield:{title:"Earn yields upto",prefix:`Put your idle cash to work and earn
|
|
@@ -210,7 +210,7 @@ Initiate your first transfer to start earning yield.`,insuredFundsTooltip:"Secur
|
|
|
210
210
|
The KYC info is required to comply with the Bank Secrecy Act and Anti-Money Laundering regulations.`,stepSubText:"Enter proof of identity to complete verification."},company_details:{sectionSubTitle:`Enter business details to complete verification.
|
|
211
211
|
The KYB info is required to comply with financial regulations and uphold the security of our customers.`,stepSubText:"Enter business details to complete verification."},link_card:{footNote:{text2:"Switch to credit card (3% fee)"},footNoteCard:{text1:"Switch to bank account — save 3% on your fee"}}},navBar:{skipText:"Skip, I will do this later",link_payment_account:{title:"Go live with your Zeni Dashboard!",subTitle:"To setup your Zeni dashboard, please complete the following steps"},qbo_connection:{subTitle:"To set up your dashboard, we must connect with your QuickBooks account."},company_officer:{subTitle:`Enter proof of identity to complete verification.
|
|
212
212
|
The KYC info is required to comply with the Bank Secrecy Act and Anti-Money Laundering regulations.`},company_details:{subTitle:`Enter business details to complete verification.
|
|
213
|
-
The KYB info is required to comply with financial regulations and uphold the security of our customers.`}},sections:{link_payment_account:{subText:"Log in securely to your bank and start managing your payments right away",smsOptIn:"SMS Opt-in",smsOptOut:"SMS Opt-out",bankVerificationTitle:"Follow these steps to verify bank account",plaidSmsVerification:"An example of Plaid sending an SMS with the verification link",highlightedWords:{depositAmount:"$0.01",plaidSms:"Plaid will then send you a",smsWithALink:"SMS with a link",zeniAccountVerify:"ZENI ACCTVERIFY",smsLink:"link in the SMS"},bankVerification1:{step1:"Within a few days, you'll see a $0.01 deposit from Plaid in your bank account.",step2:"Plaid will then send you an SMS with a link (unless opted out) to complete the verification.",step3:'Check your bank statement for a 3-letter code after "#" symbol in "ZENI ACCTVERIFY" transaction.',step4:'Open the link in the SMS from Plaid or click "Start Verification" below to verify.'},bankVerification2:{step1:"Within a few days, you'll see a $0.01 deposit from Plaid in your bank account",step2:'Check your bank statement for a 3-letter code after "#" symbol in "ZENI ACCTVERIFY" transaction.',step3:'Enter this code by clicking "Start Verification" button below to complete your verification.'},verifyButton:"Verify Bank Account",verificationNotice:{title:"We're verifying your account via Plaid",subTitle:"This may take up to 2 business days.",notificationText:"Once verified, we’ll notify you via email so you can complete the onboarding."}},card_payment_method:{subHeader:"Securely add your preferred payment method to activate your account.",addNewCard:"Link a new card",protectedCardNo:"****"},connectLedger:{introBody:"This is the moment AI Accountant activates. In the first 2 hours it will read your books, detect recurring journal entry patterns, flag variance anomalies, and hand AI CFO the financial foundation it needs to answer any question you ask.",whatHappensHeading:"What happens after you connect?",firstPhase:{title:"First 2 hours",body:"Reads your chart of accounts and every transaction to build a complete finance graph of your company — a structured model of vendors, accounts, cash flows, and relationships that powers every automated report."},secondPhase:{title:"First 2 to 4 hours — your AI gets personal",body:"Zeni builds AI models fine-tuned specifically to {tenantName} — your vendors, your chart of accounts, your accounting patterns. Trained on signals from 1,000+ Zeni customers and over $20B in transactions."},unlocksTooltip:{quickbooks:{heading:"What you unlock by connecting Quickbooks",accountantBullets:["Auto-categorizes every transaction into your chart of accounts.","Reconciles bank, card, and ledger lines end-to-end.","Drafts the journal entries that close your books."],cfoBullets:["Grounds every forecast and answer in your live ledger.","Powers cash, burn, and runway in the dashboard."]},netsuite:{accountantBullets:["Consolidates close across every subsidiary in your structure.","Drafts multi-entity GL with intercompany eliminations.","Handles advanced revenue recognition schedules."],cfoBullets:["Rolls cash, burn, and runway up across all subsidiaries.","Forecasts respect entity-level transfer pricing and FX."]}},pageSubtitle:"Required foundation for both AI Agents"},officerVerification:{introBody:"Upload a government-issued ID below. Zeni AI reads the document and autofills your details automatically — no manual typing required.",aiCallout:{body:"will retrieve data from the document once you upload it and autofill the details."},autofillFooter:"Fields marked with the Zeni AI sparkle were autofilled from your uploaded document."},companyVerification:{introTitle:"Verify your business.",introBody:"Upload your EIN document. Zeni AI extracts all business details automatically — no manual typing required.",aiCallout:{body:"will retrieve data from your EIN document and autofill all business details."},autofillFooter:"Fields marked with the Zeni AI sparkle were autofilled from your uploaded document."},unlockFinancialStack:{pageTitle:"Unlock your financial stack",pageSubtitle:"You can complete verification any time from Company Settings.",introTitle:"Verify once. Unlock two financial products.",introBody:"A quick identity and business check — required for financial compliance and takes about 5 minutes. Your AI Agents are already working. When you use Zeni's own products, every transaction flows natively into AI Accountant with zero gaps — your close literally takes care of itself. Here is what you unlock.",products:{chargeCard:{name:"Zeni Charge Card",body:"On every purchase. No annual fees, no foreign transaction fees, no complexity. Credit based on your financial health — no personal guarantee."},businessChecking:{value:"2.5% APY",body:"FDIC insured up to $3M through Thread Bank sweep network. Interest compounded daily. No minimums, unlimited accounts."},treasury:{value:"Up to 4% APY",body:"Put idle cash to work automatically. Smart allocation across instruments to maximize yield on your operating reserves."},billPay:{body:"Free domestic transfers, free USD international wires, $0 ACH fees. AI auto-fills invoice details and handles all journal entries automatically."},reimbursements:{body:"Unlimited reimbursements with same-day ACH payouts. Supports 160 currencies, multi-level approval workflows, and AI categorization built in."},debitCard:{name:"Zeni Debit Card",body:"Instant cashback on every spend with no minimums. Full AI spend management, real-time controls per employee or department, and zero foreign transaction fees."}},aiActiveCallout:{heading:"AI Accountant and AI CFO are already active.",body:"Zeni AI will read your uploaded documents and autofill all details automatically.",metaPrimary:"Most verifications",metaSecondary:"complete in under 5 mins"},kycStep:{title:"Step 1 — Verify your identity (KYC)",body:"Upload a government-issued ID. Zeni AI reads the document and autofills name, date of birth, and address automatically. Required by the Bank Secrecy Act and Anti-Money Laundering regulations."},kybStep:{title:"Step 2 — Verify your business (KYB)",body:"Upload your EIN document. Zeni AI extracts company legal name, incorporation type, registered address, and Tax ID automatically. Required for financial services compliance.",meta:"Takes about 3 mins"},startVerificationCta:"Start verification"},chrome:{skipLabel:"Skip for now",skipToDashboardDisabledTooltip:"Connect QuickBooks to activate your dashboard",skipToDashboardPendingVerificationTooltip:"Verify your bank account to activate your dashboard",skipToDashboardLoginRequiredTooltip:"Re-login to your bank account to activate your dashboard"},activateSubscription:{pageTitle:"Activate your subscription",pageSubtitle:"Required to activate your Zeni subscription.",ctaLabel:"Continue to connect your ledger",ctaLabelWithoutLedger:"Continue to verify your business"},connectLedgerPage:{ctaLabel:"Continue to activation",pageSubtitle:"Required foundation for both AI Agents"},officerVerifyPage:{pageSubtitle:"Documents are encrypted and stored with SOC 2 Type II compliance.",ctaLabel:"Continue to business verification"},companyVerifyPage:{pageTitle:"Verify your business",pageSubtitle:"Documents are encrypted and stored with SOC 2 Type II compliance.",ctaLabel:"Submit and go to dashboard"},aiAgentsActivating:{demoTenantName:"Pied Piper"},connectDataSources:{pageTitle:"Connect your Data Sources",pageSubtitle:"Connect what you have access to — others on your team can add the rest later.",ctaLabel:"Continue to verification"},setupBilling:{introTitle:"To get started, please link your payment method and enter company billing address.",introBody:"Your AI Agents are already reading your books. Set up billing to keep them running after your trial ends.",includedCard:{heading:"What's always included:",accountantBody:"Runs your books every day, automatically.",cfoBody:"Answers every financial question, always available.",connectionsLabel:"Unlimited data source connections",connectionsBody:"QBO, banks, cards, AR, AP, revenue, payroll, email and more.",financeTeamLabel:"Your dedicated finance team",financeTeamBody:"Controller, Team Lead and Accountant available Monday–Friday."},paymentMethodHeading:"Subscription Payment Method",paymentMethodSubheading:"ACH bank debit — no additional fees",businessProfile:{heading:"About Your Business",subheading:"Tell us your industry and business model so your AI Agents can tailor your books to how you run the business.",errorReason:"your business profile"}},qbo_connection:{subTitle:"To set up your dashboard, we must connect with your QuickBooks account.",sucessText:"Congratulations! You have successfully established a connection with QuickBooks.",subtitleText:"Accounting & bookkeeping — journal entries, invoices, bills, expenses",requiredText:"Please connect Quickbooks to sync your financial data",errorText:"Unable to connect quickbooks. Please try again."},company_officer:{subTitle:"Enter proof of identity to complete verification."},company_details:{subTitle:"Enter business details to complete verification."}},thankYou:{title:"Thank you for providing the details.",subTitle:"We are currently verifying and working on your Dashboard."},footer:{buttons:{submitText:'By clicking "__action__", I certify that the information provided here is complete and correct.'}},productSuite:{navTitleCFO:"Thank you, we've got your details",navTitle:"Thank you for completing your onboarding steps",updatePaymentDetails:"Update Payment Details",messageBox:{default:"We're now setting up your Quickbooks account and will notify you via email once it's ready.",onlyTax:"Our Tax team will email you with the next steps within 2 business days.",onlyCFO:"Our CFO team will email you with the next steps before your service start date.",onlyPayroll:"Our Payroll team will email you with the next steps within 2 business days.",taxAndPayroll:"Our Tax & Payroll teams will email you with the next steps within 2 business days.",withTax:"Our Tax team will email you within 2 business days.",withPayroll:"Our Payroll team will email you within 2 business days.",withCFO:"Our CFO team will reach out to you before your service start date.",withTaxAndPayroll:"Our Tax & Payroll teams will email you within 2 business days."},sectionTitleCFO:"Explore more solutions tailored for your business",sectionTitle:"Meanwhile, learn more about Zeni products",sectionFooter:"Discover Zeni's product suite",productCard:{cards:[{cardTitle:"Zeni Reimbursements",sectionTitle:"Pay your employees back faster",sectionSubTitle:"Reimburse your employees at lightning speed with AI-powered expense processing at no additional cost."},{cardTitle:"Zeni Bill Payments",sectionTitle:"Pay your bills in seconds",sectionSubTitle:"Speed up domestic and international vendor payments with AI-powered invoice processing at no additional cost."},{cardTitle:"Zeni AI Bookkeeping",sectionTitle:"Simplify your bookkeeping",sectionSubTitle:"Give your business all the financial insights it needs to succeed on a single dashboard."}]}},aiFinanceTeamReady:{title:{prefix:"Your ",highlight:"AI finance",suffix:" team is ready, {firstName}."},agentChip:"Two AI Agents are joining {companyName}'s finance org today.",description:"Connect them to your financial data and they start working immediately — categorizing, reconciling, journalizing, and answering every question your CFO has.",accountantCard:{subtitle:"Runs the books every day. Handles every accounting task automatically.",tasks:{bankReconciliation:{title:"Bank reconciliation",meta:"Chase ••••8992 — 847 transactions matched"},autoCategorization:{title:"Auto categorization",meta:"1,204 transactions — 94% categorized"},journalEntryEngine:{title:"Journal entry engine",meta:"12 recurring JEs detected and scheduled"},fluxAnalysis:{title:"Flux analysis",meta:"AWS +29% vs last month — flagged"},apArAging:{title:"AP and AR aging",meta:"3 invoices 30+ days overdue — surfaced"}},footer:"All of this happens automatically, every day."},cfoCard:{subtitle:"Answers every financial question. Always available, always precise.",chat:{netBurnQuestion:"What is our net burn this month?",netBurnAnswer:{heading:"Net burn is $487K this month",body:"Payroll 61%, software and infrastructure 22%. Up $34K vs last month — new engineering hire Mar 12 and an $18K AWS overage."},revenueQuestion:"Are we on track for Q2 revenue?",revenueAnswer:{heading:"Yes, on track at 94% confidence",body:"$312K closed, $180K in late stage pipeline due this month. Risk: 3 March renewal invoices totalling $42K still outstanding."}},suggestions:{runway:"What's our current runway?",burnByDept:"Show me burn by department",vendorReview:"Which vendors should I review?",closeStatus:"Close status for November"}},trustRow:{soc2:"SOC 2 Type II",bankGrade:"Bank-grade encryption",trusted:"Trusted by 1,500+ finance teams"},cta:"Connect your Finance Team"}},uncategorizedAccountsMapping:{accountingSettings:{heading:"Account Settings",accountingClasses:{title:"Accounting Classes",subTitle:"Track and categorize transactions by class. Turning this off hides class fields and columns across the workspace.",enableConfirmation:{title:"Enable Accounting Classes?",description:"Class fields will appear on transactions, bills, reimbursements, and reports so you can track spending by class."},disableConfirmation:{title:"Disable Accounting Classes?",description:"Class fields and columns will be hidden across the workspace. Existing class assignments on transactions are preserved but won't be visible until you re-enable this setting."}},projects:{subTitle:"Track and categorize transactions by project. Turning this off hides project fields and columns across the workspace."}},uncategorizedSection:{heading:"Uncategorized Accounts",title:"Income & Expense Accounts",subTitle:"Select the accounts used to temporarily track transactions that require clarification.",incomeLabel:"Income Account:",expenseLabel:"Expense Account:",incomeAccount:"Income Account",expenseAccount:"Expense Account"},billsSection:{subTitle:"Select the account used to track charges while using Zeni Bill Pay",bankChargesAndFeesLabel:"Bank Charges & Fees Account:",billPayExpenseAccount:"Bill Pay Expense Account"},reimbursementsSection:{subTitle:"Select the account used to track charges while using Zeni Reimbursements",mileageLabel:"Mileage Account:",reimbursementsExpenseAccount:"Mileage Expense Account"},vendorSection:{prepaidExpenseSubTitle:"Select the accounts used to track prepaid expenses",fixedAssetsSubTitle:"Select the accounts used to track fixed asset expenses",accruedExpensesSubTitle:"Select the accounts used to track accrued expenses",prepaidExpenselabel:"Prepaid Expense Accounts:",fixedAssetslabel:"Fixed Asset Accounts:",accruedExpenseslabel:"Accrued Expense Accounts:",prepaidExpenseAccount:"Prepaid Expense Account",fixedAssetsAccount:"Fixed Asset Account",accruedExpensesAccount:"Accrued Expense Account"},common:{label:{bankAccountLabel:"Bank Accounts:",expenseCategoriesLabel:"Expense Categories:"}},filing1099Section:{subHeading:"Form 1099 is a tax form filed by businesses to report annual payments of $600 or more to vendors or independent contractors.",bankAccountTitle:"Bank Accounts",bankAccountSubTitle:"Select the bank accounts used to pay vendors",expenseCategoriesSubTitle:"Select the expense categories to filter eligible payment types",infoTextBankAccount:"To fetch all payments made to vendors",infoTextGlAccount:"To filter the eligible payments",allExpenseTypes:"All Expense Types",all1099Types:"All 1099 Types",allBoxes:"All Boxes"},placeholder:{incomePlaceholder:"Select Income Account",expensePlaceholder:"Select Expense Account",accountPlaceholders:"Select accounts",categoryPlaceholder:"Select Category",boxPlaceholder:"Select box"},tooltip:'The "__account__" recommendation is __based__',noOptions:{establishQBO:"Kindly establish the accounts in QuickBooks.",noTypesFound:"No type found!",noBoxTypesFound:"No box type found!"},capitalizationSection:{heading:"Capitalization Thresholds",headingSubtitle:"Thresholds are auto-calculated nightly. Set a user override to use your own value instead.",onboardingPopup:{titles:{prepaid:"Prepaid Expense Thresholds Identified",fixed_asset:"Fixed Asset Thresholds Identified"},descriptions:{prepaid:"Set a capitalization threshold for __accountName__. Transactions below the threshold will be expensed directly instead of being capitalized.",fixed_asset:"Set a capitalization threshold for __accountName__. Transactions below the threshold will be expensed rather than capitalized as assets."},maybeLaterButton:"Maybe Later",thresholdPlaceholder:"Enter threshold amount",helpText:"You can always update this later in Settings > Accounting."},globalControls:{title:"Global Threshold Controls",threshold:{description:"Overrides all learned thresholds when set. Clear to use per-account learned values."},maxCeiling:{label:"Max Ceiling",description:"Caps learned thresholds — any account whose learned value exceeds this is clamped. Clear to use system default."}},accountsTable:{subtitle:"Capitalizable Accounts",overrideBanner:"All accounts using user-set threshold: __value__",headers:{threshold:"Threshold",matchStrength:"Match Strength",effectiveThreshold:"Effective Threshold",learnedThreshold:"Learned Threshold",userOverride:"User Override"},classification:{prepaid:"Prepaid"},matchPattern:{LABEL:"Strong",TYPE_ONLY:"Weak"},sourceBadge:{override:"Override",learned:"Learned"},lastUpdated:"Last updated: __date__",empty:{noData:"Accounts will appear here after the nightly analysis runs.",noLearned:"No capitalizable accounts with identified thresholds yet.",noAccounts:"No capitalizable accounts identified yet."}},defaultCurrencySymbol:"$"}},jeSchedules:{scheduleList:{defaultDownloadFileName:"__tenant__ Schedules.xlsx",tableHeaders:{balanceAsOfToday:"Balance as of today",endMonth:"End Month",expenseCategory:"Expense Category",assetId:"Asset ID"},noData:"No Schedules Found",heading:{expenseSchedules:"Expense Schedules",searchPlaceholder:"Search Schedules"},getSchedules:{selectSchedule:"Select Schedule:",getSchedules:"Get Schedules"},scheduleStatus:{draft:"Draft"}},scheduleDetails:{jeSchedule:"JE Schedule",showTransactionTooltip:"Show Transaction",scheduleTransactionsHeader:{vendorName:"Vendor Name",expenseCategory:"Expense Category:"},sequenceSchedule:{header:"Schedule Sequence",notCreated:"Once details are entered, the schedule sequence will be displayed here.",sequenceHeaders:{runningBalance:"Running Balance (as of today)",jeLink:""},accruedSequenceHeader:{jePostingDate:"Accrual Posting Date",runningBalance:"Accrual Balance",jeLink:""},sequenceData:{amountPlaceholder:"0"},postingStatus:{pending:"Pending",unknown:"Unknown",posted:"Posted",canceled:"Canceled",recorded:"Recorded"}},scheduleDetailsSection:{header:"Schedule Details",startMonth:"Start Month:",startMonthPlaceholder:"Select start month",months:"Months:",monthsPlaceholder:"Select month",accumulatedDepreciationCategory:"Accumulated Depreciation Category:",accumulatedDepreciationCategoryPlaceholder:"Select accumulated depreciation category",assetId:"Asset ID:",assetIdPlaceholder:"Add asset ID",postingDate:"Posting Date:",postingDatePlaceholder:"Select posting date",confirmCancelAccrualDescription:"Cancel all the pending accrual schedules. This action cannot be undone.",confirmDeletionDescription:"Are you sure you want to delete this schedule? This action cannot be undone.",confirmDeletionDescriptionNote:"Note - Deleting the schedule will not delete any associated journal entries in QBO.",markAsCompleted:"Mark As Completed",createSchedule:"Create Schedule",scheduleMarkedAsCompleted:"Schedule has been marked as completed",cancelPendingAccrual:"Cancel Pending Accruals",cancelAccrual:"Cancel Accrual",viewRecordedJE:"View Recorded JE",viewPostedJE:"View Posted JE",deleteSchedule:"Delete Schedule"},linkJE:{fetchJE:"Fetch JE",jeLinkURLPlaceholder:"Add Link",jeLink:"JE Link:",linkJE:"Link JE",linkBillExpense:"Link Bill or Expense",viewBillExpense:"View Bill or Expense",jePostingDate:"JE Posting Date:",jeDetails:"JE details will be presented here once you enter the JE link and complete the fetch operation.",transactionFetchError:"There was an error fetching the transaction.",zeniRecommendation:"Based on Zeni GPT recommendation, journal entry posting has been automatically retrieved for the schedule."}},scheduleAccruedDetails:{new:{header:"New Accrued Expenses",new:"new"},labels:{estimatedMonthlyAmount:"Estimated Monthly Amount:",accruedExpenseCategory:"Accrued Expense Category:",startingBalance:"Starting Balance:"},placeholders:{selectVendor:"Search and select vendor",addBalance:"Add Balance",selectAccruedExpenseCat:"Select accrued expense category"}},linkBillExpenseDetails:{tableHeaders:{transactionAttachment:""},title:"Link Bill Or Expense",noBillFound:"No Bill or Expense found for the schedule",linkBill:"Link Bill",additionalBills:"Additional Bills For The Vendor",zeniGPTText:"Based on Zeni GPT recommendation, the bill or expense posting has been automatically retrieved for the schedule."}},vendorReview:{globalReview:{newGlobalMerchant:{tip:"Protip: Verify online domain availability of the vendor name.",recommendationInfoText:"Enter text to fetch recommendation"},globalMerchantList:{navBarTitle:"Global Vendors Review",searchPlaceholder:"Search tenant",confirmationPopup:{title:'Are you sure you want to add "_merchant_name_" in Global vendor list?',description:"Confirm will add the vendor to the global list. This change can’t be reverted back.",merchantNameFallback:"this merchant"},selectPlaceholder:"Select Global Vendor",noDataText:"No global vendors to display yet!",noMatchedDataText:"No global vendors matched your search."}},firstReview:{searchPlaceholder:"Search vendor",viewRecipts:"View receipts",vendorDropdown:{recommendedCustomer:"Recommended Customer",allCustomers:"AllCustomers",fromOldName:'Change name from "__old_name__"',toNewName:' to "__new_name__"'},invoice:"invoice",popupMessages:{netsuiteLinkPopupTitle:'A vendor by name "_vendor_name_" already exists in NetSuite',netsuiteLinkPopupMsgHeader:"Please login to NetSuite and follow the steps given below to merge the vendor",netsuiteLinkPopupSubTitle:"Keep in mind that merging vendor profiles is permanent. You can't undo this later.",netsuiteLinkPopupDescription:"Please note that the related transactions will be migrated within the next 24 hours after the change.",qboLinkPopupMsgHeader:"Please login to QBO and follow the steps given below to merge the vendor",qboLinkPopupSubTitle:"Keep in mind that merging vendor profiles is permanent. You can't undo this later.",qboLinkPopupTitle:'A vendor by name "_vendor_name_" already exists in QBO',zeniUpdatedRecommendationPopupTitle:'Vendor recommendation for "_vendor_name_" is updated from "_old_recommendation_" to "_new_recommendation_".',zeniUpdatedRecommendationPopupMsg:"Zeni AI has updated the recommendation for this vendor name. Click 'Continue' to use updated vendor name or Click 'cancel' & refresh the page to view the updated vendor recommendation.",zeniNewRecommendationPopupTitle:'Vendor recommendation for "_vendor_name_" is updated to "_new_recommendation_".',zeniNewRecommendationPopupMsg:"Zeni AI has provided a recommendation for this vendor name. Click 'Continue' to proceed with the selected vendor name or 'Cancel' to view the newly added recommendation.",zeniNewRecommendationNotAvailablePopupTitle:'Vendor recommendation for "_vendor_name_" is no longer available.',zeniNewRecommendationNotAvailablePopupMsg:`Zeni AI has updated the recommendation for this vendor. Please try again.
|
|
213
|
+
The KYB info is required to comply with financial regulations and uphold the security of our customers.`}},sections:{link_payment_account:{subText:"Log in securely to your bank and start managing your payments right away",smsOptIn:"SMS Opt-in",smsOptOut:"SMS Opt-out",bankVerificationTitle:"Follow these steps to verify bank account",plaidSmsVerification:"An example of Plaid sending an SMS with the verification link",highlightedWords:{depositAmount:"$0.01",plaidSms:"Plaid will then send you a",smsWithALink:"SMS with a link",zeniAccountVerify:"ZENI ACCTVERIFY",smsLink:"link in the SMS"},bankVerification1:{step1:"Within a few days, you'll see a $0.01 deposit from Plaid in your bank account.",step2:"Plaid will then send you an SMS with a link (unless opted out) to complete the verification.",step3:'Check your bank statement for a 3-letter code after "#" symbol in "ZENI ACCTVERIFY" transaction.',step4:'Open the link in the SMS from Plaid or click "Start Verification" below to verify.'},bankVerification2:{step1:"Within a few days, you'll see a $0.01 deposit from Plaid in your bank account",step2:'Check your bank statement for a 3-letter code after "#" symbol in "ZENI ACCTVERIFY" transaction.',step3:'Enter this code by clicking "Start Verification" button below to complete your verification.'},verifyButton:"Verify Bank Account",verificationNotice:{title:"We're verifying your account via Plaid",subTitle:"This may take up to 2 business days.",notificationText:"Once verified, we’ll notify you via email so you can complete the onboarding."}},card_payment_method:{subHeader:"Securely add your preferred payment method to activate your account.",addNewCard:"Link a new card",protectedCardNo:"****"},connectLedger:{introBody:"This is the moment AI Accountant activates. In the first 2 hours it will read your books, detect recurring journal entry patterns, flag variance anomalies, and hand AI CFO the financial foundation it needs to answer any question you ask.",whatHappensHeading:"What happens after you connect?",firstPhase:{title:"First 2 hours",body:"Reads your chart of accounts and every transaction to build a complete finance graph of your company — a structured model of vendors, accounts, cash flows, and relationships that powers every automated report."},secondPhase:{title:"First 2 to 4 hours — your AI gets personal",body:"Zeni builds AI models fine-tuned specifically to {tenantName} — your vendors, your chart of accounts, your accounting patterns. Trained on signals from 1,000+ Zeni customers and over $20B in transactions."},unlocksTooltip:{quickbooks:{heading:"What you unlock by connecting Quickbooks",accountantBullets:["Auto-categorizes every transaction into your chart of accounts.","Reconciles bank, card, and ledger lines end-to-end.","Drafts the journal entries that close your books."],cfoBullets:["Grounds every forecast and answer in your live ledger.","Powers cash, burn, and runway in the dashboard."]},netsuite:{accountantBullets:["Consolidates close across every subsidiary in your structure.","Drafts multi-entity GL with intercompany eliminations.","Handles advanced revenue recognition schedules."],cfoBullets:["Rolls cash, burn, and runway up across all subsidiaries.","Forecasts respect entity-level transfer pricing and FX."]}},pageSubtitle:"Required foundation for both AI Agents"},officerVerification:{introBody:"Upload a government-issued ID below. Zeni AI reads the document and autofills your details automatically — no manual typing required.",aiCallout:{body:"will retrieve data from the document once you upload it and autofill the details."},autofillFooter:"Fields marked with the Zeni AI sparkle were autofilled from your uploaded document."},companyVerification:{introTitle:"Verify your business.",introBody:"Upload your EIN document. Zeni AI extracts all business details automatically — no manual typing required.",aiCallout:{body:"will retrieve data from your EIN document and autofill all business details."},autofillFooter:"Fields marked with the Zeni AI sparkle were autofilled from your uploaded document."},unlockFinancialStack:{pageTitle:"Unlock your financial stack",pageSubtitle:"You can complete verification any time from Company Settings.",introTitle:"Verify once. Unlock two financial products.",introBody:"A quick identity and business check — required for financial compliance and takes about 5 minutes. Your AI Agents are already working. When you use Zeni's own products, every transaction flows natively into AI Accountant with zero gaps — your close literally takes care of itself. Here is what you unlock.",products:{chargeCard:{name:"Zeni Charge Card",body:"On every purchase. No annual fees, no foreign transaction fees, no complexity. Credit based on your financial health — no personal guarantee."},businessChecking:{value:"2.5% APY",body:"FDIC insured up to $3M through Thread Bank sweep network. Interest compounded daily. No minimums, unlimited accounts."},treasury:{value:"Up to 4% APY",body:"Put idle cash to work automatically. Smart allocation across instruments to maximize yield on your operating reserves."},billPay:{body:"Free domestic transfers, free USD international wires, $0 ACH fees. AI auto-fills invoice details and handles all journal entries automatically."},reimbursements:{body:"Unlimited reimbursements with same-day ACH payouts. Supports 160 currencies, multi-level approval workflows, and AI categorization built in."},debitCard:{name:"Zeni Debit Card",body:"Instant cashback on every spend with no minimums. Full AI spend management, real-time controls per employee or department, and zero foreign transaction fees."}},aiActiveCallout:{heading:"AI Accountant and AI CFO are already active.",body:"Zeni AI will read your uploaded documents and autofill all details automatically.",metaPrimary:"Most verifications",metaSecondary:"complete in under 5 mins"},kycStep:{title:"Step 1 — Verify your identity (KYC)",body:"Upload a government-issued ID. Zeni AI reads the document and autofills name, date of birth, and address automatically. Required by the Bank Secrecy Act and Anti-Money Laundering regulations."},kybStep:{title:"Step 2 — Verify your business (KYB)",body:"Upload your EIN document. Zeni AI extracts company legal name, incorporation type, registered address, and Tax ID automatically. Required for financial services compliance.",meta:"Takes about 3 mins"},startVerificationCta:"Start verification"},chrome:{skipLabel:"Skip for now",skipToDashboardDisabledTooltip:"Connect QuickBooks to activate your dashboard",skipToDashboardPendingVerificationTooltip:"Verify your bank account to activate your dashboard",skipToDashboardLoginRequiredTooltip:"Re-login to your bank account to activate your dashboard"},activateSubscription:{pageTitle:"Activate your subscription",pageSubtitle:"Required to activate your Zeni subscription.",ctaLabel:"Continue to connect your ledger",ctaLabelWithoutLedger:"Continue to verify your business"},connectLedgerPage:{ctaLabel:"Continue to activation",pageSubtitle:"Required foundation for both AI Agents"},officerVerifyPage:{pageSubtitle:"Documents are encrypted and stored with SOC 2 Type II compliance.",ctaLabel:"Continue to business verification"},companyVerifyPage:{pageTitle:"Verify your business",pageSubtitle:"Documents are encrypted and stored with SOC 2 Type II compliance.",ctaLabel:"Submit and go to dashboard"},aiAgentsActivating:{demoTenantName:"Pied Piper"},connectDataSources:{pageTitle:"Connect your Data Sources",pageSubtitle:"Connect what you have access to — others on your team can add the rest later.",ctaLabel:"Continue to verification"},setupBilling:{introTitle:"To get started, please link your payment method and enter company billing address.",introBody:"Your AI Agents are already reading your books. Set up billing to keep them running after your trial ends.",includedCard:{heading:"What's always included:",accountantBody:"Runs your books every day, automatically.",cfoBody:"Answers every financial question, always available.",connectionsLabel:"Unlimited data source connections",connectionsBody:"QBO, banks, cards, AR, AP, revenue, payroll, email and more.",financeTeamLabel:"Your dedicated finance team",financeTeamBody:"Controller, Team Lead and Accountant available Monday–Friday."},paymentMethodHeading:"Subscription Payment Method",paymentMethodSubheading:"ACH bank debit — no additional fees",businessProfile:{heading:"About Your Business",subheading:"Tell us your industry and business model so your AI Agents can tailor your books to how you run the business.",errorReason:"your business profile"}},qbo_connection:{subTitle:"To set up your dashboard, we must connect with your QuickBooks account.",sucessText:"Congratulations! You have successfully established a connection with QuickBooks.",subtitleText:"Accounting & bookkeeping — journal entries, invoices, bills, expenses",requiredText:"Please connect Quickbooks to sync your financial data",errorText:"Unable to connect quickbooks. Please try again."},company_officer:{subTitle:"Enter proof of identity to complete verification."},company_details:{subTitle:"Enter business details to complete verification."}},thankYou:{title:"Thank you for providing the details.",subTitle:"We are currently verifying and working on your Dashboard."},footer:{buttons:{submitText:'By clicking "__action__", I certify that the information provided here is complete and correct.'}},productSuite:{navTitleCFO:"Thank you, we've got your details",navTitle:"Thank you for completing your onboarding steps",updatePaymentDetails:"Update Payment Details",messageBox:{default:"We're now setting up your Quickbooks account and will notify you via email once it's ready.",onlyTax:"Our Tax team will email you with the next steps within 2 business days.",onlyCFO:"Our CFO team will email you with the next steps before your service start date.",onlyPayroll:"Our Payroll team will email you with the next steps within 2 business days.",taxAndPayroll:"Our Tax & Payroll teams will email you with the next steps within 2 business days.",withTax:"Our Tax team will email you within 2 business days.",withPayroll:"Our Payroll team will email you within 2 business days.",withCFO:"Our CFO team will reach out to you before your service start date.",withTaxAndPayroll:"Our Tax & Payroll teams will email you within 2 business days."},sectionTitleCFO:"Explore more solutions tailored for your business",sectionTitle:"Meanwhile, learn more about Zeni products",sectionFooter:"Discover Zeni's product suite",productCard:{cards:[{cardTitle:"Zeni Reimbursements",sectionTitle:"Pay your employees back faster",sectionSubTitle:"Reimburse your employees at lightning speed with AI-powered expense processing at no additional cost."},{cardTitle:"Zeni Bill Payments",sectionTitle:"Pay your bills in seconds",sectionSubTitle:"Speed up domestic and international vendor payments with AI-powered invoice processing at no additional cost."},{cardTitle:"Zeni AI Bookkeeping",sectionTitle:"Simplify your bookkeeping",sectionSubTitle:"Give your business all the financial insights it needs to succeed on a single dashboard."}]}},aiFinanceTeamReady:{title:{prefix:"Your ",highlight:"AI finance",suffix:" team is ready, {firstName}."},agentChip:"Two AI Agents are joining {companyName}'s finance org today.",description:"Connect them to your financial data and they start working immediately — categorizing, reconciling, journalizing, and answering every question your CFO has.",accountantCard:{subtitle:"Runs the books every day. Handles every accounting task automatically.",tasks:{bankReconciliation:{title:"Bank reconciliation",meta:"Chase ••••8992 — 847 transactions matched"},autoCategorization:{title:"Auto categorization",meta:"1,204 transactions — 94% categorized"},journalEntryEngine:{title:"Journal entry engine",meta:"12 recurring JEs detected and scheduled"},fluxAnalysis:{title:"Flux analysis",meta:"AWS +29% vs last month — flagged"},apArAging:{title:"AP and AR aging",meta:"3 invoices 30+ days overdue — surfaced"}},footer:"All of this happens automatically, every day."},cfoCard:{subtitle:"Answers every financial question. Always available, always precise.",chat:{netBurnQuestion:"What is our net burn this month?",netBurnAnswer:{heading:"Net burn is $487K this month",body:"Payroll 61%, software and infrastructure 22%. Up $34K vs last month — new engineering hire Mar 12 and an $18K AWS overage."},revenueQuestion:"Are we on track for Q2 revenue?",revenueAnswer:{heading:"Yes, on track at 94% confidence",body:"$312K closed, $180K in late stage pipeline due this month. Risk: 3 March renewal invoices totalling $42K still outstanding."}},suggestions:{runway:"What's our current runway?",burnByDept:"Show me burn by department",vendorReview:"Which vendors should I review?",closeStatus:"Close status for November"}},trustRow:{soc2:"SOC 2 Type II",bankGrade:"Bank-grade encryption",trusted:"Trusted by 1,500+ finance teams"},cta:"Connect your Finance Team"}},uncategorizedAccountsMapping:{accountingSettings:{heading:"Account Settings",accountingClasses:{title:"Accounting Classes",subTitle:"Track and categorize transactions by class. Turning this off hides class fields and columns across the workspace.",enableConfirmation:{title:"Enable Accounting Classes?",description:"Class fields will appear on transactions, bills, reimbursements, and reports so you can track spending by class."},disableConfirmation:{title:"Disable Accounting Classes?",description:"Class fields and columns will be hidden across the workspace. Existing class assignments on transactions are preserved but won't be visible until you re-enable this setting."}},projects:{subTitle:"Track and categorize transactions by project. Turning this off hides project fields and columns across the workspace."}},uncategorizedSection:{heading:"Uncategorized Accounts",title:"Income & Expense Accounts",subTitle:"Select the accounts used to temporarily track transactions that require clarification.",incomeLabel:"Income Account:",expenseLabel:"Expense Account:",incomeAccount:"Income Account",expenseAccount:"Expense Account"},billsSection:{subTitle:"Select the account used to track charges while using Zeni Bill Pay",bankChargesAndFeesLabel:"Bank Charges & Fees Account:",billPayExpenseAccount:"Bill Pay Expense Account"},reimbursementsSection:{subTitle:"Select the account used to track charges while using Zeni Reimbursements",mileageLabel:"Mileage Account:",reimbursementsExpenseAccount:"Mileage Expense Account"},customersSection:{heading:"Customers",autoReviewIncomeWithoutCustomer:{title:"Mark Income Transactions as Complete with Missing Customer",subTitle:"Deposits and journal entries posted to an income account move to Complete once the category and class are set, even when the customer is missing."}},vendorSection:{prepaidExpenseSubTitle:"Select the accounts used to track prepaid expenses",fixedAssetsSubTitle:"Select the accounts used to track fixed asset expenses",accruedExpensesSubTitle:"Select the accounts used to track accrued expenses",prepaidExpenselabel:"Prepaid Expense Accounts:",fixedAssetslabel:"Fixed Asset Accounts:",accruedExpenseslabel:"Accrued Expense Accounts:",prepaidExpenseAccount:"Prepaid Expense Account",fixedAssetsAccount:"Fixed Asset Account",accruedExpensesAccount:"Accrued Expense Account"},common:{label:{bankAccountLabel:"Bank Accounts:",expenseCategoriesLabel:"Expense Categories:"}},filing1099Section:{subHeading:"Form 1099 is a tax form filed by businesses to report annual payments of $600 or more to vendors or independent contractors.",bankAccountTitle:"Bank Accounts",bankAccountSubTitle:"Select the bank accounts used to pay vendors",expenseCategoriesSubTitle:"Select the expense categories to filter eligible payment types",infoTextBankAccount:"To fetch all payments made to vendors",infoTextGlAccount:"To filter the eligible payments",allExpenseTypes:"All Expense Types",all1099Types:"All 1099 Types",allBoxes:"All Boxes"},placeholder:{incomePlaceholder:"Select Income Account",expensePlaceholder:"Select Expense Account",accountPlaceholders:"Select accounts",categoryPlaceholder:"Select Category",boxPlaceholder:"Select box"},tooltip:'The "__account__" recommendation is __based__',noOptions:{establishQBO:"Kindly establish the accounts in QuickBooks.",noTypesFound:"No type found!",noBoxTypesFound:"No box type found!"},capitalizationSection:{heading:"Capitalization Thresholds",headingSubtitle:"Thresholds are auto-calculated nightly. Set a user override to use your own value instead.",onboardingPopup:{titles:{prepaid:"Prepaid Expense Thresholds Identified",fixed_asset:"Fixed Asset Thresholds Identified"},descriptions:{prepaid:"Set a capitalization threshold for __accountName__. Transactions below the threshold will be expensed directly instead of being capitalized.",fixed_asset:"Set a capitalization threshold for __accountName__. Transactions below the threshold will be expensed rather than capitalized as assets."},maybeLaterButton:"Maybe Later",thresholdPlaceholder:"Enter threshold amount",helpText:"You can always update this later in Settings > Accounting."},globalControls:{title:"Global Threshold Controls",threshold:{description:"Overrides all learned thresholds when set. Clear to use per-account learned values."},maxCeiling:{label:"Max Ceiling",description:"Caps learned thresholds — any account whose learned value exceeds this is clamped. Clear to use system default."}},accountsTable:{subtitle:"Capitalizable Accounts",overrideBanner:"All accounts using user-set threshold: __value__",headers:{threshold:"Threshold",matchStrength:"Match Strength",effectiveThreshold:"Effective Threshold",learnedThreshold:"Learned Threshold",userOverride:"User Override"},classification:{prepaid:"Prepaid"},matchPattern:{LABEL:"Strong",TYPE_ONLY:"Weak"},sourceBadge:{override:"Override",learned:"Learned"},lastUpdated:"Last updated: __date__",empty:{noData:"Accounts will appear here after the nightly analysis runs.",noLearned:"No capitalizable accounts with identified thresholds yet.",noAccounts:"No capitalizable accounts identified yet."}},defaultCurrencySymbol:"$"}},jeSchedules:{scheduleList:{defaultDownloadFileName:"__tenant__ Schedules.xlsx",tableHeaders:{balanceAsOfToday:"Balance as of today",endMonth:"End Month",expenseCategory:"Expense Category",assetId:"Asset ID"},noData:"No Schedules Found",heading:{expenseSchedules:"Expense Schedules",searchPlaceholder:"Search Schedules"},getSchedules:{selectSchedule:"Select Schedule:",getSchedules:"Get Schedules"},scheduleStatus:{draft:"Draft"}},scheduleDetails:{jeSchedule:"JE Schedule",showTransactionTooltip:"Show Transaction",scheduleTransactionsHeader:{vendorName:"Vendor Name",expenseCategory:"Expense Category:"},sequenceSchedule:{header:"Schedule Sequence",notCreated:"Once details are entered, the schedule sequence will be displayed here.",sequenceHeaders:{runningBalance:"Running Balance (as of today)",jeLink:""},accruedSequenceHeader:{jePostingDate:"Accrual Posting Date",runningBalance:"Accrual Balance",jeLink:""},sequenceData:{amountPlaceholder:"0"},postingStatus:{pending:"Pending",unknown:"Unknown",posted:"Posted",canceled:"Canceled",recorded:"Recorded"}},scheduleDetailsSection:{header:"Schedule Details",startMonth:"Start Month:",startMonthPlaceholder:"Select start month",months:"Months:",monthsPlaceholder:"Select month",accumulatedDepreciationCategory:"Accumulated Depreciation Category:",accumulatedDepreciationCategoryPlaceholder:"Select accumulated depreciation category",assetId:"Asset ID:",assetIdPlaceholder:"Add asset ID",postingDate:"Posting Date:",postingDatePlaceholder:"Select posting date",confirmCancelAccrualDescription:"Cancel all the pending accrual schedules. This action cannot be undone.",confirmDeletionDescription:"Are you sure you want to delete this schedule? This action cannot be undone.",confirmDeletionDescriptionNote:"Note - Deleting the schedule will not delete any associated journal entries in QBO.",markAsCompleted:"Mark As Completed",createSchedule:"Create Schedule",scheduleMarkedAsCompleted:"Schedule has been marked as completed",cancelPendingAccrual:"Cancel Pending Accruals",cancelAccrual:"Cancel Accrual",viewRecordedJE:"View Recorded JE",viewPostedJE:"View Posted JE",deleteSchedule:"Delete Schedule"},linkJE:{fetchJE:"Fetch JE",jeLinkURLPlaceholder:"Add Link",jeLink:"JE Link:",linkJE:"Link JE",linkBillExpense:"Link Bill or Expense",viewBillExpense:"View Bill or Expense",jePostingDate:"JE Posting Date:",jeDetails:"JE details will be presented here once you enter the JE link and complete the fetch operation.",transactionFetchError:"There was an error fetching the transaction.",zeniRecommendation:"Based on Zeni GPT recommendation, journal entry posting has been automatically retrieved for the schedule."}},scheduleAccruedDetails:{new:{header:"New Accrued Expenses",new:"new"},labels:{estimatedMonthlyAmount:"Estimated Monthly Amount:",accruedExpenseCategory:"Accrued Expense Category:",startingBalance:"Starting Balance:"},placeholders:{selectVendor:"Search and select vendor",addBalance:"Add Balance",selectAccruedExpenseCat:"Select accrued expense category"}},linkBillExpenseDetails:{tableHeaders:{transactionAttachment:""},title:"Link Bill Or Expense",noBillFound:"No Bill or Expense found for the schedule",linkBill:"Link Bill",additionalBills:"Additional Bills For The Vendor",zeniGPTText:"Based on Zeni GPT recommendation, the bill or expense posting has been automatically retrieved for the schedule."}},vendorReview:{globalReview:{newGlobalMerchant:{tip:"Protip: Verify online domain availability of the vendor name.",recommendationInfoText:"Enter text to fetch recommendation"},globalMerchantList:{navBarTitle:"Global Vendors Review",searchPlaceholder:"Search tenant",confirmationPopup:{title:'Are you sure you want to add "_merchant_name_" in Global vendor list?',description:"Confirm will add the vendor to the global list. This change can’t be reverted back.",merchantNameFallback:"this merchant"},selectPlaceholder:"Select Global Vendor",noDataText:"No global vendors to display yet!",noMatchedDataText:"No global vendors matched your search."}},firstReview:{searchPlaceholder:"Search vendor",viewRecipts:"View receipts",vendorDropdown:{recommendedCustomer:"Recommended Customer",allCustomers:"AllCustomers",fromOldName:'Change name from "__old_name__"',toNewName:' to "__new_name__"'},invoice:"invoice",popupMessages:{netsuiteLinkPopupTitle:'A vendor by name "_vendor_name_" already exists in NetSuite',netsuiteLinkPopupMsgHeader:"Please login to NetSuite and follow the steps given below to merge the vendor",netsuiteLinkPopupSubTitle:"Keep in mind that merging vendor profiles is permanent. You can't undo this later.",netsuiteLinkPopupDescription:"Please note that the related transactions will be migrated within the next 24 hours after the change.",qboLinkPopupMsgHeader:"Please login to QBO and follow the steps given below to merge the vendor",qboLinkPopupSubTitle:"Keep in mind that merging vendor profiles is permanent. You can't undo this later.",qboLinkPopupTitle:'A vendor by name "_vendor_name_" already exists in QBO',zeniUpdatedRecommendationPopupTitle:'Vendor recommendation for "_vendor_name_" is updated from "_old_recommendation_" to "_new_recommendation_".',zeniUpdatedRecommendationPopupMsg:"Zeni AI has updated the recommendation for this vendor name. Click 'Continue' to use updated vendor name or Click 'cancel' & refresh the page to view the updated vendor recommendation.",zeniNewRecommendationPopupTitle:'Vendor recommendation for "_vendor_name_" is updated to "_new_recommendation_".',zeniNewRecommendationPopupMsg:"Zeni AI has provided a recommendation for this vendor name. Click 'Continue' to proceed with the selected vendor name or 'Cancel' to view the newly added recommendation.",zeniNewRecommendationNotAvailablePopupTitle:'Vendor recommendation for "_vendor_name_" is no longer available.',zeniNewRecommendationNotAvailablePopupMsg:`Zeni AI has updated the recommendation for this vendor. Please try again.
|
|
214
214
|
`,redirectToQBO:"Redirect to QBO",mergeInQBOSteppedContent:{step1:{navigateTo:"Navigate to ",andSelectThe:" and Select the ",tab:" tab."},step2:{lineText:"Find and open the vendor profile you want to keep. Then Select ",andCopy:" and copy",display:"Display"},step3:{goBackTo:"Go back to the ",lineText:" tab. Find and open the vendor you don't want to keep. Then select "},step4:{lineText:"Change the display name to make it identical to the vendor you're merging it with."},step5:{andThen:" and then "}},mergeInNetSuiteSteppedContent:{step1:{goTo:"Go to ",lists:"Lists",then:" then ",relationships:"Relationships",then2:" then "},step2:{click:"Click ",next:" next to the ",sourceInfo:" that will be the source "},step3:{onThe:"On the ",page:" page, under ",click:", click "},step4:{onThe:"On the ",mergeVendor:"Merge Vendor",endText:" page, select the target vendor into which you want to merge this source vendor record. "},step5:{text:" Both the source and target vendor records must have the same primary subsidiary to merge the records. "},step6:{click:"Click ",text:" . At the prompt to confirm the action, click "},step7:{onThe:"On the ",duplicateResolution:"Duplicate Resolution Status",text:" page, the merge is queued for process. "},step8:{click:"Click ",processText:" to process the merge or the ",haltText:" link to halt the merge process. "},step9:{the:"The ",text:" column provides the results of the merge. "},step10:{text:"The un-categorized and mis-categorized transactions for the deleted vendor will be migrated within 24 hours after the vendor merge is completed. "}}},rowMoreActions:{markAsEmployee:"Mark as Employee",markAsLocalContractor:"Mark as Local Contractor"},tooltip:{mergeInQBOText:"Updated vendor name already exists in QBO and needs to be merged.",mergeInNetSuiteText:"Updated vendor name already exists in NetSuite and needs to be merged."},overlay:{title:'Add Website for "_vendor_name_"'}}},commentsAndNotifications:{notifications:{texts:{markAsRead:"Mark as Read",markAllAsRead:"Mark all as read"},actionStrings:{comments:{mention:"mentioned you in comment",reply:"replied to your comment",reaction:"reacted to your message",toMessage:"to your message",assign:"assigned you to a task",unassign:"unassigned you from a task",newThread:"created a new thread",resolveComment:"resolved a comment",unResolveComment:"reopened a comment",newActivity:"performed new activity on your message",newRepliesAdded:"replied to a comment",newCommentAdded:"added a comment"},notifications:{create:"created this task.",assign:"assigned this task to you.",overdue:"Due date was __date__",due:"Currently __task_status__ and is due tomorrow.",dueTomorrow:"This task is due tomorrow.",statusUpdate:"Status updated from",activities:"made updates to this task.",delete:"deleted this task.",archive:"archived this task.",newActivity:"performed new activity on this task."}},strings:{notificationSelected:"Notification selected",notificationsSelected:"Notifications selected",newMessage:"You have received a new message"},message:{noNotificationsMessage:"No notifications at this time. You're all caught up."}}},featurePreview:{scheduleDemo:"Schedule a Demo",popups:{home:{title:"Unleash the Power of AI Bookkeeping",text:"Update your books daily, access real-time insights, and receive personalized support from a dedicated team of experts — all on a single platform"},ai_automation:{title:"Unleash the Power of AI Bookkeeping",text:"Update your books daily, access real-time insights, and receive personalized support from a dedicated team of experts — all on a single platform"},reports:{title:"Investor Ready Reports",text:"Generate beautiful PDF reports to forward to investors, bankers, or to build into your board deck. Alternatively, download or share view-only access to your dashboard."},forecast:{title:"Forecasting and Planning",text:"Don't settle for Excel. Accurately forecast your bookings, revenues, workforce, expenses and cash flows by comparing Actuals vs Budgets from a central dashboard."},bills:{title:"The fastest way to pay vendors",text:"Pay domestic and international vendors quickly and automate your accounts payable process end-to-end directly from the dashboard – at no additional cost. "},reimbursements:{title:"Reimburse employees at lightning speed",text:"Embrace the efficiency and future of AI-driven expense reimbursements while boosting employee satisfaction."},vendors:{title:"Stop wondering how you’re spending money",text:"Daily, crystal-clear insights into your Operating Expenses give you an instant view into your cash burn and expenses, including Gross Burn and Net Burn trends."},people:{title:"",text:""},rewards:{title:"",text:""},cards:{title:"",text:""},checking:{title:"Business banking turning transactions into triumphs",text:"Modern checking accounts with a guaranteed yield earned from your first dollar and no hidden fees. Leverage AI to auto categorize your transactions effortlessly."},treasury:{title:"",text:""},accounting:{title:"",text:""},approval_rules:{title:"",text:""},bank_connections:{title:"",text:""},business_verification:{title:"",text:""},company_details:{title:"",text:""},integrations:{title:"",text:""},my_profile:{title:"",text:""},my_bank_connections:{title:"",text:""},notifications:{title:"",text:""},billing:{title:"",text:""},performance:{title:"",text:""},ai_cfo:{title:"",text:""}}},collaboration:{commentOnField:"comment on field",threads:{placeholder:{replyAComment:"Reply to comment...",addANewComment:"Add a new comment..."},tooltip:{resolveComment:"Resolve comment",unResolveComment:"Re-open comment"}}},expenseAutomation:{common:{numbers:{maximumCount:999}},overview:{confidenceScoreDescription:"Higher score means you're close to finish.",auditScoreDescription:"Streamline your month-end close with Zeni AI.",monthEndCloseProgress:"Month-end close progress",targetClose:"Target Close:",daysToClose:"Days to Close:",financialClose:"Financial Close",reviewReport:"Review month-end close report.",insightsCtaMessage:"Improve your confidence score to _minimum_score_ or above to unlock month-end insights",createInsights:"Create _month_name_ Insights",monthEndCloseTrend:"Performance Trend",monthEndCloseTrendNoData:"No data yet!",monthEndCloseTrendNoDataDescription:"Initiate your first month-end close to track performance.",confidenceScoreTooltip:"Indicates overall progress of all month-end close tasks. Higher score means you're closer to finishing the close.",byHumans:"by Humans",progress:"Progress",headerByAI:"By AI",statistics:{accountsAutoReconciled:"Accounts auto-reconciled",transactionsAutoCategorized:"Transactions auto-categorized",humanEfficiency:"Tasks completed by AI Agents",fasterReviews:"Faster reviews",vendorsWithFluctuations:"Vendors with fluctuations"}},confirmationDescription:"Are you sure you want to exit without saving?",dashboardCard:{month_end_insights:"Month end insights"},transactions:{header:{memoReceipt:"Memo | Receipt",receipt:"Receipt",toFrom:"To/From"},searchPlaceholder:"Search by vendor, amount, date, or memo",tabs:{autoCategorized:"Auto-categorized"},transactionGroupFilter:{transactionGroupLabel:"Transaction Group"},subTitles:{review:{item1:{pre:"",bold:"AI Bookkeeper",post:"has recommendations for Payees, Categories, Classes."},item2:{pre:"",bold:"",prefixIconName:"",post:"Review them, select, save your changes, and AI Bookkeeper will learn from your updates."}},autoCategorized:{item1:{pre:"",post:"have auto-categorized the below #number transactions for this month."},item2:{pre:"",bold:"",prefixIconName:"",post:"Feel free to review and make the necessary changes. AI Agents will learn from your updates."}}},allDoneText:{title:"All set!",subTitle:"Task cleared, ready to soar!"},emptyStates:{noSearchResults:{title:"No matching transactions",subTitle:"Try adjusting your search or filters."}},filters:{categoryLabels:{paymentAccountName:"Payment Account Name",paymentAccountType:"Payment Account Type"},amountOperators:{isEqual:"Is equal",inBetween:"In between",placeholder:"Select operator"},filterOptions:{transactionAmountOptions:[{label:"< 100",value:"-10000000<->100"},{label:"100 to 500",value:"100<->500"},{label:"500 to 1K",value:"500<->1000"},{label:"1K to 5K",value:"1000<->5000"},{label:"5K to 10K",value:"5000<->10000"},{label:"10K to 20K",value:"10000<->20000"},{label:"> 20K",value:"20000<->10000000"}],transactionTypeOptions:[{label:"Auto-categorized",value:"autoCategorized"},{label:"Review",value:"review"},{label:"Categorized",value:"categorized"},{label:"Uncategorized",value:"uncategorized"}]},selectPaymentAccountNamePlaceholder:"Select Payment Account Name",searchForPayeePlaceholder:"Search for Payee"},addProject:"Add Project",transactionActivityLog:{noLogsFound:"No Activity logs found",transactionIngested:"Transaction ingested.",aiBookkeeperAdded:"AI Bookkeeper added the",userUpdatedDetails:"Updated the transaction details.",linePrefix:"Line #"},transferDrawer:{debitAccountLabel:"Debit Account:",creditAccountLabel:"Credit Account:",keepExpense:"Keep {transactionType}",convert:"Convert",convertToTransfer:"Convert {transactionType} to Transfer",convertToCreditCard:"Convert {transactionType} to Credit Card Payment",transferDrawerSubtitle:"The current {transactionType} will be deleted and replaced with a transfer entry",creditCardPaymentDrawerSubtitle:"The current {transactionType} will be deleted and replaced with a credit card payment entry",groupHeadingAllAccounts:"All Accounts",noEligibleAccountsDropdownLine2:"Connect an account or keep this as an expense."},transactionTypeDropdown:{multilineNotEligibleTooltip:"Multiline transactions are not eligible for transfer entry."}},jeSchedules:{subTitles:{item1:{pre:"",bold:"",prefixIconName:"",post:"Please review the following journal entries below and correct or post them."},item2:{pre:"",post:"will learn from your update, automate it, and boost accuracy and efficiency to simplify every step."}},allDoneText:{title:"High five!",subTitle:"All schedules reviewed!"},emptyState:{pendingReview:{title:"High five!",subTitle:"All schedules reviewed!"},ongoing:{title:"High five!",subTitle:"No ongoing schedules"},completed:{title:"High five!",subTitle:"No completed schedules"}},scheduleHeaders:{period:"Amortization Period",balance:"Running balance (as of today)",months:"Remaining Months",amountForMonth:"Amount(for this month)",entry:"Entry",monthlyAmount:"Monthly Amount",reversesOn:"Reverses on",reversedOn:"Reversed on",reversesOnMatch:"Reverses on match",scheduledAndPosted:"Scheduled + Posted",startMonth:"Start Month",amount:"Amount",memo:"Memo"},scheduleCot:{recommendedMethod:"Recommended method",monthLifeSuffix:"-mo life",methodByType:{prepaid_expenses:"Straight-line amortization",fixed_assets:"Straight-line depreciation",accrued_expenses:"Accrual",deferred_revenue:"Straight-line recognition"},credit:"Credit",debit:"Debit"},oneTimeAccrualType:"Accrual",lifecycleLabel:{prepaid_expenses:"Prepaid Schedule",fixed_assets:"Fixed Asset Schedule",accrued_expenses:"Accrued Schedule",deferred_revenue:"Deferred Revenue Schedule"},tooltipText:{missingVendor:'The vendor "_deleted_vendor_" was deleted from the Journal Entry. Please add the correct vendor and try posting again.',missingCategory:'The category "_deleted_category_" was deleted from the Journal Entry. Please add the correct category and try posting again.',missingDepCategory:'The category "_deleted_dep_category_" was deleted from the Journal Entry. Please add the correct accumulated depreciation category and try posting again.'},resolveErrors:{heading:"This entry could not be posted",vendor_deleted:'Vendor "_deleted_field_" was deleted. Update it in Review.',debit_category_deleted:'Category "_deleted_field_" was deleted. Update it in Review.',credit_category_deleted:'Accumulated depreciation category "_deleted_field_" was deleted. Update it in Review.',qbo_error:"QuickBooks rejected this entry. Try posting again.",qbo_authorization_error:"The QuickBooks connection expired. Reconnect it, then post again.",qbo_invalid_company_status_error:"The QuickBooks subscription is inactive. Resolve it, then post again.",qbo_book_close_date_error:"The books are closed for this date. Reopen the period or move the date."},addDepCategory:"Add Depreciation Category",aiBotEmail:"ai@zeni.ai",botEmail:"bot@zeni.ai",aiAccountant:"AI Accountant ",zeniGPTText:"recommends a new JE schedule. Please review and set it up!",kpiStrip:{aiAccountant:"AI Accountant Created",manual:"Manual Created",schedules:"schedules",total:"Total this close",typeLabels:{fixed_assets:"Fixed Asset",prepaid_expenses:"Prepaid",accrued_expenses:"Accrual",deferred_revenue:"Revenue Accrual"}},typeFilter:{prepaid_expenses:"Prepaid",fixed_assets:"Fixed Asset",accrued_expenses:"Accrual",deferred_revenue:"Deferred Revenue",all:"All"},groups:{createdInsight:"Auto-posted or manually recorded",failedPostings:"Failed Postings",pendingReviewInsight:"Input requested before posting"},tabs:{schedules:"Review Schedules",actualMatching:"Actual Matching",existingSchedules:"Existing Schedules"},actualMatching:{matchNew:"Match New",matchNewDescription:"Match a bill to an accrual",undoReversal:"Undo Reversal",approveAndReverse:"Approve & reverse",openBill:"Open bill",openCharge:"Open charge",openTransaction:"Open {type}",kpi:{actualsReceived:"Actuals Received",ofExpected:"of {count} expected",vendorsStillPending:"{count} vendors still pending",vendorStillPending:"1 vendor still pending",autoReversed:"Auto-Reversed",cleared:"{amount} cleared",pendingReview:"Pending Review",estMinutesToClear:"Est. {minutes} min to clear",variance:"Variance vs Accrued",varianceFooter:"{amount} net",hover:{actualsReceived:"Bills that landed this close",pendingReview:"Variance above threshold or ambiguous",autoReversed:"Matched and reversed without you",variance:"Actual minus accrued, across reversals"}},statusFilter:{all:"All",pendingReview:"Pending review",reversed:"Reversed"},groups:{pendingReview:"Pending review",reversed:"Reversed"},groupSubtitles:{reversed:"AI Accountant and Human User · {amount}",pendingReview:"Variance above threshold or ambiguous match · {amount}"},columns:{received:"Received",vendor:"Vendor",type:"Type",service:"Service",reverses:"Reverses",matchTier:"Match tier",reversedBy:"Reversed by",accrued:"Accrued",actual:"Actual",variance:"Variance",action:"Action"},reversedBy:{aiAccountant:"AI Accountant",humanUser:"Human User"},matchTier:{exact:"Exact match",fuzzy:"Fuzzy",aiAccountant:"AI Accountant",manual:"Manual"},reversesCount:"{count} accruals",groupedOpenAccrual:"Open accrual",groupedMenuAria:"Accruals in this match",lifecycle:{pendingReview:"Pending review",autoReversed:"Auto-reversed"},emptyState:{title:"No matches this close",subTitle:"Reversed and pending-review accruals for this close will show up here."},matchModal:{title:"Match transactions to accruals",subtitle:"Select the bills or expense lines and the posted accruals they reverse. Everything in one match must be the same vendor.",leftTitle:"Transactions",rightTitle:"Accruals",selectedLabel:"selected",selectedCount:"{count} selected",leftSearchPlaceholder:"Search bills, expenses, and checks",rightSearchPlaceholder:"Search posted accruals",emptyLeft:"No transactions found",emptyRight:"No posted accruals found",confirm:"Confirm match",maxAccruals:"You can match up to 50 accruals at once.",conflict:"Could not reverse this accrual",vendorLock:"Only accruals for the selected vendor can be matched.",accrualSingular:"accrual",accrualPlural:"accruals",accrualToClear:"1 accrual to clear",noMatchingAccrual:"no matching accrual",stepAccruals:"Accruals",stepReview:"Review",guidePickTxnSubtitle:"The journal entries and variance will preview here once both sides are selected.",guidePickAccrualTitle:"Pick the accruals it clears",guidePickAccrualSubtitle:"Select one or more posted {vendor} accruals to preview the reversal.",footerPickAccrual:"Select at least one accrual",previewEmpty:"Pick at least one transaction and one accrual to preview the match.",accrualJeTitle:"Accrual journal entry being reversed",accrualJeTitlePlural:"Accrual journal entries being reversed",reversalJeTitle:"Reversal journal entry",reversalJeTitlePlural:"Reversal journal entries",reversalJeNote:"One per accrual · mirrors its amount",transactionMatchedTitle:"Transaction matched",transactionsMatchedTitle:"Transactions matched",matchedTotal:"Total",linesSelected:"{selected} of {total} selected",noAccrualsLeft:"Nothing to match right now",noAccrualsLeftSubtitle:"All accruals are matched to their transactions.",goBack:"Go back",pendingReview:"Needs categorization before it can be matched",pendingReviewLine:"1 line needs categorization before it can be matched",pendingReviewLines:"{count} lines need categorization before they can be matched",columnDate:"Date",columnAccount:"Account",columnDebit:"Debit",columnCredit:"Credit",lastDayOfMonth:"last day",reversesLabel:"_REV Reverses",vsAccrued:"vs. accrued {amount}",accruedExpensesFallback:"Accrued Expenses"},matchDetail:{service:"service",servicePeriod:"Service period",billDate:"Bill date",matchMethod:"Match Method",source:"Source",sourceJeAgent:"JE Agent",sourceManual:"Manual",sourceAttribution:"Source: {source}",accrued:"Accrued",accruedAmount:"Accrued Amount",actual:"Actual",actualAmount:"Actual Amount",variance:"Variance",varianceAboveThreshold:"Variance above {percent}% threshold",whyThisMatched:"Why This Matched",whyExact:"Vendor and amount matched exactly against the {service} accrual.",whyFuzzy:"Vendor matched; amount differs by {variance}. Within review threshold.",whyFuzzyAboveThreshold:"Vendor matched; amount differs by {variance}. Above review threshold.",whyManual:"Matched manually against the {service} accrual.",whyAi:"Matched against the {service} accrual.",matchMethodExact:"Exact match",matchMethodFuzzy:"Fuzzy match",matchMethodManual:"Manual match",matchMethodAi:"AI Accountant",matchDetails:"Match Details",jePostingDate:"JE Posting Date",pendingReversalJe:"Pending Reversal Journal Entry",reversedJe:"Reversed Journal Entry",accrualJournalEntry:"Accrual Journal Entry",reversalJournalEntry:"Reversal Journal Entry",mirrorsTheAccrual:"Mirrors the accrual",journalEntries:"Journal entries",accrualJeShort:"Accrual JE",reversalJeShort:"Reversal JE",pendingReversalJeShort:"Pending reversal JE",openLinkedRecords:"Open linked records",txnMatched:"{type} Matched",columnMemo:"Memo",columnAmount:"Amount",totalBilled:"Total billed",totalPaid:"Total paid",totalPosted:"Total posted",matchedMemo:"{vendor} — {service} service",accrualJes:"Accrual journal entries",leftovers:"Not reversed",reversalFailed:"Reversal failed",undoFailed:"Undo failed",loadErrorTitle:"Couldn't load this match",loadErrorSubTitle:"Refresh to try again.",reversalJe:"Reversal journal entry",matchedBill:"Matched bill",matchedCharge:"Matched charge",matchedTransaction:"Matched {type}",statusAutoReversed:"Auto-reversed",statusPendingReview:"Pending review",statusManuallyReversed:"Manually reversed"},feedback:{ignoreMatch:{title:"Why ignore this suggestion?",subtitle:"Tell us why {amount} shouldn't be matched for {vendor} — AI Accountant learns from this.",submit:"Ignore suggestion",reasons:{wrong_bill:"Wrong bill",wrong_period:"Wrong period",amount_off:"Amount is off",already_handled:"Already handled",other_ignore:"Something else"}}}},newSchedule:{title:"New Schedule",oneTimeAccrualTitle:"New one-time accrual",oneTimeAccrualSubtitle:"Posts directly to the books",recurringTitle:"New recurring schedule",recurringSubtitle:"Posts monthly entries starting {month}",reviewSchedule:"Review schedule",scheduleDetails:{title:"Schedule Details",oneTimeAccrual:"One time accrual",oneTimeAccrualDescription:"Single JE this month",recurringSchedule:"Recurring schedule"},scheduleType:{title:"Schedule type",subtitle:"What is this schedule spreading?",fixedAssetDescription:"Depreciate a purchase",prepaid:"Prepaid",prepaidDescription:"Amortize a prepayment",accrual:"Accrual",accrualDescription:"One time or recurring estimate",deferredRevenueDescription:"Recognize over time",deferredRevenue:"Deferred Revenue",fixedAsset:"Fixed Asset"},baseTransaction:{title:"Base Transaction",subtitleFixedAsset:"The purchase being capitalized",subtitlePrepaid:"The prepayment being spread",searchPlaceholder:"Search by vendor, amount, date and memo",noResults:"Nothing matched your search... Try again.",aiAccountantInsight:"AI Accountant spreads {amount} over {months} months ≈ {amountPerMonth}/mo."},fields:{numberOfMonths:"No. of Month",amountPerMonth:"Amount Per Month",sourceOrTrigger:"Source / trigger",addVendor:"Add vendor",selectStartMonth:"Select start month",selectPostingDate:"Select posting date",selectMonths:"Select months",addAccumulatedDepreciationCategory:"Add accumulated depreciation category",addAssetId:"Add asset ID",addSourceOrTrigger:"Add Source / trigger",selectServiceMonth:"Select service month",accrualCategory:"Accrual Category",addAccrualCategory:"Add accrual category",memoPrefix:"Accrue",estimatedMonthlyAmount:"Estimated Monthly Amount",startingBalance:"Starting Balance",addStartingBalance:"Add balance",accumulatedDepreciationCategory:"Accumulated Depreciation Category",serviceMonth:"Service month",postingDate:"Posting Date",addCategory:"Add category",startMonth:"Start Month",addAmount:"Add amount",category:"Category",addClass:"Add class",assetId:"Asset ID",addMemo:"Add memo",vendor:"Vendor",amount:"Amount",class:"Class",memo:"Memo"},oneTimeAccrual:{postAccrual:"Post accrual",reverseNextMonth:"Reverse next month",reverseNextMonthOff:"Off — accrual stays open until a matching bill arrives from this vendor and clears it.",reverseNextMonthOn:"A reversing JE will post on {date} automatically — use this when no matching bill is expected (e.g., estimated bonus, true-up).",reverseNextMonthOnNoServiceMonth:"A reversing JE will post on the 1st of the month after the service month automatically — use this when no matching bill is expected (e.g., estimated bonus, true-up)."},journalEntryPreview:{title:"Journal Entry Preview",debit:"DR",credit:"CR",autoReversesOnBillMatch:"Auto-reverses when a matching bill arrives from {vendor}.",autoReversesOnDate:"Auto-reverses on {date}."},schedulePreview:{title:"Schedule preview",posts:"Posts",postsValue:"{amount} × {months} months",window:"Window",windowValue:"{start} → {end}",totalCommitted:"Total committed",eachEntry:"Each entry",eachEntryValue:"DR {debit} · CR {credit}",autoPostSuffix:" will auto-post each month until the schedule completes.",autoPostPrefix:"AI Accountant",class:"Class"},newButtonLabel:"New",moreCreateOptions:"More create options"},accrualDetail:{accrualTypeMonthly:"Monthly Accrual",estimatedBy:"Estimated by",editAmount:"Edit amount",statusLabels:{draft:"Pending Review",posting:"Posting",posted:"Posted",posting_blocked:"Posting Blocked",reversing:"Reversing",reversed:"Reversed",reverted:"Reverted"},details:{title:"Accrual Details",servicePeriod:"Service Period",servicePeriodValue:"{month} Service",accrualType:"Accrual Type",liabilityAccount:"Liability Account",autoReversal:"Auto Reversal",reverseNextMonthOption:"Reverse Next Month",onInvoiceMatch:"On Invoice Match",onDate:"On {date}",monthsOfHistoryUsed:"Months of History Used",monthsValue:"{months} months",expenseCategory:"Expense Category",postingDate:"Posting Date",department:"Department",memo:"Memo"},calculationBreakdown:{title:"Calculation Breakdown",calculationMethod:"Calculation Method",weight:"Weight",weightedValue:"Weighted Value",recommendedAccrual:"Recommended Accrual",invoiceAmount:"Invoice Amount",month:"Month"},journalEntryPreview:{title:"Journal Entry Preview",postedTitle:"Posted Journal Entry",reversedTitle:"Reversed Journal Entry",autoReversalEnabled:"Enabled"},billingPattern:{title:"Billing Pattern",avgAmount:"Avg Amount",lastBill:"Last Bill",consistency:"Consistency",billingLag:"Billing lag",monthsTracked:"Months Tracked",percentValue:"{percent}%",serviceMonthMarker:"This service month",noHistoryTitle:"No vendor billing history",noHistoryDescription:"This accrual was entered manually, so there is no vendor profile behind it to chart. The AI Accountant builds one only for the vendors it accrues automatically.",daysValue:"{days} days"},actions:{skipThisMonth:"Skip This Month",approveAndPost:"Approve & Post"},statusStates:{reversed:"Entry reversed"},clearedTag:{label:"Cleared",tooltip:"Reversed {date}"},feedback:{title:"Why skip this accrual?",subtitle:"Tell us why {amount} shouldn't be accrued for {vendor} this month — AI Accountant learns from this.",reasons:{no_activity:"No activity this month",paused:"Vendor paused / off-boarded",too_small:"Not material",need_invoice:"Wait for actual invoice",other_ignore:"Something else"},revert:{title:"Why revert this accrual?",subtitle:"This deletes the {amount} journal entry for {vendor} from the books. AI Accountant learns from the reason.",submit:"Revert Accrual",reasons:{amount_off:"Amount was wrong",wrong_period:"Wrong period",not_accrual:"Shouldn't be accrued",duplicate:"Duplicate",other_revert:"Something else"}},ignoreSchedule:{title:"Why ignore this schedule?",subtitle:"Tell us why this schedule isn't needed — AI Accountant learns from this.",submit:"Ignore Schedule",reasons:{not_needed:"Not needed",wrong_account:"Wrong account",duplicate:"Duplicate",already_handled:"Already handled",other_ignore:"Something else"}},revertSchedule:{title:"Why revert this schedule?",subtitle:"This deletes the posted journal entry from the books and removes the schedule. AI Accountant learns from the reason.",submit:"Revert Schedule",reasons:{amount_off:"Amount was wrong",wrong_period:"Wrong period",duplicate:"Duplicate",created_by_mistake:"Created by mistake",other_revert:"Something else"}},noteLabel:"Add a note (optional)",notePlaceholder:"Anything else we should know?",submit:"Submit Feedback"}},existingSchedules:{downloadCompletedSchedules:"Download Completed Schedules",downloadRange:{title:"Download Completed Schedules",subtitle:"Completed schedules are matched on when they started, not when they finished, so search from before the schedules you are looking for began.",fromLabel:"Started on or after",fromPlaceholder:"Select a month",throughToday:"Includes everything up to today, {today}"},kpi:{ongoingSchedules:"Ongoing schedules",monthlyPosting:"Monthly posting",remainingBalance:"Remaining Balance",toDepreciateAmortize:"to depreciate / amortize",posted:"Posted",typeAbbreviations:{fixed_assets:"Fixed",prepaid_expenses:"Prepaid",deferred_revenue:"Deferred rev",accrued_expenses:"Accrued"}}},searchPlaceholder:"Search for schedules",addCategory:"Add Category"},missingReceipts:{searchPlaceholder:"Search for transactions",subTitles:{pre:"",preLink:"",post:"will do the best to automatically match receipts with the correct transactions. Forward all receipts to {receiptsEmail}",postLink:"{receiptsEmail}"},allDoneText:{subTitle:"All receipts uploaded, like magic!"}},fluxAnalysis:{searchPlaceholder:"Search for vendors",subTitles:{item1:{pre:"",bold:"",prefixIconName:"",post:"Review vendor account transactions for emerging trends and adjust categories and classes to resolve anomalies."},item2:{pre:"Feel free to review and make the necessary changes",post:"will learn from it."}},sectionTitle:{generalExpense:"General Expenses"},reviewedBy:"Reviewed by",remarksBy:"Remarks by",viewVendorDetails:"View Vendor Details",emptyPageTexts:{youDidIt:"You did it!",allReviewed:"All flux reviewed!"},stepsBanner:{collapsedTitle:"Quick steps for Flux Analysis",step1:{title:"Review Variances",description:"Compare vendor-wise spend across months and drill down into categories and classes."},step2:{descriptionPrefix:"Once variances are confirmed,",descriptionSuffix:"select vendors and mark as reviewed."}}},accountRecon:{reconciliation:{headers:{section:{assets:{title:"Assets",subTitle:"Cash and Equivalents"},liabilities:{title:"Liabilities",subTitle:"Credit Cards"}},bankBalance:"Bank Balance",openingBalance:"Opening Balance",closingBalance:"Closing Balance",clearedBalance:"Cleared Balance",matchProgress:"AI Progress",lastReconciled:"Last Reconciled",excludedAccountTitle:"Excluded Accounts"},matchProgressLegend:{byHuman:"by human"},progressBar:{byHumans:"by humans"},stepsBanner:{collapsedTitle:"Quick steps for Bank Reconciliation",step1:{title:"Connect Bank Account",line1AfterIcon:"to add a bank account or",line2:"upload a bank statement."},step2:{title:"Compare Balance",body:'Compare bank statement and cleared balances. Select "Review" if they differ.'},step3:{eyebrow:"Step 3",title:"Review & Update Transactions",body:"Approve AI suggestions to categorize or match entries, and complete any missing fields."},step4:{eyebrow:"Step 4",title:"Reconcile the account",body:'Ensure balances match, then select "Reconcile" to complete reconciliation.'}},menu:{statement:"Account Statement"},statsCards:{autoMatched:"AI Accountant Auto-matched",needsReview:"Needs Review",accountsDone:"Accounts Reconciled",timeSavedByAi:"Time saved by AI Accountant",ofTotalTxn:"of _total_ transactions",acrossAccounts:"across _count_ accounts",ofTotalAccounts:"of _total_ Accounts",hrsSuffix:"hrs"},connectAccountsBanner:{leadNeedConnectedSuffix:"need to be connected.",body:"Connect a data source to start reconciliation. Takes less than 2 min per account.",connectAccounts:"Connect Accounts",dismissAriaLabel:"Dismiss"},status:{reconciled:"Reconciled",reconciledBy:"Reconciled by",reconciledVia:"Reconciled via",reconcileViaQBO:"Reconcile via QBO",balanceSyncInProgress:"Balance sync",statementSyncInProgress:"Statement sync",autoReconInProgress:"Auto-reconciliation",statementParseError:"Statement parse",statementValidationFailed:"Statement validation",statementProcessingFailed:"Statement processing",failed:"failed",isInProgress:"is in progress",booksClosedTooltip:"Books closed. Reopen to reconcile again."},report:{pageTitleSuffix:"Reconciliation report",statementPeriod:"Statement period:",reconciledOn:"Reconciled on",statementDate:"Statement date",accountType:"Account type",financialInstitution:"Financial institution",generalLedgerAccount:"General ledger account",dataSource:"Data source",dataSourcePlaid:"Plaid",currency:"Currency",preparedBy:"Prepared by",reportGenerated:"Report generated",reportReference:"Report reference",summary:"Summary",summarySubtitleBank:"Overview of the bank account and ledger account numbers.",summarySubtitleCard:"Overview of the credit card and ledger account numbers.",bankClosingBalance:"Bank closing balance",creditCardClosingBalance:"Credit card closing balance",statementEndingBalance:"Statement ending balance, {date}",ledgerClosingBalance:"Ledger closing balance",asOfDate:"As of {date}",variance:"Variance",varianceReconciled:"Variance (reconciled)",varianceBeginning:"Beginning",varianceClosing:"Closing",varianceDeposits:"Deposits",variancePayments:"Payments",varianceCharges:"Charges",varianceCredits:"Credits",varianceEquals:"=",agreeLine:"The {institution} and your ledger agree as of {date}.",statementSection:"Statement",bridgeSection:"Bridge",afterStatementDateSection:"After the statement date",statementBeginningBalance:"Statement beginning balance",clearedPayments:"Cleared payments",clearedDeposits:"Cleared deposits",clearedCharges:"Cleared charges",bankAccountClosingBalance:"Bank account closing balance",ledgerBalanceAsOf:"Ledger balance as of {date}",unclearedPaymentsAsOf:"Uncleared payments as of {date}",unclearedDepositsAsOf:"Uncleared deposits as of {date}",unclearedChargesAsOf:"Uncleared charges as of {date}",unclearedCreditsAsOf:"Uncleared credits as of {date}",adjustedLedgerBalanceAsOf:"Adjusted ledger balance as of {date}",clearedTransactionsAfter:"Cleared transactions after {date}",unclearedTransactionsAfter:"Uncleared transactions after {date}",transactionsAfter:"Transactions after {date}",preparedByFooter:"Prepared by {name}",reportGeneratedFooter:"Report generated {date}",utc:"UTC",details:"Details",detailsSubtitle:"Every transaction behind the summary, grouped by whether it cleared or carried forward. Each table ends with its count and total.",clearedTransactionsTitle:"Cleared transactions",clearedTransactionsNote:"Dated on or before {date} and cleared on this statement.",unclearedTransactionsTitle:"Uncleared transactions as of {date}",unclearedTransactionsNote:"In your books on or before the statement date but not yet cleared by the {institution}.",carriedForwardTitle:"Carried-forward items cleared in this period",carriedForwardNote:"Left uncleared on the prior reconciliation and cleared on this statement.",unclearedPaymentsLabel:"Uncleared payments",unclearedDepositsLabel:"Uncleared deposits",unclearedChargesLabel:"Uncleared charges",unclearedCreditsLabel:"Uncleared credits",transactionId:"Transaction ID",date:"Date",type:"Type",match:"Match",payee:"Payee",glAccount:"GL account",amount:"Amount",issueDate:"Issue date",ageDays:"Age (days)",ageDaysTooltip:"Days from the issue date to {date}. Anything over 90 days is bold.",matchAutomatic:"AI Accountant",matchManual:"Manual",total:"Total",totalWithCount:"Total ({count})",institutionBank:"bank",institutionCardIssuer:"card issuer",accountTypeBank:"Bank",accountTypeCreditCard:"Credit card",accountSubTypes:{checking:"Checking",savings:"Savings",money_market:"Money market",cash_on_hand:"Cash on hand",trust_accounts:"Trust accounts"},backToReconciliation:"Back to Reconciliation",reportNotFoundTitle:"No report found",reportNotFoundSubtitle:"There's no reconciliation report for this account and period."},tooltips:{reconciledByLabel:"Reconciled by:",lastUpdatedLabel:"Last updated:",applyingChanges:"Applying changes...",failed:"Could not apply changes",inProgress:"Connection is in progress. Please check back in a few minutes.",balancesNotFound:"Unable to fetch balances for this account.",bankBalanceNotFound:"Unable to fetch bank balance for this account.",clearedBalanceNotFound:"Unable to fetch cleared balance for this account.",reconInProgress:"Reconciliation is in progress. Please check back in a few minutes.",excludeAccount:{title:"Exclude Account"}},drawer:{uploadDropZoneSuffix:"your statement",uploadDropZoneSupportingText:{single_account:"Upload a statement for a single account.",multi_account:"Upload a statement containing multiple accounts."},statementAccountScopeOptions:{single_account:"Single Account",multi_account:"Multiple Accounts"},labels:{lastUpdated:"Last Updated:",lastSync:"Last Sync:"},values:{bank:"Bank",connecting:"Connecting",uploaded:"Uploaded",statementParsing:"Statement sync is in progress"},deleteConfirmation:{heading:"Delete this file?",description:"Deleting the file will affect your reviewed transactions or reconciliation progress."},validationFailed:{heading:"Validation Failed"},fileValidationFailed:{heading:"File Validation failed",description:"We couldn't process your statement. Please check the file and try uploading again."},dateRangeConflict:{alreadyReconciled:{heading:"Date Range Already Reconciled",description:"The statement period overlaps with a period that has already been reconciled"},gap:{heading:"Gap in Reconciliation Period",description:"The statement must start the day after the last reconciled period",expectedStartDate:e=>`Please upload a statement starting ${e}`},lastReconciled:e=>`Last Reconciled: ${e}`,lastReconciledBy:(e,t)=>`Last Reconciled: ${e} by ${t}`},error:{validationFailed:"Validation failed",parsingFailed:"Parsing failed"},excludeFromReconciliation:"Exclude from Reconciliation",excludeConfirmation:{heading:e=>`Exclude "${e}" from Reconciliation?`,description:"This account will be removed from your reconciliation workflow and progress report. Existing data will not be affected, and you can include the account again at any time."},includeForReconciliation:"Include account for Reconciliation",includeConfirmation:{heading:e=>`Include "${e}" for Reconciliation?`,description:"This account will be added back to your reconciliation workflow and progress report."}}},statementProcessing:{steps:["Uploaded file","Reading document structure","Identifying statement type","Extracting account details","Determining opening & closing balances","Verifying statement details","Gathering transactions","Finalizing Reconciliation"],headerTitle:"AI Accountant Reading Statement",stepSubtitles:["Setting up statement analysis and validation","Recognizing transaction layouts and summary sections","Matching format against known bank statement templates","Pulling account number, entity name, and statement period","Locating balance summary from the checking summary table","Cross-checking deposit and withdrawal totals for accuracy","Reading transactions. Extracting dates, amounts, and descriptions","Matching transactions to your ledger and preparing the review"],stepProgressLabel:(e,t)=>`Step ${e} of ${t} completed`,timeRemainingMinutes:e=>`${e} min left`,timeRemainingSeconds:e=>`${e} sec left`,takingLongerThanExpected:"Taking longer than expected...",actionNeeded:"Action needed",continueInBackground:"Continue in Background",accountMapping:{headerSubtitle:e=>`Almost done — assign each of the ${e} cards to a ledger account to finish.`,headerSubtitleAccounts:e=>`Almost done — assign each of the ${e} accounts to a ledger account to finish.`,banner:(e,t)=>`I've extracted all charges from this combined ${e} statement — it covers ${t} cards. Assign each card to a ledger account to file everything. You won't need to upload this file again.`,bannerAccounts:(e,t)=>`I've extracted all charges from this combined ${e} statement — it covers ${t} accounts. Assign each account to a ledger account to file everything. You won't need to upload this file again.`,aiMatched:"AI matched",ledgerAccountLabel:"Ledger account",ledgerAccountPlaceholder:"Select ledger account",overrideWarning:"This account has an ongoing reconciliation. Selecting it will override the existing work.",transactionSummary:(e,t)=>`${e} transactions • ${t} in new charges`,deleteRowAriaLabel:"Remove card mapping",deleteConfirmation:{heading:"Remove this card?",headingAccount:"Remove this account?",description:"The transactions from this card will be excluded from this combined statement, you can still map the remaining cards.",descriptionAccount:"The transactions from this account will be excluded from this combined statement, you can still map the remaining accounts."}},cancelConfirmation:{heading:"Cancel statement parsing?",description:"Your uploaded statement is still being parsed. If you cancel now, the uploaded file and all processing progress will be lost.",continueParsing:"Continue Parsing"}},statementParseInfo:{statementPeriodAndBalances:"Statement period & balances",statementValuesFootnote:"These values are copied directly from the statement.",from:"From:",to:"To:",credits:"Deposits",calculatedValues:"Calculated values",calculatedValuesFootnote:"These values are calculated from transactions in the statement.",extractedTransactions:"Extracted transactions",addTransaction:"Add transaction",totalsDoNotAddUp:"The totals do not add up.",reparseStatement:"Re-parse statement",retryParsing:"Retry Parsing",cancelConfirmation:{heading:"Are you sure?",description:"You have unsaved changes. If you cancel now, your changes will be lost"},reparseConfirmation:{heading:"Restart parsing?",description:"Re-parsing reads the statement again from scratch and replaces your current review. Any edits you've made will be lost.",reparse:"Re-parse"},closingBalanceMismatchConfirmation:{heading:"Closing balance doesn’t match",descriptionBeforeStatementAmount:"The closing balance on your statement is ",forAccountDescriptionBeforeStatementAmount:"For {accountName}, the closing balance on your statement is ",descriptionBetweenAmounts:", but the transactions you’ve added total ",reviewHint:"Please review the transactions and add, remove, or edit any that are incorrect.",reviewTransactions:"Review transactions",continueAnyway:"Continue anyway",descriptionAfterTransactionsAmount:"."},aiSummary:{accountRecognized:"Account recognized",transactionsExtracted:"Transactions extracted",exceptionsDetected:"Exceptions detected",fieldsCaptured:"Fields captured",validated:"Validated",openingDate:"Opening date"}},tabs:{},review:{allDoneText:{title:"High five!",subTitle:"All transactions reviewed!"},header:{match:"Record or Match",amount:"Amount",memo:"Memo"},transactionDirection:{credit:"Credit",debit:"Debit"},matchesCount:"__count__ Matches",matchedFoundCount:"__count__ Matches Found",matchesFoundFullInfo:"for this bank transaction within the last 90 days",bankDetail:"Bank Detail",creditCardDetail:"Credit Card Detail",formLabels:{match:"Match",categorize:"Categorize",selectCard:"Select Card",allBankAccounts:"All bank accounts",allCreditCards:"All credit cards",addCategory:"Add Category",addClass:"Add Class",addMemo:"Add Memo"}},reconcile:{allDoneText:{title:"Ta-da!",subTitle:"No transactions found for reconciliation!"},header:{clearedDate:"Cleared Date",amount:"Amount",memo:"Memo"}},subTitles:{review:{item1:{pre:"",bold:"",prefixIconName:"",post:"Please review these transactions because the general ledger balance doesn't match the bank balance."},item2:{pre:"",post:"suggest updating these transactions to resolve the ledger discrepancies, which will help auto-adjust the variance."}},reconcile:{item1:{pre:"",post:"have reconciled pending transactions and saved 42% of your reconciliation time."},item2:{pre:"",prefixIconName:"",bold:"",post:"It's time to review for discrepancies and select all transactions to bring the variance to zero."}}},titles:{item1:{pre:"",post:"have reconciled your bank transactions and saved 38% of your reconciliation time."},item2:{pre:"",bold:"",prefixIconName:"",post:" It's time to check for discrepancies and review them if there's a difference."}}},recommendationFeedback:{title:"Help me get this right next time.",skipLabel:"Skip Feedback",yourSelection:"Your Selection",reasonPlaceholder:'e.g. "Always put Amazon under Software Subscription, not Office Supplies"',submitHintPrefix:"Press ",submitHintKey:"Enter/Return",submitHintSuffix:" to submit",dimensionLabels:{vendor:"Payee Recommendation",category:"Category Recommendation",class:"Class Recommendation"}}},aiCfo:{pageView:{scopePageTitle:"AI CFO Scope",titleTag:"BETA",hello:"Hello, ",helpText:"How can I help you today?",showMoreSuggestedQuestions:"Show __count__ more..."},questionTemplates:{sampleQuestion1:"Show me last month's Month-end insights",sampleQuestion2:"Show me the runway and projected cash zero date",sampleQuestion3:"Show me the top expenses from past six months"},skillMenu:{examplePrefix:"try:",tip:"Tip: type details after a skill to tailor it — e.g. a period, a filter, or what to focus on."},routines:{title:"Scheduled Tasks",am:"am",pm:"pm",subtitle:"Work that runs on a schedule and emails you the answer. A saved skill, or a one-off you write here.",empty:"You don’t have any scheduled tasks yet.",loading:"Loading scheduled tasks…",loadFailed:"Couldn’t load scheduled tasks. Please try again.",newRoutine:"New scheduled task",capReached:"You’ve reached the limit of __max__ scheduled tasks. Delete one to add another.",everyDayAt:"Every day at __time__",everyWeekAt:"Every __weekday__ at __time__",everyMonthAt:"Every month on the __day__ at __time__",unknownSchedule:"On a schedule this app doesn’t recognise",weekdays:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ordinalSuffixes:{one:"st",two:"nd",few:"rd",other:"th"},unknownScheduleHint:"This scheduled task uses a schedule set up elsewhere. You can pause or delete it here, or contact support to change it.",inTimezone:"__schedule__ (__timezone__)",nextRun:"Next __date__",neverRun:"Hasn’t run yet",lastRunSucceeded:"Last run __date__",lastRunSucceededNoDate:"Last run succeeded",lastRunFailedNoDate:"Last run failed",lastRunTimeoutNoDate:"Last run timed out",lastRunFailed:"Last run failed __date__",lastRunTimeout:"Last run timed out __date__",pausedBadge:"Paused",autoPaused:"Paused after repeated failures",adHocBadge:"Prompt",brokenSkill:"The skill this ran was deleted",pause:"Pause",resume:"Resume",pauseRoutine:"Pause __name__",resumeRoutine:"Resume __name__",editRoutine:"Edit __name__",deleteRoutine:"Delete __name__",openThread:"Open conversation",run:"Run now",runRoutine:"Run __name__ now",running:"Running…",runQueued:"Started. The answer appears in the conversation, and is emailed when it finishes.",runFailed:"Couldn’t start this scheduled task. Please try again.",history:"History",hideHistory:"Hide history",historyLoading:"Loading runs…",historyFailed:"Couldn’t load this scheduled task’s runs.",historyEmpty:"No runs yet.",runManual:"Manual",runScheduled:"Automatic",runInFlight:"Running",runInProgressNotice:"Running — this usually takes 1–3 minutes. The answer appears here and is emailed when it finishes.",runSucceeded:"Succeeded",runFailedStatus:"Failed",runTimedOut:"Timed out",runUnknownStatus:"Unknown",runAt:"__date__ at __time__",runAttempt:"Attempt __n__",openRun:"Open",openRunLabel:"Open the conversation for the run on __date__",backToRoutines:"Scheduled Tasks",configuration:"Configuration",enabledLabel:"Status",enabledOn:"Active",enabledOff:"Paused",enabledOnHint:"Runs on its schedule.",enabledOffHint:"Paused — it will not run.",scheduleRow:"Schedule",oneOffSource:"A prompt you wrote",instructionsHeading:"Instructions",showAll:"Show all",showLess:"Show less",runsHeading:"History",successRatio:"__succeeded__ of the last __total__ succeeded",neverRunStatus:"Hasn’t run yet",openRoutine:"Open __name__",openRoutinePage:"Open scheduled task settings",breadcrumbRoot:"Scheduled Tasks",edit:"Edit",runRowLabel:"Run · __when__",newRuns:"__count__ new",scheduledSection:"SCHEDULED",cadenceDaily:"Daily",cadenceWeekly:"Weekly",cadenceMonthly:"Monthly",cadenceCustom:"Custom",showRuns:"Show runs",hideRuns:"Hide runs",panelRuns:"Runs",panelDetails:"Details",panelSkill:"Skill",composerPlaceholder:"What do you want on a schedule?",composerSubmit:"Draft scheduled task",composerExamples:["Summarise last week’s spend and flag anything unusual","Send me the cash position every Monday morning","List invoices over 60 days past due"],deleteConfirm:"Delete scheduled task",deleteConfirmBody:"It stops running and stops emailing you. The skill it runs is not affected.",deleting:"Deleting…",deleteFailed:"Couldn’t delete this scheduled task. Please try again.",saveFailed:"Couldn’t save this scheduled task. Please try again.",nameLabel:"Name",namePlaceholder:"Monday spend review",sourceLabel:"What it runs",sourceSkill:"A saved skill",sourcePrompt:"Something I write here",promptPlaceholder:"Summarise last week’s spend and flag anything unusual.",promptHint:"Runs exactly as written, every time. It won’t appear in the / menu.",skillLabel:"Skill",skillHint:"Pinned to the version you pick, so editing the skill later won’t change what runs.",cadenceLabel:"How often",daily:"Every day",weekly:"Every week",monthly:"Every month",weekdayLabel:"Day of week",dayOfMonthLabel:"Day of month",dayOfMonthHint:"A month that’s too short runs on its last day instead.",hourLabel:"Hour",minuteLabel:"Minute",timeLabel:"At",scheduleLabel:"Schedule",runsSummary:"Runs __schedule__",timezoneLabel:"Timezone",timezonePlaceholder:"Search timezones…",timezoneHint:"The time above is in this timezone.",timezoneInvalid:"That isn’t a timezone we recognise.",skillPlaceholder:"Search skills…",skillUnknown:"Pick a skill from the list.",templateLabel:"Start from a skill",templatePlaceholder:"Optional — search skills…",templateHint:"Copies that skill’s instructions below, where you can edit them. The scheduled task then runs your edited copy, not the skill.",templateLoading:"Loading that skill’s instructions…",templateFailed:"Couldn’t load that skill’s instructions. You can still write your own.",skillInstructionsLabel:"What it will run",skillInstructionsLoading:"Loading…",skillInstructionsFailed:"Couldn’t load this skill’s instructions.",editACopy:"Edit a copy instead",editACopyHint:"Runs the skill as written. To change it for this scheduled task only, edit a copy.",noMatches:"No matches",deliveryNote:"The answer is emailed to you when it finishes.",save:"Save scheduled task",saving:"Saving…"},skills:{subtitle:"Ready-made analyses you can run in a new chat. Zeni's are available to everyone; yours are your company's own.",byZeni:"By Zeni",byTenant:"Your company",empty:"No skills are available yet.",emptyTenant:"Your company hasn’t added any skills yet.",loading:"Loading skills…",loadingPrompt:"Loading this skill’s instructions…",loadFailed:"Couldn’t load skills. Please try again.",detailLoadFailed:"Couldn’t load this skill. Please try again.",back:"All skills",backToSkill:"Back to skill",audienceCurrentPrivate:"Only you can use this skill.",audienceCurrentTenant:"Everyone at your company can use this skill.",publish:"Share with company",unpublish:"Make private",publishing:"Sharing…",unpublishing:"Making private…",publishFailed:"Couldn’t change who can use this. Please try again.",run:"Run skill",runHint:"Runs this skill in a new chat.",instructionsHeading:"What this skill tells the agent",tenantBadge:"Shared",lastUpdated:"Updated __date__",neverUpdated:"Not updated yet",newSkill:"New skill",fork:"Copy to my skills",forkHint:"Starts a new skill of your own from this one.",forkNameSeed:"__name__ copy",deleteConfirm:"Delete this skill?",deleteConfirmBody:"It stops appearing in the / menu for everyone who can run it. Its name becomes available again.",deleting:"Deleting…",deleteFailed:"Couldn’t delete this skill. Please try again.",namePlaceholder:"Cash burn summary",nameHint:"How people find this skill — the / command is set from this name when you save.",nameHandleHint:"Runs as /{handle} — type / then any part of the name.",audienceLabel:"Who can use this",audiencePrivate:"Only me",audiencePrivateHint:"Stays in your own / menu.",audienceTenant:"Everyone at my company",audienceTenantHint:"Appears in every colleague's / menu.",audiencePublishWarning:"Published skills run with the permissions of whoever uses them. Only publish a prompt you would be comfortable running as any colleague.",descriptionPlaceholder:"One line on what this skill does",descriptionHint:"Shown under the name in the / menu.",instructionsLabel:"Instructions",instructionsPlaceholder:"Tell the agent exactly what to do. Be specific about the period, the accounts and the format you want back.",instructionsHint:"The agent receives this verbatim. Written like a brief, not a search query.",charCount:"__count__ characters",create:"Create skill",creating:"Creating…",saveNewVersion:"Save new version",saveFailed:"Couldn’t save this skill. Please try again.",unsavedTitle:"Discard your changes?",unsavedBody:"This skill has edits that haven’t been saved.",keepEditing:"Keep editing",nameRequired:"A name is required.",instructionsRequired:"Instructions are required.",instructionsTooShort:"Instructions need at least __min__ characters.",renameWarning:"Renaming changes the / command. The old one stops working.",historyHeading:"Version history",historyLoading:"Loading history…",historyFailed:"Couldn’t load version history.",historyEmpty:"No earlier versions.",versionLabel:"Version __version__",restore:"Restore",restoreHint:"Brings this version’s instructions back as a new version. Nothing is overwritten.",restoreLoading:"Loading this version…",restoreFailed:"Couldn’t load that version. Please try again.",emptyTenantCta:"Write your first skill, or copy one of Zeni’s."},texts:{generating:"Generating...",artifactFallbackTitle:"Financial visualization",downloadArtifactImage:"Download chart as image",saveToSkill:"Save to Skill",savedToSkill:"Saved — run it with /{command}",saveToSkillFailed:"Couldn't save. Please try again.",createSkillCommandDescription:"Turn this conversation into a reusable skill",createSkillCommandExampleHint:"that compares vendor spend month over month",downloadTableFailed:"Couldn’t download the table. Please try again.",downloadTableTooLarge:"This table is too large to export. Try narrowing the question to a shorter period or fewer categories.",downloadArtifactImageFailed:"Couldn’t download the chart. Please try again.",errorInAnswer:"We couldn’t generate a response at the moment. Please submit question again.",errorInArtifact:"Unable to render visualization. The data is available in the text response above.",creatingCards:"Creating cards...",creatingPolicies:"Creating policies based on your preferences...",cardCreatedSingular:"1 card is created and ready",cardsCreatedPlural:"__count__ cards are created and ready",policyCreatedSingular:"1 policy is created and saved",policiesCreatedPlural:"__count__ policies are created and saved",createdCardsTableRecommendedLimitHeader:"Recommended Limit"},interactiveForm:{noMatches:"No matches",cardPolicy:{limits:{transactionLimitHelperText:"Maximum amount per single transaction",amountPlaceholder:"$0"}},cardsCreation:{step1Title:"Based on your last 3 months of spend, here are the cards. Review and confirm.",step1AddRowPlaceholder:"Add something else",step1ColumnAvgMonthlySpend:"Avg monthly spend",step2Title:"Who should these cards be assigned to? Suggested owners based on past spend.",step2Cta:"Create cards",cardTypeOptions:{virtual:{label:"Virtual card",description:"Issued instantly"}}}},chainOfThoughts:{reasoning:"Thinking"},reason:{show:"Show Reason",hide:"Hide Reason"},tooltips:{likeResponse:"Like",dislikeResponse:"Dislike",chatWithAI:"Chat with AI CFO"},headers:{followUpQuestions:"Follow-up questions to ask next",didYouKnow:"Did you know?",assumptions:"Key Assumptions"},exports:{downloading:"Preparing download",errors:{expired:"This file is no longer available. Ask the question again to regenerate it.",generic:"Could not download the file. Please try again."},answerPdf:"Download as PDF",answerWord:"Download as Word",answerPreparing:"Preparing document…",answerErrors:{busy:"The AI CFO is busy preparing other downloads. Try again in a moment.",generic:"Couldn't prepare the document. Please try again.",unavailable:"Document downloads aren't available for this workspace yet."}},input:{disclaimer:"__agent__ can make mistakes. Check important info.",maxFilesError:"Cannot add __count__ file(s). Maximum __max__ files allowed per message.",fileTooLargeError:"'__fileName__' exceeds the 5MB size limit and was not added.",unsupportedFileTypeError:"'__fileName__' is not a supported file type and was not added.",uploading:"Uploading",uploadPromoTooltip:{title:"Now upload documents",description:"Add a financial document to see key insights and ask questions."},placeholder:"Ask AI CFO a question and get clear answers.",placeholderWithSkills:"Ask a question, or type / to run a Skill.",placeholderWithSkillsAndUpload:"Ask a question, type / for Skills, or attach a file.",placeholderWithUpload:"Ask a question, or attach a file to analyze."},loading:{discoveryTips:{excelExport:"Tip: Ask for any analysis as an Excel file and I'll attach a download.",followUps:"Tip: Ask follow-up questions in the same chat — I keep the conversation's context.",skills:"Tip: Type / in the message box to run Skills like flux analysis and cash forecasts.",uploads:"Tip: Attach a CSV or spreadsheet and I'll analyze it alongside your books."}},menu:{chatHistory:"CHAT HISTORY"},onboarding:{section:{title:"Run your business with confidence.",subtitle:"Built to analyze, explain, and summarize your numbers like a real CFO would."},capabilities:[{title:"Analyze Financials",subtitle:"Profit & loss, balance sheets, and trend detection — no spreadsheets required.",icon:"analyzing"},{title:"Spot Vendor Patterns",subtitle:"Review expenses across vendors and categories. Surface anomalies and overspend.",icon:"vendors"},{title:"Calculate Core Metrics",subtitle:"Runway, burn, margins — calculated from your real books.",icon:"calculator"},{title:"Forecast With Confidence",subtitle:"Auto-generate projections based on historicals. Updated weekly.",icon:"forecast"},{title:"Visualize Key Trends",subtitle:"Bar graphs, line charts, tables — linked to real data for full traceability.",icon:"graph-trend"}],whoIsItFor:{title:"Who's It For",details:["Startup founders without a full-time CFO — but need strategic clarity.","VPs of Finance/Operations who want faster answers, fewer spreadsheets.","Department heads (Sales, Marketing, Eng) who want to own their numbers.","Fractional CFOs managing multiple clients on Zeni.","In-house CFOs using it as a 10x strategic co-pilot."]},footer:{buttonText:"Launch __agent__",scope:"__agent__ Scope",betaText:"This is Beta — and your usage will shape what’s next.",footerText:'By clicking "Launch __agent__" I accept '}}},aiPerformanceDashboard:{tileTitle:"AI Performance",tileSubtitle:"Monitor and analyze the performance of your AI agents.",chartTitle:"Cost and Time Savings Trend",aiCostSavedTile:{title:"Cost Saved",subtitle:"Total reduction in expense."},aiTimeSavedTile:{title:"Time Saved",subtitle:"Manual hours saved by AI."},noPerformanceData:{firstLine:"No tasks performed yet!"},personas:{aiBookkeeper:"AI Bookkeeper Agent",aiCardsAgent:"AI Cards Agent",aiBillsAgent:"AI Bills Agent",aiExpenseAgent:"AI Expenses Agent",aiBankingAgent:"AI Banking Agent",aiAccountantAgent:"AI Accountant Agent",personaTypes:{aiBookkeeper:"bookkeeper",aiCardsAgent:"ai_cards_agent",aiBillsAgent:"ai_bills_agent",aiExpensesAgent:"ai_expenses_agent",aiBankingAgent:"ai_banking_agent",accountant:"accountant",aiCfo:"ai_cfo"}},valueDelivered:{title:"Value Delivered",subtitle:"Measurement of what you get vs. what you pay",zeniSubscriptionPlan:"Zeni Subscription Plan"},annualizedImpact:{title:"Annualized Impact",subtitle:"At this rate annually, you'll save"}},sessionTimeout:{title:"Session ends in",description:"You will be signed out due to inactivity.",descriptionClickPrefix:"Click",descriptionSuffix:"to stay signed in.",signOut:"Sign Out",continueSession:"Continue Session"},aiAccountantCustomer:{table:{bookClose:"Book Close",accuracy:"Accuracy"},actions:{onboard:"Onboard",evaluate:"Evaluate",fullPipeline:"Full Pipeline",retrain:"Retrain",offboard:"Offboard",cancelOnboarding:"Cancel Onboarding"},jobTriggerDialog:{title:"Trigger Job",datesInstruction:"Please provide start and end dates.",singleDescription:"__companyName__. __datesInstruction__",singleDescriptionOffboard:"__companyName__ will be offboarded from AI Accountant."},drawer:{enrollmentDetails:"Enrollment Details",onboarded:"Onboarded",modelAccuracy:"Model Accuracy",noAccuracyData:"No accuracy data available",jobHistory:"Job History",loadingJobs:"Loading jobs...",noJobsFound:"No jobs found",operation:"Operation"},summary:{totalCustomers:"Total Customers",avgAccuracy:"Avg Accuracy"},bulkActions:{menuLabel:"Bulk Actions",selectedCount:"__count__ selected",noCommonOperations:"No actions available for the selected customers",disabledInfo:"The selected customers have no action in common. Narrow your selection to customers in the same state.",bulkDialogDescription:"__count__ customers selected for __action__. Please provide start and end dates.",bulkDialogDescriptionOffboard:"__count__ customers selected for offboarding.",evaluateAllDialogDescription:"__count__ unonboarded customer(s) will be evaluated. Please provide start and end dates."}},cardsShutdown:{navAlertLabel:"Zeni Cards is being discontinued",bannerDescription:"We're sunsetting Zeni Cards on {date} and partnering with Ramp as our recommended corporate cards provider. Here's what's changing and how to apply.",bannerDescriptionWithoutDate:"We're sunsetting Zeni Cards and partnering with Ramp as our recommended corporate cards provider. Here's what's changing and how to apply.",introBody:"We're sunsetting Zeni Cards on {date} as we focus on our core AI accounting and bookkeeping platform. To keep your financial operations running without interruption, we recommend Ramp as your corporate card provider.",introBodyWithoutDate:"We're sunsetting Zeni Cards as we focus on our core AI accounting and bookkeeping platform. To keep your financial operations running without interruption, we recommend Ramp as your corporate card provider.",programEnds:"Program ends {date}",applicationDisclaimer:"Ramp reviews each application independently. Approval, card limits, and implementation timing aren't guaranteed and depend on the information provided during the application.",whatThisMeansTitle:"What this means for you",meansProgramEnd:"Your current Zeni Card program is expected to end on {date}.",meansApplicationRequired:"Moving to Ramp is not automatic. Your business will need to complete a new Ramp application, and Ramp will conduct its standard business and identity review.",meansImplementation:"If approved, Zeni and Ramp will coordinate with you on card setup, policies, approvals, and implementation.",meansControllerSupport:"Your Zeni controller will remain available to help you understand the transition and next steps.",whatToDoNowTitle:"What to do now",watchForInvitationTitle:"Watch for your Ramp invitation",watchForInvitationBody:"Look out for an email from Ramp titled “You’ve been invited” to review and complete your pre-filled application.",loopInControllerTitle:"Loop in your Zeni controller",loopInControllerBody:"Share any card limits, approval rules, expense policies, or timing constraints during setup.",needHelpPrefix:"Need help? Reach us at ",needHelpSuffix:"."},invoicingOverview:{revenueMetricOverTime:"Revenue - {metric} Over Time",mrrMovement:"MRR Movement",mrrMovementNewSubscriptions:"New Subscriptions",mrrMovementExpansions:"Expansions",mrrMovementNewChange:"New MRR Change",customerMovement:"Customer Movement",customerMovementSubtitle:"All status transitions this month",netCustomerChange:"Net customer change",totalActiveCustomers:"Total active customers",customerChurnRate:"Customer churn rate",revenueByPlan:"Revenue by Plan",noPlanData:"No plan data available.",noRecentSubscriptions:"No recent subscriptions.",kpiActiveSubs:"Active Subs",metricChurnRate:"Churn Rate",tabRecentSubscriptions:"Recent Subscriptions",tabMonthlyMrrBreakdown:"Monthly MRR Breakdown",pillPaused:"Paused",pillResumed:"Resumed",pillReactivated:"Reactivated",alertFailedPayments:"Failed Payments",alertNeedsAction:"Needs action",alertUpcomingInvoices:"Upcoming Invoices",alertNext7Days:"Next 7 days",alertPastDueInvoices:"Past Due Invoices",nrrTitle:"Net Revenue Retention (NRR)",nrrSubtitle:"Trailing 12 months · benchmark for SaaS health",nrrFootnote:"NRR over 112% means existing customers are growing faster than they’re churning — typically a sign of strong product-market fit. Healthy SaaS benchmark is >100%.",grrTitle:"Gross Revenue Retention (GRR)",grrSubtitle:"Excludes expansion · pure retention signal",grrFootnote:"GRR caps at 100% — it strips out upsell to show how much revenue you’d retain without expansion. Best-in-class SaaS sits at 90%+. Below 80% signals a churn problem.",startingArr:"Starting ARR",expansionsArr:"Expansions ARR",contraction:"Contraction",churn:"Churn",endingArr:"Ending ARR",nrr:"NRR",retainedArr:"Retained ARR",grr:"GRR",summaryNewMrr:"New MRR",summaryExpansion:"Expansion",summaryChurnedMrr:"Churned MRR",summaryNetMrrChange:"Net MRR Change",summaryEndingMrr:"Ending MRR",colAutoCollect:"Auto Collect",autoCollectOn:"ON",autoCollectOff:"OFF",since:"Since"},invoicingCommon:{currentStep:"Current Step",runCurrentStep:"Run Current Step",step:"Step",stepNumber:"Step {current}",minimumQuantityAllowed:"Minimum 1 allowed",zipPlaceholder:"94105",usage:"Usage",pricing:"Pricing",subFamilyCode:"Price Point Code",productCode:"Product Code",columnTarget:"Target",labelBillingPeriod:"Billing Period",labelPricingModel:"Pricing Model",addOns:"Add-ons",oneTimeChargesTab:"One-time Charges",importCsvFile:"Import CSV File",pluralSuffix:"s",description:"Description",subFamilyId:"{noun} ID",catalogPricePoint:"Price Point",catalogPricePoints:"Price Points",catalogPricePointPlan:"Plan",catalogPricePointPlans:"Plans",catalogPricePointAddon:"Add-on",catalogPricePointAddons:"Add-ons",catalogPricePointCharge:"One-time Charge",catalogPricePointCharges:"One-time Charges",itemDetails:"Item Details",name:"Name",externalName:"External Name",unit:"Unit",itemApplicability:"Item Applicability",applicableItems:"Applicable Items",timestamps:"Timestamps",updatedAt:"Updated At",addOn:"Add-on",coupons:"Coupons",oneTimeCharge:"One-time Charge",cancelSubscription:"Cancel Subscription",nameShownOnInvoices:"Name shown on invoices",placeholderPriceZero:"0.00",trialPeriod:"Trial Period",labelFreeQuantity:"Free Quantity",invoiceNotes:"Invoice Notes",invoiceName:"Invoice Name",placeholderAddInvoiceName:"Add invoice name",appendedToInvoiceLineItem:"Appended to invoice line item",addInvoiceNotes:"Add invoice notes",checkmark:"✓",yourCompany:"Your Company",thankYouForYourBusiness:"Thank you for your business.",onReceipt:"On receipt",net:"Net ",newSuffix:"—NEW",invoiceNumber:"Invoice #",poNumberLabel:"PO #",logoAlt:"Logo",taxIdLabel:"Tax ID: ",billedTo:"Billed To",amount2:"Amount (",paymentLinkNoItemizedInvoice:"Payment link — no itemized invoice",qtyLabel:"Qty: ",subtotal:"Subtotal",amountDue:"Amount Due (",signatureAlt:"Signature",currencySymbolEur:"€",currencySymbolGbp:"£",currencySymbolInr:"₹",createCoupon:"Create Coupon",couponDetails:"Coupon Details",couponId:"Coupon ID",couponCodeLabel:"Coupon Code",applyOn:"Apply On",discountType:"Discount Type",maxRedemptions:"Max Redemptions",validFrom:"Valid From",validTill:"Valid Till",dueOnReceipt:"Due on receipt",createInvoice:"Create Invoice",customerDetails:"Customer Details",billingFrequency:"Billing Frequency",openCustomerInNewTab:"Open customer in new tab",openSubscriptionInNewTab:"Open subscription in new tab",openInvoiceInNewTab:"Open invoice in new tab",allocated:"Allocated",refunded:"Refunded",referenceInvoice:"Reference Invoice",subTotal:"Sub Total",noLineItems:"No line items.",creditNote:"Credit Note",preparing:"Preparing…",bankAccountAch:"Bank Account (ACH)",connectViaPlaid:"Connect via Plaid — lower fees, 2–4 day settlement",loading:"Loading…",creditDebitCard:"Credit / Debit Card",cardMethodDescription:"Visa, Mastercard, Amex — instant settlement",cardSetupFailed:"Card setup failed.",failedToSaveCard:"Failed to save card.",expiry:"Expiry",saveCard:"Save Card",newSubscription:"New Subscription",outstanding:"Outstanding",namePlaceholder:"James Johnson",firstNamePlaceholder:"James",lastNamePlaceholder:"Johnson",emailPlaceholder:"billing@acme.com",phonePlaceholder:"(555) 000-0000",companyPlaceholder:"Acme Corp",billingDetails:"Billing Details",vatNumber:"VAT Number",vatNumberPlaceholder:"US-EIN-12-3456789",autoCollectionDescription:"Enabling this automatically charges the customer each billing cycle.",autoCollection:"Auto Collection",netTerms:"Net Terms",selectNetTerm:"Select net term",preferredCurrency:"Preferred Currency",taxability:"Taxability",selectTaxability:"Select taxability",invoiceNotesHint:"Default note to appear on invoices",invoiceNotesPlaceholder:"Default notes to appear on invoices…",addStreetAddress:"Add street address",floorSuiteOffice:"Floor/Suite/Office",city:"City",addCity:"Add city",state:"State",addState:"Add state",addCountry:"Add country",zipCode:"ZIP Code",yourVendor:"Your vendor",createCustomerLabel:"Create Customer",of:" of ",free:" free",code:"Code",redemptions:"Redemptions",slashSeparator:" / ",duration:"Duration",daysPastDue:"Days Past Due",nextRetry:"Next Retry",attempts:"Attempts",line1:"Line 1",line2:"Line 2",recordPayment:"Record Payment",arrowSeparator:" → ",shippingAddress:"Shipping Address",poNumber:"PO Number",poNumber2:"PO number",refunds:"Refunds",gateway:"Gateway",referenceNumber:"Reference Number",subscriptionDetails:"Subscription Details",addShippingAddressButton:"Add shipping address",addBusinessAddressButton:"Add business address",addPoNumber:"Add PO number",shipLine1Placeholder:"123 Main St",shipLine2Placeholder:"Suite 200",cityPlaceholder:"San Francisco",statePlaceholder:"CA",createSubscriptionLabel:"Create Subscription",cardStatus:"Card Status",creditNumber:"Credit Number",dateIssued:"Date Issued",creditedAgainst:"Credited Against",totalCredits:"Total Credits",daySuffix:"d",trial:"Trial",amount:"Amount",all:"All"},invoicingAuditLog:{timeColumnHeader:"Time",actorColumnHeader:"Actor",detailColumnHeader:"Detail",noAuditEntriesMatchSearch:"No audit entries match your search.",noAuditActivityYet:"No audit activity yet.",searchActionTargetActorPlaceholder:"Search action, target, or actor"},invoicingCatalog:{addOnsNoun:"add-ons",oneTimeChargesNoun:"one-time charges",plansNoun:"plans",itemsNoun:"items",addItem:"Add Item",addAddOn:"Add Add-on",addOneTimeCharge:"Add One-time Charge",periodSingular:"1 ${label}",periodPlural:"${period} ${label}s",planNameColumnHeader:"Plan Name",priceStructureColumnHeader:"Price / Structure",billingFrequencySemiAnnual:"Semi-Annual",pricePerPeriod:"{price}/{period}",tieredSummary:"{count} tiers · From {price}",tieredSummarySingular:"1 tier · From {price}",volumeSummary:"{count} levels · From {price}",volumeSummarySingular:"1 level · From {price}",stairstepSummary:"{count} steps · From {price}",stairstepSummarySingular:"1 step · From {price}",productColumnHeader:"Product",itemTypeColumnHeader:"Item Type",activePlansKpi:"Active Plans",activeProductsKpi:"Active Products",avgPlanPriceKpi:"Avg Plan Price",noMatchSearch:"No ${tabNoun} match your search.",noItemsYet:"No ${tabNoun} yet.",emptyStateDescription:"Bring in your historical product catalog data by importing your product catalog csv file",emptyStateTitle:"No Product Catalog Yet",searchPlaceholder:"Search ${tabNoun}"},invoicingCatalogDetail:{oneSpace:"1 ",activeSubFamilies:"Active {nouns}",archivedSubFamilies:"Archived {nouns}",lowestActiveSubFamilyPrice:"Lowest {noun} Price",priceTiers:"Price / Tiers",catalogItemNotFound:"Catalog item not found.",itemNamePlaceholder:"Item name",externalNamePlaceholder:"External name",addDescriptionPlaceholder:"Add a description",lineItemDescription:"Line Item Description",itemFamily:"Item Family",restrictedPrefix:"Restricted (",itemsSuffix:" items)",subFamilies:"{nouns}",subFamilyNumber:"{noun} {number}",noSubFamilies:"No {nounsLower}.",archivedAt:"Archived At",archiveSubFamily:"Archive price point",archiveSubFamilyBlocked:"Cannot archive while subscriptions reference this price point.",duplicateSubFamily:"Duplicate price point",subscriptionsUseSubFamilyBanner:"{count} subscriptions use this {nounLower}. To change pricing, create a new {nounLower}."},invoicingCatalogForm:{trialUnitDay:"Day",periodUnitWeek:"Week",pricingModelFlatFee:"Flat fee",pricingModelPerUnit:"Per unit",pricingModelTiered:"Tiered",pricingModelVolume:"Volume",pricingModelStairstep:"Stairstep",tierTypePerUnit:"Per Unit",tierTypeFlatFee:"Flat Fee",tierTypePackage:"Package",trialEndActivateSubscription:"Activate Subscription",prorationPartialTerm:"Partial Term",prorationFullTerm:"Full Term",applicabilityAll:"All add-ons & charges",applicabilityRestricted:"Restricted — Select applicable items",applicableItemsEmptyPlaceholder:"No add-ons or charges available",selectApplicableItemsPlaceholder:"Select applicable items",validationProductFamilyRequired:"Enter a Product Family name for this catalog item.",validationSubFamilyNameRequired:"Add at least one {nounLower} and enter a name for each one.",titleEditCatalogItem:"Edit Catalog Item",titleCreatePlan:"Create Plan",titleCreateOneTimeCharge:"Create One-time Charge",titleCreateAddon:"Create Add-on",sectionPlanAndProductFamilyDetails:"Plan and Product Family Details",productCodeExample:"Optional. Generated from Product Family when left blank.",placeholderAddProductCode:"Add product code",customerFacingName:"Customer facing name",labelProductFamily:"Product Family",placeholderAddProductFamily:"Add product family",labelPricePointName:"{noun} name",placeholderAddSubFamilyName:"e.g. Growth Monthly",subFamilyCodeExample:"Optional. Generated from the price point name when left blank.",placeholderAddSubFamilyCode:"Add price point code",forInternalUseOnly:"For internal use only",subFamilyDetailsTitle:"{nouns}",pricePointsRequiredHint:"Add at least one {nounLower} to create this item. Add more for different billing frequencies (e.g. monthly, annual) or currencies.",addNewLink:"Add another {nounLower}",subFamilyNumberPrefix:"{noun}",removeSubFamilyConfirmation:"Remove this {nounLower}?",labelSubFamily:"Price Point",placeholderAddSubFamily:"Add price point",labelAddTiers:"Add Tiers",tierColumnTo:"To (blank for unlimited)",tierColumnPackageSize:"Package size",infinity:"∞",removeTierX:"✕",addTierLink:"Add Tier",hintAddBillingPeriod:"Add billing period",placeholderTrialPeriodExample:"e.g. 14",labelTrialEndAction:"Trial End Action",hintBillingCyclesUnlimited:"Keep it blank for unlimited cycles",placeholderAddBillingCycles:"Add number of billing cycles",labelProrationType:"Proration Type",labelFlags:"Flags",selectFlagsPlaceholder:"Select flags",labelShowDescriptionInQuotes:"Show Description in Quotes",lineItemDescriptionHint:"Shown below the line-item name when invoice descriptions are enabled",subFamilyInvoiceNotesHint:"Shown in the invoice Notes section when this {nounLower} is billed",nameShownOnInvoiceLineItem:"Name shown on the invoice line item",sectionAccountingIntegration:"Accounting Integration",skuQboExample:"QBO Product code. Example: BASIC-M",labelSku:"SKU",placeholderAddSku:"Add SKU",placeholderAddAccountingCode:"Add accounting code",placeholderSelectIncomeAccount:"Select income account"},invoicingCouponForm:{enterCouponIdError:"Enter a Coupon ID.",enterCouponNameError:"Enter a name for this coupon.",editCouponTitle:"Edit Coupon",couponIdPlaceholder:"e.g. WELCOME20",namePlaceholder:"e.g. Welcome 20% Off",discountPercentagePlaceholder:"e.g. 20",discountPercentageLabel:"Discount Percentage",discountAmountLabel:"Discount Amount",freeQuantityPlaceholder:"e.g. 1",durationLimitsSectionTitle:"Duration & Limits",durationTypeLabel:"Duration Type",periodPlaceholder:"e.g. 3",periodUnitLabel:"Period Unit",maxRedemptionsPlaceholder:"Add max redemptions",discountsAccountLabel:"Discounts Account",discountsAccountPlaceholder:"Select income account"},invoicingCreateInvoice:{selectPaymentTerm:"Select payment term",net7:"Net 7",net15:"Net 15",net30:"Net 30",net45:"Net 45",net60:"Net 60",selectBillingFrequency:"Select billing frequency",halfYearly:"Half-yearly",annually:"Annually",addAtLeastOneLineItem:"Add at least one line item with a description and unit price.",step1CustomerAndType:"Step 1: Customer and Type",step2InvoiceDetails:"Step 2: Invoice Details",step1Subtitle:"How would you like to create an invoice? Select a customer and choose the invoice type.",step2Subtitle:"Set dates, line items, and additional details.",invoiceJpg:"Invoice.jpg",livePreviewSuffix:" - Live Preview",paymentLink:"Payment link",paymentLinkCalloutText:"A payment link will be generated and sent to the customer — no itemized invoice document is required.",chooseExistingCustomerHint:"Choose an existing customer or create one first",searchOrTypeCustomerName:"Search or type a customer name",pleaseSelectCustomer:"Please select a customer to continue.",invoiceType:"Invoice Type",selectAnInvoiceType:"Select an invoice type",oneTimeInvoiceDescription:"Send a one-time invoice with a built-in payment link.",oneTimeInvoiceTitle:"One-time Invoice",recurringSeriesDescription:"Automatically generate recurring invoices on a set schedule.",recurringSeriesTitle:"Recurring Series",paymentLinkOnlyDescription:"Send only a payment link with a single amount — No itemized invoice.",paymentLinkOnlyTitle:"Payment Link Only",general:"General",setInvoiceDatesHint:"Set the invoice dates and additional details.",selectInvoiceDate:"Select invoice date",paymentTerms:"Payment Terms",usdUsDollar:"USD — US Dollar",soNumber:"SO Number",addSoNumber:"Add SO number",exampleSoNumber:"Example: SO-2026-001",exampleMemo:"Example: thank you for your business",unitPriceLabel:"Unit Price (",useDescriptionAs:"Use description as",addQuantity:"Add quantity",addPrice:"Add price",removeLine:"Remove line",addLine:"Add Line",unitPriceInDollars:"Unit price in dollars"},invoicingCreditDetail:{allocatedAt:"Allocated At",creditNoteNotFound:"Credit note not found.",creditNoteTitlePrefix:"Credit Note ",creditNoteDetails:"Credit Note Details",creditNoteId:"Credit Note ID",creditNoteNumber:"Credit Note Number",priceType:"Price Type",amounts:"Amounts",amountAvailable:"Amount Available",amountAllocated:"Amount Allocated",amountRefunded:"Amount Refunded",allocations:"Allocations",noAllocations:"No allocations.",linkedRefunds:"Linked Refunds"},invoicingCreditList:{noCreditNotesMatchSearch:"No credit notes match your search.",noCreditNotesYet:"No credit notes yet.",createCreditNoteButton:"Create Credit Note",emptyStateDescription:"Bring in your historical credit note data by importing your credit note csv file",emptyStateTitle:"No Credit Notes Yet",searchPlaceholder:"Search by customer or credit note"},invoicingCustomerDetail:{paymentMethodSavedTitle:"Payment method saved",paymentMethodSavedDescription:"The payment method has been added and is now the default. Existing payment methods are kept, and future invoices can be collected automatically.",addPaymentMethod:"Add Payment Method",addPaymentMethodSubtitle:"Securely add a bank account or card to collect invoice payments.",connectStripeNotice:"Connect a Stripe account in Settings › Payment Destination before adding a payment method.",securedByStripeAndPlaid:"Secured by Stripe & Plaid.",countryAustralia:"Australia",countryCanada:"Canada",countryGermany:"Germany",countryFrance:"France",countryUnitedKingdom:"United Kingdom",countryIndia:"India",countryJapan:"Japan",countrySingapore:"Singapore",countryUnitedStates:"United States",netTermsDueImmediately:"Due immediately",createPromotionalCreditsSubtitle:"Add promotional credits to this customer's balance. Credits are applied automatically on the next invoice before tax.",currentPromotionalCreditsBalance:"Current balance",promotionalCreditAmountRequired:"Enter a positive amount.",promotionalCreditDescriptionRequired:"Description is required.",promotionalCreditDescriptionPlaceholder:"e.g. Welcome bonus",promotionalCreditsAddedTitle:"Promotional credits added",promotionalCreditsAddedDescription:"The customer's promotional credit balance has been updated.",customerSince:"Customer Since",sincePrefix:"Since ",lifetimeValue:"Lifetime Value",refundableCredits:"Refundable Credits",excessPayments:"Excess Payments",unbilledCharges:"Unbilled Charges",maskedDigitsPrefix:"•••• ",maskedDigitsMiddle:" •••• ",expires:"Expires",customerNotFound:"Customer not found.",taxable:"taxable",netDashPrefix:"Net-",streetAddress:"Street Address",balances:"Balances",connectStripeTooltip:"Connect a Stripe account in Settings › Payment Destination first",paymentMethods:"Payment Methods",connectStripeBefore:"Connect your Stripe account in",settingsPaymentDestination:"Settings › Payment Destination",connectStripeAfter:"to add payment methods.",invoicePaymentDetails:"Invoice payment details:",customerEmailPlaceholder:"customer@email.com",emailPaymentLinkTooltip:"Email the customer a link to add their payment details",collectAchHint:"We will email the customer to provide their ACH details.",paymentLinkSentTo:"Payment link sent to ",copyPaymentLink:"Copy payment link",sendPaymentLinkFailed:"Failed to send payment link.",default:"Default",noPaymentMethodOnFile:"No payment method on file",previewEmailHeading:"Preview email",previewEmailSubtitle:"Edit the subject and message; the preview updates as you type.",previewEmailFrameTitle:"Rendered payment link email preview",previewEmailLoading:"Loading the branded email preview…",previewEmailUnavailable:"The email preview is unavailable right now. You can still send the payment link.",previewEmailFailed:"Could not load the email preview.",previewEmailRetry:"Retry",previewEmailSend:"Send email",previewEmailMessageLabel:"Message",previewEmailSubjectRequired:"Enter an email subject.",previewEmailBodyRequired:"Enter an email message.",sending:"Sending…",noSubscriptions:"No subscriptions.",recentInvoices:"Recent Invoices",noInvoices:"No invoices.",addNoteAboutCustomer:"Add a note about this customer"},invoicingCustomerForm:{validationEnterEmail:"Enter an email for this customer.",customerDetailsDescription:"Primary contact for billing and invoices",customerTypeLabel:"Customer Type",billingAddressSectionDescription:"Enter your company's official billing address for invoicing.",addSecondaryInfoPlaceholder:"Add secondary info (Optional)",addressSecondaryHint:"Example: Address on your driver's license",addBillingAddressButton:"Add billing address",billingSettingsDescription:"Tax IDs, currency, and payment defaults",billingSettingsTitle:"Billing Settings",customerTypeResidential:"Residential",netTermImmediate:"Immediate",taxabilityExempt:"Exempt"},invoicingCustomerList:{noCustomersMatchSearch:"No customers match your search.",noCustomersYet:"No customers yet.",importCustomersDescription:"Bring in your historical customers by importing your customers csv file",noCustomerYetTitle:"No Customer Yet"},invoicingDataImport:{inSync:"In Sync",skippedSuffix:" Skipped",warningsSuffix:" Warnings",newImport:"New Import",chargebeeImportFailed:"Chargebee import failed",chargebeeImportInProgress:"Chargebee import in progress",csvImportFailed:"CSV import failed",csvImportInProgress:"CSV import in progress",viewDetails:"View details",records:"records",bulletSeparator:" • ",lastImportReversible:"Last import is reversible",recordsBulletSeparator:"records • ",rollback:"Rollback",importedModules:"Imported Modules",module:"Module",recordsColumn:"Records",lastImported:"Last Imported",loadingImportStatus:"Loading import status…",noImportedRecords:"No imported records yet. Start a new import to populate this table.",templateProductCatalogPlans:"Product Catalog (Plans)",templateCouponsAndDiscounts:"Coupons & Discounts",chargebeeStepSettingsImportExport:"Chargebee → Settings → Import & Export → Export",chargebeeStepDetailModulesList:"Plans, add-ons, one-time charges, customers, subscriptions, invoices, credit notes",chargebeeStepDetailPickAllTime:'Pick "All time" range. CSV format. Default columns are fine.',chargebeeStepExportModule:"Export the module you want",chargebeeStepDropCsvFiles:"Drop the .CSV files above",capsuleIssuesSuffix:" Issues",capsuleReady:"Ready",scanningCaptionCsv:"Larger exports can take a few minutes — you can leave this page, it keeps running.",scanningCaptionChargebee:"This can take a moment for larger accounts — you can leave this page, it keeps running.",scanningLabelCsv:"Reading your uploaded files…",defaultImportErrorMessage:"Something went wrong during import.",backToDataImport:"Back to Data Import",migrateHeading:"Migrate from Chargebee → Zeni",migrateSubtitle:"Connect Chargebee or drop your CSV exports — we’ll handle the rest.",connectWithChargebee:"Connect with Chargebee",importFromChargebee:"Import from Chargebee",connectedToChargebee:"Connected to {site}",chargebeeConnectedLabel:"Connected to Chargebee",buttonFetchFromChargebee:"Fetch from Chargebee",chargebeeNotConnectedMessage:"Connect Chargebee in Invoicing Settings → Integrations to fetch data automatically.",buttonGoToIntegrations:"Connect Chargebee in Settings",connectPullEverything:"Pull everything automatically — fully linked, no CSV juggling.",connectingToChargebee:"Connecting to Chargebee…",fieldLabelChargebeeSite:"Chargebee site",sitePlaceholderAcme:"acme",fieldHintSiteSubdomain:`The subdomain in your Chargebee URL — e.g. acme in
|
|
215
215
|
acme.chargebee.com.`,fieldLabelApiKey:"API key",fieldLabelApiKeySavedSuffix:" (saved)",apiKeyPlaceholderUsingSaved:"Using saved API key",apiKeyPlaceholderLive:"live_xxxxxxxxxxxxxxxx",fieldHintApiKeyReuse:"Leave blank to reuse your saved API key.",fieldHintApiKeyLocation:"Settings → Configure Chargebee → API Keys & Webhooks.",connectReadOnlyAccess:`Read-only access. We never store your billing data without
|
|
216
216
|
confirmation.`,dividerOrImportCsv:"or import from CSV instead",downloadBlankTemplateHeader:"Don’t have a Chargebee export yet? Download a blank template",buttonDownloadAllZip:"Download All (Zip)",csvExtensionSuffix:".csv",templatesDefaultFileName:"import-templates.zip",orExportDirectly:"Or export directly from Chargebee",followStepsBelow:"Follow the steps below",stepDetailLetterSeparator:". ",uploadingExtractingFiles:"Uploading & extracting your files…",dropzoneStrongDropOrUpload:"Drop or upload",dropzoneTitleRest:`your CSV or ZIP exports
|
|
@@ -23816,7 +23816,7 @@ to {
|
|
|
23816
23816
|
${({isMenuVisible:e})=>e===!1?de`
|
|
23817
23817
|
display: none;
|
|
23818
23818
|
`:null};
|
|
23819
|
-
`,pRe=e=>g.createElement("svg",{width:208,height:208,viewBox:"0 0 208 208",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},g.createElement("g",{filter:"url(#filter0_f_251_38441)"},g.createElement("circle",{cx:104,cy:104,r:44,fill:"url(#paint0_linear_251_38441)"}),g.createElement("circle",{cx:104,cy:104,r:50,stroke:"url(#paint1_linear_251_38441)",strokeWidth:12})),g.createElement("g",{filter:"url(#filter1_d_251_38441)"},g.createElement("circle",{cx:104,cy:104,r:41.1429,fill:"#FAFAFA"}),g.createElement("circle",{cx:104,cy:104,r:43.1429,stroke:"url(#paint2_linear_251_38441)",strokeWidth:4})),g.createElement("g",{clipPath:"url(#clip0_251_38441)"},g.createElement("path",{d:"M120.16 102.411L96.2853 90.4684C96.0134 90.3343 95.7118 90.2718 95.409 90.2867C95.1062 90.3016 94.8122 90.3935 94.5548 90.5536C94.2974 90.7138 94.0851 90.9369 93.938 91.202C93.7908 91.467 93.7137 91.7652 93.7139 92.0684V115.931C93.7137 116.234 93.7908 116.533 93.938 116.798C94.0851 117.063 94.2974 117.286 94.5548 117.446C94.8122 117.606 95.1062 117.698 95.409 117.713C95.7118 117.728 96.0134 117.665 96.2853 117.531L120.16 105.588C120.456 105.442 120.706 105.216 120.88 104.935C121.055 104.654 121.147 104.33 121.147 104C121.147 103.669 121.055 103.345 120.88 103.065C120.706 102.784 120.456 102.558 120.16 102.411Z",fill:"black"})),g.createElement("defs",null,g.createElement("filter",{id:"filter0_f_251_38441",x:0,y:0,width:208,height:208,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},g.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),g.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),g.createElement("feGaussianBlur",{stdDeviation:24,result:"effect1_foregroundBlur_251_38441"})),g.createElement("filter",{id:"filter1_d_251_38441",x:54.8569,y:58.8571,width:98.2856,height:98.2857,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},g.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),g.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),g.createElement("feOffset",{dy:4}),g.createElement("feGaussianBlur",{stdDeviation:2}),g.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),g.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),g.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_251_38441"}),g.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_251_38441",result:"shape"})),g.createElement("linearGradient",{id:"paint0_linear_251_38441",x1:119.671,y1:119.671,x2:87.9755,y2:87.9758,gradientUnits:"userSpaceOnUse"},g.createElement("stop",{stopColor:"#7135FF"}),g.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),g.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),g.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),g.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),g.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),g.createElement("stop",{offset:1,stopColor:"#EE609C"})),g.createElement("linearGradient",{id:"paint1_linear_251_38441",x1:119.671,y1:119.671,x2:87.9755,y2:87.9758,gradientUnits:"userSpaceOnUse"},g.createElement("stop",{stopColor:"#7135FF"}),g.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),g.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),g.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),g.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),g.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),g.createElement("stop",{offset:1,stopColor:"#EE609C"})),g.createElement("linearGradient",{id:"paint2_linear_251_38441",x1:118.653,y1:118.653,x2:89.0159,y2:89.0164,gradientUnits:"userSpaceOnUse"},g.createElement("stop",{stopColor:"#7135FF"}),g.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),g.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),g.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),g.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),g.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),g.createElement("stop",{offset:1,stopColor:"#EE609C"})),g.createElement("clipPath",{id:"clip0_251_38441"},g.createElement("rect",{width:27.4286,height:27.4286,fill:"white",transform:"translate(93.7139 90.2849)"})))),kge=g.lazy(()=>rf(()=>import("./index-
|
|
23819
|
+
`,pRe=e=>g.createElement("svg",{width:208,height:208,viewBox:"0 0 208 208",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},g.createElement("g",{filter:"url(#filter0_f_251_38441)"},g.createElement("circle",{cx:104,cy:104,r:44,fill:"url(#paint0_linear_251_38441)"}),g.createElement("circle",{cx:104,cy:104,r:50,stroke:"url(#paint1_linear_251_38441)",strokeWidth:12})),g.createElement("g",{filter:"url(#filter1_d_251_38441)"},g.createElement("circle",{cx:104,cy:104,r:41.1429,fill:"#FAFAFA"}),g.createElement("circle",{cx:104,cy:104,r:43.1429,stroke:"url(#paint2_linear_251_38441)",strokeWidth:4})),g.createElement("g",{clipPath:"url(#clip0_251_38441)"},g.createElement("path",{d:"M120.16 102.411L96.2853 90.4684C96.0134 90.3343 95.7118 90.2718 95.409 90.2867C95.1062 90.3016 94.8122 90.3935 94.5548 90.5536C94.2974 90.7138 94.0851 90.9369 93.938 91.202C93.7908 91.467 93.7137 91.7652 93.7139 92.0684V115.931C93.7137 116.234 93.7908 116.533 93.938 116.798C94.0851 117.063 94.2974 117.286 94.5548 117.446C94.8122 117.606 95.1062 117.698 95.409 117.713C95.7118 117.728 96.0134 117.665 96.2853 117.531L120.16 105.588C120.456 105.442 120.706 105.216 120.88 104.935C121.055 104.654 121.147 104.33 121.147 104C121.147 103.669 121.055 103.345 120.88 103.065C120.706 102.784 120.456 102.558 120.16 102.411Z",fill:"black"})),g.createElement("defs",null,g.createElement("filter",{id:"filter0_f_251_38441",x:0,y:0,width:208,height:208,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},g.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),g.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),g.createElement("feGaussianBlur",{stdDeviation:24,result:"effect1_foregroundBlur_251_38441"})),g.createElement("filter",{id:"filter1_d_251_38441",x:54.8569,y:58.8571,width:98.2856,height:98.2857,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},g.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),g.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),g.createElement("feOffset",{dy:4}),g.createElement("feGaussianBlur",{stdDeviation:2}),g.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),g.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),g.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_251_38441"}),g.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_251_38441",result:"shape"})),g.createElement("linearGradient",{id:"paint0_linear_251_38441",x1:119.671,y1:119.671,x2:87.9755,y2:87.9758,gradientUnits:"userSpaceOnUse"},g.createElement("stop",{stopColor:"#7135FF"}),g.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),g.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),g.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),g.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),g.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),g.createElement("stop",{offset:1,stopColor:"#EE609C"})),g.createElement("linearGradient",{id:"paint1_linear_251_38441",x1:119.671,y1:119.671,x2:87.9755,y2:87.9758,gradientUnits:"userSpaceOnUse"},g.createElement("stop",{stopColor:"#7135FF"}),g.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),g.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),g.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),g.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),g.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),g.createElement("stop",{offset:1,stopColor:"#EE609C"})),g.createElement("linearGradient",{id:"paint2_linear_251_38441",x1:118.653,y1:118.653,x2:89.0159,y2:89.0164,gradientUnits:"userSpaceOnUse"},g.createElement("stop",{stopColor:"#7135FF"}),g.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),g.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),g.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),g.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),g.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),g.createElement("stop",{offset:1,stopColor:"#EE609C"})),g.createElement("clipPath",{id:"clip0_251_38441"},g.createElement("rect",{width:27.4286,height:27.4286,fill:"white",transform:"translate(93.7139 90.2849)"})))),kge=g.lazy(()=>rf(()=>import("./index-BhCBsLMw.js"),__vite__mapDeps([13,5,1,6])));function LMo({src:e,autoPlay:t=!0,config:i,controls:n=!0,height:a="100%",isModalOpen:l,loop:d=!1,muted:c=!1,showPlayButton:p=!1,style:h,thumbnail:u,width:m="100%",onEnded:f,onModalClose:x,onPlay:y}){const w=Ie(),[b,C]=g.useState(!1);g.useEffect(()=>{l===!0&&t?C(!0):l===!1&&C(!1)},[l,t]);const k={};i?.youtube&&(k.youtube=i.youtube);const L=()=>{C(!0),y?.()},S=()=>{C(!1),x?.()},j=()=>{C(!1),f?.(),l!=null&&x?.()},I=()=>{C(!0),y?.()};return l!=null?l?Pn.createPortal(s.jsx(DMo,{windowSize:w,role:"presentation",children:s.jsx(ni,{onClickAway:S,children:s.jsx(TMo,{windowSize:w,"data-testid":"video-player-modal",children:s.jsxs(PMo,{children:[p&&!b&&s.jsxs(s.Fragment,{children:[u!=null&&u!==""&&s.jsx(BMo,{src:u,alt:"Video thumbnail"}),s.jsx(jMo,{onClick:L,children:s.jsx(MMo,{windowSize:w})})]}),(!p||b)&&s.jsx(g.Suspense,{fallback:s.jsx("div",{style:{width:"100%",height:"100%"}}),children:s.jsx(kge,{src:e,playing:b,controls:n,muted:c,loop:d,width:"100%",height:"100%",onEnded:j,onPlay:I,config:k})})]})})})}),document.body):null:s.jsx(g.Suspense,{fallback:s.jsx("div",{style:{width:m,height:a,...h}}),children:s.jsx(kge,{src:e,playing:b,controls:n,muted:c,loop:d,width:m,height:a,style:h,light:p&&!b?u??!0:!1,onEnded:j,onPlay:I,config:k})})}const IMo=_t`
|
|
23820
23820
|
0% {
|
|
23821
23821
|
transform: rotate(0deg);
|
|
23822
23822
|
}
|
|
@@ -98309,7 +98309,7 @@ ${e}`,ZXi=e=>g.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
98309
98309
|
`,C4r=r(wq)`
|
|
98310
98310
|
color: ${e=>e.theme.colors.alert};
|
|
98311
98311
|
margin-top: ${o.sp2};
|
|
98312
|
-
`;var A4r=aKe();const Zy=mY(A4r);class $4r{getSignedInUser(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);if(t!=null)return this.readEncryptedJSON(this.ZENI_SIGNED_IN_USER,t)}getShowNegativeAmountInParenthesis(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);return t==null?!1:this.readEncryptedJSON(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,t)??!1}getShowNegativeAmountInParenthesisPDF(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);return t==null?!0:this.readEncryptedJSON(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,t)??!0}getSignedInUserTenant(t){return this.getSignedInUserTenants()?.find(i=>i.tenantEmailDomain===t)}getSignedInUserTenantWithId(t){return this.getSignedInUserTenants()?.find(i=>i.tenantId===t)}getForceRefreshedComponents(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);return t==null?[]:this.readEncryptedJSON(this.ZENI_FORCE_REFRESHED_COMPONENTS,t)??[]}saveForceRefreshedComponents(t){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null?window.localStorage.setItem(this.ZENI_FORCE_REFRESHED_COMPONENTS,this.encrypt(JSON.stringify(t),i)):console.warn("Can't update the force refreshed components when the user is logged out!")}saveSignedInUserWithSession(t,i){if(t==null||i==null)throw new Error("Can't accept nil for user or session Id");window.localStorage.getItem(this.ZENI_SESSION_ID)!==i&&this.clearSessionKeyedEntries(),window.localStorage.setItem(this.ZENI_SESSION_ID,i),window.localStorage.setItem(this.ZENI_SIGNED_IN_USER,this.encrypt(JSON.stringify(t),i))}saveSignedInUserTenants(t,i){const n=i??window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_SIGNED_IN_USER_TENANTS,this.encrypt(JSON.stringify(t),n)):console.warn("Can't update the setting when the user is logged out!")}saveShowNegativeAmountInParenthesis(t){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);if(i!=null)window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.encrypt(JSON.stringify(t),i));else throw new Error("Can't update the setting when the user is logged out!")}saveShowNegativeAmountInParenthesisPDF(t){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);if(i!=null)window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.encrypt(JSON.stringify(t),i));else throw new Error("Can't update the setting when the user is logged out!")}isSignedIn(){return[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER].map(i=>window.localStorage.getItem(i)!=null).reduce((i,n)=>i&&n)}clearAll(){this.ALL_IDs.forEach(t=>window.localStorage.removeItem(t))}setTheme(t){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null&&window.localStorage.setItem(this.ZENI_THEME,this.encrypt(t,i))}getTheme(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);if(t==null)return;const i=this.readEncryptedString(this.ZENI_THEME,t);if(i!=null){if(i!=="light"&&i!=="dark"){window.localStorage.removeItem(this.ZENI_THEME);return}return i}}encrypt(t,i){return Zy.AES.encrypt(t,i).toString()}decrypt(t,i){try{const n=Zy.AES.decrypt(t,i).toString(Zy.enc.Utf8);return n===""?void 0:n}catch{return}}readEncryptedString(t,i){const n=window.localStorage.getItem(t);if(n==null)return;const a=this.decrypt(n,i);return a==null&&window.localStorage.removeItem(t),a}readEncryptedJSON(t,i){const n=this.readEncryptedString(t,i);if(n!=null)try{const a=JSON.parse(n);if(a===null){window.localStorage.removeItem(t);return}return a}catch{window.localStorage.removeItem(t);return}}getSignedInUserTenants(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);if(t!=null)return this.readEncryptedJSON(this.ZENI_SIGNED_IN_USER_TENANTS,t)}clearSessionKeyedEntries(){this.SESSION_KEYED_IDs.forEach(t=>window.localStorage.removeItem(t))}ZENI_SESSION_ID="ZENI_SESSION_ID";ZENI_SIGNED_IN_USER="ZENI_SIGNED_IN_USER";ZENI_SIGNED_IN_USER_TENANTS="ZENI_SIGNED_IN_USER_TENANTS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF";ZENI_THEME="ZENI_THEME";ZENI_FORCE_REFRESHED_COMPONENTS="ZENI_FORCE_REFRESHED_COMPONENTS";SESSION_KEYED_IDs=[this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_THEME,this.ZENI_FORCE_REFRESHED_COMPONENTS];ALL_IDs=[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_THEME,this.ZENI_FORCE_REFRESHED_COMPONENTS]}const os=new $4r,k4r=({children:e})=>{const t=eKe("(prefers-color-scheme: dark)"),[i,n]=A.useState({dark:t});g.useEffect(()=>{const p=os.getTheme()==null?t:os.getTheme()==="dark";i.dark!==p&&n({dark:p})},[i,t]);const a=()=>{const p=!i.dark;os.setTheme(p?"dark":"light"),n({...i,dark:p})},l=i.dark?bwo():wwo(),d=typeof window<"u"?window.__NONCE__:void 0,c=d!=null&&d.length>0?d:void 0;return fo.jsx(P5o,{dark:i.dark,webAppTheme:l,toggle:a,nonce:c,children:e})},S4r=["sandbox","production"],E4r=e=>Gf(e,S4r),L4r=e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"sandbox";case"PROD":case"NEXT":return"production";default:return"sandbox"}},I4r=["development","staging","production"],j4r=e=>Gf(e,I4r),M4r=e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}},B4r=["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"],D4r=e=>Gf(e,B4r),$c=D4r("PROD"),Xw=()=>$c==="DEV"||$c==="QA"||$c==="PUNE"||$c==="SUNNYVALE"||$c==="DELHI"||$c==="MOHALI",PX="https://zeni-webapp.uc.r.appspot.com",T4r="a9cfa638c9c62aa82fb38cd66d7f717e",U1n=E4r(L4r($c)),P4r=j4r(M4r($c));function z4r(e,t){return Zy.AES.decrypt(e,t).toString(Zy.enc.Utf8)}const R4r="ZENI-WEB-APP-",wWe=$c==="DEV"||$c==="QA"?.2:.8,aa={sentryDsn:"",sentryTraceSamplingRate:wWe,googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",quickbooksKey:"",appUrl:"",featureClientSecret:"",featureClientSecretCockpit:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let Wf,zX;function F4r(e){aa.sentryDsn=e.keys.SENTRY_DSN,aa.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):wWe,aa.googleClientId=e.keys.GOOGLE_CLIENT_ID,aa.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,aa.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,aa.mixpanelToken=e.keys.MIXPANEL_TOKEN,aa.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,aa.pusherCluster=e.keys.PUSHER_CLUSTER,aa.quickbooksKey=e.keys.QUICKBOOK_TOKEN,aa.appUrl=e.keys.WEB_ENDPOINT,aa.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,aa.featureClientSecretCockpit=e.keys.STATSIG_CLIENT_SECRET_COCKPIT,aa.cardVaultId=e.keys.UNIT_VAULT_ID,aa.stripeKey=e.keys.STRIPE_KEY,aa.qboRedirectionUrl=e.keys.QBO_URL,aa.mixpanelUrl=e.keys.MIXPANEL_URL,aa.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,zX=e.externalEndPoints,Wf=e.apiEndPoints,O4r()}function O4r(){try{const e=new Set;if(Wf!=null){for(const t of Object.values(Wf))if(typeof t=="string"&&t.startsWith("http"))try{e.add(new URL(t).origin)}catch{}}for(const t of e){const i=document.createElement("link");i.rel="preconnect",i.href=t,i.crossOrigin="anonymous",document.head.appendChild(i)}}catch{}}async function N4r(){const t=encodeURIComponent(JSON.stringify({environment:$c}));try{const i=await fetch(`${PX}/api/keys?query=${t}`);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}catch(i){return console.error("Error fetching details:",i),null}}let pbe=!1;function Ay(){pbe||(hh.init(T4r,{api_host:zX.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),pbe=!0)}let hbe=!1,ube=!1;function bWe(){if(hbe)return;hbe=!0,Ay();const e=Vs.extractUtmParamsFromUrl();Object.keys(e).length>0&&hh.register(e),Xw()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}function H4r(){return hh?.persistence?.props??null}const _4r=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function V4r(){const e=H4r();if(e==null)return;const t=Object.keys(e).filter(i=>i.startsWith("utm_")||_4r.has(i));for(const i of t)hh.unregister(i);Xw()&&t.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(t)}`)}function Q4r(){ube||(ube=!0,V4r())}class of{identify(t,i){if(Ay(),this.#o=t,t!=null&&i!=null&&(of.#t==null||IYe({userId:t,traits:i},of.#t)!==!0)){const{$email:n,...a}={...i};hh.identify(t),n&&n!=null&&hh.people.set_once({$email:n}),hh.people.set(a),of.#t={userId:t,traits:i},Xw()&&console.log(`*** Called people set with userId ${t} traits ${JSON.stringify(i)} `)}}identifyUserAndCompany(t,i,n,a,l){throw Error("Use identify in the web-app!!")}track(t,i){if(Ay(),this.#o==null){console.error("user is not identified :(, so can not fire event");return}bWe();const n={distinct_id:this.#o,...i};hh.track(t,n),Q4r(),Xw()&&console.log(`*** firing ${t} with props ${JSON.stringify(i)}`)}alias(t,i){Ay(),hh.alias(t,i)}reset(){Ay(),hh.reset(),this.#o=void 0,of.#t=void 0}static get analytics(){return this.#e}static#e=new Vs.Analytics(new of);static#t;#o}const X0=of.analytics;function U4r(){bWe()}const W4r=()=>{const e=cL(),t=Ph(i=>i.companyState);if(e.pathname.includes("/management/parent/")){const i=e.pathname.split("/")[3],n=t.companiesById[i];if(n!=null)return`${n.companyInfo.name} ${U.getLocalizedStrings().cockpit.cockpitHeaderSubsidiaryText}`}if(e.pathname.includes("management/month-end-report/company/")){const i=e.pathname.split("/")[4],n=t.companiesById[i];if(n!=null)return n.companyInfo.name}},mbe=e=>{switch(e){case"healthMonitor":return"health-monitor";case"taskManager":return"task-manager";case"aiAccountant":return"ai-accountant";case"creditAgent":return"credit-agent";default:return e}},W1n=e=>{switch(e){case"healthMonitor":return"health monitor";case"taskManager":return"task manager";case"aiAccountant":return"ai accountant";case"creditAgent":return"credit agent";default:return e}};function G4r(e,t){return{updateDownloadStateHandler:i=>{e(jYe(i))},onZeniLogoClick:()=>{t.themeState.toggle()},onLogOutClick:()=>{e(uQ()),e(mQ(!1)),os.clearAll();const i=t.locationHook.state?.origin??"/";t.navigate(i,{replace:!0})},onNewCustomerClick:()=>{t.navigate("/onboarding/new"),X0?.trackOnboardingNewCustomerStarted()},onThreadClick:(i,n,a)=>{const l=i.entityType.split(".");if(l.length===2){const d=cye(l[0]);if(d!=null){const c=mbe(d);t.navigate(`/${c}`),a(i,n)}else console.warn(`Invalid navigation target in thread: ${l[0]}`)}},onNotificationClick:(i,n,a)=>{const l=i.entityType.split(".");if(i.isGlobalComment&&l.length===2){const d=cye(l[0]);if(d!=null){const c=mbe(d);t.navigate(`/${c}`),a(i,n)}else console.warn(`Invalid navigation target in notification: ${l[0]}`)}}}}function Y4r(e,t){const{signedInUser:i,cockpitHeader:n}=t,a=e.tenantState.currentTenantId,d=mL(e)?.companyName??"",c={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:a??""};return{signedInUser:i,cockpitHeader:n,downloadState:e.companyViewState.downloadState,downloadParams:{currentTenantCompanyName:d,cockpitEndPoint:`${PX}/cockpitTabs`,authParams:c}}}const K4r=AGe(Y4r,G4r)(YKi);function q4r(){const e=xPe(),t=os.getSignedInUser(),i=gY(),n=cL(),a=W4r(),l=Ph(p=>MYe(p)),d={tabsFileType:"excel",tabs:["management","subscription","portfolio","onboarding","healthMonitor"],filterByTabs:l.filterByTabs,timezone:BYe()},c=n.pathname.split("/")[1];return fo.jsx(K4r,{locationHook:n,themeState:e,signedInUser:t,cockpitHeader:a,allTabsViews:l,defaultOptions:d,analytics:X0,currentTab:c,navigate:i})}const Z4r=["/management/*","/subscription/*","/onboarding/*","/portfolio/*","/audit/*","/health-monitor/*","/task-manager/*","/ai-accountant/*","/credit-agent/*"];function J4r({appContent:e}){const t=Z4r.filter(i=>$Ge(i)).length===0;return fo.jsxs(fo.Fragment,{children:[t?null:fo.jsx(q4r,{}),fo.jsx(fo.Fragment,{children:e})]})}const X4r="cockpit",vWe="init-enter";function e5r({location:e,visitedUrl:t}){const{pathname:i}=e;return g.useLayoutEffect(()=>{const n=t.get(i||vWe);gbe(n!==void 0?n:0)}),null}const t5r=g.memo(e5r,(e,t)=>{const{location:i,visitedUrl:n}=e,{location:a}=t,l=i.pathname||vWe,d=o5r();return n.set(l,d),!((a.pathname!==i.pathname||a.search!==i.search)&&a.hash==="")}),gbe=(e=0)=>window.requestAnimationFrame(()=>{window.scrollTo(0,e)}),o5r=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},CWe=e=>g.lazy(async()=>{const t=e.toString(),i=os.getForceRefreshedComponents(),n=new Set(i),a=n.has(t);try{const l=await e();return n.delete(t),os.saveForceRefreshedComponents(Array.from(n)),l}catch(l){throw a||(n.add(t),os.saveForceRefreshedComponents(Array.from(n)),location.reload()),l}}),i5r=CWe(()=>rf(()=>import("./ScreenRoutes-D0DCex3b.js").then(e=>e.S),__vite__mapDeps([14,5,1,6,15,8,16,17,7,2,4,9,11]))),r5r=CWe(()=>rf(()=>import("./SignInScreen-DNfbPV4r.js"),__vite__mapDeps([18,15,1,6,8,5,16,17,19,20,21,7])));function n5r(){const e=g.useRef();e.current==null&&(e.current=new Map);const t=gY(),i=cL();return g.useEffect(()=>{U4r()},[]),g.useEffect(()=>{const n="signin/auth";os.isSignedIn()===!1&&!i.pathname.includes(n)&&t(n,{replace:!0,state:{...i.state,message:"...",origin:i.pathname}})}),fo.jsxs(l5r,{children:[fo.jsx(t5r,{visitedUrl:e.current,location:i}),fo.jsx(a5r,{})]})}const a5r=()=>{const e=os.isSignedIn(),t=os.getSignedInUser(),i=e&&Ebe(t),n=Ph(p=>mL(p)),a={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:n.tenantId??""},l=Ph(p=>DYe(p)),c=Ph(p=>TYe(p)).map(p=>({companyId:p.companyId,tenantId:p.tenantId,companyName:p.name}));return fo.jsx(SPi,{roomId:X4r,authParams:a,users:l,companies:c,authUrlEndPoint:`${Wf.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!1,commentingUsersUrlEndPoint:`${Wf.tenantMicroServiceBaseUrl}/1.0/users/zeni-users`,autoConnect:i,withRoomProvider:!1,loggedInUser:t,withThreadsProvider:!0,filter:{application:"cockpit"},children:fo.jsx(s5r,{})})},s5r=()=>fo.jsx(g.Suspense,{fallback:fo.jsx(d5r,{children:fo.jsx(xo,{size:"Large",start:!0})}),children:fo.jsxs(kGe,{children:[fo.jsx(VB,{path:"/",element:fo.jsx(SGe,{to:"management",replace:!0})}),fo.jsx(VB,{path:"/signin/auth",element:fo.jsx(r5r,{})}),fo.jsx(VB,{path:"*",element:fo.jsx(J4r,{appContent:fo.jsx(i5r,{})})})]})}),l5r=ave("div")``,d5r=ave("div")`
|
|
98312
|
+
`;var A4r=aKe();const Zy=mY(A4r);class $4r{getSignedInUser(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);if(t!=null)return this.readEncryptedJSON(this.ZENI_SIGNED_IN_USER,t)}getShowNegativeAmountInParenthesis(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);return t==null?!1:this.readEncryptedJSON(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,t)??!1}getShowNegativeAmountInParenthesisPDF(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);return t==null?!0:this.readEncryptedJSON(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,t)??!0}getSignedInUserTenant(t){return this.getSignedInUserTenants()?.find(i=>i.tenantEmailDomain===t)}getSignedInUserTenantWithId(t){return this.getSignedInUserTenants()?.find(i=>i.tenantId===t)}getForceRefreshedComponents(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);return t==null?[]:this.readEncryptedJSON(this.ZENI_FORCE_REFRESHED_COMPONENTS,t)??[]}saveForceRefreshedComponents(t){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null?window.localStorage.setItem(this.ZENI_FORCE_REFRESHED_COMPONENTS,this.encrypt(JSON.stringify(t),i)):console.warn("Can't update the force refreshed components when the user is logged out!")}saveSignedInUserWithSession(t,i){if(t==null||i==null)throw new Error("Can't accept nil for user or session Id");window.localStorage.getItem(this.ZENI_SESSION_ID)!==i&&this.clearSessionKeyedEntries(),window.localStorage.setItem(this.ZENI_SESSION_ID,i),window.localStorage.setItem(this.ZENI_SIGNED_IN_USER,this.encrypt(JSON.stringify(t),i))}saveSignedInUserTenants(t,i){const n=i??window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_SIGNED_IN_USER_TENANTS,this.encrypt(JSON.stringify(t),n)):console.warn("Can't update the setting when the user is logged out!")}saveShowNegativeAmountInParenthesis(t){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);if(i!=null)window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.encrypt(JSON.stringify(t),i));else throw new Error("Can't update the setting when the user is logged out!")}saveShowNegativeAmountInParenthesisPDF(t){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);if(i!=null)window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.encrypt(JSON.stringify(t),i));else throw new Error("Can't update the setting when the user is logged out!")}isSignedIn(){return[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER].map(i=>window.localStorage.getItem(i)!=null).reduce((i,n)=>i&&n)}clearAll(){this.ALL_IDs.forEach(t=>window.localStorage.removeItem(t))}setTheme(t){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null&&window.localStorage.setItem(this.ZENI_THEME,this.encrypt(t,i))}getTheme(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);if(t==null)return;const i=this.readEncryptedString(this.ZENI_THEME,t);if(i!=null){if(i!=="light"&&i!=="dark"){window.localStorage.removeItem(this.ZENI_THEME);return}return i}}encrypt(t,i){return Zy.AES.encrypt(t,i).toString()}decrypt(t,i){try{const n=Zy.AES.decrypt(t,i).toString(Zy.enc.Utf8);return n===""?void 0:n}catch{return}}readEncryptedString(t,i){const n=window.localStorage.getItem(t);if(n==null)return;const a=this.decrypt(n,i);return a==null&&window.localStorage.removeItem(t),a}readEncryptedJSON(t,i){const n=this.readEncryptedString(t,i);if(n!=null)try{const a=JSON.parse(n);if(a===null){window.localStorage.removeItem(t);return}return a}catch{window.localStorage.removeItem(t);return}}getSignedInUserTenants(){const t=window.localStorage.getItem(this.ZENI_SESSION_ID);if(t!=null)return this.readEncryptedJSON(this.ZENI_SIGNED_IN_USER_TENANTS,t)}clearSessionKeyedEntries(){this.SESSION_KEYED_IDs.forEach(t=>window.localStorage.removeItem(t))}ZENI_SESSION_ID="ZENI_SESSION_ID";ZENI_SIGNED_IN_USER="ZENI_SIGNED_IN_USER";ZENI_SIGNED_IN_USER_TENANTS="ZENI_SIGNED_IN_USER_TENANTS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF";ZENI_THEME="ZENI_THEME";ZENI_FORCE_REFRESHED_COMPONENTS="ZENI_FORCE_REFRESHED_COMPONENTS";SESSION_KEYED_IDs=[this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_THEME,this.ZENI_FORCE_REFRESHED_COMPONENTS];ALL_IDs=[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_THEME,this.ZENI_FORCE_REFRESHED_COMPONENTS]}const os=new $4r,k4r=({children:e})=>{const t=eKe("(prefers-color-scheme: dark)"),[i,n]=A.useState({dark:t});g.useEffect(()=>{const p=os.getTheme()==null?t:os.getTheme()==="dark";i.dark!==p&&n({dark:p})},[i,t]);const a=()=>{const p=!i.dark;os.setTheme(p?"dark":"light"),n({...i,dark:p})},l=i.dark?bwo():wwo(),d=typeof window<"u"?window.__NONCE__:void 0,c=d!=null&&d.length>0?d:void 0;return fo.jsx(P5o,{dark:i.dark,webAppTheme:l,toggle:a,nonce:c,children:e})},S4r=["sandbox","production"],E4r=e=>Gf(e,S4r),L4r=e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"sandbox";case"PROD":case"NEXT":return"production";default:return"sandbox"}},I4r=["development","staging","production"],j4r=e=>Gf(e,I4r),M4r=e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}},B4r=["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"],D4r=e=>Gf(e,B4r),$c=D4r("DEV"),Xw=()=>$c==="DEV"||$c==="QA"||$c==="PUNE"||$c==="SUNNYVALE"||$c==="DELHI"||$c==="MOHALI",PX="https://zeni-webapp-dev.uc.r.appspot.com",T4r="63d3a2406505a5737a2b4debdb513f20",U1n=E4r(L4r($c)),P4r=j4r(M4r($c));function z4r(e,t){return Zy.AES.decrypt(e,t).toString(Zy.enc.Utf8)}const R4r="ZENI-WEB-APP-",wWe=$c==="DEV"||$c==="QA"?.2:.8,aa={sentryDsn:"",sentryTraceSamplingRate:wWe,googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",quickbooksKey:"",appUrl:"",featureClientSecret:"",featureClientSecretCockpit:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let Wf,zX;function F4r(e){aa.sentryDsn=e.keys.SENTRY_DSN,aa.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):wWe,aa.googleClientId=e.keys.GOOGLE_CLIENT_ID,aa.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,aa.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,aa.mixpanelToken=e.keys.MIXPANEL_TOKEN,aa.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,aa.pusherCluster=e.keys.PUSHER_CLUSTER,aa.quickbooksKey=e.keys.QUICKBOOK_TOKEN,aa.appUrl=e.keys.WEB_ENDPOINT,aa.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,aa.featureClientSecretCockpit=e.keys.STATSIG_CLIENT_SECRET_COCKPIT,aa.cardVaultId=e.keys.UNIT_VAULT_ID,aa.stripeKey=e.keys.STRIPE_KEY,aa.qboRedirectionUrl=e.keys.QBO_URL,aa.mixpanelUrl=e.keys.MIXPANEL_URL,aa.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,zX=e.externalEndPoints,Wf=e.apiEndPoints,O4r()}function O4r(){try{const e=new Set;if(Wf!=null){for(const t of Object.values(Wf))if(typeof t=="string"&&t.startsWith("http"))try{e.add(new URL(t).origin)}catch{}}for(const t of e){const i=document.createElement("link");i.rel="preconnect",i.href=t,i.crossOrigin="anonymous",document.head.appendChild(i)}}catch{}}async function N4r(){const t=encodeURIComponent(JSON.stringify({environment:$c}));try{const i=await fetch(`${PX}/api/keys?query=${t}`);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return await i.json()}catch(i){return console.error("Error fetching details:",i),null}}let pbe=!1;function Ay(){pbe||(hh.init(T4r,{api_host:zX.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),pbe=!0)}let hbe=!1,ube=!1;function bWe(){if(hbe)return;hbe=!0,Ay();const e=Vs.extractUtmParamsFromUrl();Object.keys(e).length>0&&hh.register(e),Xw()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}function H4r(){return hh?.persistence?.props??null}const _4r=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function V4r(){const e=H4r();if(e==null)return;const t=Object.keys(e).filter(i=>i.startsWith("utm_")||_4r.has(i));for(const i of t)hh.unregister(i);Xw()&&t.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(t)}`)}function Q4r(){ube||(ube=!0,V4r())}class of{identify(t,i){if(Ay(),this.#o=t,t!=null&&i!=null&&(of.#t==null||IYe({userId:t,traits:i},of.#t)!==!0)){const{$email:n,...a}={...i};hh.identify(t),n&&n!=null&&hh.people.set_once({$email:n}),hh.people.set(a),of.#t={userId:t,traits:i},Xw()&&console.log(`*** Called people set with userId ${t} traits ${JSON.stringify(i)} `)}}identifyUserAndCompany(t,i,n,a,l){throw Error("Use identify in the web-app!!")}track(t,i){if(Ay(),this.#o==null){console.error("user is not identified :(, so can not fire event");return}bWe();const n={distinct_id:this.#o,...i};hh.track(t,n),Q4r(),Xw()&&console.log(`*** firing ${t} with props ${JSON.stringify(i)}`)}alias(t,i){Ay(),hh.alias(t,i)}reset(){Ay(),hh.reset(),this.#o=void 0,of.#t=void 0}static get analytics(){return this.#e}static#e=new Vs.Analytics(new of);static#t;#o}const X0=of.analytics;function U4r(){bWe()}const W4r=()=>{const e=cL(),t=Ph(i=>i.companyState);if(e.pathname.includes("/management/parent/")){const i=e.pathname.split("/")[3],n=t.companiesById[i];if(n!=null)return`${n.companyInfo.name} ${U.getLocalizedStrings().cockpit.cockpitHeaderSubsidiaryText}`}if(e.pathname.includes("management/month-end-report/company/")){const i=e.pathname.split("/")[4],n=t.companiesById[i];if(n!=null)return n.companyInfo.name}},mbe=e=>{switch(e){case"healthMonitor":return"health-monitor";case"taskManager":return"task-manager";case"aiAccountant":return"ai-accountant";case"creditAgent":return"credit-agent";default:return e}},W1n=e=>{switch(e){case"healthMonitor":return"health monitor";case"taskManager":return"task manager";case"aiAccountant":return"ai accountant";case"creditAgent":return"credit agent";default:return e}};function G4r(e,t){return{updateDownloadStateHandler:i=>{e(jYe(i))},onZeniLogoClick:()=>{t.themeState.toggle()},onLogOutClick:()=>{e(uQ()),e(mQ(!1)),os.clearAll();const i=t.locationHook.state?.origin??"/";t.navigate(i,{replace:!0})},onNewCustomerClick:()=>{t.navigate("/onboarding/new"),X0?.trackOnboardingNewCustomerStarted()},onThreadClick:(i,n,a)=>{const l=i.entityType.split(".");if(l.length===2){const d=cye(l[0]);if(d!=null){const c=mbe(d);t.navigate(`/${c}`),a(i,n)}else console.warn(`Invalid navigation target in thread: ${l[0]}`)}},onNotificationClick:(i,n,a)=>{const l=i.entityType.split(".");if(i.isGlobalComment&&l.length===2){const d=cye(l[0]);if(d!=null){const c=mbe(d);t.navigate(`/${c}`),a(i,n)}else console.warn(`Invalid navigation target in notification: ${l[0]}`)}}}}function Y4r(e,t){const{signedInUser:i,cockpitHeader:n}=t,a=e.tenantState.currentTenantId,d=mL(e)?.companyName??"",c={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:a??""};return{signedInUser:i,cockpitHeader:n,downloadState:e.companyViewState.downloadState,downloadParams:{currentTenantCompanyName:d,cockpitEndPoint:`${PX}/cockpitTabs`,authParams:c}}}const K4r=AGe(Y4r,G4r)(YKi);function q4r(){const e=xPe(),t=os.getSignedInUser(),i=gY(),n=cL(),a=W4r(),l=Ph(p=>MYe(p)),d={tabsFileType:"excel",tabs:["management","subscription","portfolio","onboarding","healthMonitor"],filterByTabs:l.filterByTabs,timezone:BYe()},c=n.pathname.split("/")[1];return fo.jsx(K4r,{locationHook:n,themeState:e,signedInUser:t,cockpitHeader:a,allTabsViews:l,defaultOptions:d,analytics:X0,currentTab:c,navigate:i})}const Z4r=["/management/*","/subscription/*","/onboarding/*","/portfolio/*","/audit/*","/health-monitor/*","/task-manager/*","/ai-accountant/*","/credit-agent/*"];function J4r({appContent:e}){const t=Z4r.filter(i=>$Ge(i)).length===0;return fo.jsxs(fo.Fragment,{children:[t?null:fo.jsx(q4r,{}),fo.jsx(fo.Fragment,{children:e})]})}const X4r="cockpit",vWe="init-enter";function e5r({location:e,visitedUrl:t}){const{pathname:i}=e;return g.useLayoutEffect(()=>{const n=t.get(i||vWe);gbe(n!==void 0?n:0)}),null}const t5r=g.memo(e5r,(e,t)=>{const{location:i,visitedUrl:n}=e,{location:a}=t,l=i.pathname||vWe,d=o5r();return n.set(l,d),!((a.pathname!==i.pathname||a.search!==i.search)&&a.hash==="")}),gbe=(e=0)=>window.requestAnimationFrame(()=>{window.scrollTo(0,e)}),o5r=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},CWe=e=>g.lazy(async()=>{const t=e.toString(),i=os.getForceRefreshedComponents(),n=new Set(i),a=n.has(t);try{const l=await e();return n.delete(t),os.saveForceRefreshedComponents(Array.from(n)),l}catch(l){throw a||(n.add(t),os.saveForceRefreshedComponents(Array.from(n)),location.reload()),l}}),i5r=CWe(()=>rf(()=>import("./ScreenRoutes-BDGsW7bh.js").then(e=>e.S),__vite__mapDeps([14,5,1,6,15,8,16,17,7,2,4,9,11]))),r5r=CWe(()=>rf(()=>import("./SignInScreen-B1vBHooR.js"),__vite__mapDeps([18,15,1,6,8,5,16,17,19,20,21,7])));function n5r(){const e=g.useRef();e.current==null&&(e.current=new Map);const t=gY(),i=cL();return g.useEffect(()=>{U4r()},[]),g.useEffect(()=>{const n="signin/auth";os.isSignedIn()===!1&&!i.pathname.includes(n)&&t(n,{replace:!0,state:{...i.state,message:"...",origin:i.pathname}})}),fo.jsxs(l5r,{children:[fo.jsx(t5r,{visitedUrl:e.current,location:i}),fo.jsx(a5r,{})]})}const a5r=()=>{const e=os.isSignedIn(),t=os.getSignedInUser(),i=e&&Ebe(t),n=Ph(p=>mL(p)),a={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:n.tenantId??""},l=Ph(p=>DYe(p)),c=Ph(p=>TYe(p)).map(p=>({companyId:p.companyId,tenantId:p.tenantId,companyName:p.name}));return fo.jsx(SPi,{roomId:X4r,authParams:a,users:l,companies:c,authUrlEndPoint:`${Wf.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!1,commentingUsersUrlEndPoint:`${Wf.tenantMicroServiceBaseUrl}/1.0/users/zeni-users`,autoConnect:i,withRoomProvider:!1,loggedInUser:t,withThreadsProvider:!0,filter:{application:"cockpit"},children:fo.jsx(s5r,{})})},s5r=()=>fo.jsx(g.Suspense,{fallback:fo.jsx(d5r,{children:fo.jsx(xo,{size:"Large",start:!0})}),children:fo.jsxs(kGe,{children:[fo.jsx(VB,{path:"/",element:fo.jsx(SGe,{to:"management",replace:!0})}),fo.jsx(VB,{path:"/signin/auth",element:fo.jsx(r5r,{})}),fo.jsx(VB,{path:"*",element:fo.jsx(J4r,{appContent:fo.jsx(i5r,{})})})]})}),l5r=ave("div")``,d5r=ave("div")`
|
|
98313
98313
|
display: flex;
|
|
98314
98314
|
flex: 1 1 auto;
|
|
98315
98315
|
flex-direction: row;
|
|
@@ -98320,4 +98320,4 @@ ${e}`,ZXi=e=>g.createElement("svg",{width:38,height:39,viewBox:"0 0 38 39",fill:
|
|
|
98320
98320
|
background-color: ${e=>e.theme.colors.background};
|
|
98321
98321
|
`;function c5r(){U.updateAppLocaleID("en"),m5r();const e=g5r(),[t,i]=g.useState(!1),n=g.useCallback(l=>{l.data?.type==="UPDATE_READY"?i(!0):l.data?.type==="HIDE_UPDATE_POPUP"&&i(!1)},[]);g.useEffect(()=>("serviceWorker"in navigator&&(navigator.serviceWorker.addEventListener("message",n),navigator.serviceWorker.addEventListener("controllerchange",()=>{i(!1)})),()=>{navigator.serviceWorker.removeEventListener("message",n)}),[n]);const a=()=>{i(!1),window.location.reload()};return fo.jsx(k4r,{children:fo.jsx(EGe,{store:e,children:fo.jsx(OIt,{children:fo.jsxs(deo,{children:[t?fo.jsx(Xco,{onPrimaryClick:a}):null,fo.jsx(h5r,{})]})})})})}const Vx=new PYe,p5r=()=>{const e=os.getSignedInUser(),t=Ph(I=>mL(I)),i=Ph(I=>OYe(I,t.companyId)),n=cL(),a=gY(),l=LGe(),[d,c]=g.useState(null),p=avi(e?.userId),h=t?.excludedResources?.fetchState=="Completed"?t.excludedResources.resources:[];g.useEffect(()=>()=>{l(mee())},[]);const u=Ph(I=>NYe(I)),m=t?.externalConnections?.accounting[0]?.connectionName,f=()=>{l(mee())},x=g.useMemo(()=>HYe(t.userRole),[t.userRole]),y=Ph(I=>I.companyViewState.zeniUsers),w=g.useMemo(()=>{const I=y.fetchState==="Error"&&_Ye(y.error);return I&&console.warn("Auto-logout triggered due to invalid session"),I},[y.fetchState,y.error]),b=g.useMemo(()=>{const I=y.fetchState==="Error"&&VYe(y.error)===!0;return I&&console.warn("Page is not accessible, show 404"),I},[y.fetchState,y.error]),C=g.useRef(!1);g.useEffect(()=>(w&&!C.current&&(C.current=!0,k()),()=>{C.current=!1}),[w]),g.useEffect(()=>{b&&window.open("/page-not-found","_self")},[b]);const k=g.useCallback(()=>{c(null),Vx.stop(),l(uQ()),l(mQ(!1)),os.clearAll();const I=n.state?.origin??"/";a(I,{replace:!0})},[l,c,n,a]),L=g.useCallback((I="manual")=>{I==="auto-logout"?tbo({idleTimeoutMinutes:p.idleTimeoutMinutes}):rbo(),c(null),Vx.stop(),l(uQ()),l(mQ(!1)),os.clearAll(),window.location.href="/signin/auth"},[l,c,p.idleTimeoutMinutes]);g.useEffect(()=>{if(e?.zeniSessionId!=null)return Vx.start({idleTimeoutMinutes:p.idleTimeoutMinutes,warningDurationSeconds:p.warningDurationSeconds,heartbeatIntervalMinutes:p.heartbeatIntervalMinutes,isAutoLogoutEnabled:p.isAutoLogoutEnabled},{onHeartbeat:()=>l(QYe()),onWarningStart:I=>{X0.trackSessionTimeoutPopupShown(I),c(I)},onWarningTick:c,onAutoLogout:()=>{X0.trackSessionTimeoutAutoLogout(),L("auto-logout")},onSessionExtended:()=>c(null)}),()=>Vx.stop()},[e?.zeniSessionId,p.isAutoLogoutEnabled,p.idleTimeoutMinutes,p.warningDurationSeconds,p.heartbeatIntervalMinutes,l,L,c]);const S=g.useMemo(()=>os.getSignedInUser(),[]),j=g.useMemo(()=>({userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:t.tenantId??""}),[S,t.tenantId]);return fo.jsxs(Ceo,{globalInfo:{loggedInUser:e,loggedInUserRole:t?.userRole,excludedResources:h,loggedInUserRoleMap:x,currentTenant:t,connectionName:m,controllersList:i},children:[fo.jsx(ueo,{toolkit:{analytics:X0,sentry:WWe,authParams:j},children:fo.jsxs(AXt,{endPoint:{url:PX},children:[fo.jsx(M4i,{isOnDashboard:!1,showSnackbar:u.isSnackbarOpen,snackbar:{message:u.message,messageType:u.messageType,onRemoveSnackbar:f,showStatusIcon:u.showStatusIcon}}),fo.jsx(n5r,{})]})}),d!=null&&e!=null?fo.jsx(EYi,{secondsRemaining:d,onContinueSession:()=>{X0.trackSessionTimeoutClicked("continue",d),Vx.continueSession()},onSignOut:()=>{X0.trackSessionTimeoutClicked("sign_out",d),L()}}):null]})},h5r=()=>{const e=os.isSignedIn(),i=Ph(n=>mL(n)).companyId;return fo.jsx(jio,{isUserSignedIn:e,featureGateCustomFields:{companyId:i},zeniFeatureConfig:{currentFeatureEnv:P4r,featureClientSecret:aa.featureClientSecretCockpit,providerEndPoint:zX.statsigBaseUrl},children:fo.jsx(p5r,{})})},u5r=QWe(c5r);function m5r(){console.log("Initialize any 3rd party libs!")}let lQ=null;function g5r(){return lQ===null&&(lQ=f5r(),zYe().catch(e=>{console.error("Failed to load feature epics:",e),UWe(e,{tags:{critical:"true",module:"epicManager"}}),alert(`The application failed to load required modules. Some features may not work correctly.
|
|
98322
98322
|
|
|
98323
|
-
Please refresh the page to try again.`)})),lQ}function f5r(){console.warn(`initializing epic state with url ${JSON.stringify(Wf)}`);const e=os.getSignedInUser(),t=RYe(Wf,e?.userId,e?.zeniSessionId,void 0,Xw()),i=FYe();return i.userId!=null&&X0.identify(i.userId,{tenant_id:i.tenantId}),t}const fbe="zeni-chunk-reload-at",x5r=6e4,y5r=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function w5r(){window.addEventListener("vite:preloadError",e=>{const t=e;xbe(t.payload)&&t.preventDefault()}),window.addEventListener("unhandledrejection",e=>{b5r(e.reason)&&xbe(e.reason)})}function xbe(e){try{const t=Number(sessionStorage.getItem(fbe))||0;if(Date.now()-t<x5r)return!1;sessionStorage.setItem(fbe,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}function b5r(e){const t=String(e?.message??e??"");return y5r.some(i=>t.includes(i))}const v5r=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)),C5r="
|
|
98323
|
+
Please refresh the page to try again.`)})),lQ}function f5r(){console.warn(`initializing epic state with url ${JSON.stringify(Wf)}`);const e=os.getSignedInUser(),t=RYe(Wf,e?.userId,e?.zeniSessionId,void 0,Xw()),i=FYe();return i.userId!=null&&X0.identify(i.userId,{tenant_id:i.tenantId}),t}const fbe="zeni-chunk-reload-at",x5r=6e4,y5r=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function w5r(){window.addEventListener("vite:preloadError",e=>{const t=e;xbe(t.payload)&&t.preventDefault()}),window.addEventListener("unhandledrejection",e=>{b5r(e.reason)&&xbe(e.reason)})}function xbe(e){try{const t=Number(sessionStorage.getItem(fbe))||0;if(Date.now()-t<x5r)return!1;sessionStorage.setItem(fbe,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}function b5r(e){const t=String(e?.message??e??"");return y5r.some(i=>t.includes(i))}const v5r=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)),C5r="DEV",A5r="https://zeni-webapp-dev.uc.r.appspot.com",ybe=`/service-worker.js?v=${Date.now()}&env=${C5r}&endpoint=${encodeURIComponent(A5r)}`;function $5r(e){if("serviceWorker"in navigator){if(new URL("https://dev.app.zeni.ai",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{v5r?k5r(ybe):AWe(ybe)})}}function AWe(e,t){navigator.serviceWorker.register(e).then(i=>{i.onupdatefound=()=>{const n=i.installing;n!=null&&(n.onstatechange=()=>{n.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content available; will be used when all tabs are closed."),navigator.serviceWorker.controller?.postMessage({type:"UPDATE_READY"}),i.waiting?.postMessage({type:"SKIP_WAITING"})):console.log("Content is cached for offline use."))})},i.waiting&&i.waiting.postMessage({type:"SKIP_WAITING"}),navigator.serviceWorker.addEventListener("controllerchange",()=>{console.log("New service worker activated."),i.active?.postMessage({type:"CLIENTS_CLAIM"})})}).catch(i=>{console.error("Error during service worker registration:",i)})}function k5r(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(i=>{const n=i.headers.get("content-type");i.status===404||n!=null&&!n.includes("javascript")?navigator.serviceWorker.ready.then(a=>{a.unregister().then(()=>window.location.reload())}):AWe(e)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const S5r=os.getSignedInUser(),E5r=S5r?.zeniSessionId;async function L5r(){try{const e=await N4r(),t=z4r(e,R4r+$c);F4r(JSON.parse(t)),lKe.createRoot(document.getElementById("root")).render(fo.jsx(A.StrictMode,{children:fo.jsx(IGe,{basename:"/cockpit",children:fo.jsx(u5r,{})})})),I5r()}catch(e){console.error("Error initializing app:",e)}}function I5r(){const e=()=>{GWe({dsn:aa.sentryDsn,integrations:[YWe(),KWe({maskAllText:!0,blockAllMedia:!0})],tracesSampleRate:aa.sentryTraceSamplingRate,replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSendTransaction(t){return t.breadcrumbs&&(t.breadcrumbs=t.breadcrumbs.filter(i=>i.category!=="console"?!0:(i.message??"").toLowerCase().includes("called people set")||Array.isArray(i.data?.arguments)&&i.data.arguments.some(a=>typeof a=="string"&&a.toLowerCase().includes("called people set"))?!1:(Array.isArray(i.data?.arguments)&&(i.data.arguments=i.data.arguments.map(a=>{if(typeof a=="string"&&a.includes("user_roles"))try{const l=a.match(/\{.*\}/s);if(l!==null){const d=JSON.parse(l[0]);if(d.user_roles!=null)return delete d.user_roles,a.replace(l[0],JSON.stringify(d))}}catch{}return a})),!0))),t}}),qWe("session-id",E5r)};typeof requestIdleCallback=="function"?requestIdleCallback(e):setTimeout(e,0)}w5r();L5r();$5r();export{D4 as $,J5r as A,S1n as B,tEr as C,Mvr as D,RNr as E,FNr as F,U as G,j1n as H,V1n as I,P1n as J,I1n as K,fxr as L,H1n as M,jEr as N,MEr as O,M1n as P,T1n as Q,EPi as R,CWe as S,Bvr as T,L1n as U,E1n as V,PX as W,z1n as X,B1n as Y,D1n as Z,Q1n as _,E as a,gDe as b,X0 as c,oGr as d,aa as e,xo as f,W1n as g,mbe as h,Aio as i,N1n as j,v as k,U1n as l,Cu as m,o as n,Ie as o,Wj as p,mwo as q,_1n as r,Vs as s,O1n as t,U4r as u,Ss as v,F1n as w,R1n as x,hTr as y,os as z};
|