"use strict";(()=>{var Tq=Object.create;var h_=Object.defineProperty;var Aq=Object.getOwnPropertyDescriptor;var Eq=Object.getOwnPropertyNames;var $q=Object.getPrototypeOf,kq=Object.prototype.hasOwnProperty;var yr=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Zr=(t,e)=>{for(var n in e)h_(t,n,{get:e[n],enumerable:!0})},Rq=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Eq(e))!kq.call(t,i)&&i!==n&&h_(t,i,{get:()=>e[i],enumerable:!(r=Aq(e,i))||r.enumerable});return t};var lt=(t,e,n)=>(n=t!=null?Tq($q(t)):{},Rq(e||!t||!t.__esModule?h_(n,"default",{value:t,enumerable:!0}):n,t));var KC=yr(xe=>{"use strict";var m_=Symbol.for("react.transitional.element"),Cq=Symbol.for("react.portal"),Iq=Symbol.for("react.fragment"),Pq=Symbol.for("react.strict_mode"),Oq=Symbol.for("react.profiler"),Nq=Symbol.for("react.consumer"),Mq=Symbol.for("react.context"),Dq=Symbol.for("react.forward_ref"),Lq=Symbol.for("react.suspense"),jq=Symbol.for("react.memo"),FC=Symbol.for("react.lazy"),Uq=Symbol.for("react.activity"),LC=Symbol.iterator;function qq(t){return t===null||typeof t!="object"?null:(t=LC&&t[LC]||t["@@iterator"],typeof t=="function"?t:null)}var BC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HC=Object.assign,VC={};function tl(t,e,n){this.props=t,this.context=e,this.refs=VC,this.updater=n||BC}tl.prototype.isReactComponent={};tl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};tl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ZC(){}ZC.prototype=tl.prototype;function g_(t,e,n){this.props=t,this.context=e,this.refs=VC,this.updater=n||BC}var v_=g_.prototype=new ZC;v_.constructor=g_;HC(v_,tl.prototype);v_.isPureReactComponent=!0;var jC=Array.isArray;function p_(){}var ct={H:null,A:null,T:null,S:null},GC=Object.prototype.hasOwnProperty;function b_(t,e,n){var r=n.ref;return{$$typeof:m_,type:t,key:e,ref:r!==void 0?r:null,props:n}}function Fq(t,e){return b_(t.type,e,t.props)}function y_(t){return typeof t=="object"&&t!==null&&t.$$typeof===m_}function Bq(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var UC=/\/+/g;function f_(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Bq(""+t.key):e.toString(36)}function Hq(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(p_,p_):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function el(t,e,n,r,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(o){case"bigint":case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case m_:case Cq:a=!0;break;case FC:return a=t._init,el(a(t._payload),e,n,r,i)}}if(a)return i=i(t),a=r===""?"."+f_(t,0):r,jC(i)?(n="",a!=null&&(n=a.replace(UC,"$&/")+"/"),el(i,e,n,"",function(c){return c})):i!=null&&(y_(i)&&(i=Fq(i,n+(i.key==null||t&&t.key===i.key?"":(""+i.key).replace(UC,"$&/")+"/")+a)),e.push(i)),1;a=0;var s=r===""?".":r+":";if(jC(t))for(var l=0;l<t.length;l++)r=t[l],o=s+f_(r,l),a+=el(r,e,n,o,i);else if(l=qq(t),typeof l=="function")for(t=l.call(t),l=0;!(r=t.next()).done;)r=r.value,o=s+f_(r,l++),a+=el(r,e,n,o,i);else if(o==="object"){if(typeof t.then=="function")return el(Hq(t),e,n,r,i);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return a}function ap(t,e,n){if(t==null)return t;var r=[],i=0;return el(t,r,"","",function(o){return e.call(n,o,i++)}),r}function Vq(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var qC=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Zq={map:ap,forEach:function(t,e,n){ap(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return ap(t,function(){e++}),e},toArray:function(t){return ap(t,function(e){return e})||[]},only:function(t){if(!y_(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};xe.Activity=Uq;xe.Children=Zq;xe.Component=tl;xe.Fragment=Iq;xe.Profiler=Oq;xe.PureComponent=g_;xe.StrictMode=Pq;xe.Suspense=Lq;xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ct;xe.__COMPILER_RUNTIME={__proto__:null,c:function(t){return ct.H.useMemoCache(t)}};xe.cache=function(t){return function(){return t.apply(null,arguments)}};xe.cacheSignal=function(){return null};xe.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var r=HC({},t.props),i=t.key;if(e!=null)for(o in e.key!==void 0&&(i=""+e.key),e)!GC.call(e,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&e.ref===void 0||(r[o]=e[o]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var a=Array(o),s=0;s<o;s++)a[s]=arguments[s+2];r.children=a}return b_(t.type,i,r)};xe.createContext=function(t){return t={$$typeof:Mq,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Nq,_context:t},t};xe.createElement=function(t,e,n){var r,i={},o=null;if(e!=null)for(r in e.key!==void 0&&(o=""+e.key),e)GC.call(e,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];i.children=s}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return b_(t,o,i)};xe.createRef=function(){return{current:null}};xe.forwardRef=function(t){return{$$typeof:Dq,render:t}};xe.isValidElement=y_;xe.lazy=function(t){return{$$typeof:FC,_payload:{_status:-1,_result:t},_init:Vq}};xe.memo=function(t,e){return{$$typeof:jq,type:t,compare:e===void 0?null:e}};xe.startTransition=function(t){var e=ct.T,n={};ct.T=n;try{var r=t(),i=ct.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(p_,qC)}catch(o){qC(o)}finally{e!==null&&n.types!==null&&(e.types=n.types),ct.T=e}};xe.unstable_useCacheRefresh=function(){return ct.H.useCacheRefresh()};xe.use=function(t){return ct.H.use(t)};xe.useActionState=function(t,e,n){return ct.H.useActionState(t,e,n)};xe.useCallback=function(t,e){return ct.H.useCallback(t,e)};xe.useContext=function(t){return ct.H.useContext(t)};xe.useDebugValue=function(){};xe.useDeferredValue=function(t,e){return ct.H.useDeferredValue(t,e)};xe.useEffect=function(t,e){return ct.H.useEffect(t,e)};xe.useEffectEvent=function(t){return ct.H.useEffectEvent(t)};xe.useId=function(){return ct.H.useId()};xe.useImperativeHandle=function(t,e,n){return ct.H.useImperativeHandle(t,e,n)};xe.useInsertionEffect=function(t,e){return ct.H.useInsertionEffect(t,e)};xe.useLayoutEffect=function(t,e){return ct.H.useLayoutEffect(t,e)};xe.useMemo=function(t,e){return ct.H.useMemo(t,e)};xe.useOptimistic=function(t,e){return ct.H.useOptimistic(t,e)};xe.useReducer=function(t,e,n){return ct.H.useReducer(t,e,n)};xe.useRef=function(t){return ct.H.useRef(t)};xe.useState=function(t){return ct.H.useState(t)};xe.useSyncExternalStore=function(t,e,n){return ct.H.useSyncExternalStore(t,e,n)};xe.useTransition=function(){return ct.H.useTransition()};xe.version="19.2.7"});var oi=yr((LY,YC)=>{"use strict";YC.exports=KC()});var o1=yr(ft=>{"use strict";function x_(t,e){var n=t.length;t.push(e);e:for(;0<n;){var r=n-1>>>1,i=t[r];if(0<sp(i,e))t[r]=e,t[n]=i,n=r;else break e}}function Sr(t){return t.length===0?null:t[0]}function cp(t){if(t.length===0)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;e:for(var r=0,i=t.length,o=i>>>1;r<o;){var a=2*(r+1)-1,s=t[a],l=a+1,c=t[l];if(0>sp(s,n))l<i&&0>sp(c,s)?(t[r]=c,t[l]=n,r=l):(t[r]=s,t[a]=n,r=a);else if(l<i&&0>sp(c,n))t[r]=c,t[l]=n,r=l;else break e}}return e}function sp(t,e){var n=t.sortIndex-e.sortIndex;return n!==0?n:t.id-e.id}ft.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(JC=performance,ft.unstable_now=function(){return JC.now()}):(S_=Date,XC=S_.now(),ft.unstable_now=function(){return S_.now()-XC});var JC,S_,XC,Gr=[],Ro=[],Gq=1,Ai=null,pn=3,z_=!1,xu=!1,zu=!1,T_=!1,e1=typeof setTimeout=="function"?setTimeout:null,t1=typeof clearTimeout=="function"?clearTimeout:null,WC=typeof setImmediate<"u"?setImmediate:null;function lp(t){for(var e=Sr(Ro);e!==null;){if(e.callback===null)cp(Ro);else if(e.startTime<=t)cp(Ro),e.sortIndex=e.expirationTime,x_(Gr,e);else break;e=Sr(Ro)}}function A_(t){if(zu=!1,lp(t),!xu)if(Sr(Gr)!==null)xu=!0,il||(il=!0,nl());else{var e=Sr(Ro);e!==null&&E_(A_,e.startTime-t)}}var il=!1,Tu=-1,n1=5,i1=-1;function r1(){return T_?!0:!(ft.unstable_now()-i1<n1)}function __(){if(T_=!1,il){var t=ft.unstable_now();i1=t;var e=!0;try{e:{xu=!1,zu&&(zu=!1,t1(Tu),Tu=-1),z_=!0;var n=pn;try{t:{for(lp(t),Ai=Sr(Gr);Ai!==null&&!(Ai.expirationTime>t&&r1());){var r=Ai.callback;if(typeof r=="function"){Ai.callback=null,pn=Ai.priorityLevel;var i=r(Ai.expirationTime<=t);if(t=ft.unstable_now(),typeof i=="function"){Ai.callback=i,lp(t),e=!0;break t}Ai===Sr(Gr)&&cp(Gr),lp(t)}else cp(Gr);Ai=Sr(Gr)}if(Ai!==null)e=!0;else{var o=Sr(Ro);o!==null&&E_(A_,o.startTime-t),e=!1}}break e}finally{Ai=null,pn=n,z_=!1}e=void 0}}finally{e?nl():il=!1}}}var nl;typeof WC=="function"?nl=function(){WC(__)}:typeof MessageChannel<"u"?(w_=new MessageChannel,QC=w_.port2,w_.port1.onmessage=__,nl=function(){QC.postMessage(null)}):nl=function(){e1(__,0)};var w_,QC;function E_(t,e){Tu=e1(function(){t(ft.unstable_now())},e)}ft.unstable_IdlePriority=5;ft.unstable_ImmediatePriority=1;ft.unstable_LowPriority=4;ft.unstable_NormalPriority=3;ft.unstable_Profiling=null;ft.unstable_UserBlockingPriority=2;ft.unstable_cancelCallback=function(t){t.callback=null};ft.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):n1=0<t?Math.floor(1e3/t):5};ft.unstable_getCurrentPriorityLevel=function(){return pn};ft.unstable_next=function(t){switch(pn){case 1:case 2:case 3:var e=3;break;default:e=pn}var n=pn;pn=e;try{return t()}finally{pn=n}};ft.unstable_requestPaint=function(){T_=!0};ft.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=pn;pn=t;try{return e()}finally{pn=n}};ft.unstable_scheduleCallback=function(t,e,n){var r=ft.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,t){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,t={id:Gq++,callback:e,priorityLevel:t,startTime:n,expirationTime:i,sortIndex:-1},n>r?(t.sortIndex=n,x_(Ro,t),Sr(Gr)===null&&t===Sr(Ro)&&(zu?(t1(Tu),Tu=-1):zu=!0,E_(A_,n-r))):(t.sortIndex=i,x_(Gr,t),xu||z_||(xu=!0,il||(il=!0,nl()))),t};ft.unstable_shouldYield=r1;ft.unstable_wrapCallback=function(t){var e=pn;return function(){var n=pn;pn=e;try{return t.apply(this,arguments)}finally{pn=n}}}});var s1=yr((UY,a1)=>{"use strict";a1.exports=o1()});var c1=yr(xn=>{"use strict";var Kq=oi();function l1(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Co(){}var wn={d:{f:Co,r:function(){throw Error(l1(522))},D:Co,C:Co,L:Co,m:Co,X:Co,S:Co,M:Co},p:0,findDOMNode:null},Yq=Symbol.for("react.portal");function Jq(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yq,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}var Au=Kq.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function up(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}xn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=wn;xn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(l1(299));return Jq(t,e,null,n)};xn.flushSync=function(t){var e=Au.T,n=wn.p;try{if(Au.T=null,wn.p=2,t)return t()}finally{Au.T=e,wn.p=n,wn.d.f()}};xn.preconnect=function(t,e){typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,wn.d.C(t,e))};xn.prefetchDNS=function(t){typeof t=="string"&&wn.d.D(t)};xn.preinit=function(t,e){if(typeof t=="string"&&e&&typeof e.as=="string"){var n=e.as,r=up(n,e.crossOrigin),i=typeof e.integrity=="string"?e.integrity:void 0,o=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;n==="style"?wn.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n==="script"&&wn.d.X(t,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};xn.preinitModule=function(t,e){if(typeof t=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var n=up(e.as,e.crossOrigin);wn.d.M(t,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&wn.d.M(t)};xn.preload=function(t,e){if(typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var n=e.as,r=up(n,e.crossOrigin);wn.d.L(t,n,{crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};xn.preloadModule=function(t,e){if(typeof t=="string")if(e){var n=up(e.as,e.crossOrigin);wn.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else wn.d.m(t)};xn.requestFormReset=function(t){wn.d.r(t)};xn.unstable_batchedUpdates=function(t,e){return t(e)};xn.useFormState=function(t,e,n){return Au.H.useFormState(t,e,n)};xn.useFormStatus=function(){return Au.H.useHostTransitionStatus()};xn.version="19.2.7"});var h1=yr((FY,d1)=>{"use strict";function u1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u1)}catch(t){console.error(t)}}u1(),d1.exports=c1()});var zN=yr(Nm=>{"use strict";var Ft=s1(),LI=oi(),Xq=h1();function j(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function jI(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function hd(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function UI(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function qI(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function f1(t){if(hd(t)!==t)throw Error(j(188))}function Wq(t){var e=t.alternate;if(!e){if(e=hd(t),e===null)throw Error(j(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f1(i),t;if(o===r)return f1(i),e;o=o.sibling}throw Error(j(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(j(189))}}if(n.alternate!==r)throw Error(j(190))}if(n.tag!==3)throw Error(j(188));return n.stateNode.current===n?t:e}function FI(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=FI(t),e!==null)return e;t=t.sibling}return null}var ht=Object.assign,Qq=Symbol.for("react.element"),dp=Symbol.for("react.transitional.element"),Ou=Symbol.for("react.portal"),cl=Symbol.for("react.fragment"),BI=Symbol.for("react.strict_mode"),s0=Symbol.for("react.profiler"),HI=Symbol.for("react.consumer"),to=Symbol.for("react.context"),nw=Symbol.for("react.forward_ref"),l0=Symbol.for("react.suspense"),c0=Symbol.for("react.suspense_list"),iw=Symbol.for("react.memo"),Io=Symbol.for("react.lazy");Symbol.for("react.scope");var u0=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var eF=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var p1=Symbol.iterator;function Eu(t){return t===null||typeof t!="object"?null:(t=p1&&t[p1]||t["@@iterator"],typeof t=="function"?t:null)}var tF=Symbol.for("react.client.reference");function d0(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===tF?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case cl:return"Fragment";case s0:return"Profiler";case BI:return"StrictMode";case l0:return"Suspense";case c0:return"SuspenseList";case u0:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case Ou:return"Portal";case to:return t.displayName||"Context";case HI:return(t._context.displayName||"Context")+".Consumer";case nw:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case iw:return e=t.displayName||null,e!==null?e:d0(t.type)||"Memo";case Io:e=t._payload,t=t._init;try{return d0(t(e))}catch{}}return null}var Nu=Array.isArray,ve=LI.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ze=Xq.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ga={pending:!1,data:null,method:null,action:null},h0=[],ul=-1;function Tr(t){return{current:t}}function Yt(t){0>ul||(t.current=h0[ul],h0[ul]=null,ul--)}function ot(t,e){ul++,h0[ul]=t.current,t.current=e}var zr=Tr(null),Wu=Tr(null),Bo=Tr(null),Hp=Tr(null);function Vp(t,e){switch(ot(Bo,e),ot(Wu,t),ot(zr,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?_I(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=_I(e),t=uN(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Yt(zr),ot(zr,t)}function $l(){Yt(zr),Yt(Wu),Yt(Bo)}function f0(t){t.memoizedState!==null&&ot(Hp,t);var e=zr.current,n=uN(e,t.type);e!==n&&(ot(Wu,t),ot(zr,n))}function Zp(t){Wu.current===t&&(Yt(zr),Yt(Wu)),Hp.current===t&&(Yt(Hp),cd._currentValue=Ga)}var $_,m1;function Ba(t){if($_===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);$_=e&&e[1]||"",m1=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+$_+t+m1}var k_=!1;function R_(t,e){if(!t||k_)return"";k_=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(e){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(f){var h=f}Reflect.construct(t,[],d)}else{try{d.call()}catch(f){h=f}t.call(d.prototype)}}else{try{throw Error()}catch(f){h=f}(d=t())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(f){if(f&&h&&typeof f.stack=="string")return[f.stack,h.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),a=o[0],s=o[1];if(a&&s){var l=a.split(`
`),c=s.split(`
`);for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===c.length)for(r=l.length-1,i=c.length-1;1<=r&&0<=i&&l[r]!==c[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==c[i]){if(r!==1||i!==1)do if(r--,i--,0>i||l[r]!==c[i]){var u=`
`+l[r].replace(" at new "," at ");return t.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",t.displayName)),u}while(1<=r&&0<=i);break}}}finally{k_=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Ba(n):""}function nF(t,e){switch(t.tag){case 26:case 27:case 5:return Ba(t.type);case 16:return Ba("Lazy");case 13:return t.child!==e&&e!==null?Ba("Suspense Fallback"):Ba("Suspense");case 19:return Ba("SuspenseList");case 0:case 15:return R_(t.type,!1);case 11:return R_(t.type.render,!1);case 1:return R_(t.type,!0);case 31:return Ba("Activity");default:return""}}function g1(t){try{var e="",n=null;do e+=nF(t,n),n=t,t=t.return;while(t);return e}catch(r){return`
Error generating stack: `+r.message+`
`+r.stack}}var p0=Object.prototype.hasOwnProperty,rw=Ft.unstable_scheduleCallback,C_=Ft.unstable_cancelCallback,iF=Ft.unstable_shouldYield,rF=Ft.unstable_requestPaint,ui=Ft.unstable_now,oF=Ft.unstable_getCurrentPriorityLevel,VI=Ft.unstable_ImmediatePriority,ZI=Ft.unstable_UserBlockingPriority,Gp=Ft.unstable_NormalPriority,aF=Ft.unstable_LowPriority,GI=Ft.unstable_IdlePriority,sF=Ft.log,lF=Ft.unstable_setDisableYieldValue,fd=null,di=null;function Lo(t){if(typeof sF=="function"&&lF(t),di&&typeof di.setStrictMode=="function")try{di.setStrictMode(fd,t)}catch{}}var hi=Math.clz32?Math.clz32:dF,cF=Math.log,uF=Math.LN2;function dF(t){return t>>>=0,t===0?32:31-(cF(t)/uF|0)|0}var hp=256,fp=262144,pp=4194304;function Ha(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ym(t,e,n){var r=t.pendingLanes;if(r===0)return 0;var i=0,o=t.suspendedLanes,a=t.pingedLanes;t=t.warmLanes;var s=r&134217727;return s!==0?(r=s&~o,r!==0?i=Ha(r):(a&=s,a!==0?i=Ha(a):n||(n=s&~t,n!==0&&(i=Ha(n))))):(s=r&~o,s!==0?i=Ha(s):a!==0?i=Ha(a):n||(n=r&~t,n!==0&&(i=Ha(n)))),i===0?0:e!==0&&e!==i&&(e&o)===0&&(o=i&-i,n=e&-e,o>=n||o===32&&(n&4194048)!==0)?e:i}function pd(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function hF(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function KI(){var t=pp;return pp<<=1,(pp&62914560)===0&&(pp=4194304),t}function I_(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function md(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function fF(t,e,n,r,i,o){var a=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var s=t.entanglements,l=t.expirationTimes,c=t.hiddenUpdates;for(n=a&~n;0<n;){var u=31-hi(n),d=1<<u;s[u]=0,l[u]=-1;var h=c[u];if(h!==null)for(c[u]=null,u=0;u<h.length;u++){var f=h[u];f!==null&&(f.lane&=-536870913)}n&=~d}r!==0&&YI(t,r,0),o!==0&&i===0&&t.tag!==0&&(t.suspendedLanes|=o&~(a&~e))}function YI(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var r=31-hi(e);t.entangledLanes|=e,t.entanglements[r]=t.entanglements[r]|1073741824|n&261930}function JI(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-hi(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}function XI(t,e){var n=e&-e;return n=(n&42)!==0?1:ow(n),(n&(t.suspendedLanes|e))!==0?0:n}function ow(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function aw(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function WI(){var t=Ze.p;return t!==0?t:(t=window.event,t===void 0?32:_N(t.type))}function v1(t,e){var n=Ze.p;try{return Ze.p=t,e()}finally{Ze.p=n}}var na=Math.random().toString(36).slice(2),tn="__reactFiber$"+na,Bn="__reactProps$"+na,jl="__reactContainer$"+na,m0="__reactEvents$"+na,pF="__reactListeners$"+na,mF="__reactHandles$"+na,b1="__reactResources$"+na,gd="__reactMarker$"+na;function sw(t){delete t[tn],delete t[Bn],delete t[m0],delete t[pF],delete t[mF]}function dl(t){var e=t[tn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[jl]||n[tn]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=AI(t);t!==null;){if(n=t[tn])return n;t=AI(t)}return e}t=n,n=t.parentNode}return null}function Ul(t){if(t=t[tn]||t[jl]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Mu(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(j(33))}function _l(t){var e=t[b1];return e||(e=t[b1]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Kt(t){t[gd]=!0}var QI=new Set,eP={};function is(t,e){kl(t,e),kl(t+"Capture",e)}function kl(t,e){for(eP[t]=e,t=0;t<e.length;t++)QI.add(e[t])}var gF=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),y1={},S1={};function vF(t){return p0.call(S1,t)?!0:p0.call(y1,t)?!1:gF.test(t)?S1[t]=!0:(y1[t]=!0,!1)}function kp(t,e,n){if(vF(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var r=e.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function mp(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Kr(t,e,n,r){if(r===null)t.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+r)}}function $i(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function tP(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function bF(t,e,n){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function g0(t){if(!t._valueTracker){var e=tP(t)?"checked":"value";t._valueTracker=bF(t,e,""+t[e])}}function nP(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=tP(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Kp(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var yF=/[\n"\\]/g;function Ci(t){return t.replace(yF,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function v0(t,e,n,r,i,o,a,s){t.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?t.type=a:t.removeAttribute("type"),e!=null?a==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+$i(e)):t.value!==""+$i(e)&&(t.value=""+$i(e)):a!=="submit"&&a!=="reset"||t.removeAttribute("value"),e!=null?b0(t,a,$i(e)):n!=null?b0(t,a,$i(n)):r!=null&&t.removeAttribute("value"),i==null&&o!=null&&(t.defaultChecked=!!o),i!=null&&(t.checked=i&&typeof i!="function"&&typeof i!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?t.name=""+$i(s):t.removeAttribute("name")}function iP(t,e,n,r,i,o,a,s){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(t.type=o),e!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||e!=null)){g0(t);return}n=n!=null?""+$i(n):"",e=e!=null?""+$i(e):n,s||e===t.value||(t.value=e),t.defaultValue=e}r=r??i,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=s?t.checked:!!r,t.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(t.name=a),g0(t)}function b0(t,e,n){e==="number"&&Kp(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function wl(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+$i(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function rP(t,e,n){if(e!=null&&(e=""+$i(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+$i(n):""}function oP(t,e,n,r){if(e==null){if(r!=null){if(n!=null)throw Error(j(92));if(Nu(r)){if(1<r.length)throw Error(j(93));r=r[0]}n=r}n==null&&(n=""),e=n}n=$i(e),t.defaultValue=n,r=t.textContent,r===n&&r!==""&&r!==null&&(t.value=r),g0(t)}function Rl(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var SF=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function _1(t,e,n){var r=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":r?t.setProperty(e,n):typeof n!="number"||n===0||SF.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function aP(t,e,n){if(e!=null&&typeof e!="object")throw Error(j(62));if(t=t.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||e!=null&&e.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="");for(var i in e)r=e[i],e.hasOwnProperty(i)&&n[i]!==r&&_1(t,i,r)}else for(var o in e)e.hasOwnProperty(o)&&_1(t,o,e[o])}function lw(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _F=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),wF=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Rp(t){return wF.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function no(){}var y0=null;function cw(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var hl=null,xl=null;function w1(t){var e=Ul(t);if(e&&(t=e.stateNode)){var n=t[Bn]||null;e:switch(t=e.stateNode,e.type){case"input":if(v0(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ci(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=r[Bn]||null;if(!i)throw Error(j(90));v0(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(e=0;e<n.length;e++)r=n[e],r.form===t.form&&nP(r)}break e;case"textarea":rP(t,n.value,n.defaultValue);break e;case"select":e=n.value,e!=null&&wl(t,!!n.multiple,e,!1)}}}var P_=!1;function sP(t,e,n){if(P_)return t(e,n);P_=!0;try{var r=t(e);return r}finally{if(P_=!1,(hl!==null||xl!==null)&&(Cm(),hl&&(e=hl,t=xl,xl=hl=null,w1(e),t)))for(e=0;e<t.length;e++)w1(t[e])}}function Qu(t,e){var n=t.stateNode;if(n===null)return null;var r=n[Bn]||null;if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(j(231,e,typeof n));return n}var so=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),S0=!1;if(so)try{rl={},Object.defineProperty(rl,"passive",{get:function(){S0=!0}}),window.addEventListener("test",rl,rl),window.removeEventListener("test",rl,rl)}catch{S0=!1}var rl,jo=null,uw=null,Cp=null;function lP(){if(Cp)return Cp;var t,e=uw,n=e.length,r,i="value"in jo?jo.value:jo.textContent,o=i.length;for(t=0;t<n&&e[t]===i[t];t++);var a=n-t;for(r=1;r<=a&&e[n-r]===i[o-r];r++);return Cp=i.slice(t,1<r?1-r:void 0)}function Ip(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function gp(){return!0}function x1(){return!1}function Hn(t){function e(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(n=t[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?gp:x1,this.isPropagationStopped=x1,this}return ht(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=gp)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=gp)},persist:function(){},isPersistent:gp}),e}var rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sm=Hn(rs),vd=ht({},rs,{view:0,detail:0}),xF=Hn(vd),O_,N_,$u,_m=ht({},vd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:dw,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==$u&&($u&&t.type==="mousemove"?(O_=t.screenX-$u.screenX,N_=t.screenY-$u.screenY):N_=O_=0,$u=t),O_)},movementY:function(t){return"movementY"in t?t.movementY:N_}}),z1=Hn(_m),zF=ht({},_m,{dataTransfer:0}),TF=Hn(zF),AF=ht({},vd,{relatedTarget:0}),M_=Hn(AF),EF=ht({},rs,{animationName:0,elapsedTime:0,pseudoElement:0}),$F=Hn(EF),kF=ht({},rs,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),RF=Hn(kF),CF=ht({},rs,{data:0}),T1=Hn(CF),IF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PF={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},OF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function NF(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=OF[t])?!!e[t]:!1}function dw(){return NF}var MF=ht({},vd,{key:function(t){if(t.key){var e=IF[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Ip(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?PF[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:dw,charCode:function(t){return t.type==="keypress"?Ip(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ip(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),DF=Hn(MF),LF=ht({},_m,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A1=Hn(LF),jF=ht({},vd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:dw}),UF=Hn(jF),qF=ht({},rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),FF=Hn(qF),BF=ht({},_m,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),HF=Hn(BF),VF=ht({},rs,{newState:0,oldState:0}),ZF=Hn(VF),GF=[9,13,27,32],hw=so&&"CompositionEvent"in window,ju=null;so&&"documentMode"in document&&(ju=document.documentMode);var KF=so&&"TextEvent"in window&&!ju,cP=so&&(!hw||ju&&8<ju&&11>=ju),E1=" ",$1=!1;function uP(t,e){switch(t){case"keyup":return GF.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dP(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var fl=!1;function YF(t,e){switch(t){case"compositionend":return dP(e);case"keypress":return e.which!==32?null:($1=!0,E1);case"textInput":return t=e.data,t===E1&&$1?null:t;default:return null}}function JF(t,e){if(fl)return t==="compositionend"||!hw&&uP(t,e)?(t=lP(),Cp=uw=jo=null,fl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return cP&&e.locale!=="ko"?null:e.data;default:return null}}var XF={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function k1(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!XF[t.type]:e==="textarea"}function hP(t,e,n,r){hl?xl?xl.push(r):xl=[r]:hl=r,e=hm(e,"onChange"),0<e.length&&(n=new Sm("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Uu=null,ed=null;function WF(t){sN(t,0)}function wm(t){var e=Mu(t);if(nP(e))return t}function R1(t,e){if(t==="change")return e}var fP=!1;so&&(so?(bp="oninput"in document,bp||(D_=document.createElement("div"),D_.setAttribute("oninput","return;"),bp=typeof D_.oninput=="function"),vp=bp):vp=!1,fP=vp&&(!document.documentMode||9<document.documentMode));var vp,bp,D_;function C1(){Uu&&(Uu.detachEvent("onpropertychange",pP),ed=Uu=null)}function pP(t){if(t.propertyName==="value"&&wm(ed)){var e=[];hP(e,ed,t,cw(t)),sP(WF,e)}}function QF(t,e,n){t==="focusin"?(C1(),Uu=e,ed=n,Uu.attachEvent("onpropertychange",pP)):t==="focusout"&&C1()}function eB(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return wm(ed)}function tB(t,e){if(t==="click")return wm(e)}function nB(t,e){if(t==="input"||t==="change")return wm(e)}function iB(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var pi=typeof Object.is=="function"?Object.is:iB;function td(t,e){if(pi(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!p0.call(e,i)||!pi(t[i],e[i]))return!1}return!0}function I1(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function P1(t,e){var n=I1(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=I1(n)}}function mP(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?mP(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function gP(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Kp(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Kp(t.document)}return e}function fw(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var rB=so&&"documentMode"in document&&11>=document.documentMode,pl=null,_0=null,qu=null,w0=!1;function O1(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;w0||pl==null||pl!==Kp(r)||(r=pl,"selectionStart"in r&&fw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qu&&td(qu,r)||(qu=r,r=hm(_0,"onSelect"),0<r.length&&(e=new Sm("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=pl)))}function Fa(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var ml={animationend:Fa("Animation","AnimationEnd"),animationiteration:Fa("Animation","AnimationIteration"),animationstart:Fa("Animation","AnimationStart"),transitionrun:Fa("Transition","TransitionRun"),transitionstart:Fa("Transition","TransitionStart"),transitioncancel:Fa("Transition","TransitionCancel"),transitionend:Fa("Transition","TransitionEnd")},L_={},vP={};so&&(vP=document.createElement("div").style,"AnimationEvent"in window||(delete ml.animationend.animation,delete ml.animationiteration.animation,delete ml.animationstart.animation),"TransitionEvent"in window||delete ml.transitionend.transition);function os(t){if(L_[t])return L_[t];if(!ml[t])return t;var e=ml[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in vP)return L_[t]=e[n];return t}var bP=os("animationend"),yP=os("animationiteration"),SP=os("animationstart"),oB=os("transitionrun"),aB=os("transitionstart"),sB=os("transitioncancel"),_P=os("transitionend"),wP=new Map,x0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");x0.push("scrollEnd");function or(t,e){wP.set(t,e),is(e,[t])}var Yp=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ei=[],gl=0,pw=0;function xm(){for(var t=gl,e=pw=gl=0;e<t;){var n=Ei[e];Ei[e++]=null;var r=Ei[e];Ei[e++]=null;var i=Ei[e];Ei[e++]=null;var o=Ei[e];if(Ei[e++]=null,r!==null&&i!==null){var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}o!==0&&xP(n,i,o)}}function zm(t,e,n,r){Ei[gl++]=t,Ei[gl++]=e,Ei[gl++]=n,Ei[gl++]=r,pw|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function mw(t,e,n,r){return zm(t,e,n,r),Jp(t)}function as(t,e){return zm(t,null,null,e),Jp(t)}function xP(t,e,n){t.lanes|=n;var r=t.alternate;r!==null&&(r.lanes|=n);for(var i=!1,o=t.return;o!==null;)o.childLanes|=n,r=o.alternate,r!==null&&(r.childLanes|=n),o.tag===22&&(t=o.stateNode,t===null||t._visibility&1||(i=!0)),t=o,o=o.return;return t.tag===3?(o=t.stateNode,i&&e!==null&&(i=31-hi(n),t=o.hiddenUpdates,r=t[i],r===null?t[i]=[e]:r.push(e),e.lane=n|536870912),o):null}function Jp(t){if(50<Ju)throw Ju=0,H0=null,Error(j(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var vl={};function lB(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(t,e,n,r){return new lB(t,e,n,r)}function gw(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ro(t,e){var n=t.alternate;return n===null?(n=li(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function zP(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Pp(t,e,n,r,i,o){var a=0;if(r=t,typeof t=="function")gw(t)&&(a=1);else if(typeof t=="string")a=dH(t,n,zr.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case u0:return t=li(31,n,e,i),t.elementType=u0,t.lanes=o,t;case cl:return Ka(n.children,i,o,e);case BI:a=8,i|=24;break;case s0:return t=li(12,n,e,i|2),t.elementType=s0,t.lanes=o,t;case l0:return t=li(13,n,e,i),t.elementType=l0,t.lanes=o,t;case c0:return t=li(19,n,e,i),t.elementType=c0,t.lanes=o,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case to:a=10;break e;case HI:a=9;break e;case nw:a=11;break e;case iw:a=14;break e;case Io:a=16,r=null;break e}a=29,n=Error(j(130,t===null?"null":typeof t,"")),r=null}return e=li(a,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function Ka(t,e,n,r){return t=li(7,t,r,e),t.lanes=n,t}function j_(t,e,n){return t=li(6,t,null,e),t.lanes=n,t}function TP(t){var e=li(18,null,null,0);return e.stateNode=t,e}function U_(t,e,n){return e=li(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var N1=new WeakMap;function Ii(t,e){if(typeof t=="object"&&t!==null){var n=N1.get(t);return n!==void 0?n:(e={value:t,source:e,stack:g1(e)},N1.set(t,e),e)}return{value:t,source:e,stack:g1(e)}}var bl=[],yl=0,Xp=null,nd=0,ki=[],Ri=0,Wo=null,_r=1,wr="";function Qr(t,e){bl[yl++]=nd,bl[yl++]=Xp,Xp=t,nd=e}function AP(t,e,n){ki[Ri++]=_r,ki[Ri++]=wr,ki[Ri++]=Wo,Wo=t;var r=_r;t=wr;var i=32-hi(r)-1;r&=~(1<<i),n+=1;var o=32-hi(e)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,_r=1<<32-hi(e)+i|n<<i|r,wr=o+t}else _r=1<<o|n<<i|r,wr=t}function vw(t){t.return!==null&&(Qr(t,1),AP(t,1,0))}function bw(t){for(;t===Xp;)Xp=bl[--yl],bl[yl]=null,nd=bl[--yl],bl[yl]=null;for(;t===Wo;)Wo=ki[--Ri],ki[Ri]=null,wr=ki[--Ri],ki[Ri]=null,_r=ki[--Ri],ki[Ri]=null}function EP(t,e){ki[Ri++]=_r,ki[Ri++]=wr,ki[Ri++]=Wo,_r=e.id,wr=e.overflow,Wo=t}var nn=null,dt=null,Le=!1,Ho=null,Pi=!1,z0=Error(j(519));function Qo(t){var e=Error(j(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw id(Ii(e,t)),z0}function M1(t){var e=t.stateNode,n=t.type,r=t.memoizedProps;switch(e[tn]=t,e[Bn]=r,n){case"dialog":Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":case"embed":Ne("load",e);break;case"video":case"audio":for(n=0;n<sd.length;n++)Ne(sd[n],e);break;case"source":Ne("error",e);break;case"img":case"image":case"link":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"input":Ne("invalid",e),iP(e,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ne("invalid",e);break;case"textarea":Ne("invalid",e),oP(e,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||r.suppressHydrationWarning===!0||cN(e.textContent,n)?(r.popover!=null&&(Ne("beforetoggle",e),Ne("toggle",e)),r.onScroll!=null&&Ne("scroll",e),r.onScrollEnd!=null&&Ne("scrollend",e),r.onClick!=null&&(e.onclick=no),e=!0):e=!1,e||Qo(t,!0)}function D1(t){for(nn=t.return;nn;)switch(nn.tag){case 5:case 31:case 13:Pi=!1;return;case 27:case 3:Pi=!0;return;default:nn=nn.return}}function ol(t){if(t!==nn)return!1;if(!Le)return D1(t),Le=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Y0(t.type,t.memoizedProps)),n=!n),n&&dt&&Qo(t),D1(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(j(317));dt=TI(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(j(317));dt=TI(t)}else e===27?(e=dt,ia(t.type)?(t=Q0,Q0=null,dt=t):dt=e):dt=nn?Ni(t.stateNode.nextSibling):null;return!0}function Wa(){dt=nn=null,Le=!1}function q_(){var t=Ho;return t!==null&&(qn===null?qn=t:qn.push.apply(qn,t),Ho=null),t}function id(t){Ho===null?Ho=[t]:Ho.push(t)}var T0=Tr(null),ss=null,io=null;function Oo(t,e,n){ot(T0,e._currentValue),e._currentValue=n}function oo(t){t._currentValue=T0.current,Yt(T0)}function A0(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function E0(t,e,n,r){var i=t.child;for(i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){var a=i.child;o=o.firstContext;e:for(;o!==null;){var s=o;o=i;for(var l=0;l<e.length;l++)if(s.context===e[l]){o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),A0(o.return,n,t),r||(a=null);break e}o=s.next}}else if(i.tag===18){if(a=i.return,a===null)throw Error(j(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),A0(a,n,t),a=null}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}}function ql(t,e,n,r){t=null;for(var i=e,o=!1;i!==null;){if(!o){if((i.flags&524288)!==0)o=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var a=i.alternate;if(a===null)throw Error(j(387));if(a=a.memoizedProps,a!==null){var s=i.type;pi(i.pendingProps.value,a.value)||(t!==null?t.push(s):t=[s])}}else if(i===Hp.current){if(a=i.alternate,a===null)throw Error(j(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(t!==null?t.push(cd):t=[cd])}i=i.return}t!==null&&E0(e,t,n,r),e.flags|=262144}function Wp(t){for(t=t.firstContext;t!==null;){if(!pi(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Qa(t){ss=t,io=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function rn(t){return $P(ss,t)}function yp(t,e){return ss===null&&Qa(t),$P(t,e)}function $P(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},io===null){if(t===null)throw Error(j(308));io=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else io=io.next=e;return n}var cB=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,r){t.push(r)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},uB=Ft.unstable_scheduleCallback,dB=Ft.unstable_NormalPriority,It={$$typeof:to,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yw(){return{controller:new cB,data:new Map,refCount:0}}function bd(t){t.refCount--,t.refCount===0&&uB(dB,function(){t.controller.abort()})}var Fu=null,$0=0,Cl=0,zl=null;function hB(t,e){if(Fu===null){var n=Fu=[];$0=0,Cl=Hw(),zl={status:"pending",value:void 0,then:function(r){n.push(r)}}}return $0++,e.then(L1,L1),e}function L1(){if(--$0===0&&Fu!==null){zl!==null&&(zl.status="fulfilled");var t=Fu;Fu=null,Cl=0,zl=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function fB(t,e){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return t.then(function(){r.status="fulfilled",r.value=e;for(var i=0;i<n.length;i++)(0,n[i])(e)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var j1=ve.S;ve.S=function(t,e){FO=ui(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&hB(t,e),j1!==null&&j1(t,e)};var Ya=Tr(null);function Sw(){var t=Ya.current;return t!==null?t:it.pooledCache}function Op(t,e){e===null?ot(Ya,Ya.current):ot(Ya,e.pool)}function kP(){var t=Sw();return t===null?null:{parent:It._currentValue,pool:t}}var Fl=Error(j(460)),_w=Error(j(474)),Tm=Error(j(542)),Qp={then:function(){}};function U1(t){return t=t.status,t==="fulfilled"||t==="rejected"}function RP(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(no,no),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,F1(t),t;default:if(typeof e.status=="string")e.then(no,no);else{if(t=it,t!==null&&100<t.shellSuspendCounter)throw Error(j(482));t=e,t.status="pending",t.then(function(r){if(e.status==="pending"){var i=e;i.status="fulfilled",i.value=r}},function(r){if(e.status==="pending"){var i=e;i.status="rejected",i.reason=r}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,F1(t),t}throw Ja=e,Fl}}function Va(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ja=n,Fl):n}}var Ja=null;function q1(){if(Ja===null)throw Error(j(459));var t=Ja;return Ja=null,t}function F1(t){if(t===Fl||t===Tm)throw Error(j(483))}var Tl=null,rd=0;function Sp(t){var e=rd;return rd+=1,Tl===null&&(Tl=[]),RP(Tl,t,e)}function ku(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function _p(t,e){throw e.$$typeof===Qq?Error(j(525)):(t=Object.prototype.toString.call(e),Error(j(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function CP(t){function e(v,b){if(t){var S=v.deletions;S===null?(v.deletions=[b],v.flags|=16):S.push(b)}}function n(v,b){if(!t)return null;for(;b!==null;)e(v,b),b=b.sibling;return null}function r(v){for(var b=new Map;v!==null;)v.key!==null?b.set(v.key,v):b.set(v.index,v),v=v.sibling;return b}function i(v,b){return v=ro(v,b),v.index=0,v.sibling=null,v}function o(v,b,S){return v.index=S,t?(S=v.alternate,S!==null?(S=S.index,S<b?(v.flags|=67108866,b):S):(v.flags|=67108866,b)):(v.flags|=1048576,b)}function a(v){return t&&v.alternate===null&&(v.flags|=67108866),v}function s(v,b,S,_){return b===null||b.tag!==6?(b=j_(S,v.mode,_),b.return=v,b):(b=i(b,S),b.return=v,b)}function l(v,b,S,_){var T=S.type;return T===cl?u(v,b,S.props.children,_,S.key):b!==null&&(b.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Io&&Va(T)===b.type)?(b=i(b,S.props),ku(b,S),b.return=v,b):(b=Pp(S.type,S.key,S.props,null,v.mode,_),ku(b,S),b.return=v,b)}function c(v,b,S,_){return b===null||b.tag!==4||b.stateNode.containerInfo!==S.containerInfo||b.stateNode.implementation!==S.implementation?(b=U_(S,v.mode,_),b.return=v,b):(b=i(b,S.children||[]),b.return=v,b)}function u(v,b,S,_,T){return b===null||b.tag!==7?(b=Ka(S,v.mode,_,T),b.return=v,b):(b=i(b,S),b.return=v,b)}function d(v,b,S){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return b=j_(""+b,v.mode,S),b.return=v,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case dp:return S=Pp(b.type,b.key,b.props,null,v.mode,S),ku(S,b),S.return=v,S;case Ou:return b=U_(b,v.mode,S),b.return=v,b;case Io:return b=Va(b),d(v,b,S)}if(Nu(b)||Eu(b))return b=Ka(b,v.mode,S,null),b.return=v,b;if(typeof b.then=="function")return d(v,Sp(b),S);if(b.$$typeof===to)return d(v,yp(v,b),S);_p(v,b)}return null}function h(v,b,S,_){var T=b!==null?b.key:null;if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return T!==null?null:s(v,b,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case dp:return S.key===T?l(v,b,S,_):null;case Ou:return S.key===T?c(v,b,S,_):null;case Io:return S=Va(S),h(v,b,S,_)}if(Nu(S)||Eu(S))return T!==null?null:u(v,b,S,_,null);if(typeof S.then=="function")return h(v,b,Sp(S),_);if(S.$$typeof===to)return h(v,b,yp(v,S),_);_p(v,S)}return null}function f(v,b,S,_,T){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return v=v.get(S)||null,s(b,v,""+_,T);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case dp:return v=v.get(_.key===null?S:_.key)||null,l(b,v,_,T);case Ou:return v=v.get(_.key===null?S:_.key)||null,c(b,v,_,T);case Io:return _=Va(_),f(v,b,S,_,T)}if(Nu(_)||Eu(_))return v=v.get(S)||null,u(b,v,_,T,null);if(typeof _.then=="function")return f(v,b,S,Sp(_),T);if(_.$$typeof===to)return f(v,b,S,yp(b,_),T);_p(b,_)}return null}function m(v,b,S,_){for(var T=null,x=null,E=b,C=b=0,I=null;E!==null&&C<S.length;C++){E.index>C?(I=E,E=null):I=E.sibling;var L=h(v,E,S[C],_);if(L===null){E===null&&(E=I);break}t&&E&&L.alternate===null&&e(v,E),b=o(L,b,C),x===null?T=L:x.sibling=L,x=L,E=I}if(C===S.length)return n(v,E),Le&&Qr(v,C),T;if(E===null){for(;C<S.length;C++)E=d(v,S[C],_),E!==null&&(b=o(E,b,C),x===null?T=E:x.sibling=E,x=E);return Le&&Qr(v,C),T}for(E=r(E);C<S.length;C++)I=f(E,v,C,S[C],_),I!==null&&(t&&I.alternate!==null&&E.delete(I.key===null?C:I.key),b=o(I,b,C),x===null?T=I:x.sibling=I,x=I);return t&&E.forEach(function(G){return e(v,G)}),Le&&Qr(v,C),T}function g(v,b,S,_){if(S==null)throw Error(j(151));for(var T=null,x=null,E=b,C=b=0,I=null,L=S.next();E!==null&&!L.done;C++,L=S.next()){E.index>C?(I=E,E=null):I=E.sibling;var G=h(v,E,L.value,_);if(G===null){E===null&&(E=I);break}t&&E&&G.alternate===null&&e(v,E),b=o(G,b,C),x===null?T=G:x.sibling=G,x=G,E=I}if(L.done)return n(v,E),Le&&Qr(v,C),T;if(E===null){for(;!L.done;C++,L=S.next())L=d(v,L.value,_),L!==null&&(b=o(L,b,C),x===null?T=L:x.sibling=L,x=L);return Le&&Qr(v,C),T}for(E=r(E);!L.done;C++,L=S.next())L=f(E,v,C,L.value,_),L!==null&&(t&&L.alternate!==null&&E.delete(L.key===null?C:L.key),b=o(L,b,C),x===null?T=L:x.sibling=L,x=L);return t&&E.forEach(function(ge){return e(v,ge)}),Le&&Qr(v,C),T}function y(v,b,S,_){if(typeof S=="object"&&S!==null&&S.type===cl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case dp:e:{for(var T=S.key;b!==null;){if(b.key===T){if(T=S.type,T===cl){if(b.tag===7){n(v,b.sibling),_=i(b,S.props.children),_.return=v,v=_;break e}}else if(b.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Io&&Va(T)===b.type){n(v,b.sibling),_=i(b,S.props),ku(_,S),_.return=v,v=_;break e}n(v,b);break}else e(v,b);b=b.sibling}S.type===cl?(_=Ka(S.props.children,v.mode,_,S.key),_.return=v,v=_):(_=Pp(S.type,S.key,S.props,null,v.mode,_),ku(_,S),_.return=v,v=_)}return a(v);case Ou:e:{for(T=S.key;b!==null;){if(b.key===T)if(b.tag===4&&b.stateNode.containerInfo===S.containerInfo&&b.stateNode.implementation===S.implementation){n(v,b.sibling),_=i(b,S.children||[]),_.return=v,v=_;break e}else{n(v,b);break}else e(v,b);b=b.sibling}_=U_(S,v.mode,_),_.return=v,v=_}return a(v);case Io:return S=Va(S),y(v,b,S,_)}if(Nu(S))return m(v,b,S,_);if(Eu(S)){if(T=Eu(S),typeof T!="function")throw Error(j(150));return S=T.call(S),g(v,b,S,_)}if(typeof S.then=="function")return y(v,b,Sp(S),_);if(S.$$typeof===to)return y(v,b,yp(v,S),_);_p(v,S)}return typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint"?(S=""+S,b!==null&&b.tag===6?(n(v,b.sibling),_=i(b,S),_.return=v,v=_):(n(v,b),_=j_(S,v.mode,_),_.return=v,v=_),a(v)):n(v,b)}return function(v,b,S,_){try{rd=0;var T=y(v,b,S,_);return Tl=null,T}catch(E){if(E===Fl||E===Tm)throw E;var x=li(29,E,null,v.mode);return x.lanes=_,x.return=v,x}finally{}}}var es=CP(!0),IP=CP(!1),Po=!1;function ww(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function k0(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Vo(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Zo(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(Ve&2)!==0){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,e=Jp(t),xP(t,null,n),e}return zm(t,r,e,n),Jp(t)}function Bu(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,JI(t,n)}}function F_(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var R0=!1;function Hu(){if(R0){var t=zl;if(t!==null)throw t}}function Vu(t,e,n,r){R0=!1;var i=t.updateQueue;Po=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?o=c:a.next=c,a=l;var u=t.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;a=0,u=c=l=null,s=o;do{var h=s.lane&-536870913,f=h!==s.lane;if(f?(De&h)===h:(r&h)===h){h!==0&&h===Cl&&(R0=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var m=t,g=s;h=e;var y=n;switch(g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(y,d,h);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(y,d,h):m,h==null)break e;d=ht({},d,h);break e;case 2:Po=!0}}h=s.callback,h!==null&&(t.flags|=64,f&&(t.flags|=8192),f=i.callbacks,f===null?i.callbacks=[h]:f.push(h))}else f={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=f,l=d):u=u.next=f,a|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,o===null&&(i.shared.lanes=0),ta|=a,t.lanes=a,t.memoizedState=d}}function PP(t,e){if(typeof t!="function")throw Error(j(191,t));t.call(e)}function OP(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)PP(n[t],e)}var Il=Tr(null),em=Tr(0);function B1(t,e){t=ho,ot(em,t),ot(Il,e),ho=t|e.baseLanes}function C0(){ot(em,ho),ot(Il,Il.current)}function xw(){ho=em.current,Yt(Il),Yt(em)}var mi=Tr(null),Oi=null;function No(t){var e=t.alternate;ot($t,$t.current&1),ot(mi,t),Oi===null&&(e===null||Il.current!==null||e.memoizedState!==null)&&(Oi=t)}function I0(t){ot($t,$t.current),ot(mi,t),Oi===null&&(Oi=t)}function NP(t){t.tag===22?(ot($t,$t.current),ot(mi,t),Oi===null&&(Oi=t)):Mo(t)}function Mo(){ot($t,$t.current),ot(mi,mi.current)}function si(t){Yt(mi),Oi===t&&(Oi=null),Yt($t)}var $t=Tr(0);function tm(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||X0(n)||W0(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var lo=0,Te=null,et=null,Rt=null,nm=!1,Al=!1,ts=!1,im=0,od=0,El=null,pB=0;function yt(){throw Error(j(321))}function zw(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!pi(t[n],e[n]))return!1;return!0}function Tw(t,e,n,r,i,o){return lo=o,Te=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ve.H=t===null||t.memoizedState===null?hO:Mw,ts=!1,o=n(r,i),ts=!1,Al&&(o=DP(e,n,r,i)),MP(t),o}function MP(t){ve.H=ad;var e=et!==null&&et.next!==null;if(lo=0,Rt=et=Te=null,nm=!1,od=0,El=null,e)throw Error(j(300));t===null||Pt||(t=t.dependencies,t!==null&&Wp(t)&&(Pt=!0))}function DP(t,e,n,r){Te=t;var i=0;do{if(Al&&(El=null),od=0,Al=!1,25<=i)throw Error(j(301));if(i+=1,Rt=et=null,t.updateQueue!=null){var o=t.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}ve.H=fO,o=e(n,r)}while(Al);return o}function mB(){var t=ve.H,e=t.useState()[0];return e=typeof e.then=="function"?yd(e):e,t=t.useState()[0],(et!==null?et.memoizedState:null)!==t&&(Te.flags|=1024),e}function Aw(){var t=im!==0;return im=0,t}function Ew(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function $w(t){if(nm){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}nm=!1}lo=0,Rt=et=Te=null,Al=!1,od=im=0,El=null}function zn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?Te.memoizedState=Rt=t:Rt=Rt.next=t,Rt}function kt(){if(et===null){var t=Te.alternate;t=t!==null?t.memoizedState:null}else t=et.next;var e=Rt===null?Te.memoizedState:Rt.next;if(e!==null)Rt=e,et=t;else{if(t===null)throw Te.alternate===null?Error(j(467)):Error(j(310));et=t,t={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},Rt===null?Te.memoizedState=Rt=t:Rt=Rt.next=t}return Rt}function Am(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yd(t){var e=od;return od+=1,El===null&&(El=[]),t=RP(El,t,e),e=Te,(Rt===null?e.memoizedState:Rt.next)===null&&(e=e.alternate,ve.H=e===null||e.memoizedState===null?hO:Mw),t}function Em(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return yd(t);if(t.$$typeof===to)return rn(t)}throw Error(j(438,String(t)))}function kw(t){var e=null,n=Te.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var r=Te.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(e={data:r.data.map(function(i){return i.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=Am(),Te.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),r=0;r<t;r++)n[r]=eF;return e.index++,n}function co(t,e){return typeof e=="function"?e(t):e}function Np(t){var e=kt();return Rw(e,et,t)}function Rw(t,e,n){var r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=n;var i=t.baseQueue,o=r.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}e.baseQueue=i=o,r.pending=null}if(o=t.baseState,i===null)t.memoizedState=o;else{e=i.next;var s=a=null,l=null,c=e,u=!1;do{var d=c.lane&-536870913;if(d!==c.lane?(De&d)===d:(lo&d)===d){var h=c.revertLane;if(h===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),d===Cl&&(u=!0);else if((lo&h)===h){c=c.next,h===Cl&&(u=!0);continue}else d={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(s=l=d,a=o):l=l.next=d,Te.lanes|=h,ta|=h;d=c.action,ts&&n(o,d),o=c.hasEagerState?c.eagerState:n(o,d)}else h={lane:d,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(s=l=h,a=o):l=l.next=h,Te.lanes|=d,ta|=d;c=c.next}while(c!==null&&c!==e);if(l===null?a=o:l.next=s,!pi(o,t.memoizedState)&&(Pt=!0,u&&(n=zl,n!==null)))throw n;t.memoizedState=o,t.baseState=a,t.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function B_(t){var e=kt(),n=e.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=t(o,a.action),a=a.next;while(a!==i);pi(o,e.memoizedState)||(Pt=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function LP(t,e,n){var r=Te,i=kt(),o=Le;if(o){if(n===void 0)throw Error(j(407));n=n()}else n=e();var a=!pi((et||i).memoizedState,n);if(a&&(i.memoizedState=n,Pt=!0),i=i.queue,Cw(qP.bind(null,r,i,t),[t]),i.getSnapshot!==e||a||Rt!==null&&Rt.memoizedState.tag&1){if(r.flags|=2048,Pl(9,{destroy:void 0},UP.bind(null,r,i,n,e),null),it===null)throw Error(j(349));o||(lo&127)!==0||jP(r,e,n)}return n}function jP(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Te.updateQueue,e===null?(e=Am(),Te.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function UP(t,e,n,r){e.value=n,e.getSnapshot=r,FP(e)&&BP(t)}function qP(t,e,n){return n(function(){FP(e)&&BP(t)})}function FP(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!pi(t,n)}catch{return!0}}function BP(t){var e=as(t,2);e!==null&&Fn(e,t,2)}function P0(t){var e=zn();if(typeof t=="function"){var n=t;if(t=n(),ts){Lo(!0);try{n()}finally{Lo(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:t},e}function HP(t,e,n,r){return t.baseState=n,Rw(t,et,typeof r=="function"?r:co)}function gB(t,e,n,r,i){if(km(t))throw Error(j(485));if(t=e.action,t!==null){var o={payload:i,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){o.listeners.push(a)}};ve.T!==null?n(!0):o.isTransition=!1,r(o),n=e.pending,n===null?(o.next=e.pending=o,VP(e,o)):(o.next=n.next,e.pending=n.next=o)}}function VP(t,e){var n=e.action,r=e.payload,i=t.state;if(e.isTransition){var o=ve.T,a={};ve.T=a;try{var s=n(i,r),l=ve.S;l!==null&&l(a,s),H1(t,e,s)}catch(c){O0(t,e,c)}finally{o!==null&&a.types!==null&&(o.types=a.types),ve.T=o}}else try{o=n(i,r),H1(t,e,o)}catch(c){O0(t,e,c)}}function H1(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){V1(t,e,r)},function(r){return O0(t,e,r)}):V1(t,e,n)}function V1(t,e,n){e.status="fulfilled",e.value=n,ZP(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,VP(t,n)))}function O0(t,e,n){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do e.status="rejected",e.reason=n,ZP(e),e=e.next;while(e!==r)}t.action=null}function ZP(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function GP(t,e){return e}function Z1(t,e){if(Le){var n=it.formState;if(n!==null){e:{var r=Te;if(Le){if(dt){t:{for(var i=dt,o=Pi;i.nodeType!==8;){if(!o){i=null;break t}if(i=Ni(i.nextSibling),i===null){i=null;break t}}o=i.data,i=o==="F!"||o==="F"?i:null}if(i){dt=Ni(i.nextSibling),r=i.data==="F!";break e}}Qo(r)}r=!1}r&&(e=n[0])}}return n=zn(),n.memoizedState=n.baseState=e,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:GP,lastRenderedState:e},n.queue=r,n=cO.bind(null,Te,r),r.dispatch=n,r=P0(!1),o=Nw.bind(null,Te,!1,r.queue),r=zn(),i={state:e,dispatch:null,action:t,pending:null},r.queue=i,n=gB.bind(null,Te,i,o,n),i.dispatch=n,r.memoizedState=t,[e,n,!1]}function G1(t){var e=kt();return KP(e,et,t)}function KP(t,e,n){if(e=Rw(t,e,GP)[0],t=Np(co)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var r=yd(e)}catch(a){throw a===Fl?Tm:a}else r=e;e=kt();var i=e.queue,o=i.dispatch;return n!==e.memoizedState&&(Te.flags|=2048,Pl(9,{destroy:void 0},vB.bind(null,i,n),null)),[r,o,t]}function vB(t,e){t.action=e}function K1(t){var e=kt(),n=et;if(n!==null)return KP(e,n,t);kt(),e=e.memoizedState,n=kt();var r=n.queue.dispatch;return n.memoizedState=t,[e,r,!1]}function Pl(t,e,n,r){return t={tag:t,create:n,deps:r,inst:e,next:null},e=Te.updateQueue,e===null&&(e=Am(),Te.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function YP(){return kt().memoizedState}function Mp(t,e,n,r){var i=zn();Te.flags|=t,i.memoizedState=Pl(1|e,{destroy:void 0},n,r===void 0?null:r)}function $m(t,e,n,r){var i=kt();r=r===void 0?null:r;var o=i.memoizedState.inst;et!==null&&r!==null&&zw(r,et.memoizedState.deps)?i.memoizedState=Pl(e,o,n,r):(Te.flags|=t,i.memoizedState=Pl(1|e,o,n,r))}function Y1(t,e){Mp(8390656,8,t,e)}function Cw(t,e){$m(2048,8,t,e)}function bB(t){Te.flags|=4;var e=Te.updateQueue;if(e===null)e=Am(),Te.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function JP(t){var e=kt().memoizedState;return bB({ref:e,nextImpl:t}),function(){if((Ve&2)!==0)throw Error(j(440));return e.impl.apply(void 0,arguments)}}function XP(t,e){return $m(4,2,t,e)}function WP(t,e){return $m(4,4,t,e)}function QP(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function eO(t,e,n){n=n!=null?n.concat([t]):null,$m(4,4,QP.bind(null,e,t),n)}function Iw(){}function tO(t,e){var n=kt();e=e===void 0?null:e;var r=n.memoizedState;return e!==null&&zw(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function nO(t,e){var n=kt();e=e===void 0?null:e;var r=n.memoizedState;if(e!==null&&zw(e,r[1]))return r[0];if(r=t(),ts){Lo(!0);try{t()}finally{Lo(!1)}}return n.memoizedState=[r,e],r}function Pw(t,e,n){return n===void 0||(lo&1073741824)!==0&&(De&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=HO(),Te.lanes|=t,ta|=t,n)}function iO(t,e,n,r){return pi(n,e)?n:Il.current!==null?(t=Pw(t,n,r),pi(t,e)||(Pt=!0),t):(lo&42)===0||(lo&1073741824)!==0&&(De&261930)===0?(Pt=!0,t.memoizedState=n):(t=HO(),Te.lanes|=t,ta|=t,e)}function rO(t,e,n,r,i){var o=Ze.p;Ze.p=o!==0&&8>o?o:8;var a=ve.T,s={};ve.T=s,Nw(t,!1,e,n);try{var l=i(),c=ve.S;if(c!==null&&c(s,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=fB(l,r);Zu(t,e,u,fi(t))}else Zu(t,e,r,fi(t))}catch(d){Zu(t,e,{then:function(){},status:"rejected",reason:d},fi())}finally{Ze.p=o,a!==null&&s.types!==null&&(a.types=s.types),ve.T=a}}function yB(){}function N0(t,e,n,r){if(t.tag!==5)throw Error(j(476));var i=oO(t).queue;rO(t,i,e,Ga,n===null?yB:function(){return aO(t),n(r)})}function oO(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Ga,baseState:Ga,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:Ga},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function aO(t){var e=oO(t);e.next===null&&(e=t.alternate.memoizedState),Zu(t,e.next.queue,{},fi())}function Ow(){return rn(cd)}function sO(){return kt().memoizedState}function lO(){return kt().memoizedState}function SB(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=fi();t=Vo(n);var r=Zo(e,t,n);r!==null&&(Fn(r,e,n),Bu(r,e,n)),e={cache:yw()},t.payload=e;return}e=e.return}}function _B(t,e,n){var r=fi();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},km(t)?uO(e,n):(n=mw(t,e,n,r),n!==null&&(Fn(n,t,r),dO(n,e,r)))}function cO(t,e,n){var r=fi();Zu(t,e,n,r)}function Zu(t,e,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(km(t))uO(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var a=e.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,pi(s,a))return zm(t,e,i,0),it===null&&xm(),!1}catch{}finally{}if(n=mw(t,e,i,r),n!==null)return Fn(n,t,r),dO(n,e,r),!0}return!1}function Nw(t,e,n,r){if(r={lane:2,revertLane:Hw(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},km(t)){if(e)throw Error(j(479))}else e=mw(t,n,r,2),e!==null&&Fn(e,t,2)}function km(t){var e=t.alternate;return t===Te||e!==null&&e===Te}function uO(t,e){Al=nm=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function dO(t,e,n){if((n&4194048)!==0){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,JI(t,n)}}var ad={readContext:rn,use:Em,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};ad.useEffectEvent=yt;var hO={readContext:rn,use:Em,useCallback:function(t,e){return zn().memoizedState=[t,e===void 0?null:e],t},useContext:rn,useEffect:Y1,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Mp(4194308,4,QP.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Mp(4194308,4,t,e)},useInsertionEffect:function(t,e){Mp(4,2,t,e)},useMemo:function(t,e){var n=zn();e=e===void 0?null:e;var r=t();if(ts){Lo(!0);try{t()}finally{Lo(!1)}}return n.memoizedState=[r,e],r},useReducer:function(t,e,n){var r=zn();if(n!==void 0){var i=n(e);if(ts){Lo(!0);try{n(e)}finally{Lo(!1)}}}else i=e;return r.memoizedState=r.baseState=i,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},r.queue=t,t=t.dispatch=_B.bind(null,Te,t),[r.memoizedState,t]},useRef:function(t){var e=zn();return t={current:t},e.memoizedState=t},useState:function(t){t=P0(t);var e=t.queue,n=cO.bind(null,Te,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:Iw,useDeferredValue:function(t,e){var n=zn();return Pw(n,t,e)},useTransition:function(){var t=P0(!1);return t=rO.bind(null,Te,t.queue,!0,!1),zn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var r=Te,i=zn();if(Le){if(n===void 0)throw Error(j(407));n=n()}else{if(n=e(),it===null)throw Error(j(349));(De&127)!==0||jP(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,Y1(qP.bind(null,r,o,t),[t]),r.flags|=2048,Pl(9,{destroy:void 0},UP.bind(null,r,o,n,e),null),n},useId:function(){var t=zn(),e=it.identifierPrefix;if(Le){var n=wr,r=_r;n=(r&~(1<<32-hi(r)-1)).toString(32)+n,e="_"+e+"R_"+n,n=im++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=pB++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Ow,useFormState:Z1,useActionState:Z1,useOptimistic:function(t){var e=zn();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=Nw.bind(null,Te,!0,n),n.dispatch=e,[t,e]},useMemoCache:kw,useCacheRefresh:function(){return zn().memoizedState=SB.bind(null,Te)},useEffectEvent:function(t){var e=zn(),n={impl:t};return e.memoizedState=n,function(){if((Ve&2)!==0)throw Error(j(440));return n.impl.apply(void 0,arguments)}}},Mw={readContext:rn,use:Em,useCallback:tO,useContext:rn,useEffect:Cw,useImperativeHandle:eO,useInsertionEffect:XP,useLayoutEffect:WP,useMemo:nO,useReducer:Np,useRef:YP,useState:function(){return Np(co)},useDebugValue:Iw,useDeferredValue:function(t,e){var n=kt();return iO(n,et.memoizedState,t,e)},useTransition:function(){var t=Np(co)[0],e=kt().memoizedState;return[typeof t=="boolean"?t:yd(t),e]},useSyncExternalStore:LP,useId:sO,useHostTransitionStatus:Ow,useFormState:G1,useActionState:G1,useOptimistic:function(t,e){var n=kt();return HP(n,et,t,e)},useMemoCache:kw,useCacheRefresh:lO};Mw.useEffectEvent=JP;var fO={readContext:rn,use:Em,useCallback:tO,useContext:rn,useEffect:Cw,useImperativeHandle:eO,useInsertionEffect:XP,useLayoutEffect:WP,useMemo:nO,useReducer:B_,useRef:YP,useState:function(){return B_(co)},useDebugValue:Iw,useDeferredValue:function(t,e){var n=kt();return et===null?Pw(n,t,e):iO(n,et.memoizedState,t,e)},useTransition:function(){var t=B_(co)[0],e=kt().memoizedState;return[typeof t=="boolean"?t:yd(t),e]},useSyncExternalStore:LP,useId:sO,useHostTransitionStatus:Ow,useFormState:K1,useActionState:K1,useOptimistic:function(t,e){var n=kt();return et!==null?HP(n,et,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:kw,useCacheRefresh:lO};fO.useEffectEvent=JP;function H_(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:ht({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var M0={enqueueSetState:function(t,e,n){t=t._reactInternals;var r=fi(),i=Vo(r);i.payload=e,n!=null&&(i.callback=n),e=Zo(t,i,r),e!==null&&(Fn(e,t,r),Bu(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=fi(),i=Vo(r);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Zo(t,i,r),e!==null&&(Fn(e,t,r),Bu(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=fi(),r=Vo(n);r.tag=2,e!=null&&(r.callback=e),e=Zo(t,r,n),e!==null&&(Fn(e,t,n),Bu(e,t,n))}};function J1(t,e,n,r,i,o,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,a):e.prototype&&e.prototype.isPureReactComponent?!td(n,r)||!td(i,o):!0}function X1(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&M0.enqueueReplaceState(e,e.state,null)}function ns(t,e){var n=e;if("ref"in e){n={};for(var r in e)r!=="ref"&&(n[r]=e[r])}if(t=t.defaultProps){n===e&&(n=ht({},n));for(var i in t)n[i]===void 0&&(n[i]=t[i])}return n}function pO(t){Yp(t)}function mO(t){console.error(t)}function gO(t){Yp(t)}function rm(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(r){setTimeout(function(){throw r})}}function W1(t,e,n){try{var r=t.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function D0(t,e,n){return n=Vo(n),n.tag=3,n.payload={element:null},n.callback=function(){rm(t,e)},n}function vO(t){return t=Vo(t),t.tag=3,t}function bO(t,e,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var o=r.value;t.payload=function(){return i(o)},t.callback=function(){W1(e,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(t.callback=function(){W1(e,n,r),typeof i!="function"&&(Go===null?Go=new Set([this]):Go.add(this));var s=r.stack;this.componentDidCatch(r.value,{componentStack:s!==null?s:""})})}function wB(t,e,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(e=n.alternate,e!==null&&ql(e,n,i,!0),n=mi.current,n!==null){switch(n.tag){case 31:case 13:return Oi===null?cm():n.alternate===null&&St===0&&(St=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Qp?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([r]):e.add(r),t0(t,r,i)),!1;case 22:return n.flags|=65536,r===Qp?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([r]):n.add(r)),t0(t,r,i)),!1}throw Error(j(435,n.tag))}return t0(t,r,i),cm(),!1}if(Le)return e=mi.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=i,r!==z0&&(t=Error(j(422),{cause:r}),id(Ii(t,n)))):(r!==z0&&(e=Error(j(423),{cause:r}),id(Ii(e,n))),t=t.current.alternate,t.flags|=65536,i&=-i,t.lanes|=i,r=Ii(r,n),i=D0(t.stateNode,r,i),F_(t,i),St!==4&&(St=2)),!1;var o=Error(j(520),{cause:r});if(o=Ii(o,n),Yu===null?Yu=[o]:Yu.push(o),St!==4&&(St=2),e===null)return!0;r=Ii(r,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=i&-i,n.lanes|=t,t=D0(n.stateNode,r,t),F_(n,t),!1;case 1:if(e=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Go===null||!Go.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=vO(i),bO(i,t,n,r),F_(n,i),!1}n=n.return}while(n!==null);return!1}var Dw=Error(j(461)),Pt=!1;function en(t,e,n,r){e.child=t===null?IP(e,null,n,r):es(e,t.child,n,r)}function Q1(t,e,n,r,i){n=n.render;var o=e.ref;if("ref"in r){var a={};for(var s in r)s!=="ref"&&(a[s]=r[s])}else a=r;return Qa(e),r=Tw(t,e,n,a,o,i),s=Aw(),t!==null&&!Pt?(Ew(t,e,i),uo(t,e,i)):(Le&&s&&vw(e),e.flags|=1,en(t,e,r,i),e.child)}function eI(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!gw(o)&&o.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=o,yO(t,e,o,r,i)):(t=Pp(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!Lw(t,i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:td,n(a,r)&&t.ref===e.ref)return uo(t,e,i)}return e.flags|=1,t=ro(o,r),t.ref=e.ref,t.return=e,e.child=t}function yO(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(td(o,r)&&t.ref===e.ref)if(Pt=!1,e.pendingProps=r=o,Lw(t,i))(t.flags&131072)!==0&&(Pt=!0);else return e.lanes=t.lanes,uo(t,e,i)}return L0(t,e,n,r,i)}function SO(t,e,n,r){var i=r.children,o=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((e.flags&128)!==0){if(o=o!==null?o.baseLanes|n:n,t!==null){for(r=e.child=t.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~o}else r=0,e.child=null;return tI(t,e,o,n,r)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Op(e,o!==null?o.cachePool:null),o!==null?B1(e,o):C0(),NP(e);else return r=e.lanes=536870912,tI(t,e,o!==null?o.baseLanes|n:n,n,r)}else o!==null?(Op(e,o.cachePool),B1(e,o),Mo(e),e.memoizedState=null):(t!==null&&Op(e,null),C0(),Mo(e));return en(t,e,i,n),e.child}function Du(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function tI(t,e,n,r,i){var o=Sw();return o=o===null?null:{parent:It._currentValue,pool:o},e.memoizedState={baseLanes:n,cachePool:o},t!==null&&Op(e,null),C0(),NP(e),t!==null&&ql(t,e,r,!0),e.childLanes=i,null}function Dp(t,e){return e=om({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function nI(t,e,n){return es(e,t.child,null,n),t=Dp(e,e.pendingProps),t.flags|=2,si(e),e.memoizedState=null,t}function xB(t,e,n){var r=e.pendingProps,i=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Le){if(r.mode==="hidden")return t=Dp(e,r),e.lanes=536870912,Du(null,t);if(I0(e),(t=dt)?(t=hN(t,Pi),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Wo!==null?{id:_r,overflow:wr}:null,retryLane:536870912,hydrationErrors:null},n=TP(t),n.return=e,e.child=n,nn=e,dt=null)):t=null,t===null)throw Qo(e);return e.lanes=536870912,null}return Dp(e,r)}var o=t.memoizedState;if(o!==null){var a=o.dehydrated;if(I0(e),i)if(e.flags&256)e.flags&=-257,e=nI(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(j(558));else if(Pt||ql(t,e,n,!1),i=(n&t.childLanes)!==0,Pt||i){if(r=it,r!==null&&(a=XI(r,n),a!==0&&a!==o.retryLane))throw o.retryLane=a,as(t,a),Fn(r,t,a),Dw;cm(),e=nI(t,e,n)}else t=o.treeContext,dt=Ni(a.nextSibling),nn=e,Le=!0,Ho=null,Pi=!1,t!==null&&EP(e,t),e=Dp(e,r),e.flags|=4096;return e}return t=ro(t.child,{mode:r.mode,children:r.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Lp(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(j(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function L0(t,e,n,r,i){return Qa(e),n=Tw(t,e,n,r,void 0,i),r=Aw(),t!==null&&!Pt?(Ew(t,e,i),uo(t,e,i)):(Le&&r&&vw(e),e.flags|=1,en(t,e,n,i),e.child)}function iI(t,e,n,r,i,o){return Qa(e),e.updateQueue=null,n=DP(e,r,n,i),MP(t),r=Aw(),t!==null&&!Pt?(Ew(t,e,o),uo(t,e,o)):(Le&&r&&vw(e),e.flags|=1,en(t,e,n,o),e.child)}function rI(t,e,n,r,i){if(Qa(e),e.stateNode===null){var o=vl,a=n.contextType;typeof a=="object"&&a!==null&&(o=rn(a)),o=new n(r,o),e.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=M0,e.stateNode=o,o._reactInternals=e,o=e.stateNode,o.props=r,o.state=e.memoizedState,o.refs={},ww(e),a=n.contextType,o.context=typeof a=="object"&&a!==null?rn(a):vl,o.state=e.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(H_(e,n,a,r),o.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(a=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),a!==o.state&&M0.enqueueReplaceState(o,o.state,null),Vu(e,r,o,i),Hu(),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!0}else if(t===null){o=e.stateNode;var s=e.memoizedProps,l=ns(n,s);o.props=l;var c=o.context,u=n.contextType;a=vl,typeof u=="object"&&u!==null&&(a=rn(u));var d=n.getDerivedStateFromProps;u=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function",s=e.pendingProps!==s,u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s||c!==a)&&X1(e,o,r,a),Po=!1;var h=e.memoizedState;o.state=h,Vu(e,r,o,i),Hu(),c=e.memoizedState,s||h!==c||Po?(typeof d=="function"&&(H_(e,n,d,r),c=e.memoizedState),(l=Po||J1(e,n,l,r,h,c,a))?(u||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=c),o.props=r,o.state=c,o.context=a,r=l):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,k0(t,e),a=e.memoizedProps,u=ns(n,a),o.props=u,d=e.pendingProps,h=o.context,c=n.contextType,l=vl,typeof c=="object"&&c!==null&&(l=rn(c)),s=n.getDerivedStateFromProps,(c=typeof s=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&X1(e,o,r,l),Po=!1,h=e.memoizedState,o.state=h,Vu(e,r,o,i),Hu();var f=e.memoizedState;a!==d||h!==f||Po||t!==null&&t.dependencies!==null&&Wp(t.dependencies)?(typeof s=="function"&&(H_(e,n,s,r),f=e.memoizedState),(u=Po||J1(e,n,u,r,h,f,l)||t!==null&&t.dependencies!==null&&Wp(t.dependencies))?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,f,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,f,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=f),o.props=r,o.state=f,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),r=!1)}return o=r,Lp(t,e),r=(e.flags&128)!==0,o||r?(o=e.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:o.render(),e.flags|=1,t!==null&&r?(e.child=es(e,t.child,null,i),e.child=es(e,null,n,i)):en(t,e,n,i),e.memoizedState=o.state,t=e.child):t=uo(t,e,i),t}function oI(t,e,n,r){return Wa(),e.flags|=256,en(t,e,n,r),e.child}var V_={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Z_(t){return{baseLanes:t,cachePool:kP()}}function G_(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=ci),t}function _O(t,e,n){var r=e.pendingProps,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:($t.current&2)!==0),a&&(i=!0,e.flags&=-129),a=(e.flags&32)!==0,e.flags&=-33,t===null){if(Le){if(i?No(e):Mo(e),(t=dt)?(t=hN(t,Pi),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Wo!==null?{id:_r,overflow:wr}:null,retryLane:536870912,hydrationErrors:null},n=TP(t),n.return=e,e.child=n,nn=e,dt=null)):t=null,t===null)throw Qo(e);return W0(t)?e.lanes=32:e.lanes=536870912,null}var s=r.children;return r=r.fallback,i?(Mo(e),i=e.mode,s=om({mode:"hidden",children:s},i),r=Ka(r,i,n,null),s.return=e,r.return=e,s.sibling=r,e.child=s,r=e.child,r.memoizedState=Z_(n),r.childLanes=G_(t,a,n),e.memoizedState=V_,Du(null,r)):(No(e),j0(e,s))}var l=t.memoizedState;if(l!==null&&(s=l.dehydrated,s!==null)){if(o)e.flags&256?(No(e),e.flags&=-257,e=K_(t,e,n)):e.memoizedState!==null?(Mo(e),e.child=t.child,e.flags|=128,e=null):(Mo(e),s=r.fallback,i=e.mode,r=om({mode:"visible",children:r.children},i),s=Ka(s,i,n,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,es(e,t.child,null,n),r=e.child,r.memoizedState=Z_(n),r.childLanes=G_(t,a,n),e.memoizedState=V_,e=Du(null,r));else if(No(e),W0(s)){if(a=s.nextSibling&&s.nextSibling.dataset,a)var c=a.dgst;a=c,r=Error(j(419)),r.stack="",r.digest=a,id({value:r,source:null,stack:null}),e=K_(t,e,n)}else if(Pt||ql(t,e,n,!1),a=(n&t.childLanes)!==0,Pt||a){if(a=it,a!==null&&(r=XI(a,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,as(t,r),Fn(a,t,r),Dw;X0(s)||cm(),e=K_(t,e,n)}else X0(s)?(e.flags|=192,e.child=t.child,e=null):(t=l.treeContext,dt=Ni(s.nextSibling),nn=e,Le=!0,Ho=null,Pi=!1,t!==null&&EP(e,t),e=j0(e,r.children),e.flags|=4096);return e}return i?(Mo(e),s=r.fallback,i=e.mode,l=t.child,c=l.sibling,r=ro(l,{mode:"hidden",children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,c!==null?s=ro(c,s):(s=Ka(s,i,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,Du(null,r),r=e.child,s=t.child.memoizedState,s===null?s=Z_(n):(i=s.cachePool,i!==null?(l=It._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=kP(),s={baseLanes:s.baseLanes|n,cachePool:i}),r.memoizedState=s,r.childLanes=G_(t,a,n),e.memoizedState=V_,Du(t.child,r)):(No(e),n=t.child,t=n.sibling,n=ro(n,{mode:"visible",children:r.children}),n.return=e,n.sibling=null,t!==null&&(a=e.deletions,a===null?(e.deletions=[t],e.flags|=16):a.push(t)),e.child=n,e.memoizedState=null,n)}function j0(t,e){return e=om({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function om(t,e){return t=li(22,t,null,e),t.lanes=0,t}function K_(t,e,n){return es(e,t.child,null,n),t=j0(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function aI(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),A0(t.return,e,n)}function Y_(t,e,n,r,i,o){var a=t.memoizedState;a===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:o}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.treeForkCount=o)}function wO(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;r=r.children;var a=$t.current,s=(a&2)!==0;if(s?(a=a&1|2,e.flags|=128):a&=1,ot($t,a),en(t,e,r,n),r=Le?nd:0,!s&&t!==null&&(t.flags&128)!==0)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&aI(t,n,e);else if(t.tag===19)aI(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&tm(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Y_(e,!1,i,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&tm(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Y_(e,!0,n,null,o,r);break;case"together":Y_(e,!1,null,null,void 0,r);break;default:e.memoizedState=null}return e.child}function uo(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ta|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(ql(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(j(153));if(e.child!==null){for(t=e.child,n=ro(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ro(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Lw(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Wp(t)))}function zB(t,e,n){switch(e.tag){case 3:Vp(e,e.stateNode.containerInfo),Oo(e,It,t.memoizedState.cache),Wa();break;case 27:case 5:f0(e);break;case 4:Vp(e,e.stateNode.containerInfo);break;case 10:Oo(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,I0(e),null;break;case 13:var r=e.memoizedState;if(r!==null)return r.dehydrated!==null?(No(e),e.flags|=128,null):(n&e.child.childLanes)!==0?_O(t,e,n):(No(e),t=uo(t,e,n),t!==null?t.sibling:null);No(e);break;case 19:var i=(t.flags&128)!==0;if(r=(n&e.childLanes)!==0,r||(ql(t,e,n,!1),r=(n&e.childLanes)!==0),i){if(r)return wO(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ot($t,$t.current),r)break;return null;case 22:return e.lanes=0,SO(t,e,n,e.pendingProps);case 24:Oo(e,It,t.memoizedState.cache)}return uo(t,e,n)}function xO(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)Pt=!0;else{if(!Lw(t,n)&&(e.flags&128)===0)return Pt=!1,zB(t,e,n);Pt=(t.flags&131072)!==0}else Pt=!1,Le&&(e.flags&1048576)!==0&&AP(e,nd,e.index);switch(e.lanes=0,e.tag){case 16:e:{var r=e.pendingProps;if(t=Va(e.elementType),e.type=t,typeof t=="function")gw(t)?(r=ns(t,r),e.tag=1,e=rI(null,e,t,r,n)):(e.tag=0,e=L0(null,e,t,r,n));else{if(t!=null){var i=t.$$typeof;if(i===nw){e.tag=11,e=Q1(null,e,t,r,n);break e}else if(i===iw){e.tag=14,e=eI(null,e,t,r,n);break e}}throw e=d0(t)||t,Error(j(306,e,""))}}return e;case 0:return L0(t,e,e.type,e.pendingProps,n);case 1:return r=e.type,i=ns(r,e.pendingProps),rI(t,e,r,i,n);case 3:e:{if(Vp(e,e.stateNode.containerInfo),t===null)throw Error(j(387));r=e.pendingProps;var o=e.memoizedState;i=o.element,k0(t,e),Vu(e,r,null,n);var a=e.memoizedState;if(r=a.cache,Oo(e,It,r),r!==o.cache&&E0(e,[It],n,!0),Hu(),r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){e=oI(t,e,r,n);break e}else if(r!==i){i=Ii(Error(j(424)),e),id(i),e=oI(t,e,r,n);break e}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(dt=Ni(t.firstChild),nn=e,Le=!0,Ho=null,Pi=!0,n=IP(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wa(),r===i){e=uo(t,e,n);break e}en(t,e,r,n)}e=e.child}return e;case 26:return Lp(t,e),t===null?(n=$I(e.type,null,e.pendingProps,null))?e.memoizedState=n:Le||(n=e.type,t=e.pendingProps,r=fm(Bo.current).createElement(n),r[tn]=e,r[Bn]=t,on(r,n,t),Kt(r),e.stateNode=r):e.memoizedState=$I(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return f0(e),t===null&&Le&&(r=e.stateNode=fN(e.type,e.pendingProps,Bo.current),nn=e,Pi=!0,i=dt,ia(e.type)?(Q0=i,dt=Ni(r.firstChild)):dt=i),en(t,e,e.pendingProps.children,n),Lp(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Le&&((i=r=dt)&&(r=WB(r,e.type,e.pendingProps,Pi),r!==null?(e.stateNode=r,nn=e,dt=Ni(r.firstChild),Pi=!1,i=!0):i=!1),i||Qo(e)),f0(e),i=e.type,o=e.pendingProps,a=t!==null?t.memoizedProps:null,r=o.children,Y0(i,o)?r=null:a!==null&&Y0(i,a)&&(e.flags|=32),e.memoizedState!==null&&(i=Tw(t,e,mB,null,null,n),cd._currentValue=i),Lp(t,e),en(t,e,r,n),e.child;case 6:return t===null&&Le&&((t=n=dt)&&(n=QB(n,e.pendingProps,Pi),n!==null?(e.stateNode=n,nn=e,dt=null,t=!0):t=!1),t||Qo(e)),null;case 13:return _O(t,e,n);case 4:return Vp(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=es(e,null,r,n):en(t,e,r,n),e.child;case 11:return Q1(t,e,e.type,e.pendingProps,n);case 7:return en(t,e,e.pendingProps,n),e.child;case 8:return en(t,e,e.pendingProps.children,n),e.child;case 12:return en(t,e,e.pendingProps.children,n),e.child;case 10:return r=e.pendingProps,Oo(e,e.type,r.value),en(t,e,r.children,n),e.child;case 9:return i=e.type._context,r=e.pendingProps.children,Qa(e),i=rn(i),r=r(i),e.flags|=1,en(t,e,r,n),e.child;case 14:return eI(t,e,e.type,e.pendingProps,n);case 15:return yO(t,e,e.type,e.pendingProps,n);case 19:return wO(t,e,n);case 31:return xB(t,e,n);case 22:return SO(t,e,n,e.pendingProps);case 24:return Qa(e),r=rn(It),t===null?(i=Sw(),i===null&&(i=it,o=yw(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),e.memoizedState={parent:r,cache:i},ww(e),Oo(e,It,i)):((t.lanes&n)!==0&&(k0(t,e),Vu(e,null,null,n),Hu()),i=t.memoizedState,o=e.memoizedState,i.parent!==r?(i={parent:r,cache:r},e.memoizedState=i,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=i),Oo(e,It,r)):(r=o.cache,Oo(e,It,r),r!==i.cache&&E0(e,[It],n,!0))),en(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(j(156,e.tag))}function Yr(t){t.flags|=4}function J_(t,e,n,r,i){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(i&335544128)===i)if(t.stateNode.complete)t.flags|=8192;else if(GO())t.flags|=8192;else throw Ja=Qp,_w}else t.flags&=-16777217}function sI(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!gN(e))if(GO())t.flags|=8192;else throw Ja=Qp,_w}function wp(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?KI():536870912,t.lanes|=e,Ol|=e)}function Ru(t,e){if(!Le)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function ut(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function TB(t,e,n){var r=e.pendingProps;switch(bw(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(e),null;case 1:return ut(e),null;case 3:return n=e.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),e.memoizedState.cache!==r&&(e.flags|=2048),oo(It),$l(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(ol(e)?Yr(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,q_())),ut(e),null;case 26:var i=e.type,o=e.memoizedState;return t===null?(Yr(e),o!==null?(ut(e),sI(e,o)):(ut(e),J_(e,i,null,r,n))):o?o!==t.memoizedState?(Yr(e),ut(e),sI(e,o)):(ut(e),e.flags&=-16777217):(t=t.memoizedProps,t!==r&&Yr(e),ut(e),J_(e,i,t,r,n)),null;case 27:if(Zp(e),n=Bo.current,i=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==r&&Yr(e);else{if(!r){if(e.stateNode===null)throw Error(j(166));return ut(e),null}t=zr.current,ol(e)?M1(e,t):(t=fN(i,r,n),e.stateNode=t,Yr(e))}return ut(e),null;case 5:if(Zp(e),i=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==r&&Yr(e);else{if(!r){if(e.stateNode===null)throw Error(j(166));return ut(e),null}if(o=zr.current,ol(e))M1(e,o);else{var a=fm(Bo.current);switch(o){case 1:o=a.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:o=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":o=a.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":o=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":o=a.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is=="string"?a.createElement(i,{is:r.is}):a.createElement(i)}}o[tn]=e,o[Bn]=r;e:for(a=e.child;a!==null;){if(a.tag===5||a.tag===6)o.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break e;for(;a.sibling===null;){if(a.return===null||a.return===e)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}e.stateNode=o;e:switch(on(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Yr(e)}}return ut(e),J_(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==r&&Yr(e);else{if(typeof r!="string"&&e.stateNode===null)throw Error(j(166));if(t=Bo.current,ol(e)){if(t=e.stateNode,n=e.memoizedProps,r=null,i=nn,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}t[tn]=e,t=!!(t.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||cN(t.nodeValue,n)),t||Qo(e,!0)}else t=fm(t).createTextNode(r),t[tn]=e,e.stateNode=t}return ut(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(r=ol(e),n!==null){if(t===null){if(!r)throw Error(j(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(j(557));t[tn]=e}else Wa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ut(e),t=!1}else n=q_(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(si(e),e):(si(e),null);if((e.flags&128)!==0)throw Error(j(558))}return ut(e),null;case 13:if(r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(i=ol(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(j(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(j(317));i[tn]=e}else Wa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ut(e),i=!1}else i=q_(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),i=!0;if(!i)return e.flags&256?(si(e),e):(si(e),null)}return si(e),(e.flags&128)!==0?(e.lanes=n,e):(n=r!==null,t=t!==null&&t.memoizedState!==null,n&&(r=e.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),wp(e,e.updateQueue),ut(e),null);case 4:return $l(),t===null&&Vw(e.stateNode.containerInfo),ut(e),null;case 10:return oo(e.type),ut(e),null;case 19:if(Yt($t),r=e.memoizedState,r===null)return ut(e),null;if(i=(e.flags&128)!==0,o=r.rendering,o===null)if(i)Ru(r,!1);else{if(St!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(o=tm(t),o!==null){for(e.flags|=128,Ru(r,!1),t=o.updateQueue,e.updateQueue=t,wp(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)zP(n,t),n=n.sibling;return ot($t,$t.current&1|2),Le&&Qr(e,r.treeForkCount),e.child}t=t.sibling}r.tail!==null&&ui()>sm&&(e.flags|=128,i=!0,Ru(r,!1),e.lanes=4194304)}else{if(!i)if(t=tm(o),t!==null){if(e.flags|=128,i=!0,t=t.updateQueue,e.updateQueue=t,wp(e,t),Ru(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!Le)return ut(e),null}else 2*ui()-r.renderingStartTime>sm&&n!==536870912&&(e.flags|=128,i=!0,Ru(r,!1),e.lanes=4194304);r.isBackwards?(o.sibling=e.child,e.child=o):(t=r.last,t!==null?t.sibling=o:e.child=o,r.last=o)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=ui(),t.sibling=null,n=$t.current,ot($t,i?n&1|2:n&1),Le&&Qr(e,r.treeForkCount),t):(ut(e),null);case 22:case 23:return si(e),xw(),r=e.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(e.flags|=8192):r&&(e.flags|=8192),r?(n&536870912)!==0&&(e.flags&128)===0&&(ut(e),e.subtreeFlags&6&&(e.flags|=8192)):ut(e),n=e.updateQueue,n!==null&&wp(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),r=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),r!==n&&(e.flags|=2048),t!==null&&Yt(Ya),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),oo(It),ut(e),null;case 25:return null;case 30:return null}throw Error(j(156,e.tag))}function AB(t,e){switch(bw(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return oo(It),$l(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Zp(e),null;case 31:if(e.memoizedState!==null){if(si(e),e.alternate===null)throw Error(j(340));Wa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(si(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(j(340));Wa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Yt($t),null;case 4:return $l(),null;case 10:return oo(e.type),null;case 22:case 23:return si(e),xw(),t!==null&&Yt(Ya),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return oo(It),null;case 25:return null;default:return null}}function zO(t,e){switch(bw(e),e.tag){case 3:oo(It),$l();break;case 26:case 27:case 5:Zp(e);break;case 4:$l();break;case 31:e.memoizedState!==null&&si(e);break;case 13:si(e);break;case 19:Yt($t);break;case 10:oo(e.type);break;case 22:case 23:si(e),xw(),t!==null&&Yt(Ya);break;case 24:oo(It)}}function Sd(t,e){try{var n=e.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&t)===t){r=void 0;var o=n.create,a=n.inst;r=o(),a.destroy=r}n=n.next}while(n!==i)}}catch(s){Xe(e,e.return,s)}}function ea(t,e,n){try{var r=e.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var o=i.next;r=o;do{if((r.tag&t)===t){var a=r.inst,s=a.destroy;if(s!==void 0){a.destroy=void 0,i=e;var l=n,c=s;try{c()}catch(u){Xe(i,l,u)}}}r=r.next}while(r!==o)}}catch(u){Xe(e,e.return,u)}}function TO(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{OP(e,n)}catch(r){Xe(t,t.return,r)}}}function AO(t,e,n){n.props=ns(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(r){Xe(t,e,r)}}function Gu(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:r=t.stateNode;break;default:r=t.stateNode}typeof n=="function"?t.refCleanup=n(r):n.current=r}}catch(i){Xe(t,e,i)}}function xr(t,e){var n=t.ref,r=t.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){Xe(t,e,i)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Xe(t,e,i)}else n.current=null}function EO(t){var e=t.type,n=t.memoizedProps,r=t.stateNode;try{e:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){Xe(t,t.return,i)}}function X_(t,e,n){try{var r=t.stateNode;ZB(r,t.type,n,e),r[Bn]=e}catch(i){Xe(t,t.return,i)}}function $O(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ia(t.type)||t.tag===4}function W_(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||$O(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&ia(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function U0(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=no));else if(r!==4&&(r===27&&ia(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(U0(t,e,n),t=t.sibling;t!==null;)U0(t,e,n),t=t.sibling}function am(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(r===27&&ia(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(am(t,e,n),t=t.sibling;t!==null;)am(t,e,n),t=t.sibling}function kO(t){var e=t.stateNode,n=t.memoizedProps;try{for(var r=t.type,i=e.attributes;i.length;)e.removeAttributeNode(i[0]);on(e,r,n),e[tn]=t,e[Bn]=n}catch(o){Xe(t,t.return,o)}}var eo=!1,Ct=!1,Q_=!1,lI=typeof WeakSet=="function"?WeakSet:Set,Gt=null;function EB(t,e){if(t=t.containerInfo,G0=vm,t=gP(t),fw(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=t,h=null;t:for(;;){for(var f;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(f=d.firstChild)!==null;)h=d,d=f;for(;;){if(d===t)break t;if(h===n&&++c===i&&(s=a),h===o&&++u===r&&(l=a),(f=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=f}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(K0={focusedElem:t,selectionRange:n},vm=!1,Gt=e;Gt!==null;)if(e=Gt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Gt=t;else for(;Gt!==null;){switch(e=Gt,o=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)i=t[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&o!==null){t=void 0,n=e,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var m=ns(n.type,i);t=r.getSnapshotBeforeUpdate(m,o),r.__reactInternalSnapshotBeforeUpdate=t}catch(g){Xe(n,n.return,g)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)J0(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":J0(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(j(163))}if(t=e.sibling,t!==null){t.return=e.return,Gt=t;break}Gt=e.return}}function RO(t,e,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Xr(t,n),r&4&&Sd(5,n);break;case 1:if(Xr(t,n),r&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(a){Xe(n,n.return,a)}else{var i=ns(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(i,e,t.__reactInternalSnapshotBeforeUpdate)}catch(a){Xe(n,n.return,a)}}r&64&&TO(n),r&512&&Gu(n,n.return);break;case 3:if(Xr(t,n),r&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{OP(t,e)}catch(a){Xe(n,n.return,a)}}break;case 27:e===null&&r&4&&kO(n);case 26:case 5:Xr(t,n),e===null&&r&4&&EO(n),r&512&&Gu(n,n.return);break;case 12:Xr(t,n);break;case 31:Xr(t,n),r&4&&PO(t,n);break;case 13:Xr(t,n),r&4&&OO(t,n),r&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=MB.bind(null,n),eH(t,n))));break;case 22:if(r=n.memoizedState!==null||eo,!r){e=e!==null&&e.memoizedState!==null||Ct,i=eo;var o=Ct;eo=r,(Ct=e)&&!o?Wr(t,n,(n.subtreeFlags&8772)!==0):Xr(t,n),eo=i,Ct=o}break;case 30:break;default:Xr(t,n)}}function CO(t){var e=t.alternate;e!==null&&(t.alternate=null,CO(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&sw(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var pt=null,Un=!1;function Jr(t,e,n){for(n=n.child;n!==null;)IO(t,e,n),n=n.sibling}function IO(t,e,n){if(di&&typeof di.onCommitFiberUnmount=="function")try{di.onCommitFiberUnmount(fd,n)}catch{}switch(n.tag){case 26:Ct||xr(n,e),Jr(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ct||xr(n,e);var r=pt,i=Un;ia(n.type)&&(pt=n.stateNode,Un=!1),Jr(t,e,n),Xu(n.stateNode),pt=r,Un=i;break;case 5:Ct||xr(n,e);case 6:if(r=pt,i=Un,pt=null,Jr(t,e,n),pt=r,Un=i,pt!==null)if(Un)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(n.stateNode)}catch(o){Xe(n,e,o)}else try{pt.removeChild(n.stateNode)}catch(o){Xe(n,e,o)}break;case 18:pt!==null&&(Un?(t=pt,xI(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Ll(t)):xI(pt,n.stateNode));break;case 4:r=pt,i=Un,pt=n.stateNode.containerInfo,Un=!0,Jr(t,e,n),pt=r,Un=i;break;case 0:case 11:case 14:case 15:ea(2,n,e),Ct||ea(4,n,e),Jr(t,e,n);break;case 1:Ct||(xr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"&&AO(n,e,r)),Jr(t,e,n);break;case 21:Jr(t,e,n);break;case 22:Ct=(r=Ct)||n.memoizedState!==null,Jr(t,e,n),Ct=r;break;default:Jr(t,e,n)}}function PO(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ll(t)}catch(n){Xe(e,e.return,n)}}}function OO(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ll(t)}catch(n){Xe(e,e.return,n)}}function $B(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new lI),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new lI),e;default:throw Error(j(435,t.tag))}}function xp(t,e){var n=$B(t);e.forEach(function(r){if(!n.has(r)){n.add(r);var i=DB.bind(null,t,r);r.then(i,i)}})}function Ln(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=t,a=e,s=a;e:for(;s!==null;){switch(s.tag){case 27:if(ia(s.type)){pt=s.stateNode,Un=!1;break e}break;case 5:pt=s.stateNode,Un=!1;break e;case 3:case 4:pt=s.stateNode.containerInfo,Un=!0;break e}s=s.return}if(pt===null)throw Error(j(160));IO(o,a,i),pt=null,Un=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)NO(e,t),e=e.sibling}var rr=null;function NO(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ln(e,t),jn(t),r&4&&(ea(3,t,t.return),Sd(3,t),ea(5,t,t.return));break;case 1:Ln(e,t),jn(t),r&512&&(Ct||n===null||xr(n,n.return)),r&64&&eo&&(t=t.updateQueue,t!==null&&(r=t.callbacks,r!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=rr;if(Ln(e,t),jn(t),r&512&&(Ct||n===null||xr(n,n.return)),r&4){var o=n!==null?n.memoizedState:null;if(r=t.memoizedState,n===null)if(r===null)if(t.stateNode===null){e:{r=t.type,n=t.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":o=i.getElementsByTagName("title")[0],(!o||o[gd]||o[tn]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector("head > title"))),on(o,r,n),o[tn]=t,Kt(o),r=o;break e;case"link":var a=RI("link","href",i).get(r+(n.href||""));if(a){for(var s=0;s<a.length;s++)if(o=a[s],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(s,1);break t}}o=i.createElement(r),on(o,r,n),i.head.appendChild(o);break;case"meta":if(a=RI("meta","content",i).get(r+(n.content||""))){for(s=0;s<a.length;s++)if(o=a[s],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(s,1);break t}}o=i.createElement(r),on(o,r,n),i.head.appendChild(o);break;default:throw Error(j(468,r))}o[tn]=t,Kt(o),r=o}t.stateNode=r}else CI(i,t.type,t.stateNode);else t.stateNode=kI(i,r,t.memoizedProps);else o!==r?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?CI(i,t.type,t.stateNode):kI(i,r,t.memoizedProps)):r===null&&t.stateNode!==null&&X_(t,t.memoizedProps,n.memoizedProps)}break;case 27:Ln(e,t),jn(t),r&512&&(Ct||n===null||xr(n,n.return)),n!==null&&r&4&&X_(t,t.memoizedProps,n.memoizedProps);break;case 5:if(Ln(e,t),jn(t),r&512&&(Ct||n===null||xr(n,n.return)),t.flags&32){i=t.stateNode;try{Rl(i,"")}catch(m){Xe(t,t.return,m)}}r&4&&t.stateNode!=null&&(i=t.memoizedProps,X_(t,i,n!==null?n.memoizedProps:i)),r&1024&&(Q_=!0);break;case 6:if(Ln(e,t),jn(t),r&4){if(t.stateNode===null)throw Error(j(162));r=t.memoizedProps,n=t.stateNode;try{n.nodeValue=r}catch(m){Xe(t,t.return,m)}}break;case 3:if(qp=null,i=rr,rr=pm(e.containerInfo),Ln(e,t),rr=i,jn(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ll(e.containerInfo)}catch(m){Xe(t,t.return,m)}Q_&&(Q_=!1,MO(t));break;case 4:r=rr,rr=pm(t.stateNode.containerInfo),Ln(e,t),jn(t),rr=r;break;case 12:Ln(e,t),jn(t);break;case 31:Ln(e,t),jn(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,xp(t,r)));break;case 13:Ln(e,t),jn(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Rm=ui()),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,xp(t,r)));break;case 22:i=t.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,c=eo,u=Ct;if(eo=c||i,Ct=u||l,Ln(e,t),Ct=u,eo=c,jn(t),r&8192)e:for(e=t.stateNode,e._visibility=i?e._visibility&-2:e._visibility|1,i&&(n===null||l||eo||Ct||Za(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){l=n=e;try{if(o=l.stateNode,i)a=o.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{s=l.stateNode;var d=l.memoizedProps.style,h=d!=null&&d.hasOwnProperty("display")?d.display:null;s.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(m){Xe(l,l.return,m)}}}else if(e.tag===6){if(n===null){l=e;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(m){Xe(l,l.return,m)}}}else if(e.tag===18){if(n===null){l=e;try{var f=l.stateNode;i?zI(f,!0):zI(l.stateNode,!1)}catch(m){Xe(l,l.return,m)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}r&4&&(r=t.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xp(t,n))));break;case 19:Ln(e,t),jn(t),r&4&&(r=t.updateQueue,r!==null&&(t.updateQueue=null,xp(t,r)));break;case 30:break;case 21:break;default:Ln(e,t),jn(t)}}function jn(t){var e=t.flags;if(e&2){try{for(var n,r=t.return;r!==null;){if($O(r)){n=r;break}r=r.return}if(n==null)throw Error(j(160));switch(n.tag){case 27:var i=n.stateNode,o=W_(t);am(t,o,i);break;case 5:var a=n.stateNode;n.flags&32&&(Rl(a,""),n.flags&=-33);var s=W_(t);am(t,s,a);break;case 3:case 4:var l=n.stateNode.containerInfo,c=W_(t);U0(t,c,l);break;default:throw Error(j(161))}}catch(u){Xe(t,t.return,u)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function MO(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;MO(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Xr(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)RO(t,e.alternate,e),e=e.sibling}function Za(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:ea(4,e,e.return),Za(e);break;case 1:xr(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&AO(e,e.return,n),Za(e);break;case 27:Xu(e.stateNode);case 26:case 5:xr(e,e.return),Za(e);break;case 22:e.memoizedState===null&&Za(e);break;case 30:Za(e);break;default:Za(e)}t=t.sibling}}function Wr(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var r=e.alternate,i=t,o=e,a=o.flags;switch(o.tag){case 0:case 11:case 15:Wr(i,o,n),Sd(4,o);break;case 1:if(Wr(i,o,n),r=o,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(c){Xe(r,r.return,c)}if(r=o,i=r.updateQueue,i!==null){var s=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)PP(l[i],s)}catch(c){Xe(r,r.return,c)}}n&&a&64&&TO(o),Gu(o,o.return);break;case 27:kO(o);case 26:case 5:Wr(i,o,n),n&&r===null&&a&4&&EO(o),Gu(o,o.return);break;case 12:Wr(i,o,n);break;case 31:Wr(i,o,n),n&&a&4&&PO(i,o);break;case 13:Wr(i,o,n),n&&a&4&&OO(i,o);break;case 22:o.memoizedState===null&&Wr(i,o,n),Gu(o,o.return);break;case 30:break;default:Wr(i,o,n)}e=e.sibling}}function jw(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&bd(n))}function Uw(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&bd(t))}function ir(t,e,n,r){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)DO(t,e,n,r),e=e.sibling}function DO(t,e,n,r){var i=e.flags;switch(e.tag){case 0:case 11:case 15:ir(t,e,n,r),i&2048&&Sd(9,e);break;case 1:ir(t,e,n,r);break;case 3:ir(t,e,n,r),i&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&bd(t)));break;case 12:if(i&2048){ir(t,e,n,r),t=e.stateNode;try{var o=e.memoizedProps,a=o.id,s=o.onPostCommit;typeof s=="function"&&s(a,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(l){Xe(e,e.return,l)}}else ir(t,e,n,r);break;case 31:ir(t,e,n,r);break;case 13:ir(t,e,n,r);break;case 23:break;case 22:o=e.stateNode,a=e.alternate,e.memoizedState!==null?o._visibility&2?ir(t,e,n,r):Ku(t,e):o._visibility&2?ir(t,e,n,r):(o._visibility|=2,sl(t,e,n,r,(e.subtreeFlags&10256)!==0||!1)),i&2048&&jw(a,e);break;case 24:ir(t,e,n,r),i&2048&&Uw(e.alternate,e);break;default:ir(t,e,n,r)}}function sl(t,e,n,r,i){for(i=i&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var o=t,a=e,s=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:sl(o,a,s,l,i),Sd(8,a);break;case 23:break;case 22:var u=a.stateNode;a.memoizedState!==null?u._visibility&2?sl(o,a,s,l,i):Ku(o,a):(u._visibility|=2,sl(o,a,s,l,i)),i&&c&2048&&jw(a.alternate,a);break;case 24:sl(o,a,s,l,i),i&&c&2048&&Uw(a.alternate,a);break;default:sl(o,a,s,l,i)}e=e.sibling}}function Ku(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,r=e,i=r.flags;switch(r.tag){case 22:Ku(n,r),i&2048&&jw(r.alternate,r);break;case 24:Ku(n,r),i&2048&&Uw(r.alternate,r);break;default:Ku(n,r)}e=e.sibling}}var Lu=8192;function al(t,e,n){if(t.subtreeFlags&Lu)for(t=t.child;t!==null;)LO(t,e,n),t=t.sibling}function LO(t,e,n){switch(t.tag){case 26:al(t,e,n),t.flags&Lu&&t.memoizedState!==null&&hH(n,rr,t.memoizedState,t.memoizedProps);break;case 5:al(t,e,n);break;case 3:case 4:var r=rr;rr=pm(t.stateNode.containerInfo),al(t,e,n),rr=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=Lu,Lu=16777216,al(t,e,n),Lu=r):al(t,e,n));break;default:al(t,e,n)}}function jO(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Cu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var r=e[n];Gt=r,qO(r,t)}jO(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)UO(t),t=t.sibling}function UO(t){switch(t.tag){case 0:case 11:case 15:Cu(t),t.flags&2048&&ea(9,t,t.return);break;case 3:Cu(t);break;case 12:Cu(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,jp(t)):Cu(t);break;default:Cu(t)}}function jp(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var r=e[n];Gt=r,qO(r,t)}jO(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:ea(8,e,e.return),jp(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,jp(e));break;default:jp(e)}t=t.sibling}}function qO(t,e){for(;Gt!==null;){var n=Gt;switch(n.tag){case 0:case 11:case 15:ea(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:bd(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Gt=r;else e:for(n=t;Gt!==null;){r=Gt;var i=r.sibling,o=r.return;if(CO(r),r===n){Gt=null;break e}if(i!==null){i.return=o,Gt=i;break e}Gt=o}}}var kB={getCacheForType:function(t){var e=rn(It),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return rn(It).controller.signal}},RB=typeof WeakMap=="function"?WeakMap:Map,Ve=0,it=null,Me=null,De=0,Je=0,ai=null,Uo=!1,Bl=!1,qw=!1,ho=0,St=0,ta=0,Xa=0,Fw=0,ci=0,Ol=0,Yu=null,qn=null,q0=!1,Rm=0,FO=0,sm=1/0,lm=null,Go=null,qt=0,Ko=null,Nl=null,ao=0,F0=0,B0=null,BO=null,Ju=0,H0=null;function fi(){return(Ve&2)!==0&&De!==0?De&-De:ve.T!==null?Hw():WI()}function HO(){if(ci===0)if((De&536870912)===0||Le){var t=fp;fp<<=1,(fp&3932160)===0&&(fp=262144),ci=t}else ci=536870912;return t=mi.current,t!==null&&(t.flags|=32),ci}function Fn(t,e,n){(t===it&&(Je===2||Je===9)||t.cancelPendingCommit!==null)&&(Ml(t,0),qo(t,De,ci,!1)),md(t,n),((Ve&2)===0||t!==it)&&(t===it&&((Ve&2)===0&&(Xa|=n),St===4&&qo(t,De,ci,!1)),Ar(t))}function VO(t,e,n){if((Ve&6)!==0)throw Error(j(327));var r=!n&&(e&127)===0&&(e&t.expiredLanes)===0||pd(t,e),i=r?PB(t,e):e0(t,e,!0),o=r;do{if(i===0){Bl&&!r&&qo(t,e,0,!1);break}else{if(n=t.current.alternate,o&&!CB(n)){i=e0(t,e,!1),o=!1;continue}if(i===2){if(o=e,t.errorRecoveryDisabledLanes&o)var a=0;else a=t.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){e=a;e:{var s=t;i=Yu;var l=s.current.memoizedState.isDehydrated;if(l&&(Ml(s,a).flags|=256),a=e0(s,a,!1),a!==2){if(qw&&!l){s.errorRecoveryDisabledLanes|=o,Xa|=o,i=4;break e}o=qn,qn=i,o!==null&&(qn===null?qn=o:qn.push.apply(qn,o))}i=a}if(o=!1,i!==2)continue}}if(i===1){Ml(t,0),qo(t,e,0,!0);break}e:{switch(r=t,o=i,o){case 0:case 1:throw Error(j(345));case 4:if((e&4194048)!==e)break;case 6:qo(r,e,ci,!Uo);break e;case 2:qn=null;break;case 3:case 5:break;default:throw Error(j(329))}if((e&62914560)===e&&(i=Rm+300-ui(),10<i)){if(qo(r,e,ci,!Uo),ym(r,0,!0)!==0)break e;ao=e,r.timeoutHandle=dN(cI.bind(null,r,n,qn,lm,q0,e,ci,Xa,Ol,Uo,o,"Throttled",-0,0),i);break e}cI(r,n,qn,lm,q0,e,ci,Xa,Ol,Uo,o,null,-0,0)}}break}while(!0);Ar(t)}function cI(t,e,n,r,i,o,a,s,l,c,u,d,h,f){if(t.timeoutHandle=-1,d=e.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:no},LO(e,o,d);var m=(o&62914560)===o?Rm-ui():(o&4194048)===o?FO-ui():0;if(m=fH(d,m),m!==null){ao=o,t.cancelPendingCommit=m(dI.bind(null,t,e,o,n,r,i,a,s,l,u,d,null,h,f)),qo(t,o,a,!c);return}}dI(t,e,o,n,r,i,a,s,l)}function CB(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!pi(o(),i))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function qo(t,e,n,r){e&=~Fw,e&=~Xa,t.suspendedLanes|=e,t.pingedLanes&=~e,r&&(t.warmLanes|=e),r=t.expirationTimes;for(var i=e;0<i;){var o=31-hi(i),a=1<<o;r[o]=-1,i&=~a}n!==0&&YI(t,n,e)}function Cm(){return(Ve&6)===0?(_d(0,!1),!1):!0}function Bw(){if(Me!==null){if(Je===0)var t=Me.return;else t=Me,io=ss=null,$w(t),Tl=null,rd=0,t=Me;for(;t!==null;)zO(t.alternate,t),t=t.return;Me=null}}function Ml(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,YB(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),ao=0,Bw(),it=t,Me=n=ro(t.current,null),De=e,Je=0,ai=null,Uo=!1,Bl=pd(t,e),qw=!1,Ol=ci=Fw=Xa=ta=St=0,qn=Yu=null,q0=!1,(e&8)!==0&&(e|=e&32);var r=t.entangledLanes;if(r!==0)for(t=t.entanglements,r&=e;0<r;){var i=31-hi(r),o=1<<i;e|=t[i],r&=~o}return ho=e,xm(),n}function ZO(t,e){Te=null,ve.H=ad,e===Fl||e===Tm?(e=q1(),Je=3):e===_w?(e=q1(),Je=4):Je=e===Dw?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,ai=e,Me===null&&(St=1,rm(t,Ii(e,t.current)))}function GO(){var t=mi.current;return t===null?!0:(De&4194048)===De?Oi===null:(De&62914560)===De||(De&536870912)!==0?t===Oi:!1}function KO(){var t=ve.H;return ve.H=ad,t===null?ad:t}function YO(){var t=ve.A;return ve.A=kB,t}function cm(){St=4,Uo||(De&4194048)!==De&&mi.current!==null||(Bl=!0),(ta&134217727)===0&&(Xa&134217727)===0||it===null||qo(it,De,ci,!1)}function e0(t,e,n){var r=Ve;Ve|=2;var i=KO(),o=YO();(it!==t||De!==e)&&(lm=null,Ml(t,e)),e=!1;var a=St;e:do try{if(Je!==0&&Me!==null){var s=Me,l=ai;switch(Je){case 8:Bw(),a=6;break e;case 3:case 2:case 9:case 6:mi.current===null&&(e=!0);var c=Je;if(Je=0,ai=null,Sl(t,s,l,c),n&&Bl){a=0;break e}break;default:c=Je,Je=0,ai=null,Sl(t,s,l,c)}}IB(),a=St;break}catch(u){ZO(t,u)}while(!0);return e&&t.shellSuspendCounter++,io=ss=null,Ve=r,ve.H=i,ve.A=o,Me===null&&(it=null,De=0,xm()),a}function IB(){for(;Me!==null;)JO(Me)}function PB(t,e){var n=Ve;Ve|=2;var r=KO(),i=YO();it!==t||De!==e?(lm=null,sm=ui()+500,Ml(t,e)):Bl=pd(t,e);e:do try{if(Je!==0&&Me!==null){e=Me;var o=ai;t:switch(Je){case 1:Je=0,ai=null,Sl(t,e,o,1);break;case 2:case 9:if(U1(o)){Je=0,ai=null,uI(e);break}e=function(){Je!==2&&Je!==9||it!==t||(Je=7),Ar(t)},o.then(e,e);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:U1(o)?(Je=0,ai=null,uI(e)):(Je=0,ai=null,Sl(t,e,o,7));break;case 5:var a=null;switch(Me.tag){case 26:a=Me.memoizedState;case 5:case 27:var s=Me;if(a?gN(a):s.stateNode.complete){Je=0,ai=null;var l=s.sibling;if(l!==null)Me=l;else{var c=s.return;c!==null?(Me=c,Im(c)):Me=null}break t}}Je=0,ai=null,Sl(t,e,o,5);break;case 6:Je=0,ai=null,Sl(t,e,o,6);break;case 8:Bw(),St=6;break e;default:throw Error(j(462))}}OB();break}catch(u){ZO(t,u)}while(!0);return io=ss=null,ve.H=r,ve.A=i,Ve=n,Me!==null?0:(it=null,De=0,xm(),St)}function OB(){for(;Me!==null&&!iF();)JO(Me)}function JO(t){var e=xO(t.alternate,t,ho);t.memoizedProps=t.pendingProps,e===null?Im(t):Me=e}function uI(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=iI(n,e,e.pendingProps,e.type,void 0,De);break;case 11:e=iI(n,e,e.pendingProps,e.type.render,e.ref,De);break;case 5:$w(e);default:zO(n,e),e=Me=zP(e,ho),e=xO(n,e,ho)}t.memoizedProps=t.pendingProps,e===null?Im(t):Me=e}function Sl(t,e,n,r){io=ss=null,$w(e),Tl=null,rd=0;var i=e.return;try{if(wB(t,i,e,n,De)){St=1,rm(t,Ii(n,t.current)),Me=null;return}}catch(o){if(i!==null)throw Me=i,o;St=1,rm(t,Ii(n,t.current)),Me=null;return}e.flags&32768?(Le||r===1?t=!0:Bl||(De&536870912)!==0?t=!1:(Uo=t=!0,(r===2||r===9||r===3||r===6)&&(r=mi.current,r!==null&&r.tag===13&&(r.flags|=16384))),XO(e,t)):Im(e)}function Im(t){var e=t;do{if((e.flags&32768)!==0){XO(e,Uo);return}t=e.return;var n=TB(e.alternate,e,ho);if(n!==null){Me=n;return}if(e=e.sibling,e!==null){Me=e;return}Me=e=t}while(e!==null);St===0&&(St=5)}function XO(t,e){do{var n=AB(t.alternate,t);if(n!==null){n.flags&=32767,Me=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){Me=t;return}Me=t=n}while(t!==null);St=6,Me=null}function dI(t,e,n,r,i,o,a,s,l){t.cancelPendingCommit=null;do Pm();while(qt!==0);if((Ve&6)!==0)throw Error(j(327));if(e!==null){if(e===t.current)throw Error(j(177));if(o=e.lanes|e.childLanes,o|=pw,fF(t,n,o,a,s,l),t===it&&(Me=it=null,De=0),Nl=e,Ko=t,ao=n,F0=o,B0=i,BO=r,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,LB(Gp,function(){return nN(),null})):(t.callbackNode=null,t.callbackPriority=0),r=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||r){r=ve.T,ve.T=null,i=Ze.p,Ze.p=2,a=Ve,Ve|=4;try{EB(t,e,n)}finally{Ve=a,Ze.p=i,ve.T=r}}qt=1,WO(),QO(),eN()}}function WO(){if(qt===1){qt=0;var t=Ko,e=Nl,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=ve.T,ve.T=null;var r=Ze.p;Ze.p=2;var i=Ve;Ve|=4;try{NO(e,t);var o=K0,a=gP(t.containerInfo),s=o.focusedElem,l=o.selectionRange;if(a!==s&&s&&s.ownerDocument&&mP(s.ownerDocument.documentElement,s)){if(l!==null&&fw(s)){var c=l.start,u=l.end;if(u===void 0&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var f=h.getSelection(),m=s.textContent.length,g=Math.min(l.start,m),y=l.end===void 0?g:Math.min(l.end,m);!f.extend&&g>y&&(a=y,y=g,g=a);var v=P1(s,g),b=P1(s,y);if(v&&b&&(f.rangeCount!==1||f.anchorNode!==v.node||f.anchorOffset!==v.offset||f.focusNode!==b.node||f.focusOffset!==b.offset)){var S=d.createRange();S.setStart(v.node,v.offset),f.removeAllRanges(),g>y?(f.addRange(S),f.extend(b.node,b.offset)):(S.setEnd(b.node,b.offset),f.addRange(S))}}}}for(d=[],f=s;f=f.parentNode;)f.nodeType===1&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<d.length;s++){var _=d[s];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}vm=!!G0,K0=G0=null}finally{Ve=i,Ze.p=r,ve.T=n}}t.current=e,qt=2}}function QO(){if(qt===2){qt=0;var t=Ko,e=Nl,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=ve.T,ve.T=null;var r=Ze.p;Ze.p=2;var i=Ve;Ve|=4;try{RO(t,e.alternate,e)}finally{Ve=i,Ze.p=r,ve.T=n}}qt=3}}function eN(){if(qt===4||qt===3){qt=0,rF();var t=Ko,e=Nl,n=ao,r=BO;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?qt=5:(qt=0,Nl=Ko=null,tN(t,t.pendingLanes));var i=t.pendingLanes;if(i===0&&(Go=null),aw(n),e=e.stateNode,di&&typeof di.onCommitFiberRoot=="function")try{di.onCommitFiberRoot(fd,e,void 0,(e.current.flags&128)===128)}catch{}if(r!==null){e=ve.T,i=Ze.p,Ze.p=2,ve.T=null;try{for(var o=t.onRecoverableError,a=0;a<r.length;a++){var s=r[a];o(s.value,{componentStack:s.stack})}}finally{ve.T=e,Ze.p=i}}(ao&3)!==0&&Pm(),Ar(t),i=t.pendingLanes,(n&261930)!==0&&(i&42)!==0?t===H0?Ju++:(Ju=0,H0=t):Ju=0,_d(0,!1)}}function tN(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,bd(e)))}function Pm(){return WO(),QO(),eN(),nN()}function nN(){if(qt!==5)return!1;var t=Ko,e=F0;F0=0;var n=aw(ao),r=ve.T,i=Ze.p;try{Ze.p=32>n?32:n,ve.T=null,n=B0,B0=null;var o=Ko,a=ao;if(qt=0,Nl=Ko=null,ao=0,(Ve&6)!==0)throw Error(j(331));var s=Ve;if(Ve|=4,UO(o.current),DO(o,o.current,a,n),Ve=s,_d(0,!1),di&&typeof di.onPostCommitFiberRoot=="function")try{di.onPostCommitFiberRoot(fd,o)}catch{}return!0}finally{Ze.p=i,ve.T=r,tN(t,e)}}function hI(t,e,n){e=Ii(n,e),e=D0(t.stateNode,e,2),t=Zo(t,e,2),t!==null&&(md(t,2),Ar(t))}function Xe(t,e,n){if(t.tag===3)hI(t,t,n);else for(;e!==null;){if(e.tag===3){hI(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Go===null||!Go.has(r))){t=Ii(n,t),n=vO(2),r=Zo(e,n,2),r!==null&&(bO(n,r,e,t),md(r,2),Ar(r));break}}e=e.return}}function t0(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new RB;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(qw=!0,i.add(n),t=NB.bind(null,t,e,n),e.then(t,t))}function NB(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,it===t&&(De&n)===n&&(St===4||St===3&&(De&62914560)===De&&300>ui()-Rm?(Ve&2)===0&&Ml(t,0):Fw|=n,Ol===De&&(Ol=0)),Ar(t)}function iN(t,e){e===0&&(e=KI()),t=as(t,e),t!==null&&(md(t,e),Ar(t))}function MB(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),iN(t,n)}function DB(t,e){var n=0;switch(t.tag){case 31:case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(j(314))}r!==null&&r.delete(e),iN(t,n)}function LB(t,e){return rw(t,e)}var um=null,ll=null,V0=!1,dm=!1,n0=!1,Fo=0;function Ar(t){t!==ll&&t.next===null&&(ll===null?um=ll=t:ll=ll.next=t),dm=!0,V0||(V0=!0,UB())}function _d(t,e){if(!n0&&dm){n0=!0;do for(var n=!1,r=um;r!==null;){if(!e)if(t!==0){var i=r.pendingLanes;if(i===0)var o=0;else{var a=r.suspendedLanes,s=r.pingedLanes;o=(1<<31-hi(42|t)+1)-1,o&=i&~(a&~s),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,fI(r,o))}else o=De,o=ym(r,r===it?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(o&3)===0||pd(r,o)||(n=!0,fI(r,o));r=r.next}while(n);n0=!1}}function jB(){rN()}function rN(){dm=V0=!1;var t=0;Fo!==0&&KB()&&(t=Fo);for(var e=ui(),n=null,r=um;r!==null;){var i=r.next,o=oN(r,e);o===0?(r.next=null,n===null?um=i:n.next=i,i===null&&(ll=n)):(n=r,(t!==0||(o&3)!==0)&&(dm=!0)),r=i}qt!==0&&qt!==5||_d(t,!1),Fo!==0&&(Fo=0)}function oN(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes&-62914561;0<o;){var a=31-hi(o),s=1<<a,l=i[a];l===-1?((s&n)===0||(s&r)!==0)&&(i[a]=hF(s,e)):l<=e&&(t.expiredLanes|=s),o&=~s}if(e=it,n=De,n=ym(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,n===0||t===e&&(Je===2||Je===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&C_(r),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||pd(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(r!==null&&C_(r),aw(n)){case 2:case 8:n=ZI;break;case 32:n=Gp;break;case 268435456:n=GI;break;default:n=Gp}return r=aN.bind(null,t),n=rw(n,r),t.callbackPriority=e,t.callbackNode=n,e}return r!==null&&r!==null&&C_(r),t.callbackPriority=2,t.callbackNode=null,2}function aN(t,e){if(qt!==0&&qt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Pm()&&t.callbackNode!==n)return null;var r=De;return r=ym(t,t===it?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(VO(t,r,e),oN(t,ui()),t.callbackNode!=null&&t.callbackNode===n?aN.bind(null,t):null)}function fI(t,e){if(Pm())return null;VO(t,e,!0)}function UB(){JB(function(){(Ve&6)!==0?rw(VI,jB):rN()})}function Hw(){if(Fo===0){var t=Cl;t===0&&(t=hp,hp<<=1,(hp&261888)===0&&(hp=256)),Fo=t}return Fo}function pI(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Rp(""+t)}function mI(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function qB(t,e,n,r,i){if(e==="submit"&&n&&n.stateNode===i){var o=pI((i[Bn]||null).action),a=r.submitter;a&&(e=(e=a[Bn]||null)?pI(e.formAction):a.getAttribute("formAction"),e!==null&&(o=e,a=null));var s=new Sm("action","action",null,r,i);t.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Fo!==0){var l=a?mI(i,a):new FormData(i);N0(n,{pending:!0,data:l,method:i.method,action:o},null,l)}}else typeof o=="function"&&(s.preventDefault(),l=a?mI(i,a):new FormData(i),N0(n,{pending:!0,data:l,method:i.method,action:o},o,l))},currentTarget:i}]})}}for(zp=0;zp<x0.length;zp++)Tp=x0[zp],gI=Tp.toLowerCase(),vI=Tp[0].toUpperCase()+Tp.slice(1),or(gI,"on"+vI);var Tp,gI,vI,zp;or(bP,"onAnimationEnd");or(yP,"onAnimationIteration");or(SP,"onAnimationStart");or("dblclick","onDoubleClick");or("focusin","onFocus");or("focusout","onBlur");or(oB,"onTransitionRun");or(aB,"onTransitionStart");or(sB,"onTransitionCancel");or(_P,"onTransitionEnd");kl("onMouseEnter",["mouseout","mouseover"]);kl("onMouseLeave",["mouseout","mouseover"]);kl("onPointerEnter",["pointerout","pointerover"]);kl("onPointerLeave",["pointerout","pointerover"]);is("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));is("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));is("onBeforeInput",["compositionend","keypress","textInput","paste"]);is("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));is("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));is("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sd="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),FB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sd));function sN(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var o=void 0;if(e)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=c;try{o(i)}catch(u){Yp(u)}i.currentTarget=null,o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;o=s,i.currentTarget=c;try{o(i)}catch(u){Yp(u)}i.currentTarget=null,o=l}}}}function Ne(t,e){var n=e[m0];n===void 0&&(n=e[m0]=new Set);var r=t+"__bubble";n.has(r)||(lN(e,t,2,!1),n.add(r))}function i0(t,e,n){var r=0;e&&(r|=4),lN(n,t,r,e)}var Ap="_reactListening"+Math.random().toString(36).slice(2);function Vw(t){if(!t[Ap]){t[Ap]=!0,QI.forEach(function(n){n!=="selectionchange"&&(FB.has(n)||i0(n,!1,t),i0(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ap]||(e[Ap]=!0,i0("selectionchange",!1,e))}}function lN(t,e,n,r){switch(_N(e)){case 2:var i=gH;break;case 8:i=vH;break;default:i=Yw}n=i.bind(null,e,n,t),i=void 0,!S0||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function r0(t,e,n,r,i){var o=r;if((e&1)===0&&(e&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&a.stateNode.containerInfo===i)return;a=a.return}for(;s!==null;){if(a=dl(s),a===null)return;if(l=a.tag,l===5||l===6||l===26||l===27){r=o=a;continue e}s=s.parentNode}}r=r.return}sP(function(){var c=o,u=cw(n),d=[];e:{var h=wP.get(t);if(h!==void 0){var f=Sm,m=t;switch(t){case"keypress":if(Ip(n)===0)break e;case"keydown":case"keyup":f=DF;break;case"focusin":m="focus",f=M_;break;case"focusout":m="blur",f=M_;break;case"beforeblur":case"afterblur":f=M_;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=z1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=TF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=UF;break;case bP:case yP:case SP:f=$F;break;case _P:f=FF;break;case"scroll":case"scrollend":f=xF;break;case"wheel":f=HF;break;case"copy":case"cut":case"paste":f=RF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=A1;break;case"toggle":case"beforetoggle":f=ZF}var g=(e&4)!==0,y=!g&&(t==="scroll"||t==="scrollend"),v=g?h!==null?h+"Capture":null:h;g=[];for(var b=c,S;b!==null;){var _=b;if(S=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||S===null||v===null||(_=Qu(b,v),_!=null&&g.push(ld(b,_,S))),y)break;b=b.return}0<g.length&&(h=new f(h,m,null,n,u),d.push({event:h,listeners:g}))}}if((e&7)===0){e:{if(h=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",h&&n!==y0&&(m=n.relatedTarget||n.fromElement)&&(dl(m)||m[jl]))break e;if((f||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,f?(m=n.relatedTarget||n.toElement,f=c,m=m?dl(m):null,m!==null&&(y=hd(m),g=m.tag,m!==y||g!==5&&g!==27&&g!==6)&&(m=null)):(f=null,m=c),f!==m)){if(g=z1,_="onMouseLeave",v="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(g=A1,_="onPointerLeave",v="onPointerEnter",b="pointer"),y=f==null?h:Mu(f),S=m==null?h:Mu(m),h=new g(_,b+"leave",f,n,u),h.target=y,h.relatedTarget=S,_=null,dl(u)===c&&(g=new g(v,b+"enter",m,n,u),g.target=S,g.relatedTarget=y,_=g),y=_,f&&m)t:{for(g=BB,v=f,b=m,S=0,_=v;_;_=g(_))S++;_=0;for(var T=b;T;T=g(T))_++;for(;0<S-_;)v=g(v),S--;for(;0<_-S;)b=g(b),_--;for(;S--;){if(v===b||b!==null&&v===b.alternate){g=v;break t}v=g(v),b=g(b)}g=null}else g=null;f!==null&&bI(d,h,f,g,!1),m!==null&&y!==null&&bI(d,y,m,g,!0)}}e:{if(h=c?Mu(c):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var x=R1;else if(k1(h))if(fP)x=nB;else{x=eB;var E=QF}else f=h.nodeName,!f||f.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?c&&lw(c.elementType)&&(x=R1):x=tB;if(x&&(x=x(t,c))){hP(d,x,n,u);break e}E&&E(t,h,c),t==="focusout"&&c&&h.type==="number"&&c.memoizedProps.value!=null&&b0(h,"number",h.value)}switch(E=c?Mu(c):window,t){case"focusin":(k1(E)||E.contentEditable==="true")&&(pl=E,_0=c,qu=null);break;case"focusout":qu=_0=pl=null;break;case"mousedown":w0=!0;break;case"contextmenu":case"mouseup":case"dragend":w0=!1,O1(d,n,u);break;case"selectionchange":if(rB)break;case"keydown":case"keyup":O1(d,n,u)}var C;if(hw)e:{switch(t){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else fl?uP(t,n)&&(I="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(cP&&n.locale!=="ko"&&(fl||I!=="onCompositionStart"?I==="onCompositionEnd"&&fl&&(C=lP()):(jo=u,uw="value"in jo?jo.value:jo.textContent,fl=!0)),E=hm(c,I),0<E.length&&(I=new T1(I,t,null,n,u),d.push({event:I,listeners:E}),C?I.data=C:(C=dP(n),C!==null&&(I.data=C)))),(C=KF?YF(t,n):JF(t,n))&&(I=hm(c,"onBeforeInput"),0<I.length&&(E=new T1("onBeforeInput","beforeinput",null,n,u),d.push({event:E,listeners:I}),E.data=C)),qB(d,t,c,n,u)}sN(d,e)})}function ld(t,e,n){return{instance:t,listener:e,currentTarget:n}}function hm(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,o=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||o===null||(i=Qu(t,n),i!=null&&r.unshift(ld(t,i,o)),i=Qu(t,e),i!=null&&r.push(ld(t,i,o))),t.tag===3)return r;t=t.return}return[]}function BB(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function bI(t,e,n,r,i){for(var o=e._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,l!==null&&l===r)break;s!==5&&s!==26&&s!==27||c===null||(l=c,i?(c=Qu(n,o),c!=null&&a.unshift(ld(n,c,l))):i||(c=Qu(n,o),c!=null&&a.push(ld(n,c,l)))),n=n.return}a.length!==0&&t.push({event:e,listeners:a})}var HB=/\r\n?/g,VB=/\u0000|\uFFFD/g;function yI(t){return(typeof t=="string"?t:""+t).replace(HB,`
`).replace(VB,"")}function cN(t,e){return e=yI(e),yI(t)===e}function Qe(t,e,n,r,i,o){switch(n){case"children":typeof r=="string"?e==="body"||e==="textarea"&&r===""||Rl(t,r):(typeof r=="number"||typeof r=="bigint")&&e!=="body"&&Rl(t,""+r);break;case"className":mp(t,"class",r);break;case"tabIndex":mp(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":mp(t,n,r);break;case"style":aP(t,r,o);break;case"data":if(e!=="object"){mp(t,"data",r);break}case"src":case"href":if(r===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(n);break}r=Rp(""+r),t.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(n==="formAction"?(e!=="input"&&Qe(t,e,"name",i.name,i,null),Qe(t,e,"formEncType",i.formEncType,i,null),Qe(t,e,"formMethod",i.formMethod,i,null),Qe(t,e,"formTarget",i.formTarget,i,null)):(Qe(t,e,"encType",i.encType,i,null),Qe(t,e,"method",i.method,i,null),Qe(t,e,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(n);break}r=Rp(""+r),t.setAttribute(n,r);break;case"onClick":r!=null&&(t.onclick=no);break;case"onScroll":r!=null&&Ne("scroll",t);break;case"onScrollEnd":r!=null&&Ne("scrollend",t);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(j(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(j(60));t.innerHTML=n}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}n=Rp(""+r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(n,""+r):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":r===!0?t.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(n,r):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(n,r):t.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(n):t.setAttribute(n,r);break;case"popover":Ne("beforetoggle",t),Ne("toggle",t),kp(t,"popover",r);break;case"xlinkActuate":Kr(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Kr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Kr(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Kr(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Kr(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Kr(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Kr(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Kr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Kr(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":kp(t,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=_F.get(n)||n,kp(t,n,r))}}function Z0(t,e,n,r,i,o){switch(n){case"style":aP(t,r,o);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(j(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(j(60));t.innerHTML=n}}break;case"children":typeof r=="string"?Rl(t,r):(typeof r=="number"||typeof r=="bigint")&&Rl(t,""+r);break;case"onScroll":r!=null&&Ne("scroll",t);break;case"onScrollEnd":r!=null&&Ne("scrollend",t);break;case"onClick":r!=null&&(t.onclick=no);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!eP.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),e=n.slice(2,i?n.length-7:void 0),o=t[Bn]||null,o=o!=null?o[n]:null,typeof o=="function"&&t.removeEventListener(e,o,i),typeof r=="function")){typeof o!="function"&&o!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,r,i);break e}n in t?t[n]=r:r===!0?t.setAttribute(n,""):kp(t,n,r)}}}function on(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",t),Ne("load",t);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var a=n[o];if(a!=null)switch(o){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(j(137,e));default:Qe(t,e,o,a,n,null)}}i&&Qe(t,e,"srcSet",n.srcSet,n,null),r&&Qe(t,e,"src",n.src,n,null);return;case"input":Ne("invalid",t);var s=o=a=i=null,l=null,c=null;for(r in n)if(n.hasOwnProperty(r)){var u=n[r];if(u!=null)switch(r){case"name":i=u;break;case"type":a=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":o=u;break;case"defaultValue":s=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(j(137,e));break;default:Qe(t,e,r,u,n,null)}}iP(t,o,s,l,c,a,i,!1);return;case"select":Ne("invalid",t),r=a=o=null;for(i in n)if(n.hasOwnProperty(i)&&(s=n[i],s!=null))switch(i){case"value":o=s;break;case"defaultValue":a=s;break;case"multiple":r=s;default:Qe(t,e,i,s,n,null)}e=o,n=a,t.multiple=!!r,e!=null?wl(t,!!r,e,!1):n!=null&&wl(t,!!r,n,!0);return;case"textarea":Ne("invalid",t),o=i=r=null;for(a in n)if(n.hasOwnProperty(a)&&(s=n[a],s!=null))switch(a){case"value":r=s;break;case"defaultValue":i=s;break;case"children":o=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(j(91));break;default:Qe(t,e,a,s,n,null)}oP(t,r,i,o);return;case"option":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"selected":t.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Qe(t,e,l,r,n,null)}return;case"dialog":Ne("beforetoggle",t),Ne("toggle",t),Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":Ne("load",t);break;case"video":case"audio":for(r=0;r<sd.length;r++)Ne(sd[r],t);break;case"image":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"embed":case"source":case"link":Ne("error",t),Ne("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(j(137,e));default:Qe(t,e,c,r,n,null)}return;default:if(lw(e)){for(u in n)n.hasOwnProperty(u)&&(r=n[u],r!==void 0&&Z0(t,e,u,r,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(r=n[s],r!=null&&Qe(t,e,s,r,n,null))}function ZB(t,e,n,r){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,o=null,a=null,s=null,l=null,c=null,u=null;for(f in n){var d=n[f];if(n.hasOwnProperty(f)&&d!=null)switch(f){case"checked":break;case"value":break;case"defaultValue":l=d;default:r.hasOwnProperty(f)||Qe(t,e,f,null,r,d)}}for(var h in r){var f=r[h];if(d=n[h],r.hasOwnProperty(h)&&(f!=null||d!=null))switch(h){case"type":o=f;break;case"name":i=f;break;case"checked":c=f;break;case"defaultChecked":u=f;break;case"value":a=f;break;case"defaultValue":s=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(j(137,e));break;default:f!==d&&Qe(t,e,h,f,r,d)}}v0(t,a,s,l,c,u,o,i);return;case"select":f=a=s=h=null;for(o in n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case"value":break;case"multiple":f=l;default:r.hasOwnProperty(o)||Qe(t,e,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case"value":h=o;break;case"defaultValue":s=o;break;case"multiple":a=o;default:o!==l&&Qe(t,e,i,o,r,l)}e=s,n=a,r=f,h!=null?wl(t,!!n,h,!1):!!r!=!!n&&(e!=null?wl(t,!!n,e,!0):wl(t,!!n,n?[]:"",!1));return;case"textarea":f=h=null;for(s in n)if(i=n[s],n.hasOwnProperty(s)&&i!=null&&!r.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:Qe(t,e,s,null,r,i)}for(a in r)if(i=r[a],o=n[a],r.hasOwnProperty(a)&&(i!=null||o!=null))switch(a){case"value":h=i;break;case"defaultValue":f=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(j(91));break;default:i!==o&&Qe(t,e,a,i,r,o)}rP(t,h,f);return;case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&h!=null&&!r.hasOwnProperty(m))switch(m){case"selected":t.selected=!1;break;default:Qe(t,e,m,null,r,h)}for(l in r)if(h=r[l],f=n[l],r.hasOwnProperty(l)&&h!==f&&(h!=null||f!=null))switch(l){case"selected":t.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Qe(t,e,l,h,r,f)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)h=n[g],n.hasOwnProperty(g)&&h!=null&&!r.hasOwnProperty(g)&&Qe(t,e,g,null,r,h);for(c in r)if(h=r[c],f=n[c],r.hasOwnProperty(c)&&h!==f&&(h!=null||f!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(j(137,e));break;default:Qe(t,e,c,h,r,f)}return;default:if(lw(e)){for(var y in n)h=n[y],n.hasOwnProperty(y)&&h!==void 0&&!r.hasOwnProperty(y)&&Z0(t,e,y,void 0,r,h);for(u in r)h=r[u],f=n[u],!r.hasOwnProperty(u)||h===f||h===void 0&&f===void 0||Z0(t,e,u,h,r,f);return}}for(var v in n)h=n[v],n.hasOwnProperty(v)&&h!=null&&!r.hasOwnProperty(v)&&Qe(t,e,v,null,r,h);for(d in r)h=r[d],f=n[d],!r.hasOwnProperty(d)||h===f||h==null&&f==null||Qe(t,e,d,h,r,f)}function SI(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function GB(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],o=i.transferSize,a=i.initiatorType,s=i.duration;if(o&&s&&SI(a)){for(a=0,s=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&SI(d)&&(l=l.responseEnd,a+=u*(l<s?1:(s-c)/(l-c)))}if(--r,e+=8*(o+a)/(i.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var G0=null,K0=null;function fm(t){return t.nodeType===9?t:t.ownerDocument}function _I(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function uN(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Y0(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var o0=null;function KB(){var t=window.event;return t&&t.type==="popstate"?t===o0?!1:(o0=t,!0):(o0=null,!1)}var dN=typeof setTimeout=="function"?setTimeout:void 0,YB=typeof clearTimeout=="function"?clearTimeout:void 0,wI=typeof Promise=="function"?Promise:void 0,JB=typeof queueMicrotask=="function"?queueMicrotask:typeof wI<"u"?function(t){return wI.resolve(null).then(t).catch(XB)}:dN;function XB(t){setTimeout(function(){throw t})}function ia(t){return t==="head"}function xI(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(r===0){t.removeChild(i),Ll(e);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")Xu(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,Xu(n);for(var o=n.firstChild;o;){var a=o.nextSibling,s=o.nodeName;o[gd]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=a}}else n==="body"&&Xu(t.ownerDocument.body);n=i}while(n);Ll(e)}function zI(t,e){var n=t;t=0;do{var r=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=r}while(n)}function J0(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":J0(n),sw(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function WB(t,e,n,r){for(;t.nodeType===1;){var i=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[gd])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(o=t.getAttribute("rel"),o==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(o!==i.rel||t.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||t.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||t.getAttribute("title")!==(i.title==null?null:i.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(o=t.getAttribute("src"),(o!==(i.src==null?null:i.src)||t.getAttribute("type")!==(i.type==null?null:i.type)||t.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&o&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var o=i.name==null?null:""+i.name;if(i.type==="hidden"&&t.getAttribute("name")===o)return t}else return t;if(t=Ni(t.nextSibling),t===null)break}return null}function QB(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Ni(t.nextSibling),t===null))return null;return t}function hN(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Ni(t.nextSibling),t===null))return null;return t}function X0(t){return t.data==="$?"||t.data==="$~"}function W0(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function eH(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var r=function(){e(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function Ni(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Q0=null;function TI(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return Ni(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function AI(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function fN(t,e,n){switch(e=fm(n),t){case"html":if(t=e.documentElement,!t)throw Error(j(452));return t;case"head":if(t=e.head,!t)throw Error(j(453));return t;case"body":if(t=e.body,!t)throw Error(j(454));return t;default:throw Error(j(451))}}function Xu(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);sw(t)}var Mi=new Map,EI=new Set;function pm(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var fo=Ze.d;Ze.d={f:tH,r:nH,D:iH,C:rH,L:oH,m:aH,X:lH,S:sH,M:cH};function tH(){var t=fo.f(),e=Cm();return t||e}function nH(t){var e=Ul(t);e!==null&&e.tag===5&&e.type==="form"?aO(e):fo.r(t)}var Hl=typeof document>"u"?null:document;function pN(t,e,n){var r=Hl;if(r&&typeof e=="string"&&e){var i=Ci(e);i='link[rel="'+t+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),EI.has(i)||(EI.add(i),t={rel:t,crossOrigin:n,href:e},r.querySelector(i)===null&&(e=r.createElement("link"),on(e,"link",t),Kt(e),r.head.appendChild(e)))}}function iH(t){fo.D(t),pN("dns-prefetch",t,null)}function rH(t,e){fo.C(t,e),pN("preconnect",t,e)}function oH(t,e,n){fo.L(t,e,n);var r=Hl;if(r&&t&&e){var i='link[rel="preload"][as="'+Ci(e)+'"]';e==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Ci(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Ci(n.imageSizes)+'"]')):i+='[href="'+Ci(t)+'"]';var o=i;switch(e){case"style":o=Dl(t);break;case"script":o=Vl(t)}Mi.has(o)||(t=ht({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Mi.set(o,t),r.querySelector(i)!==null||e==="style"&&r.querySelector(wd(o))||e==="script"&&r.querySelector(xd(o))||(e=r.createElement("link"),on(e,"link",t),Kt(e),r.head.appendChild(e)))}}function aH(t,e){fo.m(t,e);var n=Hl;if(n&&t){var r=e&&typeof e.as=="string"?e.as:"script",i='link[rel="modulepreload"][as="'+Ci(r)+'"][href="'+Ci(t)+'"]',o=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Vl(t)}if(!Mi.has(o)&&(t=ht({rel:"modulepreload",href:t},e),Mi.set(o,t),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(xd(o)))return}r=n.createElement("link"),on(r,"link",t),Kt(r),n.head.appendChild(r)}}}function sH(t,e,n){fo.S(t,e,n);var r=Hl;if(r&&t){var i=_l(r).hoistableStyles,o=Dl(t);e=e||"default";var a=i.get(o);if(!a){var s={loading:0,preload:null};if(a=r.querySelector(wd(o)))s.loading=5;else{t=ht({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Mi.get(o))&&Zw(t,n);var l=a=r.createElement("link");Kt(l),on(l,"link",t),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Up(a,e,r)}a={type:"stylesheet",instance:a,count:1,state:s},i.set(o,a)}}}function lH(t,e){fo.X(t,e);var n=Hl;if(n&&t){var r=_l(n).hoistableScripts,i=Vl(t),o=r.get(i);o||(o=n.querySelector(xd(i)),o||(t=ht({src:t,async:!0},e),(e=Mi.get(i))&&Gw(t,e),o=n.createElement("script"),Kt(o),on(o,"link",t),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}function cH(t,e){fo.M(t,e);var n=Hl;if(n&&t){var r=_l(n).hoistableScripts,i=Vl(t),o=r.get(i);o||(o=n.querySelector(xd(i)),o||(t=ht({src:t,async:!0,type:"module"},e),(e=Mi.get(i))&&Gw(t,e),o=n.createElement("script"),Kt(o),on(o,"link",t),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}function $I(t,e,n,r){var i=(i=Bo.current)?pm(i):null;if(!i)throw Error(j(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Dl(n.href),n=_l(i).hoistableStyles,r=n.get(e),r||(r={type:"style",instance:null,count:0,state:null},n.set(e,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Dl(n.href);var o=_l(i).hoistableStyles,a=o.get(t);if(a||(i=i.ownerDocument||i,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(t,a),(o=i.querySelector(wd(t)))&&!o._p&&(a.instance=o,a.state.loading=5),Mi.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Mi.set(t,n),o||uH(i,t,n,a.state))),e&&r===null)throw Error(j(528,""));return a}if(e&&r!==null)throw Error(j(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Vl(n),n=_l(i).hoistableScripts,r=n.get(e),r||(r={type:"script",instance:null,count:0,state:null},n.set(e,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(j(444,t))}}function Dl(t){return'href="'+Ci(t)+'"'}function wd(t){return'link[rel="stylesheet"]['+t+"]"}function mN(t){return ht({},t,{"data-precedence":t.precedence,precedence:null})}function uH(t,e,n,r){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?r.loading=1:(e=t.createElement("link"),r.preload=e,e.addEventListener("load",function(){return r.loading|=1}),e.addEventListener("error",function(){return r.loading|=2}),on(e,"link",n),Kt(e),t.head.appendChild(e))}function Vl(t){return'[src="'+Ci(t)+'"]'}function xd(t){return"script[async]"+t}function kI(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var r=t.querySelector('style[data-href~="'+Ci(n.href)+'"]');if(r)return e.instance=r,Kt(r),r;var i=ht({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),Kt(r),on(r,"style",i),Up(r,n.precedence,t),e.instance=r;case"stylesheet":i=Dl(n.href);var o=t.querySelector(wd(i));if(o)return e.state.loading|=4,e.instance=o,Kt(o),o;r=mN(n),(i=Mi.get(i))&&Zw(r,i),o=(t.ownerDocument||t).createElement("link"),Kt(o);var a=o;return a._p=new Promise(function(s,l){a.onload=s,a.onerror=l}),on(o,"link",r),e.state.loading|=4,Up(o,n.precedence,t),e.instance=o;case"script":return o=Vl(n.src),(i=t.querySelector(xd(o)))?(e.instance=i,Kt(i),i):(r=n,(i=Mi.get(o))&&(r=ht({},n),Gw(r,i)),t=t.ownerDocument||t,i=t.createElement("script"),Kt(i),on(i,"link",r),t.head.appendChild(i),e.instance=i);case"void":return null;default:throw Error(j(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(r=e.instance,e.state.loading|=4,Up(r,n.precedence,t));return e.instance}function Up(t,e,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,o=i,a=0;a<r.length;a++){var s=r[a];if(s.dataset.precedence===e)o=s;else if(o!==i)break}o?o.parentNode.insertBefore(t,o.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function Zw(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Gw(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var qp=null;function RI(t,e,n){if(qp===null){var r=new Map,i=qp=new Map;i.set(n,r)}else i=qp,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(t))return r;for(r.set(t,null),n=n.getElementsByTagName(t),i=0;i<n.length;i++){var o=n[i];if(!(o[gd]||o[tn]||t==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var a=o.getAttribute(e)||"";a=t+a;var s=r.get(a);s?s.push(o):r.set(a,[o])}}return r}function CI(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function dH(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function gN(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function hH(t,e,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Dl(r.href),o=e.querySelector(wd(i));if(o){e=o._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=mm.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=o,Kt(o);return}o=e.ownerDocument||e,r=mN(r),(i=Mi.get(i))&&Zw(r,i),o=o.createElement("link"),Kt(o);var a=o;a._p=new Promise(function(s,l){a.onload=s,a.onerror=l}),on(o,"link",r),n.instance=o}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=mm.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var a0=0;function fH(t,e){return t.stylesheets&&t.count===0&&Fp(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var r=setTimeout(function(){if(t.stylesheets&&Fp(t,t.stylesheets),t.unsuspend){var o=t.unsuspend;t.unsuspend=null,o()}},6e4+e);0<t.imgBytes&&a0===0&&(a0=62500*GB());var i=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Fp(t,t.stylesheets),t.unsuspend)){var o=t.unsuspend;t.unsuspend=null,o()}},(t.imgBytes>a0?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function mm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fp(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var gm=null;function Fp(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,gm=new Map,e.forEach(pH,t),gm=null,mm.call(t))}function pH(t,e){if(!(e.state.loading&4)){var n=gm.get(t);if(n)var r=n.get(null);else{n=new Map,gm.set(t,n);for(var i=t.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var a=i[o];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}i=e.instance,a=i.getAttribute("data-precedence"),o=n.get(a)||r,o===r&&n.set(null,i),n.set(a,i),this.count++,r=mm.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),o?o.parentNode.insertBefore(i,o.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(i,t.firstChild)),e.state.loading|=4}}var cd={$$typeof:to,Provider:null,Consumer:null,_currentValue:Ga,_currentValue2:Ga,_threadCount:0};function mH(t,e,n,r,i,o,a,s,l){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=I_(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=I_(0),this.hiddenUpdates=I_(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=o,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function vN(t,e,n,r,i,o,a,s,l,c,u,d){return t=new mH(t,e,n,a,l,c,u,d,s),e=1,o===!0&&(e|=24),o=li(3,null,null,e),t.current=o,o.stateNode=t,e=yw(),e.refCount++,t.pooledCache=e,e.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:e},ww(o),t}function bN(t){return t?(t=vl,t):vl}function yN(t,e,n,r,i,o){i=bN(i),r.context===null?r.context=i:r.pendingContext=i,r=Vo(e),r.payload={element:n},o=o===void 0?null:o,o!==null&&(r.callback=o),n=Zo(t,r,e),n!==null&&(Fn(n,t,e),Bu(n,t,e))}function II(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Kw(t,e){II(t,e),(t=t.alternate)&&II(t,e)}function SN(t){if(t.tag===13||t.tag===31){var e=as(t,67108864);e!==null&&Fn(e,t,67108864),Kw(t,67108864)}}function PI(t){if(t.tag===13||t.tag===31){var e=fi();e=ow(e);var n=as(t,e);n!==null&&Fn(n,t,e),Kw(t,e)}}var vm=!0;function gH(t,e,n,r){var i=ve.T;ve.T=null;var o=Ze.p;try{Ze.p=2,Yw(t,e,n,r)}finally{Ze.p=o,ve.T=i}}function vH(t,e,n,r){var i=ve.T;ve.T=null;var o=Ze.p;try{Ze.p=8,Yw(t,e,n,r)}finally{Ze.p=o,ve.T=i}}function Yw(t,e,n,r){if(vm){var i=ew(r);if(i===null)r0(t,e,r,bm,n),OI(t,r);else if(yH(i,t,e,n,r))r.stopPropagation();else if(OI(t,r),e&4&&-1<bH.indexOf(t)){for(;i!==null;){var o=Ul(i);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var a=Ha(o.pendingLanes);if(a!==0){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-hi(a);s.entanglements[1]|=l,a&=~l}Ar(o),(Ve&6)===0&&(sm=ui()+500,_d(0,!1))}}break;case 31:case 13:s=as(o,2),s!==null&&Fn(s,o,2),Cm(),Kw(o,2)}if(o=ew(r),o===null&&r0(t,e,r,bm,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else r0(t,e,r,null,n)}}function ew(t){return t=cw(t),Jw(t)}var bm=null;function Jw(t){if(bm=null,t=dl(t),t!==null){var e=hd(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=UI(e),t!==null)return t;t=null}else if(n===31){if(t=qI(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return bm=t,null}function _N(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oF()){case VI:return 2;case ZI:return 8;case Gp:case aF:return 32;case GI:return 268435456;default:return 32}default:return 32}}var tw=!1,Yo=null,Jo=null,Xo=null,ud=new Map,dd=new Map,Do=[],bH="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function OI(t,e){switch(t){case"focusin":case"focusout":Yo=null;break;case"dragenter":case"dragleave":Jo=null;break;case"mouseover":case"mouseout":Xo=null;break;case"pointerover":case"pointerout":ud.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":dd.delete(e.pointerId)}}function Iu(t,e,n,r,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Ul(e),e!==null&&SN(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function yH(t,e,n,r,i){switch(e){case"focusin":return Yo=Iu(Yo,t,e,n,r,i),!0;case"dragenter":return Jo=Iu(Jo,t,e,n,r,i),!0;case"mouseover":return Xo=Iu(Xo,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return ud.set(o,Iu(ud.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,dd.set(o,Iu(dd.get(o)||null,t,e,n,r,i)),!0}return!1}function wN(t){var e=dl(t.target);if(e!==null){var n=hd(e);if(n!==null){if(e=n.tag,e===13){if(e=UI(n),e!==null){t.blockedOn=e,v1(t.priority,function(){PI(n)});return}}else if(e===31){if(e=qI(n),e!==null){t.blockedOn=e,v1(t.priority,function(){PI(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Bp(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=ew(t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);y0=r,n.target.dispatchEvent(r),y0=null}else return e=Ul(n),e!==null&&SN(e),t.blockedOn=n,!1;e.shift()}return!0}function NI(t,e,n){Bp(t)&&n.delete(e)}function SH(){tw=!1,Yo!==null&&Bp(Yo)&&(Yo=null),Jo!==null&&Bp(Jo)&&(Jo=null),Xo!==null&&Bp(Xo)&&(Xo=null),ud.forEach(NI),dd.forEach(NI)}function Ep(t,e){t.blockedOn===e&&(t.blockedOn=null,tw||(tw=!0,Ft.unstable_scheduleCallback(Ft.unstable_NormalPriority,SH)))}var $p=null;function MI(t){$p!==t&&($p=t,Ft.unstable_scheduleCallback(Ft.unstable_NormalPriority,function(){$p===t&&($p=null);for(var e=0;e<t.length;e+=3){var n=t[e],r=t[e+1],i=t[e+2];if(typeof r!="function"){if(Jw(r||n)===null)continue;break}var o=Ul(n);o!==null&&(t.splice(e,3),e-=3,N0(o,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ll(t){function e(l){return Ep(l,t)}Yo!==null&&Ep(Yo,t),Jo!==null&&Ep(Jo,t),Xo!==null&&Ep(Xo,t),ud.forEach(e),dd.forEach(e);for(var n=0;n<Do.length;n++){var r=Do[n];r.blockedOn===t&&(r.blockedOn=null)}for(;0<Do.length&&(n=Do[0],n.blockedOn===null);)wN(n),n.blockedOn===null&&Do.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],a=i[Bn]||null;if(typeof o=="function")a||MI(n);else if(a){var s=null;if(o&&o.hasAttribute("formAction")){if(i=o,a=o[Bn]||null)s=a.formAction;else if(Jw(i)!==null)continue}else s=a.action;typeof s=="function"?n[r+1]=s:(n.splice(r,3),r-=3),MI(n)}}}function xN(){function t(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(a){return i=a})},focusReset:"manual",scroll:"manual"})}function e(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,i=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),i!==null&&(i(),i=null)}}}function Xw(t){this._internalRoot=t}Om.prototype.render=Xw.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(j(409));var n=e.current,r=fi();yN(n,r,t,e,null,null)};Om.prototype.unmount=Xw.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;yN(t.current,2,null,t,null,null),Cm(),e[jl]=null}};function Om(t){this._internalRoot=t}Om.prototype.unstable_scheduleHydration=function(t){if(t){var e=WI();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Do.length&&e!==0&&e<Do[n].priority;n++);Do.splice(n,0,t),n===0&&wN(t)}};var DI=LI.version;if(DI!=="19.2.7")throw Error(j(527,DI,"19.2.7"));Ze.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(j(188)):(t=Object.keys(t).join(","),Error(j(268,t)));return t=Wq(e),t=t!==null?FI(t):null,t=t===null?null:t.stateNode,t};var _H={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:ve,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Pu.isDisabled&&Pu.supportsFiber))try{fd=Pu.inject(_H),di=Pu}catch{}var Pu;Nm.createRoot=function(t,e){if(!jI(t))throw Error(j(299));var n=!1,r="",i=pO,o=mO,a=gO;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onUncaughtError!==void 0&&(i=e.onUncaughtError),e.onCaughtError!==void 0&&(o=e.onCaughtError),e.onRecoverableError!==void 0&&(a=e.onRecoverableError)),e=vN(t,1,!1,null,null,n,r,null,i,o,a,xN),t[jl]=e.current,Vw(t),new Xw(e)};Nm.hydrateRoot=function(t,e,n){if(!jI(t))throw Error(j(299));var r=!1,i="",o=pO,a=mO,s=gO,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(l=n.formState)),e=vN(t,1,!0,e,n??null,r,i,l,o,a,s,xN),e.context=bN(null),n=e.current,r=fi(),r=ow(r),i=Vo(r),i.callback=null,Zo(n,i,r),n=r,e.current.lanes=n,md(e,n),Ar(e),t[jl]=e.current,Vw(t),new Om(e)};Nm.version="19.2.7"});var EN=yr((HY,AN)=>{"use strict";function TN(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TN)}catch(t){console.error(t)}}TN(),AN.exports=zN()});var J4=yr(nS=>{"use strict";var _K=Symbol.for("react.transitional.element"),wK=Symbol.for("react.fragment");function Y4(t,e,n){var r=null;if(n!==void 0&&(r=""+n),e.key!==void 0&&(r=""+e.key),"key"in e){n={};for(var i in e)i!=="key"&&(n[i]=e[i])}else n=e;return e=n.ref,{$$typeof:_K,type:t,key:r,ref:e!==void 0?e:null,props:n}}nS.Fragment=wK;nS.jsx=Y4;nS.jsxs=Y4});var Cn=yr((Pte,X4)=>{"use strict";X4.exports=J4()});var ce=lt(oi(),1),wq=lt(EN(),1);var wH=Object.create,Mm=Object.defineProperty,xH=Object.getOwnPropertyDescriptor,zH=Object.getOwnPropertyNames,TH=Object.getPrototypeOf,AH=Object.prototype.hasOwnProperty,$N=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),kN=(t,e)=>{let n={};for(var r in t)Mm(n,r,{get:t[r],enumerable:!0});return e&&Mm(n,Symbol.toStringTag,{value:"Module"}),n},EH=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(var i=zH(e),o=0,a=i.length,s;o<a;o++)s=i[o],!AH.call(t,s)&&s!==n&&Mm(t,s,{get:(l=>e[l]).bind(null,s),enumerable:!(r=xH(e,s))||r.enumerable});return t},RN=(t,e,n)=>(n=t!=null?wH(TH(t)):{},EH(e||!t||!t.__esModule?Mm(n,"default",{value:t,enumerable:!0}):n,t));var $H=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]);function CN(t){return typeof t=="string"&&$H.has(t.replace(/#$/,""))}var z={};Zr(z,{$brand:()=>ux,$input:()=>MT,$output:()=>NT,INVALID:()=>En,NEVER:()=>ds,TimePrecision:()=>KT,ZodAny:()=>CE,ZodArray:()=>NE,ZodBase64:()=>Iv,ZodBase64URL:()=>Pv,ZodBigInt:()=>kc,ZodBigIntFormat:()=>Mv,ZodBoolean:()=>$c,ZodCIDRv4:()=>Rv,ZodCIDRv6:()=>Cv,ZodCUID:()=>xv,ZodCUID2:()=>zv,ZodCatch:()=>e$,ZodCodec:()=>vh,ZodCompileAsyncError:()=>sr,ZodCompileUnsupportedError:()=>Ie,ZodCreditCard:()=>AE,ZodCustom:()=>bh,ZodCustomStringFormat:()=>zs,ZodDate:()=>hh,ZodDefault:()=>KE,ZodDiscriminatedUnion:()=>DE,ZodE164:()=>Ov,ZodEmail:()=>bv,ZodEmoji:()=>_v,ZodEnum:()=>Tc,ZodError:()=>G5,ZodExactOptional:()=>jv,ZodFile:()=>HE,ZodFirstPartyTypeKind:()=>f$,ZodFunction:()=>c$,ZodGUID:()=>Sv,ZodIBAN:()=>EE,ZodIPv4:()=>$v,ZodIPv6:()=>kv,ZodISODate:()=>pa,ZodISODateTime:()=>fa,ZodISODuration:()=>ga,ZodISOTime:()=>ma,ZodInstanceOf:()=>h$,ZodIntersection:()=>LE,ZodIssueCode:()=>yh,ZodJWT:()=>Nv,ZodKSUID:()=>Ev,ZodLazy:()=>s$,ZodLiteral:()=>BE,ZodMAC:()=>TE,ZodMap:()=>qE,ZodNaN:()=>n$,ZodNanoID:()=>wv,ZodNever:()=>PE,ZodNonOptional:()=>Uv,ZodNull:()=>RE,ZodNullable:()=>GE,ZodNumber:()=>Ec,ZodNumberFormat:()=>Ts,ZodObject:()=>fh,ZodOptional:()=>mh,ZodPipe:()=>gh,ZodPrefault:()=>JE,ZodPreprocess:()=>i$,ZodPromise:()=>l$,ZodReadonly:()=>r$,ZodRealError:()=>Yn,ZodRecord:()=>zc,ZodSet:()=>FE,ZodString:()=>Ac,ZodStringFormat:()=>We,ZodSuccess:()=>QE,ZodSymbol:()=>$E,ZodTemplateLiteral:()=>a$,ZodTransform:()=>VE,ZodTuple:()=>jE,ZodType:()=>Ae,ZodULID:()=>Tv,ZodURL:()=>dh,ZodUUID:()=>Rr,ZodUndefined:()=>kE,ZodUnion:()=>ph,ZodUnknown:()=>IE,ZodVoid:()=>OE,ZodXID:()=>Av,ZodXor:()=>ME,_ZodString:()=>vv,_default:()=>YE,_function:()=>r2,any:()=>Rc,array:()=>A,base64:()=>SL,base64url:()=>_L,bigint:()=>NL,boolean:()=>q,catch:()=>t$,check:()=>o2,cidrv4:()=>bL,cidrv6:()=>yL,clone:()=>Ge,codec:()=>e2,coerce:()=>As,compile:()=>UT,config:()=>_t,core:()=>bo,creditCard:()=>xL,cuid:()=>uL,cuid2:()=>dL,currencyCode:()=>kL,custom:()=>a2,date:()=>qL,decode:()=>bE,decodeAsync:()=>SE,deepPartial:()=>b2,describe:()=>s2,discriminatedUnion:()=>cr,e164:()=>wL,email:()=>yv,emoji:()=>lL,encode:()=>vE,encodeAsync:()=>yE,endsWith:()=>fc,enum:()=>ue,exactOptional:()=>ZE,file:()=>JL,flattenError:()=>Od,float32:()=>CL,float64:()=>IL,formatError:()=>Nd,fromJSONSchema:()=>g2,function:()=>r2,getDiscriminatedOption:()=>cT,getErrorMap:()=>X5,globalRegistry:()=>sn,gt:()=>$r,gte:()=>vi,guid:()=>nL,hash:()=>RL,hex:()=>$L,hostname:()=>EL,httpUrl:()=>sL,iban:()=>zL,includes:()=>dc,input:()=>S2,instanceof:()=>c2,int:()=>mv,int32:()=>PL,int64:()=>ML,intersection:()=>Jn,invertCodec:()=>t2,ipv4:()=>mL,ipv6:()=>vL,iso:()=>Xn,json:()=>d2,jwt:()=>TL,keyof:()=>FL,ksuid:()=>pL,lazy:()=>Cr,length:()=>Ss,literal:()=>$,locales:()=>th,looseObject:()=>ee,looseRecord:()=>ZL,lowercase:()=>cc,lt:()=>Er,lte:()=>gi,mac:()=>gL,map:()=>GL,maxLength:()=>ys,maxSize:()=>ca,memoizer:()=>Qd,meta:()=>l2,mime:()=>mc,minLength:()=>vo,minSize:()=>kr,multipleOf:()=>la,nan:()=>QL,nanoid:()=>cL,nativeEnum:()=>YL,negative:()=>ov,never:()=>Dv,nonnegative:()=>sv,nonoptional:()=>WE,nonpositive:()=>av,normalize:()=>gc,null:()=>bi,nullable:()=>uh,nullish:()=>XL,number:()=>P,object:()=>w,optional:()=>Y,output:()=>_2,overwrite:()=>lr,parse:()=>pE,parseAsync:()=>mE,partialRecord:()=>VL,pipe:()=>gv,positive:()=>rv,prefault:()=>XE,preprocess:()=>Ui,prettifyError:()=>mx,promise:()=>i2,properties:()=>pc,property:()=>lv,readonly:()=>o$,record:()=>H,refine:()=>u$,regex:()=>lc,regexes:()=>ji,registry:()=>Pg,safeDecode:()=>wE,safeDecodeAsync:()=>zE,safeEncode:()=>_E,safeEncodeAsync:()=>xE,safeParse:()=>ch,safeParseAsync:()=>gE,set:()=>KL,setErrorMap:()=>J5,size:()=>bs,slugify:()=>Sc,startsWith:()=>hc,strictObject:()=>BL,string:()=>p,stringFormat:()=>AL,stringbool:()=>u2,success:()=>WL,superRefine:()=>d$,symbol:()=>LL,templateLiteral:()=>n2,toJSONSchema:()=>ws,toLowerCase:()=>bc,toUpperCase:()=>yc,toZod:()=>zd,transform:()=>Lv,treeifyError:()=>px,trim:()=>vc,tuple:()=>UE,uint32:()=>OL,uint64:()=>DL,ulid:()=>hL,undefined:()=>jL,union:()=>V,unknown:()=>Q,uppercase:()=>uc,url:()=>va,util:()=>O,uuid:()=>iL,uuidv4:()=>rL,uuidv6:()=>oL,uuidv7:()=>aL,validate:()=>Md,validateAsync:()=>Dd,void:()=>UL,withParser:()=>Og,xid:()=>fL,xor:()=>HL});var bo={};Zr(bo,{$ZodAny:()=>eT,$ZodArray:()=>aT,$ZodAsyncError:()=>Gn,$ZodBase64:()=>Fz,$ZodBase64URL:()=>Bz,$ZodBigInt:()=>yg,$ZodBigIntFormat:()=>Jz,$ZodBoolean:()=>Gd,$ZodCIDRv4:()=>Uz,$ZodCIDRv6:()=>qz,$ZodCUID:()=>$z,$ZodCUID2:()=>kz,$ZodCatch:()=>TT,$ZodCheck:()=>tt,$ZodCheckBigIntFormat:()=>tz,$ZodCheckEndsWith:()=>fz,$ZodCheckGreaterThan:()=>ig,$ZodCheckIncludes:()=>dz,$ZodCheckLengthEquals:()=>sz,$ZodCheckLessThan:()=>ng,$ZodCheckLowerCase:()=>cz,$ZodCheckMaxLength:()=>oz,$ZodCheckMaxSize:()=>nz,$ZodCheckMimeType:()=>gz,$ZodCheckMinLength:()=>az,$ZodCheckMinSize:()=>iz,$ZodCheckMultipleOf:()=>Qx,$ZodCheckNumberFormat:()=>ez,$ZodCheckOverwrite:()=>vz,$ZodCheckProperties:()=>mz,$ZodCheckProperty:()=>pz,$ZodCheckRegex:()=>lz,$ZodCheckSizeEquals:()=>rz,$ZodCheckStartsWith:()=>hz,$ZodCheckStringFormat:()=>ic,$ZodCheckUpperCase:()=>uz,$ZodCodec:()=>Yd,$ZodCreditCard:()=>Vz,$ZodCustom:()=>IT,$ZodCustomStringFormat:()=>Kz,$ZodCyclicError:()=>Ag,$ZodDate:()=>rT,$ZodDefault:()=>_T,$ZodDiscriminatedUnion:()=>uT,$ZodE164:()=>Hz,$ZodEmail:()=>wz,$ZodEmoji:()=>Az,$ZodEncodeError:()=>aa,$ZodEnum:()=>mT,$ZodError:()=>fx,$ZodExactOptional:()=>yT,$ZodFile:()=>vT,$ZodFunction:()=>RT,$ZodGUID:()=>Sz,$ZodIBAN:()=>Zz,$ZodIPv4:()=>Dz,$ZodIPv6:()=>Lz,$ZodISODate:()=>Oz,$ZodISODateTime:()=>Pz,$ZodISODuration:()=>Mz,$ZodISOTime:()=>Nz,$ZodIntersection:()=>dT,$ZodJWT:()=>Gz,$ZodKSUID:()=>Iz,$ZodLazy:()=>Jd,$ZodLiteral:()=>gT,$ZodMAC:()=>jz,$ZodMap:()=>fT,$ZodNaN:()=>AT,$ZodNanoID:()=>Ez,$ZodNever:()=>nT,$ZodNonOptional:()=>xT,$ZodNull:()=>Qz,$ZodNullable:()=>ST,$ZodNumber:()=>bg,$ZodNumberFormat:()=>Yz,$ZodObject:()=>hM,$ZodObjectJIT:()=>sT,$ZodOptional:()=>_g,$ZodPipe:()=>wg,$ZodPrefault:()=>wT,$ZodPreprocess:()=>ET,$ZodPromise:()=>CT,$ZodReadonly:()=>$T,$ZodRealError:()=>Kn,$ZodRecord:()=>hT,$ZodRegistry:()=>Ig,$ZodSet:()=>pT,$ZodString:()=>ps,$ZodStringFormat:()=>Ke,$ZodSuccess:()=>zT,$ZodSymbol:()=>Xz,$ZodTemplateLiteral:()=>kT,$ZodTransform:()=>bT,$ZodTuple:()=>Sg,$ZodType:()=>ye,$ZodULID:()=>Rz,$ZodURL:()=>Tz,$ZodUUID:()=>_z,$ZodUndefined:()=>Wz,$ZodUnion:()=>Kd,$ZodUnknown:()=>tT,$ZodVoid:()=>iT,$ZodXID:()=>Cz,$ZodXor:()=>lT,$brand:()=>ux,$constructor:()=>k,$input:()=>MT,$output:()=>NT,Doc:()=>fs,INVALID:()=>En,JSONSchema:()=>QD,JSONSchemaGenerator:()=>hv,NEVER:()=>ds,TimePrecision:()=>KT,URL_BAD_FORMAT:()=>xz,URL_UNPARSEABLE:()=>Fd,ZodCompileAsyncError:()=>sr,ZodCompileUnsupportedError:()=>Ie,_any:()=>dA,_array:()=>bA,_base64:()=>ev,_base64url:()=>tv,_bigint:()=>rA,_boolean:()=>nA,_catch:()=>N5,_check:()=>DD,_cidrv4:()=>Wg,_cidrv6:()=>Qg,_coercedBigint:()=>oA,_coercedBoolean:()=>iA,_coercedDate:()=>gA,_coercedNumber:()=>JT,_coercedString:()=>HT,_creditCard:()=>ZT,_cuid:()=>Vg,_cuid2:()=>Zg,_custom:()=>SA,_date:()=>mA,_decode:()=>Vm,_decodeAsync:()=>Gm,_default:()=>I5,_discriminatedUnion:()=>S5,_e164:()=>nv,_email:()=>Dg,_emoji:()=>Bg,_encode:()=>Hm,_encodeAsync:()=>Zm,_endsWith:()=>fc,_enum:()=>A5,_file:()=>yA,_float32:()=>WT,_float64:()=>QT,_gt:()=>$r,_gte:()=>vi,_guid:()=>Lg,_iban:()=>GT,_includes:()=>dc,_int:()=>XT,_int32:()=>eA,_int64:()=>aA,_intersection:()=>_5,_ipv4:()=>Jg,_ipv6:()=>Xg,_isoDate:()=>rh,_isoDateTime:()=>ih,_isoDuration:()=>ah,_isoTime:()=>oh,_jwt:()=>iv,_ksuid:()=>Yg,_lazy:()=>j5,_length:()=>Ss,_literal:()=>$5,_lowercase:()=>cc,_lt:()=>Er,_lte:()=>gi,_mac:()=>VT,_map:()=>z5,_max:()=>gi,_maxLength:()=>ys,_maxSize:()=>ca,_mime:()=>mc,_min:()=>vi,_minLength:()=>vo,_minSize:()=>kr,_multipleOf:()=>la,_nan:()=>vA,_nanoid:()=>Hg,_nativeEnum:()=>E5,_negative:()=>ov,_never:()=>fA,_nonnegative:()=>sv,_nonoptional:()=>P5,_nonpositive:()=>av,_normalize:()=>gc,_null:()=>uA,_nullable:()=>C5,_number:()=>YT,_optional:()=>R5,_overwrite:()=>lr,_parse:()=>Ql,_parseAsync:()=>ec,_pipe:()=>M5,_positive:()=>rv,_promise:()=>U5,_properties:()=>pc,_property:()=>lv,_readonly:()=>D5,_record:()=>x5,_refine:()=>_A,_regex:()=>lc,_safeDecode:()=>Ym,_safeDecodeAsync:()=>Xm,_safeEncode:()=>Km,_safeEncodeAsync:()=>Jm,_safeParse:()=>tc,_safeParseAsync:()=>nc,_set:()=>T5,_size:()=>bs,_slugify:()=>Sc,_startsWith:()=>hc,_string:()=>BT,_stringFormat:()=>_s,_stringbool:()=>TA,_success:()=>O5,_superRefine:()=>wA,_symbol:()=>lA,_templateLiteral:()=>L5,_toLowerCase:()=>bc,_toUpperCase:()=>yc,_transform:()=>k5,_trim:()=>vc,_tuple:()=>w5,_uint32:()=>tA,_uint64:()=>sA,_ulid:()=>Gg,_undefined:()=>cA,_union:()=>b5,_unknown:()=>hA,_uppercase:()=>uc,_url:()=>nh,_uuid:()=>jg,_uuidv4:()=>Ug,_uuidv6:()=>qg,_uuidv7:()=>Fg,_void:()=>pA,_xid:()=>Kg,_xor:()=>y5,base64Charset:()=>fg,base64urlCharset:()=>Zd,canParseURL:()=>zz,clone:()=>Ge,compile:()=>UT,compileFn:()=>Ng,config:()=>_t,createStandardJSONSchemaMethod:()=>_c,createToJSONSchemaMethod:()=>EA,decode:()=>y3,decodeAsync:()=>_3,describe:()=>xA,encode:()=>b3,encodeAsync:()=>S3,extractDefs:()=>da,finalize:()=>ha,flattenError:()=>Od,formatError:()=>Nd,getDiscriminatedOption:()=>cT,globalConfig:()=>Jt,globalRegistry:()=>sn,handleUnrepresentable:()=>Bt,initializeContext:()=>ua,isBackEdge:()=>$g,isRecursiveSchema:()=>Eg,isValidBase64:()=>Vd,isValidBase64URL:()=>pg,isValidCIDRv6:()=>hg,isValidCreditCard:()=>mg,isValidIBAN:()=>gg,isValidIPv6:()=>Hd,isValidJWT:()=>vg,locales:()=>th,memoizer:()=>Qd,mergeValues:()=>rc,meta:()=>zA,parse:()=>Fm,parseAsync:()=>Bm,parseURLObject:()=>cM,prettifyError:()=>mx,process:()=>Ye,processSchema:()=>Ye,regexes:()=>ji,registry:()=>Pg,safeDecode:()=>x3,safeDecodeAsync:()=>T3,safeEncode:()=>w3,safeEncodeAsync:()=>z3,safeParse:()=>f3,safeParseAsync:()=>p3,standardProps:()=>lg,stripTabAndNewline:()=>Bd,toDotPath:()=>FN,toJSONSchema:()=>ws,toZod:()=>zd,treeifyError:()=>px,urlHostnameOk:()=>ug,urlProtocolOk:()=>dg,util:()=>O,validate:()=>Md,validateAsync:()=>Dd,validateURL:()=>cg,version:()=>bz,withParser:()=>Og});var O={};Zr(O,{BIGINT_FORMAT_RANGES:()=>kd,CONSTANT_CATCH:()=>Um,Class:()=>ex,NUMBER_FORMAT_RANGES:()=>$d,aborted:()=>An,allowsEval:()=>ix,assert:()=>PH,assertEqual:()=>kH,assertIs:()=>CH,assertNever:()=>IH,assertNotEqual:()=>RH,assignProp:()=>an,attachSchema:()=>Rd,base64ToUint8Array:()=>MN,base64urlToUint8Array:()=>WH,cached:()=>Yl,captureStackTrace:()=>Lm,cleanEnum:()=>XH,cleanRegex:()=>mo,clone:()=>Ge,cloneDef:()=>MH,codePointLength:()=>us,constantCatch:()=>lx,createTransparentProxy:()=>FH,defineLazy:()=>tx,defineLazyInternal:()=>ke,derived:()=>n3,esc:()=>Tn,escapeRegex:()=>Li,explicitlyAborted:()=>ax,extend:()=>VH,finalizeIssue:()=>Zn,floatSafeRemainder:()=>Td,getElementAtPath:()=>DH,getEnumValues:()=>Gl,getLengthableOrigin:()=>Id,getParsedType:()=>qH,getSizableOrigin:()=>Cd,hexToUint8Array:()=>e3,hide:()=>Pd,installLazyProp:()=>a3,isObject:()=>cs,isPlainObject:()=>Di,issue:()=>Wl,joinValues:()=>R,jsonStringifyReplacer:()=>Kl,members:()=>sx,merge:()=>GH,mergeDefs:()=>ar,normalizeParams:()=>Z,nullish:()=>Dm,numKeys:()=>UH,objectClone:()=>OH,omit:()=>HH,optionalKeys:()=>ox,own:()=>oa,parsedType:()=>D,partial:()=>KH,pick:()=>BH,prefixIssues:()=>Vn,primitiveTypes:()=>rx,promiseAllObject:()=>LH,propertyKeyTypes:()=>Ed,randomString:()=>jH,rawShape:()=>Jl,required:()=>YH,safeExtend:()=>ZH,shallowClone:()=>Ad,sizeCaps:()=>Xl,slugify:()=>nx,stringifyPrimitive:()=>N,toZod:()=>zd,uint8ArrayToBase64:()=>DN,uint8ArrayToBase64url:()=>QH,uint8ArrayToHex:()=>t3,unwrapMessage:()=>Zl});function kH(t){return t}function RH(t){return t}function zd(){return t=>t}function CH(t){}function IH(t){throw new Error("Unexpected value in exhaustive check")}function PH(t){}function Gl(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,i])=>e.indexOf(+r)===-1).map(([r,i])=>i)}function R(t,e="|"){return t.map(n=>N(n)).join(e)}function Kl(t,e){return typeof e=="bigint"?e.toString():e}var Qw=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Yl(t){return new Qw(t)}function Dm(t){return t==null}function mo(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Td(t,e){let n=t/e,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var IN=Symbol("evaluating");function tx(t,e,n){let r;Object.defineProperty(t,e,{get(){if(r!==IN)return r===void 0&&(r=IN,r=n()),r},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function OH(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function an(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Jl(t){let e=Object.getOwnPropertyDescriptor(t,"shape");return e?.get?e.get.raw:e?.value}function po(t){return Jl(t._zod.def)??t._zod.def.shape}function PN(t,e,n){Object.defineProperty(t,e,{get(){let r=n();return an(this,e,r),r},enumerable:!0,configurable:!0})}function ON(t,e,n){e in t?an(t,e,n):t[e]=n}function ls(t,e,n,r){let i=po(e);for(let o of n){let a=Object.getOwnPropertyDescriptor(i,o);a.enumerable&&(a.get?PN(t,o,()=>{let s=e._zod.def.shape[o];return r?r(s,o):s}):ON(t,o,r?r(a.value,o):a.value))}}function NH(t,e){for(let n of Reflect.ownKeys(e)){let r=Object.getOwnPropertyDescriptor(e,n);r.enumerable&&(r.get?PN(t,n,()=>e[n]):ON(t,n,r.value))}}function ar(...t){let e={};for(let n of t){let r=Object.getOwnPropertyDescriptors(n);Object.assign(e,r)}return Object.defineProperties({},e)}function MH(t){return ar(t._zod.def)}function DH(t,e){return e?e.reduce((n,r)=>n?.[r],t):t}function LH(t){let e=Object.keys(t),n=e.map(r=>t[r]);return Promise.all(n).then(r=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=r[o];return i})}function jH(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function Tn(t){return JSON.stringify(t)}function nx(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Lm="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function cs(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var ix=Yl(()=>{if(Jt.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function Di(t){if(cs(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(cs(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Ad(t){return Di(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function UH(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}var qH=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Ed=new Set(["string","number","symbol"]),rx=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Li(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ge(t,e,n){let r=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(r._zod.parent=t),r}function Z(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function FH(t){let e;return new Proxy({},{get(n,r,i){return e??(e=t()),Reflect.get(e,r,i)},set(n,r,i,o){return e??(e=t()),Reflect.set(e,r,i,o)},has(n,r){return e??(e=t()),Reflect.has(e,r)},deleteProperty(n,r){return e??(e=t()),Reflect.deleteProperty(e,r)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,r){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,r)},defineProperty(n,r,i){return e??(e=t()),Reflect.defineProperty(e,r,i)}})}function N(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function ox(t){return Object.keys(t).filter(e=>t[e]._zod.optin!==void 0&&t[e]._zod.optout==="optional")}var $d={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},kd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function BH(t,e){let n=t._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o={};return ls(o,t,jm(t,e)),Ge(t,ar(n,{shape:o,checks:[]}))}function jm(t,e){let n=po(t),r=[];for(let i of Reflect.ownKeys(e)){if(!Object.getOwnPropertyDescriptor(n,i)?.enumerable)throw new Error(`Unrecognized key: "${String(i)}"`);e[i]&&r.push(i)}return r}function HH(t,e){let n=t._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(jm(t,e)),a={};return ls(a,t,Reflect.ownKeys(po(t)).filter(s=>!o.has(s))),Ge(t,ar(n,{shape:a,checks:[]}))}function VH(t,e){if(!Di(e))throw new Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let i=po(t);for(let o of Reflect.ownKeys(e))if(Object.getOwnPropertyDescriptor(i,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ge(t,ar(t._zod.def,{shape:NN(t,e)}))}function NN(t,e){let n={};return ls(n,t,Reflect.ownKeys(po(t))),NH(n,e),n}function ZH(t,e){if(!Di(e))throw new Error("Invalid input to safeExtend: expected a plain object");return Ge(t,ar(t._zod.def,{shape:NN(t,e)}))}function GH(t,e){if(!e?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};ls(n,t,Reflect.ownKeys(po(t))),ls(n,e,Reflect.ownKeys(po(e)));let r=ar(t._zod.def,{shape:n,get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Ge(t,r)}function KH(t,e,n,r="partial"){let o=e._zod.def.checks;if(o&&o.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);let s=n?new Set(jm(e,n)):void 0,l={};return ls(l,e,Reflect.ownKeys(po(e)),t&&((c,u)=>s&&!s.has(u)?c:new t({type:"optional",innerType:c}))),Ge(e,ar(e._zod.def,{shape:l,checks:[]}))}function YH(t,e,n){let r=n?new Set(jm(e,n)):void 0,i={};return ls(i,e,Reflect.ownKeys(po(e)),(o,a)=>r&&!r.has(a)?o:new t({type:"nonoptional",innerType:o})),Ge(e,ar(e._zod.def,{shape:i}))}function An(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function ax(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function Vn(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function Zl(t){return typeof t=="string"?t:t?.message}function Xl(t){let e=[];for(let n of t??[]){let r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;let i=r.maximum??r.length??r.size;i>=0&&e.push([i,n])}return e}function Rd(t,e,n){var r;for(let i=e;i<t.length;i++)(r=t[i]).schema??(r.schema=n)}function Zn(t,e,n){var r;let i=t.inst?._zod?.traits;i?.has("$ZodType")&&(i.has("$ZodCheck")?(r=t).schema??(r.schema=t.inst):t.schema=t.inst);let o=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,a=t.message?t.message:Zl(t.inst?._zod.def?.error?.(t))??Zl(o?.(t))??Zl(e?.error?.(t))??Zl(n.customError?.(t))??Zl(n.localeError?.(t))??"Invalid input",s={};for(let l of Object.keys(t))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(s[l]=t[l]);return s.path??(s.path=[]),s.message=a,e?.reportInput&&(s.input=t.input),s}function Cd(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}var JH=/[\uD800-\uDBFF]/;function us(t){let e=t.length;if(!JH.test(t))return e;let n=e;for(let r=0;r<e-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Id(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function D(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}function Wl(...t){let[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}function XH(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function MN(t){let e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}function DN(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function WH(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return MN(e+n)}function QH(t){return DN(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function e3(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)n[r/2]=Number.parseInt(e.slice(r,r+2),16);return n}function t3(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var ex=class{constructor(...e){}};function sx(t,e){for(let n in e){let r=Object.getOwnPropertyDescriptor(e,n);r.get?Object.defineProperty(t,n,{...r,enumerable:!1}):i3(t,n,r.value)}}function oa(t,e,n,r=!0){return Object.defineProperty(t,e,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Pd(t,e,n){return oa(t,e,n,!1)}function n3(t,e){for(let n in t){let r=t[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get(){return oa(this,n,r(this))},set(i){oa(this,n,i)}})}return e}function i3(t,e,n){Object.defineProperty(t,e,{configurable:!0,get(){return this==null?n:oa(this,e,n.bind(this))},set(r){oa(this,e,r)}})}function r3(t,e){let n=Object.getPrototypeOf(t);return e in n?void 0:n}var Ww,ra=!1,o3={configurable:!0,get(){ra=!0}};function ke(t,e,n){let r=Object.getPrototypeOf(t._zod);if(e in r&&Ww!==t._zod){Ww=void 0;return}Ww=t._zod,Object.defineProperty(r,e,{configurable:!0,get(){Object.defineProperty(this,e,o3);let i=ra;ra=!1;try{let o=n(this);return ra?delete this[e]:Object.defineProperty(this,e,{configurable:!0,writable:!0,value:o}),ra=ra||i,o}catch(o){throw delete this[e],ra=ra||i,o}},set(i){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:i})}})}function a3(t,e,n,r){let i=r3(t,e);i&&Object.defineProperty(i,e,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,e,o),o.value=n(this),Object.defineProperty(this,e,o),o.value},set(o){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:r,value:o})}})}var Um="~constantCatch";function lx(t){let e=()=>t;return e[Um]=!0,e}var LN,ds=Object.freeze({status:"aborted"}),cx={value:void 0,enumerable:!1},jN="captureStackTrace"in Error?Error:null;function s3(t){let e=jN;if(e){let n=e.stackTraceLimit;if(typeof n=="number"){try{e.stackTraceLimit=0}catch{return jN=null,new t}try{return new t}finally{e.stackTraceLimit=n}}}return new t}function k(t,e,n,r){let i={};function o(h){this.def=h,this.constr=d,this.traits=new Set}o.prototype=i;let a=n,s=a&&new WeakSet;function l(h,f){if(h._zod){if(h._zod.traits.has(t))return}else{cx.value=new o(f);try{Object.defineProperty(h,"_zod",cx)}finally{cx.value=void 0}}if(h._zod.traits.add(t),e(h,f),s){let g=Object.getPrototypeOf(h),y=h._zod.constr.prototype,v=g;for(;v&&v!==y;)v=Object.getPrototypeOf(v);let b=v??g;s.has(b)||(s.add(b),sx(b,a))}let m=d.prototype;for(let g in m)Object.prototype.hasOwnProperty.call(m,g)&&(g in h||(h[g]=m[g].bind(h)))}let c=r?.Parent??Object;class u extends c{}Object.defineProperty(u,"name",{value:t});function d(h){let f=r?.Parent?s3(u):this;l(f,h);let m=f._zod.deferred;if(m){for(let y of m)y();f._zod.deferred=void 0}let g=globalThis.__zod_globalConfig?.postProcessor;return g&&g(f),f}return Object.defineProperty(d,"init",{value:l}),Object.defineProperty(d,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(t)}),Object.defineProperty(d,"name",{value:t}),d}var ux=Symbol("zod_brand"),Gn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},aa=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(LN=globalThis).__zod_globalConfig??(LN.__zod_globalConfig={});var Jt=globalThis.__zod_globalConfig;function _t(t){return t&&Object.assign(Jt,t),Jt}function l3(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Kl,2)),t.message}function c3(t){this._zod.message=t}var u3={get:l3,set:c3,enumerable:!0,configurable:!0},hx={value:void 0,enumerable:!1},UN=new WeakSet([Object.prototype,Error.prototype]),qN=(t,e)=>{t.name="$ZodError",hx.value=e,Object.defineProperty(t,"issues",hx),hx.value=void 0,Object.defineProperty(t,"message",u3);let n=Object.getPrototypeOf(t);UN.has(n)||(UN.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},fx=k("$ZodError",qN),Kn=k("$ZodError",qN,void 0,{Parent:Error});function d3(t,e,n){return Object.prototype.hasOwnProperty.call(t,e)||(e==="__proto__"?Object.defineProperty(t,e,{value:n(),writable:!0,enumerable:!0,configurable:!0}):t[e]=n()),t[e]}function Od(t,e=n=>n.message){let n={},r=[];for(let i of t.issues)i.path.length>0?d3(n,i.path[0],()=>[]).push(e(i)):r.push(e(i));return{formErrors:r,fieldErrors:n}}function Nd(t,e=n=>n.message){let n={_errors:[]},r=(i,o=[])=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>r({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(e(a));else{let l=n,c=0;for(;c<s.length;){let u=s[c],d=c===s.length-1;if(u==="_errors"){d&&l._errors.push(e(a)),c++;continue}Object.prototype.hasOwnProperty.call(l,u)||Object.defineProperty(l,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let h=l[u];d&&h._errors.push(e(a)),l=h,c++}}}};return r(t),n}function px(t,e=n=>n.message){let n={errors:[]},r=(i,o=[])=>{var a;for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>r({issues:l},[...o,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...o,...s.path]);else{let l=[...o,...s.path];if(l.length===0){n.errors.push(e(s));continue}let c=n,u=0;for(;u<l.length;){let d=l[u],h=u===l.length-1;typeof d=="string"?(c.properties??(c.properties={}),Object.prototype.hasOwnProperty.call(c.properties,d)||Object.defineProperty(c.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),c=c.properties[d]):(c.items??(c.items=[]),(a=c.items)[d]??(a[d]={errors:[]}),c=c.items[d]),h&&c.errors.push(e(s)),u++}}};return r(t),n}function FN(t){let e=[],n=t.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?e.push(`[${r}]`):typeof r=="symbol"?e.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?e.push(`[${JSON.stringify(r)}]`):(e.length&&e.push("."),e.push(r));return e.join("")}function mx(t){let e=[],n=[...t.issues].sort((r,i)=>(r.path??[]).length-(i.path??[]).length);for(let r of n)e.push(`\u2716 ${r.message}`),r.path?.length&&e.push(`  \u2192 at ${FN(r.path)}`);return e.join(`
`)}function qm(t,e){return{callee:e?.callee??t,Err:e?.Err}}var Ql=t=>{let e=(n,r,i,o)=>{let a=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Gn;if(s.issues.length){let l=new(o?.Err??t)(s.issues.map(c=>Zn(c,a,_t())));throw Lm(l,o?.callee??e),l}return s.value};return e},Fm=Ql(Kn),ec=t=>{let e=async(n,r,i,o)=>{let a=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let l=new(o?.Err??t)(s.issues.map(c=>Zn(c,a,_t())));throw Lm(l,o?.callee??e),l}return s.value};return e},Bm=ec(Kn),tc=t=>(e,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=e._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Gn;return o.issues.length?BN(t,o.issues,i):{success:!0,data:o.value}},f3=tc(Kn);function BN(t,e,n){let r;return{success:!1,get error(){return r||(r=new t(e.map(i=>Zn(i,n,_t()))),e=void 0,n=void 0),r},set error(i){r=i,e=void 0,n=void 0}}}var nc=t=>async(e,n,r)=>{let i=r?{...r,async:!0}:{async:!0},o=e._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?BN(t,o.issues,i):{success:!0,data:o.value}},p3=nc(Kn),m3=Symbol.for("zod.compile.invalid"),g3=Symbol.for("zod.compile.fallback"),Md=((t,e,n)=>{let r=t._zod.bag.validator;if(r!==void 0){if(r(e)!==m3)return!0;if(r.definite===!0&&n===void 0)return!1}return v3(t,e,n)});function v3(t,e,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=t._zod.bag.fallbackRun,o;if(i?(r[g3]=!0,o=i({value:e,issues:[]},r)):o=t._zod.run({value:e,issues:[]},r),o instanceof Promise)throw new Gn;return o.issues.length===0}var Dd=async(t,e,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=t._zod.run({value:e,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Hm=t=>{let e=Ql(t),n=(r,i,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return e(r,i,s,qm(n,a))};return n},b3=Hm(Kn),Vm=t=>{let e=Ql(t),n=(r,i,o,a)=>e(r,i,o,qm(n,a));return n},y3=Vm(Kn),Zm=t=>{let e=ec(t),n=async(r,i,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return await e(r,i,s,qm(n,a))};return n},S3=Zm(Kn),Gm=t=>{let e=ec(t),n=async(r,i,o,a)=>await e(r,i,o,qm(n,a));return n},_3=Gm(Kn),Km=t=>(e,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return tc(t)(e,n,i)},w3=Km(Kn),Ym=t=>(e,n,r)=>tc(t)(e,n,r),x3=Ym(Kn),Jm=t=>async(e,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return nc(t)(e,n,i)},z3=Jm(Kn),Xm=t=>async(e,n,r)=>nc(t)(e,n,r),T3=Xm(Kn);var ji={};Zr(ji,{anyString:()=>Fx,base64:()=>Px,base64url:()=>Ox,bigint:()=>Hx,boolean:()=>Vx,browserEmail:()=>P3,cidrv4:()=>Cx,cidrv6:()=>Ix,creditCard:()=>Wm,cuid:()=>vx,cuid2:()=>bx,currencyCode:()=>Lx,date:()=>jx,datetime:()=>qx,domain:()=>Mx,duration:()=>zx,e164:()=>Dx,email:()=>Ax,emoji:()=>Ex,extendedDuration:()=>A3,guid:()=>Tx,hex:()=>Jx,hostname:()=>Nx,html5Email:()=>R3,httpProtocol:()=>Ld,iban:()=>Qm,idnEmail:()=>I3,integer:()=>jd,ipv4:()=>$x,ipv6:()=>kx,ksuid:()=>_x,lowercase:()=>Kx,mac:()=>Rx,md5_base64:()=>D3,md5_base64url:()=>L3,md5_hex:()=>M3,nanoid:()=>wx,nanoidOfLength:()=>xx,null:()=>Zx,number:()=>go,rfc5322Email:()=>C3,sha1_base64:()=>U3,sha1_base64url:()=>q3,sha1_hex:()=>j3,sha256_base64:()=>B3,sha256_base64url:()=>H3,sha256_hex:()=>F3,sha384_base64:()=>Z3,sha384_base64url:()=>G3,sha384_hex:()=>V3,sha512_base64:()=>Y3,sha512_base64url:()=>J3,sha512_hex:()=>K3,string:()=>Bx,time:()=>Ux,ulid:()=>yx,undefined:()=>Gx,unicodeEmail:()=>HN,uppercase:()=>Yx,uuid:()=>hs,uuid4:()=>E3,uuid6:()=>$3,uuid7:()=>k3,xid:()=>Sx});var vx=/^[cC][0-9a-z]{6,}$/,bx=/^[0-9a-z]+$/,yx=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Sx=/^[0-9a-vA-V]{20}$/,_x=/^[A-Za-z0-9]{27}$/,wx=/^[a-zA-Z0-9_-]{21}$/;function xx(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}var zx=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,A3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Tx=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,hs=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,E3=hs(4),$3=hs(6),k3=hs(7),Ax=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,R3=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,C3=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,HN=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,I3=HN,P3=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,O3="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Ex(){return new RegExp(O3,"u")}var $x=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Rx=t=>{let e=Li(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},Cx=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ix=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Px=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ox=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Nx=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Mx=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Ld=/^https?$/,Dx=/^\+[1-9]\d{6,14}$/,Wm=/^\d(?:[ -]?\d){11,18}$/,Lx=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Qm=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,VN="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function N3(t){return new RegExp(`^${t}$`)}var jx=N3(VN);function gx(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?`${e}:[0-5]\\d(?:\\.\\d+)?`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ux(t){return new RegExp(`^${gx(t)}$`)}function qx(t){let e=["Z"];t.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${gx({precision:t.precision,seconds:!0})}(?:${e.join("|")})`,r=t.local?`${n}|${gx({precision:t.precision})}`:n;return new RegExp(`^${VN}T(?:${r})$`)}var Fx=/^[\s\S]{0,}$/,Bx=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Hx=/^-?\d+n?$/,jd=/^-?\d+$/,go=/^-?\d+(?:\.\d+)?$/,Vx=/^(?:true|false)$/i,Zx=/^null$/i;var Gx=/^undefined$/i;var Kx=/^[^A-Z]*$/,Yx=/^[^a-z]*$/,Jx=/^[0-9a-fA-F]*$/;function Ud(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function qd(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var M3=/^[0-9a-fA-F]{32}$/,D3=Ud(22,"=="),L3=qd(22),j3=/^[0-9a-fA-F]{40}$/,U3=Ud(27,"="),q3=qd(27),F3=/^[0-9a-fA-F]{64}$/,B3=Ud(43,"="),H3=qd(43),V3=/^[0-9a-fA-F]{96}$/,Z3=Ud(64,""),G3=qd(64),K3=/^[0-9a-fA-F]{128}$/,Y3=Ud(86,"=="),J3=qd(86);var tt=k("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Xx=t=>{let e=t.value;return!Dm(e)&&e.size!==void 0},Wx=t=>{let e=t.value;return!Dm(e)&&e.length!==void 0},eg={number:"number",bigint:"bigint",object:"date"},ng=k("$ZodCheckLessThan",(t,e)=>{tt.init(t,e);let n=eg[typeof e.value];t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:eg[typeof r.value]??n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ig=k("$ZodCheckGreaterThan",(t,e)=>{tt.init(t,e);let n=eg[typeof e.value];t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:eg[typeof r.value]??n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Qx=k("$ZodCheckMultipleOf",(t,e)=>{tt.init(t,e),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?e.value!==BigInt(0)&&n.value%e.value===BigInt(0):Td(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),ez=k("$ZodCheckNumberFormat",(t,e)=>{tt.init(t,e),e.format=e.format||"float64";let n=e.format?.includes("int"),r=n?"int":"number",[i,o]=$d[e.format];t._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:r,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort});return}}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),tz=k("$ZodCheckBigIntFormat",(t,e)=>{tt.init(t,e);let[n,r]=kd[e.format];t._zod.check=i=>{let o=i.value;o<n&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),o>r&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:r,inclusive:!0,inst:t,continue:!e.abort})}}),nz=k("$ZodCheckMaxSize",(t,e)=>{var n;tt.init(t,e),(n=t._zod.def).when??(n.when=Xx),t._zod.check=r=>{let i=r.value;i.size<=e.maximum||r.issues.push({origin:Cd(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),iz=k("$ZodCheckMinSize",(t,e)=>{var n;tt.init(t,e),(n=t._zod.def).when??(n.when=Xx),t._zod.check=r=>{let i=r.value;i.size>=e.minimum||r.issues.push({origin:Cd(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),rz=k("$ZodCheckSizeEquals",(t,e)=>{var n;tt.init(t,e),(n=t._zod.def).when??(n.when=Xx),t._zod.check=r=>{let i=r.value,o=i.size;if(o===e.size)return;let a=o>e.size;r.issues.push({origin:Cd(i),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),oz=k("$ZodCheckMaxLength",(t,e)=>{var n;tt.init(t,e),(n=t._zod.def).when??(n.when=Wx),t._zod.check=r=>{let i=r.value,o=i.length;if((typeof i=="string"&&o>e.maximum?us(i):o)<=e.maximum)return;let s=Id(i);r.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),az=k("$ZodCheckMinLength",(t,e)=>{var n;tt.init(t,e),(n=t._zod.def).when??(n.when=Wx),t._zod.check=r=>{let i=r.value,o=i.length;if((typeof i=="string"&&o>=e.minimum&&o<e.minimum*2?us(i):o)>=e.minimum)return;let s=Id(i);r.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),sz=k("$ZodCheckLengthEquals",(t,e)=>{var n;tt.init(t,e),(n=t._zod.def).when??(n.when=Wx),t._zod.check=r=>{let i=r.value,o=i.length,a=typeof i=="string"&&o>=e.length&&o<=e.length*2?us(i):o;if(a===e.length)return;let s=Id(i),l=a>e.length;r.issues.push({origin:s,...l?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),ic=k("$ZodCheckStringFormat",(t,e)=>{var n,r;tt.init(t,e),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),lz=k("$ZodCheckRegex",(t,e)=>{ic.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),cz=k("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Kx),ic.init(t,e)}),uz=k("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Yx),ic.init(t,e)}),dz=k("$ZodCheckIncludes",(t,e)=>{tt.init(t,e);let n=Li(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position},}${n}`:n);e.pattern=r,t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),hz=k("$ZodCheckStartsWith",(t,e)=>{tt.init(t,e);let n=new RegExp(`^${Li(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),fz=k("$ZodCheckEndsWith",(t,e)=>{tt.init(t,e);let n=new RegExp(`.*${Li(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}});function tg(t,e,n){t.issues.length&&e.issues.push(...Vn(n,t.issues))}var pz=k("$ZodCheckProperty",(t,e)=>{tt.init(t,e),t._zod.check=n=>{let r=e.schema._zod.run({value:n.value[e.property],issues:[]},{});if(r instanceof Promise)return r.then(i=>tg(i,n,e.property));tg(r,n,e.property)}}),mz=k("$ZodCheckProperties",(t,e)=>{tt.init(t,e),Pd(t,Symbol.iterator,function*(){yield t});let n;t._zod.check=r=>{if(r.value==null){r.issues.push({expected:"object",code:"invalid_type",input:r.value,inst:t});return}n??(n=Reflect.ownKeys(e.shape).map(a=>[a,e.shape[a]]));let i=r.value,o;for(let[a,s]of n){let l=s._zod.run({value:i[a],issues:[]},{});l instanceof Promise?(o??(o=[]),o.push(l.then(c=>tg(c,r,a)))):tg(l,r,a)}if(o)return Promise.all(o).then(()=>{})}}),gz=k("$ZodCheckMimeType",(t,e)=>{tt.init(t,e);let n=new Set(e.mime);t._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:e.mime,input:r.value.type,inst:t,continue:!e.abort})}}),vz=k("$ZodCheckOverwrite",(t,e)=>{tt.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});var fs=class{constructor(e=[],n={}){this.content=[],this.indent=0,this.args=e,this.closed=n}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
`).filter(a=>a),i=Math.min(...r.map(a=>a.length-a.trimStart().length)),o=r.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let e=Function,n=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
${n.join(`
`)}
};`)(...Object.values(this.closed))}};var bz={major:4,minor:6,patch:6};var ye=k("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=bz;let r=t._zod.def.checks,i=t._zod.traits.has("$ZodCheck")?[t,...r??[]]:r?.length?[...r]:[];for(let o of i)for(let a of o._zod.onattach)a(t);if(i.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let o=(s,l,c)=>{if(s.memo)return s;let u=An(s),d;for(let h of l){if(h._zod.def.when){if(ax(s)||!h._zod.def.when(s))continue}else if(u)continue;let f=s.issues.length,m=h._zod.check(s);if(m instanceof Promise&&c?.async===!1)throw new Gn;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,s.issues.length!==f&&(Rd(s.issues,f,t),u||(u=An(s,f)))});else{if(s.issues.length===f)continue;Rd(s.issues,f,t),u||(u=An(s,f))}}return d?d.then(()=>s):s},a=(s,l,c)=>{if(An(s))return s.aborted=!0,s;let u=o(l,i,c);if(u instanceof Promise){if(c.async===!1)throw new Gn;return u.then(d=>t._zod.parse(d,c))}return t._zod.parse(u,c)};t._zod.run=(s,l)=>{if(l.skipChecks)return t._zod.parse(s,l);if(l.direction==="backward"){let u=t._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>a(d,s,l)):a(u,s,l)}let c=t._zod.parse(s,l);if(c instanceof Promise){if(l.async===!1)throw new Gn;return c.then(u=>o(u,i,l))}return o(c,i,l)}}},{get"~standard"(){return Pd(this,"~standard",lg(this))},set"~standard"(t){oa(this,"~standard",t)}}),lM=(t,e)=>t.issues.length?{issues:t.issues.map(n=>Zn(n,e,_t()))}:{value:t.value};async function X3(t,e){let n={async:!0};return lM(await t._zod.run({value:e,issues:[]},n),n)}function lg(t){return{validate:e=>{let n={async:!1};try{let r=t._zod.run({value:e,issues:[]},n);if(!(r instanceof Promise))return lM(r,n)}catch{}return X3(t,e)},vendor:"zod",version:1}}var ps=k("$ZodString",(t,e)=>{ye.init(t,e),t._zod.pattern=e.pattern??Fx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),Ke=k("$ZodStringFormat",(t,e)=>{ic.init(t,e),ps.init(t,e)}),Sz=k("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Tx),Ke.init(t,e)}),_z=k("$ZodUUID",(t,e)=>{if(e.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=hs(r))}else e.pattern??(e.pattern=hs());Ke.init(t,e)}),wz=k("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Ax),Ke.init(t,e)}),xz=1,Fd=2;function zz(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function cg(t,e){return!("normalize"in e)&&!("hostname"in e)&&!("protocol"in e)?zz(t)||Fd:cM(t,e)}function cM(t,e){if(!e.normalize&&e.protocol?.source===Ld.source&&!/^https?:\/\//i.test(t))return xz;try{if(typeof URL<"u"){let n=URL;if(typeof n.parse=="function")return n.parse(t)??Fd}return new URL(t)}catch{return Fd}}var W3=/[\t\n\r]/g;function Bd(t){return t.replace(W3,"")}function ug(t,e){return e.lastIndex=0,e.test(t.hostname)}function dg(t,e){return e.lastIndex=0,e.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}var Tz=k("$ZodURL",(t,e)=>{Ke.init(t,e),t._zod.check=n=>{try{let r=n.value.trim(),i=cg(r,e);if(i===xz){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!e.abort});return}if(i===Fd){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort});return}if(i===!0){n.value=Bd(r);return}e.hostname&&!ug(i,e.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort}),e.protocol&&!dg(i,e.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort}),n.value=e.normalize?i.href:Bd(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),Az=k("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Ex()),Ke.init(t,e)}),Ez=k("$ZodNanoID",(t,e)=>{if(e.length!==void 0&&(!Number.isInteger(e.length)||e.length<1))throw new Error(`Invalid nanoid length: ${e.length}`);e.pattern??(e.pattern=e.length===void 0?wx:xx(e.length)),Ke.init(t,e)}),$z=k("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=vx),Ke.init(t,e)}),kz=k("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=bx),Ke.init(t,e)}),Rz=k("$ZodULID",(t,e)=>{e.pattern??(e.pattern=yx),Ke.init(t,e)}),Cz=k("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Sx),Ke.init(t,e)}),Iz=k("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=_x),Ke.init(t,e)}),Pz=k("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=qx(e)),Ke.init(t,e)}),Oz=k("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=jx),Ke.init(t,e)}),Nz=k("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Ux(e)),Ke.init(t,e)}),Mz=k("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=zx),Ke.init(t,e)}),Dz=k("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=$x),Ke.init(t,e)}),Q3=/^[0-9a-fA-F:.]+$/;function Hd(t){return Q3.test(t)?zz(`http://[${t}]`):!1}var Lz=k("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=kx),Ke.init(t,e),t._zod.check=n=>{Hd(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}),jz=k("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=Rx(e.delimiter)),Ke.init(t,e)}),Uz=k("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Cx),Ke.init(t,e)});function hg(t){let e=t.split("/");if(e.length!==2)return!1;let[n,r]=e;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Hd(n)}var qz=k("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Ix),Ke.init(t,e),t._zod.check=n=>{hg(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}});function Vd(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var fg=/^[0-9a-zA-Z+/]*={0,2}$/,Fz=k("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=fg),Ke.init(t,e),t._zod.check=n=>{Vd(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}}),Zd=/^[A-Za-z0-9_-]*$/;function pg(t){if(!Zd.test(t))return!1;let e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Vd(n)}var Bz=k("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Zd),Ke.init(t,e),t._zod.check=n=>{pg(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),Hz=k("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Dx),Ke.init(t,e)}),eV=/[- ]/g;function tV(t){let e=t.length,n=1,r=0;for(;e;){let i=t.charCodeAt(--e)-48;n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10===0}function mg(t){return Wm.test(t)?tV(t.replace(eV,"")):!1}var Vz=k("$ZodCreditCard",(t,e)=>{e.pattern??(e.pattern=Wm),Ke.init(t,e),t._zod.check=n=>{mg(n.value)||n.issues.push({code:"invalid_format",format:"credit_card",input:n.value,inst:t,continue:!e.abort})}});function nV(t){let e=0,n=t.length;for(let r=4;r<n;r++){let i=t.charCodeAt(r);e=(i>=65?e*100+(i-55):e*10+(i-48))%97}for(let r=0;r<4;r++){let i=t.charCodeAt(r);e=(i>=65?e*100+(i-55):e*10+(i-48))%97}return e===1}function gg(t){return Qm.test(t)?nV(t):!1}var Zz=k("$ZodIBAN",(t,e)=>{e.pattern??(e.pattern=Qm),Ke.init(t,e),t._zod.check=n=>{gg(n.value)||n.issues.push({code:"invalid_format",format:"iban",input:n.value,inst:t,continue:!e.abort})}});function vg(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}var Gz=k("$ZodJWT",(t,e)=>{Ke.init(t,e),t._zod.check=n=>{vg(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),Kz=k("$ZodCustomStringFormat",(t,e)=>{Ke.init(t,e),t._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:t,continue:!e.abort})}}),bg=k("$ZodNumber",(t,e)=>{ye.init(t,e),t._zod.pattern=go,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),n}}),Yz=k("$ZodNumberFormat",(t,e)=>{ez.init(t,e),bg.init(t,e)}),Gd=k("$ZodBoolean",(t,e)=>{ye.init(t,e),t._zod.pattern=Vx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),n}}),yg=k("$ZodBigInt",(t,e)=>{ye.init(t,e),t._zod.pattern=Hx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}}),Jz=k("$ZodBigIntFormat",(t,e)=>{tz.init(t,e),yg.init(t,e)}),Xz=k("$ZodSymbol",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;return typeof i=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),n}}),Wz=k("$ZodUndefined",(t,e)=>{ye.init(t,e),t._zod.pattern=Gx,t._zod.values=new Set([void 0]),t._zod.parse=(n,r)=>{let i=n.value;return typeof i>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),n}}),Qz=k("$ZodNull",(t,e)=>{ye.init(t,e),t._zod.pattern=Zx,t._zod.values=new Set([null]),t._zod.parse=(n,r)=>{let i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),n}}),eT=k("$ZodAny",(t,e)=>{ye.init(t,e),t._zod.parse=n=>n}),tT=k("$ZodUnknown",(t,e)=>{ye.init(t,e),t._zod.parse=n=>n}),nT=k("$ZodNever",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),iT=k("$ZodVoid",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;return typeof i>"u"||n.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),n}}),rT=k("$ZodDate",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),n}});function oT(t,e){let n=Xl(t._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(o=>o[0])),i=t._zod.parse;t._zod.parse=(o,a)=>{let s=e(o.value);if(s>r&&!a?.skipChecks&&a?.direction!=="backward"){for(let[l,c]of Xl(t._zod.def.checks))if(s>l&&c._zod.def.when(o)){let u=o.issues.length;return c._zod.check(o),o.issues[u].continue=!1,Rd(o.issues,u,t),o}}return i(o,a)}}var iV=t=>Array.isArray(t)?t.length:-1,rV=t=>t instanceof Map?t.size:-1,oV=t=>t instanceof Set?t.size:-1;function GN(t,e,n){t.issues.length&&e.issues.push(...Vn(n,t.issues)),e.value[n]=t.value}var aT=k("$ZodArray",(t,e)=>{ye.init(t,e);let n=Jt.memoizer;n?.attach(t),t._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),r;r.value=n?n.alloc(t,r,Array(o.length),i):Array(o.length);let a=[],s=i?.abortEarly;for(let l=0;l<o.length;l++){let c=o[l],u=e.element._zod.run({value:c,issues:[]},i);if(u instanceof Promise)a.push(u.then(d=>GN(d,r,l)));else if(GN(u,r,l),s&&u.issues.length!==0&&An(u))break}return a.length?Promise.all(a).then(()=>r):r},oT(t,iV)});function sg(t,e,n,r,i,o){let a=n in r,s=o==="optional";if(!(!a&&s&&i==="optional")){if(t.issues.length){if(i!==void 0&&s&&!a)return;e.issues.push(...Vn(n,t.issues))}if(!a&&i===void 0){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?(a||i==="defaulted"&&!s)&&(e.value[n]=void 0):e.value[n]=t.value}}var aV=[];function uM(t){let e=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),r=n.length?n:aV,i=r.length?[...e,...r]:e;for(let a of i)if(!t.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let o=ox(t.shape);return{...t,allKeys:i,symbolKeys:r,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(o)}}function dM(t,e,n,r,i,o,a){let s=[],l=i.keySet,c=i.catchall._zod,u=c.def.type,d=c.optin,h=c.optout,f=0;for(let m in e){if(a&&n.issues.length!==f){if(An(n,f))break;f=n.issues.length}if(l.has(m))continue;if(m==="__proto__"){u==="never"&&s.push(m);continue}if(u==="never"){s.push(m);continue}let g=c.run({value:e[m],issues:[]},r);g instanceof Promise?t.push(g.then(y=>sg(y,n,m,e,d,h))):sg(g,n,m,e,d,h)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:o,continue:!0}),t.length?Promise.all(t).then(()=>n):n}var hM=k("$ZodObject",(t,e)=>{ye.init(t,e);let n=Object.getOwnPropertyDescriptor(e,"shape"),r=n?.get?n.get.raw:e.shape??{};if(r){let c=()=>{let u={...r};return Object.defineProperty(e,"shape",{value:u}),c.raw=u,u};c.raw=r,Object.defineProperty(e,"shape",{get:c})}let i=Yl(()=>uM(e));ke(t,"propValues",c=>{let u=c.def.shape,d={};for(let h in u){let f=u[h]._zod;if(f.values){Object.prototype.hasOwnProperty.call(d,h)||an(d,h,new Set);for(let m of f.values)d[h].add(m);f.optin!==void 0&&d[h].add(void 0)}}return d});let o=cs,a=e.catchall,s,l=Jt.memoizer;l?.attach(t),t._zod.parse=(c,u)=>{s??(s=i.value);let d=c.value;if(!o(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:t}),c;c.value=l?l.alloc(t,c,{},u):{};let h=[],f=s.shape,m=u?.abortEarly,g=c.issues.length;for(let y of s.allKeys){if(m&&c.issues.length!==g){if(An(c,g))break;g=c.issues.length}if(y==="__proto__")continue;let v=f[y],b=v._zod.optin,S=v._zod.optout,_=v._zod.run({value:d[y],issues:[]},u);_ instanceof Promise?h.push(_.then(T=>sg(T,c,y,d,b,S))):sg(_,c,y,d,b,S)}return a?dM(h,d,c,u,i.value,t,m===!0):h.length?Promise.all(h).then(()=>c):c}}),sT=k("$ZodObjectJIT",(t,e)=>{hM.init(t,e);let n=t._zod.parse,r=Yl(()=>uM(e)),i=Jt.memoizer,o=f=>{let m=r.value,g=m.symbolKeys,y=new fs(["payload","ctx"],{shape:f,inst:t,memo:i,syms:g}),v=T=>`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`,b=(T,x)=>`
          let ${T}_ab = false;
          for (let i = 0; i < ${T}.issues.length; i++) {
            const iss = ${T}.issues[i];
            iss.path = iss.path ? [${x}, ...iss.path] : [${x}];
            payload.issues.push(iss);
            if (iss.continue !== true) ${T}_ab = true;
          }
          if (${T}_ab && ctx && ctx.abortEarly) {
            payload.value = newResult;
            return payload;
          }`;y.write("const input = payload.value;");let S=Object.create(null),_=0;for(let T of m.allKeys)S[T]=`key_${_++}`;y.write(i?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let T of m.allKeys){if(T==="__proto__")continue;let x=S[T],E=typeof T=="symbol"?`syms[${g.indexOf(T)}]`:Tn(T),C=`${E} in input`,I=f[T],L=I?._zod?.optin,G=L!==void 0,ge=I?._zod?.optout==="optional";if(y.write(`const ${x} = ${v(E)};`),G&&ge){let de=L==="optional"?`${x}_present`:`${x}.value !== undefined || ${x}_present`;y.write(`
        const ${x}_present = ${C};
        if (!${x}.issues.length || ${x}_present) {
          if (${x}.issues.length) {${b(x,E)}
          }

          if (${de}) {
            newResult[${E}] = ${x}.value;
          }
        }

      `)}else G?(y.write(`
        if (${x}.issues.length) {${b(x,E)}
        }
      `),L==="defaulted"?y.write(`newResult[${E}] = ${x}.value;`):y.write(`
        if (${x}.value !== undefined || ${C}) {
          newResult[${E}] = ${x}.value;
        }
      `)):y.write(`
        const ${x}_present = ${C};
        if (${x}.issues.length) {${b(x,E)}
        }
        if (!${x}_present && !${x}.issues.length) {
          payload.issues.push({
            code: "invalid_type",
            expected: "nonoptional",
            input: undefined,
            path: [${E}]
          });
          if (ctx && ctx.abortEarly) {
            payload.value = newResult;
            return payload;
          }
        }

        if (${x}_present) {
          newResult[${E}] = ${x}.value;
        }

      `)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()},a,s=cs,l=!Jt.jitless,u=l&&ix.value,d=e.catchall,h;t._zod.parse=(f,m)=>{h??(h=r.value);let g=f.value;return s(g)?l&&u&&m?.async===!1&&m.jitless!==!0?(a||(a=o(e.shape)),f=a(f,m),d?dM([],g,f,m,h,t,m?.abortEarly===!0):f):n(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:t}),f)}});function KN(t,e,n,r){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let i=t.filter(o=>!An(o));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(a=>Zn(a,r,_t())))}),e)}var Kd=k("$ZodUnion",(t,e)=>{ye.init(t,e),ke(t,"optin",r=>r.def.options.some(i=>i._zod.optin==="defaulted")?"defaulted":r.def.options.some(i=>i._zod.optin!==void 0)?"optional":void 0),ke(t,"optout",r=>r.def.options.some(i=>i._zod.optout==="optional")?"optional":void 0),ke(t,"values",r=>{if(r.def.options.every(i=>i._zod.values))return new Set(r.def.options.flatMap(i=>Array.from(i._zod.values)))}),ke(t,"pattern",r=>{if(r.def.options.every(i=>i._zod.pattern)){let i=r.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>mo(o.source)).join("|")})$`)}});let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let s of e.options){let l=s._zod.run({value:r.value,issues:[]},i);if(l instanceof Promise)a.push(l),o=!0;else{if(l.issues.length===0)return l;a.push(l)}}return o?Promise.all(a).then(s=>KN(s,r,t,i)):KN(a,r,t,i)}});function YN(t,e,n,r){let i=[];for(let o=0;o<t.length;o++)t[o].issues.length===0&&i.push(o);return i.length===1?(e.value=t[i[0]].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(a=>Zn(a,r,_t())))}):e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:[],inclusive:!1,matches:i}),e)}var lT=k("$ZodXor",(t,e)=>{Kd.init(t,e),e.inclusive=!1;let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let s of e.options){let l=s._zod.run({value:r.value,issues:[]},i);l instanceof Promise?(a.push(l),o=!0):a.push(l)}return o?Promise.all(a).then(s=>YN(s,r,t,i)):YN(a,r,t,i)}});function cT(t,e){let n=t._zod,r=n.bag.optionsMap;r||(r=fM(n.def),n.bag.optionsMap=r);let i=r.get(e);if(i===null)throw new Error(`Ambiguous discriminator value "${String(e)}"`);return i}function fM(t){let e=new Map;for(let n of t.options){let r=n._zod.propValues?.[t.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let i of r)if(e.has(i)){if(i!==void 0)throw new Error(`Duplicate discriminator value "${String(i)}"`);e.set(i,null)}else e.set(i,n)}return e}var uT=k("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Kd.init(t,e);let n=t._zod.parse;ke(t,"propValues",i=>{let o={},a=0;for(let s of i.def.options){let l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${i.def.options.indexOf(s)}"`);l[i.def.discriminator]?.has(void 0)&&a++;for(let[c,u]of Object.entries(l)){Object.prototype.hasOwnProperty.call(o,c)||an(o,c,new Set);for(let d of u)o[c].add(d)}}return!i.def.unionFallback&&a>1&&o[i.def.discriminator]?.delete(void 0),o}),e.options.forEach((i,o)=>{let a=Jl(i._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,e.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});let r=Yl(()=>fM(e));t._zod.parse=(i,o)=>{let a=i.value;if(!cs(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),i;let s=a?.[e.discriminator],l=r.value.get(s);return l&&(s!==void 0||o.direction!=="backward")?l._zod.run(i,o):e.unionFallback||o.direction==="backward"?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(r.value.keys()).filter(c=>r.value.get(c)!==null),input:a,path:[e.discriminator],inst:t}),i)}}),dT=k("$ZodIntersection",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>{let i=n.value,o=e.left._zod.run({value:i,issues:[]},r),a=e.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([l,c])=>JN(n,l,c)):JN(n,o,a)}});function rc(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Di(t)&&Di(e)){let n=Object.keys(e),r=Object.keys(t).filter(o=>n.indexOf(o)!==-1),i={...t,...e};Object.prototype.hasOwnProperty.call(i,"__proto__")&&delete i.__proto__;for(let o of r){if(o==="__proto__")continue;let a=rc(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e[r],a=rc(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function JN(t,e,n){let r=new Map,i,o=new Map,a=(c,u)=>{let d;if(c.code==="unrecognized_keys"&&!c.path?.length)i??(i=c),d=c.keys;else if(c.code==="invalid_key"&&c.origin==="record"&&c.path?.length===1){let h=String(c.path[0]);o.has(h)||o.set(h,c),d=[h]}else return!1;for(let h of d)r.has(h)||r.set(h,{}),r.get(h)[u]=!0;return!0};for(let c of e.issues)a(c,"l")||t.issues.push(c);for(let c of n.issues)a(c,"r")||t.issues.push(c);let s=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length){let c=i?s.filter(u=>i.keys.includes(u)):[];c.length&&t.issues.push({...i,keys:c});for(let u of s)!c.includes(u)&&o.has(u)&&t.issues.push(o.get(u))}let l=rc(e.value,n.value);if(!l.valid){if(An(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return t.value=l.data,t}var Sg=k("$ZodTuple",(t,e)=>{ye.init(t,e);let n=e.items,r=Jt.memoizer;r?.attach(t),t._zod.parse=(i,o)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=r?r.alloc(t,i,[],o):[];let s=[],l=XN(n,"optin"),c=XN(n,"optout");if(!e.rest){if(a.length<l)return i.issues.push({code:"too_small",minimum:l,inclusive:!0,input:a,inst:t,origin:"array"}),i;a.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:a,inst:t,origin:"array"})}let u=new Array(n.length),d=e.rest?o?.abortEarly:void 0,h=!1;for(let f=0;f<n.length;f++){let m=n[f]._zod.run({value:a[f],issues:[]},o);m instanceof Promise?s.push(m.then(g=>{u[f]=g})):(u[f]=m,d&&!h&&m.issues.length&&(h=An(m)))}if(e.rest&&!h){let f=n.length-1,m=a.slice(n.length),g=i.issues.length;for(let y of m){if(d&&i.issues.length!==g){if(An(i,g))break;g=i.issues.length}f++;let v=e.rest._zod.run({value:y,issues:[]},o);v instanceof Promise?s.push(v.then(b=>WN(b,i,f))):WN(v,i,f)}}return s.length?Promise.all(s).then(()=>QN(u,i,n,a,c)):QN(u,i,n,a,c)}});function XN(t,e){for(let n=t.length-1;n>=0;n--)if(!(e==="optin"?t[n]._zod.optin!==void 0:t[n]._zod.optout==="optional"))return n+1;return 0}function WN(t,e,n){t.issues.length&&e.issues.push(...Vn(n,t.issues)),e.value[n]=t.value}function QN(t,e,n,r,i){for(let o=0;o<n.length;o++){let a=t[o],s=o<r.length;if(!s&&o>=i&&n[o]._zod.optin==="optional"){e.value.length=o;break}if(a.issues.length){if(!s&&o>=i){e.value.length=o;break}e.issues.push(...Vn(o,a.issues))}e.value[o]=a.value}for(let o=e.value.length-1;o>=r.length&&(n[o]._zod.optout==="optional"&&e.value[o]===void 0);o--)e.value.length=o;return e}var hT=k("$ZodRecord",(t,e)=>{ye.init(t,e);let n=Jt.memoizer;n?.attach(t),t._zod.parse=(r,i)=>{let o=r.value;if(!Di(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),r;let a=[],s=e.keyType._zod.values;if(s&&!e.partial){r.value=n?n.alloc(t,r,{},i):{};let l=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){if(l.add(typeof u=="number"?u.toString():u),u==="__proto__")continue;let d=e.keyType._zod.run({value:u,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(m=>Zn(m,i,_t())),input:u,path:[u],inst:t});continue}let h=d.value;if(h==="__proto__")continue;let f=e.valueType._zod.run({value:o[u],issues:[]},i);f instanceof Promise?a.push(f.then(m=>{m.issues.length&&r.issues.push(...Vn(u,m.issues)),r.value[h]=m.value})):(f.issues.length&&r.issues.push(...Vn(u,f.issues)),r.value[h]=f.value)}let c;for(let u in o)if(!l.has(u))if(e.mode==="loose"){if(u==="__proto__")continue;r.value[u]=o[u]}else c=c??[],c.push(u);c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:c,continue:!0})}else{r.value=n?n.alloc(t,r,{},i):{};let l;for(let c of Reflect.ownKeys(o)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,c))continue;let u=e.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&go.test(c)&&u.issues.length){let m=e.keyType._zod.run({value:Number(c),issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){e.mode==="loose"?r.value[c]=o[c]:s?(l=l??[],l.push(c)):r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>Zn(m,i,_t())),input:c,path:[c],inst:t});continue}let h=u.value;if(h==="__proto__")continue;let f=e.valueType._zod.run({value:o[c],issues:[]},i);f instanceof Promise?a.push(f.then(m=>{m.issues.length&&r.issues.push(...Vn(c,m.issues)),r.value[h]=m.value})):(f.issues.length&&r.issues.push(...Vn(c,f.issues)),r.value[h]=f.value)}l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:l,continue:!0})}return a.length?Promise.all(a).then(()=>r):r}}),fT=k("$ZodMap",(t,e)=>{ye.init(t,e);let n=Jt.memoizer;n?.attach(t),t._zod.parse=(r,i)=>{let o=r.value;if(!(o instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:o,inst:t}),r;let a=[];r.value=n?n.alloc(t,r,new Map,i):new Map;let s=i?.abortEarly,l=r.issues.length;for(let[c,u]of o){if(s&&r.issues.length!==l){if(An(r,l))break;l=r.issues.length}let d=e.keyType._zod.run({value:c,issues:[]},i),h=e.valueType._zod.run({value:u,issues:[]},i);d instanceof Promise||h instanceof Promise?a.push(Promise.all([d,h]).then(([f,m])=>{eM(f,m,r,c,o,t,i)})):eM(d,h,r,c,o,t,i)}return a.length?Promise.all(a).then(()=>r):r},oT(t,rV)});function eM(t,e,n,r,i,o,a){t.issues.length&&(Ed.has(typeof r)?n.issues.push(...Vn(r,t.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:t.issues.map(s=>Zn(s,a,_t()))})),e.issues.length&&(Ed.has(typeof r)?n.issues.push(...Vn(r,e.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:e.issues.map(s=>Zn(s,a,_t()))})),n.value.set(t.value,e.value)}var pT=k("$ZodSet",(t,e)=>{ye.init(t,e);let n=Jt.memoizer;n?.attach(t),t._zod.parse=(r,i)=>{let o=r.value;if(!(o instanceof Set))return r.issues.push({input:o,inst:t,expected:"set",code:"invalid_type"}),r;let a=[];r.value=n?n.alloc(t,r,new Set,i):new Set;let s=i?.abortEarly,l=r.issues.length;for(let c of o){if(s&&r.issues.length!==l){if(An(r,l))break;l=r.issues.length}let u=e.valueType._zod.run({value:c,issues:[]},i);u instanceof Promise?a.push(u.then(d=>tM(d,r))):tM(u,r)}return a.length?Promise.all(a).then(()=>r):r},oT(t,oV)});function tM(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var mT=k("$ZodEnum",(t,e)=>{ye.init(t,e);let n=Gl(e.entries),r=new Set(n);t._zod.values=r,ke(t,"pattern",i=>{let o=Gl(i.def.entries).filter(a=>Ed.has(typeof a));return new RegExp(o.length?`^(${o.map(a=>Li(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(i,o)=>{let a=i.value;return r.has(a)||i.issues.push({code:"invalid_value",values:n,input:a,inst:t}),i}}),gT=k("$ZodLiteral",(t,e)=>{ye.init(t,e);let n=new Set(e.values);t._zod.values=n,ke(t,"pattern",r=>{let i=r.def.values;return new RegExp(i.length?`^(${i.map(o=>typeof o=="string"?Li(o):o?Li(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),r}}),vT=k("$ZodFile",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),n}}),bT=k("$ZodTransform",(t,e)=>{ye.init(t,e),t._zod.optin="optional",Jt.memoizer?.guard(t),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new aa(t.constructor.name);let i=e.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(n.value=a,n));if(i instanceof Promise)throw new Gn;return n.value=i,n}});function nM(t,e){return t.value=e.issues.length?void 0:e.value,t}var _g=k("$ZodOptional",(t,e)=>{ye.init(t,e),ke(t,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",ke(t,"values",n=>{let r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),ke(t,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${mo(r.source)})?$`):void 0}),t._zod.parse=(n,r)=>{if(n.value===void 0){if(e.innerType._zod.optin!=="defaulted")return n;let i=e.innerType._zod.run({value:n.value,issues:[]},r);return i instanceof Promise?i.then(o=>nM(n,o)):nM(n,i)}return e.innerType._zod.run(n,r)}}),yT=k("$ZodExactOptional",(t,e)=>{_g.init(t,e),ke(t,"values",n=>n.def.innerType._zod.values),ke(t,"pattern",n=>n.def.innerType._zod.pattern),t._zod.parse=(n,r)=>e.innerType._zod.run(n,r)}),ST=k("$ZodNullable",(t,e)=>{ye.init(t,e),ke(t,"optin",n=>n.def.innerType._zod.optin),ke(t,"optout",n=>n.def.innerType._zod.optout),ke(t,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${mo(r.source)}|null)$`):void 0}),ke(t,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),_T=k("$ZodDefault",(t,e)=>{ye.init(t,e),t._zod.optin="defaulted",ke(t,"values",n=>n.def.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);if(n.value===void 0)return n.value=e.defaultValue,n;let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>iM(o,e)):iM(i,e)}});function iM(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var wT=k("$ZodPrefault",(t,e)=>{ye.init(t,e),t._zod.optin="defaulted",ke(t,"values",n=>n.def.innerType._zod.values),t._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),xT=k("$ZodNonOptional",(t,e)=>{ye.init(t,e),ke(t,"values",n=>{let r=n.def.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),t._zod.parse=(n,r)=>{let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>rM(o,t)):rM(i,t)}});function rM(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var zT=k("$ZodSuccess",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new aa("ZodSuccess");let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.issues.length===0,n)):(n.value=i.issues.length===0,n)}});function oM(t,e,n,r){return e.issues.length?(t.value=n.catchValue({...e,value:t.value,error:{issues:e.issues.map(i=>Zn(i,r,_t()))},input:t.value}),t):(t.value=e.value,e.memo&&(t.memo=!0),t)}var TT=k("$ZodCatch",(t,e)=>{ye.init(t,e),ke(t,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ke(t,"optout",n=>n.def.innerType._zod.optout),ke(t,"values",n=>n.def.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);let i=e.innerType._zod.run({value:n.value,issues:[]},r);return i instanceof Promise?i.then(o=>oM(n,o,e,r)):oM(n,i,e,r)}}),AT=k("$ZodNaN",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:t,expected:"nan",code:"invalid_type"}),n)}),wg=k("$ZodPipe",(t,e)=>{ye.init(t,e),ke(t,"values",n=>n.def.in._zod.values),ke(t,"optin",n=>n.def.in._zod.optin),ke(t,"optout",n=>n.def.out._zod.optout),ke(t,"propValues",n=>n.def.in._zod.propValues),t._zod.parse=(n,r)=>{if(r.direction==="backward"){let o=e.out._zod.run(n,r);return o instanceof Promise?o.then(a=>rg(a,e.in,r)):rg(o,e.in,r)}let i=e.in._zod.run(n,r);return i instanceof Promise?i.then(o=>rg(o,e.out,r)):rg(i,e.out,r)}});function rg(t,e,n){return t.issues.some(r=>r.code!=="unrecognized_keys")?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}var Yd=k("$ZodCodec",(t,e)=>{ye.init(t,e),ke(t,"values",n=>n.def.in._zod.values),ke(t,"optin",n=>n.def.in._zod.optin),ke(t,"optout",n=>n.def.out._zod.optout),ke(t,"propValues",n=>n.def.in._zod.propValues),t._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){let o=e.in._zod.run(n,r);return o instanceof Promise?o.then(a=>og(a,e,r)):og(o,e,r)}else{let o=e.out._zod.run(n,r);return o instanceof Promise?o.then(a=>og(a,e,r)):og(o,e,r)}}});function og(t,e,n){if(t.issues.length)return t.aborted=!0,t;if((n.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(o=>ag(t,o,e.out,n)):ag(t,i,e.out,n)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(o=>ag(t,o,e.in,n)):ag(t,i,e.in,n)}}function ag(t,e,n,r){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:e,issues:t.issues},r)}var ET=k("$ZodPreprocess",(t,e)=>{wg.init(t,e)}),$T=k("$ZodReadonly",(t,e)=>{ye.init(t,e),ke(t,"propValues",n=>n.def.innerType._zod.propValues),ke(t,"values",n=>n.def.innerType._zod.values),ke(t,"optin",n=>n.def.innerType?._zod?.optin),ke(t,"optout",n=>n.def.innerType?._zod?.optout),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(aM):aM(i)}});function aM(t){return t.memo||(t.value=Object.freeze(t.value)),t}function sV(t){let e=t._zod.def,n=e.pattern,r=!!e.format?.includes("int"),i,o;for(let s of e.checks??[]){let l=s._zod.def;l.pattern&&(n=l.pattern),r||(r=!!l.format?.includes("int"));let c=l.minimum??l.length,u=l.maximum??l.length;c!==void 0&&(i===void 0||c>i)&&(i=c),u!==void 0&&(o===void 0||u<o)&&(o=u)}if(n)return n.source;if(i!==void 0&&o!==void 0&&i>o)return"(?!)";if(i!==void 0||o!==void 0)return Bx({minimum:i,maximum:o}).source;let a=t._zod.pattern;return(r&&a===go?jd:a)?.source}function yz(t){let e=t._zod.def,n=t._zod.pattern?.source,r=e.innerType??t._zod.innerType;if(r){let i=r._zod.pattern?.source,o=yz(r);return n&&i&&o&&o!==i?n.replace(mo(i),()=>mo(o)):n}if(e.options){let i=e.options.map(yz);if(i.every(Boolean))return`^(${i.map(o=>mo(o)).join("|")})$`}return sV(t)}var kT=k("$ZodTemplateLiteral",(t,e)=>{ye.init(t,e);let n=[];for(let r of e.parts)if(typeof r=="object"&&r!==null){let i=yz(r);if(!i)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);n.push(mo(i))}else if(r===null||rx.has(typeof r))n.push(Li(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(r,i)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:t,expected:"string",code:"invalid_type"}),r):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),r)}),RT=k("$ZodFunction",(t,e)=>(ye.init(t,e),Object.defineProperty(t,"_def",{value:e}),t._zod.def=e,t.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...r){let i=t._def.input?Fm(t._def.input,r):r,o=Reflect.apply(n,this,i);return t._def.output?Fm(t._def.output,o):o},"_zod",{value:t._zod,enumerable:!1})},t.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...r){let i=t._def.input?await Bm(t._def.input,r):r,o=await Reflect.apply(n,this,i);return t._def.output?await Bm(t._def.output,o):o},"_zod",{value:t._zod,enumerable:!1})},t._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:t}),n):(t._def.output&&t._def.output._zod.def.type==="promise"?n.value=t.implementAsync(n.value):n.value=t.implement(n.value),n),t.input=(...n)=>{let r=t.constructor;return Array.isArray(n[0])?new r({type:"function",input:new Sg({type:"tuple",items:n[0],rest:n[1]}),output:t._def.output}):new r({type:"function",input:n[0],output:t._def.output})},t.output=n=>{let r=t.constructor;return new r({type:"function",input:t._def.input,output:n})},t)),CT=k("$ZodPromise",(t,e)=>{ye.init(t,e),t._zod.parse=(n,r)=>Promise.resolve(n.value).then(i=>e.innerType._zod.run({value:i,issues:[]},r))}),Jd=k("$ZodLazy",(t,e)=>{ye.init(t,e),tx(t._zod,"innerType",()=>{let n=e;return n._cachedInner||(n._cachedInner=e.getter()),n._cachedInner}),ke(t,"pattern",n=>n.innerType?._zod?.pattern),ke(t,"propValues",n=>n.innerType?._zod?.propValues),ke(t,"optin",n=>n.innerType?._zod?.optin??void 0),ke(t,"optout",n=>n.innerType?._zod?.optout??void 0),t._zod.parse=(n,r)=>t._zod.innerType._zod.run(n,r)}),IT=k("$ZodCustom",(t,e)=>{tt.init(t,e),ye.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{let r=n.value,i=e.fn(r);if(i instanceof Promise)return i.then(o=>sM(o,n,r,t));sM(i,n,r,t)}});function sM(t,e,n,r){if(!t){let i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),e.issues.push(Wl(i))}}var Ag=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},OT="~memo",mM=[];function gM(t){return t!==null&&typeof t=="object"}function PT(t){return t.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var vM=new WeakMap,oc=0,Tg=1,Xd=2;function Wd(t,e,n){let r=vM.get(t);if(r!==void 0)return r?Xd:oc;if(e.has(t))return Xd;e.add(t);let i=oc,o=u=>{if(i!==Xd&&u?._zod){let d=Wd(u,e,n);d>i&&(i=d)}},a=(u,d)=>{let h=oc;for(let f of Reflect.ownKeys(u)){let m=Object.getOwnPropertyDescriptor(u,f);if(d&&!m.enumerable)continue;let g=m.get?Tg:m.value?._zod?Wd(m.value,e,n):oc;g>h&&(h=g)}return h},s=u=>{u>i&&(i=u)},l=t._zod.def,c=l.type;switch(c){case"object":{let u=Jl(l);s(u?a(u,!0):Tg),o(l.catchall);break}case"array":o(l.element);break;case"tuple":for(let u of l.items)o(u);o(l.rest);break;case"record":case"map":o(l.keyType),o(l.valueType);break;case"set":o(l.valueType);break;case"union":for(let u of l.options)o(u);break;case"intersection":o(l.left),o(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(l.innerType);break;case"pipe":o(l.in),o(l.out);break;case"function":o(l.input),o(l.output);break;case"lazy":{let u=l._cachedInner??(n?t._zod.innerType:void 0);s(u?Wd(u,e,!1):Tg);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let u in l){let d=Object.getOwnPropertyDescriptor(l,u);if(!d||d.get)continue;let h=d.value;if(!(!h||typeof h!="object")){if(h._zod)o(h);else if(Array.isArray(h))for(let f of h)o(f)}}}return e.delete(t),lV(t,i)}function lV(t,e){return e!==Tg&&vM.set(t,e===Xd),e}function Eg(t){return Wd(t,new Set,!0)!==oc}function cV(t,e){let n=t.buckets.get(e);return n||(n=new WeakMap,t.buckets.set(e,n)),n}var xg,zg=[],uV={alloc(t,e,n){let r=xg;if(!r)return n;xg=void 0;let i={value:n,issues:null};return r.set(e.value,i),zg.push(i),n},guard(t){var e;(e=t._zod).deferred??(e.deferred=[]),t._zod.deferred.push(()=>{let n=t._zod.parse,r=(i,o)=>{if(o.direction!=="backward"&&$g(o,i.value))throw new Ag;return n(i,o)};t._zod.parse=r,t._zod.run===n&&(t._zod.run=r)})},attach(t){var e;let n,r=!1,i,o;(e=t._zod).deferred??(e.deferred=[]),t._zod.deferred.push(()=>{let a=t._zod.parse,s=(l,c)=>{if(n===void 0){let v=Wd(t,new Set,!1);if(v===oc)return t._zod.parse=a,t._zod.run===s&&(t._zod.run=a),a(l,c);v===Xd||r?n=!0:r=!0}let u=l.value;if(!gM(u))return a(l,c);let d=c[OT];d||(d={buckets:new WeakMap,backEdges:void 0},c[OT]=d);let h;i===c?h=o:(h=cV(d,t),i=c,o=h);let f=h.get(u);if(f)return l.value=f.value,f.issues?f.issues.length&&l.issues.push(...PT(f.issues)):(l.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(f.value)),l;xg=h;let m=zg.length,g=a(l,c);xg=void 0;let y=zg.length>m?zg.pop():void 0;return g instanceof Promise?g.then(v=>(y&&(y.issues=v.issues.length?PT(v.issues):mM),v)):(y&&(y.issues=g.issues.length?PT(g.issues):mM),g)};t._zod.parse=s,t._zod.run===a&&(t._zod.run=s)})}};function Qd(){return uV}function $g(t,e){let n=t[OT]?.backEdges;return n!==void 0&&gM(e)&&n.has(e)}var th={};Zr(th,{ar:()=>bM,az:()=>yM,be:()=>_M,bg:()=>wM,bn:()=>xM,ca:()=>zM,ckb:()=>TM,cs:()=>AM,da:()=>EM,de:()=>$M,el:()=>kM,en:()=>kg,eo:()=>RM,es:()=>CM,fa:()=>IM,fi:()=>PM,fr:()=>OM,frCA:()=>NM,gu:()=>MM,he:()=>DM,hi:()=>LM,hr:()=>jM,hu:()=>UM,hy:()=>FM,id:()=>BM,is:()=>HM,it:()=>VM,ja:()=>ZM,ka:()=>GM,kh:()=>KM,km:()=>Rg,kn:()=>YM,ko:()=>JM,lt:()=>WM,mk:()=>QM,ms:()=>eD,ne:()=>tD,nl:()=>nD,nn:()=>iD,no:()=>rD,ota:()=>oD,pl:()=>sD,ps:()=>aD,pt:()=>lD,ptBR:()=>cD,ro:()=>uD,ru:()=>hD,sk:()=>fD,sl:()=>pD,sv:()=>mD,ta:()=>gD,tg:()=>vD,th:()=>bD,tk:()=>yD,tr:()=>SD,ua:()=>_D,uk:()=>Cg,ur:()=>wD,uz:()=>xD,vi:()=>zD,yo:()=>ED,zhCN:()=>TD,zhTW:()=>AD});var dV=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(i){return t[i]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return i.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${N(i.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${i.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??i.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${R(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function bM(){return{localeError:dV()}}var hV=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${N(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function yM(){return{localeError:hV()}}function SM(t,e,n,r){let i=Math.abs(t),o=i%10,a=i%100;return a>=11&&a<=19?r:o===1?e:o>=2&&o<=4?n:r}var fV=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(i){return t[i]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},r={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return i.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${N(i.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);if(a){let s=Number(i.maximum),l=SM(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${i.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);if(a){let s=Number(i.minimum),l=SM(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${i.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${R(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function _M(){return{localeError:fV()}}var pV=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(i){return t[i]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${N(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${R(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function wM(){return{localeError:pV()}}var mV=()=>{let t={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function e(i){return t[i]??null}let n={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return i.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${N(i.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${R(i.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${i.origin??"\u09AE\u09BE\u09A8"} ${o}${i.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${i.origin??"\u09AE\u09BE\u09A8"} ${o}${i.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${i.origin} ${o}${i.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${i.origin} ${o}${i.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${o.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${i.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${i.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${i.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${i.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function xM(){return{localeError:mV()}}var gV=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function e(i){return t[i]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${N(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${R(i.values," o ")}`;case"too_big":{let o=i.inclusive?"com a m\xE0xim":"menys de",a=e(i.origin);return a?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${o} ${i.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"com a m\xEDnim":"m\xE9s de",a=e(i.origin);return a?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${o} ${i.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${R(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}};function zM(){return{localeError:gV()}}var vV=()=>{let t={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function e(i){return t[i]??null}let n={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},r={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a,l=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(u=>s.endsWith(u))?"\u06CC\u06D5":"\u06D5",c=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${o} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${c?"":l}`}case"invalid_value":return i.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${N(i.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${R(i.values,"|")}`;case"too_big":{let o=e(i.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${i.maximum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${i.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let o=e(i.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${i.minimum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${i.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${o.prefix}"`:o.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${o.suffix}"`:o.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${o.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:o.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${o.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${n[o.format]??i.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${i.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${R(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${i.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${i.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function TM(){return{localeError:vV()}}var bV=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(i){return t[i]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${N(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${R(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};function AM(){return{localeError:bV()}}var yV=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function e(i){return t[i]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${N(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin),s=r[i.origin]??i.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin),s=r[i.origin]??i.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${i.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${R(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}};function EM(){return{localeError:yV()}}var SV=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function e(i){return t[i]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${N(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${R(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}};function $M(){return{localeError:SV()}}var _V=()=>{let t={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(i){return t[i]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return typeof i.expected=="string"&&/^[A-Z]/.test(i.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${i.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return i.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${N(i.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${i.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${i.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??i.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${i.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${i.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${i.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${R(i.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${i.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${i.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function kM(){return{localeError:_V()}}var wV=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(o){return t[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function i(o,a){return o==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):r[o]??o}return o=>{switch(o.code){case"invalid_type":{let a=i(o.expected),s=D(o.input),l=i(s,o.input);return`Invalid input: expected ${a}, received ${l}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${N(o.values[0])}`:`Invalid option: expected one of ${R(o.values,"|")}`;case"too_big":{let a=o.exact?"exactly ":o.inclusive?"<=":"<",s=e(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{let a=o.exact?"exactly ":o.inclusive?">=":">",s=e(o.origin);return s?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${n[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${R(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function kg(){return{localeError:wV()}}var xV=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function e(i){return t[i]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${N(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${o}${i.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${R(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function RM(){return{localeError:xV()}}var zV=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(i){return t[i]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${N(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin),s=r[i.origin]??i.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin),s=r[i.origin]??i.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${i.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${R(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${r[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${r[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}};function CM(){return{localeError:zV()}}var TV=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(i){return t[i]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${N(i.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${R(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??i.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${R(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function IM(){return{localeError:TV()}}var AV=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(i){return t[i]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${N(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${i.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${i.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${R(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function PM(){return{localeError:AV()}}var EV=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let n={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},r={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instance de ${i.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${N(i.values[0])} attendu`:`Option invalide : une valeur parmi ${R(i.values,"|")} attendue`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Trop grand : ${r[i.origin]??"valeur"} doit ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r[i.origin]??"valeur"} doit \xEAtre ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Trop petit : ${r[i.origin]??"valeur"} doit ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : ${r[i.origin]??"valeur"} doit \xEAtre ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${R(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function OM(){return{localeError:EV()}}var $V=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${N(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u2264":"<",a=e(i.origin);return a?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u2265":">",a=e(i.origin);return a?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${R(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function NM(){return{localeError:$V()}}var kV=()=>{let t={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function e(i){return t[i]??null}let n={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return i.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${N(i.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${R(i.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${i.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${i.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${i.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${i.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${i.origin} ${o}${i.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${i.origin} ${o}${i.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${o.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${i.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${i.keys.length>1?"\u0A93":""}: ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${i.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${i.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function MM(){return{localeError:kV()}}var RV=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=c=>c?t[c]:void 0,r=c=>{let u=n(c);return u?u.label:c??t.unknown.label},i=c=>`\u05D4${r(c)}`,o=c=>(n(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?e[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,d=l[u??""]??r(u),h=D(c.input),f=l[h]??t[h]?.label??h;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${N(c.values[0])}`;let u=c.values.map(f=>N(f));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=a(c.origin),d=i(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let m=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(c.origin==="array"||c.origin==="set"){let m=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",g=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let h=c.inclusive?"<=":"<",f=o(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${h}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${h}${c.maximum.toString()}`}case"too_small":{let u=a(c.origin),d=i(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let m=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(c.origin==="array"||c.origin==="set"){let m=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let y=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let g=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let h=c.inclusive?">=":">",f=o(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${h}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${h}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let d=s[u.format],h=d?.label??u.format,m=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${h} \u05DC\u05D0 ${m}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${R(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function DM(){return{localeError:RV()}}var CV=()=>{let t={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function e(i){return t[i]??null}let n={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return i.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${N(i.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${i.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${o}${i.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${i.origin??"\u092E\u093E\u0928"} ${o}${i.maximum} \u0939\u094B`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${i.origin} \u092E\u0947\u0902 ${o}${i.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${i.origin} ${o}${i.minimum} \u0939\u094B`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${o.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${o.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${i.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${i.keys.length>1?"\u092F\u093E\u0901":""}: ${R(i.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${i.origin} \u092E\u0947\u0902`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${i.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function LM(){return{localeError:CV()}}var IV=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(i){return t[i]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},r={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${i.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return i.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${N(i.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin),s=r[i.origin]??i.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${i.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin),s=r[i.origin]??i.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${i.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??i.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${i.divisor}`;case"unrecognized_keys":return`Neprepoznat${i.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${R(i.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${r[i.origin]??i.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${r[i.origin]??i.origin}`;default:return"Neispravan unos"}}};function jM(){return{localeError:IV()}}var PV=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function e(i){return t[i]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${N(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${i.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${o}${i.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${R(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function UM(){return{localeError:PV()}}function qM(t,e,n){return Math.abs(t)===1?e:n}function ac(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=t[t.length-1];return t+(e.includes(n)?"\u0576":"\u0568")}var OV=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(i){return t[i]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},r={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return i.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${N(i.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);if(a){let s=Number(i.maximum),l=qM(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ac(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ac(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);if(a){let s=Number(i.minimum),l=qM(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ac(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ac(i.origin)} \u056C\u056B\u0576\u056B ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??i.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${R(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ac(i.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${ac(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function FM(){return{localeError:OV()}}var NV=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function e(i){return t[i]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${N(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${R(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function BM(){return{localeError:NV()}}var MV=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function e(i){return t[i]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${N(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${o}${i.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${o}${i.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${R(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}};function HM(){return{localeError:MV()}}var DV=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function e(i){return t[i]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${N(i.values[0])}`:`Opzione non valida: atteso uno tra ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${R(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function VM(){return{localeError:DV()}}var LV=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(i){return t[i]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},r={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${N(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${R(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=e(i.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=e(i.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${i.keys.length>1?"\u7FA4":""}: ${R(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function ZM(){return{localeError:LV()}}var jV=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(i){return t[i]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},r={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${N(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${R(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${R(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function GM(){return{localeError:jV()}}var UV=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(i){return t[i]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},r={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return i.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${N(i.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${R(i.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Rg(){return{localeError:UV()}}function KM(){return Rg()}var qV=()=>{let t={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function e(i){return t[i]??null}let n={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return i.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${N(i.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${i.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${i.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${o.prefix}"`:o.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${o.suffix}"`:o.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${o.includes}"`:o.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${o.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${i.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${i.keys.length>1?"s":""}: ${R(i.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${i.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function YM(){return{localeError:qV()}}var FV=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"},map:{unit:"\uAC1C",verb:"to have"}};function e(i){return t[i]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${N(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${R(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),l=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${l} ${o}${a}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${o}${a}`}case"too_small":{let o=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),l=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${l} ${o}${a}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${R(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function JM(){return{localeError:FV()}}var eh=t=>t.charAt(0).toUpperCase()+t.slice(1);function XM(t){let e=Math.abs(t),n=e%10,r=e%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}var BV=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(i,o,a,s){let l=t[i]??null;return l===null?l:{unit:l.unit[o],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},r={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${N(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${R(i.values,"|")} pasirinkim\u0173`;case"too_big":{let o=r[i.origin]??i.origin,a=e(i.origin,XM(Number(i.maximum)),i.inclusive??!1,"smaller");if(a?.verb)return`${eh(o??i.origin??"reik\u0161m\u0117")} ${a.verb} ${i.maximum.toString()} ${a.unit??"element\u0173"}`;let s=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${eh(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${i.maximum.toString()} ${a?.unit}`}case"too_small":{let o=r[i.origin]??i.origin,a=e(i.origin,XM(Number(i.minimum)),i.inclusive??!1,"bigger");if(a?.verb)return`${eh(o??i.origin??"reik\u0161m\u0117")} ${a.verb} ${i.minimum.toString()} ${a.unit??"element\u0173"}`;let s=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${eh(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${i.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${R(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=r[i.origin]??i.origin;return`${eh(o??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function WM(){return{localeError:BV()}}var HV=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(i){return t[i]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},r={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${N(i.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${R(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function QM(){return{localeError:HV()}}var VV=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function e(i){return t[i]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${N(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Terlalu besar: dijangka ${i.origin??"nilai"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Terlalu kecil: dijangka ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${R(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function eD(){return{localeError:VV()}}var ZV=()=>{let t={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function e(i){return t[i]??null}let n={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return i.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${N(i.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${i.origin??"\u092E\u093E\u0928"} \u092E\u093E ${o}${i.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${i.origin??"\u092E\u093E\u0928"} ${o}${i.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${i.origin} \u092E\u093E ${o}${i.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${i.origin} ${o}${i.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${o.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${i.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${i.keys.length>1?"\u0939\u0930\u0942":""}: ${R(i.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${i.origin} \u092E\u093E`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${i.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function tD(){return{localeError:ZV()}}var GV=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function e(i){return t[i]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${N(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin),s=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin),s=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${R(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function nD(){return{localeError:GV()}}var KV=()=>{let t={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function e(i){return t[i]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tal",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventa instanceof ${i.expected}, fekk ${s}`:`Ugyldig input: forventa ${o}, fekk ${s}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventa ${N(i.values[0])}`:`Ugyldig val: forventa eitt av ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`For stor(t): forventa ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`For lite(n): forventa ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${R(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function iD(){return{localeError:KV()}}var YV=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function e(i){return t[i]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${N(i.values[0])}`:`Ugyldig valg: forventet en av ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${R(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function rD(){return{localeError:YV()}}var JV=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${N(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=i;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function oD(){return{localeError:JV()}}var XV=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(i){return t[i]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${N(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${R(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${R(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function aD(){return{localeError:XV()}}var WV=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function e(i){return t[i]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},r={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${N(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${R(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function sD(){return{localeError:WV()}}var QV=()=>{let t={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function e(a){return t[a]??null}let n={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},r={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},i={string:{name:"texto",articles:r.masculine},number:{name:"n\xFAmero",articles:r.masculine},int:{name:"n\xFAmero inteiro",articles:r.masculine},boolean:{name:"valor booleano",articles:r.masculine},bigint:{name:"n\xFAmero bigint",articles:r.masculine},symbol:{name:"s\xEDmbolo",articles:r.masculine},undefined:{name:'valor "undefined"',articles:r.masculine},null:{name:'valor "nulo"',articles:r.masculine},never:{name:'valor "never"',articles:r.masculine},void:{name:'valor "void"',articles:r.masculine},date:{name:"data",articles:r.feminine},array:{name:"vetor",articles:r.masculine},object:{name:"objeto",articles:r.masculine},tuple:{name:"tuplo",articles:r.masculine},record:{name:"registo",articles:r.masculine},map:{name:"mapa",articles:r.masculine},set:{name:"conjunto",articles:r.masculine},file:{name:"ficheiro",articles:r.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:r.masculine},nan:{name:'valor "NaN"',articles:r.masculine},function:{name:"fun\xE7\xE3o",articles:r.feminine}};function o(a,s){let l=i[a]??{name:`valor "${a}"`,articles:r.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),l=D(a.input),c=o(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${N(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${R(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=e(a.origin);return l?`Demasiado grande: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=e(a.origin);return l?`Demasiado pequeno: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Demasiado pequeno: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${n[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${R(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function lD(){return{localeError:QV()}}var eZ=()=>{let t={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function e(a){return t[a]??null}let n={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},r={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},i={string:{name:"texto",articles:r.masculine},number:{name:"n\xFAmero",articles:r.masculine},int:{name:"n\xFAmero inteiro",articles:r.masculine},boolean:{name:"valor booleano",articles:r.masculine},bigint:{name:"n\xFAmero bigint",articles:r.masculine},symbol:{name:"s\xEDmbolo",articles:r.masculine},undefined:{name:'valor "undefined"',articles:r.masculine},null:{name:'valor "nulo"',articles:r.masculine},never:{name:'valor "never"',articles:r.masculine},void:{name:'valor "void"',articles:r.masculine},date:{name:"data",articles:r.feminine},array:{name:"vetor",articles:r.masculine},object:{name:"objeto",articles:r.masculine},tuple:{name:"tupla",articles:r.feminine},record:{name:"registro",articles:r.masculine},map:{name:"mapa",articles:r.masculine},set:{name:"conjunto",articles:r.masculine},file:{name:"arquivo",articles:r.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:r.masculine},nan:{name:'valor "NaN"',articles:r.masculine},function:{name:"fun\xE7\xE3o",articles:r.feminine}};function o(a,s){let l=i[a]??{name:`valor "${a}"`,articles:r.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),l=D(a.input),c=o(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${N(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${R(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=e(a.origin);return l?`Grande demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Grande demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=e(a.origin);return l?`Pequeno demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Pequeno demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${n[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${R(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function cD(){return{localeError:eZ()}}var tZ=()=>{let t={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(i){return t[i]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},r={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return i.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${N(i.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} s\u0103 fie ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Prea mic: a\u0219teptat ca ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${i.origin} s\u0103 fie ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??i.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${i.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${R(i.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${i.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${i.origin}`;default:return"Intrare invalid\u0103"}}};function uD(){return{localeError:tZ()}}function dD(t,e,n,r){let i=Math.abs(t),o=i%10,a=i%100;return a>=11&&a<=19?r:o===1?e:o>=2&&o<=4?n:r}var nZ=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(i){return t[i]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${N(i.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);if(a){let s=Number(i.maximum),l=dD(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);if(a){let s=Number(i.minimum),l=dD(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${R(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function hD(){return{localeError:nZ()}}var iZ=()=>{let t={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function e(i){return t[i]??null}let n={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${i.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${o}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${N(i.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${i.origin??"hodnota"} mus\xED ma\u0165 ${o}${i.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${i.origin??"hodnota"} mus\xED by\u0165 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED ma\u0165 ${o}${i.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED by\u0165 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${o.includes}"`:o.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${R(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};function fD(){return{localeError:iZ()}}var rZ=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function e(i){return t[i]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${N(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${R(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function pD(){return{localeError:rZ()}}var oZ=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(i){return t[i]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${N(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${R(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function mD(){return{localeError:oZ()}}var aZ=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(i){return t[i]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return i.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${N(i.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${R(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function gD(){return{localeError:aZ()}}var sZ=()=>{let t={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function e(i){return t[i]??null}let n={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},r={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${o} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return i.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${N(i.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${R(i.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${i.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${i.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${i.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${i.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${i.origin} \u0431\u043E\u044F\u0434 ${o}${i.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${i.origin} \u0431\u043E\u044F\u0434 ${o}${i.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:o.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:o.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${o.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:o.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${o.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${n[o.format]??i.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${i.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${i.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${R(i.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${i.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${i.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function vD(){return{localeError:sZ()}}var lZ=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(i){return t[i]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},r={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${N(i.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=e(i.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=e(i.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${i.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${R(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function bD(){return{localeError:lZ()}}var cZ=()=>{let t={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function e(i){return t[i]??null}let n={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${o} \xFDerine ${s} alyndy`}case"invalid_value":return i.values.length===1?`N\xE4dogry baha: ${N(i.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Has uly: gara\u015Fyl\xFDan ${i.origin??"baha"} ${o} ${i.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${i.origin??"baha"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${i.origin} ${o} ${i.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`N\xE4dogry setir: "${o.prefix}" bilen ba\u015Flamaly`:o.format==="ends_with"?`N\xE4dogry setir: "${o.suffix}" bilen gutarmaly`:o.format==="includes"?`N\xE4dogry setir: "${o.includes}" saklamaly`:o.format==="regex"?`N\xE4dogry setir: ${o.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xE4dogry san: ${i.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${i.keys.length>1?"lar":""}: ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${i.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function yD(){return{localeError:cZ()}}var uZ=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(i){return t[i]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${N(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function SD(){return{localeError:uZ()}}var dZ=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(i){return t[i]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${N(i.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${R(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Cg(){return{localeError:dZ()}}function _D(){return Cg()}var hZ=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(i){return t[i]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},r={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${N(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${R(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${o}${i.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${o}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${i.keys.length>1?"\u0632":""}: ${R(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function wD(){return{localeError:hZ()}}var fZ=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(i){return t[i]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${N(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function xD(){return{localeError:fZ()}}var pZ=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(i){return t[i]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},r={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${N(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??i.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${R(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function zD(){return{localeError:pZ()}}var mZ=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function e(i){return t[i]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},r={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${N(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${R(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function TD(){return{localeError:mZ()}}var gZ=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(i){return t[i]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${N(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${R(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function AD(){return{localeError:gZ()}}var vZ=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"},map:{unit:"nkan",verb:"n\xED"}};function e(i){return t[i]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},r={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=D(i.input),s=r[a]??a;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${N(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${R(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${a.verb} ${o}${i.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.maximum}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${a.verb} ${o}${i.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.minimum}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??i.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${R(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function ED(){return{localeError:vZ()}}var $D,NT=Symbol("ZodOutput"),MT=Symbol("ZodInput"),Ig=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){let r=n[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let r={...this.get(n)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Pg(){return new Ig}($D=globalThis).__zod_globalRegistry??($D.__zod_globalRegistry=Pg());var sn=globalThis.__zod_globalRegistry;var En=Symbol.for("zod.compile.invalid"),kD=Symbol.for("zod.compile.fallback"),sr=class extends Error{constructor(e="z.compile does not support async refinements, transforms, or checks"){super(e),this.name="ZodCompileAsyncError"}},Ie=class extends Error{constructor(e,n=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=n}};function yZ(t,e){try{return Ng(t,{assertOnly:!0})}catch{return e}}function UT(t,e){try{let n=Ng(t),r=Og(t,n);return r._zod.bag.validator=yZ(t,n),r}catch(n){if(e?.strict)throw n;return t}}function Og(t,e){if(Eg(t))throw new Ie("a schema whose subtree contains a reference cycle");let n=Ge(t),r=t._zod.run,i=r.__originalRun??r,o=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[kD]||s&&$g(s,a.value))return i(a,s);let l=e(a.value);return l!==En?(a.value=l,a):(s&&(s[kD]=!0),i(a,s))};return o.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=e,n._zod.run=o,r.__originalRun||SZ(n,t,e),n}function SZ(t,e,n){let r=t,i=e;if(typeof i.safeParse=="function"){let o=i.safeParse;r.safeParse=(a,s)=>{let l=n(a);return l!==En?{success:!0,data:l}:o(a,s)}}if(typeof i.parse=="function"){let o=i.parse;r.parse=(a,s)=>{let l=n(a);return l!==En?l:o(a,s)}}}function Ng(t,e){let n=!0;try{n=Eg(t)}catch{}if(n)throw new Ie("a schema whose subtree contains a reference cycle");let r={constants:new Map,constantCounter:0,varCounter:0,definite:!0},i=new fs(["input"]),o=mt(i,r,t,"input",!e?.assertOnly);i.write(o===null?"return true;":`return ${o};`);let a=["INVALID",...r.constants.keys()],s=[En,...r.constants.values()],l=i.content.join(`
`),c=e?.debug?a.length>0?`// Constants: ${a.join(", ")}
${l}`:l:"",u=Function,d=`return (input) => {
${l}
}`,h;try{h=new u(...a,d)(...s)}catch(f){throw new Ie(`this schema (generated code failed to evaluate: ${f.message})`)}return e?.debug&&(h.code=c),h.definite=r.definite,h}function me(t,e){for(let[r,i]of t.constants)if(i===e)return r;let n=`c${t.constantCounter++}`;return t.constants.set(n,e),n}function gs(t,e){return t.definite=!1,me(t,e)}function he(t){return`v${t.varCounter++}`}function _Z(t,e){let n=t._zod.run({value:e,issues:[]},{});if(n&&typeof n.then=="function")return En;let r=n;return r.issues.length===0?r.value:En}function mn(t,e,n,r,i=!0){let o=t.content.length,a=e.constants.size,s=e.constantCounter,l=e.varCounter;try{return mt(t,e,n,r,i)}catch(c){if(!(c instanceof Ie)||!c.islandable)throw c;if(t.content.length=o,e.constants.size>a){let u=Array.from(e.constants.keys()).slice(a);for(let d of u)e.constants.delete(d)}return e.constantCounter=s,e.varCounter=l,wZ(t,e,n,r)}}function wZ(t,e,n,r){e.definite=!1;let i=me(e,n),o=me(e,_Z),a=he(e);return t.write(`const ${a} = ${o}(${i}, ${r});`),t.write(`if (${a} === INVALID) return INVALID;`),a}var xZ=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function zZ(t,e,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let o=r;for(let a of i){let s=a._zod.def;if(s.when&&!xZ.has(s.check))throw new Ie('check with a custom "when" condition');switch(s.check){case"greater_than":TZ(t,e,s,o);break;case"less_than":AZ(t,e,s,o);break;case"multiple_of":EZ(t,e,s,o);break;case"number_format":ND(t,s,o);break;case"min_length":{let l=sa(s.minimum,"min_length"),c=DT(t,e,o,`${o}.length >= ${l} && ${o}.length < ${s.minimum*2}`);t.write(`if (${c} < ${l}) return INVALID;`);break}case"max_length":{let l=sa(s.maximum,"max_length"),c=DT(t,e,o,`${o}.length > ${l}`);t.write(`if (${c} > ${l}) return INVALID;`);break}case"length_equals":{let l=sa(s.length,"length_equals"),c=DT(t,e,o,`${o}.length >= ${l} && ${o}.length <= ${s.length*2}`);t.write(`if (${c} !== ${l}) return INVALID;`);break}case"min_size":t.write(`if (${o}.size < ${sa(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":t.write(`if (${o}.size > ${sa(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":t.write(`if (${o}.size !== ${sa(s.size,"size_equals")}) return INVALID;`);break;case"string_format":o=MD(t,e,s,o);break;case"custom":o=PZ(t,e,a,o);break;case"bigint_format":$Z(t,s,o);break;case"mime_type":kZ(t,e,s,o);break;case"property":CZ(t,e,s,o);break;case"properties":RZ(t,e,s,o);break;case"overwrite":{let l=he(e);IZ(t,e,a,o,l),o=l;break}default:throw new Ie(`check type ${s.check}`)}}return o}function DT(t,e,n,r){let i=me(e,us),o=he(e);return t.write(`const ${o} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),o}function sa(t,e){if(typeof t!="number"||!Number.isFinite(t))throw new Ie(`${e} bound of type ${typeof t}`);return`${t}`}function OD(t,e){if(typeof e=="bigint")return`${e}n`;if(typeof e=="number"){if(Number.isNaN(e))throw new Ie("comparison check with NaN bound");return`${e}`}if(e instanceof Date){if(Number.isNaN(e.getTime()))throw new Ie("comparison check with Invalid Date bound");return me(t,e)}throw new Ie(`comparison check bound of type ${typeof e}`)}function TZ(t,e,n,r){let i=n.inclusive?"<":"<=";t.write(`if (${r} ${i} ${OD(e,n.value)}) return INVALID;`)}function AZ(t,e,n,r){let i=n.inclusive?">":">=";t.write(`if (${r} ${i} ${OD(e,n.value)}) return INVALID;`)}function EZ(t,e,n,r){if(typeof n.value=="bigint"){if(n.value===BigInt(0))throw new Ie("multiple_of check with a zero divisor");t.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=me(e,Td);t.write(`if (${i}(${r}, ${sa(n.value,"multiple_of")}) !== 0) return INVALID;`)}}function ND(t,e,n){let r=e.format;switch(r){case"safeint":t.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case"int32":t.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case"uint32":t.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case"float32":t.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case"float64":t.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new Ie(`number format ${r}`)}}function $Z(t,e,n){let r=e.format;if(r)switch(r){case"int64":t.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":t.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new Ie(`bigint format ${r}`)}}function kZ(t,e,n,r){let i=n.mime;if(i&&i.length>0){let o=me(e,new Set(i));t.write(`if (!${o}.has(${r}.type)) return INVALID;`)}}function RZ(t,e,n,r){if(n.when)throw new Ie('check with a custom "when" condition');t.write(`if (${r} == null) return INVALID;`);let i=n.shape;for(let o of Reflect.ownKeys(i)){let a=typeof o=="symbol"?me(e,o):Tn(o),s=he(e);t.write(`const ${s} = ${r}[${a}];`),mn(t,e,i[o],s,!1)}}function CZ(t,e,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;mt(t,e,n.schema,i)}function IZ(t,e,n,r,i){let o=n._zod.def.tx;if(!o)throw new Ie("overwrite check without a transform function");if(vs(o))throw new sr("z.compile: async overwrite transforms are not supported");let a=me(e,o);t.write(`const ${i} = ${a}(${r});`)}function LT(){throw new Gn}function qT(t){this.issues.push(t)}function PZ(t,e,n,r){let i=n._zod.def;if(i.fn){if(vs(i.fn))throw new sr("z.compile: async .refine() predicates are not supported");let o=gs(e,i.fn),a=me(e,LT),s=he(e);return t.write(`const ${s} = ${o}(${r});`),t.write(`if (${s} instanceof Promise) ${a}();`),t.write(`if (!${s}) return INVALID;`),r}if(n._zod.check){if(vs(n._zod.check))throw new sr("z.compile: async .superRefine() / check functions are not supported");let o=n._zod.check,s=gs(e,c=>{let u={value:c,issues:[],addIssue:qT};return o(u)instanceof Promise&&LT(),u.issues.length===0?u.value:En}),l=he(e);return t.write(`const ${l} = ${s}(${r});`),t.write(`if (${l} === INVALID) return INVALID;`),l}throw new Ie("custom check without a predicate or check function")}var OZ=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function MD(t,e,n,r,i=!0){let o=n.format;if(o==="base64"){let c=me(e,Vd);return t.write(`if (!${c}(${r})) return INVALID;`),r}if(o==="base64url"){let c=me(e,pg);return t.write(`if (!${c}(${r})) return INVALID;`),r}if(o==="jwt"){let c=me(e,vg),u=me(e,n.alg??null);return t.write(`if (!${c}(${r}, ${u})) return INVALID;`),r}if(o==="ipv6"){let c=me(e,Hd);return t.write(`if (!${c}(${r})) return INVALID;`),r}if(o==="cidrv6"){let c=me(e,hg);return t.write(`if (!${c}(${r})) return INVALID;`),r}if(o==="credit_card"){let c=me(e,mg);return t.write(`if (!${c}(${r})) return INVALID;`),r}if(o==="iban"){let c=me(e,gg);return t.write(`if (!${c}(${r})) return INVALID;`),r}let a=n;if(o==="url"||o==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let c=me(e,cg),u=me(e,n),d=he(e),h=he(e);if(t.write(`const ${d} = ${r}.trim();`),t.write(`const ${h} = ${c}(${d}, ${u});`),t.write(`if (typeof ${h} === "number") return INVALID;`),a.hostname!==void 0){let g=me(e,ug);t.write(`if (!${g}(${h}, ${u}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let g=me(e,dg);t.write(`if (!${g}(${h}, ${u}.protocol)) return INVALID;`)}if(!i)return null;let f=he(e),m=a.normalize?`${h}.href`:`${me(e,Bd)}(${d})`;return t.write(`const ${f} = ${m};`),f}let s=n.fn;if(s){if(vs(s))throw new Ie(`async string format ${o}`);let c=me(e,s);return t.write(`if (!${c}(${r})) return INVALID;`),r}if(OZ.has(o)&&n.pattern){let c=me(e,n.pattern);return t.write(`${c}.lastIndex = 0;`),t.write(`if (!${c}.test(${r})) return INVALID;`),r}let l=n.format;switch(l){case"regex":throw new Ie("regex format without a pattern");case"lowercase":t.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case"uppercase":t.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case"includes":t.write(`if (!${r}.includes(${Tn(n.includes)})) return INVALID;`);break;case"starts_with":{let c=n.prefix;t.write(`if (${r}.slice(0, ${c.length}) !== ${Tn(c)}) return INVALID;`);break}case"ends_with":{let c=n.suffix;t.write(`if (${r}.slice(-${c.length}) !== ${Tn(c)}) return INVALID;`);break}default:throw new Ie(`string format ${l}`)}return r}function mt(t,e,n,r,i=!0){let o=n._zod.def,a=o.type;if(o.coerce)throw new Ie(`coercion (z.coerce.${a}())`);let s=i||!!o.checks?.length,l;switch(a){case"string":l=NZ(t,e,n,r,s);break;case"number":l=MZ(t,n,r);break;case"boolean":l=DZ(t,r);break;case"bigint":l=LZ(t,n,r);break;case"symbol":l=jZ(t,r);break;case"undefined":l=UZ(t,r);break;case"null":l=qZ(t,r);break;case"any":case"unknown":l=r;break;case"never":t.write("return INVALID;"),l=r;break;case"void":l=FZ(t,r);break;case"nan":l=BZ(t,r);break;case"date":l=HZ(t,r);break;case"object":l=VZ(t,e,n,r,s);break;case"optional":l=ZZ(t,e,n,r,s);break;case"nullable":l=YZ(t,e,n,r,s);break;case"array":l=JZ(t,e,n,r,s);break;case"literal":l=XZ(t,e,n,r);break;case"enum":l=WZ(t,e,n,r);break;case"readonly":{let c=CD(t,e,n,r),u=he(e);t.write(`const ${u} = Object.freeze(${c});`),l=u;break}case"success":CD(t,e,n,r),l="true";break;case"default":case"prefault":l=QZ(t,e,n,r);break;case"nonoptional":l=e5(t,e,n,r);break;case"tuple":l=t5(t,e,n,r);break;case"union":l=n5(t,e,n,r);break;case"intersection":l=o5(t,e,n,r);break;case"record":l=a5(t,e,n,r);break;case"map":l=l5(t,e,n,r);break;case"set":l=c5(t,e,n,r);break;case"file":l=u5(t,r);break;case"template_literal":l=d5(t,e,n,r);break;case"lazy":l=h5(t,e,n,r);break;case"pipe":l=f5(t,e,n,r);break;case"custom":l=p5(t,e,n,r);break;case"transform":l=v5(t,e,n,r);break;case"catch":l=g5(t,e,n,r);break;default:throw new Ie(`schema type ${a}`)}return l===null?null:zZ(t,e,n,l)}function NZ(t,e,n,r,i=!0){t.write(`if (typeof ${r} !== "string") return INVALID;`);let o=n._zod.def;return o.format===void 0?r:MD(t,e,o,r,i)}function MZ(t,e,n){t.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=e._zod.def;return r.check==="number_format"&&r.format&&ND(t,{format:r.format},n),n}function DZ(t,e){return t.write(`if (typeof ${e} !== "boolean") return INVALID;`),e}function LZ(t,e,n){t.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=e._zod.def;if(r.format)switch(r.format){case"int64":t.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case"uint64":t.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break}return n}function jZ(t,e){return t.write(`if (typeof ${e} !== "symbol") return INVALID;`),e}function UZ(t,e){return t.write(`if (${e} !== undefined) return INVALID;`),e}function qZ(t,e){return t.write(`if (${e} !== null) return INVALID;`),e}function FZ(t,e){return t.write(`if (${e} !== undefined) return INVALID;`),e}function BZ(t,e){return t.write(`if (typeof ${e} !== "number" || !Number.isNaN(${e})) return INVALID;`),e}function HZ(t,e){return t.write(`if (!(${e} instanceof Date) || Number.isNaN(${e}.getTime())) return INVALID;`),e}function VZ(t,e,n,r,i=!0){let o=n._zod.def;t.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let a=o.shape,s=Object.keys(a),l=Object.getOwnPropertySymbols(a),c=l.length?[...s,...l]:s,u=b=>typeof b=="symbol"?me(e,b):Tn(b),d=b=>typeof b=="symbol"?`[${u(b)}]`:Tn(b),h=a;if(s.includes("__proto__"))throw new Ie('object shape key "__proto__"');let f=new Map;for(let b of c){let S=h[b],_=u(b),T=he(e);if(t.write(`const ${T} = ${r}[${_}];`),S._zod.optin!==void 0){let x=he(e);t.write(`let ${x} = (() => {`),t.indented(E=>{let C=mn(E,e,S,T);E.write(`return ${C};`)}),t.write("})();"),S._zod.optout==="optional"?(t.write(`if (${x} === INVALID) {`),t.indented(E=>{E.write(`if (${_} in ${r}) return INVALID;`),E.write(`${x} = undefined;`)}),t.write("}")):t.write(`if (${x} === INVALID) return INVALID;`),f.set(b,x)}else{KZ(S)&&t.write(`if (!(${_} in ${r})) return INVALID;`);let x=mn(t,e,S,T,i);x!==null&&f.set(b,x)}}let m=o.catchall,g="none";if(m){let b=m._zod.def.type;if(b==="never"){let S=s.map(_=>`k !== ${Tn(_)}`).join(" && ")||"true";t.write(`for (const k in ${r}) {`),t.indented(_=>{_.write(`if (${S}) return INVALID;`)}),t.write("}")}else(b==="unknown"||b==="any")&&!m._zod.def.checks?.length?g="passthrough":g="schema"}let y=he(e),v=c.some(b=>RD(h[b])||jT(h[b]));if(!i){if(g==="schema"){let b=s.length>0?me(e,new Set(s)):null;t.write(`for (const k in ${r}) {`),t.indented(S=>{S.write('if (k === "__proto__") continue;'),b&&S.write(`if (${b}.has(k)) continue;`);let _=he(e);S.write(`const ${_} = ${r}[k];`),mn(S,e,m,_,!1)}),t.write("}")}return null}if(v){t.write(`const ${y} = {};`);for(let b of c){let S=u(b),_=f.get(b);jT(h[b])?t.write(`if (${S} in ${r}) ${y}[${S}] = ${_};`):RD(h[b])?t.write(`if (${_} !== undefined || ${S} in ${r}) ${y}[${S}] = ${_};`):t.write(`${y}[${S}] = ${_};`)}}else{let b=c.map(S=>`${d(S)}: ${f.get(S)}`).join(", ");t.write(`const ${y} = { ${b} };`)}if(g!=="none"){let b=s.length>0?me(e,new Set(s)):null;t.write(`for (const k in ${r}) {`),t.indented(S=>{if(S.write('if (k === "__proto__") continue;'),b&&S.write(`if (${b}.has(k)) continue;`),g==="passthrough")S.write(`${y}[k] = ${r}[k];`);else{let _=he(e);S.write(`const ${_} = ${r}[k];`);let T=mn(S,e,m,_);S.write(`${y}[k] = ${T};`)}}),t.write("}")}return y}function ZZ(t,e,n,r,i=!0){let o=n._zod.def;if(GZ(n))return mt(t,e,o.innerType,r,i);if(o.innerType._zod.optin==="defaulted"){let s=he(e),l=he(e);return t.write(`let ${s};`),t.write(`if (${r} === undefined) {`),t.indented(c=>{c.write(`const ${l} = (() => {`),c.indented(u=>{let d=mt(u,e,o.innerType,r);u.write(`return ${d};`)}),c.write("})();"),c.write(`if (${l} !== INVALID) ${s} = ${l};`)}),t.write("} else {"),t.indented(c=>{let u=mt(c,e,o.innerType,r);c.write(`${s} = ${u};`)}),t.write("}"),s}let a=i?he(e):null;return a&&t.write(`let ${a};`),t.write(`if (${r} !== undefined) {`),t.indented(s=>{let l=mt(s,e,o.innerType,r,i);a&&l!==null&&s.write(`${a} = ${l};`)}),t.write("}"),a}function GZ(t){return t._zod.traits?.has("$ZodExactOptional")===!0}function KZ(t){return t._zod.optin===void 0&&ms(t)}function ms(t){if(t._zod.def.coerce)return!0;let e=t._zod.def;switch(e.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return e.innerType?ms(e.innerType):!1;case"literal":return!!e.values?.includes(void 0);case"enum":return!!t._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return e.innerType?ms(e.innerType):!0;case"catch":return!0;case"union":return e.options?e.options.some(ms):!0;case"intersection":return!e.left||!e.right?!0:ms(e.left)&&ms(e.right);case"pipe":return e.in?ms(e.in):!0;default:return!0}}function jT(t){return t._zod.optin==="optional"&&t._zod.optout==="optional"}function RD(t){return(t._zod.optin!=="defaulted"||t._zod.optout==="optional")&&sc(t)}function sc(t){let e=t._zod.def;switch(e.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!e.values?.includes(void 0);case"enum":return!!t._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return e.innerType?sc(e.innerType):!0;case"union":return e.options?e.options.some(sc):!0;case"intersection":return!e.left||!e.right||sc(e.left)||sc(e.right);case"pipe":return e.out?sc(e.out):!0;default:return!0}}function YZ(t,e,n,r,i=!0){let o=n._zod.def,a=i?he(e):null;return a&&t.write(`let ${a} = null;`),t.write(`if (${r} !== null) {`),t.indented(s=>{let l=mt(s,e,o.innerType,r,i);a&&l!==null&&s.write(`${a} = ${l};`)}),t.write("}"),a}function FT(t,e,n){for(let[r,i]of Xl(e._zod.def.checks))t.write(`if (${n} > ${sa(r,i._zod.def.check)}) return INVALID;`)}function JZ(t,e,n,r,i=!0){let o=n._zod.def;t.write(`if (!Array.isArray(${r})) return INVALID;`),FT(t,n,`${r}.length`);let a=i?he(e):null,s=he(e),l=he(e);return a&&t.write(`const ${a} = new Array(${r}.length);`),t.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),t.indented(c=>{c.write(`const ${l} = ${r}[${s}];`);let u=mn(c,e,o.element,l,i);a&&u!==null&&c.write(`${a}[${s}] = ${u};`)}),t.write("}"),a}function XZ(t,e,n,r){let o=n._zod.def.values;if(o.length!==1){let s=me(e,new Set(o));return t.write(`if (!${s}.has(${r})) return INVALID;`),r}let a=o[0];if(typeof a=="number"&&Number.isNaN(a)){let s=me(e,new Set(o));return t.write(`if (!${s}.has(${r})) return INVALID;`),r}if(typeof a=="string")t.write(`if (${r} !== ${Tn(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")t.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)t.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)t.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a=="bigint")t.write(`if (${r} !== ${a}n) return INVALID;`);else throw new Ie(`literal type ${typeof a}`);return r}function WZ(t,e,n,r){let i=n._zod.values;if(!i)throw new Ie("enum schema without enumerated values");let o=me(e,i);return t.write(`if (!${o}.has(${r})) return INVALID;`),r}function CD(t,e,n,r){let i=n._zod.def;return mt(t,e,i.innerType,r)}function QZ(t,e,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,"defaultValue")?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type==="prefault"){if(!a)return mt(t,e,i.innerType,r);let l=me(e,a),c=he(e);return t.write(`let ${c} = ${r};`),t.write(`if (${r} === undefined) ${c} = ${l}();`),mt(t,e,i.innerType,c)}let s=he(e);if(a){let l=me(e,a),c=me(e,Ad);t.write(`let ${s};`),t.write(`if (${r} === undefined) {`),t.indented(u=>{u.write(`${s} = ${c}(${l}());`)}),t.write("} else {"),t.indented(u=>{let d=mt(u,e,i.innerType,r);u.write(`${s} = ${d} === undefined ? ${c}(${l}()) : ${d};`)}),t.write("}")}else t.write(`let ${s};`),t.write(`if (${r} !== undefined) {`),t.indented(l=>{let c=mt(l,e,i.innerType,r);l.write(`${s} = ${c};`)}),t.write("}");return s}function e5(t,e,n,r){let i=n._zod.def,o=mt(t,e,i.innerType,r),a=he(e);return t.write(`const ${a} = ${o};`),t.write(`if (${a} === undefined) return INVALID;`),a}function t5(t,e,n,r){let i=n._zod.def,o=i.items,a=i.rest;t.write(`if (!Array.isArray(${r})) return INVALID;`);let s=ID(o,"optin"),l=ID(o,"optout");a?t.write(`if (${r}.length < ${s}) return INVALID;`):t.write(`if (${r}.length < ${s} || ${r}.length > ${o.length}) return INVALID;`);let c=he(e);t.write(`const ${c} = [];`);for(let u=0;u<o.length;u++){let d=o[u];if(u>=l)t.write(`if (${c}.length === ${u}) {`),t.indented(h=>{h.write(`if (${u} < ${r}.length) {`),h.indented(f=>{let m=he(e);f.write(`const ${m} = ${r}[${u}];`);let g=mn(f,e,d,m);f.write(`${c}[${u}] = ${g};`)}),h.write("} else {"),h.indented(f=>{if(jT(d)){f.write(`${c}.length = ${u};`);return}let m=he(e),g=he(e);f.write(`const ${m} = undefined;`),f.write(`const ${g} = (() => {`),f.indented(y=>{let v=mn(y,e,d,m);y.write(`return ${v};`)}),f.write("})();"),f.write(`if (${g} === INVALID || ${g} === undefined) ${c}.length = ${u};`),f.write(`else ${c}[${u}] = ${g};`)}),h.write("}")}),t.write("}");else{let h=he(e);t.write(`const ${h} = ${r}[${u}];`);let f=mn(t,e,d,h);t.write(`${c}[${u}] = ${f};`)}}if(a){let u=he(e),d=he(e);t.write(`for (let ${u} = ${o.length}; ${u} < ${r}.length; ${u}++) {`),t.indented(h=>{h.write(`const ${d} = ${r}[${u}];`);let f=mn(h,e,a,d);h.write(`${c}[${u}] = ${f};`)}),t.write("}")}return c}function ID(t,e){for(let n=t.length-1;n>=0;n--)if(!(e==="optin"?t[n]._zod.optin!==void 0:t[n]._zod.optout==="optional"))return n+1;return 0}function n5(t,e,n,r){let i=n._zod.def,o=i.options;if(i.discriminator)return i5(t,e,i,r);if(i.inclusive===!1)throw new Ie("exclusive unions (z.xor)");if(o.length===0)return t.write("return INVALID;"),r;if(o.length===1)return mt(t,e,o[0],r);if(o.every(l=>l._zod.def.type==="literal"&&!l._zod.def.checks?.length)){let l=new Set(o.flatMap(u=>u._zod.def.values)),c=me(e,l);return t.write(`if (!${c}.has(${r})) return INVALID;`),r}let s=he(e);t.write(`let ${s};`);for(let l=0;l<o.length;l++){let c=o[l];l===0?t.write(`${s} = (() => {`):t.write(`if (${s} === INVALID) ${s} = (() => {`),t.indented(u=>{let d=mt(u,e,c,r);u.write(`return ${d};`)}),t.write("})();")}return t.write(`if (${s} === INVALID) return INVALID;`),s}function i5(t,e,n,r){if(n.unionFallback)throw new Ie("discriminated union with unionFallback");if(n.options.length===0)return t.write("return INVALID;"),r;let i=he(e),o=he(e);t.write(`const ${i} = ${r}?.[${Tn(n.discriminator)}];`),t.write(`let ${o};`);let a=!0,s=new Set;for(let l of n.options){let c=l._zod.propValues?.[n.discriminator];if(!c||c.size===0)throw new Ie("discriminated union option without static discriminator values");for(let h of c){if(s.has(h))throw new Ie(`duplicate discriminator value ${String(h)}`);s.add(h)}let u=Array.from(c,h=>r5(e,i,h)),d=a?"if":"else if";t.write(`${d} (${u.join(" || ")}) {`),t.indented(h=>{let f=mt(h,e,l,r);h.write(`${o} = ${f};`)}),t.write("}"),a=!1}return t.write("else { return INVALID; }"),o}function r5(t,e,n){if(typeof n=="string")return`${e} === ${Tn(n)}`;if(typeof n=="number")return Number.isNaN(n)?`Number.isNaN(${e})`:`${e} === ${n}`;if(typeof n=="boolean")return`${e} === ${n}`;if(n===null)return`${e} === null`;if(n===void 0)return`${e} === undefined`;if(typeof n=="bigint")return`${e} === ${n}n`;if(typeof n=="symbol"){let r=me(t,n);return`${e} === ${r}`}throw new Ie(`literal discriminator value ${String(n)}`)}function o5(t,e,n,r){let i=n._zod.def;e.definite=!1;let o=mn(t,e,i.left,r),a=mn(t,e,i.right,r),s=me(e,rc),l=he(e);return t.write(`const ${l} = ${s}(${o}, ${a});`),t.write(`if (!${l}.valid) return INVALID;`),`${l}.data`}function a5(t,e,n,r){let i=n._zod.def,o=me(e,Di);t.write(`if (!${o}(${r})) return INVALID;`);let a=he(e),s=he(e),l=he(e);t.write(`const ${a} = {};`);let c=i,u=c.partial?void 0:i.keyType._zod.values;if(u){let f=[];for(let g of u){if(!(typeof g=="string"||typeof g=="number"||typeof g=="symbol"))throw new Ie(`record key value ${String(g)}`);let y=typeof g=="number"?g.toString():g;if(y==="__proto__")throw new Ie('record key "__proto__"');f.push(y);let v=me(e,g),b=mt(t,e,i.keyType,v),S=he(e);t.write(`const ${S} = ${r}[${s5(e,y)}];`);let _=mn(t,e,i.valueType,S);t.write(`${a}[${b}] = ${_};`)}let m=me(e,new Set(f));return t.write(`for (const ${s} in ${r}) {`),t.indented(g=>{g.write(`if (${m}.has(${s})) continue;`),c.mode==="loose"?g.write(`if (${s} !== "__proto__") ${a}[${s}] = ${r}[${s}];`):g.write("return INVALID;")}),t.write("}"),a}let d=i.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){let f=i.mode==="loose",m=Ng(i.keyType);m.definite===!1&&(e.definite=!1);let g=me(e,m),y=me(e,go),v=he(e);return PD(t,e,r,s,b=>{b.write(`let ${v} = ${g}(${s});`),b.write(`if (${v} === INVALID && typeof ${s} === "string" && ${y}.test(${s})) ${v} = ${g}(Number(${s}));`),f?b.write(`if (${v} === INVALID) { ${a}[${s}] = ${r}[${s}]; continue; }`):b.write(`if (${v} === INVALID) return INVALID;`),b.write(`if (${v} === "__proto__") continue;`);let S=he(e);b.write(`const ${S} = ${r}[${s}];`);let _=mn(b,e,i.valueType,S);b.write(`${a}[${v}] = ${_};`)}),a}return PD(t,e,r,s,f=>{f.write(`const ${l} = ${r}[${s}];`);let m=mn(f,e,i.valueType,l);f.write(`${a}[${s}] = ${m};`)},"return INVALID;"),a}function PD(t,e,n,r,i,o){let a=me(e,Object.prototype.propertyIsEnumerable),s=he(e),l=he(e),c=he(e);t.write(`const ${s} = Object.getOwnPropertySymbols(${n});`),t.write(`const ${l} = Object.getOwnPropertyNames(${n});`),t.write(`for (let ${c} = 0; ${c} < ${l}.length; ${c}++) {`),t.indented(u=>{u.write(`const ${r} = ${l}[${c}];`),u.write(`if (${r} === "__proto__" || !${a}.call(${n}, ${r})) continue;`),i(u)}),t.write("}"),t.write(`for (let ${c} = 0; ${c} < ${s}.length; ${c}++) {`),t.indented(u=>{u.write(`const ${r} = ${s}[${c}];`),u.write(`if (!${a}.call(${n}, ${r})) continue;`),o?u.write(o):i(u)}),t.write("}")}function s5(t,e){return typeof e=="string"?Tn(e):me(t,e)}function l5(t,e,n,r){let i=n._zod.def;t.write(`if (!(${r} instanceof Map)) return INVALID;`),FT(t,n,`${r}.size`);let o=he(e),a=he(e),s=he(e);return t.write(`const ${o} = new Map();`),t.write(`for (const [${a}, ${s}] of ${r}) {`),t.indented(l=>{let c=mt(l,e,i.keyType,a),u=mt(l,e,i.valueType,s);l.write(`${o}.set(${c}, ${u});`)}),t.write("}"),o}function c5(t,e,n,r){let i=n._zod.def;t.write(`if (!(${r} instanceof Set)) return INVALID;`),FT(t,n,`${r}.size`);let o=he(e),a=he(e);return t.write(`const ${o} = new Set();`),t.write(`for (const ${a} of ${r}) {`),t.indented(s=>{let l=mt(s,e,i.valueType,a);s.write(`${o}.add(${l});`)}),t.write("}"),o}function u5(t,e){return t.write(`if (!(${e} instanceof File)) return INVALID;`),e}function d5(t,e,n,r){t.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let o=me(e,i);t.write(`${o}.lastIndex = 0;`),t.write(`if (!${o}.test(${r})) return INVALID;`)}return r}function h5(t,e,n,r){let i=n._zod.def,o=gs(e,i.getter),a=me(e,{parser:null});t.write(`if (!${a}.parser) {`),t.indented(l=>{l.write(`const inner = ${o}();`),l.write(`${a}.parser = function(input) {`),l.indented(c=>{c.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),c.write("return result.issues.length === 0 ? result.value : INVALID;")}),l.write("};")}),t.write("}");let s=he(e);return t.write(`const ${s} = ${a}.parser(${r});`),t.write(`if (${s} === INVALID) return INVALID;`),s}function f5(t,e,n,r){let i=n._zod.def,o=mt(t,e,i.in,r);if(i.transform){if(vs(i.transform))throw new sr("z.compile: async transforms in pipes are not supported");let a=i.transform,l=gs(e,u=>{let d={value:u,issues:[],addIssue:qT},h=a(u,d);return h instanceof Promise?En:d.issues.length===0?h:En}),c=he(e);return t.write(`const ${c} = ${l}(${o});`),t.write(`if (${c} === INVALID) return INVALID;`),mt(t,e,i.out,c)}else return mt(t,e,i.out,o)}function vs(t){return typeof t=="function"&&(t.constructor.name==="AsyncFunction"||t[Symbol.toStringTag]==="AsyncFunction")}function p5(t,e,n,r){let i=n._zod.def;if(i.fn){if(vs(i.fn))throw new sr("z.compile: async custom predicates are not supported");let o=gs(e,i.fn),a=me(e,LT),s=he(e);t.write(`const ${s} = ${o}(${r});`),t.write(`if (${s} instanceof Promise) ${a}();`),t.write(`if (!${s}) return INVALID;`)}else throw new Ie("custom schema without a predicate function");return r}function m5(t,e,n){let r=t._zod.run({value:n,issues:[]},{});if(r&&typeof r.then=="function")return En;let i=r;return i.issues.length===0?i.value:e()}function g5(t,e,n,r){let i=n._zod.def;if(!i.catchValue[Um])throw new Ie("catch with a callback (only a constant catch value compiles)",!1);let o=he(e);t.write(`let ${o} = (() => {`),t.indented(c=>{let u=mn(c,e,i.innerType,r);c.write(`return ${u};`)}),t.write("})();");let a=me(e,i.innerType),s=gs(e,i.catchValue),l=me(e,m5);return t.write(`if (${o} === INVALID) {`),t.indented(c=>{c.write(`${o} = ${l}(${a}, ${s}, ${r});`),c.write(`if (${o} === INVALID) return INVALID;`)}),t.write("}"),o}function v5(t,e,n,r){let i=n._zod.def;if(i.transform){if(vs(i.transform))throw new sr("z.compile: async transforms are not supported");let o=i.transform,s=gs(e,c=>{let u={value:c,issues:[],addIssue:qT},d=o(c,u);return d instanceof Promise?En:u.issues.length===0?d:En}),l=he(e);return t.write(`const ${l} = ${s}(${r});`),t.write(`if (${l} === INVALID) return INVALID;`),l}return r}function Mg(t){return t.checks&&(t.checks=[...t.checks]),t}function BT(t,e){return new t(Mg({type:"string",...Z(e)}))}function HT(t,e){return new t(Mg({type:"string",coerce:!0,...Z(e)}))}function Dg(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...Z(e)})}function Lg(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...Z(e)})}function jg(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...Z(e)})}function Ug(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Z(e)})}function qg(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Z(e)})}function Fg(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Z(e)})}function nh(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...Z(e)})}function Bg(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...Z(e)})}function Hg(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...Z(e)})}function Vg(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...Z(e)})}function Zg(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...Z(e)})}function Gg(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...Z(e)})}function Kg(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...Z(e)})}function Yg(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...Z(e)})}function Jg(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...Z(e)})}function Xg(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...Z(e)})}function VT(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...Z(e)})}function Wg(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Z(e)})}function Qg(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Z(e)})}function ev(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...Z(e)})}function tv(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...Z(e)})}function nv(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...Z(e)})}function ZT(t,e){return new t({type:"string",format:"credit_card",check:"string_format",abort:!1,...Z(e)})}function GT(t,e){return new t({type:"string",format:"iban",check:"string_format",abort:!1,...Z(e)})}function iv(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...Z(e)})}var KT={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ih(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Z(e)})}function rh(t,e){return new t({type:"string",format:"date",check:"string_format",...Z(e)})}function oh(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...Z(e)})}function ah(t,e){return new t({type:"string",format:"duration",check:"string_format",...Z(e)})}function YT(t,e){return new t(Mg({type:"number",checks:[],...Z(e)}))}function JT(t,e){return new t(Mg({type:"number",coerce:!0,checks:[],...Z(e)}))}function XT(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...Z(e)})}function WT(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...Z(e)})}function QT(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...Z(e)})}function eA(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...Z(e)})}function tA(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...Z(e)})}function nA(t,e){return new t({type:"boolean",...Z(e)})}function iA(t,e){return new t({type:"boolean",coerce:!0,...Z(e)})}function rA(t,e){return new t({type:"bigint",...Z(e)})}function oA(t,e){return new t({type:"bigint",coerce:!0,...Z(e)})}function aA(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Z(e)})}function sA(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Z(e)})}function lA(t,e){return new t({type:"symbol",...Z(e)})}function cA(t,e){return new t({type:"undefined",...Z(e)})}function uA(t,e){return new t({type:"null",...Z(e)})}function dA(t){return new t({type:"any"})}function hA(t){return new t({type:"unknown"})}function fA(t,e){return new t({type:"never",...Z(e)})}function pA(t,e){return new t({type:"void",...Z(e)})}function mA(t,e){return new t({type:"date",...Z(e)})}function gA(t,e){return new t({type:"date",coerce:!0,...Z(e)})}function vA(t,e){return new t({type:"nan",...Z(e)})}function Er(t,e){return new ng({check:"less_than",...Z(e),value:t,inclusive:!1})}function gi(t,e){return new ng({check:"less_than",...Z(e),value:t,inclusive:!0})}function $r(t,e){return new ig({check:"greater_than",...Z(e),value:t,inclusive:!1})}function vi(t,e){return new ig({check:"greater_than",...Z(e),value:t,inclusive:!0})}function rv(t){return $r(0,t)}function ov(t){return Er(0,t)}function av(t){return gi(0,t)}function sv(t){return vi(0,t)}function la(t,e){return new Qx({check:"multiple_of",...Z(e),value:t})}function ca(t,e){return new nz({check:"max_size",...Z(e),maximum:t})}function kr(t,e){return new iz({check:"min_size",...Z(e),minimum:t})}function bs(t,e){return new rz({check:"size_equals",...Z(e),size:t})}function ys(t,e){return new oz({check:"max_length",...Z(e),maximum:t})}function vo(t,e){return new az({check:"min_length",...Z(e),minimum:t})}function Ss(t,e){return new sz({check:"length_equals",...Z(e),length:t})}function lc(t,e){return new lz({check:"string_format",format:"regex",...Z(e),pattern:t})}function cc(t){return new cz({check:"string_format",format:"lowercase",...Z(t)})}function uc(t){return new uz({check:"string_format",format:"uppercase",...Z(t)})}function dc(t,e){return new dz({check:"string_format",format:"includes",...Z(e),includes:t})}function hc(t,e){return new hz({check:"string_format",format:"starts_with",...Z(e),prefix:t})}function fc(t,e){return new fz({check:"string_format",format:"ends_with",...Z(e),suffix:t})}function lv(t,e,n){return new pz({check:"property",property:t,schema:e,...Z(n)})}function pc(t,e){return new mz({check:"properties",shape:t,...Z(e)})}function mc(t,e){return new gz({check:"mime_type",mime:t,...Z(e)})}function lr(t){return new vz({check:"overwrite",tx:t})}function gc(t){return lr(e=>e.normalize(t))}function vc(){return lr(t=>t.trim())}function bc(){return lr(t=>t.toLowerCase())}function yc(){return lr(t=>t.toUpperCase())}function Sc(){return lr(t=>nx(t))}function bA(t,e,n){return new t({type:"array",element:e,...Z(n)})}function b5(t,e,n){return new t({type:"union",options:e,...Z(n)})}function y5(t,e,n){return new t({type:"union",options:e,inclusive:!1,...Z(n)})}function S5(t,e,n,r){return new t({type:"union",options:n,discriminator:e,...Z(r)})}function _5(t,e,n){return new t({type:"intersection",left:e,right:n})}function w5(t,e,n,r){let i=n instanceof ye,o=i?r:n,a=i?n:null;return new t({type:"tuple",items:e,rest:a,...Z(o)})}function x5(t,e,n,r){return new t({type:"record",keyType:e,valueType:n,...Z(r)})}function z5(t,e,n,r){return new t({type:"map",keyType:e,valueType:n,...Z(r)})}function T5(t,e,n){return new t({type:"set",valueType:e,...Z(n)})}function A5(t,e,n){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new t({type:"enum",entries:r,...Z(n)})}function E5(t,e,n){return new t({type:"enum",entries:e,...Z(n)})}function $5(t,e,n){return new t({type:"literal",values:Array.isArray(e)?e:[e],...Z(n)})}function yA(t,e){return new t({type:"file",...Z(e)})}function k5(t,e){return new t({type:"transform",transform:e})}function R5(t,e){return new t({type:"optional",innerType:e})}function C5(t,e){return new t({type:"nullable",innerType:e})}function I5(t,e,n){return new t({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Ad(n)}})}function P5(t,e,n){return new t({type:"nonoptional",innerType:e,...Z(n)})}function O5(t,e){return new t({type:"success",innerType:e})}function N5(t,e,n){return new t({type:"catch",innerType:e,catchValue:typeof n=="function"?n:lx(n)})}function M5(t,e,n){return new t({type:"pipe",in:e,out:n})}function D5(t,e){return new t({type:"readonly",innerType:e})}function L5(t,e,n){return new t({type:"template_literal",parts:e,...Z(n)})}function j5(t,e){return new t({type:"lazy",getter:e})}function U5(t,e){return new t({type:"promise",innerType:e})}function SA(t,e,n){let r=Z(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function _A(t,e,n){return new t({type:"custom",check:"custom",fn:e,...Z(n)})}function wA(t,e){let n=DD(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(Wl(i,r.value,n._zod.def));else{let o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(Wl(o))}},t(r.value,r)),e);return n}function DD(t,e){let n=new tt({check:"custom",...Z(e)});return n._zod.check=t,n}function xA(t){let e=new tt({check:"describe"});return e._zod.onattach=[n=>{let r=sn.get(n)??{};sn.add(n,{...r,description:t})}],e._zod.check=()=>{},e}function zA(t){let e=new tt({check:"meta"});return e._zod.onattach=[n=>{let r=sn.get(n)??{};sn.add(n,{...r,...t})}],e._zod.check=()=>{},e}function TA(t,e){let n=Z(e),r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(r),a=new Set(i),s=t.Codec??Yd,l=t.Boolean??Gd,c=t.String??ps,u=new c({type:"string",error:n.error}),d=new l({type:"boolean",error:n.error}),h=new s({type:"pipe",in:u,out:d,transform:((f,m)=>{let g=f;return n.case!=="sensitive"&&(g=g.toLowerCase()),o.has(g)?!0:a.has(g)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:m.value,inst:h,continue:!1}),{})}),reverseTransform:((f,m)=>f===!0?r[0]||"true":i[0]||"false"),error:n.error});return h._zod.bag.truthy=r,h._zod.bag.falsy=i,h._zod.bag.case=n.case??"insensitive",h}function _s(t,e,n,r={}){let i=Z(r),o={check:"string_format",type:"string",format:e,fn:typeof n=="function"?n:s=>n.test(s),...i};return n instanceof RegExp&&(o.pattern=n),new t(o)}function sh(t,...e){for(let n of e)for(let r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&an(t,r,n[r]);return t}function ua(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??sn,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function Bt(t,e,n,r,i){let o=typeof e.unrepresentable=="function"?e.unrepresentable({zodSchema:t,path:r.path,message:i}):e.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(i);return Object.assign(n,o),!0}function Ye(t,e,n={path:[],schemaPath:[]}){var r;let i=t._zod.def,o=e.seen.get(t);if(o)return o.count++,n.schemaPath.includes(t)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,a),e.sharedDefsExtractedFor=void 0,e.sharedEmitDoneFor=void 0;let s=t._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,a.schema,u);else{let h=a.schema,f=e.processors[i.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);f(t,e,h,u)}let d=t._zod.parent;d&&(a.ref||(a.ref=d),Ye(d,e,u),e.seen.get(d).isParent=!0)}let l=e.metadataRegistry.get(t);return l&&sh(a.schema,l),e.io==="input"&&$n(t)&&(delete a.schema.examples,delete a.schema.default),e.io==="input"&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,e.seen.get(t).schema}function LD(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function da(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;let r=new Map;for(let a of t.seen.entries()){let s=t.metadataRegistry.get(a[0])?.id;if(s){let l=r.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(s,a[0])}}let i=a=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(a[0])?.id,h=t.external.uri??(m=>m);if(d)return{ref:h(d)};let f=a[1].defId??a[1].schema.id??`schema${t.counter++}`;return a[1].defId=f,{defId:f,ref:`${h("__shared")}#/${s}/${LD(f)}`}}let l="#",c=`${l}/${s}/`;if(a[1]===n&&!a[1].schema.id)return{ref:l};let u=a[1].schema.id??`__schema${t.counter++}`;return{defId:u,ref:c+LD(u)}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:c}=i(a);s.def={...s.schema},c&&(s.defId=c);let u=s.schema;for(let d in u)delete u[d];u.$ref=l};if(t.cycles==="throw")for(let a of t.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of t.seen.entries()){let s=a[1];if(e===a[0]){o(a);continue}if(t.external){let c=t.external.registry.get(a[0])?.id;if(e!==a[0]&&c){o(a);continue}}if(t.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}s.count>1&&t.reused==="ref"&&o(a)}t.external&&(t.sharedDefsExtractedFor=t.external)}function qD(t){let e=t.anyOf;if(!Array.isArray(e)||e.length===0||t.type!==void 0)return;let n=[];for(let r of e){if(!r||typeof r!="object")return;qD(r);let i=Object.keys(r);if(i.length!==1||i[0]!=="type")return;let o=r.type;for(let a of Array.isArray(o)?o:[o]){if(typeof a!="string")return;n.includes(a)||n.push(a)}}delete t.anyOf,t.type=n.length===1?n[0]:n}var FD=new Set(["type","properties","required","additionalProperties"]),jD=["oneOf","anyOf"];function UD(t){let e=t.additionalProperties;return e===void 0||e===!1||typeof e!="object"||e===null?null:Object.keys(e).length?e:null}function AA(t){let e=[];for(let o of t){if(typeof o!="object"||o.type!=="object")return null;for(let a in o)if(!FD.has(a))return null;e.push(o)}let n={},r=new Set;for(let o of e){for(let a in o.properties){if(Object.prototype.hasOwnProperty.call(n,a))continue;let s=[];for(let c of e){let u=c.properties?.[a]??UD(c);u!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(u))||s.push(u))}let l=s.length===1?s[0]:AA(s)??{allOf:s};an(n,a,l)}for(let a of o.required??[])r.add(a)}let i={type:"object",properties:n};if(r.size&&(i.required=[...r]),e.every(o=>o.additionalProperties===!1))i.additionalProperties=!1;else{let o=[];for(let a of e){let s=UD(a);s&&!o.some(l=>JSON.stringify(l)===JSON.stringify(s))&&o.push(s)}o.length===1?i.additionalProperties=o[0]:o.length>1&&(i.additionalProperties={allOf:o})}return i}function q5(t){let e=t.allOf;if(!Array.isArray(e)||e.length<2)return;for(let i of FD)if(i in t)return;let n=e.filter(i=>jD.some(o=>Array.isArray(i[o]))),r=null;if(!n.length)r=AA(e);else{let i=n[0],o=jD.find(l=>Array.isArray(i[l]));if(Object.keys(i).length!==1)return;let a=e.filter(l=>l!==i),s=i[o].map(l=>AA([...a,l]));if(s.some(l=>!l))return;r={[o]:s}}r&&(delete t.allOf,sh(t,r))}function ha(t,e){let n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=s=>{let l=t.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,u={...c},d=l.ref;if(l.ref=null,d){r(d);let f=t.seen.get(d),m=f.schema;if(m.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):sh(c,m),sh(c,u),s._zod.parent===d)for(let y in c)y==="$ref"||y==="allOf"||y in u||delete c[y];if(m.$ref&&f.def)for(let y in c)y==="$ref"||y==="allOf"||y in f.def&&JSON.stringify(c[y])===JSON.stringify(f.def[y])&&delete c[y]}let h=s._zod.parent;if(h&&h!==d){r(h);let f=t.seen.get(h);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let m in c)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(c[m])===JSON.stringify(f.def[m])&&delete c[m]}t.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(let s of[...t.seen.entries()].reverse())r(s[0]);if(t.target!=="openapi-3.0")for(let s of t.seen.entries())qD(s[1].def??s[1].schema);for(let s of t.deferred)s();if(t.intersections.length){let s=new Map;for(let l of t.seen.values())for(let c of[l.schema,l.def]){let u=c?.allOf;if(!Array.isArray(u))continue;let d=s.get(u);d?d.push(c):s.set(u,[c])}for(let l of t.intersections)for(let c of s.get(l)??[])q5(c)}}let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(s)}sh(i,n.defId?n.schema:n.def??n.schema);let o=t.metadataRegistry.get(e)?.id;o!==void 0&&i.id===o&&delete i.id;let a=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(let s of t.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,an(a,l.defId,l.def))}t.external&&(t.sharedEmitDoneFor=t.external),t.external||Object.keys(a).length>0&&(t.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{let s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:_c(e,"input",t.processors),output:_c(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function $n(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return $n(r.element,n);if(r.type==="set")return $n(r.valueType,n);if(r.type==="lazy")return $n(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return $n(r.innerType,n);if(r.type==="intersection")return $n(r.left,n)||$n(r.right,n);if(r.type==="record"||r.type==="map")return $n(r.keyType,n)||$n(r.valueType,n);if(r.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:$n(r.in,n)||$n(r.out,n);if(r.type==="object"){for(let i in r.shape)if($n(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(let i of r.options)if($n(i,n))return!0;return!1}if(r.type==="tuple"){for(let i of r.items)if($n(i,n))return!0;return!!(r.rest&&$n(r.rest,n))}return!1}var EA=(t,e={})=>n=>{let r=ua({...n,processors:e});return Ye(t,r),da(r,t),ha(r,t)},_c=(t,e,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=ua({...i??{},target:o,io:e,processors:n});return Ye(t,a),da(a,t),ha(a,t)};var wc=(t,e,n)=>{(t[e]===void 0||n>t[e])&&(t[e]=n)},xc=(t,e,n)=>{(t[e]===void 0||n<t[e])&&(t[e]=n)},BD=(t,e)=>{wc(t,"minimum",e),xc(t,"maximum",e)},GD=(t,e)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(e)||t.multipleOf.push(e)},KD=(t,e)=>{t.patterns??(t.patterns=new Set),t.patterns.add(e)},YD=(t,e)=>{t.mime=t.mime?t.mime.filter(n=>e.includes(n)):[...e]},JD=(t,e)=>{t.format=e,e.includes("int")&&(t.isInt=!0)},HD=(t,e)=>wc(t,"minimum",e.minimum),VD=(t,e)=>xc(t,"maximum",e.maximum),ZD=t=>(e,n)=>{JD(e,n.format);let[r,i]=t[n.format];wc(e,"minimum",r),xc(e,"maximum",i)},F5={greater_than:(t,e)=>wc(t,e.inclusive?"minimum":"exclusiveMinimum",e.value),less_than:(t,e)=>xc(t,e.inclusive?"maximum":"exclusiveMaximum",e.value),multiple_of:(t,e)=>GD(t,e.value),number_format:ZD($d),bigint_format:ZD(kd),min_length:HD,max_length:VD,length_equals:(t,e)=>BD(t,e.length),min_size:HD,max_size:VD,size_equals:(t,e)=>BD(t,e.size),string_format:(t,e)=>{JD(t,e.format),e.pattern&&KD(t,e.pattern),(e.format==="base64"||e.format==="base64url")&&(t.contentEncoding=e.format),(e.local||e.precision===-1)&&(t.laxFormat=!0)},mime_type:(t,e)=>YD(t,e.mime)};function Ht(t){let e={},n=t._zod.def,r=t._zod.traits.has("$ZodCheck")?[t,...n.checks??[]]:n.checks??[];for(let o of r)F5[o._zod.def.check]?.(e,o._zod.def);let i=t._zod.bag;i.minimum!==void 0&&wc(e,"minimum",i.minimum),i.exclusiveMinimum!==void 0&&wc(e,"exclusiveMinimum",i.exclusiveMinimum),i.maximum!==void 0&&xc(e,"maximum",i.maximum),i.exclusiveMaximum!==void 0&&xc(e,"exclusiveMaximum",i.exclusiveMaximum),i.multipleOf!==void 0&&GD(e,i.multipleOf),i.format!==void 0&&(e.format??(e.format=i.format),i.format.includes("int")&&(e.isInt=!0)),i.mime&&YD(e,i.mime);for(let o of i.patterns??[])KD(e,o);return e}var B5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},H5=new Map([[fg,Px],[Zd,Ox]]),XD=t=>H5.get(t)??t,RA=(t,e,n,r)=>{let i=n;i.type="string";let{minimum:o,maximum:a,format:s,patterns:l,contentEncoding:c,laxFormat:u}=Ht(t);if(typeof o=="number"&&(i.minLength=o),typeof a=="number"&&(i.maxLength=a),s&&(i.format=B5[s]??s,i.format===""&&delete i.format,(s==="time"||u)&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){let d=[...l].map(XD);d.length===1?i.pattern=d[0].source:d.length>1&&(i.allOf=[...d.map(h=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},CA=(t,e,n,r)=>{let i=n,{minimum:o,maximum:a,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:c,isInt:u}=Ht(t);i.type=u?"integer":"number";let d=typeof c=="number"&&c>=(o??Number.NEGATIVE_INFINITY),h=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),f=e.target==="draft-04"||e.target==="openapi-3.0";if(d?f?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c:typeof o=="number"&&(i.minimum=o),h?f?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof a=="number"&&(i.maximum=a),s){let m=new Set;for(let v of s)Number.isFinite(v)&&v!==0?m.add(Math.abs(v)):Bt(t,e,i,r,`A multipleOf divisor of ${v} cannot be represented in JSON Schema`);let[g,...y]=m;g!==void 0&&(i.multipleOf=g),y.length&&(i.allOf=[...i.allOf??[],...y.map(v=>({multipleOf:v}))])}},IA=(t,e,n,r)=>{n.type="boolean"},PA=(t,e,n,r)=>{Bt(t,e,n,r,"BigInt cannot be represented in JSON Schema")},OA=(t,e,n,r)=>{Bt(t,e,n,r,"Symbols cannot be represented in JSON Schema")},NA=(t,e,n,r)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},MA=(t,e,n,r)=>{Bt(t,e,n,r,"Undefined cannot be represented in JSON Schema")},DA=(t,e,n,r)=>{Bt(t,e,n,r,"Void cannot be represented in JSON Schema")},LA=(t,e,n,r)=>{n.not={}},jA=(t,e,n,r)=>{},UA=(t,e,n,r)=>{},qA=(t,e,n,r)=>{Bt(t,e,n,r,"Date cannot be represented in JSON Schema")},FA=(t,e,n,r)=>{let i=t._zod.def,o=Gl(i.entries);if(o.length===0){n.not={};return}o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},BA=(t,e,n,r)=>{let i=t._zod.def;if(i.values.length===0){n.not={};return}let o=[];for(let a of i.values)if(a===void 0){if(Bt(t,e,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Bt(t,e,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},HA=(t,e,n,r)=>{Bt(t,e,n,r,"NaN cannot be represented in JSON Schema")},VA=(t,e,n,r)=>{let i=n,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},ZA=(t,e,n,r)=>{let i=n;i.type="string",i.format="binary",i.contentEncoding="binary";let{minimum:o,maximum:a,mime:s}=Ht(t);o!==void 0&&(i.minLength=o),a!==void 0&&(i.maxLength=a),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(l=>({contentMediaType:l})))},GA=(t,e,n,r)=>{n.type="boolean"},KA=(t,e,n,r)=>{Bt(t,e,n,r,"Custom types cannot be represented in JSON Schema")},YA=(t,e,n,r)=>{Bt(t,e,n,r,"Function types cannot be represented in JSON Schema")},JA=(t,e,n,r)=>{Bt(t,e,n,r,"Transforms cannot be represented in JSON Schema")},XA=(t,e,n,r)=>{Bt(t,e,n,r,"Map cannot be represented in JSON Schema")},WA=(t,e,n,r)=>{Bt(t,e,n,r,"Set cannot be represented in JSON Schema")},QA=(t,e,n,r)=>{let i=n,o=t._zod.def,{minimum:a,maximum:s}=Ht(t);typeof a=="number"&&(i.minItems=a),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=Ye(o.element,e,{...r,path:[...r.path,"items"]})};function lh(t){let e=t._zod.def;return e.type==="pipe"&&e.in._zod.traits.has("$ZodTransform")?lh(e.out):e.type==="catch"?lh(e.innerType):t._zod.optin}var eE=(t,e,n,r)=>{let i=n,o=t._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&Bt(t,e,i,r,"Symbol keys cannot be represented in JSON Schema"))return;i.type="object",i.properties={};for(let c in a)an(i.properties,c,Ye(a[c],e,{...r,path:[...r.path,"properties",c]}));let l=[];for(let c of Object.keys(a)){let u=o.shape[c];(e.io==="input"?lh(u)===void 0:u._zod.optout===void 0)&&l.push(c)}l.length>0&&(i.required=l),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Ye(o.catchall,e,{...r,path:[...r.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},uv=(t,e,n,r)=>{let i=t._zod.def,o=i.inclusive===!1,a=i.options.map((s,l)=>Ye(s,e,{...r,path:[...r.path,o?"oneOf":"anyOf",l]}));o?n.oneOf=a:n.anyOf=a},tE=(t,e,n,r)=>{let i=t._zod.def,o=Ye(i.left,e,{...r,path:[...r.path,"allOf",0]}),a=Ye(i.right,e,{...r,path:[...r.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=l,e.intersections.push(l)},nE=(t,e,n,r)=>{let i=n,o=t._zod.def;i.type="array";let a=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((g,y)=>Ye(g,e,{...r,path:[...r.path,a,y]})),c=o.rest?Ye(o.rest,e,{...r,path:[...r.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null,u=o.items.length;for(;u>0;){let g=o.items[u-1];if(!(e.io==="input"?lh(g)!==void 0:g._zod.optout==="optional"))break;u--}let d=o.items.length,h=!o.rest;e.target==="draft-2020-12"?(i.prefixItems=l,h?i.items=!1:c&&(i.items=c),u>0&&(i.minItems=u),h&&(i.maxItems=d)):e.target==="openapi-3.0"?(i.items={anyOf:l},c&&i.items.anyOf.push(c),u>0&&(i.minItems=u),h&&(i.maxItems=d)):(i.items=l,h?i.additionalItems=!1:c&&(i.additionalItems=c),u>0&&(i.minItems=u),h&&(i.maxItems=d));let{minimum:f,maximum:m}=Ht(t);typeof f=="number"&&(i.minItems=f),typeof m=="number"&&(i.maxItems=m)};function $A(t,e,n){if(e.$ref){if(n.has(e))return e;n.add(e);let m=t.get(e)?.def;if(!m)return e;let g=$A(t,m,n);return g===m?e:g}for(let m of["anyOf","oneOf"]){let g=e[m];if(!Array.isArray(g))continue;let y=g.map(v=>$A(t,v,n));y.some((v,b)=>v!==g[b])&&(e={...e,[m]:y})}let r=Array.isArray(e.type)?e.type:[e.type],i=!r.includes("string")&&r.some(m=>m==="number"||m==="integer"),o=e.enum??(e.const!==void 0?[e.const]:void 0);if(!i&&!o?.some(m=>typeof m=="number"))return e;let{minimum:a,maximum:s,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:u,format:d,id:h,...f}=e;return f.enum?f.enum=f.enum.map(m=>typeof m=="number"?String(m):m):typeof f.const=="number"&&(f.const=String(f.const)),i&&(f.type="string",o||(f.pattern=(r.includes("number")?go:jd).source)),f}var kA=new WeakMap;function V5(t){let e=new Map;for(let r of t.seen.values())r.def&&!e.has(r.schema)&&e.set(r.schema,r);let n=new Map;for(let r of kA.get(t)??[]){let i=t.seen.get(r),o=(i?.def??i?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;let a=$A(e,o,new Set);a!==o&&n.set(o,a)}if(n.size)for(let r of t.seen.values())for(let i of[r.schema,r.def]){let o=i&&n.get(i.propertyNames);o&&(i.propertyNames=o)}}var iE=(t,e,n,r)=>{let i=n,o=t._zod.def;i.type="object";let a=o.keyType,s=Ht(a).patterns;if(o.mode==="loose"&&s&&s.size>0){let u=Ye(o.valueType,e,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(let d of s)an(i.patternProperties,XD(d).source,u)}else{if(e.target==="draft-07"||e.target==="draft-2020-12"){i.propertyNames=Ye(o.keyType,e,{...r,path:[...r.path,"propertyNames"]});let u=kA.get(e);u||(u=[],kA.set(e,u),e.deferred.push(()=>V5(e))),u.push(t)}i.additionalProperties=Ye(o.valueType,e,{...r,path:[...r.path,"additionalProperties"]})}let l=a._zod.values,c=e.io==="input"&&lh(o.valueType)!==void 0;if(l&&!o.partial&&!c){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(i.required=u.map(String))}},rE=(t,e,n,r)=>{let i=t._zod.def,o=Ye(i.innerType,e,r),a=e.seen.get(t);e.target==="openapi-3.0"?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},oE=(t,e,n,r)=>{let i=t._zod.def;Ye(i.innerType,e,r);let o=e.seen.get(t);o.ref=i.innerType},aE=Symbol();function WD(t,e,n,r,i){let o=!1,a=JSON.stringify(t,(s,l)=>typeof l!="bigint"?l:(o=!0,null));return o?(Bt(e,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),aE):JSON.parse(a)}var sE=(t,e,n,r)=>{let i=t._zod.def;Ye(i.innerType,e,r);let o=e.seen.get(t);o.ref=i.innerType;let a=WD(i.defaultValue,t,e,n,r);a!==aE&&(n.default=a)},lE=(t,e,n,r)=>{let i=t._zod.def;Ye(i.innerType,e,r);let o=e.seen.get(t);if(o.ref=i.innerType,e.io!=="input")return;let a=WD(i.defaultValue,t,e,n,r);a!==aE&&(n._prefault=a)},cE=(t,e,n,r)=>{let i=t._zod.def;Ye(i.innerType,e,r);let o=e.seen.get(t);o.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{Bt(t,e,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=a},uE=(t,e,n,r)=>{let i=t._zod.def,o=i.in._zod.traits.has("$ZodTransform"),a=e.io==="input"?o?i.out:i.in:i.out;Ye(a,e,r);let s=e.seen.get(t);s.ref=a},dE=(t,e,n,r)=>{let i=t._zod.def;Ye(i.innerType,e,r);let o=e.seen.get(t);o.ref=i.innerType,n.readOnly=!0},hE=(t,e,n,r)=>{let i=t._zod.def;Ye(i.innerType,e,r);let o=e.seen.get(t);o.ref=i.innerType},dv=(t,e,n,r)=>{let i=t._zod.def;Ye(i.innerType,e,r);let o=e.seen.get(t);o.ref=i.innerType},fE=(t,e,n,r)=>{let i=t._zod.innerType;Ye(i,e,r);let o=e.seen.get(t);o.ref=i},cv={string:RA,number:CA,boolean:IA,bigint:PA,symbol:OA,null:NA,undefined:MA,void:DA,never:LA,any:jA,unknown:UA,date:qA,enum:FA,literal:BA,nan:HA,template_literal:VA,file:ZA,success:GA,custom:KA,function:YA,transform:JA,map:XA,set:WA,array:QA,object:eE,union:uv,intersection:tE,tuple:nE,record:iE,nullable:rE,nonoptional:oE,default:sE,prefault:lE,catch:cE,pipe:uE,readonly:dE,promise:hE,optional:dv,lazy:fE};function ws(t,e){if("_idmap"in t){let r=t,i=ua({...e,processors:cv}),o={};for(let l of r._idmap.entries()){let[c,u]=l;Ye(u,i)}let a={},s={registry:r,uri:e?.uri,defs:o};i.external=s;for(let l of r._idmap.entries()){let[c,u]=l;da(i,u),an(a,c,ha(i,u))}if(Object.keys(o).length>0){let l=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:o}}return{schemas:a}}let n=ua({...e,processors:cv});return Ye(t,n),da(n,t),ha(n,t)}var hv=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=e?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=ua({processors:cv,target:n,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return Ye(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,da(this.ctx,e);let r=ha(this.ctx,e),{"~standard":i,...o}=r;return o}};var QD={};var Cc={};Zr(Cc,{ZodAny:()=>CE,ZodArray:()=>NE,ZodBase64:()=>Iv,ZodBase64URL:()=>Pv,ZodBigInt:()=>kc,ZodBigIntFormat:()=>Mv,ZodBoolean:()=>$c,ZodCIDRv4:()=>Rv,ZodCIDRv6:()=>Cv,ZodCUID:()=>xv,ZodCUID2:()=>zv,ZodCatch:()=>e$,ZodCodec:()=>vh,ZodCreditCard:()=>AE,ZodCustom:()=>bh,ZodCustomStringFormat:()=>zs,ZodDate:()=>hh,ZodDefault:()=>KE,ZodDiscriminatedUnion:()=>DE,ZodE164:()=>Ov,ZodEmail:()=>bv,ZodEmoji:()=>_v,ZodEnum:()=>Tc,ZodExactOptional:()=>jv,ZodFile:()=>HE,ZodFunction:()=>c$,ZodGUID:()=>Sv,ZodIBAN:()=>EE,ZodIPv4:()=>$v,ZodIPv6:()=>kv,ZodISODate:()=>pa,ZodISODateTime:()=>fa,ZodISODuration:()=>ga,ZodISOTime:()=>ma,ZodInstanceOf:()=>h$,ZodIntersection:()=>LE,ZodJWT:()=>Nv,ZodKSUID:()=>Ev,ZodLazy:()=>s$,ZodLiteral:()=>BE,ZodMAC:()=>TE,ZodMap:()=>qE,ZodNaN:()=>n$,ZodNanoID:()=>wv,ZodNever:()=>PE,ZodNonOptional:()=>Uv,ZodNull:()=>RE,ZodNullable:()=>GE,ZodNumber:()=>Ec,ZodNumberFormat:()=>Ts,ZodObject:()=>fh,ZodOptional:()=>mh,ZodPipe:()=>gh,ZodPrefault:()=>JE,ZodPreprocess:()=>i$,ZodPromise:()=>l$,ZodReadonly:()=>r$,ZodRecord:()=>zc,ZodSet:()=>FE,ZodString:()=>Ac,ZodStringFormat:()=>We,ZodSuccess:()=>QE,ZodSymbol:()=>$E,ZodTemplateLiteral:()=>a$,ZodTransform:()=>VE,ZodTuple:()=>jE,ZodType:()=>Ae,ZodULID:()=>Tv,ZodURL:()=>dh,ZodUUID:()=>Rr,ZodUndefined:()=>kE,ZodUnion:()=>ph,ZodUnknown:()=>IE,ZodVoid:()=>OE,ZodXID:()=>Av,ZodXor:()=>ME,_ZodString:()=>vv,_default:()=>YE,_function:()=>r2,any:()=>Rc,array:()=>A,base64:()=>SL,base64url:()=>_L,bigint:()=>NL,boolean:()=>q,catch:()=>t$,check:()=>o2,cidrv4:()=>bL,cidrv6:()=>yL,codec:()=>e2,creditCard:()=>xL,cuid:()=>uL,cuid2:()=>dL,currencyCode:()=>kL,custom:()=>a2,date:()=>qL,describe:()=>s2,discriminatedUnion:()=>cr,e164:()=>wL,email:()=>yv,emoji:()=>lL,enum:()=>ue,exactOptional:()=>ZE,file:()=>JL,float32:()=>CL,float64:()=>IL,function:()=>r2,guid:()=>nL,hash:()=>RL,hex:()=>$L,hostname:()=>EL,httpUrl:()=>sL,iban:()=>zL,instanceof:()=>c2,int:()=>mv,int32:()=>PL,int64:()=>ML,intersection:()=>Jn,invertCodec:()=>t2,ipv4:()=>mL,ipv6:()=>vL,json:()=>d2,jwt:()=>TL,keyof:()=>FL,ksuid:()=>pL,lazy:()=>Cr,literal:()=>$,looseObject:()=>ee,looseRecord:()=>ZL,mac:()=>gL,map:()=>GL,meta:()=>l2,nan:()=>QL,nanoid:()=>cL,nativeEnum:()=>YL,never:()=>Dv,nonoptional:()=>WE,null:()=>bi,nullable:()=>uh,nullish:()=>XL,number:()=>P,object:()=>w,optional:()=>Y,partialRecord:()=>VL,pipe:()=>gv,prefault:()=>XE,preprocess:()=>Ui,promise:()=>i2,readonly:()=>o$,record:()=>H,refine:()=>u$,set:()=>KL,strictObject:()=>BL,string:()=>p,stringFormat:()=>AL,stringbool:()=>u2,success:()=>WL,superRefine:()=>d$,symbol:()=>LL,templateLiteral:()=>n2,transform:()=>Lv,tuple:()=>UE,uint32:()=>OL,uint64:()=>DL,ulid:()=>hL,undefined:()=>jL,union:()=>V,unknown:()=>Q,url:()=>va,uuid:()=>iL,uuidv4:()=>rL,uuidv6:()=>oL,uuidv7:()=>aL,void:()=>UL,xid:()=>fL,xor:()=>HL});var fv={};Zr(fv,{endsWith:()=>fc,gt:()=>$r,gte:()=>vi,includes:()=>dc,length:()=>Ss,lowercase:()=>cc,lt:()=>Er,lte:()=>gi,maxLength:()=>ys,maxSize:()=>ca,mime:()=>mc,minLength:()=>vo,minSize:()=>kr,multipleOf:()=>la,negative:()=>ov,nonnegative:()=>sv,nonpositive:()=>av,normalize:()=>gc,overwrite:()=>lr,positive:()=>rv,properties:()=>pc,property:()=>lv,regex:()=>lc,size:()=>bs,slugify:()=>Sc,startsWith:()=>hc,toLowerCase:()=>bc,toUpperCase:()=>yc,trim:()=>vc,uppercase:()=>uc});var eL=new WeakSet([Object.prototype,Error.prototype]);function pv(t,e,n){Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get(){let r=n(this);return Object.defineProperty(this,e,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,e,{value:r,configurable:!0,writable:!0})}})}var tL=(t,e)=>{fx.init(t,e),t.name="ZodError";let n=Object.getPrototypeOf(t);eL.has(n)||(eL.add(n),pv(n,"format",r=>i=>Nd(r,i)),pv(n,"flatten",r=>i=>Od(r,i)),pv(n,"addIssue",r=>i=>{r.issues.push(i),r.message=JSON.stringify(r.issues,Kl,2)}),pv(n,"addIssues",r=>i=>{r.issues.push(...i),r.message=JSON.stringify(r.issues,Kl,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},G5=k("ZodError",tL),Yn=k("ZodError",tL,void 0,{Parent:Error});var pE=Ql(Yn),mE=ec(Yn),ch=tc(Yn),gE=nc(Yn),vE=Hm(Yn),bE=Vm(Yn),yE=Zm(Yn),SE=Gm(Yn),_E=Km(Yn),wE=Ym(Yn),xE=Jm(Yn),zE=Xm(Yn);function Y5(){Jt.localeError||_t(kg())}function xs(){Jt.memoizer||_t({memoizer:Qd()})}var Ae=k("ZodType",(t,e)=>(Y5(),ye.init(t,e),t.def=e,t.type=e.type,t),{check(...t){let e=this.def;return this.clone(O.mergeDefs(e,{checks:[...e.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,e){return Ge(this,t,e)},brand(){return this},register(t,e){return t.add(this,e),this},refine(t,e){return this.check(u$(t,e))},superRefine(t,e){return this.check(d$(t,e))},overwrite(t){return this.check(lr(t))},optional(){return Y(this)},exactOptional(){return ZE(this)},nullable(){return uh(this)},nullish(){return Y(uh(this))},nonoptional(t){return WE(this,t)},array(){return A(this)},or(t){return V([this,t])},and(t){return Jn(this,t)},transform(t){return gv(this,Lv(t))},default(t){return YE(this,t)},prefault(t){return XE(this,t)},catch(t){return t$(this,t)},pipe(t){return gv(this,t)},readonly(){return o$(this)},describe(t){let e=this.clone();return sn.add(e,{description:t}),e},meta(...t){if(t.length===0)return sn.get(this);let e=this.clone();return sn.add(e,t[0]),e},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...e){return e.length===0?t(this):t(this,...e)},get"~standard"(){return O.hide(this,"~standard",{...lg(this),jsonSchema:{input:_c(this,"input"),output:_c(this,"output")}})},set"~standard"(t){O.own(this,"~standard",t)},parse:function t(e,n){return pE(this,e,n,{callee:t})},parseAsync:async function t(e,n){return await mE(this,e,n,{callee:t})},safeParse(t,e){return ch(this,t,e)},async safeParseAsync(t,e){return gE(this,t,e)},get spa(){return this?.safeParseAsync},set spa(t){O.own(this,"spa",t)},validate(t,e){return Md(this,t,e)},validateAsync(t,e){return Dd(this,t,e)},encode:function t(e,n){return vE(this,e,n,{callee:t})},decode:function t(e,n){return bE(this,e,n,{callee:t})},encodeAsync:async function t(e,n){return await yE(this,e,n,{callee:t})},decodeAsync:async function t(e,n){return await SE(this,e,n,{callee:t})},safeEncode(t,e){return _E(this,t,e)},safeDecode(t,e){return wE(this,t,e)},async safeEncodeAsync(t,e){return xE(this,t,e)},async safeDecodeAsync(t,e){return zE(this,t,e)},toJSONSchema(t){return EA(this,{})(t)},get description(){return sn.get(this)?.description},get _def(){return this._zod.def}}),vv=k("_ZodString",(t,e)=>{ps.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>RA(t,n,r,i)},O.derived({format:t=>Ht(t).format??null,minLength:t=>Ht(t).minimum??null,maxLength:t=>Ht(t).maximum??null},{regex(...t){return this.check(lc(...t))},includes(...t){return this.check(dc(...t))},startsWith(...t){return this.check(hc(...t))},endsWith(...t){return this.check(fc(...t))},min(...t){return this.check(vo(...t))},max(...t){return this.check(ys(...t))},length(...t){return this.check(Ss(...t))},nonempty(...t){return this.check(vo(1,...t))},lowercase(t){return this.check(cc(t))},uppercase(t){return this.check(uc(t))},trim(){return this.check(vc())},normalize(...t){return this.check(gc(...t))},toLowerCase(){return this.check(bc())},toUpperCase(){return this.check(yc())},slugify(){return this.check(Sc())}})),Ac=k("ZodString",(t,e)=>{ps.init(t,e),vv.init(t,e)},{email(t){return this.check(Dg(bv,t))},url(t){return this.check(nh(dh,t))},jwt(t){return this.check(iv(Nv,t))},emoji(t){return this.check(Bg(_v,t))},guid(t){return this.check(Lg(Sv,t))},uuid(t){return this.check(jg(Rr,t))},uuidv4(t){return this.check(Ug(Rr,t))},uuidv6(t){return this.check(qg(Rr,t))},uuidv7(t){return this.check(Fg(Rr,t))},nanoid(t){return this.check(Hg(wv,t))},cuid(t){return this.check(Vg(xv,t))},cuid2(t){return this.check(Zg(zv,t))},ulid(t){return this.check(Gg(Tv,t))},base64(t){return this.check(ev(Iv,t))},base64url(t){return this.check(tv(Pv,t))},xid(t){return this.check(Kg(Av,t))},ksuid(t){return this.check(Yg(Ev,t))},ipv4(t){return this.check(Jg($v,t))},ipv6(t){return this.check(Xg(kv,t))},cidrv4(t){return this.check(Wg(Rv,t))},cidrv6(t){return this.check(Qg(Cv,t))},e164(t){return this.check(nv(Ov,t))},datetime(t){return this.check(ih(fa,t))},date(t){return this.check(rh(pa,t))},time(t){return this.check(oh(ma,t))},duration(t){return this.check(ah(ga,t))}});function p(t){return BT(Ac,t)}var We=k("ZodStringFormat",(t,e)=>{Ke.init(t,e),vv.init(t,e)}),fa=k("ZodISODateTime",(t,e)=>{Pz.init(t,e),We.init(t,e)}),pa=k("ZodISODate",(t,e)=>{Oz.init(t,e),We.init(t,e)}),ma=k("ZodISOTime",(t,e)=>{Nz.init(t,e),We.init(t,e)}),ga=k("ZodISODuration",(t,e)=>{Mz.init(t,e),We.init(t,e)}),bv=k("ZodEmail",(t,e)=>{wz.init(t,e),We.init(t,e)});function yv(t){return Dg(bv,t)}var Sv=k("ZodGUID",(t,e)=>{Sz.init(t,e),We.init(t,e)});function nL(t){return Lg(Sv,t)}var Rr=k("ZodUUID",(t,e)=>{_z.init(t,e),We.init(t,e)});function iL(t){return jg(Rr,t)}function rL(t){return Ug(Rr,t)}function oL(t){return qg(Rr,t)}function aL(t){return Fg(Rr,t)}var dh=k("ZodURL",(t,e)=>{Tz.init(t,e),We.init(t,e)});function va(t){return nh(dh,t)}function sL(t){return nh(dh,{protocol:Ld,hostname:Mx,...O.normalizeParams(t)})}var _v=k("ZodEmoji",(t,e)=>{Az.init(t,e),We.init(t,e)});function lL(t){return Bg(_v,t)}var wv=k("ZodNanoID",(t,e)=>{Ez.init(t,e),We.init(t,e)});function cL(t){return Hg(wv,t)}var xv=k("ZodCUID",(t,e)=>{$z.init(t,e),We.init(t,e)});function uL(t){return Vg(xv,t)}var zv=k("ZodCUID2",(t,e)=>{kz.init(t,e),We.init(t,e)});function dL(t){return Zg(zv,t)}var Tv=k("ZodULID",(t,e)=>{Rz.init(t,e),We.init(t,e)});function hL(t){return Gg(Tv,t)}var Av=k("ZodXID",(t,e)=>{Cz.init(t,e),We.init(t,e)});function fL(t){return Kg(Av,t)}var Ev=k("ZodKSUID",(t,e)=>{Iz.init(t,e),We.init(t,e)});function pL(t){return Yg(Ev,t)}var $v=k("ZodIPv4",(t,e)=>{Dz.init(t,e),We.init(t,e)});function mL(t){return Jg($v,t)}var TE=k("ZodMAC",(t,e)=>{jz.init(t,e),We.init(t,e)});function gL(t){return VT(TE,t)}var kv=k("ZodIPv6",(t,e)=>{Lz.init(t,e),We.init(t,e)});function vL(t){return Xg(kv,t)}var Rv=k("ZodCIDRv4",(t,e)=>{Uz.init(t,e),We.init(t,e)});function bL(t){return Wg(Rv,t)}var Cv=k("ZodCIDRv6",(t,e)=>{qz.init(t,e),We.init(t,e)});function yL(t){return Qg(Cv,t)}var Iv=k("ZodBase64",(t,e)=>{Fz.init(t,e),We.init(t,e)});function SL(t){return ev(Iv,t)}var Pv=k("ZodBase64URL",(t,e)=>{Bz.init(t,e),We.init(t,e)});function _L(t){return tv(Pv,t)}var Ov=k("ZodE164",(t,e)=>{Hz.init(t,e),We.init(t,e)});function wL(t){return nv(Ov,t)}var AE=k("ZodCreditCard",(t,e)=>{Vz.init(t,e),We.init(t,e)});function xL(t){return ZT(AE,t)}var EE=k("ZodIBAN",(t,e)=>{Zz.init(t,e),We.init(t,e)});function zL(t){return GT(EE,t)}var Nv=k("ZodJWT",(t,e)=>{Gz.init(t,e),We.init(t,e)});function TL(t){return iv(Nv,t)}var zs=k("ZodCustomStringFormat",(t,e)=>{Kz.init(t,e),We.init(t,e)});function AL(t,e,n={}){return _s(zs,t,e,n)}function EL(t){return _s(zs,"hostname",Nx,t)}function $L(t){return _s(zs,"hex",Jx,t)}function kL(t){return _s(zs,"currency_code",Lx,t)}function RL(t,e){let n=e?.enc??"hex",r=`${t}_${n}`,i=ji[r];if(!i)throw new Error(`Unrecognized hash format: ${r}`);return _s(zs,r,i,e)}var Ec=k("ZodNumber",(t,e)=>{bg.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>CA(t,n,r,i),t.isFinite=!0},O.derived({minValue:t=>{let{minimum:e,exclusiveMinimum:n}=Ht(t);return Math.max(e??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:t=>{let{maximum:e,exclusiveMaximum:n}=Ht(t);return Math.min(e??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:t=>{let{isInt:e,multipleOf:n}=Ht(t);return!!e||!!n?.some(Number.isSafeInteger)},format:t=>Ht(t).format??null},{gt(t,e){return this.check($r(t,e))},gte(t,e){return this.check(vi(t,e))},min(t,e){return this.check(vi(t,e))},lt(t,e){return this.check(Er(t,e))},lte(t,e){return this.check(gi(t,e))},max(t,e){return this.check(gi(t,e))},int(t){return this.check(mv(t))},safe(t){return this.check(mv(t))},positive(t){return this.check($r(0,t))},nonnegative(t){return this.check(vi(0,t))},negative(t){return this.check(Er(0,t))},nonpositive(t){return this.check(gi(0,t))},multipleOf(t,e){return this.check(la(t,e))},step(t,e){return this.check(la(t,e))},finite(){return this}}));function P(t){return YT(Ec,t)}var Ts=k("ZodNumberFormat",(t,e)=>{Yz.init(t,e),Ec.init(t,e)});function mv(t){return XT(Ts,t)}function CL(t){return WT(Ts,t)}function IL(t){return QT(Ts,t)}function PL(t){return eA(Ts,t)}function OL(t){return tA(Ts,t)}var $c=k("ZodBoolean",(t,e)=>{Gd.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>IA(t,n,r,i)});function q(t){return nA($c,t)}var kc=k("ZodBigInt",(t,e)=>{yg.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>PA(t,n,r,i)},O.derived({minValue:t=>Ht(t).minimum??null,maxValue:t=>Ht(t).maximum??null,format:t=>Ht(t).format??null},{gte(t,e){return this.check(vi(t,e))},min(t,e){return this.check(vi(t,e))},gt(t,e){return this.check($r(t,e))},lt(t,e){return this.check(Er(t,e))},lte(t,e){return this.check(gi(t,e))},max(t,e){return this.check(gi(t,e))},positive(t){return this.check($r(BigInt(0),t))},negative(t){return this.check(Er(BigInt(0),t))},nonpositive(t){return this.check(gi(BigInt(0),t))},nonnegative(t){return this.check(vi(BigInt(0),t))},multipleOf(t,e){return this.check(la(t,e))}}));function NL(t){return rA(kc,t)}var Mv=k("ZodBigIntFormat",(t,e)=>{Jz.init(t,e),kc.init(t,e)});function ML(t){return aA(Mv,t)}function DL(t){return sA(Mv,t)}var $E=k("ZodSymbol",(t,e)=>{Xz.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>OA(t,n,r,i)});function LL(t){return lA($E,t)}var kE=k("ZodUndefined",(t,e)=>{Wz.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>MA(t,n,r,i)});function jL(t){return cA(kE,t)}var RE=k("ZodNull",(t,e)=>{Qz.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>NA(t,n,r,i)});function bi(t){return uA(RE,t)}var CE=k("ZodAny",(t,e)=>{eT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>jA(t,n,r,i)});function Rc(){return dA(CE)}var IE=k("ZodUnknown",(t,e)=>{tT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>UA(t,n,r,i)});function Q(){return hA(IE)}var PE=k("ZodNever",(t,e)=>{nT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>LA(t,n,r,i)});function Dv(t){return fA(PE,t)}var OE=k("ZodVoid",(t,e)=>{iT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>DA(t,n,r,i)});function UL(t){return pA(OE,t)}var hh=k("ZodDate",(t,e)=>{rT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>qA(t,n,r,i),t.min=(n,r)=>t.check(vi(n,r)),t.max=(n,r)=>t.check(gi(n,r))},O.derived({minDate:t=>{let{minimum:e}=Ht(t);return e?new Date(e):null},maxDate:t=>{let{maximum:e}=Ht(t);return e?new Date(e):null}},{}));function qL(t){return mA(hh,t)}var NE=k("ZodArray",(t,e)=>{xs(),aT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>QA(t,n,r,i),t.element=e.element},{min(t,e){return this.check(vo(t,e))},nonempty(t){return this.check(vo(1,t))},max(t,e){return this.check(ys(t,e))},length(t,e){return this.check(Ss(t,e))},unwrap(){return this.element}});function A(t,e){return bA(NE,t,e)}function FL(t){let e=t._zod.def.shape;return ue(Object.keys(e))}var fh=k("ZodObject",(t,e)=>{xs(),sT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>eE(t,n,r,i),O.installLazyProp(t,"shape",n=>n._zod.def.shape,!1)},{keyof(){return ue(Object.keys(this._zod.def.shape))},catchall(t){return this.clone(O.mergeDefs(this._zod.def,{catchall:t}))},passthrough(){return this.clone(O.mergeDefs(this._zod.def,{catchall:Q()}))},loose(){return this.clone(O.mergeDefs(this._zod.def,{catchall:Q()}))},strict(){return this.clone(O.mergeDefs(this._zod.def,{catchall:Dv()}))},strip(){return this.clone(O.mergeDefs(this._zod.def,{catchall:void 0}))},extend(t){return O.extend(this,t)},safeExtend(t){return O.safeExtend(this,t)},merge(t){return O.merge(this,t)},pick(t){return O.pick(this,t)},omit(t){return O.omit(this,t)},partial(...t){return O.partial(mh,this,t[0])},exactPartial(...t){return O.partial(jv,this,t[0],"exactPartial")},required(...t){return O.required(Uv,this,t[0])}});function w(t,e){let n={type:"object",shape:t??{},...O.normalizeParams(e)};return new fh(n)}function BL(t,e){return new fh({type:"object",shape:t,catchall:Dv(),...O.normalizeParams(e)})}function ee(t,e){return new fh({type:"object",shape:t,catchall:Q(),...O.normalizeParams(e)})}var ph=k("ZodUnion",(t,e)=>{Kd.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>uv(t,n,r,i),t.options=e.options});function V(t,e){return new ph({type:"union",options:t,...O.normalizeParams(e)})}var ME=k("ZodXor",(t,e)=>{ph.init(t,e),lT.init(t,e),t._zod.processJSONSchema=(n,r,i)=>uv(t,n,r,i),t.options=e.options});function HL(t,e){return new ME({type:"union",options:t,inclusive:!1,...O.normalizeParams(e)})}var DE=k("ZodDiscriminatedUnion",(t,e)=>{ph.init(t,e),uT.init(t,e)});function cr(t,e,n){return new DE({type:"union",options:e,discriminator:t,...O.normalizeParams(n)})}var LE=k("ZodIntersection",(t,e)=>{dT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>tE(t,n,r,i)});function Jn(t,e){return new LE({type:"intersection",left:t,right:e})}var jE=k("ZodTuple",(t,e)=>{xs(),Sg.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>nE(t,n,r,i)},{rest(t){return this.clone({...this._zod.def,rest:t})},partial(){let t=this._zod.def;if(t.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...t,items:t.items.map(e=>new mh({type:"optional",innerType:e}))})}});function UE(t,e,n){let r=e instanceof ye,i=r?n:e,o=r?e:null;return new jE({type:"tuple",items:t,rest:o,...O.normalizeParams(i)})}var zc=k("ZodRecord",(t,e)=>{xs(),hT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>iE(t,n,r,i),t.keyType=e.keyType,t.valueType=e.valueType});function H(t,e,n){return!e||!e._zod?new zc({type:"record",keyType:p(),valueType:t,...O.normalizeParams(e)}):new zc({type:"record",keyType:t,valueType:e,...O.normalizeParams(n)})}function VL(t,e,n){return new zc({type:"record",keyType:t,valueType:e,...O.normalizeParams(n),partial:!0})}function ZL(t,e,n){return new zc({type:"record",keyType:t,valueType:e,mode:"loose",...O.normalizeParams(n)})}var qE=k("ZodMap",(t,e)=>{xs(),fT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>XA(t,n,r,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...n)=>t.check(kr(...n)),t.nonempty=n=>t.check(kr(1,n)),t.max=(...n)=>t.check(ca(...n)),t.size=(...n)=>t.check(bs(...n))});function GL(t,e,n){return new qE({type:"map",keyType:t,valueType:e,...O.normalizeParams(n)})}var FE=k("ZodSet",(t,e)=>{xs(),pT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>WA(t,n,r,i),t.min=(...n)=>t.check(kr(...n)),t.nonempty=n=>t.check(kr(1,n)),t.max=(...n)=>t.check(ca(...n)),t.size=(...n)=>t.check(bs(...n))});function KL(t,e){return new FE({type:"set",valueType:t,...O.normalizeParams(e)})}var Tc=k("ZodEnum",(t,e)=>{mT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(r,i,o)=>FA(t,r,i,o),t.enum=e.entries,t.options=[...t._zod.values];let n=new Set(Object.keys(e.entries));t.extract=(r,i)=>{let o={};for(let a of r)if(n.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Tc({...e,checks:[],...O.normalizeParams(i),entries:o})},t.exclude=(r,i)=>{let o={...e.entries};for(let a of r)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Tc({...e,checks:[],...O.normalizeParams(i),entries:o})}});function ue(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new Tc({type:"enum",entries:n,...O.normalizeParams(e)})}function YL(t,e){return new Tc({type:"enum",entries:t,...O.normalizeParams(e)})}var BE=k("ZodLiteral",(t,e)=>{gT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>BA(t,n,r,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function $(t,e){return new BE({type:"literal",values:Array.isArray(t)?t:[t],...O.normalizeParams(e)})}var HE=k("ZodFile",(t,e)=>{vT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ZA(t,n,r,i),t.min=(n,r)=>t.check(kr(n,r)),t.max=(n,r)=>t.check(ca(n,r)),t.mime=(n,r)=>t.check(mc(Array.isArray(n)?n:[n],r))});function JL(t){return yA(HE,t)}var VE=k("ZodTransform",(t,e)=>{xs(),bT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>JA(t,n,r,i),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new aa(t.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(O.issue(o,n.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=n.value),a.inst??(a.inst=t),n.issues.push(O.issue(a))}};let i=e.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n)):(n.value=i,n)}});function Lv(t){return new VE({type:"transform",transform:t})}var mh=k("ZodOptional",(t,e)=>{_g.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>dv(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Y(t){return new mh({type:"optional",innerType:t})}var jv=k("ZodExactOptional",(t,e)=>{yT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>dv(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function ZE(t){return new jv({type:"optional",innerType:t})}var GE=k("ZodNullable",(t,e)=>{ST.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>rE(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function uh(t){return new GE({type:"nullable",innerType:t})}function XL(t){return Y(uh(t))}var KE=k("ZodDefault",(t,e)=>{_T.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>sE(t,n,r,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function YE(t,e){return new KE({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():O.shallowClone(e)}})}var JE=k("ZodPrefault",(t,e)=>{wT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>lE(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function XE(t,e){return new JE({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():O.shallowClone(e)}})}var Uv=k("ZodNonOptional",(t,e)=>{xT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>oE(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function WE(t,e){return new Uv({type:"nonoptional",innerType:t,...O.normalizeParams(e)})}var QE=k("ZodSuccess",(t,e)=>{zT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>GA(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function WL(t){return new QE({type:"success",innerType:t})}var e$=k("ZodCatch",(t,e)=>{TT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>cE(t,n,r,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function t$(t,e){return new e$({type:"catch",innerType:t,catchValue:typeof e=="function"?e:O.constantCatch(e)})}var n$=k("ZodNaN",(t,e)=>{AT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>HA(t,n,r,i)});function QL(t){return vA(n$,t)}var gh=k("ZodPipe",(t,e)=>{wg.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>uE(t,n,r,i),t.in=e.in,t.out=e.out});function gv(t,e){return new gh({type:"pipe",in:t,out:e})}var vh=k("ZodCodec",(t,e)=>{gh.init(t,e),Yd.init(t,e)});function e2(t,e,n){return new vh({type:"pipe",in:t,out:e,transform:n.decode,reverseTransform:n.encode})}function t2(t){let e=t._zod.def;return new vh({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}var i$=k("ZodPreprocess",(t,e)=>{gh.init(t,e),ET.init(t,e)}),r$=k("ZodReadonly",(t,e)=>{$T.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>dE(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function o$(t){return new r$({type:"readonly",innerType:t})}var a$=k("ZodTemplateLiteral",(t,e)=>{kT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>VA(t,n,r,i)});function n2(t,e){return new a$({type:"template_literal",parts:t,...O.normalizeParams(e)})}var s$=k("ZodLazy",(t,e)=>{Jd.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>fE(t,n,r,i),t.unwrap=()=>t._zod.def.getter()});function Cr(t){return new s$({type:"lazy",getter:t})}var l$=k("ZodPromise",(t,e)=>{CT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>hE(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function i2(t){return new l$({type:"promise",innerType:t})}var c$=k("ZodFunction",(t,e)=>{RT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>YA(t,n,r,i)});function r2(t){return new c$({type:"function",input:Array.isArray(t?.input)?UE(t?.input):t?.input??A(Q()),output:t?.output??Q()})}var bh=k("ZodCustom",(t,e)=>{IT.init(t,e),Ae.init(t,e),t._zod.processJSONSchema=(n,r,i)=>KA(t,n,r,i)});function o2(t){let e=new tt({check:"custom"});return e._zod.check=t,e}function a2(t,e){return SA(bh,t??(()=>!0),e)}function u$(t,e={}){return _A(bh,t,e)}function d$(t,e){return wA(t,e)}var s2=xA,l2=zA,h$=k("ZodInstanceOf",(t,e)=>{bh.init(t,e)},{properties(t,e){return this.check(pc(t,e))}});function c2(t,e={}){let n=new h$({type:"custom",check:"custom",fn:r=>r instanceof t,abort:!0,...O.normalizeParams(e)});return n._zod.bag.Class=t,n._zod.check=r=>{r.value instanceof t||r.issues.push({code:"invalid_type",expected:t.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var u2=(...t)=>TA({Codec:vh,Boolean:$c,String:Ac},...t);function d2(t){let e=Cr(()=>V([p(t),P(),q(),bi(),A(e),H(p(),e)]));return e}function Ui(t,e){return new i$({type:"pipe",in:Lv(t),out:e})}var yh={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function J5(t){_t({customError:t})}function X5(){return _t().customError}var f$;f$||(f$={});var Xn={};Zr(Xn,{ZodISODate:()=>pa,ZodISODateTime:()=>fa,ZodISODuration:()=>ga,ZodISOTime:()=>ma,date:()=>Q5,datetime:()=>W5,duration:()=>tG,time:()=>eG});function W5(t){return ih(fa,t)}function Q5(t){return rh(pa,t)}function eG(t){return oh(ma,t)}function tG(t){return ah(ga,t)}var re={...Cc,...fv,iso:Xn},nG=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function iG(t,e){let n=t.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function h2(t,e){return t.map((n,r)=>r<e?n:n.optional())}function rG(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function oG(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=t.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let r=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let i=n[1]===void 0?void 0:rG(n[1]);if(!i||!e.defs[i])throw new Error(`Reference not found: ${t}`);return e.defs[i]}throw new Error(`Reference not found: ${t}`)}function aG(t,e){return re.transform(r=>r).check(r=>{let i=r.value;if(typeof i!="object"||i===null||Array.isArray(i))return;let o=Object.getOwnPropertyNames(i);if(e.minProperties!==void 0&&o.length<e.minProperties&&r.issues.push({origin:"object",code:"too_small",minimum:e.minProperties,inclusive:!0,message:`Too small: expected object to have >=${e.minProperties} properties`,input:i,inst:t,continue:!0}),e.maxProperties!==void 0&&o.length>e.maxProperties&&r.issues.push({origin:"object",code:"too_big",maximum:e.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${e.maxProperties} properties`,input:i,inst:t,continue:!0}),e.keySchema)for(let a of o){let s=e.keySchema.safeParse(a);s.success||r.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(t)}function p$(t,e){if(t===null)return"z";let n=typeof t;if(n!=="object"){if(n==="number"&&Number.isNaN(t))return null;let r=String(t);return`${n[0]}${r.length}:${r}`}if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let o=[];for(let a of t){let s=p$(a,e);if(s===null)return null;o.push(s)}return`a${o.length}:[${o.join(",")}]`}let r=Object.keys(t).sort(),i=[];for(let o of r){let a=p$(t[o],e);if(a===null)return null;i.push(`${o.length}:${o}=${a}`)}return`o${i.length}:{${i.join(",")}}`}finally{e.delete(t)}}var sG=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),lG=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Sh(t){return typeof t!="object"||t===null?!1:Array.isArray(t)?t.some(Sh):typeof t.$ref=="string"?!0:Object.entries(t).some(([e,n])=>sG.has(e)?Sh(n):!lG.has(e)||typeof n!="object"||n===null?!1:Object.values(n).some(Sh))}function f2(t){return t===1?"element":"elements"}function cG(t,e){return re.transform(r=>r).check(r=>{let i=r.value;if(Array.isArray(i)){if(e.uniqueItems===!0){let o=new Map;for(let a=0;a<i.length;a++){let s=p$(i[a],new Set);if(s===null)continue;let l=o.get(s);if(l===void 0){o.set(s,a);continue}r.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${l}`,input:i,path:[a],continue:!0})}}if(e.containsSchema){let o=e.minContains??1,a=e.maxContains!==void 0?e.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let l of i)if(e.containsSchema.safeParse(l).success&&++s>=a)break;s<o&&r.issues.push({code:"custom",message:`Array must contain at least ${o} matching ${f2(o)}; found ${s}`,input:i,continue:!0}),e.maxContains!==void 0&&s>e.maxContains&&r.issues.push({code:"custom",message:`Array must contain at most ${e.maxContains} matching ${f2(e.maxContains)}`,input:i,continue:!0})}}}).pipe(t)}function p2(t,e){if(t!==!1)return t===void 0||t===!0?re.any():kn(t,e)}var uG=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function m2(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return re.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let i=t.$ref;if(e.refs.has(i))return e.refs.get(i);if(e.processing.has(i))return re.lazy(()=>{if(!e.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return e.refs.get(i)});e.processing.add(i);let o=oG(i,e),a=kn(o,e);return e.refs.set(i,a),e.processing.delete(i),a}if(t.enum!==void 0){let i=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&i.length===1&&i[0]===null)return re.null();if(i.length===0)return re.never();if(i.length===1)return re.literal(i[0]);if(i.every(a=>typeof a=="string"))return re.enum(i);let o=i.map(a=>re.literal(a));return o.length<2?o[0]:re.union([o[0],o[1],...o.slice(2)])}if(t.const!==void 0)return re.literal(t.const);let n=t.type;if(Array.isArray(n)){let i=n.map(o=>{let a={...t,type:o};return m2(a,e)});return i.length===0?re.never():i.length===1?i[0]:re.union(i)}if(!n)return re.any();let r;switch(n){case"string":{let i=re.string();if(t.format){let o=t.format;o==="email"?i=i.check(re.email()):o==="uri"||o==="uri-reference"?i=i.check(re.url()):o==="uuid"||o==="guid"?i=i.check(re.uuid()):o==="date-time"?i=i.check(re.iso.datetime({offset:!0})):o==="date"?i=i.check(re.iso.date()):o==="time"?i=i.check(re.regex(uG)):o==="duration"?i=i.check(re.iso.duration()):o==="hostname"?i=i.check(re.hostname()):o==="ipv4"?i=i.check(re.ipv4()):o==="ipv6"?i=i.check(re.ipv6()):o==="mac"?i=i.check(re.mac()):o==="cidr"?i=i.check(re.cidrv4()):o==="cidr-v6"?i=i.check(re.cidrv6()):o==="base64"?i=i.check(re.base64()):o==="base64url"?i=i.check(re.base64url()):o==="e164"?i=i.check(re.e164()):o==="credit_card"?i=i.check(re.creditCard()):o==="iban"?i=i.check(re.iban()):o==="jwt"?i=i.check(re.jwt()):o==="emoji"?i=i.check(re.emoji()):o==="nanoid"?i=i.check(re.nanoid()):o==="cuid"?i=i.check(re.cuid()):o==="cuid2"?i=i.check(re.cuid2()):o==="ulid"?i=i.check(re.ulid()):o==="xid"?i=i.check(re.xid()):o==="ksuid"&&(i=i.check(re.ksuid()))}typeof t.minLength=="number"&&(i=i.min(t.minLength)),typeof t.maxLength=="number"&&(i=i.max(t.maxLength)),t.pattern&&(i=i.regex(new RegExp(t.pattern))),r=i;break}case"number":case"integer":{let i=n==="integer"?re.number().int():re.number();typeof t.minimum=="number"&&t.exclusiveMinimum!==!0&&(i=i.min(t.minimum)),typeof t.maximum=="number"&&t.exclusiveMaximum!==!0&&(i=i.max(t.maximum)),typeof t.exclusiveMinimum=="number"?i=i.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(i=i.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?i=i.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(i=i.lt(t.maximum)),typeof t.multipleOf=="number"&&(i=i.multipleOf(t.multipleOf)),r=i;break}case"boolean":{r=re.boolean();break}case"null":{r=re.null();break}case"object":{let i={},o=t.properties||{},a=new Set(t.required||[]),s=typeof t.additionalProperties=="object"?kn(t.additionalProperties,e):void 0;for(let[d,h]of Object.entries(o)){let f=kn(h,e);an(i,d,a.has(d)?f:f.optional())}if(t.patternProperties){let d=t.patternProperties,h=Object.keys(d),f=[];for(let g of h){let y=kn(d[g],e),v=re.string().regex(new RegExp(g));f.push(re.looseRecord(v,y))}let m=[];if(Object.keys(i).length>0&&m.push(re.object(i).passthrough()),m.push(...f),m.length===0)r=re.object({}).passthrough();else if(m.length===1)r=m[0];else{let g=re.intersection(m[0],m[1]);for(let y=2;y<m.length;y++)g=re.intersection(g,m[y]);r=g}if(t.additionalProperties===!1){let g=Object.keys(i),y=h.map(b=>new RegExp(b)),v=r;r=r.check(b=>{if(!Di(b.value))return;let S=[];for(let _ of Object.keys(b.value))g.includes(_)||y.some(T=>T.test(_))||S.push(_);S.length&&b.issues.push({code:"unrecognized_keys",keys:S,input:b.value,inst:v})})}}else{let d=re.object(i);t.additionalProperties===!1?r=d.strict():s?r=d.catchall(s):r=d.passthrough()}let l=t.propertyNames!==void 0&&t.propertyNames!==!0,c=typeof t.minProperties=="number"?t.minProperties:void 0,u=typeof t.maxProperties=="number"?t.maxProperties:void 0;if(l||c!==void 0||u!==void 0){let d;if(l){let h=typeof t.propertyNames=="object"&&t.propertyNames.type===void 0?{type:"string",...t.propertyNames}:t.propertyNames;d=kn(h,e)}r=aG(r,{keySchema:d,minProperties:c,maxProperties:u})}break}case"array":{let i=t.prefixItems,o=t.items;if(i&&Array.isArray(i)){let a=typeof t.minItems=="number"?t.minItems:0,s=i.map(d=>kn(d,e)),l=h2(s,a),c=Array.isArray(o)?void 0:p2(o,e),u=re.tuple(l);r=c?u.rest(c):u,typeof t.minItems=="number"&&(r=r.check(re.minLength(t.minItems))),typeof t.maxItems=="number"&&(r=r.check(re.maxLength(t.maxItems)))}else if(Array.isArray(o)){let a=typeof t.minItems=="number"?t.minItems:0,s=o.map(d=>kn(d,e)),l=h2(s,a),c=p2(t.additionalItems,e),u=re.tuple(l);r=c?u.rest(c):u,typeof t.minItems=="number"&&(r=r.check(re.minLength(t.minItems))),typeof t.maxItems=="number"&&(r=r.check(re.maxLength(t.maxItems)))}else if(o!==void 0){let a=kn(o,e),s=re.array(a);typeof t.minItems=="number"&&(s=s.min(t.minItems)),typeof t.maxItems=="number"&&(s=s.max(t.maxItems)),r=s}else r=re.array(re.any());(t.uniqueItems===!0||t.contains!==void 0)&&(r=cG(r,{uniqueItems:t.uniqueItems===!0,containsSchema:t.contains!==void 0?kn(t.contains,e):void 0,minContains:typeof t.minContains=="number"?t.minContains:void 0,maxContains:typeof t.maxContains=="number"?t.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${n}`)}return r}function kn(t,e){if(typeof t=="boolean")return t?re.any():re.never();let n=m2(t,e),r=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let s=t.anyOf.map(c=>kn(c,e)),l=re.union(s);n=r?re.intersection(n,l):l}if(t.oneOf&&Array.isArray(t.oneOf)){let s=t.oneOf.map(c=>kn(c,e)),l=re.xor(s);n=r?re.intersection(n,l):l}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)n=r?n:re.any();else{let s=r?n:kn(t.allOf[0],e),l=r?0:1;for(let c=l;c<t.allOf.length;c++)s=re.intersection(s,kn(t.allOf[c],e));n=s}t.nullable===!0&&e.version==="openapi-3.0"&&(n=re.nullable(n)),t.readOnly===!0&&(n=re.readonly(n)),t.default!==void 0&&(n=n.default(t.default));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in t&&(i[s]=t[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in t&&(i[s]=t[s]);if(t.type==="object"&&t.$ref===void 0){t.propertyNames!==void 0&&!Sh(t.propertyNames)&&(i.propertyNames=t.propertyNames);for(let s of["minProperties","maxProperties"])t[s]!==void 0&&(i[s]=t[s])}if(t.type==="array"&&t.$ref===void 0){t.contains!==void 0&&!Sh(t.contains)&&(i.contains=t.contains);for(let s of["uniqueItems","minContains","maxContains"])t[s]!==void 0&&(i[s]=t[s])}for(let s of Object.keys(t))nG.has(s)||an(i,s,t[s]);return Object.keys(i).length>0&&e.registry.add(n,i),t.description&&(n=n.describe(t.description)),n}function g2(t,e){if(typeof t=="boolean")return t?re.any():re.never();let n;try{n=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=iG(n,e?.defaultTarget),i=n.$defs||n.definitions||{},o={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:n,registry:e?.registry??sn};return kn(n,o)}var v2=Symbol("z.visit/resolving");function _h(t,e){let n=typeof e=="function"?e:(a,s)=>{let l=e[a._zod.def.type];return l?l(a,s):a},r=new Map;function i(a){let s=r.get(a);if(s===v2)return new Jd({type:"lazy",getter:()=>r.get(a)});if(s!==void 0)return s;r.set(a,v2);let l=o(a),c=n(l,l!==a);return r.set(a,c),c}function o(a){let s=a._zod.def,l=s.type;switch(l){case"object":{let c=s.shape,u=Object.keys(c),d=!1,h={};for(let m of u){let g=i(c[m]);g!==c[m]&&(d=!0),h[m]=g}let f=s.catchall;return s.catchall&&(f=i(s.catchall),f!==s.catchall&&(d=!0)),d?Ge(a,{...s,shape:h,catchall:f}):a}case"array":{let c=i(s.element);return c===s.element?a:Ge(a,{...s,element:c})}case"tuple":{let c=s.items,u=!1,d=[];for(let f of c){let m=i(f);m!==f&&(u=!0),d.push(m)}let h=s.rest;return s.rest&&(h=i(s.rest),h!==s.rest&&(u=!0)),u?Ge(a,{...s,items:d,rest:h}):a}case"record":case"map":{let c=i(s.keyType),u=i(s.valueType);return c===s.keyType&&u===s.valueType?a:Ge(a,{...s,keyType:c,valueType:u})}case"set":{let c=i(s.valueType);return c===s.valueType?a:Ge(a,{...s,valueType:c})}case"union":{let c=s.options,u=!1,d=[];for(let h of c){let f=i(h);f!==h&&(u=!0),d.push(f)}return u?Ge(a,{...s,options:d}):a}case"intersection":{let c=i(s.left),u=i(s.right);return c===s.left&&u===s.right?a:Ge(a,{...s,left:c,right:u})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let c=i(s.innerType);return c===s.innerType?a:Ge(a,{...s,innerType:c})}case"pipe":{let c=i(s.in),u=i(s.out);return c===s.in&&u===s.out?a:Ge(a,{...s,in:c,out:u})}case"function":{let c=i(s.input),u=i(s.output);return c===s.input&&u===s.output?a:Ge(a,{...s,input:c,output:u})}case"lazy":{let c=s.getter,{_cachedInner:u,...d}=s;return Ge(a,{...d,getter:()=>i(c())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return i(t)}function b2(t){return _h(t,{object:e=>e.partial(),union:e=>{let n=e._zod.def;return n.discriminator===void 0?e:V(n.options)}})}function dG(t,e){if(!e?.length)return t;let n=t._zod.def;return Ge(t,ar(n,{checks:[...n.checks??[],...e]}),{parent:!0})}function y2(t){return dG(t.out,t.checks)}function hG(t){return t.in._zod.traits.has("$ZodTransform")?y2(t):t.in}function S2(t){return _h(t,{pipe:e=>hG(e._zod.def),default:(e,n)=>n?Y(e._zod.def.innerType):e,catch:(e,n)=>n?e._zod.def.innerType:e})}function _2(t){return _h(t,{pipe:e=>y2(e._zod.def),prefault:(e,n)=>n?e._zod.def.innerType:e})}var As={};Zr(As,{bigint:()=>gG,boolean:()=>mG,date:()=>vG,number:()=>pG,string:()=>fG});function fG(t){return HT(Ac,t)}function pG(t){return JT(Ec,t)}function mG(t){return iA($c,t)}function gG(t){return oA(kc,t)}function vG(t){return gA(hh,t)}var qv="2025-11-25";var Fv=[qv,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Bv="io.modelcontextprotocol/related-task",$s="io.modelcontextprotocol/protocolVersion",Ic="io.modelcontextprotocol/clientInfo",ya="io.modelcontextprotocol/serverInfo",ks="io.modelcontextprotocol/clientCapabilities",Hv="io.modelcontextprotocol/subscriptionId",Pc="io.modelcontextprotocol/logLevel";var Rs="2.0";var ba=Cr(()=>V([p(),P(),q(),bi(),H(p(),ba),A(ba)])),wt=H(p(),ba),g$=A(ba),wh=V([p(),P().int()]),xh=p(),Vv=w({ttl:P().optional()}),Zv=w({taskId:p()}),zh=ee({progressToken:wh.optional(),[Bv]:Zv.optional()}),Wt=w({_meta:zh.optional()}),Cs=Wt.extend({task:Vv.optional()}),xt=w({method:p(),params:Wt.loose().optional()}),gn=w({_meta:zh.optional()}),vn=w({method:p(),params:gn.loose().optional()}),Th=ee({get[ya](){return Mc.optional().catch(void 0)}}),zt=ee({_meta:Th.optional()}),Sa=V([p(),P().int()]),Ah=w({jsonrpc:$(Rs),id:Sa,...xt.shape}).strict(),Eh=w({jsonrpc:$(Rs),...vn.shape}).strict(),Oc=w({jsonrpc:$(Rs),id:Sa,result:zt}).strict(),Nc=w({jsonrpc:$(Rs),id:Sa.optional(),error:w({code:P().int(),message:p(),data:Q().optional()})}).strict(),Gv=V([Ah,Eh,Oc,Nc]),v$=V([Oc,Nc]),$h=zt.strict(),Kv=gn.extend({requestId:Sa.optional(),reason:p().optional()}),kh=vn.extend({method:$("notifications/cancelled"),params:Kv}),Yv=w({src:p(),mimeType:p().optional(),sizes:A(p()).optional(),theme:ue(["light","dark"]).optional()}),_a=w({icons:A(Yv).optional()}),yo=w({name:p(),title:p().optional()}),Mc=yo.extend({...yo.shape,..._a.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),bG=Jn(w({applyDefaults:q().optional()}),wt),yG=Ui(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Jn(w({form:bG.optional(),url:wt.optional()}),wt.optional())),Jv=ee({list:wt.optional(),cancel:wt.optional(),requests:ee({sampling:ee({createMessage:wt.optional()}).optional(),elicitation:ee({create:wt.optional()}).optional()}).optional()}),Xv=ee({list:wt.optional(),cancel:wt.optional(),requests:ee({tools:ee({call:wt.optional()}).optional()}).optional()}),Wv=w({experimental:H(p(),wt).optional(),sampling:w({context:wt.optional(),tools:wt.optional()}).optional(),elicitation:yG.optional(),roots:w({listChanged:q().optional()}).optional(),tasks:Jv.optional(),extensions:H(p(),wt).optional()}),Qv=Wt.extend({protocolVersion:p(),capabilities:Wv,clientInfo:Mc}),eb=xt.extend({method:$("initialize"),params:Qv}),Rh=w({experimental:H(p(),wt).optional(),logging:wt.optional(),completions:wt.optional(),prompts:w({listChanged:q().optional()}).optional(),resources:w({subscribe:q().optional(),listChanged:q().optional()}).optional(),tools:w({listChanged:q().optional()}).optional(),tasks:Xv.optional(),extensions:H(p(),wt).optional()}),tb=zt.extend({protocolVersion:p(),capabilities:Rh,serverInfo:Mc,instructions:p().optional()}),nb=vn.extend({method:$("notifications/initialized"),params:gn.optional()}),ib=xt.extend({method:$("server/discover"),params:Wt.optional()}),Ch=zt.extend({supportedVersions:A(p()),capabilities:Rh,instructions:p().optional()}),Ih=xt.extend({method:$("ping"),params:Wt.optional()}),rb=w({progress:P(),total:Y(P()),message:Y(p())}),ob=w({...gn.shape,...rb.shape,progressToken:wh}),Ph=vn.extend({method:$("notifications/progress"),params:ob}),ab=Wt.extend({cursor:xh.optional()}),wa=xt.extend({params:ab.optional()}),xa=zt.extend({nextCursor:xh.optional()}),Oh=w({uri:p(),mimeType:Y(p()),_meta:H(p(),Q()).optional()}),Nh=Oh.extend({text:p()}),b$=p().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Mh=Oh.extend({blob:b$}),za=ue(["user","assistant"]),So=w({audience:A(za).optional(),priority:P().min(0).max(1).optional(),lastModified:Xn.datetime({offset:!0}).optional()}),Dh=w({...yo.shape,..._a.shape,uri:p(),description:Y(p()),mimeType:Y(p()),size:Y(P()),annotations:So.optional(),_meta:Y(ee({}))}),sb=w({...yo.shape,..._a.shape,uriTemplate:p(),description:Y(p()),mimeType:Y(p()),annotations:So.optional(),_meta:Y(ee({}))}),lb=wa.extend({method:$("resources/list")}),cb=xa.extend({resources:A(Dh)}),ub=wa.extend({method:$("resources/templates/list")}),db=xa.extend({resourceTemplates:A(sb)}),Dc=Wt.extend({uri:p()}),hb=Dc,fb=xt.extend({method:$("resources/read"),params:hb}),pb=zt.extend({contents:A(V([Nh,Mh]))}),mb=vn.extend({method:$("notifications/resources/list_changed"),params:gn.optional()}),gb=Dc,vb=xt.extend({method:$("resources/subscribe"),params:gb}),bb=Dc,yb=xt.extend({method:$("resources/unsubscribe"),params:bb}),Lh=w({toolsListChanged:q().optional(),promptsListChanged:q().optional(),resourcesListChanged:q().optional(),resourceSubscriptions:A(p()).optional()}),Sb=Wt.extend({notifications:Lh}),_b=xt.extend({method:$("subscriptions/listen"),params:Sb}),wb=gn.extend({notifications:Lh}),xb=vn.extend({method:$("notifications/subscriptions/acknowledged"),params:wb}),zb=Th.extend({[Hv]:Sa}),Tb=zt.extend({_meta:zb}),Ab=gn.extend({uri:p()}),Eb=vn.extend({method:$("notifications/resources/updated"),params:Ab}),$b=w({name:p(),description:Y(p()),required:Y(q())}),kb=w({...yo.shape,..._a.shape,description:Y(p()),arguments:Y(A($b)),_meta:Y(ee({}))}),Rb=wa.extend({method:$("prompts/list")}),Cb=xa.extend({prompts:A(kb)}),Ib=Wt.extend({name:p(),arguments:H(p(),p()).optional()}),Pb=xt.extend({method:$("prompts/get"),params:Ib}),Lc=w({type:$("text"),text:p(),annotations:So.optional(),_meta:H(p(),Q()).optional()}),jc=w({type:$("image"),data:b$,mimeType:p(),annotations:So.optional(),_meta:H(p(),Q()).optional()}),Uc=w({type:$("audio"),data:b$,mimeType:p(),annotations:So.optional(),_meta:H(p(),Q()).optional()}),Ob=w({type:$("tool_use"),name:p(),id:p(),input:H(p(),Q()),_meta:H(p(),Q()).optional()}),Nb=w({type:$("resource"),resource:V([Nh,Mh]),annotations:So.optional(),_meta:H(p(),Q()).optional()}),Mb=Dh.extend({type:$("resource_link")}),qc=V([Lc,jc,Uc,Mb,Nb]),Db=w({role:za,content:qc}),Lb=zt.extend({description:p().optional(),messages:A(Db)}),jb=vn.extend({method:$("notifications/prompts/list_changed"),params:gn.optional()}),Ub=w({title:p().optional(),readOnlyHint:q().optional(),destructiveHint:q().optional(),idempotentHint:q().optional(),openWorldHint:q().optional()}),qb=w({taskSupport:ue(["required","optional","forbidden"]).optional()}),jh=w({...yo.shape,..._a.shape,description:p().optional(),inputSchema:w({type:$("object"),properties:H(p(),ba).optional(),required:A(p()).optional()}).catchall(Q()),outputSchema:ee({$schema:p().optional()}).optional(),annotations:Ub.optional(),execution:qb.optional(),_meta:H(p(),Q()).optional()}),Fb=wa.extend({method:$("tools/list")}),Bb=xa.extend({tools:A(jh)}),Uh=zt.extend({content:A(qc).default([]),structuredContent:Q().optional(),isError:q().optional()}),y$=Uh.or(zt.extend({toolResult:Q()})),Hb=Cs.extend({name:p(),arguments:H(p(),Q()).optional()}),Vb=xt.extend({method:$("tools/call"),params:Hb}),Zb=vn.extend({method:$("notifications/tools/list_changed"),params:gn.optional()}),Gb=w({autoRefresh:q().default(!0),debounceMs:P().int().nonnegative().default(300)}),qh=ue(["debug","info","notice","warning","error","critical","alert","emergency"]),Kb=Wt.extend({level:qh}),Yb=xt.extend({method:$("logging/setLevel"),params:Kb}),Jb=gn.extend({level:qh,logger:p().optional(),data:Q()}),Xb=vn.extend({method:$("notifications/message"),params:Jb}),Wb=w({name:p().optional()}),Qb=w({hints:A(Wb).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),ey=w({mode:ue(["auto","required","none"]).optional()}),ty=w({type:$("tool_result"),toolUseId:p().describe("The unique identifier for the corresponding tool call."),content:A(qc),structuredContent:Q().optional(),isError:q().optional(),_meta:H(p(),Q()).optional()}),ny=cr("type",[Lc,jc,Uc]),Es=cr("type",[Lc,jc,Uc,Ob,ty]),iy=w({role:za,content:V([Es,A(Es)]),_meta:H(p(),Q()).optional()}),ry=Cs.extend({messages:A(iy),modelPreferences:Qb.optional(),systemPrompt:p().optional(),includeContext:ue(["none","thisServer","allServers"]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:A(p()).optional(),metadata:wt.optional(),tools:A(jh).optional(),toolChoice:ey.optional()}),oy=xt.extend({method:$("sampling/createMessage"),params:ry}),ay=zt.extend({model:p(),stopReason:Y(ue(["endTurn","stopSequence","maxTokens"]).or(p())),role:za,content:ny}),sy=zt.extend({model:p(),stopReason:Y(ue(["endTurn","stopSequence","maxTokens","toolUse"]).or(p())),role:za,content:V([Es,A(Es)])}),Fh=w({type:$("boolean"),title:p().optional(),description:p().optional(),default:q().optional()}),Fc=w({type:$("string"),title:p().optional(),description:p().optional(),minLength:P().optional(),maxLength:P().optional(),format:ue(["email","uri","date","date-time"]).optional(),default:p().optional()}),Bc=w({type:ue(["number","integer"]),title:p().optional(),description:p().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),Bh=w({type:$("string"),title:p().optional(),description:p().optional(),enum:A(p()),default:p().optional()}),Hh=w({type:$("string"),title:p().optional(),description:p().optional(),oneOf:A(w({const:p(),title:p()})),default:p().optional()}),Vh=w({type:$("string"),title:p().optional(),description:p().optional(),enum:A(p()),enumNames:A(p()).optional(),default:p().optional()}),ly=V([Bh,Hh]),Zh=w({type:$("array"),title:p().optional(),description:p().optional(),minItems:P().optional(),maxItems:P().optional(),items:w({type:$("string"),enum:A(p())}),default:A(p()).optional()}),Gh=w({type:$("array"),title:p().optional(),description:p().optional(),minItems:P().optional(),maxItems:P().optional(),items:w({anyOf:A(w({const:p(),title:p()}))}),default:A(p()).optional()}),cy=V([Zh,Gh]),uy=V([Vh,ly,cy]),Kh=V([uy,Fh,Fc,Bc]),Hc=Cs.extend({mode:$("form").optional(),message:p(),requestedSchema:w({type:$("object"),properties:H(p(),Kh),required:A(p()).optional()}).catchall(Q())}),dy=Cs.extend({mode:$("url"),message:p(),elicitationId:p(),url:p().url()}),hy=V([Hc,dy]),fy=xt.extend({method:$("elicitation/create"),params:hy}),py=gn.extend({elicitationId:p()}),my=vn.extend({method:$("notifications/elicitation/complete"),params:py}),gy=zt.extend({action:ue(["accept","decline","cancel"]),content:Ui(t=>t===null?void 0:t,H(p(),V([p(),P(),q(),A(p())])).optional())}),vy=w({type:$("ref/resource"),uri:p()}),by=w({type:$("ref/prompt"),name:p()}),yy=Wt.extend({ref:V([by,vy]),argument:w({name:p(),value:p()}),context:w({arguments:H(p(),p()).optional()}).optional()}),Sy=xt.extend({method:$("completion/complete"),params:yy}),_y=zt.extend({completion:ee({values:A(p()).max(100),total:Y(P().int()),hasMore:Y(q())})}),wy=w({uri:p().startsWith("file://"),name:p().optional(),_meta:H(p(),Q()).optional()}),xy=xt.extend({method:$("roots/list"),params:Wt.optional()}),zy=zt.extend({roots:A(wy)}),Ty=vn.extend({method:$("notifications/roots/list_changed"),params:gn.optional()}),S$=ee({ttl:P().optional(),pollInterval:P().optional()}),Ay=ue(["working","input_required","completed","failed","cancelled"]),Ta=w({taskId:p(),status:Ay,ttl:V([P(),bi()]),createdAt:p(),lastUpdatedAt:p(),pollInterval:Y(P()),statusMessage:Y(p())}),_$=zt.extend({task:Ta}),Ey=gn.merge(Ta),w$=vn.extend({method:$("notifications/tasks/status"),params:Ey}),x$=xt.extend({method:$("tasks/get"),params:Wt.extend({taskId:p()})}),z$=zt.merge(Ta),T$=xt.extend({method:$("tasks/result"),params:Wt.extend({taskId:p()})}),A$=zt.loose(),E$=wa.extend({method:$("tasks/list")}),$$=xa.extend({tasks:A(Ta)}),k$=xt.extend({method:$("tasks/cancel"),params:Wt.extend({taskId:p()})}),R$=zt.merge(Ta),C$=V([Ih,eb,ib,Sy,Yb,Pb,Rb,lb,ub,fb,vb,yb,_b,Vb,Fb]),I$=V([kh,Ph,nb,Ty]),P$=V([$h,ay,sy,gy,zy]),O$=V([Ih,oy,fy,xy]),N$=V([kh,Ph,Xb,Eb,mb,Zb,jb,xb,my]),M$=V([$h,tb,Ch,_y,Lb,Cb,cb,db,pb,Uh,Bb,Tb]),Xt=va().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:yh.custom,message:"URL must be parseable",fatal:!0}),ds}).refine(t=>{let e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),$y=ee({resource:p().url(),authorization_servers:A(Xt).optional(),jwks_uri:p().url().optional(),scopes_supported:A(p()).optional(),bearer_methods_supported:A(p()).optional(),resource_signing_alg_values_supported:A(p()).optional(),resource_name:p().optional(),resource_documentation:p().optional(),resource_policy_uri:p().url().optional(),resource_tos_uri:p().url().optional(),tls_client_certificate_bound_access_tokens:q().optional(),authorization_details_types_supported:A(p()).optional(),dpop_signing_alg_values_supported:A(p()).optional(),dpop_bound_access_tokens_required:q().optional()}),Yh=ee({issuer:p(),authorization_endpoint:Xt,token_endpoint:Xt,registration_endpoint:Xt.optional(),scopes_supported:A(p()).optional(),response_types_supported:A(p()),response_modes_supported:A(p()).optional(),grant_types_supported:A(p()).optional(),token_endpoint_auth_methods_supported:A(p()).optional(),token_endpoint_auth_signing_alg_values_supported:A(p()).optional(),service_documentation:Xt.optional(),revocation_endpoint:Xt.optional(),revocation_endpoint_auth_methods_supported:A(p()).optional(),revocation_endpoint_auth_signing_alg_values_supported:A(p()).optional(),introspection_endpoint:p().optional(),introspection_endpoint_auth_methods_supported:A(p()).optional(),introspection_endpoint_auth_signing_alg_values_supported:A(p()).optional(),code_challenge_methods_supported:A(p()).optional(),client_id_metadata_document_supported:q().optional(),authorization_response_iss_parameter_supported:q().optional().catch(void 0),dpop_signing_alg_values_supported:A(p()).optional()}),ky=ee({issuer:p(),authorization_endpoint:Xt,token_endpoint:Xt,userinfo_endpoint:Xt.optional(),jwks_uri:Xt,registration_endpoint:Xt.optional(),scopes_supported:A(p()).optional(),response_types_supported:A(p()),response_modes_supported:A(p()).optional(),grant_types_supported:A(p()).optional(),acr_values_supported:A(p()).optional(),subject_types_supported:A(p()),id_token_signing_alg_values_supported:A(p()),id_token_encryption_alg_values_supported:A(p()).optional(),id_token_encryption_enc_values_supported:A(p()).optional(),userinfo_signing_alg_values_supported:A(p()).optional(),userinfo_encryption_alg_values_supported:A(p()).optional(),userinfo_encryption_enc_values_supported:A(p()).optional(),request_object_signing_alg_values_supported:A(p()).optional(),request_object_encryption_alg_values_supported:A(p()).optional(),request_object_encryption_enc_values_supported:A(p()).optional(),token_endpoint_auth_methods_supported:A(p()).optional(),token_endpoint_auth_signing_alg_values_supported:A(p()).optional(),display_values_supported:A(p()).optional(),claim_types_supported:A(p()).optional(),claims_supported:A(p()).optional(),service_documentation:p().optional(),claims_locales_supported:A(p()).optional(),ui_locales_supported:A(p()).optional(),claims_parameter_supported:q().optional(),request_parameter_supported:q().optional(),request_uri_parameter_supported:q().optional(),require_request_uri_registration:q().optional(),op_policy_uri:Xt.optional(),op_tos_uri:Xt.optional(),client_id_metadata_document_supported:q().optional(),authorization_response_iss_parameter_supported:q().optional().catch(void 0)}),Ry=w({...ky.shape,...Yh.pick({code_challenge_methods_supported:!0}).shape}),Cy=w({access_token:p(),id_token:p().optional(),token_type:p(),expires_in:As.number().optional(),scope:p().optional(),refresh_token:p().optional(),issuer:p().optional().catch(void 0)}).strip(),Iy=w({issued_token_type:$("urn:ietf:params:oauth:token-type:id-jag"),access_token:p(),token_type:p().optional(),expires_in:P().optional(),scope:p().optional()}).strip(),Py=w({error:p(),error_description:p().optional(),error_uri:p().optional()}),m$=Xt.optional().or($("").transform(()=>{})),Oy=w({redirect_uris:A(Xt),token_endpoint_auth_method:p().optional(),grant_types:A(p()).optional(),response_types:A(p()).optional(),application_type:p().optional(),client_name:p().optional(),client_uri:Xt.optional(),logo_uri:m$,scope:p().optional(),contacts:A(p()).optional(),tos_uri:m$,policy_uri:p().optional(),jwks_uri:Xt.optional(),jwks:Rc().optional(),software_id:p().optional(),software_version:p().optional(),software_statement:p().optional()}).strip(),Ny=w({client_id:p(),client_secret:p().optional(),client_id_issued_at:P().optional(),client_secret_expires_at:P().optional(),issuer:p().optional().catch(void 0)}).strip(),My=Oy.merge(Ny),D$=w({error:p(),error_description:p().optional()}).strip(),L$=w({token:p(),token_type_hint:p().optional()}).strip();var H$=Symbol.for("mcp.sdk.errorBrands");function Is(t,e){let n=new Set,r=e;for(;typeof r=="function";){let i=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,"mcpBrand")&&typeof i=="string"&&n.add(i),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(t,H$,{value:n,enumerable:!1,configurable:!0})}function yi(t,e){try{if(typeof e=="object"&&e!==null&&Object.prototype.hasOwnProperty.call(t,"mcpBrand")&&typeof t.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(e,H$)){let n=e[H$];if(n&&typeof n.has=="function"&&n.has(t.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(t,e)}var SG=class F2 extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](e){return yi(this,e)}static isInstance(e){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yi(this,e)}constructor(e,n,r){super(n),this.code=e,this.errorUri=r,this.name="OAuthError",Is(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(e){return new F2(e.error,e.error_description??e.error,e.error_uri)}},ln=(function(t){return t.NotConnected="NOT_CONNECTED",t.AlreadyConnected="ALREADY_CONNECTED",t.NotInitialized="NOT_INITIALIZED",t.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",t.RequestTimeout="REQUEST_TIMEOUT",t.ConnectionClosed="CONNECTION_CLOSED",t.SendFailed="SEND_FAILED",t.InvalidResult="INVALID_RESULT",t.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",t.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",t.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",t.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",t.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",t.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",t.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",t.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",t.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",t.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",t.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",t})({}),Ot=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](t){return yi(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yi(this,t)}constructor(t,e,n,r){super(e,r),this.code=t,this.data=n,this.name="SdkError",Is(this,new.target)}},_G=class extends Ot{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(t,e,n,r){super(t,e,n,r),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};var wG="2026-07-28";function B2(t){return t>=wG}function H2(t){let e=t.structuredContent;return e===void 0||!(typeof e!="object"||e===null||Array.isArray(e))||(t.content?.some(n=>n.type==="text")??!1)?t:{...t,content:[...t.content??[],{type:"text",text:JSON.stringify(e)}]}}var V2=["task","inputRequests","requestState"];function xG(t){return t===null||typeof t!="object"||Array.isArray(t)||t.content!==void 0||V2.some(e=>e in t)?t:{...t,content:[]}}function zG(){let t=Cr(()=>V([p(),P(),q(),bi(),H(p(),t),A(t)])),e=H(p(),t),n=V([p(),P().int()]),r=p(),i=w({ttl:P().optional()}),o=w({taskId:p()}),a=ee({progressToken:n.optional(),"io.modelcontextprotocol/related-task":o.optional()}),s=w({_meta:a.optional()}),l=s.extend({task:i.optional()}),c=w({method:p(),params:s.loose().optional()}),u=w({_meta:a.optional()}),d=w({method:p(),params:u.loose().optional()}),h=ee({_meta:a.optional()}),f=V([p(),P().int()]),m=h.strict(),g=u.extend({requestId:f.optional(),reason:p().optional()}),y=d.extend({method:$("notifications/cancelled"),params:g}),v=w({src:p(),mimeType:p().optional(),sizes:A(p()).optional(),theme:ue(["light","dark"]).optional()}),b=w({icons:A(v).optional()}),S=w({name:p(),title:p().optional()}),_=S.extend({...S.shape,...b.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),T=Jn(w({applyDefaults:q().optional()}),e),x=Ui(fn=>fn&&typeof fn=="object"&&!Array.isArray(fn)&&Object.keys(fn).length===0?{form:{}}:fn,Jn(w({form:T.optional(),url:e.optional()}),e.optional())),E=ee({list:e.optional(),cancel:e.optional(),requests:ee({sampling:ee({createMessage:e.optional()}).optional(),elicitation:ee({create:e.optional()}).optional()}).optional()}),C=ee({list:e.optional(),cancel:e.optional(),requests:ee({tools:ee({call:e.optional()}).optional()}).optional()}),I=w({experimental:H(p(),e).optional(),sampling:w({context:e.optional(),tools:e.optional()}).optional(),elicitation:x.optional(),roots:w({listChanged:q().optional()}).optional(),tasks:E.optional(),extensions:H(p(),e).optional()}),L=s.extend({protocolVersion:p(),capabilities:I,clientInfo:_}),G=c.extend({method:$("initialize"),params:L}),ge=w({experimental:H(p(),e).optional(),logging:e.optional(),completions:e.optional(),prompts:w({listChanged:q().optional()}).optional(),resources:w({subscribe:q().optional(),listChanged:q().optional()}).optional(),tools:w({listChanged:q().optional()}).optional(),tasks:C.optional(),extensions:H(p(),e).optional()}),de=h.extend({protocolVersion:p(),capabilities:ge,serverInfo:_,instructions:p().optional()}),pe=d.extend({method:$("notifications/initialized"),params:u.optional()}),Ee=c.extend({method:$("ping"),params:s.optional()}),ae=w({progress:P(),total:Y(P()),message:Y(p())}),oe=w({...u.shape,...ae.shape,progressToken:n}),Se=d.extend({method:$("notifications/progress"),params:oe}),nt=s.extend({cursor:r.optional()}),U=c.extend({params:nt.optional()}),M=h.extend({nextCursor:r.optional()}),K=w({uri:p(),mimeType:Y(p()),_meta:H(p(),Q()).optional()}),B=K.extend({text:p()}),X=p().refine(fn=>{try{return atob(fn),!0}catch{return!1}},{message:"Invalid Base64 string"}),J=K.extend({blob:X}),ne=ue(["user","assistant"]),W=w({audience:A(ne).optional(),priority:P().min(0).max(1).optional(),lastModified:Xn.datetime({offset:!0}).optional()}),fe=w({...S.shape,...b.shape,uri:p(),description:Y(p()),mimeType:Y(p()),size:Y(P()),annotations:W.optional(),_meta:Y(ee({}))}),$e=w({...S.shape,...b.shape,uriTemplate:p(),description:Y(p()),mimeType:Y(p()),annotations:W.optional(),_meta:Y(ee({}))}),st=U.extend({method:$("resources/list")}),qe=M.extend({resources:A(fe)}),He=U.extend({method:$("resources/templates/list")}),Zt=M.extend({resourceTemplates:A($e)}),On=s.extend({uri:p()}),hr=On,jr=c.extend({method:$("resources/read"),params:hr}),Ia=h.extend({contents:A(V([B,J]))}),Zi=d.extend({method:$("notifications/resources/list_changed"),params:u.optional()}),To=On,Ur=c.extend({method:$("resources/subscribe"),params:To}),Ao=On,Pa=c.extend({method:$("resources/unsubscribe"),params:Ao}),Oa=u.extend({uri:p()}),Gi=d.extend({method:$("notifications/resources/updated"),params:Oa}),Nn=w({name:p(),description:Y(p()),required:Y(q())}),Ki=w({...S.shape,...b.shape,description:Y(p()),arguments:Y(A(Nn)),_meta:Y(ee({}))}),fr=U.extend({method:$("prompts/list")}),Yi=M.extend({prompts:A(Ki)}),xi=s.extend({name:p(),arguments:H(p(),p()).optional()}),pr=c.extend({method:$("prompts/get"),params:xi}),mr=w({type:$("text"),text:p(),annotations:W.optional(),_meta:H(p(),Q()).optional()}),Mn=w({type:$("image"),data:X,mimeType:p(),annotations:W.optional(),_meta:H(p(),Q()).optional()}),gr=w({type:$("audio"),data:X,mimeType:p(),annotations:W.optional(),_meta:H(p(),Q()).optional()}),Eo=w({type:$("tool_use"),name:p(),id:p(),input:H(p(),Q()),_meta:H(p(),Q()).optional()}),Ji=w({type:$("resource"),resource:V([B,J]),annotations:W.optional(),_meta:H(p(),Q()).optional()}),qr=fe.extend({type:$("resource_link")}),yn=V([mr,Mn,gr,qr,Ji]),zi=w({role:ne,content:yn}),Fr=h.extend({description:p().optional(),messages:A(zi)}),Br=d.extend({method:$("notifications/prompts/list_changed"),params:u.optional()}),Na=w({title:p().optional(),readOnlyHint:q().optional(),destructiveHint:q().optional(),idempotentHint:q().optional(),openWorldHint:q().optional()}),vr=w({taskSupport:ue(["required","optional","forbidden"]).optional()}),br=w({...S.shape,...b.shape,description:p().optional(),inputSchema:w({type:$("object"),properties:H(p(),t).optional(),required:A(p()).optional()}).catchall(Q()),outputSchema:w({type:$("object"),properties:H(p(),t).optional(),required:A(p()).optional()}).catchall(Q()).optional(),annotations:Na.optional(),execution:vr.optional(),_meta:H(p(),Q()).optional()}),Ti=U.extend({method:$("tools/list")}),Xi=M.extend({tools:A(br)}),Wi=h.extend({content:A(yn),structuredContent:H(p(),Q()).optional(),isError:q().optional()}),Ut=l.extend({name:p(),arguments:H(p(),Q()).optional()}),Qi=c.extend({method:$("tools/call"),params:Ut}),Hr=d.extend({method:$("notifications/tools/list_changed"),params:u.optional()}),er=ue(["debug","info","notice","warning","error","critical","alert","emergency"]),$o=s.extend({level:er}),Vr=c.extend({method:$("logging/setLevel"),params:$o}),Ma=u.extend({level:er,logger:p().optional(),data:Q()}),F=d.extend({method:$("notifications/message"),params:Ma}),ie=w({name:p().optional()}),Oe=w({hints:A(ie).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),be=w({mode:ue(["auto","required","none"]).optional()}),Sn=w({type:$("tool_result"),toolUseId:p().describe("The unique identifier for the corresponding tool call."),content:A(yn),structuredContent:w({}).loose().optional(),isError:q().optional(),_meta:H(p(),Q()).optional()}),Qt=cr("type",[mr,Mn,gr]),tr=cr("type",[mr,Mn,gr,Eo,Sn]),Da=w({role:ne,content:V([tr,A(tr)]),_meta:H(p(),Q()).optional()}),lu=l.extend({messages:A(Da),modelPreferences:Oe.optional(),systemPrompt:p().optional(),includeContext:ue(["none","thisServer","allServers"]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:A(p()).optional(),metadata:e.optional(),tools:A(br).optional(),toolChoice:be.optional()}),cu=c.extend({method:$("sampling/createMessage"),params:lu}),uu=h.extend({model:p(),stopReason:Y(ue(["endTurn","stopSequence","maxTokens"]).or(p())),role:ne,content:Qt}),du=h.extend({model:p(),stopReason:Y(ue(["endTurn","stopSequence","maxTokens","toolUse"]).or(p())),role:ne,content:V([tr,A(tr)])}),hu=w({type:$("boolean"),title:p().optional(),description:p().optional(),default:q().optional()}),fu=w({type:$("string"),title:p().optional(),description:p().optional(),minLength:P().optional(),maxLength:P().optional(),format:ue(["email","uri","date","date-time"]).optional(),default:p().optional()}),pu=w({type:ue(["number","integer"]),title:p().optional(),description:p().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),mu=w({type:$("string"),title:p().optional(),description:p().optional(),enum:A(p()),default:p().optional()}),gu=w({type:$("string"),title:p().optional(),description:p().optional(),oneOf:A(w({const:p(),title:p()})),default:p().optional()}),vu=w({type:$("string"),title:p().optional(),description:p().optional(),enum:A(p()),enumNames:A(p()).optional(),default:p().optional()}),bu=V([mu,gu]),La=w({type:$("array"),title:p().optional(),description:p().optional(),minItems:P().optional(),maxItems:P().optional(),items:w({type:$("string"),enum:A(p())}),default:A(p()).optional()}),ja=w({type:$("array"),title:p().optional(),description:p().optional(),minItems:P().optional(),maxItems:P().optional(),items:w({anyOf:A(w({const:p(),title:p()}))}),default:A(p()).optional()}),Zf=V([La,ja]),Gf=V([vu,bu,Zf]),ii=V([Gf,hu,fu,pu]),ri=l.extend({mode:$("form").optional(),message:p(),requestedSchema:w({type:$("object"),properties:H(p(),ii),required:A(p()).optional()}).catchall(Q())}),yu=l.extend({mode:$("url"),message:p(),elicitationId:p(),url:p().url()}),nr=V([ri,yu]),Kf=c.extend({method:$("elicitation/create"),params:nr}),Yf=u.extend({elicitationId:p()}),Jf=d.extend({method:$("notifications/elicitation/complete"),params:Yf}),Xf=h.extend({action:ue(["accept","decline","cancel"]),content:Ui(fn=>fn===null?void 0:fn,H(p(),V([p(),P(),q(),A(p())])).optional())}),Wf=w({type:$("ref/resource"),uri:p()}),Qf=w({type:$("ref/prompt"),name:p()}),ep=s.extend({ref:V([Qf,Wf]),argument:w({name:p(),value:p()}),context:w({arguments:H(p(),p()).optional()}).optional()}),Su=c.extend({method:$("completion/complete"),params:ep}),tp=h.extend({completion:ee({values:A(p()).max(100),total:Y(P().int()),hasMore:Y(q())})}),np=w({uri:p().startsWith("file://"),name:p().optional(),_meta:H(p(),Q()).optional()}),Js=c.extend({method:$("roots/list"),params:s.optional()}),_u=h.extend({roots:A(np)}),ip=d.extend({method:$("notifications/roots/list_changed"),params:u.optional()}),rp=ee({ttl:P().optional(),pollInterval:P().optional()}),wu=ue(["working","input_required","completed","failed","cancelled"]),ko=w({taskId:p(),status:wu,ttl:V([P(),bi()]),createdAt:p(),lastUpdatedAt:p(),pollInterval:Y(P()),statusMessage:Y(p())}),Dn=h.extend({task:ko}),op=u.merge(ko),Ua=d.extend({method:$("notifications/tasks/status"),params:op}),Xs=c.extend({method:$("tasks/get"),params:s.extend({taskId:p()})}),Ws=h.merge(ko),Qs=c.extend({method:$("tasks/result"),params:s.extend({taskId:p()})}),d_=h.loose(),_n=U.extend({method:$("tasks/list")}),Et=M.extend({tasks:A(ko)}),qa=c.extend({method:$("tasks/cancel"),params:s.extend({taskId:p()})});return{JSONValueSchema:t,JSONObjectSchema:e,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:o,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:l,RequestSchema:c,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:h,RequestIdSchema:f,EmptyResultSchema:m,CancelledNotificationParamsSchema:g,CancelledNotificationSchema:y,IconSchema:v,IconsSchema:b,BaseMetadataSchema:S,ImplementationSchema:_,ClientTasksCapabilitySchema:E,ServerTasksCapabilitySchema:C,ClientCapabilitiesSchema:I,InitializeRequestParamsSchema:L,InitializeRequestSchema:G,ServerCapabilitiesSchema:ge,InitializeResultSchema:de,InitializedNotificationSchema:pe,PingRequestSchema:Ee,ProgressSchema:ae,ProgressNotificationParamsSchema:oe,ProgressNotificationSchema:Se,PaginatedRequestParamsSchema:nt,PaginatedRequestSchema:U,PaginatedResultSchema:M,ResourceContentsSchema:K,TextResourceContentsSchema:B,BlobResourceContentsSchema:J,RoleSchema:ne,AnnotationsSchema:W,ResourceSchema:fe,ResourceTemplateSchema:$e,ListResourcesRequestSchema:st,ListResourcesResultSchema:qe,ListResourceTemplatesRequestSchema:He,ListResourceTemplatesResultSchema:Zt,ResourceRequestParamsSchema:On,ReadResourceRequestParamsSchema:hr,ReadResourceRequestSchema:jr,ReadResourceResultSchema:Ia,ResourceListChangedNotificationSchema:Zi,SubscribeRequestParamsSchema:To,SubscribeRequestSchema:Ur,UnsubscribeRequestParamsSchema:Ao,UnsubscribeRequestSchema:Pa,ResourceUpdatedNotificationParamsSchema:Oa,ResourceUpdatedNotificationSchema:Gi,PromptArgumentSchema:Nn,PromptSchema:Ki,ListPromptsRequestSchema:fr,ListPromptsResultSchema:Yi,GetPromptRequestParamsSchema:xi,GetPromptRequestSchema:pr,TextContentSchema:mr,ImageContentSchema:Mn,AudioContentSchema:gr,ToolUseContentSchema:Eo,EmbeddedResourceSchema:Ji,ResourceLinkSchema:qr,ContentBlockSchema:yn,PromptMessageSchema:zi,GetPromptResultSchema:Fr,PromptListChangedNotificationSchema:Br,ToolAnnotationsSchema:Na,ToolExecutionSchema:vr,ToolSchema:br,ListToolsRequestSchema:Ti,ListToolsResultSchema:Xi,CallToolResultSchema:Wi,CallToolRequestParamsSchema:Ut,CallToolRequestSchema:Qi,ToolListChangedNotificationSchema:Hr,LoggingLevelSchema:er,SetLevelRequestParamsSchema:$o,SetLevelRequestSchema:Vr,LoggingMessageNotificationParamsSchema:Ma,LoggingMessageNotificationSchema:F,ModelHintSchema:ie,ModelPreferencesSchema:Oe,ToolChoiceSchema:be,ToolResultContentSchema:Sn,SamplingContentSchema:Qt,SamplingMessageContentBlockSchema:tr,SamplingMessageSchema:Da,CreateMessageRequestParamsSchema:lu,CreateMessageRequestSchema:cu,CreateMessageResultSchema:uu,CreateMessageResultWithToolsSchema:du,BooleanSchemaSchema:hu,StringSchemaSchema:fu,NumberSchemaSchema:pu,UntitledSingleSelectEnumSchemaSchema:mu,TitledSingleSelectEnumSchemaSchema:gu,LegacyTitledEnumSchemaSchema:vu,SingleSelectEnumSchemaSchema:bu,UntitledMultiSelectEnumSchemaSchema:La,TitledMultiSelectEnumSchemaSchema:ja,MultiSelectEnumSchemaSchema:Zf,EnumSchemaSchema:Gf,PrimitiveSchemaDefinitionSchema:ii,ElicitRequestFormParamsSchema:ri,ElicitRequestURLParamsSchema:yu,ElicitRequestParamsSchema:nr,ElicitRequestSchema:Kf,ElicitationCompleteNotificationParamsSchema:Yf,ElicitationCompleteNotificationSchema:Jf,ElicitResultSchema:Xf,ResourceTemplateReferenceSchema:Wf,PromptReferenceSchema:Qf,CompleteRequestParamsSchema:ep,CompleteRequestSchema:Su,CompleteResultSchema:tp,RootSchema:np,ListRootsRequestSchema:Js,ListRootsResultSchema:_u,RootsListChangedNotificationSchema:ip,TaskCreationParamsSchema:rp,TaskStatusSchema:wu,TaskSchema:ko,CreateTaskResultSchema:Dn,TaskStatusNotificationParamsSchema:op,TaskStatusNotificationSchema:Ua,GetTaskRequestSchema:Xs,GetTaskResultSchema:Ws,GetTaskPayloadRequestSchema:Qs,GetTaskPayloadResultSchema:d_,ListTasksRequestSchema:_n,ListTasksResultSchema:Et,CancelTaskRequestSchema:qa,CancelTaskResultSchema:h.merge(ko),ClientRequestSchema:V([Ee,G,Su,Vr,pr,fr,st,He,jr,Ur,Pa,Qi,Ti,Xs,Qs,_n,qa]),ClientNotificationSchema:V([y,Se,pe,ip,Ua]),ClientResultSchema:V([m,uu,du,Xf,_u,Ws,Et,Dn]),ServerRequestSchema:V([Ee,cu,Kf,Js,Xs,Qs,_n,qa]),ServerNotificationSchema:V([y,Se,F,Gi,Zi,Hr,Br,Ua,Jf]),ServerResultSchema:V([m,de,tp,Fr,Yi,qe,Zt,Ia,Wi,Xi,Ws,Et,Dn]),CallToolResultWireSchema:Q().superRefine((fn,zq)=>{if(!(typeof fn!="object"||fn===null||Array.isArray(fn)||fn.content!==void 0)){for(let DC of V2)if(DC in fn){zq.addIssue({code:"custom",message:`content is required when the body carries '${DC}' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(xG).pipe(Wi)}}var TG;function Z2(){return TG??=zG()}function G2(t){return t.type!=="object"}var AG=new Set(["const","enum","default","examples"]),EG=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function I2(t){return t!==void 0&&!(typeof t=="string"&&t.startsWith("#"))}function $G(t){let e=typeof t.$schema=="string"?t.$schema:void 0;if(I2(t.$id))return{...e!==void 0&&{$schema:e},type:"object",properties:{result:t},required:["result"]};let n=CN(t.$schema)&&t.$recursiveAnchor!==!0,r=(i,o)=>{if(Array.isArray(i))return i.map(l=>r(l,!1));if(i===null||typeof i!="object"||!o&&I2(i.$id))return i;let a={},s=!1;for(let[l,c]of Object.entries(i))o?a[l]=r(c,!1):(l==="$ref"||l==="$dynamicRef")&&typeof c=="string"?a[l]=c==="#"?"#/properties/result":c.startsWith("#/")?`#/properties/result${c.slice(1)}`:c:l==="$recursiveRef"&&c==="#"&&n?s=!0:AG.has(l)?a[l]=c:EG.has(l)?a[l]=r(c,!0):a[l]=r(c,!1);return s&&("$ref"in a?a.allOf=[...Array.isArray(a.allOf)?a.allOf:[],{$ref:"#/properties/result"}]:a.$ref="#/properties/result"),a};return{...e!==void 0&&{$schema:e},type:"object",properties:{result:r(t,!1)},required:["result"]}}var K2={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Y2={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},kG={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Dy;function J$(){if(Dy)return Dy;let t=Z2();return Dy={requestSchemas:{ping:t.PingRequestSchema,initialize:t.InitializeRequestSchema,"completion/complete":t.CompleteRequestSchema,"logging/setLevel":t.SetLevelRequestSchema,"prompts/get":t.GetPromptRequestSchema,"prompts/list":t.ListPromptsRequestSchema,"resources/list":t.ListResourcesRequestSchema,"resources/templates/list":t.ListResourceTemplatesRequestSchema,"resources/read":t.ReadResourceRequestSchema,"resources/subscribe":t.SubscribeRequestSchema,"resources/unsubscribe":t.UnsubscribeRequestSchema,"tools/call":t.CallToolRequestSchema,"tools/list":t.ListToolsRequestSchema,"tasks/get":t.GetTaskRequestSchema,"tasks/result":t.GetTaskPayloadRequestSchema,"tasks/list":t.ListTasksRequestSchema,"tasks/cancel":t.CancelTaskRequestSchema,"sampling/createMessage":t.CreateMessageRequestSchema,"elicitation/create":t.ElicitRequestSchema,"roots/list":t.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":t.CancelledNotificationSchema,"notifications/progress":t.ProgressNotificationSchema,"notifications/initialized":t.InitializedNotificationSchema,"notifications/roots/list_changed":t.RootsListChangedNotificationSchema,"notifications/tasks/status":t.TaskStatusNotificationSchema,"notifications/message":t.LoggingMessageNotificationSchema,"notifications/resources/updated":t.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":t.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":t.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":t.PromptListChangedNotificationSchema,"notifications/elicitation/complete":t.ElicitationCompleteNotificationSchema},resultSchemas:{ping:t.EmptyResultSchema,initialize:t.InitializeResultSchema,"completion/complete":t.CompleteResultSchema,"logging/setLevel":t.EmptyResultSchema,"prompts/get":t.GetPromptResultSchema,"prompts/list":t.ListPromptsResultSchema,"resources/list":t.ListResourcesResultSchema,"resources/templates/list":t.ListResourceTemplatesResultSchema,"resources/read":t.ReadResourceResultSchema,"resources/subscribe":t.EmptyResultSchema,"resources/unsubscribe":t.EmptyResultSchema,"tools/call":t.CallToolResultWireSchema,"tools/list":t.ListToolsResultSchema,"sampling/createMessage":t.CreateMessageResultWithToolsSchema,"elicitation/create":t.ElicitResultSchema,"roots/list":t.ListRootsResultSchema}},Dy}function J2(t){return Object.prototype.hasOwnProperty.call(K2,t)}function X2(t){return Object.prototype.hasOwnProperty.call(Y2,t)}function RG(t){return Object.prototype.hasOwnProperty.call(kG,t)}function CG(t){return RG(t)?J$().resultSchemas[t]:void 0}function IG(t){return J2(t)?J$().requestSchemas[t]:void 0}function PG(t){return X2(t)?J$().notificationSchemas[t]:void 0}var UW=Object.keys(K2),qW=Object.keys(Y2);function V$(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Ly(t,e){if(t===void 0)return{ok:!1,reason:"not-in-era"};let n=t.safeParse(e);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var P2={ok:!1,reason:"not-in-era"};function O2(t){return V$(t)&&V$(t.outputSchema)&&G2(t.outputSchema)}var X$={era:"2025-11-25",hasRequestMethod:J2,hasNotificationMethod:X2,validateRequest:(t,e)=>Ly(IG(t),e),validateResult:(t,e)=>Ly(CG(t),e),validateNotification:(t,e)=>Ly(PG(t),e),hasInputRequestMethod:()=>!1,validateInputRequest:()=>P2,validateInputResponse:()=>P2,samplingResultVariant:((t,e)=>{let n=Z2();return Ly(t?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,e)}),outboundEnvelope:t=>{},validateEnvelopeMeta:t=>[],projectCallToolResult(t,e){let n=H2(t),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!="object"||r===null||Array.isArray(r),o=e!==void 0&&G2(e);return!i&&!o?n:{...n,structuredContent:{result:r}}},decodeResult(t,e){if(V$(e)&&"resultType"in e){let n={...e};return delete n.resultType,{kind:"complete",result:n}}return{kind:"complete",result:e}},encodeResult(t,e){if(t!=="tools/list")return e;let n=e.tools;return!Array.isArray(n)||!n.some(r=>O2(r))?e:{...e,tools:n.map(r=>O2(r)?{...r,outputSchema:$G(r.outputSchema)}:r)}},encodeErrorCode:t=>t===-32002?-32602:t,checkInboundEnvelope:t=>{}};function OG(){let t=Cr(()=>V([p(),P(),q(),bi(),H(p(),t),A(t)])),e=H(p(),t),n=V([p(),P().int()]),r=p(),i=V([p(),P().int()]),o=ue(["user","assistant"]),a=ue(["debug","info","notice","warning","error","critical","alert","emergency"]),s=p().refine(Et=>{try{return atob(Et),!0}catch{return!1}},{message:"Invalid Base64 string"}),l=w({ttl:P().optional()}),c=w({taskId:p()}),u=ee({progressToken:n.optional(),"io.modelcontextprotocol/related-task":c.optional()}),d=w({_meta:u.optional()}),h=d.extend({task:l.optional()}),f=w({_meta:u.optional()}),m=w({method:p(),params:f.loose().optional()}),g=w({src:p(),mimeType:p().optional(),sizes:A(p()).optional(),theme:ue(["light","dark"]).optional()}),y=w({icons:A(g).optional()}),v=w({name:p(),title:p().optional()}),b=v.extend({...v.shape,...y.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),S=Jn(w({applyDefaults:q().optional()}),e),_=Ui(Et=>Et&&typeof Et=="object"&&!Array.isArray(Et)&&Object.keys(Et).length===0?{form:{}}:Et,Jn(w({form:S.optional(),url:e.optional()}),e.optional())),T=ee({list:e.optional(),cancel:e.optional(),requests:ee({sampling:ee({createMessage:e.optional()}).optional(),elicitation:ee({create:e.optional()}).optional()}).optional()}),x=ee({list:e.optional(),cancel:e.optional(),requests:ee({tools:ee({call:e.optional()}).optional()}).optional()}),E=w({experimental:H(p(),e).optional(),sampling:w({context:e.optional(),tools:e.optional()}).optional(),elicitation:_.optional(),roots:w({listChanged:q().optional()}).optional(),tasks:T.optional(),extensions:H(p(),e).optional()}),C=w({experimental:H(p(),e).optional(),logging:e.optional(),completions:e.optional(),prompts:w({listChanged:q().optional()}).optional(),resources:w({subscribe:q().optional(),listChanged:q().optional()}).optional(),tools:w({listChanged:q().optional()}).optional(),tasks:x.optional(),extensions:H(p(),e).optional()}),I=w({progress:P(),total:Y(P()),message:Y(p())}),L=w({...f.shape,...I.shape,progressToken:n}),G=m.extend({method:$("notifications/progress"),params:L}),ge=f.extend({level:a,logger:p().optional(),data:Q()}),de=m.extend({method:$("notifications/message"),params:ge}),pe=w({uri:p(),mimeType:Y(p()),_meta:H(p(),Q()).optional()}),Ee=pe.extend({text:p()}),ae=pe.extend({blob:s}),oe=w({audience:A(o).optional(),priority:P().min(0).max(1).optional(),lastModified:Xn.datetime({offset:!0}).optional()}),Se=w({...v.shape,...y.shape,uri:p(),description:Y(p()),mimeType:Y(p()),size:Y(P()),annotations:oe.optional(),_meta:Y(ee({}))}),nt=w({...v.shape,...y.shape,uriTemplate:p(),description:Y(p()),mimeType:Y(p()),annotations:oe.optional(),_meta:Y(ee({}))}),U=m.extend({method:$("notifications/resources/list_changed"),params:f.optional()}),M=f.extend({uri:p()}),K=m.extend({method:$("notifications/resources/updated"),params:M}),B=w({name:p(),description:Y(p()),required:Y(q())}),X=w({...v.shape,...y.shape,description:Y(p()),arguments:Y(A(B)),_meta:Y(ee({}))}),J=m.extend({method:$("notifications/prompts/list_changed"),params:f.optional()}),ne=w({type:$("text"),text:p(),annotations:oe.optional(),_meta:H(p(),Q()).optional()}),W=w({type:$("image"),data:s,mimeType:p(),annotations:oe.optional(),_meta:H(p(),Q()).optional()}),fe=w({type:$("audio"),data:s,mimeType:p(),annotations:oe.optional(),_meta:H(p(),Q()).optional()}),$e=w({type:$("tool_use"),name:p(),id:p(),input:H(p(),Q()),_meta:H(p(),Q()).optional()}),st=w({type:$("resource"),resource:V([Ee,ae]),annotations:oe.optional(),_meta:H(p(),Q()).optional()}),qe=Se.extend({type:$("resource_link")}),He=V([ne,W,fe,qe,st]),Zt=w({role:o,content:He}),On=w({title:p().optional(),readOnlyHint:q().optional(),destructiveHint:q().optional(),idempotentHint:q().optional(),openWorldHint:q().optional()}),hr=m.extend({method:$("notifications/tools/list_changed"),params:f.optional()}),jr=w({name:p().optional()}),Ia=w({hints:A(jr).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),Zi=w({mode:ue(["auto","required","none"]).optional()}),To=w({type:$("boolean"),title:p().optional(),description:p().optional(),default:q().optional()}),Ur=w({type:$("string"),title:p().optional(),description:p().optional(),minLength:P().optional(),maxLength:P().optional(),format:ue(["email","uri","date","date-time"]).optional(),default:p().optional()}),Ao=w({type:ue(["number","integer"]),title:p().optional(),description:p().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),Pa=w({type:$("string"),title:p().optional(),description:p().optional(),enum:A(p()),default:p().optional()}),Oa=w({type:$("string"),title:p().optional(),description:p().optional(),oneOf:A(w({const:p(),title:p()})),default:p().optional()}),Gi=w({type:$("string"),title:p().optional(),description:p().optional(),enum:A(p()),enumNames:A(p()).optional(),default:p().optional()}),Nn=V([Pa,Oa]),Ki=w({type:$("array"),title:p().optional(),description:p().optional(),minItems:P().optional(),maxItems:P().optional(),items:w({type:$("string"),enum:A(p())}),default:A(p()).optional()}),fr=w({type:$("array"),title:p().optional(),description:p().optional(),minItems:P().optional(),maxItems:P().optional(),items:w({anyOf:A(w({const:p(),title:p()}))}),default:A(p()).optional()}),Yi=V([Ki,fr]),xi=V([Gi,Nn,Yi]),pr=V([xi,To,Ur,Ao]),mr=h.extend({mode:$("form").optional(),message:p(),requestedSchema:w({type:$("object"),properties:H(p(),pr),required:A(p()).optional()}).catchall(Q())}),Mn=w({type:$("ref/resource"),uri:p()}),gr=w({type:$("ref/prompt"),name:p()}),Eo=w({uri:p().startsWith("file://"),name:p().optional(),_meta:H(p(),Q()).optional()}),Ji=E.shape,qr=w({experimental:Ji.experimental,sampling:Ji.sampling,elicitation:Ji.elicitation,roots:Ji.roots,extensions:Ji.extensions}),yn=C.shape,zi=w({experimental:yn.experimental,logging:yn.logging,completions:yn.completions,prompts:yn.prompts,resources:yn.resources,tools:yn.tools,extensions:yn.extensions}),Fr=ee({progressToken:n.optional(),[$s]:p(),[Ic]:b.optional(),[ks]:qr,[Pc]:a.optional()}),Br=w({...v.shape,...y.shape,description:p().optional(),inputSchema:ee({$schema:p().optional(),type:$("object")}),outputSchema:ee({$schema:p().optional()}).optional(),annotations:On.optional(),_meta:H(p(),Q()).optional()}),Na=w({type:$("tool_result"),toolUseId:p(),content:A(He),structuredContent:Q().optional(),isError:q().optional(),_meta:H(p(),Q()).optional()}),vr=V([ne,W,fe,$e,Na]),br=w({role:o,content:V([vr,A(vr)]),_meta:H(p(),Q()).optional()}),Ti=p(),Xi=ee({[ya]:b.optional().catch(void 0)}),Wi=Xi.optional();function Ut(Et){return ee({_meta:Wi,resultType:Ti.default("complete"),...Et})}let Qi=Ut({}),Hr=Ut({nextCursor:r.optional()}),er=Ut({content:A(He),structuredContent:Q().optional(),isError:q().optional()}),$o=Ut({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),tools:A(Br),nextCursor:r.optional()}),Vr=Ut({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),prompts:A(X),nextCursor:r.optional()}),Ma=Ut({description:p().optional(),messages:A(Zt)}),F=Ut({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),resources:A(Se),nextCursor:r.optional()}),ie=Ut({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),resourceTemplates:A(nt),nextCursor:r.optional()}),Oe=Ut({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),contents:A(V([Ee,ae]))}),be=Ut({completion:w({values:A(p()).max(100),total:P().int().optional(),hasMore:q().optional()}).loose()}),Sn=Ut({ttlMs:P().int().min(0),cacheScope:ue(["public","private"])}),Qt=Ut({ttlMs:P().int().min(0).catch(0),cacheScope:ue(["public","private"]).catch("private"),supportedVersions:A(p()),capabilities:zi,instructions:p().optional()}),tr=w({messages:A(br),modelPreferences:Ia.optional(),systemPrompt:p().optional(),includeContext:ue(["none","thisServer","allServers"]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:A(p()).optional(),metadata:e.optional(),tools:A(Br).optional(),toolChoice:Zi.optional()}),Da=w({method:$("sampling/createMessage"),params:tr}),lu=w({method:$("roots/list"),params:w({_meta:H(p(),Q()).optional()}).optional()}),cu=w({...br.shape,model:p(),stopReason:p().optional()}),uu=w({roots:A(Eo)}),du=w({action:ue(["accept","decline","cancel"]),content:H(p(),V([p(),P(),q(),A(p())])).optional()}),hu=w({mode:$("url"),message:p(),url:p().url()}),fu=V([mr,hu]),pu=w({method:$("elicitation/create"),params:fu}),mu=V([Da,lu,pu]),gu=V([cu,uu,du]),vu=H(p(),mu),bu=H(p(),gu),La=Ut({inputRequests:vu.optional(),requestState:p().optional()}),ja={inputResponses:bu.optional(),requestState:p().optional()},Zf=w({_meta:Fr,...ja}),Gf=ee({progressToken:n.optional()});function ii(Et,qa){return w({method:$(Et),params:w({_meta:Fr,...qa})})}function ri(Et,qa){return w({method:$(Et),params:w({_meta:Gf.optional(),...qa}).optional()})}let yu={name:p(),arguments:H(p(),Q()).optional(),...ja},nr={cursor:r.optional()},Kf=ii("tools/call",yu),Yf=ii("tools/list",nr),Jf=ii("prompts/list",nr),Xf=ii("prompts/get",{name:p(),arguments:H(p(),p()).optional(),...ja}),Wf=ii("resources/list",nr),Qf=ii("resources/templates/list",nr),ep=ii("resources/read",{uri:p(),...ja}),Su={ref:V([gr,Mn]),argument:w({name:p(),value:p()}),context:w({arguments:H(p(),p()).optional()}).optional()},tp=ii("completion/complete",Su),np=ii("server/discover",{}),Js=w({toolsListChanged:q().optional(),promptsListChanged:q().optional(),resourcesListChanged:q().optional(),resourceSubscriptions:A(p()).optional()}),_u={notifications:Js},ip=ii("subscriptions/listen",_u),rp=Xi.extend({"io.modelcontextprotocol/subscriptionId":i}),wu=ee({_meta:rp,resultType:Ti.default("complete")}),ko={"tools/call":ri("tools/call",yu),"tools/list":ri("tools/list",nr),"prompts/get":ri("prompts/get",{name:p(),arguments:H(p(),p()).optional()}),"prompts/list":ri("prompts/list",nr),"resources/list":ri("resources/list",nr),"resources/templates/list":ri("resources/templates/list",nr),"resources/read":ri("resources/read",{uri:p()}),"completion/complete":ri("completion/complete",Su),"server/discover":ri("server/discover",{}),"subscriptions/listen":ri("subscriptions/listen",_u)};function Dn(Et){return ee({_meta:Wi,...Et})}let op={"tools/call":Dn({content:A(He),structuredContent:Q().optional(),isError:q().optional()}),"tools/list":Dn({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),tools:A(Br),nextCursor:r.optional()}),"prompts/get":Dn({description:p().optional(),messages:A(Zt)}),"prompts/list":Dn({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),prompts:A(X),nextCursor:r.optional()}),"resources/list":Dn({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),resources:A(Se),nextCursor:r.optional()}),"resources/templates/list":Dn({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),resourceTemplates:A(nt),nextCursor:r.optional()}),"resources/read":Dn({ttlMs:P().int().min(0),cacheScope:ue(["public","private"]),contents:A(V([Ee,ae]))}),"completion/complete":Dn({completion:w({values:A(p()).max(100),total:P().int().optional(),hasMore:q().optional()}).loose()}),"server/discover":Dn({ttlMs:P().int().min(0).catch(0),cacheScope:ue(["public","private"]).catch("private"),supportedVersions:A(p()),capabilities:zi,instructions:p().optional()}),"subscriptions/listen":Dn({})},Ua=ee({"io.modelcontextprotocol/subscriptionId":i.optional()}),Xs=w({method:$("notifications/subscriptions/acknowledged"),params:w({_meta:Ua.optional(),notifications:Js})}),Ws=w({_meta:Ua.optional(),requestId:i,reason:p().optional()}),Qs=w({method:$("notifications/cancelled"),params:Ws}),d_={"notifications/cancelled":Qs,"notifications/progress":G,"notifications/message":de,"notifications/resources/updated":K,"notifications/resources/list_changed":U,"notifications/tools/list_changed":hr,"notifications/prompts/list_changed":J,"notifications/subscriptions/acknowledged":Xs},_n=Et=>w({jsonrpc:$("2.0"),id:V([p(),P().int()]),result:Et}).strict();return{JSONValueSchema:t,JSONObjectSchema:e,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:o,LoggingLevelSchema:a,TaskMetadataSchema:l,RelatedTaskMetadataSchema:c,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:f,NotificationSchema:m,IconSchema:g,IconsSchema:y,BaseMetadataSchema:v,ImplementationSchema:b,ClientTasksCapabilitySchema:T,ServerTasksCapabilitySchema:x,ClientCapabilitiesSchema:E,ServerCapabilitiesSchema:C,ProgressSchema:I,ProgressNotificationParamsSchema:L,ProgressNotificationSchema:G,LoggingMessageNotificationParamsSchema:ge,LoggingMessageNotificationSchema:de,ResourceContentsSchema:pe,TextResourceContentsSchema:Ee,BlobResourceContentsSchema:ae,AnnotationsSchema:oe,ResourceSchema:Se,ResourceTemplateSchema:nt,ResourceListChangedNotificationSchema:U,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:K,PromptArgumentSchema:B,PromptSchema:X,PromptListChangedNotificationSchema:J,TextContentSchema:ne,ImageContentSchema:W,AudioContentSchema:fe,ToolUseContentSchema:$e,EmbeddedResourceSchema:st,ResourceLinkSchema:qe,ContentBlockSchema:He,PromptMessageSchema:Zt,ToolAnnotationsSchema:On,ToolListChangedNotificationSchema:hr,ModelHintSchema:jr,ModelPreferencesSchema:Ia,ToolChoiceSchema:Zi,BooleanSchemaSchema:To,StringSchemaSchema:Ur,NumberSchemaSchema:Ao,UntitledSingleSelectEnumSchemaSchema:Pa,TitledSingleSelectEnumSchemaSchema:Oa,LegacyTitledEnumSchemaSchema:Gi,SingleSelectEnumSchemaSchema:Nn,UntitledMultiSelectEnumSchemaSchema:Ki,TitledMultiSelectEnumSchemaSchema:fr,MultiSelectEnumSchemaSchema:Yi,EnumSchemaSchema:xi,PrimitiveSchemaDefinitionSchema:pr,ElicitRequestFormParamsSchema:mr,ResourceTemplateReferenceSchema:Mn,PromptReferenceSchema:gr,RootSchema:Eo,ClientCapabilities2026Schema:qr,ServerCapabilities2026Schema:zi,RequestMetaEnvelopeSchema:Fr,ToolSchema:Br,ToolResultContentSchema:Na,SamplingMessageContentBlockSchema:vr,SamplingMessageSchema:br,ResultTypeSchema:Ti,ResultMetaSchema:Xi,ResultSchema:Qi,PaginatedResultSchema:Hr,CallToolResultSchema:er,ListToolsResultSchema:$o,ListPromptsResultSchema:Vr,GetPromptResultSchema:Ma,ListResourcesResultSchema:F,ListResourceTemplatesResultSchema:ie,ReadResourceResultSchema:Oe,CompleteResultSchema:be,CacheableResultSchema:Sn,DiscoverResultSchema:Qt,CreateMessageRequestParamsSchema:tr,CreateMessageRequestSchema:Da,ListRootsRequestSchema:lu,CreateMessageResultSchema:cu,ListRootsResultSchema:uu,ElicitResultSchema:du,ElicitRequestURLParamsSchema:hu,ElicitRequestParamsSchema:fu,ElicitRequestSchema:pu,InputRequestSchema:mu,InputResponseSchema:gu,InputRequestsSchema:vu,InputResponsesSchema:bu,InputRequiredResultSchema:La,InputResponseRequestParamsSchema:Zf,CallToolRequestSchema:Kf,ListToolsRequestSchema:Yf,ListPromptsRequestSchema:Jf,GetPromptRequestSchema:Xf,ListResourcesRequestSchema:Wf,ListResourceTemplatesRequestSchema:Qf,ReadResourceRequestSchema:ep,CompleteRequestSchema:tp,DiscoverRequestSchema:np,SubscriptionFilterSchema:Js,SubscriptionsListenRequestSchema:ip,SubscriptionsListenResultMetaSchema:rp,SubscriptionsListenResultSchema:wu,dispatchRequestSchemas:ko,dispatchResultSchemas:op,NotificationMetaSchema:Ua,SubscriptionsAcknowledgedNotificationSchema:Xs,CancelledNotificationParamsSchema:Ws,CancelledNotificationSchema:Qs,notificationSchemas2026:d_,JSONRPCResultResponseSchema:_n(Qi),CallToolResultResponseSchema:_n(V([er,La])),ListToolsResultResponseSchema:_n($o),ListPromptsResultResponseSchema:_n(Vr),GetPromptResultResponseSchema:_n(V([Ma,La])),ListResourcesResultResponseSchema:_n(F),ListResourceTemplatesResultResponseSchema:_n(ie),ReadResourceResultResponseSchema:_n(V([Oe,La])),CompleteResultResponseSchema:_n(be),DiscoverResultResponseSchema:_n(Qt),SubscriptionsListenResultResponseSchema:_n(wu)}}var NG;function Aa(){return NG??=OG()}var MG=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function DG(t){return MG.includes(t)}var W$=Symbol("modelcontextprotocol.resultCacheHintFallback");function LG(t){return t[W$]}function W2(t){return typeof t=="number"&&Number.isSafeInteger(t)&&t>=0}function Q2(t){return t==="public"||t==="private"}var Pe=(function(t){return t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.ResourceNotFound=-32002]="ResourceNotFound",t[t.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",t[t.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired",t})({}),cn=class ej extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](e){return yi(this,e)}static isInstance(e){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yi(this,e)}constructor(e,n,r){super(n),this.code=e,this.data=r,this.name="ProtocolError",Is(this,new.target)}static fromError(e,n,r){if(e===Pe.UrlElicitationRequired&&r){let i=r;if(i.elicitations)return new nj(i.elicitations,n)}if(e===Pe.UnsupportedProtocolVersion&&r){let i=r;if(Array.isArray(i.supported)&&typeof i.requested=="string")return new ij({supported:i.supported,requested:i.requested},n)}if(e===Pe.InvalidParams||e===Pe.ResourceNotFound){let i=r;if(typeof i?.uri=="string"&&(e===Pe.ResourceNotFound||Object.keys(i).length===1))return new tj(i.uri,n)}if(e===Pe.MissingRequiredClientCapability&&r){let i=r;if(i.requiredCapabilities!==null&&typeof i.requiredCapabilities=="object"&&!Array.isArray(i.requiredCapabilities))return new rj({requiredCapabilities:i.requiredCapabilities},n)}return new ej(e,n,r)}},tj=class extends cn{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(t,e=`Resource not found: ${t}`){super(Pe.InvalidParams,e,{uri:t})}get uri(){return this.data.uri}},nj=class extends cn{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(t,e=`URL elicitation${t.length>1?"s":""} required`){super(Pe.UrlElicitationRequired,e,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}},ij=class extends cn{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(t,e=`Unsupported protocol version: ${t.requested}`){super(Pe.UnsupportedProtocolVersion,e,t)}get supported(){return this.data.supported}get requested(){return this.data.requested}},rj=class extends cn{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(t,e=`Missing required client capabilities: ${Object.keys(t.requiredCapabilities).join(", ")}`){super(Pe.MissingRequiredClientCapability,e,t)}get requiredCapabilities(){return this.data.requiredCapabilities}},jG=0,UG="private",qG=["tools/call","prompts/get","resources/read"];function FG(t,e){let n=e.resultType;if(n===void 0)return{...e,resultType:"complete"};if(n==="complete"||qG.includes(t))return e;throw new cn(Pe.InternalError,`Handler for ${t} returned resultType '${String(n)}', but results of ${t} only support 'complete' on protocol revision 2026-07-28`)}function BG(t,e){let n=LG(e);if(e.resultType!=="complete"||!DG(t))return n===void 0?e:KG(e);let r=e,i=W2(r.ttlMs)?r.ttlMs:ZG(n),o=Q2(r.cacheScope)?r.cacheScope:GG(n),a={...r,ttlMs:i,cacheScope:o};return delete a[W$],a}function HG(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function VG(t,e){if(e===void 0)return t;let n=t._meta;return n===void 0?{...t,_meta:{[ya]:e}}:!HG(n)||n[ya]!==void 0?t:{...t,_meta:{...n,[ya]:e}}}function ZG(t){return t!==void 0&&W2(t.ttlMs)?t.ttlMs:jG}function GG(t){return t!==void 0&&Q2(t.cacheScope)?t.cacheScope:UG}function KG(t){let e={...t};return delete e[W$],e}var YG=["elicitation/create","sampling/createMessage","roots/list"],jy;function oj(){if(jy)return jy;let t=Aa();return jy={request:{"elicitation/create":w({method:$("elicitation/create"),params:t.ElicitRequestParamsSchema}),"sampling/createMessage":w({method:$("sampling/createMessage"),params:t.CreateMessageRequestParamsSchema}),"roots/list":w({method:$("roots/list"),params:ee({}).optional()})},response:{"elicitation/create":t.ElicitResultSchema,"sampling/createMessage":t.CreateMessageResultSchema,"roots/list":t.ListRootsResultSchema}},jy}function aj(t){return YG.includes(t)}function j$(t){return aj(t)?oj().request[t]:void 0}function JG(t){return aj(t)?oj().response[t]:void 0}var Q$={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},sj={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function lj(t){return Object.prototype.hasOwnProperty.call(Q$,t)}function cj(t){return Object.prototype.hasOwnProperty.call(sj,t)}function XG(t){return Object.prototype.hasOwnProperty.call(Q$,t)}function WG(t){return lj(t)?Aa().dispatchRequestSchemas[t]:void 0}function QG(t){return XG(t)?Aa().dispatchResultSchemas[t]:void 0}function e9(t){return cj(t)?Aa().notificationSchemas2026[t]:void 0}var FW=Object.keys(Q$),BW=Object.keys(sj);function Wh(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function Jh(t,e){if(t===void 0)return{ok:!1,reason:"not-in-era"};let n=t.safeParse(e);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var t9={ok:!1,reason:"not-in-era"},n9=[$s,ks];function i9(t,e){let n=e,r=!1,i=()=>(r||(n={...n},r=!0),n),o=e.tools;t==="tools/list"&&Array.isArray(o)&&o.some(s=>Wh(s)&&"execution"in s)&&(i().tools=o.map(s=>{if(!Wh(s)||!("execution"in s))return s;let l={...s};return delete l.execution,l}));let a=e.capabilities;if(Wh(a)&&"tasks"in a){let s={...a};delete s.tasks,i().capabilities=s}return n}var ek={era:"2026-07-28",hasRequestMethod:lj,hasNotificationMethod:cj,hasInputRequestMethod:t=>j$(t)!==void 0,validateRequest:(t,e)=>Jh(WG(t),e),validateResult:(t,e)=>Jh(QG(t),e),validateNotification:(t,e)=>Jh(e9(t),e),validateInputRequest:(t,e)=>Jh(j$(t),e),validateInputResponse:(t,e)=>Jh(JG(t),e),samplingResultVariant:()=>t9,outboundEnvelope(t){return{[$s]:t.protocolVersion,[Ic]:t.clientInfo,[ks]:t.clientCapabilities,...t.logLevel!==void 0&&{[Pc]:t.logLevel}}},validateEnvelopeMeta(t){let e=[];for(let r of n9)r in t||e.push({key:r,problem:"missing"});let n=Aa().RequestMetaEnvelopeSchema.safeParse(t);if(!n.success)for(let r of n.error.issues){let i=r.path.map(String),o=i.length>0?i.join("."):"_meta";i.length===1&&e.some(a=>a.key===o&&a.problem==="missing")||e.push({key:o,problem:r.message})}return e},projectCallToolResult:t=>H2(t),inputRequestSchema:j$,decodeResult(t,e){if(!Wh(e))return{kind:"invalid",error:new Ot(ln.InvalidResult,`Invalid result for ${t}: not an object`,{method:t})};let n=e.resultType;if(n===void 0)return{kind:"invalid",error:new Ot(ln.InvalidResult,`Invalid result for ${t}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:t,violation:"missing-resultType"})};if(typeof n!="string")return{kind:"invalid",error:new Ot(ln.InvalidResult,`Invalid result for ${t}: non-string resultType`,{method:t,resultType:n})};if(n==="input_required"){let a=e.inputRequests,s=Wh(a)?a:{},l=e.requestState,c=e._meta===void 0?void 0:Aa().ResultMetaSchema.safeParse(e._meta),u=c?.success?c.data:void 0;return Object.keys(s).length===0&&typeof l!="string"?{kind:"invalid",error:new Ot(ln.InvalidResult,`Invalid result for ${t}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:t,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:s,...typeof l=="string"&&{requestState:l},...u!==void 0&&{_meta:u}}}if(n!=="complete")return{kind:"invalid",error:new Ot(ln.UnsupportedResultType,`Unsupported result type '${n}' for ${t}`,{resultType:n,method:t})};let r=r9(),i=Object.hasOwn(r,t)?r[t]:void 0;if(i!==void 0){let a=i.safeParse(e);if(!a.success)return{kind:"invalid",error:new Ot(ln.InvalidResult,`Invalid result for ${t}: ${a.error}`,{method:t})}}let o={...e};return delete o.resultType,{kind:"complete",result:o}},encodeResult(t,e,n){return VG(BG(t,FG(t,i9(t,e))),n)},encodeErrorCode:t=>t===-32002?-32602:t,checkInboundEnvelope(t){if(t.envelope===void 0)return"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let e=Aa().RequestMetaEnvelopeSchema.safeParse(t.envelope);if(!e.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${e.error.issues.map(n=>n.message).join("; ")}`}},Uy;function r9(){if(Uy)return Uy;let t=Aa();return Uy={"tools/call":t.CallToolResultSchema,"tools/list":t.ListToolsResultSchema,"prompts/get":t.GetPromptResultSchema,"prompts/list":t.ListPromptsResultSchema,"resources/list":t.ListResourcesResultSchema,"resources/templates/list":t.ListResourceTemplatesResultSchema,"resources/read":t.ReadResourceResultSchema,"completion/complete":t.CompleteResultSchema,"server/discover":t.DiscoverResultSchema},Uy}var tk="2026-07-28";function ef(t){return t!==void 0&&B2(t)?ek:X$}function N2(t){return t.revision!==void 0?ef(t.revision).era:t.era==="modern"?ek.era:X$.era}function U$(t){return uj.some(e=>e.hasRequestMethod(t))}function q$(t){return uj.some(e=>e.hasNotificationMethod(t))}function M2(t){return t==="tasks/get"||t==="tasks/cancel"}var uj=[X$,ek],o9=kN({AnnotationsSchema:()=>So,AudioContentSchema:()=>Uc,BaseMetadataSchema:()=>yo,BaseRequestParamsSchema:()=>Wt,BlobResourceContentsSchema:()=>Mh,BooleanSchemaSchema:()=>Fh,CallToolRequestParamsSchema:()=>Hb,CallToolRequestSchema:()=>Vb,CallToolResultSchema:()=>Uh,CancelTaskRequestSchema:()=>k$,CancelTaskResultSchema:()=>R$,CancelledNotificationParamsSchema:()=>Kv,CancelledNotificationSchema:()=>kh,ClientCapabilitiesSchema:()=>Wv,ClientNotificationSchema:()=>I$,ClientRequestSchema:()=>C$,ClientResultSchema:()=>P$,ClientTasksCapabilitySchema:()=>Jv,CompatibilityCallToolResultSchema:()=>y$,CompleteRequestParamsSchema:()=>yy,CompleteRequestSchema:()=>Sy,CompleteResultSchema:()=>_y,ContentBlockSchema:()=>qc,CreateMessageRequestParamsSchema:()=>ry,CreateMessageRequestSchema:()=>oy,CreateMessageResultSchema:()=>ay,CreateMessageResultWithToolsSchema:()=>sy,CreateTaskResultSchema:()=>_$,CursorSchema:()=>xh,DiscoverRequestSchema:()=>ib,DiscoverResultSchema:()=>Ch,ElicitRequestFormParamsSchema:()=>Hc,ElicitRequestParamsSchema:()=>hy,ElicitRequestSchema:()=>fy,ElicitRequestURLParamsSchema:()=>dy,ElicitResultSchema:()=>gy,ElicitationCompleteNotificationParamsSchema:()=>py,ElicitationCompleteNotificationSchema:()=>my,EmbeddedResourceSchema:()=>Nb,EmptyResultSchema:()=>$h,EnumSchemaSchema:()=>uy,GetPromptRequestParamsSchema:()=>Ib,GetPromptRequestSchema:()=>Pb,GetPromptResultSchema:()=>Lb,GetTaskPayloadRequestSchema:()=>T$,GetTaskPayloadResultSchema:()=>A$,GetTaskRequestSchema:()=>x$,GetTaskResultSchema:()=>z$,IconSchema:()=>Yv,IconsSchema:()=>_a,ImageContentSchema:()=>jc,ImplementationSchema:()=>Mc,InitializeRequestParamsSchema:()=>Qv,InitializeRequestSchema:()=>eb,InitializeResultSchema:()=>tb,InitializedNotificationSchema:()=>nb,JSONArraySchema:()=>g$,JSONObjectSchema:()=>wt,JSONRPCErrorResponseSchema:()=>Nc,JSONRPCMessageSchema:()=>Gv,JSONRPCNotificationSchema:()=>Eh,JSONRPCRequestSchema:()=>Ah,JSONRPCResponseSchema:()=>v$,JSONRPCResultResponseSchema:()=>Oc,JSONValueSchema:()=>ba,LegacyTitledEnumSchemaSchema:()=>Vh,ListChangedOptionsBaseSchema:()=>Gb,ListPromptsRequestSchema:()=>Rb,ListPromptsResultSchema:()=>Cb,ListResourceTemplatesRequestSchema:()=>ub,ListResourceTemplatesResultSchema:()=>db,ListResourcesRequestSchema:()=>lb,ListResourcesResultSchema:()=>cb,ListRootsRequestSchema:()=>xy,ListRootsResultSchema:()=>zy,ListTasksRequestSchema:()=>E$,ListTasksResultSchema:()=>$$,ListToolsRequestSchema:()=>Fb,ListToolsResultSchema:()=>Bb,LoggingLevelSchema:()=>qh,LoggingMessageNotificationParamsSchema:()=>Jb,LoggingMessageNotificationSchema:()=>Xb,ModelHintSchema:()=>Wb,ModelPreferencesSchema:()=>Qb,MultiSelectEnumSchemaSchema:()=>cy,NotificationSchema:()=>vn,NotificationsParamsSchema:()=>gn,NumberSchemaSchema:()=>Bc,PaginatedRequestParamsSchema:()=>ab,PaginatedRequestSchema:()=>wa,PaginatedResultSchema:()=>xa,PingRequestSchema:()=>Ih,PrimitiveSchemaDefinitionSchema:()=>Kh,ProgressNotificationParamsSchema:()=>ob,ProgressNotificationSchema:()=>Ph,ProgressSchema:()=>rb,ProgressTokenSchema:()=>wh,PromptArgumentSchema:()=>$b,PromptListChangedNotificationSchema:()=>jb,PromptMessageSchema:()=>Db,PromptReferenceSchema:()=>by,PromptSchema:()=>kb,ReadResourceRequestParamsSchema:()=>hb,ReadResourceRequestSchema:()=>fb,ReadResourceResultSchema:()=>pb,RelatedTaskMetadataSchema:()=>Zv,RequestIdSchema:()=>Sa,RequestMetaSchema:()=>zh,RequestSchema:()=>xt,ResourceContentsSchema:()=>Oh,ResourceLinkSchema:()=>Mb,ResourceListChangedNotificationSchema:()=>mb,ResourceRequestParamsSchema:()=>Dc,ResourceSchema:()=>Dh,ResourceTemplateReferenceSchema:()=>vy,ResourceTemplateSchema:()=>sb,ResourceUpdatedNotificationParamsSchema:()=>Ab,ResourceUpdatedNotificationSchema:()=>Eb,ResultMetaObjectSchema:()=>Th,ResultSchema:()=>zt,RoleSchema:()=>za,RootSchema:()=>wy,RootsListChangedNotificationSchema:()=>Ty,SamplingContentSchema:()=>ny,SamplingMessageContentBlockSchema:()=>Es,SamplingMessageSchema:()=>iy,ServerCapabilitiesSchema:()=>Rh,ServerNotificationSchema:()=>N$,ServerRequestSchema:()=>O$,ServerResultSchema:()=>M$,ServerTasksCapabilitySchema:()=>Xv,SetLevelRequestParamsSchema:()=>Kb,SetLevelRequestSchema:()=>Yb,SingleSelectEnumSchemaSchema:()=>ly,StringSchemaSchema:()=>Fc,SubscribeRequestParamsSchema:()=>gb,SubscribeRequestSchema:()=>vb,SubscriptionFilterSchema:()=>Lh,SubscriptionsAcknowledgedNotificationParamsSchema:()=>wb,SubscriptionsAcknowledgedNotificationSchema:()=>xb,SubscriptionsListenRequestParamsSchema:()=>Sb,SubscriptionsListenRequestSchema:()=>_b,SubscriptionsListenResultMetaSchema:()=>zb,SubscriptionsListenResultSchema:()=>Tb,TaskAugmentedRequestParamsSchema:()=>Cs,TaskCreationParamsSchema:()=>S$,TaskMetadataSchema:()=>Vv,TaskSchema:()=>Ta,TaskStatusNotificationParamsSchema:()=>Ey,TaskStatusNotificationSchema:()=>w$,TaskStatusSchema:()=>Ay,TextContentSchema:()=>Lc,TextResourceContentsSchema:()=>Nh,TitledMultiSelectEnumSchemaSchema:()=>Gh,TitledSingleSelectEnumSchemaSchema:()=>Hh,ToolAnnotationsSchema:()=>Ub,ToolChoiceSchema:()=>ey,ToolExecutionSchema:()=>qb,ToolListChangedNotificationSchema:()=>Zb,ToolResultContentSchema:()=>ty,ToolSchema:()=>jh,ToolUseContentSchema:()=>Ob,UnsubscribeRequestParamsSchema:()=>bb,UnsubscribeRequestSchema:()=>yb,UntitledMultiSelectEnumSchemaSchema:()=>Zh,UntitledSingleSelectEnumSchemaSchema:()=>Bh});var dj=t=>Ah.safeParse(t).success,hj=t=>Eh.safeParse(t).success,Z$=t=>Oc.safeParse(t).success,fj=t=>Nc.safeParse(t).success;var Qh=-32020,HW=[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32e3],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[Pe.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[Qh,Pe.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[Pe.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope \u2014 and a missing envelope on a request whose protocol-version header names a modern revision \u2014 is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[Pe.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision\u2019s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[Pe.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[Qh],conformance:["http-header-validation"],rationale:"SEP-2243 standard `MCP-Protocol-Version` / `Mcp-Method` / `Mcp-Name` headers \u2014 presence, sentinel decoding, and `Mcp-Name` \u2194 body cross-check \u2014 are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The spec requires `MCP-Protocol-Version` and `Mcp-Method` on every modern *request* POST (`Mcp-Name` only for the methods that mirror `params.name` / `params.uri` / `params.taskId`, see `MCP_NAME_HEADER_SOURCE`) and names them in that order, so a request missing several is answered by the earliest. Notification POSTs are exempt: the presence half runs on requests only, so a modern-enveloped notification is dispatched even with no standard headers at all. The classifier\u2019s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half \u2014 including the missing `MCP-Protocol-Version` cell, which cannot live on the edge rung without breaking body-primary classification. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5\u20136) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[Pe.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced \u2014 pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[Qh],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool\u2019s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}],VW={[Pe.ParseError]:400,[Pe.InvalidRequest]:400,[Pe.MethodNotFound]:404,[Pe.UnsupportedProtocolVersion]:400,[Pe.MissingRequiredClientCapability]:400,[Qh]:400};function nk(t,e){return ch(t,e)}function Xh(t){return new Set(t.flatMap(e=>Object.keys(e.shape)))}function G$(t){if(t==null)return!1;let e=typeof t;return e!=="object"&&e!=="function"||!("~standard"in t)?!1:typeof t["~standard"]?.validate=="function"}var D2=!1,K$="draft-2020-12";function a9(t,e="input"){let n=t["~standard"],r;if(n.jsonSchema)r=n.jsonSchema[e]({target:K$});else if(n.vendor==="zod"){if(!("_zod"in t))throw new Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");D2||(D2=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ws(t,{target:K$,io:e})}else throw new Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(e==="output")return r.type!==void 0?r:pj(r)?{type:"object",...r}:r;if(r.type!==void 0&&r.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...r}}function pj(t){if("properties"in t||"patternProperties"in t||"additionalProperties"in t||"required"in t)return!0;for(let e of["oneOf","anyOf","allOf"]){let n=t[e];if(Array.isArray(n)&&n.length>0)return n.every(r=>r!==null&&typeof r=="object"&&(r.type==="object"||pj(r)))}return!1}function s9(t){return t.path?.length?`${t.path.map(e=>String(typeof e=="object"?e.key:e)).join(".")}: ${t.message}`:t.message}async function F$(t,e){let n=await t["~standard"].validate(e);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(r=>s9(r)).join(", ")}:{success:!0,data:n.value}}function l9(t){let e=ws(t,{target:K$,io:"input"});return typeof e.pattern=="string"?e.pattern:void 0}var c9=/\\\.\\d\{(\d+)\}/;function u9(t){let e=c9.exec(t),n=[void 0,-1,0];return e&&n.push(Number(e[1])),[!1,!0].flatMap(r=>[!1,!0].flatMap(i=>n.map(o=>Xn.datetime({local:r,offset:i,precision:o}))))}function d9(t,e){let n;switch(t){case"email":n=[yv()];break;case"uri":n=[va()];break;case"date":n=[Xn.date()];break;case"date-time":n=u9(e);break}return new Set(n.map(r=>l9(r)).filter(r=>r!==void 0))}function h9(t,e,n){return n!=="zod"?!0:d9(t,e).has(e)}function tf(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function f9(t){try{return a9(t,"input")}catch(e){let n=e instanceof Error?e.message:String(e);throw new cn(Pe.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var p9=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function ik(t){return p9.has(t)||t.startsWith("x-")}var m9=new Set(["$schema",...Object.keys(Hc.shape.requestedSchema.shape)]),L2={string:Xh([Fc,Bh,Hh,Vh]),number:Xh([Bc]),integer:Xh([Bc]),boolean:Xh([Fh]),array:Xh([Zh,Gh])},g9=new Set(Fc.shape.format.unwrap().options);function v9(t,e,n,r){if(!tf(t))return t;let i=typeof t.type=="string"&&Object.hasOwn(L2,t.type)?L2[t.type]:void 0;if(i===void 0)return t;let o={};for(let[a,s]of Object.entries(t))i.has(a)||ik(a)?o[a]=s:a==="pattern"&&t.type==="string"&&typeof t.format=="string"?g9.has(t.format)?(typeof s!="string"||!h9(t.format,s,n))&&r.push(`${e}.${a}`):o[a]=s:r.push(`${e}.${a}`);return o}function b9(t,e){let n={},r=[];for(let[i,o]of Object.entries(t))i==="properties"&&tf(o)?n[i]=Object.fromEntries(Object.entries(o).map(([a,s])=>[a,v9(s,`properties.${a}`,e,r)])):m9.has(i)?n[i]=o:ik(i)||r.push(i);if(r.length>0)throw new cn(Pe.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);return n}function y9(t,e){if(!tf(t.properties))return e;let n=Object.entries(t.properties).filter(([,r])=>!nk(Kh,r).success).map(([r])=>`properties.${r}`);return n.length>0?n.join(", "):e}function Y$(t,e,n=""){return Array.isArray(t)&&Array.isArray(e)?t.flatMap((r,i)=>Y$(r,e[i],`${n}[${i}]`)):!tf(t)||!tf(e)?[]:Object.entries(t).flatMap(([r,i])=>{let o=n?`${n}.${r}`:r;return Object.prototype.hasOwnProperty.call(e,r)?Y$(i,e[r],o):ik(r)?[]:[o]})}function S9(t){if(!G$(t.requestedSchema))return{...t,mode:"form",requestedSchema:t.requestedSchema};let e=t.requestedSchema["~standard"].vendor,n=b9(f9(t.requestedSchema),e),r=nk(Hc.shape.requestedSchema,n);if(!r.success)throw new cn(Pe.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${y9(n,r.error.message)}`);let i=Y$(n,r.data);if(i.length>0)throw new cn(Pe.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);let o=(r.data.required??[]).filter(a=>!Object.prototype.hasOwnProperty.call(r.data.properties,a));if(o.length>0)throw new cn(Pe.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${o.join(", ")}`);return{...t,mode:"form",requestedSchema:r.data}}function _9(t){let e=t.inputRequests!==void 0&&Object.keys(t.inputRequests).length>0,n=typeof t.requestState=="string";if(!e&&!n)throw new TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return{resultType:"input_required",...t.inputRequests!==void 0&&{inputRequests:t.inputRequests},...t.requestState!==void 0&&{requestState:t.requestState}}}var ZW=Object.assign(_9,{elicit(t){try{return{method:"elicitation/create",params:S9(t)}}catch(e){throw e instanceof cn?new TypeError(e.message,{cause:e}):e}},elicitUrl(t){return{method:"elicitation/create",params:{...t,mode:"url"}}},createMessage(t){return{method:"sampling/createMessage",params:t}},listRoots(){return{method:"roots/list"}}});var w9=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],x9={IdJagTokenExchangeResponseSchema:Iy,OAuthClientInformationFullSchema:My,OAuthClientInformationSchema:Ny,OAuthClientMetadataSchema:Oy,OAuthClientRegistrationErrorSchema:D$,OAuthErrorResponseSchema:Py,OAuthMetadataSchema:Yh,OAuthProtectedResourceMetadataSchema:$y,OAuthTokenRevocationRequestSchema:L$,OAuthTokensSchema:Cy,OpenIdProviderDiscoveryMetadataSchema:Ry,OpenIdProviderMetadataSchema:ky},mj={},gj={};function vj(t,e){let n=t.slice(0,-6);mj[n]=e,gj[n]=r=>e.safeParse(r).success}for(let t of w9)vj(t,o9[t]);for(let[t,e]of Object.entries(x9))vj(t,e);var z9=Object.freeze(mj),T9=Object.freeze(gj);function A9(t){switch(t){case"initialize":case"notifications/initialized":return ef(void 0);case"server/discover":return ef(tk);default:return}}var bj=6e4,E9=[$s,Ic,ks,Pc],$9=["inputResponses","requestState"];function j2(t,e){let n=t.params;if(!B$(n))return{message:t,lifted:{}};let r=n._meta,i=B$(r)?E9.filter(l=>l in r):[],o=e==="request"?$9.filter(l=>l in n):[];if(i.length===0&&o.length===0)return{message:t,lifted:{}};let a={},s={...n};if(i.length>0&&B$(r)){let l={},c={...r};for(let u of i)l[u]=r[u],delete c[u];a.envelope=l,Object.keys(c).length>0?s._meta=c:delete s._meta}for(let l of o)l==="inputResponses"&&(a.inputResponses=s[l]),l==="requestState"&&(a.requestState=s[l]),delete s[l];return{message:{...t,params:s},lifted:a}}function U2(t,e){let n=t.validateResult(e,void 0);if(!(!n.ok&&n.reason==="not-in-era"))return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(r){let i=t.validateResult(e,r);return i.ok?{value:i.value}:{issues:[{message:i.reason==="invalid"?i.message:`not-in-era: ${e}`}]}}}}}function yj(t){return()=>t}var k9=yj(void 0),R9,rk=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{R9=(t,e)=>{t._negotiatedProtocolVersion=e}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(t){this._options=t,this._supportedProtocolVersions=t?.supportedProtocolVersions??Fv,this.setNotificationHandler("notifications/cancelled",e=>{this._oncancel(e)}),this.setNotificationHandler("notifications/progress",e=>{this._onprogress(e)}),this.setRequestHandler("ping",e=>({}))}_shouldDropInbound(t){}_outboundMetaEnvelope(){}_envelopeOutbound(t){let e=this._outboundMetaEnvelope();if(e===void 0)return t;let n=t.params??{};return{...t,params:{...n,_meta:{...e,...n._meta}}}}_resolveNonCompleteResult(t,e){return Promise.reject(new Ot(ln.UnsupportedResultType,`Unsupported result type '${t.kind}' for ${e.request.method}`,{resultType:t.kind,method:e.request.method}))}_getRequestHandler(t){return this._requestHandlers.get(t)}async _oncancel(t){t.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,e,n,r,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,e),startTime:Date.now(),timeout:e,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(t){let e=this._timeoutInfo.get(t);if(!e)return!1;let n=Date.now()-e.startTime;if(e.maxTotalTimeout&&n>=e.maxTotalTimeout)throw this._timeoutInfo.delete(t),new Ot(ln.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:e.maxTotalTimeout,totalElapsed:n});return clearTimeout(e.timeoutId),e.timeoutId=setTimeout(e.onTimeout,e.timeout),!0}_cleanupTimeout(t){let e=this._timeoutInfo.get(t);e&&(clearTimeout(e.timeoutId),this._timeoutInfo.delete(t))}async connect(t){this._transport=t;let e=this.transport?.onclose;this._transport.onclose=()=>{try{e?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=i=>{n?.(i),this._onerror(i)};let r=this._transport?.onmessage;this._transport.onmessage=(i,o)=>{r?.(i,o),Z$(i)||fj(i)?this._onresponse(i):dj(i)?this._onrequest(i,o):hj(i)?this._onnotification(i,o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},t.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let r of this._timeoutInfo.values())clearTimeout(r.timeoutId);this._timeoutInfo.clear();let e=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new Ot(ln.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let r of t.values())r(n);for(let r of e.values())r.abort(n)}}_onerror(t){this.onerror?.(t)}_onnotification(t,e){let{message:n}=j2(t,"notification"),r=this._negotiatedWireCodec();if(e?.classification===void 0&&this._shouldDropInbound(t)==="drop")return;if(e?.classification!==void 0){let a=N2(e.classification);if(a!==r.era){this._onerror(new Error(`Era mismatch on inbound notification '${n.method}': classified as ${a} but this instance serves ${r.era}`));return}}if(q$(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),o=this.fallbackNotificationHandler;i===void 0&&o===void 0||Promise.resolve().then(()=>i===void 0?o(n):i(n,r)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(t,e){let{message:n,lifted:r}=j2(t,"request"),i=this._negotiatedWireCodec();if(e?.classification===void 0&&this._shouldDropInbound(t)==="drop"){this._onerror(new Error(`Dropped inbound request '${t.method}': not servable on this connection's protocol era`));return}let o=this._transport,a=(g,y,v)=>{let b={jsonrpc:"2.0",id:n.id,error:{code:g,message:y,...v!==void 0&&{data:v}}};o?.send(b).catch(S=>this._onerror(new Error(`Failed to send an error response: ${S}`)))};if(e?.classification!==void 0){let g=N2(e.classification);if(g!==i.era){this._onerror(new Error(`Era mismatch on inbound request '${n.method}': classified as ${g} but this instance serves ${i.era}`));let y=e.classification.revision??g;a(Pe.UnsupportedProtocolVersion,`Unsupported protocol version: ${y}`,{supported:this._supportedProtocolVersions,requested:y});return}}if(U$(n.method)&&!i.hasRequestMethod(n.method)&&!(M2(n.method)&&this._customSchemaRequestMethods.has(n.method))){a(Pe.MethodNotFound,"Method not found");return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){a(Pe.MethodNotFound,"Method not found");return}let l=i.checkInboundEnvelope(r);if(l!==void 0){a(Pe.InvalidParams,l);return}let c=(g,y)=>this._notificationViaCodec(this._resolveOutboundCodec(g.method),g,{...y,relatedRequestId:n.id}),u=(g,y,v)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(g.method),g,y,{...v,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let h=r.inputResponses===void 0?void 0:C9(r.inputResponses),f={sessionId:o?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...h!==void 0&&{inputResponses:h.accepted},...h!==void 0&&h.droppedKeys.length>0&&{droppedInputResponseKeys:h.droppedKeys},requestState:r.requestState===void 0?k9:yj(r.requestState),signal:d.signal,send:((g,y,v)=>{let b=this._resolveOutboundCodec(g.method);if(this._assertOutboundRequestInEra(b,g.method),G$(y))return u(g,y,v);let S=U2(b,g.method);if(S===void 0)throw new TypeError(`'${g.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(g,S,y)}),notify:c},http:e?.authInfo?{authInfo:e.authInfo}:void 0},m=this.buildContext(f,e);Promise.resolve().then(()=>s(n,m)).then(async g=>{if(d.signal.aborted)return;let y;try{y=i.encodeResult(n.method,g,this._outboundServerInfo())}catch(b){this._onerror(new Error(`Failed to encode result for ${n.method}: ${b}`)),a(Pe.InternalError,"Internal error");return}let v={result:y,jsonrpc:"2.0",id:n.id};await o?.send(v)},async g=>{if(d.signal.aborted)return;let y=Number.isSafeInteger(g.code)?g.code:Pe.InternalError,v={jsonrpc:"2.0",id:n.id,error:{code:i.encodeErrorCode(y),message:g.message??"Internal error",...g.data!==void 0&&{data:g.data}}};await o?.send(v)}).catch(g=>this._onerror(new Error(`Failed to send response: ${g}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(t){let{progressToken:e,...n}=t.params,r=Number(e),i=this._progressHandlers.get(r);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let o=this._responseHandlers.get(r),a=this._timeoutInfo.get(r);if(a&&o&&a.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(s){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),o(s);return}i(n)}_onresponse(t){let e=Number(t.id),n=this._responseHandlers.get(e);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(e),this._cleanupTimeout(e),this._progressHandlers.delete(e),Z$(t)?n(t):n(cn.fromError(t.error.code,t.error.message,t.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(t,e,n){let r=this._resolveOutboundCodec(t.method);if(G$(e))return M2(t.method)||this._assertOutboundRequestInEra(r,t.method),this._requestWithSchemaViaCodec(r,t,e,n);this._assertOutboundRequestInEra(r,t.method);let i=U2(r,t.method);if(i===void 0)throw new TypeError(`'${t.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,t,i,e)}_negotiatedWireCodec(){return ef(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(t){if(this._negotiatedProtocolVersion===void 0){let e=A9(t);if(e)return e}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(t,e){if(U$(e)&&!t.hasRequestMethod(e))throw new Ot(ln.MethodNotSupportedByProtocolVersion,`Method '${e}' is not supported by the negotiated protocol version (wire era ${t.era})`,{method:e,era:t.era})}_requestWithSchema(t,e,n){let r=this._resolveOutboundCodec(t.method);return this._assertOutboundRequestInEra(r,t.method),this._requestWithSchemaViaCodec(r,t,e,n)}_requestWithSchemaViaCodec(t,e,n,r){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a,headers:s}=r??{},l=Date.now(),c,u;return new Promise((d,h)=>{let f=x=>{h(x)};if(!this._transport){f(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method)}catch(x){f(x);return}if(r?.signal?.aborted){let x=r.signal.reason;throw x instanceof Ot?x:new Ot(ln.RequestTimeout,String(x))}let m=t.era===tk&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,g=this._requestMessageId++;u=g;let y={...e,jsonrpc:"2.0",id:g};r?.onprogress&&(this._progressHandlers.set(g,r.onprogress),y.params={...e.params,_meta:{...e.params?._meta,progressToken:g}});let v=this._envelopeOutbound(y),b=!1,S=x=>{b||(this._progressHandlers.delete(g),m===void 0?e.method!=="initialize"&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(x)}}),{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(E=>this._onerror(new Error(`Failed to send cancellation: ${E}`))):m.abort(),h(x instanceof Ot?x:new Ot(ln.RequestTimeout,String(x))))};this._responseHandlers.set(g,x=>{if(r?.signal?.aborted)return;if(b=!0,x instanceof Error)return h(x);let E;try{E=t.decodeResult(e.method,x.result)}catch(I){return h(I instanceof Error?I:new Error(String(I)))}if(E.kind==="invalid")return h(E.error);if(E.kind==="input_required"){if(r?.allowInputRequired===!0)return d(I9(E));let I={codec:t,request:e,resultSchema:n,options:r,flowStartedAt:l,retry:(L,G)=>this._requestWithSchemaViaCodec(t,L===void 0?{method:e.method}:{method:e.method,params:L},n,G)};return d(this._resolveNonCompleteResult(E,I))}let C=E.result;F$(n,C).then(I=>{I.success?d(I.data):h(new Ot(ln.InvalidResult,`Invalid result for ${e.method}: ${I.error}`))},h)}),c=()=>S(r?.signal?.reason),r?.signal?.addEventListener("abort",c,{once:!0});let _=r?.timeout??bj,T=()=>S(new Ot(ln.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(g,_,r?.maxTotalTimeout,T,r?.resetTimeoutOnProgress??!1),this._transport.send(v,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a,headers:s,requestSignal:m?.signal}).catch(x=>{this._progressHandlers.delete(g),h(x)})}).finally(()=>{c&&r?.signal?.removeEventListener("abort",c),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(t,e){return await this._notificationViaCodec(this._resolveOutboundCodec(t.method),t,e)}async _notificationViaCodec(t,e,n){if(!this._transport)throw new Ot(ln.NotConnected,"Not connected");if(q$(e.method)&&!t.hasNotificationMethod(e.method))throw new Ot(ln.MethodNotSupportedByProtocolVersion,`Notification '${e.method}' is not supported by the negotiated protocol version (wire era ${t.era})`,{method:e.method,era:t.era});this.assertNotificationCapability(e.method);let r=this._envelopeOutbound({jsonrpc:"2.0",...e});if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(e.method),this._transport&&this._transport?.send(r,n).catch(i=>this._onerror(i))});return}await this._transport.send(r,n)}setRequestHandler(t,e,n){this.assertRequestHandlerCapability(t);let r;if(typeof e=="function"){if(!U$(t))throw new TypeError(`'${t}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(i,o)=>{let a=this._negotiatedWireCodec(),s=a.validateRequest(t,i);if(!s.ok&&s.reason==="not-in-era"&&(s=a.validateInputRequest(t,i)),!s.ok)throw s.reason==="not-in-era"?new cn(Pe.InternalError,`No wire schema for ${t} in the resolved era`):new Error(s.message);return Promise.resolve(e(s.value,o))}}else if(n)r=async(i,o)=>{let a=await F$(e.params,{...i.params});if(!a.success)throw new cn(Pe.InvalidParams,`Invalid params for ${t}: ${a.error}`);return n(a.data,o)};else throw new TypeError("setRequestHandler: handler is required");typeof e=="function"?this._customSchemaRequestMethods.delete(t):this._customSchemaRequestMethods.add(t),this._requestHandlers.set(t,this._wrapHandler(t,r))}_wrapHandler(t,e){return e}_outboundServerInfo(){}removeRequestHandler(t){this._requestHandlers.delete(t),this._customSchemaRequestMethods.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,e,n){if(typeof e=="function"){if(!q$(t))throw new TypeError(`'${t}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(t,(r,i)=>{let o=i.validateNotification(t,r);if(!o.ok)throw o.reason==="not-in-era"?new cn(Pe.InternalError,`No wire schema for ${t} in the resolved era`):new Error(o.message);return Promise.resolve(e(o.value))});return}if(!n)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(t,async r=>{let i=await F$(e.params,{...r.params});if(!i.success)throw new cn(Pe.InvalidParams,`Invalid params for notification ${t}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}};function B$(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function q2(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function C9(t){let e={},n=[];if(!q2(t))return{accepted:e,droppedKeys:n};for(let[r,i]of Object.entries(t)){if(!q2(i)||"method"in i||"result"in i){n.push(r);continue}e[r]=i}return{accepted:e,droppedKeys:n}}function I9(t){return{resultType:"input_required",inputRequests:t.inputRequests,...t.requestState!==void 0&&{requestState:t.requestState},...t._meta!==void 0&&{_meta:t._meta}}}var P9=$N((t=>{var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;t.parse=i;function i(s){if(!s)throw new TypeError("argument string is required");var l=typeof s=="object"?o(s):s;if(typeof l!="string")throw new TypeError("argument string is required to be a string");var c=l.indexOf(";"),u=c!==-1?l.slice(0,c).trim():l.trim();if(!r.test(u))throw new TypeError("invalid media type");var d=new a(u.toLowerCase());if(c!==-1){var h,f,m;for(e.lastIndex=c;f=e.exec(l);){if(f.index!==c)throw new TypeError("invalid parameter format");c+=f[0].length,h=f[1].toLowerCase(),m=f[2],m.charCodeAt(0)===34&&(m=m.slice(1,-1),m.indexOf("\\")!==-1&&(m=m.replace(n,"$1"))),d.parameters[h]=m}if(c!==l.length)throw new TypeError("invalid parameter format")}return d}function o(s){var l;if(typeof s.getHeader=="function"?l=s.getHeader("content-type"):typeof s.headers=="object"&&(l=s.headers&&s.headers["content-type"]),typeof l!="string")throw new TypeError("content-type header is missing from object");return l}function a(s){this.parameters=Object.create(null),this.type=s}})),GW=RN(P9(),1);var O9=10*1024*1024;var rQ=typeof self<"u"&&self.location&&self.location.origin!=="null"?new URL(self.location.origin+self.location.pathname+location.search):new URL("https://github.com/cfworker");var N9=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,M9=[0,31,28,31,30,31,30,31,31,30,31,30,31],D9=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,L9=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,j9=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,U9=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,q9=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,F9=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,B9=/^(?:\/(?:[^~/]|~0|~1)*)*$/,H9=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,V9=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Z9=t=>{if(t[0]==='"')return!1;let[e,n,...r]=t.split("@");return!e||!n||r.length!==0||e.length>64||n.length>253||e[0]==="."||e.endsWith(".")||e.includes("..")||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(e)?!1:n.split(".").every(i=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(i))},G9=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,K9=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Y9=t=>t.length>1&&t.length<80&&(/^P\d+([.,]\d+)?W$/.test(t)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(t)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(t));function Ir(t){return t.test.bind(t)}var oQ={date:Sj,time:_j.bind(void 0,!1),"date-time":W9,duration:Y9,uri:t8,"uri-reference":Ir(j9),"uri-template":Ir(U9),url:Ir(q9),email:Z9,hostname:Ir(L9),ipv4:Ir(G9),ipv6:Ir(K9),regex:i8,uuid:Ir(F9),"json-pointer":Ir(B9),"json-pointer-uri-fragment":Ir(H9),"relative-json-pointer":Ir(V9)};function J9(t){return t%4===0&&(t%100!==0||t%400===0)}function Sj(t){let e=t.match(N9);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&J9(n)?29:M9[r])}function _j(t,e){let n=e.match(D9);if(!n)return!1;let r=+n[1],i=+n[2],o=+n[3],a=!!n[5];return(r<=23&&i<=59&&o<=59||r==23&&i==59&&o==60)&&(!t||a)}var X9=/t|\s/i;function W9(t){let e=t.split(X9);return e.length==2&&Sj(e[0])&&_j(!0,e[1])}var Q9=/\/|:/,e8=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function t8(t){return Q9.test(t)&&e8.test(t)}var n8=/[^\\]\\Z/;function i8(t){if(n8.test(t))return!1;try{return new RegExp(t,"u"),!0}catch{return!1}}var o8;o8=globalThis.crypto;var nf=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthClientFlowError"})}static[Symbol.hasInstance](t){return yi(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yi(this,t)}constructor(t){super(t),this.name=new.target.name,Is(this,new.target)}},QQ=class extends nf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.IssuerMismatchError"})}kind;expected;received;constructor(t,e,n){super(`Issuer mismatch in ${t==="metadata"?"authorization server metadata (RFC 8414 \xA73.3)":"authorization response (RFC 9207)"}: expected ${JSON.stringify(e)}, received ${JSON.stringify(n)}`),this.kind=t,this.expected=e,this.received=n}},eee=class extends nf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.RegistrationRejectedError"})}status;body;submittedMetadata;constructor(t){super(`Dynamic Client Registration rejected (HTTP ${t.status}): ${t.body}`),this.status=t.status,this.body=t.body,this.submittedMetadata=t.submittedMetadata}},tee=class extends nf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsecureTokenEndpointError"})}tokenEndpoint;constructor(t){super(`Refusing to send credentials to non-https token endpoint '${t}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=t}},nee=class extends nf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.AuthorizationServerMismatchError"})}constructor(t,e){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(t)} but this call resolved ${JSON.stringify(e)}; refusing to present them to a different authorization server`),this.recordedIssuer=t,this.currentIssuer=e}},iee=class extends nf{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.InsufficientScopeError"})}requiredScope;resourceMetadataUrl;errorDescription;constructor(t){super(`Insufficient scope${t.requiredScope?`: required "${t.requiredScope}"`:""}`),this.requiredScope=t.requiredScope,this.resourceMetadataUrl=t.resourceMetadataUrl,this.errorDescription=t.errorDescription}};var ree=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnauthorizedError"})}static[Symbol.hasInstance](t){return yi(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yi(this,t)}constructor(t){super(t??"Unauthorized"),this.name="UnauthorizedError",Is(this,new.target)}};var oee=Symbol.for("mcp.authSeamEscape");var aee=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SseError"})}static[Symbol.hasInstance](t){return yi(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return yi(this,t)}constructor(t,e,n){super(`SSE error: ${e}`),this.code=t,this.event=n,Is(this,new.target)}};var a8="io.modelcontextprotocol/related-task";var s8="io.modelcontextprotocol/serverInfo";var l8="io.modelcontextprotocol/subscriptionId";var qy="2.0";var Vc=Cr(()=>V([p(),P(),q(),bi(),H(p(),Vc),A(Vc)])),Nt=H(p(),Vc),c8=A(Vc),ok=V([p(),P().int()]),ak=p(),xj=w({ttl:P().optional()}),zj=w({taskId:p()}),sk=ee({progressToken:ok.optional(),[a8]:zj.optional()}),Rn=w({_meta:sk.optional()}),of=Rn.extend({task:xj.optional()}),Mt=w({method:p(),params:Rn.loose().optional()}),Si=w({_meta:sk.optional()}),Wn=w({method:p(),params:Si.loose().optional()}),lk=ee({get[s8](){return Os.optional().catch(void 0)}}),Dt=ee({_meta:lk.optional()}),Ea=V([p(),P().int()]),Tj=w({jsonrpc:$(qy),id:Ea,...Mt.shape}).strict(),Aj=w({jsonrpc:$(qy),...Wn.shape}).strict(),ck=w({jsonrpc:$(qy),id:Ea,result:Dt}).strict(),uk=w({jsonrpc:$(qy),id:Ea.optional(),error:w({code:P().int(),message:p(),data:Q().optional()})}).strict(),dk=V([Tj,Aj,ck,uk]),u8=V([ck,uk]),af=Dt.strict(),Ej=Si.extend({requestId:Ea.optional(),reason:p().optional()}),hk=Wn.extend({method:$("notifications/cancelled"),params:Ej}),$j=w({src:p(),mimeType:p().optional(),sizes:A(p()).optional(),theme:ue(["light","dark"]).optional()}),Zc=w({icons:A($j).optional()}),Ps=w({name:p(),title:p().optional()}),Os=Ps.extend({...Ps.shape,...Zc.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),d8=Jn(w({applyDefaults:q().optional()}),Nt),h8=Ui(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Jn(w({form:d8.optional(),url:Nt.optional()}),Nt.optional())),f8=ee({list:Nt.optional(),cancel:Nt.optional(),requests:ee({sampling:ee({createMessage:Nt.optional()}).optional(),elicitation:ee({create:Nt.optional()}).optional()}).optional()}),p8=ee({list:Nt.optional(),cancel:Nt.optional(),requests:ee({tools:ee({call:Nt.optional()}).optional()}).optional()}),kj=w({experimental:H(p(),Nt).optional(),sampling:w({context:Nt.optional(),tools:Nt.optional()}).optional(),elicitation:h8.optional(),roots:w({listChanged:q().optional()}).optional(),tasks:f8.optional(),extensions:H(p(),Nt).optional()}),Rj=Rn.extend({protocolVersion:p(),capabilities:kj,clientInfo:Os}),Cj=Mt.extend({method:$("initialize"),params:Rj}),fk=w({experimental:H(p(),Nt).optional(),logging:Nt.optional(),completions:Nt.optional(),prompts:w({listChanged:q().optional()}).optional(),resources:w({subscribe:q().optional(),listChanged:q().optional()}).optional(),tools:w({listChanged:q().optional()}).optional(),tasks:p8.optional(),extensions:H(p(),Nt).optional()}),Ij=Dt.extend({protocolVersion:p(),capabilities:fk,serverInfo:Os,instructions:p().optional()}),Pj=Wn.extend({method:$("notifications/initialized"),params:Si.optional()}),Oj=Mt.extend({method:$("server/discover"),params:Rn.optional()}),Nj=Dt.extend({supportedVersions:A(p()),capabilities:fk,instructions:p().optional()}),pk=Mt.extend({method:$("ping"),params:Rn.optional()}),Mj=w({progress:P(),total:Y(P()),message:Y(p())}),Dj=w({...Si.shape,...Mj.shape,progressToken:ok}),mk=Wn.extend({method:$("notifications/progress"),params:Dj}),Lj=Rn.extend({cursor:ak.optional()}),Gc=Mt.extend({params:Lj.optional()}),Kc=Dt.extend({nextCursor:ak.optional()}),gk=w({uri:p(),mimeType:Y(p()),_meta:H(p(),Q()).optional()}),vk=gk.extend({text:p()}),bk=p().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),yk=gk.extend({blob:bk}),Yc=ue(["user","assistant"]),Ns=w({audience:A(Yc).optional(),priority:P().min(0).max(1).optional(),lastModified:Xn.datetime({offset:!0}).optional()}),Sk=w({...Ps.shape,...Zc.shape,uri:p(),description:Y(p()),mimeType:Y(p()),size:Y(P()),annotations:Ns.optional(),_meta:Y(ee({}))}),jj=w({...Ps.shape,...Zc.shape,uriTemplate:p(),description:Y(p()),mimeType:Y(p()),annotations:Ns.optional(),_meta:Y(ee({}))}),Uj=Gc.extend({method:$("resources/list")}),qj=Kc.extend({resources:A(Sk)}),Fj=Gc.extend({method:$("resources/templates/list")}),Bj=Kc.extend({resourceTemplates:A(jj)}),Fy=Rn.extend({uri:p()}),Hj=Fy,Vj=Mt.extend({method:$("resources/read"),params:Hj}),Zj=Dt.extend({contents:A(V([vk,yk]))}),Gj=Wn.extend({method:$("notifications/resources/list_changed"),params:Si.optional()}),Kj=Fy,Yj=Mt.extend({method:$("resources/subscribe"),params:Kj}),Jj=Fy,Xj=Mt.extend({method:$("resources/unsubscribe"),params:Jj}),_k=w({toolsListChanged:q().optional(),promptsListChanged:q().optional(),resourcesListChanged:q().optional(),resourceSubscriptions:A(p()).optional()}),Wj=Rn.extend({notifications:_k}),Qj=Mt.extend({method:$("subscriptions/listen"),params:Wj}),eU=Si.extend({notifications:_k}),tU=Wn.extend({method:$("notifications/subscriptions/acknowledged"),params:eU}),nU=lk.extend({[l8]:Ea}),iU=Dt.extend({_meta:nU}),rU=Si.extend({uri:p()}),oU=Wn.extend({method:$("notifications/resources/updated"),params:rU}),aU=w({name:p(),description:Y(p()),required:Y(q())}),sU=w({...Ps.shape,...Zc.shape,description:Y(p()),arguments:Y(A(aU)),_meta:Y(ee({}))}),lU=Gc.extend({method:$("prompts/list")}),cU=Kc.extend({prompts:A(sU)}),uU=Rn.extend({name:p(),arguments:H(p(),p()).optional()}),dU=Mt.extend({method:$("prompts/get"),params:uU}),By=w({type:$("text"),text:p(),annotations:Ns.optional(),_meta:H(p(),Q()).optional()}),Hy=w({type:$("image"),data:bk,mimeType:p(),annotations:Ns.optional(),_meta:H(p(),Q()).optional()}),Vy=w({type:$("audio"),data:bk,mimeType:p(),annotations:Ns.optional(),_meta:H(p(),Q()).optional()}),hU=w({type:$("tool_use"),name:p(),id:p(),input:H(p(),Q()),_meta:H(p(),Q()).optional()}),Zy=w({type:$("resource"),resource:V([vk,yk]),annotations:Ns.optional(),_meta:H(p(),Q()).optional()}),Gy=Sk.extend({type:$("resource_link")}),Ms=V([By,Hy,Vy,Gy,Zy]),fU=w({role:Yc,content:Ms}),pU=Dt.extend({description:p().optional(),messages:A(fU)}),mU=Wn.extend({method:$("notifications/prompts/list_changed"),params:Si.optional()}),gU=w({title:p().optional(),readOnlyHint:q().optional(),destructiveHint:q().optional(),idempotentHint:q().optional(),openWorldHint:q().optional()}),vU=w({taskSupport:ue(["required","optional","forbidden"]).optional()}),sf=w({...Ps.shape,...Zc.shape,description:p().optional(),inputSchema:w({type:$("object"),properties:H(p(),Vc).optional(),required:A(p()).optional()}).catchall(Q()),outputSchema:ee({$schema:p().optional()}).optional(),annotations:gU.optional(),execution:vU.optional(),_meta:H(p(),Q()).optional()}),bU=Gc.extend({method:$("tools/list")}),yU=Kc.extend({tools:A(sf)}),lf=Dt.extend({content:A(Ms).default([]),structuredContent:Q().optional(),isError:q().optional()}),m8=lf.or(Dt.extend({toolResult:Q()})),SU=of.extend({name:p(),arguments:H(p(),Q()).optional()}),_U=Mt.extend({method:$("tools/call"),params:SU}),wU=Wn.extend({method:$("notifications/tools/list_changed"),params:Si.optional()}),gee=w({autoRefresh:q().default(!0),debounceMs:P().int().nonnegative().default(300)}),wk=ue(["debug","info","notice","warning","error","critical","alert","emergency"]),xU=Rn.extend({level:wk}),zU=Mt.extend({method:$("logging/setLevel"),params:xU}),TU=Si.extend({level:wk,logger:p().optional(),data:Q()}),AU=Wn.extend({method:$("notifications/message"),params:TU}),EU=w({name:p().optional()}),$U=w({hints:A(EU).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),kU=w({mode:ue(["auto","required","none"]).optional()}),RU=w({type:$("tool_result"),toolUseId:p().describe("The unique identifier for the corresponding tool call."),content:A(Ms),structuredContent:Q().optional(),isError:q().optional(),_meta:H(p(),Q()).optional()}),CU=cr("type",[By,Hy,Vy]),rf=cr("type",[By,Hy,Vy,hU,RU]),IU=w({role:Yc,content:V([rf,A(rf)]),_meta:H(p(),Q()).optional()}),PU=of.extend({messages:A(IU),modelPreferences:$U.optional(),systemPrompt:p().optional(),includeContext:ue(["none","thisServer","allServers"]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:A(p()).optional(),metadata:Nt.optional(),tools:A(sf).optional(),toolChoice:kU.optional()}),OU=Mt.extend({method:$("sampling/createMessage"),params:PU}),NU=Dt.extend({model:p(),stopReason:Y(ue(["endTurn","stopSequence","maxTokens"]).or(p())),role:Yc,content:CU}),MU=Dt.extend({model:p(),stopReason:Y(ue(["endTurn","stopSequence","maxTokens","toolUse"]).or(p())),role:Yc,content:V([rf,A(rf)])}),DU=w({type:$("boolean"),title:p().optional(),description:p().optional(),default:q().optional()}),LU=w({type:$("string"),title:p().optional(),description:p().optional(),minLength:P().optional(),maxLength:P().optional(),format:ue(["email","uri","date","date-time"]).optional(),default:p().optional()}),jU=w({type:ue(["number","integer"]),title:p().optional(),description:p().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),UU=w({type:$("string"),title:p().optional(),description:p().optional(),enum:A(p()),default:p().optional()}),qU=w({type:$("string"),title:p().optional(),description:p().optional(),oneOf:A(w({const:p(),title:p()})),default:p().optional()}),FU=w({type:$("string"),title:p().optional(),description:p().optional(),enum:A(p()),enumNames:A(p()).optional(),default:p().optional()}),BU=V([UU,qU]),HU=w({type:$("array"),title:p().optional(),description:p().optional(),minItems:P().optional(),maxItems:P().optional(),items:w({type:$("string"),enum:A(p())}),default:A(p()).optional()}),VU=w({type:$("array"),title:p().optional(),description:p().optional(),minItems:P().optional(),maxItems:P().optional(),items:w({anyOf:A(w({const:p(),title:p()}))}),default:A(p()).optional()}),ZU=V([HU,VU]),GU=V([FU,BU,ZU]),KU=V([GU,DU,LU,jU]),YU=of.extend({mode:$("form").optional(),message:p(),requestedSchema:w({type:$("object"),properties:H(p(),KU),required:A(p()).optional()}).catchall(Q())}),JU=of.extend({mode:$("url"),message:p(),elicitationId:p(),url:p().url()}),XU=V([YU,JU]),WU=Mt.extend({method:$("elicitation/create"),params:XU}),QU=Si.extend({elicitationId:p()}),e4=Wn.extend({method:$("notifications/elicitation/complete"),params:QU}),t4=Dt.extend({action:ue(["accept","decline","cancel"]),content:Ui(t=>t===null?void 0:t,H(p(),V([p(),P(),q(),A(p())])).optional())}),n4=w({type:$("ref/resource"),uri:p()}),i4=w({type:$("ref/prompt"),name:p()}),r4=Rn.extend({ref:V([i4,n4]),argument:w({name:p(),value:p()}),context:w({arguments:H(p(),p()).optional()}).optional()}),o4=Mt.extend({method:$("completion/complete"),params:r4}),a4=Dt.extend({completion:ee({values:A(p()).max(100),total:Y(P().int()),hasMore:Y(q())})}),s4=w({uri:p().startsWith("file://"),name:p().optional(),_meta:H(p(),Q()).optional()}),l4=Mt.extend({method:$("roots/list"),params:Rn.optional()}),c4=Dt.extend({roots:A(s4)}),u4=Wn.extend({method:$("notifications/roots/list_changed"),params:Si.optional()}),g8=ee({ttl:P().optional(),pollInterval:P().optional()}),d4=ue(["working","input_required","completed","failed","cancelled"]),Jc=w({taskId:p(),status:d4,ttl:V([P(),bi()]),createdAt:p(),lastUpdatedAt:p(),pollInterval:Y(P()),statusMessage:Y(p())}),v8=Dt.extend({task:Jc}),h4=Si.merge(Jc),b8=Wn.extend({method:$("notifications/tasks/status"),params:h4}),y8=Mt.extend({method:$("tasks/get"),params:Rn.extend({taskId:p()})}),S8=Dt.merge(Jc),_8=Mt.extend({method:$("tasks/result"),params:Rn.extend({taskId:p()})}),w8=Dt.loose(),x8=Gc.extend({method:$("tasks/list")}),z8=Kc.extend({tasks:A(Jc)}),T8=Mt.extend({method:$("tasks/cancel"),params:Rn.extend({taskId:p()})}),A8=Dt.merge(Jc),E8=V([pk,Cj,Oj,o4,zU,dU,lU,Uj,Fj,Vj,Yj,Xj,Qj,_U,bU]),$8=V([hk,mk,Pj,u4]),k8=V([af,NU,MU,t4,c4]),R8=V([pk,OU,WU,l4]),C8=V([hk,mk,AU,oU,Gj,wU,mU,tU,e4]),I8=V([af,Ij,Nj,a4,pU,cU,qj,Bj,Zj,lf,yU,iU]),un=va().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:yh.custom,message:"URL must be parseable",fatal:!0}),ds}).refine(t=>{let e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),P8=ee({resource:p().url(),authorization_servers:A(un).optional(),jwks_uri:p().url().optional(),scopes_supported:A(p()).optional(),bearer_methods_supported:A(p()).optional(),resource_signing_alg_values_supported:A(p()).optional(),resource_name:p().optional(),resource_documentation:p().optional(),resource_policy_uri:p().url().optional(),resource_tos_uri:p().url().optional(),tls_client_certificate_bound_access_tokens:q().optional(),authorization_details_types_supported:A(p()).optional(),dpop_signing_alg_values_supported:A(p()).optional(),dpop_bound_access_tokens_required:q().optional()}),f4=ee({issuer:p(),authorization_endpoint:un,token_endpoint:un,registration_endpoint:un.optional(),scopes_supported:A(p()).optional(),response_types_supported:A(p()),response_modes_supported:A(p()).optional(),grant_types_supported:A(p()).optional(),token_endpoint_auth_methods_supported:A(p()).optional(),token_endpoint_auth_signing_alg_values_supported:A(p()).optional(),service_documentation:un.optional(),revocation_endpoint:un.optional(),revocation_endpoint_auth_methods_supported:A(p()).optional(),revocation_endpoint_auth_signing_alg_values_supported:A(p()).optional(),introspection_endpoint:p().optional(),introspection_endpoint_auth_methods_supported:A(p()).optional(),introspection_endpoint_auth_signing_alg_values_supported:A(p()).optional(),code_challenge_methods_supported:A(p()).optional(),client_id_metadata_document_supported:q().optional(),authorization_response_iss_parameter_supported:q().optional().catch(void 0)}),p4=ee({issuer:p(),authorization_endpoint:un,token_endpoint:un,userinfo_endpoint:un.optional(),jwks_uri:un,registration_endpoint:un.optional(),scopes_supported:A(p()).optional(),response_types_supported:A(p()),response_modes_supported:A(p()).optional(),grant_types_supported:A(p()).optional(),acr_values_supported:A(p()).optional(),subject_types_supported:A(p()),id_token_signing_alg_values_supported:A(p()),id_token_encryption_alg_values_supported:A(p()).optional(),id_token_encryption_enc_values_supported:A(p()).optional(),userinfo_signing_alg_values_supported:A(p()).optional(),userinfo_encryption_alg_values_supported:A(p()).optional(),userinfo_encryption_enc_values_supported:A(p()).optional(),request_object_signing_alg_values_supported:A(p()).optional(),request_object_encryption_alg_values_supported:A(p()).optional(),request_object_encryption_enc_values_supported:A(p()).optional(),token_endpoint_auth_methods_supported:A(p()).optional(),token_endpoint_auth_signing_alg_values_supported:A(p()).optional(),display_values_supported:A(p()).optional(),claim_types_supported:A(p()).optional(),claims_supported:A(p()).optional(),service_documentation:p().optional(),claims_locales_supported:A(p()).optional(),ui_locales_supported:A(p()).optional(),claims_parameter_supported:q().optional(),request_parameter_supported:q().optional(),request_uri_parameter_supported:q().optional(),require_request_uri_registration:q().optional(),op_policy_uri:un.optional(),op_tos_uri:un.optional(),client_id_metadata_document_supported:q().optional(),authorization_response_iss_parameter_supported:q().optional().catch(void 0)}),O8=w({...p4.shape,...f4.pick({code_challenge_methods_supported:!0}).shape}),N8=w({access_token:p(),id_token:p().optional(),token_type:p(),expires_in:As.number().optional(),scope:p().optional(),refresh_token:p().optional()}).strip(),M8=w({issued_token_type:$("urn:ietf:params:oauth:token-type:id-jag"),access_token:p(),token_type:p().optional(),expires_in:P().optional(),scope:p().optional()}).strip(),D8=w({error:p(),error_description:p().optional(),error_uri:p().optional()}),wj=un.optional().or($("").transform(()=>{})),m4=w({redirect_uris:A(un),token_endpoint_auth_method:p().optional(),grant_types:A(p()).optional(),response_types:A(p()).optional(),application_type:p().optional(),client_name:p().optional(),client_uri:un.optional(),logo_uri:wj,scope:p().optional(),contacts:A(p()).optional(),tos_uri:wj,policy_uri:p().optional(),jwks_uri:un.optional(),jwks:Rc().optional(),software_id:p().optional(),software_version:p().optional(),software_statement:p().optional()}).strip(),g4=w({client_id:p(),client_secret:p().optional(),client_id_issued_at:P().optional(),client_secret_expires_at:P().optional()}).strip(),L8=m4.merge(g4),j8=w({error:p(),error_description:p().optional()}).strip(),U8=w({token:p(),token_type_hint:p().optional()}).strip();var xk=class{_eventSlots=new Map;setHandler(e,n){let r=this._ensureEventSlot(e);r.onHandler&&n&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),r.onHandler=n}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,n){this._ensureEventSlot(e).listeners.push(n)}removeEventListener(e,n){let r=this._eventSlots.get(e);if(!r)return;let i=r.listeners.indexOf(n);i!==-1&&r.listeners.splice(i,1)}dispatch(e,n){let r=this._eventSlots.get(e);if(r){r.onHandler?.(n);for(let i of[...r.listeners])i(n)}}_ensureEventSlot(e){let n=this._eventSlots.get(e);return n||(n={listeners:[]},this._eventSlots.set(e,n)),n}},zk=class{_methods=new Set;claim(e,n){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${n}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},v4=new Set;function b4(t,e){let[n,r]=e,i=n?.shape;if(typeof i?.method?.value!="string")return;let o=i.method.value,a=t==="request"?"setRequestHandler":"setNotificationHandler";v4.has(a)||(v4.add(a),console.warn(`[ext-apps] ${a}(Schema, handler) is deprecated; use ${a}("${o}", { params: Schema.shape.params }, handler).`));let s=r;return[o,{params:i.params},t==="request"?(l,c)=>s({method:o,params:l},q8(c)):l=>s({method:o,params:l})]}function q8(t){return{signal:t.mcpReq.signal,requestId:t.mcpReq.id,sessionId:t.sessionId,_meta:t.mcpReq._meta,sendRequest:t.mcpReq.send,sendNotification:t.mcpReq.notify,authInfo:t.http?.authInfo}}var F8="2026-01-26";var B8="ui/notifications/tool-input-partial";var cf=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,n){this.eventTarget=e,this.eventSource=n,this.messageListener=r=>{if(n&&r.source!==this.eventSource){console.debug("Ignoring message from unknown source",r);return}let i=dk.safeParse(r.data);i.success?(console.debug("Parsed message",i.data),this.onmessage?.(i.data)):r.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",i.error.message,r):(console.error("Failed to parse message",i.error.message,r),this.onerror?.(Error("Invalid JSON-RPC message received: "+i.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,n){e.method!==B8&&console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},H8=z.union([z.literal("light"),z.literal("dark")]).describe("Color theme preference for the host environment."),uf=z.union([z.literal("inline"),z.literal("fullscreen"),z.literal("pip")]).describe("Display mode for UI presentation."),V8=z.union([z.literal("--color-background-primary"),z.literal("--color-background-secondary"),z.literal("--color-background-tertiary"),z.literal("--color-background-inverse"),z.literal("--color-background-ghost"),z.literal("--color-background-info"),z.literal("--color-background-danger"),z.literal("--color-background-success"),z.literal("--color-background-warning"),z.literal("--color-background-disabled"),z.literal("--color-text-primary"),z.literal("--color-text-secondary"),z.literal("--color-text-tertiary"),z.literal("--color-text-inverse"),z.literal("--color-text-ghost"),z.literal("--color-text-info"),z.literal("--color-text-danger"),z.literal("--color-text-success"),z.literal("--color-text-warning"),z.literal("--color-text-disabled"),z.literal("--color-border-primary"),z.literal("--color-border-secondary"),z.literal("--color-border-tertiary"),z.literal("--color-border-inverse"),z.literal("--color-border-ghost"),z.literal("--color-border-info"),z.literal("--color-border-danger"),z.literal("--color-border-success"),z.literal("--color-border-warning"),z.literal("--color-border-disabled"),z.literal("--color-ring-primary"),z.literal("--color-ring-secondary"),z.literal("--color-ring-inverse"),z.literal("--color-ring-info"),z.literal("--color-ring-danger"),z.literal("--color-ring-success"),z.literal("--color-ring-warning"),z.literal("--font-sans"),z.literal("--font-mono"),z.literal("--font-weight-normal"),z.literal("--font-weight-medium"),z.literal("--font-weight-semibold"),z.literal("--font-weight-bold"),z.literal("--font-text-xs-size"),z.literal("--font-text-sm-size"),z.literal("--font-text-md-size"),z.literal("--font-text-lg-size"),z.literal("--font-heading-xs-size"),z.literal("--font-heading-sm-size"),z.literal("--font-heading-md-size"),z.literal("--font-heading-lg-size"),z.literal("--font-heading-xl-size"),z.literal("--font-heading-2xl-size"),z.literal("--font-heading-3xl-size"),z.literal("--font-text-xs-line-height"),z.literal("--font-text-sm-line-height"),z.literal("--font-text-md-line-height"),z.literal("--font-text-lg-line-height"),z.literal("--font-heading-xs-line-height"),z.literal("--font-heading-sm-line-height"),z.literal("--font-heading-md-line-height"),z.literal("--font-heading-lg-line-height"),z.literal("--font-heading-xl-line-height"),z.literal("--font-heading-2xl-line-height"),z.literal("--font-heading-3xl-line-height"),z.literal("--border-radius-xs"),z.literal("--border-radius-sm"),z.literal("--border-radius-md"),z.literal("--border-radius-lg"),z.literal("--border-radius-xl"),z.literal("--border-radius-full"),z.literal("--border-width-regular"),z.literal("--shadow-hairline"),z.literal("--shadow-sm"),z.literal("--shadow-md"),z.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),Z8=z.record(V8.describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),z.union([z.string(),z.undefined()]).describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.

Individual style keys are optional - hosts may provide any subset of these values.
Values are strings containing CSS values (colors, sizes, font stacks, etc.).

Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Tee=z.object({method:z.literal("ui/open-link"),params:z.object({url:z.string().describe("URL to open in the host's browser")})}),G8=z.object({isError:z.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),K8=z.object({isError:z.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),Y8=z.object({isError:z.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough(),Aee=z.object({method:z.literal("ui/notifications/sandbox-proxy-ready"),params:z.object({})}),Tk=z.object({connectDomains:z.array(z.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).

- Maps to CSP \`connect-src\` directive
- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:z.array(z.string()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:z.array(z.string()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:z.array(z.string()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted \u2192 only same origin allowed (`base-uri 'self'`)")}),Ak=z.object({camera:z.object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:z.object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:z.object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:z.object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")}),Eee=z.object({method:z.literal("ui/notifications/size-changed"),params:z.object({width:z.number().optional().describe("New width in pixels."),height:z.number().optional().describe("New height in pixels.")})}),J8=z.object({method:z.literal("ui/notifications/tool-input"),params:z.object({arguments:z.record(z.string(),z.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),X8=z.object({method:z.literal("ui/notifications/tool-input-partial"),params:z.object({arguments:z.record(z.string(),z.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),W8=z.object({method:z.literal("ui/notifications/tool-cancelled"),params:z.object({reason:z.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),Q8=z.object({fonts:z.string().optional()}),eK=z.object({variables:Z8.optional().describe("CSS variables for theming the app."),css:Q8.optional().describe("CSS blocks that apps can inject.")}),tK=z.object({method:z.literal("ui/resource-teardown"),params:z.object({})}),nK=z.record(z.string(),z.unknown()),y4=z.object({text:z.object({}).optional().describe("Host supports text content blocks."),image:z.object({}).optional().describe("Host supports image content blocks."),audio:z.object({}).optional().describe("Host supports audio content blocks."),resource:z.object({}).optional().describe("Host supports resource content blocks."),resourceLink:z.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:z.object({}).optional().describe("Host supports structured content.")}),$ee=z.object({method:z.literal("ui/notifications/request-teardown"),params:z.object({}).optional()}),iK=z.object({experimental:z.record(z.string(),z.record(z.string(),z.any()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),openLinks:z.object({}).optional().describe("Host supports opening external URLs."),downloadFile:z.object({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:z.object({listChanged:z.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:z.object({listChanged:z.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:z.object({}).optional().describe("Host accepts log messages."),sandbox:z.object({permissions:Ak.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Tk.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:y4.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:y4.optional().describe("Host supports receiving content messages (ui/message) from the view."),sampling:z.object({tools:z.object({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),rK=z.object({experimental:z.record(z.string(),z.record(z.string(),z.any()).describe("Experimental features keyed by identifier.")).optional().describe("Experimental features keyed by identifier."),tools:z.object({listChanged:z.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:z.array(uf).optional().describe("Display modes the app supports.")}),kee=z.object({method:z.literal("ui/notifications/initialized"),params:z.object({}).optional()}),Ree=z.object({csp:Tk.optional().describe("Content Security Policy configuration for UI resources."),permissions:Ak.optional().describe("Sandbox permissions requested by the UI resource."),domain:z.string().optional().describe(`Dedicated origin for view sandbox.

Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.

**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)

If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:z.boolean().optional().describe(`Visual boundary preference - true if view prefers a visible border.

Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.

- \`true\`: request visible border + background
- \`false\`: request no visible border + background
- omitted: host decides border`)}),Cee=z.object({method:z.literal("ui/request-display-mode"),params:z.object({mode:uf.describe("The display mode being requested.")})}),oK=z.object({mode:uf.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),aK=z.union([z.literal("model"),z.literal("app")]).describe("Tool visibility scope - who can access the tool."),Iee=z.object({resourceUri:z.string().optional(),visibility:z.array(aK).optional().describe(`Who can access this tool. Default: ["model", "app"]
- "model": Tool visible to and callable by the agent
- "app": Tool callable by the app from this server only`),csp:z.never().optional(),permissions:z.never().optional()}),Pee=z.object({mimeTypes:z.array(z.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Oee=z.object({method:z.literal("ui/download-file"),params:z.object({contents:z.array(z.union([Zy,Gy])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})}),Nee=z.object({method:z.literal("ui/message"),params:z.object({role:z.literal("user").describe('Message role, currently only "user" is supported.'),content:z.array(Ms).describe("Message content blocks (text, image, etc.).")})}),Mee=z.object({method:z.literal("ui/notifications/sandbox-resource-ready"),params:z.object({html:z.string().describe("HTML content to load into the inner iframe."),sandbox:z.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Tk.optional().describe("CSP configuration from resource metadata."),permissions:Ak.optional().describe("Sandbox permissions from resource metadata.")})}),sK=z.object({method:z.literal("ui/notifications/tool-result"),params:lf.describe("Standard MCP tool execution result.")}),w4=z.object({toolInfo:z.object({id:Ea.optional().describe("JSON-RPC id of the tools/call request."),tool:sf.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:H8.optional().describe("Current color theme preference."),styles:eK.optional().describe("Style configuration for theming the app."),displayMode:uf.optional().describe("How the UI is currently displayed."),availableDisplayModes:z.array(uf).optional().describe("Display modes the host supports."),containerDimensions:z.union([z.object({height:z.number().describe("Fixed container height in pixels.")}),z.object({maxHeight:z.union([z.number(),z.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(z.union([z.object({width:z.number().describe("Fixed container width in pixels.")}),z.object({maxWidth:z.union([z.number(),z.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:z.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:z.string().optional().describe("User's timezone in IANA format."),userAgent:z.string().optional().describe("Host application identifier."),platform:z.union([z.literal("web"),z.literal("desktop"),z.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:z.object({touch:z.boolean().optional().describe("Whether the device supports touch input."),hover:z.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:z.object({top:z.number().describe("Top safe area inset in pixels."),right:z.number().describe("Right safe area inset in pixels."),bottom:z.number().describe("Bottom safe area inset in pixels."),left:z.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),lK=z.object({method:z.literal("ui/notifications/host-context-changed"),params:w4.describe("Partial context update containing only changed fields.")}),Dee=z.object({method:z.literal("ui/update-model-context"),params:z.object({content:z.array(Ms).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:z.record(z.string(),z.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})}),Lee=z.object({method:z.literal("ui/initialize"),params:z.object({appInfo:Os.describe("App identification (name and version)."),appCapabilities:rK.describe("Features and capabilities this app provides."),protocolVersion:z.string().describe("Protocol version this app supports.")})}),cK=z.object({protocolVersion:z.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Os.describe("Host application identification and version."),hostCapabilities:iK.describe("Features and capabilities provided by the host."),hostContext:w4.describe("Rich context about the host environment.")}).passthrough(),uK={target:"draft-2020-12"};async function S4(t,e){let n=t["~standard"];if(n.jsonSchema)return n.jsonSchema[e](uK);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function _4(t,e,n=""){let r=await t["~standard"].validate(e);if(r.issues){let i=r.issues.map(o=>{let a=o.path?.map(s=>typeof s=="object"?s.key:s).join(".");return a?`${a}: ${o.message}`:o.message}).join("; ");throw Error(n+i)}return r.value}function x4(t,e=document.documentElement){for(let[n,r]of Object.entries(t))r!==void 0&&e.style.setProperty(n,r)}function dK(t,e){let n={...t,...e};return e.experimental!==void 0&&(n.experimental={...t.experimental,...e.experimental}),e.tools!==void 0&&(n.tools={...t.tools,...e.tools}),n}var Ky=class t extends rk{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new xk;_methods=new zk;setRequestHandler=(...e)=>{let[n,...r]=b4("request",e)??e;this._methods.claim(n,"setRequestHandler"),super.setRequestHandler.call(this,n,...r)};setNotificationHandler=(...e)=>{let[n,...r]=b4("notification",e)??e;this._methods.claim(n,"setNotificationHandler"),super.setNotificationHandler.call(this,n,...r)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...n)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...n)};_assertInitialized(e){if(this._initializedSent)return;let n=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(n);console.warn(`${n}. This will throw in a future release.`)}eventSchemas={toolinput:J8,toolinputpartial:X8,toolresult:sK,toolcancelled:W8,hostcontextchanged:lK};static ONE_SHOT_EVENTS=new Set(["toolinput","toolinputpartial","toolresult","toolcancelled"]);_everHadListener=new Set;_assertHandlerTiming(e){if(!t.ONE_SHOT_EVENTS.has(e)||this._everHadListener.has(e)||(this._everHadListener.add(e),!this._initializedSent))return;let n=`[ext-apps] "${String(e)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,n){n&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,n)}addEventListener(e,n){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,n)}removeEventListener(e,n){this._events.removeEventListener(e,n)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(n.shape.method.value,{params:n.shape.params},r=>{let i=r;e==="hostcontextchanged"&&(this._hostContext={...this._hostContext,...i}),this._events.dispatch(e,i)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,n,r){n&&r&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,n={},r={autoResize:!0}){super(r),this._appInfo=e,this._appCapabilities=n,this.options=r,this._methods.replace("notifications/cancelled"),this._methods.replace("notifications/progress"),!r.allowUnsafeEval&&z.config({jitless:!0}),this.replaceRequestHandler("ping",i=>(console.log("Received ping:",i.params),{})),this.setEventHandler("hostcontextchanged",void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error("Cannot register capabilities after transport is established");this._appCapabilities=dK(this._appCapabilities,e)}registerTool(e,n,r){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let i=this,o=()=>{i._initializedSent&&i._appCapabilities.tools?.listChanged&&i.sendToolListChanged()},a=n.inputSchema!==void 0,s={title:n.title,description:n.description,inputSchema:n.inputSchema,outputSchema:n.outputSchema,annotations:n.annotations,_meta:n._meta,enabled:!0,enable(){this.enabled=!0,o()},disable(){this.enabled=!1,o()},update(l){Object.assign(this,l),o()},remove(){i._registeredTools[e]===s&&(delete i._registeredTools[e],o())},handler:async(l,c)=>{if(!s.enabled)throw Error(`Tool ${e} is disabled`);let u;if(a){let d=s.inputSchema,h=d?await _4(d,l??{},`Invalid input for tool ${e}: `):l??{};u=await r(h,c)}else u=await r(c);return s.outputSchema&&!u.isError&&(u.structuredContent=await _4(s.outputSchema,u.structuredContent,`Invalid output for tool ${e}: `)),u}};return this._registeredTools[e]=s,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),o(),s}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,n)=>{let r=this._registeredTools[e.name];if(!r)throw Error(`Tool ${e.name} not found`);return r.handler(e.arguments,n)},this.onlisttools=async(e,n)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([r,i])=>i.enabled).map(async([r,i])=>{let o={name:r,title:i.title,description:i.description,inputSchema:i.inputSchema?await S4(i.inputSchema,"input"):{type:"object",properties:{}}};return i.outputSchema&&(o.outputSchema=await S4(i.outputSchema,"output")),i.annotations&&(o.annotations=i.annotations),i._meta&&(o._meta=i._meta),o}))}))}async sendToolListChanged(e={}){this._assertInitialized("sendToolListChanged"),await this.notification({method:"notifications/tools/list_changed",params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler("toolinput")}set ontoolinput(e){this.setEventHandler("toolinput",e)}get ontoolinputpartial(){return this.getEventHandler("toolinputpartial")}set ontoolinputpartial(e){this.setEventHandler("toolinputpartial",e)}get ontoolresult(){return this.getEventHandler("toolresult")}set ontoolresult(e){this.setEventHandler("toolresult",e)}get ontoolcancelled(){return this.getEventHandler("toolcancelled")}set ontoolcancelled(e){this.setEventHandler("toolcancelled",e)}get onhostcontextchanged(){return this.getEventHandler("hostcontextchanged")}set onhostcontextchanged(e){this.setEventHandler("hostcontextchanged",e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced("onteardown",this._onteardown,e),this._onteardown=e,this.replaceRequestHandler("ui/resource-teardown",{params:tK.shape.params,result:nK},(n,r)=>{if(!this._onteardown)throw Error("No onteardown handler set");return this._onteardown(n,r)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced("oncalltool",this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler("tools/call",(n,r)=>{if(!this._oncalltool)throw Error("No oncalltool handler set");return this._oncalltool(n.params,r)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced("onlisttools",this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler("tools/list",(n,r)=>{if(!this._onlisttools)throw Error("No onlisttools handler set");return this._onlisttools(n.params,r)})}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"tools/call":case"tools/list":if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,n){if(this._assertInitialized("callServerTool"),typeof e=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...n})}async readServerResource(e,n){return this._assertInitialized("readServerResource"),await this.request({method:"resources/read",params:e},n)}async listServerResources(e,n){return this._assertInitialized("listServerResources"),await this.request({method:"resources/list",params:e},n)}async createSamplingMessage(e,n){return this._assertInitialized("createSamplingMessage"),await this.request({method:"sampling/createMessage",params:e},n)}sendMessage(e,n){return this._assertInitialized("sendMessage"),this.request({method:"ui/message",params:e},Y8,n)}sendLog(e){return this.notification({method:"notifications/message",params:e})}updateModelContext(e,n){return this._assertInitialized("updateModelContext"),this.request({method:"ui/update-model-context",params:e},af,n)}openLink(e,n){return this._assertInitialized("openLink"),this.request({method:"ui/open-link",params:e},G8,n)}sendOpenLink=this.openLink;downloadFile(e,n){return this._assertInitialized("downloadFile"),this.request({method:"ui/download-file",params:e},K8,n)}requestTeardown(e={}){return this.notification({method:"ui/notifications/request-teardown",params:e})}requestDisplayMode(e,n){return this._assertInitialized("requestDisplayMode"),this.request({method:"ui/request-display-mode",params:e},oK,n)}sendSizeChanged(e){return this.notification({method:"ui/notifications/size-changed",params:e})}setupSizeChangedNotifications(){let e=!1,n=0,r=0,i=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let a=document.documentElement,s=a.style.height;a.style.height="max-content";let l=Math.ceil(a.getBoundingClientRect().height);a.style.height=s;let c=Math.ceil(window.innerWidth);(c!==n||l!==r)&&(n=c,r=l,this.sendSizeChanged({width:c,height:l}))}))};i();let o=new ResizeObserver(i);return o.observe(document.documentElement),o.observe(document.body),()=>o.disconnect()}async connect(e=new cf(window.parent,window.parent),n){if(this.transport)throw Error("App is already connected. Call close() before connecting again.");this._initializedSent=!1;try{await super.connect(e);let r=await this.request({method:"ui/initialize",params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:F8}},cK,n);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);this._hostCapabilities=r.hostCapabilities,this._hostInfo=r.hostInfo,this._hostContext=r.hostContext,await this.notification({method:"ui/notifications/initialized"}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(r){throw this.close(),r}}};var gt={name:"pdf",version:"0.2.1",title:{en:"PDF","zh-CN":"PDF"},kinds:["pdf"]};var z4=gt.version,T4=gt.name,Zee=gt.name,Gee=`ui://${gt.name}/panel.html`,Ek=`ui://${gt.name}/assets/`,A4=`ui://${gt.name}/file/`;var ur=gt.kinds,hf=100*1024*1024,Kee=512*1024*1024,$k=4*1024*1024,Yee=24*1024,df=class extends Error{constructor(n,r){super(r);this.code=n;this.name="OfficeError"}};function ff(t){let e=t.toLowerCase().match(/\.([a-z]+)$/)?.[1];return ur.includes(e??"")?e:null}var hK={en:{sep:", ",and:" and ",or:" or "},"zh-CN":{sep:"\u3001",and:"\u548C",or:"\u6216"}};function qi(t,e="en",n="and"){let r=hK[e];if(t.length<2)return t.join("");let i=t[t.length-1],o=e==="zh-CN"&&/^[\x20-\x7e]/.test(i)?` ${r[n]} `:r[n];return`${t.slice(0,-1).join(r.sep)}${o}${i}`}function Ds(t="en",e="and"){return qi(ur.map(n=>`.${n}`),t,e)}var Pr=(t,e)=>new df("invalid_anchor",`Cannot read location "${t}". ${e}`),Or={docx:"Use p:N, p:N-M, t:N or t:N/rRcC.",pptx:"Use slide:N, slide:N-M or slide:N/shape:ID.",pdf:"Use page:N or page:N-M.",xlsx:"Use Sheet, Sheet!A1 or Sheet!A1:C9 (quote names with spaces: 'My sheet'!A1)."};function kk(t,e,n){if(!e)throw Pr(t,Or[n]);let r=Number(e[1]),i=e[2]===void 0?r:Number(e[2]);if(!(r>=1)||!(i>=r)||i>1e6)throw Pr(t,Or[n]);return{from:r,to:i}}function E4(t){let e=/^\$?([A-Za-z]{1,3})\$?(\d{1,7})$/.exec(t);if(!e)return null;let n=0;for(let i of e[1].toUpperCase())n=n*26+(i.charCodeAt(0)-64);let r=Number(e[2]);return r<1||r>1048576||n>16384?null:{row:r,col:n}}function fK(t){let e,n;if(t.startsWith("'")){let s=1;for(e="";s<t.length;s++)if(t[s]==="'")if(t[s+1]==="'")e+="'",s++;else break;else e+=t[s];if(s>=t.length||(n=t.slice(s+1),n&&!n.startsWith("!")))throw Pr(t,Or.xlsx);n=n.slice(1)}else{let s=t.lastIndexOf("!");e=s<0?t:t.slice(0,s),n=s<0?"":t.slice(s+1)}if(!e||e.length>64)throw Pr(t,Or.xlsx);if(!n)return{kind:"xlsx",sheet:e};let[r,i=r]=n.split(":"),o=E4(r),a=E4(i);if(!o||!a)throw Pr(t,Or.xlsx);return{kind:"xlsx",sheet:e,range:{start:{row:Math.min(o.row,a.row),col:Math.min(o.col,a.col)},end:{row:Math.max(o.row,a.row),col:Math.max(o.col,a.col)}}}}function Yy(t,e){let n=e.trim();if(!n||n.length>300)throw Pr(e,Or[t]);switch(t){case"docx":{let r=/^t:(\d+)(?:\/r(\d+)c(\d+))?$/i.exec(n);if(r){let i=Number(r[1]);if(i<1)throw Pr(n,Or.docx);if(r[2]===void 0)return{kind:t,type:"table",table:i};let o={row:Number(r[2]),col:Number(r[3])};if(o.row<1||o.col<1)throw Pr(n,Or.docx);return{kind:t,type:"table",table:i,cell:o}}return{kind:t,type:"paragraph",...kk(n,/^p:(\d+)(?:-(?:p:)?(\d+))?$/i.exec(n),t)}}case"pptx":{let r=/^slide:(\d+)\/shape:([\w-]{1,32})$/i.exec(n);if(r){let i=Number(r[1]);if(i<1)throw Pr(n,Or.pptx);return{kind:t,from:i,to:i,shape:r[2]}}return{kind:t,...kk(n,/^slide:(\d+)(?:-(?:slide:)?(\d+))?$/i.exec(n),t)}}case"pdf":return{kind:t,...kk(n,/^page:(\d+)(?:-(?:page:)?(\d+))?$/i.exec(n),t)};case"xlsx":return fK(n)}}function $4(t){let e=/^(.*?\.(?:docx|xlsx|pptx|pdf))(?:#(.*))?$/i.exec(t.trim());if(!e)throw new df("invalid_anchor",`"${t}" is not a document anchor. Use <path>.docx|.xlsx|.pptx|.pdf optionally followed by #<location>.`);return{path:e[1],at:e[2]?.trim()?e[2].trim():null}}function pf(t,e){return e?`${t}#${e}`:t}var k4=t=>t>=55296&&t<=56319,R4=t=>t>=56320&&t<=57343;function C4(t,e,n=t.length){let r=Math.max(0,Math.min(e,t.length)),i=Math.max(r,Math.min(n,t.length));return r>0&&R4(t.charCodeAt(r))&&k4(t.charCodeAt(r-1))&&r--,i<t.length&&R4(t.charCodeAt(i))&&k4(t.charCodeAt(i-1))&&i--,t.slice(r,i)}var pK=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g,Xy=t=>t.replace(pK,"\uFFFD");function Jy(t){return typeof t=="string"?Xy(t):Array.isArray(t)?t.map(e=>Jy(e)):t&&typeof t=="object"&&Object.getPrototypeOf(t)===Object.prototype?Object.fromEntries(Object.entries(t).map(([e,n])=>[e,Jy(n)])):t}var I4=`${gt.name}:windows:v1`,mK=128;function P4(t){try{let e=JSON.parse(t.getItem(I4)??"{}");return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}catch{return{}}}function Rk(t,e){let n=P4(t)[e];return!n||typeof n!="object"?{}:{...typeof n.path=="string"?{path:n.path}:{},...Array.isArray(n.recent)?{recent:n.recent.filter(r=>typeof r?.path=="string"&&ff(r.path)===r.kind)}:{}}}function O4(t,e,n){try{let r=P4(t),i={...Rk(t,e),...n};delete r[e],r[e]=i;for(let o of Object.keys(r).slice(0,-mK))delete r[o];t.setItem(I4,JSON.stringify(r))}catch{}}var Xc=t=>t.filter(([e])=>ur.includes(e)).map(([,e])=>e),gK={docx:"Word",xlsx:"Excel",pptx:"PowerPoint",pdf:"PDF"},N4=ur.filter(t=>t!=="pdf"),M4=[...N4.length===3?["Office"]:N4.map(t=>gK[t]),...ur.includes("pdf")?["PDF"]:[]],mf=gt.title.en,ote=(()=>{let t=qi(M4,"en","or");return`${/^[AEIOU]/.test(t)?"an":"a"} ${t} file`})(),ate=`${qi(M4)} files`,ste=Ds("en","or"),lte=Xc([["docx","report.docx#p:12"],["xlsx","model.xlsx#Revenue!B2:F9"],["pptx","deck.pptx#slide:3"],["pdf","paper.pdf#page:5"]]).join(", "),cte=Xc([["docx","p:12"],["pptx","slide:3"],["pdf","page:5"],["xlsx","Revenue!B2:F9"]]).join(", "),ute=Xc([["docx","Word paragraphs and tables (markdown)"],["xlsx","spreadsheet cells as a grid with formulas"],["pptx","slides with their shapes and speaker notes"],["pdf","PDF page text"]]).join(", "),dte=qi(Xc([["docx","paragraph"],["xlsx","cell range"],["pptx","slide"],["pptx","shape"],["pdf","page"]]),"en","or"),hte=qi(Xc([["pdf","PDF pages"],["docx","long paragraphs"]]))||"long passages",D4=qi(Xc([["pptx","deck.pptx#slide:3"],["pdf","paper.pdf#page:2"],["docx","report.docx#p:12"],["xlsx","model.xlsx#Revenue!A1:H30"]]),"en","or");var L4=[{name:"capture_view",title:`Capture ${mf} view`,description:`Take a picture of a rendered document location in the ${mf} panel so you can see layout, charts, images and formatting that text extraction misses. Pass an anchor such as ${D4} (the document must be open in the panel; call open_document first), or omit it to capture what the user currently sees.`,inputSchema:{type:"object",properties:{anchor:{type:"string",maxLength:1200,description:"Location to capture; defaults to the visible view."},maxWidth:{type:"integer",minimum:320,maximum:2e3,description:"Maximum image width in pixels (default 1600)."}},additionalProperties:!1},annotations:{readOnlyHint:!0,idempotentHint:!0}}];function vK(){let t=crypto.randomUUID(),e=()=>n.getHostCapabilities()?.experimental?.["zcode/surface"]?.stateKey??t,n=new Ky({name:T4,version:z4},{tools:{listChanged:!0},availableDisplayModes:["inline","fullscreen"]},{autoResize:!1}),r=[],i=new Map,o=new Set,a,s=c=>void window.dispatchEvent(new Event(`office:${c}`));return n.ontoolresult=c=>{r.push(c),r.length>20&&r.shift(),s("toolresult")},n.onhostcontextchanged=()=>s("hostchange"),n.onlisttools=async()=>({tools:L4}),n.oncalltool=async(c,u)=>{if(!L4.some(d=>d.name===c.name))return{isError:!0,content:[{type:"text",text:`The ${mf} page has no tool ${c.name}.`}]};try{let d=Date.now()+2e4;for(;!i.has(c.name)&&Date.now()<d;)await new Promise(m=>{let g=()=>(o.delete(g),m());o.add(g),setTimeout(g,500)});let h=i.get(c.name);if(!h)throw new Error(`The ${mf} panel is still loading; try again in a moment.`);let f=u;return await h(c.arguments??{},f.mcpReq?.signal??f.signal)}catch(d){return{isError:!0,content:[{type:"text",text:d instanceof Error?d.message:String(d)}]}}},window.addEventListener("pagehide",()=>{n.callServerTool({name:"release_view",arguments:{viewId:e()}}).catch(()=>{})}),{app:n,get viewId(){return e()},ready:()=>a??=n.connect(new cf(window.parent,window.parent)).then(()=>s("hostchange")),readWindow(){let c=n.getHostCapabilities()?.experimental?.["zcode/surface"];if(!c?.stateKey)return{};try{return Rk(localStorage,c.stateKey)}catch{return{}}},saveWindow(c){let u=n.getHostCapabilities()?.experimental?.["zcode/surface"];if(u?.stateKey)try{O4(localStorage,u.stateKey,c)}catch{}},readDocument(){return this.readWindow().path??null},saveDocument(c){this.saveWindow({path:c})},takeResults:()=>r.splice(0,r.length),handleTool(c,u){i.set(c,u);for(let d of o)d()},get context(){return n.getHostContext()},get capabilities(){return n.getHostCapabilities()}}}function Fi(){return window.__officeHost??=vK()}async function Ik(t){let e=Fi();await e.ready();let r=(await e.app.readServerResource({uri:t})).contents[0];if(!r)throw new Error(`Empty resource ${t}`);return r}async function Wy(t){let e=await Ik(Ek+t);if(typeof e.text!="string")throw new Error(`Asset ${t} is not text`);return e.text}function j4(t){let e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}var Ck=new Map;function gf(t){let e=Ck.get(t);return e||(e=Ik(Ek+t).then(n=>{if(typeof n.blob!="string")throw new Error(`Asset ${t} is not binary`);return j4(n.blob)}),e.catch(()=>Ck.delete(t)),Ck.set(t,e)),e}async function U4(t,e){let n=new Uint8Array(t.bytes),r=0;for(let i=0;i<t.chunks;i++){e?.throwIfAborted();let o=await Ik(`${A4}${t.token}/${i}`);if(typeof o.blob!="string")throw new Error("File chunk is not binary");let a=j4(o.blob);n.set(a,r),r+=a.byteLength}if(r!==t.bytes)throw new Error("The file changed while it was loading; reload it.");return n.buffer}var Qy=lt(oi(),1);var vf=class extends Error{constructor(n,r){super(n);this.code=r;this.name="CallError"}};async function Nr(t,e={}){let n=Fi();await n.ready();let r=await n.app.callServerTool({name:t,arguments:e}),i=r.structuredContent,o=i?.error;if(r.isError||o){let a=r.content?.[0]?.text;throw new vf(o?.message??a??`${t} failed`,o?.code)}return i}var Ls=t=>t.slice(t.lastIndexOf("/")+1),q4=t=>{let e=t.lastIndexOf("/");return e>0?t.slice(0,e):""};async function F4(t){let{id:e}=await Nr("begin_file_import",{name:t.name,size:t.size});try{for(let r=0;r<t.size;r+=$k){let i=await new Promise((o,a)=>{let s=new FileReader;s.onload=()=>o(String(s.result).split(",")[1]),s.onerror=()=>a(s.error),s.readAsDataURL(t.slice(r,r+$k))});await Nr("write_file_import",{id:e,offset:r,data:i})}return(await Nr("finish_file_import",{id:e})).path}catch(n){throw await Nr("cancel_file_import",{id:e}).catch(()=>{}),n}}var eS=(t,e)=>t.length>e?`${C4(t,0,e-1)}\u2026`:t;function Pk(){return Fi().readWindow().recent??[]}function B4(t){Fi().saveWindow({recent:t})}function bf(t,e,n){let r=e instanceof vf?e.code:e?.name==="PasswordException"?"password":void 0,[i,o]=r&&t.errors[r]||t.errors.generic,a=e instanceof Error?e.message:String(e);return{path:n,title:i,detail:o||a}}function H4(){let[,t]=(0,Qy.useState)(0);return(0,Qy.useEffect)(()=>{let e=()=>t(n=>n+1);return window.addEventListener("office:hostchange",e),()=>window.removeEventListener("office:hostchange",e)},[]),Fi().context}var bK={docx:"Word",xlsx:"Excel",pptx:"PowerPoint",pdf:"PDF"},Z4=ur.map(t=>bK[t]),Wc=t=>ur.includes(t),V4=Wc("docx")||Wc("pdf"),G4={en:`any ${qi([...V4?["passage"]:[],...Wc("xlsx")?["cell"]:[],...Wc("pptx")?["slide"]:[]],"en","or")}`,zh:qi([...V4?["\u6BB5\u843D"]:[],...Wc("xlsx")?["\u5355\u5143\u683C"]:[],...Wc("pptx")?["\u5E7B\u706F\u7247"]:[]],"zh-CN","or")},Ok=gt.title["zh-CN"].replace(/[\x20-\x7e]$/,"$& "),yK={title:gt.title.en,openTitle:"Open a document",openFile:"Open file",emptyTitle:`Open your ${qi(Z4)} file`,emptyDescription:`Read alongside your conversation and discuss ${G4.en}.`,emptyCaption:`Choose a local file \xB7 ${Ds("en","or")}`,importing:"Importing\u2026",importTooLarge:`Choose a file no larger than ${hf/1024/1024} MiB.`,recent:"Recent",switchDocument:"Switch document",pagesAndOutline:"Pages and outline",outlineOnly:"Outline",pages:"Pages",slides:"Slides",outline:"Outline",find:"Find",findPlaceholder:"Find in document",findCount:(t,e)=>`${t} of ${e}`,noResults:"No results",previousMatch:"Previous match (\u21E7Enter)",nextMatch:"Next match (Enter)",closeFind:"Close (Esc)",more:"More",fitWidth:"Fit width",fitPage:"Fit page",actualSize:"Actual size",reload:"Reload from disk",previousPage:"Previous page",nextPage:"Next page",pageNumber:"Page number",ofPages:t=>`of ${t}`,zoomIn:"Zoom in (\u2318+)",zoomOut:"Zoom out (\u2318\u2212)",fit:"Fit",addToChat:"Add to chat",addShort:"Add",addToChatHint:"Attach this to your next message (\u2318/Ctrl+Enter)",added:"Added to chat",ask:"Ask",askPlaceholder:"Ask about this\u2026",send:"Send",cancel:"Cancel",sendKey:"send",cancelKey:"cancel",copy:"Copy",copied:"Copied",agent:"Agent",agentOf:(t,e)=>`Agent \xB7 ${t} of ${e}`,nextTarget:"Next",moreOn:(t,e)=>t===1?`1 more on ${e}`:`${t} more`,close:"Close",changed:"This file changed on disk.",reloadShort:"Reload",dismiss:"Dismiss",openAnother:"Open another file",sidePanel:"Open in side panel",meta:{pdf:t=>t===1?"1 page":`${t} pages`,pptx:t=>t===1?"1 slide":`${t} slides`,xlsx:t=>t===1?"1 sheet":`${t} sheets`,docx:t=>""},errors:{generic:["Couldn\u2019t open this document",""],password:["This PDF is password protected",`${gt.title.en} can\u2019t open encrypted files yet.`],not_found:["This file no longer exists","It may have been moved or deleted."],file_too_large:["This file is too large to open",""],corrupt_file:["This file appears to be damaged",`${gt.title.en} couldn\u2019t read its contents.`],unsupported_type:["This kind of file isn\u2019t supported",`${gt.title.en} opens ${Ds()} files.`],path_outside_workspace:["This file is outside the workspace",""]},sendFailed:"The message was not sent.",contextFailed:"ZCode did not accept the reference.",where:{page:t=>`Page ${t}`,pages:(t,e)=>`Pages ${t}\u2013${e}`,pageLower:t=>`page ${t}`,slide:t=>`Slide ${t}`,slides:(t,e)=>`Slides ${t}\u2013${e}`,slideLower:t=>`slide ${t}`,shape:t=>`Slide ${t} \xB7 Shape`,paragraph:t=>`Paragraph ${t}`,paragraphs:(t,e)=>`Paragraphs ${t}\u2013${e}`,paragraphLower:t=>`paragraph ${t}`,table:t=>`Table ${t}`,cell:(t,e,n)=>`Table ${t} \xB7 R${e}C${n}`}},SK={title:gt.title["zh-CN"],openTitle:"\u6253\u5F00\u6587\u6863",openFile:"\u6253\u5F00\u6587\u4EF6",emptyTitle:`\u6253\u5F00\u4F60\u7684 ${qi(Z4,"zh-CN")} \u6587\u4EF6`,emptyDescription:`\u8FB9\u770B\u8FB9\u804A\uFF0C\u9009\u4E2D${G4.zh}\u5373\u53EF\u5E26\u5165\u5BF9\u8BDD\u3002`,emptyCaption:`\u9009\u62E9\u672C\u5730\u6587\u4EF6 \xB7 ${Ds("zh-CN","or")}`,importing:"\u6B63\u5728\u5BFC\u5165\u2026",importTooLarge:`\u8BF7\u9009\u62E9\u4E0D\u8D85\u8FC7 ${hf/1024/1024} MiB \u7684\u6587\u4EF6\u3002`,recent:"\u6700\u8FD1",switchDocument:"\u5207\u6362\u6587\u6863",pagesAndOutline:"\u9875\u9762\u4E0E\u76EE\u5F55",outlineOnly:"\u76EE\u5F55",pages:"\u9875\u9762",slides:"\u5E7B\u706F\u7247",outline:"\u76EE\u5F55",find:"\u67E5\u627E",findPlaceholder:"\u5728\u6587\u6863\u4E2D\u67E5\u627E",findCount:(t,e)=>`${t} / ${e}`,noResults:"\u65E0\u7ED3\u679C",previousMatch:"\u4E0A\u4E00\u4E2A\uFF08\u21E7Enter\uFF09",nextMatch:"\u4E0B\u4E00\u4E2A\uFF08Enter\uFF09",closeFind:"\u5173\u95ED\uFF08Esc\uFF09",more:"\u66F4\u591A",fitWidth:"\u9002\u5E94\u5BBD\u5EA6",fitPage:"\u9002\u5E94\u9875\u9762",actualSize:"\u5B9E\u9645\u5927\u5C0F",reload:"\u4ECE\u78C1\u76D8\u91CD\u65B0\u52A0\u8F7D",previousPage:"\u4E0A\u4E00\u9875",nextPage:"\u4E0B\u4E00\u9875",pageNumber:"\u9875\u7801",ofPages:t=>`/ ${t}`,zoomIn:"\u653E\u5927\uFF08\u2318+\uFF09",zoomOut:"\u7F29\u5C0F\uFF08\u2318\u2212\uFF09",fit:"\u9002\u5E94",addToChat:"\u6DFB\u52A0\u5230\u5BF9\u8BDD",addShort:"\u6DFB\u52A0",addToChatHint:"\u9644\u52A0\u5230\u4E0B\u4E00\u6761\u6D88\u606F\uFF08\u2318/Ctrl+Enter\uFF09",added:"\u5DF2\u6DFB\u52A0\u5230\u5BF9\u8BDD",ask:"\u63D0\u95EE",askPlaceholder:"\u5C31\u8FD9\u91CC\u63D0\u95EE\u2026",send:"\u53D1\u9001",cancel:"\u53D6\u6D88",sendKey:"\u53D1\u9001",cancelKey:"\u53D6\u6D88",copy:"\u590D\u5236",copied:"\u5DF2\u590D\u5236",agent:"Agent",agentOf:(t,e)=>`Agent \xB7 \u7B2C ${t} \u5904\uFF0C\u5171 ${e} \u5904`,nextTarget:"\u4E0B\u4E00\u5904",moreOn:(t,e)=>t===1?`${e}\u8FD8\u6709 1 \u5904`:`\u8FD8\u6709 ${t} \u5904`,close:"\u5173\u95ED",changed:"\u6587\u4EF6\u5DF2\u5728\u78C1\u76D8\u4E0A\u66F4\u6539\u3002",reloadShort:"\u91CD\u65B0\u52A0\u8F7D",dismiss:"\u5FFD\u7565",openAnother:"\u6253\u5F00\u5176\u4ED6\u6587\u4EF6",sidePanel:"\u5728\u4FA7\u680F\u6253\u5F00",meta:{pdf:t=>`${t} \u9875`,pptx:t=>`${t} \u5F20\u5E7B\u706F\u7247`,xlsx:t=>`${t} \u4E2A\u5DE5\u4F5C\u8868`,docx:()=>""},errors:{generic:["\u65E0\u6CD5\u6253\u5F00\u8BE5\u6587\u6863",""],password:["\u8BE5 PDF \u53D7\u5BC6\u7801\u4FDD\u62A4",`${Ok}\u6682\u4E0D\u652F\u6301\u6253\u5F00\u52A0\u5BC6\u6587\u4EF6\u3002`],not_found:["\u8BE5\u6587\u4EF6\u5DF2\u4E0D\u5B58\u5728","\u5B83\u53EF\u80FD\u5DF2\u88AB\u79FB\u52A8\u6216\u5220\u9664\u3002"],file_too_large:["\u6587\u4EF6\u592A\u5927\uFF0C\u65E0\u6CD5\u6253\u5F00",""],corrupt_file:["\u8BE5\u6587\u4EF6\u4F3C\u4E4E\u5DF2\u635F\u574F",`${Ok}\u65E0\u6CD5\u8BFB\u53D6\u5176\u5185\u5BB9\u3002`],unsupported_type:["\u4E0D\u652F\u6301\u8FD9\u79CD\u6587\u4EF6",`${Ok}\u53EF\u4EE5\u6253\u5F00 ${Ds("zh-CN")} \u6587\u4EF6\u3002`],path_outside_workspace:["\u8BE5\u6587\u4EF6\u4E0D\u5728\u5DE5\u4F5C\u533A\u5185",""]},sendFailed:"\u6D88\u606F\u672A\u53D1\u9001\u3002",contextFailed:"ZCode \u672A\u63A5\u53D7\u8BE5\u5F15\u7528\u3002",where:{page:t=>`\u7B2C ${t} \u9875`,pages:(t,e)=>`\u7B2C ${t}\u2013${e} \u9875`,pageLower:t=>`\u7B2C ${t} \u9875`,slide:t=>`\u7B2C ${t} \u5F20\u5E7B\u706F\u7247`,slides:(t,e)=>`\u7B2C ${t}\u2013${e} \u5F20\u5E7B\u706F\u7247`,slideLower:t=>`\u7B2C ${t} \u5F20\u5E7B\u706F\u7247`,shape:t=>`\u7B2C ${t} \u5F20\u5E7B\u706F\u7247 \xB7 \u5F62\u72B6`,paragraph:t=>`\u7B2C ${t} \u6BB5`,paragraphs:(t,e)=>`\u7B2C ${t}\u2013${e} \u6BB5`,paragraphLower:t=>`\u7B2C ${t} \u6BB5`,table:t=>`\u8868\u683C ${t}`,cell:(t,e,n)=>`\u8868\u683C ${t} \xB7 R${e}C${n}`}},K4=t=>t?.toLowerCase().startsWith("zh")?SK:yK;function tS(t,e,n=!1){let r=e.where,i;if(i=/^page:(\d+)(?:-(\d+))?$/.exec(t))return i[2]?r.pages(i[1],i[2]):n?r.pageLower(i[1]):r.page(i[1]);if(i=/^slide:(\d+)\/shape:/.exec(t))return r.shape(i[1]);if(i=/^slide:(\d+)(?:-(\d+))?$/.exec(t))return i[2]?r.slides(i[1],i[2]):n?r.slideLower(i[1]):r.slide(i[1]);if(i=/^p:(\d+)(?:-(\d+))?$/.exec(t))return i[2]?r.paragraphs(i[1],i[2]):n?r.paragraphLower(i[1]):r.paragraph(i[1]);if(i=/^t:(\d+)\/r(\d+)c(\d+)$/.exec(t))return r.cell(i[1],i[2],i[3]);if(i=/^t:(\d+)$/.exec(t))return r.table(i[1]);let o=t.lastIndexOf("!");return o>0?`${t.slice(0,o).replace(/^'(.*)'$/,"$1").replace(/''/g,"'")} \xB7 ${t.slice(o+1)}`:t.replace(/^'(.*)'$/,"$1")}var Nk=lt(Cn(),1),xK={search:'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',"chevron-up":'<path d="m18 15-6-6-6 6"/>',"chevron-down":'<path d="m6 9 6 6 6-6"/>',minus:'<path d="M5 12h14"/>',plus:'<path d="M5 12h14"/><path d="M12 5v14"/>',ellipsis:'<circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/>',"panel-left":'<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/>',"file-text":'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 9H8"/><path d="M16 13H8"/><path d="M16 17H8"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',"message-square-plus":'<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><path d="M12 7v6"/><path d="M9 10h6"/>',"message-circle-question":'<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/>',check:'<path d="M20 6 9 17l-5-5"/>',"rotate-cw":'<path d="M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/>',"arrow-down":'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',"arrow-up":'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',"folder-open":'<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"/>',"maximize-2":'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>'};function Fe({name:t,size:e=14,className:n}){return(0,Nk.jsx)("svg",{className:`icon${n?` ${n}`:""}`,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",dangerouslySetInnerHTML:{__html:xK[t]}})}var zK={pdf:"PDF",docx:"W",xlsx:"X",pptx:"P"};function W4({kind:t}){return(0,Nk.jsx)("span",{className:`filetype ${t}`,"aria-hidden":"true",children:zK[t]})}var _o=lt(oi(),1);var _e=lt(Cn(),1);function TK({handle:t,page:e,width:n,ratio:r,current:i,onPick:o,root:a}){let s=(0,_o.useRef)(null);return(0,_o.useEffect)(()=>{let l=s.current;if(!l||!t.thumbnail)return;let c=!1,u=new IntersectionObserver(d=>{c||!d.some(h=>h.isIntersecting)||(c=!0,u.disconnect(),t.thumbnail(e,n).then(h=>{l.replaceChildren(h),l.style.height=""},()=>{}))},{root:a.current,rootMargin:"300px 0px"});return u.observe(l),()=>u.disconnect()},[t,e,n,a]),(0,_e.jsxs)("button",{type:"button",className:`thumb${i?" on":""}`,"aria-current":i?"page":void 0,onClick:()=>o(e),"data-page":e,children:[(0,_e.jsx)("div",{ref:s,className:"mini",style:{width:n,height:Math.round(n*r)}}),(0,_e.jsx)("span",{children:e})]})}var Q4=t=>/^(?:page|slide):(\d+)/.exec(t)?.[1]??"";function e6({t,info:e,handle:n,page:r,tab:i,docked:o,onTab:a,onPage:s,onOutline:l}){let c=(0,_o.useRef)(null),u=!!(n?.thumbnail&&r),d=e.outline.length>0,h=u&&(i==="pages"||!d)?"pages":"outline",f=e.kind==="pptx"?9/16:1.294;(0,_o.useEffect)(()=>{let g=c.current?.querySelector("[aria-current=page]");g&&c.current&&(c.current.scrollTop=g.offsetTop-c.current.clientHeight/3)},[h]);let m=(()=>{if(!r)return-1;let g=-1;return e.outline.forEach((y,v)=>{let b=Number(Q4(y.at));b&&b<=r.current&&(g=v)}),g})();return(0,_e.jsxs)("nav",{className:`drawer${o?" docked":""}`,"aria-label":t.pagesAndOutline,children:[u&&d?(0,_e.jsxs)("div",{className:"seg",role:"tablist",children:[(0,_e.jsx)("button",{type:"button",role:"tab","aria-selected":h==="pages",className:h==="pages"?"on":"",onClick:()=>a("pages"),children:e.kind==="pptx"?t.slides:t.pages}),(0,_e.jsx)("button",{type:"button",role:"tab","aria-selected":h==="outline",className:h==="outline"?"on":"",onClick:()=>a("outline"),children:t.outline})]}):null,(0,_e.jsx)("div",{ref:c,className:h==="pages"?"thumbs":"outline",children:h==="pages"&&n&&r?Array.from({length:r.count},(g,y)=>(0,_e.jsx)(TK,{handle:n,page:y+1,width:136,ratio:f,current:r.current===y+1,onPick:s,root:c},y)):e.outline.map((g,y)=>(0,_e.jsxs)("button",{type:"button",className:`oi level-${Math.min(3,Math.max(1,g.level))}${y===m?" on":""}`,"aria-current":y===m?"page":void 0,title:g.label,onClick:()=>l(g.at),children:[(0,_e.jsx)("span",{className:"label",children:g.label}),(0,_e.jsx)("span",{className:"n",children:Q4(g.at)})]},`${g.at}-${y}`))})]})}function t6({t,onBrowse:e,importing:n}){return(0,_e.jsx)("div",{className:"empty",children:(0,_e.jsxs)("div",{className:"empty-content",children:[(0,_e.jsx)("h3",{children:t.emptyTitle}),(0,_e.jsx)("p",{className:"empty-description",children:t.emptyDescription}),(0,_e.jsxs)("button",{type:"button",className:"btn empty-open",onClick:e,disabled:n,children:[(0,_e.jsx)(Fe,{name:"folder-open",size:16}),n?t.importing:t.openFile]}),(0,_e.jsx)("p",{className:"empty-caption",children:t.emptyCaption})]})})}var AK=["title","subtitle","line","line","short","heading","line","line","line","mid","figure"];function iS({kind:t}){if(t==="xlsx")return(0,_e.jsx)("div",{className:"skeleton sheet","aria-busy":"true",children:Array.from({length:18},(n,r)=>(0,_e.jsx)("div",{className:"skel-row"},r))});let e=t==="pptx";return(0,_e.jsx)("div",{className:"skeleton","aria-busy":"true",children:[0,1].map(n=>(0,_e.jsxs)("div",{className:`skelpage${e?" slide":""}`,children:[n===0&&!e?AK.map((r,i)=>(0,_e.jsx)("div",{className:`skel ${r}`},i)):null,n===0&&e?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("div",{className:"skel title left"}),(0,_e.jsx)("div",{className:"skel line"}),(0,_e.jsx)("div",{className:"skel mid"})]}):null]},n))})}function rS({t,title:e,detail:n,onOpenAnother:r}){return(0,_e.jsxs)("div",{className:"failed",role:"alert",children:[(0,_e.jsx)(Fe,{name:"file-text",size:28,className:"subtlest"}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("h3",{children:e}),n?(0,_e.jsx)("p",{children:n}):null]}),(0,_e.jsx)("button",{type:"button",className:"btn secondary",onClick:r,children:t.openAnother})]})}function n6({t,onReload:e,onDismiss:n}){return(0,_e.jsxs)("div",{className:"banner",role:"status",children:[(0,_e.jsx)("span",{children:t.changed}),(0,_e.jsx)("button",{type:"button",className:"btn sm primary",onClick:e,children:t.reloadShort}),(0,_e.jsx)("button",{type:"button",className:"btn icon sm dim",title:t.dismiss,"aria-label":t.dismiss,onClick:n,children:(0,_e.jsx)(Fe,{name:"x"})})]})}function EK({inputRef:t,t:e,importing:n,onImporting:r,onOpen:i,onError:o}){return(0,_e.jsx)("input",{ref:t,type:"file",hidden:!0,accept:ur.map(a=>`.${a}`).join(","),disabled:n,onChange:async a=>{let s=a.currentTarget.files?.[0];if(a.currentTarget.value="",!!s){r(!0);try{if(s.size>hf)throw new Error(e.importTooLarge);i(await F4(s))}catch(l){o(l,s.name)}finally{r(!1)}}}})}function i6(t,e,n){let r=(0,_o.useRef)(null),[i,o]=(0,_o.useState)(!1);return{importing:i,browse:()=>r.current?.click(),input:(0,_e.jsx)(EK,{inputRef:r,t,importing:i,onImporting:o,onOpen:e,onError:n})}}var bn=lt(Cn(),1);function r6({appRef:t,canvasRef:e,t:n,path:r,info:i,kind:o,showSkeleton:a,failure:s,nothing:l,onExpand:c,children:u}){return(0,bn.jsxs)("div",{ref:t,className:"app inline",children:[(0,bn.jsxs)("header",{className:"docbar",children:[(0,bn.jsxs)("div",{className:"doctitle static",title:r??void 0,children:[(0,bn.jsx)("span",{className:"name",children:r?Ls(r):n.title}),i&&n.meta[i.kind](i.units)?(0,bn.jsx)("span",{className:"meta",children:n.meta[i.kind](i.units)}):null]}),(0,bn.jsx)("span",{className:"spacer"}),(0,bn.jsxs)("button",{type:"button",className:"btn sm",title:n.sidePanel,onClick:c,children:[(0,bn.jsx)(Fe,{name:"maximize-2",size:12}),n.sidePanel]})]}),(0,bn.jsx)("div",{className:"stage",children:(0,bn.jsxs)("div",{ref:e,className:"canvas",children:[u,a?(0,bn.jsx)(iS,{kind:o}):null,s?(0,bn.jsx)(rS,{t:n,title:s.title,detail:s.detail,onOpenAnother:c}):null,l?(0,bn.jsx)("div",{className:"failed muted",children:n.openTitle}):null,(0,bn.jsx)("button",{type:"button",className:"glance-cover","aria-label":n.sidePanel,onClick:c})]})})]})}var Qn=lt(oi(),1);var oS=lt(oi(),1),js=8;function Mk(t,e,n){let r=(0,oS.useRef)(null),{side:i,offset:o=8,dock:a=!1}=n;return(0,oS.useLayoutEffect)(()=>{let s=r.current,l=t.current;if(!s||!l)return;let c=0,u=()=>{c=0;let m=l.getBoundingClientRect(),g=s.offsetWidth,y=s.offsetHeight,v=e?.()??null,b=(I,L,G,ge)=>{s.style.visibility="",s.style.left=`${Math.round(I)}px`,s.style.top=`${Math.round(L)}px`,s.dataset.side=G,s.style.setProperty("--tip",`${Math.round(Math.max(14,Math.min(g-14,ge-I)))}px`)};if(!v){a?b((m.width-g)/2,js,"none",m.width/2):s.style.visibility="hidden";return}if(v.bottom<m.top+4||v.top>m.bottom-4){s.style.visibility="hidden";return}let S=(v.left+v.right)/2-m.left,_=Math.max(js,Math.min(m.width-g-js,S-g/2)),T=v.top-m.top-y-o,x=v.bottom-m.top+o,E=T>=js,C=x+y<=m.height-js;(i==="top"||!C)&&E?b(_,T,"top",S):C?b(_,x,"bottom",S):b(_,i==="top"?js:m.height-y-js,"none",S)},d=()=>{c||(c=requestAnimationFrame(u))};u(),l.addEventListener("scroll",d,{capture:!0,passive:!0});let h=new ResizeObserver(d);h.observe(l),h.observe(s);let f=setInterval(d,250);return()=>{l.removeEventListener("scroll",d,{capture:!0}),h.disconnect(),clearInterval(f),c&&cancelAnimationFrame(c)}},[t,e,i,o,a]),r}var te=lt(Cn(),1);function Dk({className:t,onClose:e,children:n,label:r}){let i=(0,Qn.useRef)(null);(0,Qn.useEffect)(()=>{let a=l=>{let c=l.target;!i.current?.contains(c)&&!c.closest?.("[data-menu-trigger]")&&e()},s=l=>{l.key==="Escape"&&(l.stopPropagation(),e())};return document.addEventListener("pointerdown",a,!0),document.addEventListener("keydown",s,!0),i.current?.querySelector("[role^=menuitem]")?.focus(),()=>{document.removeEventListener("pointerdown",a,!0),document.removeEventListener("keydown",s,!0)}},[e]);let o=a=>{if(a.key!=="ArrowDown"&&a.key!=="ArrowUp")return;a.preventDefault();let s=[...i.current?.querySelectorAll("[role^=menuitem]")??[]],l=s.indexOf(document.activeElement);s[(l+(a.key==="ArrowDown"?1:-1)+s.length)%s.length]?.focus()};return(0,te.jsx)("div",{ref:i,className:`menu ${t}`,role:"menu","aria-label":r,onKeyDown:o,children:n})}function $a({icon:t,checked:e,children:n,hint:r,onSelect:i}){return(0,te.jsxs)("button",{type:"button",role:e===void 0?"menuitem":"menuitemradio","aria-checked":e,className:"mi",onClick:i,children:[(0,te.jsx)("span",{className:"mi-icon",children:e?(0,te.jsx)(Fe,{name:"check",size:16}):t}),(0,te.jsx)("span",{className:"mi-label",children:n}),r?(0,te.jsx)("span",{className:"mi-hint",children:r}):null]})}function a6({t,query:e,total:n,index:r,onQuery:i,onStep:o,onClose:a}){let s=(0,Qn.useRef)(null);(0,Qn.useEffect)(()=>{s.current?.focus(),s.current?.select()},[]);let l=!e.trim()||n===null?"":n?t.findCount(r+1,n):t.noResults;return(0,te.jsxs)("div",{className:"docbar findbar",role:"search",children:[(0,te.jsxs)("label",{className:"findfield",children:[(0,te.jsx)(Fe,{name:"search",className:"muted"}),(0,te.jsx)("input",{ref:s,className:"find-input",type:"text","aria-label":t.find,placeholder:t.findPlaceholder,value:e,onChange:c=>i(c.target.value),onKeyDown:c=>{c.key==="Enter"?(c.preventDefault(),o(c.shiftKey?-1:1)):c.key==="Escape"&&(c.preventDefault(),c.stopPropagation(),a())}}),(0,te.jsx)("span",{className:"count","aria-live":"polite",children:l})]}),(0,te.jsx)("button",{type:"button",className:"btn icon dim",title:t.previousMatch,"aria-label":t.previousMatch,disabled:!n,onClick:()=>o(-1),children:(0,te.jsx)(Fe,{name:"chevron-up"})}),(0,te.jsx)("button",{type:"button",className:"btn icon dim",title:t.nextMatch,"aria-label":t.nextMatch,disabled:!n,onClick:()=>o(1),children:(0,te.jsx)(Fe,{name:"chevron-down"})}),(0,te.jsx)("button",{type:"button",className:"btn icon dim",title:t.closeFind,"aria-label":t.closeFind,onClick:a,children:(0,te.jsx)(Fe,{name:"x"})})]})}var $K=1500;function s6({t,frame:e,page:n,zoom:r,onPage:i,onZoom:o,onFit:a}){let s=(0,Qn.useRef)(null),[l,c]=(0,Qn.useState)(!0),[u,d]=(0,Qn.useState)(null),h=(0,Qn.useRef)(!1);(0,Qn.useEffect)(()=>{let m=e.current;if(!m)return;let g=0,y=()=>{clearTimeout(g),g=window.setTimeout(()=>{!h.current&&!s.current?.contains(document.activeElement)&&c(!1)},$K)},v=()=>{c(!0),y()},b=S=>{let _=m.getBoundingClientRect();S.clientY>_.bottom-80&&v()};return m.addEventListener("scroll",v,{capture:!0,passive:!0}),m.addEventListener("pointermove",b,{passive:!0}),y(),()=>{clearTimeout(g),m.removeEventListener("scroll",v,{capture:!0}),m.removeEventListener("pointermove",b)}},[e]);let f=()=>{let m=Number(u);d(null),Number.isInteger(m)&&m>=1&&i(Math.min(m,n.count))};return(0,te.jsxs)("div",{ref:s,className:`pill${l?"":" faded"}`,onPointerEnter:()=>{h.current=!0,c(!0)},onPointerLeave:()=>{h.current=!1},onFocus:()=>c(!0),children:[(0,te.jsx)("button",{type:"button",className:"btn icon sm dim",title:t.previousPage,"aria-label":t.previousPage,disabled:n.current<=1,onClick:()=>i(n.current-1),children:(0,te.jsx)(Fe,{name:"chevron-up"})}),(0,te.jsxs)("span",{className:"pg",children:[(0,te.jsx)("input",{className:"pgin","aria-label":t.pageNumber,inputMode:"numeric",style:{width:`${Math.max(2,String(n.count).length)+1.6}ch`},value:u??String(n.current),onFocus:m=>{d(String(n.current)),m.target.select()},onChange:m=>d(m.target.value.replace(/\D/g,"")),onBlur:()=>d(null),onKeyDown:m=>{m.key==="Enter"?(f(),m.currentTarget.blur()):m.key==="Escape"&&(m.stopPropagation(),d(null),m.currentTarget.blur())}}),(0,te.jsx)("span",{children:t.ofPages(n.count)})]}),(0,te.jsx)("button",{type:"button",className:"btn icon sm dim",title:t.nextPage,"aria-label":t.nextPage,disabled:n.current>=n.count,onClick:()=>i(n.current+1),children:(0,te.jsx)(Fe,{name:"chevron-down"})}),r?(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("span",{className:"vsep"}),(0,te.jsx)("button",{type:"button",className:"btn icon sm dim",title:t.zoomOut,"aria-label":t.zoomOut,disabled:r.mode!=="width"&&r.percent<=25,onClick:()=>o(-1),children:(0,te.jsx)(Fe,{name:"minus"})}),(0,te.jsx)("button",{type:"button",className:"zoom",title:t.fitWidth,onClick:a,children:r.mode==="width"?t.fit:`${r.percent}%`}),(0,te.jsx)("button",{type:"button",className:"btn icon sm dim",title:t.zoomIn,"aria-label":t.zoomIn,disabled:r.mode!=="width"&&r.percent>=400,onClick:()=>o(1),children:(0,te.jsx)(Fe,{name:"plus"})})]}):null]})}var o6=t=>{t.target.closest("textarea")||t.preventDefault()};function l6({t,frame:e,locate:n,text:r,label:i,quote:o,short:a,mode:s,canAsk:l,copied:c,onAdd:u,onAsk:d,onCopy:h,onCancelAsk:f,onSend:m}){let g=s==="ask",y=Mk(e,n,{side:g?"bottom":"top",dock:!0}),[v,b]=(0,Qn.useState)(""),[S,_]=(0,Qn.useState)(!1),T=async()=>{if(!v.trim()||S)return;_(!0);let x=await m(v.trim());_(!1),x&&b("")};return g?(0,te.jsxs)("div",{ref:y,className:"pop ask",role:"dialog","aria-label":t.ask,onMouseDown:o6,children:[(0,te.jsxs)("div",{className:"ctx",children:[(0,te.jsx)("span",{className:"where",children:i}),o?(0,te.jsxs)("span",{className:"q",children:["\u201C",o,"\u201D"]}):null]}),(0,te.jsx)("textarea",{autoFocus:!0,className:"textarea",rows:2,"aria-label":t.askPlaceholder,placeholder:t.askPlaceholder,value:v,onChange:x=>b(x.target.value),onKeyDown:x=>{x.key==="Enter"&&!x.shiftKey&&!x.nativeEvent.isComposing?(x.preventDefault(),T()):x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),f())}}),(0,te.jsxs)("div",{className:"row",children:[(0,te.jsxs)("span",{className:"hint",children:[(0,te.jsx)("kbd",{children:"\u21B5"})," ",t.sendKey]}),(0,te.jsx)("button",{type:"button",className:"btn sm",onClick:f,children:t.cancel}),(0,te.jsx)("button",{type:"button",className:"btn sm primary",disabled:!v.trim()||S,onClick:()=>void T(),children:t.send})]})]}):(0,te.jsxs)("div",{ref:y,className:"pop bar",role:"toolbar","aria-label":i,onMouseDown:o6,children:[r?null:(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("span",{className:"where",children:i}),(0,te.jsx)("span",{className:"vsep"})]}),(0,te.jsx)("button",{type:"button",className:"btn lg",title:t.addToChatHint,onClick:u,disabled:s==="added",children:s==="added"?(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(Fe,{name:"check",size:16,className:"ok"}),t.added]}):(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(Fe,{name:"message-square-plus",size:16}),a?t.addShort:t.addToChat]})}),l?(0,te.jsxs)("button",{type:"button",className:"btn lg",onClick:d,children:[(0,te.jsx)(Fe,{name:"message-circle-question",size:16}),t.ask]}):null,r?(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("span",{className:"vsep"}),(0,te.jsx)("button",{type:"button",className:"btn icon lg dim",title:c?t.copied:t.copy,"aria-label":c?t.copied:t.copy,onClick:h,children:(0,te.jsx)(Fe,{name:c?"check":"copy"})})]}):null]})}function c6({t,frame:e,locate:n,note:r,index:i,total:o,onNext:a,onClose:s}){let l=Mk(e,n,{side:"bottom",offset:6,dock:!0});return(0,te.jsxs)("div",{ref:l,className:"callout",role:"note",children:[(0,te.jsxs)("div",{className:"body",children:[(0,te.jsxs)("div",{className:"who",children:[(0,te.jsx)("span",{className:"dot"}),o>1?t.agentOf(i+1,o):t.agent]}),r?(0,te.jsx)("div",{className:"text",children:r}):null]}),o>1?(0,te.jsx)("button",{type:"button",className:"btn icon sm dim",title:t.nextTarget,"aria-label":t.nextTarget,onClick:a,children:(0,te.jsx)(Fe,{name:"chevron-down"})}):null,(0,te.jsx)("button",{type:"button",className:"btn icon sm dim",title:t.close,"aria-label":t.close,onClick:s,children:(0,te.jsx)(Fe,{name:"x"})})]})}function u6({text:t,down:e,raised:n,onClick:r}){return(0,te.jsxs)("button",{type:"button",className:`chip offscreen${n?" raised":""}`,onClick:r,children:[(0,te.jsx)("span",{className:"dot"}),t,(0,te.jsx)(Fe,{name:e?"arrow-down":"arrow-up",size:12})]})}function d6(t,e){return t.moreOn(e.length,tS(e[0],t,!0))}var Tt=lt(Cn(),1);function h6({t,recent:e,currentPath:n,onOpen:r,onBrowse:i,onClose:o}){return(0,Tt.jsxs)(Dk,{className:"switcher",label:t.switchDocument,onClose:o,children:[e.length?(0,Tt.jsx)("div",{className:"mlabel",children:t.recent}):null,e.map(a=>(0,Tt.jsx)($a,{icon:(0,Tt.jsx)(W4,{kind:a.kind}),hint:a.path===n?(0,Tt.jsx)(Fe,{name:"check",size:16}):Ls(q4(a.path)),onSelect:()=>a.path===n?o():r(a.path),children:Ls(a.path)},a.path)),e.length?(0,Tt.jsx)("div",{className:"msep"}):null,(0,Tt.jsx)($a,{icon:(0,Tt.jsx)(Fe,{name:"folder-open",size:16}),onSelect:i,children:t.openFile})]})}function f6({t,zoomable:e,zoomMode:n,onFit:r,onFind:i,onReload:o,onClose:a}){return(0,Tt.jsxs)(Dk,{className:"more",label:t.more,onClose:a,children:[e?(0,Tt.jsxs)(Tt.Fragment,{children:[(0,Tt.jsx)($a,{checked:n==="width",onSelect:()=>r("width"),children:t.fitWidth}),(0,Tt.jsx)($a,{checked:n==="page",onSelect:()=>r("page"),children:t.fitPage}),(0,Tt.jsx)($a,{checked:n==="actual",hint:"100%",onSelect:()=>r("actual"),children:t.actualSize}),(0,Tt.jsx)("div",{className:"msep"})]}):null,(0,Tt.jsx)($a,{icon:(0,Tt.jsx)(Fe,{name:"search",size:16}),hint:"\u2318F",onSelect:i,children:t.find}),(0,Tt.jsx)($a,{icon:(0,Tt.jsx)(Fe,{name:"rotate-cw",size:16}),onSelect:o,children:t.reload})]})}var dr=lt(oi(),1),yf={open:!1,query:"",total:null,index:-1};function p6({viewer:t,docRef:e,ready:n,onOpen:r}){let[i,o]=(0,dr.useState)(yf),a=(0,dr.useRef)(0),s=(0,dr.useCallback)(()=>{e.current&&(r(),o(d=>({...d,open:!0})),requestAnimationFrame(()=>{let d=document.querySelector(".findbar .find-input");d?.focus(),d?.select()}))},[e,r]),l=(0,dr.useCallback)(()=>{a.current++,t.current?.clearFind(),o(yf)},[t]),c=(0,dr.useCallback)(d=>{o(h=>({...h,query:d,total:d.trim()?h.total:null}))},[]);(0,dr.useEffect)(()=>{if(!i.open||!n)return;let d=++a.current,h=setTimeout(async()=>{let f=t.current;if(!f)return;let m=await f.find(i.query).catch(()=>0);d===a.current&&(o(g=>({...g,total:m,index:m?0:-1})),m&&f.findGo(0))},200);return()=>clearTimeout(h)},[i.open,i.query,n,t]);let u=(0,dr.useCallback)(d=>{if(!i.total)return;let h=(i.index+d+i.total)%i.total;o(f=>({...f,index:h})),t.current?.findGo(h)},[i.total,i.index,t]);return{find:i,setFind:o,openFind:s,closeFind:l,queryFind:c,stepFind:u}}var m6=lt(oi(),1);function g6(t,e){(0,m6.useEffect)(()=>{Fi().handleTool("capture_view",async r=>{let i=t.current;if(!i||!e.current)throw new Error(`No document is open in the ${gt.title.en} panel. Call open_document first.`);let o=null;if(typeof r.anchor=="string"&&r.anchor.trim()){let l=$4(r.anchor);if(l.path.replace(/^\.\//,"")!==i.info.path)throw new Error(`The panel shows ${i.info.path}, not ${l.path}. Call open_document with that path first.`);o=l.at}let a=typeof r.maxWidth=="number"?Math.min(2e3,Math.max(320,r.maxWidth)):1600,s=await e.current.capture(o,a);return{content:[{type:"image",data:s.data,mimeType:"image/png"},{type:"text",text:`Captured ${pf(i.info.path,s.at)} (${s.width}\xD7${s.height} px).`}]}})},[t,e])}var aS=lt(oi(),1);function v6(t,e){let[n,r]=(0,aS.useState)(null);return(0,aS.useEffect)(()=>{let i=t.current;if(!i||!e||e.targets.length<2){r(null);return}let o=0,a=()=>{o=0;let c=i.getBoundingClientRect(),u=[],d=[];e.targets.forEach((f,m)=>{if(m===e.index)return;let g=f.locate();g&&(g.top>c.bottom-8?u.push(m):g.bottom<c.top+8&&d.push(m))});let h=u.length?{indexes:u,down:!0}:d.length?{indexes:d,down:!1}:null;r(f=>JSON.stringify(f)===JSON.stringify(h)?f:h)},s=()=>{o||(o=requestAnimationFrame(a))};a(),i.addEventListener("scroll",s,{capture:!0,passive:!0});let l=setInterval(s,500);return()=>{i.removeEventListener("scroll",s,{capture:!0}),clearInterval(l),o&&cancelAnimationFrame(o)}},[e,t]),[n,r]}var b6=lt(oi(),1);function y6({docRef:t,viewer:e,picked:n,addReference:r,openFind:i,closeFind:o,clearSelection:a,paged:s,page:l,goToPage:c,drawer:u,setDrawer:d,docked:h,find:f,agent:m,setAgent:g}){(0,b6.useEffect)(()=>{let y=v=>{if(v.defaultPrevented)return;let b=v.metaKey||v.ctrlKey,S=v.target?.closest?.("input, textarea, [contenteditable]"),_=v.key.toLowerCase();if(b&&_==="f"&&t.current)v.preventDefault(),i();else if(b&&v.key==="Enter"&&n)v.preventDefault(),r();else if(b&&(v.key==="="||v.key==="+"))v.preventDefault(),e.current?.zoom(1);else if(b&&v.key==="-")v.preventDefault(),e.current?.zoom(-1);else if(b&&v.key==="0")v.preventDefault(),e.current?.fit("width");else if(!b&&!S&&s&&l&&["ArrowLeft","ArrowRight","PageUp","PageDown"].includes(v.key)){v.preventDefault();let T=v.key==="ArrowLeft"||v.key==="PageUp";c(l.current+(T?-1:1))}else if(v.key==="Escape"&&!S){if(n)a();else if(u.open&&!h)d(T=>({...T,open:!1}));else if(f.open)o();else if(m?.visible)g({...m,visible:!1});else return;v.preventDefault()}};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[n,r,i,o,a,s,l,c,u.open,h,f.open,m,t,e,d,g])}var Be=lt(oi(),1);var Lk="zcode-cjk-fallback",_6="cjk-fallback.json",w6="U+1100-11FF, U+2E80-2FDF, U+2FF0-303F, U+3040-30FF, U+3100-31FF, U+3200-33FF, U+3400-4DBF, U+4E00-9FFF, U+A960-A97F, U+AC00-D7FF, U+F900-FAFF, U+FE10-FE1F, U+FE30-FE4F, U+FF00-FFEF, U+20000-2FA1F",jk={"sc-serif":["STSongti-SC-Regular","Songti SC Regular","STSong","SimSun","NSimSun","Noto Serif CJK SC","NotoSerifCJKsc-Regular","Noto Serif SC","NotoSerifSC-Regular","Source Han Serif SC","SourceHanSerifSC-Regular","AR PL UMing CN","AR PL SungtiL GB"],"sc-sans":["PingFangSC-Regular","PingFang SC Regular","HiraginoSansGB-W3","Hiragino Sans GB W3","STHeitiSC-Light","Heiti SC Light","Microsoft YaHei","SimHei","Noto Sans CJK SC","NotoSansCJKsc-Regular","Noto Sans SC","NotoSansSC-Regular","Source Han Sans SC","SourceHanSansSC-Regular","WenQuanYi Micro Hei","WenQuanYi Zen Hei"],"sc-kai":["STKaitiSC-Regular","Kaiti SC Regular","STKaiti","KaiTi","KaiTi_GB2312","AR PL UKai CN","LXGW WenKai","LXGWWenKai-Regular"],"sc-fang":["STFangsong","FangSong","FangSong_GB2312"],"tc-serif":["STSongti-TC-Regular","Songti TC Regular","LiSongPro","LiSong Pro","PMingLiU","MingLiU","Noto Serif CJK TC","NotoSerifCJKtc-Regular","Noto Serif TC","Source Han Serif TC","SourceHanSerifTC-Regular","AR PL UMing TW"],"tc-sans":["PingFangTC-Regular","PingFang TC Regular","STHeitiTC-Light","Heiti TC Light","Microsoft JhengHei","Noto Sans CJK TC","NotoSansCJKtc-Regular","Noto Sans TC","Source Han Sans TC","SourceHanSansTC-Regular","WenQuanYi Zen Hei"],"tc-kai":["STKaitiTC-Regular","Kaiti TC Regular","BiauKaiTC-Regular","BiauKaiTC Regular","DFKai-SB","AR PL UKai TW"],"jp-serif":["HiraMinProN-W3","Hiragino Mincho ProN W3","Yu Mincho","YuMincho-Regular","MS Mincho","MS PMincho","Noto Serif CJK JP","NotoSerifCJKjp-Regular","Noto Serif JP","Source Han Serif","SourceHanSerif-Regular","IPAexMincho","IPAMincho"],"jp-sans":["HiraginoSans-W3","Hiragino Sans W3","HiraKakuProN-W3","Hiragino Kaku Gothic ProN W3","Yu Gothic","YuGothic-Medium","Meiryo","MS Gothic","MS PGothic","Noto Sans CJK JP","NotoSansCJKjp-Regular","Noto Sans JP","Source Han Sans","SourceHanSans-Regular","IPAexGothic","IPAGothic"],"kr-serif":["AppleMyungjo","AppleMyungjo Regular","Batang","Noto Serif CJK KR","NotoSerifCJKkr-Regular","Noto Serif KR","Source Han Serif K","SourceHanSerifK-Regular","UnBatang","NanumMyeongjo"],"kr-sans":["AppleSDGothicNeo-Regular","Apple SD Gothic Neo Regular","Malgun Gothic","Gulim","Dotum","Noto Sans CJK KR","NotoSansCJKkr-Regular","Noto Sans KR","Source Han Sans K","SourceHanSansK-Regular","NanumGothic","UnDotum"]},Uk=t=>`zcode-cjk-${t}`,kK=[[/fang|仿/,"fang"],[/kai|楷/,"kai"],[/hei(?!sei)|gothic|kakugo|kozgo|gulim|dotum|yuanti|ゴシック|黑|黒|굴림|돋움|고딕/,"sans"],[/song|sung|simsun|ming|mincho|kozmin|ryumin|heiseimin|batang|myeongjo|myungjo|宋|明|바탕|명조/,"serif"]],RK=[[/sans/,"sans"],[/serif/,"serif"]],CK=[[/^hy|batang|gulim|dotum|malgun|myeongjo|myungjo|nanum|^un(batang|dotum)|applesdgothic|cjkkr|(kr|ko)\b|바탕|굴림|돋움|명조|고딕/,"kr"],[/^msung|^mhei|mingliu|dfkai|biaukai|jhenghei|lisong|cjktc|(tc|tw|hk)\b|細明|標楷/,"tc"],[/heisei|mincho|kozmin|kozgo|ryumin|gothicbbb|hira(kaku|min|maru)|hiraginosans(?!gb)|yu(gothic|mincho)|meiryo|ms-?p?gothic|ipa(ex)?(mincho|gothic)|cjkjp|jp\b|明朝|ゴシック/,"jp"],[/simsun|simhei|stsong|stheiti|stkaiti|stfangsong|yahei|^fz|songti|heiti|kaiti|fangsong|gb2312|cjksc|(sc|cn|gb)\b|宋|黑|楷|仿/,"sc"]],IK=[["utf-8",null],["gbk","sc"],["big5","tc"],["shift_jis","jp"],["euc-kr","kr"]];function S6(t){let e=t.replace(/[\s_]+/g,"").toLowerCase(),n=kK.find(([o])=>o.test(e))?.[1]??null,r=CK.find(([o])=>o.test(e))?.[1]??null;if(!n&&!r)return null;let i=n??RK.find(([o])=>o.test(e))?.[1]??null;return{script:r,style:i}}function PK(t){let e=t.replace(/^[A-Z]{6}\+/,"");if(!/[\x80-\xff]/.test(e)||/[\u0100-\uffff]/.test(e)){let r=S6(e);return r&&{script:r.script??"sc",style:r.style}}let n=Uint8Array.from(e,r=>r.charCodeAt(0));for(let[r,i]of IK){let o;try{o=new TextDecoder(r,{fatal:!0}).decode(n)}catch{continue}let a=S6(o);if(a)return{script:a.script??i??"sc",style:a.style}}return null}function x6(t,e){if(!t.missingFile||t.isType3Font)return[];let n=PK(t.name??""),r=n?.script??"sc",i=n?.style??(t.fallbackName==="serif"?"serif":"sans"),o=`${r}-${i}`,a=`${r}-serif`,s=o in jk?[o]:[];return i!=="sans"&&!s.includes(a)&&s.push(a),[...s.map(Uk),...e?[Lk]:[]]}var OK=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui"]);function z6(t,e){if(!e.length)return t;let n=t.split(","),r=e.map(o=>`"${o}"`),i=n.at(-1).trim();return OK.has(i)?[...n.slice(0,-1),...r,i].join(","):[...n,...r].join(",")}var NK,T6=!1;function A6(){return NK??=(async()=>{(await Promise.all(Object.entries(jk).map(async([e,n])=>{let r=new FontFace(Uk(e),n.map(i=>`local("${i}")`).join(", "),{unicodeRange:w6});try{return await r.load(),document.fonts.add(r),!0}catch{return!1}}))).some(Boolean)||(T6=await MK())})()}async function MK(){try{let t=JSON.parse(await Wy(_6));return await Promise.all(t.faces.map(async({file:e,unicodeRange:n})=>{let r=new FontFace(Lk,await gf(e),{unicodeRange:n});await r.load(),document.fonts.add(r)})),!0}catch(t){return console.warn("CJK fallback font",t),!1}}function E6(t,e){return z6(e,x6(t,T6))}var AY={},gS={};gS.d=(t,e)=>{for(var n in e)gS.o(e,n)&&!gS.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})};gS.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var In=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),Gk=[.001,0,0,.001,0,0],vS=1.35,DK=.35,une=DK/vS,_i={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},ka={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},Af="pdfjs_internal_editor_",ze={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,POPUP:16,SIGNATURE:101,COMMENT:102},je={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_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},LK={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},dn={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},bS={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},jt={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,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};var eu={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};var t_={ERRORS:0,WARNINGS:1,INFOS:5},Ef={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},sS={moveTo:0,lineTo:1,curveTo:2,closePath:3},jK={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},n_=t_.WARNINGS;function UK(t){Number.isInteger(t)&&(n_=t)}function qK(){return n_}function i_(t){n_>=t_.INFOS&&console.info(`Info: ${t}`)}function we(t){n_>=t_.WARNINGS&&console.warn(`Warning: ${t}`)}function rt(t){throw new Error(t)}function Ue(t,e){t||rt(e)}function FK(t){switch(t?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function G6(t,e=null,n=null){if(!t)return null;if(n&&typeof t=="string"&&(n.addDefaultProtocol&&t.startsWith("www.")&&t.match(/\./g)?.length>=2&&(t=`http://${t}`),n.tryConvertEncoding))try{t=ZK(t)}catch{}let r=e?URL.parse(t,e):URL.parse(t);return FK(r)?r:null}function K6(t,e,n=!1){let r=URL.parse(t);return r?(r.hash=e,r.href):n&&G6(t,"http://example.com")?t.split("#",1)[0]+`${e?`#${e}`:""}`:""}function Re(t,e,n,r=!1){return Object.defineProperty(t,e,{value:n,enumerable:!r,configurable:!0,writable:!1}),n}var Ys=(function(){function e(n,r){this.message=n,this.name=r}return e.prototype=new Error,e.constructor=e,e})(),yS=class extends Ys{constructor(e,n){super(e,"PasswordException"),this.code=n}},Tf=class extends Ys{constructor(e,n){super(e,"UnknownErrorException"),this.details=n}},$f=class extends Ys{constructor(e){super(e,"InvalidPDFException")}},ou=class extends Ys{constructor(e,n,r){super(e,"ResponseException"),this.status=n,this.missing=r}},Kk=class extends Ys{constructor(e){super(e,"FormatError")}},Lr=class extends Ys{constructor(e){super(e,"AbortException")}};function Y6(t){(typeof t!="object"||t?.length===void 0)&&rt("Invalid argument for bytesToString");let e=t.length,n=8192;if(e<n)return String.fromCharCode.apply(null,t);let r=[];for(let i=0;i<e;i+=n){let o=Math.min(i+n,e),a=t.subarray(i,o);r.push(String.fromCharCode.apply(null,a))}return r.join("")}function qf(t){typeof t!="string"&&rt("Invalid argument for stringToBytes");let e=t.length,n=new Uint8Array(e);for(let r=0;r<e;++r)n[r]=t.charCodeAt(r)&255;return n}function BK(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,t&255)}function HK(){let t=new Uint8Array(4);return t[0]=1,new Uint32Array(t.buffer,0,1)[0]===1}function VK(){try{return new Function(""),!0}catch{return!1}}var Vt=class{static get isLittleEndian(){return Re(this,"isLittleEndian",HK())}static get isEvalSupported(){return Re(this,"isEvalSupported",VK())}static get isOffscreenCanvasSupported(){return Re(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return Re(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){let{platform:e,userAgent:n}=navigator;return Re(this,"platform",{isAndroid:n.includes("Android"),isLinux:e.includes("Linux"),isMac:e.includes("Mac"),isWindows:e.includes("Win"),isFirefox:n.includes("Firefox")})}static get isCSSRoundSupported(){return Re(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}},qk=Array.from(Array(256).keys(),t=>t.toString(16).padStart(2,"0")),le=class{static makeHexColor(e,n,r){return`#${qk[e]}${qk[n]}${qk[r]}`}static domMatrixToTransform(e){return[e.a,e.b,e.c,e.d,e.e,e.f]}static scaleMinMax(e,n){let r;e[0]?(e[0]<0&&(r=n[0],n[0]=n[2],n[2]=r),n[0]*=e[0],n[2]*=e[0],e[3]<0&&(r=n[1],n[1]=n[3],n[3]=r),n[1]*=e[3],n[3]*=e[3]):(r=n[0],n[0]=n[1],n[1]=r,r=n[2],n[2]=n[3],n[3]=r,e[1]<0&&(r=n[1],n[1]=n[3],n[3]=r),n[1]*=e[1],n[3]*=e[1],e[2]<0&&(r=n[0],n[0]=n[2],n[2]=r),n[0]*=e[2],n[2]*=e[2]),n[0]+=e[4],n[1]+=e[5],n[2]+=e[4],n[3]+=e[5]}static transform(e,n){return[e[0]*n[0]+e[2]*n[1],e[1]*n[0]+e[3]*n[1],e[0]*n[2]+e[2]*n[3],e[1]*n[2]+e[3]*n[3],e[0]*n[4]+e[2]*n[5]+e[4],e[1]*n[4]+e[3]*n[5]+e[5]]}static multiplyByDOMMatrix(e,n){return[e[0]*n.a+e[2]*n.b,e[1]*n.a+e[3]*n.b,e[0]*n.c+e[2]*n.d,e[1]*n.c+e[3]*n.d,e[0]*n.e+e[2]*n.f+e[4],e[1]*n.e+e[3]*n.f+e[5]]}static applyTransform(e,n,r=0){let i=e[r],o=e[r+1];e[r]=i*n[0]+o*n[2]+n[4],e[r+1]=i*n[1]+o*n[3]+n[5]}static applyTransformToBezier(e,n,r=0){let i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],c=n[5];for(let u=0;u<6;u+=2){let d=e[r+u],h=e[r+u+1];e[r+u]=d*i+h*a+l,e[r+u+1]=d*o+h*s+c}}static applyInverseTransform(e,n){let r=e[0],i=e[1],o=n[0]*n[3]-n[1]*n[2];e[0]=(r*n[3]-i*n[2]+n[2]*n[5]-n[4]*n[3])/o,e[1]=(-r*n[1]+i*n[0]+n[4]*n[1]-n[5]*n[0])/o}static axialAlignedBoundingBox(e,n,r){let i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],c=n[5],u=e[0],d=e[1],h=e[2],f=e[3],m=i*u+l,g=m,y=i*h+l,v=y,b=s*d+c,S=b,_=s*f+c,T=_;if(o!==0||a!==0){let x=o*u,E=o*h,C=a*d,I=a*f;m+=C,v+=C,y+=I,g+=I,b+=x,T+=x,_+=E,S+=E}r[0]=Math.min(r[0],m,y,g,v),r[1]=Math.min(r[1],b,_,S,T),r[2]=Math.max(r[2],m,y,g,v),r[3]=Math.max(r[3],b,_,S,T)}static inverseTransform(e){let n=e[0]*e[3]-e[1]*e[2];return[e[3]/n,-e[1]/n,-e[2]/n,e[0]/n,(e[2]*e[5]-e[4]*e[3])/n,(e[4]*e[1]-e[5]*e[0])/n]}static singularValueDecompose2dScale(e,n){let r=e[0],i=e[1],o=e[2],a=e[3],s=r**2+i**2,l=r*o+i*a,c=o**2+a**2,u=(s+c)/2,d=Math.sqrt(u**2-(s*c-l**2));n[0]=Math.sqrt(u+d||1),n[1]=Math.sqrt(u-d||1)}static normalizeRect(e){let n=e.slice(0);return e[0]>e[2]&&(n[0]=e[2],n[2]=e[0]),e[1]>e[3]&&(n[1]=e[3],n[3]=e[1]),n}static intersect(e,n){let r=Math.max(Math.min(e[0],e[2]),Math.min(n[0],n[2])),i=Math.min(Math.max(e[0],e[2]),Math.max(n[0],n[2]));if(r>i)return null;let o=Math.max(Math.min(e[1],e[3]),Math.min(n[1],n[3])),a=Math.min(Math.max(e[1],e[3]),Math.max(n[1],n[3]));return o>a?null:[r,o,i,a]}static pointBoundingBox(e,n,r){r[0]=Math.min(r[0],e),r[1]=Math.min(r[1],n),r[2]=Math.max(r[2],e),r[3]=Math.max(r[3],n)}static rectBoundingBox(e,n,r,i,o){o[0]=Math.min(o[0],e,r),o[1]=Math.min(o[1],n,i),o[2]=Math.max(o[2],e,r),o[3]=Math.max(o[3],n,i)}static#e(e,n,r,i,o,a,s,l,c,u){if(c<=0||c>=1)return;let d=1-c,h=c*c,f=h*c,m=d*(d*(d*e+3*c*n)+3*h*r)+f*i,g=d*(d*(d*o+3*c*a)+3*h*s)+f*l;u[0]=Math.min(u[0],m),u[1]=Math.min(u[1],g),u[2]=Math.max(u[2],m),u[3]=Math.max(u[3],g)}static#t(e,n,r,i,o,a,s,l,c,u,d,h){if(Math.abs(c)<1e-12){Math.abs(u)>=1e-12&&this.#e(e,n,r,i,o,a,s,l,-d/u,h);return}let f=u**2-4*d*c;if(f<0)return;let m=Math.sqrt(f),g=2*c;this.#e(e,n,r,i,o,a,s,l,(-u+m)/g,h),this.#e(e,n,r,i,o,a,s,l,(-u-m)/g,h)}static bezierBoundingBox(e,n,r,i,o,a,s,l,c){c[0]=Math.min(c[0],e,s),c[1]=Math.min(c[1],n,l),c[2]=Math.max(c[2],e,s),c[3]=Math.max(c[3],n,l),this.#t(e,r,o,s,n,i,a,l,3*(-e+3*(r-o)+s),6*(e-2*r+o),3*(r-e),c),this.#t(e,r,o,s,n,i,a,l,3*(-n+3*(i-a)+l),6*(n-2*i+a),3*(i-n),c)}};function ZK(t){return decodeURIComponent(escape(t))}var Fk=null,$6=null;function GK(t){return Fk||(Fk=/([\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,$6=new Map([["\uFB05","\u017Ft"]])),t.replaceAll(Fk,(e,n,r)=>n?n.normalize("NFKC"):$6.get(r))}function J6(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();let t=new Uint8Array(32);return crypto.getRandomValues(t),Y6(t)}var AC="pdfjs_internal_id_";function KK(t,e,n){if(!Array.isArray(n)||n.length<2)return!1;let[r,i,...o]=n;if(!t(r)&&!Number.isInteger(r)||!e(i))return!1;let a=o.length,s=!0;switch(i.name){case"XYZ":if(a<2||a>3)return!1;break;case"Fit":case"FitB":return a===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(a>1)return!1;break;case"FitR":if(a!==4)return!1;s=!1;break;default:return!1}for(let l of o)if(!(typeof l=="number"||s&&l===null))return!1;return!0}function Pn(t,e,n){return Math.min(Math.max(t,e),n)}function X6(t){return Uint8Array.prototype.toBase64?t.toBase64():btoa(Y6(t))}function YK(t){return Uint8Array.fromBase64?Uint8Array.fromBase64(t):qf(atob(t))}typeof Promise.try!="function"&&(Promise.try=function(t,...e){return new Promise(n=>{n(t(...e))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(t){return t.reduce((e,n)=>e+n,0)});var kf=class t{static textContent(e){let n=[],r={items:n,styles:Object.create(null)};function i(o){if(!o)return;let a=null,s=o.name;if(s==="#text")a=o.value;else if(t.shouldBuildText(s))o?.attributes?.textContent?a=o.attributes.textContent:o.value&&(a=o.value);else return;if(a!==null&&n.push({str:a}),!!o.children)for(let l of o.children)i(l)}return i(e),r}static shouldBuildText(e){return!(e==="textarea"||e==="input"||e==="option"||e==="select")}},SS=class{static setupStorage(e,n,r,i,o){let a=i.getValue(n,{value:null});switch(r.name){case"textarea":if(a.value!==null&&(e.textContent=a.value),o==="print")break;e.addEventListener("input",s=>{i.setValue(n,{value:s.target.value})});break;case"input":if(r.attributes.type==="radio"||r.attributes.type==="checkbox"){if(a.value===r.attributes.xfaOn?e.setAttribute("checked",!0):a.value===r.attributes.xfaOff&&e.removeAttribute("checked"),o==="print")break;e.addEventListener("change",s=>{i.setValue(n,{value:s.target.checked?s.target.getAttribute("xfaOn"):s.target.getAttribute("xfaOff")})})}else{if(a.value!==null&&e.setAttribute("value",a.value),o==="print")break;e.addEventListener("input",s=>{i.setValue(n,{value:s.target.value})})}break;case"select":if(a.value!==null){e.setAttribute("value",a.value);for(let s of r.children)s.attributes.value===a.value?s.attributes.selected=!0:s.attributes.hasOwnProperty("selected")&&delete s.attributes.selected}e.addEventListener("input",s=>{let l=s.target.options,c=l.selectedIndex===-1?"":l[l.selectedIndex].value;i.setValue(n,{value:c})});break}}static setAttributes({html:e,element:n,storage:r=null,intent:i,linkService:o}){let{attributes:a}=n,s=e instanceof HTMLAnchorElement;a.type==="radio"&&(a.name=`${a.name}-${i}`);for(let[l,c]of Object.entries(a))if(c!=null)switch(l){case"class":c.length&&e.setAttribute(l,c.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",c);break;case"style":Object.assign(e.style,c);break;case"textContent":e.textContent=c;break;default:(!s||l!=="href"&&l!=="newWindow")&&e.setAttribute(l,c)}s&&o.addLinkAttributes(e,a.href,a.newWindow),r&&a.dataId&&this.setupStorage(e,a.dataId,n,r)}static render(e){let n=e.annotationStorage,r=e.linkService,i=e.xfaHtml,o=e.intent||"display",a=document.createElement(i.name);i.attributes&&this.setAttributes({html:a,element:i,intent:o,linkService:r});let s=o!=="richText",l=e.div;if(l.append(a),e.viewport){let d=`matrix(${e.viewport.transform.join(",")})`;l.style.transform=d}s&&l.setAttribute("class","xfaLayer xfaFont");let c=[];if(i.children.length===0){if(i.value){let d=document.createTextNode(i.value);a.append(d),s&&kf.shouldBuildText(i.name)&&c.push(d)}return{textDivs:c}}let u=[[i,-1,a]];for(;u.length>0;){let[d,h,f]=u.at(-1);if(h+1===d.children.length){u.pop();continue}let m=d.children[++u.at(-1)[1]];if(m===null)continue;let{name:g}=m;if(g==="#text"){let v=document.createTextNode(m.value);c.push(v),f.append(v);continue}let y=m?.attributes?.xmlns?document.createElementNS(m.attributes.xmlns,g):document.createElement(g);if(f.append(y),m.attributes&&this.setAttributes({html:y,element:m,storage:n,intent:o,linkService:r}),m.children?.length>0)u.push([m,-1,y]);else if(m.value){let v=document.createTextNode(m.value);s&&kf.shouldBuildText(g)&&c.push(v),y.append(v)}}for(let d of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))d.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){let n=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=n,e.div.hidden=!1}},wo="http://www.w3.org/2000/svg",Ca=class{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF};async function Ff(t,e="text"){if(zf(t,document.baseURI)){let n=await fetch(t);if(!n.ok)throw new Error(n.statusText);switch(e){case"arraybuffer":return n.arrayBuffer();case"blob":return n.blob();case"json":return n.json()}return n.text()}return new Promise((n,r)=>{let i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType=e,i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(i.status===200||i.status===0){switch(e){case"arraybuffer":case"blob":case"json":n(i.response);return}n(i.responseText);return}r(new Error(i.statusText))}},i.send(null)})}var Rf=class t{constructor({viewBox:e,userUnit:n,scale:r,rotation:i,offsetX:o=0,offsetY:a=0,dontFlip:s=!1}){this.viewBox=e,this.userUnit=n,this.scale=r,this.rotation=i,this.offsetX=o,this.offsetY=a,r*=n;let l=(e[2]+e[0])/2,c=(e[3]+e[1])/2,u,d,h,f;switch(i%=360,i<0&&(i+=360),i){case 180:u=-1,d=0,h=0,f=1;break;case 90:u=0,d=1,h=1,f=0;break;case 270:u=0,d=-1,h=-1,f=0;break;case 0:u=1,d=0,h=0,f=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(h=-h,f=-f);let m,g,y,v;u===0?(m=Math.abs(c-e[1])*r+o,g=Math.abs(l-e[0])*r+a,y=(e[3]-e[1])*r,v=(e[2]-e[0])*r):(m=Math.abs(l-e[0])*r+o,g=Math.abs(c-e[1])*r+a,y=(e[2]-e[0])*r,v=(e[3]-e[1])*r),this.transform=[u*r,d*r,h*r,f*r,m-u*r*l-h*r*c,g-d*r*l-f*r*c],this.width=y,this.height=v}get rawDims(){let e=this.viewBox;return Re(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:n=this.rotation,offsetX:r=this.offsetX,offsetY:i=this.offsetY,dontFlip:o=!1}={}){return new t({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:e,rotation:n,offsetX:r,offsetY:i,dontFlip:o})}convertToViewportPoint(e,n){let r=[e,n];return le.applyTransform(r,this.transform),r}convertToViewportRectangle(e){let n=[e[0],e[1]];le.applyTransform(n,this.transform);let r=[e[2],e[3]];return le.applyTransform(r,this.transform),[n[0],n[1],r[0],r[1]]}convertToPdfPoint(e,n){let r=[e,n];return le.applyInverseTransform(r,this.transform),r}},Cf=class extends Ys{constructor(e,n=0){super(e,"RenderingCancelledException"),this.extraDelay=n}};function r_(t){let e=t.length,n=0;for(;n<e&&t[n].trim()==="";)n++;return t.substring(n,n+5).toLowerCase()==="data:"}function EC(t){return typeof t=="string"&&/\.pdf$/i.test(t)}function JK(t){return[t]=t.split(/[#?]/,1),t.substring(t.lastIndexOf("/")+1)}function XK(t,e="document.pdf"){if(typeof t!="string")return e;if(r_(t))return we('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),e;let r=(s=>{try{return new URL(s)}catch{try{return new URL(decodeURIComponent(s))}catch{try{return new URL(s,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(s),"https://foo.bar")}catch{return null}}}}})(t);if(!r)return e;let i=s=>{try{let l=decodeURIComponent(s);return l.includes("/")?(l=l.split("/").at(-1),l.test(/^\.pdf$/i)?l:s):l}catch{return s}},o=/\.pdf$/i,a=r.pathname.split("/").at(-1);if(o.test(a))return i(a);if(r.searchParams.size>0){let s=Array.from(r.searchParams.values()).reverse();for(let c of s)if(o.test(c))return i(c);let l=Array.from(r.searchParams.keys()).reverse();for(let c of l)if(o.test(c))return i(c)}if(r.hash){let l=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(r.hash);if(l)return i(l[0])}return e}var _S=class{started=Object.create(null);times=[];time(e){e in this.started&&we(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||we(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){let e=[],n=0;for(let{name:r}of this.times)n=Math.max(r.length,n);for(let{name:r,start:i,end:o}of this.times)e.push(`${r.padEnd(n)} ${o-i}ms
`);return e.join("")}};function zf(t,e){let n=e?URL.parse(t,e):URL.parse(t);return n?.protocol==="http:"||n?.protocol==="https:"}function Vi(t){t.preventDefault()}function At(t){t.preventDefault(),t.stopPropagation()}function WK(t){console.log("Deprecated API usage: "+t)}var If=class{static#e;static toDateObject(e){if(e instanceof Date)return e;if(!e||typeof e!="string")return null;this.#e||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");let n=this.#e.exec(e);if(!n)return null;let r=parseInt(n[1],10),i=parseInt(n[2],10);i=i>=1&&i<=12?i-1:0;let o=parseInt(n[3],10);o=o>=1&&o<=31?o:1;let a=parseInt(n[4],10);a=a>=0&&a<=23?a:0;let s=parseInt(n[5],10);s=s>=0&&s<=59?s:0;let l=parseInt(n[6],10);l=l>=0&&l<=59?l:0;let c=n[7]||"Z",u=parseInt(n[8],10);u=u>=0&&u<=23?u:0;let d=parseInt(n[9],10)||0;return d=d>=0&&d<=59?d:0,c==="-"?(a+=u,s+=d):c==="+"&&(a-=u,s-=d),new Date(Date.UTC(r,i,o,a,s,l))}};function QK(t,{scale:e=1,rotation:n=0}){let{width:r,height:i}=t.attributes.style,o=[0,0,parseInt(r),parseInt(i)];return new Rf({viewBox:o,userUnit:1,scale:e,rotation:n})}function Bf(t){if(t.startsWith("#")){let e=parseInt(t.slice(1),16);return[(e&16711680)>>16,(e&65280)>>8,e&255]}return t.startsWith("rgb(")?t.slice(4,-1).split(",").map(e=>parseInt(e)):t.startsWith("rgba(")?t.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):(we(`Not a valid color format: "${t}"`),[0,0,0])}function eY(t){let e=document.createElement("span");e.style.visibility="hidden",e.style.colorScheme="only light",document.body.append(e);for(let n of t.keys()){e.style.color=n;let r=window.getComputedStyle(e).color;t.set(n,Bf(r))}e.remove()}function vt(t){let{a:e,b:n,c:r,d:i,e:o,f:a}=t.getTransform();return[e,n,r,i,o,a]}function Mr(t){let{a:e,b:n,c:r,d:i,e:o,f:a}=t.getTransform().invertSelf();return[e,n,r,i,o,a]}function Fs(t,e,n=!1,r=!0){if(e instanceof Rf){let{pageWidth:i,pageHeight:o}=e.rawDims,{style:a}=t,s=Vt.isCSSRoundSupported,l=`var(--total-scale-factor) * ${i}px`,c=`var(--total-scale-factor) * ${o}px`,u=s?`round(down, ${l}, var(--scale-round-x))`:`calc(${l})`,d=s?`round(down, ${c}, var(--scale-round-y))`:`calc(${c})`;!n||e.rotation%180===0?(a.width=u,a.height=d):(a.width=d,a.height=u)}r&&t.setAttribute("data-main-rotation",e.rotation)}var xo=class t{constructor(){let{pixelRatio:e}=t;this.sx=e,this.sy=e}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(e,n,r,i,o=-1){let a=1/0,s=1/0,l=1/0;r=t.capPixels(r,o),r>0&&(a=Math.sqrt(r/(e*n))),i!==-1&&(s=i/e,l=i/n);let c=Math.min(a,s,l);return this.sx>c||this.sy>c?(this.sx=c,this.sy=c,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(e,n){if(n>=0){let r=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+n/100));return e>0?Math.min(e,r):r}return e}},Yk=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"],Jk=class{static get isDarkMode(){return Re(this,"isDarkMode",!!window?.matchMedia?.("(prefers-color-scheme: dark)").matches)}},Xk=class{static get commentForegroundColor(){let e=document.createElement("span");e.classList.add("comment","sidebar");let{style:n}=e;n.width=n.height="0",n.display="none",n.color="var(--comment-fg-color)",document.body.append(e);let{color:r}=window.getComputedStyle(e);return e.remove(),Re(this,"commentForegroundColor",Bf(r))}};function tY(t,e,n,r){r=Math.min(Math.max(r??1,0),1);let i=255*(1-r);return t=Math.round(t*r+i),e=Math.round(e*r+i),n=Math.round(n*r+i),[t,e,n]}function k6(t,e){let n=t[0]/255,r=t[1]/255,i=t[2]/255,o=Math.max(n,r,i),a=Math.min(n,r,i),s=(o+a)/2;if(o===a)e[0]=e[1]=0;else{let l=o-a;switch(e[1]=s<.5?l/(o+a):l/(2-o-a),o){case n:e[0]=((r-i)/l+(r<i?6:0))*60;break;case r:e[0]=((i-n)/l+2)*60;break;case i:e[0]=((n-r)/l+4)*60;break}}e[2]=s}function Wk(t,e){let n=t[0],r=t[1],i=t[2],o=(1-Math.abs(2*i-1))*r,a=o*(1-Math.abs(n/60%2-1)),s=i-o/2;switch(Math.floor(n/60)){case 0:e[0]=o+s,e[1]=a+s,e[2]=s;break;case 1:e[0]=a+s,e[1]=o+s,e[2]=s;break;case 2:e[0]=s,e[1]=o+s,e[2]=a+s;break;case 3:e[0]=s,e[1]=a+s,e[2]=o+s;break;case 4:e[0]=a+s,e[1]=s,e[2]=o+s;break;case 5:case 6:e[0]=o+s,e[1]=s,e[2]=a+s;break}}function R6(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function C6(t,e,n){Wk(t,n),n.map(R6);let r=.2126*n[0]+.7152*n[1]+.0722*n[2];Wk(e,n),n.map(R6);let i=.2126*n[0]+.7152*n[1]+.0722*n[2];return r>i?(r+.05)/(i+.05):(i+.05)/(r+.05)}var I6=new Map;function nY(t,e){let n=t[0]+t[1]*256+t[2]*65536+e[0]*16777216+e[1]*4294967296+e[2]*1099511627776,r=I6.get(n);if(r)return r;let i=new Float32Array(9),o=i.subarray(0,3),a=i.subarray(3,6);k6(t,a);let s=i.subarray(6,9);k6(e,s);let l=s[2]<.5,c=l?12:4.5;if(a[2]=l?Math.sqrt(a[2]):1-Math.sqrt(1-a[2]),C6(a,s,o)<c){let u,d;l?(u=a[2],d=1):(u=0,d=a[2]);let h=.005;for(;d-u>h;){let f=a[2]=(u+d)/2;l===C6(a,s,o)<c?u=f:d=f}a[2]=l?d:u}return Wk(a,o),r=le.makeHexColor(Math.round(o[0]*255),Math.round(o[1]*255),Math.round(o[2]*255)),I6.set(n,r),r}function W6({html:t,dir:e,className:n},r){let i=document.createDocumentFragment();if(typeof t=="string"){let o=document.createElement("p");o.dir=e||"auto";let a=t.split(/(?:\r\n?|\n)/);for(let s=0,l=a.length;s<l;++s){let c=a[s];o.append(document.createTextNode(c)),s<l-1&&o.append(document.createElement("br"))}i.append(o)}else SS.render({xfaHtml:t,div:i,intent:"richText"});i.firstChild.classList.add("richText",n),r.append(i)}var Qk=class t{#e=null;#t=null;#i;#n=null;#a=null;#r=null;#o=null;#s=null;static#c=null;constructor(e){this.#i=e,t.#c||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){let e=this.#e=document.createElement("div");e.classList.add("editToolbar","hidden"),e.setAttribute("role","toolbar");let n=this.#i._uiManager._signal;n instanceof AbortSignal&&!n.aborted&&(e.addEventListener("contextmenu",Vi,{signal:n}),e.addEventListener("pointerdown",t.#l,{signal:n}));let r=this.#n=document.createElement("div");r.className="buttons",e.append(r);let i=this.#i.toolbarPosition;if(i){let{style:o}=e,a=this.#i._uiManager.direction==="ltr"?1-i[0]:i[0];o.insetInlineEnd=`${100*a}%`,o.top=`calc(${100*i[1]}% + var(--editor-toolbar-vert-offset))`}return e}get div(){return this.#e}static#l(e){e.stopPropagation()}#h(e){this.#i._focusEventsAllowed=!1,At(e)}#d(e){this.#i._focusEventsAllowed=!0,At(e)}#f(e){let n=this.#i._uiManager._signal;return!(n instanceof AbortSignal)||n.aborted?!1:(e.addEventListener("focusin",this.#h.bind(this),{capture:!0,signal:n}),e.addEventListener("focusout",this.#d.bind(this),{capture:!0,signal:n}),e.addEventListener("contextmenu",Vi,{signal:n}),!0)}hide(){this.#e.classList.add("hidden"),this.#t?.hideDropdown()}show(){this.#e.classList.remove("hidden"),this.#a?.shown(),this.#r?.shown()}addDeleteButton(){let{editorType:e,_uiManager:n}=this.#i,r=document.createElement("button");r.classList.add("basic","deleteButton"),r.tabIndex=0,r.setAttribute("data-l10n-id",t.#c[e]),this.#f(r)&&r.addEventListener("click",i=>{n.delete()},{signal:n._signal}),this.#n.append(r)}get#g(){let e=document.createElement("div");return e.className="divider",e}async addAltText(e){let n=await e.render();this.#f(n),this.#n.append(n,this.#g),this.#a=e}addComment(e,n=null){if(this.#r)return;let r=e.renderForToolbar();if(!r)return;this.#f(r);let i=this.#o=this.#g;n?(this.#n.insertBefore(r,n),this.#n.insertBefore(i,n)):this.#n.append(r,i),this.#r=e,e.toolbar=this}addColorPicker(e){if(this.#t)return;this.#t=e;let n=e.renderButton();this.#f(n),this.#n.append(n,this.#g)}async addEditSignatureButton(e){let n=this.#s=await e.renderEditButton(this.#i);this.#f(n),this.#n.append(n,this.#g)}removeButton(e){switch(e){case"comment":this.#r?.removeToolbarCommentButton(),this.#r=null,this.#o?.remove(),this.#o=null;break}}async addButton(e,n){switch(e){case"colorPicker":this.addColorPicker(n);break;case"altText":await this.addAltText(n);break;case"editSignature":await this.addEditSignatureButton(n);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(n);break}}async addButtonBefore(e,n,r){let i=this.#n.querySelector(r);i&&e==="comment"&&this.addComment(n,i)}updateEditSignatureButton(e){this.#s&&(this.#s.title=e)}remove(){this.#e.remove(),this.#t?.destroy(),this.#t=null}},eR=class{#e=null;#t=null;#i;constructor(e){this.#i=e}#n(){let e=this.#t=document.createElement("div");e.className="editToolbar",e.setAttribute("role","toolbar");let n=this.#i._signal;n instanceof AbortSignal&&!n.aborted&&e.addEventListener("contextmenu",Vi,{signal:n});let r=this.#e=document.createElement("div");return r.className="buttons",e.append(r),this.#i.hasCommentManager()&&this.#r("commentButton","pdfjs-comment-floating-button","pdfjs-comment-floating-button-label",()=>{this.#i.commentSelection("floating_button")}),this.#r("highlightButton","pdfjs-highlight-floating-button1","pdfjs-highlight-floating-button-label",()=>{this.#i.highlightSelection("floating_button")}),e}#a(e,n){let r=0,i=0;for(let o of e){let a=o.y+o.height;if(a<r)continue;let s=o.x+(n?o.width:0);if(a>r){i=s,r=a;continue}n?s>i&&(i=s):s<i&&(i=s)}return[n?1-i:i,r]}show(e,n,r){let[i,o]=this.#a(n,r),{style:a}=this.#t||=this.#n();e.append(this.#t),a.insetInlineEnd=`${100*i}%`,a.top=`calc(${100*o}% + var(--editor-toolbar-vert-offset))`}hide(){this.#t.remove()}#r(e,n,r,i){let o=document.createElement("button");o.classList.add("basic",e),o.tabIndex=0,o.setAttribute("data-l10n-id",n);let a=document.createElement("span");o.append(a),a.className="visuallyHidden",a.setAttribute("data-l10n-id",r);let s=this.#i._signal;s instanceof AbortSignal&&!s.aborted&&(o.addEventListener("contextmenu",Vi,{signal:s}),o.addEventListener("click",i,{signal:s})),this.#e.append(o)}};function Q6(t,e,n){for(let r of n)e.addEventListener(r,t[r].bind(t))}var tR=class{#e=0;get id(){return`${Af}${this.#e++}`}},nR=class t{#e=J6();#t=0;#i=null;static get _isSVGFittingCanvas(){let e='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>',r=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),i=new Image;i.src=e;let o=i.decode().then(()=>(r.drawImage(i,0,0,1,1,0,0,1,3),new Uint32Array(r.getImageData(0,0,1,1).data.buffer)[0]===0));return Re(this,"_isSVGFittingCanvas",o)}async#n(e,n){this.#i||=new Map;let r=this.#i.get(e);if(r===null)return null;if(r?.bitmap)return r.refCounter+=1,r;try{r||={bitmap:null,id:`image_${this.#e}_${this.#t++}`,refCounter:0,isSvg:!1};let i;if(typeof n=="string"?(r.url=n,i=await Ff(n,"blob")):n instanceof File?i=r.file=n:n instanceof Blob&&(i=n),i.type==="image/svg+xml"){let o=t._isSVGFittingCanvas,a=new FileReader,s=new Image,l=new Promise((c,u)=>{s.onload=()=>{r.bitmap=s,r.isSvg=!0,c()},a.onload=async()=>{let d=r.svgUrl=a.result;s.src=await o?`${d}#svgView(preserveAspectRatio(none))`:d},s.onerror=a.onerror=u});a.readAsDataURL(i),await l}else r.bitmap=await createImageBitmap(i);r.refCounter=1}catch(i){we(i),r=null}return this.#i.set(e,r),r&&this.#i.set(r.id,r),r}async getFromFile(e){let{lastModified:n,name:r,size:i,type:o}=e;return this.#n(`${n}_${r}_${i}_${o}`,e)}async getFromUrl(e){return this.#n(e,e)}async getFromBlob(e,n){let r=await n;return this.#n(e,r)}async getFromId(e){this.#i||=new Map;let n=this.#i.get(e);if(!n)return null;if(n.bitmap)return n.refCounter+=1,n;if(n.file)return this.getFromFile(n.file);if(n.blobPromise){let{blobPromise:r}=n;return delete n.blobPromise,this.getFromBlob(n.id,r)}return this.getFromUrl(n.url)}getFromCanvas(e,n){this.#i||=new Map;let r=this.#i.get(e);if(r?.bitmap)return r.refCounter+=1,r;let i=new OffscreenCanvas(n.width,n.height);return i.getContext("2d").drawImage(n,0,0),r={bitmap:i.transferToImageBitmap(),id:`image_${this.#e}_${this.#t++}`,refCounter:1,isSvg:!1},this.#i.set(e,r),this.#i.set(r.id,r),r}getSvgUrl(e){let n=this.#i.get(e);return n?.isSvg?n.svgUrl:null}deleteId(e){this.#i||=new Map;let n=this.#i.get(e);if(!n||(n.refCounter-=1,n.refCounter!==0))return;let{bitmap:r}=n;if(!n.url&&!n.file){let i=new OffscreenCanvas(r.width,r.height);i.getContext("bitmaprenderer").transferFromImageBitmap(r),n.blobPromise=i.convertToBlob()}r.close?.(),n.bitmap=null}isValidId(e){return e.startsWith(`image_${this.#e}_`)}},iR=class{#e=[];#t=!1;#i;#n=-1;constructor(e=128){this.#i=e}add({cmd:e,undo:n,post:r,mustExec:i,type:o=NaN,overwriteIfSameType:a=!1,keepUndo:s=!1}){if(i&&e(),this.#t)return;let l={cmd:e,undo:n,post:r,type:o};if(this.#n===-1){this.#e.length>0&&(this.#e.length=0),this.#n=0,this.#e.push(l);return}if(a&&this.#e[this.#n].type===o){s&&(l.undo=this.#e[this.#n].undo),this.#e[this.#n]=l;return}let c=this.#n+1;c===this.#i?this.#e.splice(0,1):(this.#n=c,c<this.#e.length&&this.#e.splice(c)),this.#e.push(l)}undo(){if(this.#n===-1)return;this.#t=!0;let{undo:e,post:n}=this.#e[this.#n];e(),n?.(),this.#t=!1,this.#n-=1}redo(){if(this.#n<this.#e.length-1){this.#n+=1,this.#t=!0;let{cmd:e,post:n}=this.#e[this.#n];e(),n?.(),this.#t=!1}}hasSomethingToUndo(){return this.#n!==-1}hasSomethingToRedo(){return this.#n<this.#e.length-1}cleanType(e){if(this.#n!==-1){for(let n=this.#n;n>=0;n--)if(this.#e[n].type!==e){this.#e.splice(n+1,this.#n-n),this.#n=n;return}this.#e.length=0,this.#n=-1}}destroy(){this.#e=null}},Bs=class{constructor(e){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;let{isMac:n}=Vt.platform;for(let[r,i,o={}]of e)for(let a of r){let s=a.startsWith("mac+");n&&s?(this.callbacks.set(a.slice(4),{callback:i,options:o}),this.allKeys.add(a.split("+").at(-1))):!n&&!s&&(this.callbacks.set(a,{callback:i,options:o}),this.allKeys.add(a.split("+").at(-1)))}}#e(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);let n=this.buffer.join("+");return this.buffer.length=0,n}exec(e,n){if(!this.allKeys.has(n.key))return;let r=this.callbacks.get(this.#e(n));if(!r)return;let{callback:i,options:{bubbles:o=!1,args:a=[],checker:s=null}}=r;s&&!s(e,n)||(i.bind(e,...a,n)(),o||At(n))}},rR=class t{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){let e=new Map([["CanvasText",null],["Canvas",null]]);return eY(e),Re(this,"_colors",e)}convert(e){let n=Bf(e);if(!window.matchMedia("(forced-colors: active)").matches)return n;for(let[r,i]of this._colors)if(i.every((o,a)=>o===n[a]))return t._colorsMapping.get(r);return n}getHexCode(e){let n=this._colors.get(e);return n?le.makeHexColor(...n):e}},Hs=class t{#e=new AbortController;#t=null;#i=null;#n=new Map;#a=new Map;#r=null;#o=null;#s=null;#c=new iR;#l=null;#h=null;#d=null;#f=0;#g=new Set;#p=null;#u=null;#m=new Set;_editorUndoBar=null;#v=!1;#y=!1;#b=!1;#T=null;#x=null;#S=null;#E=null;#w=!1;#z=null;#R=new tR;#$=!1;#k=!1;#D=!1;#I=null;#O=null;#L=null;#N=null;#H=null;#A=ze.NONE;#_=new Set;#P=null;#j=null;#q=null;#G=null;#Z=null;#K={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#F=[0,0];#M=null;#V=null;#W=null;#Q=null;#U=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){let e=t.prototype,n=a=>a.#V.contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&a.hasSomethingToControl(),r=(a,{target:s})=>{if(s instanceof HTMLInputElement){let{type:l}=s;return l!=="text"&&l!=="number"}return!0},i=this.TRANSLATE_SMALL,o=this.TRANSLATE_BIG;return Re(this,"_keyboardManager",new Bs([[["ctrl+a","mac+meta+a"],e.selectAll,{checker:r}],[["ctrl+z","mac+meta+z"],e.undo,{checker:r}],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo,{checker:r}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete,{checker:r}],[["Enter","mac+Enter"],e.addNewEditorFromKeyboard,{checker:(a,{target:s})=>!(s instanceof HTMLButtonElement)&&a.#V.contains(s)&&!a.isEnterHandled}],[[" ","mac+ "],e.addNewEditorFromKeyboard,{checker:(a,{target:s})=>!(s instanceof HTMLButtonElement)&&a.#V.contains(document.activeElement)}],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:n}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-o,0],checker:n}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:n}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[o,0],checker:n}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:n}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-o],checker:n}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:n}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,o],checker:n}]]))}constructor(e,n,r,i,o,a,s,l,c,u,d,h,f,m,g,y){let v=this._signal=this.#e.signal;this.#V=e,this.#W=n,this.#Q=r,this.#r=i,this.#l=o,this.#j=a,this.#Z=l,this._eventBus=s,s._on("editingaction",this.onEditingAction.bind(this),{signal:v}),s._on("pagechanging",this.onPageChanging.bind(this),{signal:v}),s._on("scalechanging",this.onScaleChanging.bind(this),{signal:v}),s._on("rotationchanging",this.onRotationChanging.bind(this),{signal:v}),s._on("setpreference",this.onSetPreference.bind(this),{signal:v}),s._on("switchannotationeditorparams",b=>this.updateParams(b.type,b.value),{signal:v}),window.addEventListener("pointerdown",()=>{this.#k=!0},{capture:!0,signal:v}),window.addEventListener("pointerup",()=>{this.#k=!1},{capture:!0,signal:v}),this.#le(),this.#he(),this.#te(),this.#o=l.annotationStorage,this.#T=l.filterFactory,this.#q=c,this.#E=u||null,this.#v=d,this.#y=h,this.#b=f,this.#H=m||null,this.viewParameters={realScale:Ca.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=g||null,this._supportsPinchToZoom=y!==!1,o?.setSidebarUiManager(this)}destroy(){this.#U?.resolve(),this.#U=null,this.#e?.abort(),this.#e=null,this._signal=null;for(let e of this.#a.values())e.destroy();this.#a.clear(),this.#n.clear(),this.#m.clear(),this.#N?.clear(),this.#t=null,this.#_.clear(),this.#c.destroy(),this.#r?.destroy(),this.#l?.destroy(),this.#j?.destroy(),this.#z?.hide(),this.#z=null,this.#L?.destroy(),this.#L=null,this.#i=null,this.#x&&(clearTimeout(this.#x),this.#x=null),this.#M&&(clearTimeout(this.#M),this.#M=null),this._editorUndoBar?.destroy(),this.#Z=null}combinedSignal(e){return AbortSignal.any([this._signal,e.signal])}get mlManager(){return this.#H}get useNewAltTextFlow(){return this.#y}get useNewAltTextWhenAddingImage(){return this.#b}get hcmFilter(){return Re(this,"hcmFilter",this.#q?this.#T.addHCMFilter(this.#q.foreground,this.#q.background):"none")}get direction(){return Re(this,"direction",getComputedStyle(this.#V).direction)}get _highlightColors(){return Re(this,"_highlightColors",this.#E?new Map(this.#E.split(",").map(e=>(e=e.split("=").map(n=>n.trim()),e[1]=e[1].toUpperCase(),e))):null)}get highlightColors(){let{_highlightColors:e}=this;if(!e)return Re(this,"highlightColors",null);let n=new Map,r=!!this.#q;for(let[i,o]of e){let a=i.endsWith("_HCM");if(r&&a){n.set(i.replace("_HCM",""),o);continue}!r&&!a&&n.set(i,o)}return Re(this,"highlightColors",n)}get highlightColorNames(){return Re(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}getNonHCMColor(e){if(!this._highlightColors)return e;let n=this.highlightColorNames.get(e);return this._highlightColors.get(n)||e}getNonHCMColorName(e){return this.highlightColorNames.get(e)||e}setCurrentDrawingSession(e){e?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#d=e}setMainHighlightColorPicker(e){this.#L=e}editAltText(e,n=!1){this.#r?.editAltText(this,e,n)}hasCommentManager(){return!!this.#l}editComment(e,n,r,i){this.#l?.showDialog(this,e,n,r,i)}selectComment(e,n){this.#a.get(e)?.getEditorByUID(n)?.toggleComment(!0,!0)}updateComment(e){this.#l?.updateComment(e.getData())}updatePopupColor(e){this.#l?.updatePopupColor(e)}removeComment(e){this.#l?.removeComments([e.uid])}toggleComment(e,n,r=void 0){this.#l?.toggleCommentPopup(e,n,r)}makeCommentColor(e,n){return e&&this.#l?.makeCommentColor(e,n)||null}getCommentDialogElement(){return this.#l?.dialogElement||null}async waitForEditorsRendered(e){if(this.#a.has(e-1))return;let{resolve:n,promise:r}=Promise.withResolvers(),i=o=>{o.pageNumber===e&&(this._eventBus._off("editorsrendered",i),n())};this._eventBus.on("editorsrendered",i),await r}getSignature(e){this.#j?.getSignature({uiManager:this,editor:e})}get signatureManager(){return this.#j}switchToMode(e,n){this._eventBus.on("annotationeditormodechanged",n,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode:e})}setPreference(e,n){this._eventBus.dispatch("setpreference",{source:this,name:e,value:n})}onSetPreference({name:e,value:n}){switch(e){case"enableNewAltTextWhenAddingImage":this.#b=n;break}}onPageChanging({pageNumber:e}){this.#f=e-1}focusMainContainer(){this.#V.focus()}findParent(e,n){for(let r of this.#a.values()){let{x:i,y:o,width:a,height:s}=r.div.getBoundingClientRect();if(e>=i&&e<=i+a&&n>=o&&n<=o+s)return r}return null}disableUserSelect(e=!1){this.#W.classList.toggle("noUserSelect",e)}addShouldRescale(e){this.#m.add(e)}removeShouldRescale(e){this.#m.delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*Ca.PDF_TO_CSS_UNITS;for(let n of this.#m)n.onScaleChanging();this.#d?.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}#X({anchorNode:e}){return e.nodeType===Node.TEXT_NODE?e.parentElement:e}#ee(e){let{currentLayer:n}=this;if(n.hasTextLayer(e))return n;for(let r of this.#a.values())if(r.hasTextLayer(e))return r;return null}highlightSelection(e="",n=!1){let r=document.getSelection();if(!r||r.isCollapsed)return;let{anchorNode:i,anchorOffset:o,focusNode:a,focusOffset:s}=r,l=r.toString(),u=this.#X(r).closest(".textLayer"),d=this.getSelectionBoxes(u);if(!d)return;r.empty();let h=this.#ee(u),f=this.#A===ze.NONE,m=()=>{let g=h?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation:e,boxes:d,anchorNode:i,anchorOffset:o,focusNode:a,focusOffset:s,text:l});f&&this.showAllEditors("highlight",!0,!0),n&&g?.editComment()};if(f){this.switchToMode(ze.HIGHLIGHT,m);return}m()}commentSelection(e=""){this.highlightSelection(e,!0)}#ae(){let e=document.getSelection();if(!e||e.isCollapsed)return;let r=this.#X(e).closest(".textLayer"),i=this.getSelectionBoxes(r);i&&(this.#z||=new eR(this),this.#z.show(r,i,this.direction==="ltr"))}getAndRemoveDataFromAnnotationStorage(e){if(!this.#o)return null;let n=`${Af}${e}`,r=this.#o.getRawValue(n);return r&&this.#o.remove(n),r}addToAnnotationStorage(e){!e.isEmpty()&&this.#o&&!this.#o.has(e.id)&&this.#o.setValue(e.id,e)}a11yAlert(e,n=null){let r=this.#Q;r&&(r.setAttribute("data-l10n-id",e),n?r.setAttribute("data-l10n-args",JSON.stringify(n)):r.removeAttribute("data-l10n-args"))}#se(){let e=document.getSelection();if(!e||e.isCollapsed){this.#P&&(this.#z?.hide(),this.#P=null,this.#C({hasSelectedText:!1}));return}let{anchorNode:n}=e;if(n===this.#P)return;let i=this.#X(e).closest(".textLayer");if(!i){this.#P&&(this.#z?.hide(),this.#P=null,this.#C({hasSelectedText:!1}));return}if(this.#z?.hide(),this.#P=n,this.#C({hasSelectedText:!0}),!(this.#A!==ze.HIGHLIGHT&&this.#A!==ze.NONE)&&(this.#A===ze.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#w=this.isShiftKeyDown,!this.isShiftKeyDown)){let o=this.#A===ze.HIGHLIGHT?this.#ee(i):null;if(o?.toggleDrawing(),this.#k){let a=new AbortController,s=this.combinedSignal(a),l=c=>{c.type==="pointerup"&&c.button!==0||(a.abort(),o?.toggleDrawing(!0),c.type==="pointerup"&&this.#Y("main_toolbar"))};window.addEventListener("pointerup",l,{signal:s}),window.addEventListener("blur",l,{signal:s})}else o?.toggleDrawing(!0),this.#Y("main_toolbar")}}#Y(e=""){this.#A===ze.HIGHLIGHT?this.highlightSelection(e):this.#v&&this.#ae()}#le(){document.addEventListener("selectionchange",this.#se.bind(this),{signal:this._signal})}#ce(){if(this.#S)return;this.#S=new AbortController;let e=this.combinedSignal(this.#S);window.addEventListener("focus",this.focus.bind(this),{signal:e}),window.addEventListener("blur",this.blur.bind(this),{signal:e})}#ue(){this.#S?.abort(),this.#S=null}blur(){if(this.isShiftKeyDown=!1,this.#w&&(this.#w=!1,this.#Y("main_toolbar")),!this.hasSelection)return;let{activeElement:e}=document;for(let n of this.#_)if(n.div.contains(e)){this.#O=[n,e],n._focusEventsAllowed=!1;break}}focus(){if(!this.#O)return;let[e,n]=this.#O;this.#O=null,n.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this._signal}),n.focus()}#te(){if(this.#I)return;this.#I=new AbortController;let e=this.combinedSignal(this.#I);window.addEventListener("keydown",this.keydown.bind(this),{signal:e}),window.addEventListener("keyup",this.keyup.bind(this),{signal:e})}#de(){this.#I?.abort(),this.#I=null}#ne(){if(this.#h)return;this.#h=new AbortController;let e=this.combinedSignal(this.#h);document.addEventListener("copy",this.copy.bind(this),{signal:e}),document.addEventListener("cut",this.cut.bind(this),{signal:e}),document.addEventListener("paste",this.paste.bind(this),{signal:e})}#ie(){this.#h?.abort(),this.#h=null}#he(){let e=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal:e}),document.addEventListener("drop",this.drop.bind(this),{signal:e})}addEditListeners(){this.#te(),this.#ne()}removeEditListeners(){this.#de(),this.#ie()}dragOver(e){for(let{type:n}of e.dataTransfer.items)for(let r of this.#u)if(r.isHandlingMimeForPasting(n)){e.dataTransfer.dropEffect="copy",e.preventDefault();return}}drop(e){for(let n of e.dataTransfer.items)for(let r of this.#u)if(r.isHandlingMimeForPasting(n.type)){r.paste(n,this.currentLayer),e.preventDefault();return}}copy(e){if(e.preventDefault(),this.#t?.commitOrRemove(),!this.hasSelection)return;let n=[];for(let r of this.#_){let i=r.serialize(!0);i&&n.push(i)}n.length!==0&&e.clipboardData.setData("application/pdfjs",JSON.stringify(n))}cut(e){this.copy(e),this.delete()}async paste(e){e.preventDefault();let{clipboardData:n}=e;for(let o of n.items)for(let a of this.#u)if(a.isHandlingMimeForPasting(o.type)){a.paste(o,this.currentLayer);return}let r=n.getData("application/pdfjs");if(!r)return;try{r=JSON.parse(r)}catch(o){we(`paste: "${o.message}".`);return}if(!Array.isArray(r))return;this.unselectAll();let i=this.currentLayer;try{let o=[];for(let l of r){let c=await i.deserialize(l);if(!c)return;o.push(c)}let a=()=>{for(let l of o)this.#re(l);this.#oe(o)},s=()=>{for(let l of o)l.remove()};this.addCommands({cmd:a,undo:s,mustExec:!0})}catch(o){we(`paste: "${o.message}".`)}}keydown(e){!this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!0),this.#A!==ze.NONE&&!this.isEditorHandlingKeyboard&&t._keyboardManager.exec(this,e)}keyup(e){this.isShiftKeyDown&&e.key==="Shift"&&(this.isShiftKeyDown=!1,this.#w&&(this.#w=!1,this.#Y("main_toolbar")))}onEditingAction({name:e}){switch(e){case"undo":case"redo":case"delete":case"selectAll":this[e]();break;case"highlightSelection":this.highlightSelection("context_menu");break;case"commentSelection":this.commentSelection("context_menu");break}}#C(e){Object.entries(e).some(([r,i])=>this.#K[r]!==i)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#K,e)}),this.#A===ze.HIGHLIGHT&&e.hasSelectedEditor===!1&&this.#B([[je.HIGHLIGHT_FREE,!0]]))}#B(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})}setEditingState(e){e?(this.#ce(),this.#ne(),this.#C({isEditing:this.#A!==ze.NONE,isEmpty:this.#J(),hasSomethingToUndo:this.#c.hasSomethingToUndo(),hasSomethingToRedo:this.#c.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#ue(),this.#ie(),this.#C({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!this.#u){this.#u=e;for(let n of this.#u)this.#B(n.defaultPropertiesToUpdate)}}getId(){return this.#R.id}get currentLayer(){return this.#a.get(this.#f)}getLayer(e){return this.#a.get(e)}get currentPageIndex(){return this.#f}addLayer(e){this.#a.set(e.pageIndex,e),this.#$?e.enable():e.disable()}removeLayer(e){this.#a.delete(e.pageIndex)}async updateMode(e,n=null,r=!1,i=!1,o=!1){if(this.#A!==e&&!(this.#U&&(await this.#U.promise,!this.#U))){if(this.#U=Promise.withResolvers(),this.#d?.commitOrRemove(),this.#A===ze.POPUP&&this.#l?.hideSidebar(),this.#l?.destroyPopup(),this.#A=e,e===ze.NONE){this.setEditingState(!1),this.#pe();for(let a of this.#n.values())a.hideStandaloneCommentButton();this._editorUndoBar?.hide(),this.toggleComment(null),this.#U.resolve();return}for(let a of this.#n.values())a.addStandaloneCommentButton();e===ze.SIGNATURE&&await this.#j?.loadSignatures(),this.setEditingState(!0),await this.#fe(),this.unselectAll();for(let a of this.#a.values())a.updateMode(e);if(e===ze.POPUP){this.#i||=await this.#Z.getAnnotationsByType(new Set(this.#u.map(l=>l._editorType)));let a=new Set,s=[];for(let l of this.#n.values()){let{annotationElementId:c,hasComment:u,deleted:d}=l;c&&a.add(c),u&&!d&&s.push(l.getData())}for(let l of this.#i){let{id:c,popupRef:u,contentsObj:d}=l;u&&d?.str&&!a.has(c)&&!this.#g.has(c)&&s.push(l)}this.#l?.showSidebar(s)}if(!n){r&&this.addNewEditorFromKeyboard(),this.#U.resolve();return}for(let a of this.#n.values())a.uid===n?(this.setSelected(a),o?a.editComment():i?a.enterInEditMode():a.focus()):a.unselect();this.#U.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(e){e.mode!==this.#A&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...e})}updateParams(e,n){if(this.#u){switch(e){case je.CREATE:this.currentLayer.addNewEditor(n);return;case je.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#G||=new Map).set(e,n),this.showAllEditors("highlight",n);break}if(this.hasSelection)for(let r of this.#_)r.updateParams(e,n);else for(let r of this.#u)r.updateDefaultParams(e,n)}}showAllEditors(e,n,r=!1){for(let o of this.#n.values())o.editorType===e&&o.show(n);(this.#G?.get(je.HIGHLIGHT_SHOW_ALL)??!0)!==n&&this.#B([[je.HIGHLIGHT_SHOW_ALL,n]])}enableWaiting(e=!1){if(this.#D!==e){this.#D=e;for(let n of this.#a.values())e?n.disableClick():n.enableClick(),n.div.classList.toggle("waiting",e)}}async#fe(){if(!this.#$){this.#$=!0;let e=[];for(let n of this.#a.values())e.push(n.enable());await Promise.all(e);for(let n of this.#n.values())n.enable()}}#pe(){if(this.unselectAll(),this.#$){this.#$=!1;for(let e of this.#a.values())e.disable();for(let e of this.#n.values())e.disable()}}*getEditors(e){for(let n of this.#n.values())n.pageIndex===e&&(yield n)}getEditor(e){return this.#n.get(e)}addEditor(e){this.#n.set(e.id,e)}removeEditor(e){e.div.contains(document.activeElement)&&(this.#x&&clearTimeout(this.#x),this.#x=setTimeout(()=>{this.focusMainContainer(),this.#x=null},0)),this.#n.delete(e.id),e.annotationElementId&&this.#N?.delete(e.annotationElementId),this.unselect(e),(!e.annotationElementId||!this.#g.has(e.annotationElementId))&&this.#o?.remove(e.id)}addDeletedAnnotationElement(e){this.#g.add(e.annotationElementId),this.addChangedExistingAnnotation(e),e.deleted=!0}isDeletedAnnotationElement(e){return this.#g.has(e)}removeDeletedAnnotationElement(e){this.#g.delete(e.annotationElementId),this.removeChangedExistingAnnotation(e),e.deleted=!1}#re(e){let n=this.#a.get(e.pageIndex);n?n.addOrRebuild(e):(this.addEditor(e),this.addToAnnotationStorage(e))}setActiveEditor(e){this.#t!==e&&(this.#t=e,e&&this.#B(e.propertiesToUpdate))}get#me(){let e=null;for(e of this.#_);return e}updateUI(e){this.#me===e&&this.#B(e.propertiesToUpdate)}updateUIForDefaultProperties(e){this.#B(e.defaultPropertiesToUpdate)}toggleSelected(e){if(this.#_.has(e)){this.#_.delete(e),e.unselect(),this.#C({hasSelectedEditor:this.hasSelection});return}this.#_.add(e),e.select(),this.#B(e.propertiesToUpdate),this.#C({hasSelectedEditor:!0})}setSelected(e){this.updateToolbar({mode:e.mode,editId:e.id}),this.#d?.commitOrRemove();for(let n of this.#_)n!==e&&n.unselect();this.#_.clear(),this.#_.add(e),e.select(),this.#B(e.propertiesToUpdate),this.#C({hasSelectedEditor:!0})}isSelected(e){return this.#_.has(e)}get firstSelectedEditor(){return this.#_.values().next().value}unselect(e){e.unselect(),this.#_.delete(e),this.#C({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#_.size!==0}get isEnterHandled(){return this.#_.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#c.undo(),this.#C({hasSomethingToUndo:this.#c.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#J()}),this._editorUndoBar?.hide()}redo(){this.#c.redo(),this.#C({hasSomethingToUndo:!0,hasSomethingToRedo:this.#c.hasSomethingToRedo(),isEmpty:this.#J()})}addCommands(e){this.#c.add(e),this.#C({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#J()})}cleanUndoStack(e){this.#c.cleanType(e)}#J(){if(this.#n.size===0)return!0;if(this.#n.size===1)for(let e of this.#n.values())return e.isEmpty();return!1}delete(){this.commitOrRemove();let e=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!e)return;let n=e?[e]:[...this.#_],r=()=>{this._editorUndoBar?.show(i,n.length===1?n[0].editorType:n.length);for(let o of n)o.remove()},i=()=>{for(let o of n)this.#re(o)};this.addCommands({cmd:r,undo:i,mustExec:!0})}commitOrRemove(){this.#t?.commitOrRemove()}hasSomethingToControl(){return this.#t||this.hasSelection}#oe(e){for(let n of this.#_)n.unselect();this.#_.clear();for(let n of e)n.isEmpty()||(this.#_.add(n),n.select());this.#C({hasSelectedEditor:this.hasSelection})}selectAll(){for(let e of this.#_)e.commit();this.#oe(this.#n.values())}unselectAll(){if(!(this.#t&&(this.#t.commitOrRemove(),this.#A!==ze.NONE))&&!this.#d?.commitOrRemove()&&this.hasSelection){for(let e of this.#_)e.unselect();this.#_.clear(),this.#C({hasSelectedEditor:!1})}}translateSelectedEditors(e,n,r=!1){if(r||this.commitOrRemove(),!this.hasSelection)return;this.#F[0]+=e,this.#F[1]+=n;let[i,o]=this.#F,a=[...this.#_],s=1e3;this.#M&&clearTimeout(this.#M),this.#M=setTimeout(()=>{this.#M=null,this.#F[0]=this.#F[1]=0,this.addCommands({cmd:()=>{for(let l of a)this.#n.has(l.id)&&(l.translateInPage(i,o),l.translationDone())},undo:()=>{for(let l of a)this.#n.has(l.id)&&(l.translateInPage(-i,-o),l.translationDone())},mustExec:!1})},s);for(let l of a)l.translateInPage(e,n),l.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#p=new Map;for(let e of this.#_)this.#p.set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#p)return!1;this.disableUserSelect(!1);let e=this.#p;this.#p=null;let n=!1;for(let[{x:i,y:o,pageIndex:a},s]of e)s.newX=i,s.newY=o,s.newPageIndex=a,n||=i!==s.savedX||o!==s.savedY||a!==s.savedPageIndex;if(!n)return!1;let r=(i,o,a,s)=>{if(this.#n.has(i.id)){let l=this.#a.get(s);l?i._setParentAndPosition(l,o,a):(i.pageIndex=s,i.x=o,i.y=a)}};return this.addCommands({cmd:()=>{for(let[i,{newX:o,newY:a,newPageIndex:s}]of e)r(i,o,a,s)},undo:()=>{for(let[i,{savedX:o,savedY:a,savedPageIndex:s}]of e)r(i,o,a,s)},mustExec:!0}),!0}dragSelectedEditors(e,n){if(this.#p)for(let r of this.#p.keys())r.drag(e,n)}rebuild(e){if(e.parent===null){let n=this.getLayer(e.pageIndex);n?(n.changeParent(e),n.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild())}else e.parent.addOrRebuild(e)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#_.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(e){return this.#t===e}getActive(){return this.#t}getMode(){return this.#A}isEditingMode(){return this.#A!==ze.NONE}get imageManager(){return Re(this,"imageManager",new nR)}getSelectionBoxes(e){if(!e)return null;let n=document.getSelection();for(let c=0,u=n.rangeCount;c<u;c++)if(!e.contains(n.getRangeAt(c).commonAncestorContainer))return null;let{x:r,y:i,width:o,height:a}=e.getBoundingClientRect(),s;switch(e.getAttribute("data-main-rotation")){case"90":s=(c,u,d,h)=>({x:(u-i)/a,y:1-(c+d-r)/o,width:h/a,height:d/o});break;case"180":s=(c,u,d,h)=>({x:1-(c+d-r)/o,y:1-(u+h-i)/a,width:d/o,height:h/a});break;case"270":s=(c,u,d,h)=>({x:1-(u+h-i)/a,y:(c-r)/o,width:h/a,height:d/o});break;default:s=(c,u,d,h)=>({x:(c-r)/o,y:(u-i)/a,width:d/o,height:h/a});break}let l=[];for(let c=0,u=n.rangeCount;c<u;c++){let d=n.getRangeAt(c);if(!d.collapsed)for(let{x:h,y:f,width:m,height:g}of d.getClientRects())m===0||g===0||l.push(s(h,f,m,g))}return l.length===0?null:l}addChangedExistingAnnotation({annotationElementId:e,id:n}){(this.#s||=new Map).set(e,n)}removeChangedExistingAnnotation({annotationElementId:e}){this.#s?.delete(e)}renderAnnotationElement(e){let n=this.#s?.get(e.data.id);if(!n)return;let r=this.#o.getRawValue(n);r&&(this.#A===ze.NONE&&!r.hasBeenModified||r.renderAnnotationElement(e))}setMissingCanvas(e,n,r){let i=this.#N?.get(e);i&&(i.setCanvas(n,r),this.#N.delete(e))}addMissingCanvas(e,n){(this.#N||=new Map).set(e,n)}},wS=class t{#e=null;#t=!1;#i=null;#n=null;#a=null;#r=null;#o=!1;#s=null;#c=null;#l=null;#h=null;#d=!1;static#f=null;static _l10n=null;constructor(e){this.#c=e,this.#d=e._uiManager.useNewAltTextFlow,t.#f||=Object.freeze({added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(e){t._l10n??=e}async render(){let e=this.#i=document.createElement("button");e.className="altText",e.tabIndex="0";let n=this.#n=document.createElement("span");e.append(n),this.#d?(e.classList.add("new"),e.setAttribute("data-l10n-id",t.#f.missing),n.setAttribute("data-l10n-id",t.#f["missing-label"])):(e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),n.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));let r=this.#c._uiManager._signal;e.addEventListener("contextmenu",Vi,{signal:r}),e.addEventListener("pointerdown",o=>o.stopPropagation(),{signal:r});let i=o=>{o.preventDefault(),this.#c._uiManager.editAltText(this.#c),this.#d&&this.#c._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#g}})};return e.addEventListener("click",i,{capture:!0,signal:r}),e.addEventListener("keydown",o=>{o.target===e&&o.key==="Enter"&&(this.#o=!0,i(o))},{signal:r}),await this.#p(),e}get#g(){return this.#e&&"added"||this.#e===null&&this.guessedText&&"review"||"missing"}finish(){this.#i&&(this.#i.focus({focusVisible:this.#o}),this.#o=!1)}isEmpty(){return this.#d?this.#e===null:!this.#e&&!this.#t}hasData(){return this.#d?this.#e!==null||!!this.#l:this.isEmpty()}get guessedText(){return this.#l}async setGuessedText(e){this.#e===null&&(this.#l=e,this.#h=await t._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:e}),this.#p())}toggleAltTextBadge(e=!1){if(!this.#d||this.#e){this.#s?.remove(),this.#s=null;return}if(!this.#s){let n=this.#s=document.createElement("div");n.className="noAltTextBadge",this.#c.div.append(n)}this.#s.classList.toggle("hidden",!e)}serialize(e){let n=this.#e;return!e&&this.#l===n&&(n=this.#h),{altText:n,decorative:this.#t,guessedText:this.#l,textWithDisclaimer:this.#h}}get data(){return{altText:this.#e,decorative:this.#t}}set data({altText:e,decorative:n,guessedText:r,textWithDisclaimer:i,cancel:o=!1}){r&&(this.#l=r,this.#h=i),!(this.#e===e&&this.#t===n)&&(o||(this.#e=e,this.#t=n),this.#p())}toggle(e=!1){this.#i&&(!e&&this.#r&&(clearTimeout(this.#r),this.#r=null),this.#i.disabled=!e)}shown(){this.#c._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#g}})}destroy(){this.#i?.remove(),this.#i=null,this.#n=null,this.#a=null,this.#s?.remove(),this.#s=null}async#p(){let e=this.#i;if(!e)return;if(this.#d){if(e.classList.toggle("done",!!this.#e),e.setAttribute("data-l10n-id",t.#f[this.#g]),this.#n?.setAttribute("data-l10n-id",t.#f[`${this.#g}-label`]),!this.#e){this.#a?.remove();return}}else{if(!this.#e&&!this.#t){e.classList.remove("done"),this.#a?.remove();return}e.classList.add("done"),e.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let n=this.#a;if(!n){this.#a=n=document.createElement("span"),n.className="tooltip",n.setAttribute("role","tooltip"),n.id=`alt-text-tooltip-${this.#c.id}`;let i=100,o=this.#c._uiManager._signal;o.addEventListener("abort",()=>{clearTimeout(this.#r),this.#r=null},{once:!0}),e.addEventListener("mouseenter",()=>{this.#r=setTimeout(()=>{this.#r=null,this.#a.classList.add("show"),this.#c._reportTelemetry({action:"alt_text_tooltip"})},i)},{signal:o}),e.addEventListener("mouseleave",()=>{this.#r&&(clearTimeout(this.#r),this.#r=null),this.#a?.classList.remove("show")},{signal:o})}this.#t?n.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(n.removeAttribute("data-l10n-id"),n.textContent=this.#e),n.parentNode||e.append(n),this.#c.getElementForAltText()?.setAttribute("aria-describedby",n.id)}},nu=class{#e=null;#t=null;#i=!1;#n=null;#a=null;#r=null;#o=null;#s=null;#c=!1;#l=null;constructor(e){this.#n=e}renderForToolbar(){let e=this.#t=document.createElement("button");return e.className="comment",this.#h(e,!1)}renderForStandalone(){let e=this.#e=document.createElement("button");e.className="annotationCommentButton";let n=this.#n.commentButtonPosition;if(n){let{style:r}=e;r.insetInlineEnd=`calc(${100*(this.#n._uiManager.direction==="ltr"?1-n[0]:n[0])}% - var(--comment-button-dim))`,r.top=`calc(${100*n[1]}% - var(--comment-button-dim))`;let i=this.#n.commentButtonColor;i&&(r.backgroundColor=i)}return this.#h(e,!0)}focusButton(){setTimeout(()=>{(this.#e??this.#t)?.focus()},0)}onUpdatedColor(){if(!this.#e)return;let e=this.#n.commentButtonColor;e&&(this.#e.style.backgroundColor=e),this.#n._uiManager.updatePopupColor(this.#n)}get commentButtonWidth(){return(this.#e?.getBoundingClientRect().width??0)/this.#n.parent.boundingClientRect.width}get commentPopupPositionInLayer(){if(this.#l)return this.#l;if(!this.#e)return null;let{x:e,y:n,height:r}=this.#e.getBoundingClientRect(),{x:i,y:o,width:a,height:s}=this.#n.parent.boundingClientRect;return[(e-i)/a,(n+r-o)/s]}set commentPopupPositionInLayer(e){this.#l=e}hasDefaultPopupPosition(){return this.#l===null}removeStandaloneCommentButton(){this.#e?.remove(),this.#e=null}removeToolbarCommentButton(){this.#t?.remove(),this.#t=null}setCommentButtonStates({selected:e,hasPopup:n}){this.#e&&(this.#e.classList.toggle("selected",e),this.#e.ariaExpanded=n)}#h(e,n){if(!this.#n._uiManager.hasCommentManager())return null;e.tabIndex="0",e.ariaHasPopup="dialog",n?(e.ariaControls="commentPopup",e.setAttribute("data-l10n-id","pdfjs-show-comment-button")):(e.ariaControlsElements=[this.#n._uiManager.getCommentDialogElement()],e.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button"));let r=this.#n._uiManager._signal;if(!(r instanceof AbortSignal)||r.aborted)return e;e.addEventListener("contextmenu",Vi,{signal:r}),n&&(e.addEventListener("focusin",o=>{this.#n._focusEventsAllowed=!1,At(o)},{capture:!0,signal:r}),e.addEventListener("focusout",o=>{this.#n._focusEventsAllowed=!0,At(o)},{capture:!0,signal:r})),e.addEventListener("pointerdown",o=>o.stopPropagation(),{signal:r});let i=o=>{o.preventDefault(),e===this.#t?this.edit():this.#n.toggleComment(!0)};return e.addEventListener("click",i,{capture:!0,signal:r}),e.addEventListener("keydown",o=>{o.target===e&&o.key==="Enter"&&(this.#i=!0,i(o))},{signal:r}),e.addEventListener("pointerenter",()=>{this.#n.toggleComment(!1,!0)},{signal:r}),e.addEventListener("pointerleave",()=>{this.#n.toggleComment(!1,!1)},{signal:r}),e}edit(e){let n=this.commentPopupPositionInLayer,r,i;if(n)[r,i]=n;else{[r,i]=this.#n.commentButtonPosition;let{width:u,height:d,x:h,y:f}=this.#n;r=h+r*u,i=f+i*d}let o=this.#n.parent.boundingClientRect,{x:a,y:s,width:l,height:c}=o;this.#n._uiManager.editComment(this.#n,a+r*l,s+i*c,{...e,parentDimensions:o})}finish(){this.#t&&(this.#t.focus({focusVisible:this.#i}),this.#i=!1)}isDeleted(){return this.#c||this.#o===""}isEmpty(){return this.#o===null}hasBeenEdited(){return this.isDeleted()||this.#o!==this.#a}serialize(){return this.data}get data(){return{text:this.#o,richText:this.#r,date:this.#s,deleted:this.isDeleted()}}set data(e){if(e!==this.#o&&(this.#r=null),e===null){this.#o="",this.#c=!0;return}this.#o=e,this.#s=new Date,this.#c=!1}setInitialText(e,n=null){this.#a=e,this.data=e,this.#s=null,this.#r=n}shown(){}destroy(){this.#t?.remove(),this.#t=null,this.#e?.remove(),this.#e=null,this.#o="",this.#r=null,this.#s=null,this.#n=null,this.#i=!1,this.#c=!1}},xS=class t{#e;#t=!1;#i=null;#n;#a;#r;#o;#s=null;#c;#l=null;#h;#d=null;constructor({container:e,isPinchingDisabled:n=null,isPinchingStopped:r=null,onPinchStart:i=null,onPinching:o=null,onPinchEnd:a=null,signal:s}){this.#e=e,this.#i=r,this.#n=n,this.#a=i,this.#r=o,this.#o=a,this.#h=new AbortController,this.#c=AbortSignal.any([s,this.#h.signal]),e.addEventListener("touchstart",this.#f.bind(this),{passive:!1,signal:this.#c})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/xo.pixelRatio}#f(e){if(this.#n?.())return;if(e.touches.length===1){if(this.#s)return;let i=this.#s=new AbortController,o=AbortSignal.any([this.#c,i.signal]),a=this.#e,s={capture:!0,signal:o,passive:!1},l=c=>{c.pointerType==="touch"&&(this.#s?.abort(),this.#s=null)};a.addEventListener("pointerdown",c=>{c.pointerType==="touch"&&(At(c),l(c))},s),a.addEventListener("pointerup",l,s),a.addEventListener("pointercancel",l,s);return}if(!this.#d){this.#d=new AbortController;let i=AbortSignal.any([this.#c,this.#d.signal]),o=this.#e,a={signal:i,capture:!1,passive:!1};o.addEventListener("touchmove",this.#g.bind(this),a);let s=this.#p.bind(this);o.addEventListener("touchend",s,a),o.addEventListener("touchcancel",s,a),a.capture=!0,o.addEventListener("pointerdown",At,a),o.addEventListener("pointermove",At,a),o.addEventListener("pointercancel",At,a),o.addEventListener("pointerup",At,a),this.#a?.()}if(At(e),e.touches.length!==2||this.#i?.()){this.#l=null;return}let[n,r]=e.touches;n.identifier>r.identifier&&([n,r]=[r,n]),this.#l={touch0X:n.screenX,touch0Y:n.screenY,touch1X:r.screenX,touch1Y:r.screenY}}#g(e){if(!this.#l||e.touches.length!==2)return;At(e);let[n,r]=e.touches;n.identifier>r.identifier&&([n,r]=[r,n]);let{screenX:i,screenY:o}=n,{screenX:a,screenY:s}=r,l=this.#l,{touch0X:c,touch0Y:u,touch1X:d,touch1Y:h}=l,f=d-c,m=h-u,g=a-i,y=s-o,v=Math.hypot(g,y)||1,b=Math.hypot(f,m)||1;if(!this.#t&&Math.abs(b-v)<=t.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(l.touch0X=i,l.touch0Y=o,l.touch1X=a,l.touch1Y=s,!this.#t){this.#t=!0;return}let S=[(i+a)/2,(o+s)/2];this.#r?.(S,b,v)}#p(e){e.touches.length>=2||(this.#d&&(this.#d.abort(),this.#d=null,this.#o?.()),this.#l&&(At(e),this.#l=null,this.#t=!1))}destroy(){this.#h?.abort(),this.#h=null,this.#s?.abort(),this.#s=null}},at=class t{#e=null;#t=null;#i=null;#n=null;#a=null;#r=!1;#o=null;#s="";#c=null;#l=null;#h=null;#d=null;#f=null;#g="";#p=!1;#u=null;#m=!1;#v=!1;#y=!1;#b=null;#T=0;#x=0;#S=null;#E=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=Object.create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#w=!1;#z=t._zIndex++;static _borderLineWidth=-1;static _colorManager=new rR;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){let e=t.prototype._resizeWithKeyboard,n=Hs.TRANSLATE_SMALL,r=Hs.TRANSLATE_BIG;return Re(this,"_resizerKeyboardManager",new Bs([[["ArrowLeft","mac+ArrowLeft"],e,{args:[-n,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e,{args:[-r,0]}],[["ArrowRight","mac+ArrowRight"],e,{args:[n,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e,{args:[r,0]}],[["ArrowUp","mac+ArrowUp"],e,{args:[0,-n]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e,{args:[0,-r]}],[["ArrowDown","mac+ArrowDown"],e,{args:[0,n]}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e,{args:[0,r]}],[["Escape","mac+Escape"],t.prototype._stopResizingWithKeyboard]]))}constructor(e){this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null,this.annotationElementId=e.annotationElementId||null,this.creationDate=e.creationDate||new Date,this.modificationDate=e.modificationDate||null;let{rotation:n,rawDims:{pageWidth:r,pageHeight:i,pageX:o,pageY:a}}=this.parent.viewport;this.rotation=n,this.pageRotation=(360+n-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[r,i],this.pageTranslation=[o,a];let[s,l]=this.parentDimensions;this.x=e.x/s,this.y=e.y/l,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return Re(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){let n=new oR({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});n.annotationElementId=e.annotationElementId,n.deleted=!0,n._uiManager.addToAnnotationStorage(n)}static initialize(e,n){if(t._l10n??=e,t._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),t._borderLineWidth!==-1)return;let r=getComputedStyle(document.documentElement);t._borderLineWidth=parseFloat(r.getPropertyValue("--outline-width"))||0}static updateDefaultParams(e,n){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,n){rt("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#w}set _isDraggable(e){this.#w=e,this.div?.classList.toggle("draggable",e)}get uid(){return this.annotationElementId||this.id}get isEnterHandled(){return!0}center(){let[e,n]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*n/(e*2),this.y+=this.width*e/(n*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*n/(e*2),this.y-=this.width*e/(n*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#z}setParent(e){e!==null?(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions):(this.#M(),this.#d?.remove(),this.#d=null),this.parent=e}focusin(e){this._focusEventsAllowed&&(this.#p?this.#p=!1:this.parent.setSelected(this))}focusout(e){!this._focusEventsAllowed||!this.isAttachedToDOM||e.relatedTarget?.closest(`#${this.id}`)||(e.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,n,r,i){let[o,a]=this.parentDimensions;[r,i]=this.screenToPageTranslation(r,i),this.x=(e+r)/o,this.y=(n+i)/a,this.fixAndSetPosition()}_moveAfterPaste(e,n){let[r,i]=this.parentDimensions;this.setAt(e*r,n*i,this.width*r,this.height*i),this._onTranslated()}#R([e,n],r,i){[r,i]=this.screenToPageTranslation(r,i),this.x+=r/e,this.y+=i/n,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(e,n){this.#R(this.parentDimensions,e,n)}translateInPage(e,n){this.#u||=[this.x,this.y,this.width,this.height],this.#R(this.pageDimensions,e,n),this.div.scrollIntoView({block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(e,n){this.#u||=[this.x,this.y,this.width,this.height];let{div:r,parentDimensions:[i,o]}=this;if(this.x+=e/i,this.y+=n/o,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){let{x:d,y:h}=this.div.getBoundingClientRect();this.parent.findNewParent(this,d,h)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:a,y:s}=this,[l,c]=this.getBaseTranslation();a+=l,s+=c;let{style:u}=r;u.left=`${(100*a).toFixed(2)}%`,u.top=`${(100*s).toFixed(2)}%`,this._onTranslating(a,s),r.scrollIntoView({block:"nearest"})}_onTranslating(e,n){}_onTranslated(e,n){}get _hasBeenMoved(){return!!this.#u&&(this.#u[0]!==this.x||this.#u[1]!==this.y)}get _hasBeenResized(){return!!this.#u&&(this.#u[2]!==this.width||this.#u[3]!==this.height)}getBaseTranslation(){let[e,n]=this.parentDimensions,{_borderLineWidth:r}=t,i=r/e,o=r/n;switch(this.rotation){case 90:return[-i,o];case 180:return[i,o];case 270:return[i,-o];default:return[-i,-o]}}get _mustFixPosition(){return!0}fixAndSetPosition(e=this.rotation){let{div:{style:n},pageDimensions:[r,i]}=this,{x:o,y:a,width:s,height:l}=this;if(s*=r,l*=i,o*=r,a*=i,this._mustFixPosition)switch(e){case 0:o=Pn(o,0,r-s),a=Pn(a,0,i-l);break;case 90:o=Pn(o,0,r-l),a=Pn(a,s,i);break;case 180:o=Pn(o,s,r),a=Pn(a,l,i);break;case 270:o=Pn(o,l,r),a=Pn(a,0,i-s);break}this.x=o/=r,this.y=a/=i;let[c,u]=this.getBaseTranslation();o+=c,a+=u,n.left=`${(100*o).toFixed(2)}%`,n.top=`${(100*a).toFixed(2)}%`,this.moveInDOM()}static#$(e,n,r){switch(r){case 90:return[n,-e];case 180:return[-e,-n];case 270:return[-n,e];default:return[e,n]}}screenToPageTranslation(e,n){return t.#$(e,n,this.parentRotation)}pageTranslationToScreen(e,n){return t.#$(e,n,360-this.parentRotation)}#k(e){switch(e){case 90:{let[n,r]=this.pageDimensions;return[0,-n/r,r/n,0]}case 180:return[-1,0,0,-1];case 270:{let[n,r]=this.pageDimensions;return[0,n/r,-r/n,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(){let{parentScale:e,pageDimensions:[n,r]}=this;return[n*e,r*e]}setDims(){let{div:{style:e},width:n,height:r}=this;e.width=`${(100*n).toFixed(2)}%`,e.height=`${(100*r).toFixed(2)}%`}getInitialTranslation(){return[0,0]}#D(){if(this.#c)return;this.#c=document.createElement("div"),this.#c.classList.add("resizers");let e=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],n=this._uiManager._signal;for(let r of e){let i=document.createElement("div");this.#c.append(i),i.classList.add("resizer",r),i.setAttribute("data-resizer-name",r),i.addEventListener("pointerdown",this.#I.bind(this,r),{signal:n}),i.addEventListener("contextmenu",Vi,{signal:n}),i.tabIndex=-1}this.div.prepend(this.#c)}#I(e,n){n.preventDefault();let{isMac:r}=Vt.platform;if(n.button!==0||n.ctrlKey&&r)return;this.#i?.toggle(!1);let i=this._isDraggable;this._isDraggable=!1,this.#l=[n.screenX,n.screenY];let o=new AbortController,a=this._uiManager.combinedSignal(o);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#N.bind(this,e),{passive:!0,capture:!0,signal:a}),window.addEventListener("touchmove",At,{passive:!1,signal:a}),window.addEventListener("contextmenu",Vi,{signal:a}),this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};let s=this.parent.div.style.cursor,l=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(n.target).cursor;let c=()=>{o.abort(),this.parent.togglePointerEvents(!0),this.#i?.toggle(!0),this._isDraggable=i,this.parent.div.style.cursor=s,this.div.style.cursor=l,this.#L()};window.addEventListener("pointerup",c,{signal:a}),window.addEventListener("blur",c,{signal:a})}#O(e,n,r,i){this.width=r,this.height=i,this.x=e,this.y=n,this.setDims(),this.fixAndSetPosition(),this._onResized()}_onResized(){}#L(){if(!this.#h)return;let{savedX:e,savedY:n,savedWidth:r,savedHeight:i}=this.#h;this.#h=null;let o=this.x,a=this.y,s=this.width,l=this.height;o===e&&a===n&&s===r&&l===i||this.addCommands({cmd:this.#O.bind(this,o,a,s,l),undo:this.#O.bind(this,e,n,r,i),mustExec:!0})}static _round(e){return Math.round(e*1e4)/1e4}#N(e,n){let[r,i]=this.parentDimensions,o=this.x,a=this.y,s=this.width,l=this.height,c=t.MIN_SIZE/r,u=t.MIN_SIZE/i,d=this.#k(this.rotation),h=(ae,oe)=>[d[0]*ae+d[2]*oe,d[1]*ae+d[3]*oe],f=this.#k(360-this.rotation),m=(ae,oe)=>[f[0]*ae+f[2]*oe,f[1]*ae+f[3]*oe],g,y,v=!1,b=!1;switch(e){case"topLeft":v=!0,g=(ae,oe)=>[0,0],y=(ae,oe)=>[ae,oe];break;case"topMiddle":g=(ae,oe)=>[ae/2,0],y=(ae,oe)=>[ae/2,oe];break;case"topRight":v=!0,g=(ae,oe)=>[ae,0],y=(ae,oe)=>[0,oe];break;case"middleRight":b=!0,g=(ae,oe)=>[ae,oe/2],y=(ae,oe)=>[0,oe/2];break;case"bottomRight":v=!0,g=(ae,oe)=>[ae,oe],y=(ae,oe)=>[0,0];break;case"bottomMiddle":g=(ae,oe)=>[ae/2,oe],y=(ae,oe)=>[ae/2,0];break;case"bottomLeft":v=!0,g=(ae,oe)=>[0,oe],y=(ae,oe)=>[ae,0];break;case"middleLeft":b=!0,g=(ae,oe)=>[0,oe/2],y=(ae,oe)=>[ae,oe/2];break}let S=g(s,l),_=y(s,l),T=h(..._),x=t._round(o+T[0]),E=t._round(a+T[1]),C=1,I=1,L,G;if(n.fromKeyboard)({deltaX:L,deltaY:G}=n);else{let{screenX:ae,screenY:oe}=n,[Se,nt]=this.#l;[L,G]=this.screenToPageTranslation(ae-Se,oe-nt),this.#l[0]=ae,this.#l[1]=oe}if([L,G]=m(L/r,G/i),v){let ae=Math.hypot(s,l);C=I=Math.max(Math.min(Math.hypot(_[0]-S[0]-L,_[1]-S[1]-G)/ae,1/s,1/l),c/s,u/l)}else b?C=Pn(Math.abs(_[0]-S[0]-L),c,1)/s:I=Pn(Math.abs(_[1]-S[1]-G),u,1)/l;let ge=t._round(s*C),de=t._round(l*I);T=h(...y(ge,de));let pe=x-T[0],Ee=E-T[1];this.#u||=[this.x,this.y,this.width,this.height],this.width=ge,this.height=de,this.x=pe,this.y=Ee,this.setDims(),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#i?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#v)return this._editToolbar;this._editToolbar=new Qk(this),this.div.append(this._editToolbar.render());let{toolbarButtons:e}=this;if(e)for(let[n,r]of e)await this._editToolbar.addButton(n,r);return this.hasComment||this._editToolbar.addButton("comment",this.addCommentButton()),this._editToolbar.addButton("delete"),this._editToolbar}addCommentButtonInToolbar(){this._editToolbar?.addButtonBefore("comment",this.addCommentButton(),".deleteButton")}removeCommentButtonFromToolbar(){this._editToolbar?.removeButton("comment")}removeEditToolbar(){this._editToolbar?.remove(),this._editToolbar=null,this.#i?.destroy()}addContainer(e){let n=this._editToolbar?.div;n?n.before(e):this.div.append(e)}getClientDimensions(){return this.div.getBoundingClientRect()}createAltText(){return this.#i||(wS.initialize(t._l10n),this.#i=new wS(this),this.#e&&(this.#i.data=this.#e,this.#e=null)),this.#i}get altTextData(){return this.#i?.data}set altTextData(e){this.#i&&(this.#i.data=e)}get guessedAltText(){return this.#i?.guessedText}async setGuessedAltText(e){await this.#i?.setGuessedText(e)}serializeAltText(e){return this.#i?.serialize(e)}hasAltText(){return!!this.#i&&!this.#i.isEmpty()}hasAltTextData(){return this.#i?.hasData()??!1}focusCommentButton(){this.#n?.focusButton()}addCommentButton(){return this.#n||=new nu(this)}addStandaloneCommentButton(){if(this.#a){this._uiManager.isEditingMode()&&this.#a.classList.remove("hidden");return}this.hasComment&&(this.#a=this.#n.renderForStandalone(),this.div.append(this.#a))}removeStandaloneCommentButton(){this.#n.removeStandaloneCommentButton(),this.#a=null}hideStandaloneCommentButton(){this.#a?.classList.add("hidden")}get comment(){let{data:{richText:e,text:n,date:r,deleted:i}}=this.#n;return{text:n,richText:e,date:r,deleted:i,color:this.getNonHCMColor(),opacity:this.opacity??1}}set comment(e){this.#n||=new nu(this),this.#n.data=e,this.hasComment?(this.removeCommentButtonFromToolbar(),this.addStandaloneCommentButton(),this._uiManager.updateComment(this)):(this.addCommentButtonInToolbar(),this.removeStandaloneCommentButton(),this._uiManager.removeComment(this))}setCommentData({comment:e,popupRef:n,richText:r}){if(!n||(this.#n||=new nu(this),this.#n.setInitialText(e,r),!this.annotationElementId))return;let i=this._uiManager.getAndRemoveDataFromAnnotationStorage(this.annotationElementId);i&&this.updateFromAnnotationLayer(i)}get hasEditedComment(){return this.#n?.hasBeenEdited()}get hasDeletedComment(){return this.#n?.isDeleted()}get hasComment(){return!!this.#n&&!this.#n.isEmpty()&&!this.#n.isDeleted()}async editComment(e){this.#n||=new nu(this),this.#n.edit(e)}toggleComment(e,n=void 0){this.hasComment&&this._uiManager.toggleComment(this,e,n)}setSelectedCommentButton(e){this.#n.setSelectedButton(e)}addComment(e){if(this.hasEditedComment){let[,,,i]=e.rect,[o]=this.pageDimensions,[a]=this.pageTranslation,s=a+o+1,l=i-100,c=s+180;e.popup={contents:this.comment.text,deleted:this.comment.deleted,rect:[s,l,c,i]}}}updateFromAnnotationLayer({popup:{contents:e,deleted:n}}){this.#n.data=n?null:e}get parentBoundingClientRect(){return this.parent.boundingClientRect}render(){let e=this.div=document.createElement("div");e.setAttribute("data-editor-rotation",(360-this.rotation)%360),e.className=this.name,e.setAttribute("id",this.id),e.tabIndex=this.#r?-1:0,e.setAttribute("role","application"),this.defaultL10nId&&e.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||e.classList.add("hidden"),this.setInForeground(),this.#q();let[n,r]=this.parentDimensions;this.parentRotation%180!==0&&(e.style.maxWidth=`${(100*r/n).toFixed(2)}%`,e.style.maxHeight=`${(100*n/r).toFixed(2)}%`);let[i,o]=this.getInitialTranslation();return this.translate(i,o),Q6(this,e,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#E||=new xS({container:e,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#H.bind(this),onPinching:this.#A.bind(this),onPinchEnd:this.#_.bind(this),signal:this._uiManager._signal})),this.addStandaloneCommentButton(),this._uiManager._editorUndoBar?.hide(),e}#H(){this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#i?.toggle(!1),this.parent.togglePointerEvents(!1)}#A(e,n,r){let o=.7*(r/n)+1-.7;if(o===1)return;let a=this.#k(this.rotation),s=(x,E)=>[a[0]*x+a[2]*E,a[1]*x+a[3]*E],[l,c]=this.parentDimensions,u=this.x,d=this.y,h=this.width,f=this.height,m=t.MIN_SIZE/l,g=t.MIN_SIZE/c;o=Math.max(Math.min(o,1/h,1/f),m/h,g/f);let y=t._round(h*o),v=t._round(f*o);if(y===h&&v===f)return;this.#u||=[u,d,h,f];let b=s(h/2,f/2),S=t._round(u+b[0]),_=t._round(d+b[1]),T=s(y/2,v/2);this.x=S-T[0],this.y=_-T[1],this.width=y,this.height=v,this.setDims(),this.fixAndSetPosition(),this._onResizing()}#_(){this.#i?.toggle(!0),this.parent.togglePointerEvents(!0),this.#L()}pointerdown(e){let{isMac:n}=Vt.platform;if(e.button!==0||e.ctrlKey&&n){e.preventDefault();return}if(this.#p=!0,this._isDraggable){this.#j(e);return}this.#P(e)}#P(e){let{isMac:n}=Vt.platform;e.ctrlKey&&!n||e.shiftKey||e.metaKey&&n?this.parent.toggleSelected(this):this.parent.setSelected(this)}#j(e){let{isSelected:n}=this;this._uiManager.setUpDragSession();let r=!1,i=new AbortController,o=this._uiManager.combinedSignal(i),a={capture:!0,passive:!1,signal:o},s=c=>{i.abort(),this.#o=null,this.#p=!1,this._uiManager.endDragSession()||this.#P(c),r&&this._onStopDragging()};n&&(this.#T=e.clientX,this.#x=e.clientY,this.#o=e.pointerId,this.#s=e.pointerType,window.addEventListener("pointermove",c=>{r||(r=!0,this._uiManager.toggleComment(this,!0,!1),this._onStartDragging());let{clientX:u,clientY:d,pointerId:h}=c;if(h!==this.#o){At(c);return}let[f,m]=this.screenToPageTranslation(u-this.#T,d-this.#x);this.#T=u,this.#x=d,this._uiManager.dragSelectedEditors(f,m)},a),window.addEventListener("touchmove",At,a),window.addEventListener("pointerdown",c=>{c.pointerType===this.#s&&(this.#E||c.isPrimary)&&s(c),At(c)},a));let l=c=>{if(!this.#o||this.#o===c.pointerId){s(c);return}At(c)};window.addEventListener("pointerup",l,{signal:o}),window.addEventListener("blur",l,{signal:o})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#b&&clearTimeout(this.#b),this.#b=setTimeout(()=>{this.#b=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(e,n,r){e.changeParent(this),this.x=n,this.y=r,this.fixAndSetPosition(),this._onTranslated()}getRect(e,n,r=this.rotation){let i=this.parentScale,[o,a]=this.pageDimensions,[s,l]=this.pageTranslation,c=e/i,u=n/i,d=this.x*o,h=this.y*a,f=this.width*o,m=this.height*a;switch(r){case 0:return[d+c+s,a-h-u-m+l,d+c+f+s,a-h-u+l];case 90:return[d+u+s,a-h+c+l,d+u+m+s,a-h+c+f+l];case 180:return[d-c-f+s,a-h+u+l,d-c+s,a-h+u+m+l];case 270:return[d-u-m+s,a-h-c-f+l,d-u+s,a-h-c+l];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,n){let[r,i,o,a]=e,s=o-r,l=a-i;switch(this.rotation){case 0:return[r,n-a,s,l];case 90:return[r,n-i,l,s];case 180:return[o,n-i,s,l];case 270:return[o,n-a,l,s];default:throw new Error("Invalid rotation")}}getPDFRect(){return this.getRect(0,0)}getNonHCMColor(){return this.color&&t._colorManager.convert(this._uiManager.getNonHCMColor(this.color))}onUpdatedColor(){this.#n?.onUpdatedColor()}getData(){let{comment:{text:e,color:n,date:r,opacity:i,deleted:o,richText:a},uid:s,pageIndex:l,creationDate:c,modificationDate:u}=this;return{id:s,pageIndex:l,rect:this.getPDFRect(),richText:a,contentsObj:{str:e},creationDate:c,modificationDate:r||u,popupRef:!o,color:n,opacity:i}}onceAdded(e){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),this.#v=!0,!0)}disableEditMode(){return this.isInEditMode()?(this.parent.setEditingState(!0),this.#v=!1,!0):!1}isInEditMode(){return this.#v}shouldGetKeyboardEvents(){return this.#y}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){let{top:e,left:n,bottom:r,right:i}=this.getClientDimensions(),{innerHeight:o,innerWidth:a}=window;return n<a&&i>0&&e<o&&r>0}#q(){if(this.#f||!this.div)return;this.#f=new AbortController;let e=this._uiManager.combinedSignal(this.#f);this.div.addEventListener("focusin",this.focusin.bind(this),{signal:e}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal:e})}rebuild(){this.#q()}rotate(e){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(e=!1,n=null){return{annotationType:this.mode,pageIndex:this.pageIndex,rect:this.getPDFRect(),rotation:this.rotation,structTreeParentId:this._structTreeParentId,popupRef:this._initialData?.popupRef||""}}static async deserialize(e,n,r){let i=new this.prototype.constructor({parent:n,id:n.getNextId(),uiManager:r,annotationElementId:e.annotationElementId,creationDate:e.creationDate,modificationDate:e.modificationDate});i.rotation=e.rotation,i.#e=e.accessibilityData,i._isCopy=e.isCopy||!1;let[o,a]=i.pageDimensions,[s,l,c,u]=i.getRectInCurrentCoords(e.rect,a);return i.x=s/o,i.y=l/a,i.width=c/o,i.height=u/a,i}get hasBeenModified(){return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#f?.abort(),this.#f=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#b&&(clearTimeout(this.#b),this.#b=null),this.#M(),this.removeEditToolbar(),this.#S){for(let e of this.#S.values())clearTimeout(e);this.#S=null}this.parent=null,this.#E?.destroy(),this.#E=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#D(),this.#c.classList.remove("hidden"))}get toolbarPosition(){return null}get commentButtonPosition(){return this._uiManager.direction==="ltr"?[1,0]:[0,0]}get commentButtonPositionInPage(){let{commentButtonPosition:[e,n]}=this,[r,i,o,a]=this.getPDFRect();return[t._round(r+(o-r)*e),t._round(i+(a-i)*(1-n))]}get commentButtonColor(){return this._uiManager.makeCommentColor(this.getNonHCMColor(),this.opacity)}get commentPopupPosition(){return this.#n.commentPopupPositionInLayer}set commentPopupPosition(e){this.#n.commentPopupPositionInLayer=e}hasDefaultPopupPosition(){return this.#n.hasDefaultPopupPosition()}get commentButtonWidth(){return this.#n.commentButtonWidth}get elementBeforePopup(){return this.div}setCommentButtonStates(e){this.#n.setCommentButtonStates(e)}keydown(e){if(!this.isResizable||e.target!==this.div||e.key!=="Enter")return;this._uiManager.setSelected(this),this.#h={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};let n=this.#c.children;if(!this.#t){this.#t=Array.from(n);let a=this.#G.bind(this),s=this.#Z.bind(this),l=this._uiManager._signal;for(let c of this.#t){let u=c.getAttribute("data-resizer-name");c.setAttribute("role","spinbutton"),c.addEventListener("keydown",a,{signal:l}),c.addEventListener("blur",s,{signal:l}),c.addEventListener("focus",this.#K.bind(this,u),{signal:l}),c.setAttribute("data-l10n-id",t._l10nResizer[u])}}let r=this.#t[0],i=0;for(let a of n){if(a===r)break;i++}let o=(360-this.rotation+this.parentRotation)%360/90*(this.#t.length/4);if(o!==i){if(o<i)for(let s=0;s<i-o;s++)this.#c.append(this.#c.firstChild);else if(o>i)for(let s=0;s<o-i;s++)this.#c.firstChild.before(this.#c.lastChild);let a=0;for(let s of n){let c=this.#t[a++].getAttribute("data-resizer-name");s.setAttribute("data-l10n-id",t._l10nResizer[c])}}this.#F(0),this.#y=!0,this.#c.firstChild.focus({focusVisible:!0}),e.preventDefault(),e.stopImmediatePropagation()}#G(e){t._resizerKeyboardManager.exec(this,e)}#Z(e){this.#y&&e.relatedTarget?.parentNode!==this.#c&&this.#M()}#K(e){this.#g=this.#y?e:""}#F(e){if(this.#t)for(let n of this.#t)n.tabIndex=e}_resizeWithKeyboard(e,n){this.#y&&this.#N(this.#g,{deltaX:e,deltaY:n,fromKeyboard:!0})}#M(){this.#y=!1,this.#F(-1),this.#L()}_stopResizingWithKeyboard(){this.#M(),this.div.focus()}select(){if(this.isSelected&&this._editToolbar){this._editToolbar.show();return}if(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()});return}this._editToolbar?.show(),this.#i?.toggleAltTextBadge(!1)}focus(){this.div&&!this.div.contains(document.activeElement)&&setTimeout(()=>this.div?.focus({preventScroll:!0}),0)}unselect(){this.isSelected&&(this.isSelected=!1,this.#c?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#i?.toggleAltTextBadge(!0),this.hasComment&&this._uiManager.toggleComment(this,!1,!1))}updateParams(e,n){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(e){e.target.nodeName!=="BUTTON"&&(this.enterInEditMode(),this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id}))}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#m}set isEditing(e){this.#m=e,this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(e,n=!1){if(n){this.#S||=new Map;let{action:r}=e,i=this.#S.get(r);i&&clearTimeout(i),i=setTimeout(()=>{this._reportTelemetry(e),this.#S.delete(r),this.#S.size===0&&(this.#S=null)},t._telemetryTimeout),this.#S.set(r,i);return}e.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:e}})}show(e=this._isVisible){this.div.classList.toggle("hidden",!e),this._isVisible=e}enable(){this.div&&(this.div.tabIndex=0),this.#r=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#r=!0}updateFakeAnnotationElement(e){if(!this.#d&&!this.deleted){this.#d=e.addFakeAnnotation(this);return}if(this.deleted){this.#d.remove(),this.#d=null;return}(this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized)&&this.#d.updateEdited({rect:this.getPDFRect(),popup:this.comment})}renderAnnotationElement(e){if(this.deleted)return e.hide(),null;let n=e.container.querySelector(".annotationContent");if(!n)n=document.createElement("div"),n.classList.add("annotationContent",this.editorType),e.container.prepend(n);else if(n.nodeName==="CANVAS"){let r=n;n=document.createElement("div"),n.classList.add("annotationContent",this.editorType),r.before(n)}return n}resetAnnotationElement(e){let{firstChild:n}=e.container;n?.nodeName==="DIV"&&n.classList.contains("annotationContent")&&n.remove()}},oR=class extends at{constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}},P6=3285377520,Bi=4294901760,Dr=65535,zS=class{constructor(e){this.h1=e?e&4294967295:P6,this.h2=e?e&4294967295:P6}update(e){let n,r;if(typeof e=="string"){n=new Uint8Array(e.length*2),r=0;for(let g=0,y=e.length;g<y;g++){let v=e.charCodeAt(g);v<=255?n[r++]=v:(n[r++]=v>>>8,n[r++]=v&255)}}else if(ArrayBuffer.isView(e))n=e.slice(),r=n.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");let i=r>>2,o=r-i*4,a=new Uint32Array(n.buffer,0,i),s=0,l=0,c=this.h1,u=this.h2,d=3432918353,h=461845907,f=d&Dr,m=h&Dr;for(let g=0;g<i;g++)g&1?(s=a[g],s=s*d&Bi|s*f&Dr,s=s<<15|s>>>17,s=s*h&Bi|s*m&Dr,c^=s,c=c<<13|c>>>19,c=c*5+3864292196):(l=a[g],l=l*d&Bi|l*f&Dr,l=l<<15|l>>>17,l=l*h&Bi|l*m&Dr,u^=l,u=u<<13|u>>>19,u=u*5+3864292196);switch(s=0,o){case 3:s^=n[i*4+2]<<16;case 2:s^=n[i*4+1]<<8;case 1:s^=n[i*4],s=s*d&Bi|s*f&Dr,s=s<<15|s>>>17,s=s*h&Bi|s*m&Dr,i&1?c^=s:u^=s}this.h1=c,this.h2=u}hexdigest(){let e=this.h1,n=this.h2;return e^=n>>>1,e=e*3981806797&Bi|e*36045&Dr,n=n*4283543511&Bi|((n<<16|e>>>16)*2950163797&Bi)>>>16,e^=n>>>1,e=e*444984403&Bi|e*60499&Dr,n=n*3301882366&Bi|((n<<16|e>>>16)*3120437893&Bi)>>>16,e^=n>>>1,(e>>>0).toString(16).padStart(8,"0")+(n>>>0).toString(16).padStart(8,"0")}},aR=Object.freeze({map:null,hash:"",transfer:void 0}),Pf=class{#e=!1;#t=null;#i=null;#n=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,n){let r=this.#n.get(e);return r===void 0?n:Object.assign(n,r)}getRawValue(e){return this.#n.get(e)}remove(e){let n=this.#n.get(e);if(n!==void 0&&(n instanceof at&&this.#i.delete(n.annotationElementId),this.#n.delete(e),this.#n.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function")){for(let r of this.#n.values())if(r instanceof at)return;this.onAnnotationEditor(null)}}setValue(e,n){let r=this.#n.get(e),i=!1;if(r!==void 0)for(let[o,a]of Object.entries(n))r[o]!==a&&(i=!0,r[o]=a);else i=!0,this.#n.set(e,n);i&&this.#a(),n instanceof at&&((this.#i||=new Map).set(n.annotationElementId,n),typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(n.constructor._type))}has(e){return this.#n.has(e)}get size(){return this.#n.size}#a(){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 TS(this)}get serializable(){if(this.#n.size===0)return aR;let e=new Map,n=new zS,r=[],i=Object.create(null),o=!1;for(let[a,s]of this.#n){let l=s instanceof at?s.serialize(!1,i):s;l&&(e.set(a,l),n.update(`${a}:${JSON.stringify(l)}`),o||=!!l.bitmap)}if(o)for(let a of e.values())a.bitmap&&r.push(a.bitmap);return e.size>0?{map:e,hash:n.hexdigest(),transfer:r}:aR}get editorStats(){let e=null,n=new Map,r=0,i=0;for(let o of this.#n.values()){if(!(o instanceof at)){o.popup&&(o.popup.deleted?i+=1:r+=1);continue}o.isCommentDeleted?i+=1:o.hasEditedComment&&(r+=1);let a=o.telemetryFinalData;if(!a)continue;let{type:s}=a;n.has(s)||n.set(s,Object.getPrototypeOf(o).constructor),e||=Object.create(null);let l=e[s]||=new Map;for(let[c,u]of Object.entries(a)){if(c==="type")continue;let d=l.get(c);d||(d=new Map,l.set(c,d));let h=d.get(u)??0;d.set(u,h+1)}}if((i>0||r>0)&&(e||=Object.create(null),e.comments={deleted:i,edited:r}),!e)return null;for(let[o,a]of n)e[o]=a.computeTelemetryFinalData(e[o]);return e}resetModifiedIds(){this.#t=null}updateEditor(e,n){let r=this.#i?.get(e);return r?(r.updateFromAnnotationLayer(n),!0):!1}getEditor(e){return this.#i?.get(e)||null}get modifiedIds(){if(this.#t)return this.#t;let e=[];if(this.#i)for(let n of this.#i.values())n.serialize()&&e.push(n.annotationElementId);return this.#t={ids:new Set(e),hash:e.join(",")}}[Symbol.iterator](){return this.#n.entries()}},TS=class extends Pf{#e;constructor(e){super();let{map:n,hash:r,transfer:i}=e.serializable,o=structuredClone(n,i?{transfer:i}:null);this.#e={map:o,hash:r,transfer:i}}get print(){rt("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#e}get modifiedIds(){return Re(this,"modifiedIds",{ids:new Set,hash:""})}},sR=class{#e=new Set;constructor({ownerDocument:e=globalThis.document,styleElement:n=null}){this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));let n=this.styleElement.sheet;n.insertRule(e,n.cssRules.length)}clear(){for(let e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),this.#e.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont({systemFontInfo:e,disableFontFace:n,_inspectFont:r}){if(!(!e||this.#e.has(e.loadedName))){if(Ue(!n,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){let{loadedName:i,src:o,style:a}=e,s=new FontFace(i,o,a);this.addNativeFontFace(s);try{await s.load(),this.#e.add(i),r?.(e)}catch{we(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(s)}return}rt("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(e){if(e.attached||e.missingFile&&!e.systemFontInfo)return;if(e.attached=!0,e.systemFontInfo){await this.loadSystemFont(e);return}if(this.isFontLoadingAPISupported){let r=e.createNativeFontFace();if(r){this.addNativeFontFace(r);try{await r.loaded}catch(i){throw we(`Failed to load font '${r.family}': '${i}'.`),e.disableFontFace=!0,i}}return}let n=e.createFontFaceRule();if(n){if(this.insertRule(n),this.isSyncFontLoadingSupported)return;await new Promise(r=>{let i=this._queueLoadingCallback(r);this._prepareFontLoadEvent(e,i)})}}get isFontLoadingAPISupported(){let e=!!this._document?.fonts;return Re(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){return Re(this,"isSyncFontLoadingSupported",In||Vt.platform.isFirefox)}_queueLoadingCallback(e){function n(){for(Ue(!i.done,"completeRequest() cannot be called twice."),i.done=!0;r.length>0&&r[0].done;){let o=r.shift();setTimeout(o.callback,0)}}let{loadingRequests:r}=this,i={done:!1,complete:n,callback:e};return r.push(i),i}get _loadTestFont(){let e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return Re(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,n){function r(_,T){return _.charCodeAt(T)<<24|_.charCodeAt(T+1)<<16|_.charCodeAt(T+2)<<8|_.charCodeAt(T+3)&255}function i(_,T,x,E){let C=_.substring(0,T),I=_.substring(T+x);return C+E+I}let o,a,s=this._document.createElement("canvas");s.width=1,s.height=1;let l=s.getContext("2d"),c=0;function u(_,T){if(++c>30){we("Load test font never loaded."),T();return}if(l.font="30px "+_,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0){T();return}setTimeout(u.bind(null,_,T))}let d=`lt${Date.now()}${this.loadTestFontId++}`,h=this._loadTestFont;h=i(h,976,d.length,d);let m=16,g=1482184792,y=r(h,m);for(o=0,a=d.length-3;o<a;o+=4)y=y-g+r(d,o)|0;o<d.length&&(y=y-g+r(d+"XXX",o)|0),h=i(h,m,4,BK(y));let v=`url(data:font/opentype;base64,${btoa(h)});`,b=`@font-face {font-family:"${d}";src:${v}}`;this.insertRule(b);let S=this._document.createElement("div");S.style.visibility="hidden",S.style.width=S.style.height="10px",S.style.position="absolute",S.style.top=S.style.left="0px";for(let _ of[e.loadedName,d]){let T=this._document.createElement("span");T.textContent="Hi",T.style.fontFamily=_,S.append(T)}this._document.body.append(S),u(d,()=>{S.remove(),n.complete()})}},lR=class{#e;constructor(e,n=null,r,i){this.compiledGlyphs=Object.create(null),this.#e=e,this._inspectFont=n,r&&Object.assign(this,r),i&&(this.charProcOperatorList=i)}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(!this.cssFontInfo)e=new FontFace(this.loadedName,this.data,{});else{let n={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(n.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,n)}return this._inspectFont?.(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;let e=`url(data:${this.mimetype};base64,${X6(this.data)});`,n;if(!this.cssFontInfo)n=`@font-face {font-family:"${this.loadedName}";src:${e}}`;else{let r=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(r+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),n=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${r}src:${e}}`}return this._inspectFont?.(this,e),n}getPathGenerator(e,n){if(this.compiledGlyphs[n]!==void 0)return this.compiledGlyphs[n];let r=this.loadedName+"_path_"+n,i;try{i=e.get(r)}catch(a){we(`getPathGenerator - ignoring character: "${a}".`)}let o=new Path2D(i||"");return this.fontExtraProperties||e.delete(r),this.compiledGlyphs[n]=o}get black(){return this.#e.black}get bold(){return this.#e.bold}get disableFontFace(){return this.#e.disableFontFace??!1}get fontExtraProperties(){return this.#e.fontExtraProperties??!1}get isInvalidPDFjsFont(){return this.#e.isInvalidPDFjsFont}get isType3Font(){return this.#e.isType3Font}get italic(){return this.#e.italic}get missingFile(){return this.#e.missingFile}get remeasure(){return this.#e.remeasure}get vertical(){return this.#e.vertical}get ascent(){return this.#e.ascent}get defaultWidth(){return this.#e.defaultWidth}get descent(){return this.#e.descent}get bbox(){return this.#e.bbox}get fontMatrix(){return this.#e.fontMatrix}get fallbackName(){return this.#e.fallbackName}get loadedName(){return this.#e.loadedName}get mimetype(){return this.#e.mimetype}get name(){return this.#e.name}get data(){return this.#e.data}clearData(){this.#e.clearData()}get cssFontInfo(){return this.#e.cssFontInfo}get systemFontInfo(){return this.#e.systemFontInfo}get defaultVMetrics(){return this.#e.defaultVMetrics}};function iY(t){if(t instanceof URL)return t.href;if(typeof t=="string"){if(In)return t;let e=URL.parse(t,window.location);if(e)return e.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function rY(t){if(In&&typeof Buffer<"u"&&t instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength)return t;if(typeof t=="string")return qf(t);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)||typeof t=="object"&&!isNaN(t?.length))return new Uint8Array(t);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function lS(t){if(typeof t!="string")return null;if(t.endsWith("/"))return t;throw new Error(`Invalid factory url: "${t}" must include trailing slash.`)}var cR=t=>typeof t=="object"&&Number.isInteger(t?.num)&&t.num>=0&&Number.isInteger(t?.gen)&&t.gen>=0,oY=t=>typeof t=="object"&&typeof t?.name=="string",aY=KK.bind(null,cR,oY),uR=class{#e=new Map;#t=Promise.resolve();postMessage(e,n){let r={data:structuredClone(e,n?{transfer:n}:null)};this.#t.then(()=>{for(let[i]of this.#e)i.call(this,r)})}addEventListener(e,n,r=null){let i=null;if(r?.signal instanceof AbortSignal){let{signal:o}=r;if(o.aborted){we("LoopbackPort - cannot use an `aborted` signal.");return}let a=()=>this.removeEventListener(e,n);i=()=>o.removeEventListener("abort",a),o.addEventListener("abort",a)}this.#e.set(n,i)}removeEventListener(e,n){this.#e.get(n)?.(),this.#e.delete(n)}terminate(){for(let[,e]of this.#e)e?.();this.#e.clear()}},cS={DATA:1,ERROR:2},Lt={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function O6(){}function ei(t){if(t instanceof Lr||t instanceof $f||t instanceof yS||t instanceof ou||t instanceof Tf)return t;switch(t instanceof Error||typeof t=="object"&&t!==null||rt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),t.name){case"AbortException":return new Lr(t.message);case"InvalidPDFException":return new $f(t.message);case"PasswordException":return new yS(t.message,t.code);case"ResponseException":return new ou(t.message,t.status,t.missing);case"UnknownErrorException":return new Tf(t.message,t.details)}return new Tf(t.message,t.toString())}var Us=class{#e=new AbortController;constructor(e,n,r){this.sourceName=e,this.targetName=n,this.comObj=r,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),r.addEventListener("message",this.#t.bind(this),{signal:this.#e.signal})}#t({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream){this.#n(e);return}if(e.callback){let r=e.callbackId,i=this.callbackCapabilities[r];if(!i)throw new Error(`Cannot resolve callback ${r}`);if(delete this.callbackCapabilities[r],e.callback===cS.DATA)i.resolve(e.data);else if(e.callback===cS.ERROR)i.reject(ei(e.reason));else throw new Error("Unexpected callback case");return}let n=this.actionHandler[e.action];if(!n)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){let r=this.sourceName,i=e.sourceName,o=this.comObj;Promise.try(n,e.data).then(function(a){o.postMessage({sourceName:r,targetName:i,callback:cS.DATA,callbackId:e.callbackId,data:a})},function(a){o.postMessage({sourceName:r,targetName:i,callback:cS.ERROR,callbackId:e.callbackId,reason:ei(a)})});return}if(e.streamId){this.#i(e);return}n(e.data)}on(e,n){let r=this.actionHandler;if(r[e])throw new Error(`There is already an actionName called "${e}"`);r[e]=n}send(e,n,r){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:n},r)}sendWithPromise(e,n,r){let i=this.callbackId++,o=Promise.withResolvers();this.callbackCapabilities[i]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:n},r)}catch(a){o.reject(a)}return o.promise}sendWithStream(e,n,r,i){let o=this.streamId++,a=this.sourceName,s=this.targetName,l=this.comObj;return new ReadableStream({start:c=>{let u=Promise.withResolvers();return this.streamControllers[o]={controller:c,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:a,targetName:s,action:e,streamId:o,data:n,desiredSize:c.desiredSize},i),u.promise},pull:c=>{let u=Promise.withResolvers();return this.streamControllers[o].pullCall=u,l.postMessage({sourceName:a,targetName:s,stream:Lt.PULL,streamId:o,desiredSize:c.desiredSize}),u.promise},cancel:c=>{Ue(c instanceof Error,"cancel must have a valid reason");let u=Promise.withResolvers();return this.streamControllers[o].cancelCall=u,this.streamControllers[o].isClosed=!0,l.postMessage({sourceName:a,targetName:s,stream:Lt.CANCEL,streamId:o,reason:ei(c)}),u.promise}},r)}#i(e){let n=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,a=this,s=this.actionHandler[e.action],l={enqueue(c,u=1,d){if(this.isCancelled)return;let h=this.desiredSize;this.desiredSize-=u,h>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),o.postMessage({sourceName:r,targetName:i,stream:Lt.ENQUEUE,streamId:n,chunk:c},d)},close(){this.isCancelled||(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:Lt.CLOSE,streamId:n}),delete a.streamSinks[n])},error(c){Ue(c instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,o.postMessage({sourceName:r,targetName:i,stream:Lt.ERROR,streamId:n,reason:ei(c)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[n]=l,Promise.try(s,e.data,l).then(function(){o.postMessage({sourceName:r,targetName:i,stream:Lt.START_COMPLETE,streamId:n,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:Lt.START_COMPLETE,streamId:n,reason:ei(c)})})}#n(e){let n=e.streamId,r=this.sourceName,i=e.sourceName,o=this.comObj,a=this.streamControllers[n],s=this.streamSinks[n];switch(e.stream){case Lt.START_COMPLETE:e.success?a.startCall.resolve():a.startCall.reject(ei(e.reason));break;case Lt.PULL_COMPLETE:e.success?a.pullCall.resolve():a.pullCall.reject(ei(e.reason));break;case Lt.PULL:if(!s){o.postMessage({sourceName:r,targetName:i,stream:Lt.PULL_COMPLETE,streamId:n,success:!0});break}s.desiredSize<=0&&e.desiredSize>0&&s.sinkCapability.resolve(),s.desiredSize=e.desiredSize,Promise.try(s.onPull||O6).then(function(){o.postMessage({sourceName:r,targetName:i,stream:Lt.PULL_COMPLETE,streamId:n,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:Lt.PULL_COMPLETE,streamId:n,reason:ei(c)})});break;case Lt.ENQUEUE:if(Ue(a,"enqueue should have stream controller"),a.isClosed)break;a.controller.enqueue(e.chunk);break;case Lt.CLOSE:if(Ue(a,"close should have stream controller"),a.isClosed)break;a.isClosed=!0,a.controller.close(),this.#a(a,n);break;case Lt.ERROR:Ue(a,"error should have stream controller"),a.controller.error(ei(e.reason)),this.#a(a,n);break;case Lt.CANCEL_COMPLETE:e.success?a.cancelCall.resolve():a.cancelCall.reject(ei(e.reason)),this.#a(a,n);break;case Lt.CANCEL:if(!s)break;let l=ei(e.reason);Promise.try(s.onCancel||O6,l).then(function(){o.postMessage({sourceName:r,targetName:i,stream:Lt.CANCEL_COMPLETE,streamId:n,success:!0})},function(c){o.postMessage({sourceName:r,targetName:i,stream:Lt.CANCEL_COMPLETE,streamId:n,reason:ei(c)})}),s.sinkCapability.reject(l),s.isCancelled=!0,delete this.streamSinks[n];break;default:throw new Error("Unexpected stream case")}}async#a(e,n){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[n]}destroy(){this.#e?.abort(),this.#e=null}},AS=class{#e=!1;constructor({enableHWA:e=!1}){this.#e=e}create(e,n){if(e<=0||n<=0)throw new Error("Invalid canvas size");let r=this._createCanvas(e,n);return{canvas:r,context:r.getContext("2d",{willReadFrequently:!this.#e})}}reset(e,n,r){if(!e.canvas)throw new Error("Canvas is not specified");if(n<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=n,e.canvas.height=r}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,n){rt("Abstract method `_createCanvas` called.")}},dR=class extends AS{constructor({ownerDocument:e=globalThis.document,enableHWA:n=!1}){super({enableHWA:n}),this._document=e}_createCanvas(e,n){let r=this._document.createElement("canvas");return r.width=e,r.height=n,r}},ES=class{constructor({baseUrl:e=null,isCompressed:n=!0}){this.baseUrl=e,this.isCompressed=n}async fetch({name:e}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!e)throw new Error("CMap name must be specified.");let n=this.baseUrl+e+(this.isCompressed?".bcmap":"");return this._fetch(n).then(r=>({cMapData:r,isCompressed:this.isCompressed})).catch(r=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${n}`)})}async _fetch(e){rt("Abstract method `_fetch` called.")}},$S=class extends ES{async _fetch(e){let n=await Ff(e,this.isCompressed?"arraybuffer":"text");return n instanceof ArrayBuffer?new Uint8Array(n):qf(n)}},kS=class{addFilter(e){return"none"}addHCMFilter(e,n){return"none"}addAlphaFilter(e){return"none"}addLuminosityFilter(e){return"none"}addHighlightHCMFilter(e,n,r,i,o){return"none"}destroy(e=!1){}},hR=class extends kS{#e;#t;#i;#n;#a;#r;#o=0;constructor({docId:e,ownerDocument:n=globalThis.document}){super(),this.#n=e,this.#a=n}get#s(){return this.#t||=new Map}get#c(){return this.#r||=new Map}get#l(){if(!this.#i){let e=this.#a.createElement("div"),{style:n}=e;n.visibility="hidden",n.contain="strict",n.width=n.height=0,n.position="absolute",n.top=n.left=0,n.zIndex=-1;let r=this.#a.createElementNS(wo,"svg");r.setAttribute("width",0),r.setAttribute("height",0),this.#i=this.#a.createElementNS(wo,"defs"),e.append(r),r.append(this.#i),this.#a.body.append(e)}return this.#i}#h(e){if(e.length===1){let l=e[0],c=new Array(256);for(let d=0;d<256;d++)c[d]=l[d]/255;let u=c.join(",");return[u,u,u]}let[n,r,i]=e,o=new Array(256),a=new Array(256),s=new Array(256);for(let l=0;l<256;l++)o[l]=n[l]/255,a[l]=r[l]/255,s[l]=i[l]/255;return[o.join(","),a.join(","),s.join(",")]}#d(e){if(this.#e===void 0){this.#e="";let n=this.#a.URL;n!==this.#a.baseURI&&(r_(n)?we('#createUrl: ignore "data:"-URL for performance reasons.'):this.#e=K6(n,""))}return`url(${this.#e}#${e})`}addFilter(e){if(!e)return"none";let n=this.#s.get(e);if(n)return n;let[r,i,o]=this.#h(e),a=e.length===1?r:`${r}${i}${o}`;if(n=this.#s.get(a),n)return this.#s.set(e,n),n;let s=`g_${this.#n}_transfer_map_${this.#o++}`,l=this.#d(s);this.#s.set(e,l),this.#s.set(a,l);let c=this.#p(s);return this.#m(r,i,o,c),l}addHCMFilter(e,n){let r=`${e}-${n}`,i="base",o=this.#c.get(i);if(o?.key===r||(o?(o.filter?.remove(),o.key=r,o.url="none",o.filter=null):(o={key:r,url:"none",filter:null},this.#c.set(i,o)),!e||!n))return o.url;let a=this.#y(e);e=le.makeHexColor(...a);let s=this.#y(n);if(n=le.makeHexColor(...s),this.#l.style.color="",e==="#000000"&&n==="#ffffff"||e===n)return o.url;let l=new Array(256);for(let f=0;f<=255;f++){let m=f/255;l[f]=m<=.03928?m/12.92:((m+.055)/1.055)**2.4}let c=l.join(","),u=`g_${this.#n}_hcm_filter`,d=o.filter=this.#p(u);this.#m(c,c,c,d),this.#g(d);let h=(f,m)=>{let g=a[f]/255,y=s[f]/255,v=new Array(m+1);for(let b=0;b<=m;b++)v[b]=g+b/m*(y-g);return v.join(",")};return this.#m(h(0,5),h(1,5),h(2,5),d),o.url=this.#d(u),o.url}addAlphaFilter(e){let n=this.#s.get(e);if(n)return n;let[r]=this.#h([e]),i=`alpha_${r}`;if(n=this.#s.get(i),n)return this.#s.set(e,n),n;let o=`g_${this.#n}_alpha_map_${this.#o++}`,a=this.#d(o);this.#s.set(e,a),this.#s.set(i,a);let s=this.#p(o);return this.#v(r,s),a}addLuminosityFilter(e){let n=this.#s.get(e||"luminosity");if(n)return n;let r,i;if(e?([r]=this.#h([e]),i=`luminosity_${r}`):i="luminosity",n=this.#s.get(i),n)return this.#s.set(e,n),n;let o=`g_${this.#n}_luminosity_map_${this.#o++}`,a=this.#d(o);this.#s.set(e,a),this.#s.set(i,a);let s=this.#p(o);return this.#f(s),e&&this.#v(r,s),a}addHighlightHCMFilter(e,n,r,i,o){let a=`${n}-${r}-${i}-${o}`,s=this.#c.get(e);if(s?.key===a||(s?(s.filter?.remove(),s.key=a,s.url="none",s.filter=null):(s={key:a,url:"none",filter:null},this.#c.set(e,s)),!n||!r))return s.url;let[l,c]=[n,r].map(this.#y.bind(this)),u=Math.round(.2126*l[0]+.7152*l[1]+.0722*l[2]),d=Math.round(.2126*c[0]+.7152*c[1]+.0722*c[2]),[h,f]=[i,o].map(this.#y.bind(this));d<u&&([u,d,h,f]=[d,u,f,h]),this.#l.style.color="";let m=(v,b,S)=>{let _=new Array(256),T=(d-u)/S,x=v/255,E=(b-v)/(255*S),C=0;for(let I=0;I<=S;I++){let L=Math.round(u+I*T),G=x+I*E;for(let ge=C;ge<=L;ge++)_[ge]=G;C=L+1}for(let I=C;I<256;I++)_[I]=_[C-1];return _.join(",")},g=`g_${this.#n}_hcm_${e}_filter`,y=s.filter=this.#p(g);return this.#g(y),this.#m(m(h[0],f[0],5),m(h[1],f[1],5),m(h[2],f[2],5),y),s.url=this.#d(g),s.url}destroy(e=!1){e&&this.#r?.size||(this.#i?.parentNode.parentNode.remove(),this.#i=null,this.#t?.clear(),this.#t=null,this.#r?.clear(),this.#r=null,this.#o=0)}#f(e){let n=this.#a.createElementNS(wo,"feColorMatrix");n.setAttribute("type","matrix"),n.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"),e.append(n)}#g(e){let n=this.#a.createElementNS(wo,"feColorMatrix");n.setAttribute("type","matrix"),n.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"),e.append(n)}#p(e){let n=this.#a.createElementNS(wo,"filter");return n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("id",e),this.#l.append(n),n}#u(e,n,r){let i=this.#a.createElementNS(wo,n);i.setAttribute("type","discrete"),i.setAttribute("tableValues",r),e.append(i)}#m(e,n,r,i){let o=this.#a.createElementNS(wo,"feComponentTransfer");i.append(o),this.#u(o,"feFuncR",e),this.#u(o,"feFuncG",n),this.#u(o,"feFuncB",r)}#v(e,n){let r=this.#a.createElementNS(wo,"feComponentTransfer");n.append(r),this.#u(r,"feFuncA",e)}#y(e){return this.#l.style.color=e,Bf(getComputedStyle(this.#l).getPropertyValue("color"))}},RS=class{constructor({baseUrl:e=null}){this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!e)throw new Error("Font filename must be specified.");let n=`${this.baseUrl}${e}`;return this._fetch(n).catch(r=>{throw new Error(`Unable to load font data at: ${n}`)})}async _fetch(e){rt("Abstract method `_fetch` called.")}},CS=class extends RS{async _fetch(e){let n=await Ff(e,"arraybuffer");return new Uint8Array(n)}},IS=class{constructor({baseUrl:e=null}){this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error("Ensure that the `wasmUrl` API parameter is provided.");if(!e)throw new Error("Wasm filename must be specified.");let n=`${this.baseUrl}${e}`;return this._fetch(n).catch(r=>{throw new Error(`Unable to load wasm data at: ${n}`)})}async _fetch(e){rt("Abstract method `_fetch` called.")}},PS=class extends IS{async _fetch(e){let n=await Ff(e,"arraybuffer");return new Uint8Array(n)}};In&&we("Please use the `legacy` build in Node.js environments.");async function $C(t){let n=await process.getBuiltinModule("fs").promises.readFile(t);return new Uint8Array(n)}var fR=class extends kS{},pR=class extends AS{_createCanvas(e,n){return process.getBuiltinModule("module").createRequire(AY.url)("@napi-rs/canvas").createCanvas(e,n)}},mR=class extends ES{async _fetch(e){return $C(e)}},gR=class extends RS{async _fetch(e){return $C(e)}},vR=class extends IS{async _fetch(e){return $C(e)}},Qc="__forcedDependency",{floor:N6,ceil:M6}=Math;function uS(t,e,n,r,i,o){t[e*4+0]=Math.min(t[e*4+0],n),t[e*4+1]=Math.min(t[e*4+1],r),t[e*4+2]=Math.max(t[e*4+2],i),t[e*4+3]=Math.max(t[e*4+3],o)}var bR=new Uint32Array(new Uint8Array([255,255,0,0]).buffer)[0],yR=class{#e;#t;constructor(e,n){this.#e=e,this.#t=n}get length(){return this.#e.length}isEmpty(e){return this.#e[e]===bR}minX(e){return this.#t[e*4+0]/256}minY(e){return this.#t[e*4+1]/256}maxX(e){return(this.#t[e*4+2]+1)/256}maxY(e){return(this.#t[e*4+3]+1)/256}},dS=(t,e)=>{if(!t)return;let n=t.get(e);return n||(n={dependencies:new Set,isRenderingOperation:!1},t.set(e,n)),n},SR=class{#e={__proto__:null};#t={__proto__:null,transform:[],moveText:[],sameLineText:[],[Qc]:[]};#i=new Map;#n=[];#a=[];#r=[[1,0,0,1,0,0]];#o=[-1/0,-1/0,1/0,1/0];#s=new Float64Array([1/0,1/0,-1/0,-1/0]);#c=-1;#l=new Set;#h=new Map;#d=new Map;#f;#g;#p;#u;#m;constructor(e,n,r=!1){this.#f=e.width,this.#g=e.height,this.#v(n),r&&(this.#m=new Map)}growOperationsCount(e){e>=this.#u.length&&this.#v(e,this.#u)}#v(e,n){let r=new ArrayBuffer(e*4);this.#p=new Uint8ClampedArray(r),this.#u=new Uint32Array(r),n&&n.length>0?(this.#u.set(n),this.#u.fill(bR,n.length)):this.#u.fill(bR)}save(e){return this.#e={__proto__:this.#e},this.#t={__proto__:this.#t,transform:{__proto__:this.#t.transform},moveText:{__proto__:this.#t.moveText},sameLineText:{__proto__:this.#t.sameLineText},[Qc]:{__proto__:this.#t[Qc]}},this.#o={__proto__:this.#o},this.#n.push(e),this}restore(e){let n=Object.getPrototypeOf(this.#e);if(n===null)return this;this.#e=n,this.#t=Object.getPrototypeOf(this.#t),this.#o=Object.getPrototypeOf(this.#o);let r=this.#n.pop();return r!==void 0&&(dS(this.#m,e)?.dependencies.add(r),this.#u[e]=this.#u[r]),this}recordOpenMarker(e){return this.#n.push(e),this}getOpenMarker(){return this.#n.length===0?null:this.#n.at(-1)}recordCloseMarker(e){let n=this.#n.pop();return n!==void 0&&(dS(this.#m,e)?.dependencies.add(n),this.#u[e]=this.#u[n]),this}beginMarkedContent(e){return this.#a.push(e),this}endMarkedContent(e){let n=this.#a.pop();return n!==void 0&&(dS(this.#m,e)?.dependencies.add(n),this.#u[e]=this.#u[n]),this}pushBaseTransform(e){return this.#r.push(le.multiplyByDOMMatrix(this.#r.at(-1),e.getTransform())),this}popBaseTransform(){return this.#r.length>1&&this.#r.pop(),this}recordSimpleData(e,n){return this.#e[e]=n,this}recordIncrementalData(e,n){return this.#t[e].push(n),this}resetIncrementalData(e,n){return this.#t[e].length=0,this}recordNamedData(e,n){return this.#i.set(e,n),this}recordSimpleDataFromNamed(e,n,r){this.#e[e]=this.#i.get(n)??r}recordFutureForcedDependency(e,n){return this.recordIncrementalData(Qc,n),this}inheritSimpleDataAsFutureForcedDependencies(e){for(let n of e)n in this.#e&&this.recordFutureForcedDependency(n,this.#e[n]);return this}inheritPendingDependenciesAsFutureForcedDependencies(){for(let e of this.#l)this.recordFutureForcedDependency(Qc,e);return this}resetBBox(e){return this.#c!==e&&(this.#c=e,this.#s[0]=1/0,this.#s[1]=1/0,this.#s[2]=-1/0,this.#s[3]=-1/0),this}recordClipBox(e,n,r,i,o,a){let s=le.multiplyByDOMMatrix(this.#r.at(-1),n.getTransform()),l=[1/0,1/0,-1/0,-1/0];le.axialAlignedBoundingBox([r,o,i,a],s,l);let c=le.intersect(this.#o,l);return c?(this.#o[0]=c[0],this.#o[1]=c[1],this.#o[2]=c[2],this.#o[3]=c[3]):(this.#o[0]=this.#o[1]=1/0,this.#o[2]=this.#o[3]=-1/0),this}recordBBox(e,n,r,i,o,a){let s=this.#o;if(s[0]===1/0)return this;let l=le.multiplyByDOMMatrix(this.#r.at(-1),n.getTransform());if(s[0]===-1/0)return le.axialAlignedBoundingBox([r,o,i,a],l,this.#s),this;let c=[1/0,1/0,-1/0,-1/0];return le.axialAlignedBoundingBox([r,o,i,a],l,c),this.#s[0]=Math.min(this.#s[0],Math.max(c[0],s[0])),this.#s[1]=Math.min(this.#s[1],Math.max(c[1],s[1])),this.#s[2]=Math.max(this.#s[2],Math.min(c[2],s[2])),this.#s[3]=Math.max(this.#s[3],Math.min(c[3],s[3])),this}recordCharacterBBox(e,n,r,i=1,o=0,a=0,s){let l=r.bbox,c,u;if(l&&(c=l[2]!==l[0]&&l[3]!==l[1]&&this.#d.get(r),c!==!1&&(u=[0,0,0,0],le.axialAlignedBoundingBox(l,r.fontMatrix,u),(i!==1||o!==0||a!==0)&&le.scaleMinMax([i,0,0,-i,o,a],u),c)))return this.recordBBox(e,n,u[0],u[2],u[1],u[3]);if(!s)return this.recordFullPageBBox(e);let d=s();return l&&u&&c===void 0&&(c=u[0]<=o-d.actualBoundingBoxLeft&&u[2]>=o+d.actualBoundingBoxRight&&u[1]<=a-d.actualBoundingBoxAscent&&u[3]>=a+d.actualBoundingBoxDescent,this.#d.set(r,c),c)?this.recordBBox(e,n,u[0],u[2],u[1],u[3]):this.recordBBox(e,n,o-d.actualBoundingBoxLeft,o+d.actualBoundingBoxRight,a-d.actualBoundingBoxAscent,a+d.actualBoundingBoxDescent)}recordFullPageBBox(e){return this.#s[0]=Math.max(0,this.#o[0]),this.#s[1]=Math.max(0,this.#o[1]),this.#s[2]=Math.min(this.#f,this.#o[2]),this.#s[3]=Math.min(this.#g,this.#o[3]),this}getSimpleIndex(e){return this.#e[e]}recordDependencies(e,n){let r=this.#l,i=this.#e,o=this.#t;for(let a of n)a in this.#e?r.add(i[a]):a in o&&o[a].forEach(r.add,r);return this}recordNamedDependency(e,n){return this.#i.has(n)&&this.#l.add(this.#i.get(n)),this}recordOperation(e,n=!1){if(this.recordDependencies(e,[Qc]),this.#m){let r=dS(this.#m,e),{dependencies:i}=r;this.#l.forEach(i.add,i),this.#n.forEach(i.add,i),this.#a.forEach(i.add,i),i.delete(e),r.isRenderingOperation=!0}if(this.#c===e){let r=N6(this.#s[0]*256/this.#f),i=N6(this.#s[1]*256/this.#g),o=M6(this.#s[2]*256/this.#f),a=M6(this.#s[3]*256/this.#g);uS(this.#p,e,r,i,o,a);for(let s of this.#l)s!==e&&uS(this.#p,s,r,i,o,a);for(let s of this.#n)s!==e&&uS(this.#p,s,r,i,o,a);for(let s of this.#a)s!==e&&uS(this.#p,s,r,i,o,a);n||(this.#l.clear(),this.#c=-1)}return this}recordShowTextOperation(e,n=!1){let r=Array.from(this.#l);this.recordOperation(e,n),this.recordIncrementalData("sameLineText",e);for(let i of r)this.recordIncrementalData("sameLineText",i);return this}bboxToClipBoxDropOperation(e,n=!1){return this.#c===e&&(this.#c=-1,this.#o[0]=Math.max(this.#o[0],this.#s[0]),this.#o[1]=Math.max(this.#o[1],this.#s[1]),this.#o[2]=Math.min(this.#o[2],this.#s[2]),this.#o[3]=Math.min(this.#o[3],this.#s[3]),n||this.#l.clear()),this}_takePendingDependencies(){let e=this.#l;return this.#l=new Set,e}_extractOperation(e){let n=this.#h.get(e);return this.#h.delete(e),n}_pushPendingDependencies(e){for(let n of e)this.#l.add(n)}take(){return this.#d.clear(),new yR(this.#u,this.#p)}takeDebugMetadata(){return this.#m}},OS=class t{#e;#t;#i;#n=0;#a=0;constructor(e,n,r){if(e instanceof t&&e.#i===!!r)return e;this.#e=e,this.#t=n,this.#i=!!r}growOperationsCount(){throw new Error("Unreachable")}save(e){return this.#a++,this.#e.save(this.#t),this}restore(e){return this.#a>0&&(this.#e.restore(this.#t),this.#a--),this}recordOpenMarker(e){return this.#n++,this}getOpenMarker(){return this.#n>0?this.#t:this.#e.getOpenMarker()}recordCloseMarker(e){return this.#n--,this}beginMarkedContent(e){return this}endMarkedContent(e){return this}pushBaseTransform(e){return this.#e.pushBaseTransform(e),this}popBaseTransform(){return this.#e.popBaseTransform(),this}recordSimpleData(e,n){return this.#e.recordSimpleData(e,this.#t),this}recordIncrementalData(e,n){return this.#e.recordIncrementalData(e,this.#t),this}resetIncrementalData(e,n){return this.#e.resetIncrementalData(e,this.#t),this}recordNamedData(e,n){return this}recordSimpleDataFromNamed(e,n,r){return this.#e.recordSimpleDataFromNamed(e,n,this.#t),this}recordFutureForcedDependency(e,n){return this.#e.recordFutureForcedDependency(e,this.#t),this}inheritSimpleDataAsFutureForcedDependencies(e){return this.#e.inheritSimpleDataAsFutureForcedDependencies(e),this}inheritPendingDependenciesAsFutureForcedDependencies(){return this.#e.inheritPendingDependenciesAsFutureForcedDependencies(),this}resetBBox(e){return this.#i||this.#e.resetBBox(this.#t),this}recordClipBox(e,n,r,i,o,a){return this.#i||this.#e.recordClipBox(this.#t,n,r,i,o,a),this}recordBBox(e,n,r,i,o,a){return this.#i||this.#e.recordBBox(this.#t,n,r,i,o,a),this}recordCharacterBBox(e,n,r,i,o,a,s){return this.#i||this.#e.recordCharacterBBox(this.#t,n,r,i,o,a,s),this}recordFullPageBBox(e){return this.#i||this.#e.recordFullPageBBox(this.#t),this}getSimpleIndex(e){return this.#e.getSimpleIndex(e)}recordDependencies(e,n){return this.#e.recordDependencies(this.#t,n),this}recordNamedDependency(e,n){return this.#e.recordNamedDependency(this.#t,n),this}recordOperation(e){return this.#e.recordOperation(this.#t,!0),this}recordShowTextOperation(e){return this.#e.recordShowTextOperation(this.#t,!0),this}bboxToClipBoxDropOperation(e){return this.#i||this.#e.bboxToClipBoxDropOperation(this.#t,!0),this}take(){throw new Error("Unreachable")}takeDebugMetadata(){throw new Error("Unreachable")}},Hi={stroke:["path","transform","filter","strokeColor","strokeAlpha","lineWidth","lineCap","lineJoin","miterLimit","dash"],fill:["path","transform","filter","fillColor","fillAlpha","globalCompositeOperation","SMask"],imageXObject:["transform","SMask","filter","fillAlpha","strokeAlpha","globalCompositeOperation"],rawFillPath:["filter","fillColor","fillAlpha"],showText:["transform","leading","charSpacing","wordSpacing","hScale","textRise","moveText","textMatrix","font","fontObj","filter","fillColor","textRenderingMode","SMask","fillAlpha","strokeAlpha","globalCompositeOperation","sameLineText"],transform:["transform"],transformAndFill:["transform","fillColor"]},hn={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function _R(t,e){if(!e)return;let n=e[2]-e[0],r=e[3]-e[1],i=new Path2D;i.rect(e[0],e[1],n,r),t.clip(i)}var Of=class{isModifyingCurrentTransform(){return!1}getPattern(){rt("Abstract method `getPattern` called.")}},wR=class extends Of{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let n;this._type==="axial"?n=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(n=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(let r of this._colorStops)n.addColorStop(r[0],r[1]);return n}getPattern(e,n,r,i){let o;if(i===hn.STROKE||i===hn.FILL){let a=n.current.getClippedPathBoundingBox(i,vt(e))||[0,0,0,0],s=Math.ceil(a[2]-a[0])||1,l=Math.ceil(a[3]-a[1])||1,c=n.cachedCanvases.getCanvas("pattern",s,l),u=c.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(-a[0],-a[1]),r=le.transform(r,[1,0,0,1,a[0],a[1]]),u.transform(...n.baseTransform),this.matrix&&u.transform(...this.matrix),_R(u,this._bbox),u.fillStyle=this._createGradient(u),u.fill(),o=e.createPattern(c.canvas,"no-repeat");let d=new DOMMatrix(r);o.setTransform(d)}else _R(e,this._bbox),o=this._createGradient(e);return o}};function Bk(t,e,n,r,i,o,a,s){let l=e.coords,c=e.colors,u=t.data,d=t.width*4,h;l[n+1]>l[r+1]&&(h=n,n=r,r=h,h=o,o=a,a=h),l[r+1]>l[i+1]&&(h=r,r=i,i=h,h=a,a=s,s=h),l[n+1]>l[r+1]&&(h=n,n=r,r=h,h=o,o=a,a=h);let f=(l[n]+e.offsetX)*e.scaleX,m=(l[n+1]+e.offsetY)*e.scaleY,g=(l[r]+e.offsetX)*e.scaleX,y=(l[r+1]+e.offsetY)*e.scaleY,v=(l[i]+e.offsetX)*e.scaleX,b=(l[i+1]+e.offsetY)*e.scaleY;if(m>=b)return;let S=c[o],_=c[o+1],T=c[o+2],x=c[a],E=c[a+1],C=c[a+2],I=c[s],L=c[s+1],G=c[s+2],ge=Math.round(m),de=Math.round(b),pe,Ee,ae,oe,Se,nt,U,M;for(let K=ge;K<=de;K++){if(K<y){let W=K<m?0:(m-K)/(m-y);pe=f-(f-g)*W,Ee=S-(S-x)*W,ae=_-(_-E)*W,oe=T-(T-C)*W}else{let W;K>b?W=1:y===b?W=0:W=(y-K)/(y-b),pe=g-(g-v)*W,Ee=x-(x-I)*W,ae=E-(E-L)*W,oe=C-(C-G)*W}let B;K<m?B=0:K>b?B=1:B=(m-K)/(m-b),Se=f-(f-v)*B,nt=S-(S-I)*B,U=_-(_-L)*B,M=T-(T-G)*B;let X=Math.round(Math.min(pe,Se)),J=Math.round(Math.max(pe,Se)),ne=d*K+X*4;for(let W=X;W<=J;W++)B=(pe-W)/(pe-Se),B<0?B=0:B>1&&(B=1),u[ne++]=Ee-(Ee-nt)*B|0,u[ne++]=ae-(ae-U)*B|0,u[ne++]=oe-(oe-M)*B|0,u[ne++]=255}}function sY(t,e,n){let r=e.coords,i=e.colors,o,a;switch(e.type){case"lattice":let s=e.verticesPerRow,l=Math.floor(r.length/s)-1,c=s-1;for(o=0;o<l;o++){let u=o*s;for(let d=0;d<c;d++,u++)Bk(t,n,r[u],r[u+1],r[u+s],i[u],i[u+1],i[u+s]),Bk(t,n,r[u+s+1],r[u+1],r[u+s],i[u+s+1],i[u+1],i[u+s])}break;case"triangles":for(o=0,a=r.length;o<a;o+=3)Bk(t,n,r[o],r[o+1],r[o+2],i[o],i[o+1],i[o+2]);break;default:throw new Error("illegal figure")}}var xR=class extends Of{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[6],this._background=e[7],this.matrix=null}_createMeshCanvas(e,n,r){let s=Math.floor(this._bounds[0]),l=Math.floor(this._bounds[1]),c=Math.ceil(this._bounds[2])-s,u=Math.ceil(this._bounds[3])-l,d=Math.min(Math.ceil(Math.abs(c*e[0]*1.1)),3e3),h=Math.min(Math.ceil(Math.abs(u*e[1]*1.1)),3e3),f=c/d,m=u/h,g={coords:this._coords,colors:this._colors,offsetX:-s,offsetY:-l,scaleX:1/f,scaleY:1/m},y=d+4,v=h+4,b=r.getCanvas("mesh",y,v),S=b.context,_=S.createImageData(d,h);if(n){let x=_.data;for(let E=0,C=x.length;E<C;E+=4)x[E]=n[0],x[E+1]=n[1],x[E+2]=n[2],x[E+3]=255}for(let x of this._figures)sY(_,x,g);return S.putImageData(_,2,2),{canvas:b.canvas,offsetX:s-2*f,offsetY:l-2*m,scaleX:f,scaleY:m}}isModifyingCurrentTransform(){return!0}getPattern(e,n,r,i){_R(e,this._bbox);let o=new Float32Array(2);if(i===hn.SHADING)le.singularValueDecompose2dScale(vt(e),o);else if(this.matrix){le.singularValueDecompose2dScale(this.matrix,o);let[s,l]=o;le.singularValueDecompose2dScale(n.baseTransform,o),o[0]*=s,o[1]*=l}else le.singularValueDecompose2dScale(n.baseTransform,o);let a=this._createMeshCanvas(o,i===hn.SHADING?null:this._background,n.cachedCanvases);return i!==hn.SHADING&&(e.setTransform(...n.baseTransform),this.matrix&&e.transform(...this.matrix)),e.translate(a.offsetX,a.offsetY),e.scale(a.scaleX,a.scaleY),e.createPattern(a.canvas,"no-repeat")}},zR=class extends Of{getPattern(){return"hotpink"}};function lY(t){switch(t[0]){case"RadialAxial":return new wR(t);case"Mesh":return new xR(t);case"Dummy":return new zR}throw new Error(`Unknown IR type: ${t[0]}`)}var D6={COLORED:1,UNCOLORED:2},TR=class t{static MAX_PATTERN_SIZE=3e3;constructor(e,n,r,i){this.color=e[1],this.operatorList=e[2],this.matrix=e[3],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.ctx=n,this.canvasGraphicsFactory=r,this.baseTransform=i}createPatternCanvas(e,n){let{bbox:r,operatorList:i,paintType:o,tilingType:a,color:s,canvasGraphicsFactory:l}=this,{xstep:c,ystep:u}=this;c=Math.abs(c),u=Math.abs(u),i_("TilingType: "+a);let d=r[0],h=r[1],f=r[2],m=r[3],g=f-d,y=m-h,v=new Float32Array(2);le.singularValueDecompose2dScale(this.matrix,v);let[b,S]=v;le.singularValueDecompose2dScale(this.baseTransform,v);let _=b*v[0],T=S*v[1],x=g,E=y,C=!1,I=!1,L=Math.ceil(c*_),G=Math.ceil(u*T),ge=Math.ceil(g*_),de=Math.ceil(y*T);L>=ge?x=c:C=!0,G>=de?E=u:I=!0;let pe=this.getSizeAndScale(x,this.ctx.canvas.width,_),Ee=this.getSizeAndScale(E,this.ctx.canvas.height,T),ae=e.cachedCanvases.getCanvas("pattern",pe.size,Ee.size),oe=ae.context,Se=l.createCanvasGraphics(oe,n);if(Se.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(Se,o,s),oe.translate(-pe.scale*d,-Ee.scale*h),Se.transform(0,pe.scale,0,0,Ee.scale,0,0),oe.save(),Se.dependencyTracker?.save(),this.clipBbox(Se,d,h,f,m),Se.baseTransform=vt(Se.ctx),Se.executeOperatorList(i),Se.endDrawing(),Se.dependencyTracker?.restore(),oe.restore(),C||I){let nt=ae.canvas;C&&(x=c),I&&(E=u);let U=this.getSizeAndScale(x,this.ctx.canvas.width,_),M=this.getSizeAndScale(E,this.ctx.canvas.height,T),K=U.size,B=M.size,X=e.cachedCanvases.getCanvas("pattern-workaround",K,B),J=X.context,ne=C?Math.floor(g/c):0,W=I?Math.floor(y/u):0;for(let fe=0;fe<=ne;fe++)for(let $e=0;$e<=W;$e++)J.drawImage(nt,K*fe,B*$e,K,B,0,0,K,B);return{canvas:X.canvas,scaleX:U.scale,scaleY:M.scale,offsetX:d,offsetY:h}}return{canvas:ae.canvas,scaleX:pe.scale,scaleY:Ee.scale,offsetX:d,offsetY:h}}getSizeAndScale(e,n,r){let i=Math.max(t.MAX_PATTERN_SIZE,n),o=Math.ceil(e*r);return o>=i?o=i:r=o/e,{scale:r,size:o}}clipBbox(e,n,r,i,o){let a=i-n,s=o-r;e.ctx.rect(n,r,a,s),le.axialAlignedBoundingBox([n,r,i,o],vt(e.ctx),e.current.minMax),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,n,r){let i=e.ctx,o=e.current;switch(n){case D6.COLORED:let{fillStyle:a,strokeStyle:s}=this.ctx;i.fillStyle=o.fillColor=a,i.strokeStyle=o.strokeColor=s;break;case D6.UNCOLORED:i.fillStyle=i.strokeStyle=r,o.fillColor=o.strokeColor=r;break;default:throw new Kk(`Unsupported paint type: ${n}`)}}isModifyingCurrentTransform(){return!1}getPattern(e,n,r,i,o){let a=r;i!==hn.SHADING&&(a=le.transform(a,n.baseTransform),this.matrix&&(a=le.transform(a,this.matrix)));let s=this.createPatternCanvas(n,o),l=new DOMMatrix(a);l=l.translate(s.offsetX,s.offsetY),l=l.scale(1/s.scaleX,1/s.scaleY);let c=e.createPattern(s.canvas,"repeat");return c.setTransform(l),c}};function cY({src:t,srcPos:e=0,dest:n,width:r,height:i,nonBlackColor:o=4294967295,inverseDecode:a=!1}){let s=Vt.isLittleEndian?4278190080:255,[l,c]=a?[o,s]:[s,o],u=r>>3,d=r&7,h=t.length;n=new Uint32Array(n.buffer);let f=0;for(let m=0;m<i;m++){for(let y=e+u;e<y;e++){let v=e<h?t[e]:255;n[f++]=v&128?c:l,n[f++]=v&64?c:l,n[f++]=v&32?c:l,n[f++]=v&16?c:l,n[f++]=v&8?c:l,n[f++]=v&4?c:l,n[f++]=v&2?c:l,n[f++]=v&1?c:l}if(d===0)continue;let g=e<h?t[e++]:255;for(let y=0;y<d;y++)n[f++]=g&1<<7-y?c:l}return{srcPos:e,destPos:f}}var L6=16,j6=100,uY=15,U6=10,ti=16,Hk=new DOMMatrix,wi=new Float32Array(2),iu=new Float32Array([1/0,1/0,-1/0,-1/0]);function dY(t,e){if(t._removeMirroring)throw new Error("Context is already forwarding operations.");t.__originalSave=t.save,t.__originalRestore=t.restore,t.__originalRotate=t.rotate,t.__originalScale=t.scale,t.__originalTranslate=t.translate,t.__originalTransform=t.transform,t.__originalSetTransform=t.setTransform,t.__originalResetTransform=t.resetTransform,t.__originalClip=t.clip,t.__originalMoveTo=t.moveTo,t.__originalLineTo=t.lineTo,t.__originalBezierCurveTo=t.bezierCurveTo,t.__originalRect=t.rect,t.__originalClosePath=t.closePath,t.__originalBeginPath=t.beginPath,t._removeMirroring=()=>{t.save=t.__originalSave,t.restore=t.__originalRestore,t.rotate=t.__originalRotate,t.scale=t.__originalScale,t.translate=t.__originalTranslate,t.transform=t.__originalTransform,t.setTransform=t.__originalSetTransform,t.resetTransform=t.__originalResetTransform,t.clip=t.__originalClip,t.moveTo=t.__originalMoveTo,t.lineTo=t.__originalLineTo,t.bezierCurveTo=t.__originalBezierCurveTo,t.rect=t.__originalRect,t.closePath=t.__originalClosePath,t.beginPath=t.__originalBeginPath,delete t._removeMirroring},t.save=function(){e.save(),this.__originalSave()},t.restore=function(){e.restore(),this.__originalRestore()},t.translate=function(n,r){e.translate(n,r),this.__originalTranslate(n,r)},t.scale=function(n,r){e.scale(n,r),this.__originalScale(n,r)},t.transform=function(n,r,i,o,a,s){e.transform(n,r,i,o,a,s),this.__originalTransform(n,r,i,o,a,s)},t.setTransform=function(n,r,i,o,a,s){e.setTransform(n,r,i,o,a,s),this.__originalSetTransform(n,r,i,o,a,s)},t.resetTransform=function(){e.resetTransform(),this.__originalResetTransform()},t.rotate=function(n){e.rotate(n),this.__originalRotate(n)},t.clip=function(n){e.clip(n),this.__originalClip(n)},t.moveTo=function(n,r){e.moveTo(n,r),this.__originalMoveTo(n,r)},t.lineTo=function(n,r){e.lineTo(n,r),this.__originalLineTo(n,r)},t.bezierCurveTo=function(n,r,i,o,a,s){e.bezierCurveTo(n,r,i,o,a,s),this.__originalBezierCurveTo(n,r,i,o,a,s)},t.rect=function(n,r,i,o){e.rect(n,r,i,o),this.__originalRect(n,r,i,o)},t.closePath=function(){e.closePath(),this.__originalClosePath()},t.beginPath=function(){e.beginPath(),this.__originalBeginPath()}}var AR=class{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,n,r){let i;return this.cache[e]!==void 0?(i=this.cache[e],this.canvasFactory.reset(i,n,r)):(i=this.canvasFactory.create(n,r),this.cache[e]=i),i}delete(e){delete this.cache[e]}clear(){for(let e in this.cache){let n=this.cache[e];this.canvasFactory.destroy(n),delete this.cache[e]}}};function hS(t,e,n,r,i,o,a,s,l,c){let[u,d,h,f,m,g]=vt(t);if(d===0&&h===0){let b=a*u+m,S=Math.round(b),_=s*f+g,T=Math.round(_),x=(a+l)*u+m,E=Math.abs(Math.round(x)-S)||1,C=(s+c)*f+g,I=Math.abs(Math.round(C)-T)||1;return t.setTransform(Math.sign(u),0,0,Math.sign(f),S,T),t.drawImage(e,n,r,i,o,0,0,E,I),t.setTransform(u,d,h,f,m,g),[E,I]}if(u===0&&f===0){let b=s*h+m,S=Math.round(b),_=a*d+g,T=Math.round(_),x=(s+c)*h+m,E=Math.abs(Math.round(x)-S)||1,C=(a+l)*d+g,I=Math.abs(Math.round(C)-T)||1;return t.setTransform(0,Math.sign(d),Math.sign(h),0,S,T),t.drawImage(e,n,r,i,o,0,0,I,E),t.setTransform(u,d,h,f,m,g),[I,E]}t.drawImage(e,n,r,i,o,a,s,l,c);let y=Math.hypot(u,d),v=Math.hypot(h,f);return[y*l,v*c]}var NS=class{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=Gk;leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=dn.FILL;textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(e,n,r){r?.(this),this.clipBox=new Float32Array([0,0,e,n]),this.minMax=iu.slice()}clone(){let e=Object.create(this);return e.clipBox=this.clipBox.slice(),e.minMax=this.minMax.slice(),e}getPathBoundingBox(e=hn.FILL,n=null){let r=this.minMax.slice();if(e===hn.STROKE){n||rt("Stroke bounding box must include transform."),le.singularValueDecompose2dScale(n,wi);let i=wi[0]*this.lineWidth/2,o=wi[1]*this.lineWidth/2;r[0]-=i,r[1]-=o,r[2]+=i,r[3]+=o}return r}updateClipFromPath(){let e=le.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(e){this.clipBox.set(e,0),this.minMax.set(iu,0)}getClippedPathBoundingBox(e=hn.FILL,n=null){return le.intersect(this.clipBox,this.getPathBoundingBox(e,n))}};function q6(t,e){if(e instanceof ImageData){t.putImageData(e,0,0);return}let n=e.height,r=e.width,i=n%ti,o=(n-i)/ti,a=i===0?o:o+1,s=t.createImageData(r,ti),l=0,c,u=e.data,d=s.data,h,f,m,g;if(e.kind===bS.GRAYSCALE_1BPP){let y=u.byteLength,v=new Uint32Array(d.buffer,0,d.byteLength>>2),b=v.length,S=r+7>>3,_=4294967295,T=Vt.isLittleEndian?4278190080:255;for(h=0;h<a;h++){for(m=h<o?ti:i,c=0,f=0;f<m;f++){let x=y-l,E=0,C=x>S?r:x*8-7,I=C&-8,L=0,G=0;for(;E<I;E+=8)G=u[l++],v[c++]=G&128?_:T,v[c++]=G&64?_:T,v[c++]=G&32?_:T,v[c++]=G&16?_:T,v[c++]=G&8?_:T,v[c++]=G&4?_:T,v[c++]=G&2?_:T,v[c++]=G&1?_:T;for(;E<C;E++)L===0&&(G=u[l++],L=128),v[c++]=G&L?_:T,L>>=1}for(;c<b;)v[c++]=0;t.putImageData(s,0,h*ti)}}else if(e.kind===bS.RGBA_32BPP){for(f=0,g=r*ti*4,h=0;h<o;h++)d.set(u.subarray(l,l+g)),l+=g,t.putImageData(s,0,f),f+=ti;h<a&&(g=r*i*4,d.set(u.subarray(l,l+g)),t.putImageData(s,0,f))}else if(e.kind===bS.RGB_24BPP)for(m=ti,g=r*m,h=0;h<a;h++){for(h>=o&&(m=i,g=r*m),c=0,f=g;f--;)d[c++]=u[l++],d[c++]=u[l++],d[c++]=u[l++],d[c++]=255;t.putImageData(s,0,h*ti)}else throw new Error(`bad image kind: ${e.kind}`)}function F6(t,e){if(e.bitmap){t.drawImage(e.bitmap,0,0);return}let n=e.height,r=e.width,i=n%ti,o=(n-i)/ti,a=i===0?o:o+1,s=t.createImageData(r,ti),l=0,c=e.data,u=s.data;for(let d=0;d<a;d++){let h=d<o?ti:i;({srcPos:l}=cY({src:c,srcPos:l,dest:u,width:r,height:h,nonBlackColor:0})),t.putImageData(s,0,d*ti)}}function Sf(t,e){let n=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(let r of n)t[r]!==void 0&&(e[r]=t[r]);t.setLineDash!==void 0&&(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset)}function fS(t){t.strokeStyle=t.fillStyle="#000000",t.fillRule="nonzero",t.globalAlpha=1,t.lineWidth=1,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=10,t.globalCompositeOperation="source-over",t.font="10px sans-serif",t.setLineDash!==void 0&&(t.setLineDash([]),t.lineDashOffset=0);let{filter:e}=t;e!=="none"&&e!==""&&(t.filter="none")}function B6(t,e){if(e)return!0;le.singularValueDecompose2dScale(t,wi);let n=Math.fround(xo.pixelRatio*Ca.PDF_TO_CSS_UNITS);return wi[0]<=n&&wi[1]<=n}var hY=["butt","round","square"],fY=["miter","round","bevel"],pY={},H6={},ru=class t{constructor(e,n,r,i,o,{optionalContentConfig:a,markedContentStack:s=null},l,c,u){this.ctx=e,this.current=new NS(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=n,this.objs=r,this.canvasFactory=i,this.filterFactory=o,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=s||[],this.optionalContentConfig=a,this.cachedCanvases=new AR(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=l,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=c,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map,this.dependencyTracker=u??null}getObject(e,n,r=null){return typeof n=="string"?(this.dependencyTracker?.recordNamedDependency(e,n),n.startsWith("g_")?this.commonObjs.get(n):this.objs.get(n)):r}beginDrawing({transform:e,viewport:n,transparency:r=!1,background:i=null}){let o=this.ctx.canvas.width,a=this.ctx.canvas.height,s=this.ctx.fillStyle;if(this.ctx.fillStyle=i||"#ffffff",this.ctx.fillRect(0,0,o,a),this.ctx.fillStyle=s,r){let l=this.cachedCanvases.getCanvas("transparent",o,a);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform(...vt(this.compositeCtx))}this.ctx.save(),fS(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...n.transform),this.viewportScale=n.scale,this.baseTransform=vt(this.ctx)}executeOperatorList(e,n,r,i,o){let a=e.argsArray,s=e.fnArray,l=n||0,c=a.length;if(c===l)return l;let u=c-l>U6&&typeof r=="function",d=u?Date.now()+uY:0,h=0,f=this.commonObjs,m=this.objs,g,y;for(;;){if(i!==void 0&&l===i.nextBreakPoint)return i.breakIt(l,r),l;if(!o||o(l))if(g=s[l],y=a[l]??null,g!==Ef.dependency)y===null?this[g](l):this[g](l,...y);else for(let v of y){this.dependencyTracker?.recordNamedData(v,l);let b=v.startsWith("g_")?f:m;if(!b.has(v))return b.get(v,r),l}if(l++,l===c)return l;if(u&&++h>U6){if(Date.now()>d)return r(),l;h=0}}}#e(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#e(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(let e of this._cachedBitmapsMap.values()){for(let n of e.values())typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&(n.width=n.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.#t()}#t(){if(this.pageColors){let e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(e!=="none"){let n=this.ctx.filter;this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=n}}}_scaleImage(e,n){let r=e.width??e.displayWidth,i=e.height??e.displayHeight,o=Math.max(Math.hypot(n[0],n[1]),1),a=Math.max(Math.hypot(n[2],n[3]),1),s=r,l=i,c="prescale1",u,d;for(;o>2&&s>1||a>2&&l>1;){let h=s,f=l;o>2&&s>1&&(h=s>=16384?Math.floor(s/2)-1||1:Math.ceil(s/2),o/=s/h),a>2&&l>1&&(f=l>=16384?Math.floor(l/2)-1||1:Math.ceil(l)/2,a/=l/f),u=this.cachedCanvases.getCanvas(c,h,f),d=u.context,d.clearRect(0,0,h,f),d.drawImage(e,0,0,s,l,0,0,h,f),e=u.canvas,s=h,l=f,c=c==="prescale1"?"prescale2":"prescale1"}return{img:e,paintWidth:s,paintHeight:l}}_createMaskCanvas(e,n){let r=this.ctx,{width:i,height:o}=n,a=this.current.fillColor,s=this.current.patternFill,l=vt(r),c,u,d,h;if((n.bitmap||n.data)&&n.count>1){let L=n.bitmap||n.data.buffer;u=JSON.stringify(s?l:[l.slice(0,4),a]),c=this._cachedBitmapsMap.get(L),c||(c=new Map,this._cachedBitmapsMap.set(L,c));let G=c.get(u);if(G&&!s){let ge=Math.round(Math.min(l[0],l[2])+l[4]),de=Math.round(Math.min(l[1],l[3])+l[5]);return this.dependencyTracker?.recordDependencies(e,Hi.transformAndFill),{canvas:G,offsetX:ge,offsetY:de}}d=G}d||(h=this.cachedCanvases.getCanvas("maskCanvas",i,o),F6(h.context,n));let f=le.transform(l,[1/i,0,0,-1/o,0,0]);f=le.transform(f,[1,0,0,1,0,-o]);let m=iu.slice();le.axialAlignedBoundingBox([0,0,i,o],f,m);let[g,y,v,b]=m,S=Math.round(v-g)||1,_=Math.round(b-y)||1,T=this.cachedCanvases.getCanvas("fillCanvas",S,_),x=T.context,E=g,C=y;x.translate(-E,-C),x.transform(...f),d||(d=this._scaleImage(h.canvas,Mr(x)),d=d.img,c&&s&&c.set(u,d)),x.imageSmoothingEnabled=B6(vt(x),n.interpolate),hS(x,d,0,0,d.width,d.height,0,0,i,o),x.globalCompositeOperation="source-in";let I=le.transform(Mr(x),[1,0,0,1,-E,-C]);return x.fillStyle=s?a.getPattern(r,this,I,hn.FILL,e):a,x.fillRect(0,0,i,o),c&&!s&&(this.cachedCanvases.delete("fillCanvas"),c.set(u,T.canvas)),this.dependencyTracker?.recordDependencies(e,Hi.transformAndFill),{canvas:T.canvas,offsetX:Math.round(E),offsetY:Math.round(C)}}setLineWidth(e,n){this.dependencyTracker?.recordSimpleData("lineWidth",e),n!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=n,this.ctx.lineWidth=n}setLineCap(e,n){this.dependencyTracker?.recordSimpleData("lineCap",e),this.ctx.lineCap=hY[n]}setLineJoin(e,n){this.dependencyTracker?.recordSimpleData("lineJoin",e),this.ctx.lineJoin=fY[n]}setMiterLimit(e,n){this.dependencyTracker?.recordSimpleData("miterLimit",e),this.ctx.miterLimit=n}setDash(e,n,r){this.dependencyTracker?.recordSimpleData("dash",e);let i=this.ctx;i.setLineDash!==void 0&&(i.setLineDash(n),i.lineDashOffset=r)}setRenderingIntent(e,n){}setFlatness(e,n){}setGState(e,n){for(let[r,i]of n)switch(r){case"LW":this.setLineWidth(e,i);break;case"LC":this.setLineCap(e,i);break;case"LJ":this.setLineJoin(e,i);break;case"ML":this.setMiterLimit(e,i);break;case"D":this.setDash(e,i[0],i[1]);break;case"RI":this.setRenderingIntent(e,i);break;case"FL":this.setFlatness(e,i);break;case"Font":this.setFont(e,i[0],i[1]);break;case"CA":this.dependencyTracker?.recordSimpleData("strokeAlpha",e),this.current.strokeAlpha=i;break;case"ca":this.dependencyTracker?.recordSimpleData("fillAlpha",e),this.ctx.globalAlpha=this.current.fillAlpha=i;break;case"BM":this.dependencyTracker?.recordSimpleData("globalCompositeOperation",e),this.ctx.globalCompositeOperation=i;break;case"SMask":this.dependencyTracker?.recordSimpleData("SMask",e),this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.dependencyTracker?.recordSimpleData("filter",e),this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){let e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(e){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");let n=this.ctx.canvas.width,r=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,o=this.cachedCanvases.getCanvas(i,n,r);this.suspendedCtx=this.ctx;let a=this.ctx=o.context;a.setTransform(this.suspendedCtx.getTransform()),Sf(this.suspendedCtx,a),dY(a,this.suspendedCtx),this.setGState(e,[["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),Sf(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];let n=this.current.activeSMask,r=this.suspendedCtx;this.composeSMask(r,n,this.ctx,e),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(e,n,r,i){let o=i[0],a=i[1],s=i[2]-o,l=i[3]-a;s===0||l===0||(this.genericComposeSMask(n.context,r,s,l,n.subtype,n.backdrop,n.transferMap,o,a,n.offsetX,n.offsetY),e.save(),e.globalAlpha=1,e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0),e.drawImage(r.canvas,0,0),e.restore())}genericComposeSMask(e,n,r,i,o,a,s,l,c,u,d){let h=e.canvas,f=l-u,m=c-d;if(a)if(f<0||m<0||f+r>h.width||m+i>h.height){let y=this.cachedCanvases.getCanvas("maskExtension",r,i),v=y.context;v.drawImage(h,-f,-m),v.globalCompositeOperation="destination-atop",v.fillStyle=a,v.fillRect(0,0,r,i),v.globalCompositeOperation="source-over",h=y.canvas,f=m=0}else{e.save(),e.globalAlpha=1,e.setTransform(1,0,0,1,0,0);let y=new Path2D;y.rect(f,m,r,i),e.clip(y),e.globalCompositeOperation="destination-atop",e.fillStyle=a,e.fillRect(f,m,r,i),e.restore()}n.save(),n.globalAlpha=1,n.setTransform(1,0,0,1,0,0),o==="Alpha"&&s?n.filter=this.filterFactory.addAlphaFilter(s):o==="Luminosity"&&(n.filter=this.filterFactory.addLuminosityFilter(s));let g=new Path2D;g.rect(l,c,r,i),n.clip(g),n.globalCompositeOperation="destination-in",n.drawImage(h,f,m,r,i,l,c,r,i),n.restore()}save(e){this.inSMaskMode&&Sf(this.ctx,this.suspendedCtx),this.ctx.save();let n=this.current;this.stateStack.push(n),this.current=n.clone(),this.dependencyTracker?.save(e)}restore(e){if(this.dependencyTracker?.restore(e),this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&Sf(this.suspendedCtx,this.ctx),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(e,n,r,i,o,a,s){this.dependencyTracker?.recordIncrementalData("transform",e),this.ctx.transform(n,r,i,o,a,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(e,n,r,i){let[o]=r;if(!i){o||=r[0]=new Path2D,this[n](e,o);return}if(this.dependencyTracker!==null){let a=n===Ef.stroke?this.current.lineWidth/2:0;this.dependencyTracker.resetBBox(e).recordBBox(e,this.ctx,i[0]-a,i[2]+a,i[1]-a,i[3]+a).recordDependencies(e,["transform"])}if(!(o instanceof Path2D)){let a=r[0]=new Path2D;for(let s=0,l=o.length;s<l;)switch(o[s++]){case sS.moveTo:a.moveTo(o[s++],o[s++]);break;case sS.lineTo:a.lineTo(o[s++],o[s++]);break;case sS.curveTo:a.bezierCurveTo(o[s++],o[s++],o[s++],o[s++],o[s++],o[s++]);break;case sS.closePath:a.closePath();break;default:we(`Unrecognized drawing path operator: ${o[s-1]}`);break}o=a}le.axialAlignedBoundingBox(i,vt(this.ctx),this.current.minMax),this[n](e,o),this._pathStartIdx=e}closePath(e){this.ctx.closePath()}stroke(e,n,r=!0){let i=this.ctx,o=this.current.strokeColor;if(i.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof o=="object"&&o?.getPattern){let a=o.isModifyingCurrentTransform()?i.getTransform():null;if(i.save(),i.strokeStyle=o.getPattern(i,this,Mr(i),hn.STROKE,e),a){let s=new Path2D;s.addPath(n,i.getTransform().invertSelf().multiplySelf(a)),n=s}this.rescaleAndStroke(n,!1),i.restore()}else this.rescaleAndStroke(n,!0);this.dependencyTracker?.recordDependencies(e,Hi.stroke),r&&this.consumePath(e,n,this.current.getClippedPathBoundingBox(hn.STROKE,vt(this.ctx))),i.globalAlpha=this.current.fillAlpha}closeStroke(e,n){this.stroke(e,n)}fill(e,n,r=!0){let i=this.ctx,o=this.current.fillColor,a=this.current.patternFill,s=!1;if(a){let c=o.isModifyingCurrentTransform()?i.getTransform():null;if(this.dependencyTracker?.save(e),i.save(),i.fillStyle=o.getPattern(i,this,Mr(i),hn.FILL,e),c){let u=new Path2D;u.addPath(n,i.getTransform().invertSelf().multiplySelf(c)),n=u}s=!0}let l=this.current.getClippedPathBoundingBox();this.contentVisible&&l!==null&&(this.pendingEOFill?(i.fill(n,"evenodd"),this.pendingEOFill=!1):i.fill(n)),this.dependencyTracker?.recordDependencies(e,Hi.fill),s&&(i.restore(),this.dependencyTracker?.restore(e)),r&&this.consumePath(e,n,l)}eoFill(e,n){this.pendingEOFill=!0,this.fill(e,n)}fillStroke(e,n){this.fill(e,n,!1),this.stroke(e,n,!1),this.consumePath(e,n)}eoFillStroke(e,n){this.pendingEOFill=!0,this.fillStroke(e,n)}closeFillStroke(e,n){this.fillStroke(e,n)}closeEOFillStroke(e,n){this.pendingEOFill=!0,this.fillStroke(e,n)}endPath(e,n){this.consumePath(e,n)}rawFillPath(e,n){this.ctx.fill(n),this.dependencyTracker?.recordDependencies(e,Hi.rawFillPath).recordOperation(e)}clip(e){this.dependencyTracker?.recordFutureForcedDependency("clipMode",e),this.pendingClip=pY}eoClip(e){this.dependencyTracker?.recordFutureForcedDependency("clipMode",e),this.pendingClip=H6}beginText(e){this.current.textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.dependencyTracker?.recordOpenMarker(e).resetIncrementalData("sameLineText").resetIncrementalData("moveText",e)}endText(e){let n=this.pendingTextPaths,r=this.ctx;if(this.dependencyTracker){let{dependencyTracker:i}=this;n!==void 0&&i.recordFutureForcedDependency("textClip",i.getOpenMarker()).recordFutureForcedDependency("textClip",e),i.recordCloseMarker(e)}if(n!==void 0){let i=new Path2D,o=r.getTransform().invertSelf();for(let{transform:a,x:s,y:l,fontSize:c,path:u}of n)u&&i.addPath(u,new DOMMatrix(a).preMultiplySelf(o).translate(s,l).scale(c,-c));r.clip(i)}delete this.pendingTextPaths}setCharSpacing(e,n){this.dependencyTracker?.recordSimpleData("charSpacing",e),this.current.charSpacing=n}setWordSpacing(e,n){this.dependencyTracker?.recordSimpleData("wordSpacing",e),this.current.wordSpacing=n}setHScale(e,n){this.dependencyTracker?.recordSimpleData("hScale",e),this.current.textHScale=n/100}setLeading(e,n){this.dependencyTracker?.recordSimpleData("leading",e),this.current.leading=-n}setFont(e,n,r){this.dependencyTracker?.recordSimpleData("font",e).recordSimpleDataFromNamed("fontObj",n,e);let i=this.commonObjs.get(n),o=this.current;if(!i)throw new Error(`Can't find font for ${n}`);if(o.fontMatrix=i.fontMatrix||Gk,(o.fontMatrix[0]===0||o.fontMatrix[3]===0)&&we("Invalid font matrix for font "+n),r<0?(r=-r,o.fontDirection=-1):o.fontDirection=1,this.current.font=i,this.current.fontSize=r,i.isType3Font)return;let a=i.loadedName||"sans-serif",s=E6(i,i.systemFontInfo?.css||`"${a}", ${i.fallbackName}`),l="normal";i.black?l="900":i.bold&&(l="bold");let c=i.italic?"italic":"normal",u=r;r<L6?u=L6:r>j6&&(u=j6),this.current.fontSizeScale=r/u,this.ctx.font=`${c} ${l} ${u}px ${s}`}setTextRenderingMode(e,n){this.dependencyTracker?.recordSimpleData("textRenderingMode",e),this.current.textRenderingMode=n}setTextRise(e,n){this.dependencyTracker?.recordSimpleData("textRise",e),this.current.textRise=n}moveText(e,n,r){this.dependencyTracker?.resetIncrementalData("sameLineText").recordIncrementalData("moveText",e),this.current.x=this.current.lineX+=n,this.current.y=this.current.lineY+=r}setLeadingMoveText(e,n,r){this.setLeading(e,-r),this.moveText(e,n,r)}setTextMatrix(e,n){this.dependencyTracker?.recordSimpleData("textMatrix",e);let{current:r}=this;r.textMatrix=n,r.textMatrixScale=Math.hypot(n[0],n[1]),r.x=r.lineX=0,r.y=r.lineY=0}nextLine(e){this.moveText(e,0,this.current.leading),this.dependencyTracker?.recordIncrementalData("moveText",this.dependencyTracker.getSimpleIndex("leading")??e)}#i(e,n,r){let i=new Path2D;return i.addPath(e,new DOMMatrix(r).invertSelf().multiplySelf(n)),i}paintChar(e,n,r,i,o,a){let s=this.ctx,l=this.current,c=l.font,u=l.textRenderingMode,d=l.fontSize/l.fontSizeScale,h=u&dn.FILL_STROKE_MASK,f=!!(u&dn.ADD_TO_PATH_FLAG),m=l.patternFill&&!c.missingFile,g=l.patternStroke&&!c.missingFile,y;if((c.disableFontFace||f||m||g)&&!c.missingFile&&(y=c.getPathGenerator(this.commonObjs,n)),y&&(c.disableFontFace||m||g)){s.save(),s.translate(r,i),s.scale(d,-d),this.dependencyTracker?.recordCharacterBBox(e,s,c);let v;if(h===dn.FILL||h===dn.FILL_STROKE)if(o){v=s.getTransform(),s.setTransform(...o);let b=this.#i(y,v,o);s.fill(b)}else s.fill(y);if(h===dn.STROKE||h===dn.FILL_STROKE)if(a){v||=s.getTransform(),s.setTransform(...a);let{a:b,b:S,c:_,d:T}=v,x=le.inverseTransform(a),E=le.transform([b,S,_,T,0,0],x);le.singularValueDecompose2dScale(E,wi),s.lineWidth*=Math.max(wi[0],wi[1])/d,s.stroke(this.#i(y,v,a))}else s.lineWidth/=d,s.stroke(y);s.restore()}else(h===dn.FILL||h===dn.FILL_STROKE)&&(s.fillText(n,r,i),this.dependencyTracker?.recordCharacterBBox(e,s,c,d,r,i,()=>s.measureText(n))),(h===dn.STROKE||h===dn.FILL_STROKE)&&(this.dependencyTracker&&this.dependencyTracker?.recordCharacterBBox(e,s,c,d,r,i,()=>s.measureText(n)).recordDependencies(e,Hi.stroke),s.strokeText(n,r,i));f&&((this.pendingTextPaths||=[]).push({transform:vt(s),x:r,y:i,fontSize:d,path:y}),this.dependencyTracker?.recordCharacterBBox(e,s,c,d,r,i))}get isFontSubpixelAAEnabled(){let{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);let n=e.getImageData(0,0,10,10).data,r=!1;for(let i=3;i<n.length;i+=4)if(n[i]>0&&n[i]<255){r=!0;break}return Re(this,"isFontSubpixelAAEnabled",r)}showText(e,n){this.dependencyTracker&&(this.dependencyTracker.recordDependencies(e,Hi.showText).resetBBox(e),this.current.textRenderingMode&dn.ADD_TO_PATH_FLAG&&this.dependencyTracker.recordFutureForcedDependency("textClip",e).inheritPendingDependenciesAsFutureForcedDependencies());let r=this.current,i=r.font;if(i.isType3Font){this.showType3Text(e,n),this.dependencyTracker?.recordShowTextOperation(e);return}let o=r.fontSize;if(o===0){this.dependencyTracker?.recordOperation(e);return}let a=this.ctx,s=r.fontSizeScale,l=r.charSpacing,c=r.wordSpacing,u=r.fontDirection,d=r.textHScale*u,h=n.length,f=i.vertical,m=f?1:-1,g=i.defaultVMetrics,y=o*r.fontMatrix[0],v=r.textRenderingMode===dn.FILL&&!i.disableFontFace&&!r.patternFill;a.save(),r.textMatrix&&a.transform(...r.textMatrix),a.translate(r.x,r.y+r.textRise),u>0?a.scale(d,-1):a.scale(d,1);let b,S;if(r.patternFill){a.save();let C=r.fillColor.getPattern(a,this,Mr(a),hn.FILL,e);b=vt(a),a.restore(),a.fillStyle=C}if(r.patternStroke){a.save();let C=r.strokeColor.getPattern(a,this,Mr(a),hn.STROKE,e);S=vt(a),a.restore(),a.strokeStyle=C}let _=r.lineWidth,T=r.textMatrixScale;if(T===0||_===0){let C=r.textRenderingMode&dn.FILL_STROKE_MASK;(C===dn.STROKE||C===dn.FILL_STROKE)&&(_=this.getSinglePixelWidth())}else _/=T;if(s!==1&&(a.scale(s,s),_/=s),a.lineWidth=_,i.isInvalidPDFjsFont){let C=[],I=0;for(let G of n)C.push(G.unicode),I+=G.width;let L=C.join("");if(a.fillText(L,0,0),this.dependencyTracker!==null){let G=a.measureText(L);this.dependencyTracker.recordBBox(e,this.ctx,-G.actualBoundingBoxLeft,G.actualBoundingBoxRight,-G.actualBoundingBoxAscent,G.actualBoundingBoxDescent).recordShowTextOperation(e)}r.x+=I*y*d,a.restore(),this.compose();return}let x=0,E;for(E=0;E<h;++E){let C=n[E];if(typeof C=="number"){x+=m*C*o/1e3;continue}let I=!1,L=(C.isSpace?c:0)+l,G=C.fontChar,ge=C.accent,de,pe,Ee=C.width;if(f){let Se=C.vmetric||g,nt=-(C.vmetric?Se[1]:Ee*.5)*y,U=Se[2]*y;Ee=Se?-Se[0]:Ee,de=nt/s,pe=(x+U)/s}else de=x/s,pe=0;let ae;if(i.remeasure&&Ee>0){ae=a.measureText(G);let Se=ae.width*1e3/o*s;if(Ee<Se&&this.isFontSubpixelAAEnabled){let nt=Ee/Se;I=!0,a.save(),a.scale(nt,1),de/=nt}else Ee!==Se&&(de+=(Ee-Se)/2e3*o/s)}if(this.contentVisible&&(C.isInFont||i.missingFile)){if(v&&!ge)a.fillText(G,de,pe),this.dependencyTracker?.recordCharacterBBox(e,a,ae?{bbox:null}:i,o/s,de,pe,()=>ae??a.measureText(G));else if(this.paintChar(e,G,de,pe,b,S),ge){let Se=de+o*ge.offset.x/s,nt=pe-o*ge.offset.y/s;this.paintChar(e,ge.fontChar,Se,nt,b,S)}}let oe=f?Ee*y-L*u:Ee*y+L*u;x+=oe,I&&a.restore()}f?r.y-=x:r.x+=x*d,a.restore(),this.compose(),this.dependencyTracker?.recordShowTextOperation(e)}showType3Text(e,n){let r=this.ctx,i=this.current,o=i.font,a=i.fontSize,s=i.fontDirection,l=o.vertical?1:-1,c=i.charSpacing,u=i.wordSpacing,d=i.textHScale*s,h=i.fontMatrix||Gk,f=n.length,m=i.textRenderingMode===dn.INVISIBLE,g,y,v,b;if(m||a===0)return;this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,r.save(),i.textMatrix&&r.transform(...i.textMatrix),r.translate(i.x,i.y+i.textRise),r.scale(d,s);let S=this.dependencyTracker;for(this.dependencyTracker=S?new OS(S,e):null,g=0;g<f;++g){if(y=n[g],typeof y=="number"){b=l*y*a/1e3,this.ctx.translate(b,0),i.x+=b*d;continue}let _=(y.isSpace?u:0)+c,T=o.charProcOperatorList[y.operatorListId];T?this.contentVisible&&(this.save(),r.scale(a,a),r.transform(...h),this.executeOperatorList(T),this.restore()):we(`Type3 character "${y.operatorListId}" is not available.`);let x=[y.width,0];le.applyTransform(x,h),v=x[0]*a+_,r.translate(v,0),i.x+=v*d}r.restore(),S&&(this.dependencyTracker=S)}setCharWidth(e,n,r){}setCharWidthAndBounds(e,n,r,i,o,a,s){let l=new Path2D;l.rect(i,o,a-i,s-o),this.ctx.clip(l),this.dependencyTracker?.recordBBox(e,this.ctx,i,a,o,s).recordClipBox(e,this.ctx,i,a,o,s),this.endPath(e)}getColorN_Pattern(e,n){let r;if(n[0]==="TilingPattern"){let i=this.baseTransform||vt(this.ctx),o={createCanvasGraphics:(a,s)=>new t(a,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack},void 0,void 0,this.dependencyTracker?new OS(this.dependencyTracker,s,!0):null)};r=new TR(n,this.ctx,o,i)}else r=this._getPattern(e,n[1],n[2]);return r}setStrokeColorN(e,...n){this.dependencyTracker?.recordSimpleData("strokeColor",e),this.current.strokeColor=this.getColorN_Pattern(e,n),this.current.patternStroke=!0}setFillColorN(e,...n){this.dependencyTracker?.recordSimpleData("fillColor",e),this.current.fillColor=this.getColorN_Pattern(e,n),this.current.patternFill=!0}setStrokeRGBColor(e,n){this.dependencyTracker?.recordSimpleData("strokeColor",e),this.ctx.strokeStyle=this.current.strokeColor=n,this.current.patternStroke=!1}setStrokeTransparent(e){this.dependencyTracker?.recordSimpleData("strokeColor",e),this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(e,n){this.dependencyTracker?.recordSimpleData("fillColor",e),this.ctx.fillStyle=this.current.fillColor=n,this.current.patternFill=!1}setFillTransparent(e){this.dependencyTracker?.recordSimpleData("fillColor",e),this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=!1}_getPattern(e,n,r=null){let i;return this.cachedPatterns.has(n)?i=this.cachedPatterns.get(n):(i=lY(this.getObject(e,n)),this.cachedPatterns.set(n,i)),r&&(i.matrix=r),i}shadingFill(e,n){if(!this.contentVisible)return;let r=this.ctx;this.save(e);let i=this._getPattern(e,n);r.fillStyle=i.getPattern(r,this,Mr(r),hn.SHADING,e);let o=Mr(r);if(o){let{width:a,height:s}=r.canvas,l=iu.slice();le.axialAlignedBoundingBox([0,0,a,s],o,l);let[c,u,d,h]=l;this.ctx.fillRect(c,u,d-c,h-u)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.dependencyTracker?.resetBBox(e).recordFullPageBBox(e).recordDependencies(e,Hi.transform).recordDependencies(e,Hi.fill).recordOperation(e),this.compose(this.current.getClippedPathBoundingBox()),this.restore(e)}beginInlineImage(){rt("Should not call beginInlineImage")}beginImageData(){rt("Should not call beginImageData")}paintFormXObjectBegin(e,n,r){if(this.contentVisible&&(this.save(e),this.baseTransformStack.push(this.baseTransform),n&&this.transform(e,...n),this.baseTransform=vt(this.ctx),r)){le.axialAlignedBoundingBox(r,this.baseTransform,this.current.minMax);let[i,o,a,s]=r,l=new Path2D;l.rect(i,o,a-i,s-o),this.ctx.clip(l),this.dependencyTracker?.recordClipBox(e,this.ctx,i,a,o,s),this.endPath(e)}}paintFormXObjectEnd(e){this.contentVisible&&(this.restore(e),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e,n){if(!this.contentVisible)return;this.save(e),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);let r=this.ctx;n.isolated||i_("TODO: Support non-isolated groups."),n.knockout&&we("Knockout groups not supported.");let i=vt(r);if(n.matrix&&r.transform(...n.matrix),!n.bbox)throw new Error("Bounding box is required.");let o=iu.slice();le.axialAlignedBoundingBox(n.bbox,vt(r),o);let a=[0,0,r.canvas.width,r.canvas.height];o=le.intersect(o,a)||[0,0,0,0];let s=Math.floor(o[0]),l=Math.floor(o[1]),c=Math.max(Math.ceil(o[2])-s,1),u=Math.max(Math.ceil(o[3])-l,1);this.current.startNewPathAndClipBox([0,0,c,u]);let d="groupAt"+this.groupLevel;n.smask&&(d+="_smask_"+this.smaskCounter++%2);let h=this.cachedCanvases.getCanvas(d,c,u),f=h.context;f.translate(-s,-l),f.transform(...i);let m=new Path2D,[g,y,v,b]=n.bbox;if(m.rect(g,y,v-g,b-y),n.matrix){let S=new Path2D;S.addPath(m,new DOMMatrix(n.matrix)),m=S}f.clip(m),n.smask&&this.smaskStack.push({canvas:h.canvas,context:f,offsetX:s,offsetY:l,subtype:n.smask.subtype,backdrop:n.smask.backdrop,transferMap:n.smask.transferMap||null,startTransformInverse:null}),(!n.smask||this.dependencyTracker)&&(r.setTransform(1,0,0,1,0,0),r.translate(s,l),r.save()),Sf(r,f),this.ctx=f,this.dependencyTracker?.inheritSimpleDataAsFutureForcedDependencies(["fillAlpha","strokeAlpha","globalCompositeOperation"]).pushBaseTransform(r),this.setGState(e,[["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(r),this.groupLevel++}endGroup(e,n){if(!this.contentVisible)return;this.groupLevel--;let r=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,this.dependencyTracker?.popBaseTransform(),n.smask)this.tempSMask=this.smaskStack.pop(),this.restore(e),this.dependencyTracker&&this.ctx.restore();else{this.ctx.restore();let o=vt(this.ctx);this.restore(e),this.ctx.save(),this.ctx.setTransform(...o);let a=iu.slice();le.axialAlignedBoundingBox([0,0,r.canvas.width,r.canvas.height],o,a),this.ctx.drawImage(r.canvas,0,0),this.ctx.restore(),this.compose(a)}}beginAnnotation(e,n,r,i,o,a){if(this.#e(),fS(this.ctx),this.ctx.save(),this.save(e),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),r){let s=r[2]-r[0],l=r[3]-r[1];if(a&&this.annotationCanvasMap){i=i.slice(),i[4]-=r[0],i[5]-=r[1],r=r.slice(),r[0]=r[1]=0,r[2]=s,r[3]=l,le.singularValueDecompose2dScale(vt(this.ctx),wi);let{viewportScale:c}=this,u=Math.ceil(s*this.outputScaleX*c),d=Math.ceil(l*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(u,d);let{canvas:h,context:f}=this.annotationCanvas;this.annotationCanvasMap.set(n,h),this.annotationCanvas.savedCtx=this.ctx,this.ctx=f,this.ctx.save(),this.ctx.setTransform(wi[0],0,0,-wi[1],0,l*wi[1]),fS(this.ctx)}else{fS(this.ctx),this.endPath(e);let c=new Path2D;c.rect(r[0],r[1],s,l),this.ctx.clip(c)}}this.current=new NS(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(e,...i),this.transform(e,...o)}endAnnotation(e){this.annotationCanvas&&(this.ctx.restore(),this.#t(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e,n){if(!this.contentVisible)return;let r=n.count;n=this.getObject(e,n.data,n),n.count=r;let i=this.ctx,o=this._createMaskCanvas(e,n),a=o.canvas;i.save(),i.setTransform(1,0,0,1,0,0),i.drawImage(a,o.offsetX,o.offsetY),this.dependencyTracker?.resetBBox(e).recordBBox(e,this.ctx,o.offsetX,o.offsetX+a.width,o.offsetY,o.offsetY+a.height).recordOperation(e),i.restore(),this.compose()}paintImageMaskXObjectRepeat(e,n,r,i=0,o=0,a,s){if(!this.contentVisible)return;n=this.getObject(e,n.data,n);let l=this.ctx;l.save();let c=vt(l);l.transform(r,i,o,a,0,0);let u=this._createMaskCanvas(e,n);l.setTransform(1,0,0,1,u.offsetX-c[4],u.offsetY-c[5]),this.dependencyTracker?.resetBBox(e);for(let d=0,h=s.length;d<h;d+=2){let f=le.transform(c,[r,i,o,a,s[d],s[d+1]]);l.drawImage(u.canvas,f[4],f[5]),this.dependencyTracker?.recordBBox(e,this.ctx,f[4],f[4]+u.canvas.width,f[5],f[5]+u.canvas.height)}l.restore(),this.compose(),this.dependencyTracker?.recordOperation(e)}paintImageMaskXObjectGroup(e,n){if(!this.contentVisible)return;let r=this.ctx,i=this.current.fillColor,o=this.current.patternFill;this.dependencyTracker?.resetBBox(e).recordDependencies(e,Hi.transformAndFill);for(let a of n){let{data:s,width:l,height:c,transform:u}=a,d=this.cachedCanvases.getCanvas("maskCanvas",l,c),h=d.context;h.save();let f=this.getObject(e,s,a);F6(h,f),h.globalCompositeOperation="source-in",h.fillStyle=o?i.getPattern(h,this,Mr(r),hn.FILL,e):i,h.fillRect(0,0,l,c),h.restore(),r.save(),r.transform(...u),r.scale(1,-1),hS(r,d.canvas,0,0,l,c,0,-1,1,1),this.dependencyTracker?.recordBBox(e,r,0,l,0,c),r.restore()}this.compose(),this.dependencyTracker?.recordOperation(e)}paintImageXObject(e,n){if(!this.contentVisible)return;let r=this.getObject(e,n);if(!r){we("Dependent image isn't ready yet");return}this.paintInlineImageXObject(e,r)}paintImageXObjectRepeat(e,n,r,i,o){if(!this.contentVisible)return;let a=this.getObject(e,n);if(!a){we("Dependent image isn't ready yet");return}let s=a.width,l=a.height,c=[];for(let u=0,d=o.length;u<d;u+=2)c.push({transform:[r,0,0,i,o[u],o[u+1]],x:0,y:0,w:s,h:l});this.paintInlineImageXObjectGroup(e,a,c)}applyTransferMapsToCanvas(e){return this.current.transferMaps!=="none"&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){if(this.current.transferMaps==="none")return e.bitmap;let{bitmap:n,width:r,height:i}=e,o=this.cachedCanvases.getCanvas("inlineImage",r,i),a=o.context;return a.filter=this.current.transferMaps,a.drawImage(n,0,0),a.filter="none",o.canvas}paintInlineImageXObject(e,n){if(!this.contentVisible)return;let r=n.width,i=n.height,o=this.ctx;this.save(e);let{filter:a}=o;a!=="none"&&a!==""&&(o.filter="none"),o.scale(1/r,-1/i);let s;if(n.bitmap)s=this.applyTransferMapsToBitmap(n);else if(typeof HTMLElement=="function"&&n instanceof HTMLElement||!n.data)s=n;else{let u=this.cachedCanvases.getCanvas("inlineImage",r,i).context;q6(u,n),s=this.applyTransferMapsToCanvas(u)}let l=this._scaleImage(s,Mr(o));o.imageSmoothingEnabled=B6(vt(o),n.interpolate),this.dependencyTracker?.resetBBox(e).recordBBox(e,o,0,r,-i,0).recordDependencies(e,Hi.imageXObject).recordOperation(e),hS(o,l.img,0,0,l.paintWidth,l.paintHeight,0,-i,r,i),this.compose(),this.restore(e)}paintInlineImageXObjectGroup(e,n,r){if(!this.contentVisible)return;let i=this.ctx,o;if(n.bitmap)o=n.bitmap;else{let a=n.width,s=n.height,c=this.cachedCanvases.getCanvas("inlineImage",a,s).context;q6(c,n),o=this.applyTransferMapsToCanvas(c)}this.dependencyTracker?.resetBBox(e);for(let a of r)i.save(),i.transform(...a.transform),i.scale(1,-1),hS(i,o,a.x,a.y,a.w,a.h,0,-1,1,1),this.dependencyTracker?.recordBBox(e,i,0,1,-1,0),i.restore();this.dependencyTracker?.recordOperation(e),this.compose()}paintSolidColorImageMask(e){this.contentVisible&&(this.dependencyTracker?.resetBBox(e).recordBBox(e,this.ctx,0,1,0,1).recordDependencies(e,Hi.fill).recordOperation(e),this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e,n){}markPointProps(e,n,r){}beginMarkedContent(e,n){this.dependencyTracker?.beginMarkedContent(e),this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,n,r){this.dependencyTracker?.beginMarkedContent(e),n==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(r)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(e){this.dependencyTracker?.endMarkedContent(e),this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(e){}endCompat(e){}consumePath(e,n,r){let i=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(r);let o=this.ctx;this.pendingClip?(i||(this.pendingClip===H6?o.clip(n,"evenodd"):o.clip(n)),this.pendingClip=null,this.dependencyTracker?.bboxToClipBoxDropOperation(e).recordFutureForcedDependency("clipPath",e)):this.dependencyTracker?.recordOperation(e),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){let e=vt(this.ctx);if(e[1]===0&&e[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(e[0]),Math.abs(e[3]));else{let n=Math.abs(e[0]*e[3]-e[2]*e[1]),r=Math.hypot(e[0],e[2]),i=Math.hypot(e[1],e[3]);this._cachedGetSinglePixelWidth=Math.max(r,i)/n}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){let{lineWidth:e}=this.current,{a:n,b:r,c:i,d:o}=this.ctx.getTransform(),a,s;if(r===0&&i===0){let l=Math.abs(n),c=Math.abs(o);if(l===c)if(e===0)a=s=1/l;else{let u=l*e;a=s=u<1?1/u:1}else if(e===0)a=1/l,s=1/c;else{let u=l*e,d=c*e;a=u<1?1/u:1,s=d<1?1/d:1}}else{let l=Math.abs(n*o-r*i),c=Math.hypot(n,r),u=Math.hypot(i,o);if(e===0)a=u/l,s=c/l;else{let d=e*l;a=u>d?u/d:1,s=c>d?c/d:1}}this._cachedScaleForStroking[0]=a,this._cachedScaleForStroking[1]=s}return this._cachedScaleForStroking}rescaleAndStroke(e,n){let{ctx:r,current:{lineWidth:i}}=this,[o,a]=this.getScaleForStroking();if(o===a){r.lineWidth=(i||1)*o,r.stroke(e);return}let s=r.getLineDash();n&&r.save(),r.scale(o,a),Hk.a=1/o,Hk.d=1/a;let l=new Path2D;if(l.addPath(e,Hk),s.length>0){let c=Math.max(o,a);r.setLineDash(s.map(u=>u/c)),r.lineDashOffset/=c}r.lineWidth=i||1,r.stroke(l),n&&r.restore()}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}};for(let t in Ef)ru.prototype[t]!==void 0&&(ru.prototype[Ef[t]]=ru.prototype[t]);var MS=class t{#e;#t;#i;static strings=["fontFamily","fontWeight","italicAngle"];static write(e){let n=new TextEncoder,r={},i=0;for(let c of t.strings){let u=n.encode(e[c]);r[c]=u,i+=4+u.length}let o=new ArrayBuffer(i),a=new Uint8Array(o),s=new DataView(o),l=0;for(let c of t.strings){let u=r[c],d=u.length;s.setUint32(l,d),a.set(u,l+4),l+=4+d}return Ue(l===o.byteLength,"CssFontInfo.write: Buffer overflow"),o}constructor(e){this.#e=e,this.#t=new DataView(this.#e),this.#i=new TextDecoder}#n(e){Ue(e<t.strings.length,"Invalid string index");let n=0;for(let i=0;i<e;i++)n+=this.#t.getUint32(n)+4;let r=this.#t.getUint32(n);return this.#i.decode(new Uint8Array(this.#e,n+4,r))}get fontFamily(){return this.#n(0)}get fontWeight(){return this.#n(1)}get italicAngle(){return this.#n(2)}},DS=class t{#e;#t;#i;static strings=["css","loadedName","baseFontName","src"];static write(e){let n=new TextEncoder,r={},i=0;for(let h of t.strings){let f=n.encode(e[h]);r[h]=f,i+=4+f.length}i+=4;let o,a,s=1+i;e.style&&(o=n.encode(e.style.style),a=n.encode(e.style.weight),s+=4+o.length+4+a.length);let l=new ArrayBuffer(s),c=new Uint8Array(l),u=new DataView(l),d=0;u.setUint8(d++,e.guessFallback?1:0),u.setUint32(d,0),d+=4,i=0;for(let h of t.strings){let f=r[h],m=f.length;i+=4+m,u.setUint32(d,m),c.set(f,d+4),d+=4+m}return u.setUint32(d-i-4,i),e.style&&(u.setUint32(d,o.length),c.set(o,d+4),d+=4+o.length,u.setUint32(d,a.length),c.set(a,d+4),d+=4+a.length),Ue(d<=l.byteLength,"SubstitionInfo.write: Buffer overflow"),l.transferToFixedLength(d)}constructor(e){this.#e=e,this.#t=new DataView(this.#e),this.#i=new TextDecoder}get guessFallback(){return this.#t.getUint8(0)!==0}#n(e){Ue(e<t.strings.length,"Invalid string index");let n=5;for(let i=0;i<e;i++)n+=this.#t.getUint32(n)+4;let r=this.#t.getUint32(n);return this.#i.decode(new Uint8Array(this.#e,n+4,r))}get css(){return this.#n(0)}get loadedName(){return this.#n(1)}get baseFontName(){return this.#n(2)}get src(){return this.#n(3)}get style(){let e=1;e+=4+this.#t.getUint32(e);let n=this.#t.getUint32(e),r=this.#i.decode(new Uint8Array(this.#e,e+4,n));e+=4+n;let i=this.#t.getUint32(e),o=this.#i.decode(new Uint8Array(this.#e,e+4,i));return{style:r,weight:o}}},ER=class t{static bools=["black","bold","disableFontFace","fontExtraProperties","isInvalidPDFjsFont","isType3Font","italic","missingFile","remeasure","vertical"];static numbers=["ascent","defaultWidth","descent"];static strings=["fallbackName","loadedName","mimetype","name"];static#e=Math.ceil(this.bools.length*2/8);static#t=this.#e+this.numbers.length*8;static#i=this.#t+1+8;static#n=this.#i+1+48;static#a=this.#n+1+6;#r;#o;#s;constructor({data:e,extra:n}){this.#r=e,this.#o=new TextDecoder,this.#s=new DataView(this.#r),n&&Object.assign(this,n)}#c(e){Ue(e<t.bools.length,"Invalid boolean index");let n=Math.floor(e/4),r=e*2%8,i=this.#s.getUint8(n)>>r&3;return i===0?void 0:i===2}get black(){return this.#c(0)}get bold(){return this.#c(1)}get disableFontFace(){return this.#c(2)}get fontExtraProperties(){return this.#c(3)}get isInvalidPDFjsFont(){return this.#c(4)}get isType3Font(){return this.#c(5)}get italic(){return this.#c(6)}get missingFile(){return this.#c(7)}get remeasure(){return this.#c(8)}get vertical(){return this.#c(9)}#l(e){return Ue(e<t.numbers.length,"Invalid number index"),this.#s.getFloat64(t.#e+e*8)}get ascent(){return this.#l(0)}get defaultWidth(){return this.#l(1)}get descent(){return this.#l(2)}get bbox(){let e=t.#t;if(this.#s.getUint8(e)===0)return;e+=1;let r=[];for(let i=0;i<4;i++)r.push(this.#s.getInt16(e,!0)),e+=2;return r}get fontMatrix(){let e=t.#i;if(this.#s.getUint8(e)===0)return;e+=1;let r=[];for(let i=0;i<6;i++)r.push(this.#s.getFloat64(e,!0)),e+=8;return r}get defaultVMetrics(){let e=t.#n;if(this.#s.getUint8(e)===0)return;e+=1;let r=[];for(let i=0;i<3;i++)r.push(this.#s.getInt16(e,!0)),e+=2;return r}#h(e){Ue(e<t.strings.length,"Invalid string index");let n=t.#a+4;for(let o=0;o<e;o++)n+=this.#s.getUint32(n)+4;let r=this.#s.getUint32(n),i=new Uint8Array(r);return i.set(new Uint8Array(this.#r,n+4,r)),this.#o.decode(i)}get fallbackName(){return this.#h(0)}get loadedName(){return this.#h(1)}get mimetype(){return this.#h(2)}get name(){return this.#h(3)}get data(){let e=t.#a,n=this.#s.getUint32(e);e+=4+n;let r=this.#s.getUint32(e);e+=4+r;let i=this.#s.getUint32(e);e+=4+i;let o=this.#s.getUint32(e);if(o!==0)return new Uint8Array(this.#r,e+4,o)}clearData(){let e=t.#a,n=this.#s.getUint32(e);e+=4+n;let r=this.#s.getUint32(e);e+=4+r;let i=this.#s.getUint32(e);e+=4+i;let o=this.#s.getUint32(e);new Uint8Array(this.#r,e+4,o).fill(0),this.#s.setUint32(e,0)}get cssFontInfo(){let e=t.#a,n=this.#s.getUint32(e);e+=4+n;let r=this.#s.getUint32(e);e+=4+r;let i=this.#s.getUint32(e);if(i===0)return null;let o=new Uint8Array(i);return o.set(new Uint8Array(this.#r,e+4,i)),new MS(o.buffer)}get systemFontInfo(){let e=t.#a,n=this.#s.getUint32(e);e+=4+n;let r=this.#s.getUint32(e);if(r===0)return null;let i=new Uint8Array(r);return i.set(new Uint8Array(this.#r,e+4,r)),new DS(i.buffer)}static write(e){let n=e.systemFontInfo?DS.write(e.systemFontInfo):null,r=e.cssFontInfo?MS.write(e.cssFontInfo):null,i=new TextEncoder,o={},a=0;for(let g of t.strings)o[g]=i.encode(e[g]),a+=4+o[g].length;let s=t.#a+4+a+4+(n?n.byteLength:0)+4+(r?r.byteLength:0)+4+(e.data?e.data.length:0),l=new ArrayBuffer(s),c=new Uint8Array(l),u=new DataView(l),d=0,h=t.bools.length,f=0,m=0;for(let g=0;g<h;g++){let y=e[t.bools[g]];f|=(y===void 0?0:y?2:1)<<m,m+=2,(m===8||g===h-1)&&(u.setUint8(d++,f),f=0,m=0)}Ue(d===t.#e,"FontInfo.write: Boolean properties offset mismatch");for(let g of t.numbers)u.setFloat64(d,e[g]),d+=8;if(Ue(d===t.#t,"FontInfo.write: Number properties offset mismatch"),e.bbox){u.setUint8(d++,4);for(let g of e.bbox)u.setInt16(d,g,!0),d+=2}else u.setUint8(d++,0),d+=8;if(Ue(d===t.#i,"FontInfo.write: BBox properties offset mismatch"),e.fontMatrix){u.setUint8(d++,6);for(let g of e.fontMatrix)u.setFloat64(d,g,!0),d+=8}else u.setUint8(d++,0),d+=48;if(Ue(d===t.#n,"FontInfo.write: FontMatrix properties offset mismatch"),e.defaultVMetrics){u.setUint8(d++,1);for(let g of e.defaultVMetrics)u.setInt16(d,g,!0),d+=2}else u.setUint8(d++,0),d+=6;Ue(d===t.#a,"FontInfo.write: DefaultVMetrics properties offset mismatch"),u.setUint32(t.#a,0),d+=4;for(let g of t.strings){let y=o[g],v=y.length;u.setUint32(d,v),c.set(y,d+4),d+=4+v}if(u.setUint32(t.#a,d-t.#a-4),!n)u.setUint32(d,0),d+=4;else{let g=n.byteLength;u.setUint32(d,g),Ue(d+4+g<=l.byteLength,"FontInfo.write: Buffer overflow at systemFontInfo"),c.set(new Uint8Array(n),d+4),d+=4+g}if(!r)u.setUint32(d,0),d+=4;else{let g=r.byteLength;u.setUint32(d,g),Ue(d+4+g<=l.byteLength,"FontInfo.write: Buffer overflow at cssFontInfo"),c.set(new Uint8Array(r),d+4),d+=4+g}return e.data===void 0?(u.setUint32(d,0),d+=4):(u.setUint32(d,e.data.length),c.set(e.data,d+4),d+=4+e.data.length),Ue(d<=l.byteLength,"FontInfo.write: Buffer overflow"),l.transferToFixedLength(d)}},qs=class{static#e=null;static#t="";static get workerPort(){return this.#e}static set workerPort(e){if(!(typeof Worker<"u"&&e instanceof Worker)&&e!==null)throw new Error("Invalid `workerPort` type.");this.#e=e}static get workerSrc(){return this.#t}static set workerSrc(e){if(typeof e!="string")throw new Error("Invalid `workerSrc` type.");this.#t=e}},$R=class{#e;#t;constructor({parsedData:e,rawData:n}){this.#e=e,this.#t=n}getRaw(){return this.#t}get(e){return this.#e.get(e)??null}[Symbol.iterator](){return this.#e.entries()}},tu=Symbol("INTERNAL"),kR=class{#e=!1;#t=!1;#i=!1;#n=!0;constructor(e,{name:n,intent:r,usage:i,rbGroups:o}){this.#e=!!(e&_i.DISPLAY),this.#t=!!(e&_i.PRINT),this.name=n,this.intent=r,this.usage=i,this.rbGroups=o}get visible(){if(this.#i)return this.#n;if(!this.#n)return!1;let{print:e,view:n}=this.usage;return this.#e?n?.viewState!=="OFF":this.#t?e?.printState!=="OFF":!0}_setVisible(e,n,r=!1){e!==tu&&rt("Internal method `_setVisible` called."),this.#i=r,this.#n=n}},RR=class{#e=null;#t=new Map;#i=null;#n=null;constructor(e,n=_i.DISPLAY){if(this.renderingIntent=n,this.name=null,this.creator=null,e!==null){this.name=e.name,this.creator=e.creator,this.#n=e.order;for(let r of e.groups)this.#t.set(r.id,new kR(n,r));if(e.baseState==="OFF")for(let r of this.#t.values())r._setVisible(tu,!1);for(let r of e.on)this.#t.get(r)._setVisible(tu,!0);for(let r of e.off)this.#t.get(r)._setVisible(tu,!1);this.#i=this.getHash()}}#a(e){let n=e.length;if(n<2)return!0;let r=e[0];for(let i=1;i<n;i++){let o=e[i],a;if(Array.isArray(o))a=this.#a(o);else if(this.#t.has(o))a=this.#t.get(o).visible;else return we(`Optional content group not found: ${o}`),!0;switch(r){case"And":if(!a)return!1;break;case"Or":if(a)return!0;break;case"Not":return!a;default:return!0}}return r==="And"}isVisible(e){if(this.#t.size===0)return!0;if(!e)return i_("Optional content group not defined."),!0;if(e.type==="OCG")return this.#t.has(e.id)?this.#t.get(e.id).visible:(we(`Optional content group not found: ${e.id}`),!0);if(e.type==="OCMD"){if(e.expression)return this.#a(e.expression);if(!e.policy||e.policy==="AnyOn"){for(let n of e.ids){if(!this.#t.has(n))return we(`Optional content group not found: ${n}`),!0;if(this.#t.get(n).visible)return!0}return!1}else if(e.policy==="AllOn"){for(let n of e.ids){if(!this.#t.has(n))return we(`Optional content group not found: ${n}`),!0;if(!this.#t.get(n).visible)return!1}return!0}else if(e.policy==="AnyOff"){for(let n of e.ids){if(!this.#t.has(n))return we(`Optional content group not found: ${n}`),!0;if(!this.#t.get(n).visible)return!0}return!1}else if(e.policy==="AllOff"){for(let n of e.ids){if(!this.#t.has(n))return we(`Optional content group not found: ${n}`),!0;if(this.#t.get(n).visible)return!1}return!0}return we(`Unknown optional content policy ${e.policy}.`),!0}return we(`Unknown group type ${e.type}.`),!0}setVisibility(e,n=!0,r=!0){let i=this.#t.get(e);if(!i){we(`Optional content group not found: ${e}`);return}if(r&&n&&i.rbGroups.length)for(let o of i.rbGroups)for(let a of o)a!==e&&this.#t.get(a)?._setVisible(tu,!1,!0);i._setVisible(tu,!!n,!0),this.#e=null}setOCGState({state:e,preserveRB:n}){let r;for(let i of e){switch(i){case"ON":case"OFF":case"Toggle":r=i;continue}let o=this.#t.get(i);if(o)switch(r){case"ON":this.setVisibility(i,!0,n);break;case"OFF":this.setVisibility(i,!1,n);break;case"Toggle":this.setVisibility(i,!o.visible,n);break}}this.#e=null}get hasInitialVisibility(){return this.#i===null||this.getHash()===this.#i}getOrder(){return this.#t.size?this.#n?this.#n.slice():[...this.#t.keys()]:null}getGroup(e){return this.#t.get(e)||null}getHash(){if(this.#e!==null)return this.#e;let e=new zS;for(let[n,r]of this.#t)e.update(`${n}:${r.visible}`);return this.#e=e.hexdigest()}[Symbol.iterator](){return this.#t.entries()}},CR=class{constructor(e,{disableRange:n=!1,disableStream:r=!1}){Ue(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');let{length:i,initialData:o,progressiveDone:a,contentDispositionFilename:s}=e;if(this._queuedChunks=[],this._progressiveDone=a,this._contentDispositionFilename=s,o?.length>0){let l=o instanceof Uint8Array&&o.byteLength===o.buffer.byteLength?o.buffer:new Uint8Array(o).buffer;this._queuedChunks.push(l)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!r,this._isRangeSupported=!n,this._contentLength=i,this._fullRequestReader=null,this._rangeReaders=[],e.addRangeListener((l,c)=>{this._onReceiveData({begin:l,chunk:c})}),e.addProgressListener((l,c)=>{this._onProgress({loaded:l,total:c})}),e.addProgressiveReadListener(l=>{this._onReceiveData({chunk:l})}),e.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),e.transportReady()}_onReceiveData({begin:e,chunk:n}){let r=n instanceof Uint8Array&&n.byteLength===n.buffer.byteLength?n.buffer:new Uint8Array(n).buffer;if(e===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(r):this._queuedChunks.push(r);else{let i=this._rangeReaders.some(function(o){return o._begin!==e?!1:(o._enqueue(r),!0)});Ue(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){e.total===void 0?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){let n=this._rangeReaders.indexOf(e);n>=0&&this._rangeReaders.splice(n,1)}getFullReader(){Ue(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");let e=this._queuedChunks;return this._queuedChunks=null,new IR(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,n){if(n<=this._progressiveDataLength)return null;let r=new PR(this,e,n);return this._pdfDataRangeTransport.requestDataRange(e,n),this._rangeReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let n of this._rangeReaders.slice(0))n.cancel(e);this._pdfDataRangeTransport.abort()}},IR=class{constructor(e,n,r=!1,i=null){this._stream=e,this._done=r||!1,this._filename=EC(i)?i:null,this._queuedChunks=n||[],this._loaded=0;for(let o of this._queuedChunks)this._loaded+=o.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.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};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(let n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}},PR=class{constructor(e,n,r){this._stream=e,this._begin=n,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(this._requests.length===0)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(let r of this._requests)r.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){let n=this._queuedChunk;return this._queuedChunk=null,{value:n,done:!1}}if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(let n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}};function mY(t){let e=!0,n=r("filename\\*","i").exec(t);if(n){n=n[1];let u=s(n);return u=unescape(u),u=l(u),u=c(u),o(u)}if(n=a(t),n){let u=c(n);return o(u)}if(n=r("filename","i").exec(t),n){n=n[1];let u=s(n);return u=c(u),o(u)}function r(u,d){return new RegExp("(?:^|;)\\s*"+u+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',d)}function i(u,d){if(u){if(!/^[\x00-\xFF]+$/.test(d))return d;try{let h=new TextDecoder(u,{fatal:!0}),f=qf(d);d=h.decode(f),e=!1}catch{}}return d}function o(u){return e&&/[\x80-\xff]/.test(u)&&(u=i("utf-8",u),e&&(u=i("iso-8859-1",u))),u}function a(u){let d=[],h,f=r("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(h=f.exec(u))!==null;){let[,g,y,v]=h;if(g=parseInt(g,10),g in d){if(g===0)break;continue}d[g]=[y,v]}let m=[];for(let g=0;g<d.length&&g in d;++g){let[y,v]=d[g];v=s(v),y&&(v=unescape(v),g===0&&(v=l(v))),m.push(v)}return m.join("")}function s(u){if(u.startsWith('"')){let d=u.slice(1).split('\\"');for(let h=0;h<d.length;++h){let f=d[h].indexOf('"');f!==-1&&(d[h]=d[h].slice(0,f),d.length=h+1),d[h]=d[h].replaceAll(/\\(.)/g,"$1")}u=d.join('"')}return u}function l(u){let d=u.indexOf("'");if(d===-1)return u;let h=u.slice(0,d),m=u.slice(d+1).replace(/^[^']*'/,"");return i(h,m)}function c(u){return!u.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(u)?u:u.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(d,h,f,m){if(f==="q"||f==="Q")return m=m.replaceAll("_"," "),m=m.replaceAll(/=([0-9a-fA-F]{2})/g,function(g,y){return String.fromCharCode(parseInt(y,16))}),i(h,m);try{m=atob(m)}catch{}return i(h,m)})}return""}function eq(t,e){let n=new Headers;if(!t||!e||typeof e!="object")return n;for(let r in e){let i=e[r];i!==void 0&&n.append(r,i)}return n}function o_(t){return URL.parse(t)?.origin??null}function tq({responseHeaders:t,isHttp:e,rangeChunkSize:n,disableRange:r}){let i={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(t.get("Content-Length"),10);return!Number.isInteger(o)||(i.suggestedLength=o,o<=2*n)||r||!e||t.get("Accept-Ranges")!=="bytes"||(t.get("Content-Encoding")||"identity")!=="identity"||(i.allowRangeRequests=!0),i}function nq(t){let e=t.get("Content-Disposition");if(e){let n=mY(e);if(n.includes("%"))try{n=decodeURIComponent(n)}catch{}if(EC(n))return n}return null}function Hf(t,e){return new ou(`Unexpected server response (${t}) while retrieving PDF "${e}".`,t,t===404||t===0&&e.startsWith("file:"))}function iq(t){return t===200||t===206}function rq(t,e,n){return{method:"GET",headers:t,signal:n.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function oq(t){return t instanceof Uint8Array?t.buffer:t instanceof ArrayBuffer?t:(we(`getArrayBuffer - unexpected data format: ${t}`),new Uint8Array(t).buffer)}var OR=class{_responseOrigin=null;constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.headers=eq(this.isHttp,e.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Ue(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new NR(this),this._fullRequestReader}getRangeReader(e,n){if(n<=this._progressiveDataLength)return null;let r=new MR(this,e,n);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let n of this._rangeRequestReaders.slice(0))n.cancel(e)}},NR=class{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;let n=e.source;this._withCredentials=n.withCredentials||!1,this._contentLength=n.length,this._headersCapability=Promise.withResolvers(),this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange;let r=new Headers(e.headers),i=n.url;fetch(i,rq(r,this._withCredentials,this._abortController)).then(o=>{if(e._responseOrigin=o_(o.url),!iq(o.status))throw Hf(o.status,i);this._reader=o.body.getReader(),this._headersCapability.resolve();let a=o.headers,{allowRangeRequests:s,suggestedLength:l}=tq({responseHeaders:a,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=l||this._contentLength,this._filename=nq(a),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new Lr("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;let{value:e,done:n}=await this._reader.read();return n?{value:e,done:n}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:oq(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}},MR=class{constructor(e,n,r){this._stream=e,this._reader=null,this._loaded=0;let i=e.source;this._withCredentials=i.withCredentials||!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!i.disableStream,this._abortController=new AbortController;let o=new Headers(e.headers);o.append("Range",`bytes=${n}-${r-1}`);let a=i.url;fetch(a,rq(o,this._withCredentials,this._abortController)).then(s=>{let l=o_(s.url);if(l!==e._responseOrigin)throw new Error(`Expected range response-origin "${l}" to match "${e._responseOrigin}".`);if(!iq(s.status))throw Hf(s.status,a);this._readCapability.resolve(),this._reader=s.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;let{value:e,done:n}=await this._reader.read();return n?{value:e,done:n}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:oq(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}},Vk=200,Zk=206;function gY(t){let e=t.response;return typeof e!="string"?e:qf(e).buffer}var DR=class{_responseOrigin=null;constructor({url:e,httpHeaders:n,withCredentials:r}){this.url=e,this.isHttp=/^https?:/i.test(e),this.headers=eq(this.isHttp,n),this.withCredentials=r||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(e){let n=new XMLHttpRequest,r=this.currXhrId++,i=this.pendingRequests[r]={xhr:n};n.open("GET",this.url),n.withCredentials=this.withCredentials;for(let[o,a]of this.headers)n.setRequestHeader(o,a);return this.isHttp&&"begin"in e&&"end"in e?(n.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),i.expectedStatus=Zk):i.expectedStatus=Vk,n.responseType="arraybuffer",Ue(e.onError,"Expected `onError` callback to be provided."),n.onerror=()=>{e.onError(n.status)},n.onreadystatechange=this.onStateChange.bind(this,r),n.onprogress=this.onProgress.bind(this,r),i.onHeadersReceived=e.onHeadersReceived,i.onDone=e.onDone,i.onError=e.onError,i.onProgress=e.onProgress,n.send(null),r}onProgress(e,n){let r=this.pendingRequests[e];r&&r.onProgress?.(n)}onStateChange(e,n){let r=this.pendingRequests[e];if(!r)return;let i=r.xhr;if(i.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),i.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],i.status===0&&this.isHttp){r.onError(i.status);return}let o=i.status||Vk;if(!(o===Vk&&r.expectedStatus===Zk)&&o!==r.expectedStatus){r.onError(i.status);return}let s=gY(i);if(o===Zk){let l=i.getResponseHeader("Content-Range"),c=/bytes (\d+)-(\d+)\/(\d+)/.exec(l);c?r.onDone({begin:parseInt(c[1],10),chunk:s}):(we('Missing or invalid "Content-Range" header.'),r.onError(0))}else s?r.onDone({begin:0,chunk:s}):r.onError(i.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){let n=this.pendingRequests[e].xhr;delete this.pendingRequests[e],n.abort()}},LR=class{constructor(e){this._source=e,this._manager=new DR(e),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){let n=this._rangeRequestReaders.indexOf(e);n>=0&&this._rangeRequestReaders.splice(n,1)}getFullReader(){return Ue(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new jR(this._manager,this._source),this._fullRequestReader}getRangeReader(e,n){let r=new UR(this._manager,e,n);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let n of this._rangeRequestReaders.slice(0))n.cancel(e)}},jR=class{constructor(e,n){this._manager=e,this._url=n.url,this._fullRequestId=e.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=n.disableRange||!1,this._contentLength=n.length,this._rangeChunkSize=n.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(){let e=this._fullRequestId,n=this._manager.getRequestXhr(e);this._manager._responseOrigin=o_(n.responseURL);let r=n.getAllResponseHeaders(),i=new Headers(r?r.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(s=>{let[l,...c]=s.split(": ");return[l,c.join(": ")]}):[]),{allowRangeRequests:o,suggestedLength:a}=tq({responseHeaders:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});o&&(this._isRangeSupported=!0),this._contentLength=a||this._contentLength,this._filename=nq(i),this._isRangeSupported&&this._manager.abortRequest(e),this._headersCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(let n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=Hf(e,this._url),this._headersCapability.reject(this._storedError);for(let n of this._requests)n.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,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};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersCapability.reject(e);for(let n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}},UR=class{constructor(e,n,r){this._manager=e,this._url=e.url,this._requestId=e.request({begin:n,end:r,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){let e=o_(this._manager.getRequestXhr(this._requestId)?.responseURL);e!==this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${e}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(e){let n=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:n,done:!1}):this._queuedChunk=n,this._done=!0;for(let r of this._requests)r.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError??=Hf(e,this._url);for(let n of this._requests)n.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){let n=this._queuedChunk;return this._queuedChunk=null,{value:n,done:!1}}if(this._done)return{value:void 0,done:!0};let e=Promise.withResolvers();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(let n of this._requests)n.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}},vY=/^[a-z][a-z0-9\-+.]+:/i;function bY(t){if(vY.test(t))return new URL(t);let e=process.getBuiltinModule("url");return new URL(e.pathToFileURL(t))}var qR=class{constructor(e){this.source=e,this.url=bY(e.url),Ue(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return Ue(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new FR(this),this._fullRequestReader}getRangeReader(e,n){if(n<=this._progressiveDataLength)return null;let r=new BR(this,e,n);return this._rangeRequestReaders.push(r),r}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(let n of this._rangeRequestReaders.slice(0))n.cancel(e)}},FR=class{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;let n=e.source;this._contentLength=n.length,this._loaded=0,this._filename=null,this._disableRange=n.disableRange||!1,this._rangeChunkSize=n.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!n.disableStream,this._isRangeSupported=!n.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this._headersCapability=Promise.withResolvers();let r=process.getBuiltinModule("fs");r.promises.lstat(this._url).then(i=>{this._contentLength=i.size,this._setReadableStream(r.createReadStream(this._url)),this._headersCapability.resolve()},i=>{i.code==="ENOENT"&&(i=Hf(0,this._url.href)),this._storedError=i,this._headersCapability.reject(i)})}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;let e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",n=>{this._error(n)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new Lr("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}},BR=class{constructor(e,n,r){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();let i=e.source;this._isStreamingSupported=!i.disableStream;let o=process.getBuiltinModule("fs");this._setReadableStream(o.createReadStream(this._url,{start:n,end:r-1}))}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;let e=this._readableStream.read();return e===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){if(!this._readableStream){this._error(e);return}this._readableStream.destroy(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",n=>{this._error(n)}),this._storedError&&this._readableStream.destroy(this._storedError)}},_f=Symbol("INITIAL_DATA"),LS=class{#e=Object.create(null);#t(e){return this.#e[e]||={...Promise.withResolvers(),data:_f}}get(e,n=null){if(n){let i=this.#t(e);return i.promise.then(()=>n(i.data)),null}let r=this.#e[e];if(!r||r.data===_f)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return r.data}has(e){let n=this.#e[e];return!!n&&n.data!==_f}delete(e){let n=this.#e[e];return!n||n.data===_f?!1:(delete this.#e[e],!0)}resolve(e,n=null){let r=this.#t(e);r.data=n,r.resolve()}clear(){for(let e in this.#e){let{data:n}=this.#e[e];n?.bitmap?.close()}this.#e=Object.create(null)}*[Symbol.iterator](){for(let e in this.#e){let{data:n}=this.#e[e];n!==_f&&(yield[e,n])}}},yY=1e5,V6=30,Vs=class t{#e=Promise.withResolvers();#t=null;#i=!1;#n=!!globalThis.FontInspector?.enabled;#a=null;#r=null;#o=0;#s=0;#c=null;#l=null;#h=0;#d=0;#f=Object.create(null);#g=[];#p=null;#u=[];#m=new WeakMap;#v=null;static#y=new Map;static#b=new Map;static#T=new WeakMap;static#x=null;static#S=new Set;constructor({textContentSource:e,container:n,viewport:r}){if(e instanceof ReadableStream)this.#p=e;else if(typeof e=="object")this.#p=new ReadableStream({start(l){l.enqueue(e),l.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#t=this.#l=n,this.#d=r.scale*xo.pixelRatio,this.#h=r.rotation,this.#r={div:null,properties:null,ctx:null};let{pageWidth:i,pageHeight:o,pageX:a,pageY:s}=r.rawDims;this.#v=[1,0,0,-1,-a,s+o],this.#s=i,this.#o=o,t.#k(),Fs(n,r),this.#e.promise.finally(()=>{t.#S.delete(this),this.#r=null,this.#f=null}).catch(()=>{})}static get fontFamilyMap(){let{isWindows:e,isFirefox:n}=Vt.platform;return Re(this,"fontFamilyMap",new Map([["sans-serif",`${e&&n?"Calibri, ":""}sans-serif`],["monospace",`${e&&n?"Lucida Console, ":""}monospace`]]))}render(){let e=()=>{this.#c.read().then(({value:n,done:r})=>{if(r){this.#e.resolve();return}this.#a??=n.lang,Object.assign(this.#f,n.styles),this.#E(n.items),e()},this.#e.reject)};return this.#c=this.#p.getReader(),t.#S.add(this),e(),this.#e.promise}update({viewport:e,onBefore:n=null}){let r=e.scale*xo.pixelRatio,i=e.rotation;if(i!==this.#h&&(n?.(),this.#h=i,Fs(this.#l,{rotation:i})),r!==this.#d){n?.(),this.#d=r;let o={div:null,properties:null,ctx:t.#R(this.#a)};for(let a of this.#u)o.properties=this.#m.get(a),o.div=a,this.#z(o)}}cancel(){let e=new Lr("TextLayer task cancelled.");this.#c?.cancel(e).catch(()=>{}),this.#c=null,this.#e.reject(e)}get textDivs(){return this.#u}get textContentItemsStr(){return this.#g}#E(e){if(this.#i)return;this.#r.ctx??=t.#R(this.#a);let n=this.#u,r=this.#g;for(let i of e){if(n.length>yY){we("Ignoring additional textDivs for performance reasons."),this.#i=!0;return}if(i.str===void 0){if(i.type==="beginMarkedContentProps"||i.type==="beginMarkedContent"){let o=this.#t;this.#t=document.createElement("span"),this.#t.classList.add("markedContent"),i.id&&this.#t.setAttribute("id",`${i.id}`),o.append(this.#t)}else i.type==="endMarkedContent"&&(this.#t=this.#t.parentNode);continue}r.push(i.str),this.#w(i)}}#w(e){let n=document.createElement("span"),r={angle:0,canvasWidth:0,hasText:e.str!=="",hasEOL:e.hasEOL,fontSize:0};this.#u.push(n);let i=le.transform(this.#v,e.transform),o=Math.atan2(i[1],i[0]),a=this.#f[e.fontName];a.vertical&&(o+=Math.PI/2);let s=this.#n&&a.fontSubstitution||a.fontFamily;s=t.fontFamilyMap.get(s)||s;let l=Math.hypot(i[2],i[3]),c=l*t.#D(s,a,this.#a),u,d;o===0?(u=i[4],d=i[5]-c):(u=i[4]+c*Math.sin(o),d=i[5]-c*Math.cos(o));let h="calc(var(--total-scale-factor) *",f=n.style;this.#t===this.#l?(f.left=`${(100*u/this.#s).toFixed(2)}%`,f.top=`${(100*d/this.#o).toFixed(2)}%`):(f.left=`${h}${u.toFixed(2)}px)`,f.top=`${h}${d.toFixed(2)}px)`),f.fontSize=`${h}${(t.#x*l).toFixed(2)}px)`,f.fontFamily=s,r.fontSize=l,n.setAttribute("role","presentation"),n.textContent=e.str,n.dir=e.dir,this.#n&&(n.dataset.fontName=a.fontSubstitutionLoadedName||e.fontName),o!==0&&(r.angle=o*(180/Math.PI));let m=!1;if(e.str.length>1)m=!0;else if(e.str!==" "&&e.transform[0]!==e.transform[3]){let g=Math.abs(e.transform[0]),y=Math.abs(e.transform[3]);g!==y&&Math.max(g,y)/Math.min(g,y)>1.5&&(m=!0)}if(m&&(r.canvasWidth=a.vertical?e.height:e.width),this.#m.set(n,r),this.#r.div=n,this.#r.properties=r,this.#z(this.#r),r.hasText&&this.#t.append(n),r.hasEOL){let g=document.createElement("br");g.setAttribute("role","presentation"),this.#t.append(g)}}#z(e){let{div:n,properties:r,ctx:i}=e,{style:o}=n,a="";if(t.#x>1&&(a=`scale(${1/t.#x})`),r.canvasWidth!==0&&r.hasText){let{fontFamily:s}=o,{canvasWidth:l,fontSize:c}=r;t.#$(i,c*this.#d,s);let{width:u}=i.measureText(n.textContent);u>0&&(a=`scaleX(${l*this.#d/u}) ${a}`)}r.angle!==0&&(a=`rotate(${r.angle}deg) ${a}`),a.length>0&&(o.transform=a)}static cleanup(){if(!(this.#S.size>0)){this.#y.clear();for(let{canvas:e}of this.#b.values())e.remove();this.#b.clear()}}static#R(e=null){let n=this.#b.get(e||="");if(!n){let r=document.createElement("canvas");r.className="hiddenCanvasElement",r.lang=e,document.body.append(r),n=r.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#b.set(e,n),this.#T.set(n,{size:0,family:""})}return n}static#$(e,n,r){let i=this.#T.get(e);n===i.size&&r===i.family||(e.font=`${n}px ${r}`,i.size=n,i.family=r)}static#k(){if(this.#x!==null)return;let e=document.createElement("div");e.style.opacity=0,e.style.lineHeight=1,e.style.fontSize="1px",e.style.position="absolute",e.textContent="X",document.body.append(e),this.#x=e.getBoundingClientRect().height,e.remove()}static#D(e,n,r){let i=this.#y.get(e);if(i)return i;let o=this.#R(r);o.canvas.width=o.canvas.height=V6,this.#$(o,V6,e);let a=o.measureText(""),s=a.fontBoundingBoxAscent,l=Math.abs(a.fontBoundingBoxDescent);o.canvas.width=o.canvas.height=0;let c=.8;return s?c=s/(s+l):(Vt.platform.isFirefox&&we("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),n.ascent?c=n.ascent:n.descent&&(c=1+n.descent)),this.#y.set(e,c),c}},SY=100;function kC(t={}){typeof t=="string"||t instanceof URL?t={url:t}:(t instanceof ArrayBuffer||ArrayBuffer.isView(t))&&(t={data:t});let e=new HR,{docId:n}=e,r=t.url?iY(t.url):null,i=t.data?rY(t.data):null,o=t.httpHeaders||null,a=t.withCredentials===!0,s=t.password??null,l=t.range instanceof jS?t.range:null,c=Number.isInteger(t.rangeChunkSize)&&t.rangeChunkSize>0?t.rangeChunkSize:2**16,u=t.worker instanceof Zs?t.worker:null,d=t.verbosity,h=typeof t.docBaseUrl=="string"&&!r_(t.docBaseUrl)?t.docBaseUrl:null,f=lS(t.cMapUrl),m=t.cMapPacked!==!1,g=t.CMapReaderFactory||(In?mR:$S),y=lS(t.iccUrl),v=lS(t.standardFontDataUrl),b=t.StandardFontDataFactory||(In?gR:CS),S=lS(t.wasmUrl),_=t.WasmFactory||(In?vR:PS),T=t.stopAtErrors!==!0,x=Number.isInteger(t.maxImageSize)&&t.maxImageSize>-1?t.maxImageSize:-1,E=t.isEvalSupported!==!1,C=typeof t.isOffscreenCanvasSupported=="boolean"?t.isOffscreenCanvasSupported:!In,I=typeof t.isImageDecoderSupported=="boolean"?t.isImageDecoderSupported:!In&&(Vt.platform.isFirefox||!globalThis.chrome),L=Number.isInteger(t.canvasMaxAreaInBytes)?t.canvasMaxAreaInBytes:-1,G=typeof t.disableFontFace=="boolean"?t.disableFontFace:In,ge=t.fontExtraProperties===!0,de=t.enableXfa===!0,pe=t.ownerDocument||globalThis.document,Ee=t.disableRange===!0,ae=t.disableStream===!0,oe=t.disableAutoFetch===!0,Se=t.pdfBug===!0,nt=t.CanvasFactory||(In?pR:dR),U=t.FilterFactory||(In?fR:hR),M=t.enableHWA===!0,K=t.useWasm!==!1,B=l?l.length:t.length??NaN,X=typeof t.useSystemFonts=="boolean"?t.useSystemFonts:!In&&!G,J=typeof t.useWorkerFetch=="boolean"?t.useWorkerFetch:!!(g===$S&&b===CS&&_===PS&&f&&v&&S&&zf(f,document.baseURI)&&zf(v,document.baseURI)&&zf(S,document.baseURI)),ne=null;UK(d);let W={canvasFactory:new nt({ownerDocument:pe,enableHWA:M}),filterFactory:new U({docId:n,ownerDocument:pe}),cMapReaderFactory:J?null:new g({baseUrl:f,isCompressed:m}),standardFontDataFactory:J?null:new b({baseUrl:v}),wasmFactory:J?null:new _({baseUrl:S})};u||(u=Zs.create({verbosity:d,port:qs.workerPort}),e._worker=u);let fe={docId:n,apiVersion:"5.4.296",data:i,password:s,disableAutoFetch:oe,rangeChunkSize:c,length:B,docBaseUrl:h,enableXfa:de,evaluatorOptions:{maxImageSize:x,disableFontFace:G,ignoreErrors:T,isEvalSupported:E,isOffscreenCanvasSupported:C,isImageDecoderSupported:I,canvasMaxAreaInBytes:L,fontExtraProperties:ge,useSystemFonts:X,useWasm:K,useWorkerFetch:J,cMapUrl:f,iccUrl:y,standardFontDataUrl:v,wasmUrl:S}},$e={ownerDocument:pe,pdfBug:Se,styleElement:ne,loadingParams:{disableAutoFetch:oe,enableXfa:de}};return u.promise.then(function(){if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");let st=u.messageHandler.sendWithPromise("GetDocRequest",fe,i?[i.buffer]:null),qe;if(l)qe=new CR(l,{disableRange:Ee,disableStream:ae});else if(!i){if(!r)throw new Error("getDocument - no `url` parameter provided.");let He=zf(r)?OR:In?qR:LR;qe=new He({url:r,length:B,httpHeaders:o,withCredentials:a,rangeChunkSize:c,disableRange:Ee,disableStream:ae})}return st.then(He=>{if(e.destroyed)throw new Error("Loading aborted");if(u.destroyed)throw new Error("Worker was destroyed");let Zt=new Us(n,He,u.port),On=new GR(Zt,e,qe,$e,W,M);e._transport=On,Zt.send("Ready",null)})}).catch(e._capability.reject),e}var HR=class t{static#e=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId=`d${t.#e++}`;destroyed=!1;onPassword=null;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(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}},jS=class{#e=Promise.withResolvers();#t=[];#i=[];#n=[];#a=[];constructor(e,n,r=!1,i=null){this.length=e,this.initialData=n,this.progressiveDone=r,this.contentDispositionFilename=i}addRangeListener(e){this.#a.push(e)}addProgressListener(e){this.#n.push(e)}addProgressiveReadListener(e){this.#i.push(e)}addProgressiveDoneListener(e){this.#t.push(e)}onDataRange(e,n){for(let r of this.#a)r(e,n)}onDataProgress(e,n){this.#e.promise.then(()=>{for(let r of this.#n)r(e,n)})}onDataProgressiveRead(e){this.#e.promise.then(()=>{for(let n of this.#i)n(e)})}onDataProgressiveDone(){this.#e.promise.then(()=>{for(let e of this.#t)e()})}transportReady(){this.#e.resolve()}requestDataRange(e,n){rt("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}},VR=class{constructor(e,n){this._pdfInfo=e,this._transport=n}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return Re(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}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()}getAnnotationsByType(e,n){return this._transport.getAnnotationsByType(e,n)}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent:e="display"}={}){let{renderingIntent:n}=this._transport.getRenderingIntent(e);return this._transport.getOptionalContentConfig(n)}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(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(e){return this._transport.cachedPageNumber(e)}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()}},ZR=class{#e=!1;constructor(e,n,r,i=!1){this._pageIndex=e,this._pageInfo=n,this._transport=r,this._stats=i?new _S:null,this._pdfBug=i,this.commonObjs=r.commonObjs,this.objs=new LS,this._intentStates=new Map,this.destroyed=!1,this.recordedBBoxes=null}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:e,rotation:n=this.rotate,offsetX:r=0,offsetY:i=0,dontFlip:o=!1}={}){return new Rf({viewBox:this.view,userUnit:this.userUnit,scale:e,rotation:n,offsetX:r,offsetY:i,dontFlip:o})}getAnnotations({intent:e="display"}={}){let{renderingIntent:n}=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,n)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return Re(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,canvas:n=e.canvas,viewport:r,intent:i="display",annotationMode:o=ka.ENABLE,transform:a=null,background:s=null,optionalContentConfigPromise:l=null,annotationCanvasMap:c=null,pageColors:u=null,printAnnotationStorage:d=null,isEditing:h=!1,recordOperations:f=!1,operationsFilter:m=null}){this._stats?.time("Overall");let g=this._transport.getRenderingIntent(i,o,d,h),{renderingIntent:y,cacheKey:v}=g;this.#e=!1,l||=this._transport.getOptionalContentConfig(y);let b=this._intentStates.get(v);b||(b=Object.create(null),this._intentStates.set(v,b)),b.streamReaderCancelTimeout&&(clearTimeout(b.streamReaderCancelTimeout),b.streamReaderCancelTimeout=null);let S=!!(y&_i.PRINT);b.displayReadyCapability||(b.displayReadyCapability=Promise.withResolvers(),b.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(g));let _=!!(this._pdfBug&&globalThis.StepperManager?.enabled),T=!this.recordedBBoxes&&(f||_),x=I=>{if(b.renderTasks.delete(E),T){let L=E.gfx?.dependencyTracker.take();L&&(E.stepper&&E.stepper.setOperatorBBoxes(L,E.gfx.dependencyTracker.takeDebugMetadata()),f&&(this.recordedBBoxes=L))}S&&(this.#e=!0),this.#t(),I?(E.capability.reject(I),this._abortOperatorList({intentState:b,reason:I instanceof Error?I:new Error(I)})):E.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},E=new YR({callback:x,params:{canvas:n,canvasContext:e,dependencyTracker:T?new SR(n,b.operatorList.length,_):null,viewport:r,transform:a,background:s},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:c,operatorList:b.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!S,pdfBug:this._pdfBug,pageColors:u,enableHWA:this._transport.enableHWA,operationsFilter:m});(b.renderTasks||=new Set).add(E);let C=E.task;return Promise.all([b.displayReadyCapability.promise,l]).then(([I,L])=>{if(this.destroyed){x();return}if(this._stats?.time("Rendering"),!(L.renderingIntent&y))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOptionalContentConfig` methods.");E.initializeGraphics({transparency:I,optionalContentConfig:L}),E.operatorListChanged()}).catch(x),C}getOperatorList({intent:e="display",annotationMode:n=ka.ENABLE,printAnnotationStorage:r=null,isEditing:i=!1}={}){function o(){s.operatorList.lastChunk&&(s.opListReadCapability.resolve(s.operatorList),s.renderTasks.delete(l))}let a=this._transport.getRenderingIntent(e,n,r,i,!0),s=this._intentStates.get(a.cacheKey);s||(s=Object.create(null),this._intentStates.set(a.cacheKey,s));let l;return s.opListReadCapability||(l=Object.create(null),l.operatorListChanged=o,s.opListReadCapability=Promise.withResolvers(),(s.renderTasks||=new Set).add(l),s.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(a)),s.opListReadCapability.promise}streamTextContent({includeMarkedContent:e=!1,disableNormalization:n=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:e===!0,disableNormalization:n===!0},{highWaterMark:100,size(i){return i.items.length}})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then(r=>kf.textContent(r));let n=this.streamTextContent(e);return new Promise(function(r,i){function o(){a.read().then(function({value:l,done:c}){if(c){r(s);return}s.lang??=l.lang,Object.assign(s.styles,l.styles),s.items.push(...l.items),o()},i)}let a=n.getReader(),s={items:[],styles:Object.create(null),lang:null};o()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;let e=[];for(let n of this._intentStates.values())if(this._abortOperatorList({intentState:n,reason:new Error("Page was destroyed."),force:!0}),!n.opListReadCapability)for(let r of n.renderTasks)e.push(r.completed),r.cancel();return this.objs.clear(),this.#e=!1,Promise.all(e)}cleanup(e=!1){this.#e=!0;let n=this.#t();return e&&n&&(this._stats&&=new _S),n}#t(){if(!this.#e||this.destroyed)return!1;for(let{renderTasks:e,operatorList:n}of this._intentStates.values())if(e.size>0||!n.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#e=!1,!0}_startRenderPage(e,n){let r=this._intentStates.get(n);r&&(this._stats?.timeEnd("Page Request"),r.displayReadyCapability?.resolve(e))}_renderPageChunk(e,n){for(let r=0,i=e.length;r<i;r++)n.operatorList.fnArray.push(e.fnArray[r]),n.operatorList.argsArray.push(e.argsArray[r]);n.operatorList.lastChunk=e.lastChunk,n.operatorList.separateAnnots=e.separateAnnots;for(let r of n.renderTasks)r.operatorListChanged();e.lastChunk&&this.#t()}_pumpOperatorList({renderingIntent:e,cacheKey:n,annotationStorageSerializable:r,modifiedIds:i}){let{map:o,transfer:a}=r,l=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:n,annotationStorage:o,modifiedIds:i},a).getReader(),c=this._intentStates.get(n);c.streamReader=l;let u=()=>{l.read().then(({value:d,done:h})=>{if(h){c.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(d,c),u())},d=>{if(c.streamReader=null,!this._transport.destroyed){if(c.operatorList){c.operatorList.lastChunk=!0;for(let h of c.renderTasks)h.operatorListChanged();this.#t()}if(c.displayReadyCapability)c.displayReadyCapability.reject(d);else if(c.opListReadCapability)c.opListReadCapability.reject(d);else throw d}})};u()}_abortOperatorList({intentState:e,reason:n,force:r=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!r){if(e.renderTasks.size>0)return;if(n instanceof Cf){let i=SY;n.extraDelay>0&&n.extraDelay<1e3&&(i+=n.extraDelay),e.streamReaderCancelTimeout=setTimeout(()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:n,force:!0})},i);return}}if(e.streamReader.cancel(new Lr(n.message)).catch(()=>{}),e.streamReader=null,!this._transport.destroyed){for(let[i,o]of this._intentStates)if(o===e){this._intentStates.delete(i);break}this.cleanup()}}}get stats(){return this._stats}},Zs=class t{#e=Promise.withResolvers();#t=null;#i=null;#n=null;static#a=0;static#r=!1;static#o=new WeakMap;static{In&&(this.#r=!0,qs.workerSrc||="./pdf.worker.mjs"),this._isSameOrigin=(e,n)=>{let r=URL.parse(e);if(!r?.origin||r.origin==="null")return!1;let i=new URL(n,r);return r.origin===i.origin},this._createCDNWrapper=e=>{let n=`await import("${e}");`;return URL.createObjectURL(new Blob([n],{type:"text/javascript"}))},this.fromPort=e=>{if(WK("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."),!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this.create(e)}}constructor({name:e=null,port:n=null,verbosity:r=qK()}={}){if(this.name=e,this.destroyed=!1,this.verbosity=r,n){if(t.#o.has(n))throw new Error("Cannot use more than one PDFWorker per port.");t.#o.set(n,this),this.#c(n)}else this.#l()}get promise(){return this.#e.promise}#s(){this.#e.resolve(),this.#t.send("configure",{verbosity:this.verbosity})}get port(){return this.#i}get messageHandler(){return this.#t}#c(e){this.#i=e,this.#t=new Us("main","worker",e),this.#t.on("ready",()=>{}),this.#s()}#l(){if(t.#r||t.#d){this.#h();return}let{workerSrc:e}=t;try{t._isSameOrigin(window.location,e)||(e=t._createCDNWrapper(new URL(e,window.location).href));let n=new Worker(e,{type:"module"}),r=new Us("main","worker",n),i=()=>{o.abort(),r.destroy(),n.terminate(),this.destroyed?this.#e.reject(new Error("Worker was destroyed")):this.#h()},o=new AbortController;n.addEventListener("error",()=>{this.#n||i()},{signal:o.signal}),r.on("test",s=>{if(o.abort(),this.destroyed||!s){i();return}this.#t=r,this.#i=n,this.#n=n,this.#s()}),r.on("ready",s=>{if(o.abort(),this.destroyed){i();return}try{a()}catch{this.#h()}});let a=()=>{let s=new Uint8Array;r.send("test",s,[s.buffer])};a();return}catch{i_("The worker has been disabled.")}this.#h()}#h(){t.#r||(we("Setting up fake worker."),t.#r=!0),t._setupFakeWorkerGlobal.then(e=>{if(this.destroyed){this.#e.reject(new Error("Worker was destroyed"));return}let n=new uR;this.#i=n;let r=`fake${t.#a++}`,i=new Us(r+"_worker",r,n);e.setup(i,n),this.#t=new Us(r,r+"_worker",n),this.#s()}).catch(e=>{this.#e.reject(new Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){this.destroyed=!0,this.#n?.terminate(),this.#n=null,t.#o.delete(this.#i),this.#i=null,this.#t?.destroy(),this.#t=null}static create(e){let n=this.#o.get(e?.port);if(n){if(n._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return n}return new t(e)}static get workerSrc(){if(qs.workerSrc)return qs.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get#d(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){return Re(this,"_setupFakeWorkerGlobal",(async()=>this.#d?this.#d:(await import(this.workerSrc)).WorkerMessageHandler)())}},GR=class{#e=new Map;#t=new Map;#i=new Map;#n=new Map;#a=null;constructor(e,n,r,i,o,a){this.messageHandler=e,this.loadingTask=n,this.commonObjs=new LS,this.fontLoader=new sR({ownerDocument:i.ownerDocument,styleElement:i.styleElement}),this.loadingParams=i.loadingParams,this._params=i,this.canvasFactory=o.canvasFactory,this.filterFactory=o.filterFactory,this.cMapReaderFactory=o.cMapReaderFactory,this.standardFontDataFactory=o.standardFontDataFactory,this.wasmFactory=o.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=a,this.setupMessageHandler()}#r(e,n=null){let r=this.#e.get(e);if(r)return r;let i=this.messageHandler.sendWithPromise(e,n);return this.#e.set(e,i),i}get annotationStorage(){return Re(this,"annotationStorage",new Pf)}getRenderingIntent(e,n=ka.ENABLE,r=null,i=!1,o=!1){let a=_i.DISPLAY,s=aR;switch(e){case"any":a=_i.ANY;break;case"display":break;case"print":a=_i.PRINT;break;default:we(`getRenderingIntent - invalid intent: ${e}`)}let l=a&_i.PRINT&&r instanceof TS?r:this.annotationStorage;switch(n){case ka.DISABLE:a+=_i.ANNOTATIONS_DISABLE;break;case ka.ENABLE:break;case ka.ENABLE_FORMS:a+=_i.ANNOTATIONS_FORMS;break;case ka.ENABLE_STORAGE:a+=_i.ANNOTATIONS_STORAGE,s=l.serializable;break;default:we(`getRenderingIntent - invalid annotationMode: ${n}`)}i&&(a+=_i.IS_EDITING),o&&(a+=_i.OPLIST);let{ids:c,hash:u}=l.modifiedIds,d=[a,s.hash,u];return{renderingIntent:a,cacheKey:d.join("_"),annotationStorageSerializable:s,modifiedIds:c}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#a?.reject(new Error("Worker was destroyed during onPassword callback"));let e=[];for(let r of this.#t.values())e.push(r._destroy());this.#t.clear(),this.#i.clear(),this.#n.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();let n=this.messageHandler.sendWithPromise("Terminate",null);return e.push(n),Promise.all(e).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(),Vs.cleanup(),this._networkStream?.cancelAllRequests(new Lr("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){let{messageHandler:e,loadingTask:n}=this;e.on("GetReader",(r,i)=>{Ue(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=o=>{this._lastProgress={loaded:o.loaded,total:o.total}},i.onPull=()=>{this._fullReader.read().then(function({value:o,done:a}){if(a){i.close();return}Ue(o instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(o),1,[o])}).catch(o=>{i.error(o)})},i.onCancel=o=>{this._fullReader.cancel(o),i.ready.catch(a=>{if(!this.destroyed)throw a})}}),e.on("ReaderHeadersReady",async r=>{await this._fullReader.headersReady;let{isStreamingSupported:i,isRangeSupported:o,contentLength:a}=this._fullReader;return(!i||!o)&&(this._lastProgress&&n.onProgress?.(this._lastProgress),this._fullReader.onProgress=s=>{n.onProgress?.({loaded:s.loaded,total:s.total})}),{isStreamingSupported:i,isRangeSupported:o,contentLength:a}}),e.on("GetRangeReader",(r,i)=>{Ue(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");let o=this._networkStream.getRangeReader(r.begin,r.end);if(!o){i.close();return}i.onPull=()=>{o.read().then(function({value:a,done:s}){if(s){i.close();return}Ue(a instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(a),1,[a])}).catch(a=>{i.error(a)})},i.onCancel=a=>{o.cancel(a),i.ready.catch(s=>{if(!this.destroyed)throw s})}}),e.on("GetDoc",({pdfInfo:r})=>{this._numPages=r.numPages,this._htmlForXfa=r.htmlForXfa,delete r.htmlForXfa,n._capability.resolve(new VR(r,this))}),e.on("DocException",r=>{n._capability.reject(ei(r))}),e.on("PasswordRequest",r=>{this.#a=Promise.withResolvers();try{if(!n.onPassword)throw ei(r);let i=o=>{o instanceof Error?this.#a.reject(o):this.#a.resolve({password:o})};n.onPassword(i,r.code)}catch(i){this.#a.reject(i)}return this.#a.promise}),e.on("DataLoaded",r=>{n.onProgress?.({loaded:r.length,total:r.length}),this.downloadInfoCapability.resolve(r)}),e.on("StartRenderPage",r=>{if(this.destroyed)return;this.#t.get(r.pageIndex)._startRenderPage(r.transparency,r.cacheKey)}),e.on("commonobj",([r,i,o])=>{if(this.destroyed||this.commonObjs.has(r))return null;switch(i){case"Font":if("error"in o){let u=o.error;we(`Error during font loading: ${u}`),this.commonObjs.resolve(r,u);break}let a=new ER(o),s=this._params.pdfBug&&globalThis.FontInspector?.enabled?(u,d)=>globalThis.FontInspector.fontAdded(u,d):null,l=new lR(a,s,o.extra,o.charProcOperatorList);this.fontLoader.bind(l).catch(()=>e.sendWithPromise("FontFallback",{id:r})).finally(()=>{!l.fontExtraProperties&&l.data&&l.clearData(),this.commonObjs.resolve(r,l)});break;case"CopyLocalImage":let{imageRef:c}=o;Ue(c,"The imageRef must be defined.");for(let u of this.#t.values())for(let[,d]of u.objs)if(d?.ref===c)return d.dataLen?(this.commonObjs.resolve(r,structuredClone(d)),d.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(r,o);break;default:throw new Error(`Got unknown common object type ${i}`)}return null}),e.on("obj",([r,i,o,a])=>{if(this.destroyed)return;let s=this.#t.get(i);if(!s.objs.has(r)){if(s._intentStates.size===0){a?.bitmap?.close();return}switch(o){case"Image":case"Pattern":s.objs.resolve(r,a);break;default:throw new Error(`Got unknown object type ${o}`)}}}),e.on("DocProgress",r=>{this.destroyed||n.onProgress?.({loaded:r.loaded,total:r.total})}),e.on("FetchBinaryData",async r=>{if(this.destroyed)throw new Error("Worker was destroyed.");let i=this[r.type];if(!i)throw new Error(`${r.type} not initialized, see the \`useWorkerFetch\` parameter.`);return i.fetch(r)})}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&we("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");let{map:e,transfer:n}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},n).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));let n=e-1,r=this.#i.get(n);if(r)return r;let i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then(o=>{if(this.destroyed)throw new Error("Transport destroyed");o.refStr&&this.#n.set(o.refStr,e);let a=new ZR(n,o,this,this._params.pdfBug);return this.#t.set(n,a),a});return this.#i.set(n,i),i}getPageIndex(e){return cR(e)?this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(e,n){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:n})}getFieldObjects(){return this.#r("GetFieldObjects")}hasJSActions(){return this.#r("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return typeof e!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}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)}getAnnotationsByType(e,n){return this.messageHandler.sendWithPromise("GetAnnotationsByType",{types:e,pageIndexesToSkip:n})}getDocJSActions(){return this.#r("GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(e){return this.#r("GetOptionalContentConfig").then(n=>new RR(n,e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){let e="GetMetadata",n=this.#e.get(e);if(n)return n;let r=this.messageHandler.sendWithPromise(e,null).then(i=>({info:i[0],metadata:i[1]?new $R(i[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#e.set(e,r),r}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(let n of this.#t.values())if(!n.cleanup())throw new Error(`startCleanup: Page ${n.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),this.#e.clear(),this.filterFactory.destroy(!0),Vs.cleanup()}}cachedPageNumber(e){if(!cR(e))return null;let n=e.gen===0?`${e.num}R`:`${e.num}R${e.gen}`;return this.#n.get(n)??null}},KR=class{#e=null;onContinue=null;onError=null;constructor(e){this.#e=e}get promise(){return this.#e.capability.promise}cancel(e=0){this.#e.cancel(null,e)}get separateAnnots(){let{separateAnnots:e}=this.#e.operatorList;if(!e)return!1;let{annotationCanvasMap:n}=this.#e;return e.form||e.canvas&&n?.size>0}},YR=class t{#e=null;static#t=new WeakSet;constructor({callback:e,params:n,objs:r,commonObjs:i,annotationCanvasMap:o,operatorList:a,pageIndex:s,canvasFactory:l,filterFactory:c,useRequestAnimationFrame:u=!1,pdfBug:d=!1,pageColors:h=null,enableHWA:f=!1,operationsFilter:m=null}){this.callback=e,this.params=n,this.objs=r,this.commonObjs=i,this.annotationCanvasMap=o,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=s,this.canvasFactory=l,this.filterFactory=c,this._pdfBug=d,this.pageColors=h,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 KR(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=n.canvas,this._canvasContext=n.canvas?null:n.canvasContext,this._enableHWA=f,this._dependencyTracker=n.dependencyTracker,this._operationsFilter=m}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:e=!1,optionalContentConfig:n}){if(this.cancelled)return;if(this._canvas){if(t.#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.");t.#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());let{viewport:r,transform:i,background:o,dependencyTracker:a}=this.params,s=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new ru(s,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:n},this.annotationCanvasMap,this.pageColors,a),this.gfx.beginDrawing({transform:i,viewport:r,transparency:e,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,n=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null),t.#t.delete(this._canvas),e||=new Cf(`Rendering cancelled, page ${this._pageIndex+1}`,n),this.callback(e),this.task.onError?.(e)}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.gfx.dependencyTracker?.growOperationsCount(this.operatorList.fnArray.length),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._operationsFilter),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),t.#t.delete(this._canvas),this.callback())))}},_Y="5.4.296",wY="f56dc8601",US=class t{#e=null;#t=null;#i;#n=null;#a=!1;#r=!1;#o=null;#s;#c=null;#l=null;static#h=null;static get _keyboardManager(){return Re(this,"_keyboardManager",new Bs([[["Escape","mac+Escape"],t.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],t.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+ArrowDown","mac+ArrowRight"],t.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],t.prototype._moveToPrevious],[["Home","mac+Home"],t.prototype._moveToBeginning],[["End","mac+End"],t.prototype._moveToEnd]]))}constructor({editor:e=null,uiManager:n=null}){e?(this.#r=!1,this.#o=e):this.#r=!0,this.#l=e?._uiManager||n,this.#s=this.#l._eventBus,this.#i=e?.color?.toUpperCase()||this.#l?.highlightColors.values().next().value||"#FFFF98",t.#h||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){let e=this.#e=document.createElement("button");e.className="colorPicker",e.tabIndex="0",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-button"),e.ariaHasPopup="true",this.#o&&(e.ariaControls=`${this.#o.id}_colorpicker_dropdown`);let n=this.#l._signal;e.addEventListener("click",this.#p.bind(this),{signal:n}),e.addEventListener("keydown",this.#g.bind(this),{signal:n});let r=this.#t=document.createElement("span");return r.className="swatch",r.ariaHidden="true",r.style.backgroundColor=this.#i,e.append(r),e}renderMainDropdown(){let e=this.#n=this.#d();return e.ariaOrientation="horizontal",e.ariaLabelledBy="highlightColorPickerLabel",e}#d(){let e=document.createElement("div"),n=this.#l._signal;e.addEventListener("contextmenu",Vi,{signal:n}),e.className="dropdown",e.role="listbox",e.ariaMultiSelectable="false",e.ariaOrientation="vertical",e.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#o&&(e.id=`${this.#o.id}_colorpicker_dropdown`);for(let[r,i]of this.#l.highlightColors){let o=document.createElement("button");o.tabIndex="0",o.role="option",o.setAttribute("data-color",i),o.title=r,o.setAttribute("data-l10n-id",t.#h[r]);let a=document.createElement("span");o.append(a),a.className="swatch",a.style.backgroundColor=i,o.ariaSelected=i===this.#i,o.addEventListener("click",this.#f.bind(this,i),{signal:n}),e.append(o)}return e.addEventListener("keydown",this.#g.bind(this),{signal:n}),e}#f(e,n){n.stopPropagation(),this.#s.dispatch("switchannotationeditorparams",{source:this,type:je.HIGHLIGHT_COLOR,value:e}),this.updateColor(e)}_colorSelectFromKeyboard(e){if(e.target===this.#e){this.#p(e);return}let n=e.target.getAttribute("data-color");n&&this.#f(n,e)}_moveToNext(e){if(!this.#m){this.#p(e);return}if(e.target===this.#e){this.#n.firstChild?.focus();return}e.target.nextSibling?.focus()}_moveToPrevious(e){if(e.target===this.#n?.firstChild||e.target===this.#e){this.#m&&this._hideDropdownFromKeyboard();return}this.#m||this.#p(e),e.target.previousSibling?.focus()}_moveToBeginning(e){if(!this.#m){this.#p(e);return}this.#n.firstChild?.focus()}_moveToEnd(e){if(!this.#m){this.#p(e);return}this.#n.lastChild?.focus()}#g(e){t._keyboardManager.exec(this,e)}#p(e){if(this.#m){this.hideDropdown();return}if(this.#a=e.detail===0,this.#c||(this.#c=new AbortController,window.addEventListener("pointerdown",this.#u.bind(this),{signal:this.#l.combinedSignal(this.#c)})),this.#e.ariaExpanded="true",this.#n){this.#n.classList.remove("hidden");return}let n=this.#n=this.#d();this.#e.append(n)}#u(e){this.#n?.contains(e.target)||this.hideDropdown()}hideDropdown(){this.#n?.classList.add("hidden"),this.#e.ariaExpanded="false",this.#c?.abort(),this.#c=null}get#m(){return this.#n&&!this.#n.classList.contains("hidden")}_hideDropdownFromKeyboard(){if(!this.#r){if(!this.#m){this.#o?.unselect();return}this.hideDropdown(),this.#e.focus({preventScroll:!0,focusVisible:this.#a})}}updateColor(e){if(this.#t&&(this.#t.style.backgroundColor=e),!this.#n)return;let n=this.#l.highlightColors.values();for(let r of this.#n.children)r.ariaSelected=n.next().value===e.toUpperCase()}destroy(){this.#e?.remove(),this.#e=null,this.#t=null,this.#n?.remove(),this.#n=null}},qS=class t{#e=null;#t=null;#i=null;static#n=null;constructor(e){this.#t=e,this.#i=e._uiManager,t.#n||=Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"})}renderButton(){if(this.#e)return this.#e;let{editorType:e,colorType:n,colorValue:r}=this.#t,i=this.#e=document.createElement("input");return i.type="color",i.value=r||"#000000",i.className="basicColorPicker",i.tabIndex=0,i.setAttribute("data-l10n-id",t.#n[e]),i.addEventListener("input",()=>{this.#i.updateParams(n,i.value)},{signal:this.#i._signal}),i}update(e){this.#e&&(this.#e.value=e)}destroy(){this.#e?.remove(),this.#e=null}hideDropdown(){}};function Z6(t){return Math.floor(Math.max(0,Math.min(1,t))*255).toString(16).padStart(2,"0")}function wf(t){return Math.max(0,Math.min(255,255*t))}var FS=class{static CMYK_G([e,n,r,i]){return["G",1-Math.min(1,.3*e+.59*r+.11*n+i)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return e=wf(e),[e,e,e]}static G_HTML([e]){let n=Z6(e);return`#${n}${n}${n}`}static RGB_G([e,n,r]){return["G",.3*e+.59*n+.11*r]}static RGB_rgb(e){return e.map(wf)}static RGB_HTML(e){return`#${e.map(Z6).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,n,r,i]){return["RGB",1-Math.min(1,e+i),1-Math.min(1,r+i),1-Math.min(1,n+i)]}static CMYK_rgb([e,n,r,i]){return[wf(1-Math.min(1,e+i)),wf(1-Math.min(1,r+i)),wf(1-Math.min(1,n+i))]}static CMYK_HTML(e){let n=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(n)}static RGB_CMYK([e,n,r]){let i=1-e,o=1-n,a=1-r,s=Math.min(i,o,a);return["CMYK",i,o,a,s]}};var JR=class{create(e,n,r=!1){if(e<=0||n<=0)throw new Error("Invalid SVG dimensions");let i=this._createSVG("svg:svg");return i.setAttribute("version","1.1"),r||(i.setAttribute("width",`${e}px`),i.setAttribute("height",`${n}px`)),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox",`0 0 ${e} ${n}`),i}createElement(e){if(typeof e!="string")throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){rt("Abstract method `_createSVG` called.")}},au=class extends JR{_createSVG(e){return document.createElementNS(wo,e)}},xY=9,Gs=new WeakSet,zY=new Date().getTimezoneOffset()*60*1e3,BS=class{static create(e){switch(e.data.annotationType){case jt.LINK:return new Nf(e);case jt.TEXT:return new WR(e);case jt.WIDGET:switch(e.data.fieldType){case"Tx":return new QR(e);case"Btn":return e.data.radioButton?new HS(e):e.data.checkBox?new tC(e):new nC(e);case"Ch":return new iC(e);case"Sig":return new eC(e)}return new zo(e);case jt.POPUP:return new Mf(e);case jt.FREETEXT:return new VS(e);case jt.LINE:return new oC(e);case jt.SQUARE:return new aC(e);case jt.CIRCLE:return new sC(e);case jt.POLYLINE:return new ZS(e);case jt.CARET:return new cC(e);case jt.INK:return new Df(e);case jt.POLYGON:return new lC(e);case jt.HIGHLIGHT:return new GS(e);case jt.UNDERLINE:return new uC(e);case jt.SQUIGGLY:return new dC(e);case jt.STRIKEOUT:return new hC(e);case jt.STAMP:return new KS(e);case jt.FILEATTACHMENT:return new fC(e);default:return new bt(e)}}},bt=class t{#e=null;#t=!1;#i=null;constructor(e,{isRenderable:n=!1,ignoreBorder:r=!1,createQuadrilaterals:i=!1}={}){this.isRenderable=n,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableComment=e.enableComment,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,n&&(this.container=this._createContainer(r)),i&&this._createQuadrilaterals()}static _hasPopupData({contentsObj:e,richText:n}){return!!(e?.str||n?.str)}get _isEditable(){return this.data.isEditable}get hasPopupData(){return t._hasPopupData(this.data)||this.enableComment&&!!this.commentText}get commentData(){let{data:e}=this,n=this.annotationStorage?.getEditor(e.id);return n?n.getData():e}get hasCommentButton(){return this.enableComment&&this.hasPopupElement}get commentButtonPosition(){let e=this.annotationStorage?.getEditor(this.data.id);if(e)return e.commentButtonPositionInPage;let{quadPoints:n,inkLists:r,rect:i}=this.data,o=-1/0,a=-1/0;if(n?.length>=8){for(let s=0;s<n.length;s+=8)n[s+1]>a?(a=n[s+1],o=n[s+2]):n[s+1]===a&&(o=Math.max(o,n[s+2]));return[o,a]}if(r?.length>=1){for(let s of r)for(let l=0,c=s.length;l<c;l+=2)s[l+1]>a?(a=s[l+1],o=s[l]):s[l+1]===a&&(o=Math.max(o,s[l]));if(o!==1/0)return[o,a]}return i?[i[2],i[3]]:null}_normalizePoint(e){let{page:{view:n},viewport:{rawDims:{pageWidth:r,pageHeight:i,pageX:o,pageY:a}}}=this.parent;return e[1]=n[3]-e[1]+n[1],e[0]=100*(e[0]-o)/r,e[1]=100*(e[1]-a)/i,e}get commentText(){let{data:e}=this;return this.annotationStorage.getRawValue(`${Af}${e.id}`)?.popup?.contents||e.contentsObj?.str||""}set commentText(e){let{data:n}=this,r={deleted:!e,contents:e||""};this.annotationStorage.updateEditor(n.id,{popup:r})||this.annotationStorage.setValue(`${Af}${n.id}`,{id:n.id,annotationType:n.annotationType,pageIndex:this.parent.page._pageIndex,popup:r,popupRef:n.popupRef,modificationDate:new Date}),e||this.removePopup()}removePopup(){(this.#i?.popup||this.popup)?.remove(),this.#i=this.popup=null}updateEdited(e){if(!this.container)return;e.rect&&(this.#e||={rect:this.data.rect.slice(0)});let{rect:n,popup:r}=e;n&&this.#n(n);let i=this.#i?.popup||this.popup;!i&&r?.text&&(this._createPopup(r),i=this.#i.popup),i&&(i.updateEdited(e),r?.deleted&&(i.remove(),this.#i=null,this.popup=null))}resetEdited(){this.#e&&(this.#n(this.#e.rect),this.#i?.popup.resetEdited(),this.#e=null)}#n(e){let{container:{style:n},data:{rect:r,rotation:i},parent:{viewport:{rawDims:{pageWidth:o,pageHeight:a,pageX:s,pageY:l}}}}=this;r?.splice(0,4,...e),n.left=`${100*(e[0]-s)/o}%`,n.top=`${100*(a-e[3]+l)/a}%`,i===0?(n.width=`${100*(e[2]-e[0])/o}%`,n.height=`${100*(e[3]-e[1])/a}%`):this.setRotation(i)}_createContainer(e){let{data:n,parent:{page:r,viewport:i}}=this,o=document.createElement("section");o.setAttribute("data-annotation-id",n.id),!(this instanceof zo)&&!(this instanceof Nf)&&(o.tabIndex=0);let{style:a}=o;if(a.zIndex=this.parent.zIndex,this.parent.zIndex+=2,n.alternativeText&&(o.title=n.alternativeText),n.noRotate&&o.classList.add("norotate"),!n.rect||this instanceof Mf){let{rotation:g}=n;return!n.hasOwnCanvas&&g!==0&&this.setRotation(g,o),o}let{width:s,height:l}=this;if(!e&&n.borderStyle.width>0){a.borderWidth=`${n.borderStyle.width}px`;let g=n.borderStyle.horizontalCornerRadius,y=n.borderStyle.verticalCornerRadius;if(g>0||y>0){let b=`calc(${g}px * var(--total-scale-factor)) / calc(${y}px * var(--total-scale-factor))`;a.borderRadius=b}else if(this instanceof HS){let b=`calc(${s}px * var(--total-scale-factor)) / calc(${l}px * var(--total-scale-factor))`;a.borderRadius=b}switch(n.borderStyle.style){case eu.SOLID:a.borderStyle="solid";break;case eu.DASHED:a.borderStyle="dashed";break;case eu.BEVELED:we("Unimplemented border style: beveled");break;case eu.INSET:we("Unimplemented border style: inset");break;case eu.UNDERLINE:a.borderBottomStyle="solid";break;default:break}let v=n.borderColor||null;v?(this.#t=!0,a.borderColor=le.makeHexColor(v[0]|0,v[1]|0,v[2]|0)):a.borderWidth=0}let c=le.normalizeRect([n.rect[0],r.view[3]-n.rect[1]+r.view[1],n.rect[2],r.view[3]-n.rect[3]+r.view[1]]),{pageWidth:u,pageHeight:d,pageX:h,pageY:f}=i.rawDims;a.left=`${100*(c[0]-h)/u}%`,a.top=`${100*(c[1]-f)/d}%`;let{rotation:m}=n;return n.hasOwnCanvas||m===0?(a.width=`${100*s/u}%`,a.height=`${100*l/d}%`):this.setRotation(m,o),o}setRotation(e,n=this.container){if(!this.data.rect)return;let{pageWidth:r,pageHeight:i}=this.parent.viewport.rawDims,{width:o,height:a}=this;e%180!==0&&([o,a]=[a,o]),n.style.width=`${100*o/r}%`,n.style.height=`${100*a/i}%`,n.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){let e=(n,r,i)=>{let o=i.detail[n],a=o[0],s=o.slice(1);i.target.style[r]=FS[`${a}_HTML`](s),this.annotationStorage.setValue(this.data.id,{[r]:FS[`${a}_rgb`](s)})};return Re(this,"_commonActions",{display:n=>{let{display:r}=n.detail,i=r%2===1;this.container.style.visibility=i?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:i,noPrint:r===1||r===2})},print:n=>{this.annotationStorage.setValue(this.data.id,{noPrint:!n.detail.print})},hidden:n=>{let{hidden:r}=n.detail;this.container.style.visibility=r?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:r,noView:r})},focus:n=>{setTimeout(()=>n.target.focus({preventScroll:!1}),0)},userName:n=>{n.target.title=n.detail.userName},readonly:n=>{n.target.disabled=n.detail.readonly},required:n=>{this._setRequired(n.target,n.detail.required)},bgColor:n=>{e("bgColor","backgroundColor",n)},fillColor:n=>{e("fillColor","backgroundColor",n)},fgColor:n=>{e("fgColor","color",n)},textColor:n=>{e("textColor","color",n)},borderColor:n=>{e("borderColor","borderColor",n)},strokeColor:n=>{e("strokeColor","borderColor",n)},rotation:n=>{let r=n.detail.rotation;this.setRotation(r),this.annotationStorage.setValue(this.data.id,{rotation:r})}})}_dispatchEventFromSandbox(e,n){let r=this._commonActions;for(let i of Object.keys(n.detail))(e[i]||r[i])?.(n)}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;let n=this.annotationStorage.getRawValue(this.data.id);if(!n)return;let r=this._commonActions;for(let[i,o]of Object.entries(n)){let a=r[i];if(a){let s={detail:{[i]:o},target:e};a(s),delete n[i]}}}_createQuadrilaterals(){if(!this.container)return;let{quadPoints:e}=this.data;if(!e)return;let[n,r,i,o]=this.data.rect.map(g=>Math.fround(g));if(e.length===8){let[g,y,v,b]=e.subarray(2,6);if(i===g&&o===y&&n===v&&r===b)return}let{style:a}=this.container,s;if(this.#t){let{borderColor:g,borderWidth:y}=a;a.borderWidth=0,s=["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="${g}" stroke-width="${y}">`],this.container.classList.add("hasBorder")}let l=i-n,c=o-r,{svgFactory:u}=this,d=u.createElement("svg");d.classList.add("quadrilateralsContainer"),d.setAttribute("width",0),d.setAttribute("height",0),d.role="none";let h=u.createElement("defs");d.append(h);let f=u.createElement("clipPath"),m=`clippath_${this.data.id}`;f.setAttribute("id",m),f.setAttribute("clipPathUnits","objectBoundingBox"),h.append(f);for(let g=2,y=e.length;g<y;g+=8){let v=e[g],b=e[g+1],S=e[g+2],_=e[g+3],T=u.createElement("rect"),x=(S-n)/l,E=(o-b)/c,C=(v-S)/l,I=(b-_)/c;T.setAttribute("x",x),T.setAttribute("y",E),T.setAttribute("width",C),T.setAttribute("height",I),f.append(T),s?.push(`<rect vector-effect="non-scaling-stroke" x="${x}" y="${E}" width="${C}" height="${I}"/>`)}this.#t&&(s.push("</g></svg>')"),a.backgroundImage=s.join("")),this.container.append(d),this.container.style.clipPath=`url(#${m})`}_createPopup(e=null){let{data:n}=this,r,i;e?(r={str:e.text},i=e.date):(r=n.contentsObj,i=n.modificationDate);let o=this.#i=new Mf({data:{color:n.color,titleObj:n.titleObj,modificationDate:i,contentsObj:r,richText:n.richText,parentRect:n.rect,borderStyle:0,id:`popup_${n.id}`,rotation:n.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]});this.parent._commentManager||this.parent.div.append(o.render())}get hasPopupElement(){return!!(this.#i||this.popup||this.data.popupRef)}get extraPopupElement(){return this.#i}render(){rt("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,n=null){let r=[];if(this._fieldObjects){let i=this._fieldObjects[e];if(i)for(let{page:o,id:a,exportValues:s}of i){if(o===-1||a===n)continue;let l=typeof s=="string"?s:null,c=document.querySelector(`[data-element-id="${a}"]`);if(c&&!Gs.has(c)){we(`_getElementsByName - element not allowed: ${a}`);continue}r.push({id:a,exportValue:l,domElement:c})}return r}for(let i of document.getElementsByName(e)){let{exportValue:o}=i,a=i.getAttribute("data-element-id");a!==n&&Gs.has(i)&&r.push({id:a,exportValue:o,domElement:i})}return r}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(){let e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(let n of e)n.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;let{annotationEditorType:e,data:{id:n}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:n,mustEnterInEditMode:!0})})}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}},XR=class extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.editor=e.editor}render(){return this.container.className="editorAnnotation",this.container}createOrUpdatePopup(){let{editor:e}=this;e.hasComment&&(this._createPopup(e.comment),this.extraPopupElement.popup.renderCommentButton())}get hasCommentButton(){return this.enableComment&&this.editor.hasComment}get commentButtonPosition(){return this.editor.commentButtonPositionInPage}get commentText(){return this.editor.comment.text}set commentText(e){this.editor.comment=e,e||this.removePopup()}get commentData(){return this.editor.getData()}remove(){this.container.remove(),this.container=null,this.removePopup()}},Nf=class extends bt{constructor(e,n=null){super(e,{isRenderable:!0,ignoreBorder:!!n?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){let{data:e,linkService:n}=this,r=document.createElement("a");r.setAttribute("data-element-id",e.id);let i=!1;return e.url?(n.addLinkAttributes(r,e.url,e.newWindow),i=!0):e.action?(this._bindNamedAction(r,e.action,e.overlaidText),i=!0):e.attachment?(this.#t(r,e.attachment,e.overlaidText,e.attachmentDest),i=!0):e.setOCGState?(this.#i(r,e.setOCGState,e.overlaidText),i=!0):e.dest?(this._bindLink(r,e.dest,e.overlaidText),i=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(r,e),i=!0),e.resetForm?(this._bindResetFormAction(r,e.resetForm),i=!0):this.isTooltipOnly&&!i&&(this._bindLink(r,""),i=!0)),this.container.classList.add("linkAnnotation"),i&&this.container.append(r),this.container}#e(){this.container.setAttribute("data-internal-link","")}_bindLink(e,n,r=""){e.href=this.linkService.getDestinationHash(n),e.onclick=()=>(n&&this.linkService.goToDestination(n),!1),(n||n==="")&&this.#e(),r&&(e.title=r)}_bindNamedAction(e,n,r=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(n),!1),r&&(e.title=r),this.#e()}#t(e,n,r="",i=null){e.href=this.linkService.getAnchorUrl(""),n.description?e.title=n.description:r&&(e.title=r),e.onclick=()=>(this.downloadManager?.openOrDownloadData(n.content,n.filename,i),!1),this.#e()}#i(e,n,r=""){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(n),!1),r&&(e.title=r),this.#e()}_bindJSAction(e,n){e.href=this.linkService.getAnchorUrl("");let r=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(let i of Object.keys(n.actions)){let o=r.get(i);o&&(e[o]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n.id,name:i}}),!1))}n.overlaidText&&(e.title=n.overlaidText),e.onclick||(e.onclick=()=>!1),this.#e()}_bindResetFormAction(e,n){let r=e.onclick;if(r||(e.href=this.linkService.getAnchorUrl("")),this.#e(),!this._fieldObjects){we('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),r||(e.onclick=()=>!1);return}e.onclick=()=>{r?.();let{fields:i,refs:o,include:a}=n,s=[];if(i.length!==0||o.length!==0){let u=new Set(o);for(let d of i){let h=this._fieldObjects[d]||[];for(let{id:f}of h)u.add(f)}for(let d of Object.values(this._fieldObjects))for(let h of d)u.has(h.id)===a&&s.push(h)}else for(let u of Object.values(this._fieldObjects))s.push(...u);let l=this.annotationStorage,c=[];for(let u of s){let{id:d}=u;switch(c.push(d),u.type){case"text":{let f=u.defaultValue||"";l.setValue(d,{value:f});break}case"checkbox":case"radiobutton":{let f=u.defaultValue===u.exportValues;l.setValue(d,{value:f});break}case"combobox":case"listbox":{let f=u.defaultValue||"";l.setValue(d,{value:f});break}default:continue}let h=document.querySelector(`[data-element-id="${d}"]`);if(h){if(!Gs.has(h)){we(`_bindResetFormAction - element not allowed: ${d}`);continue}}else continue;h.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:c,name:"ResetForm"}}),!1}}},WR=class extends bt{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");let e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),e.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}},zo=class extends bt{render(){return this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&(e.previousSibling?.nodeName==="CANVAS"&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){return Vt.platform.isMac?e.metaKey:e.ctrlKey}_setEventListener(e,n,r,i,o){r.includes("mouse")?e.addEventListener(r,a=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(a),shift:a.shiftKey,modifier:this._getKeyModifier(a)}})}):e.addEventListener(r,a=>{if(r==="blur"){if(!n.focused||!a.relatedTarget)return;n.focused=!1}else if(r==="focus"){if(n.focused)return;n.focused=!0}o&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:i,value:o(a)}})})}_setEventListeners(e,n,r,i){for(let[o,a]of r)(a==="Action"||this.data.actions?.[a])&&((a==="Focus"||a==="Blur")&&(n||={focused:!1}),this._setEventListener(e,n,o,a,i),a==="Focus"&&!this.data.actions?.Blur?this._setEventListener(e,n,"blur","Blur",null):a==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(e,n,"focus","Focus",null))}_setBackgroundColor(e){let n=this.data.backgroundColor||null;e.style.backgroundColor=n===null?"transparent":le.makeHexColor(n[0],n[1],n[2])}_setTextStyle(e){let n=["left","center","right"],{fontColor:r}=this.data.defaultAppearanceData,i=this.data.defaultAppearanceData.fontSize||xY,o=e.style,a,s=2,l=c=>Math.round(10*c)/10;if(this.data.multiLine){let c=Math.abs(this.data.rect[3]-this.data.rect[1]-s),u=Math.round(c/(vS*i))||1,d=c/u;a=Math.min(i,l(d/vS))}else{let c=Math.abs(this.data.rect[3]-this.data.rect[1]-s);a=Math.min(i,l(c/vS))}o.fontSize=`calc(${a}px * var(--total-scale-factor))`,o.color=le.makeHexColor(r[0],r[1],r[2]),this.data.textAlignment!==null&&(o.textAlign=n[this.data.textAlignment])}_setRequired(e,n){n?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",n)}},QR=class extends zo{constructor(e){let n=e.renderForms||e.data.hasOwnCanvas||!e.data.hasAppearance&&!!e.data.fieldValue;super(e,{isRenderable:n})}setPropertyOnSiblings(e,n,r,i){let o=this.annotationStorage;for(let a of this._getElementsByName(e.name,e.id))a.domElement&&(a.domElement[n]=r),o.setValue(a.id,{[i]:r})}render(){let e=this.annotationStorage,n=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){let i=e.getValue(n,{value:this.data.fieldValue}),o=i.value||"",a=e.getValue(n,{charLimit:this.data.maxLen}).charLimit;a&&o.length>a&&(o=o.slice(0,a));let s=i.formattedValue||this.data.textContent?.join(`
`)||null;s&&this.data.comb&&(s=s.replaceAll(/\s+/g,""));let l={userValue:o,formattedValue:s,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(r=document.createElement("textarea"),r.textContent=s??o,this.data.doNotScroll&&(r.style.overflowY="hidden")):(r=document.createElement("input"),r.type=this.data.password?"password":"text",r.setAttribute("value",s??o),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),Gs.add(r),r.setAttribute("data-element-id",n),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=0;let{datetimeFormat:c,datetimeType:u,timeStep:d}=this.data,h=!!u&&this.enableScripting;c&&(r.title=c),this._setRequired(r,this.data.required),a&&(r.maxLength=a),r.addEventListener("input",m=>{e.setValue(n,{value:m.target.value}),this.setPropertyOnSiblings(r,"value",m.target.value,"value"),l.formattedValue=null}),r.addEventListener("resetform",m=>{let g=this.data.defaultFieldValue??"";r.value=l.userValue=g,l.formattedValue=null});let f=m=>{let{formattedValue:g}=l;g!=null&&(m.target.value=g),m.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",g=>{if(l.focused)return;let{target:y}=g;if(h&&(y.type=u,d&&(y.step=d)),l.userValue){let v=l.userValue;if(h)if(u==="time"){let b=new Date(v),S=[b.getHours(),b.getMinutes(),b.getSeconds()];y.value=S.map(_=>_.toString().padStart(2,"0")).join(":")}else y.value=new Date(v-zY).toISOString().split(u==="date"?"T":".",1)[0];else y.value=v}l.lastCommittedValue=y.value,l.commitKey=1,this.data.actions?.Focus||(l.focused=!0)}),r.addEventListener("updatefromsandbox",g=>{this.showElementAndHideCanvas(g.target);let y={value(v){l.userValue=v.detail.value??"",h||e.setValue(n,{value:l.userValue.toString()}),v.target.value=l.userValue},formattedValue(v){let{formattedValue:b}=v.detail;l.formattedValue=b,b!=null&&v.target!==document.activeElement&&(v.target.value=b);let S={formattedValue:b};h&&(S.value=b),e.setValue(n,S)},selRange(v){v.target.setSelectionRange(...v.detail.selRange)},charLimit:v=>{let{charLimit:b}=v.detail,{target:S}=v;if(b===0){S.removeAttribute("maxLength");return}S.setAttribute("maxLength",b);let _=l.userValue;!_||_.length<=b||(_=_.slice(0,b),S.value=l.userValue=_,e.setValue(n,{value:_}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:_,willCommit:!0,commitKey:1,selStart:S.selectionStart,selEnd:S.selectionEnd}}))}};this._dispatchEventFromSandbox(y,g)}),r.addEventListener("keydown",g=>{l.commitKey=1;let y=-1;if(g.key==="Escape"?y=0:g.key==="Enter"&&!this.data.multiLine?y=2:g.key==="Tab"&&(l.commitKey=3),y===-1)return;let{value:v}=g.target;l.lastCommittedValue!==v&&(l.lastCommittedValue=v,l.userValue=v,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:v,willCommit:!0,commitKey:y,selStart:g.target.selectionStart,selEnd:g.target.selectionEnd}}))});let m=f;f=null,r.addEventListener("blur",g=>{if(!l.focused||!g.relatedTarget)return;this.data.actions?.Blur||(l.focused=!1);let{target:y}=g,{value:v}=y;if(h){if(v&&u==="time"){let b=v.split(":").map(S=>parseInt(S,10));v=new Date(2e3,0,1,b[0],b[1],b[2]||0).valueOf(),y.step=""}else v.includes("T")||(v=`${v}T00:00`),v=new Date(v).valueOf();y.type="text"}l.userValue=v,l.lastCommittedValue!==v&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:v,willCommit:!0,commitKey:l.commitKey,selStart:g.target.selectionStart,selEnd:g.target.selectionEnd}}),m(g)}),this.data.actions?.Keystroke&&r.addEventListener("beforeinput",g=>{l.lastCommittedValue=null;let{data:y,target:v}=g,{value:b,selectionStart:S,selectionEnd:_}=v,T=S,x=_;switch(g.inputType){case"deleteWordBackward":{let E=b.substring(0,S).match(/\w*[^\w]*$/);E&&(T-=E[0].length);break}case"deleteWordForward":{let E=b.substring(S).match(/^[^\w]*\w*/);E&&(x+=E[0].length);break}case"deleteContentBackward":S===_&&(T-=1);break;case"deleteContentForward":S===_&&(x+=1);break}g.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:b,change:y||"",willCommit:!1,selStart:T,selEnd:x}})}),this._setEventListeners(r,l,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],g=>g.target.value)}if(f&&r.addEventListener("blur",f),this.data.comb){let g=(this.data.rect[2]-this.data.rect[0])/a;r.classList.add("comb"),r.style.letterSpacing=`calc(${g}px * var(--total-scale-factor) - 1ch)`}}else r=document.createElement("div"),r.textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell",this.data.hasOwnCanvas&&(r.hidden=!0);return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}},eC=class extends zo{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}},tC=class extends zo{constructor(e){super(e,{isRenderable:e.renderForms})}render(){let e=this.annotationStorage,n=this.data,r=n.id,i=e.getValue(r,{value:n.exportValue===n.fieldValue}).value;typeof i=="string"&&(i=i!=="Off",e.setValue(r,{value:i})),this.container.classList.add("buttonWidgetAnnotation","checkBox");let o=document.createElement("input");return Gs.add(o),o.setAttribute("data-element-id",r),o.disabled=n.readOnly,this._setRequired(o,this.data.required),o.type="checkbox",o.name=n.fieldName,i&&o.setAttribute("checked",!0),o.setAttribute("exportValue",n.exportValue),o.tabIndex=0,o.addEventListener("change",a=>{let{name:s,checked:l}=a.target;for(let c of this._getElementsByName(s,r)){let u=l&&c.exportValue===n.exportValue;c.domElement&&(c.domElement.checked=u),e.setValue(c.id,{value:u})}e.setValue(r,{value:l})}),o.addEventListener("resetform",a=>{let s=n.defaultFieldValue||"Off";a.target.checked=s===n.exportValue}),this.enableScripting&&this.hasJSActions&&(o.addEventListener("updatefromsandbox",a=>{let s={value(l){l.target.checked=l.detail.value!=="Off",e.setValue(r,{value:l.target.checked})}};this._dispatchEventFromSandbox(s,a)}),this._setEventListeners(o,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],a=>a.target.checked)),this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}},HS=class extends zo{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");let e=this.annotationStorage,n=this.data,r=n.id,i=e.getValue(r,{value:n.fieldValue===n.buttonValue}).value;if(typeof i=="string"&&(i=i!==n.buttonValue,e.setValue(r,{value:i})),i)for(let a of this._getElementsByName(n.fieldName,r))e.setValue(a.id,{value:!1});let o=document.createElement("input");if(Gs.add(o),o.setAttribute("data-element-id",r),o.disabled=n.readOnly,this._setRequired(o,this.data.required),o.type="radio",o.name=n.fieldName,i&&o.setAttribute("checked",!0),o.tabIndex=0,o.addEventListener("change",a=>{let{name:s,checked:l}=a.target;for(let c of this._getElementsByName(s,r))e.setValue(c.id,{value:!1});e.setValue(r,{value:l})}),o.addEventListener("resetform",a=>{let s=n.defaultFieldValue;a.target.checked=s!=null&&s===n.buttonValue}),this.enableScripting&&this.hasJSActions){let a=n.buttonValue;o.addEventListener("updatefromsandbox",s=>{let l={value:c=>{let u=a===c.detail.value;for(let d of this._getElementsByName(c.target.name)){let h=u&&d.id===r;d.domElement&&(d.domElement.checked=h),e.setValue(d.id,{value:h})}}};this._dispatchEventFromSandbox(l,s)}),this._setEventListeners(o,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],s=>s.target.checked)}return this._setBackgroundColor(o),this._setDefaultPropertiesFromJS(o),this.container.append(o),this.container}},nC=class extends Nf{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){let e=super.render();e.classList.add("buttonWidgetAnnotation","pushButton");let n=e.lastChild;return this.enableScripting&&this.hasJSActions&&n&&(this._setDefaultPropertiesFromJS(n),n.addEventListener("updatefromsandbox",r=>{this._dispatchEventFromSandbox({},r)})),e}},iC=class extends zo{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");let e=this.annotationStorage,n=this.data.id,r=e.getValue(n,{value:this.data.fieldValue}),i=document.createElement("select");Gs.add(i),i.setAttribute("data-element-id",n),i.disabled=this.data.readOnly,this._setRequired(i,this.data.required),i.name=this.data.fieldName,i.tabIndex=0;let o=this.data.combo&&this.data.options.length>0;this.data.combo||(i.size=this.data.options.length,this.data.multiSelect&&(i.multiple=!0)),i.addEventListener("resetform",u=>{let d=this.data.defaultFieldValue;for(let h of i.options)h.selected=h.value===d});for(let u of this.data.options){let d=document.createElement("option");d.textContent=u.displayValue,d.value=u.exportValue,r.value.includes(u.exportValue)&&(d.setAttribute("selected",!0),o=!1),i.append(d)}let a=null;if(o){let u=document.createElement("option");u.value=" ",u.setAttribute("hidden",!0),u.setAttribute("selected",!0),i.prepend(u),a=()=>{u.remove(),i.removeEventListener("input",a),a=null},i.addEventListener("input",a)}let s=u=>{let d=u?"value":"textContent",{options:h,multiple:f}=i;return f?Array.prototype.filter.call(h,m=>m.selected).map(m=>m[d]):h.selectedIndex===-1?null:h[h.selectedIndex][d]},l=s(!1),c=u=>{let d=u.target.options;return Array.prototype.map.call(d,h=>({displayValue:h.textContent,exportValue:h.value}))};return this.enableScripting&&this.hasJSActions?(i.addEventListener("updatefromsandbox",u=>{let d={value(h){a?.();let f=h.detail.value,m=new Set(Array.isArray(f)?f:[f]);for(let g of i.options)g.selected=m.has(g.value);e.setValue(n,{value:s(!0)}),l=s(!1)},multipleSelection(h){i.multiple=!0},remove(h){let f=i.options,m=h.detail.remove;f[m].selected=!1,i.remove(m),f.length>0&&Array.prototype.findIndex.call(f,y=>y.selected)===-1&&(f[0].selected=!0),e.setValue(n,{value:s(!0),items:c(h)}),l=s(!1)},clear(h){for(;i.length!==0;)i.remove(0);e.setValue(n,{value:null,items:[]}),l=s(!1)},insert(h){let{index:f,displayValue:m,exportValue:g}=h.detail.insert,y=i.children[f],v=document.createElement("option");v.textContent=m,v.value=g,y?y.before(v):i.append(v),e.setValue(n,{value:s(!0),items:c(h)}),l=s(!1)},items(h){let{items:f}=h.detail;for(;i.length!==0;)i.remove(0);for(let m of f){let{displayValue:g,exportValue:y}=m,v=document.createElement("option");v.textContent=g,v.value=y,i.append(v)}i.options.length>0&&(i.options[0].selected=!0),e.setValue(n,{value:s(!0),items:c(h)}),l=s(!1)},indices(h){let f=new Set(h.detail.indices);for(let m of h.target.options)m.selected=f.has(m.index);e.setValue(n,{value:s(!0)}),l=s(!1)},editable(h){h.target.disabled=!h.detail.editable}};this._dispatchEventFromSandbox(d,u)}),i.addEventListener("input",u=>{let d=s(!0),h=s(!1);e.setValue(n,{value:d}),u.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:n,name:"Keystroke",value:l,change:h,changeEx:d,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(i,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)):i.addEventListener("input",function(u){e.setValue(n,{value:s(!0)})}),this.data.combo&&this._setTextStyle(i),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}},Mf=class extends bt{constructor(e){let{data:n,elements:r,parent:i}=e,o=!!i._commentManager;if(super(e,{isRenderable:!o&&bt._hasPopupData(n)}),this.elements=r,o&&bt._hasPopupData(n)){let a=this.popup=this.#e();for(let s of r)s.popup=a}else this.popup=null}#e(){return new rC({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,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,commentManager:this.parent._commentManager})}render(){let{container:e}=this;e.classList.add("popupAnnotation"),e.role="comment";let n=this.popup=this.#e(),r=[];for(let i of this.elements)i.popup=n,i.container.ariaHasPopup="dialog",r.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",r.map(i=>`${AC}${i}`).join(",")),this.container}},rC=class{#e=null;#t=this.#H.bind(this);#i=this.#j.bind(this);#n=this.#P.bind(this);#a=this.#_.bind(this);#r=null;#o=null;#s=null;#c=null;#l=null;#h=null;#d=null;#f=!1;#g=null;#p=null;#u=null;#m=null;#v=null;#y=null;#b=null;#T=null;#x=null;#S=null;#E=!1;#w=null;#z=null;constructor({container:e,color:n,elements:r,titleObj:i,modificationDate:o,contentsObj:a,richText:s,parent:l,rect:c,parentRect:u,open:d,commentManager:h=null}){this.#o=e,this.#x=i,this.#s=a,this.#T=s,this.#h=l,this.#r=n,this.#b=c,this.#d=u,this.#l=r,this.#e=h,this.#w=r[0],this.#c=If.toDateObject(o),this.trigger=r.flatMap(f=>f.getElementsToTriggerPopup()),h?this.renderCommentButton():(this.#R(),this.#o.hidden=!0,d&&this.#_())}#R(){if(this.#p)return;this.#p=new AbortController;let{signal:e}=this.#p;for(let n of this.trigger)n.addEventListener("click",this.#a,{signal:e}),n.addEventListener("pointerenter",this.#n,{signal:e}),n.addEventListener("pointerleave",this.#i,{signal:e}),n.classList.add("popupTriggerArea");for(let n of this.#l)n.container?.addEventListener("keydown",this.#t,{signal:e})}#$(){let e=this.#l.find(n=>n.hasCommentButton);e&&(this.#v=e._normalizePoint(e.commentButtonPosition))}renderCommentButton(){if(this.#m||(this.#v||this.#$(),!this.#v))return;let{signal:e}=this.#p=new AbortController,n=!!this.#w.extraPopupElement,r=()=>{this.#e.toggleCommentPopup(this,!0,void 0,!n)},i=()=>{this.#e.toggleCommentPopup(this,!1,!0,!n)},o=()=>{this.#e.toggleCommentPopup(this,!1,!1)};if(n){this.#m=this.#w.container;for(let a of this.trigger)a.ariaHasPopup="dialog",a.ariaControls="commentPopup",a.addEventListener("keydown",this.#t,{signal:e}),a.addEventListener("click",r,{signal:e}),a.addEventListener("pointerenter",i,{signal:e}),a.addEventListener("pointerleave",o,{signal:e}),a.classList.add("popupTriggerArea")}else{let a=this.#m=document.createElement("button");a.className="annotationCommentButton";let s=this.#w.container;a.style.zIndex=s.style.zIndex+1,a.tabIndex=0,a.ariaHasPopup="dialog",a.ariaControls="commentPopup",a.setAttribute("data-l10n-id","pdfjs-show-comment-button"),this.#D(),this.#k(),a.addEventListener("keydown",this.#t,{signal:e}),a.addEventListener("click",r,{signal:e}),a.addEventListener("pointerenter",i,{signal:e}),a.addEventListener("pointerleave",o,{signal:e}),s.after(a)}}#k(){if(this.#w.extraPopupElement&&!this.#w.editor)return;this.renderCommentButton();let[e,n]=this.#v,{style:r}=this.#m;r.left=`calc(${e}%)`,r.top=`calc(${n}% - var(--comment-button-dim))`}#D(){this.#w.extraPopupElement||(this.renderCommentButton(),this.#m.style.backgroundColor=this.commentButtonColor||"")}get commentButtonColor(){let{color:e,opacity:n}=this.#w.commentData;return e?this.#h._commentManager.makeCommentColor(e,n):null}focusCommentButton(){setTimeout(()=>{this.#m?.focus()},0)}getData(){let{richText:e,color:n,opacity:r,creationDate:i,modificationDate:o}=this.#w.commentData;return{contentsObj:{str:this.comment},richText:e,color:n,opacity:r,creationDate:i,modificationDate:o}}get elementBeforePopup(){return this.#m}get comment(){return this.#z||=this.#w.commentText,this.#z}set comment(e){e!==this.comment&&(this.#w.commentText=this.#z=e)}get parentBoundingClientRect(){return this.#w.layer.getBoundingClientRect()}setCommentButtonStates({selected:e,hasPopup:n}){this.#m&&(this.#m.classList.toggle("selected",e),this.#m.ariaExpanded=n)}setSelectedCommentButton(e){this.#m.classList.toggle("selected",e)}get commentPopupPosition(){if(this.#y)return this.#y;let{x:e,y:n,height:r}=this.#m.getBoundingClientRect(),{x:i,y:o,width:a,height:s}=this.#w.layer.getBoundingClientRect();return[(e-i)/a,(n+r-o)/s]}set commentPopupPosition(e){this.#y=e}hasDefaultPopupPosition(){return this.#y===null}get commentButtonPosition(){return this.#v}get commentButtonWidth(){return this.#m.getBoundingClientRect().width/this.parentBoundingClientRect.width}editComment(e){let[n,r]=this.#y||this.commentButtonPosition.map(c=>c/100),i=this.parentBoundingClientRect,{x:o,y:a,width:s,height:l}=i;this.#e.showDialog(null,this,o+n*s,a+r*l,{...e,parentDimensions:i})}render(){if(this.#g)return;let e=this.#g=document.createElement("div");if(e.className="popup",this.#r){let r=e.style.outlineColor=le.makeHexColor(...this.#r);e.style.backgroundColor=`color-mix(in srgb, ${r} 30%, white)`}let n=document.createElement("span");if(n.className="header",this.#x?.str){let r=document.createElement("span");r.className="title",n.append(r),{dir:r.dir,str:r.textContent}=this.#x}if(e.append(n),this.#c){let r=document.createElement("time");r.className="popupDate",r.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),r.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#c.valueOf()})),r.dateTime=this.#c.toISOString(),n.append(r)}W6({html:this.#I||this.#s.str,dir:this.#s?.dir,className:"popupContent"},e),this.#o.append(e)}get#I(){let e=this.#T,n=this.#s;return e?.str&&(!n?.str||n.str===e.str)&&this.#T.html||null}get#O(){return this.#I?.attributes?.style?.fontSize||0}get#L(){return this.#I?.attributes?.style?.color||null}#N(e){let n=[],r={str:e,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:n}]}},i={style:{color:this.#L,fontSize:this.#O?`calc(${this.#O}px * var(--total-scale-factor))`:""}};for(let o of e.split(`
`))n.push({name:"span",value:o,attributes:i});return r}#H(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||(e.key==="Enter"||e.key==="Escape"&&this.#f)&&this.#_()}updateEdited({rect:e,popup:n,deleted:r}){if(this.#e){r?(this.remove(),this.#z=null):n&&(n.deleted?this.remove():(this.#D(),this.#z=n.text)),e&&(this.#v=null,this.#$(),this.#k());return}if(r||n?.deleted){this.remove();return}this.#R(),this.#S||={contentsObj:this.#s,richText:this.#T},e&&(this.#u=null),n&&n.text&&(this.#T=this.#N(n.text),this.#c=If.toDateObject(n.date),this.#s=null),this.#g?.remove(),this.#g=null}resetEdited(){this.#S&&({contentsObj:this.#s,richText:this.#T}=this.#S,this.#S=null,this.#g?.remove(),this.#g=null,this.#u=null)}remove(){if(this.#p?.abort(),this.#p=null,this.#g?.remove(),this.#g=null,this.#E=!1,this.#f=!1,this.#m?.remove(),this.#m=null,this.trigger)for(let e of this.trigger)e.classList.remove("popupTriggerArea")}#A(){if(this.#u!==null)return;let{page:{view:e},viewport:{rawDims:{pageWidth:n,pageHeight:r,pageX:i,pageY:o}}}=this.#h,a=!!this.#d,s=a?this.#d:this.#b;for(let m of this.#l)if(!s||le.intersect(m.data.rect,s)!==null){s=m.data.rect,a=!0;break}let l=le.normalizeRect([s[0],e[3]-s[1]+e[1],s[2],e[3]-s[3]+e[1]]),u=a?s[2]-s[0]+5:0,d=l[0]+u,h=l[1];this.#u=[100*(d-i)/n,100*(h-o)/r];let{style:f}=this.#o;f.left=`${this.#u[0]}%`,f.top=`${this.#u[1]}%`}#_(){if(this.#e){this.#e.toggleCommentPopup(this,!1);return}this.#f=!this.#f,this.#f?(this.#P(),this.#o.addEventListener("click",this.#a),this.#o.addEventListener("keydown",this.#t)):(this.#j(),this.#o.removeEventListener("click",this.#a),this.#o.removeEventListener("keydown",this.#t))}#P(){this.#g||this.render(),this.isVisible?this.#f&&this.#o.classList.add("focused"):(this.#A(),this.#o.hidden=!1,this.#o.style.zIndex=parseInt(this.#o.style.zIndex)+1e3)}#j(){this.#o.classList.remove("focused"),!(this.#f||!this.isVisible)&&(this.#o.hidden=!0,this.#o.style.zIndex=parseInt(this.#o.style.zIndex)-1e3)}forceHide(){this.#E=this.isVisible,this.#E&&(this.#o.hidden=!0)}maybeShow(){this.#e||(this.#R(),this.#E&&(this.#g||this.#P(),this.#E=!1,this.#o.hidden=!1))}get isVisible(){return this.#e?!1:this.#o.hidden===!1}},VS=class extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=ze.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){let e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(let n of this.textContent){let r=document.createElement("span");r.textContent=n,e.append(r)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}},oC=class extends bt{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");let{data:e,width:n,height:r}=this,i=this.svgFactory.create(n,r,!0),o=this.#e=this.svgFactory.createElement("svg:line");return o.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),o.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),o.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),o.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),o.setAttribute("stroke-width",e.borderStyle.width||1),o.setAttribute("stroke","transparent"),o.setAttribute("fill","transparent"),i.append(o),this.container.append(i),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}},aC=class extends bt{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");let{data:e,width:n,height:r}=this,i=this.svgFactory.create(n,r,!0),o=e.borderStyle.width,a=this.#e=this.svgFactory.createElement("svg:rect");return a.setAttribute("x",o/2),a.setAttribute("y",o/2),a.setAttribute("width",n-o),a.setAttribute("height",r-o),a.setAttribute("stroke-width",o||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),i.append(a),this.container.append(i),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}},sC=class extends bt{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");let{data:e,width:n,height:r}=this,i=this.svgFactory.create(n,r,!0),o=e.borderStyle.width,a=this.#e=this.svgFactory.createElement("svg:ellipse");return a.setAttribute("cx",n/2),a.setAttribute("cy",r/2),a.setAttribute("rx",n/2-o/2),a.setAttribute("ry",r/2-o/2),a.setAttribute("stroke-width",o||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","transparent"),i.append(a),this.container.append(i),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}},ZS=class extends bt{#e=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);let{data:{rect:e,vertices:n,borderStyle:r,popupRef:i},width:o,height:a}=this;if(!n)return this.container;let s=this.svgFactory.create(o,a,!0),l=[];for(let u=0,d=n.length;u<d;u+=2){let h=n[u]-e[0],f=e[3]-n[u+1];l.push(`${h},${f}`)}l=l.join(" ");let c=this.#e=this.svgFactory.createElement(this.svgElementName);return c.setAttribute("points",l),c.setAttribute("stroke-width",r.width||1),c.setAttribute("stroke","transparent"),c.setAttribute("fill","transparent"),s.append(c),this.container.append(s),!i&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}},lC=class extends ZS{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}},cC=class extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}},Df=class extends bt{#e=null;#t=[];constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?ze.HIGHLIGHT:ze.INK}#i(e,n){switch(e){case 90:return{transform:`rotate(90) translate(${-n[0]},${n[1]}) scale(1,-1)`,width:n[3]-n[1],height:n[2]-n[0]};case 180:return{transform:`rotate(180) translate(${-n[2]},${n[1]}) scale(1,-1)`,width:n[2]-n[0],height:n[3]-n[1]};case 270:return{transform:`rotate(270) translate(${-n[2]},${n[3]}) scale(1,-1)`,width:n[3]-n[1],height:n[2]-n[0]};default:return{transform:`translate(${-n[0]},${n[3]}) scale(1,-1)`,width:n[2]-n[0],height:n[3]-n[1]}}}render(){this.container.classList.add(this.containerClassName);let{data:{rect:e,rotation:n,inkLists:r,borderStyle:i,popupRef:o}}=this,{transform:a,width:s,height:l}=this.#i(n,e),c=this.svgFactory.create(s,l,!0),u=this.#e=this.svgFactory.createElement("svg:g");c.append(u),u.setAttribute("stroke-width",i.width||1),u.setAttribute("stroke-linecap","round"),u.setAttribute("stroke-linejoin","round"),u.setAttribute("stroke-miterlimit",10),u.setAttribute("stroke","transparent"),u.setAttribute("fill","transparent"),u.setAttribute("transform",a);for(let d=0,h=r.length;d<h;d++){let f=this.svgFactory.createElement(this.svgElementName);this.#t.push(f),f.setAttribute("points",r[d].join(",")),u.append(f)}return!o&&this.hasPopupData&&this._createPopup(),this.container.append(c),this._editOnDoubleClick(),this.container}updateEdited(e){super.updateEdited(e);let{thickness:n,points:r,rect:i}=e,o=this.#e;if(n>=0&&o.setAttribute("stroke-width",n||1),r)for(let a=0,s=this.#t.length;a<s;a++)this.#t[a].setAttribute("points",r[a].join(","));if(i){let{transform:a,width:s,height:l}=this.#i(this.data.rotation,i);o.parentElement.setAttribute("viewBox",`0 0 ${s} ${l}`),o.setAttribute("transform",a)}}getElementsToTriggerPopup(){return this.#t}addHighlightArea(){this.container.classList.add("highlightArea")}},GS=class extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=ze.HIGHLIGHT}render(){let{data:{overlaidText:e,popupRef:n}}=this;if(!n&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),e){let r=document.createElement("mark");r.classList.add("overlaidText"),r.textContent=e,this.container.append(r)}return this.container}},uC=class extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:e,popupRef:n}}=this;if(!n&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),e){let r=document.createElement("u");r.classList.add("overlaidText"),r.textContent=e,this.container.append(r)}return this.container}},dC=class extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:e,popupRef:n}}=this;if(!n&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),e){let r=document.createElement("u");r.classList.add("overlaidText"),r.textContent=e,this.container.append(r)}return this.container}},hC=class extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){let{data:{overlaidText:e,popupRef:n}}=this;if(!n&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),e){let r=document.createElement("s");r.classList.add("overlaidText"),r.textContent=e,this.container.append(r)}return this.container}},KS=class extends bt{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=ze.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}},fC=class extends bt{#e=null;constructor(e){super(e,{isRenderable:!0});let{file:n}=this.data;this.filename=n.filename,this.content=n.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...n})}render(){this.container.classList.add("fileAttachmentAnnotation");let{container:e,data:n}=this,r;n.hasAppearance||n.fillAlpha===0?r=document.createElement("div"):(r=document.createElement("img"),r.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(n.name)?"paperclip":"pushpin"}.svg`,n.fillAlpha&&n.fillAlpha<1&&(r.style=`filter: opacity(${Math.round(n.fillAlpha*100)}%);`)),r.addEventListener("dblclick",this.#t.bind(this)),this.#e=r;let{isMac:i}=Vt.platform;return e.addEventListener("keydown",o=>{o.key==="Enter"&&(i?o.metaKey:o.ctrlKey)&&this.#t()}),!n.popupRef&&this.hasPopupData?this._createPopup():r.classList.add("popupTriggerArea"),e.append(r),e}getElementsToTriggerPopup(){return this.#e}addHighlightArea(){this.container.classList.add("highlightArea")}#t(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}},pC=class t{#e=null;#t=null;#i=null;#n=new Map;#a=null;#r=null;constructor({div:e,accessibilityManager:n,annotationCanvasMap:r,annotationEditorUIManager:i,page:o,viewport:a,structTreeLayer:s,commentManager:l,linkService:c,annotationStorage:u}){this.div=e,this.#e=n,this.#t=r,this.#a=s||null,this.#r=c||null,this.#i=u||new Pf,this.page=o,this.viewport=a,this.zIndex=0,this._annotationEditorUIManager=i,this._commentManager=l||null}hasEditableAnnotations(){return this.#n.size>0}async#o(e,n,r){let i=e.firstChild||e,o=i.id=`${AC}${n}`,a=await this.#a?.getAriaAttributes(o);if(a)for(let[s,l]of a)i.setAttribute(s,l);r?r.at(-1).container.after(e):(this.div.append(e),this.#e?.moveElementInDOM(this.div,e,i,!1))}async render(e){let{annotations:n}=e,r=this.div;Fs(r,this.viewport);let i=new Map,o={data:null,layer:r,linkService:this.#r,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:e.renderForms!==!1,svgFactory:new au,annotationStorage:this.#i,enableComment:e.enableComment===!0,enableScripting:e.enableScripting===!0,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(let a of n){if(a.noHTML)continue;let s=a.annotationType===jt.POPUP;if(s){let u=i.get(a.id);if(!u)continue;o.elements=u}else if(a.rect[2]===a.rect[0]||a.rect[3]===a.rect[1])continue;o.data=a;let l=BS.create(o);if(!l.isRenderable)continue;if(!s&&a.popupRef){let u=i.get(a.popupRef);u?u.push(l):i.set(a.popupRef,[l])}let c=l.render();a.hidden&&(c.style.visibility="hidden"),await this.#o(c,a.id,o.elements),l.extraPopupElement?.popup?.renderCommentButton(),l._isEditable&&(this.#n.set(l.data.id,l),this._annotationEditorUIManager?.renderAnnotationElement(l))}this.#s()}async addLinkAnnotations(e){let n={data:null,layer:this.div,linkService:this.#r,svgFactory:new au,parent:this};for(let r of e){r.borderStyle||=t._defaultBorderStyle,n.data=r;let i=BS.create(n);if(!i.isRenderable)continue;let o=i.render();await this.#o(o,r.id,null)}}update({viewport:e}){let n=this.div;this.viewport=e,Fs(n,{rotation:e.rotation}),this.#s(),n.hidden=!1}#s(){if(!this.#t)return;let e=this.div;for(let[n,r]of this.#t){let i=e.querySelector(`[data-annotation-id="${n}"]`);if(!i)continue;r.className="annotationContent";let{firstChild:o}=i;o?o.nodeName==="CANVAS"?o.replaceWith(r):o.classList.contains("annotationContent")?o.after(r):o.before(r):i.append(r);let a=this.#n.get(n);a&&(a._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(n,i.id,r),a._hasNoCanvas=!1):a.canvas=r)}this.#t.clear()}getEditableAnnotations(){return Array.from(this.#n.values())}getEditableAnnotation(e){return this.#n.get(e)}addFakeAnnotation(e){let{div:n}=this,{id:r,rotation:i}=e,o=new XR({data:{id:r,rect:e.getPDFRect(),rotation:i},editor:e,layer:n,parent:this,enableComment:!!this._commentManager,linkService:this.#r,annotationStorage:this.#i}),a=o.render();return n.append(a),this.#e?.moveElementInDOM(n,a,a,!1),o.createOrUpdatePopup(),o}static get _defaultBorderStyle(){return Re(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:eu.SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}},pS=/\r\n?|\n/g,mC=class t extends at{#e="";#t=`${this.id}-editor`;#i=null;#n;_colorPicker=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){let e=t.prototype,n=o=>o.isEmpty(),r=Hs.TRANSLATE_SMALL,i=Hs.TRANSLATE_BIG;return Re(this,"_keyboardManager",new Bs([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-r,0],checker:n}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:n}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[r,0],checker:n}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[i,0],checker:n}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-r],checker:n}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:n}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,r],checker:n}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,i],checker:n}]]))}static _type="freetext";static _editorType=ze.FREETEXT;constructor(e){super({...e,name:"freeTextEditor"}),this.color=e.color||t._defaultColor||at._defaultLineColor,this.#n=e.fontSize||t._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(e,n){at.initialize(e,n);let r=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(r.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,n){switch(e){case je.FREETEXT_SIZE:t._defaultFontSize=n;break;case je.FREETEXT_COLOR:t._defaultColor=n;break}}updateParams(e,n){switch(e){case je.FREETEXT_SIZE:this.#a(n);break;case je.FREETEXT_COLOR:this.#r(n);break}}static get defaultPropertiesToUpdate(){return[[je.FREETEXT_SIZE,t._defaultFontSize],[je.FREETEXT_COLOR,t._defaultColor||at._defaultLineColor]]}get propertiesToUpdate(){return[[je.FREETEXT_SIZE,this.#n],[je.FREETEXT_COLOR,this.color]]}get toolbarButtons(){return this._colorPicker||=new qS(this),[["colorPicker",this._colorPicker]]}get colorType(){return je.FREETEXT_COLOR}#a(e){let n=i=>{this.editorDiv.style.fontSize=`calc(${i}px * var(--total-scale-factor))`,this.translate(0,-(i-this.#n)*this.parentScale),this.#n=i,this.#s()},r=this.#n;this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:je.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}onUpdatedColor(){this.editorDiv.style.color=this.color,this._colorPicker?.update(this.color),super.onUpdatedColor()}#r(e){let n=i=>{this.color=i,this.onUpdatedColor()},r=this.color;this.addCommands({cmd:n.bind(this,e),undo:n.bind(this,r),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:je.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,n){this._uiManager.translateSelectedEditors(e,n,!0)}getInitialTranslation(){let e=this.parentScale;return[-t._internalPadding*e,-(t._internalPadding+this.#n)*e]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#i=new AbortController;let e=this._uiManager.combinedSignal(this.#i);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal:e}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal:e}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal:e}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal:e}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal:e}),!0}disableEditMode(){return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#t),this._isDraggable=!0,this.#i?.abort(),this.#i=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(e){this.width||(this.enableEditMode(),e&&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()}#o(){let e=[];this.editorDiv.normalize();let n=null;for(let r of this.editorDiv.childNodes)n?.nodeType===Node.TEXT_NODE&&r.nodeName==="BR"||(e.push(t.#c(r)),n=r);return e.join(`
`)}#s(){let[e,n]=this.parentDimensions,r;if(this.isAttachedToDOM)r=this.div.getBoundingClientRect();else{let{currentLayer:i,div:o}=this,a=o.style.display,s=o.classList.contains("hidden");o.classList.remove("hidden"),o.style.display="hidden",i.div.append(this.div),r=o.getBoundingClientRect(),o.remove(),o.style.display=a,o.classList.toggle("hidden",s)}this.rotation%180===this.parentRotation%180?(this.width=r.width/e,this.height=r.height/n):(this.width=r.height/e,this.height=r.width/n),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();let e=this.#e,n=this.#e=this.#o().trimEnd();if(e===n)return;let r=i=>{if(this.#e=i,!i){this.remove();return}this.#l(),this._uiManager.rebuild(this),this.#s()};this.addCommands({cmd:()=>{r(n)},undo:()=>{r(e)},mustExec:!1}),this.#s()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&e.key==="Enter"&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){t._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){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)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let e,n;(this._isCopy||this.annotationElementId)&&(e=this.x,n=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#t),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;let{style:r}=this.editorDiv;if(r.fontSize=`calc(${this.#n}px * var(--total-scale-factor))`,r.color=this.color,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){let[i,o]=this.parentDimensions;if(this.annotationElementId){let{position:a}=this._initialData,[s,l]=this.getInitialTranslation();[s,l]=this.pageTranslationToScreen(s,l);let[c,u]=this.pageDimensions,[d,h]=this.pageTranslation,f,m;switch(this.rotation){case 0:f=e+(a[0]-d)/c,m=n+this.height-(a[1]-h)/u;break;case 90:f=e+(a[0]-d)/c,m=n-(a[1]-h)/u,[s,l]=[l,-s];break;case 180:f=e-this.width+(a[0]-d)/c,m=n-(a[1]-h)/u,[s,l]=[-s,-l];break;case 270:f=e+(a[0]-d-this.height*u)/c,m=n+(a[1]-h-this.width*c)/u,[s,l]=[-l,s];break}this.setAt(f*i,m*o,s,l)}else this._moveAfterPaste(e,n);this.#l(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#c(e){return(e.nodeType===Node.TEXT_NODE?e.nodeValue:e.innerText).replaceAll(pS,"")}editorDivPaste(e){let n=e.clipboardData||window.clipboardData,{types:r}=n;if(r.length===1&&r[0]==="text/plain")return;e.preventDefault();let i=t.#d(n.getData("text")||"").replaceAll(pS,`
`);if(!i)return;let o=window.getSelection();if(!o.rangeCount)return;this.editorDiv.normalize(),o.deleteFromDocument();let a=o.getRangeAt(0);if(!i.includes(`
`)){a.insertNode(document.createTextNode(i)),this.editorDiv.normalize(),o.collapseToStart();return}let{startContainer:s,startOffset:l}=a,c=[],u=[];if(s.nodeType===Node.TEXT_NODE){let f=s.parentElement;if(u.push(s.nodeValue.slice(l).replaceAll(pS,"")),f!==this.editorDiv){let m=c;for(let g of this.editorDiv.childNodes){if(g===f){m=u;continue}m.push(t.#c(g))}}c.push(s.nodeValue.slice(0,l).replaceAll(pS,""))}else if(s===this.editorDiv){let f=c,m=0;for(let g of this.editorDiv.childNodes)m++===l&&(f=u),f.push(t.#c(g))}this.#e=`${c.join(`
`)}${i}${u.join(`
`)}`,this.#l();let d=new Range,h=Math.sumPrecise(c.map(f=>f.length));for(let{firstChild:f}of this.editorDiv.childNodes)if(f.nodeType===Node.TEXT_NODE){let m=f.nodeValue.length;if(h<=m){d.setStart(f,h),d.setEnd(f,h);break}h-=m}o.removeAllRanges(),o.addRange(d)}#l(){if(this.editorDiv.replaceChildren(),!!this.#e)for(let e of this.#e.split(`
`)){let n=document.createElement("div");n.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(n)}}#h(){return this.#e.replaceAll("\xA0"," ")}static#d(e){return e.replaceAll(" ","\xA0")}get contentDiv(){return this.editorDiv}getPDFRect(){let e=t._internalPadding*this.parentScale;return this.getRect(e,e)}static async deserialize(e,n,r){let i=null;if(e instanceof VS){let{data:{defaultAppearanceData:{fontSize:a,fontColor:s},rect:l,rotation:c,id:u,popupRef:d,richText:h,contentsObj:f,creationDate:m,modificationDate:g},textContent:y,textPosition:v,parent:{page:{pageNumber:b}}}=e;if(!y||y.length===0)return null;i=e={annotationType:ze.FREETEXT,color:Array.from(s),fontSize:a,value:y.join(`
`),position:v,pageIndex:b-1,rect:l.slice(0),rotation:c,annotationElementId:u,id:u,deleted:!1,popupRef:d,comment:f?.str||null,richText:h,creationDate:m,modificationDate:g}}let o=await super.deserialize(e,n,r);return o.#n=e.fontSize,o.color=le.makeHexColor(...e.color),o.#e=t.#d(e.value),o._initialData=i,e.comment&&o.setCommentData(e),o}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let n=at._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.color),r=Object.assign(super.serialize(e),{color:n,fontSize:this.#n,value:this.#h()});return this.addComment(r),e?(r.isCopy=!0,r):this.annotationElementId&&!this.#f(r)?null:(r.id=this.annotationElementId,r)}#f(e){let{value:n,fontSize:r,color:i,pageIndex:o}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||e.value!==n||e.fontSize!==r||e.color.some((a,s)=>a!==i[s])||e.pageIndex!==o}renderAnnotationElement(e){let n=super.renderAnnotationElement(e);if(!n)return null;let{style:r}=n;r.fontSize=`calc(${this.#n}px * var(--total-scale-factor))`,r.color=this.color,n.replaceChildren();for(let i of this.#e.split(`
`)){let o=document.createElement("div");o.append(i?document.createTextNode(i):document.createElement("br")),n.append(o)}return e.updateEdited({rect:this.getPDFRect(),popup:this._uiManager.hasCommentManager()||this.hasEditedComment?this.comment:{text:this.#e}}),n}resetAnnotationElement(e){super.resetAnnotationElement(e),e.resetEdited()}},se=class{static PRECISION=1e-4;toSVGPath(){rt("Abstract method `toSVGPath` must be implemented.")}get box(){rt("Abstract getter `box` must be implemented.")}serialize(e,n){rt("Abstract method `serialize` must be implemented.")}static _rescale(e,n,r,i,o,a){a||=new Float32Array(e.length);for(let s=0,l=e.length;s<l;s+=2)a[s]=n+e[s]*i,a[s+1]=r+e[s+1]*o;return a}static _rescaleAndSwap(e,n,r,i,o,a){a||=new Float32Array(e.length);for(let s=0,l=e.length;s<l;s+=2)a[s]=n+e[s+1]*i,a[s+1]=r+e[s]*o;return a}static _translate(e,n,r,i){i||=new Float32Array(e.length);for(let o=0,a=e.length;o<a;o+=2)i[o]=n+e[o],i[o+1]=r+e[o+1];return i}static svgRound(e){return Math.round(e*1e4)}static _normalizePoint(e,n,r,i,o){switch(o){case 90:return[1-n/r,e/i];case 180:return[1-e/r,1-n/i];case 270:return[n/r,1-e/i];default:return[e/r,n/i]}}static _normalizePagePoint(e,n,r){switch(r){case 90:return[1-n,e];case 180:return[1-e,1-n];case 270:return[n,1-e];default:return[e,n]}}static createBezierPoints(e,n,r,i,o,a){return[(e+5*r)/6,(n+5*i)/6,(5*r+o)/6,(5*i+a)/6,(r+o)/2,(i+a)/2]}},YS=class t{#e;#t=[];#i;#n;#a=[];#r=new Float32Array(18);#o;#s;#c;#l;#h;#d;#f=[];static#g=8;static#p=2;static#u=t.#g+t.#p;constructor({x:e,y:n},r,i,o,a,s=0){this.#e=r,this.#d=o*i,this.#n=a,this.#r.set([NaN,NaN,NaN,NaN,e,n],6),this.#i=s,this.#l=t.#g*i,this.#c=t.#u*i,this.#h=i,this.#f.push(e,n)}isEmpty(){return isNaN(this.#r[8])}#m(){let e=this.#r.subarray(4,6),n=this.#r.subarray(16,18),[r,i,o,a]=this.#e;return[(this.#o+(e[0]-n[0])/2-r)/o,(this.#s+(e[1]-n[1])/2-i)/a,(this.#o+(n[0]-e[0])/2-r)/o,(this.#s+(n[1]-e[1])/2-i)/a]}add({x:e,y:n}){this.#o=e,this.#s=n;let[r,i,o,a]=this.#e,[s,l,c,u]=this.#r.subarray(8,12),d=e-c,h=n-u,f=Math.hypot(d,h);if(f<this.#c)return!1;let m=f-this.#l,g=m/f,y=g*d,v=g*h,b=s,S=l;s=c,l=u,c+=y,u+=v,this.#f?.push(e,n);let _=-v/m,T=y/m,x=_*this.#d,E=T*this.#d;return this.#r.set(this.#r.subarray(2,8),0),this.#r.set([c+x,u+E],4),this.#r.set(this.#r.subarray(14,18),12),this.#r.set([c-x,u-E],16),isNaN(this.#r[6])?(this.#a.length===0&&(this.#r.set([s+x,l+E],2),this.#a.push(NaN,NaN,NaN,NaN,(s+x-r)/o,(l+E-i)/a),this.#r.set([s-x,l-E],14),this.#t.push(NaN,NaN,NaN,NaN,(s-x-r)/o,(l-E-i)/a)),this.#r.set([b,S,s,l,c,u],6),!this.isEmpty()):(this.#r.set([b,S,s,l,c,u],6),Math.abs(Math.atan2(S-l,b-s)-Math.atan2(v,y))<Math.PI/2?([s,l,c,u]=this.#r.subarray(2,6),this.#a.push(NaN,NaN,NaN,NaN,((s+c)/2-r)/o,((l+u)/2-i)/a),[s,l,b,S]=this.#r.subarray(14,18),this.#t.push(NaN,NaN,NaN,NaN,((b+s)/2-r)/o,((S+l)/2-i)/a),!0):([b,S,s,l,c,u]=this.#r.subarray(0,6),this.#a.push(((b+5*s)/6-r)/o,((S+5*l)/6-i)/a,((5*s+c)/6-r)/o,((5*l+u)/6-i)/a,((s+c)/2-r)/o,((l+u)/2-i)/a),[c,u,s,l,b,S]=this.#r.subarray(12,18),this.#t.push(((b+5*s)/6-r)/o,((S+5*l)/6-i)/a,((5*s+c)/6-r)/o,((5*l+u)/6-i)/a,((s+c)/2-r)/o,((l+u)/2-i)/a),!0))}toSVGPath(){if(this.isEmpty())return"";let e=this.#a,n=this.#t;if(isNaN(this.#r[6])&&!this.isEmpty())return this.#v();let r=[];r.push(`M${e[4]} ${e[5]}`);for(let i=6;i<e.length;i+=6)isNaN(e[i])?r.push(`L${e[i+4]} ${e[i+5]}`):r.push(`C${e[i]} ${e[i+1]} ${e[i+2]} ${e[i+3]} ${e[i+4]} ${e[i+5]}`);this.#b(r);for(let i=n.length-6;i>=6;i-=6)isNaN(n[i])?r.push(`L${n[i+4]} ${n[i+5]}`):r.push(`C${n[i]} ${n[i+1]} ${n[i+2]} ${n[i+3]} ${n[i+4]} ${n[i+5]}`);return this.#y(r),r.join(" ")}#v(){let[e,n,r,i]=this.#e,[o,a,s,l]=this.#m();return`M${(this.#r[2]-e)/r} ${(this.#r[3]-n)/i} L${(this.#r[4]-e)/r} ${(this.#r[5]-n)/i} L${o} ${a} L${s} ${l} L${(this.#r[16]-e)/r} ${(this.#r[17]-n)/i} L${(this.#r[14]-e)/r} ${(this.#r[15]-n)/i} Z`}#y(e){let n=this.#t;e.push(`L${n[4]} ${n[5]} Z`)}#b(e){let[n,r,i,o]=this.#e,a=this.#r.subarray(4,6),s=this.#r.subarray(16,18),[l,c,u,d]=this.#m();e.push(`L${(a[0]-n)/i} ${(a[1]-r)/o} L${l} ${c} L${u} ${d} L${(s[0]-n)/i} ${(s[1]-r)/o}`)}newFreeDrawOutline(e,n,r,i,o,a){return new JS(e,n,r,i,o,a)}getOutlines(){let e=this.#a,n=this.#t,r=this.#r,[i,o,a,s]=this.#e,l=new Float32Array((this.#f?.length??0)+2);for(let d=0,h=l.length-2;d<h;d+=2)l[d]=(this.#f[d]-i)/a,l[d+1]=(this.#f[d+1]-o)/s;if(l[l.length-2]=(this.#o-i)/a,l[l.length-1]=(this.#s-o)/s,isNaN(r[6])&&!this.isEmpty())return this.#T(l);let c=new Float32Array(this.#a.length+24+this.#t.length),u=e.length;for(let d=0;d<u;d+=2){if(isNaN(e[d])){c[d]=c[d+1]=NaN;continue}c[d]=e[d],c[d+1]=e[d+1]}u=this.#S(c,u);for(let d=n.length-6;d>=6;d-=6)for(let h=0;h<6;h+=2){if(isNaN(n[d+h])){c[u]=c[u+1]=NaN,u+=2;continue}c[u]=n[d+h],c[u+1]=n[d+h+1],u+=2}return this.#x(c,u),this.newFreeDrawOutline(c,l,this.#e,this.#h,this.#i,this.#n)}#T(e){let n=this.#r,[r,i,o,a]=this.#e,[s,l,c,u]=this.#m(),d=new Float32Array(36);return d.set([NaN,NaN,NaN,NaN,(n[2]-r)/o,(n[3]-i)/a,NaN,NaN,NaN,NaN,(n[4]-r)/o,(n[5]-i)/a,NaN,NaN,NaN,NaN,s,l,NaN,NaN,NaN,NaN,c,u,NaN,NaN,NaN,NaN,(n[16]-r)/o,(n[17]-i)/a,NaN,NaN,NaN,NaN,(n[14]-r)/o,(n[15]-i)/a],0),this.newFreeDrawOutline(d,e,this.#e,this.#h,this.#i,this.#n)}#x(e,n){let r=this.#t;return e.set([NaN,NaN,NaN,NaN,r[4],r[5]],n),n+=6}#S(e,n){let r=this.#r.subarray(4,6),i=this.#r.subarray(16,18),[o,a,s,l]=this.#e,[c,u,d,h]=this.#m();return e.set([NaN,NaN,NaN,NaN,(r[0]-o)/s,(r[1]-a)/l,NaN,NaN,NaN,NaN,c,u,NaN,NaN,NaN,NaN,d,h,NaN,NaN,NaN,NaN,(i[0]-o)/s,(i[1]-a)/l],n),n+=24}},JS=class extends se{#e;#t=new Float32Array(4);#i;#n;#a;#r;#o;constructor(e,n,r,i,o,a){super(),this.#o=e,this.#a=n,this.#e=r,this.#r=i,this.#i=o,this.#n=a,this.firstPoint=[NaN,NaN],this.lastPoint=[NaN,NaN],this.#s(a);let[s,l,c,u]=this.#t;for(let d=0,h=e.length;d<h;d+=2)e[d]=(e[d]-s)/c,e[d+1]=(e[d+1]-l)/u;for(let d=0,h=n.length;d<h;d+=2)n[d]=(n[d]-s)/c,n[d+1]=(n[d+1]-l)/u}toSVGPath(){let e=[`M${this.#o[4]} ${this.#o[5]}`];for(let n=6,r=this.#o.length;n<r;n+=6){if(isNaN(this.#o[n])){e.push(`L${this.#o[n+4]} ${this.#o[n+5]}`);continue}e.push(`C${this.#o[n]} ${this.#o[n+1]} ${this.#o[n+2]} ${this.#o[n+3]} ${this.#o[n+4]} ${this.#o[n+5]}`)}return e.push("Z"),e.join(" ")}serialize([e,n,r,i],o){let a=r-e,s=i-n,l,c;switch(o){case 0:l=se._rescale(this.#o,e,i,a,-s),c=se._rescale(this.#a,e,i,a,-s);break;case 90:l=se._rescaleAndSwap(this.#o,e,n,a,s),c=se._rescaleAndSwap(this.#a,e,n,a,s);break;case 180:l=se._rescale(this.#o,r,n,-a,s),c=se._rescale(this.#a,r,n,-a,s);break;case 270:l=se._rescaleAndSwap(this.#o,r,i,-a,-s),c=se._rescaleAndSwap(this.#a,r,i,-a,-s);break}return{outline:Array.from(l),points:[Array.from(c)]}}#s(e){let n=this.#o,r=n[4],i=n[5],o=[r,i,r,i],a=r,s=i,l=r,c=i,u=e?Math.max:Math.min,d=new Float32Array(4);for(let f=6,m=n.length;f<m;f+=6){let g=n[f+4],y=n[f+5];isNaN(n[f])?(le.pointBoundingBox(g,y,o),s>y?(a=g,s=y):s===y&&(a=u(a,g)),c<y?(l=g,c=y):c===y&&(l=u(l,g))):(d[0]=d[1]=1/0,d[2]=d[3]=-1/0,le.bezierBoundingBox(r,i,...n.slice(f,f+6),d),le.rectBoundingBox(d[0],d[1],d[2],d[3],o),s>d[1]?(a=d[0],s=d[1]):s===d[1]&&(a=u(a,d[0])),c<d[3]?(l=d[2],c=d[3]):c===d[3]&&(l=u(l,d[2]))),r=g,i=y}let h=this.#t;h[0]=o[0]-this.#i,h[1]=o[1]-this.#i,h[2]=o[2]-o[0]+2*this.#i,h[3]=o[3]-o[1]+2*this.#i,this.firstPoint=[a,s],this.lastPoint=[l,c]}get box(){return this.#t}newOutliner(e,n,r,i,o,a=0){return new YS(e,n,r,i,o,a)}getNewOutline(e,n){let[r,i,o,a]=this.#t,[s,l,c,u]=this.#e,d=o*c,h=a*u,f=r*c+s,m=i*u+l,g=this.newOutliner({x:this.#a[0]*d+f,y:this.#a[1]*h+m},this.#e,this.#r,e,this.#n,n??this.#i);for(let y=2;y<this.#a.length;y+=2)g.add({x:this.#a[y]*d+f,y:this.#a[y+1]*h+m});return g.getOutlines()}},Lf=class{#e;#t;#i;#n=[];#a=[];constructor(e,n=0,r=0,i=!0){let o=[1/0,1/0,-1/0,-1/0],s=10**-4;for(let{x:y,y:v,width:b,height:S}of e){let _=Math.floor((y-n)/s)*s,T=Math.ceil((y+b+n)/s)*s,x=Math.floor((v-n)/s)*s,E=Math.ceil((v+S+n)/s)*s,C=[_,x,E,!0],I=[T,x,E,!1];this.#n.push(C,I),le.rectBoundingBox(_,x,T,E,o)}let l=o[2]-o[0]+2*r,c=o[3]-o[1]+2*r,u=o[0]-r,d=o[1]-r,h=i?-1/0:1/0,f=1/0,m=this.#n.at(i?-1:-2),g=[m[0],m[2]];for(let y of this.#n){let[v,b,S,_]=y;!_&&i?b<f?(f=b,h=v):b===f&&(h=Math.max(h,v)):_&&!i&&(b<f?(f=b,h=v):b===f&&(h=Math.min(h,v))),y[0]=(v-u)/l,y[1]=(b-d)/c,y[2]=(S-d)/c}this.#e=new Float32Array([u,d,l,c]),this.#t=[h,f],this.#i=g}getOutlines(){this.#n.sort((n,r)=>n[0]-r[0]||n[1]-r[1]||n[2]-r[2]);let e=[];for(let n of this.#n)n[3]?(e.push(...this.#l(n)),this.#s(n)):(this.#c(n),e.push(...this.#l(n)));return this.#r(e)}#r(e){let n=[],r=new Set;for(let a of e){let[s,l,c]=a;n.push([s,l,a],[s,c,a])}n.sort((a,s)=>a[1]-s[1]||a[0]-s[0]);for(let a=0,s=n.length;a<s;a+=2){let l=n[a][2],c=n[a+1][2];l.push(c),c.push(l),r.add(l),r.add(c)}let i=[],o;for(;r.size>0;){let a=r.values().next().value,[s,l,c,u,d]=a;r.delete(a);let h=s,f=l;for(o=[s,c],i.push(o);;){let m;if(r.has(u))m=u;else if(r.has(d))m=d;else break;r.delete(m),[s,l,c,u,d]=m,h!==s&&(o.push(h,f,s,f===l?l:c),h=s),f=f===l?c:l}o.push(h,f)}return new gC(i,this.#e,this.#t,this.#i)}#o(e){let n=this.#a,r=0,i=n.length-1;for(;r<=i;){let o=r+i>>1,a=n[o][0];if(a===e)return o;a<e?r=o+1:i=o-1}return i+1}#s([,e,n]){let r=this.#o(e);this.#a.splice(r,0,[e,n])}#c([,e,n]){let r=this.#o(e);for(let i=r;i<this.#a.length;i++){let[o,a]=this.#a[i];if(o!==e)break;if(o===e&&a===n){this.#a.splice(i,1);return}}for(let i=r-1;i>=0;i--){let[o,a]=this.#a[i];if(o!==e)break;if(o===e&&a===n){this.#a.splice(i,1);return}}}#l(e){let[n,r,i]=e,o=[[n,r,i]],a=this.#o(i);for(let s=0;s<a;s++){let[l,c]=this.#a[s];for(let u=0,d=o.length;u<d;u++){let[,h,f]=o[u];if(!(c<=h||f<=l)){if(h>=l){if(f>c)o[u][1]=c;else{if(d===1)return[];o.splice(u,1),u--,d--}continue}o[u][2]=l,f>c&&o.push([n,c,f])}}}return o}},gC=class extends se{#e;#t;constructor(e,n,r,i){super(),this.#t=e,this.#e=n,this.firstPoint=r,this.lastPoint=i}toSVGPath(){let e=[];for(let n of this.#t){let[r,i]=n;e.push(`M${r} ${i}`);for(let o=2;o<n.length;o+=2){let a=n[o],s=n[o+1];a===r?(e.push(`V${s}`),i=s):s===i&&(e.push(`H${a}`),r=a)}e.push("Z")}return e.join(" ")}serialize([e,n,r,i],o){let a=[],s=r-e,l=i-n;for(let c of this.#t){let u=new Array(c.length);for(let d=0;d<c.length;d+=2)u[d]=e+c[d]*s,u[d+1]=i-c[d+1]*l;a.push(u)}return a}get box(){return this.#e}get classNamesForOutlining(){return["highlightOutline"]}},jf=class extends YS{newFreeDrawOutline(e,n,r,i,o,a){return new vC(e,n,r,i,o,a)}},vC=class extends JS{newOutliner(e,n,r,i,o,a=0){return new jf(e,n,r,i,o,a)}},XS=class t extends at{#e=null;#t=0;#i;#n=null;#a=null;#r=null;#o=null;#s=0;#c=null;#l=null;#h=null;#d=!1;#f=null;#g=null;#p=null;#u="";#m;#v="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=ze.HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){let e=t.prototype;return Re(this,"_keyboardManager",new Bs([[["ArrowLeft","mac+ArrowLeft"],e._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],e._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],e._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],e._moveCaret,{args:[3]}]]))}constructor(e){super({...e,name:"highlightEditor"}),this.color=e.color||t._defaultColor,this.#m=e.thickness||t._defaultThickness,this.opacity=e.opacity||t._defaultOpacity,this.#i=e.boxes||null,this.#v=e.methodOfCreation||"",this.#u=e.text||"",this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",e.highlightId>-1?(this.#d=!0,this.#b(e),this.#w()):this.#i&&(this.#e=e.anchorNode,this.#t=e.anchorOffset,this.#o=e.focusNode,this.#s=e.focusOffset,this.#y(),this.#w(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#d?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:this.#m,methodOfCreation:this.#v}}get telemetryFinalData(){return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}static computeTelemetryFinalData(e){return{numberOfColors:e.get("color").size}}#y(){let e=new Lf(this.#i,.001);this.#l=e.getOutlines(),[this.x,this.y,this.width,this.height]=this.#l.box;let n=new Lf(this.#i,.0025,.001,this._uiManager.direction==="ltr");this.#r=n.getOutlines();let{firstPoint:r}=this.#l;this.#f=[(r[0]-this.x)/this.width,(r[1]-this.y)/this.height];let{lastPoint:i}=this.#r;this.#g=[(i[0]-this.x)/this.width,(i[1]-this.y)/this.height]}#b({highlightOutlines:e,highlightId:n,clipPathId:r}){this.#l=e;let i=1.5;if(this.#r=e.getNewOutline(this.#m/2+i,.0025),n>=0)this.#h=n,this.#n=r,this.parent.drawLayer.finalizeDraw(n,{bbox:e.box,path:{d:e.toSVGPath()}}),this.#p=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#r.box,path:{d:this.#r.toSVGPath()}},!0);else if(this.parent){let d=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#h,{bbox:t.#z(this.#l.box,(d-this.rotation+360)%360),path:{d:e.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#p,{bbox:t.#z(this.#r.box,d),path:{d:this.#r.toSVGPath()}})}let[o,a,s,l]=e.box;switch(this.rotation){case 0:this.x=o,this.y=a,this.width=s,this.height=l;break;case 90:{let[d,h]=this.parentDimensions;this.x=a,this.y=1-o,this.width=s*h/d,this.height=l*d/h;break}case 180:this.x=1-o,this.y=1-a,this.width=s,this.height=l;break;case 270:{let[d,h]=this.parentDimensions;this.x=1-a,this.y=o,this.width=s*h/d,this.height=l*d/h;break}}let{firstPoint:c}=e;this.#f=[(c[0]-o)/s,(c[1]-a)/l];let{lastPoint:u}=this.#r;this.#g=[(u[0]-o)/s,(u[1]-a)/l]}static initialize(e,n){at.initialize(e,n),t._defaultColor||=n.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(e,n){switch(e){case je.HIGHLIGHT_COLOR:t._defaultColor=n;break;case je.HIGHLIGHT_THICKNESS:t._defaultThickness=n;break}}translateInPage(e,n){}get toolbarPosition(){return this.#g}get commentButtonPosition(){return this.#f}updateParams(e,n){switch(e){case je.HIGHLIGHT_COLOR:this.#T(n);break;case je.HIGHLIGHT_THICKNESS:this.#x(n);break}}static get defaultPropertiesToUpdate(){return[[je.HIGHLIGHT_COLOR,t._defaultColor],[je.HIGHLIGHT_THICKNESS,t._defaultThickness]]}get propertiesToUpdate(){return[[je.HIGHLIGHT_COLOR,this.color||t._defaultColor],[je.HIGHLIGHT_THICKNESS,this.#m||t._defaultThickness],[je.HIGHLIGHT_FREE,this.#d]]}onUpdatedColor(){this.parent?.drawLayer.updateProperties(this.#h,{root:{fill:this.color,"fill-opacity":this.opacity}}),this.#a?.updateColor(this.color),super.onUpdatedColor()}#T(e){let n=(o,a)=>{this.color=o,this.opacity=a,this.onUpdatedColor()},r=this.color,i=this.opacity;this.addCommands({cmd:n.bind(this,e,t._defaultOpacity),undo:n.bind(this,r,i),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:je.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_changed",color:this._uiManager.getNonHCMColorName(e)},!0)}#x(e){let n=this.#m,r=i=>{this.#m=i,this.#S(i)};this.addCommands({cmd:r.bind(this,e),undo:r.bind(this,n),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:je.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness:e},!0)}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",this.#a=new US({editor:this})]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#k())}getBaseTranslation(){return[0,0]}getRect(e,n){return super.getRect(e,n,this.#k())}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),e&&this.div.focus()}remove(){this.#E(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#w(),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let n=!1;this.parent&&!e?this.#E():e&&(this.#w(e),n=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),this.show(this._isVisible),n&&this.select()}#S(e){this.#d&&(this.#b({highlightOutlines:this.#l.getNewOutline(e/2)}),this.fixAndSetPosition(),this.setDims(this.width,this.height))}#E(){this.#h===null||!this.parent||(this.parent.drawLayer.remove(this.#h),this.#h=null,this.parent.drawLayer.remove(this.#p),this.#p=null)}#w(e=this.parent){this.#h===null&&({id:this.#h,clipPathId:this.#n}=e.drawLayer.draw({bbox:this.#l.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.opacity},rootClass:{highlight:!0,free:this.#d},path:{d:this.#l.toSVGPath()}},!1,!0),this.#p=e.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#d},bbox:this.#r.box,path:{d:this.#r.toSVGPath()}},this.#d),this.#c&&(this.#c.style.clipPath=this.#n))}static#z([e,n,r,i],o){switch(o){case 90:return[1-n-i,e,i,r];case 180:return[1-e-r,1-n-i,r,i];case 270:return[n,1-e-r,i,r]}return[e,n,r,i]}rotate(e){let{drawLayer:n}=this.parent,r;this.#d?(e=(e-this.rotation+360)%360,r=t.#z(this.#l.box,e)):r=t.#z([this.x,this.y,this.width,this.height],e),n.updateProperties(this.#h,{bbox:r,root:{"data-main-rotation":e}}),n.updateProperties(this.#p,{bbox:t.#z(this.#r.box,e),root:{"data-main-rotation":e}})}render(){if(this.div)return this.div;let e=super.render();this.#u&&(e.setAttribute("aria-label",this.#u),e.setAttribute("role","mark")),this.#d?e.classList.add("free"):this.div.addEventListener("keydown",this.#R.bind(this),{signal:this._uiManager._signal});let n=this.#c=document.createElement("div");return e.append(n),n.setAttribute("aria-hidden","true"),n.className="internal",n.style.clipPath=this.#n,this.setDims(this.width,this.height),Q6(this,this.#c,["pointerover","pointerleave"]),this.enableEditing(),e}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#p,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#p,{rootClass:{hovered:!1}})}#R(e){t._keyboardManager.exec(this,e)}_moveCaret(e){switch(this.parent.unselect(this),e){case 0:case 2:this.#$(!0);break;case 1:case 3:this.#$(!1);break}}#$(e){if(!this.#e)return;let n=window.getSelection();e?n.setPosition(this.#e,this.#t):n.setPosition(this.#o,this.#s)}select(){super.select(),this.#p&&this.parent?.drawLayer.updateProperties(this.#p,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#p&&(this.parent?.drawLayer.updateProperties(this.#p,{rootClass:{selected:!1}}),this.#d||this.#$(!1))}get _mustFixPosition(){return!this.#d}show(e=this._isVisible){super.show(e),this.parent&&(this.parent.drawLayer.updateProperties(this.#h,{rootClass:{hidden:!e}}),this.parent.drawLayer.updateProperties(this.#p,{rootClass:{hidden:!e}}))}#k(){return this.#d?this.rotation:0}#D(){if(this.#d)return null;let[e,n]=this.pageDimensions,[r,i]=this.pageTranslation,o=this.#i,a=new Float32Array(o.length*8),s=0;for(let{x:l,y:c,width:u,height:d}of o){let h=l*e+r,f=(1-c)*n+i;a[s]=a[s+4]=h,a[s+1]=a[s+3]=f,a[s+2]=a[s+6]=h+u*e,a[s+5]=a[s+7]=f-d*n,s+=8}return a}#I(e){return this.#l.serialize(e,this.#k())}static startHighlighting(e,n,{target:r,x:i,y:o}){let{x:a,y:s,width:l,height:c}=r.getBoundingClientRect(),u=new AbortController,d=e.combinedSignal(u),h=f=>{u.abort(),this.#L(e,f)};window.addEventListener("blur",h,{signal:d}),window.addEventListener("pointerup",h,{signal:d}),window.addEventListener("pointerdown",At,{capture:!0,passive:!1,signal:d}),window.addEventListener("contextmenu",Vi,{signal:d}),r.addEventListener("pointermove",this.#O.bind(this,e),{signal:d}),this._freeHighlight=new jf({x:i,y:o},[a,s,l,c],e.scale,this._defaultThickness/2,n,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=e.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static#O(e,n){this._freeHighlight.add(n)&&e.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#L(e,n){this._freeHighlight.isEmpty()?e.drawLayer.remove(this._freeHighlightId):e.createAndAddNewEditor(n,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(e,n,r){let i=null;if(e instanceof GS){let{data:{quadPoints:m,rect:g,rotation:y,id:v,color:b,opacity:S,popupRef:_,richText:T,contentsObj:x,creationDate:E,modificationDate:C},parent:{page:{pageNumber:I}}}=e;i=e={annotationType:ze.HIGHLIGHT,color:Array.from(b),opacity:S,quadPoints:m,boxes:null,pageIndex:I-1,rect:g.slice(0),rotation:y,annotationElementId:v,id:v,deleted:!1,popupRef:_,richText:T,comment:x?.str||null,creationDate:E,modificationDate:C}}else if(e instanceof Df){let{data:{inkLists:m,rect:g,rotation:y,id:v,color:b,borderStyle:{rawWidth:S},popupRef:_,richText:T,contentsObj:x,creationDate:E,modificationDate:C},parent:{page:{pageNumber:I}}}=e;i=e={annotationType:ze.HIGHLIGHT,color:Array.from(b),thickness:S,inkLists:m,boxes:null,pageIndex:I-1,rect:g.slice(0),rotation:y,annotationElementId:v,id:v,deleted:!1,popupRef:_,richText:T,comment:x?.str||null,creationDate:E,modificationDate:C}}let{color:o,quadPoints:a,inkLists:s,opacity:l}=e,c=await super.deserialize(e,n,r);c.color=le.makeHexColor(...o),c.opacity=l||1,s&&(c.#m=e.thickness),c._initialData=i,e.comment&&c.setCommentData(e);let[u,d]=c.pageDimensions,[h,f]=c.pageTranslation;if(a){let m=c.#i=[];for(let g=0;g<a.length;g+=8)m.push({x:(a[g]-h)/u,y:1-(a[g+1]-f)/d,width:(a[g+2]-a[g])/u,height:(a[g+1]-a[g+5])/d});c.#y(),c.#w(),c.rotate(c.rotation)}else if(s){c.#d=!0;let m=s[0],g={x:m[0]-h,y:d-(m[1]-f)},y=new jf(g,[0,0,u,d],1,c.#m/2,!0,.001);for(let S=0,_=m.length;S<_;S+=2)g.x=m[S]-h,g.y=d-(m[S+1]-f),y.add(g);let{id:v,clipPathId:b}=n.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:c.color,"fill-opacity":c._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:y.toSVGPath()}},!0,!0);c.#b({highlightOutlines:y.getOutlines(),highlightId:v,clipPathId:b}),c.#w(),c.rotate(c.parentRotation)}return c}serialize(e=!1){if(this.isEmpty()||e)return null;if(this.deleted)return this.serializeDeleted();let n=at._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),r=super.serialize(e);return Object.assign(r,{color:n,opacity:this.opacity,thickness:this.#m,quadPoints:this.#D(),outlines:this.#I(r.rect)}),this.addComment(r),this.annotationElementId&&!this.#N(r)?null:(r.id=this.annotationElementId,r)}#N(e){let{color:n}=this._initialData;return this.hasEditedComment||e.color.some((r,i)=>r!==n[i])}renderAnnotationElement(e){return this.deleted?(e.hide(),null):(e.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}static canCreateNewEmptyEditor(){return!1}},WS=class{#e=Object.create(null);updateProperty(e,n){this[e]=n,this.updateSVGProperty(e,n)}updateProperties(e){if(e)for(let[n,r]of Object.entries(e))n.startsWith("_")||this.updateProperty(n,r)}updateSVGProperty(e,n){this.#e[e]=n}toSVGProperties(){let e=this.#e;return this.#e=Object.create(null),{root:e}}reset(){this.#e=Object.create(null)}updateAll(e=this){this.updateProperties(e)}clone(){rt("Not implemented")}},QS=class t extends at{#e=null;#t;_colorPicker=null;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#i=null;static#n=null;static#a=null;static#r=NaN;static#o=null;static#s=null;static#c=NaN;static _INNER_MARGIN=3;constructor(e){super(e),this.#t=e.mustBeCommitted||!1,this._addOutlines(e)}onUpdatedColor(){this._colorPicker?.update(this.color),super.onUpdatedColor()}_addOutlines(e){e.drawOutlines&&(this.#l(e),this.#f())}#l({drawOutlines:e,drawId:n,drawingOptions:r}){this.#e=e,this._drawingOptions||=r,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),n>=0?(this._drawId=n,this.parent.drawLayer.finalizeDraw(n,e.defaultProperties)):this._drawId=this.#h(e,this.parent),this.#u(e.box)}#h(e,n){let{id:r}=n.drawLayer.draw(t._mergeSVGProperties(this._drawingOptions.toSVGProperties(),e.defaultSVGProperties),!1,!1);return r}static _mergeSVGProperties(e,n){let r=new Set(Object.keys(e));for(let[i,o]of Object.entries(n))r.has(i)?Object.assign(e[i],o):e[i]=o;return e}static getDefaultDrawingOptions(e){rt("Not implemented")}static get typesMap(){rt("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(e,n){let r=this.typesMap.get(e);r&&this._defaultDrawingOptions.updateProperty(r,n),this._currentParent&&(t.#i.updateProperty(r,n),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(e,n){let r=this.constructor.typesMap.get(e);r&&this._updateProperty(e,r,n)}static get defaultPropertiesToUpdate(){let e=[],n=this._defaultDrawingOptions;for(let[r,i]of this.typesMap)e.push([r,n[i]]);return e}get propertiesToUpdate(){let e=[],{_drawingOptions:n}=this;for(let[r,i]of this.constructor.typesMap)e.push([r,n[i]]);return e}_updateProperty(e,n,r){let i=this._drawingOptions,o=i[n],a=s=>{i.updateProperty(n,s);let l=this.#e.updateProperty(n,s);l&&this.#u(l),this.parent?.drawLayer.updateProperties(this._drawId,i.toSVGProperties()),e===this.colorType&&this.onUpdatedColor()};this.addCommands({cmd:a.bind(this,r),undo:a.bind(this,o),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:e,overwriteIfSameType:!0,keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,t._mergeSVGProperties(this.#e.getPathResizingSVGProperties(this.#p()),{bbox:this.#m()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,t._mergeSVGProperties(this.#e.getPathResizedSVGProperties(this.#p()),{bbox:this.#m()}))}_onTranslating(e,n){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#m()})}_onTranslated(){this.parent?.drawLayer.updateProperties(this._drawId,t._mergeSVGProperties(this.#e.getPathTranslatedSVGProperties(this.#p(),this.parentDimensions),{bbox:this.#m()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(e){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#t&&(this.#t=!1,this.commit(),this.parent.setSelected(this),e&&this.isOnScreen&&this.div.focus())}remove(){this.#d(),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#f(),this.#u(this.#e.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(e){let n=!1;this.parent&&!e?(this._uiManager.removeShouldRescale(this),this.#d()):e&&(this._uiManager.addShouldRescale(this),this.#f(e),n=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(e),n&&this.select()}#d(){this._drawId===null||!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#f(e=this.parent){if(!(this._drawId!==null&&this.parent===e)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,e.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=this.#h(this.#e,e)}}#g([e,n,r,i]){let{parentDimensions:[o,a],rotation:s}=this;switch(s){case 90:return[n,1-e,r*(a/o),i*(o/a)];case 180:return[1-e,1-n,r,i];case 270:return[1-n,e,r*(a/o),i*(o/a)];default:return[e,n,r,i]}}#p(){let{x:e,y:n,width:r,height:i,parentDimensions:[o,a],rotation:s}=this;switch(s){case 90:return[1-n,e,r*(o/a),i*(a/o)];case 180:return[1-e,1-n,r,i];case 270:return[n,1-e,r*(o/a),i*(a/o)];default:return[e,n,r,i]}}#u(e){[this.x,this.y,this.width,this.height]=this.#g(e),this.div&&(this.fixAndSetPosition(),this.setDims()),this._onResized()}#m(){let{x:e,y:n,width:r,height:i,rotation:o,parentRotation:a,parentDimensions:[s,l]}=this;switch((o*4+a)/90){case 1:return[1-n-i,e,i,r];case 2:return[1-e-r,1-n-i,r,i];case 3:return[n,1-e-r,i,r];case 4:return[e,n-r*(s/l),i*(l/s),r*(s/l)];case 5:return[1-n,e,r*(s/l),i*(l/s)];case 6:return[1-e-i*(l/s),1-n,i*(l/s),r*(s/l)];case 7:return[n-r*(s/l),1-e-i*(l/s),r*(s/l),i*(l/s)];case 8:return[e-r,n-i,r,i];case 9:return[1-n,e-r,i,r];case 10:return[1-e,1-n,r,i];case 11:return[n-i,1-e,i,r];case 12:return[e-i*(l/s),n,i*(l/s),r*(s/l)];case 13:return[1-n-r*(s/l),e-i*(l/s),r*(s/l),i*(l/s)];case 14:return[1-e,1-n-r*(s/l),i*(l/s),r*(s/l)];case 15:return[n,1-e,r*(s/l),i*(l/s)];default:return[e,n,r,i]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,t._mergeSVGProperties({bbox:this.#m()},this.#e.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#u(this.#e.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){if(this.div)return this.div;let e,n;this._isCopy&&(e=this.x,n=this.y);let r=super.render();r.classList.add("draw");let i=document.createElement("div");return r.append(i),i.setAttribute("aria-hidden","true"),i.className="internal",this.setDims(),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(e,n),r}static createDrawerInstance(e,n,r,i,o){rt("Not implemented")}static startDrawing(e,n,r,i){let{target:o,offsetX:a,offsetY:s,pointerId:l,pointerType:c}=i;if(t.#o&&t.#o!==c)return;let{viewport:{rotation:u}}=e,{width:d,height:h}=o.getBoundingClientRect(),f=t.#n=new AbortController,m=e.combinedSignal(f);if(t.#r||=l,t.#o??=c,window.addEventListener("pointerup",g=>{t.#r===g.pointerId?this._endDraw(g):t.#s?.delete(g.pointerId)},{signal:m}),window.addEventListener("pointercancel",g=>{t.#r===g.pointerId?this._currentParent.endDrawingSession():t.#s?.delete(g.pointerId)},{signal:m}),window.addEventListener("pointerdown",g=>{t.#o===g.pointerType&&((t.#s||=new Set).add(g.pointerId),t.#i.isCancellable()&&(t.#i.removeLastElement(),t.#i.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal:m}),window.addEventListener("contextmenu",Vi,{signal:m}),o.addEventListener("pointermove",this._drawMove.bind(this),{signal:m}),o.addEventListener("touchmove",g=>{g.timeStamp===t.#c&&At(g)},{signal:m}),e.toggleDrawing(),n._editorUndoBar?.hide(),t.#i){e.drawLayer.updateProperties(this._currentDrawId,t.#i.startNew(a,s,d,h,u));return}n.updateUIForDefaultProperties(this),t.#i=this.createDrawerInstance(a,s,d,h,u),t.#a=this.getDefaultDrawingOptions(),this._currentParent=e,{id:this._currentDrawId}=e.drawLayer.draw(this._mergeSVGProperties(t.#a.toSVGProperties(),t.#i.defaultSVGProperties),!0,!1)}static _drawMove(e){if(t.#c=-1,!t.#i)return;let{offsetX:n,offsetY:r,pointerId:i}=e;if(t.#r===i){if(t.#s?.size>=1){this._endDraw(e);return}this._currentParent.drawLayer.updateProperties(this._currentDrawId,t.#i.add(n,r)),t.#c=e.timeStamp,At(e)}}static _cleanup(e){e&&(this._currentDrawId=-1,this._currentParent=null,t.#i=null,t.#a=null,t.#o=null,t.#c=NaN),t.#n&&(t.#n.abort(),t.#n=null,t.#r=NaN,t.#s=null)}static _endDraw(e){let n=this._currentParent;if(n){if(n.toggleDrawing(!0),this._cleanup(!1),e?.target===n.div&&n.drawLayer.updateProperties(this._currentDrawId,t.#i.end(e.offsetX,e.offsetY)),this.supportMultipleDrawings){let r=t.#i,i=this._currentDrawId,o=r.getLastElement();n.addCommands({cmd:()=>{n.drawLayer.updateProperties(i,r.setLastElement(o))},undo:()=>{n.drawLayer.updateProperties(i,r.removeLastElement())},mustExec:!1,type:je.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(e){let n=this._currentParent;if(!n)return null;if(n.toggleDrawing(!0),n.cleanUndoStack(je.DRAW_STEP),!t.#i.isEmpty()){let{pageDimensions:[r,i],scale:o}=n,a=n.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:t.#i.getOutlines(r*o,i*o,o,this._INNER_MARGIN),drawingOptions:t.#a,mustBeCommitted:!e});return this._cleanup(!0),a}return n.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(e){}static deserializeDraw(e,n,r,i,o,a){rt("Not implemented")}static async deserialize(e,n,r){let{rawDims:{pageWidth:i,pageHeight:o,pageX:a,pageY:s}}=n.viewport,l=this.deserializeDraw(a,s,i,o,this._INNER_MARGIN,e),c=await super.deserialize(e,n,r);return c.createDrawingOptions(e),c.#l({drawOutlines:l}),c.#f(),c.onScaleChanging(),c.rotate(),c}serializeDraw(e){let[n,r]=this.pageTranslation,[i,o]=this.pageDimensions;return this.#e.serialize([n,r,i,o],e)}renderAnnotationElement(e){return e.updateEdited({rect:this.getPDFRect()}),null}static canCreateNewEmptyEditor(){return!1}},bC=class{#e=new Float64Array(6);#t;#i;#n;#a;#r;#o="";#s=0;#c=new Ks;#l;#h;constructor(e,n,r,i,o,a){this.#l=r,this.#h=i,this.#n=o,this.#a=a,[e,n]=this.#d(e,n);let s=this.#t=[NaN,NaN,NaN,NaN,e,n];this.#r=[e,n],this.#i=[{line:s,points:this.#r}],this.#e.set(s,0)}updateProperty(e,n){e==="stroke-width"&&(this.#a=n)}#d(e,n){return se._normalizePoint(e,n,this.#l,this.#h,this.#n)}isEmpty(){return!this.#i||this.#i.length===0}isCancellable(){return this.#r.length<=10}add(e,n){[e,n]=this.#d(e,n);let[r,i,o,a]=this.#e.subarray(2,6),s=e-o,l=n-a;return Math.hypot(this.#l*s,this.#h*l)<=2?null:(this.#r.push(e,n),isNaN(r)?(this.#e.set([o,a,e,n],2),this.#t.push(NaN,NaN,NaN,NaN,e,n),{path:{d:this.toSVGPath()}}):(isNaN(this.#e[0])&&this.#t.splice(6,6),this.#e.set([r,i,o,a,e,n],0),this.#t.push(...se.createBezierPoints(r,i,o,a,e,n)),{path:{d:this.toSVGPath()}}))}end(e,n){let r=this.add(e,n);return r||(this.#r.length===2?{path:{d:this.toSVGPath()}}:null)}startNew(e,n,r,i,o){this.#l=r,this.#h=i,this.#n=o,[e,n]=this.#d(e,n);let a=this.#t=[NaN,NaN,NaN,NaN,e,n];this.#r=[e,n];let s=this.#i.at(-1);return s&&(s.line=new Float32Array(s.line),s.points=new Float32Array(s.points)),this.#i.push({line:a,points:this.#r}),this.#e.set(a,0),this.#s=0,this.toSVGPath(),null}getLastElement(){return this.#i.at(-1)}setLastElement(e){return this.#i?(this.#i.push(e),this.#t=e.line,this.#r=e.points,this.#s=0,{path:{d:this.toSVGPath()}}):this.#c.setLastElement(e)}removeLastElement(){if(!this.#i)return this.#c.removeLastElement();this.#i.pop(),this.#o="";for(let e=0,n=this.#i.length;e<n;e++){let{line:r,points:i}=this.#i[e];this.#t=r,this.#r=i,this.#s=0,this.toSVGPath()}return{path:{d:this.#o}}}toSVGPath(){let e=se.svgRound(this.#t[4]),n=se.svgRound(this.#t[5]);if(this.#r.length===2)return this.#o=`${this.#o} M ${e} ${n} Z`,this.#o;if(this.#r.length<=6){let i=this.#o.lastIndexOf("M");this.#o=`${this.#o.slice(0,i)} M ${e} ${n}`,this.#s=6}if(this.#r.length===4){let i=se.svgRound(this.#t[10]),o=se.svgRound(this.#t[11]);return this.#o=`${this.#o} L ${i} ${o}`,this.#s=12,this.#o}let r=[];this.#s===0&&(r.push(`M ${e} ${n}`),this.#s=6);for(let i=this.#s,o=this.#t.length;i<o;i+=6){let[a,s,l,c,u,d]=this.#t.slice(i,i+6).map(se.svgRound);r.push(`C${a} ${s} ${l} ${c} ${u} ${d}`)}return this.#o+=r.join(" "),this.#s=this.#t.length,this.#o}getOutlines(e,n,r,i){let o=this.#i.at(-1);return o.line=new Float32Array(o.line),o.points=new Float32Array(o.points),this.#c.build(this.#i,e,n,r,this.#n,this.#a,i),this.#e=null,this.#t=null,this.#i=null,this.#o=null,this.#c}get defaultSVGProperties(){return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}},Ks=class extends se{#e;#t=0;#i;#n;#a;#r;#o;#s;#c;build(e,n,r,i,o,a,s){this.#a=n,this.#r=r,this.#o=i,this.#s=o,this.#c=a,this.#i=s??0,this.#n=e,this.#d()}get thickness(){return this.#c}setLastElement(e){return this.#n.push(e),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#n.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){let e=[];for(let{line:n}of this.#n){if(e.push(`M${se.svgRound(n[4])} ${se.svgRound(n[5])}`),n.length===6){e.push("Z");continue}if(n.length===12&&isNaN(n[6])){e.push(`L${se.svgRound(n[10])} ${se.svgRound(n[11])}`);continue}for(let r=6,i=n.length;r<i;r+=6){let[o,a,s,l,c,u]=n.subarray(r,r+6).map(se.svgRound);e.push(`C${o} ${a} ${s} ${l} ${c} ${u}`)}}return e.join("")}serialize([e,n,r,i],o){let a=[],s=[],[l,c,u,d]=this.#h(),h,f,m,g,y,v,b,S,_;switch(this.#s){case 0:_=se._rescale,h=e,f=n+i,m=r,g=-i,y=e+l*r,v=n+(1-c-d)*i,b=e+(l+u)*r,S=n+(1-c)*i;break;case 90:_=se._rescaleAndSwap,h=e,f=n,m=r,g=i,y=e+c*r,v=n+l*i,b=e+(c+d)*r,S=n+(l+u)*i;break;case 180:_=se._rescale,h=e+r,f=n,m=-r,g=i,y=e+(1-l-u)*r,v=n+c*i,b=e+(1-l)*r,S=n+(c+d)*i;break;case 270:_=se._rescaleAndSwap,h=e+r,f=n+i,m=-r,g=-i,y=e+(1-c-d)*r,v=n+(1-l-u)*i,b=e+(1-c)*r,S=n+(1-l)*i;break}for(let{line:T,points:x}of this.#n)a.push(_(T,h,f,m,g,o?new Array(T.length):null)),s.push(_(x,h,f,m,g,o?new Array(x.length):null));return{lines:a,points:s,rect:[y,v,b,S]}}static deserialize(e,n,r,i,o,{paths:{lines:a,points:s},rotation:l,thickness:c}){let u=[],d,h,f,m,g;switch(l){case 0:g=se._rescale,d=-e/r,h=n/i+1,f=1/r,m=-1/i;break;case 90:g=se._rescaleAndSwap,d=-n/i,h=-e/r,f=1/i,m=1/r;break;case 180:g=se._rescale,d=e/r+1,h=-n/i,f=-1/r,m=1/i;break;case 270:g=se._rescaleAndSwap,d=n/i+1,h=e/r+1,f=-1/i,m=-1/r;break}if(!a){a=[];for(let v of s){let b=v.length;if(b===2){a.push(new Float32Array([NaN,NaN,NaN,NaN,v[0],v[1]]));continue}if(b===4){a.push(new Float32Array([NaN,NaN,NaN,NaN,v[0],v[1],NaN,NaN,NaN,NaN,v[2],v[3]]));continue}let S=new Float32Array(3*(b-2));a.push(S);let[_,T,x,E]=v.subarray(0,4);S.set([NaN,NaN,NaN,NaN,_,T],0);for(let C=4;C<b;C+=2){let I=v[C],L=v[C+1];S.set(se.createBezierPoints(_,T,x,E,I,L),(C-2)*3),[_,T,x,E]=[x,E,I,L]}}}for(let v=0,b=a.length;v<b;v++)u.push({line:g(a[v].map(S=>S??NaN),d,h,f,m),points:g(s[v].map(S=>S??NaN),d,h,f,m)});let y=new this.prototype.constructor;return y.build(u,r,i,1,l,c,o),y}#l(e=this.#c){let n=this.#i+e/2*this.#o;return this.#s%180===0?[n/this.#a,n/this.#r]:[n/this.#r,n/this.#a]}#h(){let[e,n,r,i]=this.#e,[o,a]=this.#l(0);return[e+o,n+a,r-2*o,i-2*a]}#d(){let e=this.#e=new Float32Array([1/0,1/0,-1/0,-1/0]);for(let{line:i}of this.#n){if(i.length<=12){for(let s=4,l=i.length;s<l;s+=6)le.pointBoundingBox(i[s],i[s+1],e);continue}let o=i[4],a=i[5];for(let s=6,l=i.length;s<l;s+=6){let[c,u,d,h,f,m]=i.subarray(s,s+6);le.bezierBoundingBox(o,a,c,u,d,h,f,m,e),o=f,a=m}}let[n,r]=this.#l();e[0]=Pn(e[0]-n,0,1),e[1]=Pn(e[1]-r,0,1),e[2]=Pn(e[2]+n,0,1),e[3]=Pn(e[3]+r,0,1),e[2]-=e[0],e[3]-=e[1]}get box(){return this.#e}updateProperty(e,n){return e==="stroke-width"?this.#f(n):null}#f(e){let[n,r]=this.#l();this.#c=e;let[i,o]=this.#l(),[a,s]=[i-n,o-r],l=this.#e;return l[0]-=a,l[1]-=s,l[2]+=2*a,l[3]+=2*s,l}updateParentDimensions([e,n],r){let[i,o]=this.#l();this.#a=e,this.#r=n,this.#o=r;let[a,s]=this.#l(),l=a-i,c=s-o,u=this.#e;return u[0]-=l,u[1]-=c,u[2]+=2*l,u[3]+=2*c,u}updateRotation(e){return this.#t=e,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#e.map(se.svgRound).join(" ")}get defaultProperties(){let[e,n]=this.#e;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${se.svgRound(e)} ${se.svgRound(n)}`}}}get rotationTransform(){let[,,e,n]=this.#e,r=0,i=0,o=0,a=0,s=0,l=0;switch(this.#t){case 90:i=n/e,o=-e/n,s=e;break;case 180:r=-1,a=-1,s=e,l=n;break;case 270:i=-n/e,o=e/n,l=n;break;default:return""}return`matrix(${r} ${i} ${o} ${a} ${se.svgRound(s)} ${se.svgRound(l)})`}getPathResizingSVGProperties([e,n,r,i]){let[o,a]=this.#l(),[s,l,c,u]=this.#e;if(Math.abs(c-o)<=se.PRECISION||Math.abs(u-a)<=se.PRECISION){let g=e+r/2-(s+c/2),y=n+i/2-(l+u/2);return{path:{"transform-origin":`${se.svgRound(e)} ${se.svgRound(n)}`,transform:`${this.rotationTransform} translate(${g} ${y})`}}}let d=(r-2*o)/(c-2*o),h=(i-2*a)/(u-2*a),f=c/r,m=u/i;return{path:{"transform-origin":`${se.svgRound(s)} ${se.svgRound(l)}`,transform:`${this.rotationTransform} scale(${f} ${m}) translate(${se.svgRound(o)} ${se.svgRound(a)}) scale(${d} ${h}) translate(${se.svgRound(-o)} ${se.svgRound(-a)})`}}}getPathResizedSVGProperties([e,n,r,i]){let[o,a]=this.#l(),s=this.#e,[l,c,u,d]=s;if(s[0]=e,s[1]=n,s[2]=r,s[3]=i,Math.abs(u-o)<=se.PRECISION||Math.abs(d-a)<=se.PRECISION){let y=e+r/2-(l+u/2),v=n+i/2-(c+d/2);for(let{line:b,points:S}of this.#n)se._translate(b,y,v,b),se._translate(S,y,v,S);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${se.svgRound(e)} ${se.svgRound(n)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}let h=(r-2*o)/(u-2*o),f=(i-2*a)/(d-2*a),m=-h*(l+o)+e+o,g=-f*(c+a)+n+a;if(h!==1||f!==1||m!==0||g!==0)for(let{line:y,points:v}of this.#n)se._rescale(y,m,g,h,f,y),se._rescale(v,m,g,h,f,v);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${se.svgRound(e)} ${se.svgRound(n)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([e,n],r){let[i,o]=r,a=this.#e,s=e-a[0],l=n-a[1];if(this.#a===i&&this.#r===o)for(let{line:c,points:u}of this.#n)se._translate(c,s,l,c),se._translate(u,s,l,u);else{let c=this.#a/i,u=this.#r/o;this.#a=i,this.#r=o;for(let{line:d,points:h}of this.#n)se._rescale(d,s,l,c,u,d),se._rescale(h,s,l,c,u,h);a[2]*=c,a[3]*=u}return a[0]=e,a[1]=n,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${se.svgRound(e)} ${se.svgRound(n)}`}}}get defaultSVGProperties(){let e=this.#e;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${se.svgRound(e[0])} ${se.svgRound(e[1])}`,transform:this.rotationTransform||null},bbox:e}}},e_=class t extends WS{constructor(e){super(),this._viewParameters=e,super.updateProperties({fill:"none",stroke:at._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10})}updateSVGProperty(e,n){e==="stroke-width"&&(n??=this["stroke-width"],n*=this._viewParameters.realScale),super.updateSVGProperty(e,n)}clone(){let e=new t(this._viewParameters);return e.updateAll(this),e}},yC=class t extends QS{static _type="ink";static _editorType=ze.INK;static _defaultDrawingOptions=null;constructor(e){super({...e,name:"inkEditor"}),this._willKeepAspectRatio=!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(e,n){at.initialize(e,n),this._defaultDrawingOptions=new e_(n.viewParameters)}static getDefaultDrawingOptions(e){let n=this._defaultDrawingOptions.clone();return n.updateProperties(e),n}static get supportMultipleDrawings(){return!0}static get typesMap(){return Re(this,"typesMap",new Map([[je.INK_THICKNESS,"stroke-width"],[je.INK_COLOR,"stroke"],[je.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(e,n,r,i,o){return new bC(e,n,r,i,o,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(e,n,r,i,o,a){return Ks.deserialize(e,n,r,i,o,a)}static async deserialize(e,n,r){let i=null;if(e instanceof Df){let{data:{inkLists:a,rect:s,rotation:l,id:c,color:u,opacity:d,borderStyle:{rawWidth:h},popupRef:f,richText:m,contentsObj:g,creationDate:y,modificationDate:v},parent:{page:{pageNumber:b}}}=e;i=e={annotationType:ze.INK,color:Array.from(u),thickness:h,opacity:d,paths:{points:a},boxes:null,pageIndex:b-1,rect:s.slice(0),rotation:l,annotationElementId:c,id:c,deleted:!1,popupRef:f,richText:m,comment:g?.str||null,creationDate:y,modificationDate:v}}let o=await super.deserialize(e,n,r);return o._initialData=i,e.comment&&o.setCommentData(e),o}get toolbarButtons(){return this._colorPicker||=new qS(this),[["colorPicker",this._colorPicker]]}get colorType(){return je.INK_COLOR}get color(){return this._drawingOptions.stroke}get opacity(){return this._drawingOptions["stroke-opacity"]}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();let{_drawId:e,_drawingOptions:n,parent:r}=this;n.updateSVGProperty("stroke-width"),r.drawLayer.updateProperties(e,n.toSVGProperties())}static onScaleChangingWhenDrawing(){let e=this._currentParent;e&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),e.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color:e,thickness:n,opacity:r}){this._drawingOptions=t.getDefaultDrawingOptions({stroke:le.makeHexColor(...e),"stroke-width":n,"stroke-opacity":r})}serialize(e=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let{lines:n,points:r}=this.serializeDraw(e),{_drawingOptions:{stroke:i,"stroke-opacity":o,"stroke-width":a}}=this,s=Object.assign(super.serialize(e),{color:at._colorManager.convert(i),opacity:o,thickness:a,paths:{lines:n,points:r}});return this.addComment(s),e?(s.isCopy=!0,s):this.annotationElementId&&!this.#e(s)?null:(s.id=this.annotationElementId,s)}#e(e){let{color:n,thickness:r,opacity:i,pageIndex:o}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||e.color.some((a,s)=>a!==n[s])||e.thickness!==r||e.opacity!==i||e.pageIndex!==o}renderAnnotationElement(e){if(this.deleted)return e.hide(),null;let{points:n,rect:r}=this.serializeDraw(!1);return e.updateEdited({rect:r,thickness:this._drawingOptions["stroke-width"],points:n,popup:this.comment}),null}},Uf=class extends Ks{toSVGPath(){let e=super.toSVGPath();return e.endsWith("Z")||(e+="Z"),e}},mS=8,xf=3,Ra=class{static#e={maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16};static#t(e,n,r,i){return r-=e,i-=n,r===0?i>0?0:4:r===1?i+6:2-i}static#i=new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]);static#n(e,n,r,i,o,a,s){let l=this.#t(r,i,o,a);for(let c=0;c<8;c++){let u=(-c+l-s+16)%8,d=this.#i[2*u],h=this.#i[2*u+1];if(e[(r+d)*n+(i+h)]!==0)return u}return-1}static#a(e,n,r,i,o,a,s){let l=this.#t(r,i,o,a);for(let c=0;c<8;c++){let u=(c+l+s+16)%8,d=this.#i[2*u],h=this.#i[2*u+1];if(e[(r+d)*n+(i+h)]!==0)return u}return-1}static#r(e,n,r,i){let o=e.length,a=new Int32Array(o);for(let u=0;u<o;u++)a[u]=e[u]<=i?1:0;for(let u=1;u<r-1;u++)a[u*n]=a[u*n+n-1]=0;for(let u=0;u<n;u++)a[u]=a[n*r-1-u]=0;let s=1,l,c=[];for(let u=1;u<r-1;u++){l=1;for(let d=1;d<n-1;d++){let h=u*n+d,f=a[h];if(f===0)continue;let m=u,g=d;if(f===1&&a[h-1]===0)s+=1,g-=1;else if(f>=1&&a[h+1]===0)s+=1,g+=1,f>1&&(l=f);else{f!==1&&(l=Math.abs(f));continue}let y=[d,u],v=g===d+1,b={isHole:v,points:y,id:s,parent:0};c.push(b);let S;for(let G of c)if(G.id===l){S=G;break}S?S.isHole?b.parent=v?S.parent:l:b.parent=v?l:S.parent:b.parent=v?l:0;let _=this.#n(a,n,u,d,m,g,0);if(_===-1){a[h]=-s,a[h]!==1&&(l=Math.abs(a[h]));continue}let T=this.#i[2*_],x=this.#i[2*_+1],E=u+T,C=d+x;m=E,g=C;let I=u,L=d;for(;;){let G=this.#a(a,n,I,L,m,g,1);T=this.#i[2*G],x=this.#i[2*G+1];let ge=I+T,de=L+x;y.push(de,ge);let pe=I*n+L;if(a[pe+1]===0?a[pe]=-s:a[pe]===1&&(a[pe]=s),ge===u&&de===d&&I===E&&L===C){a[h]!==1&&(l=Math.abs(a[h]));break}else m=I,g=L,I=ge,L=de}}}return c}static#o(e,n,r,i){if(r-n<=4){for(let E=n;E<r-2;E+=2)i.push(e[E],e[E+1]);return}let o=e[n],a=e[n+1],s=e[r-4]-o,l=e[r-3]-a,c=Math.hypot(s,l),u=s/c,d=l/c,h=u*a-d*o,f=l/s,m=1/c,g=Math.atan(f),y=Math.cos(g),v=Math.sin(g),b=m*(Math.abs(y)+Math.abs(v)),S=m*(1-b+b**2),_=Math.max(Math.atan(Math.abs(v+y)*S),Math.atan(Math.abs(v-y)*S)),T=0,x=n;for(let E=n+2;E<r-2;E+=2){let C=Math.abs(h-u*e[E+1]+d*e[E]);C>T&&(x=E,T=C)}T>(c*_)**2?(this.#o(e,n,x+2,i),this.#o(e,x,r,i)):i.push(o,a)}static#s(e){let n=[],r=e.length;return this.#o(e,0,r,n),n.push(e[r-2],e[r-1]),n.length<=4?null:n}static#c(e,n,r,i,o,a){let s=new Float32Array(a**2),l=-2*i**2,c=a>>1;for(let g=0;g<a;g++){let y=(g-c)**2;for(let v=0;v<a;v++)s[g*a+v]=Math.exp((y+(v-c)**2)/l)}let u=new Float32Array(256),d=-2*o**2;for(let g=0;g<256;g++)u[g]=Math.exp(g**2/d);let h=e.length,f=new Uint8Array(h),m=new Uint32Array(256);for(let g=0;g<r;g++)for(let y=0;y<n;y++){let v=g*n+y,b=e[v],S=0,_=0;for(let x=0;x<a;x++){let E=g+x-c;if(!(E<0||E>=r))for(let C=0;C<a;C++){let I=y+C-c;if(I<0||I>=n)continue;let L=e[E*n+I],G=s[x*a+C]*u[Math.abs(L-b)];S+=L*G,_+=G}}let T=f[v]=Math.round(S/_);m[T]++}return[f,m]}static#l(e){let n=new Uint32Array(256);for(let r of e)n[r]++;return n}static#h(e){let n=e.length,r=new Uint8ClampedArray(n>>2),i=-1/0,o=1/0;for(let s=0,l=r.length;s<l;s++){let c=r[s]=e[s<<2];i=Math.max(i,c),o=Math.min(o,c)}let a=255/(i-o);for(let s=0,l=r.length;s<l;s++)r[s]=(r[s]-o)*a;return r}static#d(e){let n,r=-1/0,i=-1/0,o=e.findIndex(l=>l!==0),a=o,s=o;for(n=o;n<256;n++){let l=e[n];l>r&&(n-a>i&&(i=n-a,s=n-1),r=l,a=n)}for(n=s-1;n>=0&&!(e[n]>e[n+1]);n--);return n}static#f(e){let n=e,{width:r,height:i}=e,{maxDim:o}=this.#e,a=r,s=i;if(r>o||i>o){let h=r,f=i,m=Math.log2(Math.max(r,i)/o),g=Math.floor(m);m=m===g?g-1:g;for(let v=0;v<m;v++){a=Math.ceil(h/2),s=Math.ceil(f/2);let b=new OffscreenCanvas(a,s);b.getContext("2d").drawImage(e,0,0,h,f,0,0,a,s),h=a,f=s,e!==n&&e.close(),e=b.transferToImageBitmap()}let y=Math.min(o/a,o/s);a=Math.round(a*y),s=Math.round(s*y)}let c=new OffscreenCanvas(a,s).getContext("2d",{willReadFrequently:!0});c.fillStyle="white",c.fillRect(0,0,a,s),c.filter="grayscale(1)",c.drawImage(e,0,0,e.width,e.height,0,0,a,s);let u=c.getImageData(0,0,a,s).data;return[this.#h(u),a,s]}static extractContoursFromText(e,{fontFamily:n,fontStyle:r,fontWeight:i},o,a,s,l){let c=new OffscreenCanvas(1,1),u=c.getContext("2d",{alpha:!1}),d=200,h=u.font=`${r} ${i} ${d}px ${n}`,{actualBoundingBoxLeft:f,actualBoundingBoxRight:m,actualBoundingBoxAscent:g,actualBoundingBoxDescent:y,fontBoundingBoxAscent:v,fontBoundingBoxDescent:b,width:S}=u.measureText(e),_=1.5,T=Math.ceil(Math.max(Math.abs(f)+Math.abs(m)||0,S)*_),x=Math.ceil(Math.max(Math.abs(g)+Math.abs(y)||d,Math.abs(v)+Math.abs(b)||d)*_);c=new OffscreenCanvas(T,x),u=c.getContext("2d",{alpha:!0,willReadFrequently:!0}),u.font=h,u.filter="grayscale(1)",u.fillStyle="white",u.fillRect(0,0,T,x),u.fillStyle="black",u.fillText(e,T*(_-1)/2,x*(3-_)/2);let E=this.#h(u.getImageData(0,0,T,x).data),C=this.#l(E),I=this.#d(C),L=this.#r(E,T,x,I);return this.processDrawnLines({lines:{curves:L,width:T,height:x},pageWidth:o,pageHeight:a,rotation:s,innerMargin:l,mustSmooth:!0,areContours:!0})}static process(e,n,r,i,o){let[a,s,l]=this.#f(e),[c,u]=this.#c(a,s,l,Math.hypot(s,l)*this.#e.sigmaSFactor,this.#e.sigmaR,this.#e.kernelSize),d=this.#d(u),h=this.#r(c,s,l,d);return this.processDrawnLines({lines:{curves:h,width:s,height:l},pageWidth:n,pageHeight:r,rotation:i,innerMargin:o,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines:e,pageWidth:n,pageHeight:r,rotation:i,innerMargin:o,mustSmooth:a,areContours:s}){i%180!==0&&([n,r]=[r,n]);let{curves:l,width:c,height:u}=e,d=e.thickness??0,h=[],f=Math.min(n/c,r/u),m=f/n,g=f/r,y=[];for(let{points:b}of l){let S=a?this.#s(b):b;if(!S)continue;y.push(S);let _=S.length,T=new Float32Array(_),x=new Float32Array(3*(_===2?2:_-2));if(h.push({line:x,points:T}),_===2){T[0]=S[0]*m,T[1]=S[1]*g,x.set([NaN,NaN,NaN,NaN,T[0],T[1]],0);continue}let[E,C,I,L]=S;E*=m,C*=g,I*=m,L*=g,T.set([E,C,I,L],0),x.set([NaN,NaN,NaN,NaN,E,C],0);for(let G=4;G<_;G+=2){let ge=T[G]=S[G]*m,de=T[G+1]=S[G+1]*g;x.set(se.createBezierPoints(E,C,I,L,ge,de),(G-2)*3),[E,C,I,L]=[I,L,ge,de]}}if(h.length===0)return null;let v=s?new Uf:new Ks;return v.build(h,n,r,1,i,s?0:d,o),{outline:v,newCurves:y,areContours:s,thickness:d,width:c,height:u}}static async compressSignature({outlines:e,areContours:n,thickness:r,width:i,height:o}){let a=1/0,s=-1/0,l=0;for(let S of e){l+=S.length;for(let _=2,T=S.length;_<T;_++){let x=S[_]-S[_-2];a=Math.min(a,x),s=Math.max(s,x)}}let c;a>=-128&&s<=127?c=Int8Array:a>=-32768&&s<=32767?c=Int16Array:c=Int32Array;let u=e.length,d=mS+xf*u,h=new Uint32Array(d),f=0;h[f++]=d*Uint32Array.BYTES_PER_ELEMENT+(l-2*u)*c.BYTES_PER_ELEMENT,h[f++]=0,h[f++]=i,h[f++]=o,h[f++]=n?0:1,h[f++]=Math.max(0,Math.floor(r??0)),h[f++]=u,h[f++]=c.BYTES_PER_ELEMENT;for(let S of e)h[f++]=S.length-2,h[f++]=S[0],h[f++]=S[1];let m=new CompressionStream("deflate-raw"),g=m.writable.getWriter();await g.ready,g.write(h);let y=c.prototype.constructor;for(let S of e){let _=new y(S.length-2);for(let T=2,x=S.length;T<x;T++)_[T-2]=S[T]-S[T-2];g.write(_)}g.close();let v=await new Response(m.readable).arrayBuffer(),b=new Uint8Array(v);return X6(b)}static async decompressSignature(e){try{let n=YK(e),{readable:r,writable:i}=new DecompressionStream("deflate-raw"),o=i.getWriter();await o.ready,o.write(n).then(async()=>{await o.ready,await o.close()}).catch(()=>{});let a=null,s=0;for await(let S of r)a||=new Uint8Array(new Uint32Array(S.buffer,0,4)[0]),a.set(S,s),s+=S.length;let l=new Uint32Array(a.buffer,0,a.length>>2),c=l[1];if(c!==0)throw new Error(`Invalid version: ${c}`);let u=l[2],d=l[3],h=l[4]===0,f=l[5],m=l[6],g=l[7],y=[],v=(mS+xf*m)*Uint32Array.BYTES_PER_ELEMENT,b;switch(g){case Int8Array.BYTES_PER_ELEMENT:b=new Int8Array(a.buffer,v);break;case Int16Array.BYTES_PER_ELEMENT:b=new Int16Array(a.buffer,v);break;case Int32Array.BYTES_PER_ELEMENT:b=new Int32Array(a.buffer,v);break}s=0;for(let S=0;S<m;S++){let _=l[xf*S+mS],T=new Float32Array(_+2);y.push(T);for(let x=0;x<xf-1;x++)T[x]=l[xf*S+mS+x+1];for(let x=0;x<_;x++)T[x+2]=T[x]+b[s++]}return{areContours:h,thickness:f,outlines:y,width:u,height:d}}catch(n){return we(`decompressSignature: ${n}`),null}}},SC=class t extends WS{constructor(){super(),super.updateProperties({fill:at._defaultLineColor,"stroke-width":0})}clone(){let e=new t;return e.updateAll(this),e}},_C=class t extends e_{constructor(e){super(e),super.updateProperties({stroke:at._defaultLineColor,"stroke-width":1})}clone(){let e=new t(this._viewParameters);return e.updateAll(this),e}},wC=class t extends QS{#e=!1;#t=null;#i=null;#n=null;static _type="signature";static _editorType=ze.SIGNATURE;static _defaultDrawingOptions=null;constructor(e){super({...e,mustBeCommitted:!0,name:"signatureEditor"}),this._willKeepAspectRatio=!0,this.#i=e.signatureData||null,this.#t=null,this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(e,n){at.initialize(e,n),this._defaultDrawingOptions=new SC,this._defaultDrawnSignatureOptions=new _C(n.viewParameters)}static getDefaultDrawingOptions(e){let n=this._defaultDrawingOptions.clone();return n.updateProperties(e),n}static get supportMultipleDrawings(){return!1}static get typesMap(){return Re(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signature",hasDescription:!!this.#t}}static computeTelemetryFinalData(e){let n=e.get("hasDescription");return{hasAltText:n.get(!0)??0,hasNoAltText:n.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let e,n,{_isCopy:r}=this;if(r&&(this._isCopy=!1,e=this.x,n=this.y),super.render(),this._drawId===null)if(this.#i){let{lines:i,mustSmooth:o,areContours:a,description:s,uuid:l,heightInPage:c}=this.#i,{rawDims:{pageWidth:u,pageHeight:d},rotation:h}=this.parent.viewport,f=Ra.processDrawnLines({lines:i,pageWidth:u,pageHeight:d,rotation:h,innerMargin:t._INNER_MARGIN,mustSmooth:o,areContours:a});this.addSignature(f,c,s,l)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:this.#t||""}));return r&&(this._isCopy=!0,this._moveAfterPaste(e,n)),this.div}setUuid(e){this.#n=e,this.addEditToolbar()}getUuid(){return this.#n}get description(){return this.#t}set description(e){this.#t=e,this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:e})),super.addEditToolbar().then(n=>{n?.updateEditSignatureButton(e)}))}getSignaturePreview(){let{newCurves:e,areContours:n,thickness:r,width:i,height:o}=this.#i,a=Math.max(i,o),s=Ra.processDrawnLines({lines:{curves:e.map(l=>({points:l})),thickness:r,width:i,height:o},pageWidth:a,pageHeight:a,rotation:0,innerMargin:0,mustSmooth:!1,areContours:n});return{areContours:n,outline:s.outline}}get toolbarButtons(){return this._uiManager.signatureManager?[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(e,n,r,i){let{x:o,y:a}=this,{outline:s}=this.#i=e;this.#e=s instanceof Uf,this.description=r;let l;this.#e?l=t.getDefaultDrawingOptions():(l=t._defaultDrawnSignatureOptions.clone(),l.updateProperties({"stroke-width":s.thickness})),this._addOutlines({drawOutlines:s,drawingOptions:l});let[,c]=this.pageDimensions,u=n/c;u=u>=1?.5:u,this.width*=u/this.height,this.width>=1&&(u*=.9/this.width,this.width=.9),this.height=u,this.setDims(),this.x=o,this.y=a,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.addToAnnotationStorage(this),this.setUuid(i),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!i,hasDescription:!!r}}),this.div.hidden=!1}getFromImage(e){let{rawDims:{pageWidth:n,pageHeight:r},rotation:i}=this.parent.viewport;return Ra.process(e,n,r,i,t._INNER_MARGIN)}getFromText(e,n){let{rawDims:{pageWidth:r,pageHeight:i},rotation:o}=this.parent.viewport;return Ra.extractContoursFromText(e,n,r,i,o,t._INNER_MARGIN)}getDrawnSignature(e){let{rawDims:{pageWidth:n,pageHeight:r},rotation:i}=this.parent.viewport;return Ra.processDrawnLines({lines:e,pageWidth:n,pageHeight:r,rotation:i,innerMargin:t._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours:e,thickness:n}){e?this._drawingOptions=t.getDefaultDrawingOptions():(this._drawingOptions=t._defaultDrawnSignatureOptions.clone(),this._drawingOptions.updateProperties({"stroke-width":n}))}serialize(e=!1){if(this.isEmpty())return null;let{lines:n,points:r}=this.serializeDraw(e),{_drawingOptions:{"stroke-width":i}}=this,o=Object.assign(super.serialize(e),{isSignature:!0,areContours:this.#e,color:[0,0,0],thickness:this.#e?0:i});return this.addComment(o),e?(o.paths={lines:n,points:r},o.uuid=this.#n,o.isCopy=!0):o.lines=n,this.#t&&(o.accessibilityData={type:"Figure",alt:this.#t}),o}static deserializeDraw(e,n,r,i,o,a){return a.areContours?Uf.deserialize(e,n,r,i,o,a):Ks.deserialize(e,n,r,i,o,a)}static async deserialize(e,n,r){let i=await super.deserialize(e,n,r);return i.#e=e.areContours,i.description=e.accessibilityData?.alt||"",i.#n=e.uuid,i}},xC=class extends at{#e=null;#t=null;#i=null;#n=null;#a=null;#r="";#o=null;#s=!1;#c=null;#l=!1;#h=!1;static _type="stamp";static _editorType=ze.STAMP;constructor(e){super({...e,name:"stampEditor"}),this.#n=e.bitmapUrl,this.#a=e.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(e,n){at.initialize(e,n)}static isHandlingMimeForPasting(e){return Yk.includes(e)}static paste(e,n){n.pasteEditor({mode:ze.STAMP},{bitmapFile:e.getAsFile()})}altTextFinish(){this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(e){let n=e.get("hasAltText");return{hasAltText:n.get(!0)??0,hasNoAltText:n.get(!1)??0}}#d(e,n=!1){if(!e){this.remove();return}this.#e=e.bitmap,n||(this.#t=e.id,this.#l=e.isSvg),e.file&&(this.#r=e.file.name),this.#p()}#f(){if(this.#i=null,this._uiManager.enableWaiting(!1),!!this.#o){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#e){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#e){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(e=null,n=!0){if(this.hasAltTextData())return null;let{mlManager:r}=this._uiManager;if(!r)throw new Error("No ML.");if(!await r.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");let{data:i,width:o,height:a}=e||this.copyCanvas(null,null,!0).imageData,s=await r.guess({name:"altText",request:{data:i,width:o,height:a,channels:i.length/(o*a)}});if(!s)throw new Error("No response from the AI service.");if(s.error)throw new Error("Error from the AI service.");if(s.cancel)return null;if(!s.output)throw new Error("No valid response from the AI service.");let l=s.output;return await this.setGuessedAltText(l),n&&!this.hasAltTextData()&&(this.altTextData={alt:l,decorative:!1}),l}#g(){if(this.#t){this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#t).then(r=>this.#d(r,!0)).finally(()=>this.#f());return}if(this.#n){let r=this.#n;this.#n=null,this._uiManager.enableWaiting(!0),this.#i=this._uiManager.imageManager.getFromUrl(r).then(i=>this.#d(i)).finally(()=>this.#f());return}if(this.#a){let r=this.#a;this.#a=null,this._uiManager.enableWaiting(!0),this.#i=this._uiManager.imageManager.getFromFile(r).then(i=>this.#d(i)).finally(()=>this.#f());return}let e=document.createElement("input");e.type="file",e.accept=Yk.join(",");let n=this._uiManager._signal;this.#i=new Promise(r=>{e.addEventListener("change",async()=>{if(!e.files||e.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);let i=await this._uiManager.imageManager.getFromFile(e.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#d(i)}r()},{signal:n}),e.addEventListener("cancel",()=>{this.remove(),r()},{signal:n})}).finally(()=>this.#f()),e.click()}remove(){this.#t&&(this.#e=null,this._uiManager.imageManager.deleteId(this.#t),this.#o?.remove(),this.#o=null,this.#c&&(clearTimeout(this.#c),this.#c=null)),super.remove()}rebuild(){if(!this.parent){this.#t&&this.#g();return}super.rebuild(),this.div!==null&&(this.#t&&this.#o===null&&this.#g(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(e){this._isDraggable=!0,e&&this.div.focus()}isEmpty(){return!(this.#i||this.#e||this.#n||this.#a||this.#t||this.#s)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){return!0}render(){if(this.div)return this.div;let e,n;return this._isCopy&&(e=this.x,n=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#s||(this.#e?this.#p():this.#g()),this._isCopy&&this._moveAfterPaste(e,n),this._uiManager.addShouldRescale(this),this.div}setCanvas(e,n){let{id:r,bitmap:i}=this._uiManager.imageManager.getFromCanvas(e,n);n.remove(),r&&this._uiManager.imageManager.isValidId(r)&&(this.#t=r,i&&(this.#e=i),this.#s=!1,this.#p())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;this.#c!==null&&clearTimeout(this.#c);let e=200;this.#c=setTimeout(()=>{this.#c=null,this.#m()},e)}#p(){let{div:e}=this,{width:n,height:r}=this.#e,[i,o]=this.pageDimensions,a=.75;if(this.width)n=this.width*i,r=this.height*o;else if(n>a*i||r>a*o){let l=Math.min(a*i/n,a*o/r);n*=l,r*=l}this._uiManager.enableWaiting(!1);let s=this.#o=document.createElement("canvas");s.setAttribute("role","img"),this.addContainer(s),this.width=n/i,this.height=r/o,this.setDims(),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(e.hidden=!1),this.#m(),this.#h||(this.parent.addUndoableEditor(this),this.#h=!0),this._reportTelemetry({action:"inserted_image"}),this.#r&&this.div.setAttribute("aria-description",this.#r),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(e,n,r=!1){e||(e=224);let{width:i,height:o}=this.#e,a=new xo,s=this.#e,l=i,c=o,u=null;if(n){if(i>n||o>n){let x=Math.min(n/i,n/o);l=Math.floor(i*x),c=Math.floor(o*x)}u=document.createElement("canvas");let h=u.width=Math.ceil(l*a.sx),f=u.height=Math.ceil(c*a.sy);this.#l||(s=this.#u(h,f));let m=u.getContext("2d");m.filter=this._uiManager.hcmFilter;let g="white",y="#cfcfd8";this._uiManager.hcmFilter!=="none"?y="black":Jk.isDarkMode&&(g="#8f8f9d",y="#42414d");let v=15,b=v*a.sx,S=v*a.sy,_=new OffscreenCanvas(b*2,S*2),T=_.getContext("2d");T.fillStyle=g,T.fillRect(0,0,b*2,S*2),T.fillStyle=y,T.fillRect(0,0,b,S),T.fillRect(b,S,b,S),m.fillStyle=m.createPattern(_,"repeat"),m.fillRect(0,0,h,f),m.drawImage(s,0,0,s.width,s.height,0,0,h,f)}let d=null;if(r){let h,f;if(a.symmetric&&s.width<e&&s.height<e)h=s.width,f=s.height;else if(s=this.#e,i>e||o>e){let y=Math.min(e/i,e/o);h=Math.floor(i*y),f=Math.floor(o*y),this.#l||(s=this.#u(h,f))}let g=new OffscreenCanvas(h,f).getContext("2d",{willReadFrequently:!0});g.drawImage(s,0,0,s.width,s.height,0,0,h,f),d={width:h,height:f,data:g.getImageData(0,0,h,f).data}}return{canvas:u,width:l,height:c,imageData:d}}#u(e,n){let{width:r,height:i}=this.#e,o=r,a=i,s=this.#e;for(;o>2*e||a>2*n;){let l=o,c=a;o>2*e&&(o=o>=16384?Math.floor(o/2)-1:Math.ceil(o/2)),a>2*n&&(a=a>=16384?Math.floor(a/2)-1:Math.ceil(a/2));let u=new OffscreenCanvas(o,a);u.getContext("2d").drawImage(s,0,0,l,c,0,0,o,a),s=u.transferToImageBitmap()}return s}#m(){let[e,n]=this.parentDimensions,{width:r,height:i}=this,o=new xo,a=Math.ceil(r*e*o.sx),s=Math.ceil(i*n*o.sy),l=this.#o;if(!l||l.width===a&&l.height===s)return;l.width=a,l.height=s;let c=this.#l?this.#e:this.#u(a,s),u=l.getContext("2d");u.filter=this._uiManager.hcmFilter,u.drawImage(c,0,0,c.width,c.height,0,0,a,s)}#v(e){if(e){if(this.#l){let i=this._uiManager.imageManager.getSvgUrl(this.#t);if(i)return i}let n=document.createElement("canvas");return{width:n.width,height:n.height}=this.#e,n.getContext("2d").drawImage(this.#e,0,0),n.toDataURL()}if(this.#l){let[n,r]=this.pageDimensions,i=Math.round(this.width*n*Ca.PDF_TO_CSS_UNITS),o=Math.round(this.height*r*Ca.PDF_TO_CSS_UNITS),a=new OffscreenCanvas(i,o);return a.getContext("2d").drawImage(this.#e,0,0,this.#e.width,this.#e.height,0,0,i,o),a.transferToImageBitmap()}return structuredClone(this.#e)}static async deserialize(e,n,r){let i=null,o=!1;if(e instanceof KS){let{data:{rect:g,rotation:y,id:v,structParent:b,popupRef:S,richText:_,contentsObj:T,creationDate:x,modificationDate:E},container:C,parent:{page:{pageNumber:I}},canvas:L}=e,G,ge;L?(delete e.canvas,{id:G,bitmap:ge}=r.imageManager.getFromCanvas(C.id,L),L.remove()):(o=!0,e._hasNoCanvas=!0);let de=(await n._structTree.getAriaAttributes(`${AC}${v}`))?.get("aria-label")||"";i=e={annotationType:ze.STAMP,bitmapId:G,bitmap:ge,pageIndex:I-1,rect:g.slice(0),rotation:y,annotationElementId:v,id:v,deleted:!1,accessibilityData:{decorative:!1,altText:de},isSvg:!1,structParent:b,popupRef:S,richText:_,comment:T?.str||null,creationDate:x,modificationDate:E}}let a=await super.deserialize(e,n,r),{rect:s,bitmap:l,bitmapUrl:c,bitmapId:u,isSvg:d,accessibilityData:h}=e;o?(r.addMissingCanvas(e.id,a),a.#s=!0):u&&r.imageManager.isValidId(u)?(a.#t=u,l&&(a.#e=l)):a.#n=c,a.#l=d;let[f,m]=a.pageDimensions;return a.width=(s[2]-s[0])/f,a.height=(s[3]-s[1])/m,h&&(a.altTextData=h),a._initialData=i,e.comment&&a.setCommentData(e),a.#h=!!i,a}serialize(e=!1,n=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();let r=Object.assign(super.serialize(e),{bitmapId:this.#t,isSvg:this.#l});if(this.addComment(r),e)return r.bitmapUrl=this.#v(!0),r.accessibilityData=this.serializeAltText(!0),r.isCopy=!0,r;let{decorative:i,altText:o}=this.serializeAltText(!1);if(!i&&o&&(r.accessibilityData={type:"Figure",alt:o}),this.annotationElementId){let s=this.#y(r);return s.isSame?null:(s.isSameAltText?delete r.accessibilityData:r.accessibilityData.structParent=this._initialData.structParent??-1,r.id=this.annotationElementId,delete r.bitmapId,r)}if(n===null)return r;n.stamps||=new Map;let a=this.#l?(r.rect[2]-r.rect[0])*(r.rect[3]-r.rect[1]):null;if(!n.stamps.has(this.#t))n.stamps.set(this.#t,{area:a,serialized:r}),r.bitmap=this.#v(!1);else if(this.#l){let s=n.stamps.get(this.#t);a>s.area&&(s.area=a,s.serialized.bitmap.close(),s.serialized.bitmap=this.#v(!1))}return r}#y(e){let{pageIndex:n,accessibilityData:{altText:r}}=this._initialData,i=e.pageIndex===n,o=(e.accessibilityData?.alt||"")===r;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&i&&o,isSameAltText:o}}renderAnnotationElement(e){return this.deleted?(e.hide(),null):(e.updateEdited({rect:this.getPDFRect(),popup:this.comment}),null)}},zC=class t{#e;#t=!1;#i=null;#n=null;#a=null;#r=new Map;#o=!1;#s=!1;#c=!1;#l=null;#h=null;#d=null;#f=null;#g=null;#p=-1;#u;static _initialized=!1;static#m=new Map([mC,yC,xC,XS,wC].map(e=>[e._editorType,e]));constructor({uiManager:e,pageIndex:n,div:r,structTreeLayer:i,accessibilityManager:o,annotationLayer:a,drawLayer:s,textLayer:l,viewport:c,l10n:u}){let d=[...t.#m.values()];if(!t._initialized){t._initialized=!0;for(let h of d)h.initialize(u,e)}e.registerEditorTypes(d),this.#u=e,this.pageIndex=n,this.div=r,this.#e=o,this.#i=a,this.viewport=c,this.#d=l,this.drawLayer=s,this._structTree=i,this.#u.addLayer(this)}get isEmpty(){return this.#r.size===0}get isInvisible(){return this.isEmpty&&this.#u.getMode()===ze.NONE}updateToolbar(e){this.#u.updateToolbar(e)}updateMode(e=this.#u.getMode()){switch(this.#S(),e){case ze.NONE:this.div.classList.toggle("nonEditing",!0),this.disableTextSelection(),this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case ze.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case ze.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);let{classList:n}=this.div;if(n.toggle("nonEditing",!1),e===ze.POPUP)n.toggle("commentEditing",!0);else{n.toggle("commentEditing",!1);for(let r of t.#m.values())n.toggle(`${r._type}Editing`,e===r._editorType)}this.div.hidden=!1}hasTextLayer(e){return e===this.#d?.div}setEditingState(e){this.#u.setEditingState(e)}addCommands(e){this.#u.addCommands(e)}cleanUndoStack(e){this.#u.cleanUndoStack(e)}toggleDrawing(e=!1){this.div.classList.toggle("drawing",!e)}togglePointerEvents(e=!1){this.div.classList.toggle("disabled",!e)}toggleAnnotationLayerPointerEvents(e=!1){this.#i?.div.classList.toggle("disabled",!e)}get#v(){return this.#r.size!==0?this.#r.values():this.#u.getEditors(this.pageIndex)}async enable(){this.#c=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.div.classList.toggle("nonEditing",!1),this.#g?.abort(),this.#g=null;let e=new Set;for(let r of this.#v)r.enableEditing(),r.show(!0),r.annotationElementId&&(this.#u.removeChangedExistingAnnotation(r),e.add(r.annotationElementId));let n=this.#i;if(n)for(let r of n.getEditableAnnotations()){if(r.hide(),this.#u.isDeletedAnnotationElement(r.data.id)||e.has(r.data.id))continue;let i=await this.deserialize(r);i&&(this.addOrRebuild(i),i.enableEditing())}this.#c=!1,this.#u._eventBus.dispatch("editorsrendered",{source:this,pageNumber:this.pageIndex+1})}disable(){if(this.#s=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.div.classList.toggle("nonEditing",!0),this.#d&&!this.#g){this.#g=new AbortController;let r=this.#u.combinedSignal(this.#g);this.#d.div.addEventListener("pointerdown",i=>{let{clientX:a,clientY:s,timeStamp:l}=i,c=this.#p;if(l-c>500){this.#p=l;return}this.#p=-1;let{classList:u}=this.div;u.toggle("getElements",!0);let d=document.elementsFromPoint(a,s);if(u.toggle("getElements",!1),!this.div.contains(d[0]))return;let h,f=new RegExp(`^${Af}[0-9]+$`);for(let g of d)if(f.test(g.id)){h=g.id;break}if(!h)return;let m=this.#r.get(h);m?.annotationElementId===null&&(i.stopPropagation(),i.preventDefault(),m.dblclick(i))},{signal:r,capture:!0})}let e=this.#i;if(e){let r=new Map,i=new Map;for(let a of this.#v){if(a.disableEditing(),!a.annotationElementId){a.updateFakeAnnotationElement(e);continue}if(a.serialize()!==null){r.set(a.annotationElementId,a);continue}else i.set(a.annotationElementId,a);this.getEditableAnnotation(a.annotationElementId)?.show(),a.remove()}let o=e.getEditableAnnotations();for(let a of o){let{id:s}=a.data;if(this.#u.isDeletedAnnotationElement(s)){a.updateEdited({deleted:!0});continue}let l=i.get(s);if(l){l.resetAnnotationElement(a),l.show(!1),a.show();continue}l=r.get(s),l&&(this.#u.addChangedExistingAnnotation(l),l.renderAnnotationElement(a)&&l.show(!1)),a.show()}}this.#S(),this.isEmpty&&(this.div.hidden=!0);let{classList:n}=this.div;for(let r of t.#m.values())n.remove(`${r._type}Editing`);this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#s=!1}getEditableAnnotation(e){return this.#i?.getEditableAnnotation(e)||null}setActiveEditor(e){this.#u.getActive()!==e&&this.#u.setActiveEditor(e)}enableTextSelection(){if(this.div.tabIndex=-1,this.#d?.div&&!this.#f){this.#f=new AbortController;let e=this.#u.combinedSignal(this.#f);this.#d.div.addEventListener("pointerdown",this.#y.bind(this),{signal:e}),this.#d.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#d?.div&&this.#f&&(this.#f.abort(),this.#f=null,this.#d.div.classList.remove("highlighting"))}#y(e){this.#u.unselectAll();let{target:n}=e;if(n===this.#d.div||(n.getAttribute("role")==="img"||n.classList.contains("endOfContent"))&&this.#d.div.contains(n)){let{isMac:r}=Vt.platform;if(e.button!==0||e.ctrlKey&&r)return;this.#u.showAllEditors("highlight",!0,!0),this.#d.div.classList.add("free"),this.toggleDrawing(),XS.startHighlighting(this,this.#u.direction==="ltr",{target:this.#d.div,x:e.x,y:e.y}),this.#d.div.addEventListener("pointerup",()=>{this.#d.div.classList.remove("free"),this.toggleDrawing(!0)},{once:!0,signal:this.#u._signal}),e.preventDefault()}}enableClick(){if(this.#n)return;this.#n=new AbortController;let e=this.#u.combinedSignal(this.#n);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal:e});let n=this.pointerup.bind(this);this.div.addEventListener("pointerup",n,{signal:e}),this.div.addEventListener("pointercancel",n,{signal:e})}disableClick(){this.#n?.abort(),this.#n=null}attach(e){this.#r.set(e.id,e);let{annotationElementId:n}=e;n&&this.#u.isDeletedAnnotationElement(n)&&this.#u.removeDeletedAnnotationElement(e)}detach(e){this.#r.delete(e.id),this.#e?.removePointerInTextLayer(e.contentDiv),!this.#s&&e.annotationElementId&&this.#u.addDeletedAnnotationElement(e)}remove(e){this.detach(e),this.#u.removeEditor(e),e.div.remove(),e.isAttachedToDOM=!1}changeParent(e){e.parent!==this&&(e.parent&&e.annotationElementId&&(this.#u.addDeletedAnnotationElement(e.annotationElementId),at.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}add(e){if(!(e.parent===this&&e.isAttachedToDOM)){if(this.changeParent(e),this.#u.addEditor(e),this.attach(e),!e.isAttachedToDOM){let n=e.render();this.div.append(n),e.isAttachedToDOM=!0}e.fixAndSetPosition(),e.onceAdded(!this.#c),this.#u.addToAnnotationStorage(e),e._reportTelemetry(e.telemetryInitialData)}}moveEditorInDOM(e){if(!e.isAttachedToDOM)return;let{activeElement:n}=document;e.div.contains(n)&&!this.#a&&(e._focusEventsAllowed=!1,this.#a=setTimeout(()=>{this.#a=null,e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0,signal:this.#u._signal}),n.focus())},0)),e._structTreeParentId=this.#e?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?(e.parent||=this,e.rebuild(),e.show()):this.add(e)}addUndoableEditor(e){let n=()=>e._uiManager.rebuild(e),r=()=>{e.remove()};this.addCommands({cmd:n,undo:r,mustExec:!1})}getEditorByUID(e){for(let n of this.#r.values())if(n.uid===e)return n;return null}getNextId(){return this.#u.getId()}get#b(){return t.#m.get(this.#u.getMode())}combinedSignal(e){return this.#u.combinedSignal(e)}#T(e){let n=this.#b;return n?new n.prototype.constructor(e):null}canCreateNewEmptyEditor(){return this.#b?.canCreateNewEmptyEditor()}async pasteEditor(e,n){this.updateToolbar(e),await this.#u.updateMode(e.mode);let{offsetX:r,offsetY:i}=this.#x(),o=this.getNextId(),a=this.#T({parent:this,id:o,x:r,y:i,uiManager:this.#u,isCentered:!0,...n});a&&this.add(a)}async deserialize(e){return await t.#m.get(e.annotationType??e.annotationEditorType)?.deserialize(e,this,this.#u)||null}createAndAddNewEditor(e,n,r={}){let i=this.getNextId(),o=this.#T({parent:this,id:i,x:e.offsetX,y:e.offsetY,uiManager:this.#u,isCentered:n,...r});return o&&this.add(o),o}get boundingClientRect(){return this.div.getBoundingClientRect()}#x(){let{x:e,y:n,width:r,height:i}=this.boundingClientRect,o=Math.max(0,e),a=Math.max(0,n),s=Math.min(window.innerWidth,e+r),l=Math.min(window.innerHeight,n+i),c=(o+s)/2-e,u=(a+l)/2-n,[d,h]=this.viewport.rotation%180===0?[c,u]:[u,c];return{offsetX:d,offsetY:h}}addNewEditor(e={}){this.createAndAddNewEditor(this.#x(),!0,e)}setSelected(e){this.#u.setSelected(e)}toggleSelected(e){this.#u.toggleSelected(e)}unselect(e){this.#u.unselect(e)}pointerup(e){let{isMac:n}=Vt.platform;if(e.button!==0||e.ctrlKey&&n||e.target!==this.div||!this.#o||(this.#o=!1,this.#b?.isDrawer&&this.#b.supportMultipleDrawings))return;if(!this.#t){this.#t=!0;return}let r=this.#u.getMode();if(r===ze.STAMP||r===ze.SIGNATURE){this.#u.unselectAll();return}this.createAndAddNewEditor(e,!1)}pointerdown(e){if(this.#u.getMode()===ze.HIGHLIGHT&&this.enableTextSelection(),this.#o){this.#o=!1;return}let{isMac:n}=Vt.platform;if(e.button!==0||e.ctrlKey&&n||e.target!==this.div)return;if(this.#o=!0,this.#b?.isDrawer){this.startDrawingSession(e);return}let r=this.#u.getActive();this.#t=!r||r.isEmpty()}startDrawingSession(e){if(this.div.focus({preventScroll:!0}),this.#l){this.#b.startDrawing(this,this.#u,!1,e);return}this.#u.setCurrentDrawingSession(this),this.#l=new AbortController;let n=this.#u.combinedSignal(this.#l);this.div.addEventListener("blur",({relatedTarget:r})=>{r&&!this.div.contains(r)&&(this.#h=null,this.commitOrRemove())},{signal:n}),this.#b.startDrawing(this,this.#u,!1,e)}pause(e){if(e){let{activeElement:n}=document;this.div.contains(n)&&(this.#h=n);return}this.#h&&setTimeout(()=>{this.#h?.focus(),this.#h=null},0)}endDrawingSession(e=!1){return this.#l?(this.#u.setCurrentDrawingSession(null),this.#l.abort(),this.#l=null,this.#h=null,this.#b.endDrawing(e)):null}findNewParent(e,n,r){let i=this.#u.findParent(n,r);return i===null||i===this?!1:(i.changeParent(e),!0)}commitOrRemove(){return this.#l?(this.endDrawingSession(),!0):!1}onScaleChanging(){this.#l&&this.#b.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#u.getActive()?.parent===this&&(this.#u.commitOrRemove(),this.#u.setActiveEditor(null)),this.#a&&(clearTimeout(this.#a),this.#a=null);for(let e of this.#r.values())this.#e?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#r.clear(),this.#u.removeLayer(this)}#S(){for(let e of this.#r.values())e.isEmpty()&&e.remove()}render({viewport:e}){this.viewport=e,Fs(this.div,e);for(let n of this.#u.getEditors(this.pageIndex))this.add(n),n.rebuild();this.updateMode()}update({viewport:e}){this.#u.commitOrRemove(),this.#S();let n=this.viewport.rotation,r=e.rotation;if(this.viewport=e,Fs(this.div,{rotation:r}),n!==r)for(let i of this.#r.values())i.rotate(r)}get pageDimensions(){let{pageWidth:e,pageHeight:n}=this.viewport.rawDims;return[e,n]}get scale(){return this.#u.viewParameters.realScale}},TC=class t{#e=null;#t=new Map;#i=new Map;static#n=0;constructor({pageIndex:e}){this.pageIndex=e}setParent(e){if(!this.#e){this.#e=e;return}if(this.#e!==e){if(this.#t.size>0)for(let n of this.#t.values())n.remove(),e.append(n);this.#e=e}}static get _svgFactory(){return Re(this,"_svgFactory",new au)}static#a(e,[n,r,i,o]){let{style:a}=e;a.top=`${100*r}%`,a.left=`${100*n}%`,a.width=`${100*i}%`,a.height=`${100*o}%`}#r(){let e=t._svgFactory.create(1,1,!0);return this.#e.append(e),e.setAttribute("aria-hidden",!0),e}#o(e,n){let r=t._svgFactory.createElement("clipPath");e.append(r);let i=`clip_${n}`;r.setAttribute("id",i),r.setAttribute("clipPathUnits","objectBoundingBox");let o=t._svgFactory.createElement("use");return r.append(o),o.setAttribute("href",`#${n}`),o.classList.add("clip"),i}#s(e,n){for(let[r,i]of Object.entries(n))i===null?e.removeAttribute(r):e.setAttribute(r,i)}draw(e,n=!1,r=!1){let i=t.#n++,o=this.#r(),a=t._svgFactory.createElement("defs");o.append(a);let s=t._svgFactory.createElement("path");a.append(s);let l=`path_p${this.pageIndex}_${i}`;s.setAttribute("id",l),s.setAttribute("vector-effect","non-scaling-stroke"),n&&this.#i.set(i,s);let c=r?this.#o(a,l):null,u=t._svgFactory.createElement("use");return o.append(u),u.setAttribute("href",`#${l}`),this.updateProperties(o,e),this.#t.set(i,o),{id:i,clipPathId:`url(#${c})`}}drawOutline(e,n){let r=t.#n++,i=this.#r(),o=t._svgFactory.createElement("defs");i.append(o);let a=t._svgFactory.createElement("path");o.append(a);let s=`path_p${this.pageIndex}_${r}`;a.setAttribute("id",s),a.setAttribute("vector-effect","non-scaling-stroke");let l;if(n){let d=t._svgFactory.createElement("mask");o.append(d),l=`mask_p${this.pageIndex}_${r}`,d.setAttribute("id",l),d.setAttribute("maskUnits","objectBoundingBox");let h=t._svgFactory.createElement("rect");d.append(h),h.setAttribute("width","1"),h.setAttribute("height","1"),h.setAttribute("fill","white");let f=t._svgFactory.createElement("use");d.append(f),f.setAttribute("href",`#${s}`),f.setAttribute("stroke","none"),f.setAttribute("fill","black"),f.setAttribute("fill-rule","nonzero"),f.classList.add("mask")}let c=t._svgFactory.createElement("use");i.append(c),c.setAttribute("href",`#${s}`),l&&c.setAttribute("mask",`url(#${l})`);let u=c.cloneNode();return i.append(u),c.classList.add("mainOutline"),u.classList.add("secondaryOutline"),this.updateProperties(i,e),this.#t.set(r,i),r}finalizeDraw(e,n){this.#i.delete(e),this.updateProperties(e,n)}updateProperties(e,n){if(!n)return;let{root:r,bbox:i,rootClass:o,path:a}=n,s=typeof e=="number"?this.#t.get(e):e;if(s){if(r&&this.#s(s,r),i&&t.#a(s,i),o){let{classList:l}=s;for(let[c,u]of Object.entries(o))l.toggle(c,u)}if(a){let c=s.firstChild.firstChild;this.#s(c,a)}}}updateParent(e,n){if(n===this)return;let r=this.#t.get(e);r&&(n.#e.append(r),this.#t.delete(e),n.#t.set(e,r))}remove(e){this.#i.delete(e),this.#e!==null&&(this.#t.get(e).remove(),this.#t.delete(e))}destroy(){this.#e=null;for(let e of this.#t.values())e.remove();this.#t.clear(),this.#i.clear()}};globalThis._pdfjsTestingUtils={HighlightOutliner:Lf};globalThis.pdfjsLib={AbortException:Lr,AnnotationEditorLayer:zC,AnnotationEditorParamsType:je,AnnotationEditorType:ze,AnnotationEditorUIManager:Hs,AnnotationLayer:pC,AnnotationMode:ka,AnnotationType:jt,applyOpacity:tY,build:wY,ColorPicker:US,createValidAbsoluteUrl:G6,CSSConstants:Xk,DOMSVGFactory:au,DrawLayer:TC,FeatureTest:Vt,fetchData:Ff,findContrastColor:nY,getDocument:kC,getFilenameFromUrl:JK,getPdfFilenameFromUrl:XK,getRGB:Bf,getUuid:J6,getXfaPageViewport:QK,GlobalWorkerOptions:qs,ImageKind:bS,InvalidPDFException:$f,isDataScheme:r_,isPdfFile:EC,isValidExplicitDest:aY,MathClamp:Pn,noContextMenu:Vi,normalizeUnicode:GK,OPS:Ef,OutputScale:xo,PasswordResponses:jK,PDFDataRangeTransport:jS,PDFDateString:If,PDFWorker:Zs,PermissionFlag:LK,PixelsPerInch:Ca,RenderingCancelledException:Cf,renderRichText:W6,ResponseException:ou,setLayerDimensions:Fs,shadow:Re,SignatureExtractor:Ra,stopEvent:At,SupportedImageMimeTypes:Yk,TextLayer:Vs,TouchManager:xS,updateUrlHash:K6,Util:le,VerbosityLevel:t_,version:_Y,XfaLayer:SS};var RC="\u2E81\u5382\u2E82\u4E5B\u2E83\u4E5A\u2E84\u4E59\u2E85\u4EBB\u2E86\u5182\u2E88\u5200\u2E89\u5202\u2E8A\u535C\u2E8B\u353E\u2E8C\u5C0F\u2E8D\u5C0F\u2E8E\u5140\u2E8F\u5C23\u2E90\u5C22\u2E92\u5DF3\u2E93\u5E7A\u2E94\u5F51\u2E96\u5FC4\u2E97\u5FC3\u2E98\u624C\u2E99\u6535\u2E9B\u65E1\u2E9C\u65E5\u2E9D\u6708\u2E9E\u6B7A\u2E9F\u6BCD\u2EA0\u6C11\u2EA1\u6C35\u2EA2\u6C3A\u2EA3\u706C\u2EA4\u722B\u2EA5\u722B\u2EA6\u4E2C\u2EA7\u725B\u2EA8\u72AD\u2EA9\u738B\u2EAB\u76EE\u2EAC\u793A\u2EAD\u793B\u2EAF\u7CF9\u2EB0\u7E9F\u2EB1\u7F53\u2EB2\u7F52\u2EB3\u34C1\u2EB4\u5197\u2EB6\u7F8A\u2EB9\u8002\u2EBA\u8080\u2EBB\u807F\u2EBC\u8089\u2EBE\u8279\u2EBF\u8279\u2EC0\u8279\u2EC1\u864E\u2EC2\u8864\u2EC3\u8980\u2EC4\u897F\u2EC5\u89C1\u2EC6\u89D2\u2EC8\u8BA0\u2EC9\u8D1D\u2ECB\u8F66\u2ECC\u8FB6\u2ECD\u8FB6\u2ECE\u8FB6\u2ECF\u9091\u2ED0\u9485\u2ED1\u9577\u2ED2\u9578\u2ED3\u957F\u2ED4\u95E8\u2ED6\u961D\u2ED7\u96E8\u2ED8\u9752\u2ED9\u97E6\u2EDA\u9875\u2EDB\u98CE\u2EDC\u98DE\u2EDD\u98DF\u2EDF\u98E0\u2EE0\u9963\u2EE2\u9A6C\u2EE3\u9AA8\u2EE4\u9B3C\u2EE5\u9C7C\u2EE6\u9E1F\u2EE7\u5364\u2EE8\u9EA6\u2EE9\u9EC4\u2EEA\u9EFE\u2EEB\u6589\u2EEC\u9F50\u2EED\u6B6F\u2EEE\u9F7F\u2EEF\u7ADC\u2EF0\u9F99\u2EF1\u9F9C\u2EF2\u4E80\u2EF3\u9F9F";var EY=/[⺀-⻿⼀-⿕]/g,CC=new Map;for(let t=0;t<RC.length;t+=2)CC.set(RC[t],RC[t+1]);for(let t=12032;t<=12245;t++){let e=String.fromCharCode(t);CC.set(e,e.normalize("NFKC"))}function aq(t){return t.replace(EY,e=>CC.get(e)??e)}function sq(t){if(!t)return null;try{let e=new URL(t,"https://invalid.invalid/");return e.hostname==="invalid.invalid"?null:e.protocol==="http:"||e.protocol==="https:"||e.protocol==="mailto:"?e.href:null}catch{return null}}function IC(t){let e=document.getSelection();if(!e||e.isCollapsed||!e.rangeCount)return null;let n=e.getRangeAt(0);if(!t.contains(n.commonAncestorContainer))return null;let r=e.toString().replace(/\s+/g," ").trim();return r?{text:r,range:n}:null}var a_=t=>t.replace(/\s+/g," ").trim().toLowerCase();function lq(t){let e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(let a=n.nextNode();a;a=n.nextNode())e.push(a);let r="",i=[],o=!0;for(let a of e){let s=a.data;for(let l=0;l<s.length;l++){let c=s[l];if(/\s/.test(c)){if(o)continue;r+=" ",o=!0}else r+=c.toLowerCase(),o=!1;i.push({node:a,offset:l})}o||(r+=" ",o=!0,i.push({node:a,offset:s.length}))}return{text:r,map:i}}function cq(t,e){let n=t.map[e[0]],r=t.map[Math.min(t.map.length-1,e[1])],i=document.createRange();return i.setStart(n.node,Math.min(n.node.data.length,n.offset)),i.setEnd(r.node,Math.min(r.node.data.length,r.offset+1)),i}function PC(t,e){let n=a_(e);if(!n)return null;let r=lq(t),i=r.text.indexOf(n),o=i>=0?[i,i+n.length-1]:$Y(r.text,n);return o?cq(r,o):null}function OC(t,e,n=1e3){let r=a_(e);if(!r)return[];let i=lq(t),o=[];for(let a=i.text.indexOf(r);a>=0&&o.length<n;a=i.text.indexOf(r,a+r.length))o.push(cq(i,[a,a+r.length-1]));return o}function uq(t,e){let n=a_(e);if(!n)return 0;let r=a_(t),i=0;for(let o=r.indexOf(n);o>=0;o=r.indexOf(n,o+n.length))i++;return i}function Vf(t){if(!t||t instanceof Element&&!t.isConnected||t instanceof Range&&!t.startContainer.isConnected)return null;let e=t.getBoundingClientRect();return e.width||e.height?e:null}function dq(t,e,n,r=2){if(!t||(t instanceof Element?!t.isConnected:!t.startContainer.isConnected))return!1;for(let i of t.getClientRects())if(e>=i.left-r&&e<=i.right+r&&n>=i.top-r&&n<=i.bottom+r)return!0;return!1}function $Y(t,e){let n=e.replace(/ /g,""),r=[],i="";for(let a=0;a<t.length;a++)t[a]!==" "&&(i+=t[a],r.push(a));let o=n?i.indexOf(n):-1;return o<0?null:[r[o],r[o+n.length-1]]}var kY=()=>globalThis.CSS?.highlights??null;function s_(t,e){let n=kY(),r=globalThis.Highlight;!n||!r||(e.length?n.set(t,new r(...e)):n.delete(t))}function hq(t,e="center"){let n=t.closest(".viewer-scroll");n&&fq(n,t.getBoundingClientRect(),e)}function l_(t,e="upper"){let n=t.startContainer.parentElement?.closest(".viewer-scroll");n&&fq(n,t.getBoundingClientRect(),e)}function fq(t,e,n){let r=t.getBoundingClientRect(),i=t.scrollTop+e.top-r.top;i-=n==="center"?Math.max(12,(r.height-e.height)/2):n==="upper"?Math.max(12,r.height*.3):12;let o=t.scrollLeft;(e.right>r.right||e.left<r.left)&&(o+=e.left-r.left-12),t.scrollTo({top:Math.max(0,i),left:Math.max(0,o),behavior:"smooth"})}function pq(t,e,n,r,i=0){let o=null,a=0,s=()=>{a=0;let u=t.getBoundingClientRect().top,d=u+t.clientHeight*i,h=null,f=1/0;for(let g of e()){let y=g.getBoundingClientRect();if(i&&y.top<=d&&y.bottom>=d){h=g;break}if(y.bottom<u+8)continue;let v=Math.abs(y.top-u);if(v<f&&(f=v,h=g),y.top>u+t.clientHeight)break}let m=h?n(h):null;m&&m!==o&&(o=m,r(m))},l=()=>{a||(a=requestAnimationFrame(s))};t.addEventListener("scroll",l,{passive:!0});let c=new ResizeObserver(l);return c.observe(t),l(),()=>{t.removeEventListener("scroll",l),c.disconnect(),a&&cancelAnimationFrame(a)}}function mq(t,e){let n=Math.min(1,e/t.width),r=document.createElement("canvas");return r.width=Math.max(1,Math.round(t.width*n)),r.height=Math.max(1,Math.round(t.height*n)),r.getContext("2d").drawImage(t,0,0,r.width,r.height),{data:r.toDataURL("image/png").split(",")[1],width:r.width,height:r.height}}var gq=[25,33,50,67,75,80,90,100,110,125,150,175,200,250,300,400];function vq(t,e){return e>0?gq.find(n=>n>t+.5)??400:[...gq].reverse().find(n=>n<t-.5)??25}var Sq=lt(Cn(),1),NC=class{constructor(e){this.options=e}async fetch({name:e}){return{cMapData:await gf(`${this.options.baseUrl}${e}.bcmap`),isCompressed:!0}}},u_=class{constructor(e){this.options=e}async fetch({filename:e}){return gf(`${this.options.baseUrl}${e}`)}},RY;function CY(){return RY??=Wy("pdf-worker.js").then(t=>{let e=URL.createObjectURL(new Blob([t],{type:"text/javascript"}));return Zs.create({port:new Worker(e,{type:"module"})})})}async function bq(t){let e=await t.getTextContent();return{...e,items:e.items.map(n=>"str"in n?{...n,str:aq(n.str)}:n)}}var su=16,c_=96/72,yq=(0,Be.forwardRef)(function(e,n){let r=(0,Be.useRef)(null),i=(0,Be.useRef)(null),o=(0,Be.useRef)([]),a=(0,Be.useRef)([]),[s,l]=(0,Be.useState)({mode:"width",percent:100}),[c,u]=(0,Be.useState)({width:0,height:0}),[d,h]=(0,Be.useState)(0),f=(0,Be.useRef)(e);f.current=e;let m=!!e.glance,g=(()=>{if(!d||!c.width||!a.current.length)return 0;let U=Math.max(...a.current.map(X=>X.width)),M=Math.max(...a.current.map(X=>X.height)),K=m&&c.width>=520?2:1,B=Math.min(4,(c.width-su*(K+1))/K/U);return s.mode==="width"||m?B:s.mode==="page"?Math.min(B,(c.height-su*2)/M):s.mode==="actual"?c_:s.percent/100*c_})(),y=(0,Be.useRef)(g),v=(0,Be.useRef)(0);y.current=g;let b=(0,Be.useRef)(null),S=(0,Be.useRef)(null),_=(0,Be.useRef)(0),T=(0,Be.useRef)([]),x=(0,Be.useRef)(new Map),E=(0,Be.useRef)(null),C=(0,Be.useRef)([]);(0,Be.useEffect)(()=>{let U=!1,M=null;return(async()=>{if(M=await kC({worker:await CY(),data:new Uint8Array(e.bytes.slice(0)),cMapUrl:"pdfjs/cmaps/",cMapPacked:!0,standardFontDataUrl:"pdfjs/standard_fonts/",wasmUrl:"pdfjs/wasm/",CMapReaderFactory:NC,StandardFontDataFactory:u_,WasmFactory:u_,useWorkerFetch:!1,isEvalSupported:!1,enableXfa:!1}).promise,U)return void M.destroy();i.current=M;let B=[],X=m?Math.min(4,M.numPages):M.numPages;for(let ne=1;ne<=X;ne++){let fe=(await M.getPage(ne)).getViewport({scale:1});B.push({width:fe.width,height:fe.height})}if(U)return;a.current=B;let J=r.current;J.replaceChildren(),o.current=B.map((ne,W)=>{let fe=document.createElement("div");return fe.className="pdf-page",fe.dataset.at=`page:${W+1}`,J.append(fe),{element:fe}}),u({width:J.clientWidth,height:J.clientHeight}),h(ne=>ne+1),f.current.onPage?.({current:1,count:M.numPages}),f.current.onReady()})().catch(K=>!U&&f.current.onError(K)),()=>{U=!0,S.current?.disconnect(),M?.destroy(),i.current=null,C.current=[]}},[e.bytes,m]),(0,Be.useEffect)(()=>{let U=r.current,M=new ResizeObserver(()=>u(K=>Math.abs(K.width-U.clientWidth)>1||Math.abs(K.height-U.clientHeight)>1?{width:U.clientWidth,height:U.clientHeight}:K));return M.observe(U),()=>M.disconnect()},[]),(0,Be.useEffect)(()=>{g&&f.current.onZoom?.({mode:s.mode,percent:Math.round(g/c_*100)})},[g,s.mode]),(0,Be.useLayoutEffect)(()=>{let U=i.current,M=r.current;if(!U||!g||!M)return;let K=v.current;v.current=g;let B=b.current??{x:M.clientWidth/2,y:M.clientHeight/2};b.current=null;let X={x:M.scrollLeft+B.x,y:M.scrollTop+B.y};S.current?.disconnect(),_.current++;for(let[J,ne]of o.current.entries())ne.task?.cancel(),ne.done=void 0,ne.textLayer=void 0,ne.element.replaceChildren(),ne.element.style.width=`${a.current[J].width*g}px`,ne.element.style.height=`${a.current[J].height*g}px`;if(x.current.clear(),E.current?.ranges.clear(),oe(),K&&K!==g){let J=g/K;M.scrollTo({left:Math.max(0,(X.x-su)*J+su-B.x),top:Math.max(0,(X.y-su)*J+su-B.y)})}S.current=new IntersectionObserver(J=>{for(let ne of J){if(!ne.isIntersecting)continue;let W=o.current.findIndex(fe=>fe.element===ne.target);W>=0&&I(W)}},{root:M,rootMargin:"600px 0px"});for(let J of o.current)S.current.observe(J.element)},[g]);function I(U){let M=o.current[U];return M?M.done??=L(U,M):Promise.resolve()}async function L(U,M){let K=i.current;if(!K)return;let B=y.current,X=_.current,J=await K.getPage(U+1);if(_.current!==X)return;let ne=J.getViewport({scale:B}),W=window.devicePixelRatio||1,fe=document.createElement("canvas");fe.width=Math.floor(ne.width*W),fe.height=Math.floor(ne.height*W),fe.style.width=`${ne.width}px`,fe.style.height=`${ne.height}px`;let $e=document.createElement("div");$e.className="textLayer";let st=document.createElement("div");st.className="pdf-links",M.element.style.setProperty("--scale-factor",String(B)),M.element.style.setProperty("--user-unit","1"),M.element.style.setProperty("--total-scale-factor",String(B)),M.element.replaceChildren(fe,$e,st);let qe=J.render({canvas:fe,canvasContext:fe.getContext("2d"),viewport:ne,transform:W!==1?[W,0,0,W,0,0]:void 0});M.task=qe;try{if(await qe.promise,_.current!==X)return;let He=await bq(J);if(_.current!==X||(await new Vs({textContentSource:He,container:$e,viewport:ne}).render(),_.current!==X||!$e.isConnected))return;M.textLayer=$e,await G(J,ne,st),Ee(U+1)}catch(He){He?.name!=="RenderingCancelledException"&&console.warn("pdf render",He)}}async function G(U,M,K){let B=await U.getAnnotations({intent:"display"});for(let X of B){if(X.subtype!=="Link")continue;let[J,ne,W,fe]=M.convertToViewportRectangle(X.rect),$e=document.createElement("a");$e.className="pdf-link",$e.style.left=`${Math.min(J,W)}px`,$e.style.top=`${Math.min(ne,fe)}px`,$e.style.width=`${Math.abs(W-J)}px`,$e.style.height=`${Math.abs(fe-ne)}px`;let st=sq(X.url??X.unsafeUrl);if(st)$e.title=st,$e.addEventListener("click",qe=>{qe.preventDefault(),qe.stopPropagation(),f.current.onLink(st)});else if(X.dest)$e.addEventListener("click",async qe=>{qe.preventDefault(),qe.stopPropagation();let He=await ge(X.dest);He&&de(He)});else continue;K.append($e)}}async function ge(U){let M=i.current;if(!M)return null;let K=typeof U=="string"?await M.getDestination(U):U,B=Array.isArray(K)?K[0]:null;return B&&typeof B=="object"?await M.getPageIndex(B)+1:typeof B=="number"?B+1:null}function de(U){let M=o.current[U-1];M&&hq(M.element,"start")}async function pe(U){let M=o.current[U-1];if(!M)return null;for(let K=0;K<5;K++)if(await I(U-1),M.textLayer?.isConnected)return M;return null}function Ee(U){let M=o.current[U-1];M?.textLayer&&(T.current.forEach((K,B)=>{if(!K.quote||K.page!==U)return;let X=x.current.get(B);if(X&&M.textLayer.contains(X.startContainer))return;let J=PC(M.textLayer,K.quote);J?x.current.set(B,J):x.current.delete(B)}),E.current?.query&&E.current.ranges.set(U,OC(M.textLayer,E.current.query)),oe())}function ae(){let U=E.current,M=U?.matches[U.current];if(!U||!M)return null;let K=U.ranges.get(M.page)??[];return K[Math.min(M.k,K.length-1)]??null}function oe(){s_("office-reveal",[...x.current.values()]);let U=ae();s_("office-find",[...E.current?.ranges.values()??[]].flat().filter(M=>M!==U)),s_("office-find-current",U?[U]:[])}function Se(U){let M=i.current;return M?C.current[U-1]??=M.getPage(U).then(bq).then(K=>K.items.map(B=>"str"in B?B.str:"").join(" ")).catch(()=>""):Promise.resolve("")}(0,Be.useEffect)(()=>{let U=r.current;return pq(U,()=>o.current.map(M=>M.element),M=>M.dataset.at??null,M=>{f.current.onLocation(M),f.current.onPage?.({current:Number(M.slice(5)),count:i.current?.numPages??o.current.length})},1/3)},[]),(0,Be.useEffect)(()=>{let U=r.current,M=0,K=B=>{if(!B.ctrlKey&&!B.metaKey||(B.preventDefault(),M+=B.deltaY,Math.abs(M)<40))return;let X=M<0?1:-1;M=0;let J=U.getBoundingClientRect();b.current={x:B.clientX-J.left,y:B.clientY-J.top},nt(X)};return U.addEventListener("wheel",K,{passive:!1}),()=>U.removeEventListener("wheel",K)},[]);function nt(U){let M=Math.round(y.current/c_*100);l({mode:null,percent:vq(M,U)})}return(0,Be.useEffect)(()=>{let U=r.current,M=J=>(J instanceof Element?J:J?.parentElement)?.closest(".pdf-page")?.dataset.at,K=()=>U.querySelectorAll(".pdf-page.selected").forEach(J=>J.classList.remove("selected")),B=J=>{let ne=IC(U);if(ne){let qe=M(ne.range.startContainer),He=M(ne.range.endContainer);if(!qe)return;K();let Zt=Number(qe.slice(5)),On=He?Number(He.slice(5)):Zt,hr=ne.range.cloneRange();f.current.onSelect({at:On>Zt?`page:${Zt}-${On}`:qe,text:ne.text},{text:!0,locate:()=>Vf(hr),user:!0});return}if(J.type!=="mouseup")return;let{clientX:W,clientY:fe}=J;for(let[qe,He]of x.current)if(dq(He,W,fe)&&f.current.onRevealHit?.(qe)){K(),f.current.onSelect(null);return}let $e=J.target;if($e.closest(".pdf-link"))return;let st=$e.closest(".pdf-page");if(K(),!st?.dataset.at||$e.closest(".textLayer span")){f.current.onSelect(null);return}st.classList.add("selected"),f.current.onSelect({at:st.dataset.at,text:""},{text:!1,locate:()=>Vf(st),user:!0})},X=J=>setTimeout(()=>B(J),0);return U.addEventListener("mouseup",X),U.addEventListener("keyup",X),()=>{U.removeEventListener("mouseup",X),U.removeEventListener("keyup",X)}},[]),(0,Be.useImperativeHandle)(n,()=>({async reveal(U){this.clearReveal();let M=[];for(let B of U){let X=Yy("pdf",B.at);X.kind!=="pdf"||!o.current[X.from-1]||M.push({page:X.from,to:X.to,...B.quote?{quote:B.quote}:{}})}T.current=M;for(let[B,X]of M.entries()){if(!X.quote){for(let J=X.page;J<=X.to;J++)o.current[J-1]?.element.classList.add("revealed");continue}for(let J=X.page;J<=X.to;J++){let ne=await pe(J),W=ne?.textLayer&&PC(ne.textLayer,X.quote);if(W){X.page=J,x.current.set(B,W);break}}}oe();let K=M.map((B,X)=>({at:B.to>B.page&&!B.quote?`page:${B.page}-${B.to}`:`page:${B.page}`,locate:()=>Vf(x.current.get(X))??Vf(o.current[B.page-1]?.element),scrollTo:()=>{let J=x.current.get(X);J?.startContainer.isConnected?l_(J,"upper"):B.quote?pe(B.page).then(()=>{Ee(B.page);let ne=x.current.get(X);ne?l_(ne,"upper"):de(B.page)}):de(B.page)}}));return K[0]?.scrollTo(),K},goTo(U){let M=Yy("pdf",U);M.kind==="pdf"&&de(M.from)},clearReveal(){T.current=[],x.current.clear(),r.current?.querySelectorAll(".pdf-page.revealed").forEach(U=>U.classList.remove("revealed")),oe()},async capture(U,M){let K=i.current;if(!K)throw new Error("The PDF is still loading.");let B=U?Yy("pdf",U):null,X=B?.kind==="pdf"?B.from:Number((o.current.find(st=>st.element.getBoundingClientRect().bottom>r.current.getBoundingClientRect().top+8)?.element.dataset.at??"page:1").slice(5));if(X<1||X>K.numPages)throw new Error(`Page ${X} does not exist; the PDF has ${K.numPages} pages.`);let J=await K.getPage(X),ne=J.getViewport({scale:1}),W=J.getViewport({scale:Math.min(3,M/ne.width)}),fe=document.createElement("canvas");fe.width=Math.floor(W.width),fe.height=Math.floor(W.height);let $e=fe.getContext("2d");return $e.fillStyle="#fff",$e.fillRect(0,0,fe.width,fe.height),await J.render({canvas:fe,canvasContext:$e,viewport:W}).promise,{...mq(fe,M),at:`page:${X}`}},zoom(U){nt(U)},fit(U){l({mode:U,percent:100})},async find(U){let M=i.current;if(!M||!U.trim())return this.clearFind(),0;let K={query:U,matches:[],current:-1,ranges:new Map};E.current=K;let B=await Promise.all(Array.from({length:M.numPages},(X,J)=>Se(J+1).then(ne=>uq(ne,U))));if(E.current!==K)return 0;B.forEach((X,J)=>{for(let ne=0;ne<X;ne++)K.matches.push({page:J+1,k:ne})});for(let[X,J]of o.current.entries())J.textLayer&&K.ranges.set(X+1,OC(J.textLayer,U));return oe(),K.matches.length},findGo(U){let M=E.current,K=M?.matches[U];!M||!K||(M.current=U,pe(K.page).then(()=>{if(E.current!==M||M.current!==U)return;M.ranges.has(K.page)||Ee(K.page),oe();let B=ae();B?l_(B,"center"):de(K.page)}),oe())},clearFind(){E.current=null,oe()},clearSelection(){r.current?.querySelectorAll(".pdf-page.selected").forEach(M=>M.classList.remove("selected"));let U=document.getSelection();U&&r.current&&IC(r.current)&&U.removeAllRanges()},goToPage(U){de(Math.min(Math.max(1,U),o.current.length))},async thumbnail(U,M){let K=i.current;if(!K)throw new Error("The PDF is still loading.");let B=await K.getPage(U),X=B.getViewport({scale:1}),J=window.devicePixelRatio||1,ne=B.getViewport({scale:M/X.width*J}),W=document.createElement("canvas");W.width=Math.floor(ne.width),W.height=Math.floor(ne.height),W.style.width=`${M}px`,W.style.height=`${ne.height/ne.width*M}px`;let fe=W.getContext("2d");return fe.fillStyle="#fff",fe.fillRect(0,0,W.width,W.height),await B.render({canvas:W,canvasContext:fe,viewport:ne}).promise,W}}),[]),(0,Sq.jsx)("div",{ref:r,className:`viewer-scroll pdf-scroll${m?" glance":""}`})});var MC={pdf:{view:yq,prepare:A6}};var Ce=lt(Cn(),1),ni=Fi(),IY=["pdf","docx","pptx"],_q=["pdf","docx"],PY=720,OY=380;function NY(){let t=H4(),e=K4(t?.locale??navigator.language),n=t?.theme==="dark",r=t?.displayMode==="inline",[i,o]=(0,ce.useState)(null),[a,s]=(0,ce.useState)(null),[l,c]=(0,ce.useState)(!1),[u,d]=(0,ce.useState)(null),[h,f]=(0,ce.useState)(null),[m,g]=(0,ce.useState)({open:!1,tab:"pages"}),[y,v]=(0,ce.useState)(null),[b,S]=(0,ce.useState)(null),[_,T]=(0,ce.useState)(null),[x,E]=(0,ce.useState)(null),C=(0,ce.useRef)(x);C.current=x;let[I,L]=(0,ce.useState)("bar"),[G,ge]=(0,ce.useState)(!1),[de,pe]=(0,ce.useState)(null),[Ee,ae]=(0,ce.useState)(null),[oe,Se]=(0,ce.useState)(null),[nt,U]=(0,ce.useState)(Pk),[M,K]=(0,ce.useState)(!1),B=(0,ce.useRef)(null),X=(0,ce.useRef)(null),[J,ne]=v6(X,de),W=(0,ce.useRef)(null),fe=(0,ce.useRef)(!1),$e=(0,ce.useRef)(null),st=(0,ce.useRef)(0),qe=(0,ce.useRef)(null);qe.current=i;let He=(0,ce.useRef)(0),Zt=(0,ce.useRef)(null),On=(0,ce.useRef)(0),hr=(0,ce.useRef)([]),jr=(0,ce.useRef)(null),Ia=(0,ce.useCallback)(()=>{W.current?.clearReveal(),W.current?.clearSelection(),E(null),pe(null),f(null)},[]),{find:Zi,setFind:To,openFind:Ur,closeFind:Ao,queryFind:Pa,stepFind:Oa}=p6({viewer:W,docRef:qe,ready:l,onOpen:Ia}),Gi=(0,ce.useRef)(!1),Nn=i?.info.kind??(a?ff(a):null),Ki=a??u?.path??i?.info.path??null;(0,ce.useEffect)(()=>{document.documentElement.dataset.theme=n?"dark":"light";let F=t?.styles?.variables;F&&x4(F)},[n,t?.styles?.variables]),(0,ce.useEffect)(()=>{r&&ni.app.sendSizeChanged({height:OY}).catch(()=>{})},[r]),(0,ce.useEffect)(()=>{let F=B.current,ie=new ResizeObserver(()=>K(F.clientWidth>=PY));return ie.observe(F),()=>ie.disconnect()},[]);let fr=(0,ce.useCallback)(F=>{Se(F),setTimeout(()=>Se(ie=>ie===F?null:ie),2500)},[]),Yi=(0,ce.useCallback)(()=>{fe.current=!1,c(!1),E(null),L("bar"),pe(null),ne(null),v(null),S(null),T(null),ae(null),To(yf)},[]),xi=(0,ce.useCallback)(async(F,ie)=>{let Oe=++He.current;ie?$e.current=ie:Zt.current!==F&&($e.current=null),Zt.current=F,s(F),d(null);try{let be=await Nr("load_document",{path:F}),[Sn]=await Promise.all([U4(be.file),MC[be.info.kind]?.prepare?.()]);if(Oe!==He.current)return;Yi(),jr.current=null,o({info:be.info,bytes:Sn,blocks:be.blocks,key:++On.current}),ni.saveDocument(be.info.path),U(Qt=>{let tr=[{path:be.info.path,kind:be.info.kind},...Qt.filter(Da=>Da.path!==be.info.path)].slice(0,5);return B4(tr),tr})}catch(be){if(Oe!==He.current)return;o(null),Yi(),d(bf(e,be,F))}finally{Oe===He.current&&(s(null),Zt.current=null)}},[Yi,e]),pr=(0,ce.useCallback)(async(F,ie)=>{let Oe=W.current;if(!Oe)return;Oe.clearFind(),To(yf);let be=await Oe.reveal(F).catch(()=>[]);Gi.current=be.length>0,pe(be.length?{note:ie,targets:be,index:0,visible:!!ie||be.length>1}:null)},[]),mr=(0,ce.useCallback)((F,ie)=>{W.current&&fe.current?pr(F,ie):$e.current={targets:F,note:ie}},[pr]),Mn=(0,ce.useCallback)(F=>{if(!F?.document)return;let ie=F.reveal&&F.reveal.seq>st.current?F.reveal:null;ie&&(st.current=ie.seq);let Oe=qe.current?.info,be=ie?{targets:ie.targets,note:ie.note??null}:null;!Oe||Oe.path!==F.document.path||Oe.revision!==F.document.revision?xi(F.document.path,be):be&&mr(be.targets,be.note)},[xi,mr]);(0,ce.useEffect)(()=>{let F=()=>{for(let ie of ni.takeResults()){if(ie.isError)continue;ie._meta?.["zcode/truncated"]?Nr("get_viewer").then(Mn,()=>{}):Mn(ie.structuredContent)}};return window.addEventListener("office:toolresult",F),ni.ready().then(async()=>{U(Pk());let ie=ni.takeResults(),Oe=ni.readDocument();if(Oe)xi(Oe);else for(let be of ie)be.isError||Mn(be.structuredContent)}),()=>window.removeEventListener("office:toolresult",F)},[Mn,xi]);let gr=x?.selection??null;(0,ce.useEffect)(()=>{if(!i)return;let F=setTimeout(()=>{Nr("report_view",{viewId:ni.viewId,path:i.info.path,at:y,selection:gr}).catch(()=>{})},400);return()=>clearTimeout(F)},[i,y,gr]),(0,ce.useEffect)(()=>{if(!i||r)return;let F=setInterval(()=>{document.visibilityState==="visible"&&Nr("check_document",{path:i.info.path}).then(({revision:ie})=>{qe.current===i&&ie!==i.info.revision&&ie!==jr.current&&ae(ie)},()=>{})},4e3);return()=>clearInterval(F)},[i,r]),g6(qe,W);let Eo=(0,ce.useCallback)(()=>{fe.current=!0,c(!0);let F=$e.current;$e.current=null,F?.targets.length&&setTimeout(()=>void pr(F.targets,F.note),50)},[pr]),Ji=(0,ce.useCallback)((F,ie)=>{L("bar"),ge(!1),E(F&&ie?{selection:F,detail:ie}:null),F&&ie?.user&&pe(Oe=>Oe&&{...Oe,visible:!1})},[]),qr=(0,ce.useRef)(de);qr.current=de,(0,ce.useEffect)(()=>{let F=X.current;if(!F)return;let ie=0,Oe=new ResizeObserver(()=>{Gi.current&&(clearTimeout(ie),ie=window.setTimeout(()=>{let Sn=qr.current;Gi.current&&Sn&&Sn.targets[Sn.index]?.scrollTo()},200))});Oe.observe(F);let be=()=>{Gi.current=!1};return F.addEventListener("wheel",be,{passive:!0}),F.addEventListener("pointerdown",be,!0),F.addEventListener("keydown",be,!0),()=>{clearTimeout(ie),Oe.disconnect(),F.removeEventListener("wheel",be),F.removeEventListener("pointerdown",be,!0),F.removeEventListener("keydown",be,!0)}},[i]);let yn=(0,ce.useCallback)(F=>{let ie=qr.current;return!ie?.targets[F]||!(ie.note||ie.targets.length>1)?!1:(pe({...ie,index:F,visible:!0}),!0)},[]),zi=(0,ce.useCallback)(()=>{W.current?.clearSelection(),E(null),L("bar")},[]),Fr=(0,ce.useCallback)(async()=>{let F=qe.current;if(!F||!x)return;let ie=pf(F.info.path,x.selection.at),Oe=x.selection.text,be=[...hr.current.filter(Qt=>Qt.anchor!==ie||Qt.text!==Oe),{anchor:ie,text:Oe}].slice(-10),Sn=be.map(Qt=>`- ${Qt.anchor}${Qt.text?`: "${eS(Qt.text,600)}"`:""}`);try{await ni.ready(),await ni.app.updateModelContext({content:[{type:"text",text:Xy(`The user referenced these locations in the ${gt.title.en} viewer (use read_document / show_in_viewer with the anchors):
${Sn.join(`
`)}`)}],structuredContent:Jy({references:be})}),hr.current=be,L("added");let Qt=x;setTimeout(()=>{C.current===Qt&&zi()},1500)}catch{fr(e.contextFailed)}},[x,zi,fr,e]),Br=(0,ce.useCallback)(async F=>{let ie=qe.current;if(!ie||!x)return!1;let Oe=pf(ie.info.path,x.selection.at),be=x.selection.text,Sn=be?`
> ${eS(be,800).replace(/\n/g,`
> `)}`:"";try{if((await ni.app.sendMessage({role:"user",content:[{type:"text",text:Xy(`${F}

(About ${Oe} in the ${gt.title.en} viewer${Sn?":":"."})${Sn}`)}]})).isError)throw new Error;return zi(),!0}catch{return fr(e.sendFailed),!1}},[x,zi,fr,e]),Na=(0,ce.useCallback)(async()=>{let F=x?.selection.text;if(F){try{await navigator.clipboard.writeText(F)}catch{document.execCommand("copy")}ge(!0),setTimeout(()=>ge(!1),1200)}},[x]),vr=(0,ce.useCallback)(F=>W.current?.goToPage?.(F),[]),br=(0,ce.useCallback)(F=>{pe(ie=>{if(!ie)return ie;let Oe=F??(ie.index+1)%ie.targets.length;return ie.targets[Oe]?.scrollTo(),Gi.current=!0,{...ie,index:Oe,visible:!0}})},[]);(0,ce.useEffect)(()=>{let F=X.current;if(!F)return;let ie=Oe=>{Oe.target.closest(".callout, .chip, .pop, .pill")||pe(be=>be?.visible?{...be,visible:!1}:be)};return F.addEventListener("pointerdown",ie,!0),()=>F.removeEventListener("pointerdown",ie,!0)},[i]);let Ti=M&&!r,Xi=!!(Nn&&IY.includes(Nn)),Wi=!!(i&&l&&Nn!=="xlsx")&&!!(W.current?.thumbnail||i?.info.outline.length);y6({docRef:qe,viewer:W,picked:x,addReference:Fr,openFind:Ur,closeFind:Ao,clearSelection:zi,paged:Xi,page:b,goToPage:vr,drawer:m,setDrawer:g,docked:Ti,find:Zi,agent:de,setAgent:pe});let Ut=(0,ce.useCallback)(F=>{f(null),Nr("open_document",{path:F}).then(Mn,ie=>{He.current++,o(null),Yi(),d(bf(e,ie,F))})},[Mn,Yi,e]),Qi=i6(e,Ut,(F,ie)=>d(bf(e,F,ie))),Hr=i?MC[i.info.kind]?.view??null:null,er=(0,ce.useMemo)(()=>i?{bytes:i.bytes,info:i.info,blocks:i.blocks,dark:n,glance:r,onLocation:v,onSelect:Ji,onRevealHit:yn,onPage:S,onZoom:T,onLink:F=>void ni.app.openLink({url:F}).catch(()=>{}),onReady:Eo,onError:F=>d(bf(e,F,qe.current?.info.path??null))}:null,[i,n,r,Eo,Ji,yn]),$o=!u&&(!!a||!!(i&&!l)),Vr=!i&&!a&&!u,Ma=x?tS(x.selection.at,e):"";return r?(0,Ce.jsx)(r6,{appRef:B,canvasRef:X,t:e,path:Ki,info:i?.info,kind:Nn,showSkeleton:$o,failure:u,nothing:Vr,onExpand:()=>void ni.app.requestDisplayMode({mode:"fullscreen"}).catch(()=>{}),children:Hr&&er?(0,Ce.jsx)(Hr,{ref:W,...er},i.key):null}):(0,Ce.jsxs)("div",{ref:B,className:"app",children:[Vr?null:Zi.open?(0,Ce.jsx)(a6,{t:e,query:Zi.query,total:Zi.total,index:Zi.index,onQuery:Pa,onStep:Oa,onClose:Ao}):(0,Ce.jsxs)("header",{className:"docbar",children:[i||a||u?(0,Ce.jsx)("button",{type:"button",className:`btn icon ${m.open&&Wi?"secondary":"dim"}`,title:e.pagesAndOutline,"aria-label":e.pagesAndOutline,"aria-pressed":m.open&&Wi,disabled:!Wi,hidden:Nn==="xlsx",onClick:()=>g(F=>({...F,open:!F.open})),children:(0,Ce.jsx)(Fe,{name:"panel-left"})}):null,(0,Ce.jsxs)("button",{type:"button",className:`doctitle${h==="switch"?" open":""}`,title:Ki??void 0,"aria-haspopup":"menu","aria-expanded":h==="switch","aria-label":`${e.switchDocument}: ${Ki??""}`,"data-menu-trigger":"",onClick:()=>f(F=>F==="switch"?null:"switch"),children:[(0,Ce.jsx)("span",{className:"name",children:Ki?Ls(Ki):e.title}),(0,Ce.jsx)(Fe,{name:"chevron-down",size:12,className:"chev"})]}),(0,Ce.jsx)("span",{className:"spacer"}),i&&!u?(0,Ce.jsxs)(Ce.Fragment,{children:[(0,Ce.jsx)("button",{type:"button",className:"btn icon dim",title:`${e.find} (\u2318F)`,"aria-label":e.find,disabled:!l,onClick:Ur,children:(0,Ce.jsx)(Fe,{name:"search"})}),(0,Ce.jsx)("button",{type:"button",className:`btn icon dim${h==="more"?" active":""}`,title:e.more,"aria-label":e.more,"aria-haspopup":"menu","aria-expanded":h==="more","data-menu-trigger":"",onClick:()=>f(F=>F==="more"?null:"more"),children:(0,Ce.jsx)(Fe,{name:"ellipsis"})})]}):null]}),Ee?(0,Ce.jsx)(n6,{t:e,onReload:()=>i&&void xi(i.info.path),onDismiss:()=>{jr.current=Ee,ae(null)}}):null,Vr?(0,Ce.jsx)(t6,{t:e,importing:Qi.importing,onBrowse:Qi.browse}):(0,Ce.jsxs)("div",{className:"stage",children:[m.open&&Wi&&i?(0,Ce.jsxs)(Ce.Fragment,{children:[Ti?null:(0,Ce.jsx)("div",{className:"scrim",onClick:()=>g(F=>({...F,open:!1}))}),(0,Ce.jsx)(e6,{t:e,info:i.info,handle:W.current,page:Xi?b:null,tab:m.tab,docked:Ti,onTab:F=>g(ie=>({...ie,tab:F})),onPage:F=>{vr(F),Ti||g(ie=>({...ie,open:!1}))},onOutline:F=>{W.current?.goTo(F),Ti||g(ie=>({...ie,open:!1}))}})]}):null,(0,Ce.jsxs)("div",{ref:X,className:"canvas",children:[Hr&&er?(0,Ce.jsx)(Hr,{ref:W,...er},i.key):null,$o?(0,Ce.jsx)(iS,{kind:Nn}):null,u?(0,Ce.jsx)(rS,{t:e,title:u.title,detail:u.detail,onOpenAnother:Qi.browse}):null,i&&l&&!u&&x?.detail.user?(0,Ce.jsx)(l6,{t:e,frame:X,locate:x.detail.locate,text:x.detail.text,label:Ma,quote:eS(x.selection.text.replace(/\s+/g," "),60),short:i.info.kind==="xlsx",mode:I,canAsk:!!ni.capabilities?.message,copied:G,onAdd:()=>void Fr(),onAsk:()=>L("ask"),onCopy:()=>void Na(),onCancelAsk:()=>L("bar"),onSend:Br},`${x.selection.at}:${x.selection.text.length}`):null,de?.visible&&de.targets[de.index]&&!u?(0,Ce.jsx)(c6,{t:e,frame:X,locate:de.targets[de.index].locate,note:de.note,index:de.index,total:de.targets.length,onNext:()=>br(),onClose:()=>pe({...de,visible:!1})}):null,de&&J?(0,Ce.jsx)(u6,{text:d6(e,J.indexes.map(F=>de.targets[F].at)),down:J.down,raised:Xi,onClick:()=>br(J.indexes[0])}):null,i&&l&&!u&&Xi&&b?(0,Ce.jsx)(s6,{t:e,frame:X,page:b,zoom:Nn&&_q.includes(Nn)?_:null,onPage:vr,onZoom:F=>W.current?.zoom(F),onFit:()=>W.current?.fit("width")}):null,oe?(0,Ce.jsx)("div",{className:"chip notice",children:oe}):null]})]}),h==="switch"?(0,Ce.jsx)(h6,{t:e,recent:nt,currentPath:i?.info.path,onOpen:Ut,onBrowse:()=>{f(null),Qi.browse()},onClose:()=>f(null)}):null,h==="more"&&i?(0,Ce.jsx)(f6,{t:e,zoomable:_q.includes(i.info.kind),zoomMode:_?.mode,onFit:F=>{W.current?.fit(F),f(null)},onFind:Ur,onReload:()=>{f(null),xi(i.info.path)},onClose:()=>f(null)}):null,Qi.input]})}var xq=document.getElementById("root");xq.textContent="";(0,wq.createRoot)(xq).render((0,Ce.jsx)(ce.StrictMode,{children:(0,Ce.jsx)(NY,{})}));ni.ready();})();
