PageSourceSearch

https://www.pprt.de/_assets/vite/index-tqvNkVHT.js

js pprt.de collected 2026-09-24 23:43:42 UTC 112,590 bytes, 3 lines download raw bytes

1var Kt=Object.defineProperty;var mt=r=>{throw TypeError(r)};var Jt=(r,e,t)=>e in r?Kt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Xe=(r,e,t)=>Jt(r,typeof e!="symbol"?e+"":e,t),Qe=(r,e,t)=>e.has(r)||mt("Cannot "+t);var i=(r,e,t)=>(Qe(r,e,"read from private field"),t?t.call(r):e.get(r)),G=(r,e,t)=>e.has(r)?mt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),Z=(r,e,t,s)=>(Qe(r,e,"write to private field"),s?s.call(r,t):e.set(r,t),t),U=(r,e,t)=>(Qe(r,e,"access private method"),t);import{j as ht,k as K,l as F,p as R,z as oe,B as fe,q as le,v as ze,F as pt,C as Lt,a as Gt,r as Ce,f as Me,u as C,s as he,D as gt,E as Yt,G as Xt,b as Qt,H as er,A as tr}from"./runtime-dom.esm-bundler-NR2HCJrT.js";var Be={exports:{}},vt;function rr(){return vt||(vt=1,function(r,e){(()=>{var H,z,h,v,I,W,Y,ve,ce,ae,be,f,ne,X,ue,O,Se,at,Ue,qe,nt,jt,Zt,it,Dt,Bt,Fe,De,zt,We;const t="vibrate"in navigator&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(typeof window>"u")return;const s=(se,A={})=>window!=null&&window.CAP_CUSTOM_FETCH?window.CAP_CUSTOM_FETCH(se,A):fetch(se,A);function a(se,A){let o=function(m){let E=2166136261;for(let y=0;y<m.length;y++)E^=m.charCodeAt(y),E+=(E<<1)+(E<<4)+(E<<7)+(E<<8)+(E<<24);return E>>>0}(se),c="";function u(){return o^=o<<13,o^=o>>>17,o^=o<<5,o>>>0}for(;c.length<A;)c+=u().toString(16).padStart(8,"0");return c.substring(0,A)}let n=null;async function l(se){const A=(c=>{const u=atob(c),m=new Uint8Array(u.length);for(let E=0;E<u.length;E++)m[E]=u.charCodeAt(E);return m})(se),o=new TextDecoder().decode(await async function(c){if(typeof DecompressionStream<"u")try{const u=new DecompressionStream("deflate-raw"),m=u.writable.getWriter(),E=u.readable.getReader();m.write(c).then(()=>m.close()).catch(()=>{});const y=[];for(;;){const{done:q,value:L}=await E.read();if(q)break;y.push(L)}let V=0;for(const q of y)V+=q.length;const S=new Uint8Array(V);let B=0;for(const q of y)S.set(q,B),B+=q.length;return S}catch{}return n||(n=new Promise((u,m)=>{const E=window.CAP_PAKO_URL||"https://cdn.jsdelivr.net/npm/[email protected]/dist/pako_inflate.min.js",y=document.createElement("script");y.src=E;const V=window.CAP_SCRIPT_NONCE||window.CAP_CSS_NONCE;V&&y.setAttribute("nonce",V),y.onload=()=>{var S;(S=window.pako)!=null&&S.inflateRaw?u(window.pako):m(new Error("[cap] pako loaded but inflateRaw is missing"))},y.onerror=()=>{n=null,m(new Error(`[cap] failed to load pako fallback from ${E}`))},document.head.appendChild(y)})),(await n).inflateRaw(c)}(A));return new Promise(c=>{var u=setTimeout(()=>{y(),c({__timeout:!0})},2e4),m=document.createElement("iframe");m.setAttribute("sandbox","allow-scripts"),m.setAttribute("aria-hidden","true"),m.style.cssText="position:absolute;width:1px;height:1px;top:-9999px;left:-9999px;border:none;opacity:0;pointer-events:none;";var E=!1;function y(){E||(E=!0,clearTimeout(u),window.removeEventListener("message",V),m.parentNode&&m.parentNode.removeChild(m))}function V(q){if(m.contentWindow&&q.source===m.contentWindow){var L=q.data;
1L&&typeof L=="object"&&(L.type==="cap:instr"?(y(),L.blocked?c({__blocked:!0,blockReason:L.blockReason||"automated_browser"}):L.result?c(L.result):c({__timeout:!0})):L.type==="cap:error"&&(y(),c({__timeout:!0})))}}window.addEventListener("message",V);const S=window.CAP_SCRIPT_NONCE||window.CAP_CSS_NONCE,B=S?` nonce="${String(S).replace(/"/g,"&quot;")}"`:"";m.srcdoc='<!DOCTYPE html><html><head><meta charset="UTF-8"></head><body><script'+B+">"+o+`
2<\/script></body></html>`,document.body.appendChild(m)})}let d=null;const b=()=>{if(d)return d;const se=window.CAP_CUSTOM_WASM_URL||"https://cdn.jsdelivr.net/npm/@cap.js/[email protected]/browser/cap_wasm_bg.wasm";return d=fetch(se).then(A=>{if(!A.ok)throw new Error(`Failed to fetch wasm: ${A.status}`);return A.arrayBuffer()}).then(A=>WebAssembly.compile(A)).catch(A=>{throw d=null,A}),d};typeof WebAssembly=="object"&&typeof WebAssembly.compile=="function"&&b().catch(()=>{});let _=null;function P(){return _||(_=URL.createObjectURL(new Blob(['(()=>{const e=async({salt:e,target:t})=>{let n=0;const o=new TextEncoder,r=4*t.length,s=Math.floor(r/8),a=r%8,l=t.length%2==0?t:`${t}0`,i=l.length/2,c=new Uint8Array(i);for(let e=0;e<i;e++)c[e]=parseInt(l.substring(2*e,2*e+2),16);const f=a>0?255<<8-a&255:0;for(;;)try{for(let t=0;t<5e4;t++){const t=e+n,r=o.encode(t),l=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(l);let g=!0;for(let e=0;e<s;e++)if(i[e]!==c[e]){g=!1;break}if(g&&a>0&&(i[s]&f)!==(c[s]&f)&&(g=!1),g)return void self.postMessage({nonce:n,found:!0});n++}}catch(e){return console.error("[cap worker]",e),void self.postMessage({found:!1,error:e.message})}},t=e=>{const t=BigInt("0x"+e.N);let n=BigInt("0x"+e.x);const o=0|e.t,r=Math.max(64,Math.floor(o/50)),s=performance.now();for(let e=0;e<o;e+=r){const s=Math.min(o,e+r);for(let o=e;o<s;o++)n=n*n%t;s<o&&self.postMessage({progress:s/o})}self.postMessage({found:!0,y:n.toString(16),durationMs:(performance.now()-s).toFixed(2)})};if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly?.instantiate)return console.warn("[cap worker] wasm not supported, falling back to alternative solver. this will be significantly slower."),void(self.onmessage=async({data:n})=>"rsw"===n?.kind?t(n):e({salt:n.salt,target:n.target}));let n=null;self.onmessage=async({data:o})=>{if("rsw"===o?.kind)return t(o);const{salt:r,target:s,wasmModule:a}=o;if(a instanceof WebAssembly.Module&&null===n){const t=(e=>{try{let t,o=0,r=null;const s=()=>(null!==r&&0!==r.byteLength||(r=new Uint8Array(t.memory.buffer)),r),a=new TextEncoder,l=(e,t,n)=>{if(void 0===n){const n=a.encode(e),r=t(n.length,1)>>>0;return s().subarray(r,r+n.length).set(n),o=n.length,r}let r=e.length,l=t(r,1)>>>0;const i=s();let c=0;for(;c<r;c++){const t=e.charCodeAt(c);if(t>127)break;i[l+c]=t}if(c!==r){0!==c&&(e=e.slice(c));const t=c+3*e.length;l=n(l,r,t,1)>>>0,r=t;const o=s().subarray(l+c,l+r),{written:i}=a.encodeInto(e,o);c+=i,l=n(l,r,c,1)>>>0}return o=c,l},i={wbg:{}};i.wbg.__wbindgen_init_externref_table=()=>{const e=t.__wbindgen_export_0,n=e.grow(4);e.set(0,void 0),e.set(n+0,void 0),e.set(n+1,null),e.set(n+2,!0),e.set(n+3,!1)};const c=new WebAssembly.Instance(e,i);return t=c.exports,t.__wbindgen_start&&t.__wbindgen_start(),n=(e,n)=>{const r=l(e,t.__wbindgen_malloc,t.__wbindgen_realloc),s=o,a=l(n,t.__wbindgen_malloc,t.__wbindgen_realloc),i=o;return BigInt.asUintN(64,t.solve_pow(r,s,a,i))},!0}catch(e){return console.error("[cap worker] failed to init wasm from module:",e),!1}})(a);if(!t)return console.warn("[cap worker] wasm init failed, falling back to JS s
2olver."),e({salt:r,target:s})}if(null===n)return console.warn("[cap worker] no wasm module provided, falling back to JS solver."),e({salt:r,target:s});try{const e=performance.now(),t=n(r,s),o=performance.now();self.postMessage({nonce:Number(t),found:!0,durationMs:(o-e).toFixed(2)})}catch(e){console.error("[cap worker]",e),self.postMessage({found:!1,error:e.message||String(e)})}},self.onerror=e=>{self.postMessage({found:!1,error:e})}})();'],{type:"application/javascript"})),_)}class Q{constructor(A){this._size=A,this._workers=[],this._idle=[],this._queue=[],this._wasmModule=null,this._spawnFailures=0}setWasm(A){this._wasmModule=A}_spawn(){const A=P(),o=new Worker(A);return o._busy=!1,this._workers.push(o),this._idle.push(o),o}_replaceWorker(A){const o=this._workers.indexOf(A);o!==-1&&this._workers.splice(o,1);const c=this._idle.indexOf(A);c!==-1&&this._idle.splice(c,1);try{A.terminate()}catch{}return this._spawnFailures++,this._spawnFailures>3?(console.error("[cap] worker spawn failed repeatedly, not retrying"),null):this._spawn()}_ensureSize(A){for(;this._workers.length<A;)this._spawn()}run(A,o){return new Promise((c,u)=>{this._queue.push({salt:A,target:o,resolve:c,reject:u}),this._dispatch()})}runMsg(A,o){return new Promise((c,u)=>{this._queue.push({msg:A,onProgress:o,resolve:c,reject:u}),this._dispatch()})}_dispatch(){for(;this._idle.length>0&&this._queue.length>0;){const A=this._idle.shift(),o=this._queue.shift(),{resolve:c,reject:u}=o,m=o.msg!==void 0;let E=!1;const y=({data:S})=>{if(!E){if(!S||typeof S.progress!="number"||S.found)E=!0,A.removeEventListener("message",y),A.removeEventListener("error",V),this._spawnFailures=0,this._idle.push(A),S.found?c(m?S:S.nonce):u(new Error(S.error||"worker failed")),this._dispatch();else if(o.onProgress)try{o.onProgress(S.progress)}catch{}}},V=S=>{if(E)return;E=!0,A.removeEventListener("message",y),A.removeEventListener("error",V);const B=this._replaceWorker(A);u(S),B&&this._dispatch()};A.addEventListener("message",y),A.addEventListener("error",V),m?A.postMessage(o.msg):this._wasmModule?A.postMessage({salt:o.salt,target:o.target,wasmModule:this._wasmModule},[]):A.postMessage({salt:o.salt,target:o.target})}}terminate(){for(const A of this._workers)try{A.terminate()}catch{}this._workers=[],this._idle=[],this._queue=[]}}class ge extends HTMLElement{constructor(){super();G(this,O);G(this,H,null);G(this,z,navigator.hardwareConcurrency||8);Xe(this,"token",null);G(this,h);G(this,v);G(this,I);G(this,W);G(this,Y);G(this,ve);G(this,ce,!1);G(this,ae);G(this,be);G(this,f,null);G(this,ne,null);G(this,X,null);G(this,ue,null);G(this,De,()=>{if(i(this,v)){try{this.scrollIntoView({behavior:"smooth",block:"center"})}catch{this.scrollIntoView()}i(this,v).classList.remove("invalid"),i(this,v).offsetWidth,i(this,v).classList.add("invalid"),setTimeout(()=>{var o;return(o=i(this,v))==null?void 0:o.classList.remove("invalid")},1500)}});i(this,ae)&&i(this,ae).forEach((o,c)=>{this.removeEventListener(c.slice(2),o)}),Z(this,ae,new Map),this.boundHandleProgress=this.handleProgress.bind(this),this.boundHandleSolve=this.handleSolve.bind(this),this.boundHandleError=this.handleError.bind(this),this.boundHandleReset=this.handleReset.bind(this);try{Z(this,be,this.attachInternals())}catch{}}getI18nText(o,c){return this.getAttribute(`data-cap-i18n-${o}`)||c}static get observedAttributes(){return["onsolve","onprogress","onreset","onerror","data-cap-worker-count","data-cap-i18n-initial-state","required"]}initialize(){P(),i(this,f)||Z(this,f,U(this,O,at).call(this)),i(this,X)||(Z(this,X,new Q(1)),i(this,X)._spawn())}attributeChangedCallback(o,c,u){var m;if(o.startsWith("on")){const E=o.slice(2),y=i(this,ae).get(o);if(y&&this.removeEventListener(E,y),u){const V=S=>{const B=this.getAttribute(o);typeof window[B]=="function"&&window[B].call(this,S)};i(this,ae).set(o,V),this.addEventListener(E,V)}}o==="data-cap-worker-count"&&this.setWorkersCount(parseInt(u,10)),o==="data-cap-i18n-initial-state"&&i(this,v)&&((m=i(this,v))!=null&&m.querySelector(".label.active"))&&this.animateLabel(this.getI18nText("initial-state","Verify you're human")),o==="required"&&U(this,O,Fe).call(this)}async connectedCallback(){Z(this,ve,this),this.shadowRoot?Z(this,h,this.shadowRoot):Z(this,h,this.attachShadow({mode:"open"})),i(this,v)||Z(this,v,document.createElement("div")),this.createUI(),this.addEventListeners(),this.initialize(),i(this,I).removeAttribute("disabled");const o=this.getAttribute("data-cap-worker-count"),c=o?parseInt(o,10):null;this.setWorkersCount(c||navigator.hardwareConcurrency||8);const u=this.getAttribute("data-cap-hidden-field-name")||"cap-token";i(this,ve).innerHTML=`<input type="hidden" name="${u}">`,U(this,O,nt).call(this),U(this,O,Fe).call(this),this.addEventListener("invalid",i(this,De))}async solve(){var o;if(!i(this,ce)){U(this,O,We).call(this);try{Z(this,ce,!0),this.updateUI("verifying",this.getI18nText("verifying-label","Verifying..."),!0),i(this,I).setAttribute("aria-label",this.getI18nText("verifying-aria-label","Verifying you're a human, please wait")),this.dispatchEvent("progress",{progress:0});try{let c,u,m=this.getAttribute("data-cap-api-endpoint");if(!m&&(window!=null&&window.CAP_CUSTOM_FETCH))m="/";else if(!m)throw new Error("Missing API endpoint. Either custom fetch or an API endpoint must be provided.");if(m.endsWith("/")||(m+="/"),i(this,f).state==="done"&&i(this,f).token&&i(this,f).tokenExpires&&Date.now()<i(this,f).tokenExpires){this.dispatchEvent("progress",{progress:100});const w=this.getAttribute("data-cap-hidden-field-name")||"cap-token";this.querySelector(`input[name='${w}']`)&&(this.querySelector(`input[name='${w}']`).value=i(this,f).token),this.dispatchEvent("solve",{token:i(this,f).token}),this.token=i(this,f).token;const M=i(this,f).tokenExpires-Date.now();return i(this,H)&&clearTimeout(i(this,H)),Z(this,H,setTimeout(()=>this.reset(),M)),i(this,I).setAttribute("aria-label",this.getI18nText("verified-aria-label","We have verified you're a human, you may 
2now continue")),i(this,O,Se)&&navigator.vibrate([10,50,20,30,40]),U(this,O,Ue).call(this),Z(this,ce,!1),{success:!0,token:this.token}}if(i(this,f).state==="done")c=i(this,f).results,u=i(this,f).challengeResp,this.dispatchEvent("progress",{progress:100});else if(i(this,f).state==="solving"||i(this,f).state==="redeeming"||i(this,f).state==="fetching"||i(this,f).state==="waiting"){i(this,f).state==="waiting"&&(i(this,ne)&&(clearTimeout(i(this,ne)),Z(this,ne,null)),i(this,f).state="waiting",U(this,O,it).call(this)),i(this,f).pendingPromotion=i(this,z),i(this,f).promoteFn&&i(this,f).promoteFn(i(this,z));const w=setInterval(()=>{const M=i(this,f).state;if(M==="done"||M==="error")return void clearInterval(w);const te=i(this,f).challenges?i(this,f).challenges.length:1,Ve=i(this,f).completedCount,Pe=M==="redeeming"?99:M==="fetching"||M==="waiting"?0:Math.min(98,Math.round(Ve/te*100));this.dispatchEvent("progress",{progress:Pe})},150);if(await new Promise(M=>i(this,f).onSettled(M)),clearInterval(w),i(this,f).state==="idle"&&((o=i(this,f).challengeResp)==null?void 0:o.format)===2&&Array.isArray(i(this,f).challengeResp.challenges))u=i(this,f).challengeResp,i(this,f).challengeResp=null,c=await this.solveChallengesV2(u.challenges);else{if(i(this,f).state!=="done")throw new Error("Speculative solve failed – please try again");if(i(this,f).token&&i(this,f).tokenExpires&&Date.now()<i(this,f).tokenExpires){this.dispatchEvent("progress",{progress:100});const M=this.getAttribute("data-cap-hidden-field-name")||"cap-token";this.querySelector(`input[name='${M}']`)&&(this.querySelector(`input[name='${M}']`).value=i(this,f).token),this.dispatchEvent("solve",{token:i(this,f).token}),this.token=i(this,f).token;const te=i(this,f).tokenExpires-Date.now();return i(this,H)&&clearTimeout(i(this,H)),Z(this,H,setTimeout(()=>this.reset(),te)),i(this,I).setAttribute("aria-label",this.getI18nText("verified-aria-label","We have verified you're a human, you may now continue")),i(this,O,Se)&&navigator.vibrate([10,50,20,30,40]),U(this,O,Ue).call(this),Z(this,ce,!1),{success:!0,token:this.token}}c=i(this,f).results,u=i(this,f).challengeResp,this.dispatchEvent("progress",{progress:100})}}else{const w=i(this,f).challengeResp;if((w==null?void 0:w.format)===2&&Array.isArray(w.challenges))u=w,i(this,f).challengeResp=null;else{const M=await s(`${m}challenge`,{method:"POST"});try{u=await M.json()}catch{throw new Error("Failed to parse challenge response from server")}if(u.error)throw new Error(u.error)}if(u.format===2&&Array.isArray(u.challenges))c=await this.solveChallengesV2(u.challenges);else{const{challenge:M,token:te}=u;let Ve=M;if(!Array.isArray(Ve)){let Pe=0;Ve=Array.from({length:M.c},()=>(Pe++,[a(`${te}${Pe}`,M.s),a(`${te}${Pe}d`,M.d)]))}c=await this.solveChallenges(Ve)}}const E=u.instrumentation?l(u.instrumentation):Promise.resolve(null),y=await E;if(y!=null&&y.__timeout||y!=null&&y.__blocked){s(`${m}redeem`,{method:"POST",body:JSON.stringify({token:u.token,solutions:c,...y.__blocked&&{instr_blocked:!0},...y.__timeout&&{instr_timeout:!0}}),headers:{"Content-Type":"application/json"}}).catch(()=>{}),this.updateUIBlocked(this.getI18nText("error-label","Error"),y==null?void 0:y.__blocked),i(this,I).setAttribute("aria-label",this.getI18nText("error-aria-label","An error occurred, please try again")),this.removeEventListener("error",this.boundHandleError);const w=new CustomEvent("error",{bubbles:!0,composed:!0,detail:{isCap:!0,message:"Instrumentation failed"}});return super.dispatchEvent(w),this.addEventListener("error",this.boundHandleError),this.executeAttributeCode("onerror",w),console.error("[cap]","Instrumentation failed"),void Z(this,ce,!1)}const{token:V}=u,S=await s(`${m}redeem`,{method:"POST",body:JSON.stringify({token:V,solutions:c,...y&&{instr:y}}),headers:{"Content-Type":"application/json"}});let B;try{B=await S.json()}catch{throw new Error("Failed to parse server response")}if(this.dispatchEvent("progress",{progress:100}),!B.success)throw new Error(B.error||"Invalid solution");const q=this.getAttribute("data-cap-hidden-field-name")||"cap-token";this.querySelector(`input[name='${q}']`)&&(this.querySelector(`input[name='${q}']`).value=B.token),this.dispatchEvent("solve",{token:B.token}),this.token=B.token,U(this,O,Ue).call(this),i(this,H)&&clearTimeout(i(this,H));const L=new Date(B.expires).getTime()-Date.now();return L>0&&L<864e5?Z(this,H,setTimeout(()=>this.reset(),L)):this.error("Invalid expiration time"),i(this,I).setAttribute("aria-label",this.getI18nText("verified-aria-label","We have verified you're a human, you may 
2now continue")),i(this,O,Se)&&navigator.vibrate([10,50,20,30,40]),{success:!0,token:this.token}}catch(c){throw i(this,I).setAttribute("aria-label",this.getI18nText("error-aria-label","An error occurred, please try again")),this.error(c.message),c}}finally{Z(this,ce,!1)}}}async solveChallengesV2(o){const c=o.length;let u=0;const m=new Array(o.length);for(let L=0;L<o.length;L++){const w=o[L];if(!w||typeof w!="object"||w.protocol!=="sha256-pow"&&w.protocol!=="rsw"&&w.protocol!=="instrumentation")throw new Error(`[cap] unsupported format-2 protocol '${w==null?void 0:w.protocol}'`)}let E=null;if(typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function")try{E=await b()}catch(L){console.warn("[cap] wasm unavailable, falling back to JS solver:",L)}const y=Math.max(1,Math.min(i(this,z),o.length)),V=new Q(y);V.setWasm(E),V._ensureSize(y);const S=(L,w)=>Promise.race([L,new Promise((M,te)=>setTimeout(()=>te(new Error(`[cap] ${w} timed out after 60000ms`)),6e4))]),B=new Array(o.length).fill(0),q=()=>{const L=B.reduce((M,te)=>M+te,0)+u,w=Math.min(99,Math.round(L/c*100));this.dispatchEvent("progress",{progress:w})};try{await Promise.all(o.map((L,w)=>L.protocol==="sha256-pow"?S(V.run(L.payload.salt,L.payload.target),`sha256-pow worker #${w}`).then(M=>{m[w]={nonce:Number(M)},B[w]=0,u++,q()}):L.protocol==="rsw"?S(V.runMsg({kind:"rsw",N:L.payload.N,x:L.payload.x,t:0|L.payload.t},M=>{B[w]=M,q()}),`rsw worker #${w}`).then(M=>{m[w]={y:M.y},B[w]=0,u++,q()}):l(L.payload.blob).then(M=>{m[w]=M!=null&&M.__timeout?{timeout:!0}:M!=null&&M.__blocked?{blocked:!0}:{instr:M},B[w]=0,u++,q()})))}finally{V.terminate()}return m}async solveChallenges(o){const c=o.length;let u=0,m=null;const E=typeof WebAssembly=="object"&&typeof WebAssembly.instantiate=="function";if(E)try{m=await b()}catch(S){console.warn("[cap] wasm unavailable, falling back to JS s
2olver:",S)}if(!E&&!i(this,h).querySelector(".warning")){const S=document.createElement("div");S.className="warning",S.style.cssText="width:var(--cap-widget-width,230px);background:rgb(237,56,46);color:white;padding:4px 6px;padding-bottom:calc(var(--cap-border-radius,14px) + 5px);font-size:10px;box-sizing:border-box;font-family:system-ui;border-top-left-radius:8px;border-top-right-radius:8px;text-align:center;user-select:none;margin-bottom:-35.5px;opacity:0;transition:margin-bottom .3s,opacity .3s;",S.innerText=this.getI18nText("wasm-disabled","Enable WASM for significantly faster solving"),i(this,h).insertBefore(S,i(this,h).firstChild),setTimeout(()=>{S.style.marginBottom="calc(-1 * var(--cap-border-radius, 14px))",S.style.opacity=1},10)}const y=new Q(i(this,z));y.setWasm(m),y._ensureSize(i(this,z));const V=[];try{for(let S=0;S<o.length;S+=i(this,z)){const B=o.slice(S,Math.min(S+i(this,z),o.length)),q=await Promise.all(B.map(([L,w])=>y.run(L,w).then(M=>{u++;const te=Math.min(99,Math.round((0+u)/c*100));return this.dispatchEvent("progress",{progress:te}),M})));V.push(...q)}}finally{y.terminate()}return V}setWorkersCount(o){const c=parseInt(o,10),u=Math.min(navigator.hardwareConcurrency||8,16);Z(this,z,!Number.isNaN(c)&&c>0&&c<=u?c:navigator.hardwareConcurrency||8)}createUI(){i(this,v).classList.add("captcha"),i(this,v).setAttribute("role","group"),i(this,v).setAttribute("aria-label",this.getI18nText("group-aria-label","Cap verification")),Z(this,I,document.createElement("div")),i(this,I).className="captcha-trigger",i(this,I).setAttribute("part","trigger"),i(this,I).setAttribute("role","button"),i(this,I).setAttribute("tabindex","0"),i(this,I).setAttribute("aria-label",this.getI18nText("verify-aria-label","Click to verify you're a human")),i(this,I).setAttribute("aria-live","polite"),i(this,I).setAttribute("disabled","true"),i(this,I).innerHTML=`<div class="checkbox" part="checkbox" aria-hidden="true"><svg class="progress-ring" viewBox="0 0 32 32" aria-hidden="true"><circle class="progress-ring-bg" cx="16" cy="16" r="14"></circle><circle class="progress-ring-circle" cx="16" cy="16" r="14"></circle></svg></div><p part="label" class="label-wrapper"><span class="label active">${this.getI18nText("initial-state","Verify you're human")}</span></p>`,i(this,v).appendChild(i(this,I)),Z(this,Y,document.createElement("a")),i(this,Y).className="cap-troubleshoot-link",i(this,Y).setAttribute("part","troubleshoot"),i(this,Y).setAttribute("target","_blank"),i(this,Y).setAttribute("rel","noopener"),i(this,Y).hidden=!0,i(this,v).appendChild(i(this,Y)),Z(this,W,document.createElement("a")),i(this,W).className="credits",i(this,W).setAttribute("aria-label","Secured by Cap"),i(this,W).setAttribute("href","https://trycap.dev"),i(this,W).setAttribute("target","_blank"),i(this,W).setAttribute("title","Secured by Cap: The self-hosted CAPTCHA for the modern web."),i(this,W).textContent="Cap",i(this,v).appendChild(i(this,W)),i(this,h).innerHTML=`<style${window.CAP_CSS_NONCE?` nonce=${window.CAP_CSS_NONCE}`:""}>:host{display:inline-block}@media (prefers-reduced-motion:reduce){.captcha,.captcha *{transition:none!important;animation:none!important}.label{filter:none!important;opacity:1!important;transition:none!important;transform:none!important}.label:not(.active),.label.exit{display:none!important}}.captcha,.captcha *{box-sizing:border-box}.captcha{width:var(--cap-widget-width,260px);height:var(--cap-widget-height,58px);background-color:var(--cap-background,#fdfdfd);border:1px solid var(--cap-border-color,#dddddd8f);border-radius:var(--cap-border-radius,14px);-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:#fff0;color:var(--cap-color,#212121);font-family:var(--cap-font,system, -apple-system, "BlinkMacSystemFont", ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", "Ubuntu", "arial", sans-serif);transition:filter .2s,transform .2s,height .2s;display:inline-block;position:relative;overflow:hidden}.captcha.has-troubleshoot{height:calc(var(--cap-widget-height,58px) + 26px)}.captcha.has-troubleshoot .captcha-trigger{inset-block-end:26px}.captcha:not([data-state]):active{transform:scale(.97)}.captcha:hover{filter:brightness(98%)}.captcha-trigger{padding:var(--cap-widget-padding,14px);align-items:center;gap:var(--cap-gap,15px);border-radius:inherit;transition:inset .2s;
2display:flex;position:absolute;inset:0}.captcha-trigger:focus-visible{outline:2px solid var(--cap-focus-ring,#06c);outline-offset:-3px}.checkbox{width:var(--cap-checkbox-size,25px);height:var(--cap-checkbox-size,25px);border:var(--cap-checkbox-border,1px solid #aaaaaad1);border-radius:var(--cap-checkbox-border-radius,6px);background-color:var(--cap-checkbox-background,#fafafa91);margin-top:var(--cap-checkbox-margin,2px);margin-bottom:var(--cap-checkbox-margin,2px);flex-shrink:0;transition:opacity .2s}.captcha p{-webkit-user-select:none;user-select:none;margin:0;font-size:15px;font-weight:500}.label-wrapper{flex:1;align-items:center;min-width:0;height:2em;display:flex;position:relative;overflow:hidden}.label-wrapper:before,.label-wrapper:after{content:"";pointer-events:none;z-index:1;width:100%;height:.6em;position:absolute;inset-inline-start:0}.label-wrapper:before{background:linear-gradient(to bottom, var(--cap-background,#fdfdfd), transparent);top:0}.label-wrapper:after{background:linear-gradient(to top, var(--cap-background,#fdfdfd), transparent);bottom:0}.label{white-space:nowrap;opacity:0;filter:blur(2px);transition:transform .5s cubic-bezier(.25,1,.5,1),opacity .5s,filter .5s;position:absolute;transform:translateY(100%)}.label.active{opacity:1;filter:none;transform:translateY(0)}.label.exit{opacity:0;filter:blur(2px);transform:translateY(-100%)}.checkbox .progress-ring{width:100%;height:100%;display:none;transform:rotate(-90deg)}.checkbox .progress-ring-bg{fill:none;stroke:var(--cap-spinner-background-color,#eee);stroke-width:var(--cap-spinner-thickness,3)}.checkbox .progress-ring-circle{fill:none;stroke:var(--cap-spinner-color,#000);stroke-width:var(--cap-spinner-thickness,3);stroke-linecap:round;stroke-dasharray:87.96;stroke-dashoffset:87.96px;transition:stroke-dashoffset .3s}.captcha[data-state=verifying] .checkbox{background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;display:flex;transform:scale(1.1)}.captcha[data-state=verifying] .checkbox .progress-ring{display:block}.captcha[data-state=done] .checkbox{background-image:var(--cap-checkmark,url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cstyle%3E%40keyframes%20anim%7B0%25%7Bstroke-dashoffset%3A23.21320343017578px%7Dto%7Bstroke-dashoffset%3A0%7D%7D%3C%2Fstyle%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%2300a67d%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22m5%2012%205%205L20%207%22%20style%3D%22stroke-dashoffset%3A0%3Bstroke-dasharray%3A23.21320343017578px%3Banimation%3Aanim%20.5s%20ease%22%2F%3
2E%3C%2Fsvg%3E));background-size:cover;border:1px solid #0000}.captcha[data-state=done] .checkbox .progress-ring{display:none}.captcha[data-state=error] .checkbox{background-image:var(--cap-error-cross,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 24 24'%3E%3Cpath fill='%23f55b50' d='M11 15h2v2h-2zm0-8h2v6h-2zm1-5C6.47 2 2 6.5 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18a8 8 0 0 1-8-8a8 8 0 0 1 8-8a8 8 0 0 1 8 8a8 8 0 0 1-8 8'/%3E%3C%2Fsvg%3E"));background-size:cover;border:1px solid #0000}.captcha[data-state=error] .checkbox .progress-ring{display:none}.captcha.invalid{border-color:var(--cap-invalid-border-color,#f55b50);box-shadow:0 0 0 3px var(--cap-invalid-ring-color,#f55b5033);animation:.5s cubic-bezier(.36,.07,.19,.97) cap-shake}@keyframes cap-shake{10%,90%{transform:translate(-1px)}20%,80%{transform:translate(2px)}30%,50%,70%{transform:translate(-4px)}40%,60%{transform:translate(4px)}}@media (prefers-reduced-motion:reduce){.captcha.invalid{animation:none!important}}.captcha-trigger[disabled]{cursor:not-allowed}.captcha[data-state=verifying] .captcha-trigger{cursor:progress}.captcha[data-state=done] .captcha-trigger{cursor:default}.credits{color:var(--cap-color,#212121);text-underline-offset:.18em;z-index:2;border-radius:4px;justify-content:flex-end;align-items:center;min-width:24px;min-height:24px;padding:4px 6px;text-decoration:underline;text-decoration-thickness:.08em;position:absolute;inset-block-end:4px;inset-inline-end:4px;opacity:.8!important;font-size:12px!important;display:inline-flex!important}.captcha .credits{visibility:visible!important;pointer-events:all!important;display:inline-flex!important}.credits:focus-visible{outline:2px solid var(--cap-focus-ring,#06c);outline-offset:2px;opacity:1!important}.cap-troubleshoot-link{min-width:24px;min-height:24px;color:var(--cap-troubleshoot-color,#0050a0);text-underline-offset:.15em;cursor:pointer;z-index:2;border-radius:4px;align-items:center;padding:4px 6px;font-size:13px;font-weight:500;text-decoration:underline;text-decoration-thickness:.08em;display:inline-flex;position:absolute;inset-block-end:4px;inset-inline-start:14px}.cap-troubleshoot-link[hidden]{display:none}.cap-troubleshoot-link:hover{opacity:.85}.cap-troubleshoot-link:focus-visible{outline:2px solid var(--cap-focus-ring,#06c);outline-offset:2px}@media (forced-colors:active){.captcha,.checkbox{border-color:canvastext}:is(.captcha-trigger:focus-visible,.credits:focus-visible,.cap-troubleshoot-link:focus-visible){outline-color:highlight}.progress-ring-bg{stroke:graytext}.progress-ring-circle{stroke:canvastext}.captcha.invalid{box-shadow:none;border-color:mark}.credits{opacity:1!important}}</style>`,i(this,h).appendChild(i(this,v)),U(this,O,We).call(this),setTimeout(()=>U(this,O,We).call(this),100)}addEventListeners(){i(this,I)&&(i(this,W).addEventListener("click",o=>{o.preventDefault(),window.open(`https://trycap.dev/?${new URLSearchParams({utm_source:"cap_widget",utm_medium:"referral",utm_campaign:"widget",utm_content:window.CAP_DISABLE_WIDGET_REF?"":location.hostname,ref:window.CAP_DISABLE_WIDGET_REF?"":location.href||"",sub:window.CAP_DISABLE_WIDGET_REF?"":document.referrer||""}).toString()}`,"_blank")}),i(this,I).addEventListener("click",()=>{i(this,I).hasAttribute("disabled")||this.solve()}),i(this,I).addEventListener("mousedown",()=>{!i(this,I).hasAttribute("disabled")&&i(this,O,Se)&&navigator.vibrate(5)}),i(this,I).addEventListener("keydown",o=>{o.target===i(this,I)&&(o.key!=="Enter"&&o.key!==" "||i(this,I).hasAttribute("disabled")||(o.preventDefault(),o.stopPropagation(),this.solve()))}),this.addEventListener("progress",this.boundHandleProgress),this.addEventListener("solve",this.boundHandleSolve),this.addEventListener("error",this.boundHandleError),this.addEventListener("reset",this.boundHandleReset))}animateLabel(o){var E;if(!i(this,I))return;const c=i(this,I).querySelector(".label-wrapper");if(!c)return;if((E=window.matchMedia)!=null&&E.call(window,"(prefers-reduced-motion: reduce)").matches){const y=c.querySelector(".label.active");if(y)y.textContent=o;else{const V=document.createElement("span");V.className="label active",V.textContent=o,c.appendChild(V)}return}const u=c.querySelector(".label.active"),m=document.createElement("span");m.className="label",m.textContent=o,c.appendChild(m),m.offsetWidth,m.classList.add("active"),u&&(u.classList.remove("active"),u.classList.add("exit"),u.addEventListener("transitionend",()=>u.remove(),{once:!0}))}updateUI(o,c,u=!1){i(this,v)&&i(this,I)&&(i(this,v).setAttribute("data-state",o),i(this,v).classList.remove("has-troubleshoot"),this.animateLabel(c),i(this,Y)&&(i(this,Y).hidden=!0),u?i(this,I).setAttribute("disabled","true"):i(this,I).removeAttribute("disabled"))}updateUIBlocked(o,c=!1){if(i(this,v)&&i(this,I)&&(i(this,v).setAttribute("data-state","error"),i(this,I).removeAttribute("disabled"),this.animateLabel(o),i(this,Y)))if(c){const u=this.getAttribute("data-cap-troubleshooting-url")||"https://trycap.dev/guide/troubleshooting/instrumentation.html";i(this,Y).setAttribute("href",u),i(this,Y).textContent=this.getI18nText("troubleshooting-label","Troubleshoot"),i(this,Y).hidden=!1,i(this,v).classList.add("has-troubleshoot")}else i(this,Y).hidden=!0,i(this,v).classList.remove("has-troubleshoot")}
2handleProgress(o){if(!i(this,I))return;const c=i(this,I).querySelector(".progress-ring-circle");if(c){const m=2*Math.PI*14,E=m-o.detail.progress/100*m;c.style.strokeDashoffset=E}const u=i(this,I).querySelector(".label-wrapper");if(u){const m=u.querySelector(".label.active");m&&(m.textContent=`${this.getI18nText("verifying-label","Verifying...")}`)}this.executeAttributeCode("onprogress",o)}handleSolve(o){var c,u,m;this.updateUI("done",this.getI18nText("solved-label","You're a human"),!0),this.executeAttributeCode("onsolve",o),(u=(c=i(this,be))==null?void 0:c.setValidity)==null||u.call(c,{}),(m=i(this,v))==null||m.classList.remove("invalid")}handleError(o){this.updateUI("error",this.getI18nText("error-label","Error. Try again.")),this.executeAttributeCode("onerror",o),i(this,O,Se)&&navigator.vibrate([10,40,10])}handleReset(o){this.updateUI("",this.getI18nText("initial-state","I'm a human")),this.executeAttributeCode("onreset",o),U(this,O,Fe).call(this)}executeAttributeCode(o,c){const u=this.getAttribute(o);u&&(console.error("[cap] using `onxxx='…'` is strongly discouraged and will be deprecated soon. please use `addEventListener` callbacks instead."),new Function("event",u).call(this,c))}error(o="Unknown error"){console.error("[cap]",o),this.dispatchEvent("error",{isCap:!0,message:o})}dispatchEvent(o,c={}){const u=new CustomEvent(o,{bubbles:!0,composed:!0,detail:c});super.dispatchEvent(u)}reset(){i(this,H)&&(clearTimeout(i(this,H)),Z(this,H,null)),this.token=null,this.dispatchEvent("reset");const o=this.getAttribute("data-cap-hidden-field-name")||"cap-token";this.querySelector(`input[name='${o}']`)&&(this.querySelector(`input[name='${o}']`).value="")}get tokenValue(){return this.token}disconnectedCallback(){this.removeEventListener("progress",this.boundHandleProgress),this.removeEventListener("solve",this.boundHandleSolve),this.removeEventListener("error",this.boundHandleError),this.removeEventListener("reset",this.boundHandleReset),i(this,ae).forEach((o,c)=>{this.removeEventListener(c.slice(2),o)}),i(this,ae).clear(),i(this,h)&&(i(this,h).innerHTML=""),this.reset(),this.cleanup()}cleanup(){i(this,H)&&(clearTimeout(i(this,H)),Z(this,H,null)),U(this,O,qe).call(this),i(this,ne)&&(clearTimeout(i(this,ne)),Z(this,ne,null)),i(this,X)&&(i(this,X).terminate(),Z(this,X,null)),i(this,f)&&(i(this,f).state="error",i(this,f).notify(),Z(this,f,null))}}H=new WeakMap,z=new WeakMap,h=new WeakMap,v=new WeakMap,I=new WeakMap,W=new WeakMap,Y=new WeakMap,ve=new WeakMap,ce=new WeakMap,ae=new WeakMap,be=new WeakMap,f=new WeakMap,ne=new WeakMap,X=new WeakMap,ue=new WeakMap,O=new WeakSet,Se=function(){return t&&!window.CAP_DISABLE_HAPTICS&&!this.hasAttribute("data-cap-disable-haptics")},at=function(){return{state:"idle",challengeResp:null,challenges:null,results:[],completedCount:0,solvePromise:null,promoteFn:null,_listeners:[],pendingPromotion:null,token:null,tokenExpires:null,notify(){for(const o of this._listeners)o();this._listeners=[]},onSettled(o){this.state==="done"||this.state==="error"?o():this._listeners.push(o)}}},Ue=function(){Z(this,f,U(this,O,at).call(this)),U(this,O,nt).call(this)},qe=function(){i(this,ue)&&(window.removeEventListener("mousemove",i(this,ue)),window.removeEventListener("touchstart",i(this,ue)),window.removeEventListener("keydown",i(this,ue)),Z(this,ue,null))},nt=function(){U(this,O,qe).call(this);const o=()=>{U(this,O,qe).call(this),U(this,O,Zt).call(this)};Z(this,ue,o),window.addEventListener("mousemove",o,{passive:!0}),window.addEventListener("touchstart",o,{passive:!0}),window.addEventListener("keydown",o,{passive:!0})},jt=function(){return typeof this.checkVisibility=="function"?this.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):!!(this.offsetParent||this.getClientRects().length>0)},Zt=function(){i(this,f).state==="idle"&&U(this,O,jt).call(this)&&(i(this,f).state="waiting",Z(this,ne,setTimeout(()=>{U(this,O,it).call(this)},2500)))},it=async function(){if(i(this,f).state!=="waiting")return;i(this,f).state="fetching";let o=this.getAttribute("data-cap-api-endpoint");if(!o&&(window!=null&&window.CAP_CUSTOM_FETCH)&&(o="/"),o){o.endsWith("/")||(o+="/");try{const c=await s(`${o}challenge`,{method:"POST"});let u;
2try{u=await c.json()}catch{throw new Error("Failed to parse speculative challenge response")}if(u.error)throw new Error(u.error);if(u._apiEndpoint=o,i(this,f).challengeResp=u,u.format===2&&Array.isArray(u.challenges))return i(this,f).state="idle",void i(this,f).notify();const{challenge:m,token:E}=u;let y=m;if(!Array.isArray(y)){let V=0;y=Array.from({length:m.c},()=>(V++,[a(`${E}${V}`,m.s),a(`${E}${V}d`,m.d)]))}i(this,f).challenges=y,i(this,f).state="solving",i(this,f).solvePromise=U(this,O,Dt).call(this,y)}catch(c){console.warn("[cap] speculative challenge fetch failed:",c),i(this,f).state="error",i(this,f).notify()}}else i(this,f).state="idle"},Dt=async function(o){P();let c=null;try{c=await b()}catch{}i(this,X)||(Z(this,X,new Q(1)),i(this,X)._spawn()),i(this,X).setWasm(c);const u=o.length,m=new Array(u);let E=1,y=!1;i(this,f).promoteFn=S=>{y||(y=!0,E=S,i(this,X)._size=S,i(this,X)._ensureSize(S))},i(this,f).pendingPromotion!==null&&(i(this,f).promoteFn(i(this,f).pendingPromotion),i(this,f).pendingPromotion=null);let V=0;for(;V<u;){const S=E,B=[],q=[];for(let w=0;w<S&&V<u;w++)q.push(V),B.push(o[V]),V++;i(this,X)._ensureSize(Math.max(E,S));const L=await Promise.all(B.map(w=>i(this,X).run(w[0],w[1]).then(M=>(i(this,f).completedCount++,M))));for(let w=0;w<q.length;w++)m[q[w]]=L[w];!y&&V<u&&await new Promise(w=>setTimeout(w,120))}return i(this,f).results=m,i(this,f).state="redeeming",U(this,O,Bt).call(this,m),m},Bt=async function(o){try{const c=i(this,f).challengeResp,u=c._apiEndpoint;if(!u)throw new Error("[cap] speculative redeem: missing apiEndpoint");let m=null;if(c.instrumentation&&(m=await l(c.instrumentation),(m==null?void 0:m.__timeout)||(m==null?void 0:m.__blocked)))return i(this,f).state="done",void i(this,f).notify();const E=await s(`${u}redeem`,{method:"POST",body:JSON.stringify({token:c.token,solutions:o,...m&&{instr:m}}),headers:{"Content-Type":"application/json"}});let y;try{y=await E.json()}catch{throw new Error("Failed to parse speculative redeem response")}if(!y.success)throw new Error(y.error||"Speculative redeem failed");i(this,f).token=y.token,i(this,f).tokenExpires=new Date(y.expires).getTime(),i(this,f).state="done",i(this,f).notify()}catch(c){console.warn("[cap] speculative redeem failed (will redo on click):",c),i(this,f).state="done",i(this,f).notify()}},Fe=function(){var o;(o=i(this,be))!=null&&o.setValidity&&(this.hasAttribute("required")&&!this.token?i(this,be).setValidity({valueMissing:!0},this.getI18nText("required-label","Please verify you're human"),i(this,v)||this):i(this,be).setValidity({}))},De=new WeakMap,zt=function(){if(!i(this,ve))return!1;const o=i(this,ve).getBoundingClientRect();if(o.width===0&&o.height===0)return!0;const c=window.getComputedStyle(i(this,ve));return c.display==="none"||c.visibility==="hidden"},We=function(){i(this,W)&&i(this,v)&&!U(this,O,zt).call(this)&&(i(this,W).isConnected&&i(this,W).parentNode===i(this,v)||i(this,v).appendChild(i(this,W)),i(this,W).textContent&&i(this,W).textContent.trim()||(i(this,W).textContent="Cap"),i(this,W).getAttribute("href")!=="https://trycap.dev"&&i(this,W).setAttribute("href","https://trycap.dev"),i(this,W).style.cssText=["display: inline-flex !important","visibility: visible !important","opacity: 0.8 !important","pointer-events: all !important","font-size: 12px !important","transform: none !important","clip-path: none !important","filter: none !important","position: absolute !important"].join("; "))},Xe(ge,"formAssociated",!0);class Ae{constructor(A={},o){const c=o||document.createElement("cap-widget");if(Object.entries(A).forEach(([u,m])=>{c.setAttribute(u,m)}),!A.apiEndpoint&&!(window!=null&&window.CAP_CUSTOM_FETCH))throw c.remove(),new Error("Missing API endpoint. Either custom fetch or an API endpoint must be provided.");A.apiEndpoint&&c.setAttribute("data-cap-api-endpoint",A.apiEndpoint),o||c.hasAttribute("data-cap-disable-haptics")||c.setAttribute("data-cap-disable-haptics",""),this.widget=c,this.solve=this.widget.solve.bind(this.widget),this.reset=this.widget.reset.bind(this.widget),this.addEventListener=this.widget.addEventListener.bind(this.widget),Object.defineProperty(this,"token",{get:()=>c.token,configurable:!0,enumerable:!0}),o||(c.style.display="none",document.documentElement.appendChild(c))}}window.Cap=Ae,customElements.get("cap-widget")||window!=null&&window.CAP_DONT_SKIP_REDEFINE?customElements.get("cap-widget")&&console.warn(`[cap] the cap-widget element has already been defined, skipping re-defining it.
3to prevent this, set window.CAP_DONT_SKIP_REDEFINE to true`):customElements.define("cap-widget",ge),r.exports=Ae,e.default=Ae})()}(Be,Be.exports)),Be.exports}rr();const sr={class:"flex flex-col gap-[4px]"},ar=["for"],nr={key:0,class:"ml-[2px] text-red-500","aria-hidden":"true"},ir=["id","value","name","required","aria-required","aria-invalid","aria-describedby"],or=["value"],lr=["id","value","name","rows","required","placeholder","maxlength","aria-required","aria-invalid","aria-describedby"],dr=["id","type","value","name","required","placeholder","maxlength","aria-required","aria-invalid","aria-describedby","autocomplete","min","max"],cr=["id"],et="w-full rounded-[4px] border border-gray-300 bg-white px-[16px] py-[12px] text-[16px] text-gray-900 placeholder:text-gray-400 focus:border-[#0067b4] focus:outline-none focus:ring-1 focus:ring-[#0067b4]/40",ie=ht({__name:"FormField",props:{id:{},name:{},label:{},modelValue:{},type:{},options:{},rows:{},required:{type:Boolean},placeholder:{},autocomplete:{},maxlength:{},min:{},max:{},error:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=e,s=a=>{t("update:modelValue",a.target.value)};return(a,n)=>(F(),K("div",sr,[R("label",{for:a.id,class:"mb-0 text-[16px] font-medium text-gray-800"},[fe(le(a.label),1),a.required?(F(),K("span",nr,"*")):oe("",!0)],8,ar),a.options?(F(),K("select",{key:0,id:a.id,value:a.modelValue,name:a.name,required:a.required,"aria-required":a.required||void 0,"aria-invalid":!!a.error||void 0,"aria-describedby":a.error?`${a.id}-error`:void 0,class:ze([et,"cursor-pointer",{"border-red-500 focus:border-red-500 focus:ring-red-500/40":a.error}]),onChange:s},[n[0]||(n[0]=R("option",{value:"",disabled:""},"Bitte wählen …",-1)),(F(!0),K(pt,null,Lt(a.options,l=>(F(),K("option",{key:l.value,value:l.value},le(l.label),9,or))),128))],42,ir)):a.rows?(F(),K("textarea",{key:1,id:a.id,value:a.modelValue,name:a.name,rows:a.rows,required:a.required,placeholder:a.placeholder,maxlength:a.maxlength,"aria-required":a.required||void 0,"aria-invalid":!!a.error||void 0,"aria-describedby":a.error?`${a.id}-error`:void 0,class:ze([et,{"border-red-500 focus:border-red-500 focus:ring-red-500/40":a.error}]),onInput:s},null,42,lr)):(F(),K("input",{key:2,id:a.id,type:a.type,value:a.modelValue,name:a.name,required:a.required,placeholder:a.placeholder,maxlength:a.maxlength,"aria-required":a.required||void 0,"aria-invalid":!!a.error||void 0,"aria-describedby":a.error?`${a.id}-error`:void 0,autocomplete:a.autocomplete,min:a.min,max:a.max,class:ze([et,{"border-red-500 focus:border-red-500 focus:ring-red-500/40":a.error}]),onInput:s},null,42,dr)),a.error?(F(),K("p",{key:3,id:`${a.id}-error`,class:"mb-0 text-[12px] text-red-500"},le(a.error),9,cr)):oe("",!0)]))}}),ur=["aria-required"],hr={class:"mb-[12px] p-0 text-[16px] font-medium text-gray-800"},pr={key:0,class:"ml-[2px] text-red-500","aria-hidden":"true"},fr={class:"grid grid-cols-1 gap-[12px] md:grid-cols-2"}
3,mr=["name","value","checked","onChange"],gr={key:0,class:"mt-[4px] mb-0 text-[12px] text-red-500"},vr=ht({__name:"RadioGroup",props:{name:{},label:{},modelValue:{},options:{},required:{type:Boolean},error:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=e;return(s,a)=>(F(),K("fieldset",{class:"flex flex-col border-0 p-0","aria-required":s.required||void 0},[R("legend",hr,[fe(le(s.label),1),s.required?(F(),K("span",pr,"*")):oe("",!0)]),R("div",fr,[(F(!0),K(pt,null,Lt(s.options,n=>(F(),K("label",{key:n.value,class:ze(["flex cursor-pointer items-center gap-[12px] rounded-[8px] border-2 px-[16px] py-[14px] text-[15px] font-semibold transition",s.modelValue===n.value?"border-[#0067b4] bg-[#0067b4]/5 text-gray-900 ring-1 ring-[#0067b4]/20":"border-gray-200 bg-white text-gray-700 hover:border-gray-300"])},[R("input",{type:"radio",name:s.name,value:n.value,checked:s.modelValue===n.value,class:"h-[18px] w-[18px] shrink-0 accent-[#0067b4] focus:ring-[#0067b4]",onChange:l=>t("update:modelValue",n.value)},null,40,mr),R("span",null,le(n.label),1)],2))),128))]),s.error?(F(),K("p",gr,le(s.error),1)):oe("",!0)],8,ur))}});var D;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const n={};for(const l of a)n[l]=l;return n},r.getValidEnumValues=a=>{const n=r.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),l={};for(const d of n)l[d]=a[d];return r.objectValues(l)},r.objectValues=a=>r.objectKeys(a).map(function(n){return a[n]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&n.push(l);return n},r.find=(a,n)=>{for(const l of a)if(n(l))return l},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,n=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(n)}r.joinValues=s,r.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(D||(D={}));var bt;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(bt||(bt={}));const k=D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ye=r=>{switch(typeof r){case"undefined":return k.undefined;case"string":return k.string;case"number":return Number.isNaN(r)?k.nan:k.number;case"boolean":return k.boolean;case"function":return k.function;case"bigint":return k.bigint;case"symbol":return k.symbol;case"object":return Array.isArray(r)?k.array:r===null?k.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?k.promise:typeof Map<"u"&&r instanceof Map?k.map:typeof Set<"u"&&r instanceof Set?k.set:typeof Date<"u"&&r instanceof Date?k.date:k.object;default:return k.unknown}}
vendor: 11,731 bytes, line 3
3,p=D.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class me extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},s={_errors:[]},a=n=>{for(const l of n.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)s._errors.push(t(l));else{let d=s,b=0;for(;b<l.path.length;){const _=l.path[b];b===l.path.length-1?(d[_]=d[_]||{_errors:[]},d[_]._errors.push(t(l))):d[_]=d[_]||{_errors:[]},d=d[_],b++}}};return a(this),s}static assert(e){if(!(e instanceof me))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,D.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const a of this.issues)a.path.length>0?(t[a.path[0]]=t[a.path[0]]||[],t[a.path[0]].push(e(a))):s.push(e(a));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}me.create=r=>new me(r);const ot=(r,e)=>{let t;switch(r.code){case p.invalid_type:r.received===k.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case p.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,D.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:t=`Unrecognized key(s) in object: ${D.joinValues(r.keys,", ")}`;break;case p.invalid_union:t="Invalid input";break;case p.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${D.joinValues(r.options)}`;break;case p.invalid_enum_value:t=`Invalid enum value. Expected ${D.joinValues(r.options)}, received '${r.received}'`;break;case p.invalid_arguments:t="Invalid function arguments";break;case p.invalid_return_type:t="Invalid function return type";break;case p.invalid_date:t="Invalid date";break;case p.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:D.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case p.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case p.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case p.custom:t="Invalid input";break;case p.invalid_intersection_types:t="Intersection results could not be merged";break;case p.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case p.not_finite:t="Number must be finite";break;default:t=e.defaultError,D.assertNever(r)}return{message:t}};let br=ot;function yr(){return br}const _r=r=>{const{data:e,path:t,errorMaps:s,issueData:a}=r,n=[...t,...a.path||[]],l={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const b=s.filter(_=>!!_).slice().reverse();for(const _ of b)d=_(l,{data:e,defaultError:d}).message;return{...a,path:n,message:d}};function g(r,e){const t=yr(),s=_r({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ot?void 0:ot].filter(a=>!!a)});r.common.issues.push(s)}class ee{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const a of t){if(a.status==="aborted")return T;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const a of t){const n=await a.key,l=await a.value;s.push({key:n,value:l})}return ee.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const a of t){const{key:n,value:l}=a;if(n.status==="aborted"||l.status==="aborted")return T;n.status==="dirty"&&e.dirty(),l.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(s[n.value]=l.value)}return{status:e.value,value:s}}}const T=Object.freeze({status:"aborted"}),$e=r=>({status:"dirty",value:r}),re=r=>({status:"valid",value:r}),yt=r=>r.status==="aborted",_t=r=>r.status==="dirty",Ne=r=>r.status==="valid",He=r=>typeof Promise<"u"&&r instanceof Promise;var x;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(x||(x={}));class xe{constructor(e,t,s,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const kt=(r,e)=>{if(Ne(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new me(r.common.issues);return this._error=t,this._error}}};function $(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:a}=r;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(l,d)=>{const{message:b}=r;return l.code==="invalid_enum_value"?{message:b??d.defaultError}:typeof d.data>"u"?{message:b??s??d.defaultError}:l.code!=="invalid_type"?{message:d.defaultError}:{message:b??t??d.defaultError}},description:a}}class j{get description(){return this._def.description}_getType(e){return ye(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ye(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ee,ctx:{common:e.parent.common,data:e.data,parsedType:ye(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(He(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ye(e)},a=this._parseSync({data:e,path:s.path,parent:s});return kt(s,a)}"~validate"(e){var s,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ye(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return Ne(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(s=n==null?void 0:n.message)==null?void 0:s.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>Ne(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ye(e)},a=this._parse({data:e,path:s.path,parent:s}),n=await(He(a)?a:Promise.resolve(a));return kt(s,n)}refine(e,t){const s=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const l=e(a),d=()=>n.addIssue({code:p.custom,...s(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(b=>b?!0:(d(),!1)):l?!0:(d(),!1)})}refinement(e,t){return this._refinement((s,a)=>e(s)?!0:(a.addIssue(typeof t=="function"?t(s,a):t),!1))}_refinement(e){return new Oe({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return ke.create(this,this._def)}nullable(){return Re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return de.create(this)}promise(){return Ye.create(this,this._def)}or(e){return Je.create([this,e],this._def)}and(e){return Ge.create(this,e,this._def)}transform(e){return new Oe({...$(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new dt({...$(this._def),innerType:this,defaultValue:t,typeName:N.ZodDefault})}brand(){return new Ur({typeName:N.ZodBranded,type:this,...$(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ct({...$(this._def),innerType:this,catchValue:t,typeName:N.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ft.create(this,e)}readonly(){return ut.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const kr=/^c[^\s-]{8,}
vendor: 4,234 bytes, line 3
3$/i,xr=/^[0-9a-z]+$/,wr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ar=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Er=/^[a-z0-9_-]{21}$/i,Cr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Sr=/^[-+]?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)?)??$/,Tr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Nr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let tt;const Ir=/^(?:(?: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])$/,Or=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Rr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Vr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Pr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Mr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ut="((\\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])))",$r=new RegExp(`^${Ut}$`);function qt(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Lr(r){return new RegExp(`^${qt(r)}$`)}function jr(r){let e=`${Ut}T${qt(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Zr(r,e){return!!((e==="v4"||!e)&&Ir.test(r)||(e==="v6"||!e)&&Rr.test(r))}function Dr(r,e){if(!Cr.test(r))return!1;try{const[t]=r.split("."),s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function Br(r,e){return!!((e==="v4"||!e)&&Or.test(r)||(e==="v6"||!e)&&Vr.test(r))}class _e extends j{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==k.string){const n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:k.string,received:n.parsedType}),T}const s=new ee;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="length"){const l=e.data.length>n.value,d=e.data.length<n.value;
vendor: 19,025 bytes, line 3
3(l||d)&&(a=this._getOrReturnCtx(e,a),l?g(a,{code:p.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&g(a,{code:p.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),s.dirty())}else if(n.kind==="email")Tr.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"email",code:p.invalid_string,message:n.message}),s.dirty());else if(n.kind==="emoji")tt||(tt=new RegExp(Nr,"u")),tt.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"emoji",code:p.invalid_string,message:n.message}),s.dirty());else if(n.kind==="uuid")Ar.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"uuid",code:p.invalid_string,message:n.message}),s.dirty());else if(n.kind==="nanoid")Er.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"nanoid",code:p.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid")kr.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"cuid",code:p.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid2")xr.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"cuid2",code:p.invalid_string,message:n.message}),s.dirty());else if(n.kind==="ulid")wr.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"ulid",code:p.invalid_string,message:n.message}),s.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),g(a,{validation:"url",code:p.invalid_string,message:n.message}),s.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"regex",code:p.invalid_string,message:n.message}),s.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),g(a,{code:p.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),s.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),g(a,{code:p.invalid_string,validation:{startsWith:n.value},message:n.message}),s.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),g(a,{code:p.invalid_string,validation:{endsWith:n.value},message:n.message}),s.dirty()):n.kind==="datetime"?jr(n).test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:p.invalid_string,validation:"datetime",message:n.message}),s.dirty()):n.kind==="date"?$r.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:p.invalid_string,validation:"date",message:n.message}),s.dirty()):n.kind==="time"?Lr(n).test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{code:p.invalid_string,validation:"time",message:n.message}),s.dirty()):n.kind==="duration"?Sr.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"duration",code:p.invalid_string,message:n.message}),s.dirty()):n.kind==="ip"?Zr(e.data,n.version)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"ip",code:p.invalid_string,message:n.message}),s.dirty()):n.kind==="jwt"?Dr(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"jwt",code:p.invalid_string,message:n.message}),s.dirty()):n.kind==="cidr"?Br(e.data,n.version)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"cidr",code:p.invalid_string,message:n.message}),s.dirty()):n.kind==="base64"?Pr.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"base64",code:p.invalid_string,message:n.message}),s.dirty()):n.kind==="base64url"?Mr.test(e.data)||(a=this._getOrReturnCtx(e,a),g(a,{validation:"base64url",code:p.invalid_string,message:n.message}),s.dirty()):D.assertNever(n);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(a=>e.test(a),{validation:t,code:p.invalid_string,...x.errToObj(s)})}_addCheck(e){return new _e({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...x.errToObj(e)})}url(e){return this._addCheck({kind:"url",...x.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...x.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...x.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...x.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...x.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...x.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...x.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...x.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...x.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...x.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...x.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...x.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...x.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...x.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...x.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...x.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...x.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...x.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...x.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...x.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...x.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...x.errToObj(t)})}nonempty(e){return this.min(1,x.errToObj(e))}trim(){return new _e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}_e.create=r=>new _e({checks:[],typeName:N.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...$(r)});function zr(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=t>s?t:s,n=Number.parseInt(r.toFixed(a).replace(".","")),l=Number.parseInt(e.toFixed(a).replace(".",""));return n%l/10**a}class Le extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==k.number){const n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:k.number,received:n.parsedType}),T}let s;const a=new ee;for(const n of this._def.checks)n.kind==="int"?D.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),g(s,{code:p.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),g(s,{code:p.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),g(s,{code:p.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?zr(e.data,n.value)!==0&&(s=this._getOrReturnCtx(e,s),g(s,{code:p.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),g(s,{code:p.not_finite,message:n.message}),a.dirty()):D.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,s,a){return new Le({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:x.toString(a)}]})}_addCheck(e){return new Le({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:x.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:x.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:x.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:x.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&D.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Le.create=r=>new Le({checks:[],typeName:N.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...$(r)});class je extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==k.bigint)return this._getInvalidInput(e);let s;const a=new ee;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),g(s,{code:p.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),g(s,{code:p.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),g(s,{code:p.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):D.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:k.bigint,received:t.parsedType}),T}gte(e,t){return this.setLimit("min",e,!0,x.toString(t))}gt(e,t){return this.setLimit("min",e,!1,x.toString(t))}lte(e,t){return this.setLimit("max",e,!0,x.toString(t))}lt(e,t){return this.setLimit("max",e,!1,x.toString(t))}setLimit(e,t,s,a){return new je({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:x.toString(a)}]})}_addCheck(e){return new je({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:x.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}je.create=r=>new je({checks:[],typeName:N.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...$(r)});class xt extends j{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==k.boolean){const s=this._getOrReturnCtx(e);return g(s,{code:p.invalid_type,expected:k.boolean,received:s.parsedType}),T}return re(e.data)}}xt.create=r=>new xt({typeName:N.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...$(r)});class Ke extends j{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==k.date){const n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:k.date,received:n.parsedType}),T}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_date}),T}const s=new ee;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),s.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),g(a,{code:p.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),s.dirty()):D.assertNever(n);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ke({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:x.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:x.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}Ke.create=r=>new Ke({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:N.ZodDate,...$(r)});class wt extends j{_parse(e){if(this._getType(e)!==k.symbol){const s=this._getOrReturnCtx(e);return g(s,{code:p.invalid_type,expected:k.symbol,received:s.parsedType}),T}return re(e.data)}}wt.create=r=>new wt({typeName:N.ZodSymbol,...$(r)});class At extends j{_parse(e){if(this._getType(e)!==k.undefined){const s=this._getOrReturnCtx(e);return g(s,{code:p.invalid_type,expected:k.undefined,received:s.parsedType}),T}return re(e.data)}}At.create=r=>new At({typeName:N.ZodUndefined,...$(r)});class Et extends j{_parse(e){if(this._getType(e)!==k.null){const s=this._getOrReturnCtx(e);return g(s,{code:p.invalid_type,expected:k.null,received:s.parsedType}),T}return re(e.data)}}Et.create=r=>new Et({typeName:N.ZodNull,...$(r)});class Ct extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return re(e.data)}}Ct.create=r=>new Ct({typeName:N.ZodAny,...$(r)});class St extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return re(e.data)}}St.create=r=>new St({typeName:N.ZodUnknown,...$(r)});class we extends j{_parse(e){const t=this._getOrReturnCtx(e);return g(t,{code:p.invalid_type,expected:k.never,received:t.parsedType}),T}}we.create=r=>new we({typeName:N.ZodNever,...$(r)});class Tt extends j{_parse(e){if(this._getType(e)!==k.undefined){const s=this._getOrReturnCtx(e);return g(s,{code:p.invalid_type,expected:k.void,received:s.parsedType}),T}return re(e.data)}}Tt.create=r=>new Tt({typeName:N.ZodVoid,...$(r)});class de extends j{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),a=this._def;if(t.parsedType!==k.array)return g(t,{code:p.invalid_type,expected:k.array,received:t.parsedType}),T;if(a.exactLength!==null){const l=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(l||d)&&(g(t,{code:l?p.too_big:p.too_small,minimum:d?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(g(t,{code:p.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(g(t,{code:p.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((l,d)=>a.type._parseAsync(new xe(t,l,t.path,d)))).then(l=>ee.mergeArray(s,l));const n=[...t.data].map((l,d)=>a.type._parseSync(new xe(t,l,t.path,d)));return ee.mergeArray(s,n)}get element(){return this._def.type}min(e,t){return new de({...this._def,minLength:{value:e,message:x.toString(t)}})}max(e,t){return new de({...this._def,maxLength:{value:e,message:x.toString(t)}})}length(e,t){return new de({...this._def,exactLength:{value:e,message:x.toString(t)}})}nonempty(e){return this.min(1,e)}}de.create=(r,e)=>new de({type:r,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...$(e)});function Te(r){if(r instanceof J){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=ke.create(Te(s))}return new J({...r._def,shape:()=>e})}else return r instanceof de?new de({...r._def,type:Te(r.element)}):r instanceof ke?ke.create(Te(r.unwrap())):r instanceof Re?Re.create(Te(r.unwrap())):r instanceof Ee?Ee.create(r.items.map(e=>Te(e))):r}class J extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=D.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==k.object){const _=this._getOrReturnCtx(e);return g(_,{code:p.invalid_type,expected:k.object,received:_.parsedType}),T}const{status:s,ctx:a}=this._processInputParams(e),{shape:n,keys:l}=this._getCached(),d=[];if(!(this._def.catchall instanceof we&&this._def.unknownKeys==="strip"))for(const _ in a.data)l.includes(_)||d.push(_);const b=[];for(const _ of l){const P=n[_],Q=a.data[_];
vendor: 10,407 bytes, line 3
3b.push({key:{status:"valid",value:_},value:P._parse(new xe(a,Q,a.path,_)),alwaysSet:_ in a.data})}if(this._def.catchall instanceof we){const _=this._def.unknownKeys;if(_==="passthrough")for(const P of d)b.push({key:{status:"valid",value:P},value:{status:"valid",value:a.data[P]}});else if(_==="strict")d.length>0&&(g(a,{code:p.unrecognized_keys,keys:d}),s.dirty());else if(_!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const _=this._def.catchall;for(const P of d){const Q=a.data[P];b.push({key:{status:"valid",value:P},value:_._parse(new xe(a,Q,a.path,P)),alwaysSet:P in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const _=[];for(const P of b){const Q=await P.key,ge=await P.value;_.push({key:Q,value:ge,alwaysSet:P.alwaysSet})}return _}).then(_=>ee.mergeObjectSync(s,_)):ee.mergeObjectSync(s,b)}get shape(){return this._def.shape()}strict(e){return x.errToObj,new J({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,l;const a=((l=(n=this._def).errorMap)==null?void 0:l.call(n,t,s).message)??s.defaultError;return t.code==="unrecognized_keys"?{message:x.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new J({...this._def,unknownKeys:"strip"})}passthrough(){return new J({...this._def,unknownKeys:"passthrough"})}extend(e){return new J({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new J({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:N.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new J({...this._def,catchall:e})}pick(e){const t={};for(const s of D.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new J({...this._def,shape:()=>t})}omit(e){const t={};for(const s of D.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new J({...this._def,shape:()=>t})}deepPartial(){return Te(this)}partial(e){const t={};for(const s of D.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?t[s]=a:t[s]=a.optional()}return new J({...this._def,shape:()=>t})}required(e){const t={};for(const s of D.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof ke;)n=n._def.innerType;t[s]=n}return new J({...this._def,shape:()=>t})}keyof(){return Ft(D.objectKeys(this.shape))}}J.create=(r,e)=>new J({shape:()=>r,unknownKeys:"strip",catchall:we.create(),typeName:N.ZodObject,...$(e)});J.strictCreate=(r,e)=>new J({shape:()=>r,unknownKeys:"strict",catchall:we.create(),typeName:N.ZodObject,...$(e)});J.lazycreate=(r,e)=>new J({shape:r,unknownKeys:"strip",catchall:we.create(),typeName:N.ZodObject,...$(e)});class Je extends j{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function a(n){for(const d of n)if(d.result.status==="valid")return d.result;for(const d of n)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const l=n.map(d=>new me(d.ctx.common.issues));return g(t,{code:p.invalid_union,unionErrors:l}),T}if(t.common.async)return Promise.all(s.map(async n=>{const l={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:l}),ctx:l}})).then(a);{let n;const l=[];for(const b of s){const _={...t,common:{...t.common,issues:[]},parent:null},P=b._parseSync({data:t.data,path:t.path,parent:_});if(P.status==="valid")return P;P.status==="dirty"&&!n&&(n={result:P,ctx:_}),_.common.issues.length&&l.push(_.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const d=l.map(b=>new me(b));return g(t,{code:p.invalid_union,unionErrors:d}),T}}get options(){return this._def.options}}Je.create=(r,e)=>new Je({options:r,typeName:N.ZodUnion,...$(e)});function lt(r,e){const t=ye(r),s=ye(e);if(r===e)return{valid:!0,data:r};if(t===k.object&&s===k.object){const a=D.objectKeys(e),n=D.objectKeys(r).filter(d=>a.indexOf(d)!==-1),l={...r,...e};for(const d of n){const b=lt(r[d],e[d]);if(!b.valid)return{valid:!1};l[d]=b.data}return{valid:!0,data:l}}else if(t===k.array&&s===k.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<r.length;n++){const l=r[n],d=e[n],b=lt(l,d);if(!b.valid)return{valid:!1};a.push(b.data)}return{valid:!0,data:a}}else return t===k.date&&s===k.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class Ge extends j{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=(n,l)=>{if(yt(n)||yt(l))return T;const d=lt(n.value,l.value);return d.valid?((_t(n)||_t(l))&&t.dirty(),{status:t.value,value:d.data}):(g(s,{code:p.invalid_intersection_types}),T)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([n,l])=>a(n,l)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}Ge.create=(r,e,t)=>new Ge({left:r,right:e,typeName:N.ZodIntersection,...$(t)});class Ee extends j{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==k.array)return g(s,{code:p.invalid_type,expected:k.array,received:s.parsedType}),T;if(s.data.length<this._def.items.length)return g(s,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),T;!this._def.rest&&s.data.length>this._def.items.length&&(g(s,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((l,d)=>{const b=this._def.items[d]||this._def.rest;return b?b._parse(new xe(s,l,s.path,d)):null}).filter(l=>!!l);return s.common.async?Promise.all(n).then(l=>ee.mergeArray(t,l)):ee.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Ee({...this._def,rest:e})}}Ee.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ee({items:r,typeName:N.ZodTuple,rest:null,...$(e)})};class Nt extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==k.map)return g(s,{code:p.invalid_type,expected:k.map,received:s.parsedType}),T;const a=this._def.keyType,n=this._def.valueType,l=[...s.data.entries()].map(([d,b],_)=>({key:a._parse(new xe(s,d,s.path,[_,"key"])),value:n._parse(new xe(s,b,s.path,[_,"value"]))}));if(s.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const b of l){const _=await b.key,P=await b.value;if(_.status==="aborted"||P.status==="aborted")return T;(_.status==="dirty"||P.status==="dirty")&&t.dirty(),d.set(_.value,P.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const b of l){const _=b.key,P=b.value;if(_.status==="aborted"||P.status==="aborted")return T;(_.status==="dirty"||P.status==="dirty")&&t.dirty(),d.set(_.value,P.value)}return{status:t.value,value:d}}}}Nt.create=(r,e,t)=>new Nt({valueType:e,keyType:r,typeName:N.ZodMap,...$(t)});class Ze extends j{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==k.set)return g(s,{code:p.invalid_type,expected:k.set,received:s.parsedType}),T;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(g(s,{code:p.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(g(s,{code:p.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function l(b){const _=new Set;for(const P of b){if(P.status==="aborted")return T;P.status==="dirty"&&t.dirty(),_.add(P.value)}return{status:t.value,value:_}}const d=[...s.data.values()].map((b,_)=>n._parse(new xe(s,b,s.path,_)));return s.common.async?Promise.all(d).then(b=>l(b)):l(d)}min(e,t){return new Ze({...this._def,minSize:{value:e,message:x.toString(t)}})}max(e,t){return new Ze({...this._def,maxSize:{value:e,message:x.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ze.create=(r,e)=>new Ze({valueType:r,minSize:null,maxSize:null,typeName:N.ZodSet,...$(e)});class It extends j{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}It.create=(r,e)=>new It({getter:r,typeName:N.ZodLazy,...$(e)});class Ot extends j{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return g(t,{received:t.data,code:p.invalid_literal,expected:this._def.value}),T}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ot.create=(r,e)=>new Ot({value:r,typeName:N.ZodLiteral,...$(e)});function Ft(r,e){return new Ie({values:r,typeName:N.ZodEnum,...$(e)})}class Ie extends j{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return g(t,{expected:D.joinValues(s),received:t.parsedType,code:p.invalid_type}),T}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return g(t,{received:t.data,code:p.invalid_enum_value,options:s}),T}return re(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ie.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ie.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}Ie.create=Ft;class Rt extends j{_parse(e){const t=D.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==k.string&&s.parsedType!==k.number){const a=D.objectValues(t);return g(s,{expected:D.joinValues(a),received:s.parsedType,code:p.invalid_type}),T}if(this._cache||(this._cache=new Set(D.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=D.objectValues(t);return g(s,{received:s.data,code:p.invalid_enum_value,options:a}),T}return re(e.data)}get enum(){return this._def.values}}Rt.create=(r,e)=>new Rt({values:r,typeName:N.ZodNativeEnum,...$(e)});class Ye extends j{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==k.promise&&t.common.async===!1)return g(t,{code:p.invalid_type,expected:k.promise,received:t.parsedType}),T;
vendor: 6,621 bytes, line 3
3const s=t.parsedType===k.promise?t.data:Promise.resolve(t.data);return re(s.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Ye.create=(r,e)=>new Ye({type:r,typeName:N.ZodPromise,...$(e)});class Oe extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:l=>{g(s,l),l.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const l=a.transform(s.data,n);if(s.common.async)return Promise.resolve(l).then(async d=>{if(t.value==="aborted")return T;const b=await this._def.schema._parseAsync({data:d,path:s.path,parent:s});return b.status==="aborted"?T:b.status==="dirty"||t.value==="dirty"?$e(b.value):b});{if(t.value==="aborted")return T;const d=this._def.schema._parseSync({data:l,path:s.path,parent:s});return d.status==="aborted"?T:d.status==="dirty"||t.value==="dirty"?$e(d.value):d}}if(a.type==="refinement"){const l=d=>{const b=a.refinement(d,n);if(s.common.async)return Promise.resolve(b);if(b instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return d.status==="aborted"?T:(d.status==="dirty"&&t.dirty(),l(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(d=>d.status==="aborted"?T:(d.status==="dirty"&&t.dirty(),l(d.value).then(()=>({status:t.value,value:d.value}))))}if(a.type==="transform")if(s.common.async===!1){const l=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Ne(l))return T;const d=a.transform(l.value,n);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(l=>Ne(l)?Promise.resolve(a.transform(l.value,n)).then(d=>({status:t.value,value:d})):T);D.assertNever(a)}}Oe.create=(r,e,t)=>new Oe({schema:r,typeName:N.ZodEffects,effect:e,...$(t)});Oe.createWithPreprocess=(r,e,t)=>new Oe({schema:e,effect:{type:"preprocess",transform:r},typeName:N.ZodEffects,...$(t)});class ke extends j{_parse(e){return this._getType(e)===k.undefined?re(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ke.create=(r,e)=>new ke({innerType:r,typeName:N.ZodOptional,...$(e)});class Re extends j{_parse(e){return this._getType(e)===k.null?re(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Re.create=(r,e)=>new Re({innerType:r,typeName:N.ZodNullable,...$(e)});class dt extends j{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===k.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}dt.create=(r,e)=>new dt({innerType:r,typeName:N.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...$(e)});class ct extends j{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return He(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new me(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new me(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}ct.create=(r,e)=>new ct({innerType:r,typeName:N.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...$(e)});class Vt extends j{_parse(e){if(this._getType(e)!==k.nan){const s=this._getOrReturnCtx(e);return g(s,{code:p.invalid_type,expected:k.nan,received:s.parsedType}),T}return{status:"valid",value:e.data}}}Vt.create=r=>new Vt({typeName:N.ZodNaN,...$(r)});class Ur extends j{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class ft extends j{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?T:n.status==="dirty"?(t.dirty(),$e(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?T:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,t){return new ft({in:e,out:t,typeName:N.ZodPipeline})}}class ut extends j{_parse(e){const t=this._def.innerType._parse(e),s=a=>(Ne(a)&&(a.value=Object.freeze(a.value)),a);return He(t)?t.then(a=>s(a)):s(t)}unwrap(){return this._def.innerType}}ut.create=(r,e)=>new ut({innerType:r,typeName:N.ZodReadonly,...$(e)});var N;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(N||(N={}));const pe=_e.create;we.create;de.create;const qr=J.create;Je.create;Ge.create;Ee.create;const Pt=Ie.create;Ye.create;ke.create;Re.create;const Wt=[{value:"ohne_bescheinigung",label:"Krankmeldung ohne Bescheinigung (max. 3 Kalendertage)"},{value:"erstmeldung",label:"Erstmeldung mit Bescheinigung"},{value:"folgemeldung",label:"Folgemeldung mit Bescheinigung"},{value:"kind_krank",label:"Kind krank mit Bescheinigung"}],Fr=Wt.map(r=>r.value),Ht=[{value:"aerztlicher_dienst",label:"Ärztlicher Dienst"}
3,{value:"psychologie",label:"Psycholog*innen"},{value:"pflege",label:"Pflege"},{value:"azubis_schueler",label:"Azubis/Schüler*innen"},{value:"fsj",label:"FSJ"},{value:"mfa",label:"MFA"},{value:"apotheke",label:"Apotheker*innen"},{value:"kreativtherapie",label:"Kreativtherapie (Ergo-, Musik-, Bewegungs-, Physiotherapie, etc.)"},{value:"sozialdienst",label:"Sozialdienst"},{value:"haustechnik",label:"Haustechnik"},{value:"hauswirtschaft_reinigung",label:"Hauswirtschaft/Reinigung"},{value:"verwaltung",label:"Verwaltung"},{value:"andere",label:"Andere"}],Wr=Ht.map(r=>r.value),rt=/^[\p{L}\p{M}\-\s.'’]+$/u,Hr=/^[A-Za-z0-9-]{0,20}$/,Mt=/^\d{4}-\d{2}-\d{2}$/,$t=()=>{const r=new Date;return r.setHours(0,0,0,0),r},st=(r,e)=>{const t=new Date(r);return t.setDate(t.getDate()+e),t},Kr=qr({art:Pt(Fr,{errorMap:()=>({message:"Bitte Art der Krankmeldung wählen."})}),berufsgruppe:Pt(Wr,{errorMap:()=>({message:"Bitte Berufsgruppe wählen."})}),berufsgruppe_andere:pe().trim().max(100,"Angabe ist zu lang.").optional().default(""),bereich:pe().trim().min(2,"Bitte Bereich angeben.").max(100,"Angabe ist zu lang."),vorname:pe().trim().min(2,"Vorname ist erforderlich (mindestens 2 Zeichen).").max(100,"Vorname ist zu lang.").regex(rt,"Vorname enthält ungültige Zeichen."),nachname:pe().trim().min(2,"Nachname ist erforderlich (mindestens 2 Zeichen).").max(100,"Nachname ist zu lang.").regex(rt,"Nachname enthält ungültige Zeichen."),personalnummer:pe().trim().max(20,"Personalnummer ist zu lang.").regex(Hr,"Personalnummer enthält ungültige Zeichen.").optional().default(""),kind_name:pe().trim().max(100,"Name des Kindes ist zu lang.").optional().default(""),krank_ab:pe().regex(Mt,"Bitte gültiges Datum eingeben."),krank_bis:pe().regex(Mt,"Bitte gültiges Datum eingeben."),anmerkung:pe().trim().max(1e3,"Anmerkung ist zu lang (maximal 1000 Zeichen).").optional().default("")}).superRefine((r,e)=>{r.berufsgruppe==="andere"&&r.berufsgruppe_andere.trim().length<2&&e.addIssue({code:"custom",path:["berufsgruppe_andere"],message:"Bitte Berufsgruppe angeben."});const t=new Date(r.krank_ab),s=new Date(r.krank_bis);Number.isNaN(t.getTime())?e.addIssue({code:"custom",path:["krank_ab"],message:"Ungültiges Datum."}):t<st($t(),-14)&&e.addIssue({code:"custom",path:["krank_ab"],message:"Darf maximal 14 Tage in der Vergangenheit liegen."}),Number.isNaN(s.getTime())?e.addIssue({code:"custom",path:["krank_bis"],message:"Ungültiges Datum."}):s>st($t(),90)&&e.addIssue({code:"custom",path:["krank_bis"],message:"Darf maximal 90 Tage in der Zukunft liegen."}),!Number.isNaN(t.getTime())&&!Number.isNaN(s.getTime())&&s<t&&e.addIssue({code:"custom",path:["krank_bis"],message:'"Voraussichtlich bis" darf nicht vor "Krank ab" liegen.'}),r.art==="ohne_bescheinigung"&&!Number.isNaN(t.getTime())&&!Number.isNaN(s.getTime())&&s>st(t,2)&&e.addIssue({code:"custom",path:["krank_bis"],message:"Ohne Bescheinigung sind maximal 3 Kalendertage möglich."}
3),r.art==="kind_krank"&&r.kind_name.trim().length<2?e.addIssue({code:"custom",path:["kind_name"],message:"Bitte den Namen des Kindes angeben."}):r.kind_name.trim()!==""&&!rt.test(r.kind_name.trim())&&e.addIssue({code:"custom",path:["kind_name"],message:"Name des Kindes enthält ungültige Zeichen."})}),Jr=r=>{const e=Gt({art:"",berufsgruppe:"",berufsgruppe_andere:"",bereich:"",vorname:"",nachname:"",personalnummer:"",kind_name:"",krank_ab:"",krank_bis:"",anmerkung:""}),t=Ce({}),s=Ce("idle"),a=Ce(null),n=Ce(""),l=Ce(""),d=Ce(""),b=Math.floor(Date.now()/1e3),_=Me(()=>s.value==="submitting"),P=Me(()=>s.value==="success"),Q=Me(()=>s.value==="success"||s.value==="saved-mail-failed"),ge=Me(()=>s.value==="saved-mail-failed"),Ae=()=>{const z=Kr.safeParse(e),h={};if(!z.success)for(const v of z.error.issues){const I=String(v.path[0]??"form");I in h||(h[I]=v.message)}return e.berufsgruppe==="andere"&&e.berufsgruppe_andere.trim().length<2&&!("berufsgruppe_andere"in h)&&(h.berufsgruppe_andere="Bitte Berufsgruppe angeben."),t.value=h,Object.keys(h).length===0};return{fields:e,errors:t,isSubmitting:_,isSuccess:P,isSaved:Q,isMailFailed:ge,submissionId:a,generalError:n,honeypot:l,capToken:d,submit:async()=>{if(n.value="",!Ae())return;if(r.capApiEndpoint!==""&&d.value===""){n.value="Bitte schließen Sie die Sicherheitsprüfung ab, bevor Sie das Formular absenden.",s.value="error";return}s.value="submitting";const z={...e,website:l.value,form_started_at:b,cap_token:d.value};try{const h=await fetch(r.apiUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)}),v=await h.json().catch(()=>({}));if(h.ok&&v.ok){a.value=v.id??null,s.value="success";return}if(h.status===422&&v.errors){t.value=v.errors,s.value="error",n.value="Bitte korrigieren Sie die markierten Felder.";return}if(h.status===502&&v.code==="mail_failed"){a.value=v.id??null,s.value="saved-mail-failed";const I=v.id?` Vorgangsnummer #${v.id}.`:"";n.value=`Ihre Meldung wurde gespeichert, der E-Mail-Versand ist jedoch fehlgeschlagen.${I}`;return}h.status===429?n.value="Zu viele Anfragen. Bitte versuchen Sie es später erneut.":h.status===403?n.value="Sicherheitsprüfung fehlgeschlagen. Bitte Seite neu laden.":n.value="Versand konnte nicht abgeschlossen werden. Bitte erneut versuchen.",s.value="error"}catch{s.value="error",n.value="Netzwerkfehler. Bitte Internetverbindung prüfen."}}}},Gr={class:"py-[40px]"},Yr={key:0,class:"mb-[28px] text-[15px] text-gray-500"},Xr={key:1,class:"w-fit rounded-[4px] border-l-4 border-emerald-500 bg-emerald-50 px-[16px] py-[16px] text-[16px] text-emerald-900",role:"status","aria-live":"polite"},Qr={class:"mb-0"},es={key:2,class:"w-fit rounded-[4px] border-l-4 border-yellow-500 bg-yellow-50 px-[16px] py-[16px] text-[16px] text-yellow-900",role:"alert","aria-live":"assertive"},ts={class:"mb-0"},rs={key:3,class:"w-full"},ss={class:"grid grid-cols-1 gap-[24px] md:grid-cols-2"},as={class:"grid grid-cols-1 gap-[24px] md:grid-cols-[2fr_2fr_1fr]"},ns={class:"grid grid-cols-1 gap-[24px] md:grid-cols-2"},is={style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",overflow:"hidden"}},os=["data-cap-api-endpoint"],ls={key:3,role:"alert",class:"rounded-[4px] border-l-4 border-red-500 bg-red-50 px-[16px] py-[12px] text-[16px] text-red-900"},ds={class:"mb-0"},cs={class:"flex flex-col items-start gap-[10px]"},us=["disabled"],hs=ht({__name:"App",props:{apiUrl:{},capApiEndpoint:{}},setup(r){const e=r,{fields:t,errors:s,generalError:a,honeypot:n,isSubmitting:l,isSuccess:d,isMailFailed:b,submissionId:_,capToken:P,submit:Q}=Jr({apiUrl:e.apiUrl,capApiEndpoint:e.capApiEndpoint}),ge=Me(()=>{if(t.art!=="ohne_bescheinigung"||!/^\d{4}-\d{2}-\d{2}$/.test(t.krank_ab))return;const z=new Date(t.krank_ab);return z.setDate(z.getDate()+2),z.toISOString().slice(0,10)}),Ae=z=>{const h=z.detail;P.value=(h==null?void 0:h.token)??""},H=z=>{const h=z.detail;P.value="",a.value=h!=null&&h.message?`Sicherheitsprüfung fehlgeschlagen: ${h.message}`:"Sicherheitsprüfung fehlgeschlagen. Bitte erneut versuchen."};return(z,h)=>(F(),K("div",Gr,[h[26]||(h[26]=R("h1",{class:"mb-[8px] text-[36px] font-bold text-gray-900"},"Krankmeldung",-1)),!C(d)&&!C(b)?(F(),K("p",Yr,h[13]||(h[13]=[fe(" Bitte füllen Sie alle Pflichtfelder ("),R("span",{class:"text-red-500"},"*",-1),fe(") aus. ")]))):oe("",!0),C(d)?(F(),K("div",Xr,[h[17]||(h[17]=R("h2",{class:"mb-[8px] text-[18px] font-bold"},"Krankmeldung gesendet",-1)),R("p",Qr,[h[16]||(h[16]=fe(" Vielen Dank — Ihre Krankmeldung ist eingegangen und wurde an die Personalabteilung weitergeleitet. ")),C(_)?(F(),K(pt,{key:0},[h[14]||(h[14]=fe(" Vorgangsnummer: ")),R("strong",null,"#"+le(C(_)),1),h[15]||(h[15]=fe(". "))],64)):oe("",!0)])])):C(b)?(F(),K("div",es,[h[18]||(h[18]=R("h2",{class:"mb-[8px] text-[18px] font-bold"},"Eingang gespeichert — E-Mail-Versand fehlgeschlagen",-1)),R("p",ts,le(C(a)),1)])):(F(),K("div",rs,[h[24]||(h[24]=R("aside",{role:"note","aria-labelledby":"sicknote-warnung-title",class:"mb-[16px] flex items-start gap-[12px] rounded-[6px] border-l-4 border-yellow-400 bg-yellow-50 px-[16px] py-[12px]"},[R("svg",{class:"mt-[2px] h-[20px] w-[20px] shrink-0 text-yellow-500",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[R("path",{d:"M12 9v4M12 17h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z","stroke-linecap":"round","stroke-linejoin":"round"})]),R("div",null,[R("h2",{id:"sicknote-warnung-title",class:"sr-only"},"Wichtiger Hinweis"),R("p",{class:"mb-0 text-[16px] text-gray-800"},"Bitte senden Sie diese Meldung nicht zusätzlich per Post oder E-Mail!")])],-1)),h[25]||(h[25]=R("aside",{role:"note","aria-labelledby":"sicknote-hinweis-title",class:"mb-[32px] flex items-start gap-[12px] rounded-[6px] border-l-4 border-blue-400 bg-blue-50 px-[16px] py-[12px]"},[R("svg",{class:"mt-[2px] h-[20px] w-[20px] shrink-0 text-blue-500",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[R("circle",{cx:"12",cy:"12",r:"10"}),R("path",{d:"M12 16v-4M12 8h.01","stroke-linecap":"round","stroke-linejoin":"round"})]),R("div",null,[R("h2",{id:"sicknote-hinweis-title",class:"mt-0 mb-[4px] text-[16px] font-bold text-gray-800"},"Hinweis"),R("p",{class:"text-[16px] text-gray-800"},"Maximal 3 Kalendertage ohne ärztliche Bescheinigung erlaubt."),R("p",{class:"mb-0 text-[16px] text-gray-800"},"Ab dem 4. Tag ist eine Bescheinigung erforderlich oder Arbeitsaufnahme.")])],-1)),R("form",{novalidate:"",class:"flex flex-col gap-[24px] rounded-[10px] border border-gray-200 bg-gray-50 p-[32px] shadow-sm",onSubmit:h[12]||(h[12]=er((...v)=>C(Q)&&C(Q)(...v),["prevent"]))},[he(vr,{name:"art",label:"Art der Krankmeldung",modelValue:C(t).art,"onUpdate:modelValue":h[0]||(h[0]=v=>C(t).art=v),options:C(Wt),required:!0,error:C(s).art},null,8,["modelValue","options","error"]),h[21]||(h[21]=R("hr",{class:"border-gray-200"},null,-1)),R("div",ss,[he(ie,{id:"sicknote-berufsgruppe",name:"berufsgruppe",label:"Berufsgruppe",modelValue:C(t).berufsgruppe,"onUpdate:modelValue":h[1]||(h[1]=v=>C(t).berufsgruppe=v),options:C(Ht),required:!0,error:C(s).berufsgruppe},null,8,["modelValue","options","error"]),he(ie,{id:"sicknote-bereich",name:"bereich",label:"Bereich",modelValue:C(t).bereich,"onUpdate:modelValue":h[2]||(h[2]=v=>C(t).bereich=v),autocomplete:"off",placeholder:"z. B. Station 1 / TK Sucht / PIA ZGP",maxlength:100,required:!0,error:C(s).bereich},null,8,["modelValue","error"])]),C(t).berufsgruppe==="andere"?(F(),gt(ie,{key:0,id:"sicknote-berufsgruppe-andere",name:"berufsgruppe_andere",label:"Berufsgruppe (bitte angeben)",modelValue:C(t).berufsgruppe_andere,"onUpdate:modelValue":h[3]||(h[3]=v=>C(t).berufsgruppe_andere=v),autocomplete:"off",maxlength:100,required:!0,error:C(s).berufsgruppe_andere},null,8,["modelValue","error"])):oe("",!0),h[22]||(h[22]=R("hr",{class:"border-gray-200"},null,-1)),R("div",as,[he(ie,{id:"sicknote-vorname",name:"vorname",label:"Vorname",modelValue:C(t).vorname,"onUpdate:modelValue":h[4]||(h[4]=v=>C(t).vorname=v),autocomplete:"given-name",required:!0,error:C(s).vorname},null,8,["modelValue","error"]),he(ie,{id:"sicknote-nachname",name:"nachname",label:"Nachname",modelValue:C(t).nachname,"onUpdate:modelValue":h[5]||(h[5]=v=>C(t).nachname=v),autocomplete:"family-name",required:!0,error:C(s).nachname},null,8,["modelValue","error"]),he(ie,{id:"sicknote-personalnummer",name:"personalnummer",label:"Personalnummer",modelValue:C(t).personalnummer,"onUpdate:modelValue":h[6]||(h[6]=v=>C(t).personalnummer=v),autocomplete:"off",error:C(s).personalnummer},null,8,["modelValue","error"])]),C(t).art==="kind_krank"?(F(),gt(ie,{key:1,id:"sicknote-kind-name",name:"kind_name",label:"Name des Kindes",modelValue:C(t).kind_name,"onUpdate:modelValue":h[7]||(h[7]=v=>C(t).kind_name=v),autocomplete:"off",required:!0,error:C(s).kind_name},null,8,["modelValue","error"])):oe("",!0),R("div",ns,[he(ie,{id:"sicknote-krank-ab",name:"krank_ab",label:"Krank ab",type:"date",modelValue:C(t).krank_ab,"onUpdate:modelValue":h[8]||(h[8]=v=>C(t).krank_ab=v),required:!0,error:C(s).krank_ab},null,8,["modelValue","error"]),he(ie,{id:"sicknote-krank-bis",name:"krank_bis",label:"Voraussichtlich bis",type:"date",modelValue:C(t).krank_bis,"onUpdate:modelValue":h[9]||(h[9]=v=>C(t).krank_bis=v),required:!0,max:ge.value,error:C(s).krank_bis},null,8,["modelValue","max","error"])]),he(ie,{id:"sicknote-anmerkung",name:"anmerkung",label:"Anmerkung (optional)",modelValue:C(t).anmerkung,"onUpdate:modelValue":h[10]||(h[10]=v=>C(t).anmerkung=v),rows:4,maxlength:1e3,placeholder:"Ergänzende Hinweise an die Personalabteilung",error:C(s).anmerkung},null,8,["modelValue","error"]),h[23]||(h[23]=R("hr",{class:"border-gray-200"},null,-1)),R("div",is,[R("label",null,[h[19]||(h[19]=fe(" Website ")),Yt(R("input",{"onUpdate:modelValue":h[11]||(h[11]=v=>Qt(n)?n.value=v:null),type:"text",name:"website",autocomplete:"off"},null,512),[[Xt,C(n)]])])]),e.capApiEndpoint?(F(),K("cap-widget",{key:2,"data-cap-api-endpoint":e.capApiEndpoint,"data-cap-i18n-initial-state":"Ich bin ein Mensch","data-cap-i18n-verifying-label":"Wird geprüft …","data-cap-i18n-solved-label":"Sie sind ein Mensch","data-cap-i18n-error-label":"Fehler. Bitte erneut versuchen.","data-cap-i18n-required-label":"Bitte bestätigen Sie, dass Sie ein Mensch sind","data-cap-i18n-group-aria-label":"Cap-Verifizierung","data-cap-i18n-verify-aria-label":"Klicken, um zu bestätigen, dass Sie ein Mensch sind","data-cap-i18n-verifying-aria-label":"Prüfung läuft, bitte warten","data-cap-i18n-verified-aria-label":"Bestätigt – Sie können fortfahren","data-cap-i18n-error-aria-label":"Fehler bei der Verifizierung","data-cap-i18n-wasm-disabled":"WebAssembly ist deaktiviert – bitte im Browser aktivieren","data-cap-i18n-troubleshooting-label":"Probleme?",onSolve:Ae,onError:H},null,40,os)):oe("",!0),C(a)?(F(),K("div",ls,[R("p",ds,le(C(a)),1)])):oe("",!0),R("div",cs,[R("button",{type:"submit",disabled:C(l),class:"w-full rounded-[6px] bg-green-600 px-[32px] py-[13px] text-[16px] font-semibold text-white shadow-sm transition hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-600/40 disabled:cursor-not-allowed disabled:opacity-60 sm:w-auto"},le(C(l)?"Wird gesendet…":"Senden"),9,us),h[20]||(h[20]=R("p",{class:"mb-0 text-[13px] text-gray-500"},[R("span",{class:"text-red-500"},"*"),fe(" Pflichtfeld")],-1))])],32)]))]))}}),ms=()=>{const r=document.querySelector("[data-sick-note-mount]");
3if(r===null)return;const e=r.dataset.apiUrl??"/_api/sick-note",t=r.dataset.capApiEndpoint??"";tr(hs,{apiUrl:e,capApiEndpoint:t}).mount(r)};export{ms as initSickNoteForm};

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