@pplethai/pple-today-miniapp-sdk 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs.js +1 -29
- package/build/esm.js +1 -29
- package/build/script.js +1 -29
- package/package.json +2 -1
package/build/cjs.js
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
"use strict";var Ot=Object.defineProperty,pu=Object.defineProperties,mu=Object.getOwnPropertyDescriptor,gu=Object.getOwnPropertyDescriptors,fu=Object.getOwnPropertyNames,Ut=Object.getOwnPropertySymbols,hu=Object.getPrototypeOf,Lr=Object.prototype.hasOwnProperty,qa=Object.prototype.propertyIsEnumerable,vu=Reflect.get;var Wa=Math.pow,Cr=(e,r,n)=>r in e?Ot(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,d=(e,r)=>{for(var n in r||(r={}))Lr.call(r,n)&&Cr(e,n,r[n]);if(Ut)for(var n of Ut(r))qa.call(r,n)&&Cr(e,n,r[n]);return e},S=(e,r)=>pu(e,gu(r));var W=(e,r)=>{var n={};for(var i in e)Lr.call(e,i)&&r.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&Ut)for(var i of Ut(e))r.indexOf(i)<0&&qa.call(e,i)&&(n[i]=e[i]);return n};var me=(e,r)=>{for(var n in r)Ot(e,n,{get:r[n],enumerable:!0})},_u=(e,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of fu(r))!Lr.call(e,t)&&t!==n&&Ot(e,t,{get:()=>r[t],enumerable:!(i=mu(r,t))||i.enumerable});return e};var $u=e=>_u(Ot({},"__esModule",{value:!0}),e);var Nt=(e,r,n)=>Cr(e,typeof r!="symbol"?r+"":r,n);var Fe=(e,r,n)=>vu(hu(e),n,r);var _=(e,r,n)=>new Promise((i,t)=>{var o=c=>{try{u(n.next(c))}catch(a){t(a)}},s=c=>{try{u(n.throw(c))}catch(a){t(a)}},u=c=>c.done?i(c.value):Promise.resolve(c.value).then(o,s);u((n=n.apply(e,r)).next())});var Hp={};me(Hp,{PPLEMiniApp:()=>Ja});module.exports=$u(Hp);var $e=class extends Error{};$e.prototype.name="InvalidTokenError";function yu(e){return decodeURIComponent(atob(e).replace(/(.)/g,(r,n)=>{let i=n.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}function bu(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return yu(r)}catch(n){return atob(r)}}function Ka(e,r){if(typeof e!="string")throw new $e("Invalid token specified: must be a string");r||(r={});let n=r.header===!0?0:1,i=e.split(".")[n];if(typeof i!="string")throw new $e(`Invalid token specified: missing part #${n+1}`);let t;try{t=bu(i)}catch(o){throw new $e(`Invalid token specified: invalid base64 for part #${n+1} (${o.message})`)}try{return JSON.parse(t)}catch(o){throw new $e(`Invalid token specified: invalid json for part #${n+1} (${o.message})`)}}var wu={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},te,re,Et=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(Et||{});(e=>{function r(){te=3,re=wu}e.reset=r;function n(t){if(!(0<=t&&t<=4))throw new Error("Invalid log level");te=t}e.setLevel=n;function i(t){re=t}e.setLogger=i})(Et||(Et={}));var E=class Q{constructor(r){this._name=r}debug(...r){te>=4&&re.debug(Q._format(this._name,this._method),...r)}info(...r){te>=3&&re.info(Q._format(this._name,this._method),...r)}warn(...r){te>=2&&re.warn(Q._format(this._name,this._method),...r)}error(...r){te>=1&&re.error(Q._format(this._name,this._method),...r)}throw(r){throw this.error(r),r}create(r){let n=Object.create(this);return n._method=r,n.debug("begin"),n}static createStatic(r,n){let i=new Q(`${r}.${n}`);return i.debug("begin"),i}static _format(r,n){let i=`[${r}]`;return n?`${i} ${n}:`:i}static debug(r,...n){te>=4&&re.debug(Q._format(r),...n)}static info(r,...n){te>=3&&re.info(Q._format(r),...n)}static warn(r,...n){te>=2&&re.warn(Q._format(r),...n)}static error(r,...n){te>=1&&re.error(Q._format(r),...n)}};Et.reset();var Zt=class{static decode(e){try{return Ka(e)}catch(r){throw E.error("JwtUtils.decode",r),r}}static generateSignedJwt(e,r,n){return _(this,null,function*(){let i=K.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))),t=K.encodeBase64Url(new TextEncoder().encode(JSON.stringify(r))),o=`${i}.${t}`,s=yield window.crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},n,new TextEncoder().encode(o)),u=K.encodeBase64Url(new Uint8Array(s));return`${o}.${u}`})}},ku="10000000-1000-4000-8000-100000000000",Vr=e=>btoa([...new Uint8Array(e)].map(r=>String.fromCharCode(r)).join("")),Ya=class ee{static _randomWord(){let r=new Uint32Array(1);return crypto.getRandomValues(r),r[0]}static generateUUIDv4(){return ku.replace(/[018]/g,n=>(+n^ee._randomWord()&15>>+n/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return ee.generateUUIDv4()+ee.generateUUIDv4()+ee.generateUUIDv4()}static generateCodeChallenge(r){return _(this,null,function*(){if(!crypto.subtle)throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");try{let i=new TextEncoder().encode(r),t=yield crypto.subtle.digest("SHA-256",i);return Vr(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(n){throw E.error("CryptoUtils.generateCodeChallenge",n),n}})}static generateBasicAuth(r,n){let t=new TextEncoder().encode([r,n].join(":"));return Vr(t)}static hash(r,n){return _(this,null,function*(){let i=new TextEncoder().encode(n),t=yield crypto.subtle.digest(r,i);return new Uint8Array(t)})}static customCalculateJwkThumbprint(r){return _(this,null,function*(){let n;switch(r.kty){case"RSA":n={e:r.e,kty:r.kty,n:r.n};break;case"EC":n={crv:r.crv,kty:r.kty,x:r.x,y:r.y};break;case"OKP":n={crv:r.crv,kty:r.kty,x:r.x};break;case"oct":n={crv:r.k,kty:r.kty};break;default:throw new Error("Unknown jwk type")}let i=yield ee.hash("SHA-256",JSON.stringify(n));return ee.encodeBase64Url(i)})}static generateDPoPProof(s){return _(this,arguments,function*({url:r,accessToken:n,httpMethod:i,keyPair:t,nonce:o}){let u,c,a={jti:window.crypto.randomUUID(),htm:i!=null?i:"GET",htu:r,iat:Math.floor(Date.now()/1e3)};n&&(u=yield ee.hash("SHA-256",n),c=ee.encodeBase64Url(u),a.ath=c),o&&(a.nonce=o);try{let l=yield crypto.subtle.exportKey("jwk",t.publicKey),f={alg:"ES256",typ:"dpop+jwt",jwk:{crv:l.crv,kty:l.kty,x:l.x,y:l.y}};return yield Zt.generateSignedJwt(f,a,t.privateKey)}catch(l){throw l instanceof TypeError?new Error(`Error exporting dpop public key: ${l.message}`):l}})}static generateDPoPJkt(r){return _(this,null,function*(){try{let n=yield crypto.subtle.exportKey("jwk",r.publicKey);return yield ee.customCalculateJwkThumbprint(n)}catch(n){throw n instanceof TypeError?new Error(`Could not retrieve dpop keys from storage: ${n.message}`):n}})}static generateDPoPKeys(){return _(this,null,function*(){return yield window.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"])})}};Ya.encodeBase64Url=e=>Vr(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_");var K=Ya,ge=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new E(`Event('${this._name}')`)}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){let r=this._callbacks.lastIndexOf(e);r>=0&&this._callbacks.splice(r,1)}raise(...e){return _(this,null,function*(){this._logger.debug("raise:",...e);for(let r of this._callbacks)yield r(...e)})}},Ba=class{static center(r){var e=W(r,[]);var n,i,t;return e.width==null&&(e.width=(n=[800,720,600,480].find(o=>o<=window.outerWidth/1.618))!=null?n:360),(i=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((t=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,r])=>r!=null).map(([r,n])=>`${r}=${typeof n!="boolean"?n:n?"yes":"no"}`).join(",")}},ae=class Tt extends ge{constructor(){super(...arguments),this._logger=new E(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{let r=this._expiration-Tt.getEpochTime();this._logger.debug("timer completes in",r),this._expiration<=Tt.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(r){let n=this._logger.create("init");r=Math.max(Math.floor(r),1);let i=Tt.getEpochTime()+r;if(this.expiration===i&&this._timerHandle){n.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),n.debug("using duration",r),this._expiration=i;let t=Math.min(r,5);this._timerHandle=setInterval(this._callback,t*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},Jr=class{static readParams(e,r="query"){if(!e)throw new TypeError("Invalid URL");let i=new URL(e,"http://127.0.0.1")[r==="fragment"?"hash":"search"];return new URLSearchParams(i.slice(1))}},Ue=";",ye=class extends Error{constructor(e,r){var n,i,t;if(super(e.error_description||e.error||""),this.form=r,this.name="ErrorResponse",!e.error)throw E.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(n=e.error_description)!=null?n:null,this.error_uri=(i=e.error_uri)!=null?i:null,this.state=e.userState,this.session_state=(t=e.session_state)!=null?t:null,this.url_state=e.url_state}},Gr=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},xu=class{constructor(e){this._logger=new E("AccessTokenEvents"),this._expiringTimer=new ae("Access token expiring"),this._expiredTimer=new ae("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}load(e){return _(this,null,function*(){let r=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){let n=e.expires_in;if(r.debug("access token present, remaining duration:",n),n>0){let t=n-this._expiringNotificationTimeInSeconds;t<=0&&(t=1),r.debug("registering expiring timer, raising in",t,"seconds"),this._expiringTimer.init(t)}else r.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();let i=n+1;r.debug("registering expired timer, raising in",i,"seconds"),this._expiredTimer.init(i)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()})}unload(){return _(this,null,function*(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()})}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},Su=class{constructor(e,r,n,i,t){this._callback=e,this._client_id=r,this._intervalInSeconds=i,this._stopOnError=t,this._logger=new E("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=s=>{s.origin===this._frame_origin&&s.source===this._frame.contentWindow&&(s.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):s.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(s.data+" message from check session op iframe"))};let o=new URL(n);this._frame_origin=o.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=o.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;let r=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};r(),this._timer=setInterval(r,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},Qa=class{constructor(){this._logger=new E("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,r){this._logger.create(`setItem('${e}')`),this._data[e]=r}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},Fr=class extends Error{constructor(e,r){super(r),this.name="ErrorDPoPNonce",this.nonce=e}},Hr=class{constructor(e=[],r=null,n={}){this._jwtHandler=r,this._extraHeaders=n,this._logger=new E("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),r&&this._contentTypes.push("application/jwt")}fetchWithTimeout(n){return _(this,arguments,function*(e,r={}){let u=r,{timeoutInSeconds:i}=u,t=W(u,["timeoutInSeconds"]);if(!i)return yield fetch(e,t);let o=new AbortController,s=setTimeout(()=>o.abort(),i*1e3);try{return yield fetch(e,S(d({},r),{signal:o.signal}))}catch(c){throw c instanceof DOMException&&c.name==="AbortError"?new Gr("Network timed out"):c}finally{clearTimeout(s)}})}getJson(t){return _(this,arguments,function*(e,{token:r,credentials:n,timeoutInSeconds:i}={}){let o=this._logger.create("getJson"),s={Accept:this._contentTypes.join(", ")};r&&(o.debug("token passed, setting Authorization header"),s.Authorization="Bearer "+r),this._appendExtraHeaders(s);let u;try{o.debug("url:",e),u=yield this.fetchWithTimeout(e,{method:"GET",headers:s,timeoutInSeconds:i,credentials:n})}catch(l){throw o.error("Network Error"),l}o.debug("HTTP response received, status",u.status);let c=u.headers.get("Content-Type");if(c&&!this._contentTypes.find(l=>c.startsWith(l))&&o.throw(new Error(`Invalid response Content-Type: ${c!=null?c:"undefined"}, from URL: ${e}`)),u.ok&&this._jwtHandler&&(c!=null&&c.startsWith("application/jwt")))return yield this._jwtHandler(yield u.text());let a;try{a=yield u.json()}catch(l){throw o.error("Error parsing JSON response",l),u.ok?l:new Error(`${u.statusText} (${u.status})`)}if(!u.ok)throw o.error("Error from server:",a),a.error?new ye(a):new Error(`${u.statusText} (${u.status}): ${JSON.stringify(a)}`);return a})}postForm(s,u){return _(this,arguments,function*(e,{body:r,basicAuth:n,timeoutInSeconds:i,initCredentials:t,extraHeaders:o}){let c=this._logger.create("postForm"),a=d({Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded"},o);n!==void 0&&(a.Authorization="Basic "+n),this._appendExtraHeaders(a);let l;try{c.debug("url:",e),l=yield this.fetchWithTimeout(e,{method:"POST",headers:a,body:r,timeoutInSeconds:i,credentials:t})}catch(w){throw c.error("Network error"),w}c.debug("HTTP response received, status",l.status);let f=l.headers.get("Content-Type");if(f&&!this._contentTypes.find(w=>f.startsWith(w)))throw new Error(`Invalid response Content-Type: ${f!=null?f:"undefined"}, from URL: ${e}`);let p=yield l.text(),g={};if(p)try{g=JSON.parse(p)}catch(w){throw c.error("Error parsing JSON response",w),l.ok?w:new Error(`${l.statusText} (${l.status})`)}if(!l.ok){if(c.error("Error from server:",g),l.headers.has("dpop-nonce")){let w=l.headers.get("dpop-nonce");throw new Fr(w,`${JSON.stringify(g)}`)}throw g.error?new ye(g,r):new Error(`${l.statusText} (${l.status}): ${JSON.stringify(g)}`)}return g})}_appendExtraHeaders(e){let r=this._logger.create("appendExtraHeaders"),n=Object.keys(this._extraHeaders),i=["accept","content-type"],t=["authorization"];n.length!==0&&n.forEach(o=>{if(i.includes(o.toLocaleLowerCase())){r.warn("Protected header could not be set",o,i);return}if(t.includes(o.toLocaleLowerCase())&&Object.keys(e).includes(o)){r.warn("Header could not be overridden",o,t);return}let s=typeof this._extraHeaders[o]=="function"?this._extraHeaders[o]():this._extraHeaders[o];s&&s!==""&&(e[o]=s)})}},Iu=class{constructor(e){this._settings=e,this._logger=new E("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new Hr(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}getMetadata(){return _(this,null,function*(){let e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);let r=yield this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},r,this._settings.metadataSeed),this._metadata})}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}_getMetadataProperty(e,r=!1){return _(this,null,function*(){let n=this._logger.create(`_getMetadataProperty('${e}')`),i=yield this.getMetadata();if(n.debug("resolved"),i[e]===void 0){if(r===!0){n.warn("Metadata does not contain optional property");return}n.throw(new Error("Metadata does not contain property "+e))}return i[e]})}getSigningKeys(){return _(this,null,function*(){let e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;let r=yield this.getKeysEndpoint(!1);e.debug("got jwks_uri",r);let n=yield this._jsonService.getJson(r,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug("got key set",n),!Array.isArray(n.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=n.keys,this._signingKeys})}},At=class{constructor({prefix:e="oidc.",store:r=localStorage}={}){this._logger=new E("WebStorageStateStore"),this._store=r,this._prefix=e}set(e,r){return _(this,null,function*(){this._logger.create(`set('${e}')`),e=this._prefix+e,yield this._store.setItem(e,r)})}get(e){return _(this,null,function*(){return this._logger.create(`get('${e}')`),e=this._prefix+e,yield this._store.getItem(e)})}remove(e){return _(this,null,function*(){this._logger.create(`remove('${e}')`),e=this._prefix+e;let r=yield this._store.getItem(e);return yield this._store.removeItem(e),r})}getAllKeys(){return _(this,null,function*(){this._logger.create("getAllKeys");let e=yield this._store.length,r=[];for(let n=0;n<e;n++){let i=yield this._store.key(n);i&&i.indexOf(this._prefix)===0&&r.push(i.substr(this._prefix.length))}return r})}},zu="code",Pu="openid",ju="client_secret_post",Uu=60*15,qr=class{constructor({authority:e,metadataUrl:r,metadata:n,signingKeys:i,metadataSeed:t,client_id:o,client_secret:s,response_type:u=zu,scope:c=Pu,redirect_uri:a,post_logout_redirect_uri:l,client_authentication:f=ju,prompt:p,display:g,max_age:w,ui_locales:P,acr_values:I,resource:D,response_mode:z,filterProtocolClaims:h=!0,loadUserInfo:v=!1,requestTimeoutInSeconds:b,staleStateAgeInSeconds:U=Uu,mergeClaimsStrategy:j={array:"replace"},disablePKCE:O=!1,stateStore:A,revokeTokenAdditionalContentTypes:q,fetchRequestCredentials:F,refreshTokenAllowedScope:_e,extraQueryParams:pe={},extraTokenParams:Pt={},extraHeaders:jt={},dpop:Je,omitScopeWhenRequesting:Rr=!1}){var Fa;if(this.authority=e,r?this.metadataUrl=r:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith("/")||(this.metadataUrl+="/"),this.metadataUrl+=".well-known/openid-configuration")),this.metadata=n,this.metadataSeed=t,this.signingKeys=i,this.client_id=o,this.client_secret=s,this.response_type=u,this.scope=c,this.redirect_uri=a,this.post_logout_redirect_uri=l,this.client_authentication=f,this.prompt=p,this.display=g,this.max_age=w,this.ui_locales=P,this.acr_values=I,this.resource=D,this.response_mode=z,this.filterProtocolClaims=h!=null?h:!0,this.loadUserInfo=!!v,this.staleStateAgeInSeconds=U,this.mergeClaimsStrategy=j,this.omitScopeWhenRequesting=Rr,this.disablePKCE=!!O,this.revokeTokenAdditionalContentTypes=q,this.fetchRequestCredentials=F||"same-origin",this.requestTimeoutInSeconds=b,A)this.stateStore=A;else{let du=typeof window!="undefined"?window.localStorage:new Qa;this.stateStore=new At({store:du})}if(this.refreshTokenAllowedScope=_e,this.extraQueryParams=pe,this.extraTokenParams=Pt,this.extraHeaders=jt,this.dpop=Je,this.dpop&&!((Fa=this.dpop)!=null&&Fa.store))throw new Error("A DPoPStore is required when dpop is enabled")}},Ou=class{constructor(e,r){this._settings=e,this._metadataService=r,this._logger=new E("UserInfoService"),this._getClaimsFromJwt=n=>_(this,null,function*(){let i=this._logger.create("_getClaimsFromJwt");try{let t=Zt.decode(n);return i.debug("JWT decoding successful"),t}catch(t){throw i.error("Error parsing JWT response"),t}}),this._jsonService=new Hr(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}getClaims(e){return _(this,null,function*(){let r=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));let n=yield this._metadataService.getUserInfoEndpoint();r.debug("got userinfo url",n);let i=yield this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return r.debug("got claims",i),i})}},es=class{constructor(e,r){this._settings=e,this._metadataService=r,this._logger=new E("TokenClient"),this._jsonService=new Hr(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}exchangeCode(s){return _(this,null,function*(){var u=s,{grant_type:e="authorization_code",redirect_uri:r=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:i=this._settings.client_secret,extraHeaders:t}=u,o=W(u,["grant_type","redirect_uri","client_id","client_secret","extraHeaders"]);let c=this._logger.create("exchangeCode");n||c.throw(new Error("A client_id is required")),r||c.throw(new Error("A redirect_uri is required")),o.code||c.throw(new Error("A code is required"));let a=new URLSearchParams({grant_type:e,redirect_uri:r});for(let[g,w]of Object.entries(o))w!=null&&a.set(g,w);let l;switch(this._settings.client_authentication){case"client_secret_basic":if(i==null)throw c.throw(new Error("A client_secret is required")),null;l=K.generateBasicAuth(n,i);break;case"client_secret_post":a.append("client_id",n),i&&a.append("client_secret",i);break}let f=yield this._metadataService.getTokenEndpoint(!1);c.debug("got token endpoint");let p=yield this._jsonService.postForm(f,{body:a,basicAuth:l,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:t});return c.debug("got response"),p})}exchangeCredentials(o){return _(this,null,function*(){var s=o,{grant_type:e="password",client_id:r=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:i=this._settings.scope}=s,t=W(s,["grant_type","client_id","client_secret","scope"]);let u=this._logger.create("exchangeCredentials");r||u.throw(new Error("A client_id is required"));let c=new URLSearchParams({grant_type:e});this._settings.omitScopeWhenRequesting||c.set("scope",i);for(let[p,g]of Object.entries(t))g!=null&&c.set(p,g);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(n==null)throw u.throw(new Error("A client_secret is required")),null;a=K.generateBasicAuth(r,n);break;case"client_secret_post":c.append("client_id",r),n&&c.append("client_secret",n);break}let l=yield this._metadataService.getTokenEndpoint(!1);u.debug("got token endpoint");let f=yield this._jsonService.postForm(l,{body:c,basicAuth:a,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return u.debug("got response"),f})}exchangeRefreshToken(s){return _(this,null,function*(){var u=s,{grant_type:e="refresh_token",client_id:r=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:i,extraHeaders:t}=u,o=W(u,["grant_type","client_id","client_secret","timeoutInSeconds","extraHeaders"]);let c=this._logger.create("exchangeRefreshToken");r||c.throw(new Error("A client_id is required")),o.refresh_token||c.throw(new Error("A refresh_token is required"));let a=new URLSearchParams({grant_type:e});for(let[g,w]of Object.entries(o))Array.isArray(w)?w.forEach(P=>a.append(g,P)):w!=null&&a.set(g,w);let l;switch(this._settings.client_authentication){case"client_secret_basic":if(n==null)throw c.throw(new Error("A client_secret is required")),null;l=K.generateBasicAuth(r,n);break;case"client_secret_post":a.append("client_id",r),n&&a.append("client_secret",n);break}let f=yield this._metadataService.getTokenEndpoint(!1);c.debug("got token endpoint");let p=yield this._jsonService.postForm(f,{body:a,basicAuth:l,timeoutInSeconds:i,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:t});return c.debug("got response"),p})}revoke(e){return _(this,null,function*(){var r;let n=this._logger.create("revoke");e.token||n.throw(new Error("A token is required"));let i=yield this._metadataService.getRevocationEndpoint(!1);n.debug(`got revocation endpoint, revoking ${(r=e.token_type_hint)!=null?r:"default token type"}`);let t=new URLSearchParams;for(let[o,s]of Object.entries(e))s!=null&&t.set(o,s);t.set("client_id",this._settings.client_id),this._settings.client_secret&&t.set("client_secret",this._settings.client_secret),yield this._jsonService.postForm(i,{body:t,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),n.debug("got response")})}},Nu=class{constructor(e,r,n){this._settings=e,this._metadataService=r,this._claimsService=n,this._logger=new E("ResponseValidator"),this._userInfoService=new Ou(this._settings,this._metadataService),this._tokenClient=new es(this._settings,this._metadataService)}validateSigninResponse(e,r,n){return _(this,null,function*(){let i=this._logger.create("validateSigninResponse");this._processSigninState(e,r),i.debug("state processed"),yield this._processCode(e,r,n),i.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e),i.debug("tokens validated"),yield this._processClaims(e,r==null?void 0:r.skipUserInfo,e.isOpenId),i.debug("claims processed")})}validateCredentialsResponse(e,r){return _(this,null,function*(){let n=this._logger.create("validateCredentialsResponse"),i=e.isOpenId&&!!e.id_token;i&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),yield this._processClaims(e,r,i),n.debug("claims processed")})}validateRefreshResponse(e,r){return _(this,null,function*(){var n,i;let t=this._logger.create("validateRefreshResponse");e.userState=r.data,(n=e.session_state)!=null||(e.session_state=r.session_state),(i=e.scope)!=null||(e.scope=r.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,r.id_token),t.debug("ID Token validated")),e.id_token||(e.id_token=r.id_token,e.profile=r.profile);let o=e.isOpenId&&!!e.id_token;yield this._processClaims(e,!1,o),t.debug("claims processed")})}validateSignoutResponse(e,r){let n=this._logger.create("validateSignoutResponse");if(r.id!==e.state&&n.throw(new Error("State does not match")),n.debug("state validated"),e.userState=r.data,e.error)throw n.warn("Response was error",e.error),new ye(e)}_processSigninState(e,r){var n;let i=this._logger.create("_processSigninState");if(r.id!==e.state&&i.throw(new Error("State does not match")),r.client_id||i.throw(new Error("No client_id on state")),r.authority||i.throw(new Error("No authority on state")),this._settings.authority!==r.authority&&i.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==r.client_id&&i.throw(new Error("client_id mismatch on settings vs. signin state")),i.debug("state validated"),e.userState=r.data,e.url_state=r.url_state,(n=e.scope)!=null||(e.scope=r.scope),e.error)throw i.warn("Response was error",e.error),new ye(e);r.code_verifier&&!e.code&&i.throw(new Error("Expected code in response"))}_processClaims(e,r=!1,n=!0){return _(this,null,function*(){let i=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),r||!this._settings.loadUserInfo||!e.access_token){i.debug("not loading user info");return}i.debug("loading user info");let t=yield this._userInfoService.getClaims(e.access_token);i.debug("user info claims received from user info endpoint"),n&&t.sub!==e.profile.sub&&i.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(t)),i.debug("user info claims received, updated profile:",e.profile)})}_processCode(e,r,n){return _(this,null,function*(){let i=this._logger.create("_processCode");if(e.code){i.debug("Validating code");let t=yield this._tokenClient.exchangeCode(d({client_id:r.client_id,client_secret:r.client_secret,code:e.code,redirect_uri:r.redirect_uri,code_verifier:r.code_verifier,extraHeaders:n},r.extraTokenParams));Object.assign(e,t)}else i.debug("No code to process")})}_validateIdTokenAttributes(e,r){var n;let i=this._logger.create("_validateIdTokenAttributes");i.debug("decoding ID Token JWT");let t=Zt.decode((n=e.id_token)!=null?n:"");if(t.sub||i.throw(new Error("ID Token is missing a subject claim")),r){let o=Zt.decode(r);t.sub!==o.sub&&i.throw(new Error("sub in id_token does not match current sub")),t.auth_time&&t.auth_time!==o.auth_time&&i.throw(new Error("auth_time in id_token does not match original auth_time")),t.azp&&t.azp!==o.azp&&i.throw(new Error("azp in id_token does not match original azp")),!t.azp&&o.azp&&i.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=t}},Dt=class Wr{constructor(r){this.id=r.id||K.generateUUIDv4(),this.data=r.data,r.created&&r.created>0?this.created=r.created:this.created=ae.getEpochTime(),this.request_type=r.request_type,this.url_state=r.url_state}toStorageString(){return new E("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(r){return E.createStatic("State","fromStorageString"),Promise.resolve(new Wr(JSON.parse(r)))}static clearStaleState(r,n){return _(this,null,function*(){let i=E.createStatic("State","clearStaleState"),t=ae.getEpochTime()-n,o=yield r.getAllKeys();i.debug("got keys",o);for(let s=0;s<o.length;s++){let u=o[s],c=yield r.get(u),a=!1;if(c)try{let l=yield Wr.fromStorageString(c);i.debug("got item from key:",u,l.created),l.created<=t&&(a=!0)}catch(l){i.error("Error parsing state for key:",u,l),a=!0}else i.debug("no item in storage for key:",u),a=!0;a&&(i.debug("removed item for key:",u),r.remove(u))}})}},ts=class Kr extends Dt{constructor(r){super(r),this.code_verifier=r.code_verifier,this.code_challenge=r.code_challenge,this.authority=r.authority,this.client_id=r.client_id,this.redirect_uri=r.redirect_uri,this.scope=r.scope,this.client_secret=r.client_secret,this.extraTokenParams=r.extraTokenParams,this.response_mode=r.response_mode,this.skipUserInfo=r.skipUserInfo}static create(r){return _(this,null,function*(){let n=r.code_verifier===!0?K.generateCodeVerifier():r.code_verifier||void 0,i=n?yield K.generateCodeChallenge(n):void 0;return new Kr(S(d({},r),{code_verifier:n,code_challenge:i}))})}toStorageString(){return new E("SigninState").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo})}static fromStorageString(r){E.createStatic("SigninState","fromStorageString");let n=JSON.parse(r);return Kr.create(n)}},rs=class ns{constructor(r){this.url=r.url,this.state=r.state}static create(b){return _(this,null,function*(){var U=b,{url:r,authority:n,client_id:i,redirect_uri:t,response_type:o,scope:s,state_data:u,response_mode:c,request_type:a,client_secret:l,nonce:f,url_state:p,resource:g,skipUserInfo:w,extraQueryParams:P,extraTokenParams:I,disablePKCE:D,dpopJkt:z,omitScopeWhenRequesting:h}=U,v=W(U,["url","authority","client_id","redirect_uri","response_type","scope","state_data","response_mode","request_type","client_secret","nonce","url_state","resource","skipUserInfo","extraQueryParams","extraTokenParams","disablePKCE","dpopJkt","omitScopeWhenRequesting"]);if(!r)throw this._logger.error("create: No url passed"),new Error("url");if(!i)throw this._logger.error("create: No client_id passed"),new Error("client_id");if(!t)throw this._logger.error("create: No redirect_uri passed"),new Error("redirect_uri");if(!o)throw this._logger.error("create: No response_type passed"),new Error("response_type");if(!s)throw this._logger.error("create: No scope passed"),new Error("scope");if(!n)throw this._logger.error("create: No authority passed"),new Error("authority");let j=yield ts.create({data:u,request_type:a,url_state:p,code_verifier:!D,client_id:i,authority:n,redirect_uri:t,response_mode:c,client_secret:l,scope:s,extraTokenParams:I,skipUserInfo:w}),O=new URL(r);O.searchParams.append("client_id",i),O.searchParams.append("redirect_uri",t),O.searchParams.append("response_type",o),h||O.searchParams.append("scope",s),f&&O.searchParams.append("nonce",f),z&&O.searchParams.append("dpop_jkt",z);let A=j.id;p&&(A=`${A}${Ue}${p}`),O.searchParams.append("state",A),j.code_challenge&&(O.searchParams.append("code_challenge",j.code_challenge),O.searchParams.append("code_challenge_method","S256")),g&&(Array.isArray(g)?g:[g]).forEach(F=>O.searchParams.append("resource",F));for(let[q,F]of Object.entries(d(d({response_mode:c},v),P)))F!=null&&O.searchParams.append(q,F.toString());return new ns({url:O.href,state:j})})}};rs._logger=new E("SigninRequest");var Tu=rs,Eu="openid",Mr=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){let r=decodeURIComponent(this.state).split(Ue);this.state=r[0],r.length>1&&(this.url_state=r.slice(1).join(Ue))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-ae.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+ae.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(Eu))||!!this.id_token}},Zu=class{constructor({url:e,state_data:r,id_token_hint:n,post_logout_redirect_uri:i,extraQueryParams:t,request_type:o,client_id:s,url_state:u}){if(this._logger=new E("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");let c=new URL(e);if(n&&c.searchParams.append("id_token_hint",n),s&&c.searchParams.append("client_id",s),i&&(c.searchParams.append("post_logout_redirect_uri",i),r||u)){this.state=new Dt({data:r,request_type:o,url_state:u});let a=this.state.id;u&&(a=`${a}${Ue}${u}`),c.searchParams.append("state",a)}for(let[a,l]of Object.entries(d({},t)))l!=null&&c.searchParams.append(a,l.toString());this.url=c.href}},Du=class{constructor(e){if(this.state=e.get("state"),this.state){let r=decodeURIComponent(this.state).split(Ue);this.state=r[0],r.length>1&&(this.url_state=r.slice(1).join(Ue))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},Au=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],Ru=["sub","iss","aud","exp","iat"],Cu=class{constructor(e){this._settings=e,this._logger=new E("ClaimsService")}filterProtocolClaims(e){let r=d({},e);if(this._settings.filterProtocolClaims){let n;Array.isArray(this._settings.filterProtocolClaims)?n=this._settings.filterProtocolClaims:n=Au;for(let i of n)Ru.includes(i)||delete r[i]}return r}mergeClaims(e,r){let n=d({},e);for(let[i,t]of Object.entries(r))if(n[i]!==t)if(Array.isArray(n[i])||Array.isArray(t))if(this._settings.mergeClaimsStrategy.array=="replace")n[i]=t;else{let o=Array.isArray(n[i])?n[i]:[n[i]];for(let s of Array.isArray(t)?t:[t])o.includes(s)||o.push(s);n[i]=o}else typeof n[i]=="object"&&typeof t=="object"?n[i]=this.mergeClaims(n[i],t):n[i]=t;return n}},is=class{constructor(e,r){this.keys=e,this.nonce=r}},Lu=class{constructor(e,r){this._logger=new E("OidcClient"),this.settings=e instanceof qr?e:new qr(e),this.metadataService=r!=null?r:new Iu(this.settings),this._claimsService=new Cu(this.settings),this._validator=new Nu(this.settings,this.metadataService,this._claimsService),this._tokenClient=new es(this.settings,this.metadataService)}createSigninRequest(j){return _(this,arguments,function*({state:e,request:r,request_uri:n,request_type:i,id_token_hint:t,login_hint:o,skipUserInfo:s,nonce:u,url_state:c,response_type:a=this.settings.response_type,scope:l=this.settings.scope,redirect_uri:f=this.settings.redirect_uri,prompt:p=this.settings.prompt,display:g=this.settings.display,max_age:w=this.settings.max_age,ui_locales:P=this.settings.ui_locales,acr_values:I=this.settings.acr_values,resource:D=this.settings.resource,response_mode:z=this.settings.response_mode,extraQueryParams:h=this.settings.extraQueryParams,extraTokenParams:v=this.settings.extraTokenParams,dpopJkt:b,omitScopeWhenRequesting:U=this.settings.omitScopeWhenRequesting}){let O=this._logger.create("createSigninRequest");if(a!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");let A=yield this.metadataService.getAuthorizationEndpoint();O.debug("Received authorization endpoint",A);let q=yield Tu.create({url:A,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:f,response_type:a,scope:l,state_data:e,url_state:c,prompt:p,display:g,max_age:w,ui_locales:P,id_token_hint:t,login_hint:o,acr_values:I,dpopJkt:b,resource:D,request:r,request_uri:n,extraQueryParams:h,extraTokenParams:v,request_type:i,response_mode:z,client_secret:this.settings.client_secret,skipUserInfo:s,nonce:u,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:U});yield this.clearStaleState();let F=q.state;return yield this.settings.stateStore.set(F.id,F.toStorageString()),q})}readSigninResponseState(e,r=!1){return _(this,null,function*(){let n=this._logger.create("readSigninResponseState"),i=new Mr(Jr.readParams(e,this.settings.response_mode));if(!i.state)throw n.throw(new Error("No state in response")),null;let t=yield this.settings.stateStore[r?"remove":"get"](i.state);if(!t)throw n.throw(new Error("No matching state found in storage")),null;return{state:yield ts.fromStorageString(t),response:i}})}processSigninResponse(e,r,n=!0){return _(this,null,function*(){let i=this._logger.create("processSigninResponse"),{state:t,response:o}=yield this.readSigninResponseState(e,n);if(i.debug("received state from storage; validating response"),this.settings.dpop&&this.settings.dpop.store){let s=yield this.getDpopProof(this.settings.dpop.store);r=S(d({},r),{DPoP:s})}try{yield this._validator.validateSigninResponse(o,t,r)}catch(s){if(s instanceof Fr&&this.settings.dpop){let u=yield this.getDpopProof(this.settings.dpop.store,s.nonce);r.DPoP=u,yield this._validator.validateSigninResponse(o,t,r)}else throw s}return o})}getDpopProof(e,r){return _(this,null,function*(){let n,i;return(yield e.getAllKeys()).includes(this.settings.client_id)?(i=yield e.get(this.settings.client_id),i.nonce!==r&&r&&(i.nonce=r,yield e.set(this.settings.client_id,i))):(n=yield K.generateDPoPKeys(),i=new is(n,r),yield e.set(this.settings.client_id,i)),yield K.generateDPoPProof({url:yield this.metadataService.getTokenEndpoint(!1),httpMethod:"POST",keyPair:i.keys,nonce:i.nonce})})}processResourceOwnerPasswordCredentials(t){return _(this,arguments,function*({username:e,password:r,skipUserInfo:n=!1,extraTokenParams:i={}}){let o=yield this._tokenClient.exchangeCredentials(d({username:e,password:r},i)),s=new Mr(new URLSearchParams);return Object.assign(s,o),yield this._validator.validateCredentialsResponse(s,n),s})}useRefreshToken(s){return _(this,arguments,function*({state:e,redirect_uri:r,resource:n,timeoutInSeconds:i,extraHeaders:t,extraTokenParams:o}){var u;let c=this._logger.create("useRefreshToken"),a;if(this.settings.refreshTokenAllowedScope===void 0)a=e.scope;else{let p=this.settings.refreshTokenAllowedScope.split(" ");a=(((u=e.scope)==null?void 0:u.split(" "))||[]).filter(w=>p.includes(w)).join(" ")}if(this.settings.dpop&&this.settings.dpop.store){let p=yield this.getDpopProof(this.settings.dpop.store);t=S(d({},t),{DPoP:p})}let l;try{l=yield this._tokenClient.exchangeRefreshToken(d({refresh_token:e.refresh_token,scope:a,redirect_uri:r,resource:n,timeoutInSeconds:i,extraHeaders:t},o))}catch(p){if(p instanceof Fr&&this.settings.dpop)t.DPoP=yield this.getDpopProof(this.settings.dpop.store,p.nonce),l=yield this._tokenClient.exchangeRefreshToken(d({refresh_token:e.refresh_token,scope:a,redirect_uri:r,resource:n,timeoutInSeconds:i,extraHeaders:t},o));else throw p}let f=new Mr(new URLSearchParams);return Object.assign(f,l),c.debug("validating response",f),yield this._validator.validateRefreshResponse(f,S(d({},e),{scope:a})),f})}createSignoutRequest(){return _(this,arguments,function*({state:e,id_token_hint:r,client_id:n,request_type:i,url_state:t,post_logout_redirect_uri:o=this.settings.post_logout_redirect_uri,extraQueryParams:s=this.settings.extraQueryParams}={}){let u=this._logger.create("createSignoutRequest"),c=yield this.metadataService.getEndSessionEndpoint();if(!c)throw u.throw(new Error("No end session endpoint")),null;u.debug("Received end session endpoint",c),!n&&o&&!r&&(n=this.settings.client_id);let a=new Zu({url:c,id_token_hint:r,client_id:n,post_logout_redirect_uri:o,state_data:e,extraQueryParams:s,request_type:i,url_state:t});yield this.clearStaleState();let l=a.state;return l&&(u.debug("Signout request has state to persist"),yield this.settings.stateStore.set(l.id,l.toStorageString())),a})}readSignoutResponseState(e,r=!1){return _(this,null,function*(){let n=this._logger.create("readSignoutResponseState"),i=new Du(Jr.readParams(e,this.settings.response_mode));if(!i.state){if(n.debug("No state in response"),i.error)throw n.warn("Response was error:",i.error),new ye(i);return{state:void 0,response:i}}let t=yield this.settings.stateStore[r?"remove":"get"](i.state);if(!t)throw n.throw(new Error("No matching state found in storage")),null;return{state:yield Dt.fromStorageString(t),response:i}})}processSignoutResponse(e){return _(this,null,function*(){let r=this._logger.create("processSignoutResponse"),{state:n,response:i}=yield this.readSignoutResponseState(e,!0);return n?(r.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(i,n)):r.debug("No state from storage; skipping response validation"),i})}clearStaleState(){return this._logger.create("clearStaleState"),Dt.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}revokeToken(e,r){return _(this,null,function*(){return this._logger.create("revokeToken"),yield this._tokenClient.revoke({token:e,token_type_hint:r})})}},Mu=class{constructor(e){this._userManager=e,this._logger=new E("SessionMonitor"),this._start=r=>_(this,null,function*(){let n=r.session_state;if(!n)return;let i=this._logger.create("_start");if(r.profile?(this._sub=r.profile.sub,i.debug("session_state",n,", sub",this._sub)):(this._sub=void 0,i.debug("session_state",n,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(n);return}try{let t=yield this._userManager.metadataService.getCheckSessionIframe();if(t){i.debug("initializing check session iframe");let o=this._userManager.settings.client_id,s=this._userManager.settings.checkSessionIntervalInSeconds,u=this._userManager.settings.stopCheckSessionOnError,c=new Su(this._callback,o,t,s,u);yield c.load(),this._checkSessionIFrame=c,c.start(n)}else i.warn("no check session iframe found in the metadata")}catch(t){i.error("Error from getCheckSessionIframe:",t instanceof Error?t.message:t)}}),this._stop=()=>{let r=this._logger.create("_stop");if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){let n=setInterval(()=>_(this,null,function*(){clearInterval(n);try{let i=yield this._userManager.querySessionStatus();if(i){let t={session_state:i.session_state,profile:i.sub?{sub:i.sub}:null};this._start(t)}}catch(i){r.error("error from querySessionStatus",i instanceof Error?i.message:i)}}),1e3)}},this._callback=()=>_(this,null,function*(){let r=this._logger.create("_callback");try{let n=yield this._userManager.querySessionStatus(),i=!0;n&&this._checkSessionIFrame?n.sub===this._sub?(i=!1,this._checkSessionIFrame.start(n.session_state),r.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",n.session_state),yield this._userManager.events._raiseUserSessionChanged()):r.debug("different subject signed into OP",n.sub):r.debug("subject no longer signed into OP"),i?this._sub?yield this._userManager.events._raiseUserSignedOut():yield this._userManager.events._raiseUserSignedIn():r.debug("no change in session detected, no event to raise")}catch(n){this._sub&&(r.debug("Error calling queryCurrentSigninSession; raising signed out event",n),yield this._userManager.events._raiseUserSignedOut())}}),e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(r=>{this._logger.error(r)})}_init(){return _(this,null,function*(){this._logger.create("_init");let e=yield this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){let r=yield this._userManager.querySessionStatus();if(r){let n={session_state:r.session_state,profile:r.sub?{sub:r.sub}:null};this._start(n)}}})}},je=class os{constructor(r){var n;this.id_token=r.id_token,this.session_state=(n=r.session_state)!=null?n:null,this.access_token=r.access_token,this.refresh_token=r.refresh_token,this.token_type=r.token_type,this.scope=r.scope,this.profile=r.profile,this.expires_at=r.expires_at,this.state=r.userState,this.url_state=r.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-ae.getEpochTime()}set expires_in(r){r!==void 0&&(this.expires_at=Math.floor(r)+ae.getEpochTime())}get expired(){let r=this.expires_in;if(r!==void 0)return r<=0}get scopes(){var r,n;return(n=(r=this.scope)==null?void 0:r.split(" "))!=null?n:[]}toStorageString(){return new E("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(r){return E.createStatic("User","fromStorageString"),new os(JSON.parse(r))}},Ga="oidc-client",as=class{constructor(){this._abort=new ge("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}navigate(e){return _(this,null,function*(){let r=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");r.debug("setting URL in window"),this._window.location.replace(e.url);let{url:n,keepOpen:i}=yield new Promise((t,o)=>{let s=c=>{var a;let l=c.data,f=(a=e.scriptOrigin)!=null?a:window.location.origin;if(!(c.origin!==f||(l==null?void 0:l.source)!==Ga)){try{let p=Jr.readParams(l.url,e.response_mode).get("state");if(p||r.warn("no state found in response url"),c.source!==this._window&&p!==e.state)return}catch(p){this._dispose(),o(new Error("Invalid response from window"))}t(l)}};window.addEventListener("message",s,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",s,!1));let u=new BroadcastChannel(`oidc-client-popup-${e.state}`);u.addEventListener("message",s,!1),this._disposeHandlers.add(()=>u.close()),this._disposeHandlers.add(this._abort.addHandler(c=>{this._dispose(),o(c)}))});return r.debug("got response from window"),this._dispose(),i||this.close(),{url:n}})}_dispose(){this._logger.create("_dispose");for(let e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,r,n=!1,i=window.location.origin){let t={source:Ga,url:r,keepOpen:n},o=new E("_notifyParent");if(e)o.debug("With parent. Using parent.postMessage."),e.postMessage(t,i);else{o.debug("No parent. Using BroadcastChannel.");let s=new URL(r).searchParams.get("state");if(!s)throw new Error("No parent and no state in URL. Can't complete notification.");let u=new BroadcastChannel(`oidc-client-popup-${s}`);u.postMessage(t),u.close()}}},ss={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},cs="_blank",Vu=60,Ju=2,us=10,Fu=class extends qr{constructor(e){let{popup_redirect_uri:r=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:i=ss,popupWindowTarget:t=cs,redirectMethod:o="assign",redirectTarget:s="self",iframeNotifyParentOrigin:u=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,requestTimeoutInSeconds:a,silent_redirect_uri:l=e.redirect_uri,silentRequestTimeoutInSeconds:f,automaticSilentRenew:p=!0,validateSubOnSilentRenew:g=!0,includeIdTokenInSilentRenew:w=!1,monitorSession:P=!1,monitorAnonymousSession:I=!1,checkSessionIntervalInSeconds:D=Ju,query_status_response_type:z="code",stopCheckSessionOnError:h=!0,revokeTokenTypes:v=["access_token","refresh_token"],revokeTokensOnSignout:b=!1,includeIdTokenInSilentSignout:U=!1,accessTokenExpiringNotificationTimeInSeconds:j=Vu,userStore:O}=e;if(super(e),this.popup_redirect_uri=r,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=i,this.popupWindowTarget=t,this.redirectMethod=o,this.redirectTarget=s,this.iframeNotifyParentOrigin=u,this.iframeScriptOrigin=c,this.silent_redirect_uri=l,this.silentRequestTimeoutInSeconds=f||a||us,this.automaticSilentRenew=p,this.validateSubOnSilentRenew=g,this.includeIdTokenInSilentRenew=w,this.monitorSession=P,this.monitorAnonymousSession=I,this.checkSessionIntervalInSeconds=D,this.stopCheckSessionOnError=h,this.query_status_response_type=z,this.revokeTokenTypes=v,this.revokeTokensOnSignout=b,this.includeIdTokenInSilentSignout=U,this.accessTokenExpiringNotificationTimeInSeconds=j,O)this.userStore=O;else{let A=typeof window!="undefined"?window.sessionStorage:new Qa;this.userStore=new At({store:A})}}},Ha=class Br extends as{constructor({silentRequestTimeoutInSeconds:r=us}){super(),this._logger=new E("IFrameWindow"),this._timeoutInSeconds=r,this._frame=Br.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){let r=window.document.createElement("iframe");return r.style.visibility="hidden",r.style.position="fixed",r.style.left="-1000px",r.style.top="0",r.width="0",r.height="0",window.document.body.appendChild(r),r}navigate(r){return _(this,null,function*(){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);let n=setTimeout(()=>void this._abort.raise(new Gr("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(n)),yield Fe(Br.prototype,this,"navigate").call(this,r)})}close(){var r;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",n=>{var i;let t=n.target;(i=t.parentNode)==null||i.removeChild(t),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(r=this._frame.contentWindow)==null||r.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(r,n){return super._notifyParent(window.parent,r,!1,n)}},qu=class{constructor(e){this._settings=e,this._logger=new E("IFrameNavigator")}prepare(r){return _(this,arguments,function*({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new Ha({silentRequestTimeoutInSeconds:e})})}callback(e){return _(this,null,function*(){this._logger.create("callback"),Ha.notifyParent(e,this._settings.iframeNotifyParentOrigin)})}},Wu=500,Ku=1e3,Xa=class e extends as{constructor({popupWindowTarget:r=cs,popupWindowFeatures:n={},popupSignal:i}){super(),this._logger=new E("PopupWindow");let t=Ba.center(d(d({},ss),n));this._window=window.open(void 0,r,Ba.serialize(t)),i&&i.addEventListener("abort",()=>{var o;this._abort.raise(new Error((o=i.reason)!=null?o:"Popup aborted"))}),n.closePopupWindowAfterInSeconds&&n.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},n.closePopupWindowAfterInSeconds*Ku)}navigate(r){return _(this,null,function*(){var n;(n=this._window)==null||n.focus();let i=setInterval(()=>{(!this._window||this._window.closed)&&(this._logger.debug("Popup closed by user or isolated by redirect"),t(),this._disposeHandlers.delete(t))},Wu),t=()=>clearInterval(i);return this._disposeHandlers.add(t),yield Fe(e.prototype,this,"navigate").call(this,r)})}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(r,n){super._notifyParent(window.opener,r,n),!n&&!window.opener&&window.close()}},Bu=class{constructor(e){this._settings=e,this._logger=new E("PopupNavigator")}prepare(i){return _(this,arguments,function*({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:r=this._settings.popupWindowTarget,popupSignal:n}){return new Xa({popupWindowFeatures:e,popupWindowTarget:r,popupSignal:n})})}callback(n,i){return _(this,arguments,function*(e,{keepOpen:r=!1}){this._logger.create("callback"),Xa.notifyOpener(e,r)})}},Gu=class{constructor(e){this._settings=e,this._logger=new E("RedirectNavigator")}prepare(n){return _(this,arguments,function*({redirectMethod:e=this._settings.redirectMethod,redirectTarget:r=this._settings.redirectTarget}){var i;this._logger.create("prepare");let t=window.self;r==="top"&&(t=(i=window.top)!=null?i:window.self);let o=t.location[e].bind(t.location),s;return{navigate:u=>_(this,null,function*(){this._logger.create("navigate");let c=new Promise((a,l)=>{s=l});return o(u.url),yield c}),close:()=>{this._logger.create("close"),s==null||s(new Error("Redirect aborted")),t.stop()}}})}callback(){return _(this,null,function*(){})}},Hu=class e extends xu{constructor(r){super({expiringNotificationTimeInSeconds:r.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new E("UserManagerEvents"),this._userLoaded=new ge("User loaded"),this._userUnloaded=new ge("User unloaded"),this._silentRenewError=new ge("Silent renew error"),this._userSignedIn=new ge("User signed in"),this._userSignedOut=new ge("User signed out"),this._userSessionChanged=new ge("User session changed")}load(r,n=!0){return _(this,null,function*(){yield Fe(e.prototype,this,"load").call(this,r),n&&(yield this._userLoaded.raise(r))})}unload(){return _(this,null,function*(){yield Fe(e.prototype,this,"unload").call(this),yield this._userUnloaded.raise()})}addUserLoaded(r){return this._userLoaded.addHandler(r)}removeUserLoaded(r){return this._userLoaded.removeHandler(r)}addUserUnloaded(r){return this._userUnloaded.addHandler(r)}removeUserUnloaded(r){return this._userUnloaded.removeHandler(r)}addSilentRenewError(r){return this._silentRenewError.addHandler(r)}removeSilentRenewError(r){return this._silentRenewError.removeHandler(r)}_raiseSilentRenewError(r){return _(this,null,function*(){yield this._silentRenewError.raise(r)})}addUserSignedIn(r){return this._userSignedIn.addHandler(r)}removeUserSignedIn(r){this._userSignedIn.removeHandler(r)}_raiseUserSignedIn(){return _(this,null,function*(){yield this._userSignedIn.raise()})}addUserSignedOut(r){return this._userSignedOut.addHandler(r)}removeUserSignedOut(r){this._userSignedOut.removeHandler(r)}_raiseUserSignedOut(){return _(this,null,function*(){yield this._userSignedOut.raise()})}addUserSessionChanged(r){return this._userSessionChanged.addHandler(r)}removeUserSessionChanged(r){this._userSessionChanged.removeHandler(r)}_raiseUserSessionChanged(){return _(this,null,function*(){yield this._userSessionChanged.raise()})}},Xu=class{constructor(e){this._userManager=e,this._logger=new E("SilentRenewService"),this._isStarted=!1,this._retryTimer=new ae("Retry Silent Renew"),this._tokenExpiring=()=>_(this,null,function*(){let r=this._logger.create("_tokenExpiring");try{yield this._userManager.signinSilent(),r.debug("silent token renewal successful")}catch(n){if(n instanceof Gr){r.warn("ErrorTimeout from signinSilent:",n,"retry in 5s"),this._retryTimer.init(5);return}r.error("Error from signinSilent:",n),yield this._userManager.events._raiseSilentRenewError(n)}})}start(){return _(this,null,function*(){let e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{yield this._userManager.getUser()}catch(r){e.error("getUser error",r)}}})}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},Yu=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},ls=class{constructor(e,r,n,i){this._logger=new E("UserManager"),this.settings=new Fu(e),this._client=new Lu(e),this._redirectNavigator=r!=null?r:new Gu(this.settings),this._popupNavigator=n!=null?n:new Bu(this.settings),this._iframeNavigator=i!=null?i:new qu(this.settings),this._events=new Hu(this.settings),this._silentRenewService=new Xu(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new Mu(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}getUser(e=!1){return _(this,null,function*(){let r=this._logger.create("getUser"),n=yield this._loadUser();return n?(r.info("user loaded"),yield this._events.load(n,e),n):(r.info("user not found in storage"),null)})}removeUser(){return _(this,null,function*(){let e=this._logger.create("removeUser");yield this.storeUser(null),e.info("user removed from storage"),yield this._events.unload()})}signinRedirect(){return _(this,arguments,function*(e={}){var r;this._logger.create("signinRedirect");let s=e,{redirectMethod:n}=s,i=W(s,["redirectMethod"]),t;(r=this.settings.dpop)!=null&&r.bind_authorization_code&&(t=yield this.generateDPoPJkt(this.settings.dpop));let o=yield this._redirectNavigator.prepare({redirectMethod:n});yield this._signinStart(d({request_type:"si:r",dpopJkt:t},i),o)})}signinRedirectCallback(){return _(this,arguments,function*(e=window.location.href){let r=this._logger.create("signinRedirectCallback"),n=yield this._signinEnd(e);return n.profile&&n.profile.sub?r.info("success, signed in subject",n.profile.sub):r.info("no subject"),n})}signinResourceOwnerCredentials(i){return _(this,arguments,function*({username:e,password:r,skipUserInfo:n=!1}){let t=this._logger.create("signinResourceOwnerCredential"),o=yield this._client.processResourceOwnerPasswordCredentials({username:e,password:r,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});t.debug("got signin response");let s=yield this._buildUser(o);return s.profile&&s.profile.sub?t.info("success, signed in subject",s.profile.sub):t.info("no subject"),s})}signinPopup(){return _(this,arguments,function*(e={}){var r;let n=this._logger.create("signinPopup"),i;(r=this.settings.dpop)!=null&&r.bind_authorization_code&&(i=yield this.generateDPoPJkt(this.settings.dpop));let f=e,{popupWindowFeatures:t,popupWindowTarget:o,popupSignal:s}=f,u=W(f,["popupWindowFeatures","popupWindowTarget","popupSignal"]),c=this.settings.popup_redirect_uri;c||n.throw(new Error("No popup_redirect_uri configured"));let a=yield this._popupNavigator.prepare({popupWindowFeatures:t,popupWindowTarget:o,popupSignal:s}),l=yield this._signin(d({request_type:"si:p",redirect_uri:c,display:"popup",dpopJkt:i},u),a);return l&&(l.profile&&l.profile.sub?n.info("success, signed in subject",l.profile.sub):n.info("no subject")),l})}signinPopupCallback(){return _(this,arguments,function*(e=window.location.href,r=!1){let n=this._logger.create("signinPopupCallback");yield this._popupNavigator.callback(e,{keepOpen:r}),n.info("success")})}signinSilent(){return _(this,arguments,function*(e={}){var r,n;let i=this._logger.create("signinSilent"),f=e,{silentRequestTimeoutInSeconds:t}=f,o=W(f,["silentRequestTimeoutInSeconds"]),s=yield this._loadUser();if(s!=null&&s.refresh_token){i.debug("using refresh token");let p=new Yu(s);return yield this._useRefreshToken({state:p,redirect_uri:o.redirect_uri,resource:o.resource,extraTokenParams:o.extraTokenParams,timeoutInSeconds:t})}let u;(r=this.settings.dpop)!=null&&r.bind_authorization_code&&(u=yield this.generateDPoPJkt(this.settings.dpop));let c=this.settings.silent_redirect_uri;c||i.throw(new Error("No silent_redirect_uri configured"));let a;s&&this.settings.validateSubOnSilentRenew&&(i.debug("subject prior to silent renew:",s.profile.sub),a=s.profile.sub);let l=yield this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:t});return s=yield this._signin(d({request_type:"si:s",redirect_uri:c,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?s==null?void 0:s.id_token:void 0,dpopJkt:u},o),l,a),s&&((n=s.profile)!=null&&n.sub?i.info("success, signed in subject",s.profile.sub):i.info("no subject")),s})}_useRefreshToken(e){return _(this,null,function*(){let r=yield this._client.useRefreshToken(d({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds},e)),n=new je(d(d({},e.state),r));return yield this.storeUser(n),yield this._events.load(n),n})}signinSilentCallback(){return _(this,arguments,function*(e=window.location.href){let r=this._logger.create("signinSilentCallback");yield this._iframeNavigator.callback(e),r.info("success")})}signinCallback(){return _(this,arguments,function*(e=window.location.href){let{state:r}=yield this._client.readSigninResponseState(e);switch(r.request_type){case"si:r":return yield this.signinRedirectCallback(e);case"si:p":yield this.signinPopupCallback(e);break;case"si:s":yield this.signinSilentCallback(e);break;default:throw new Error("invalid response_type in state")}})}signoutCallback(){return _(this,arguments,function*(e=window.location.href,r=!1){let{state:n}=yield this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case"so:r":return yield this.signoutRedirectCallback(e);case"so:p":yield this.signoutPopupCallback(e,r);break;case"so:s":yield this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}})}querySessionStatus(){return _(this,arguments,function*(e={}){let r=this._logger.create("querySessionStatus"),c=e,{silentRequestTimeoutInSeconds:n}=c,i=W(c,["silentRequestTimeoutInSeconds"]),t=this.settings.silent_redirect_uri;t||r.throw(new Error("No silent_redirect_uri configured"));let o=yield this._loadUser(),s=yield this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),u=yield this._signinStart(d({request_type:"si:s",redirect_uri:t,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?o==null?void 0:o.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0},i),s);try{let a={},l=yield this._client.processSigninResponse(u.url,a);return r.debug("got signin response"),l.session_state&&l.profile.sub?(r.info("success for subject",l.profile.sub),{session_state:l.session_state,sub:l.profile.sub}):(r.info("success, user not authenticated"),null)}catch(a){if(this.settings.monitorAnonymousSession&&a instanceof ye)switch(a.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return r.info("success for anonymous user"),{session_state:a.session_state}}throw a}})}_signin(e,r,n){return _(this,null,function*(){let i=yield this._signinStart(e,r);return yield this._signinEnd(i.url,n)})}_signinStart(e,r){return _(this,null,function*(){let n=this._logger.create("_signinStart");try{let i=yield this._client.createSigninRequest(e);return n.debug("got signin request"),yield r.navigate({url:i.url,state:i.state.id,response_mode:i.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(i){throw n.debug("error after preparing navigator, closing navigator window"),r.close(),i}})}_signinEnd(e,r){return _(this,null,function*(){let n=this._logger.create("_signinEnd"),i={},t=yield this._client.processSigninResponse(e,i);return n.debug("got signin response"),yield this._buildUser(t,r)})}_buildUser(e,r){return _(this,null,function*(){let n=this._logger.create("_buildUser"),i=new je(e);if(r){if(r!==i.profile.sub)throw n.debug("current user does not match user returned from signin. sub from signin:",i.profile.sub),new ye(S(d({},e),{error:"login_required"}));n.debug("current user matches user returned from signin")}return yield this.storeUser(i),n.debug("user stored"),yield this._events.load(i),i})}signoutRedirect(){return _(this,arguments,function*(e={}){let r=this._logger.create("signoutRedirect"),o=e,{redirectMethod:n}=o,i=W(o,["redirectMethod"]),t=yield this._redirectNavigator.prepare({redirectMethod:n});yield this._signoutStart(d({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri},i),t),r.info("success")})}signoutRedirectCallback(){return _(this,arguments,function*(e=window.location.href){let r=this._logger.create("signoutRedirectCallback"),n=yield this._signoutEnd(e);return r.info("success"),n})}signoutPopup(){return _(this,arguments,function*(e={}){let r=this._logger.create("signoutPopup"),c=e,{popupWindowFeatures:n,popupWindowTarget:i,popupSignal:t}=c,o=W(c,["popupWindowFeatures","popupWindowTarget","popupSignal"]),s=this.settings.popup_post_logout_redirect_uri,u=yield this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:i,popupSignal:t});yield this._signout(d({request_type:"so:p",post_logout_redirect_uri:s,state:s==null?void 0:{}},o),u),r.info("success")})}signoutPopupCallback(){return _(this,arguments,function*(e=window.location.href,r=!1){let n=this._logger.create("signoutPopupCallback");yield this._popupNavigator.callback(e,{keepOpen:r}),n.info("success")})}_signout(e,r){return _(this,null,function*(){let n=yield this._signoutStart(e,r);return yield this._signoutEnd(n.url)})}_signoutStart(){return _(this,arguments,function*(e={},r){var n;let i=this._logger.create("_signoutStart");try{let t=yield this._loadUser();i.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&(yield this._revokeInternal(t));let o=e.id_token_hint||t&&t.id_token;o&&(i.debug("setting id_token_hint in signout request"),e.id_token_hint=o),yield this.removeUser(),i.debug("user removed, creating signout request");let s=yield this._client.createSignoutRequest(e);return i.debug("got signout request"),yield r.navigate({url:s.url,state:(n=s.state)==null?void 0:n.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(t){throw i.debug("error after preparing navigator, closing navigator window"),r.close(),t}})}_signoutEnd(e){return _(this,null,function*(){let r=this._logger.create("_signoutEnd"),n=yield this._client.processSignoutResponse(e);return r.debug("got signout response"),n})}signoutSilent(){return _(this,arguments,function*(e={}){var r;let n=this._logger.create("signoutSilent"),c=e,{silentRequestTimeoutInSeconds:i}=c,t=W(c,["silentRequestTimeoutInSeconds"]),o=this.settings.includeIdTokenInSilentSignout?(r=yield this._loadUser())==null?void 0:r.id_token:void 0,s=this.settings.popup_post_logout_redirect_uri,u=yield this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:i});yield this._signout(d({request_type:"so:s",post_logout_redirect_uri:s,id_token_hint:o},t),u),n.info("success")})}signoutSilentCallback(){return _(this,arguments,function*(e=window.location.href){let r=this._logger.create("signoutSilentCallback");yield this._iframeNavigator.callback(e),r.info("success")})}revokeTokens(e){return _(this,null,function*(){let r=yield this._loadUser();yield this._revokeInternal(r,e)})}_revokeInternal(n){return _(this,arguments,function*(e,r=this.settings.revokeTokenTypes){let i=this._logger.create("_revokeInternal");if(!e)return;let t=r.filter(o=>typeof e[o]=="string");if(!t.length){i.debug("no need to revoke due to no token(s)");return}for(let o of t)yield this._client.revokeToken(e[o],o),i.info(`${o} revoked successfully`),o!=="access_token"&&(e[o]=null);yield this.storeUser(e),i.debug("user stored"),yield this._events.load(e)})}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}_loadUser(){return _(this,null,function*(){let e=this._logger.create("_loadUser"),r=yield this.settings.userStore.get(this._userStoreKey);return r?(e.debug("user storageString loaded"),je.fromStorageString(r)):(e.debug("no user storageString"),null)})}storeUser(e){return _(this,null,function*(){let r=this._logger.create("storeUser");if(e){r.debug("storing user");let n=e.toStorageString();yield this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug("removing user"),yield this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&(yield this.settings.dpop.store.remove(this.settings.client_id))})}clearStaleState(){return _(this,null,function*(){yield this._client.clearStaleState()})}dpopProof(e,r,n,i){return _(this,null,function*(){var t,o;let s=yield(o=(t=this.settings.dpop)==null?void 0:t.store)==null?void 0:o.get(this.settings.client_id);if(s)return yield K.generateDPoPProof({url:e,accessToken:r==null?void 0:r.access_token,httpMethod:n,keyPair:s.keys,nonce:i})})}generateDPoPJkt(e){return _(this,null,function*(){let r=yield e.store.get(this.settings.client_id);if(!r){let n=yield K.generateDPoPKeys();r=new is(n),yield e.store.set(this.settings.client_id,r)}return yield K.generateDPoPJkt(r.keys)})}};var Va={};me(Va,{$brand:()=>Yr,$input:()=>go,$output:()=>mo,NEVER:()=>Xr,TimePrecision:()=>vo,ZodAny:()=>zc,ZodArray:()=>Oc,ZodBase64:()=>Pa,ZodBase64URL:()=>ja,ZodBigInt:()=>zt,ZodBigIntFormat:()=>Na,ZodBoolean:()=>It,ZodCIDRv4:()=>Ia,ZodCIDRv6:()=>za,ZodCUID:()=>$a,ZodCUID2:()=>ya,ZodCatch:()=>Hc,ZodCustom:()=>Dr,ZodCustomStringFormat:()=>yc,ZodDate:()=>Tr,ZodDefault:()=>Fc,ZodDiscriminatedUnion:()=>Nc,ZodE164:()=>Ua,ZodEmail:()=>fa,ZodEmoji:()=>va,ZodEnum:()=>kt,ZodError:()=>Rd,ZodFile:()=>Vc,ZodFirstPartyTypeKind:()=>Ma,ZodGUID:()=>zr,ZodIPv4:()=>xa,ZodIPv6:()=>Sa,ZodISODate:()=>xr,ZodISODateTime:()=>kr,ZodISODuration:()=>Ir,ZodISOTime:()=>Sr,ZodIntersection:()=>Tc,ZodIssueCode:()=>Vp,ZodJWT:()=>Oa,ZodKSUID:()=>ka,ZodLazy:()=>ru,ZodLiteral:()=>Lc,ZodMap:()=>Ac,ZodNaN:()=>Yc,ZodNanoID:()=>_a,ZodNever:()=>jc,ZodNonOptional:()=>Ca,ZodNull:()=>Sc,ZodNullable:()=>Jc,ZodNumber:()=>St,ZodNumberFormat:()=>Ve,ZodObject:()=>Er,ZodOptional:()=>Ra,ZodPipe:()=>La,ZodPrefault:()=>Wc,ZodPromise:()=>iu,ZodReadonly:()=>Qc,ZodRealError:()=>Me,ZodRecord:()=>Za,ZodSet:()=>Rc,ZodString:()=>xt,ZodStringFormat:()=>L,ZodSuccess:()=>Gc,ZodSymbol:()=>kc,ZodTemplateLiteral:()=>tu,ZodTransform:()=>Da,ZodTuple:()=>Zc,ZodType:()=>T,ZodULID:()=>ba,ZodURL:()=>ha,ZodUUID:()=>de,ZodUndefined:()=>xc,ZodUnion:()=>Ea,ZodUnknown:()=>Pc,ZodVoid:()=>Uc,ZodXID:()=>wa,_ZodString:()=>ga,_default:()=>qc,any:()=>_p,array:()=>Ta,base64:()=>ip,base64url:()=>op,bigint:()=>mp,boolean:()=>wc,catch:()=>Xc,check:()=>ou,cidrv4:()=>rp,cidrv6:()=>np,clone:()=>H,coerce:()=>Ar,config:()=>V,core:()=>oe,cuid:()=>Gd,cuid2:()=>Hd,custom:()=>Ap,date:()=>yp,discriminatedUnion:()=>Sp,e164:()=>ap,email:()=>Ld,emoji:()=>Kd,endsWith:()=>gt,enum:()=>Cc,file:()=>Op,flattenError:()=>et,float32:()=>up,float64:()=>lp,formatError:()=>tt,function:()=>ta,getErrorMap:()=>Fp,globalRegistry:()=>ie,gt:()=>ue,gte:()=>G,guid:()=>Md,includes:()=>pt,instanceof:()=>Rp,int:()=>ma,int32:()=>dp,int64:()=>gp,intersection:()=>Ec,ipv4:()=>ep,ipv6:()=>tp,iso:()=>wt,json:()=>Lp,jwt:()=>sp,keyof:()=>bp,ksuid:()=>Qd,lazy:()=>nu,length:()=>Le,literal:()=>Mc,locales:()=>Ie,looseObject:()=>xp,lowercase:()=>lt,lt:()=>ce,lte:()=>Y,map:()=>Pp,maxLength:()=>Ce,maxSize:()=>Re,mime:()=>ft,minLength:()=>ve,minSize:()=>Pe,multipleOf:()=>ze,nan:()=>Ep,nanoid:()=>Bd,nativeEnum:()=>Up,negative:()=>qo,never:()=>Nr,nonnegative:()=>Ko,nonoptional:()=>Bc,nonpositive:()=>Wo,normalize:()=>ht,null:()=>Ic,nullable:()=>Ur,nullish:()=>Np,number:()=>bc,object:()=>wp,optional:()=>jr,overwrite:()=>le,parse:()=>ca,parseAsync:()=>ua,partialRecord:()=>zp,pipe:()=>Or,positive:()=>Fo,prefault:()=>Kc,preprocess:()=>Mp,prettifyError:()=>pn,promise:()=>Dp,property:()=>Bo,readonly:()=>eu,record:()=>Dc,refine:()=>au,regex:()=>ut,regexes:()=>he,registry:()=>er,safeParse:()=>la,safeParseAsync:()=>da,set:()=>jp,setErrorMap:()=>Jp,size:()=>ct,startsWith:()=>mt,strictObject:()=>kp,string:()=>pa,stringFormat:()=>cp,stringbool:()=>Cp,success:()=>Tp,superRefine:()=>su,symbol:()=>hp,templateLiteral:()=>Zp,toJSONSchema:()=>ra,toLowerCase:()=>_t,toUpperCase:()=>$t,transform:()=>Aa,treeifyError:()=>dn,trim:()=>vt,tuple:()=>Ip,uint32:()=>pp,uint64:()=>fp,ulid:()=>Xd,undefined:()=>vp,union:()=>Zr,unknown:()=>Pr,uppercase:()=>dt,url:()=>Wd,uuid:()=>Vd,uuidv4:()=>Jd,uuidv6:()=>Fd,uuidv7:()=>qd,void:()=>$p,xid:()=>Yd});var oe={};me(oe,{$ZodAny:()=>Li,$ZodArray:()=>it,$ZodAsyncError:()=>ne,$ZodBase64:()=>Ui,$ZodBase64URL:()=>Oi,$ZodBigInt:()=>Xt,$ZodBigIntFormat:()=>Di,$ZodBoolean:()=>nt,$ZodCIDRv4:()=>zi,$ZodCIDRv6:()=>Pi,$ZodCUID:()=>hi,$ZodCUID2:()=>vi,$ZodCatch:()=>oo,$ZodCheck:()=>M,$ZodCheckBigIntFormat:()=>Wn,$ZodCheckEndsWith:()=>ii,$ZodCheckGreaterThan:()=>Kt,$ZodCheckIncludes:()=>ri,$ZodCheckLengthEquals:()=>Yn,$ZodCheckLessThan:()=>Wt,$ZodCheckLowerCase:()=>ei,$ZodCheckMaxLength:()=>Hn,$ZodCheckMaxSize:()=>Kn,$ZodCheckMimeType:()=>ai,$ZodCheckMinLength:()=>Xn,$ZodCheckMinSize:()=>Bn,$ZodCheckMultipleOf:()=>Fn,$ZodCheckNumberFormat:()=>qn,$ZodCheckOverwrite:()=>si,$ZodCheckProperty:()=>oi,$ZodCheckRegex:()=>Qn,$ZodCheckSizeEquals:()=>Gn,$ZodCheckStartsWith:()=>ni,$ZodCheckStringFormat:()=>Ee,$ZodCheckUpperCase:()=>ti,$ZodCustom:()=>po,$ZodCustomStringFormat:()=>Ei,$ZodDate:()=>Ji,$ZodDefault:()=>to,$ZodDiscriminatedUnion:()=>qi,$ZodE164:()=>Ni,$ZodEmail:()=>pi,$ZodEmoji:()=>gi,$ZodEnum:()=>Hi,$ZodError:()=>Qe,$ZodFile:()=>Yi,$ZodFunction:()=>wr,$ZodGUID:()=>li,$ZodIPv4:()=>Si,$ZodIPv6:()=>Ii,$ZodISODate:()=>wi,$ZodISODateTime:()=>bi,$ZodISODuration:()=>xi,$ZodISOTime:()=>ki,$ZodIntersection:()=>Wi,$ZodJWT:()=>Ti,$ZodKSUID:()=>yi,$ZodLazy:()=>lo,$ZodLiteral:()=>Xi,$ZodMap:()=>Bi,$ZodNaN:()=>ao,$ZodNanoID:()=>fi,$ZodNever:()=>Mi,$ZodNonOptional:()=>no,$ZodNull:()=>Ci,$ZodNullable:()=>eo,$ZodNumber:()=>Ht,$ZodNumberFormat:()=>Zi,$ZodObject:()=>Fi,$ZodOptional:()=>Qi,$ZodPipe:()=>at,$ZodPrefault:()=>ro,$ZodPromise:()=>uo,$ZodReadonly:()=>so,$ZodRealError:()=>Te,$ZodRecord:()=>Ki,$ZodRegistry:()=>De,$ZodSet:()=>Gi,$ZodString:()=>xe,$ZodStringFormat:()=>R,$ZodSuccess:()=>io,$ZodSymbol:()=>Ai,$ZodTemplateLiteral:()=>co,$ZodTransform:()=>ot,$ZodTuple:()=>Se,$ZodType:()=>N,$ZodULID:()=>_i,$ZodURL:()=>mi,$ZodUUID:()=>di,$ZodUndefined:()=>Ri,$ZodUnion:()=>Yt,$ZodUnknown:()=>Ze,$ZodVoid:()=>Vi,$ZodXID:()=>$i,$brand:()=>Yr,$constructor:()=>m,$input:()=>go,$output:()=>mo,Doc:()=>rt,JSONSchema:()=>na,JSONSchemaGenerator:()=>bt,NEVER:()=>Xr,TimePrecision:()=>vo,_any:()=>Ro,_array:()=>yt,_base64:()=>_r,_base64url:()=>$r,_bigint:()=>Oo,_boolean:()=>jo,_catch:()=>Od,_cidrv4:()=>hr,_cidrv6:()=>vr,_coercedBigint:()=>No,_coercedBoolean:()=>Uo,_coercedDate:()=>Vo,_coercedNumber:()=>ko,_coercedString:()=>ho,_cuid:()=>ur,_cuid2:()=>lr,_custom:()=>Xo,_date:()=>Mo,_default:()=>Pd,_discriminatedUnion:()=>vd,_e164:()=>yr,_email:()=>tr,_emoji:()=>sr,_endsWith:()=>gt,_enum:()=>wd,_file:()=>Ho,_float32:()=>So,_float64:()=>Io,_gt:()=>ue,_gte:()=>G,_guid:()=>st,_includes:()=>pt,_int:()=>xo,_int32:()=>zo,_int64:()=>To,_intersection:()=>_d,_ipv4:()=>gr,_ipv6:()=>fr,_isoDate:()=>$o,_isoDateTime:()=>_o,_isoDuration:()=>bo,_isoTime:()=>yo,_jwt:()=>br,_ksuid:()=>mr,_lazy:()=>Zd,_length:()=>Le,_literal:()=>xd,_lowercase:()=>lt,_lt:()=>ce,_lte:()=>Y,_map:()=>yd,_max:()=>Y,_maxLength:()=>Ce,_maxSize:()=>Re,_mime:()=>ft,_min:()=>G,_minLength:()=>ve,_minSize:()=>Pe,_multipleOf:()=>ze,_nan:()=>Jo,_nanoid:()=>cr,_nativeEnum:()=>kd,_negative:()=>qo,_never:()=>Co,_nonnegative:()=>Ko,_nonoptional:()=>jd,_nonpositive:()=>Wo,_normalize:()=>ht,_null:()=>Ao,_nullable:()=>zd,_number:()=>wo,_optional:()=>Id,_overwrite:()=>le,_parse:()=>Ct,_parseAsync:()=>Mt,_pipe:()=>Nd,_positive:()=>Fo,_promise:()=>Dd,_property:()=>Bo,_readonly:()=>Td,_record:()=>$d,_refine:()=>Yo,_regex:()=>ut,_safeParse:()=>Jt,_safeParseAsync:()=>Ft,_set:()=>bd,_size:()=>ct,_startsWith:()=>mt,_string:()=>fo,_stringFormat:()=>ea,_stringbool:()=>Qo,_success:()=>Ud,_symbol:()=>Zo,_templateLiteral:()=>Ed,_toLowerCase:()=>_t,_toUpperCase:()=>$t,_transform:()=>Sd,_trim:()=>vt,_tuple:()=>Go,_uint32:()=>Po,_uint64:()=>Eo,_ulid:()=>dr,_undefined:()=>Do,_union:()=>hd,_unknown:()=>Ae,_uppercase:()=>dt,_url:()=>ar,_uuid:()=>rr,_uuidv4:()=>nr,_uuidv6:()=>ir,_uuidv7:()=>or,_void:()=>Lo,_xid:()=>pr,clone:()=>H,config:()=>V,flattenError:()=>et,formatError:()=>tt,function:()=>ta,globalConfig:()=>qe,globalRegistry:()=>ie,isValidBase64:()=>ji,isValidBase64URL:()=>js,isValidJWT:()=>Us,locales:()=>Ie,parse:()=>Lt,parseAsync:()=>Vt,prettifyError:()=>pn,regexes:()=>he,registry:()=>er,safeParse:()=>mn,safeParseAsync:()=>gn,toDotPath:()=>ps,toJSONSchema:()=>ra,treeifyError:()=>dn,util:()=>k,version:()=>ci});var Xr=Object.freeze({status:"aborted"});function m(e,r,n){var u;function i(c,a){var f,p;var l;Object.defineProperty(c,"_zod",{value:(f=c._zod)!=null?f:{},enumerable:!1}),(p=(l=c._zod).traits)!=null||(l.traits=new Set),c._zod.traits.add(e),r(c,a);for(let g in s.prototype)g in c||Object.defineProperty(c,g,{value:s.prototype[g].bind(c)});c._zod.constr=s,c._zod.def=a}let t=(u=n==null?void 0:n.Parent)!=null?u:Object;class o extends t{}Object.defineProperty(o,"name",{value:e});function s(c){var f;var a;let l=n!=null&&n.Parent?new o:this;i(l,c),(f=(a=l._zod).deferred)!=null||(a.deferred=[]);for(let p of l._zod.deferred)p();return l}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>{var a,l;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(l=(a=c==null?void 0:c._zod)==null?void 0:a.traits)==null?void 0:l.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}var Yr=Symbol("zod_brand"),ne=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},qe={};function V(e){return e&&Object.assign(qe,e),qe}var k={};me(k,{BIGINT_FORMAT_RANGES:()=>un,Class:()=>en,NUMBER_FORMAT_RANGES:()=>cn,aborted:()=>we,allowsEval:()=>on,assert:()=>nl,assertEqual:()=>Qu,assertIs:()=>tl,assertNever:()=>rl,assertNotEqual:()=>el,assignProp:()=>nn,cached:()=>Be,captureStackTrace:()=>Rt,cleanEnum:()=>hl,cleanRegex:()=>Ge,clone:()=>H,createTransparentProxy:()=>ul,defineLazy:()=>Z,esc:()=>be,escapeRegex:()=>se,extend:()=>pl,finalizeIssue:()=>X,floatSafeRemainder:()=>rn,getElementAtPath:()=>il,getEnumValues:()=>Ke,getLengthableOrigin:()=>Ye,getParsedType:()=>cl,getSizableOrigin:()=>Xe,isObject:()=>Oe,isPlainObject:()=>Ne,issue:()=>ln,joinValues:()=>$,jsonStringifyReplacer:()=>tn,merge:()=>ml,normalizeParams:()=>y,nullish:()=>fe,numKeys:()=>sl,omit:()=>dl,optionalKeys:()=>sn,partial:()=>gl,pick:()=>ll,prefixIssues:()=>B,primitiveTypes:()=>an,promiseAllObject:()=>ol,propertyKeyTypes:()=>He,randomString:()=>al,required:()=>fl,stringifyPrimitive:()=>x,unwrapMessage:()=>We});function Qu(e){return e}function el(e){return e}function tl(e){}function rl(e){throw new Error}function nl(e){}function Ke(e){let r=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>r.indexOf(+i)===-1).map(([i,t])=>t)}function $(e,r="|"){return e.map(n=>x(n)).join(r)}function tn(e,r){return typeof r=="bigint"?r.toString():r}function Be(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function fe(e){return e==null}function Ge(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function rn(e,r){let n=(e.toString().split(".")[1]||"").length,i=(r.toString().split(".")[1]||"").length,t=n>i?n:i,o=Number.parseInt(e.toFixed(t).replace(".","")),s=Number.parseInt(r.toFixed(t).replace(".",""));return o%s/Wa(10,t)}function Z(e,r,n){Object.defineProperty(e,r,{get(){{let t=n();return e[r]=t,t}throw new Error("cached value already set")},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function nn(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function il(e,r){return r?r.reduce((n,i)=>n==null?void 0:n[i],e):e}function ol(e){let r=Object.keys(e),n=r.map(i=>e[i]);return Promise.all(n).then(i=>{let t={};for(let o=0;o<r.length;o++)t[r[o]]=i[o];return t})}function al(e=10){let r="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=r[Math.floor(Math.random()*r.length)];return n}function be(e){return JSON.stringify(e)}var Rt=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function Oe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var on=Be(()=>{var e;if(typeof navigator!="undefined"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{let r=Function;return new r(""),!0}catch(r){return!1}});function Ne(e){if(Oe(e)===!1)return!1;let r=e.constructor;if(r===void 0)return!0;let n=r.prototype;return!(Oe(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sl(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var cl=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map!="undefined"&&e instanceof Map?"map":typeof Set!="undefined"&&e instanceof Set?"set":typeof Date!="undefined"&&e instanceof Date?"date":typeof File!="undefined"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},He=new Set(["string","number","symbol"]),an=new Set(["string","number","bigint","boolean","symbol","undefined"]);function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function H(e,r,n){let i=new e._zod.constr(r!=null?r:e._zod.def);return(!r||n!=null&&n.parent)&&(i._zod.parent=e),i}function y(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if((r==null?void 0:r.message)!==void 0){if((r==null?void 0:r.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?S(d({},r),{error:()=>r.error}):r}function ul(e){let r;return new Proxy({},{get(n,i,t){return r!=null||(r=e()),Reflect.get(r,i,t)},set(n,i,t,o){return r!=null||(r=e()),Reflect.set(r,i,t,o)},has(n,i){return r!=null||(r=e()),Reflect.has(r,i)},deleteProperty(n,i){return r!=null||(r=e()),Reflect.deleteProperty(r,i)},ownKeys(n){return r!=null||(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,i){return r!=null||(r=e()),Reflect.getOwnPropertyDescriptor(r,i)},defineProperty(n,i,t){return r!=null||(r=e()),Reflect.defineProperty(r,i,t)}})}function x(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function sn(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var cn={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]},un={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function ll(e,r){let n={},i=e._zod.def;for(let t in r){if(!(t in i.shape))throw new Error(`Unrecognized key: "${t}"`);r[t]&&(n[t]=i.shape[t])}return H(e,S(d({},e._zod.def),{shape:n,checks:[]}))}function dl(e,r){let n=d({},e._zod.def.shape),i=e._zod.def;for(let t in r){if(!(t in i.shape))throw new Error(`Unrecognized key: "${t}"`);r[t]&&delete n[t]}return H(e,S(d({},e._zod.def),{shape:n,checks:[]}))}function pl(e,r){if(!Ne(r))throw new Error("Invalid input to extend: expected a plain object");let n=S(d({},e._zod.def),{get shape(){let i=d(d({},e._zod.def.shape),r);return nn(this,"shape",i),i},checks:[]});return H(e,n)}function ml(e,r){return H(e,S(d({},e._zod.def),{get shape(){let n=d(d({},e._zod.def.shape),r._zod.def.shape);return nn(this,"shape",n),n},catchall:r._zod.def.catchall,checks:[]}))}function gl(e,r,n){let i=r._zod.def.shape,t=d({},i);if(n)for(let o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(t[o]=e?new e({type:"optional",innerType:i[o]}):i[o])}else for(let o in i)t[o]=e?new e({type:"optional",innerType:i[o]}):i[o];return H(r,S(d({},r._zod.def),{shape:t,checks:[]}))}function fl(e,r,n){let i=r._zod.def.shape,t=d({},i);if(n)for(let o in n){if(!(o in t))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(t[o]=new e({type:"nonoptional",innerType:i[o]}))}else for(let o in i)t[o]=new e({type:"nonoptional",innerType:i[o]});return H(r,S(d({},r._zod.def),{shape:t,checks:[]}))}function we(e,r=0){var n;for(let i=r;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function B(e,r){return r.map(n=>{var t;var i;return(t=(i=n).path)!=null||(i.path=[]),n.path.unshift(e),n})}function We(e){return typeof e=="string"?e:e==null?void 0:e.message}function X(e,r,n){var t,o,s,u,c,a,l,f,p,g,w;let i=S(d({},e),{path:(t=e.path)!=null?t:[]});if(!e.message){let P=(w=(g=(f=(a=We((u=(s=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:s.error)==null?void 0:u.call(s,e)))!=null?a:We((c=r==null?void 0:r.error)==null?void 0:c.call(r,e)))!=null?f:We((l=n.customError)==null?void 0:l.call(n,e)))!=null?g:We((p=n.localeError)==null?void 0:p.call(n,e)))!=null?w:"Invalid input";i.message=P}return delete i.inst,delete i.continue,r!=null&&r.reportInput||delete i.input,i}function Xe(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ye(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ln(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:d({},r)}function hl(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}var en=class{constructor(...r){}};var ds=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(r,tn,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Qe=m("$ZodError",ds),Te=m("$ZodError",ds,{Parent:Error});function et(e,r=n=>n.message){let n={},i=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function tt(e,r){let n=r||function(o){return o.message},i={_errors:[]},t=o=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>t({issues:u}));else if(s.code==="invalid_key")t({issues:s.issues});else if(s.code==="invalid_element")t({issues:s.issues});else if(s.path.length===0)i._errors.push(n(s));else{let u=i,c=0;for(;c<s.path.length;){let a=s.path[c];c===s.path.length-1?(u[a]=u[a]||{_errors:[]},u[a]._errors.push(n(s))):u[a]=u[a]||{_errors:[]},u=u[a],c++}}};return t(e),i}function dn(e,r){let n=r||function(o){return o.message},i={errors:[]},t=(o,s=[])=>{var a,l,f,p;var u,c;for(let g of o.issues)if(g.code==="invalid_union"&&g.errors.length)g.errors.map(w=>t({issues:w},g.path));else if(g.code==="invalid_key")t({issues:g.issues},g.path);else if(g.code==="invalid_element")t({issues:g.issues},g.path);else{let w=[...s,...g.path];if(w.length===0){i.errors.push(n(g));continue}let P=i,I=0;for(;I<w.length;){let D=w[I],z=I===w.length-1;typeof D=="string"?((a=P.properties)!=null||(P.properties={}),(l=(u=P.properties)[D])!=null||(u[D]={errors:[]}),P=P.properties[D]):((f=P.items)!=null||(P.items=[]),(p=(c=P.items)[D])!=null||(c[D]={errors:[]}),P=P.items[D]),z&&P.errors.push(n(g)),I++}}};return t(e),i}function ps(e){let r=[];for(let n of e)typeof n=="number"?r.push(`[${n}]`):typeof n=="symbol"?r.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?r.push(`[${JSON.stringify(n)}]`):(r.length&&r.push("."),r.push(n));return r.join("")}function pn(e){var i;let r=[],n=[...e.issues].sort((t,o)=>t.path.length-o.path.length);for(let t of n)r.push(`\u2716 ${t.message}`),(i=t.path)!=null&&i.length&&r.push(` \u2192 at ${ps(t.path)}`);return r.join(`
|
|
2
|
-
`)}var Ct=e=>(r,n,i,t)=>{var u;let o=i?Object.assign(i,{async:!1}):{async:!1},s=r._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new ne;if(s.issues.length){let c=new((u=t==null?void 0:t.Err)!=null?u:e)(s.issues.map(a=>X(a,o,V())));throw Rt(c,t==null?void 0:t.callee),c}return s.value},Lt=Ct(Te),Mt=e=>(r,n,i,t)=>_(null,null,function*(){var u;let o=i?Object.assign(i,{async:!0}):{async:!0},s=r._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=yield s),s.issues.length){let c=new((u=t==null?void 0:t.Err)!=null?u:e)(s.issues.map(a=>X(a,o,V())));throw Rt(c,t==null?void 0:t.callee),c}return s.value}),Vt=Mt(Te),Jt=e=>(r,n,i)=>{let t=i?S(d({},i),{async:!1}):{async:!1},o=r._zod.run({value:n,issues:[]},t);if(o instanceof Promise)throw new ne;return o.issues.length?{success:!1,error:new(e!=null?e:Qe)(o.issues.map(s=>X(s,t,V())))}:{success:!0,data:o.value}},mn=Jt(Te),Ft=e=>(r,n,i)=>_(null,null,function*(){let t=i?Object.assign(i,{async:!0}):{async:!0},o=r._zod.run({value:n,issues:[]},t);return o instanceof Promise&&(o=yield o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>X(s,t,V())))}:{success:!0,data:o.value}}),gn=Ft(Te);var he={};me(he,{base64:()=>jn,base64url:()=>qt,bigint:()=>Dn,boolean:()=>Cn,browserEmail:()=>Sl,cidrv4:()=>zn,cidrv6:()=>Pn,cuid:()=>fn,cuid2:()=>hn,date:()=>Nn,datetime:()=>En,domain:()=>zl,duration:()=>bn,e164:()=>On,email:()=>kn,emoji:()=>xn,extendedDuration:()=>_l,guid:()=>wn,hostname:()=>Un,html5Email:()=>wl,integer:()=>An,ipv4:()=>Sn,ipv6:()=>In,ksuid:()=>$n,lowercase:()=>Vn,nanoid:()=>yn,null:()=>Ln,number:()=>Rn,rfc5322Email:()=>kl,string:()=>Zn,time:()=>Tn,ulid:()=>vn,undefined:()=>Mn,unicodeEmail:()=>xl,uppercase:()=>Jn,uuid:()=>ke,uuid4:()=>$l,uuid6:()=>yl,uuid7:()=>bl,xid:()=>_n});var fn=/^[cC][^\s-]{8,}$/,hn=/^[0-9a-z]+$/,vn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,_n=/^[0-9a-vA-V]{20}$/,$n=/^[A-Za-z0-9]{27}$/,yn=/^[a-zA-Z0-9_-]{21}$/,bn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_l=/^[-+]?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)?)??$/,wn=/^([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})$/,ke=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,$l=ke(4),yl=ke(6),bl=ke(7),kn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wl=/^[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])?)*$/,kl=/^(([^<>()\[\]\\.,;:\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,}))$/,xl=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Sl=/^[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])?)*$/,Il="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xn(){return new RegExp(Il,"u")}var Sn=/^(?:(?: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])$/,In=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,zn=/^((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])$/,Pn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,qt=/^[A-Za-z0-9_-]*$/,Un=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,zl=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,On=/^\+(?:[0-9]){6,14}[0-9]$/,ms="(?:(?:\\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])))",Nn=new RegExp(`^${ms}$`);function gs(e){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Tn(e){return new RegExp(`^${gs(e)}$`)}function En(e){let r=gs({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");let i=`${r}(?:${n.join("|")})`;return new RegExp(`^${ms}T(?:${i})$`)}var Zn=e=>{var n,i;let r=e?`[\\s\\S]{${(n=e==null?void 0:e.minimum)!=null?n:0},${(i=e==null?void 0:e.maximum)!=null?i:""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},Dn=/^\d+n?$/,An=/^\d+$/,Rn=/^-?\d+(?:\.\d+)?/i,Cn=/true|false/i,Ln=/null/i;var Mn=/undefined/i;var Vn=/^[^A-Z]*$/,Jn=/^[^a-z]*$/;var M=m("$ZodCheck",(e,r)=>{var i,t;var n;(i=e._zod)!=null||(e._zod={}),e._zod.def=r,(t=(n=e._zod).onattach)!=null||(n.onattach=[])}),hs={number:"number",bigint:"bigint",object:"date"},Wt=m("$ZodCheckLessThan",(e,r)=>{M.init(e,r);let n=hs[typeof r.value];e._zod.onattach.push(i=>{var s;let t=i._zod.bag,o=(s=r.inclusive?t.maximum:t.exclusiveMaximum)!=null?s:Number.POSITIVE_INFINITY;r.value<o&&(r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value<=r.value:i.value<r.value)||i.issues.push({origin:n,code:"too_big",maximum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Kt=m("$ZodCheckGreaterThan",(e,r)=>{M.init(e,r);let n=hs[typeof r.value];e._zod.onattach.push(i=>{var s;let t=i._zod.bag,o=(s=r.inclusive?t.minimum:t.exclusiveMinimum)!=null?s:Number.NEGATIVE_INFINITY;r.value>o&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Fn=m("$ZodCheckMultipleOf",(e,r)=>{M.init(e,r),e._zod.onattach.push(n=>{var t;var i;(t=(i=n._zod.bag).multipleOf)!=null||(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):rn(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),qn=m("$ZodCheckNumberFormat",(e,r)=>{var s;M.init(e,r),r.format=r.format||"float64";let n=(s=r.format)==null?void 0:s.includes("int"),i=n?"int":"number",[t,o]=cn[r.format];e._zod.onattach.push(u=>{let c=u._zod.bag;c.format=r.format,c.minimum=t,c.maximum=o,n&&(c.pattern=An)}),e._zod.check=u=>{let c=u.value;if(n){if(!Number.isInteger(c)){u.issues.push({expected:i,format:r.format,code:"invalid_type",input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?u.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort}):u.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!r.abort});return}}c<t&&u.issues.push({origin:"number",input:c,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort}),c>o&&u.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inst:e})}}),Wn=m("$ZodCheckBigIntFormat",(e,r)=>{M.init(e,r);let[n,i]=un[r.format];e._zod.onattach.push(t=>{let o=t._zod.bag;o.format=r.format,o.minimum=n,o.maximum=i}),e._zod.check=t=>{let o=t.value;o<n&&t.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort}),o>i&&t.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inst:e})}}),Kn=m("$ZodCheckMaxSize",(e,r)=>{var i;var n;M.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var s;let o=(s=t._zod.bag.maximum)!=null?s:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;o.size<=r.maximum||t.issues.push({origin:Xe(o),code:"too_big",maximum:r.maximum,input:o,inst:e,continue:!r.abort})}}),Bn=m("$ZodCheckMinSize",(e,r)=>{var i;var n;M.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{var s;let o=(s=t._zod.bag.minimum)!=null?s:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;o.size>=r.minimum||t.issues.push({origin:Xe(o),code:"too_small",minimum:r.minimum,input:o,inst:e,continue:!r.abort})}}),Gn=m("$ZodCheckSizeEquals",(e,r)=>{var i;var n;M.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.size!==void 0}),e._zod.onattach.push(t=>{let o=t._zod.bag;o.minimum=r.size,o.maximum=r.size,o.size=r.size}),e._zod.check=t=>{let o=t.value,s=o.size;if(s===r.size)return;let u=s>r.size;t.issues.push(S(d({origin:Xe(o)},u?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),Hn=m("$ZodCheckMaxLength",(e,r)=>{var i;var n;M.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var s;let o=(s=t._zod.bag.maximum)!=null?s:Number.POSITIVE_INFINITY;r.maximum<o&&(t._zod.bag.maximum=r.maximum)}),e._zod.check=t=>{let o=t.value;if(o.length<=r.maximum)return;let u=Ye(o);t.issues.push({origin:u,code:"too_big",maximum:r.maximum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Xn=m("$ZodCheckMinLength",(e,r)=>{var i;var n;M.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{var s;let o=(s=t._zod.bag.minimum)!=null?s:Number.NEGATIVE_INFINITY;r.minimum>o&&(t._zod.bag.minimum=r.minimum)}),e._zod.check=t=>{let o=t.value;if(o.length>=r.minimum)return;let u=Ye(o);t.issues.push({origin:u,code:"too_small",minimum:r.minimum,inclusive:!0,input:o,inst:e,continue:!r.abort})}}),Yn=m("$ZodCheckLengthEquals",(e,r)=>{var i;var n;M.init(e,r),(i=(n=e._zod.def).when)!=null||(n.when=t=>{let o=t.value;return!fe(o)&&o.length!==void 0}),e._zod.onattach.push(t=>{let o=t._zod.bag;o.minimum=r.length,o.maximum=r.length,o.length=r.length}),e._zod.check=t=>{let o=t.value,s=o.length;if(s===r.length)return;let u=Ye(o),c=s>r.length;t.issues.push(S(d({origin:u},c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}),{inclusive:!0,exact:!0,input:t.value,inst:e,continue:!r.abort}))}}),Ee=m("$ZodCheckStringFormat",(e,r)=>{var t,o;var n,i;M.init(e,r),e._zod.onattach.push(s=>{var c;let u=s._zod.bag;u.format=r.format,r.pattern&&((c=u.patterns)!=null||(u.patterns=new Set),u.patterns.add(r.pattern))}),r.pattern?(t=(n=e._zod).check)!=null||(n.check=s=>{r.pattern.lastIndex=0,!r.pattern.test(s.value)&&s.issues.push(S(d({origin:"string",code:"invalid_format",format:r.format,input:s.value},r.pattern?{pattern:r.pattern.toString()}:{}),{inst:e,continue:!r.abort}))}):(o=(i=e._zod).check)!=null||(i.check=()=>{})}),Qn=m("$ZodCheckRegex",(e,r)=>{Ee.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),ei=m("$ZodCheckLowerCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Vn),Ee.init(e,r)}),ti=m("$ZodCheckUpperCase",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Jn),Ee.init(e,r)}),ri=m("$ZodCheckIncludes",(e,r)=>{M.init(e,r);let n=se(r.includes),i=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=i,e._zod.onattach.push(t=>{var s;let o=t._zod.bag;(s=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),ni=m("$ZodCheckStartsWith",(e,r)=>{var i;M.init(e,r);let n=new RegExp(`^${se(r.prefix)}.*`);(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var s;let o=t._zod.bag;(s=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=t=>{t.value.startsWith(r.prefix)||t.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:t.value,inst:e,continue:!r.abort})}}),ii=m("$ZodCheckEndsWith",(e,r)=>{var i;M.init(e,r);let n=new RegExp(`.*${se(r.suffix)}$`);(i=r.pattern)!=null||(r.pattern=n),e._zod.onattach.push(t=>{var s;let o=t._zod.bag;(s=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=t=>{t.value.endsWith(r.suffix)||t.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:t.value,inst:e,continue:!r.abort})}});function fs(e,r,n){e.issues.length&&r.issues.push(...B(n,e.issues))}var oi=m("$ZodCheckProperty",(e,r)=>{M.init(e,r),e._zod.check=n=>{let i=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>fs(t,n,r.property));fs(i,n,r.property)}}),ai=m("$ZodCheckMimeType",(e,r)=>{M.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=r.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:r.mime,input:i.value.type,inst:e})}}),si=m("$ZodCheckOverwrite",(e,r)=>{M.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});var rt=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let i=r.split(`
|
|
3
|
-
`).filter(s=>s),t=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(t)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){var o;let r=Function,n=this==null?void 0:this.args,t=[...((o=this==null?void 0:this.content)!=null?o:[""]).map(s=>` ${s}`)];return new r(...n,t.join(`
|
|
4
|
-
`))}};var ci={major:4,minor:0,patch:5};var N=m("$ZodType",(e,r)=>{var t,o,s;var n;e!=null||(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=ci;let i=[...(t=e._zod.def.checks)!=null?t:[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let u of i)for(let c of u._zod.onattach)c(e);if(i.length===0)(o=(n=e._zod).deferred)!=null||(n.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{let u=(c,a,l)=>{let f=we(c),p;for(let g of a){if(g._zod.def.when){if(!g._zod.def.when(c))continue}else if(f)continue;let w=c.issues.length,P=g._zod.check(c);if(P instanceof Promise&&(l==null?void 0:l.async)===!1)throw new ne;if(p||P instanceof Promise)p=(p!=null?p:Promise.resolve()).then(()=>_(null,null,function*(){yield P,c.issues.length!==w&&(f||(f=we(c,w)))}));else{if(c.issues.length===w)continue;f||(f=we(c,w))}}return p?p.then(()=>c):c};e._zod.run=(c,a)=>{let l=e._zod.parse(c,a);if(l instanceof Promise){if(a.async===!1)throw new ne;return l.then(f=>u(f,i,a))}return u(l,i,a)}}e["~standard"]={validate:u=>{var c;try{let a=mn(e,u);return a.success?{value:a.data}:{issues:(c=a.error)==null?void 0:c.issues}}catch(a){return gn(e,u).then(l=>{var f;return l.success?{value:l.data}:{issues:(f=l.error)==null?void 0:f.issues}})}},vendor:"zod",version:1}}),xe=m("$ZodString",(e,r)=>{var n,i,t;N.init(e,r),e._zod.pattern=(t=[...(i=(n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)!=null?i:[]].pop())!=null?t:Zn(e._zod.bag),e._zod.parse=(o,s)=>{if(r.coerce)try{o.value=String(o.value)}catch(u){}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),R=m("$ZodStringFormat",(e,r)=>{Ee.init(e,r),xe.init(e,r)}),li=m("$ZodGUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=wn),R.init(e,r)}),di=m("$ZodUUID",(e,r)=>{var n,i;if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);(n=r.pattern)!=null||(r.pattern=ke(o))}else(i=r.pattern)!=null||(r.pattern=ke());R.init(e,r)}),pi=m("$ZodEmail",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=kn),R.init(e,r)}),mi=m("$ZodURL",(e,r)=>{R.init(e,r),e._zod.check=n=>{try{let i=n.value,t=new URL(i),o=t.href;r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Un.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),!i.endsWith("/")&&o.endsWith("/")?n.value=o.slice(0,-1):n.value=o;return}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),gi=m("$ZodEmoji",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=xn()),R.init(e,r)}),fi=m("$ZodNanoID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=yn),R.init(e,r)}),hi=m("$ZodCUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=fn),R.init(e,r)}),vi=m("$ZodCUID2",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=hn),R.init(e,r)}),_i=m("$ZodULID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=vn),R.init(e,r)}),$i=m("$ZodXID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=_n),R.init(e,r)}),yi=m("$ZodKSUID",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=$n),R.init(e,r)}),bi=m("$ZodISODateTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=En(r)),R.init(e,r)}),wi=m("$ZodISODate",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Nn),R.init(e,r)}),ki=m("$ZodISOTime",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Tn(r)),R.init(e,r)}),xi=m("$ZodISODuration",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=bn),R.init(e,r)}),Si=m("$ZodIPv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Sn),R.init(e,r),e._zod.onattach.push(i=>{let t=i._zod.bag;t.format="ipv4"})}),Ii=m("$ZodIPv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=In),R.init(e,r),e._zod.onattach.push(i=>{let t=i._zod.bag;t.format="ipv6"}),e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch(t){i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!r.abort})}}}),zi=m("$ZodCIDRv4",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=zn),R.init(e,r)}),Pi=m("$ZodCIDRv6",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=Pn),R.init(e,r),e._zod.check=i=>{let[t,o]=i.value.split("/");try{if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${t}]`)}catch(s){i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!r.abort})}}});function ji(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(r){return!1}}var Ui=m("$ZodBase64",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=jn),R.init(e,r),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64"}),e._zod.check=i=>{ji(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!r.abort})}});function js(e){if(!qt.test(e))return!1;let r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return ji(n)}var Oi=m("$ZodBase64URL",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=qt),R.init(e,r),e._zod.onattach.push(i=>{i._zod.bag.contentEncoding="base64url"}),e._zod.check=i=>{js(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!r.abort})}}),Ni=m("$ZodE164",(e,r)=>{var n;(n=r.pattern)!=null||(r.pattern=On),R.init(e,r)});function Us(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&(t==null?void 0:t.typ)!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch(n){return!1}}var Ti=m("$ZodJWT",(e,r)=>{R.init(e,r),e._zod.check=n=>{Us(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),Ei=m("$ZodCustomStringFormat",(e,r)=>{R.init(e,r),e._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),Ht=m("$ZodNumber",(e,r)=>{var n;N.init(e,r),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:Rn,e._zod.parse=(i,t)=>{if(r.coerce)try{i.value=Number(i.value)}catch(u){}let o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push(d({expected:"number",code:"invalid_type",input:o,inst:e},s?{received:s}:{})),i}}),Zi=m("$ZodNumber",(e,r)=>{qn.init(e,r),Ht.init(e,r)}),nt=m("$ZodBoolean",(e,r)=>{N.init(e,r),e._zod.pattern=Cn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch(o){}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),Xt=m("$ZodBigInt",(e,r)=>{N.init(e,r),e._zod.pattern=Dn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch(t){}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Di=m("$ZodBigInt",(e,r)=>{Wn.init(e,r),Xt.init(e,r)}),Ai=m("$ZodSymbol",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),Ri=m("$ZodUndefined",(e,r)=>{N.init(e,r),e._zod.pattern=Mn,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="undefined"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),Ci=m("$ZodNull",(e,r)=>{N.init(e,r),e._zod.pattern=Ln,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),Li=m("$ZodAny",(e,r)=>{N.init(e,r),e._zod.parse=n=>n}),Ze=m("$ZodUnknown",(e,r)=>{N.init(e,r),e._zod.parse=n=>n}),Mi=m("$ZodNever",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Vi=m("$ZodVoid",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="undefined"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),Ji=m("$ZodDate",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=new Date(n.value)}catch(u){}let t=n.value,o=t instanceof Date;return o&&!Number.isNaN(t.getTime())||n.issues.push(S(d({expected:"date",code:"invalid_type",input:t},o?{received:"Invalid Date"}:{}),{inst:e})),n}});function _s(e,r,n){e.issues.length&&r.issues.push(...B(n,e.issues)),r.value[n]=e.value}var it=m("$ZodArray",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let o=[];for(let s=0;s<t.length;s++){let u=t[s],c=r.element._zod.run({value:u,issues:[]},i);c instanceof Promise?o.push(c.then(a=>_s(a,n,s))):_s(c,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function Bt(e,r,n){e.issues.length&&r.issues.push(...B(n,e.issues)),r.value[n]=e.value}function $s(e,r,n,i){e.issues.length?i[n]===void 0?n in i?r.value[n]=void 0:r.value[n]=e.value:r.issues.push(...B(n,e.issues)):e.value===void 0?n in i&&(r.value[n]=void 0):r.value[n]=e.value}var Fi=m("$ZodObject",(e,r)=>{N.init(e,r);let n=Be(()=>{let f=Object.keys(r.shape);for(let g of f)if(!(r.shape[g]instanceof N))throw new Error(`Invalid element at key "${g}": expected a Zod schema`);let p=sn(r.shape);return{shape:r.shape,keys:f,keySet:new Set(f),numKeys:f.length,optionalKeys:new Set(p)}});Z(e._zod,"propValues",()=>{var g;let f=r.shape,p={};for(let w in f){let P=f[w]._zod;if(P.values){(g=p[w])!=null||(p[w]=new Set);for(let I of P.values)p[w].add(I)}}return p});let i=f=>{let p=new rt(["shape","payload","ctx"]),g=n.value,w=z=>{let h=be(z);return`shape[${h}]._zod.run({ value: input[${h}], issues: [] }, ctx)`};p.write("const input = payload.value;");let P=Object.create(null),I=0;for(let z of g.keys)P[z]=`key_${I++}`;p.write("const newResult = {}");for(let z of g.keys)if(g.optionalKeys.has(z)){let h=P[z];p.write(`const ${h} = ${w(z)};`);let v=be(z);p.write(`
|
|
5
|
-
if (${h}.issues.length) {
|
|
6
|
-
if (input[${v}] === undefined) {
|
|
7
|
-
if (${v} in input) {
|
|
8
|
-
newResult[${v}] = undefined;
|
|
9
|
-
}
|
|
10
|
-
} else {
|
|
11
|
-
payload.issues = payload.issues.concat(
|
|
12
|
-
${h}.issues.map((iss) => ({
|
|
13
|
-
...iss,
|
|
14
|
-
path: iss.path ? [${v}, ...iss.path] : [${v}],
|
|
15
|
-
}))
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
} else if (${h}.value === undefined) {
|
|
19
|
-
if (${v} in input) newResult[${v}] = undefined;
|
|
20
|
-
} else {
|
|
21
|
-
newResult[${v}] = ${h}.value;
|
|
22
|
-
}
|
|
23
|
-
`)}else{let h=P[z];p.write(`const ${h} = ${w(z)};`),p.write(`
|
|
24
|
-
if (${h}.issues.length) payload.issues = payload.issues.concat(${h}.issues.map(iss => ({
|
|
25
|
-
...iss,
|
|
26
|
-
path: iss.path ? [${be(z)}, ...iss.path] : [${be(z)}]
|
|
27
|
-
})));`),p.write(`newResult[${be(z)}] = ${h}.value`)}p.write("payload.value = newResult;"),p.write("return payload;");let D=p.compile();return(z,h)=>D(f,z,h)},t,o=Oe,s=!qe.jitless,c=s&&on.value,a=r.catchall,l;e._zod.parse=(f,p)=>{l!=null||(l=n.value);let g=f.value;if(!o(g))return f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f;let w=[];if(s&&c&&(p==null?void 0:p.async)===!1&&p.jitless!==!0)t||(t=i(r.shape)),f=t(f,p);else{f.value={};let h=l.shape;for(let v of l.keys){let b=h[v],U=b._zod.run({value:g[v],issues:[]},p),j=b._zod.optin==="optional"&&b._zod.optout==="optional";U instanceof Promise?w.push(U.then(O=>j?$s(O,f,v,g):Bt(O,f,v))):j?$s(U,f,v,g):Bt(U,f,v)}}if(!a)return w.length?Promise.all(w).then(()=>f):f;let P=[],I=l.keySet,D=a._zod,z=D.def.type;for(let h of Object.keys(g)){if(I.has(h))continue;if(z==="never"){P.push(h);continue}let v=D.run({value:g[h],issues:[]},p);v instanceof Promise?w.push(v.then(b=>Bt(b,f,h))):Bt(v,f,h)}return P.length&&f.issues.push({code:"unrecognized_keys",keys:P,input:g,inst:e}),w.length?Promise.all(w).then(()=>f):f}});function ys(e,r,n,i){for(let t of e)if(t.issues.length===0)return r.value=t.value,r;return r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(t=>t.issues.map(o=>X(o,i,V())))}),r}var Yt=m("$ZodUnion",(e,r)=>{N.init(e,r),Z(e._zod,"optin",()=>r.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Z(e._zod,"optout",()=>r.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Z(e._zod,"values",()=>{if(r.options.every(n=>n._zod.values))return new Set(r.options.flatMap(n=>Array.from(n._zod.values)))}),Z(e._zod,"pattern",()=>{if(r.options.every(n=>n._zod.pattern)){let n=r.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Ge(i.source)).join("|")})$`)}}),e._zod.parse=(n,i)=>{let t=!1,o=[];for(let s of r.options){let u=s._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)o.push(u),t=!0;else{if(u.issues.length===0)return u;o.push(u)}}return t?Promise.all(o).then(s=>ys(s,n,e,i)):ys(o,n,e,i)}}),qi=m("$ZodDiscriminatedUnion",(e,r)=>{Yt.init(e,r);let n=e._zod.parse;Z(e._zod,"propValues",()=>{let t={};for(let o of r.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(o)}"`);for(let[u,c]of Object.entries(s)){t[u]||(t[u]=new Set);for(let a of c)t[u].add(a)}}return t});let i=Be(()=>{var s;let t=r.options,o=new Map;for(let u of t){let c=(s=u._zod.propValues)==null?void 0:s[r.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(u)}"`);for(let a of c){if(o.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);o.set(a,u)}}return o});e._zod.parse=(t,o)=>{let s=t.value;if(!Oe(s))return t.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),t;let u=i.value.get(s==null?void 0:s[r.discriminator]);return u?u._zod.run(t,o):r.unionFallback?n(t,o):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[r.discriminator],inst:e}),t)}}),Wi=m("$ZodIntersection",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=n.value,o=r.left._zod.run({value:t,issues:[]},i),s=r.right._zod.run({value:t,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([c,a])=>bs(n,c,a)):bs(n,o,s)}});function ui(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(Ne(e)&&Ne(r)){let n=Object.keys(r),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),t=d(d({},e),r);for(let o of i){let s=ui(e[o],r[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};t[o]=s.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let t=e[i],o=r[i],s=ui(t,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bs(e,r,n){if(r.issues.length&&e.issues.push(...r.issues),n.issues.length&&e.issues.push(...n.issues),we(e))return e;let i=ui(r.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}var Se=m("$ZodTuple",(e,r)=>{N.init(e,r);let n=r.items,i=n.length-[...n].reverse().findIndex(t=>t._zod.optin!=="optional");e._zod.parse=(t,o)=>{let s=t.value;if(!Array.isArray(s))return t.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),t;t.value=[];let u=[];if(!r.rest){let a=s.length>n.length,l=s.length<i-1;if(a||l)return t.issues.push(d({input:s,inst:e,origin:"array"},a?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length})),t}let c=-1;for(let a of n){if(c++,c>=s.length&&c>=i)continue;let l=a._zod.run({value:s[c],issues:[]},o);l instanceof Promise?u.push(l.then(f=>Gt(f,t,c))):Gt(l,t,c)}if(r.rest){let a=s.slice(n.length);for(let l of a){c++;let f=r.rest._zod.run({value:l,issues:[]},o);f instanceof Promise?u.push(f.then(p=>Gt(p,t,c))):Gt(f,t,c)}}return u.length?Promise.all(u).then(()=>t):t}});function Gt(e,r,n){e.issues.length&&r.issues.push(...B(n,e.issues)),r.value[n]=e.value}var Ki=m("$ZodRecord",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Ne(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let o=[];if(r.keyType._zod.values){let s=r.keyType._zod.values;n.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let a=r.valueType._zod.run({value:t[c],issues:[]},i);a instanceof Promise?o.push(a.then(l=>{l.issues.length&&n.issues.push(...B(c,l.issues)),n.value[c]=l.value})):(a.issues.length&&n.issues.push(...B(c,a.issues)),n.value[c]=a.value)}let u;for(let c in t)s.has(c)||(u=u!=null?u:[],u.push(c));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:u})}else{n.value={};for(let s of Reflect.ownKeys(t)){if(s==="__proto__")continue;let u=r.keyType._zod.run({value:s,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:u.issues.map(a=>X(a,i,V())),input:s,path:[s],inst:e}),n.value[u.value]=u.value;continue}let c=r.valueType._zod.run({value:t[s],issues:[]},i);c instanceof Promise?o.push(c.then(a=>{a.issues.length&&n.issues.push(...B(s,a.issues)),n.value[u.value]=a.value})):(c.issues.length&&n.issues.push(...B(s,c.issues)),n.value[u.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Bi=m("$ZodMap",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let o=[];n.value=new Map;for(let[s,u]of t){let c=r.keyType._zod.run({value:s,issues:[]},i),a=r.valueType._zod.run({value:u,issues:[]},i);c instanceof Promise||a instanceof Promise?o.push(Promise.all([c,a]).then(([l,f])=>{ws(l,f,n,s,t,e,i)})):ws(c,a,n,s,t,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function ws(e,r,n,i,t,o,s){e.issues.length&&(He.has(typeof i)?n.issues.push(...B(i,e.issues)):n.issues.push({origin:"map",code:"invalid_key",input:t,inst:o,issues:e.issues.map(u=>X(u,s,V()))})),r.issues.length&&(He.has(typeof i)?n.issues.push(...B(i,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:o,key:i,issues:r.issues.map(u=>X(u,s,V()))})),n.value.set(e.value,r.value)}var Gi=m("$ZodSet",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let s of t){let u=r.valueType._zod.run({value:s,issues:[]},i);u instanceof Promise?o.push(u.then(c=>ks(c,n))):ks(u,n)}return o.length?Promise.all(o).then(()=>n):n}});function ks(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Hi=m("$ZodEnum",(e,r)=>{N.init(e,r);let n=Ke(r.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(i=>He.has(typeof i)).map(i=>typeof i=="string"?se(i):i.toString()).join("|")})$`),e._zod.parse=(i,t)=>{let o=i.value;return e._zod.values.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:e}),i}}),Xi=m("$ZodLiteral",(e,r)=>{N.init(e,r),e._zod.values=new Set(r.values),e._zod.pattern=new RegExp(`^(${r.values.map(n=>typeof n=="string"?se(n):n?n.toString():String(n)).join("|")})$`),e._zod.parse=(n,i)=>{let t=n.value;return e._zod.values.has(t)||n.issues.push({code:"invalid_value",values:r.values,input:t,inst:e}),n}}),Yi=m("$ZodFile",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),ot=m("$ZodTransform",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(s=>(n.value=s,n));if(t instanceof Promise)throw new ne;return n.value=t,n}}),Qi=m("$ZodOptional",(e,r)=>{N.init(e,r),e._zod.optin="optional",e._zod.optout="optional",Z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${Ge(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>r.innerType._zod.optin==="optional"?r.innerType._zod.run(n,i):n.value===void 0?n:r.innerType._zod.run(n,i)}),eo=m("$ZodNullable",(e,r)=>{N.init(e,r),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),Z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${Ge(n.source)}|null)$`):void 0}),Z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),to=m("$ZodDefault",(e,r)=>{N.init(e,r),e._zod.optin="optional",Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>xs(o,r)):xs(t,r)}});function xs(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var ro=m("$ZodPrefault",(e,r)=>{N.init(e,r),e._zod.optin="optional",Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),no=m("$ZodNonOptional",(e,r)=>{N.init(e,r),Z(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>Ss(o,e)):Ss(t,e)}});function Ss(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var io=m("$ZodSuccess",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),oo=m("$ZodCatch",(e,r)=>{N.init(e,r),e._zod.optin="optional",Z(e._zod,"optout",()=>r.innerType._zod.optout),Z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.value,o.issues.length&&(n.value=r.catchValue(S(d({},n),{error:{issues:o.issues.map(s=>X(s,i,V()))},input:n.value})),n.issues=[]),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue(S(d({},n),{error:{issues:t.issues.map(o=>X(o,i,V()))},input:n.value})),n.issues=[]),n)}}),ao=m("$ZodNaN",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),at=m("$ZodPipe",(e,r)=>{N.init(e,r),Z(e._zod,"values",()=>r.in._zod.values),Z(e._zod,"optin",()=>r.in._zod.optin),Z(e._zod,"optout",()=>r.out._zod.optout),Z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(o=>Is(o,r,i)):Is(t,r,i)}});function Is(e,r,n){return we(e)?e:r.out._zod.run({value:e.value,issues:e.issues},n)}var so=m("$ZodReadonly",(e,r)=>{N.init(e,r),Z(e._zod,"propValues",()=>r.innerType._zod.propValues),Z(e._zod,"values",()=>r.innerType._zod.values),Z(e._zod,"optin",()=>r.innerType._zod.optin),Z(e._zod,"optout",()=>r.innerType._zod.optout),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(zs):zs(t)}});function zs(e){return e.value=Object.freeze(e.value),e}var co=m("$ZodTemplateLiteral",(e,r)=>{N.init(e,r);let n=[];for(let i of r.parts)if(i instanceof N){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=t.startsWith("^")?1:0,s=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,s))}else if(i===null||an.has(typeof i))n.push(se(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,t)=>{var o;return typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"template_literal",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:(o=r.format)!=null?o:"template_literal",pattern:e._zod.pattern.source}),i)}}),uo=m("$ZodPromise",(e,r)=>{N.init(e,r),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},i))}),lo=m("$ZodLazy",(e,r)=>{N.init(e,r),Z(e._zod,"innerType",()=>r.getter()),Z(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Z(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Z(e._zod,"optin",()=>e._zod.innerType._zod.optin),Z(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),po=m("$ZodCustom",(e,r)=>{M.init(e,r),N.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(o=>Ps(o,n,i,e));Ps(t,n,i,e)}});function Ps(e,r,n,i){var t;if(!e){let o={code:"custom",input:n,inst:i,path:[...(t=i._zod.def.path)!=null?t:[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),r.issues.push(ln(o))}}var Ie={};me(Ie,{ar:()=>Ns,az:()=>Ts,be:()=>Zs,ca:()=>Ds,cs:()=>As,de:()=>Rs,en:()=>Qt,eo:()=>Cs,es:()=>Ls,fa:()=>Ms,fi:()=>Vs,fr:()=>Js,frCA:()=>Fs,he:()=>qs,hu:()=>Ws,id:()=>Ks,it:()=>Bs,ja:()=>Gs,kh:()=>Hs,ko:()=>Xs,mk:()=>Ys,ms:()=>Qs,nl:()=>ec,no:()=>tc,ota:()=>rc,pl:()=>ic,ps:()=>nc,pt:()=>oc,ru:()=>sc,sl:()=>cc,sv:()=>uc,ta:()=>lc,th:()=>dc,tr:()=>pc,ua:()=>mc,ur:()=>gc,vi:()=>fc,zhCN:()=>hc,zhTW:()=>vc});var Pl=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\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 ${t.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${n(t.input)}`;case"invalid_value":return t.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 ${x(t.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: ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${(o=t.origin)!=null?o:"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${t.maximum.toString()} ${(s=l.unit)!=null?s:"\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 ${(u=t.origin)!=null?u:"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${t.minimum.toString()} ${l.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.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 "${t.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`${(c=i[a.format])!=null?c:t.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 ${t.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${t.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${t.keys.length>1?"\u0629":""}: ${$(t.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.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 ${t.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Ns(){return{localeError:Pl()}}var jl=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${t.expected}, daxil olan ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${x(t.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${(o=t.origin)!=null?o:"d\u0259y\u0259r"} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${(u=t.origin)!=null?u:"d\u0259y\u0259r"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${a}${t.minimum.toString()} ${l.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${a.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:a.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${a.suffix}" il\u0259 bitm\u0259lidir`:a.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${a.includes}" daxil olmal\u0131d\u0131r`:a.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${a.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${t.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${t.keys.length>1?"lar":""}: ${$(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${t.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Ts(){return{localeError:jl()}}function Es(e,r,n,i){let t=Math.abs(e),o=t%10,s=t%100;return s>=11&&s<=19?i:o===1?r:o>=2&&o<=4?n:i}var Ul=()=>{let e={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"},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 r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(t))return"\u043C\u0430\u0441\u0456\u045E";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return t=>{var o,s,u;switch(t.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${t.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${n(t.input)}`;case"invalid_value":return t.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 ${x(t.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 ${$(t.values,"|")}`;case"too_big":{let c=t.inclusive?"<=":"<",a=r(t.origin);if(a){let l=Number(t.maximum),f=Es(l,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 ${(o=t.origin)!=null?o:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${c}${t.maximum.toString()} ${f}`}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 ${(s=t.origin)!=null?s:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${c}${t.maximum.toString()}`}case"too_small":{let c=t.inclusive?">=":">",a=r(t.origin);if(a){let l=Number(t.minimum),f=Es(l,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 ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${c}${t.minimum.toString()} ${f}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${c}${t.minimum.toString()}`}case"invalid_format":{let c=t;return c.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 "${c.prefix}"`:c.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 "${c.suffix}"`:c.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 "${c.includes}"`:c.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 ${c.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${(u=i[c.format])!=null?u:t.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 ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${t.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${$(t.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${t.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 ${t.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Zs(){return{localeError:Ul()}}var Ol=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"entrada"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${t.expected}, s'ha rebut ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Valor inv\xE0lid: s'esperava ${x(t.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${$(t.values," o ")}`;case"too_big":{let a=t.inclusive?"com a m\xE0xim":"menys de",l=r(t.origin);return l?`Massa gran: s'esperava que ${(o=t.origin)!=null?o:"el valor"} contingu\xE9s ${a} ${t.maximum.toString()} ${(s=l.unit)!=null?s:"elements"}`:`Massa gran: s'esperava que ${(u=t.origin)!=null?u:"el valor"} fos ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?"com a m\xEDnim":"m\xE9s de",l=r(t.origin);return l?`Massa petit: s'esperava que ${t.origin} contingu\xE9s ${a} ${t.minimum.toString()} ${l.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${a.prefix}"`:a.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format inv\xE0lid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${a.pattern}`:`Format inv\xE0lid per a ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${$(t.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${t.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${t.origin}`;default:return"Entrada inv\xE0lida"}}};function Ds(){return{localeError:Ol()}}var Nl=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(t))return"pole";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"vstup"};return t=>{var o,s,u,c,a,l,f;switch(t.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${t.expected}, obdr\u017Eeno ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${x(t.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${$(t.values,"|")}`;case"too_big":{let p=t.inclusive?"<=":"<",g=r(t.origin);return g?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${(o=t.origin)!=null?o:"hodnota"} mus\xED m\xEDt ${p}${t.maximum.toString()} ${(s=g.unit)!=null?s:"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${(u=t.origin)!=null?u:"hodnota"} mus\xED b\xFDt ${p}${t.maximum.toString()}`}case"too_small":{let p=t.inclusive?">=":">",g=r(t.origin);return g?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${(c=t.origin)!=null?c:"hodnota"} mus\xED m\xEDt ${p}${t.minimum.toString()} ${(a=g.unit)!=null?a:"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${(l=t.origin)!=null?l:"hodnota"} mus\xED b\xFDt ${p}${t.minimum.toString()}`}case"invalid_format":{let p=t;return p.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${p.prefix}"`:p.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${p.suffix}"`:p.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${p.includes}"`:p.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${p.pattern}`:`Neplatn\xFD form\xE1t ${(f=i[p.format])!=null?f:t.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${t.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${$(t.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${t.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${t.origin}`;default:return"Neplatn\xFD vstup"}}};function As(){return{localeError:Nl()}}var Tl=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"Zahl";case"object":{if(Array.isArray(t))return"Array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${t.expected}, erhalten ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Ung\xFCltige Eingabe: erwartet ${x(t.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Zu gro\xDF: erwartet, dass ${(o=t.origin)!=null?o:"Wert"} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${(u=t.origin)!=null?u:"Wert"} ${a}${t.maximum.toString()} ist`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Zu klein: erwartet, dass ${t.origin} ${a}${t.minimum.toString()} ${l.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${a}${t.minimum.toString()} ist`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ung\xFCltiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ung\xFCltiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ung\xFCltiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${a.pattern} entsprechen`:`Ung\xFCltig: ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${$(t.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${t.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${t.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Rs(){return{localeError:Tl()}}var El=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Zl=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function r(i){var t;return(t=e[i])!=null?t: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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{var t,o,s,u;switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${El(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${x(i.values[0])}`:`Invalid option: expected one of ${$(i.values,"|")}`;case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?`Too big: expected ${(t=i.origin)!=null?t:"value"} to have ${c}${i.maximum.toString()} ${(o=a.unit)!=null?o:"elements"}`:`Too big: expected ${(s=i.origin)!=null?s:"value"} to be ${c}${i.maximum.toString()}`}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?`Too small: expected ${i.origin} to have ${c}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${c}${i.minimum.toString()}`}case"invalid_format":{let c=i;return c.format==="starts_with"?`Invalid string: must start with "${c.prefix}"`:c.format==="ends_with"?`Invalid string: must end with "${c.suffix}"`:c.format==="includes"?`Invalid string: must include "${c.includes}"`:c.format==="regex"?`Invalid string: must match pattern ${c.pattern}`:`Invalid ${(u=n[c.format])!=null?u:i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${$(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Qt(){return{localeError:Zl()}}var Dl=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},Al=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(i){var t;return(t=e[i])!=null?t: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",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",jwt:"JWT",template_literal:"enigo"};return i=>{var t,o,s,u;switch(i.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${i.expected}, ricevi\u011Dis ${Dl(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${x(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${$(i.values,"|")}`;case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?`Tro granda: atendi\u011Dis ke ${(t=i.origin)!=null?t:"valoro"} havu ${c}${i.maximum.toString()} ${(o=a.unit)!=null?o:"elementojn"}`:`Tro granda: atendi\u011Dis ke ${(s=i.origin)!=null?s:"valoro"} havu ${c}${i.maximum.toString()}`}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${c}${i.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${c}${i.minimum.toString()}`}case"invalid_format":{let c=i;return c.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${c.prefix}"`:c.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${c.suffix}"`:c.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${c.includes}"`:c.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${c.pattern}`:`Nevalida ${(u=n[c.format])!=null?u: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":""}: ${$(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 Cs(){return{localeError:Al()}}var Rl=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(t))return"arreglo";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"entrada"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${t.expected}, recibido ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: se esperaba ${x(t.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Demasiado grande: se esperaba que ${(o=t.origin)!=null?o:"valor"} tuviera ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elementos"}`:`Demasiado grande: se esperaba que ${(u=t.origin)!=null?u:"valor"} fuera ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Demasiado peque\xF1o: se esperaba que ${t.origin} tuviera ${a}${t.minimum.toString()} ${l.unit}`:`Demasiado peque\xF1o: se esperaba que ${t.origin} fuera ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${$(t.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${t.origin}`;default:return"Entrada inv\xE1lida"}}};function Ls(){return{localeError:Rl()}}var Cl=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(t))return"\u0622\u0631\u0627\u06CC\u0647";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${t.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${n(t.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return t.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${x(t.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 ${$(t.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${(o=t.origin)!=null?o:"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${(u=t.origin)!=null?u:"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${t.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${a}${t.minimum.toString()} ${l.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${a}${t.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:a.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:a.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${a.includes}" \u0628\u0627\u0634\u062F`:a.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${a.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${(c=i[a.format])!=null?c:t.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 ${t.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${t.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${$(t.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${t.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 ${t.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Ms(){return{localeError:Cl()}}var Ll=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return t=>{var o;switch(t.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${t.expected}, oli ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${x(t.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${$(t.values,"|")}`;case"too_big":{let s=t.inclusive?"<=":"<",u=r(t.origin);return u?`Liian suuri: ${u.subject} t\xE4ytyy olla ${s}${t.maximum.toString()} ${u.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${s}${t.maximum.toString()}`}case"too_small":{let s=t.inclusive?">=":">",u=r(t.origin);return u?`Liian pieni: ${u.subject} t\xE4ytyy olla ${s}${t.minimum.toString()} ${u.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${s}${t.minimum.toString()}`}case"invalid_format":{let s=t;return s.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${s.prefix}"`:s.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${s.suffix}"`:s.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${s.includes}"`:s.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${s.pattern}`:`Virheellinen ${(o=i[s.format])!=null?o:t.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${$(t.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 Vs(){return{localeError:Ll()}}var Ml=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"nombre";case"object":{if(Array.isArray(t))return"tableau";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"entr\xE9e",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",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",jwt:"JWT",template_literal:"entr\xE9e"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Entr\xE9e invalide : ${t.expected} attendu, ${n(t.input)} re\xE7u`;case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : ${x(t.values[0])} attendu`:`Option invalide : une valeur parmi ${$(t.values,"|")} attendue`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Trop grand : ${(o=t.origin)!=null?o:"valeur"} doit ${l.verb} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\xE9l\xE9ment(s)"}`:`Trop grand : ${(u=t.origin)!=null?u:"valeur"} doit \xEAtre ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Trop petit : ${t.origin} doit ${l.verb} ${a}${t.minimum.toString()} ${l.unit}`:`Trop petit : ${t.origin} doit \xEAtre ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${a.pattern}`:`${(c=i[a.format])!=null?c:t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${$(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function Js(){return{localeError:Ml()}}var Vl=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"entr\xE9e"};return t=>{var o,s,u;switch(t.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${t.expected}, re\xE7u ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : attendu ${x(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${$(t.values,"|")}`;case"too_big":{let c=t.inclusive?"\u2264":"<",a=r(t.origin);return a?`Trop grand : attendu que ${(o=t.origin)!=null?o:"la valeur"} ait ${c}${t.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${(s=t.origin)!=null?s:"la valeur"} soit ${c}${t.maximum.toString()}`}case"too_small":{let c=t.inclusive?"\u2265":">",a=r(t.origin);return a?`Trop petit : attendu que ${t.origin} ait ${c}${t.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${t.origin} soit ${c}${t.minimum.toString()}`}case"invalid_format":{let c=t;return c.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${c.prefix}"`:c.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${c.suffix}"`:c.format==="includes"?`Cha\xEEne invalide : doit inclure "${c.includes}"`:c.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${c.pattern}`:`${(u=i[c.format])!=null?u:t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${$(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function Fs(){return{localeError:Vl()}}var Jl=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${t.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${x(t.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${(o=t.origin)!=null?o:"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${(u=t.origin)!=null?u:"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${t.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${t.minimum.toString()} ${l.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${t.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${a.prefix}"`:a.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${a.suffix}"`:a.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${a.includes}"`:a.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${a.pattern}`:`${(c=i[a.format])!=null?c:t.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}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 ${t.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${t.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${t.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${$(t.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${t.origin}`;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${t.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function qs(){return{localeError:Jl()}}var Fl=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(t))return"t\xF6mb";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"bemenet"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${t.expected}, a kapott \xE9rt\xE9k ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${x(t.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`T\xFAl nagy: ${(o=t.origin)!=null?o:"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${(u=t.origin)!=null?u:"\xE9rt\xE9k"} t\xFAl nagy: ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} m\xE9rete t\xFAl kicsi ${a}${t.minimum.toString()} ${l.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} t\xFAl kicsi ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\xC9rv\xE9nytelen string: "${a.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:a.format==="ends_with"?`\xC9rv\xE9nytelen string: "${a.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:a.format==="includes"?`\xC9rv\xE9nytelen string: "${a.includes}" \xE9rt\xE9ket kell tartalmaznia`:a.format==="regex"?`\xC9rv\xE9nytelen string: ${a.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${t.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${$(t.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${t.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${t.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Ws(){return{localeError:Fl()}}var ql=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"input"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Input tidak valid: diharapkan ${t.expected}, diterima ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${x(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Terlalu besar: diharapkan ${(o=t.origin)!=null?o:"value"} memiliki ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elemen"}`:`Terlalu besar: diharapkan ${(u=t.origin)!=null?u:"value"} menjadi ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Terlalu kecil: diharapkan ${t.origin} memiliki ${a}${t.minimum.toString()} ${l.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${(c=i[a.format])!=null?c:t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${$(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function Ks(){return{localeError:ql()}}var Wl=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"numero";case"object":{if(Array.isArray(t))return"vettore";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Input non valido: atteso ${t.expected}, ricevuto ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Input non valido: atteso ${x(t.values[0])}`:`Opzione non valida: atteso uno tra ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Troppo grande: ${(o=t.origin)!=null?o:"valore"} deve avere ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elementi"}`:`Troppo grande: ${(u=t.origin)!=null?u:"valore"} deve essere ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Troppo piccolo: ${t.origin} deve avere ${a}${t.minimum.toString()} ${l.unit}`:`Troppo piccolo: ${t.origin} deve essere ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${$(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function Bs(){return{localeError:Wl()}}var Kl=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(t))return"\u914D\u5217";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${t.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${n(t.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return t.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${x(t.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${$(t.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let a=t.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",l=r(t.origin);return l?`\u5927\u304D\u3059\u304E\u308B\u5024: ${(o=t.origin)!=null?o:"\u5024"}\u306F${t.maximum.toString()}${(s=l.unit)!=null?s:"\u8981\u7D20"}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${(u=t.origin)!=null?u:"\u5024"}\u306F${t.maximum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let a=t.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",l=r(t.origin);return l?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${l.unit}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${a.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${t.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${t.keys.length>1?"\u7FA4":""}: ${$(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Gs(){return{localeError:Kl()}}var Bl=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(t))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(t===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\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 ${t.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${n(t.input)}`;case"invalid_value":return t.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 ${x(t.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 ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${(o=t.origin)!=null?o:"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${t.maximum.toString()} ${(s=l.unit)!=null?s:"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${(u=t.origin)!=null?u:"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${a} ${t.minimum.toString()} ${l.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${(c=i[a.format])!=null?c:t.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 ${t.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${$(t.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 ${t.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 ${t.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 Hs(){return{localeError:Bl()}}var Gl=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\uC785\uB825"};return t=>{var o,s,u,c,a,l,f;switch(t.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${t.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${n(t.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return t.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${x(t.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${$(t.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let p=t.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",g=p==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",w=r(t.origin),P=(o=w==null?void 0:w.unit)!=null?o:"\uC694\uC18C";return w?`${(s=t.origin)!=null?s:"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()}${P} ${p}${g}`:`${(u=t.origin)!=null?u:"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()} ${p}${g}`}case"too_small":{let p=t.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",g=p==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",w=r(t.origin),P=(c=w==null?void 0:w.unit)!=null?c:"\uC694\uC18C";return w?`${(a=t.origin)!=null?a:"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()}${P} ${p}${g}`:`${(l=t.origin)!=null?l:"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()} ${p}${g}`}case"invalid_format":{let p=t;return p.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${p.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:p.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${p.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:p.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${p.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:p.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${p.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${(f=i[p.format])!=null?f:t.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${t.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${$(t.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${t.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${t.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Xs(){return{localeError:Gl()}}var Hl=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(t))return"\u043D\u0438\u0437\u0430";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Invalid input: expected ${x(t.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 ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${(o=t.origin)!=null?o:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\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 ${(u=t.origin)!=null?u:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0438\u043C\u0430 ${a}${t.minimum.toString()} ${l.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`Invalid ${(c=i[a.format])!=null?c:t.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 ${t.divisor}`;case"unrecognized_keys":return`${t.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"}: ${$(t.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${t.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 ${t.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Ys(){return{localeError:Hl()}}var Xl=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"nombor";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Input tidak sah: dijangka ${t.expected}, diterima ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${x(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Terlalu besar: dijangka ${(o=t.origin)!=null?o:"nilai"} ${l.verb} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elemen"}`:`Terlalu besar: dijangka ${(u=t.origin)!=null?u:"nilai"} adalah ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Terlalu kecil: dijangka ${t.origin} ${l.verb} ${a}${t.minimum.toString()} ${l.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${(c=i[a.format])!=null?c:t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${$(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function Qs(){return{localeError:Xl()}}var Yl=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"getal";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Ongeldige invoer: verwacht ${t.expected}, ontving ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${x(t.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Te lang: verwacht dat ${(o=t.origin)!=null?o:"waarde"} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elementen"} bevat`:`Te lang: verwacht dat ${(u=t.origin)!=null?u:"waarde"} ${a}${t.maximum.toString()} is`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Te kort: verwacht dat ${t.origin} ${a}${t.minimum.toString()} ${l.unit} bevat`:`Te kort: verwacht dat ${t.origin} ${a}${t.minimum.toString()} is`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${$(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function ec(){return{localeError:Yl()}}var Ql=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"tall";case"object":{if(Array.isArray(t))return"liste";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Ugyldig input: forventet ${t.expected}, fikk ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${x(t.values[0])}`:`Ugyldig valg: forventet en av ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`For stor(t): forventet ${(o=t.origin)!=null?o:"value"} til \xE5 ha ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elementer"}`:`For stor(t): forventet ${(u=t.origin)!=null?u:"value"} til \xE5 ha ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`For lite(n): forventet ${t.origin} til \xE5 ha ${a}${t.minimum.toString()} ${l.unit}`:`For lite(n): forventet ${t.origin} til \xE5 ha ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${$(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function tc(){return{localeError:Ql()}}var ed=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"numara";case"object":{if(Array.isArray(t))return"saf";if(t===null)return"gayb";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`F\xE2sit giren: umulan ${t.expected}, al\u0131nan ${n(t.input)}`;case"invalid_value":return t.values.length===1?`F\xE2sit giren: umulan ${x(t.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Fazla b\xFCy\xFCk: ${(o=t.origin)!=null?o:"value"}, ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${(u=t.origin)!=null?u:"value"}, ${a}${t.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${a}${t.minimum.toString()} ${l.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${a}${t.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let a=t;return a.format==="starts_with"?`F\xE2sit metin: "${a.prefix}" ile ba\u015Flamal\u0131.`:a.format==="ends_with"?`F\xE2sit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`F\xE2sit metin: "${a.includes}" ihtiv\xE2 etmeli.`:a.format==="regex"?`F\xE2sit metin: ${a.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${t.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${t.keys.length>1?"s":""}: ${$(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${t.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function rc(){return{localeError:ed()}}var td=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(t))return"\u0627\u0631\u06D0";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${t.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${n(t.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return t.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${x(t.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${$(t.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${(o=t.origin)!=null?o:"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${(u=t.origin)!=null?u:"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${t.maximum.toString()} \u0648\u064A`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${a}${t.minimum.toString()} ${l.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${a}${t.minimum.toString()} \u0648\u064A`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:a.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:a.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${a.includes}" \u0648\u0644\u0631\u064A`:a.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${a.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${(c=i[a.format])!=null?c:t.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${t.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${t.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${$(t.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${t.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 ${t.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function nc(){return{localeError:td()}}var rd=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"liczba";case"object":{if(Array.isArray(t))return"tablica";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"wej\u015Bcie"};return t=>{var o,s,u,c,a,l,f;switch(t.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${t.expected}, otrzymano ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${x(t.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${$(t.values,"|")}`;case"too_big":{let p=t.inclusive?"<=":"<",g=r(t.origin);return g?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${(o=t.origin)!=null?o:"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${p}${t.maximum.toString()} ${(s=g.unit)!=null?s:"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${(u=t.origin)!=null?u:"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${p}${t.maximum.toString()}`}case"too_small":{let p=t.inclusive?">=":">",g=r(t.origin);return g?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${(c=t.origin)!=null?c:"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${p}${t.minimum.toString()} ${(a=g.unit)!=null?a:"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${(l=t.origin)!=null?l:"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${p}${t.minimum.toString()}`}case"invalid_format":{let p=t;return p.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${p.prefix}"`:p.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${p.suffix}"`:p.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${p.includes}"`:p.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${p.pattern}`:`Nieprawid\u0142ow(y/a/e) ${(f=i[p.format])!=null?f:t.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${$(t.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${t.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${t.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function ic(){return{localeError:rd()}}var nd=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(t))return"array";if(t===null)return"nulo";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={regex:"padr\xE3o",email:"endere\xE7o de 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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${t.expected}, recebido ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: esperado ${x(t.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Muito grande: esperado que ${(o=t.origin)!=null?o:"valor"} tivesse ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elementos"}`:`Muito grande: esperado que ${(u=t.origin)!=null?u:"valor"} fosse ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Muito pequeno: esperado que ${t.origin} tivesse ${a}${t.minimum.toString()} ${l.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${a.prefix}"`:a.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inv\xE1lido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${a.pattern}`:`${(c=i[a.format])!=null?c:t.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${$(t.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${t.origin}`;default:return"Campo inv\xE1lido"}}};function oc(){return{localeError:nd()}}function ac(e,r,n,i){let t=Math.abs(e),o=t%10,s=t%100;return s>=11&&s<=19?i:o===1?r:o>=2&&o<=4?n:i}var id=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(t))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return t=>{var o,s,u;switch(t.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${x(t.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 ${$(t.values,"|")}`;case"too_big":{let c=t.inclusive?"<=":"<",a=r(t.origin);if(a){let l=Number(t.maximum),f=ac(l,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 ${(o=t.origin)!=null?o:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${c}${t.maximum.toString()} ${f}`}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 ${(s=t.origin)!=null?s:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${c}${t.maximum.toString()}`}case"too_small":{let c=t.inclusive?">=":">",a=r(t.origin);if(a){let l=Number(t.minimum),f=ac(l,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 ${t.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${c}${t.minimum.toString()} ${f}`}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 ${t.origin} \u0431\u0443\u0434\u0435\u0442 ${c}${t.minimum.toString()}`}case"invalid_format":{let c=t;return c.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 "${c.prefix}"`:c.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 "${c.suffix}"`:c.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 "${c.includes}"`:c.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 ${c.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${(u=i[c.format])!=null?u:t.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 ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${t.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0438":""}: ${$(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${t.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 ${t.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 sc(){return{localeError:id()}}var od=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(t))return"tabela";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${t.expected}, prejeto ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${x(t.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Preveliko: pri\u010Dakovano, da bo ${(o=t.origin)!=null?o:"vrednost"} imelo ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${(u=t.origin)!=null?u:"vrednost"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Premajhno: pri\u010Dakovano, da bo ${t.origin} imelo ${a}${t.minimum.toString()} ${l.unit}`:`Premajhno: pri\u010Dakovano, da bo ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${$(t.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function cc(){return{localeError:od()}}var ad=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"antal";case"object":{if(Array.isArray(t))return"lista";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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-intervall",ipv6:"IPv6-intervall",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",jwt:"JWT",template_literal:"mall-literal"};return t=>{var o,s,u,c,a,l,f,p;switch(t.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${t.expected}, fick ${n(t.input)}`;case"invalid_value":return t.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${x(t.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${$(t.values,"|")}`;case"too_big":{let g=t.inclusive?"<=":"<",w=r(t.origin);return w?`F\xF6r stor(t): f\xF6rv\xE4ntade ${(o=t.origin)!=null?o:"v\xE4rdet"} att ha ${g}${t.maximum.toString()} ${(s=w.unit)!=null?s:"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${(u=t.origin)!=null?u:"v\xE4rdet"} att ha ${g}${t.maximum.toString()}`}case"too_small":{let g=t.inclusive?">=":">",w=r(t.origin);return w?`F\xF6r lite(t): f\xF6rv\xE4ntade ${(c=t.origin)!=null?c:"v\xE4rdet"} att ha ${g}${t.minimum.toString()} ${w.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${(a=t.origin)!=null?a:"v\xE4rdet"} att ha ${g}${t.minimum.toString()}`}case"invalid_format":{let g=t;return g.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${g.prefix}"`:g.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${g.suffix}"`:g.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${g.includes}"`:g.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${g.pattern}"`:`Ogiltig(t) ${(l=i[g.format])!=null?l:t.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${$(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${(f=t.origin)!=null?f:"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${(p=t.origin)!=null?p:"v\xE4rdet"}`;default:return"Ogiltig input"}}};function uc(){return{localeError:ad()}}var sd=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(t))return"\u0B85\u0BA3\u0BBF";if(t===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"input"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\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 ${t.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n(t.input)}`;case"invalid_value":return t.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 ${x(t.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 ${$(t.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\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 ${(o=t.origin)!=null?o:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\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 ${(u=t.origin)!=null?u:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${t.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\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 ${t.origin} ${a}${t.minimum.toString()} ${l.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 ${t.origin} ${a}${t.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${a.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 ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${t.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${t.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${$(t.keys,", ")}`;case"invalid_key":return`${t.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`${t.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 lc(){return{localeError:sd()}}var cd=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(t))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(t===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\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 ${t.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${x(t.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 ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",l=r(t.origin);return l?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${(o=t.origin)!=null?o:"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${t.maximum.toString()} ${(s=l.unit)!=null?s:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${(u=t.origin)!=null?u:"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",l=r(t.origin);return l?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${t.minimum.toString()} ${l.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:a.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 ${a.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${(c=i[a.format])!=null?c:t.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 ${t.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: ${$(t.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.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 ${t.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function dc(){return{localeError:cd()}}var ud=e=>{let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return r},ld=()=>{let e={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"}};function r(i){var t;return(t=e[i])!=null?t: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",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",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return i=>{var t,o,s,u;switch(i.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${i.expected}, al\u0131nan ${ud(i.input)}`;case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${x(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${$(i.values,"|")}`;case"too_big":{let c=i.inclusive?"<=":"<",a=r(i.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${(t=i.origin)!=null?t:"de\u011Fer"} ${c}${i.maximum.toString()} ${(o=a.unit)!=null?o:"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${(s=i.origin)!=null?s:"de\u011Fer"} ${c}${i.maximum.toString()}`}case"too_small":{let c=i.inclusive?">=":">",a=r(i.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${c}${i.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${c}${i.minimum.toString()}`}case"invalid_format":{let c=i;return c.format==="starts_with"?`Ge\xE7ersiz metin: "${c.prefix}" ile ba\u015Flamal\u0131`:c.format==="ends_with"?`Ge\xE7ersiz metin: "${c.suffix}" ile bitmeli`:c.format==="includes"?`Ge\xE7ersiz metin: "${c.includes}" i\xE7ermeli`:c.format==="regex"?`Ge\xE7ersiz metin: ${c.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${(u=n[c.format])!=null?u: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":""}: ${$(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 pc(){return{localeError:ld()}}var dd=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(t))return"\u043C\u0430\u0441\u0438\u0432";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\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 ${t.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${n(t.input)}`;case"invalid_value":return t.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 ${x(t.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 ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\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 ${(o=t.origin)!=null?o:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${l.verb} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\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 ${(u=t.origin)!=null?u:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} ${l.verb} ${a}${t.minimum.toString()} ${l.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} \u0431\u0443\u0434\u0435 ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${(c=i[a.format])!=null?c:t.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 ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0456":""}: ${$(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${t.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 ${t.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 mc(){return{localeError:dd()}}var pd=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(t))return"\u0622\u0631\u06D2";if(t===null)return"\u0646\u0644";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${t.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${n(t.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return t.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${x(t.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${$(t.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${(o=t.origin)!=null?o:"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${(u=t.origin)!=null?u:"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${a}${t.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u06D2 ${a}${t.minimum.toString()} ${l.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u0627 ${a}${t.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${a.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${t.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${t.keys.length>1?"\u0632":""}: ${$(t.keys,"\u060C ")}`;case"invalid_key":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function gc(){return{localeError:pd()}}var md=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(t))return"m\u1EA3ng";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${t.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${x(t.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${(o=t.origin)!=null?o:"gi\xE1 tr\u1ECB"} ${l.verb} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${(u=t.origin)!=null?u:"gi\xE1 tr\u1ECB"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${l.verb} ${a}${t.minimum.toString()} ${l.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${a.prefix}"`:a.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${a.suffix}"`:a.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${a.includes}"`:a.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${a.pattern}`:`${(c=i[a.format])!=null?c:t.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 ${t.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${$(t.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.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 ${t.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function fc(){return{localeError:md()}}var gd=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(t))return"\u6570\u7EC4";if(t===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u8F93\u5165"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${t.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${x(t.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${(o=t.origin)!=null?o:"\u503C"} ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${(u=t.origin)!=null?u:"\u503C"} ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${a}${t.minimum.toString()} ${l.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.prefix}" \u5F00\u5934`:a.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.suffix}" \u7ED3\u5C3E`:a.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${a.pattern}`:`\u65E0\u6548${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${t.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${$(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${t.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function hc(){return{localeError:gd()}}var fd=()=>{let e={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"}};function r(t){var o;return(o=e[t])!=null?o:null}let n=t=>{let o=typeof t;switch(o){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return o},i={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",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",jwt:"JWT",template_literal:"\u8F38\u5165"};return t=>{var o,s,u,c;switch(t.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${t.expected}\uFF0C\u4F46\u6536\u5230 ${n(t.input)}`;case"invalid_value":return t.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${x(t.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${$(t.values,"|")}`;case"too_big":{let a=t.inclusive?"<=":"<",l=r(t.origin);return l?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${(o=t.origin)!=null?o:"\u503C"} \u61C9\u70BA ${a}${t.maximum.toString()} ${(s=l.unit)!=null?s:"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${(u=t.origin)!=null?u:"\u503C"} \u61C9\u70BA ${a}${t.maximum.toString()}`}case"too_small":{let a=t.inclusive?">=":">",l=r(t.origin);return l?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${a}${t.minimum.toString()} ${l.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${a}${t.minimum.toString()}`}case"invalid_format":{let a=t;return a.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.prefix}" \u958B\u982D`:a.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.suffix}" \u7D50\u5C3E`:a.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${a.pattern}`:`\u7121\u6548\u7684 ${(c=i[a.format])!=null?c:t.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${t.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${t.keys.length>1?"\u5011":""}\uFF1A${$(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function vc(){return{localeError:fd()}}var mo=Symbol("ZodOutput"),go=Symbol("ZodInput"),De=class{constructor(){this._map=new Map,this._idmap=new Map}add(r,...n){let i=n[0];if(this._map.set(r,i),i&&typeof i=="object"&&"id"in i){if(this._idmap.has(i.id))throw new Error(`ID ${i.id} already exists in the registry`);this._idmap.set(i.id,r)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){var i;let n=r._zod.parent;if(n){let t=d({},(i=this.get(n))!=null?i:{});return delete t.id,d(d({},t),this._map.get(r))}return this._map.get(r)}has(r){return this._map.has(r)}};function er(){return new De}var ie=er();function fo(e,r){return new e(d({type:"string"},y(r)))}function ho(e,r){return new e(d({type:"string",coerce:!0},y(r)))}function tr(e,r){return new e(d({type:"string",format:"email",check:"string_format",abort:!1},y(r)))}function st(e,r){return new e(d({type:"string",format:"guid",check:"string_format",abort:!1},y(r)))}function rr(e,r){return new e(d({type:"string",format:"uuid",check:"string_format",abort:!1},y(r)))}function nr(e,r){return new e(d({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},y(r)))}function ir(e,r){return new e(d({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},y(r)))}function or(e,r){return new e(d({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},y(r)))}function ar(e,r){return new e(d({type:"string",format:"url",check:"string_format",abort:!1},y(r)))}function sr(e,r){return new e(d({type:"string",format:"emoji",check:"string_format",abort:!1},y(r)))}function cr(e,r){return new e(d({type:"string",format:"nanoid",check:"string_format",abort:!1},y(r)))}function ur(e,r){return new e(d({type:"string",format:"cuid",check:"string_format",abort:!1},y(r)))}function lr(e,r){return new e(d({type:"string",format:"cuid2",check:"string_format",abort:!1},y(r)))}function dr(e,r){return new e(d({type:"string",format:"ulid",check:"string_format",abort:!1},y(r)))}function pr(e,r){return new e(d({type:"string",format:"xid",check:"string_format",abort:!1},y(r)))}function mr(e,r){return new e(d({type:"string",format:"ksuid",check:"string_format",abort:!1},y(r)))}function gr(e,r){return new e(d({type:"string",format:"ipv4",check:"string_format",abort:!1},y(r)))}function fr(e,r){return new e(d({type:"string",format:"ipv6",check:"string_format",abort:!1},y(r)))}function hr(e,r){return new e(d({type:"string",format:"cidrv4",check:"string_format",abort:!1},y(r)))}function vr(e,r){return new e(d({type:"string",format:"cidrv6",check:"string_format",abort:!1},y(r)))}function _r(e,r){return new e(d({type:"string",format:"base64",check:"string_format",abort:!1},y(r)))}function $r(e,r){return new e(d({type:"string",format:"base64url",check:"string_format",abort:!1},y(r)))}function yr(e,r){return new e(d({type:"string",format:"e164",check:"string_format",abort:!1},y(r)))}function br(e,r){return new e(d({type:"string",format:"jwt",check:"string_format",abort:!1},y(r)))}var vo={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _o(e,r){return new e(d({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},y(r)))}function $o(e,r){return new e(d({type:"string",format:"date",check:"string_format"},y(r)))}function yo(e,r){return new e(d({type:"string",format:"time",check:"string_format",precision:null},y(r)))}function bo(e,r){return new e(d({type:"string",format:"duration",check:"string_format"},y(r)))}function wo(e,r){return new e(d({type:"number",checks:[]},y(r)))}function ko(e,r){return new e(d({type:"number",coerce:!0,checks:[]},y(r)))}function xo(e,r){return new e(d({type:"number",check:"number_format",abort:!1,format:"safeint"},y(r)))}function So(e,r){return new e(d({type:"number",check:"number_format",abort:!1,format:"float32"},y(r)))}function Io(e,r){return new e(d({type:"number",check:"number_format",abort:!1,format:"float64"},y(r)))}function zo(e,r){return new e(d({type:"number",check:"number_format",abort:!1,format:"int32"},y(r)))}function Po(e,r){return new e(d({type:"number",check:"number_format",abort:!1,format:"uint32"},y(r)))}function jo(e,r){return new e(d({type:"boolean"},y(r)))}function Uo(e,r){return new e(d({type:"boolean",coerce:!0},y(r)))}function Oo(e,r){return new e(d({type:"bigint"},y(r)))}function No(e,r){return new e(d({type:"bigint",coerce:!0},y(r)))}function To(e,r){return new e(d({type:"bigint",check:"bigint_format",abort:!1,format:"int64"},y(r)))}function Eo(e,r){return new e(d({type:"bigint",check:"bigint_format",abort:!1,format:"uint64"},y(r)))}function Zo(e,r){return new e(d({type:"symbol"},y(r)))}function Do(e,r){return new e(d({type:"undefined"},y(r)))}function Ao(e,r){return new e(d({type:"null"},y(r)))}function Ro(e){return new e({type:"any"})}function Ae(e){return new e({type:"unknown"})}function Co(e,r){return new e(d({type:"never"},y(r)))}function Lo(e,r){return new e(d({type:"void"},y(r)))}function Mo(e,r){return new e(d({type:"date"},y(r)))}function Vo(e,r){return new e(d({type:"date",coerce:!0},y(r)))}function Jo(e,r){return new e(d({type:"nan"},y(r)))}function ce(e,r){return new Wt(S(d({check:"less_than"},y(r)),{value:e,inclusive:!1}))}function Y(e,r){return new Wt(S(d({check:"less_than"},y(r)),{value:e,inclusive:!0}))}function ue(e,r){return new Kt(S(d({check:"greater_than"},y(r)),{value:e,inclusive:!1}))}function G(e,r){return new Kt(S(d({check:"greater_than"},y(r)),{value:e,inclusive:!0}))}function Fo(e){return ue(0,e)}function qo(e){return ce(0,e)}function Wo(e){return Y(0,e)}function Ko(e){return G(0,e)}function ze(e,r){return new Fn(S(d({check:"multiple_of"},y(r)),{value:e}))}function Re(e,r){return new Kn(S(d({check:"max_size"},y(r)),{maximum:e}))}function Pe(e,r){return new Bn(S(d({check:"min_size"},y(r)),{minimum:e}))}function ct(e,r){return new Gn(S(d({check:"size_equals"},y(r)),{size:e}))}function Ce(e,r){return new Hn(S(d({check:"max_length"},y(r)),{maximum:e}))}function ve(e,r){return new Xn(S(d({check:"min_length"},y(r)),{minimum:e}))}function Le(e,r){return new Yn(S(d({check:"length_equals"},y(r)),{length:e}))}function ut(e,r){return new Qn(S(d({check:"string_format",format:"regex"},y(r)),{pattern:e}))}function lt(e){return new ei(d({check:"string_format",format:"lowercase"},y(e)))}function dt(e){return new ti(d({check:"string_format",format:"uppercase"},y(e)))}function pt(e,r){return new ri(S(d({check:"string_format",format:"includes"},y(r)),{includes:e}))}function mt(e,r){return new ni(S(d({check:"string_format",format:"starts_with"},y(r)),{prefix:e}))}function gt(e,r){return new ii(S(d({check:"string_format",format:"ends_with"},y(r)),{suffix:e}))}function Bo(e,r,n){return new oi(d({check:"property",property:e,schema:r},y(n)))}function ft(e,r){return new ai(d({check:"mime_type",mime:e},y(r)))}function le(e){return new si({check:"overwrite",tx:e})}function ht(e){return le(r=>r.normalize(e))}function vt(){return le(e=>e.trim())}function _t(){return le(e=>e.toLowerCase())}function $t(){return le(e=>e.toUpperCase())}function yt(e,r,n){return new e(d({type:"array",element:r},y(n)))}function hd(e,r,n){return new e(d({type:"union",options:r},y(n)))}function vd(e,r,n,i){return new e(d({type:"union",options:n,discriminator:r},y(i)))}function _d(e,r,n){return new e({type:"intersection",left:r,right:n})}function Go(e,r,n,i){let t=n instanceof N,o=t?i:n,s=t?n:null;return new e(d({type:"tuple",items:r,rest:s},y(o)))}function $d(e,r,n,i){return new e(d({type:"record",keyType:r,valueType:n},y(i)))}function yd(e,r,n,i){return new e(d({type:"map",keyType:r,valueType:n},y(i)))}function bd(e,r,n){return new e(d({type:"set",valueType:r},y(n)))}function wd(e,r,n){let i=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e(d({type:"enum",entries:i},y(n)))}function kd(e,r,n){return new e(d({type:"enum",entries:r},y(n)))}function xd(e,r,n){return new e(d({type:"literal",values:Array.isArray(r)?r:[r]},y(n)))}function Ho(e,r){return new e(d({type:"file"},y(r)))}function Sd(e,r){return new e({type:"transform",transform:r})}function Id(e,r){return new e({type:"optional",innerType:r})}function zd(e,r){return new e({type:"nullable",innerType:r})}function Pd(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():n}})}function jd(e,r,n){return new e(d({type:"nonoptional",innerType:r},y(n)))}function Ud(e,r){return new e({type:"success",innerType:r})}function Od(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function Nd(e,r,n){return new e({type:"pipe",in:r,out:n})}function Td(e,r){return new e({type:"readonly",innerType:r})}function Ed(e,r,n){return new e(d({type:"template_literal",parts:r},y(n)))}function Zd(e,r){return new e({type:"lazy",getter:r})}function Dd(e,r){return new e({type:"promise",innerType:r})}function Xo(e,r,n){var o;let i=y(n);return(o=i.abort)!=null||(i.abort=!0),new e(d({type:"custom",check:"custom",fn:r},i))}function Yo(e,r,n){return new e(d({type:"custom",check:"custom",fn:r},y(n)))}function Qo(e,r){var w,P,I,D,z,h;let n=y(r),i=(w=n.truthy)!=null?w:["true","1","yes","on","y","enabled"],t=(P=n.falsy)!=null?P:["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(v=>typeof v=="string"?v.toLowerCase():v),t=t.map(v=>typeof v=="string"?v.toLowerCase():v));let o=new Set(i),s=new Set(t),u=(I=e.Pipe)!=null?I:at,c=(D=e.Boolean)!=null?D:nt,a=(z=e.String)!=null?z:xe,l=(h=e.Transform)!=null?h:ot,f=new l({type:"transform",transform:(v,b)=>{let U=v;return n.case!=="sensitive"&&(U=U.toLowerCase()),o.has(U)?!0:s.has(U)?!1:(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:b.value,inst:f}),{})},error:n.error}),p=new u({type:"pipe",in:new a({type:"string",error:n.error}),out:f,error:n.error});return new u({type:"pipe",in:p,out:new c({type:"boolean",error:n.error}),error:n.error})}function ea(e,r,n,i={}){let t=y(i),o=d(S(d({},y(i)),{check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:u=>n.test(u)}),t);return n instanceof RegExp&&(o.pattern=n),new e(o)}var wr=class{constructor(r){this._def=r,this.def=r}implement(r){if(typeof r!="function")throw new Error("implement() must be called with a function");let n=(...i)=>{let t=this._def.input?Lt(this._def.input,i,void 0,{callee:n}):i;if(!Array.isArray(t))throw new Error("Invalid arguments schema: not an array or tuple schema.");let o=r(...t);return this._def.output?Lt(this._def.output,o,void 0,{callee:n}):o};return n}implementAsync(r){if(typeof r!="function")throw new Error("implement() must be called with a function");let n=(...i)=>_(this,null,function*(){let t=this._def.input?yield Vt(this._def.input,i,void 0,{callee:n}):i;if(!Array.isArray(t))throw new Error("Invalid arguments schema: not an array or tuple schema.");let o=yield r(...t);return this._def.output?Vt(this._def.output,o,void 0,{callee:n}):o});return n}input(...r){let n=this.constructor;return Array.isArray(r[0])?new n({type:"function",input:new Se({type:"tuple",items:r[0],rest:r[1]}),output:this._def.output}):new n({type:"function",input:r[0],output:this._def.output})}output(r){let n=this.constructor;return new n({type:"function",input:this._def.input,output:r})}};function ta(e){var r,n;return new wr({type:"function",input:Array.isArray(e==null?void 0:e.input)?Go(Se,e==null?void 0:e.input):(r=e==null?void 0:e.input)!=null?r:yt(it,Ae(Ze)),output:(n=e==null?void 0:e.output)!=null?n:Ae(Ze)})}var bt=class{constructor(r){var n,i,t,o,s;this.counter=0,this.metadataRegistry=(n=r==null?void 0:r.metadata)!=null?n:ie,this.target=(i=r==null?void 0:r.target)!=null?i:"draft-2020-12",this.unrepresentable=(t=r==null?void 0:r.unrepresentable)!=null?t:"throw",this.override=(o=r==null?void 0:r.override)!=null?o:()=>{},this.io=(s=r==null?void 0:r.io)!=null?s:"output",this.seen=new Map}process(r,n={path:[],schemaPath:[]}){var f,p,g,w,P;var i;let t=r._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(r);if(s)return s.count++,n.schemaPath.includes(r)&&(s.cycle=n.path),s.schema;let u={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(r,u);let c=(p=(f=r._zod).toJSONSchema)==null?void 0:p.call(f);if(c)u.schema=c;else{let I=S(d({},n),{schemaPath:[...n.schemaPath,r],path:n.path}),D=r._zod.parent;if(D)u.ref=D,this.process(D,I),this.seen.get(D).isParent=!0;else{let z=u.schema;switch(t.type){case"string":{let h=z;h.type="string";let{minimum:v,maximum:b,format:U,patterns:j,contentEncoding:O}=r._zod.bag;if(typeof v=="number"&&(h.minLength=v),typeof b=="number"&&(h.maxLength=b),U&&(h.format=(g=o[U])!=null?g:U,h.format===""&&delete h.format),O&&(h.contentEncoding=O),j&&j.size>0){let A=[...j];A.length===1?h.pattern=A[0].source:A.length>1&&(u.schema.allOf=[...A.map(q=>S(d({},this.target==="draft-7"?{type:"string"}:{}),{pattern:q.source}))])}break}case"number":{let h=z,{minimum:v,maximum:b,format:U,multipleOf:j,exclusiveMaximum:O,exclusiveMinimum:A}=r._zod.bag;typeof U=="string"&&U.includes("int")?h.type="integer":h.type="number",typeof A=="number"&&(h.exclusiveMinimum=A),typeof v=="number"&&(h.minimum=v,typeof A=="number"&&(A>=v?delete h.minimum:delete h.exclusiveMinimum)),typeof O=="number"&&(h.exclusiveMaximum=O),typeof b=="number"&&(h.maximum=b,typeof O=="number"&&(O<=b?delete h.maximum:delete h.exclusiveMaximum)),typeof j=="number"&&(h.multipleOf=j);break}case"boolean":{let h=z;h.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{z.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{z.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let h=z,{minimum:v,maximum:b}=r._zod.bag;typeof v=="number"&&(h.minItems=v),typeof b=="number"&&(h.maxItems=b),h.type="array",h.items=this.process(t.element,S(d({},I),{path:[...I.path,"items"]}));break}case"object":{let h=z;h.type="object",h.properties={};let v=t.shape;for(let j in v)h.properties[j]=this.process(v[j],S(d({},I),{path:[...I.path,"properties",j]}));let b=new Set(Object.keys(v)),U=new Set([...b].filter(j=>{let O=t.shape[j]._zod;return this.io==="input"?O.optin===void 0:O.optout===void 0}));U.size>0&&(h.required=Array.from(U)),((w=t.catchall)==null?void 0:w._zod.def.type)==="never"?h.additionalProperties=!1:t.catchall?t.catchall&&(h.additionalProperties=this.process(t.catchall,S(d({},I),{path:[...I.path,"additionalProperties"]}))):this.io==="output"&&(h.additionalProperties=!1);break}case"union":{let h=z;h.anyOf=t.options.map((v,b)=>this.process(v,S(d({},I),{path:[...I.path,"anyOf",b]})));break}case"intersection":{let h=z,v=this.process(t.left,S(d({},I),{path:[...I.path,"allOf",0]})),b=this.process(t.right,S(d({},I),{path:[...I.path,"allOf",1]})),U=O=>"allOf"in O&&Object.keys(O).length===1,j=[...U(v)?v.allOf:[v],...U(b)?b.allOf:[b]];h.allOf=j;break}case"tuple":{let h=z;h.type="array";let v=t.items.map((j,O)=>this.process(j,S(d({},I),{path:[...I.path,"prefixItems",O]})));if(this.target==="draft-2020-12"?h.prefixItems=v:h.items=v,t.rest){let j=this.process(t.rest,S(d({},I),{path:[...I.path,"items"]}));this.target==="draft-2020-12"?h.items=j:h.additionalItems=j}t.rest&&(h.items=this.process(t.rest,S(d({},I),{path:[...I.path,"items"]})));let{minimum:b,maximum:U}=r._zod.bag;typeof b=="number"&&(h.minItems=b),typeof U=="number"&&(h.maxItems=U);break}case"record":{let h=z;h.type="object",h.propertyNames=this.process(t.keyType,S(d({},I),{path:[...I.path,"propertyNames"]})),h.additionalProperties=this.process(t.valueType,S(d({},I),{path:[...I.path,"additionalProperties"]}));break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let h=z,v=Ke(t.entries);v.every(b=>typeof b=="number")&&(h.type="number"),v.every(b=>typeof b=="string")&&(h.type="string"),h.enum=v;break}case"literal":{let h=z,v=[];for(let b of t.values)if(b===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof b=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");v.push(Number(b))}else v.push(b);if(v.length!==0)if(v.length===1){let b=v[0];h.type=b===null?"null":typeof b,h.const=b}else v.every(b=>typeof b=="number")&&(h.type="number"),v.every(b=>typeof b=="string")&&(h.type="string"),v.every(b=>typeof b=="boolean")&&(h.type="string"),v.every(b=>b===null)&&(h.type="null"),h.enum=v;break}case"file":{let h=z,v={type:"string",format:"binary",contentEncoding:"binary"},{minimum:b,maximum:U,mime:j}=r._zod.bag;b!==void 0&&(v.minLength=b),U!==void 0&&(v.maxLength=U),j?j.length===1?(v.contentMediaType=j[0],Object.assign(h,v)):h.anyOf=j.map(O=>S(d({},v),{contentMediaType:O})):Object.assign(h,v);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let h=this.process(t.innerType,I);z.anyOf=[h,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,I),u.ref=t.innerType;break}case"success":{let h=z;h.type="boolean";break}case"default":{this.process(t.innerType,I),u.ref=t.innerType,z.default=JSON.parse(JSON.stringify(t.defaultValue));break}case"prefault":{this.process(t.innerType,I),u.ref=t.innerType,this.io==="input"&&(z._prefault=JSON.parse(JSON.stringify(t.defaultValue)));break}case"catch":{this.process(t.innerType,I),u.ref=t.innerType;let h;try{h=t.catchValue(void 0)}catch(v){throw new Error("Dynamic catch values are not supported in JSON Schema")}z.default=h;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let h=z,v=r._zod.pattern;if(!v)throw new Error("Pattern not found in template literal");h.type="string",h.pattern=v.source;break}case"pipe":{let h=this.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;this.process(h,I),u.ref=h;break}case"readonly":{this.process(t.innerType,I),u.ref=t.innerType,z.readOnly=!0;break}case"promise":{this.process(t.innerType,I),u.ref=t.innerType;break}case"optional":{this.process(t.innerType,I),u.ref=t.innerType;break}case"lazy":{let h=r._zod.innerType;this.process(h,I),u.ref=h;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let a=this.metadataRegistry.get(r);return a&&Object.assign(u.schema,a),this.io==="input"&&J(r)&&(delete u.schema.examples,delete u.schema.default),this.io==="input"&&u.schema._prefault&&((P=(i=u.schema).default)!=null||(i.default=u.schema._prefault)),delete u.schema._prefault,this.seen.get(r).schema}emit(r,n){var l,f,p,g,w,P,I,D,z,h;let i={cycles:(l=n==null?void 0:n.cycles)!=null?l:"ref",reused:(f=n==null?void 0:n.reused)!=null?f:"inline",external:(p=n==null?void 0:n.external)!=null?p:void 0},t=this.seen.get(r);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=v=>{var A,q,F,_e,pe;let b=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){let Pt=(A=i.external.registry.get(v[0]))==null?void 0:A.id,jt=(q=i.external.uri)!=null?q:Rr=>Rr;if(Pt)return{ref:jt(Pt)};let Je=(_e=(F=v[1].defId)!=null?F:v[1].schema.id)!=null?_e:`schema${this.counter++}`;return v[1].defId=Je,{defId:Je,ref:`${jt("__shared")}#/${b}/${Je}`}}if(v[1]===t)return{ref:"#"};let j=`#/${b}/`,O=(pe=v[1].schema.id)!=null?pe:`__schema${this.counter++}`;return{defId:O,ref:j+O}},s=v=>{if(v[1].schema.$ref)return;let b=v[1],{ref:U,defId:j}=o(v);b.def=d({},b.schema),j&&(b.defId=j);let O=b.schema;for(let A in O)delete O[A];O.$ref=U};if(i.cycles==="throw")for(let v of this.seen.entries()){let b=v[1];if(b.cycle)throw new Error(`Cycle detected: #/${(g=b.cycle)==null?void 0:g.join("/")}/<root>
|
|
28
|
-
|
|
29
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let v of this.seen.entries()){let b=v[1];if(r===v[0]){s(v);continue}if(i.external){let j=(w=i.external.registry.get(v[0]))==null?void 0:w.id;if(r!==v[0]&&j){s(v);continue}}if((P=this.metadataRegistry.get(v[0]))==null?void 0:P.id){s(v);continue}if(b.cycle){s(v);continue}if(b.count>1&&i.reused==="ref"){s(v);continue}}let u=(v,b)=>{var q,F,_e;let U=this.seen.get(v),j=(q=U.def)!=null?q:U.schema,O=d({},j);if(U.ref===null)return;let A=U.ref;if(U.ref=null,A){u(A,b);let pe=this.seen.get(A).schema;pe.$ref&&b.target==="draft-7"?(j.allOf=(F=j.allOf)!=null?F:[],j.allOf.push(pe)):(Object.assign(j,pe),Object.assign(j,O))}U.isParent||this.override({zodSchema:v,jsonSchema:j,path:(_e=U.path)!=null?_e:[]})};for(let v of[...this.seen.entries()].reverse())u(v[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(I=i.external)!=null&&I.uri){let v=(D=i.external.registry.get(r))==null?void 0:D.id;if(!v)throw new Error("Schema is missing an `id` property");c.$id=i.external.uri(v)}Object.assign(c,t.def);let a=(h=(z=i.external)==null?void 0:z.defs)!=null?h:{};for(let v of this.seen.entries()){let b=v[1];b.def&&b.defId&&(a[b.defId]=b.def)}i.external||Object.keys(a).length>0&&(this.target==="draft-2020-12"?c.$defs=a:c.definitions=a);try{return JSON.parse(JSON.stringify(c))}catch(v){throw new Error("Error converting schema to JSON.")}}};function ra(e,r){if(e instanceof De){let i=new bt(r),t={};for(let u of e._idmap.entries()){let[c,a]=u;i.process(a)}let o={},s={registry:e,uri:r==null?void 0:r.uri,defs:t};for(let u of e._idmap.entries()){let[c,a]=u;o[c]=i.emit(a,S(d({},r),{external:s}))}if(Object.keys(t).length>0){let u=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[u]:t}}return{schemas:o}}let n=new bt(r);return n.process(e),n.emit(e,r)}function J(e,r){let n=r!=null?r:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let t=e._zod.def;switch(t.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return J(t.element,n);case"object":{for(let o in t.shape)if(J(t.shape[o],n))return!0;return!1}case"union":{for(let o of t.options)if(J(o,n))return!0;return!1}case"intersection":return J(t.left,n)||J(t.right,n);case"tuple":{for(let o of t.items)if(J(o,n))return!0;return!!(t.rest&&J(t.rest,n))}case"record":return J(t.keyType,n)||J(t.valueType,n);case"map":return J(t.keyType,n)||J(t.valueType,n);case"set":return J(t.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return J(t.innerType,n);case"lazy":return J(t.getter(),n);case"default":return J(t.innerType,n);case"prefault":return J(t.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return J(t.in,n)||J(t.out,n);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${t.type}`)}var na={};var wt={};me(wt,{ZodISODate:()=>xr,ZodISODateTime:()=>kr,ZodISODuration:()=>Ir,ZodISOTime:()=>Sr,date:()=>oa,datetime:()=>ia,duration:()=>sa,time:()=>aa});var kr=m("ZodISODateTime",(e,r)=>{bi.init(e,r),L.init(e,r)});function ia(e){return _o(kr,e)}var xr=m("ZodISODate",(e,r)=>{wi.init(e,r),L.init(e,r)});function oa(e){return $o(xr,e)}var Sr=m("ZodISOTime",(e,r)=>{ki.init(e,r),L.init(e,r)});function aa(e){return yo(Sr,e)}var Ir=m("ZodISODuration",(e,r)=>{xi.init(e,r),L.init(e,r)});function sa(e){return bo(Ir,e)}var $c=(e,r)=>{Qe.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>tt(e,n)},flatten:{value:n=>et(e,n)},addIssue:{value:n=>e.issues.push(n)},addIssues:{value:n=>e.issues.push(...n)},isEmpty:{get(){return e.issues.length===0}}})},Rd=m("ZodError",$c),Me=m("ZodError",$c,{Parent:Error});var ca=Ct(Me),ua=Mt(Me),la=Jt(Me),da=Ft(Me);var T=m("ZodType",(e,r)=>(N.init(e,r),e.def=r,Object.defineProperty(e,"_def",{value:r}),e.check=(...n)=>{var i;return e.clone(S(d({},r),{checks:[...(i=r.checks)!=null?i:[],...n.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}))},e.clone=(n,i)=>H(e,n,i),e.brand=()=>e,e.register=(n,i)=>(n.add(e,i),e),e.parse=(n,i)=>ca(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>la(e,n,i),e.parseAsync=(n,i)=>_(null,null,function*(){return ua(e,n,i,{callee:e.parseAsync})}),e.safeParseAsync=(n,i)=>_(null,null,function*(){return da(e,n,i)}),e.spa=e.safeParseAsync,e.refine=(n,i)=>e.check(au(n,i)),e.superRefine=n=>e.check(su(n)),e.overwrite=n=>e.check(le(n)),e.optional=()=>jr(e),e.nullable=()=>Ur(e),e.nullish=()=>jr(Ur(e)),e.nonoptional=n=>Bc(e,n),e.array=()=>Ta(e),e.or=n=>Zr([e,n]),e.and=n=>Ec(e,n),e.transform=n=>Or(e,Aa(n)),e.default=n=>qc(e,n),e.prefault=n=>Kc(e,n),e.catch=n=>Xc(e,n),e.pipe=n=>Or(e,n),e.readonly=()=>eu(e),e.describe=n=>{let i=e.clone();return ie.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){var n;return(n=ie.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ie.get(e);let i=e.clone();return ie.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),ga=m("_ZodString",(e,r)=>{var i,t,o;xe.init(e,r),T.init(e,r);let n=e._zod.bag;e.format=(i=n.format)!=null?i:null,e.minLength=(t=n.minimum)!=null?t:null,e.maxLength=(o=n.maximum)!=null?o:null,e.regex=(...s)=>e.check(ut(...s)),e.includes=(...s)=>e.check(pt(...s)),e.startsWith=(...s)=>e.check(mt(...s)),e.endsWith=(...s)=>e.check(gt(...s)),e.min=(...s)=>e.check(ve(...s)),e.max=(...s)=>e.check(Ce(...s)),e.length=(...s)=>e.check(Le(...s)),e.nonempty=(...s)=>e.check(ve(1,...s)),e.lowercase=s=>e.check(lt(s)),e.uppercase=s=>e.check(dt(s)),e.trim=()=>e.check(vt()),e.normalize=(...s)=>e.check(ht(...s)),e.toLowerCase=()=>e.check(_t()),e.toUpperCase=()=>e.check($t())}),xt=m("ZodString",(e,r)=>{xe.init(e,r),ga.init(e,r),e.email=n=>e.check(tr(fa,n)),e.url=n=>e.check(ar(ha,n)),e.jwt=n=>e.check(br(Oa,n)),e.emoji=n=>e.check(sr(va,n)),e.guid=n=>e.check(st(zr,n)),e.uuid=n=>e.check(rr(de,n)),e.uuidv4=n=>e.check(nr(de,n)),e.uuidv6=n=>e.check(ir(de,n)),e.uuidv7=n=>e.check(or(de,n)),e.nanoid=n=>e.check(cr(_a,n)),e.guid=n=>e.check(st(zr,n)),e.cuid=n=>e.check(ur($a,n)),e.cuid2=n=>e.check(lr(ya,n)),e.ulid=n=>e.check(dr(ba,n)),e.base64=n=>e.check(_r(Pa,n)),e.base64url=n=>e.check($r(ja,n)),e.xid=n=>e.check(pr(wa,n)),e.ksuid=n=>e.check(mr(ka,n)),e.ipv4=n=>e.check(gr(xa,n)),e.ipv6=n=>e.check(fr(Sa,n)),e.cidrv4=n=>e.check(hr(Ia,n)),e.cidrv6=n=>e.check(vr(za,n)),e.e164=n=>e.check(yr(Ua,n)),e.datetime=n=>e.check(ia(n)),e.date=n=>e.check(oa(n)),e.time=n=>e.check(aa(n)),e.duration=n=>e.check(sa(n))});function pa(e){return fo(xt,e)}var L=m("ZodStringFormat",(e,r)=>{R.init(e,r),ga.init(e,r)}),fa=m("ZodEmail",(e,r)=>{pi.init(e,r),L.init(e,r)});function Ld(e){return tr(fa,e)}var zr=m("ZodGUID",(e,r)=>{li.init(e,r),L.init(e,r)});function Md(e){return st(zr,e)}var de=m("ZodUUID",(e,r)=>{di.init(e,r),L.init(e,r)});function Vd(e){return rr(de,e)}function Jd(e){return nr(de,e)}function Fd(e){return ir(de,e)}function qd(e){return or(de,e)}var ha=m("ZodURL",(e,r)=>{mi.init(e,r),L.init(e,r)});function Wd(e){return ar(ha,e)}var va=m("ZodEmoji",(e,r)=>{gi.init(e,r),L.init(e,r)});function Kd(e){return sr(va,e)}var _a=m("ZodNanoID",(e,r)=>{fi.init(e,r),L.init(e,r)});function Bd(e){return cr(_a,e)}var $a=m("ZodCUID",(e,r)=>{hi.init(e,r),L.init(e,r)});function Gd(e){return ur($a,e)}var ya=m("ZodCUID2",(e,r)=>{vi.init(e,r),L.init(e,r)});function Hd(e){return lr(ya,e)}var ba=m("ZodULID",(e,r)=>{_i.init(e,r),L.init(e,r)});function Xd(e){return dr(ba,e)}var wa=m("ZodXID",(e,r)=>{$i.init(e,r),L.init(e,r)});function Yd(e){return pr(wa,e)}var ka=m("ZodKSUID",(e,r)=>{yi.init(e,r),L.init(e,r)});function Qd(e){return mr(ka,e)}var xa=m("ZodIPv4",(e,r)=>{Si.init(e,r),L.init(e,r)});function ep(e){return gr(xa,e)}var Sa=m("ZodIPv6",(e,r)=>{Ii.init(e,r),L.init(e,r)});function tp(e){return fr(Sa,e)}var Ia=m("ZodCIDRv4",(e,r)=>{zi.init(e,r),L.init(e,r)});function rp(e){return hr(Ia,e)}var za=m("ZodCIDRv6",(e,r)=>{Pi.init(e,r),L.init(e,r)});function np(e){return vr(za,e)}var Pa=m("ZodBase64",(e,r)=>{Ui.init(e,r),L.init(e,r)});function ip(e){return _r(Pa,e)}var ja=m("ZodBase64URL",(e,r)=>{Oi.init(e,r),L.init(e,r)});function op(e){return $r(ja,e)}var Ua=m("ZodE164",(e,r)=>{Ni.init(e,r),L.init(e,r)});function ap(e){return yr(Ua,e)}var Oa=m("ZodJWT",(e,r)=>{Ti.init(e,r),L.init(e,r)});function sp(e){return br(Oa,e)}var yc=m("ZodCustomStringFormat",(e,r)=>{Ei.init(e,r),L.init(e,r)});function cp(e,r,n={}){return ea(yc,e,r,n)}var St=m("ZodNumber",(e,r)=>{var i,t,o,s,u,c,a,l,f;Ht.init(e,r),T.init(e,r),e.gt=(p,g)=>e.check(ue(p,g)),e.gte=(p,g)=>e.check(G(p,g)),e.min=(p,g)=>e.check(G(p,g)),e.lt=(p,g)=>e.check(ce(p,g)),e.lte=(p,g)=>e.check(Y(p,g)),e.max=(p,g)=>e.check(Y(p,g)),e.int=p=>e.check(ma(p)),e.safe=p=>e.check(ma(p)),e.positive=p=>e.check(ue(0,p)),e.nonnegative=p=>e.check(G(0,p)),e.negative=p=>e.check(ce(0,p)),e.nonpositive=p=>e.check(Y(0,p)),e.multipleOf=(p,g)=>e.check(ze(p,g)),e.step=(p,g)=>e.check(ze(p,g)),e.finite=()=>e;let n=e._zod.bag;e.minValue=(o=Math.max((i=n.minimum)!=null?i:Number.NEGATIVE_INFINITY,(t=n.exclusiveMinimum)!=null?t:Number.NEGATIVE_INFINITY))!=null?o:null,e.maxValue=(c=Math.min((s=n.maximum)!=null?s:Number.POSITIVE_INFINITY,(u=n.exclusiveMaximum)!=null?u:Number.POSITIVE_INFINITY))!=null?c:null,e.isInt=((a=n.format)!=null?a:"").includes("int")||Number.isSafeInteger((l=n.multipleOf)!=null?l:.5),e.isFinite=!0,e.format=(f=n.format)!=null?f:null});function bc(e){return wo(St,e)}var Ve=m("ZodNumberFormat",(e,r)=>{Zi.init(e,r),St.init(e,r)});function ma(e){return xo(Ve,e)}function up(e){return So(Ve,e)}function lp(e){return Io(Ve,e)}function dp(e){return zo(Ve,e)}function pp(e){return Po(Ve,e)}var It=m("ZodBoolean",(e,r)=>{nt.init(e,r),T.init(e,r)});function wc(e){return jo(It,e)}var zt=m("ZodBigInt",(e,r)=>{var i,t,o;Xt.init(e,r),T.init(e,r),e.gte=(s,u)=>e.check(G(s,u)),e.min=(s,u)=>e.check(G(s,u)),e.gt=(s,u)=>e.check(ue(s,u)),e.gte=(s,u)=>e.check(G(s,u)),e.min=(s,u)=>e.check(G(s,u)),e.lt=(s,u)=>e.check(ce(s,u)),e.lte=(s,u)=>e.check(Y(s,u)),e.max=(s,u)=>e.check(Y(s,u)),e.positive=s=>e.check(ue(BigInt(0),s)),e.negative=s=>e.check(ce(BigInt(0),s)),e.nonpositive=s=>e.check(Y(BigInt(0),s)),e.nonnegative=s=>e.check(G(BigInt(0),s)),e.multipleOf=(s,u)=>e.check(ze(s,u));let n=e._zod.bag;e.minValue=(i=n.minimum)!=null?i:null,e.maxValue=(t=n.maximum)!=null?t:null,e.format=(o=n.format)!=null?o:null});function mp(e){return Oo(zt,e)}var Na=m("ZodBigIntFormat",(e,r)=>{Di.init(e,r),zt.init(e,r)});function gp(e){return To(Na,e)}function fp(e){return Eo(Na,e)}var kc=m("ZodSymbol",(e,r)=>{Ai.init(e,r),T.init(e,r)});function hp(e){return Zo(kc,e)}var xc=m("ZodUndefined",(e,r)=>{Ri.init(e,r),T.init(e,r)});function vp(e){return Do(xc,e)}var Sc=m("ZodNull",(e,r)=>{Ci.init(e,r),T.init(e,r)});function Ic(e){return Ao(Sc,e)}var zc=m("ZodAny",(e,r)=>{Li.init(e,r),T.init(e,r)});function _p(){return Ro(zc)}var Pc=m("ZodUnknown",(e,r)=>{Ze.init(e,r),T.init(e,r)});function Pr(){return Ae(Pc)}var jc=m("ZodNever",(e,r)=>{Mi.init(e,r),T.init(e,r)});function Nr(e){return Co(jc,e)}var Uc=m("ZodVoid",(e,r)=>{Vi.init(e,r),T.init(e,r)});function $p(e){return Lo(Uc,e)}var Tr=m("ZodDate",(e,r)=>{Ji.init(e,r),T.init(e,r),e.min=(i,t)=>e.check(G(i,t)),e.max=(i,t)=>e.check(Y(i,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function yp(e){return Mo(Tr,e)}var Oc=m("ZodArray",(e,r)=>{it.init(e,r),T.init(e,r),e.element=r.element,e.min=(n,i)=>e.check(ve(n,i)),e.nonempty=n=>e.check(ve(1,n)),e.max=(n,i)=>e.check(Ce(n,i)),e.length=(n,i)=>e.check(Le(n,i)),e.unwrap=()=>e.element});function Ta(e,r){return yt(Oc,e,r)}function bp(e){let r=e._zod.def.shape;return Mc(Object.keys(r))}var Er=m("ZodObject",(e,r)=>{Fi.init(e,r),T.init(e,r),k.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>Cc(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone(S(d({},e._zod.def),{catchall:n})),e.passthrough=()=>e.clone(S(d({},e._zod.def),{catchall:Pr()})),e.loose=()=>e.clone(S(d({},e._zod.def),{catchall:Pr()})),e.strict=()=>e.clone(S(d({},e._zod.def),{catchall:Nr()})),e.strip=()=>e.clone(S(d({},e._zod.def),{catchall:void 0})),e.extend=n=>k.extend(e,n),e.merge=n=>k.merge(e,n),e.pick=n=>k.pick(e,n),e.omit=n=>k.omit(e,n),e.partial=(...n)=>k.partial(Ra,e,n[0]),e.required=(...n)=>k.required(Ca,e,n[0])});function wp(e,r){let n=d({type:"object",get shape(){return k.assignProp(this,"shape",d({},e)),this.shape}},k.normalizeParams(r));return new Er(n)}function kp(e,r){return new Er(d({type:"object",get shape(){return k.assignProp(this,"shape",d({},e)),this.shape},catchall:Nr()},k.normalizeParams(r)))}function xp(e,r){return new Er(d({type:"object",get shape(){return k.assignProp(this,"shape",d({},e)),this.shape},catchall:Pr()},k.normalizeParams(r)))}var Ea=m("ZodUnion",(e,r)=>{Yt.init(e,r),T.init(e,r),e.options=r.options});function Zr(e,r){return new Ea(d({type:"union",options:e},k.normalizeParams(r)))}var Nc=m("ZodDiscriminatedUnion",(e,r)=>{Ea.init(e,r),qi.init(e,r)});function Sp(e,r,n){return new Nc(d({type:"union",options:r,discriminator:e},k.normalizeParams(n)))}var Tc=m("ZodIntersection",(e,r)=>{Wi.init(e,r),T.init(e,r)});function Ec(e,r){return new Tc({type:"intersection",left:e,right:r})}var Zc=m("ZodTuple",(e,r)=>{Se.init(e,r),T.init(e,r),e.rest=n=>e.clone(S(d({},e._zod.def),{rest:n}))});function Ip(e,r,n){let i=r instanceof N,t=i?n:r,o=i?r:null;return new Zc(d({type:"tuple",items:e,rest:o},k.normalizeParams(t)))}var Za=m("ZodRecord",(e,r)=>{Ki.init(e,r),T.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function Dc(e,r,n){return new Za(d({type:"record",keyType:e,valueType:r},k.normalizeParams(n)))}function zp(e,r,n){return new Za(d({type:"record",keyType:Zr([e,Nr()]),valueType:r},k.normalizeParams(n)))}var Ac=m("ZodMap",(e,r)=>{Bi.init(e,r),T.init(e,r),e.keyType=r.keyType,e.valueType=r.valueType});function Pp(e,r,n){return new Ac(d({type:"map",keyType:e,valueType:r},k.normalizeParams(n)))}var Rc=m("ZodSet",(e,r)=>{Gi.init(e,r),T.init(e,r),e.min=(...n)=>e.check(Pe(...n)),e.nonempty=n=>e.check(Pe(1,n)),e.max=(...n)=>e.check(Re(...n)),e.size=(...n)=>e.check(ct(...n))});function jp(e,r){return new Rc(d({type:"set",valueType:e},k.normalizeParams(r)))}var kt=m("ZodEnum",(e,r)=>{Hi.init(e,r),T.init(e,r),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{let o={};for(let s of i)if(n.has(s))o[s]=r.entries[s];else throw new Error(`Key ${s} not found in enum`);return new kt(S(d(S(d({},r),{checks:[]}),k.normalizeParams(t)),{entries:o}))},e.exclude=(i,t)=>{let o=d({},r.entries);for(let s of i)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new kt(S(d(S(d({},r),{checks:[]}),k.normalizeParams(t)),{entries:o}))}});function Cc(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new kt(d({type:"enum",entries:n},k.normalizeParams(r)))}function Up(e,r){return new kt(d({type:"enum",entries:e},k.normalizeParams(r)))}var Lc=m("ZodLiteral",(e,r)=>{Xi.init(e,r),T.init(e,r),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function Mc(e,r){return new Lc(d({type:"literal",values:Array.isArray(e)?e:[e]},k.normalizeParams(r)))}var Vc=m("ZodFile",(e,r)=>{Yi.init(e,r),T.init(e,r),e.min=(n,i)=>e.check(Pe(n,i)),e.max=(n,i)=>e.check(Re(n,i)),e.mime=(n,i)=>e.check(ft(Array.isArray(n)?n:[n],i))});function Op(e){return Ho(Vc,e)}var Da=m("ZodTransform",(e,r)=>{ot.init(e,r),T.init(e,r),e._zod.parse=(n,i)=>{n.addIssue=o=>{var s,u,c,a;if(typeof o=="string")n.issues.push(k.issue(o,n.value,r));else{let l=o;l.fatal&&(l.continue=!1),(s=l.code)!=null||(l.code="custom"),(u=l.input)!=null||(l.input=n.value),(c=l.inst)!=null||(l.inst=e),(a=l.continue)!=null||(l.continue=!0),n.issues.push(k.issue(l))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(o=>(n.value=o,n)):(n.value=t,n)}});function Aa(e){return new Da({type:"transform",transform:e})}var Ra=m("ZodOptional",(e,r)=>{Qi.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.innerType});function jr(e){return new Ra({type:"optional",innerType:e})}var Jc=m("ZodNullable",(e,r)=>{eo.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Ur(e){return new Jc({type:"nullable",innerType:e})}function Np(e){return jr(Ur(e))}var Fc=m("ZodDefault",(e,r)=>{to.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qc(e,r){return new Fc({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}var Wc=m("ZodPrefault",(e,r)=>{ro.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Kc(e,r){return new Wc({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}var Ca=m("ZodNonOptional",(e,r)=>{no.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Bc(e,r){return new Ca(d({type:"nonoptional",innerType:e},k.normalizeParams(r)))}var Gc=m("ZodSuccess",(e,r)=>{io.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Tp(e){return new Gc({type:"success",innerType:e})}var Hc=m("ZodCatch",(e,r)=>{oo.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Xc(e,r){return new Hc({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var Yc=m("ZodNaN",(e,r)=>{ao.init(e,r),T.init(e,r)});function Ep(e){return Jo(Yc,e)}var La=m("ZodPipe",(e,r)=>{at.init(e,r),T.init(e,r),e.in=r.in,e.out=r.out});function Or(e,r){return new La({type:"pipe",in:e,out:r})}var Qc=m("ZodReadonly",(e,r)=>{so.init(e,r),T.init(e,r)});function eu(e){return new Qc({type:"readonly",innerType:e})}var tu=m("ZodTemplateLiteral",(e,r)=>{co.init(e,r),T.init(e,r)});function Zp(e,r){return new tu(d({type:"template_literal",parts:e},k.normalizeParams(r)))}var ru=m("ZodLazy",(e,r)=>{lo.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.getter()});function nu(e){return new ru({type:"lazy",getter:e})}var iu=m("ZodPromise",(e,r)=>{uo.init(e,r),T.init(e,r),e.unwrap=()=>e._zod.def.innerType});function Dp(e){return new iu({type:"promise",innerType:e})}var Dr=m("ZodCustom",(e,r)=>{po.init(e,r),T.init(e,r)});function ou(e){let r=new M({check:"custom"});return r._zod.check=e,r}function Ap(e,r){return Xo(Dr,e!=null?e:()=>!0,r)}function au(e,r={}){return Yo(Dr,e,r)}function su(e){let r=ou(n=>(n.addIssue=i=>{var t,o,s,u;if(typeof i=="string")n.issues.push(k.issue(i,n.value,r._zod.def));else{let c=i;c.fatal&&(c.continue=!1),(t=c.code)!=null||(c.code="custom"),(o=c.input)!=null||(c.input=n.value),(s=c.inst)!=null||(c.inst=r),(u=c.continue)!=null||(c.continue=!r._zod.def.abort),n.issues.push(k.issue(c))}},e(n.value,n)));return r}function Rp(e,r={error:`Input not instance of ${e.name}`}){let n=new Dr(d({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0},k.normalizeParams(r)));return n._zod.bag.Class=e,n}var Cp=(...e)=>Qo({Pipe:La,Boolean:It,String:xt,Transform:Da},...e);function Lp(e){let r=nu(()=>Zr([pa(e),bc(),wc(),Ic(),Ta(r),Dc(pa(),r)]));return r}function Mp(e,r){return Or(Aa(e),r)}var Vp={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 Jp(e){V({customError:e})}function Fp(){return V().customError}var Ma;Ma||(Ma={});var Ar={};me(Ar,{bigint:()=>Bp,boolean:()=>Kp,date:()=>Gp,number:()=>Wp,string:()=>qp});function qp(e){return ho(xt,e)}function Wp(e){return ko(St,e)}function Kp(e){return Uo(It,e)}function Bp(e){return No(zt,e)}function Gp(e){return Vo(Tr,e)}V(Qt());var C=Va;var cu=C.object({iss:C.string(),sub:C.string(),aud:C.union([C.string(),C.array(C.string())]),exp:C.number(),iat:C.number(),azp:C.string().optional(),client_id:C.string().optional(),at_hash:C.string().optional(),sid:C.string().optional()}),uu=C.object({sub:C.string(),name:C.string().optional(),given_name:C.string().optional(),family_name:C.string().optional(),updated_at:C.number().optional(),phone_number:C.string().optional(),phone_number_verified:C.boolean().optional()}),lu=C.object({accessToken:C.string(),idToken:C.string(),tokenType:C.string(),expiresIn:C.string()});var Ja=class{constructor(r){Nt(this,"config");Nt(this,"userManager");Nt(this,"_user",null);if(typeof window=="undefined")throw new Error("[PPLE Mini App] PPLEMiniApp can only be instantiated in a browser environment");let n=this.isMiniApp();this.config=r,this.userManager=new ls({authority:this.config.oauthUrl,client_id:this.config.oauthClientId,redirect_uri:this.config.oauthRedirectUri,response_type:"code",scope:"openid profile phone",userStore:new At({store:n?window.sessionStorage:window.localStorage})})}extractJWTPayload(r){return _(this,null,function*(){let n=r.split(".")[1],i=atob(n),t=yield cu.safeParseAsync(JSON.parse(i));if(!t.success)throw new Error("[PPLE Mini App] Invalid ID token payload format");if(t.data.exp<=new Date().getTime()/1e3)throw yield this.logout(),new Error("[PPLE Mini App] ID token has expired");return t.data})}getAccessTokenFromUrl(){return _(this,null,function*(){let r=new URLSearchParams(window.location.search),n={accessToken:r.get("access_token"),idToken:r.get("id_token"),tokenType:r.get("token_type"),expiresIn:r.get("expires_in")},i=yield lu.safeParseAsync(n);return i.success?i.data:null})}storeUserInOIDCClient(){return _(this,null,function*(){let r=yield this.userManager.getUser();if(!(r!=null&&r.profile))throw new Error("[PPLE Mini App] No existing user profile found in OIDC client");if(r.state&&r.state.isProfileFetched)return r;let n=yield this.fetchProfileByAccessToken(r.access_token),i=new je(S(d({},r),{profile:d(d({},r==null?void 0:r.profile),n),userState:{isProfileFetched:!0}}));return yield this.userManager.storeUser(i),i})}storeJWTProfileInOIDCClient(r){return _(this,null,function*(){let n=yield this.extractJWTPayload(r.idToken),i=new je({access_token:r.accessToken,id_token:r.idToken,token_type:r.tokenType,profile:{sub:n.sub,aud:n.aud,iss:n.iss,exp:n.exp,iat:n.iat}});return yield this.userManager.storeUser(i),i})}fetchProfileByAccessToken(r){return _(this,null,function*(){let n=yield this.userManager.metadataService.getUserInfoEndpoint(),i=yield fetch(n,{headers:{Authorization:`Bearer ${r}`}});if(!i.ok)throw new Error("[PPLE Mini App] Failed to fetch user info from OAuth server");let t=yield i.json();if(uu.safeParse(t).success===!1)throw new Error("[PPLE Mini App] Invalid user info format received from OAuth server");return t})}init(){return _(this,null,function*(){if(console.log("[PPLE Mini App] Initializing PPLE Mini App..."),this.isMiniApp()){let r=yield this.getAccessTokenFromUrl();if(r){let n=yield this.storeJWTProfileInOIDCClient(r);console.log("[PPLE Mini App] User signed in successfully via Mini App URL parameters"),this._user=n}else{let n=yield this.userManager.getUser();if(n){this._user=n,console.log("[PPLE Mini App] Existing user found, no need to sign in again");return}throw new Error("[PPLE Mini App] No user is currently logged in in Mini App")}}else{try{let r=yield this.userManager.signinCallback();if(r){let n={accessToken:r.access_token,idToken:r.id_token,tokenType:"Bearer",expiresIn:(r.expires_in||3600).toString()},i=yield this.storeJWTProfileInOIDCClient(n);this._user=i,console.log("[PPLE Mini App] User signed in successfully");return}console.error("[PPLE Mini App] Signin callback did not return a user")}catch(r){console.warn("[PPLE Mini App] No signin callback to process");let n=yield this.userManager.getUser();if(n){this._user=n,console.log("[PPLE Mini App] Existing user found, no need to sign in again");return}}console.warn("[PPLE Mini App] Redirecting to sign-in page..."),yield this.userManager.signinRedirect()}})}getAccessToken(){return _(this,null,function*(){if(!this._user)throw new Error("[PPLE Mini App] No user is currently logged in");return this._user.access_token})}getProfile(){return _(this,null,function*(){if(!this._user)throw new Error("[PPLE Mini App] No user is currently logged in");let r=yield this.storeUserInOIDCClient();return this._user=r,{sub:this._user.profile.sub,family_name:this._user.profile.family_name,given_name:this._user.profile.given_name,phone_number:this._user.profile.phone_number,name:this._user.profile.name,phone_number_verified:this._user.profile.phone_number_verified,updated_at:this._user.profile.updated_at}})}isMiniApp(){let r=new URLSearchParams(window.location.search),n=!!navigator.userAgent.match(/PPLETodayApp\/(\d.\d.\d) MiniApp/),i=!!r.has("access_token");return n&&i}logout(){return _(this,null,function*(){yield this.userManager.revokeTokens(["access_token"]),yield this.userManager.removeUser()})}};0&&(module.exports={PPLEMiniApp});
|
|
1
|
+
"use strict";var w=Object.defineProperty,_=Object.defineProperties;var A=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var l=(r,e,i)=>e in r?w(r,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):r[e]=i,a=(r,e)=>{for(var i in e||(e={}))k.call(e,i)&&l(r,i,e[i]);if(h)for(var i of h(e))M.call(e,i)&&l(r,i,e[i]);return r},g=(r,e)=>_(r,A(e));var c=(r,e,i)=>l(r,typeof e!="symbol"?e+"":e,i);var n=(r,e,i)=>new Promise((s,t)=>{var f=o=>{try{p(i.next(o))}catch(u){t(u)}},P=o=>{try{p(i.throw(o))}catch(u){t(u)}},p=o=>o.done?s(o.value):Promise.resolve(o.value).then(f,P);p((i=i.apply(r,e)).next())});import{User as d,UserManager as y,WebStorageStateStore as m}from"oidc-client-ts";import{AccessTokenDetailsSchema as U,IdTokenPayloadSchema as E,UserInfoSchema as I}from"./models";export class PPLEMiniApp{constructor(e){c(this,"config");c(this,"userManager");c(this,"_user",null);if(typeof window=="undefined")throw new Error("[PPLE Mini App] PPLEMiniApp can only be instantiated in a browser environment");const i=this.isMiniApp();this.config=e,this.userManager=new y({authority:this.config.oauthUrl,client_id:this.config.oauthClientId,redirect_uri:this.config.oauthRedirectUri,response_type:"code",scope:"openid profile phone",userStore:new m({store:i?window.sessionStorage:window.localStorage})})}extractJWTPayload(e){return n(this,null,function*(){const i=e.split(".")[1],s=atob(i),t=yield E.safeParseAsync(JSON.parse(s));if(!t.success)throw new Error("[PPLE Mini App] Invalid ID token payload format");if(t.data.exp<=new Date().getTime()/1e3)throw yield this.logout(),new Error("[PPLE Mini App] ID token has expired");return t.data})}getAccessTokenFromUrl(){return n(this,null,function*(){const e=new URLSearchParams(window.location.search),i={accessToken:e.get("access_token"),idToken:e.get("id_token"),tokenType:e.get("token_type"),expiresIn:e.get("expires_in")},s=yield U.safeParseAsync(i);return s.success?s.data:null})}storeUserInOIDCClient(){return n(this,null,function*(){const e=yield this.userManager.getUser();if(!(e!=null&&e.profile))throw new Error("[PPLE Mini App] No existing user profile found in OIDC client");if(e.state&&e.state.isProfileFetched)return e;const i=yield this.fetchProfileByAccessToken(e.access_token),s=new d(g(a({},e),{profile:a(a({},e==null?void 0:e.profile),i),userState:{isProfileFetched:!0}}));return yield this.userManager.storeUser(s),s})}storeJWTProfileInOIDCClient(e){return n(this,null,function*(){const i=yield this.extractJWTPayload(e.idToken),s=new d({access_token:e.accessToken,id_token:e.idToken,token_type:e.tokenType,profile:{sub:i.sub,aud:i.aud,iss:i.iss,exp:i.exp,iat:i.iat}});return yield this.userManager.storeUser(s),s})}fetchProfileByAccessToken(e){return n(this,null,function*(){const i=yield this.userManager.metadataService.getUserInfoEndpoint(),s=yield fetch(i,{headers:{Authorization:`Bearer ${e}`}});if(!s.ok)throw new Error("[PPLE Mini App] Failed to fetch user info from OAuth server");const t=yield s.json();if(I.safeParse(t).success===!1)throw new Error("[PPLE Mini App] Invalid user info format received from OAuth server");return t})}init(){return n(this,null,function*(){if(console.log("[PPLE Mini App] Initializing PPLE Mini App..."),this.isMiniApp()){const e=yield this.getAccessTokenFromUrl();if(e){const i=yield this.storeJWTProfileInOIDCClient(e);console.log("[PPLE Mini App] User signed in successfully via Mini App URL parameters"),this._user=i}else{const i=yield this.userManager.getUser();if(i){this._user=i,console.log("[PPLE Mini App] Existing user found, no need to sign in again");return}throw new Error("[PPLE Mini App] No user is currently logged in in Mini App")}}else{try{const e=yield this.userManager.signinCallback();if(e){const i={accessToken:e.access_token,idToken:e.id_token,tokenType:"Bearer",expiresIn:(e.expires_in||3600).toString()},s=yield this.storeJWTProfileInOIDCClient(i);this._user=s,console.log("[PPLE Mini App] User signed in successfully");return}console.error("[PPLE Mini App] Signin callback did not return a user")}catch(e){console.warn("[PPLE Mini App] No signin callback to process");const i=yield this.userManager.getUser();if(i){this._user=i,console.log("[PPLE Mini App] Existing user found, no need to sign in again");return}}console.warn("[PPLE Mini App] Redirecting to sign-in page..."),yield this.userManager.signinRedirect()}})}getAccessToken(){return n(this,null,function*(){if(!this._user)throw new Error("[PPLE Mini App] No user is currently logged in");return this._user.access_token})}getProfile(){return n(this,null,function*(){if(!this._user)throw new Error("[PPLE Mini App] No user is currently logged in");const e=yield this.storeUserInOIDCClient();return this._user=e,{sub:this._user.profile.sub,family_name:this._user.profile.family_name,given_name:this._user.profile.given_name,phone_number:this._user.profile.phone_number,name:this._user.profile.name,phone_number_verified:this._user.profile.phone_number_verified,updated_at:this._user.profile.updated_at}})}isMiniApp(){const e=new URLSearchParams(window.location.search),i=!!navigator.userAgent.match(/PPLETodayApp\/(\d.\d.\d) MiniApp/),s=!!e.has("access_token");return i&&s}logout(){return n(this,null,function*(){yield this.userManager.revokeTokens(["access_token"]),yield this.userManager.removeUser()})}}
|