@opendaw/studio-core-wasm 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/WasmEngine.d.ts +14 -0
  2. package/dist/WasmEngine.d.ts.map +1 -0
  3. package/dist/WasmEngine.js +152 -0
  4. package/dist/boot.d.ts +14 -0
  5. package/dist/boot.d.ts.map +1 -0
  6. package/dist/boot.js +91 -0
  7. package/dist/device-linker.d.ts +47 -0
  8. package/dist/device-linker.d.ts.map +1 -0
  9. package/dist/device-linker.js +109 -0
  10. package/dist/engine-exports.d.ts +86 -0
  11. package/dist/engine-exports.d.ts.map +1 -0
  12. package/dist/engine-exports.js +13 -0
  13. package/dist/engine-modules.d.ts +26 -0
  14. package/dist/engine-modules.d.ts.map +1 -0
  15. package/dist/engine-modules.js +62 -0
  16. package/dist/index.d.ts +5 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +6 -0
  19. package/dist/nam-bridge.d.ts +7 -0
  20. package/dist/nam-bridge.d.ts.map +1 -0
  21. package/dist/nam-bridge.js +265 -0
  22. package/dist/nam-loader.d.ts +4 -0
  23. package/dist/nam-loader.d.ts.map +1 -0
  24. package/dist/nam-loader.js +1 -0
  25. package/dist/protocol.d.ts +22 -0
  26. package/dist/protocol.d.ts.map +1 -0
  27. package/dist/protocol.js +3 -0
  28. package/dist/script-bridge.d.ts +11 -0
  29. package/dist/script-bridge.d.ts.map +1 -0
  30. package/dist/script-bridge.js +343 -0
  31. package/dist/script-spielwerk.d.ts +24 -0
  32. package/dist/script-spielwerk.d.ts.map +1 -0
  33. package/dist/script-spielwerk.js +179 -0
  34. package/dist/soundfont-simplify.d.ts +28 -0
  35. package/dist/soundfont-simplify.d.ts.map +1 -0
  36. package/dist/soundfont-simplify.js +143 -0
  37. package/dist/sync/loopback.d.ts +8 -0
  38. package/dist/sync/loopback.d.ts.map +1 -0
  39. package/dist/sync/loopback.js +23 -0
  40. package/dist/sync/serialize-update-tasks.d.ts +4 -0
  41. package/dist/sync/serialize-update-tasks.d.ts.map +1 -0
  42. package/dist/sync/serialize-update-tasks.js +40 -0
  43. package/dist/utf8.d.ts +2 -0
  44. package/dist/utf8.d.ts.map +1 -0
  45. package/dist/utf8.js +19 -0
  46. package/dist/wasm/engine.wasm +0 -0
  47. package/dist/wasm/plugins/device_apparat.wasm +0 -0
  48. package/dist/wasm/plugins/device_arpeggio.wasm +0 -0
  49. package/dist/wasm/plugins/device_compressor.wasm +0 -0
  50. package/dist/wasm/plugins/device_crusher.wasm +0 -0
  51. package/dist/wasm/plugins/device_dattorro_reverb.wasm +0 -0
  52. package/dist/wasm/plugins/device_delay.wasm +0 -0
  53. package/dist/wasm/plugins/device_fold.wasm +0 -0
  54. package/dist/wasm/plugins/device_gate.wasm +0 -0
  55. package/dist/wasm/plugins/device_maximizer.wasm +0 -0
  56. package/dist/wasm/plugins/device_nano.wasm +0 -0
  57. package/dist/wasm/plugins/device_neural_amp.wasm +0 -0
  58. package/dist/wasm/plugins/device_pitch.wasm +0 -0
  59. package/dist/wasm/plugins/device_playfield_sample.wasm +0 -0
  60. package/dist/wasm/plugins/device_revamp.wasm +0 -0
  61. package/dist/wasm/plugins/device_reverb.wasm +0 -0
  62. package/dist/wasm/plugins/device_soundfont.wasm +0 -0
  63. package/dist/wasm/plugins/device_spielwerk.wasm +0 -0
  64. package/dist/wasm/plugins/device_stereo_tool.wasm +0 -0
  65. package/dist/wasm/plugins/device_tidal.wasm +0 -0
  66. package/dist/wasm/plugins/device_vaporisateur.wasm +0 -0
  67. package/dist/wasm/plugins/device_velocity.wasm +0 -0
  68. package/dist/wasm/plugins/device_vocoder.wasm +0 -0
  69. package/dist/wasm/plugins/device_waveshaper.wasm +0 -0
  70. package/dist/wasm/plugins/device_werkstatt.wasm +0 -0
  71. package/dist/wasm/plugins/device_zeitgeist.wasm +0 -0
  72. package/dist/wasm-offline-worker.js +97 -0
  73. package/dist/wasm-offline-worker.js.map +7 -0
  74. package/dist/wasm-processor.js +97 -0
  75. package/dist/wasm-processor.js.map +7 -0
  76. package/dist/worklet-scope.d.ts +2 -0
  77. package/dist/worklet-scope.d.ts.map +1 -0
  78. package/dist/worklet-scope.js +10 -0
  79. package/package.json +53 -0
@@ -0,0 +1,97 @@
1
+ var iB=Object.defineProperty;var Da=(t,e)=>{for(var r in e)iB(t,r,{get:e[r],enumerable:!0})};var AS=globalThis;AS.self??=globalThis;AS.location??={href:"/"};var W=t=>t!=null,Yn=t=>t===null;var th=t=>t===void 0,cb=t=>t!==void 0,db=t=>t==null,pb=(t,e)=>t!=null?e(t):void 0,Ce=(t,e="asDefined failed")=>t??V(Qn(e)),$t=(t,e)=>t instanceof e,Ie=(t,e)=>t instanceof e?t:V(`${t} is not instance of ${e}`),fb=(t,e)=>{t instanceof e||V(`${t} is not instance of ${e}`)};var Qn=t=>t instanceof Function?t():t;var P=(t,...e)=>t?.apply(null,e),rh=t=>W(t)&&typeof t=="object";var ih=t=>{throw new Error(`Unhandled ${t}`)},V=t=>{throw typeof t=="string"?new Error(t):t},te=(t,e)=>t?void 0:V(Qn(e));var Ud=t=>new Proxy({},{get(){return V(t)}});var lb=class{value;status="success";constructor(e){this.value=e}error=Ud("Cannot access error when succeeded")},ub=class{error;status="failure";constructor(e){this.error=e}value=Ud("Cannot access value when failed")},Ct=t=>{try{return new lb(t())}catch(e){return new ub(e)}};var Ra=(t,e)=>Object.keys(e).length===0?V("Empty enum object (are you using `const enum`?)"):Object.keys(e).filter(i=>isNaN(Number(i))).map(i=>e[i]).includes(t)?t:V(`Invalid enum value: ${String(t)}`),Vd=()=>{};var mb;(function(t){t[t.Ascending=1]="Ascending",t[t.Descending=-1]="Descending"})(mb||(mb={}));var ue=class{static#e=Object.freeze(new Array(0));static empty=()=>this.#e;static clear=e=>{e.length=0};static replace=(e,r)=>{e.length=0,e.push(...r)};static consume=(e,r)=>{for(let n=0;n<e.length;)r(e[n])?e.splice(n,1):n++};static peekFirst=e=>e.at(0)??null;static peekLast=e=>e.at(-1)??null;static getFirst=(e,r)=>Ce(e.at(0),r);static getLast=(e,r)=>Ce(e.at(-1),r);static getPrev=(e,r)=>{let n=e.indexOf(r);return n===-1?V(`${r} not found in ${e}`):Ce(e.at((n-1)%e.length),"Internal Error")};static getNext=(e,r)=>{let n=e.indexOf(r);return n===-1?V(`${r} not found in ${e}`):Ce(e.at((n+1)%e.length),"Internal Error")};static removeLast=(e,r)=>Ce(e.pop(),r);static create=(e,r)=>{let n=new Array(r);for(let i=0;i<r;i++)n[i]=e(i);return n};static equals=(e,r)=>{if(e.length!==r.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==r[n])return!1;return!0};static satisfy=(e,r)=>{if(e.length<2)return!0;let n=e[0];for(let i=1;i<e.length;i++)if(!r(n,e[i]))return!1;return!0};static remove=(e,r)=>{let n=e.indexOf(r);if(n===-1)return V(`${r} not found in ${e}`);e.splice(n,1)};static removeIf=(e,r)=>{for(let n=e.length-1;n>=0;n--)r(e[n])&&e.splice(n,1)};static removeOpt=(e,r)=>{let n=e.indexOf(r);return n===-1?!1:(e.splice(n,1),!0)};static hasDuplicates=e=>new Set(e).size<e.length;static removeDuplicates=e=>{let r=0,n=new Set;for(let i of e)n.has(i)||(n.add(i),e[r++]=i);return e.length=r,e};static removeDuplicateKeys=(e,r)=>{let n=0,i=new Set;for(let a of e){let o=a[r];i.has(o)||(i.add(o),e[n++]=a)}return e.length=n,e};static partition(e,...r){let n=r.map(()=>[]);for(let i of e)for(let a=0;a<r.length;a++)r[a](i)&&n[a].push(i);return n}static subtract(e,r,n){return e.filter(i=>!r.some(a=>n(i,a)))}static intersect(e,r,n){return e.filter(i=>r.some(a=>n(i,a)))}static merge(e,r,n){return[...e.filter(i=>!r.some(a=>n(i,a))),...r]}static*iterate(e){for(let r=0;r<e.length;r++)yield e[r]}static*iterateReverse(e){for(let r=e.length-1;r>=0;r--)yield e[r]}static*iterateStateFull(e){let r=e.length-1;for(let n=0;n<=r;n++)yield{value:e[n],isFirst:n===0,isLast:n===r}}static*iterateAdjacent(e){if(!(e.length<=1))for(let r=1,n=e[0];r<e.length;r++){let i=e[r];yield[n,i],n=i}}static isSorted(e,r=mb.Ascending){if(e.length<2)return!0;let n=e[0];for(let i=1;i<e.length;i++){let a=e[i];if(Math.sign(n-a)===r)return!1;n=a}return!0}static toRecord(e,r){return e.reduce((n,i)=>(n[r(i)]=i,n),{})}static concatArrayBuffers(e,r){let n=new ArrayBuffer(e.byteLength+r.byteLength),i=new Uint8Array(n);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(r),e.byteLength),n}};var b;(function(t){t.wrap=r=>W(r)?new e(r):t.None,t.from=r=>t.wrap(r()),t.tryCatch=r=>{try{return t.wrap(r())}catch{return t.None}},t.execute=(r,...n)=>t.wrap(r?.apply(null,n)),t.async=r=>r.then(n=>t.wrap(n),()=>t.None);class e{#e;constructor(n){this.#e=Ce(n)}unwrap(){return this.#e}unwrapOrElse(n){return this.#e}unwrapOrNull(){return this.#e}unwrapOrUndefined(){return this.#e}contains(n){return n===this.#e}match(n){return n.some(this.#e)}ifSome(n){return n(this.#e)}ifAbsent(n){}isEmpty(){return!1}nonEmpty(){return!0}map(n){return t.wrap(n(this.#e))}mapOr(n,i){return n(this.#e)}flatMap(n){return n(this.#e)}equals(n){return this.unwrapOrNull()===n.unwrapOrNull()}assert(n){return this}toString(){return`{Option.Some(${this.#e})}`}get[Symbol.toStringTag](){return this.toString()}}t.Some=e,t.None=new class{unwrap=r=>V(W(r)?Qn(r):"unwrap failed");unwrapOrElse=r=>Qn(r);unwrapOrNull=()=>null;unwrapOrUndefined=()=>{};contains=r=>!1;match=r=>r.none();ifSome=r=>{};ifAbsent=r=>r(void 0);isEmpty=()=>!0;nonEmpty=()=>!1;map=r=>t.None;mapOr=(r,n)=>Qn(n);flatMap=r=>t.None;equals=r=>r.isEmpty();assert=r=>V(Qn(r)??"assert failed");toString=()=>"{Option.None}";get[Symbol.toStringTag](){return this.toString()}}})(b||(b={}));var Nr;(function(t){t.async=e=>e.then(r=>t.ok(r),r=>t.err(r)),t.tryGet=e=>{try{return t.ok(e())}catch(r){return t.err(r)}},t.ok=e=>new class{value;constructor(r){this.value=r}asOption=()=>b.wrap(this.value);failureReason=()=>{throw new Error("Attempt was successful.")};isFailure=()=>!1;isSuccess=()=>!0;result=()=>this.value;map=r=>{try{return t.ok(r(this.value))}catch(n){return t.err(n)}};mapOr=(r,n)=>r(this.value);unwrapOrElse=r=>this.value;flatMap=r=>r(this.value);match=r=>r.ok(this.value);toVoid=()=>t.ok(void 0);failure=()=>{throw new Error("Attempt was successful.")};toString=()=>`{Success: ${this.value}`;get[Symbol.toStringTag](){return"Success"}}(e),t.Ok=new class{constructor(){}asOption=()=>b.None;failureReason=()=>{throw new Error("Attempt was successful.")};isFailure=()=>!1;isSuccess=()=>!0;result=()=>{};map=e=>t.ok(e());mapOr=(e,r)=>e();unwrapOrElse=e=>{};flatMap=e=>e();match=e=>e.ok();toVoid=()=>t.ok(void 0);failure=()=>{throw new Error("Attempt was successful.")};toString=()=>"{Success: Ok";get[Symbol.toStringTag](){return"Success"}},t.err=e=>new class{reason;constructor(r){this.reason=r}asOption=()=>b.None;failureReason=()=>this.reason;isFailure=()=>!0;isSuccess=()=>!1;result=()=>V(`'${this.reason}'`);map=()=>this;mapOr=(r,n)=>Qn(n);unwrapOrElse=r=>Qn(r);flatMap=()=>this;match=r=>r.err(this.reason);toVoid=()=>t.err(this.reason);failure=()=>this;toString=()=>`{Failure: ${this.reason}`;get[Symbol.toStringTag](){return"Failure"}}(e)})(Nr||(Nr={}));var mt;(function(t){t.exact=(e,r,n)=>{let i=0,a=e.length-1;for(;i<=a;){let o=i+a>>>1,s=n(e[o],r);if(s===0)return o;s<0?i=o+1:a=o-1}return-1},t.exactMapped=(e,r,n,i)=>{let a=0,o=e.length-1;for(;a<=o;){let s=a+o>>>1,u=n(i(e[s]),r);if(u===0)return s;u<0?a=s+1:o=s-1}return-1},t.leftMost=(e,r,n)=>{let i=0,a=e.length;for(;i<a;){let o=i+a>>>1;n(e[o],r)<0?i=o+1:a=o}return i},t.rightMost=(e,r,n)=>{let i=0,a=e.length;for(;i<a;){let o=i+a>>>1;n(e[o],r)<=0?i=o+1:a=o}return a-1},t.stableInsert=(e,r,n)=>{let i=0,a=e.length;for(;i<a;){let o=i+a>>>1;n(e[o],r)<0?i=o+1:a=o}for(;i<e.length&&n(e[i],r)===0;)i++;return i},t.leftMostMapped=(e,r,n,i)=>{let a=0,o=e.length;for(;a<o;){let s=a+o>>>1;n(i(e[s]),r)<0?a=s+1:o=s}return a},t.rightMostMapped=(e,r,n,i)=>{let a=0,o=e.length;for(;a<o;){let s=a+o>>>1;n(i(e[s]),r)<=0?a=s+1:o=s}return o-1},t.rangeMapped=(e,r,n,i)=>[t.leftMostMapped(e,r,n,i),t.rightMostMapped(e,r,n,i)]})(mt||(mt={}));var nh=class{#e;#t=null;constructor(e){this.#e=e}invalidate=()=>this.#t=null;get(){return this.#t===null&&(this.#t=this.#e()),this.#t}terminate(){this.invalidate()}};var Ht=class t{static parseCssRgbOrRgba(e){let r=e.match(/\(([^)]+)\)/)?.at(1)?.split(",")?.map(Number);if(W(r)&&r.every(n=>!isNaN(n))){if(r.length===3)return[r[0]/255,r[1]/255,r[2]/255,1];if(r.length===4)return[r[0]/255,r[1]/255,r[2]/255,r[3]]}throw new Error(`${e} is not proper formatted. Example: 'rgb(255, 255, 255)' or 'rgba(255, 255, 255, 1)'`)}static hslToHex(e,r,n){let i=u=>(u+e/30)%12,a=r*Math.min(n,1-n),o=u=>n-a*Math.max(-1,Math.min(i(u)-3,Math.min(9-i(u),1))),s=u=>Math.round(u*255).toString(16).padStart(2,"0");return`#${s(o(0))}${s(o(8))}${s(o(4))}`}static hexToHsl(e){let r=e.startsWith("#")?e.slice(1):e,n=parseInt(r.slice(0,2),16)/255,i=parseInt(r.slice(2,4),16)/255,a=parseInt(r.slice(4,6),16)/255,o=Math.max(n,i,a),s=Math.min(n,i,a),u=(o+s)/2,d=0,m=0;if(o!==s){let x=o-s;switch(m=u>.5?x/(2-o-s):x/(o+s),o){case n:d=((i-a)/x+(i<a?6:0))*60;break;case i:d=((a-n)/x+2)*60;break;case a:d=((n-i)/x+4)*60;break}}return{h:d,s:m,l:u}}static hslStringToHex(e){let[r,n,i]=e.match(/\d+(\.\d+)?/g).map(Number);return t.hslToHex(r,n/100,i/100)}#e;#t;#r;#i;constructor(e,r,n,i=1){this.#e=e,this.#t=r,this.#r=n,this.#i=i}opacity(e){return new t(this.#e,this.#t,this.#r,e)}brightness(e){let r=Math.max(0,Math.min(100,this.#r+e));return new t(this.#e,this.#t,r,this.#i)}saturate(e){return new t(this.#e,this.#t*e,this.#r,this.#i)}fade(e){let r=this.#t*(1-Math.sqrt(e)),n=this.#r+(100-this.#r)*e**3;return new t(this.#e,r,n,this.#i)}toString(){return this.#i===1?`hsl(${this.#e}, ${this.#t}%, ${this.#r}%)`:`hsla(${this.#e}, ${this.#t}%, ${this.#r}%, ${this.#i})`}};var ho=(t,e)=>t-e;var X2=Math.PI*2,Y2=Math.PI/2,Q2=Math.PI/4,eC=1/Math.sqrt(2),at=(t,e,r)=>Math.max(e,Math.min(t,r)),FS=t=>Math.max(0,Math.min(t,1)),ES=(t,e)=>e+(1-2*e)*Math.max(0,Math.min(t,1)),hb=(t,e)=>Math.floor(t/e)*e;var SS=(t,e,r)=>t+(e-t)*r;var Fs=(t,e)=>nB(t/e)*e,nB=t=>t-Math.floor(t),ah=t=>Math.pow(2,Math.ceil(Math.log(t)/Math.log(2)));var gb=(t,e)=>t*e/((2*e-1)*(t-1)+e);var qt;(function(t){t.valueAt=({slope:i,steps:a,y0:o,y1:s},u)=>t.normalizedAt(u/a,i)*(s-o)+o,t.normalizedAt=(i,a)=>{if(a>.499999&&a<.500001)return i;{let o=at(a,1e-15,.999999999999999);return o*o/(1-o*2)*(Math.pow((1-o)/o,2*i)-1)}},t.inverseAt=(i,a)=>{let o=at(a,1e-15,.999999999999999);return Math.log(i*(1-2*o)/(o*o)+1)/(2*Math.log((1-o)/o))},t.coefficients=i=>{let a=t.valueAt(i,1),s=(t.valueAt(i,2)-a)/(a-i.y0),u=a-s*i.y0;return{m:s,q:u}};function*r(i,a,o,s){let{m:u,q:d}=t.coefficients({slope:i,steps:a,y0:o,y1:s});for(let m=0,x=o;m<a;m++)yield x=u*x+d}t.walk=r,t.run=(i,a,o,s,u)=>{let{m:d,q:m}=t.coefficients({slope:i,steps:a,y0:o,y1:s});for(let x=0,h=o;x<a;x++)u(h=d*h+m)};function*n(i,a){let o=1/a,s=t.normalizedAt(o,i),d=(t.normalizedAt(2*o,i)-s)/s;for(let m=0,x=0;m<a;m++)yield x=d*x+s}t.walkNormalized=n,t.byHalf=(i,a,o,s)=>({slope:t.slopeByHalf(a,o,s),steps:i,y0:a,y1:s}),t.slopeByHalf=(i,a,o)=>Math.abs(o-i)<1e-6?.5:(a-i)/(o-i)})(qt||(qt={}));var ea=new DataView(new ArrayBuffer(8)),yr;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647,t.toByte=e=>(ea.setInt8(0,e),ea.getInt8(0)),t.toShort=e=>(ea.setInt16(0,e),ea.getInt16(0)),t.toInt=e=>(ea.setInt32(0,e),ea.getInt32(0))})(yr||(yr={}));var Ca;(function(t){let n=new ArrayBuffer(Float32Array.BYTES_PER_ELEMENT),i=new Float32Array(n),a=new Int32Array(n);t.floatToIntBits=o=>{let s=t.floatToRawIntBits(o);return(s&2139095040)===2139095040&&(s&8388607)!==0?2143289344:s},t.intBitsToFloat=o=>(a[0]=o,i[0]),t.floatToRawIntBits=o=>(i[0]=o,a[0]),t.toFloat32=o=>(ea.setFloat32(0,o),ea.getFloat32(0))})(Ca||(Ca={}));var PS;(function(t){t.floatToIntBits=e=>{let r=Ca.floatToIntBits(e),n=r>>>16&32768,i=(r&2147483647)+4096;return i>=1199570944?(r&2147483647)>=1199570944?i<2139095040?n|31744:n|31744|(r&8388607)>>>13:n|31743:i>=947912704?n|i-939524096>>>13:i<855638016?n:(i=(r&2147483647)>>>23,n|(r&8388607|8388608)+(8388608>>>i-102)>>>126-i)},t.intBitsToFloat=e=>{let r=e&1023,n=e&31744;if(n===31744)n=261120;else if(n!==0){if(n+=114688,r===0&&n>115712)return Ca.intBitsToFloat((e&32768)<<16|n<<13|1023)}else if(r!==0){n=115712;do r<<=1,n-=1024;while((r&1024)===0);r&=1023}return Ca.intBitsToFloat((e&32768)<<16|(n|r)<<13)}})(PS||(PS={}));var oh;(function(t){let e=9218868437227405312n,r=4503599627370495n,n=new ArrayBuffer(BigInt64Array.BYTES_PER_ELEMENT),i=new Float64Array(n),a=new BigInt64Array(n);t.float64ToLongBits=o=>{let s=t.float64ToRawLongBits(o);return(s&e)===e&&(s&r)!==0n?0x7ff8000000000000n:s},t.longBitsToFloat64=o=>(a[0]=o,i[0]),t.float64ToRawLongBits=o=>(i[0]=o,a[0]),t.clamp=o=>(ea.setFloat64(0,o),ea.getFloat64(0))})(oh||(oh={}));var Jt=class{static*empty(){}static one(e){return[e]}static*range(e,r,n=1){te(W(r)||e>=0,()=>`range count must be non-negative, got ${e}`);let i=W(r)?e:0,a=W(r)?r:e;if(n!==0)if(n>0)for(let o=i;o<a;o+=n)yield o;else for(let o=i;o>a;o+=n)yield o}static count(e){let r=0;for(let n of e)r++;return r}static some(e,r){for(let n of e)if(r(n))return!0;return!1}static every(e,r){for(let n of e)if(!r(n))return!1;return!0}static reduce(e,r,n){let i=n,a=0;for(let o of e)i=r(i,o,a++);return i}static includes(e,r){for(let n of e)if(n===r)return!0;return!1}static forEach(e,r){for(let n of e)r(n)}static*map(e,r){let n=0;for(let i of e)yield r(i,n++)}static*take(e,r){let n=0;for(let i of e){if(n++>=r)return;yield i}}static filter(e,r){let n=[];for(let i of e)r(i)&&n.push(i);return n}static filterMap(e,r){let n=[];for(let i of e){let a=r(i);W(a)&&n.push(a)}return n}static reverse(e){let r=[];for(let n of e)r.push(n);return r.reverse()}static*pairWise(e){let r=e[Symbol.iterator](),{done:n,value:i}=r.next(),a=i;if(n!==!0)for(;;){let{done:o,value:s}=r.next();if(o===!0){yield[a,null];return}yield[a,s],a=s}}};var Xt=class t{static create(e=1024){return this.use(new ArrayBuffer(e))}static use(e,r=0){return new t(new DataView(e,r))}littleEndian=!1;#e;#t=0;constructor(e){this.#e=e}get remaining(){return this.#e.byteLength-this.#t}get position(){return this.#t}set position(e){e<0?V(`position(${e}) cannot be negative.`):e>this.#e.byteLength?V(`position(${e}) is outside range (${this.#e.byteLength}).`):this.#t=e}writeBoolean(e){this.writeByte(e?1:0)}writeByte(e){this.#r(1),this.#e.setInt8(this.#t++,e)}writeShort(e){this.#r(Int16Array.BYTES_PER_ELEMENT),this.#e.setInt16(this.#t,e,this.littleEndian),this.#t+=Int16Array.BYTES_PER_ELEMENT}writeInt(e){this.#r(Int32Array.BYTES_PER_ELEMENT),this.#e.setInt32(this.#t,e,this.littleEndian),this.#t+=Int32Array.BYTES_PER_ELEMENT}writeLong(e){this.#r(BigInt64Array.BYTES_PER_ELEMENT),this.#e.setBigInt64(this.#t,e,this.littleEndian),this.#t+=BigInt64Array.BYTES_PER_ELEMENT}writeFloat(e){this.#r(Float32Array.BYTES_PER_ELEMENT),this.#e.setFloat32(this.#t,e,this.littleEndian),this.#t+=Float32Array.BYTES_PER_ELEMENT}writeDouble(e){this.#r(Float64Array.BYTES_PER_ELEMENT),this.#e.setFloat64(this.#t,e,this.littleEndian),this.#t+=Float64Array.BYTES_PER_ELEMENT}writeBytes(e){this.#r(e.length);for(let r=0;r<e.length;++r)this.#e.setInt8(this.#t++,e[r])}writeString(e){let r=e.length;this.#r(Int32Array.BYTES_PER_ELEMENT+r*Int16Array.BYTES_PER_ELEMENT),this.writeInt(r);for(let n=0;n<r;n++)this.writeShort(e.charCodeAt(n))}toArrayBuffer(){return this.#e.buffer.slice(0,this.#t)}#r(e){let r=this.#e.byteLength;if(this.#t+e>r){let n=this.#e;this.#e=new DataView(new ArrayBuffer(ah(r+e)));for(let i=0;i<this.#t;i++)this.#e.setInt8(i,n.getInt8(i))}}},nu=class{#e=0;writeByte(e){this.#e++}writeShort(e){this.#e+=2}writeInt(e){this.#e+=4}writeLong(e){this.#e+=8}writeFloat(e){this.#e+=4}writeDouble(e){this.#e+=8}writeBoolean(e){this.#e++}writeBytes(e){this.#e+=e.length}writeString(e){this.#e+=e.length+4}get count(){return this.#e}},sh=class{#e;#t=0;constructor(e=32){this.#e=new Int8Array(e)}result(){return this.#e}equals(e){return e===this?!0:this.#e.every((r,n)=>e.#e[n]===r)}writeBoolean(e){this.writeByte(e?31:11)}writeShort(e){this.writeByte(e&255),this.writeByte(e>>>8&255)}writeByte(e){this.#t>=this.#e.length&&(this.#t=0),this.#e[this.#t++]^=e}writeInt(e){this.writeByte(e&255),this.writeByte(e>>>8&255),this.writeByte(e>>>16&255),this.writeByte(e>>>24&255)}writeBytes(e){e.forEach(r=>this.writeByte(r))}writeFloat(e){this.writeInt(Ca.floatToIntBits(e))}writeDouble(e){this.writeLong(oh.float64ToLongBits(e))}writeLong(e){this.writeByte(Number(e)&255),this.writeByte(Number(e>>8n)&255),this.writeByte(Number(e>>16n)&255),this.writeByte(Number(e>>24n)&255),this.writeByte(Number(e>>32n)&255),this.writeByte(Number(e>>40n)&255),this.writeByte(Number(e>>48n)&255),this.writeByte(Number(e>>56n)&255)}writeString(e){for(let r=0;r<e.length;r++)this.writeShort(e.charCodeAt(r))}toHexString(){return Array.from(Jt.map(this.#e.values(),e=>(e&255).toString(16).padStart(2,"0"))).join("")}},rt=class{littleEndian=!1;#e;#t=0;constructor(e,r=0){this.#e=new DataView(e,r)}get position(){return this.#t}set position(e){e<0?V(`position(${e}) cannot be negative.`):e>this.#e.byteLength?V(`position(${e}) is outside range (${this.#e.byteLength}).`):this.#t=e}readByte(){return this.#e.getInt8(this.#t++)}readShort(){let e=this.#e.getInt16(this.#t,this.littleEndian);return this.#t+=Int16Array.BYTES_PER_ELEMENT,e}readInt(){let e=this.#e.getInt32(this.#t,this.littleEndian);return this.#t+=Int32Array.BYTES_PER_ELEMENT,e}readLong(){let e=this.#e.getBigInt64(this.#t,this.littleEndian);return this.#t+=BigInt64Array.BYTES_PER_ELEMENT,e}readFloat(){let e=this.#e.getFloat32(this.#t,this.littleEndian);return this.#t+=Float32Array.BYTES_PER_ELEMENT,e}readDouble(){let e=this.#e.getFloat64(this.#t,this.littleEndian);return this.#t+=Float64Array.BYTES_PER_ELEMENT,e}readBoolean(){return this.readByte()===1}readBytes(e){for(let r=0;r<e.length;r++)e[r]=this.readByte()}readString(){let e=this.readInt(),r="";for(let n=0;n<e;n++)r+=String.fromCharCode(this.readShort());return r}available(e){return this.#t+e<=this.#e.byteLength}remaining(){return this.#e.byteLength-this.#t}skip(e){this.position+=e}};var aB=t=>W(t)?t.value!==void 0?"value":t.get!==void 0?"get":V(`Cannot resolve method key of ${t}`):V("Cannot resolve method key of undefined descriptor"),au=(t,e,r)=>{if(!W(r))return function(a,o){if(o&&o.kind==="getter")return function(){let s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this),e);if(!W(s?.get))return V(`Cannot find getter for property '${e}'`);let u=s.get.apply(this);return Object.defineProperty(this,e,{value:u,configurable:!1,writable:!1,enumerable:!1}),u}};let n=aB(r),i=Ce(r[n]);return{[n]:function(...a){if(a.length>0)return V("lazy accessory must not have any construction parameters");let o=i.apply(this);return Object.defineProperty(this,e,{value:n==="get"?o:()=>o,configurable:!1,writable:!1,enumerable:!1}),o}}};var za;(function(t){function*e(){}t.empty=e;function*r(...n){for(let i of n)for(let a of i)yield a}t.flatten=r})(za||(za={}));var Yt=class{#e=new Set;#t;constructor(){this.#t=new Proxy({},{get:(e,r)=>(...n)=>this.#e.forEach(i=>Object.getPrototypeOf(i)===Object.getPrototypeOf({})?P(i[r],...n):i[r]?.apply(i,n))})}get proxy(){return this.#t}get size(){return this.#e.size}subscribe(e){return this.#e.add(e),{terminate:()=>this.#e.delete(e)}}forEach(e){this.#e.forEach(e)}terminate(){this.#e.clear()}};var jd=class{static createIfAbsent(e,r,n){let i=e.get(r);return i===void 0&&(i=n(r),e.set(r,i)),i}};var Kd=class t{static#e=Object.freeze(new Set);static empty=()=>t.#e};var lh=class t{map;constructor(e){this.map=new Map(e?.map(r=>{let n=r[0],i=r[1];return[n,new Set(i)]}))}clear(){this.map.clear()}containsEntry(e,r){return Jt.some(this.map.entries(),n=>e===n[0]&&n[1].has(r))}containsKey(e){return Jt.includes(this.map.keys(),e)}containsValue(e){return Jt.some(this.map.values(),r=>r.has(e))}get(e){return this.map.get(e)??Kd.empty()}isEmpty(){return this.keyCount()===0}add(e,r){jd.createIfAbsent(this.map,e,()=>new Set).add(r)}addAll(e,r){let n=jd.createIfAbsent(this.map,e,()=>new Set);for(let i of r)n.add(i)}remove(e,r){let n=this.map.get(e);return n===void 0?!1:n.delete(r)?(n.size===0&&this.map.delete(e),!0):!1}removeValueIf(e){let r=new Set;for(let[n,i]of this.map.entries()){for(let a of i)e(a)&&(i.delete(a),r.add(a));i.size===0&&this.map.delete(n)}return r}removeFromKeyIf(e,r){let n=this.map.get(e);if(n===void 0)return null;for(let i of n)if(r(i))return n.delete(i),n.size===0&&this.map.delete(e),i;return null}removeKey(e){let r=this.map.get(e);return this.map.delete(e),r??Kd.empty()}forEach(e){Jt.forEach(this.map.entries(),r=>e(r[0],r[1]))}keyCount(){return this.map.size}keys(){return this.map.keys()}sortKeys(e){let r=this.clone(),n=Array.from(this.keys()).sort(e);this.map.clear();for(let i of n)this.addAll(i,r.get(i));return this}clone(){let e=new t;return this.map.forEach((r,n)=>{e.map.set(n,new Set(Array.from(r)))}),e}};var pe=Object.freeze({Empty:{terminate:Vd},create:t=>({terminate:t}),many:(...t)=>({terminate:()=>{for(;t.length>0;)t.pop().terminate()}})}),Y=class t{#e=[];isEmpty(){return this.#e.length===0}nonEmpty(){return this.#e.length>0}own(e){return this.#e.push(e),e}ownAll(...e){for(let r of e)this.#e.push(r)}spawn(){let e=new t;return e.own({terminate:()=>ue.removeOpt(this.#e,e)}),this.own(e)}terminate(){for(;this.#e.length>0;)this.#e.pop().terminate()}};var fe=class{static subscribeMany(e,...r){return pe.many(...r.map(n=>n.subscribe(()=>e(n))))}#e=new Set;subscribe(e){return this.#e.add(e),{terminate:()=>this.#e.delete(e)}}isEmpty(){return this.#e.size===0}notify(e){this.#e.forEach(r=>r(e))}observers(){return this.#e}terminate(){this.#e.clear()}};var uh;(function(t){let e=Object.freeze({});t.empty=()=>e,t.mergeNoOverlap=(r,n)=>{let i=new Set(Object.keys(r));for(let a of Object.keys(n))if(i.has(a))return V(`'${a}' is an overlapping key`);return{...r,...n}},t.include=(r,...n)=>{let i={};for(let a of n)i[a]=r[a];return i},t.exclude=(r,...n)=>{let i=new Set(n);return Object.entries(r).reduce((a,[o,s])=>(i.has(o)||(a[o]=s),a),{})},t.overwrite=(r,n)=>Object.assign(r,n),t.entries=r=>Object.entries(r)})(uh||(uh={}));var $S;(function(t){t.seal=e=>new class{getValue(){return e}subscribe(r){return pe.Empty}catchupAndSubscribe(r){return r(this),pe.Empty}}})($S||($S={}));var kS;(function(t){t.False=new class{getValue(){return!1}setValue(e){}subscribe(e){return pe.Empty}catchupAndSubscribe(e){return e(this),pe.Empty}},t.inverseBoolean=e=>new class{getValue(){return!e.getValue()}setValue(r){e.setValue(!r)}subscribe(r){return e.subscribe(r)}catchupAndSubscribe(r){return r(this),this.subscribe(r)}}})(kS||(kS={}));var wr=class{#e;#t=b.None;constructor(e){this.#e=new fe,this.wrap(e)}wrap(e){this.wrapOption(b.wrap(e))}wrapOption(e){this.#t.equals(e)||(this.#t=e,this.#e.notify(this))}clear(e){this.#t.isEmpty()||(W(e)&&e(this.#t.unwrap()),this.#t=b.None,this.#e.notify(this))}assert(e){return this.#t.assert(e),this}contains(e){return this.#t.contains(e)}equals(e){return this.#t.equals(e)}flatMap(e){return this.#t.flatMap(e)}ifSome(e){return this.#t.ifSome(e)}ifAbsent(e){return this.#t.ifAbsent(e)}isEmpty(){return this.#t.isEmpty()}map(e){return this.#t.map(e)}mapOr(e,r){return this.#t.mapOr(e,r)}match(e){return this.#t.match(e)}nonEmpty(){return this.#t.nonEmpty()}unwrap(e){return this.#t.unwrap(e)}unwrapOrElse(e){return this.#t.unwrapOrElse(e)}unwrapOrNull(){return this.#t.unwrapOrNull()}unwrapOrUndefined(){return this.#t.unwrapOrUndefined()}subscribe(e){return this.#e.subscribe(()=>e(this))}catchupAndSubscribe(e){return e(this),this.#e.subscribe(()=>e(this))}terminate(){this.#e.terminate()}};var Ki=class{#e;#t=b.None;#r;constructor(e,r){this.#e=new fe,this.#r=r?.guard(e)??e,this.#t=b.wrap(r)}setValue(e){this.#t.nonEmpty()&&(e=this.#t.unwrap().guard(e)),this.#r!==e&&(this.#r=e,this.#e.notify(this))}getValue(){return this.#r}subscribe(e){return this.#e.subscribe(e)}catchupAndSubscribe(e){return e(this),this.#e.subscribe(e)}terminate(){this.#e.terminate()}toString(){return`{DefaultObservableValue value: ${this.#r}`}};var vb=class{#e;#t;constructor(e,r){te(e<r,"Linear is inverse"),this.#e=e,this.#t=r}x(e){return e<=this.#e?0:e>=this.#t?1:(e-this.#e)/(this.#t-this.#e)}y(e){return e<=0?this.#e:e>=1?this.#t:this.#e+e*(this.#t-this.#e)}clamp(e){return at(e,this.#e,this.#t)}floating(){return!0}},xb=class{#e;#t;#r;constructor(e,r){this.#e=at(Math.round(e),yr.MIN_VALUE,yr.MAX_VALUE),this.#t=at(Math.round(r),yr.MIN_VALUE,yr.MAX_VALUE),this.#r=this.#t-this.#e}x(e){return(this.clamp(e)-this.#e)/this.#r}y(e){return this.#e+Math.round(at(e,0,1)*this.#r)}clamp(e){return at(Math.round(e),this.#e,this.#t)}floating(){return!1}},yb=class{#e;#t;constructor(e,r){te(e<r,"Exponential is inverse"),this.#e=e,this.#t=r}x(e){return e<=this.#e?0:e>=this.#t?1:Math.log(e/this.#e)/Math.log(this.#t/this.#e)}y(e){return e<=0?this.#e:e>=1?this.#t:Math.exp(e*Math.log(this.#t/this.#e))*this.#e}clamp(e){return Math.min(this.#t,Math.max(this.#e,e))}floating(){return!0}},ch=class{#e;#t;#r;#i;constructor(e,r,n){te(r!==n,"Power min === max"),this.#e=e,this.#t=r,this.#r=n,this.#i=n-r}x(e){return e<=this.#t?0:e>=this.#r?1:Math.pow((e-this.#t)/this.#i,1/this.#e)}y(e){return e<=0?this.#t:e>=1?this.#r:this.#t+Math.pow(e,this.#e)*this.#i}clamp(e){return Math.min(this.#r,Math.max(this.#t,e))}floating(){return!0}},wb=class{#e;constructor(e){this.#e=e}x(e){let r=this.#e.findIndex(n=>n===e);return r===-1?V(`Could not find index for ${e}`):r/(this.#e.length-1)}y(e){let r=Math.round(at(e,0,1)*(this.#e.length-1));return r>-1?Ce(this.#e.at(r),`Could not find value for ${e}`):V(`Index ${r} is out of box.`)}clamp(e){return e}floating(){return!1}},bb=class{#e;#t;#r;#i;#n;constructor(e,r,n){this.#e=e,this.#t=n;let i=e*e,a=n*n,o=r*r,s=e+n-2*r,u=n-r;this.#r=((2*n-r)*e-r*n)/s,this.#i=(u*i+(o-a)*e+r*a-o*n)/(i+(2*n-4*r)*e+a-4*r*n+4*o),this.#n=-u/s}y(e){return e<=0?Number.NEGATIVE_INFINITY:e>=1?this.#t:this.#r-this.#i/(e+this.#n)}x(e){return this.#e>=e?0:this.#t<=e?1:-this.#i/(e-this.#r)-this.#n}clamp(e){return Math.min(this.#t,e)}floating(){return!0}},S;(function(t){t.linear=(a,o)=>new vb(a,o),t.linearInteger=(a,o)=>new xb(a,o),t.exponential=(a,o)=>new yb(a,o),t.power=(a,o,s)=>new ch(a,o,s),t.powerByCenter=(a,o,s)=>{let u=Math.log((s-o)/(a-o))/Math.log(2);if(Number.isNaN(u))throw new Error(`powerByCenter: invalid center=${a}, min=${o}, max=${s}`);return new ch(u,o,s)},t.values=a=>new wb(a),t.decibel=(a,o,s)=>new bb(a,o,s);let e=new class{x(a){return a?1:0}y(a){return a>=.5}clamp(a){return a}floating(){return!1}},r=t.linear(0,1),n=t.linear(-1,1);t.bool=e;let i=t.decibel(-72,-12,0);t.unipolar=()=>r,t.bipolar=()=>n,t.DefaultDecibel=i})(S||(S={}));var $;(function(t){t.percent=({bipolar:a,fractionDigits:o}={})=>new e("%",o,!1,a),t.numeric=({unit:a,fractionDigits:o,unitPrefix:s,bipolar:u}={})=>new e(a,o,s,u),t.indices=(a,o)=>new class{x(s){return{unit:a,value:o[s]}}y(s){let u=o.indexOf(s);return u===-1?{type:"unknown",value:"\u{1F4A3}"}:{type:"explicit",value:u}}},t.values=(a,o,s)=>new class{x(u){return{unit:a,value:s.at(o.indexOf(u))??"N/A"}}y(u){let d=s.indexOf(u);return d===-1?{type:"unknown",value:"\u{1F4A3}"}:{type:"explicit",value:o[d]}}},t.bool=new class{y(a){switch(a.trim()){case"on":case"yes":case"true":return{type:"explicit",value:!0};default:return{type:"explicit",value:!1}}}x(a){return{value:a?"On":"Off",unit:""}}},t.boolValues=(a,o)=>new class{y(s){switch(s.trim()){case o:case"on":case"yes":case"true":return{type:"explicit",value:!0};case a:default:return{type:"explicit",value:!1}}}x(s){return{value:s?"On":"Off",unit:""}}};class e{#e;#t;#r;#i;constructor(o,s,u,d){this.#e=o??"",this.#t=s??0,this.#r=u??!1,this.#i=d??!1}y(o){let s=o.trim();this.#e.length>0&&this.#e!=="%"&&s.endsWith(this.#e)&&(s=s.slice(0,-this.#e.length).trim());let u=parseFloat(s);if(isNaN(u))return{type:"unknown",value:o.trim()};if(this.#e==="%")return{type:"explicit",value:u/100};if(s.endsWith("%"))return{type:"unitValue",value:this.#i?at(u/200+.5,0,1):at(u/100,0,1)};{let m=/(\d+)(\D+)/.exec(s)?.at(2)?.at(0);if(W(m)){let x=r.indexOf(m);if(x>-1)return{type:"explicit",value:u*Math.pow(10,(x-4)*3)}}return{type:"explicit",value:u}}}x(o){if(Number.isNaN(o))return{value:"\u{1F4A3}",unit:this.#e};if(Number.isFinite(o)){if(this.#e==="%")return this.#i?{value:(o*200-100).toFixed(this.#t),unit:this.#e}:{value:(o*100).toFixed(this.#t),unit:this.#e};if(this.#r){let{value:s,prefix:u}=i(o);return{value:s.toFixed(this.#t),unit:`${u}${this.#e}`}}else return{value:o.toFixed(this.#t),unit:this.#e}}else return{value:o===Number.POSITIVE_INFINITY?"\u221E":"-\u221E",unit:this.#e}}}let r=Object.freeze(["p","n","\u03BC","m","","k","M","G","T"]),n=a=>Math.log(a)/Math.log(9.999999999999998),i=a=>{let o=Math.floor(n(a)/3),s=r[o+4];return W(s)?{value:a*Math.pow(10,o*-3),prefix:s}:{value:a,prefix:""}};t.decible=t.numeric({unit:"db",fractionDigits:2}),t.panning=t.percent({unit:"%",fractionDigits:0})})($||($={}));var ou;(function(t){t.alwaysTrue=()=>!0,t.alwaysFalse=()=>!1,t.definedPredicate=e=>e!=null})(ou||(ou={}));var dh;(function(t){t.create=(e=252854082)=>new _b(e),t.monotoneAscending=(e,r=128,n=t.create())=>{let i=e.length;if(i<2)return V("Array must have at least 2 elements");let a=0;for(let s=1;s<i;s++){let u=Math.floor(n.uniform()*(1+r))+1;e[s]=u,a+=u}let o=0;e[0]=0;for(let s=1;s<i;s++)o+=e[s],e[s]=o/a;return e}})(dh||(dh={}));var _b=class{#e=0;constructor(e){this.setSeed(e)}setSeed(e){this.#e=e&4294967295}nextDouble(e,r){return e+this.uniform()*(r-e)}nextInt(e,r){return e+Math.floor(this.uniform()*(r-e))}nextElement(e){return e[Math.floor(this.uniform()*e.length)]}nextBoolean(){return this.uniform()<.5}uniform(){let e=this.#e+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}};var bi;(function(t){class e{}t.createBuilder=n=>{let i=a=>{let o=a instanceof Array?[]:{};return Object.entries(a).forEach(([s,u])=>{u instanceof e?o[s]=u.initialValue():typeof u=="object"&&(o[s]=i(u))}),o};return()=>new r(n,Object.seal(i(n)))},t.bool=new class extends e{read(n){return n.readByte()===1}write(n,i){n.writeByte(i?1:0)}initialValue(){return!1}},t.int8=new class extends e{read(n){return n.readByte()}write(n,i){n.writeByte(i)}initialValue(){return 0}},t.int16=new class extends e{read(n){return n.readShort()}write(n,i){n.writeShort(i)}initialValue(){return 0}},t.int32=new class extends e{read(n){return n.readInt()}write(n,i){n.writeInt(i)}initialValue(){return 0}},t.float=new class extends e{read(n){return n.readFloat()}write(n,i){n.writeFloat(i)}initialValue(){return 0}},t.double=new class extends e{read(n){return n.readDouble()}write(n,i){n.writeDouble(i)}initialValue(){return 0}},t.int64=new class extends e{read(n){return n.readLong()}write(n,i){n.writeLong(i)}initialValue(){return 0n}},t.floats=n=>new class extends e{read(i,a){for(let o=0;o<a.length;o++)a[o]=i.readFloat();return a}write(i,a){for(let o=0;o<a.length;o++)i.writeFloat(a[o])}initialValue(){return new Float32Array(n)}},t.doubles=n=>new class extends e{read(i,a){for(let o=0;o<a.length;o++)a[o]=i.readDouble();return a}write(i,a){for(let o=0;o<a.length;o++)i.writeDouble(a[o])}initialValue(){return new Float64Array(n)}};class r{#e;#t;#r;constructor(i,a){this.#e=i,this.#t=a,this.#r=this.#i()}get object(){return this.#t}get bytesTotal(){return this.#r}read(i){let a=(o,s)=>{Object.entries(o).forEach(([u,d])=>{let m=s;d instanceof e?m[u]=d.read(i,m[u]):typeof d=="object"&&a(d,m[u])})};a(this.#e,this.#t)}write(i){let a=(o,s)=>{Object.entries(o).forEach(([u,d])=>{let m=s;d instanceof e?d.write(i,m[u]):typeof d=="object"&&a(d,m[u])})};a(this.#e,this.#t)}#i(){let i=new nu;return this.write(i),i.count}}})(bi||(bi={}));var su=class{#e;#t;#r;constructor(e,r){this.#e=e,this.#t=r,this.#r=[]}add(e,r=!1){let n=this.#e(e),i=mt.leftMostMapped(this.#r,n,this.#t,this.#e),a=this.#r[i];return W(a)&&this.#t(this.#e(a),n)===0?r?(this.#r.splice(i,1,e),!0):!1:(this.#r.splice(i,0,e),!0)}getOrCreate(e,r){let n=mt.leftMostMapped(this.#r,e,this.#t,this.#e),i=this.#r[n];if(W(i)&&this.#t(this.#e(i),e)===0)return i;let a=r(e);return this.#r.splice(n,0,a),a}addMany(e){for(let r of e)this.#r.push(r);try{return this.#r.sort((r,n)=>{let i=this.#t(this.#e(r),this.#e(n));if(i===0)throw"cancel";return i}),!0}catch(r){if(r==="cancel"){let n=new Map(this.entries());return this.#r.splice(0,this.#r.length,...n.values()),this.#r.sort((i,a)=>this.#t(this.#e(i),this.#e(a))),!1}return V(r)}}removeByValue(e){return this.removeByKey(this.#e(e))}removeByKey(e){let r=mt.leftMostMapped(this.#r,e,this.#t,this.#e),n=this.#r[r];return W(n)&&this.#t(this.#e(n),e)===0?(this.#r.splice(r,1),n):V(`Could not remove ${e}`)}removeByKeyIfExist(e){let r=mt.leftMostMapped(this.#r,e,this.#t,this.#e),n=this.#r[r];return W(n)&&this.#t(this.#e(n),e)===0?(this.#r.splice(r,1),n):null}removeRange(e,r){this.#r.splice(e,(r??this.#r.length)-e)}removeByPredicate(e){let r=0,n=this.#r.length;for(;--n>=0;)e(this.#r[n])&&(this.#r.splice(n,1),r++);return r}get(e,r){return Ce(this.#i(e),r??`Unknown key: ${e}`)}getOrThrow(e,r){let n=this.#i(e);if(W(n))return n;throw r()}opt(e){return b.wrap(this.#i(e))}getOrNull(e){return this.#i(e)??null}getByIndex(e){return this.#r[e]}hasKey(e){return W(this.#i(e))}hasValue(e){return W(this.#i(this.#e(e)))}size(){return this.#r.length}isEmpty(){return this.#r.length===0}forEach(e){this.values().forEach(e)}values(){return this.#r}entries(){return this.#r.map(e=>[this.#e(e),e])}clear(){ue.clear(this.#r)}[Symbol.iterator](){return this.#r.values()}#i(e){let r=mt.leftMostMapped(this.#r,e,this.#t,this.#e),n=this.#r[r];return W(n)&&this.#t(this.#e(n),e)===0?n:void 0}};var lu=(()=>{let t=b.None;return{info:e=>t.match({none:()=>Promise.resolve(),some:r=>r.info(e)}),approve:e=>t.match({none:()=>Promise.resolve(!0),some:r=>r.approve(e)}),progress:e=>t.match({none:()=>({message:"",terminate:Vd}),some:r=>r.progress(e)}),notify:e=>t.match({none:Vd,some:r=>r.notify(e)}),install:e=>{te(t.isEmpty(),"RuntimeNotification already installed"),t=b.wrap(e)}}})();var Wd=class t{static createEstimator=()=>{let e=performance.now(),r=t.millis(Number.POSITIVE_INFINITY),n=0;return i=>{if(i===0)return t.POSITIVE_INFINITY;if(i>=1)return t.millis(0);let a=performance.now()-e;return a>n*1e3&&(r=t.millis(a/i-a),n++),r}};static POSITIVE_INFINITY=new t(Number.POSITIVE_INFINITY);static millis=e=>new t(e);static seconds=e=>new t(e*t.#e);static minutes=e=>new t(e*t.#t);static hours=e=>new t(e*t.#r);static days=e=>new t(e*t.#i);static toHHMMSS=e=>((e/3600|0)+100).toString().slice(1)+":"+((e/60|0)%60+100).toString().slice(1)+":"+(e%60+100).toString().slice(1);static#e=1e3;static#t=6e4;static#r=36e5;static#i=864e5;#n;constructor(e){this.#n=e}millis(){return this.#n}absSeconds(){return Math.abs(this.#n)/t.#e}absMinutes(){return Math.abs(this.#n)/t.#t}absHours(){return Math.abs(this.#n)/t.#r}absDays(){return Math.abs(this.#n)/t.#i}split(){return{d:Math.floor(this.absDays()),h:Math.floor(this.absHours())%24,m:Math.floor(this.absMinutes())%60,s:Math.floor(this.absSeconds())%60}}isNow(){return this.#n===0}isPast(){return this.#n<0}isFuture(){return this.#n>0}toUnitString(){let e,r,n=Math.floor(Math.abs(this.#n)/1e3),i=Math.floor(n/60),a=Math.floor(i/60),o=Math.floor(a/24);return n<60?(e=n,r="second"):i<60?(e=i,r="minute"):a<24?(e=a,r="hour"):(e=o,r="day"),new Intl.RelativeTimeFormat("en",{numeric:"auto",style:"long"}).format(e*Math.sign(this.#n),r)}toString(){if(isNaN(this.#n))return"NaN";if(!isFinite(this.#n))return"\u221E";let{d:e,h:r,m:n,s:i}=this.split();return e>0?[t.#a("d",e),t.#a("h",r),t.#a("m",n),t.#a("s",i)].join(", "):r>0?[t.#a("h",r),t.#a("m",n),t.#a("s",i)].join(", "):n>0?[t.#a("m",n),t.#a("s",i)].join(", "):i>0?t.#a("s",i):"now"}static#a=(e,r)=>{switch(e){case"d":return`${r} ${r<2?"day":"days"}`;case"h":return`${r} ${r<2?"hour":"hours"}`;case"m":return`${r} ${r<2?"minute":"minutes"}`;case"s":return`${r} ${r<2?"second":"seconds"}`;default:return ih(e)}}};var ph;(function(t){let e;(function(r){r[r.READING=0]="READING",r[r.READ=1]="READ",r[r.WRITING=2]="WRITING",r[r.WRITTEN=3]="WRITTEN"})(e||(e={})),t.writer=(r,n,i)=>{if(r.bytesTotal+1>n.byteLength)return V("Insufficient memory allocated.");let a=new Uint8Array(n),o=Xt.use(n,1);return Atomics.store(a,0,e.READ),{tryWrite:()=>Atomics.compareExchange(a,0,e.READ,e.WRITING)===e.WRITING?(i(r.object),o.position=0,r.write(o),Atomics.store(a,0,e.WRITTEN),!0):!1}},t.reader=(r,n)=>{let i=new SharedArrayBuffer(r.bytesTotal+1),a=new Uint8Array(i),o=new rt(i,1);return{buffer:i,tryRead:()=>Atomics.compareExchange(a,0,e.WRITTEN,e.READING)===e.READING?(o.position=0,r.read(o),n(r.object),Atomics.store(a,0,e.READ),!0):!1}}})(ph||(ph={}));var M;(function(t){t.length=16,t.generate=()=>r(crypto.getRandomValues(new Uint8Array(t.length))),t.sha256=async n=>{let i=typeof process<"u"&&process.env?.VITEST==="true";return crypto.subtle.digest("SHA-256",i?new Uint8Array(n.slice(0)):n).then(a=>r(new Uint8Array(a.slice(0,t.length))))},t.validateBytes=n=>t.parse(t.toString(n)),t.validateString=n=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n),t.asString=n=>t.validateString(n)?n:V(`Invalid UUID format: ${n}`),t.fromDataInput=n=>{let i=new Uint8Array(t.length);return n.readBytes(new Int8Array(i.buffer)),i},t.toDataOutput=(n,i)=>n.writeBytes(new Int8Array(i.buffer));let e=ue.create(n=>(n+256).toString(16).substring(1),256);t.toString=n=>e[n[0]]+e[n[1]]+e[n[2]]+e[n[3]]+"-"+e[n[4]]+e[n[5]]+"-"+e[n[6]]+e[n[7]]+"-"+e[n[8]]+e[n[9]]+"-"+e[n[10]]+e[n[11]]+e[n[12]]+e[n[13]]+e[n[14]]+e[n[15]],t.parse=n=>{let i=n.replace(/-/g,"").toLowerCase();if(i.length!==32)return V(`Invalid UUID format (${n})`);let a=new Uint8Array(t.length);for(let o=0,s=0;o<32;o+=2,s++)a[s]=parseInt(i.slice(o,o+2),16);return a},t.Comparator=(n,i)=>{if(n.length!==t.length||i.length!==t.length)return V("Unexpected array length for uuid(v4)");for(let a=0;a<t.length;a++){let o=n[a]-i[a];if(o!==0)return o}return 0},t.equals=(n,i)=>t.Comparator(n,i)===0,t.newSet=n=>new su(n,t.Comparator),t.Lowest=t.parse("00000000-0000-4000-8000-000000000000"),t.Highest=t.parse("FFFFFFFF-FFFF-4FFF-BFFF-FFFFFFFFFFFF"),t.fromInt=n=>{let i=new Uint8Array(t.Lowest),a=new Uint8Array(new Uint32Array([n]).buffer);for(let o=0;o<4;o++)i[o]=a[o];return i},t.zType=n=>n.string().refine(i=>t.validateString(i),{message:"Invalid UUID format (Zod)"}).transform(i=>i);let r=n=>(te(n.length===t.length,"UUID must be 16 bytes long"),n[6]=n[6]&15|64,n[8]=n[8]&63|128,n)})(M||(M={}));var fh=class{#e=new Y;#t;#r;#i;constructor(e){this.#r=e,this.#t=this.#e.own(new fe),this.#i=this.#o(e,[])}get data(){return this.#r}get proxy(){return this.#i}subscribe(e,...r){let n=()=>r.reduce((i,a)=>i[a],this.#i);return this.#t.subscribe(i=>{this.#n(i,r)&&e(n())})}catchupAndSubscribe(e,...r){return e(r.reduce((i,a)=>i[a],this.#i)),this.subscribe(e,...r)}subscribeAll(e){return this.#t.subscribe(r=>e(r[0]))}createMutableObservableValue(...e){let r=this.#e.own(new Y),n=r.own(new fe),i=()=>e.slice(0,-1).reduce((s,u)=>s[u],this.#i),a=e[e.length-1],o={getValue:()=>e.reduce((s,u)=>s[u],this.#i),setValue:s=>i()[a]=s,subscribe:s=>n.subscribe(s),catchupAndSubscribe:s=>(s(o),n.subscribe(s)),terminate:()=>r.terminate()};return r.own(this.subscribe(()=>n.notify(o),...e)),o}update(e){let r=new Set;this.#a(this.#r,e,r);for(let n of r)this.#t.notify([n])}terminate(){this.#e.terminate(),this.#t.terminate()}#n=(e,r)=>{let n=Math.min(e.length,r.length);for(let i=0;i<n;i++)if(e[i]!==r[i])return!1;return!0};#a=(e,r,n,i)=>{for(let a of Object.keys(r)){let o=i??a,s=r[a],u=e[a];s!==null&&typeof s=="object"&&!Array.isArray(s)?this.#a(e[a],s,n,o):u!==s&&(e[a]=s,n.add(o))}};#o=(e,r)=>new Proxy(e,{get:(n,i)=>{let a=n[i];return a!==null&&typeof a=="object"&&!Array.isArray(a)?this.#o(a,[...r,i]):a},set:(n,i,a)=>(n[i]=a,this.#t.notify([...r,i]),!0),preventExtensions:()=>!1})};var mh=class t{static DEFAULT_SIZE=512;static DEFAULT_DECAY=.9;#e;#t;#r;#i;#n;#a;#o;#s;#c;#l=0;decay=!1;constructor({size:e,decay:r}={}){e??=t.DEFAULT_SIZE,this.#c=r??t.DEFAULT_DECAY,this.#e=e<<1,this.#r=new hh(this.#e),this.#i=new Float32Array(this.#e),this.#n=new Float32Array(this.#e),this.#a=Ld.create(Ld.Type.Blackman,this.#e),this.#t=e,this.#o=new Float32Array(e),this.#s=new Float32Array(e)}clear(){this.#o.fill(0),this.#i.fill(0),this.#s.fill(0),this.#l=0}reset(){this.#l=0}numBins(){return this.#t}bins(){return this.#o}waveform(){return this.#s}process(e,r,n,i){for(let a=n;a<i;++a)this.#i[this.#l]=e[a]+r[a],++this.#l===this.#e&&this.#u()}#u(){for(let r=0;r<this.#t;++r)this.#s[r]=this.#i[r<<1];for(let r=0;r<this.#e;++r)this.#i[r]*=this.#a[r];this.#r.process(this.#i,this.#n);let e=1/this.#t;for(let r=0;r<this.#t;++r){let n=this.#i[r],i=this.#n[r],a=Math.sqrt(n*n+i*i)*e;this.#o[r]<a?this.#o[r]=a:this.decay&&(this.#o[r]*=this.#c)}this.#l=0,this.#n.fill(0),this.decay=!1}};var Ab=(t,e)=>Math.floor(3840/e)*t,NS=(t,e=4,r=4)=>{let n=Ab(1,r),i=Math.floor(t/n),a=Math.floor(i/e),s=(Math.floor(t)-Ab(a*e,r))%n,u=Math.floor(s/240),d=s%240;return{bars:a,beats:i-a*e,semiquavers:u,ticks:d}},MS=(t,e)=>t*e/60*960,IS=(t,e)=>t*60/960/e,oB=(t,e)=>e*60/960/t,sB=(t,e,r)=>MS(t/r,e),lB=(t,e,r)=>IS(t,e)*r,Ne={Bar:3840,Quarter:960,SemiQuaver:240,fromSignature:Ab,toParts:NS,secondsToPulses:MS,pulsesToSeconds:IS,secondsToBpm:oB,samplesToPulses:sB,pulsesToSamples:lB,toString:(t,e=4,r=4)=>{let{bars:n,beats:i,semiquavers:a,ticks:o}=NS(t|0,e,r);return`${n+1}.${i+1}.${a+1}:${o}`}};var ta=128,gh=Ne.fromSignature(1,48);var Zd;(function(t){t.Comparator=(e,r)=>e.position-r.position,t.PositionExtractor=e=>e.position})(Zd||(Zd={}));var Gd;(function(t){t.complete=e=>e.position+e.duration,t.DescendingComparator=(e,r)=>t.complete(r)-t.complete(e)})(Gd||(Gd={}));var Oa;(function(t){t.globalToLocal=(r,n)=>Fs(n-r.position+r.loopOffset,r.loopDuration),t.locateLoop=({position:r,complete:n,loopOffset:i,loopDuration:a},o,s)=>{let u=r-i,d=u+a;if(u>=s||d<=o)return b.None;let m=Math.max(u,o),x=Math.min(d,s);return b.wrap({index:0,rawStart:u,rawEnd:d,regionStart:Math.max(u,r),regionEnd:Math.min(d,n),resultStart:m,resultEnd:x,resultStartValue:u<m?(m-u)/a:0,resultEndValue:d>x?(x-u)/a:1})};function*e({position:r,complete:n,loopOffset:i,loopDuration:a},o,s){let u=r-i,d=Math.max(r,o),m=Math.min(n,s),x=Math.floor((d-u)/a),h=u+x*a;for(;h<m;){let w=h+a,A=Math.max(h,r),_=Math.min(w,n),C=Math.max(h,d),K=Math.min(w,m),U=h<C?(C-h)/a:0,ee=w>K?(K-h)/a:1;yield{index:x++,rawStart:h,rawEnd:w,regionStart:A,regionEnd:_,resultStart:C,resultEnd:K,resultStartValue:U,resultEndValue:ee},h=w}}t.locateLoops=e})(Oa||(Oa={}));var ri=class t{static DefaultComparator=(e,r)=>e.position-r.position;static create(e){return new t(e??t.DefaultComparator)}#e;constructor(e){this.#e=new vh(e)}add(e){this.#e.add(e)}remove(e){return this.#e.remove(e)}contains(e){return this.#e.contains(e)}clear(){this.#e.clear()}optAt(e){return this.#e.optAt(e)}asArray(){return this.#e.asArray()}lowerEqual(e,r){return this.#e.lowerEqual(e,r)}greaterEqual(e,r){return this.#e.greaterEqual(e,r)}floorLastIndex(e){return this.#e.floorLastIndex(e)}ceilFirstIndex(e){return this.#e.ceilFirstIndex(e)}iterateFrom(e,r){return this.#e.isEmpty()?za.empty():this.#e.iterateFrom(e,r)}iterateRange(e,r,n){return this.#e.isEmpty()?za.empty():this.#e.iterate(this.#e.ceilFirstIndex(e),r,n)}first(){return this.#e.optAt(0)}last(){return this.#e.optAt(this.#e.length()-1)}length(){return this.#e.length()}isEmpty(){return this.#e.isEmpty()}onIndexingChanged(){this.#e.onIndexingChanged()}},go=class t{static Comparator=(e,r)=>e.position-r.position;static create(e){return new t(e)}#e;constructor(e=t.Comparator){this.#e=new vh(e)}add(e){this.#e.add(e)}remove(e){return this.#e.remove(e)}contains(e){return this.#e.contains(e)}clear(){this.#e.clear()}optAt(e){return this.#e.optAt(e)}asArray(){return this.#e.asArray()}lowerEqual(e,r){return this.#e.lowerEqual(e,r)}greaterEqual(e,r){return this.#e.greaterEqual(e,r)}floorLastIndex(e){return this.#e.floorLastIndex(e)}ceilFirstIndex(e){return this.#e.ceilFirstIndex(e)}iterateFrom(e,r){return this.#e.isEmpty()?za.empty():this.#e.iterateFrom(e,r)}iterateRange(e,r){if(this.#e.isEmpty())return za.empty();let n=Math.max(0,this.#e.floorLastIndex(e)),i=this.#e.optAt(n);if(i===null)return za.empty();for(;i.position+i.duration<=e;)if(i=this.#e.optAt(++n),i===null||i.position>=r)return za.empty();return this.#e.iterate(n,r)}length(){return this.#e.length()}isEmpty(){return this.#e.isEmpty()}onIndexingChanged(){this.#e.onIndexingChanged()}};var vh=class{comparator;#e=[];#t=!1;modCount=0;constructor(e){this.comparator=e}add(e){if(this.#e.includes(e))throw new Error(`Duplicate event added: ${e}`);++this.modCount,this.#e.push(e),this.#e.length>1&&(this.#t=!0)}remove(e){++this.modCount;let r=this.#e.indexOf(e);return r===-1?!1:(this.#e.splice(r,1),!0)}contains(e){if(this.#e.length===0)return!1;this.#t&&this.#r();let n=e.position,i=mt.leftMostMapped(this.#e,n,ho,Zd.PositionExtractor);for(let a=i;a<this.#e.length;a++){let o=this.#e[a];if(o===e)return!0;if(o.position!==n)return!1}return!1}clear(){++this.modCount,ue.clear(this.#e),this.#t=!1}optAt(e){return e<0||e>=this.#e.length?null:(this.#t&&this.#r(),this.#e[e])}asArray(){return this.#t&&this.#r(),this.#e}lowerEqual(e,r){if(r===void 0)return this.optAt(this.floorLastIndex(e));let n=this.floorLastIndex(e);for(;n>=0;){let i=this.#e[n--];if(r(i))return i}return null}greaterEqual(e,r){if(r===void 0)return this.optAt(this.ceilFirstIndex(e));let n=this.ceilFirstIndex(e);for(;n<this.#e.length;){let i=this.#e[n++];if(r(i))return i}return null}floorLastIndex(e){return this.#t&&this.#r(),mt.rightMostMapped(this.#e,e,ho,Zd.PositionExtractor)}ceilFirstIndex(e){return this.#t&&this.#r(),mt.leftMostMapped(this.#e,e,ho,Zd.PositionExtractor)}iterateFrom(e,r){let n=this.floorLastIndex(e),i=n;if(i<0)return this.iterate(0,yr.MAX_VALUE,r);for(;i>=0;){let a=this.optAt(i);if(a!==null&&r!==void 0&&r(a))return this.iterate(i,yr.MAX_VALUE,r);i--}return this.iterate(n,yr.MAX_VALUE,r)}length(){return this.#e.length}isEmpty(){return this.#e.length===0}onIndexingChanged(){this.#t=this.length()>1}*iterate(e,r,n=ou.alwaysTrue){for(this.#t&&this.#r();e<this.#e.length;){let i=this.#e[e++];if(i.position>=r)return;n(i)&&(yield i)}}#r(){this.#e.sort(this.comparator),this.#t=!1}};var xh;(function(t){t.hasFading=e=>e.in>0||e.out>0,t.gainAt=(e,r,n)=>{let{in:i,out:a,inSlope:o,outSlope:s}=n,u=1,d=1;i>0&&e<i&&(u=qt.normalizedAt(e/i,o));let m=r-a;if(a>0&&e>m){let x=(e-m)/a;d=1-qt.normalizedAt(x,s)}return Math.min(u,d)},t.fillGainBuffer=(e,r,n,i,a,o)=>{let{in:s,out:u,inSlope:d,outSlope:m}=o;if(e.fill(1,0,a),s<=0&&u<=0)return;let x=i-u;if(r>=s&&n<=x)return;let h=(n-r)/a;if(s>0&&r<s){let w=Math.min(n,s),A=Math.min(a,Math.ceil((w-r)/h));if(A>0){let _=r/s,C=w/s,K=qt.walk(d,A,_,C);for(let U=0;U<A;U++)e[U]=K.next().value}}if(u>0&&n>x){let w=Math.max(r,x),A=Math.max(0,Math.floor((w-r)/h)),_=a-A;if(_>0){let C=(w-x)/u,K=(n-x)/u,U=qt.walk(m,_,1-C,1-K);for(let ee=A;ee<a;ee++)e[ee]=Math.min(e[ee],U.next().value)}}}})(xh||(xh={}));var hh=class t{static reverse(e){return e=(e&1431655765)<<1|e>>>1&1431655765,e=(e&858993459)<<2|e>>>2&858993459,e=(e&252645135)<<4|e>>>4&252645135,e=e<<24|(e&65280)<<8|e>>>8&65280|e>>>24,e}#e;#t;#r;#i;constructor(e){this.#e=e;let r=e/2;this.#t=32-Math.floor(Math.log2(e))|0,this.#r=new Float32Array(r),this.#i=new Float32Array(r);for(let n=0;n<r;n++){let i=2*Math.PI*n/e;this.#r[n]=Math.cos(i),this.#i[n]=Math.sin(i)}}process(e,r){let n,i,a,o;for(let d=0;d<this.#e;++d)i=t.reverse(d)>>>this.#t,i>d&&(o=e[d],e[d]=e[i],e[i]=o,o=r[d],r[d]=r[i],r[i]=o);let s=this.#r,u=this.#i;for(let d=2;d<=this.#e;d<<=1){let m=d>>1,x=this.#e/d;for(n=0;n<this.#e;n+=d){let h=n+m;for(i=n,a=0;i<h;i++,a=a+x|0){let w=i+m|0,A=s[a],_=u[a],C=e[w],K=r[w],U=C*A+K*_,ee=K*A-C*_,re=e[i],me=r[i];e[w]=re-U,r[w]=me-ee,e[i]=re+U,r[i]=me+ee}}if(d===this.#e)break}}inverse(e,r){let n=this.#e;for(let a=0;a<n;a++)r[a]=-r[a];this.process(e,r);let i=1/n;for(let a=0;a<n;a++)e[a]*=i,r[a]=-r[a]*i}};var vo;(function(t){t.builder=()=>new e,t.toDouble=([r,n])=>r/n,t.toPPQN=([r,n])=>Ne.fromSignature(r,n);class e{#e=[];add(n){return this.#e.push(n),this}asArray(){return this.#e}asAscendingArray(){return this.#e.toSorted((n,i)=>t.toDouble(n)-t.toDouble(i))}asDescendingArray(){return this.#e.toSorted((n,i)=>t.toDouble(i)-t.toDouble(n))}}})(vo||(vo={}));var BS;(function(t){t.Identity={warp:e=>e,unwarp:e=>e}})(BS||(BS={}));var yh=class{#e;constructor(e){this.#e=e}warp(e){return this.#t(!0,e)}unwarp(e){return this.#t(!1,e)}#t(e,r){let n=this.#e.duration(),i=hb(r,n),a=(r-i)/n,o=e?this.#e.fx(a):this.#e.fy(a);return i+o*n}};var ra;(function(t){t[t.sine=0]="sine",t[t.triangle=1]="triangle",t[t.saw=2]="saw",t[t.square=3]="square"})(ra||(ra={}));var uu;(function(t){t.isOfType=e=>e.type==="note-event",t.Comparator=(e,r)=>{let n=e.position-r.position;if(n!==0)return n;let i=e.pitch-r.pitch;return i!==0?i:0},t.curveFunc=(e,r)=>r<0?e**2**-r:1-(1-e)**2**r,t.inverseCurveFunc=(e,r)=>r<0?e**2**r:1-Math.max(0,1-e)**2**-r,t.CompleteComparator=(e,r)=>{let n=Gd.complete(e)-Gd.complete(r);return n!==0?n:e.pitch-r.pitch}})(uu||(uu={}));var wh=class{#e;#t;#r;#i;constructor(e){this.#e=new Float32Array(e),this.#t=1/e,this.#r=0,this.#i=0}pushPop(e){let r=e*e;return this.#i-=this.#e[this.#r],this.#i+=r,this.#e[this.#r]=r,++this.#r===this.#e.length&&(this.#r=0),this.#i<=0?0:Math.sqrt(this.#i*this.#t)}processBlock(e,r,n){let i=this.#e,a=i.length,o=this.#r,s=this.#i;for(let u=r;u<n;u++){let d=e[u]*e[u];s+=d-i[o],i[o]=d,++o===a&&(o=0)}return this.#r=o,this.#i=s,s<=0?0:Math.sqrt(s*this.#t)}clear(){this.#e.fill(0),this.#i=0,this.#r=0}};var bh=class t{static#e=.003;static#t=.02;#r;#i;#n=0;constructor(e){this.#r=Math.pow(.01,1/(t.#e*e)),this.#i=Math.pow(.01,1/(t.#t*e))}clear(){this.#n=0}replace(e,r,n){let i=this.#r,a=this.#i,[o,s]=e.channels(),u=this.#n;for(let d=r;d<n;++d){let m=o[d],x=s[d],h=Math.max(Math.abs(m),Math.abs(x));if(u=h>u?i*(u-h)+h:a*(u-h)+h,u>1){let w=1/u;o[d]=m*w,s[d]=x*w}}this.#n=u}};var Kr;(function(t){t.Musical="musical",t.Seconds="seconds"})(Kr||(Kr={}));var Es;(function(t){function e(r,n,i){return new Fb(r,n,i)}t.aware=e})(Es||(Es={}));var Fb=class{#e;#t;#r;constructor(e,r,n){this.#r=n,this.#t=r,this.#e=e}toPPQN(e){let r=this.#r.getValue();if(this.getTimeBase()===Kr.Musical)return r;let n=this.#e.ppqnToSeconds(e),i=n+r;return this.#e.intervalToPPQN(n,i)}fromPPQN(e,r){if(this.getTimeBase()===Kr.Musical)this.#r.setValue(e);else{let n=this.#e.intervalToSeconds(r,r+e);this.#r.setValue(n)}}toSeconds(e){let r=this.#r.getValue();return this.getTimeBase()===Kr.Seconds?r:this.#e.intervalToSeconds(e,e+r)}toSamples(e,r){return this.toSeconds(e)*r}rawValue(){return this.#r.getValue()}getTimeBase(){return Ra(this.#t.getValue(),Kr)}};var TS=Ne.fromSignature(1,384);var ii={None:{type:"none"},Linear:{type:"linear"},Curve:t=>t===.5?ii.Linear:{type:"curve",slope:t}},_h;(function(t){t.Comparator=(i,a)=>{let o=i.position-a.position;if(o!==0)return o;let s=i.index-a.index;return s!==0?s:i===a?0:V(`${i} and ${a} are identical in terms of comparison`)};function*e(i,a,o){if(i.isEmpty())return Jt.empty();for(let s of i.iterateFrom(a))if(yield s,s.position>=o)return}t.iterateWindow=e,t.nextEvent=(i,a)=>{let o=i.asArray(),s=mt.rightMost(o,a,t.Comparator);return s===-1?null:o[s+1]??null},t.valueAt=(i,a,o)=>{if(i.isEmpty())return o;let s=i.iterateFrom(a),{done:u,value:d}=s.next();if(u)return o;if(d.position<=a){let{done:m,value:x}=s.next();if(m)return d.value;if(a<x.position)return n(d,x,a);if(d.interpolation===ii.None)return d.value}return d.value};function*r(i,a,o,s){if(i.isEmpty())return;let u=i.iterateFrom(a),{done:d,value:m}=u.next();if(d)return;let x=o/s,h=m;if(h.position>a){for(;a<h.position;)if(yield{position:a,value:h.value},a+=x,a>o)return;h.position<=o&&(yield h)}for(;a<=o;){let{done:w,value:A}=u.next();if(w)break;for(;a<A.position;){if(a>o)return;yield{position:a,value:n(h,A,a)},a+=x}A.position<o&&(h.interpolation===ii.None&&(yield{position:A.position,value:h.value}),yield A),h=A}for(;a<=o;)yield{position:a,value:h.value},a+=x}t.quantise=r;let n=({value:i,position:a,interpolation:o},s,u)=>o.type==="none"?i:o.type==="linear"?i+(u-a)/(s.position-a)*(s.value-i):o.type==="curve"?qt.valueAt({slope:o.slope,steps:s.position-a,y0:i,y1:s.value},u-a):V("Unknown interpolation")})(_h||(_h={}));var Ld;(function(t){let e;(function(r){r[r.Bartlett=0]="Bartlett",r[r.Blackman=1]="Blackman",r[r.BlackmanHarris=2]="BlackmanHarris",r[r.Hamming=3]="Hamming",r[r.Hanning=4]="Hanning"})(e=t.Type||(t.Type={})),t.create=(r,n)=>{let i=new Float32Array(n),a=Math.PI/(n-1);switch(r){case e.Bartlett:{let o=(n>>1)-1,s=0;for(;s<=o;++s)i[s]=2*s/(n-1);for(;s<n;++s)i[s]=2-2*s/(n-1);return i}case e.Blackman:{let o=2*a,s=4*a;for(let u=0;u<n;++u)i[u]=.42323-.49755*Math.cos(o*u)+.07922*Math.cos(s*u);return i}case e.BlackmanHarris:{let o=2*a,s=4*a,u=6*a;for(let d=0;d<n;++d)i[d]=.35875-.48829*Math.cos(o*d)+.14128*Math.cos(s*d)-.01168*Math.cos(u*d);return i}case e.Hamming:{let o=2*a;for(let s=0;s<n;++s)i[s]=.54-.46*Math.cos(o*s);return i}case e.Hanning:{let o=2*a;for(let s=0;s<n;++s)i[s]=.5-.5*Math.cos(o*s);return i}}}})(Ld||(Ld={}));var An;(function(t){class e{value;constructor(s){this.value=s}}t.Transfer=e,t.makeTransferable=o=>new e(o),t.sender=(o,s)=>s(new i(o)),t.executor=(o,s)=>new a(o,s);let r=o=>{let s=[];for(let u of o)u instanceof e?s.push(u.value):(u instanceof MessagePort||typeof ImageBitmap<"u"&&u instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&u instanceof OffscreenCanvas)&&s.push(u);return s},n=o=>o instanceof e?o.value:o;class i{#e;#t=new Map;#r;#i=0;constructor(s){this.#e=s,this.#r=s.subscribe(this.#n)}terminate(){this.#r.terminate()}dispatchAndForget=(s,...u)=>{let d=r(u);this.#e.send({type:"send",returnId:!1,func:s.name,args:Array.from(Jt.map(u,m=>({value:n(m)})))},d)};dispatchAndReturn=(s,...u)=>new Promise((d,m)=>{let x=Jt.reduce(u,(w,A,_)=>(typeof A=="function"&&w.push([_,A]),w),[]);this.#t.set(this.#i,{executorTuple:{resolve:d,reject:m},callbacks:new Map(x)});let h=r(u);this.#e.send({type:"send",returnId:this.#i,func:s.name,args:Array.from(Jt.map(u,(w,A)=>typeof w=="function"?{callback:A}:{value:n(w)}))},h),this.#i++});#n=s=>{let u=this.#t.get(s.returnId);W(u)?s.type==="resolve"?(u.executorTuple.resolve(s.resolve),this.#t.delete(s.returnId)):s.type==="reject"?(u.executorTuple.reject(s.reject),this.#t.delete(s.returnId)):s.type==="callback"&&u.callbacks?.get(s.funcAt).apply(this,s.args):V(`Promise has already been resolved. ${JSON.stringify(s)}`)}}class a{#e;#t;#r;constructor(s,u){this.#e=s,this.#t=u,this.#r=s.subscribe(this.#i)}terminate(){this.#r.terminate()}#i=s=>{te(s.type==="send",()=>"Message type must be 'send'");let u=Object.getPrototypeOf(this.#t)===Object.getPrototypeOf({})?this.#t:Object.getPrototypeOf(this.#t),d=Ce(u[s.func],`${s.func.toString()} does not exists on ${this.#t}`),m=s.returnId;if(m===!1)d.apply(this.#t,s.args.map(x=>"value"in x?x.value:V(`${s.func.toString()} has no promise.`)));else try{d.apply(this.#t,s.args.map(h=>"callback"in h?(...w)=>this.#o(m,h.callback,w):h.value)).then(h=>{try{this.#n(m,h)}catch(w){this.#a(m,w)}},h=>this.#a(m,h))}catch(x){this.#a(m,x)}};#n=(s,u)=>this.#e.send({type:"resolve",returnId:s,resolve:u});#a=(s,u)=>this.#e.send({type:"reject",returnId:s,reject:u});#o=(s,u,d)=>this.#e.send({type:"callback",returnId:s,funcAt:u,args:d})}t.Executor=a})(An||(An={}));var DS={for:t=>new Eb(t)},uB=[],Eb=class{#e;#t=new fe;constructor(e){if(this.#e=e,W(e.onmessage)||W(e.onmessageerror))throw console.error(e),new Error(`${e} is already wrapped.`);e.onmessage=r=>this.#t.notify(r.data),e.onmessageerror=r=>{throw new Error(r.type)}}send(e,r){this.#e.postMessage(e,r??uB)}channel(e){return new Sb(this,e)}subscribe(e){return this.#t.subscribe(e)}terminate(){this.#t.terminate(),this.#e.onmessage=null,this.#e.onmessageerror=null}},Sb=class t{#e;#t;#r=new fe;#i;constructor(e,r){this.#e=e,this.#t=r,this.#i=e.subscribe(n=>{"__id__"in n&&n.__id__==="42"&&"message"in n&&"channel"in n&&n.channel===r&&this.#r.notify(n.message)})}send(e,r){this.#e.send({__id__:"42",channel:this.#t,message:e},r)}channel(e){return new t(this,e)}subscribe(e){return this.#r.subscribe(e)}terminate(){this.#i.terminate(),this.#r.terminate()}};var Hd;(function(t){t.frame=()=>new Promise(e=>requestAnimationFrame(()=>e())),t.frames=e=>new Promise(r=>{let n=e,i=()=>{--n<=0?r():requestAnimationFrame(i)};requestAnimationFrame(i)}),t.timeSpan=(e,...r)=>new Promise(n=>setTimeout(n,e.millis(),...r)),t.event=(e,r)=>new Promise(n=>e.addEventListener(r,n,{once:!0})),t.observable=e=>new Promise(r=>{let n=e.subscribe(()=>{n.terminate(),r()})}),t.complete=e=>new Promise((r,n)=>{let i=setInterval(()=>{let{status:a,value:o,error:s}=Ct(()=>e.next());if(a==="success"){let{done:u,value:d}=o;u&&(clearInterval(i),r(d))}else clearInterval(i),n(s)},0)})})(Hd||(Hd={}));var Pb=class{maxRetry;timeSpan;#e=0;constructor(e,r){this.maxRetry=e,this.timeSpan=r}retry(e,r){return++this.#e===this.maxRetry?!1:(console.debug(`${e} > will retry in ${this.timeSpan.toString()}`),setTimeout(r,this.timeSpan.millis()),!0)}},Ah;(function(t){class e{value;status="resolved";constructor(s){this.value=s}error=Ud("Cannot access error when promise is resolved")}t.ResolveResult=e;class r{error;status="rejected";constructor(s){this.error=s}value=Ud("Cannot access value when promise is rejected")}t.RejectedResult=r,t.makeAbortable=async(o,s)=>{let u=!0;return o.own(pe.create(()=>u=!1)),new Promise((d,m)=>s.then(x=>{u&&d(x)},x=>{u&&m(x)}))},t.tryCatch=o=>o.then(s=>new e(s),s=>new r(s));let n=new Pb(3,Wd.seconds(3));t.retry=(o,s=n)=>o().catch(u=>new Promise((d,m)=>{let x=h=>{s.retry(h,()=>o().then(w=>d(w),x))||m(h)};x(u)})),t.guardedRetry=(o,s)=>{let u=async(d=0)=>{try{return await o()}catch(m){if(s(m,++d))return console.debug(`retry after failure (online: ${navigator.onLine}):`,m),await Hd.timeSpan(Wd.seconds(1)),u(d);throw new Error(`Failed after ${d} retries: ${m}`)}};return u()},t.approvedRetry=(o,s)=>{let u=async()=>{try{return await o()}catch(d){if(await lu.approve(s(d)))return u();throw d}};return u()},t.delay=(o,s)=>Promise.all([o,Hd.timeSpan(s)]).then(([u])=>u),t.fail=(o,s="fail")=>Promise.reject(s),t.timeout=(o,s,u)=>new Promise((d,m)=>{let x=!0,h=setTimeout(()=>{x=!1,m(new Error(u??"timeout"))},s.millis());o.then(w=>{x&&d(w)},w=>{x&&m(w)}).finally(()=>clearTimeout(h))}),t.sequentialAll=o=>o.reduce((s,u)=>s.then(async d=>[...d,await u()]),Promise.resolve([])),t.sequentialize=o=>{let s=Promise.resolve();return u=>{let d=()=>o(u),m=s.then(d,d);return s=m.catch(()=>{}),m}},t.memoizeAsync=(o,s)=>{let u=null,d=Date.now();return()=>{let m=Date.now();return(Yn(u)||W(s)&&m-d>s.millis())&&(d=m,u=o(),u.catch(x=>(u=null,x))),u}},t.allWithLimit=async(o,s=1)=>{let u=new Array(o.length),d=0,m=!1,x=async()=>{for(;d<o.length&&!m;){let h=d++;try{let w=await o[h]();m||(u[h]=w)}catch(w){throw m=!0,w}}};return await Promise.all(Array.from({length:Math.min(s,o.length)},x)),u},t.allSettledWithLimit=async(o,s=1)=>{let u=new Array(o.length),d=0,m=async()=>{for(;d<o.length;){let x=d++;try{let h=await o[x]();u[x]={status:"fulfilled",value:h}}catch(h){u[x]={status:"rejected",reason:h}}}};return await Promise.all(Array.from({length:Math.min(s,o.length)},m)),u};class i{max;#e;#t=0;constructor(s=1){this.max=s,this.#e=[]}async add(s){if(this.#t<this.max)return this.#t++,s().finally(()=>this.#r());{let u=Promise.withResolvers();return this.#e.push([s,u]),u.promise.finally(()=>this.#r())}}#r(){if(te(this.#t>0,"Internal Error in Promises.Limit"),--this.#t<this.max&&this.#e.length>0){let[s,{resolve:u,reject:d}]=this.#e.shift();this.#t++,s().then(u,d)}}}t.Limit=i;class a{#e;#t;#r;#i=b.None;constructor(s,u,d){this.#e=s,this.#t=u,this.#r=d}update(s){this.#i=b.wrap(s),s.then(u=>{this.#i.contains(s)&&this.#e(u)}).catch(u=>{this.#i.contains(s)&&this.#t(u)}).finally(()=>{this.#i.contains(s)&&(this.terminate(),P(this.#r))})}terminate(){this.#i=b.None}}t.Latest=a})(Ah||(Ah={}));var Oe=class t{static newSet(e){return new su(e,t.Comparator)}static compose=(e,...r)=>{let n=r.length===0?this.#e:new Int16Array(r);return te(n.every((i,a)=>i===r[a]),`fieldKeys (${n.join(",")}) only allows i16`),new t(e,n)};static decode(e){let r=e.split("/");return te(r.length>0,"Unable to parse Address"),t.compose(M.parse(r[0]),...r.slice(1).map(n=>parseInt(n)))}static reconstruct(e){return this.compose(e[0],...e[1])}static boxRange(e,r,n){let i=e.values(),a=mt.leftMostMapped(i,r,M.Comparator,n),o=i.length;if(a<0||a>=o)return null;for(let s=a;s<o;s++)if(M.Comparator(n(i[s]),r)!==0)return a<s?[a,s]:null;return[a,o]}static Comparator=(e,r)=>{let n=M.Comparator(e.#t,r.#t);if(n!==0)return n;let i=Math.min(e.#r.length,r.#r.length);for(let a=0;a<i;a++){let o=e.#r[a]-r.#r[a];if(o!==0)return o}return e.#r.length-r.#r.length};static MinimalComparator=(e,r)=>{let n=M.Comparator(e.#t,r.#t);if(n!==0)return n;let i=Math.min(e.#r.length,r.#r.length);for(let a=0;a<i;a++){let o=e.#r[a]-r.#r[a];if(o!==0)return o}return 0};static LengthComparator=(e,r)=>{let n=M.Comparator(e.#t,r.#t);return n!==0?n:r.#r.length-e.#r.length};static#e=new Int16Array(0);#t;#r;constructor(e,r){this.#t=e,this.#r=r}get uuid(){return this.#t}get fieldKeys(){return this.#r}isBox(){return this.#r.length===0}isContent(){return!this.isBox()}equals(e){return t.Comparator(this,e)===0}compareTo(e){return t.Comparator(this,e)}append(e){return new t(this.#t,new Int16Array([...this.#r,e]))}startsWith(e){return M.Comparator(e.#t,this.#t)===0&&e.#r.length<=this.#r.length&&e.#r.every((r,n)=>this.#r[n]===r)}write(e){e.writeBytes(new Int8Array(this.#t.buffer)),e.writeByte(this.#r.length),this.#r.forEach(r=>e.writeShort(r))}moveTo(e){return new t(e,this.#r)}decompose(){return[this.#t,this.#r]}toJSON(){return{uuid:Array.from(this.#t.values()),fields:Array.from(this.#r.values())}}toArrayBuffer(){let e=new Uint8Array(M.length+this.#r.length);return e.set(this.#t,0),e.set(this.#r,M.length),e.buffer}toString(){return[M.toString(this.#t),...this.#r].join("/")}static read(e){let r=M.fromDataInput(e),n=e.readByte();return t.compose(r,...ue.create(()=>e.readShort(),n))}},Ss;(function(t){t.AddressReader=e=>e.address,t.Comparator=({address:e},{address:r})=>Oe.Comparator(e,r),t.equals=(e,r)=>{let[n,i]=mt.rangeMapped(r,e,Oe.Comparator,t.AddressReader);return r.slice(n,i+1)},t.startsWith=(e,r)=>{let[n,i]=mt.rangeMapped(r,e,Oe.MinimalComparator,t.AddressReader);return r.slice(n,i+1).filter(a=>a.address.startsWith(e))},t.endsWith=(e,r)=>{let n=mt.leftMostMapped(r,e,Oe.LengthComparator,t.AddressReader),i=mt.rightMostMapped(r,e,Oe.MinimalComparator,t.AddressReader);return r.slice(n,i+1).filter(a=>e.startsWith(a.address))}})(Ss||(Ss={}));var ia=class t{static validate(e,r){if(e.address.equals(r.address))return b.wrap(`PointerField cannot point to itself: ${e}`);if(!r.pointerRules.accepts.some(n=>n===e.pointerType)){let n=r.pointerRules.accepts.join(", ");return b.wrap(`${String(e.pointerType)} does not satisfy any of the allowed types (${n}).`)}return b.None}#e;#t;constructor(e){this.#e=e,this.#t=new Yt}subscribe(e,...r){return this.#r(this.#t,e,r)}catchupAndSubscribe(e,...r){let n=Oe.newSet(i=>i.address);return n.addMany(this.filter(...r)),n.forEach(i=>e.onAdded(i)),this.subscribe({onAdded:i=>{n.add(i)&&e.onAdded(i)},onRemoved:i=>{n.removeByKey(i.address),e.onRemoved(i)}},...r)}filter(...e){return e.length===0?this.incoming():Jt.filter(this.incoming().values(),r=>e.some(n=>n===r.pointerType))}size(){return this.incoming().length}isEmpty(){return this.size()===0}nonEmpty(){return this.size()>0}contains(e){return this.incoming().some(r=>e.address.equals(r.address))}incoming(){return this.#e.graph.edges().incomingEdgesOf(this.#e).slice()}onAdded(e){let r=t.validate(e,this.#e);if(r.nonEmpty())return V(r.unwrap());this.#t.proxy.onAdded(e)}onRemoved(e){this.#t.proxy.onRemoved(e)}toString(){return`{Pointers ${this.#e.address}, pointers: ${this.incoming().values().map(e=>e.toString())}}`}#r(e,r,n){return e.subscribe({onAdded:i=>{(n.length===0||n.some(a=>a===i.pointerType))&&r.onAdded(i)},onRemoved:i=>{(n.length===0||n.some(a=>a===i.pointerType))&&r.onRemoved(i)}})}};var $b=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},cu=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)},G=class t{static hook(e){return new t(e)}#e;#t;#r;#i;#n;constructor({parent:e,fieldKey:r,fieldName:n,pointerRules:i,deprecated:a}){this.#e=e,this.#t=r,this.#r=n,this.#i=i,this.#n=a,(i.mandatory||i.exclusive)&&this.graph.edges().watchVertex(this)}accept(e){return P(e.visitField,this)}get box(){return this.#e.box}get graph(){return this.#e.graph}get parent(){return this.#e}get fieldKey(){return this.#t}get fieldName(){return this.#r}get pointerRules(){return this.#i}get deprecated(){return this.#n}get pointerHub(){return new ia(this)}get address(){return this.#e.address.append(this.#t)}get debugPath(){return`${this.box.name}:${this.box.mapFields(e=>e.fieldName,...this.address.fieldKeys).join("/")}`}isBox(){return!1}isField(){return!0}isAttached(){return this.graph.findBox(this.address.uuid).nonEmpty()}fields(){return ue.empty()}record(){return uh.empty()}getField(e){return V()}optField(e){return b.None}read(e){}write(e){}toJSON(){}fromJSON(e){return V("fromJSON should never be called on a field")}disconnect(){if(this.pointerHub.isEmpty())return;let e=this.pointerHub.incoming();e.forEach(r=>{r.defer(),(r.mandatory||this.pointerRules.mandatory&&e.length===1)&&(console.warn(`[Field.disconnect] Deleting ${r.box} because pointer.mandatory=${r.mandatory} or (field.mandatory=${this.pointerRules.mandatory} and lastPointer=${e.length===1})`),r.box.delete())})}toString(){return`{${this.box.constructor.name}:${this.constructor.name} (${this.fieldName}) ${this.address.toString()}`}};$b([au,cu("design:type",ia),cu("design:paramtypes",[])],G.prototype,"pointerHub",null);$b([au,cu("design:type",Oe),cu("design:paramtypes",[])],G.prototype,"address",null);$b([au,cu("design:type",String),cu("design:paramtypes",[])],G.prototype,"debugPath",null);var p=Object.freeze({mandatory:!1,exclusive:!1,accepts:[]});var Fh=class t extends G{static create(e,r,n){return new t(e,r,n)}#e;constructor(e,r,n){super(e),this.#e=ue.create(i=>r({parent:this,fieldKey:i,fieldName:String(i),pointerRules:p,deprecated:e.deprecated}),n)}accept(e){return P(e.visitArrayField,this)}fields(){return this.#e}record(){return ue.toRecord(this.#e,e=>String(e.fieldKey))}getField(e){return Ce(this.#e[e])}optField(e){return b.wrap(this.#e[e])}read(e){this.#e.forEach(r=>r.read(e))}write(e){this.#e.filter(r=>!r.deprecated).forEach(r=>r.write(e))}size(){return this.#e.length}toJSON(){if(!this.deprecated)return Object.values(this.#e).map(e=>e.toJSON()??null)}fromJSON(e){if(!this.deprecated)if(Array.isArray(e))e.forEach((r,n)=>this.#e[n].fromJSON(r));else return V("Type mismatch")}};var xo;(function(t){t.writeFields=(r,n)=>{let i=Object.entries(n).filter(([a,o])=>!o.deprecated);r.writeInt(1179403347),r.writeShort(i.length),i.forEach(([a,o])=>{let s=Xt.create();o.write(s);let u=new Int8Array(s.toArrayBuffer());r.writeShort(Number(a)),r.writeInt(u.length),r.writeBytes(u)})},t.readFields=(r,n)=>{te(r.readInt()===1179403347,"Serializer header is corrupt");let i=r.readShort();for(let a=0;a<i;a++){let o=r.readShort();if(th(n[o]))continue;let s=r.readInt(),u=new Int8Array(s);r.readBytes(u);let{status:d,error:m}=Ct(()=>n[o]?.read(new rt(u.buffer)));d==="failure"&&console.warn(n,m)}}})(xo||(xo={}));var cB=function(t,e,r,n){var i=arguments.length,a=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},RS=function(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)},D=class t{static DEBUG_DELETION=!1;static Index=0;#e;#t;#r;#i;#n;#a;#o;#s=t.Index++;constructor({uuid:e,graph:r,name:n,pointerRules:i,resource:a,ephemeral:o}){this.#e=Oe.compose(e),this.#t=r,this.#r=n,this.#i=i,this.#n=a,this.#a=o===!0,this.#o=this.initializeFields(),(i.mandatory||i.exclusive)&&this.graph.edges().watchVertex(this)}fields(){return Object.values(this.#o)}record(){return this.#o}getField(e){return Ce(this.#o[e],()=>`Field ${String(e)} not found in ${this.toString()}`)}optField(e){return b.wrap(this.#o[e])}subscribe(e,r){return this.graph.subscribeVertexUpdates(e,this.address,r)}subscribeDeletion(e){return this.graph.subscribeDeletion(this.address.uuid,e)}get box(){return this}get name(){return this.#r}get graph(){return this.#t}get parent(){return this}get address(){return this.#e}get pointerRules(){return this.#i}get resource(){return this.#n}get ephemeral(){return this.#a}get creationIndex(){return this.#s}get pointerHub(){return new ia(this)}estimateMemory(){let e=new nu;return this.write(e),e.count}isBox(){return!0}asBox(e){return Ie(this,e)}isField(){return!1}isAttached(){return this.#t.findBox(this.address.uuid).nonEmpty()}read(e){xo.readFields(e,this.#o)}write(e){xo.writeFields(e,this.#o)}serialize(){let e=Xt.create();return e.writeInt(this.#s),e.writeString(this.name),e.writeBytes(new Int8Array(this.address.uuid.buffer)),this.write(e),e.toArrayBuffer()}toArrayBuffer(){let e=Xt.create();return this.write(e),e.toArrayBuffer()}toJSON(){return Object.entries(this.#o).reduce((e,[r,n])=>{let i=n.toJSON();return W(i)&&(e[r]=i),e},{})}fromJSON(e){if(rh(e))Object.entries(e).forEach(([r,n])=>{let i=this.#o[parseInt(r)];W(n)&&i.fromJSON(n)});else return V("Type mismatch")}incomingEdges(){return this.graph.edges().incomingEdgesOf(this)}outgoingEdges(){return this.graph.edges().outgoingEdgesOf(this)}mapFields(e,...r){if(r.length===0)return ue.empty();let n=this.getField(r[0]),i=[e(n)];for(let a=1;a<r.length;a++)n=n.getField(r[a]),i.push(e(n));return i}searchVertex(e){if(e.length===0)return b.wrap(this);let r=this.optField(e[0]);if(r.isEmpty())return b.None;for(let n=1;n<e.length;n++)if(r=r.unwrap().optField(e[n]),r.isEmpty())return b.None;return r}delete(){if(!this.isAttached())return;let{boxes:e,pointers:r}=this.graph.dependenciesOf(this);t.DEBUG_DELETION&&(console.debug(`Delete ${this.toString()}`),console.debug(" unplugs",[...r].map(n=>n.toString()).join(`
2
+ `)),console.debug(" unstages",[...e].map(n=>n.toString()).join(`
3
+ `),this));for(let n of r)n.defer();for(let n of e)n.unstage();this.unstage()}unstage(){this.graph.unstageBox(this)}isValid(){if(this.#i.mandatory&&this.pointerHub.incoming().length===0)return!1;let e=r=>r.every(n=>n.accept({visitPointerField:i=>!i.mandatory||i.nonEmpty(),visitArrayField:i=>e(i.fields()),visitObjectField:i=>e(i.fields()),visitPrimitiveField:i=>!0,visitField:i=>!0})??!0);return e(this.fields())}toString(){return`${this.constructor.name} ${this.address.toString()}`}};cB([au,RS("design:type",ia),RS("design:paramtypes",[])],D.prototype,"pointerHub",null);var qd;(function(t){t.clampInt32=(e,r)=>r,t.clampFloat32=(e,r)=>r})(qd||(qd={}));var ze;(function(t){t[t.This=0]="This",t[t.Parent=1]="Parent",t[t.Children=2]="Children"})(ze||(ze={}));var Eh;(function(t){t.create=()=>new kb})(Eh||(Eh={}));var kb=class{#e=new Jd(Ss.equals);#t=new Jd(Ss.startsWith);#r=new Jd(Ss.endsWith);#i=[];#n=0;#a=!1;subscribe(e,r,n){let i=new Nb(r,e,this.#n++,n);if(this.#a){let a=new Mb(i,e);return this.#i.push(a),a}else return this.subscribeMonitor(i,e)}dispatch(e){this.#a=!0,[...this.#e.filter(e),...this.#t.filter(e),...this.#r.filter(e)].sort(({order:n},{order:i})=>n-i).forEach(n=>n.procedure(e)),this.#a=!1,this.#i.forEach(n=>n.subscribe(this)),this.#i.length=0}subscribeMonitor(e,r){switch(r){case ze.This:return this.#e.subscribe(e);case ze.Parent:return this.#t.subscribe(e);case ze.Children:return this.#r.subscribe(e);default:return ih(r)}}countStations(){return this.#e.count()+this.#t.count()+this.#r.count()}},Nb=class{address;propagation;order;procedure;constructor(e,r,n,i){this.address=e,this.propagation=r,this.order=n,this.procedure=i}toString(){return`{ Monitor address: ${this.address}, propagation: ${ze[this.propagation]}, order: ${this.order} }`}},Jd=class{filterStrategy;#e=[];#t=!0;constructor(e){this.filterStrategy=e}subscribe(e){return this.#e.push(e),this.#t=this.#e.length<2,{terminate:()=>{let r=this.#e.length;for(;--r>=0;)this.#e[r]===e&&this.#e.splice(r,1)}}}stations(){return this.#t||(this.#e.sort(Ss.Comparator),this.#t=!0),this.#e}filter(e){return this.filterStrategy(e.address,this.stations())}count(){return this.#e.length}},Mb=class{monitor;propagation;#e=new Y;#t=!1;constructor(e,r){this.monitor=e,this.propagation=r}subscribe(e){this.#t||(this.#e.terminate(),this.#e.own(e.subscribeMonitor(this.monitor,this.propagation)))}terminate(){this.#t=!0,this.#e.terminate()}};var zt;(function(t){t.Boolean="boolean",t.Float32="float32",t.Int32="int32",t.String="string",t.Bytes="bytes"})(zt||(zt={}));var $s={[zt.Boolean]:{type:zt.Boolean,encode:(t,e)=>t.writeBoolean(e),decode:t=>t.readBoolean()},[zt.Float32]:{type:zt.Float32,encode:(t,e)=>t.writeFloat(e),decode:t=>t.readFloat()},[zt.Int32]:{type:zt.Int32,encode:(t,e)=>t.writeInt(e),decode:t=>t.readInt()},[zt.String]:{type:zt.String,encode:(t,e)=>t.writeString(e),decode:t=>t.readString()},[zt.Bytes]:{type:zt.Bytes,encode:(t,e)=>{t.writeInt(e.length),t.writeBytes(e)},decode:t=>{let e=new Int8Array(t.readInt());return t.readBytes(e),e}}},Ps=class extends G{#e;#t;#r;constructor(e,r,n){super(e),this.#e=r,this.#t=n,this.#r=this.#t}accept(e){return P(e.visitPrimitiveField,this)}subscribe(e){return this.graph.subscribeVertexUpdates(ze.This,this.address,()=>e(this))}catchupAndSubscribe(e){return e(this),this.subscribe(e)}get type(){return this.#e}get initValue(){return this.#t}setInitValue(e){te(this.graph.constructingBox(),"Cannot change initial value at runtime"),this.setValue(this.#t=this.clamp(e))}getValue(){return this.#r}setValue(e){let r=this.#r,n=this.clamp(e);this.equals(n)||(this.#r=n,this.graph.onPrimitiveValueUpdate(this,r,n))}writeValue(e,r){te(!this.deprecated,"PrimitiveField.write: deprecated field"),this.serialization().encode(e,r)}readValue(e){return this.serialization().decode(e)}toJSON(){if(this.deprecated)return;let e=this.getValue();return ArrayBuffer.isView(e)?V("not implemented"):e}fromJSON(e){return V("Type mismatch")}reset(){this.setValue(this.#t)}},R=class t extends Ps{static create(e,r=!1){return new t(e,r)}constructor(e,r){super(e,zt.Boolean,r)}toggle(){this.setValue(!this.getValue())}serialization(){return $s[zt.Boolean]}equals(e){return this.getValue()===e}clamp(e){return e}read(e){this.setValue(e.readBoolean())}write(e){te(!this.deprecated,"BooleanField.write: deprecated field"),e.writeBoolean(this.getValue())}fromJSON(e){this.deprecated||(typeof e=="boolean"?this.setValue(e):console.warn("BooleanField Type mismatch",e,this.address.toString()))}},E=class t extends Ps{static create(e,r,n,i=0){return new t(e,r,n,i)}#e;#t;constructor(e,r,n,i){super(e,zt.Float32,i),this.#e=r,this.#t=n}serialization(){return $s[zt.Float32]}equals(e){return this.getValue()===e}clamp(e){return qd.clampFloat32(this.#e,Ca.toFloat32(e))}read(e){this.setValue(e.readFloat())}write(e){te(!this.deprecated,"FLoat32Field.write: deprecated field"),e.writeFloat(this.getValue())}get unit(){return this.#t}get constraints(){return this.#e}fromJSON(e){this.deprecated||(typeof e=="number"?this.setValue(e):console.warn("Float32Field Type mismatch",e,this.address.toString()))}},k=class t extends Ps{static create(e,r,n,i=0){return new t(e,r,n,i)}#e;#t;constructor(e,r,n,i){super(e,zt.Int32,i),this.#e=r,this.#t=n}serialization(){return $s[zt.Int32]}equals(e){return this.getValue()===e}clamp(e){return qd.clampInt32(this.#e,yr.toInt(e))}read(e){this.setValue(e.readInt())}write(e){te(!this.deprecated,"Int32Field.write: deprecated field"),e.writeInt(this.getValue())}get unit(){return this.#t}get constraints(){return this.#e}fromJSON(e){this.deprecated||(typeof e=="number"&&e===Math.floor(e)&&e>=yr.MIN_VALUE&&e<=yr.MAX_VALUE?this.setValue(e):console.warn("Int32Field Type mismatch",e,this.address.toString()))}},B=class t extends Ps{static create(e,r=""){return new t(e,r)}constructor(e,r){super(e,zt.String,r)}serialization(){return $s[zt.String]}equals(e){return this.getValue()===e}clamp(e){return e}read(e){this.setValue(e.readString())}write(e){te(!this.deprecated,"StringField.write: deprecated field"),e.writeString(this.getValue())}fromJSON(e){this.deprecated||(typeof e=="string"?this.setValue(e):console.warn("StringField Type mismatch",e,this.address.toString()))}},CS=class t extends Ps{static create(e,r=this.#e){return new t(e,r)}static#e=Object.freeze(new Int8Array(0));constructor(e,r){super(e,zt.Bytes,r)}serialization(){return $s[zt.Bytes]}equals(e){return this.getValue()===e}clamp(e){return e}read(e){let r=new Int8Array(e.readInt());e.readBytes(r),this.setValue(r)}write(e){te(!this.deprecated,"ByteArrayField.write: deprecated field");let r=this.getValue();e.writeInt(r.length),e.writeBytes(r)}toJSON(){if(!this.deprecated)return Array.from(this.getValue().values())}fromJSON(e){this.deprecated||(Array.isArray(e)&&e.every(r=>typeof r=="number")?this.setValue(new Int8Array(e)):console.warn("ByteArrayField Type mismatch",e,this.address.toString()))}};var OS=t=>{let e=M.newSet(i=>i),r=M.newSet(i=>i);for(let i of t)i instanceof ks?e.add(i.uuid):i instanceof Is&&r.add(i.uuid);let n=M.newSet(i=>i);for(let i of e.values())r.hasKey(i)&&n.add(i);return n.isEmpty()?t:t.filter(i=>i instanceof ks||i instanceof Is?!n.hasKey(i.uuid):i instanceof Ms||i instanceof Ns?!n.hasKey(i.address.uuid):!0)},zS;(function(t){t.decode=e=>{let r=e.readInt();return ue.create(()=>{switch(e.readString()){case"new":{let i=M.fromDataInput(e),a=e.readString(),o=new Int8Array(e.readInt());return e.readBytes(o),new ks(i,a,o.buffer)}case"pointer":{let i=Oe.read(e),a=e.readBoolean()?b.wrap(Oe.read(e)):b.None,o=e.readBoolean()?b.wrap(Oe.read(e)):b.None;return new Ms(i,a,o)}case"primitive":{let i=Oe.read(e),a=e.readString(),o=$s[a],s=o.decode(e),u=o.decode(e);return new Ns(i,o,s,u)}case"delete":{let i=M.fromDataInput(e),a=e.readString(),o=new Int8Array(e.readInt());return e.readBytes(o),new Is(i,a,o.buffer)}}},r)}})(zS||(zS={}));var ks=class{type="new";#e;#t;#r;constructor(e,r,n){this.#e=e,this.#t=r,this.#r=n}get uuid(){return this.#e}get name(){return this.#t}get settings(){return this.#r}forward(e){e.createBox(this.#t,this.#e,r=>r.read(new rt(this.#r)))}inverse(e){e.findBox(this.#e).unwrap(()=>`Could not find ${this.#t}`).unstage()}write(e){e.writeString(this.type),M.toDataOutput(e,this.#e),e.writeString(this.#t),e.writeInt(this.#r.byteLength),e.writeBytes(new Int8Array(this.#r))}toString(){return`{NewUpdate uuid: ${M.toString(this.#e)}, attachment: ${this.settings.byteLength}b`}toDebugString(e){return this.toString()}},Ns=class{type="primitive";#e;#t;#r;#i;constructor(e,r,n,i){this.#e=e,this.#t=r,this.#r=n,this.#i=i}get address(){return this.#e}get oldValue(){return this.#r}get newValue(){return this.#i}matches(e){return e.address.equals(this.address)}inverse(e){this.field(e).setValue(this.#r)}forward(e){this.field(e).setValue(this.#i)}field(e){return e.findVertex(this.#e).unwrap(()=>`Could not find PrimitiveField at ${this.#e}`)}write(e){e.writeString(this.type),this.#e.write(e),e.writeString(this.#t.type),this.#t.encode(e,this.#r),this.#t.encode(e,this.#i)}toString(){return`{PrimitiveUpdate oldValue: ${this.#r}, newValue: ${this.#i}`}},Ms=class{type="pointer";#e;#t;#r;constructor(e,r,n){this.#e=e,this.#t=r,this.#r=n}get address(){return this.#e}get oldAddress(){return this.#t}get newAddress(){return this.#r}matches(e){return e.address.equals(this.address)}inverse(e){this.field(e).targetAddress=this.#t}forward(e){this.field(e).targetAddress=this.#r}field(e){return e.findVertex(this.#e).unwrap(()=>`Could not find PointerField at ${this.#e}`)}write(e){e.writeString(this.type),this.#e.write(e),this.#t.match({none:()=>e.writeBoolean(!1),some:r=>{e.writeBoolean(!0),r.write(e)}}),this.#r.match({none:()=>e.writeBoolean(!1),some:r=>{e.writeBoolean(!0),r.write(e)}})}toString(){return`{PointerUpdate oldValue: ${this.#t.unwrapOrNull()}, newValue: ${this.#r.unwrapOrNull()}`}},Is=class{type="delete";#e;#t;#r;constructor(e,r,n){this.#e=e,this.#t=r,this.#r=n}get uuid(){return this.#e}get name(){return this.#t}get settings(){return this.#r}forward(e){e.findBox(this.#e).unwrap(()=>`Could not find ${this.#t}`).unstage()}inverse(e){e.createBox(this.#t,this.#e,r=>r.read(new rt(this.#r)))}write(e){e.writeString(this.type),M.toDataOutput(e,this.#e),e.writeString(this.#t),e.writeInt(this.#r.byteLength),e.writeBytes(new Int8Array(this.#r))}toString(){return`{DeleteUpdate uuid: ${M.toString(this.#e)}, attachment: ${this.settings.byteLength}b`}};var JO=Symbol("Unreferenceable"),N=class t extends G{static create(e,r,n){return new t(e,r,n)}static encodeWith(e,r){te(this.#e.isEmpty(),"SerializationEncoder already in use"),this.#e=b.wrap(e);let n=Ct(r);if(this.#e=b.None,n.status==="failure")throw n.error;return n.value}static decodeWith(e,r){te(this.#t.isEmpty(),"SerializationDecoder already in use"),this.#t=b.wrap(e);let n=Ct(r);if(this.#t=b.None,n.status==="failure")throw n.error;return n.value}static#e=b.None;static#t=b.None;#r;#i;#n=b.None;#a=b.None;constructor(e,r,n){super(e),this.#r=r,this.#i=n,n&&this.graph.edges().watchVertex(this)}get pointerHub(){return V(`${this} cannot be pointed to`)}get pointerType(){return this.#r}get mandatory(){return this.#i}accept(e){return P(e.visitPointerField,this)}subscribe(e){return this.graph.subscribeVertexUpdates(ze.This,this.address,()=>this.graph.subscribeEndTransaction(()=>e(this)))}catchupAndSubscribe(e){return e(this),this.subscribe(e)}refer(e){this.targetVertex=b.wrap(e)}defer(){this.targetVertex=b.None}get targetVertex(){return this.graph.inTransaction()?this.#a.flatMap(e=>this.graph.findVertex(e)):this.#n}set targetVertex(e){if(e.nonEmpty()){let r=ia.validate(this,e.unwrap());r.nonEmpty()&&V(r.unwrap())}this.targetAddress=e.map(r=>r.address)}get targetAddress(){return this.#a}set targetAddress(e){let r=this.#a;r.isEmpty()&&e.isEmpty()||(e.nonEmpty()&&r.unwrapOrNull()?.equals(e.unwrap()))===!0||(this.#a=e,this.graph.onPointerAddressUpdated(this,r,e))}isEmpty(){return this.targetAddress.isEmpty()}nonEmpty(){return this.targetAddress.nonEmpty()}ifVertex(e){this.targetVertex.nonEmpty()&&e(this.targetVertex.unwrap("targetVertex"))}resolvedTo(e){this.#n=e}read(e){let r=e.readBoolean()?b.wrap(Oe.read(e)):b.None;this.targetAddress=t.#t.match({none:()=>r,some:n=>n.map(this,r)})}write(e){te(!this.deprecated,"PointerField.write: deprecated field"),t.#e.match({none:()=>this.#a,some:r=>r.map(this)}).match({none:()=>e.writeBoolean(!1),some:r=>{e.writeBoolean(!0),r.write(e)}})}toJSON(){if(!this.deprecated)return t.#e.match({none:()=>this.#a,some:e=>e.map(this)}).match({none:()=>null,some:e=>e.toString()})}fromJSON(e){if(!this.deprecated)if(Yn(e)||typeof e=="string"){let r=b.wrap(Yn(e)?null:Oe.decode(e));this.targetAddress=t.#t.match({none:()=>r,some:n=>n.map(this,r)})}else return V(`Pointer at (${this.address}) has type mismatch. value (${e}) must be a string, but is ${typeof e}.`)}};var Sh=class{#e;#t;#r;#i;#n;#a;constructor(){this.#e=Oe.newSet(e=>e.address),this.#t=Oe.newSet(e=>e.address),this.#r=Oe.newSet(e=>e.address),this.#i=Oe.newSet(([e])=>e),this.#n=Oe.newSet(([e])=>e.address),this.#a=M.newSet(e=>e)}watchVertex(e){if($t(e,N)){if(!e.mandatory)return V("watchVertex called but has no edge requirement");this.#e.add(e)}else{let{mandatory:r,exclusive:n}=e.pointerRules;if(!r&&!n)return V("watchVertex called but has no edge requirement");r&&this.#t.add(e),n&&this.#r.add(e)}this.#a.add(e.address.uuid)}unwatchVerticesOf(...e){let r=({box:{address:{uuid:n}}})=>n;for(let{address:{uuid:n}}of e)this.#s(this.#e,n,r),this.#s(this.#t,n,r),this.#s(this.#r,n,r);for(let n of e){let i=this.outgoingEdgesOf(n);if(i.length>0)return V(`${n} has outgoing edges: ${i.map(([o,s])=>`[${o.toString()}, ${s.toString()}]`)}`);let a=this.incomingEdgesOf(n);if(a.length>0)return V(`${n} has incoming edges from: ${a.map(o=>o.toString())}`)}}forgetVerticesOf(e){let r=({box:{address:{uuid:i}}})=>i,{address:{uuid:n}}=e;this.#s(this.#e,n,r),this.#s(this.#t,n,r),this.#s(this.#r,n,r)}connect(e,r){this.#n.add([e,r]),this.#i.opt(r).match({none:()=>this.#i.add([r,[e]]),some:([,n])=>n.push(e)}),this.#a.add(e.address.uuid),this.#a.add(r.uuid)}disconnect(e){let[,r]=this.#n.removeByKey(e.address),[,n]=this.#i.get(r,"incoming by address");ue.remove(n,e),n.length===0&&this.#i.removeByKey(r),this.#a.add(e.address.uuid),this.#a.add(r.uuid)}isConnected(e,r){return this.#n.opt(e.address).mapOr(([,n])=>n.equals(r),!1)}outgoingEdgesOf(e){return this.#o(this.#n,e.address.uuid,([{box:{address:{uuid:r}}}])=>r)}incomingEdgesOf(e){return e.isBox()?this.#o(this.#i,e.address.uuid,([{uuid:r}])=>r).flatMap(([r,n])=>n):this.#i.opt(e.address).mapOr(([r,n])=>n,ue.empty())}clearAffected(){this.#a.clear()}tryValidateAffected(){let e=({box:{address:{uuid:r}}})=>r;for(let r of this.#a.values()){let n=this.#o(this.#e,r,e);for(let o of n)if(o.isEmpty())return this.#a.clear(),o.mandatory?b.wrap(new Error(`Pointer ${o.toString()} requires an edge.`)):b.wrap(new Error(`Illegal state: ${o} has no edge requirements.`));let i=this.#o(this.#t,r,e);for(let o of i)if(o.pointerHub.isEmpty())return this.#a.clear(),o.pointerRules.mandatory?b.wrap(new Error(`Target ${o.toString()} requires an edge.`)):b.wrap(new Error(`Illegal state: ${o} has no edge requirements.`));let a=this.#o(this.#r,r,e);for(let o of a){let s=o.pointerHub.size();if(s>1)return this.#a.clear(),b.wrap(new Error(`Target ${o.toString()} is exclusive but has ${s} incoming pointers.`))}}return this.#a.clear(),b.None}validateRequirements(){this.#e.forEach(e=>{if(e.isEmpty())return e.mandatory?(console.warn(`[GraphEdges] Validation failed: Pointer ${e.toString()} requires an edge.`),V(`Pointer ${e.toString()} requires an edge.`)):V(`Illegal state: ${e} has no edge requirements.`)}),this.#t.forEach(e=>{if(e.pointerHub.isEmpty())return e.pointerRules.mandatory?(console.warn(e),console.warn(`[GraphEdges] Validation failed: Target ${e.toString()} requires an edge.`),V(`Target ${e.toString()} requires an edge.`)):V(`Illegal state: ${e} has no edge requirements.`)}),this.#r.forEach(e=>{let r=e.pointerHub.size();if(r>1)return console.warn(`[GraphEdges] Validation failed: Target ${e.toString()} is exclusive but has ${r} incoming pointers.`),V(`Target ${e.toString()} is exclusive but has ${r} incoming pointers.`)})}#o(e,r,n){let i=Oe.boxRange(e,r,n);return W(i)?e.values().slice(i[0],i[1]):ue.empty()}#s(e,r,n){let i=Oe.boxRange(e,r,n);W(i)&&e.removeRange(i[0],i[1])}};var Ua=class{#e;#t;#r;#i;#n;#a;#o;#s;#c;#l;#u;#p;#d;#v=!1;#f=!1;#m=!1;constructor(e=b.None){this.#e=e,this.#t=M.newSet(r=>r.address.uuid),this.#r=[],this.#i=[],this.#n=[],this.#c=Eh.create(),this.#a=new Yt,this.#o=new Yt,this.#s=new Yt,this.#l=new Sh,this.#u=Oe.newSet(({pointer:r})=>r.address),this.#p=[],this.#d=M.newSet(r=>r.uuid)}beginTransaction(){te(!this.#v,"Transaction already in progress"),this.#v=!0,this.#n.length=0,this.#s.proxy.onBeginTransaction()}abortTransaction(){te(this.#v,"No transaction in progress"),this.#_(),this.#r.length>0&&(this.#r.forEach(({pointerField:e,update:r})=>this.#w(e,r)),this.#r.length=0),this.#g()}endTransaction(){te(this.#v,"No transaction in progress"),this.#r.length>0&&(this.#r.forEach(({pointerField:e,update:r})=>{this.#n.push(r),this.#h(e,r)}),this.#r.length=0),!this.#m&&this.#e.nonEmpty()&&this.#l.tryValidateAffected().ifSome(e=>{throw this.#_(),this.#g(),e}),this.#x(),this.#g()}inTransaction(){return this.#v}constructingBox(){return this.#f}createBox(e,r,n){return this.#e.unwrap("No box-factory installed")(e,this,r,n)}stageBox(e,r){if(this.#b(),te(!this.#f,"Cannot construct box while other box is constructing"),W(r)){this.#f=!0;let a=Ct(()=>r(e));if(this.#f=!1,a.status==="failure")throw this.#A(e),a.error}if(!this.#t.add(e))return this.#A(e),V(`${e.name} ${e.address.toString()} already staged`);let i=new ks(e.address.uuid,e.name,e.toArrayBuffer());return this.#m||this.#n.push(i),this.#a.proxy.onUpdate(i),this.#o.proxy.onUpdate(i),e}subscribeTransaction(e){return this.#s.subscribe(e)}subscribeToAllUpdates(e){return this.#a.subscribe(e)}subscribeToAllUpdatesImmediate(e){return this.#o.subscribe(e)}subscribeVertexUpdates(e,r,n){return this.#c.subscribe(e,r,n)}subscribeEndTransaction(e){this.#p.push(e)}subscribeDeletion(e,r){let n=this.#d.getOrCreate(e,()=>({uuid:e,listeners:new Set}));return n.listeners.add(r),{terminate:()=>{n.listeners.delete(r),n.listeners.size===0&&this.#d.removeByKeyIfExist(e)}}}unstageBox(e){this.#b();let r=this.#t.removeByKey(e.address.uuid);te(r===e,`${e} could not be found to unstage`),this.#l.unwatchVerticesOf(e);let n=new Is(e.address.uuid,e.name,e.toArrayBuffer());this.#m||this.#n.push(n),this.#d.removeByKeyIfExist(e.address.uuid)?.listeners.forEach(i=>i()),this.#a.proxy.onUpdate(n),this.#o.proxy.onUpdate(n)}findBox(e){return this.#t.opt(e)}findVertex(e){return this.#t.opt(e.uuid).flatMap(r=>r.searchVertex(e.fieldKeys))}boxes(){return this.#t.values()}edges(){return this.#l}checksum(){let e=new sh;return this.boxes().forEach(r=>r.write(e)),e.result()}onPrimitiveValueUpdate(e,r,n){if(this.#b(),e.isAttached()&&!this.#f){let i=new Ns(e.address,e.serialization(),r,n);this.#m||this.#n.push(i),this.#c.dispatch(i),this.#a.proxy.onUpdate(i),this.#o.proxy.onUpdate(i)}}onPointerAddressUpdated(e,r,n){this.#b(),r.nonEmpty()&&this.#l.disconnect(e),n.nonEmpty()&&this.#l.connect(e,n.unwrap());let i=new Ms(e.address,r,n);this.#f?this.#r.push({pointerField:e,update:i}):(this.#m||this.#n.push(i),this.#w(e,i),this.#o.proxy.onUpdate(i))}#w(e,r){let{oldAddress:n,newAddress:i}=r;e.resolvedTo(i.flatMap(o=>this.findVertex(o))),this.#u.opt(e.address).match({none:()=>this.#u.add({pointer:e,initial:n,final:i,index:this.#u.size()}),some:o=>o.final=i}),this.#c.dispatch(r),this.#a.proxy.onUpdate(r)}#h(e,r){let{oldAddress:n,newAddress:i}=r;e.resolvedTo(i.flatMap(o=>this.findVertex(o))),this.#u.opt(e.address).match({none:()=>this.#u.add({pointer:e,initial:n,final:i,index:this.#u.size()}),some:o=>o.final=i}),this.#i.push({pointerField:e,update:r})}#x(){for(let{update:e}of this.#i)this.#c.dispatch(e),this.#a.proxy.onUpdate(e);this.#i.length=0}#g(){for(this.#u.values().toSorted((e,r)=>e.index-r.index).forEach(({pointer:e,initial:r,final:n})=>{r.equals(n)||(r.ifSome(i=>this.findVertex(i).unwrapOrUndefined()?.pointerHub.onRemoved(e)),n.ifSome(i=>this.findVertex(i).unwrapOrUndefined()?.pointerHub.onAdded(e)))}),this.#u.clear(),this.#v=!1;this.#p.length>0;)this.#p.splice(0).forEach(e=>e()),this.#p.length>0&&console.debug(`${this.#p.length} new observers while notifying`);this.#s.proxy.onEndTransaction(this.#m),this.#m=!1}#_(){this.#m=!0;for(let{update:r}of this.#r)this.#n.push(r);this.#r.length=0;let e=OS(this.#n.splice(0));for(let r=e.length-1;r>=0;r--){let n=e[r];if((n instanceof Ms||n instanceof Ns)&&this.findVertex(n.address).isEmpty()){console.warn(`[BoxGraph] rollback skips ${n.type}-update, vertex not found at ${n.address.toString()}`);continue}n.inverse(this)}this.#i.length=0,this.#l.clearAffected(),this.#u.clear(),this.#n.length=0}#A(e){for(let r=this.#r.length-1;r>=0;r--)this.#r[r].pointerField.box===e&&this.#r.splice(r,1);this.#l.outgoingEdgesOf(e).forEach(([r])=>this.#l.disconnect(r)),this.#l.forgetVerticesOf(e)}findOrphans(e){let r=this.#E(e);return this.boxes().filter(n=>!r.has(n))}#E(e){let r=new Set,n=[e];for(;n.length>0;){let i=n.pop();if(!r.has(i)){r.add(i),this.#F(i).forEach(a=>{a.targetAddress.ifSome(o=>{this.findBox(o.uuid).ifSome(s=>{r.has(s)||n.push(s)})})});for(let a of i.incomingEdges())r.has(a.box)||n.push(a.box)}}return r}#F(e){let r=[],n=i=>{for(let a of i)a.accept({visitPointerField:o=>r.push(o),visitObjectField:o=>n(o.fields()),visitArrayField:o=>n(o.fields())})};return n(e.fields()),r}dependenciesOf(e,r={}){let n=W(r.excludeBox)?r.excludeBox:ou.alwaysFalse,i=W(r.alwaysFollowMandatory)?r.alwaysFollowMandatory:!1,a=W(r.stopAtResources)?r.stopAtResources:!1,o=new Set,s=new Set,u=(m,x=!1)=>{if(!(o.has(m)||!x&&n(m))){if(o.add(m),a&&W(m.resource)){m.incomingEdges().forEach(h=>{s.add(h);let w=h.targetAddress.mapOr(A=>!A.isBox(),!1);if(h.mandatory&&w){if(m.resource==="shared"&&h.targetAddress.flatMap(_=>this.findVertex(_)).mapOr(_=>_.pointerRules.mandatory,!1))return;u(h.box)}});return}m.outgoingEdges().filter(([h])=>!s.has(h)).forEach(([h,w])=>{let A=this.findVertex(w).unwrap(`Could not find target of ${h.toString()}`);if(s.add(h),A.pointerRules.mandatory&&(i||A.pointerHub.incoming().filter(_=>_.targetAddress.mapOr(C=>C.equals(w),!1)).every(_=>s.has(_))))return u(A.box)}),m.incomingEdges().forEach(h=>{s.add(h),h.mandatory&&u(h.box)})}},d=Array.isArray(e)?e:[e];return d.forEach(m=>u(m,!0)),d.forEach(m=>o.delete(m)),{boxes:o,pointers:Array.from(s).reverse()}}verifyPointers(){this.#l.validateRequirements();let e=0,r=n=>{for(let i of n.fields())i.accept({visitPointerField:a=>{if(a.targetAddress.nonEmpty()){let o=a.targetVertex.nonEmpty(),s=this.findVertex(a.targetAddress.unwrap()).nonEmpty();te(o,`pointer ${a.address} is broken`),te(s,`Cannot find target for pointer ${a.address}`),e++}},visitObjectField:a=>r(a)})};return this.#t.forEach(n=>r(n)),console.debug("verification complete."),{count:e}}debugBoxes(){console.table(this.#t.values().reduce((e,r)=>(e[M.toString(r.address.uuid)]={class:r.name,"incoming links":r.incomingEdges().length,"outgoing links":r.outgoingEdges().length,"est. memory (bytes)":r.estimateMemory()},e),{}))}debugDependencies(){console.debug("Dependencies:"),this.boxes().forEach(e=>{console.debug(` ${e}`);for(let r of this.dependenciesOf(e).boxes)console.debug(` ${r}`)})}addressToDebugPath(e){return e.flatMap(r=>r.isBox()?this.findBox(r.uuid).map(n=>n.name):this.findBox(r.uuid).flatMap(n=>n.searchVertex(r.fieldKeys).map(i=>i.isField()?i.debugPath:V("Unknown address"))))}toArrayBuffer(){let e=Xt.create(),r=this.#t.values();return e.writeInt(r.length),r.forEach(n=>{let i=n.serialize();e.writeInt(i.byteLength),e.writeBytes(new Int8Array(i))}),e.toArrayBuffer()}fromArrayBuffer(e,r=!0){te(this.#t.isEmpty(),"Cannot call fromArrayBuffer if boxes is not empty");let n=new rt(e),i=n.readInt();this.beginTransaction();let a=[];for(let o=0;o<i;o++){let s=n.readInt(),u=new Int8Array(s);n.readBytes(u);let d=new rt(u.buffer),m=d.readInt(),x=d.readString(),h=M.fromDataInput(d);a.push({creationIndex:m,name:x,uuid:h,boxStream:d})}a.sort((o,s)=>o.creationIndex-s.creationIndex).forEach(({name:o,uuid:s,boxStream:u})=>this.createBox(o,s,d=>d.read(u))),r?this.endTransaction():(this.#r.length>0&&(this.#r.forEach(({pointerField:o,update:s})=>this.#w(o,s)),this.#r.length=0),this.#l.clearAffected(),this.#g())}toJSON(){let e={};for(let r of this.#t.values())e[r.address.toString()]={name:r.name,fields:Ce(r.toJSON())};return e}fromJSON(e,r=!0){if(typeof e!="object"||e===null||Array.isArray(e))return V("Expected object");this.beginTransaction();let n=Object.entries(e);for(let[i,{name:a,fields:o}]of n)this.createBox(a,M.parse(i),s=>{let u=Ct(()=>s.fromJSON(o));u.status==="failure"&&console.warn(u.error)});r?this.endTransaction():(this.#r.length>0&&(this.#r.forEach(({pointerField:i,update:a})=>this.#w(i,a)),this.#r.length=0),this.#l.clearAffected(),this.#g())}#b(){te(this.#v,()=>"Modification only prohibited in transaction mode.")}};var ni;(function(t){t.insertOrder=(e,r=Number.MAX_SAFE_INTEGER)=>{let n=t.collectIndexedBoxes(e),i=at(r,0,n.length);if(i<n.length)for(let a=i;a<n.length;a++)n[a].index.setValue(a+1);return i},t.removeOrder=(e,r)=>{let n=t.collectIndexedBoxes(e);if(r<n.length)for(let i=r+1;i<n.length;i++)n[i].index.setValue(i-1)},t.moveIndex=(e,r,n)=>{let i=t.collectIndexedBoxes(e),a=i[r];if(n<0){let o=at(r+n,0,i.length-1);for(let s=o;s<r;s++)i[s].index.setValue(s+1);a.index.setValue(o)}else if(n>1){let o=at(r+(n-1),0,i.length-1);for(let s=r;s<o;s++)i[s+1].index.setValue(s);a.index.setValue(o)}else console.warn(`moveIndex had no effect: startIndex: ${r}, delta: ${n}`)},t.moveIndices=(e,r,n)=>{let i=t.collectIndexedBoxes(e),a=new Set(r),o=0;for(;o<r.length&&r[o]<n;)o++;let s=n-o,u=s,d=s+r.length,m=0,x=0,h=0;for(let w=0;w<i.length;w++){let A=i[w],_=a.has(w)?u+x++:w<n?m++:d+h++;A.index.setValue(_)}},t.isIndexedBox=e=>"index"in e&&e.index instanceof k,t.collectIndexedBoxes=(e,r)=>e.pointerHub.incoming().map(({box:n})=>t.isIndexedBox(n)&&(r===void 0||n instanceof r)?n:V(`${n} has no index field`)).sort((n,i)=>n.index.getValue()-i.index.getValue())})(ni||(ni={}));var Je=class extends G{#e;constructor(e){super(e),this.#e=this.initializeFields()}accept(e){return P(e.visitObjectField,this)}fields(){return Object.values(this.#e)}record(){return this.#e}getField(e){return Ce(this.#e[e])}optField(e){return b.wrap(this.#e[e])}subscribe(e){return this.graph.subscribeVertexUpdates(ze.Children,this.address,()=>this.graph.subscribeEndTransaction(()=>e(this)))}read(e){xo.readFields(e,this.#e)}write(e){xo.writeFields(e,this.#e)}toJSON(){if(!this.deprecated)return Object.entries(this.#e).reduce((e,[r,n])=>(e[r]=n.toJSON(),e),{})}fromJSON(e){if(!this.deprecated)if(rh(e))Object.entries(e).forEach(([r,n])=>{let i=this.#e[parseInt(r)];W(n)&&i.fromJSON(n)});else return V("Type mismatch")}};var yo;(function(t){t[t.Float=0]="Float",t[t.FloatArray=1]="FloatArray",t[t.Integer=2]="Integer",t[t.IntegerArray=3]="IntegerArray",t[t.ByteArray=4]="ByteArray"})(yo||(yo={}));var Xd;(function(t){t[t.WRITE=0]="WRITE",t[t.READ=1]="READ"})(Xd||(Xd={}));var du;(function(t){t[t.ID=15793935]="ID",t[t.START=15790320]="START",t[t.END=986895]="END"})(du||(du={}));var Ph=class t{static create(e,r){return new t(e.channel(r))}#e=[];#t=new SharedArrayBuffer(1);#r=new Int8Array(this.#t);#i;#n=Xt.create(0);#a=b.None;#o=b.None;#s=b.None;#c=-1;#l=-1;#u=!1;#p=!1;#d=0;constructor(e){this.#i=An.sender(e,({dispatchAndForget:r})=>new class{sendShareLock(n){r(this.sendShareLock,n)}sendUpdateData(n){r(this.sendUpdateData,n)}sendUpdateStructure(n){r(this.sendUpdateStructure,n)}})}flush(){let e=this.#v();if(e.nonEmpty()){this.#p||(this.#i.sendShareLock(this.#t),this.#p=!0),this.#i.sendUpdateStructure(e.unwrap());let r=this.#e.length,n=this.#f(),i=r+n;if(this.#a.isEmpty()||this.#a.unwrap().byteLength<i||r!==this.#d){let o=ah(i),s=new SharedArrayBuffer(o);this.#o=b.wrap(new Uint8Array(s,0,r)),this.#n=Xt.use(s,r),this.#a=b.wrap(s),this.#d=r,this.#i.sendUpdateData(s)}}this.#a.isEmpty()||Atomics.load(this.#r,0)===Xd.WRITE&&(this.#m(this.#n),this.#n.position=0,Atomics.store(this.#r,0,Xd.READ))}broadcastFloat(e,r){return this.#h(new class{type=yo.Float;address=e;capacity=8;put(n,i){n.writeFloat(r())}})}broadcastInteger(e,r){return this.#h(new class{type=yo.Integer;address=e;capacity=8;put(n,i){n.writeInt(r())}})}broadcastFloats(e,r,n){return this.#h(new class{type=yo.FloatArray;address=e;capacity=4+(r.byteLength<<2);put(i,a){n?.(a),i.writeInt(r.length);for(let o of r)i.writeFloat(o)}})}broadcastIntegers(e,r,n){return this.#h(new class{type=yo.IntegerArray;address=e;capacity=4+(r.byteLength<<2);put(i,a){n(a),i.writeInt(r.length),r.forEach(o=>i.writeInt(o))}})}broadcastByteArray(e,r,n){return this.#h(new class{type=yo.ByteArray;address=e;capacity=4+r.byteLength;put(i,a){n(a),i.writeInt(r.byteLength),i.writeBytes(r)}})}#v(){if(this.#u){try{this.#s=b.wrap(this.#g())}catch(e){throw e}this.#u=!1}if(this.#s.nonEmpty()){let e=this.#s;return this.#s=b.None,e}return b.None}#f(){return this.#l===-1&&(this.#l=this.#w()+12),this.#l}terminate(){ue.clear(this.#e),this.#s=b.None,this.#u=!1,this.#l=0}#m(e){te(!this.#u&&this.#s.isEmpty(),"Cannot flush while update is available");let r=this.#f();te(e.remaining>=r,"Insufficient data"),e.writeInt(this.#c),e.writeInt(du.START);let n=this.#o;for(let i=0;i<this.#e.length;i++){let a=n.nonEmpty()&&n.unwrap()[i]!==0;this.#e[i].put(e,a)}e.writeInt(du.END)}#w(){return this.#e.reduce((e,r)=>e+r.capacity,0)}#h(e){return this.#e.push(e),this.#x(),{terminate:()=>{ue.removeOpt(this.#e,e),this.#x()}}}#x(){this.#l=-1,this.#u=!0}#g(){let e=Xt.create();e.writeInt(du.ID),e.writeInt(++this.#c),e.writeInt(this.#e.length);for(let{address:r,type:n}of this.#e)r.write(e),e.writeByte(n);return e.toArrayBuffer()}};var Yd=class{#e=new Y;#t;constructor(e,r){this.#t=this.#e.own(new fh(r)),this.#e.own(An.executor(e,{updateSettings:n=>this.#t.update(n)}))}get settings(){return this.#t.data}catchupAndSubscribe(e,...r){return this.#t.catchupAndSubscribe(e,...r)}terminate(){this.#e.terminate(),this.#t.terminate()}};var US;(function(t){t.NoSync="nosync",t.Pitch="pitch",t.Timestretch="timestretch",t.AudioFit="audiofit"})(US||(US={}));var VS;(function(t){t[t.Pre=0]="Pre",t[t.Post=1]="Post"})(VS||(VS={}));var At;(function(t){t.Instrument="instrument",t.Bus="bus",t.Aux="aux",t.Output="output"})(At||(At={}));var wo={white:new Ht(0,0,100),blue:new Ht(189,100,65),green:new Ht(150,77,69),yellow:new Ht(60,100,84),cream:new Ht(65,20,83),orange:new Ht(31,100,73),red:new Ht(354,100,65),purple:new Ht(314,100,78),bright:new Ht(197,5,95),gray:new Ht(197,31,88),dark:new Ht(197,15,70),shadow:new Ht(197,10,55),black:new Ht(197,10,20),background:new Ht(197,8,7),panelBackground:new Ht(197,14,9),panelBackgroundBright:new Ht(197,13,15),panelBackgroundDark:new Ht(197,14,7)};var Le;(function(t){t[t.Add=0]="Add",t[t.Adsr=1]="Adsr",t[t.ArrowDown=2]="ArrowDown",t[t.ArrowLeft=3]="ArrowLeft",t[t.ArrowRight=4]="ArrowRight",t[t.ArrowUp=5]="ArrowUp",t[t.AudioBus=6]="AudioBus",t[t.AudioDevice=7]="AudioDevice",t[t.AudioFile=8]="AudioFile",t[t.AutoGain=9]="AutoGain",t[t.Automation=10]="Automation",t[t.BassGuitar=11]="BassGuitar",t[t.Book=12]="Book",t[t.Box=13]="Box",t[t.Browse=14]="Browse",t[t.Bug=15]="Bug",t[t.Capture=16]="Capture",t[t.Chain=17]="Chain",t[t.ChatEmpty=18]="ChatEmpty",t[t.ChatMessage=19]="ChatMessage",t[t.Copy=20]="Copy",t[t.Maximizer=21]="Maximizer",t[t.Fold=22]="Fold",t[t.Folder=23]="Folder",t[t.Charts=24]="Charts",t[t.Checkbox=25]="Checkbox",t[t.Clips=26]="Clips",t[t.Close=27]="Close",t[t.CloudFolder=28]="CloudFolder",t[t.Code=29]="Code",t[t.CollapseDown=30]="CollapseDown",t[t.Compressor=31]="Compressor",t[t.Connected=32]="Connected",t[t.Cube=33]="Cube",t[t.Cursor=34]="Cursor",t[t.Curve=35]="Curve",t[t.Dattorro=36]="Dattorro",t[t.Delete=37]="Delete",t[t.Dial=38]="Dial",t[t.DinSlot=39]="DinSlot",t[t.Disconnected=40]="Disconnected",t[t.Divide=41]="Divide",t[t.DragConnections=42]="DragConnections",t[t.Dropdown=43]="Dropdown",t[t.Dropbox=44]="Dropbox",t[t.DrumSet=45]="DrumSet",t[t.Tidal=46]="Tidal",t[t.Duration=47]="Duration",t[t.EditBox=48]="EditBox",t[t.Effects=49]="Effects",t[t.Embed=50]="Embed",t[t.EQ=51]="EQ",t[t.Eraser=52]="Eraser",t[t.Exclude=53]="Exclude",t[t.Exit=54]="Exit",t[t.ExpandWidth=55]="ExpandWidth",t[t.FileList=56]="FileList",t[t.Film=57]="Film",t[t.Flask=58]="Flask",t[t.Focus=59]="Focus",t[t.Fullscreen=60]="Fullscreen",t[t.Gate=61]="Gate",t[t.Generator=62]="Generator",t[t.GoogleDrive=63]="GoogleDrive",t[t.Nextcloud=64]="Nextcloud",t[t.Groove=65]="Groove",t[t.Guitar=66]="Guitar",t[t.GuitarTab=67]="GuitarTab",t[t.Headphone=68]="Headphone",t[t.Heart=69]="Heart",t[t.Help=70]="Help",t[t.HighPass=71]="HighPass",t[t.HighShelf=72]="HighShelf",t[t.Insert=73]="Insert",t[t.InsertDown=74]="InsertDown",t[t.Invert=75]="Invert",t[t.Info=76]="Info",t[t.Lock=77]="Lock",t[t.Loop=78]="Loop",t[t.LoopEnd=79]="LoopEnd",t[t.LoopStart=80]="LoopStart",t[t.LowPass=81]="LowPass",t[t.LowShelf=82]="LowShelf",t[t.Magnet=83]="Magnet",t[t.MainMenu=84]="MainMenu",t[t.Maximized=85]="Maximized",t[t.Menu=86]="Menu",t[t.Merge=87]="Merge",t[t.Metronome=88]="Metronome",t[t.Microphone=89]="Microphone",t[t.Midi=90]="Midi",t[t.Minimized=91]="Minimized",t[t.Mix=92]="Mix",t[t.Mixing=93]="Mixing",t[t.Mute=94]="Mute",t[t.NanoWave=95]="NanoWave",t[t.NeuralAmp=96]="NeuralAmp",t[t.New=97]="New",t[t.NoAudio=98]="NoAudio",t[t.Note=99]="Note",t[t.NotePad=100]="NotePad",t[t.Notification=101]="Notification",t[t.OpenDAW=102]="OpenDAW",t[t.Panel=103]="Panel",t[t.Paste=104]="Paste",t[t.Peak=105]="Peak",t[t.Pencil=106]="Pencil",t[t.Piano=107]="Piano",t[t.Play=108]="Play",t[t.Playfield=109]="Playfield",t[t.PlayOnce=110]="PlayOnce",t[t.PlayRepeat=111]="PlayRepeat",t[t.PlayAlternate=112]="PlayAlternate",t[t.Pointer=113]="Pointer",t[t.Popout=114]="Popout",t[t.Primary=115]="Primary",t[t.Random=116]="Random",t[t.Record=117]="Record",t[t.Rectangle=118]="Rectangle",t[t.Redo=119]="Redo",t[t.Region=120]="Region",t[t.Robot=121]="Robot",t[t.RoundDown=122]="RoundDown",t[t.RoundUp=123]="RoundUp",t[t.Run=124]="Run",t[t.Sawtooth=125]="Sawtooth",t[t.Saxophone=126]="Saxophone",t[t.Scissors=127]="Scissors",t[t.Search=128]="Search",t[t.Share=129]="Share",t[t.SelectDown=130]="SelectDown",t[t.SelectUp=131]="SelectUp",t[t.Shadertoy=132]="Shadertoy",t[t.Shutdown=133]="Shutdown",t[t.Sine=134]="Sine",t[t.Solo=135]="Solo",t[t.SoundFont=136]="SoundFont",t[t.Speaker=137]="Speaker",t[t.SpeakerHeadphone=138]="SpeakerHeadphone",t[t.Square=139]="Square",t[t.Stack=140]="Stack",t[t.Start=141]="Start",t[t.Stereo=142]="Stereo",t[t.Stop=143]="Stop",t[t.Subtract=144]="Subtract",t[t.Sun=145]="Sun",t[t.Swap=146]="Swap",t[t.System=147]="System",t[t.Table=148]="Table",t[t.Tape=149]="Tape",t[t.TapeReel=150]="TapeReel",t[t.Time=151]="Time",t[t.Timeline=152]="Timeline",t[t.Tone3000=153]="Tone3000",t[t.Tool=154]="Tool",t[t.Triangle=155]="Triangle",t[t.Undo=156]="Undo",t[t.Unknown=157]="Unknown",t[t.UserFolder=158]="UserFolder",t[t.Velocity=159]="Velocity",t[t.Vinyl=160]="Vinyl",t[t.Vocoder=161]="Vocoder",t[t.Volume=162]="Volume",t[t.VUMeter=163]="VUMeter",t[t.Warning=164]="Warning",t[t.Waveform=165]="Waveform",t[t.Zeitgeist=166]="Zeitgeist"})(Le||(Le={}));(function(t){t.toName=e=>t[e],t.fromName=e=>t[e]??t.Rectangle})(Le||(Le={}));var l;(function(t){t[t.Deprecated=NaN]="Deprecated",t[t.MetaData=0]="MetaData",t[t.AudioBusses=1]="AudioBusses",t[t.AudioConnection=2]="AudioConnection",t[t.AudioEffectHost=3]="AudioEffectHost",t[t.AudioFile=4]="AudioFile",t[t.AudioOutput=5]="AudioOutput",t[t.AudioPlayMode=6]="AudioPlayMode",t[t.AudioUnit=7]="AudioUnit",t[t.AudioUnits=8]="AudioUnits",t[t.Automation=9]="Automation",t[t.AuxSend=10]="AuxSend",t[t.Capture=11]="Capture",t[t.ClipCollection=12]="ClipCollection",t[t.ConnectionCollection=13]="ConnectionCollection",t[t.Device=14]="Device",t[t.DeviceUserInterface=15]="DeviceUserInterface",t[t.Editing=16]="Editing",t[t.FileUploadState=17]="FileUploadState",t[t.Groove=18]="Groove",t[t.InstrumentHost=19]="InstrumentHost",t[t.MarkerEvents=20]="MarkerEvents",t[t.MarkerTrack=21]="MarkerTrack",t[t.MIDIControl=22]="MIDIControl",t[t.MIDIControllers=23]="MIDIControllers",t[t.MIDIDevice=24]="MIDIDevice",t[t.MIDIEffectHost=25]="MIDIEffectHost",t[t.ModularSetup=26]="ModularSetup",t[t.Modulation=27]="Modulation",t[t.ModuleCollection=28]="ModuleCollection",t[t.NoteEventCollection=29]="NoteEventCollection",t[t.NoteEventFeature=30]="NoteEventFeature",t[t.NoteEvents=31]="NoteEvents",t[t.NotesConnection=32]="NotesConnection",t[t.Parameter=33]="Parameter",t[t.ParameterController=34]="ParameterController",t[t.PianoMode=35]="PianoMode",t[t.ProjectMeta=36]="ProjectMeta",t[t.RegionCollection=37]="RegionCollection",t[t.Sample=38]="Sample",t[t.Selection=39]="Selection",t[t.Shadertoy=40]="Shadertoy",t[t.SideChain=41]="SideChain",t[t.SignatureAutomation=42]="SignatureAutomation",t[t.SoundfontFile=43]="SoundfontFile",t[t.StepAutomation=44]="StepAutomation",t[t.Timeline=45]="Timeline",t[t.TrackCollection=46]="TrackCollection",t[t.TransientMarkers=47]="TransientMarkers",t[t.User=48]="User",t[t.ValueEventCollection=49]="ValueEventCollection",t[t.ValueEvents=50]="ValueEvents",t[t.ValueInterpolation=51]="ValueInterpolation",t[t.VoltageConnection=52]="VoltageConnection",t[t.WarpMarkers=53]="WarpMarkers",t[t.NeuralAmpModel=54]="NeuralAmpModel",t[t.CompositeCell=55]="CompositeCell"})(l||(l={}));var $h;(function(t){t[t.Once=0]="Once",t[t.Repeat=1]="Repeat",t[t.Pingpong=2]="Pingpong"})($h||($h={}));var Bs;(function(t){t[t.Monophonic=0]="Monophonic",t[t.Polyphonic=1]="Polyphonic"})(Bs||(Bs={}));var jS=(t,e)=>{if(t===e)return 0;let r=t-e;return r===0?V(`Indices cannot be equal (${t}, ${e})`):r};var Va=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},br=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kh,Fn,bo,Nh,ja,ur=class t{static create(e,r,n){return new t(e,r,n)}constructor(e,r,n){kh.set(this,void 0),Fn.set(this,void 0),bo.set(this,void 0),Nh.set(this,void 0),ja.set(this,null),Va(this,kh,e,"f"),Va(this,Fn,M.newSet(i=>i.adapter.uuid),"f"),Va(this,bo,new Yt,"f"),Va(this,Nh,e.pointerHub.catchupAndSubscribe({onAdded:i=>{Va(this,ja,null,"f");let a=r(i.box),o=a.indexField.subscribe(()=>{Va(this,ja,null,"f"),br(this,bo,"f").proxy.onReorder(a)}),s=br(this,Fn,"f").add({adapter:a,subscription:o});te(s,`Could not add ${a}`),br(this,bo,"f").proxy.onAdd(a)},onRemoved:i=>{Va(this,ja,null,"f");let a=i.box.address.uuid,{adapter:o,subscription:s}=br(this,Fn,"f").removeByKey(a);s.terminate(),br(this,bo,"f").proxy.onRemove(o)}},n),"f")}field(){return br(this,kh,"f")}subscribe(e){return br(this,bo,"f").subscribe(e)}catchupAndSubscribe(e){return br(this,Fn,"f").forEach(({adapter:r})=>e.onAdd(r)),this.subscribe(e)}getAdapterByIndex(e){let r=mt.exactMapped(this.adapters(),e,jS,n=>n.indexField.getValue());return r===-1?b.None:b.wrap(this.adapters()[r])}getAdapterById(e){return br(this,Fn,"f").opt(e).map(({adapter:r})=>r)}getMinFreeIndex(){let e=this.adapters();for(let r=0;r<e.length;r++)if(e[r].indexField.getValue()>r)return r;return e.length}adapters(){return br(this,ja,"f")===null&&Va(this,ja,br(this,Fn,"f").values().map(({adapter:e})=>e).sort((e,r)=>e.indexField.getValue()-r.indexField.getValue()),"f"),br(this,ja,"f")}move(e,r){this.moveIndex(e.indexField.getValue(),r)}moveIndex(e,r){if(r===0)return;let n=this.adapters(),i=n[e],a=at(e+r,0,n.length-1);if(a!==e){if(r<0)for(let o=a;o<e;o++)n[o].indexField.setValue(o+1);else for(let o=e;o<a;o++)n[o+1].indexField.setValue(o);i.indexField.setValue(a)}}size(){return br(this,Fn,"f").size()}isEmpty(){return this.size()===0}terminate(){Va(this,ja,null,"f"),br(this,Fn,"f").forEach(({subscription:e})=>e.terminate()),br(this,Fn,"f").clear(),br(this,bo,"f").terminate(),br(this,Nh,"f").terminate()}};kh=new WeakMap,Fn=new WeakMap,bo=new WeakMap,Nh=new WeakMap,ja=new WeakMap;var Ka;(function(t){t.names=["MetaDataBox","ProjectMetaBox","RootBox","SelectionBox","UserInterfaceBox","UploadFileBox","ShadertoyBox","MIDIControllerBox","TimelineBox","TrackBox","NoteEventBox","NoteEventRepeatBox","NoteEventCollectionBox","NoteRegionBox","NoteClipBox","ValueEventBox","ValueEventCollectionBox","ValueEventCurveBox","ValueRegionBox","ValueClipBox","SignatureEventBox","AudioRegionBox","AudioClipBox","AudioPitchStretchBox","AudioTimeStretchBox","TransientMarkerBox","WarpMarkerBox","MarkerBox","AudioFileBox","SoundfontFileBox","NeuralAmpModelBox","AudioUnitBox","CaptureAudioBox","CaptureMidiBox","AudioBusBox","AuxSendBox","GrooveShuffleBox","UnknownAudioEffectDeviceBox","UnknownMidiEffectDeviceBox","DeviceInterfaceKnobBox","ModularDeviceBox","StereoToolDeviceBox","MaximizerDeviceBox","CompressorDeviceBox","GateDeviceBox","DelayDeviceBox","CrusherDeviceBox","DattorroReverbDeviceBox","VelocityDeviceBox","FoldDeviceBox","TidalDeviceBox","RevampDeviceBox","ReverbDeviceBox","VaporisateurDeviceBox","MIDIOutputDeviceBox","MIDIOutputBox","MIDIOutputParameterBox","SoundfontDeviceBox","NanoDeviceBox","PlayfieldDeviceBox","PlayfieldSampleBox","TapeDeviceBox","ArpeggioDeviceBox","PitchDeviceBox","ZeitgeistDeviceBox","NeuralAmpDeviceBox","VocoderDeviceBox","WaveshaperDeviceBox","WerkstattDeviceBox","WerkstattParameterBox","WerkstattSampleBox","SpielwerkDeviceBox","ApparatDeviceBox","NoopInstrumentBox","CompositeDeviceBox","CompositeCellBox","ModularBox","ModuleConnectionBox","ModularAudioInputBox","ModularAudioOutputBox","ModuleDelayBox","ModuleMultiplierBox","ModuleGainBox"],t.create=(e,r,n,i)=>{switch(e){case"MetaDataBox":return En.create(r,n,i);case"ProjectMetaBox":return Mh.create(r,n,i);case"RootBox":return _o.create(r,n,i);case"SelectionBox":return na.create(r,n,i);case"UserInterfaceBox":return Wa.create(r,n,i);case"UploadFileBox":return Ih.create(r,n,i);case"ShadertoyBox":return Bh.create(r,n,i);case"MIDIControllerBox":return Th.create(r,n,i);case"TimelineBox":return Ts.create(r,n,i);case"TrackBox":return Mr.create(r,n,i);case"NoteEventBox":return Ao.create(r,n,i);case"NoteEventRepeatBox":return Dh.create(r,n,i);case"NoteEventCollectionBox":return La.create(r,n,i);case"NoteRegionBox":return Ds.create(r,n,i);case"NoteClipBox":return pu.create(r,n,i);case"ValueEventBox":return Sn.create(r,n,i);case"ValueEventCollectionBox":return Pn.create(r,n,i);case"ValueEventCurveBox":return Fo.create(r,n,i);case"ValueRegionBox":return Rs.create(r,n,i);case"ValueClipBox":return fu.create(r,n,i);case"SignatureEventBox":return mu.create(r,n,i);case"AudioRegionBox":return Eo.create(r,n,i);case"AudioClipBox":return hu.create(r,n,i);case"AudioPitchStretchBox":return gu.create(r,n,i);case"AudioTimeStretchBox":return vu.create(r,n,i);case"TransientMarkerBox":return Rh.create(r,n,i);case"WarpMarkerBox":return So.create(r,n,i);case"MarkerBox":return xu.create(r,n,i);case"AudioFileBox":return Wi.create(r,n,i);case"SoundfontFileBox":return aa.create(r,n,i);case"NeuralAmpModelBox":return Ch.create(r,n,i);case"AudioUnitBox":return Xe.create(r,n,i);case"CaptureAudioBox":return oa.create(r,n,i);case"CaptureMidiBox":return sa.create(r,n,i);case"AudioBusBox":return $n.create(r,n,i);case"AuxSendBox":return yu.create(r,n,i);case"GrooveShuffleBox":return wu.create(r,n,i);case"UnknownAudioEffectDeviceBox":return zh.create(r,n,i);case"UnknownMidiEffectDeviceBox":return Oh.create(r,n,i);case"DeviceInterfaceKnobBox":return Uh.create(r,n,i);case"ModularDeviceBox":return Vh.create(r,n,i);case"StereoToolDeviceBox":return jh.create(r,n,i);case"MaximizerDeviceBox":return bu.create(r,n,i);case"CompressorDeviceBox":return Kh.create(r,n,i);case"GateDeviceBox":return Wh.create(r,n,i);case"DelayDeviceBox":return Lh.create(r,n,i);case"CrusherDeviceBox":return Zh.create(r,n,i);case"DattorroReverbDeviceBox":return Gh.create(r,n,i);case"VelocityDeviceBox":return Hh.create(r,n,i);case"FoldDeviceBox":return qh.create(r,n,i);case"TidalDeviceBox":return Jh.create(r,n,i);case"RevampDeviceBox":return Xh.create(r,n,i);case"ReverbDeviceBox":return Yh.create(r,n,i);case"VaporisateurDeviceBox":return _u.create(r,n,i);case"MIDIOutputDeviceBox":return Au.create(r,n,i);case"MIDIOutputBox":return Po.create(r,n,i);case"MIDIOutputParameterBox":return Cs.create(r,n,i);case"SoundfontDeviceBox":return Fu.create(r,n,i);case"NanoDeviceBox":return Eu.create(r,n,i);case"PlayfieldDeviceBox":return Su.create(r,n,i);case"PlayfieldSampleBox":return $o.create(r,n,i);case"TapeDeviceBox":return Pu.create(r,n,i);case"ArpeggioDeviceBox":return Qh.create(r,n,i);case"PitchDeviceBox":return eg.create(r,n,i);case"ZeitgeistDeviceBox":return tg.create(r,n,i);case"NeuralAmpDeviceBox":return rg.create(r,n,i);case"VocoderDeviceBox":return ig.create(r,n,i);case"WaveshaperDeviceBox":return ng.create(r,n,i);case"WerkstattDeviceBox":return ag.create(r,n,i);case"WerkstattParameterBox":return la.create(r,n,i);case"WerkstattSampleBox":return zs.create(r,n,i);case"SpielwerkDeviceBox":return og.create(r,n,i);case"ApparatDeviceBox":return $u.create(r,n,i);case"NoopInstrumentBox":return ku.create(r,n,i);case"CompositeDeviceBox":return sg.create(r,n,i);case"CompositeCellBox":return lg.create(r,n,i);case"ModularBox":return ug.create(r,n,i);case"ModuleConnectionBox":return cg.create(r,n,i);case"ModularAudioInputBox":return dg.create(r,n,i);case"ModularAudioOutputBox":return pg.create(r,n,i);case"ModuleDelayBox":return fg.create(r,n,i);case"ModuleMultiplierBox":return mg.create(r,n,i);case"ModuleGainBox":return hg.create(r,n,i);default:return V(`Unknown box class '${e}'`)}},t.deserialize=(e,r)=>{let n=new rt(r),i=n.readString(),a=M.fromDataInput(n),o=t.create(i,e,a);return o.read(n),o}})(Ka||(Ka={}));var En=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"MetaDataBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="MetaDataBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitMetaDataBox,this)}get tags(){return t.Tags}get target(){return this.getField(1)}get origin(){return this.getField(2)}get value(){return this.getField(3)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"target",deprecated:!1,pointerRules:p},l.MetaData,!0),2:B.create({parent:this,fieldKey:2,fieldName:"origin",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"value",deprecated:!1,pointerRules:p},"{}")}}};var Mh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ProjectMetaBox",pointerRules:{accepts:[l.ProjectMeta],mandatory:!0,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ProjectMetaBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitProjectMetaBox,this)}get tags(){return t.Tags}get projectName(){return this.getField(1)}get artist(){return this.getField(2)}get description(){return this.getField(3)}get tagList(){return this.getField(4)}get notepad(){return this.getField(5)}get created(){return this.getField(6)}get modified(){return this.getField(7)}get coverId(){return this.getField(8)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"projectName",deprecated:!1,pointerRules:p}),2:B.create({parent:this,fieldKey:2,fieldName:"artist",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"description",deprecated:!1,pointerRules:p}),4:B.create({parent:this,fieldKey:4,fieldName:"tagList",deprecated:!1,pointerRules:p},"[]"),5:B.create({parent:this,fieldKey:5,fieldName:"notepad",deprecated:!1,pointerRules:p}),6:B.create({parent:this,fieldKey:6,fieldName:"created",deprecated:!1,pointerRules:p}),7:B.create({parent:this,fieldKey:7,fieldName:"modified",deprecated:!1,pointerRules:p}),8:B.create({parent:this,fieldKey:8,fieldName:"coverId",deprecated:!1,pointerRules:p})}}};var gg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get keyboard(){return this.getField(1)}get timeRangeInQuarters(){return this.getField(2)}get noteScale(){return this.getField(3)}get noteLabels(){return this.getField(4)}get transpose(){return this.getField(5)}initializeFields(){return{1:k.create({parent:this,fieldKey:1,fieldName:"keyboard",deprecated:!1,pointerRules:p},{length:4},"",0),2:E.create({parent:this,fieldKey:2,fieldName:"timeRangeInQuarters",deprecated:!1,pointerRules:p},{min:1,max:64,scaling:"linear"},"",8),3:E.create({parent:this,fieldKey:3,fieldName:"noteScale",deprecated:!1,pointerRules:p},{min:.5,max:2,scaling:"linear"},"",1),4:R.create({parent:this,fieldKey:4,fieldName:"noteLabels",deprecated:!1,pointerRules:p},!1),5:k.create({parent:this,fieldKey:5,fieldName:"transpose",deprecated:!1,pointerRules:p},{min:-48,max:48},"st",0)}}};var _o=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"RootBox",pointerRules:{accepts:[l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="RootBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitRootBox,this)}get tags(){return t.Tags}get timeline(){return this.getField(1)}get users(){return this.getField(2)}get created(){return this.getField(3)}get groove(){return this.getField(4)}get baseFrequency(){return this.getField(5)}get modularSetups(){return this.getField(10)}get audioUnits(){return this.getField(20)}get audioBusses(){return this.getField(21)}get outputDevice(){return this.getField(30)}get outputMidiDevices(){return this.getField(35)}get pianoMode(){return this.getField(40)}get shadertoy(){return this.getField(100)}get projectMeta(){return this.getField(101)}get editingChannel(){return this.getField(111)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"timeline",deprecated:!1,pointerRules:p},l.Timeline,!0),2:G.hook({parent:this,fieldKey:2,fieldName:"users",deprecated:!1,pointerRules:{accepts:[l.User],mandatory:!1,exclusive:!1}}),3:B.create({parent:this,fieldKey:3,fieldName:"created",deprecated:!1,pointerRules:p}),4:N.create({parent:this,fieldKey:4,fieldName:"groove",deprecated:!1,pointerRules:p},l.Groove,!0),5:E.create({parent:this,fieldKey:5,fieldName:"baseFrequency",deprecated:!1,pointerRules:p},{min:400,max:480,scaling:"linear"},"Hz",440),10:G.hook({parent:this,fieldKey:10,fieldName:"modularSetups",deprecated:!1,pointerRules:{accepts:[l.ModularSetup],mandatory:!1,exclusive:!1}}),20:G.hook({parent:this,fieldKey:20,fieldName:"audioUnits",deprecated:!1,pointerRules:{accepts:[l.AudioUnits],mandatory:!1,exclusive:!1}}),21:G.hook({parent:this,fieldKey:21,fieldName:"audioBusses",deprecated:!1,pointerRules:{accepts:[l.AudioBusses],mandatory:!1,exclusive:!1}}),30:G.hook({parent:this,fieldKey:30,fieldName:"outputDevice",deprecated:!1,pointerRules:{accepts:[l.AudioOutput],mandatory:!0,exclusive:!1}}),35:G.hook({parent:this,fieldKey:35,fieldName:"outputMidiDevices",deprecated:!1,pointerRules:{accepts:[l.MIDIDevice],mandatory:!1,exclusive:!1}}),40:gg.create({parent:this,fieldKey:40,fieldName:"pianoMode",deprecated:!1,pointerRules:p}),100:N.create({parent:this,fieldKey:100,fieldName:"shadertoy",deprecated:!1,pointerRules:p},l.Shadertoy,!1),101:N.create({parent:this,fieldKey:101,fieldName:"projectMeta",deprecated:!1,pointerRules:p},l.ProjectMeta,!1),111:N.create({parent:this,fieldKey:111,fieldName:"editingChannel",deprecated:!1,pointerRules:p},l.Editing,!1)}}};var na=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"SelectionBox",pointerRules:p,resource:void 0,ephemeral:!0}),n)}static ClassName="SelectionBox";static Resource=void 0;static Ephemeral=!0;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitSelectionBox,this)}get tags(){return t.Tags}get selection(){return this.getField(1)}get selectable(){return this.getField(2)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"selection",deprecated:!1,pointerRules:p},l.Selection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"selectable",deprecated:!1,pointerRules:p},l.Selection,!0)}}};var Wa=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"UserInterfaceBox",pointerRules:{accepts:[l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="UserInterfaceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitUserInterfaceBox,this)}get tags(){return t.Tags}get root(){return this.getField(1)}get selection(){return this.getField(10)}get uploadStates(){return this.getField(11)}get editingDeviceChain(){return this.getField(21)}get editingTimelineRegion(){return this.getField(22)}get editingModularSystem(){return this.getField(23)}get midiControllers(){return this.getField(30)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"root",deprecated:!1,pointerRules:p},l.User,!0),10:G.hook({parent:this,fieldKey:10,fieldName:"selection",deprecated:!1,pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1}}),11:G.hook({parent:this,fieldKey:11,fieldName:"uploadStates",deprecated:!1,pointerRules:{accepts:[l.FileUploadState],mandatory:!1,exclusive:!1}}),21:N.create({parent:this,fieldKey:21,fieldName:"editingDeviceChain",deprecated:!1,pointerRules:p},l.Editing,!1),22:N.create({parent:this,fieldKey:22,fieldName:"editingTimelineRegion",deprecated:!1,pointerRules:p},l.Editing,!1),23:N.create({parent:this,fieldKey:23,fieldName:"editingModularSystem",deprecated:!1,pointerRules:p},l.Editing,!1),30:G.hook({parent:this,fieldKey:30,fieldName:"midiControllers",deprecated:!1,pointerRules:{accepts:[l.MIDIControllers],mandatory:!1,exclusive:!1}})}}};var Ih=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"UploadFileBox",pointerRules:p,resource:void 0,ephemeral:!0}),n)}static ClassName="UploadFileBox";static Resource=void 0;static Ephemeral=!0;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitUploadFileBox,this)}get tags(){return t.Tags}get user(){return this.getField(1)}get file(){return this.getField(2)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"user",deprecated:!1,pointerRules:p},l.FileUploadState,!0),2:N.create({parent:this,fieldKey:2,fieldName:"file",deprecated:!1,pointerRules:p},l.FileUploadState,!0)}}};var Bh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ShadertoyBox",pointerRules:{accepts:[l.Shadertoy],mandatory:!0,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ShadertoyBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitShadertoyBox,this)}get tags(){return t.Tags}get shaderCode(){return this.getField(1)}get highres(){return this.getField(2)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"shaderCode",deprecated:!1,pointerRules:p}),2:R.create({parent:this,fieldKey:2,fieldName:"highres",deprecated:!1,pointerRules:p},!0)}}};var Th=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"MIDIControllerBox",pointerRules:p,resource:void 0,ephemeral:!0}),n)}static ClassName="MIDIControllerBox";static Resource=void 0;static Ephemeral=!0;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitMIDIControllerBox,this)}get tags(){return t.Tags}get controllers(){return this.getField(1)}get parameter(){return this.getField(2)}get deviceId(){return this.getField(3)}get deviceChannel(){return this.getField(4)}get controlId(){return this.getField(5)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"controllers",deprecated:!1,pointerRules:p},l.MIDIControllers,!0),2:N.create({parent:this,fieldKey:2,fieldName:"parameter",deprecated:!1,pointerRules:p},l.MIDIControl,!0),3:B.create({parent:this,fieldKey:3,fieldName:"deviceId",deprecated:!1,pointerRules:p}),4:k.create({parent:this,fieldKey:4,fieldName:"deviceChannel",deprecated:!1,pointerRules:p},{min:0,max:127},""),5:k.create({parent:this,fieldKey:5,fieldName:"controlId",deprecated:!1,pointerRules:p},{min:0,max:127},"")}}};var vg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get nominator(){return this.getField(1)}get denominator(){return this.getField(2)}initializeFields(){return{1:k.create({parent:this,fieldKey:1,fieldName:"nominator",deprecated:!1,pointerRules:p},{min:1,max:32},"",4),2:k.create({parent:this,fieldKey:2,fieldName:"denominator",deprecated:!1,pointerRules:p},{min:1,max:32},"",4)}}};var xg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get enabled(){return this.getField(1)}get from(){return this.getField(2)}get to(){return this.getField(3)}initializeFields(){return{1:R.create({parent:this,fieldKey:1,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),2:k.create({parent:this,fieldKey:2,fieldName:"from",deprecated:!1,pointerRules:p},"any","ppqn",0),3:k.create({parent:this,fieldKey:3,fieldName:"to",deprecated:!1,pointerRules:p},"any","ppqn",15360)}}};var yg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get markers(){return this.getField(1)}get index(){return this.getField(10)}get enabled(){return this.getField(20)}initializeFields(){return{1:G.hook({parent:this,fieldKey:1,fieldName:"markers",deprecated:!1,pointerRules:{accepts:[l.MarkerTrack],mandatory:!1,exclusive:!1}}),10:k.create({parent:this,fieldKey:10,fieldName:"index",deprecated:!1,pointerRules:p},"index","",0),20:R.create({parent:this,fieldKey:20,fieldName:"enabled",deprecated:!1,pointerRules:p},!0)}}};var wg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get events(){return this.getField(1)}get index(){return this.getField(10)}get minBpm(){return this.getField(15)}get maxBpm(){return this.getField(16)}get enabled(){return this.getField(20)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"events",deprecated:!1,pointerRules:p},l.ValueEventCollection,!1),10:k.create({parent:this,fieldKey:10,fieldName:"index",deprecated:!1,pointerRules:p},"index","",2),15:k.create({parent:this,fieldKey:15,fieldName:"minBpm",deprecated:!1,pointerRules:p},{min:30,max:999},"bpm",60),16:k.create({parent:this,fieldKey:16,fieldName:"maxBpm",deprecated:!1,pointerRules:p},{min:31,max:1e3},"bpm",240),20:R.create({parent:this,fieldKey:20,fieldName:"enabled",deprecated:!1,pointerRules:p},!0)}}};var bg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get events(){return this.getField(1)}get index(){return this.getField(10)}get enabled(){return this.getField(20)}initializeFields(){return{1:G.hook({parent:this,fieldKey:1,fieldName:"events",deprecated:!1,pointerRules:{accepts:[l.SignatureAutomation],mandatory:!1,exclusive:!1}}),10:k.create({parent:this,fieldKey:10,fieldName:"index",deprecated:!1,pointerRules:p},"index","",1),20:R.create({parent:this,fieldKey:20,fieldName:"enabled",deprecated:!1,pointerRules:p},!0)}}};var Ts=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"TimelineBox",pointerRules:{accepts:[l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="TimelineBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitTimelineBox,this)}get tags(){return t.Tags}get root(){return this.getField(1)}get signature(){return this.getField(10)}get loopArea(){return this.getField(11)}get deprecatedMarkerTrack(){return this.getField(20)}get markerTrack(){return this.getField(21)}get tempoTrack(){return this.getField(22)}get signatureTrack(){return this.getField(23)}get durationInPulses(){return this.getField(30)}get bpm(){return this.getField(31)}initializeFields(){return{1:G.hook({parent:this,fieldKey:1,fieldName:"root",deprecated:!1,pointerRules:{accepts:[l.Timeline],mandatory:!0,exclusive:!1}}),10:vg.create({parent:this,fieldKey:10,fieldName:"signature",deprecated:!1,pointerRules:p}),11:xg.create({parent:this,fieldKey:11,fieldName:"loopArea",deprecated:!1,pointerRules:p}),20:G.hook({parent:this,fieldKey:20,fieldName:"deprecatedMarkerTrack",deprecated:!0,pointerRules:{accepts:[l.MarkerTrack],mandatory:!1,exclusive:!1}}),21:yg.create({parent:this,fieldKey:21,fieldName:"markerTrack",deprecated:!1,pointerRules:p}),22:wg.create({parent:this,fieldKey:22,fieldName:"tempoTrack",deprecated:!1,pointerRules:p}),23:bg.create({parent:this,fieldKey:23,fieldName:"signatureTrack",deprecated:!1,pointerRules:p}),30:k.create({parent:this,fieldKey:30,fieldName:"durationInPulses",deprecated:!1,pointerRules:p},"positive","ppqn",491520),31:E.create({parent:this,fieldKey:31,fieldName:"bpm",deprecated:!1,pointerRules:p},{min:30,max:999,scaling:"exponential"},"bpm",120)}}};var Mr=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"TrackBox",pointerRules:{accepts:[l.Selection,l.PianoMode,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="TrackBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitTrackBox,this)}get tags(){return t.Tags}get tracks(){return this.getField(1)}get target(){return this.getField(2)}get regions(){return this.getField(3)}get clips(){return this.getField(4)}get index(){return this.getField(10)}get type(){return this.getField(11)}get enabled(){return this.getField(20)}get excludePianoMode(){return this.getField(30)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"tracks",deprecated:!1,pointerRules:p},l.TrackCollection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"target",deprecated:!1,pointerRules:p},l.Automation,!0),3:G.hook({parent:this,fieldKey:3,fieldName:"regions",deprecated:!1,pointerRules:{accepts:[l.RegionCollection],mandatory:!1,exclusive:!1}}),4:G.hook({parent:this,fieldKey:4,fieldName:"clips",deprecated:!1,pointerRules:{accepts:[l.ClipCollection],mandatory:!1,exclusive:!1}}),10:k.create({parent:this,fieldKey:10,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),11:k.create({parent:this,fieldKey:11,fieldName:"type",deprecated:!1,pointerRules:p},{values:[0,1,2,3]},""),20:R.create({parent:this,fieldKey:20,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),30:R.create({parent:this,fieldKey:30,fieldName:"excludePianoMode",deprecated:!1,pointerRules:p},!1)}}};var Ao=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NoteEventBox",pointerRules:{accepts:[l.Selection,l.NoteEventFeature],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="NoteEventBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitNoteEventBox,this)}get tags(){return t.Tags}get events(){return this.getField(1)}get position(){return this.getField(10)}get duration(){return this.getField(11)}get pitch(){return this.getField(20)}get velocity(){return this.getField(21)}get playCount(){return this.getField(22)}get playCurve(){return this.getField(23)}get cent(){return this.getField(24)}get chance(){return this.getField(25)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"events",deprecated:!1,pointerRules:p},l.NoteEvents,!0),10:k.create({parent:this,fieldKey:10,fieldName:"position",deprecated:!1,pointerRules:p},"any","ppqn"),11:k.create({parent:this,fieldKey:11,fieldName:"duration",deprecated:!1,pointerRules:p},"positive","ppqn",240),20:k.create({parent:this,fieldKey:20,fieldName:"pitch",deprecated:!1,pointerRules:p},{min:0,max:127},"",60),21:E.create({parent:this,fieldKey:21,fieldName:"velocity",deprecated:!1,pointerRules:p},"unipolar","%",.7874015748031497),22:k.create({parent:this,fieldKey:22,fieldName:"playCount",deprecated:!1,pointerRules:p},{min:1,max:128},"",1),23:E.create({parent:this,fieldKey:23,fieldName:"playCurve",deprecated:!1,pointerRules:p},"bipolar","%",0),24:E.create({parent:this,fieldKey:24,fieldName:"cent",deprecated:!1,pointerRules:p},{min:-50,max:50,scaling:"linear"},"ct",0),25:k.create({parent:this,fieldKey:25,fieldName:"chance",deprecated:!1,pointerRules:p},{min:0,max:100},"",100)}}};var Dh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NoteEventRepeatBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="NoteEventRepeatBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitNoteEventRepeatBox,this)}get tags(){return t.Tags}get event(){return this.getField(1)}get count(){return this.getField(2)}get curve(){return this.getField(3)}get length(){return this.getField(4)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"event",deprecated:!1,pointerRules:p},l.NoteEventFeature,!0),2:k.create({parent:this,fieldKey:2,fieldName:"count",deprecated:!1,pointerRules:p},{min:1,max:128},"",1),3:E.create({parent:this,fieldKey:3,fieldName:"curve",deprecated:!1,pointerRules:p},"bipolar","%",0),4:E.create({parent:this,fieldKey:4,fieldName:"length",deprecated:!1,pointerRules:p},"unipolar","%",1)}}};var La=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NoteEventCollectionBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:"shared",ephemeral:!1}),n)}static ClassName="NoteEventCollectionBox";static Resource="shared";static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitNoteEventCollectionBox,this)}get tags(){return t.Tags}get events(){return this.getField(1)}get owners(){return this.getField(2)}initializeFields(){return{1:G.hook({parent:this,fieldKey:1,fieldName:"events",deprecated:!1,pointerRules:{accepts:[l.NoteEvents],mandatory:!1,exclusive:!1}}),2:G.hook({parent:this,fieldKey:2,fieldName:"owners",deprecated:!1,pointerRules:{accepts:[l.NoteEventCollection],mandatory:!0,exclusive:!1}})}}};var Ds=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NoteRegionBox",pointerRules:{accepts:[l.Selection,l.Editing,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="NoteRegionBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitNoteRegionBox,this)}get tags(){return t.Tags}get regions(){return this.getField(1)}get events(){return this.getField(2)}get position(){return this.getField(10)}get duration(){return this.getField(11)}get loopOffset(){return this.getField(12)}get loopDuration(){return this.getField(13)}get eventOffset(){return this.getField(14)}get mute(){return this.getField(15)}get label(){return this.getField(16)}get hue(){return this.getField(17)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"regions",deprecated:!1,pointerRules:p},l.RegionCollection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"events",deprecated:!1,pointerRules:p},l.NoteEventCollection,!0),10:k.create({parent:this,fieldKey:10,fieldName:"position",deprecated:!1,pointerRules:p},"any","ppqn"),11:k.create({parent:this,fieldKey:11,fieldName:"duration",deprecated:!1,pointerRules:p},"positive","ppqn"),12:k.create({parent:this,fieldKey:12,fieldName:"loopOffset",deprecated:!1,pointerRules:p},"any","ppqn"),13:k.create({parent:this,fieldKey:13,fieldName:"loopDuration",deprecated:!1,pointerRules:p},"positive","ppqn"),14:k.create({parent:this,fieldKey:14,fieldName:"eventOffset",deprecated:!1,pointerRules:p},"any","ppqn"),15:R.create({parent:this,fieldKey:15,fieldName:"mute",deprecated:!1,pointerRules:p}),16:B.create({parent:this,fieldKey:16,fieldName:"label",deprecated:!1,pointerRules:p}),17:k.create({parent:this,fieldKey:17,fieldName:"hue",deprecated:!1,pointerRules:p},{min:0,max:360},"\xB0")}}};var ko=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get loop(){return this.getField(1)}get reverse(){return this.getField(2)}get mute(){return this.getField(3)}get speed(){return this.getField(4)}get quantise(){return this.getField(5)}get trigger(){return this.getField(6)}initializeFields(){return{1:R.create({parent:this,fieldKey:1,fieldName:"loop",deprecated:!1,pointerRules:p},!0),2:R.create({parent:this,fieldKey:2,fieldName:"reverse",deprecated:!1,pointerRules:p}),3:R.create({parent:this,fieldKey:3,fieldName:"mute",deprecated:!0,pointerRules:p}),4:k.create({parent:this,fieldKey:4,fieldName:"speed",deprecated:!1,pointerRules:p},"non-negative",""),5:k.create({parent:this,fieldKey:5,fieldName:"quantise",deprecated:!1,pointerRules:p},"non-negative",""),6:k.create({parent:this,fieldKey:6,fieldName:"trigger",deprecated:!1,pointerRules:p},"non-negative","")}}};var pu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NoteClipBox",pointerRules:{accepts:[l.Selection,l.Editing,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="NoteClipBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitNoteClipBox,this)}get tags(){return t.Tags}get clips(){return this.getField(1)}get events(){return this.getField(2)}get index(){return this.getField(3)}get triggerMode(){return this.getField(4)}get duration(){return this.getField(10)}get mute(){return this.getField(11)}get label(){return this.getField(12)}get hue(){return this.getField(13)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"clips",deprecated:!1,pointerRules:p},l.ClipCollection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"events",deprecated:!1,pointerRules:p},l.NoteEventCollection,!0),3:k.create({parent:this,fieldKey:3,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),4:ko.create({parent:this,fieldKey:4,fieldName:"triggerMode",deprecated:!1,pointerRules:p}),10:k.create({parent:this,fieldKey:10,fieldName:"duration",deprecated:!1,pointerRules:p},"positive","ppqn"),11:R.create({parent:this,fieldKey:11,fieldName:"mute",deprecated:!1,pointerRules:p}),12:B.create({parent:this,fieldKey:12,fieldName:"label",deprecated:!1,pointerRules:p}),13:k.create({parent:this,fieldKey:13,fieldName:"hue",deprecated:!1,pointerRules:p},{min:0,max:360},"\xB0")}}};var Sn=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ValueEventBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ValueEventBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitValueEventBox,this)}get tags(){return t.Tags}get events(){return this.getField(1)}get position(){return this.getField(10)}get index(){return this.getField(11)}get interpolation(){return this.getField(12)}get value(){return this.getField(13)}get slope(){return this.getField(14)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"events",deprecated:!1,pointerRules:p},l.ValueEvents,!0),10:k.create({parent:this,fieldKey:10,fieldName:"position",deprecated:!1,pointerRules:p},"any","ppqn"),11:k.create({parent:this,fieldKey:11,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),12:k.create({parent:this,fieldKey:12,fieldName:"interpolation",deprecated:!1,pointerRules:{accepts:[l.ValueInterpolation],mandatory:!1,exclusive:!1}},{values:[0,1]},"",1),13:E.create({parent:this,fieldKey:13,fieldName:"value",deprecated:!1,pointerRules:p},"any",""),14:E.create({parent:this,fieldKey:14,fieldName:"slope",deprecated:!0,pointerRules:p},"any","",NaN)}}};var Pn=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ValueEventCollectionBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:"shared",ephemeral:!1}),n)}static ClassName="ValueEventCollectionBox";static Resource="shared";static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitValueEventCollectionBox,this)}get tags(){return t.Tags}get events(){return this.getField(1)}get owners(){return this.getField(2)}initializeFields(){return{1:G.hook({parent:this,fieldKey:1,fieldName:"events",deprecated:!1,pointerRules:{accepts:[l.ValueEvents],mandatory:!1,exclusive:!1}}),2:G.hook({parent:this,fieldKey:2,fieldName:"owners",deprecated:!1,pointerRules:{accepts:[l.ValueEventCollection],mandatory:!0,exclusive:!1}})}}};var Fo=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ValueEventCurveBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="ValueEventCurveBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitValueEventCurveBox,this)}get tags(){return t.Tags}get event(){return this.getField(1)}get slope(){return this.getField(2)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"event",deprecated:!1,pointerRules:p},l.ValueInterpolation,!0),2:E.create({parent:this,fieldKey:2,fieldName:"slope",deprecated:!1,pointerRules:p},"unipolar","%",.5)}}};var Rs=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ValueRegionBox",pointerRules:{accepts:[l.Selection,l.Editing,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ValueRegionBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitValueRegionBox,this)}get tags(){return t.Tags}get regions(){return this.getField(1)}get events(){return this.getField(2)}get position(){return this.getField(10)}get duration(){return this.getField(11)}get loopOffset(){return this.getField(12)}get loopDuration(){return this.getField(13)}get mute(){return this.getField(14)}get label(){return this.getField(15)}get hue(){return this.getField(16)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"regions",deprecated:!1,pointerRules:p},l.RegionCollection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"events",deprecated:!1,pointerRules:p},l.ValueEventCollection,!0),10:k.create({parent:this,fieldKey:10,fieldName:"position",deprecated:!1,pointerRules:p},"any","ppqn"),11:k.create({parent:this,fieldKey:11,fieldName:"duration",deprecated:!1,pointerRules:p},"positive","ppqn"),12:k.create({parent:this,fieldKey:12,fieldName:"loopOffset",deprecated:!1,pointerRules:p},"any","ppqn"),13:k.create({parent:this,fieldKey:13,fieldName:"loopDuration",deprecated:!1,pointerRules:p},"positive","ppqn"),14:R.create({parent:this,fieldKey:14,fieldName:"mute",deprecated:!1,pointerRules:p}),15:B.create({parent:this,fieldKey:15,fieldName:"label",deprecated:!1,pointerRules:p}),16:k.create({parent:this,fieldKey:16,fieldName:"hue",deprecated:!1,pointerRules:p},{min:0,max:360},"\xB0")}}};var fu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ValueClipBox",pointerRules:{accepts:[l.Selection,l.Editing,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ValueClipBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitValueClipBox,this)}get tags(){return t.Tags}get clips(){return this.getField(1)}get events(){return this.getField(2)}get index(){return this.getField(3)}get triggerMode(){return this.getField(4)}get duration(){return this.getField(10)}get mute(){return this.getField(11)}get label(){return this.getField(12)}get hue(){return this.getField(13)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"clips",deprecated:!1,pointerRules:p},l.ClipCollection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"events",deprecated:!1,pointerRules:p},l.ValueEventCollection,!0),3:k.create({parent:this,fieldKey:3,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),4:ko.create({parent:this,fieldKey:4,fieldName:"triggerMode",deprecated:!1,pointerRules:p}),10:k.create({parent:this,fieldKey:10,fieldName:"duration",deprecated:!1,pointerRules:p},"positive","ppqn"),11:R.create({parent:this,fieldKey:11,fieldName:"mute",deprecated:!1,pointerRules:p}),12:B.create({parent:this,fieldKey:12,fieldName:"label",deprecated:!1,pointerRules:p}),13:k.create({parent:this,fieldKey:13,fieldName:"hue",deprecated:!1,pointerRules:p},{min:0,max:360},"\xB0")}}};var mu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"SignatureEventBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="SignatureEventBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitSignatureEventBox,this)}get tags(){return t.Tags}get events(){return this.getField(1)}get index(){return this.getField(9)}get relativePosition(){return this.getField(10)}get nominator(){return this.getField(21)}get denominator(){return this.getField(22)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"events",deprecated:!1,pointerRules:p},l.SignatureAutomation,!0),9:k.create({parent:this,fieldKey:9,fieldName:"index",deprecated:!1,pointerRules:p},"index","",0),10:k.create({parent:this,fieldKey:10,fieldName:"relativePosition",deprecated:!1,pointerRules:p},"positive","bars",1),21:k.create({parent:this,fieldKey:21,fieldName:"nominator",deprecated:!1,pointerRules:p},"positive","",4),22:k.create({parent:this,fieldKey:22,fieldName:"denominator",deprecated:!1,pointerRules:p},"positive","",4)}}};var _g=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get in(){return this.getField(1)}get out(){return this.getField(2)}get inSlope(){return this.getField(3)}get outSlope(){return this.getField(4)}initializeFields(){return{1:E.create({parent:this,fieldKey:1,fieldName:"in",deprecated:!1,pointerRules:p},"positive","ppqn",0),2:E.create({parent:this,fieldKey:2,fieldName:"out",deprecated:!1,pointerRules:p},"positive","ppqn",0),3:E.create({parent:this,fieldKey:3,fieldName:"inSlope",deprecated:!1,pointerRules:p},"unipolar","ratio",.75),4:E.create({parent:this,fieldKey:4,fieldName:"outSlope",deprecated:!1,pointerRules:p},"unipolar","ratio",.25)}}};var Eo=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"AudioRegionBox",pointerRules:{accepts:[l.Selection,l.Editing,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="AudioRegionBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitAudioRegionBox,this)}get tags(){return t.Tags}get regions(){return this.getField(1)}get file(){return this.getField(2)}get playback(){return this.getField(3)}get timeBase(){return this.getField(4)}get events(){return this.getField(5)}get warping(){return this.getField(6)}get waveformOffset(){return this.getField(7)}get playMode(){return this.getField(8)}get position(){return this.getField(10)}get duration(){return this.getField(11)}get loopOffset(){return this.getField(12)}get loopDuration(){return this.getField(13)}get mute(){return this.getField(14)}get label(){return this.getField(15)}get hue(){return this.getField(16)}get gain(){return this.getField(17)}get fading(){return this.getField(18)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"regions",deprecated:!1,pointerRules:p},l.RegionCollection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"file",deprecated:!1,pointerRules:p},l.AudioFile,!0),3:B.create({parent:this,fieldKey:3,fieldName:"playback",deprecated:!0,pointerRules:p}),4:B.create({parent:this,fieldKey:4,fieldName:"timeBase",deprecated:!1,pointerRules:p},"musical"),5:N.create({parent:this,fieldKey:5,fieldName:"events",deprecated:!1,pointerRules:p},l.ValueEventCollection,!0),6:N.create({parent:this,fieldKey:6,fieldName:"warping",deprecated:!0,pointerRules:p},l.Deprecated,!1),7:E.create({parent:this,fieldKey:7,fieldName:"waveformOffset",deprecated:!1,pointerRules:p},"any","seconds"),8:N.create({parent:this,fieldKey:8,fieldName:"playMode",deprecated:!1,pointerRules:p},l.AudioPlayMode,!1),10:k.create({parent:this,fieldKey:10,fieldName:"position",deprecated:!1,pointerRules:p},"any","ppqn"),11:E.create({parent:this,fieldKey:11,fieldName:"duration",deprecated:!1,pointerRules:p},"any","mixed"),12:E.create({parent:this,fieldKey:12,fieldName:"loopOffset",deprecated:!1,pointerRules:p},"any","mixed"),13:E.create({parent:this,fieldKey:13,fieldName:"loopDuration",deprecated:!1,pointerRules:p},"any","mixed"),14:R.create({parent:this,fieldKey:14,fieldName:"mute",deprecated:!1,pointerRules:p}),15:B.create({parent:this,fieldKey:15,fieldName:"label",deprecated:!1,pointerRules:p}),16:k.create({parent:this,fieldKey:16,fieldName:"hue",deprecated:!1,pointerRules:p},{min:0,max:360},"\xB0"),17:E.create({parent:this,fieldKey:17,fieldName:"gain",deprecated:!1,pointerRules:p},"decibel","db"),18:_g.create({parent:this,fieldKey:18,fieldName:"fading",deprecated:!1,pointerRules:p})}}};var hu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"AudioClipBox",pointerRules:{accepts:[l.Selection,l.Editing,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="AudioClipBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitAudioClipBox,this)}get tags(){return t.Tags}get clips(){return this.getField(1)}get file(){return this.getField(2)}get index(){return this.getField(3)}get triggerMode(){return this.getField(4)}get events(){return this.getField(5)}get warping(){return this.getField(6)}get waveformOffset(){return this.getField(7)}get playMode(){return this.getField(8)}get duration(){return this.getField(10)}get mute(){return this.getField(11)}get label(){return this.getField(12)}get hue(){return this.getField(13)}get gain(){return this.getField(14)}get playback(){return this.getField(20)}get timeBase(){return this.getField(21)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"clips",deprecated:!1,pointerRules:p},l.ClipCollection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"file",deprecated:!1,pointerRules:p},l.AudioFile,!0),3:k.create({parent:this,fieldKey:3,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),4:ko.create({parent:this,fieldKey:4,fieldName:"triggerMode",deprecated:!1,pointerRules:p}),5:N.create({parent:this,fieldKey:5,fieldName:"events",deprecated:!1,pointerRules:p},l.ValueEventCollection,!0),6:N.create({parent:this,fieldKey:6,fieldName:"warping",deprecated:!0,pointerRules:p},l.Deprecated,!1),7:E.create({parent:this,fieldKey:7,fieldName:"waveformOffset",deprecated:!1,pointerRules:p},"any","seconds"),8:N.create({parent:this,fieldKey:8,fieldName:"playMode",deprecated:!1,pointerRules:p},l.AudioPlayMode,!1),10:E.create({parent:this,fieldKey:10,fieldName:"duration",deprecated:!1,pointerRules:p},"any","ppqn"),11:R.create({parent:this,fieldKey:11,fieldName:"mute",deprecated:!1,pointerRules:p}),12:B.create({parent:this,fieldKey:12,fieldName:"label",deprecated:!1,pointerRules:p}),13:k.create({parent:this,fieldKey:13,fieldName:"hue",deprecated:!1,pointerRules:p},{min:0,max:360},"\xB0"),14:E.create({parent:this,fieldKey:14,fieldName:"gain",deprecated:!1,pointerRules:p},"decibel","db"),20:B.create({parent:this,fieldKey:20,fieldName:"playback",deprecated:!0,pointerRules:p}),21:B.create({parent:this,fieldKey:21,fieldName:"timeBase",deprecated:!1,pointerRules:p},"musical")}}};var gu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"AudioPitchStretchBox",pointerRules:{accepts:[l.AudioPlayMode],mandatory:!0,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="AudioPitchStretchBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitAudioPitchStretchBox,this)}get tags(){return t.Tags}get warpMarkers(){return this.getField(1)}initializeFields(){return{1:G.hook({parent:this,fieldKey:1,fieldName:"warpMarkers",deprecated:!1,pointerRules:{accepts:[l.WarpMarkers],mandatory:!0,exclusive:!1}})}}};var vu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"AudioTimeStretchBox",pointerRules:{accepts:[l.AudioPlayMode],mandatory:!0,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="AudioTimeStretchBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitAudioTimeStretchBox,this)}get tags(){return t.Tags}get warpMarkers(){return this.getField(1)}get transientPlayMode(){return this.getField(2)}get playbackRate(){return this.getField(3)}initializeFields(){return{1:G.hook({parent:this,fieldKey:1,fieldName:"warpMarkers",deprecated:!1,pointerRules:{accepts:[l.WarpMarkers],mandatory:!0,exclusive:!1}}),2:k.create({parent:this,fieldKey:2,fieldName:"transientPlayMode",deprecated:!1,pointerRules:p},"positive","enum",2),3:E.create({parent:this,fieldKey:3,fieldName:"playbackRate",deprecated:!1,pointerRules:p},"positive","ratio",1)}}};var Rh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"TransientMarkerBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="TransientMarkerBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitTransientMarkerBox,this)}get tags(){return t.Tags}get owner(){return this.getField(1)}get position(){return this.getField(2)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"owner",deprecated:!1,pointerRules:p},l.TransientMarkers,!0),2:E.create({parent:this,fieldKey:2,fieldName:"position",deprecated:!1,pointerRules:p},"non-negative","seconds")}}};var So=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"WarpMarkerBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="WarpMarkerBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitWarpMarkerBox,this)}get tags(){return t.Tags}get owner(){return this.getField(1)}get position(){return this.getField(2)}get seconds(){return this.getField(3)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"owner",deprecated:!1,pointerRules:p},l.WarpMarkers,!0),2:k.create({parent:this,fieldKey:2,fieldName:"position",deprecated:!1,pointerRules:p},"any","ppqn"),3:E.create({parent:this,fieldKey:3,fieldName:"seconds",deprecated:!1,pointerRules:p},"non-negative","seconds")}}};var xu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"MarkerBox",pointerRules:{accepts:[l.Selection,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="MarkerBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitMarkerBox,this)}get tags(){return t.Tags}get track(){return this.getField(1)}get position(){return this.getField(2)}get plays(){return this.getField(3)}get label(){return this.getField(4)}get hue(){return this.getField(5)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"track",deprecated:!1,pointerRules:p},l.MarkerTrack,!0),2:k.create({parent:this,fieldKey:2,fieldName:"position",deprecated:!1,pointerRules:p},"any","ppqn"),3:k.create({parent:this,fieldKey:3,fieldName:"plays",deprecated:!1,pointerRules:p},"non-negative","",1),4:B.create({parent:this,fieldKey:4,fieldName:"label",deprecated:!1,pointerRules:p}),5:k.create({parent:this,fieldKey:5,fieldName:"hue",deprecated:!1,pointerRules:p},{min:0,max:360},"\xB0")}}};var Wi=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"AudioFileBox",pointerRules:{accepts:[l.AudioFile,l.FileUploadState,l.MetaData],mandatory:!0,exclusive:!1},resource:"preserved",ephemeral:!1}),n)}static ClassName="AudioFileBox";static Resource="preserved";static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitAudioFileBox,this)}get tags(){return t.Tags}get startInSeconds(){return this.getField(1)}get endInSeconds(){return this.getField(2)}get fileName(){return this.getField(3)}get transientMarkers(){return this.getField(10)}initializeFields(){return{1:E.create({parent:this,fieldKey:1,fieldName:"startInSeconds",deprecated:!1,pointerRules:p},"non-negative","s"),2:E.create({parent:this,fieldKey:2,fieldName:"endInSeconds",deprecated:!1,pointerRules:p},"non-negative","s"),3:B.create({parent:this,fieldKey:3,fieldName:"fileName",deprecated:!1,pointerRules:p}),10:G.hook({parent:this,fieldKey:10,fieldName:"transientMarkers",deprecated:!1,pointerRules:{accepts:[l.TransientMarkers],mandatory:!1,exclusive:!1}})}}};var aa=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"SoundfontFileBox",pointerRules:{accepts:[l.SoundfontFile],mandatory:!0,exclusive:!1},resource:"preserved",ephemeral:!1}),n)}static ClassName="SoundfontFileBox";static Resource="preserved";static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitSoundfontFileBox,this)}get tags(){return t.Tags}get fileName(){return this.getField(1)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"fileName",deprecated:!1,pointerRules:p})}}};var Ch=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NeuralAmpModelBox",pointerRules:{accepts:[l.NeuralAmpModel],mandatory:!0,exclusive:!1},resource:"preserved",ephemeral:!1}),n)}static ClassName="NeuralAmpModelBox";static Resource="preserved";static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitNeuralAmpModelBox,this)}get tags(){return t.Tags}get label(){return this.getField(1)}get model(){return this.getField(2)}get packId(){return this.getField(3)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"label",deprecated:!1,pointerRules:p}),2:B.create({parent:this,fieldKey:2,fieldName:"model",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"packId",deprecated:!1,pointerRules:p})}}};var Xe=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"AudioUnitBox",pointerRules:{accepts:[l.Selection,l.Automation,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="AudioUnitBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitAudioUnitBox,this)}get tags(){return t.Tags}get type(){return this.getField(1)}get collection(){return this.getField(2)}get editing(){return this.getField(3)}get index(){return this.getField(11)}get volume(){return this.getField(12)}get panning(){return this.getField(13)}get mute(){return this.getField(14)}get solo(){return this.getField(15)}get tracks(){return this.getField(20)}get midiEffects(){return this.getField(21)}get input(){return this.getField(22)}get audioEffects(){return this.getField(23)}get auxSends(){return this.getField(24)}get output(){return this.getField(25)}get capture(){return this.getField(26)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"type",deprecated:!1,pointerRules:p},"instrument"),2:N.create({parent:this,fieldKey:2,fieldName:"collection",deprecated:!1,pointerRules:p},l.AudioUnits,!0),3:G.hook({parent:this,fieldKey:3,fieldName:"editing",deprecated:!1,pointerRules:{accepts:[l.Editing],mandatory:!1,exclusive:!1}}),11:k.create({parent:this,fieldKey:11,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),12:E.create({parent:this,fieldKey:12,fieldName:"volume",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-96,mid:-9,max:6,scaling:"decibel"},"dB"),13:E.create({parent:this,fieldKey:13,fieldName:"panning",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%"),14:R.create({parent:this,fieldKey:14,fieldName:"mute",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),15:R.create({parent:this,fieldKey:15,fieldName:"solo",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),20:G.hook({parent:this,fieldKey:20,fieldName:"tracks",deprecated:!1,pointerRules:{accepts:[l.TrackCollection],mandatory:!1,exclusive:!1}}),21:G.hook({parent:this,fieldKey:21,fieldName:"midiEffects",deprecated:!1,pointerRules:{accepts:[l.MIDIEffectHost],mandatory:!1,exclusive:!1}}),22:G.hook({parent:this,fieldKey:22,fieldName:"input",deprecated:!1,pointerRules:{accepts:[l.InstrumentHost,l.AudioOutput],mandatory:!1,exclusive:!0}}),23:G.hook({parent:this,fieldKey:23,fieldName:"audioEffects",deprecated:!1,pointerRules:{accepts:[l.AudioEffectHost],mandatory:!1,exclusive:!1}}),24:G.hook({parent:this,fieldKey:24,fieldName:"auxSends",deprecated:!1,pointerRules:{accepts:[l.AuxSend],mandatory:!1,exclusive:!1}}),25:N.create({parent:this,fieldKey:25,fieldName:"output",deprecated:!1,pointerRules:p},l.AudioOutput,!1),26:N.create({parent:this,fieldKey:26,fieldName:"capture",deprecated:!1,pointerRules:p},l.Capture,!1)}}};var oa=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"CaptureAudioBox",pointerRules:{accepts:[l.Capture],mandatory:!0,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="CaptureAudioBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitCaptureAudioBox,this)}get tags(){return t.Tags}get deviceId(){return this.getField(1)}get recordMode(){return this.getField(2)}get requestChannels(){return this.getField(10)}get gainDb(){return this.getField(11)}get inputLatency(){return this.getField(12)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"deviceId",deprecated:!1,pointerRules:p}),2:B.create({parent:this,fieldKey:2,fieldName:"recordMode",deprecated:!1,pointerRules:p},"normal"),10:k.create({parent:this,fieldKey:10,fieldName:"requestChannels",deprecated:!1,pointerRules:p},"any","",2),11:E.create({parent:this,fieldKey:11,fieldName:"gainDb",deprecated:!1,pointerRules:p},"decibel","dB",0),12:E.create({parent:this,fieldKey:12,fieldName:"inputLatency",deprecated:!1,pointerRules:p},"any","s",-2)}}};var sa=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"CaptureMidiBox",pointerRules:{accepts:[l.Capture],mandatory:!0,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="CaptureMidiBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitCaptureMidiBox,this)}get tags(){return t.Tags}get deviceId(){return this.getField(1)}get recordMode(){return this.getField(2)}get channel(){return this.getField(10)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"deviceId",deprecated:!1,pointerRules:p}),2:B.create({parent:this,fieldKey:2,fieldName:"recordMode",deprecated:!1,pointerRules:p},"normal"),10:k.create({parent:this,fieldKey:10,fieldName:"channel",deprecated:!1,pointerRules:p},"any","",-1)}}};var $n=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"AudioBusBox",pointerRules:{accepts:[l.SideChain,l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="AudioBusBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitAudioBusBox,this)}get tags(){return t.Tags}get collection(){return this.getField(1)}get output(){return this.getField(2)}get input(){return this.getField(3)}get enabled(){return this.getField(4)}get icon(){return this.getField(5)}get label(){return this.getField(6)}get color(){return this.getField(7)}get minimized(){return this.getField(8)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"collection",deprecated:!1,pointerRules:p},l.AudioBusses,!0),2:N.create({parent:this,fieldKey:2,fieldName:"output",deprecated:!1,pointerRules:p},l.AudioOutput,!0),3:G.hook({parent:this,fieldKey:3,fieldName:"input",deprecated:!1,pointerRules:{accepts:[l.AudioOutput],mandatory:!1,exclusive:!1}}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:B.create({parent:this,fieldKey:5,fieldName:"icon",deprecated:!1,pointerRules:p}),6:B.create({parent:this,fieldKey:6,fieldName:"label",deprecated:!1,pointerRules:p}),7:B.create({parent:this,fieldKey:7,fieldName:"color",deprecated:!1,pointerRules:p},"red"),8:R.create({parent:this,fieldKey:8,fieldName:"minimized",deprecated:!1,pointerRules:p})}}};var yu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"AuxSendBox",pointerRules:{accepts:[l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="AuxSendBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitAuxSendBox,this)}get tags(){return t.Tags}get audioUnit(){return this.getField(1)}get targetBus(){return this.getField(2)}get index(){return this.getField(3)}get routing(){return this.getField(4)}get sendGain(){return this.getField(5)}get sendPan(){return this.getField(6)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"audioUnit",deprecated:!1,pointerRules:p},l.AuxSend,!0),2:N.create({parent:this,fieldKey:2,fieldName:"targetBus",deprecated:!1,pointerRules:p},l.AudioOutput,!0),3:k.create({parent:this,fieldKey:3,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),4:k.create({parent:this,fieldKey:4,fieldName:"routing",deprecated:!1,pointerRules:p},{values:[0,1]},"",1),5:E.create({parent:this,fieldKey:5,fieldName:"sendGain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB"),6:E.create({parent:this,fieldKey:6,fieldName:"sendPan",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","")}}};var wu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"GrooveShuffleBox",pointerRules:{accepts:[l.Groove],mandatory:!0,exclusive:!1},resource:"internal",ephemeral:!1}),n)}static ClassName="GrooveShuffleBox";static Resource="internal";static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitGrooveShuffleBox,this)}get tags(){return t.Tags}get label(){return this.getField(1)}get amount(){return this.getField(10)}get duration(){return this.getField(11)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"label",deprecated:!1,pointerRules:p}),10:E.create({parent:this,fieldKey:10,fieldName:"amount",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.6),11:k.create({parent:this,fieldKey:11,fieldName:"duration",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"non-negative","ppqn",480)}}};var zh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"UnknownAudioEffectDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="UnknownAudioEffectDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitUnknownAudioEffectDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get comment(){return this.getField(10)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:B.create({parent:this,fieldKey:10,fieldName:"comment",deprecated:!1,pointerRules:p})}}};var Oh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"UnknownMidiEffectDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="UnknownMidiEffectDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"midi-effect"});constructor(e){super(e)}accept(e){return P(e.visitUnknownMidiEffectDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get comment(){return this.getField(10)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.MIDIEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:B.create({parent:this,fieldKey:10,fieldName:"comment",deprecated:!1,pointerRules:p})}}};var Uh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"DeviceInterfaceKnobBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="DeviceInterfaceKnobBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitDeviceInterfaceKnobBox,this)}get tags(){return t.Tags}get userInterface(){return this.getField(1)}get parameter(){return this.getField(2)}get index(){return this.getField(3)}get anchor(){return this.getField(10)}get color(){return this.getField(11)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"userInterface",deprecated:!1,pointerRules:p},l.DeviceUserInterface,!0),2:N.create({parent:this,fieldKey:2,fieldName:"parameter",deprecated:!1,pointerRules:p},l.ParameterController,!0),3:k.create({parent:this,fieldKey:3,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),10:E.create({parent:this,fieldKey:10,fieldName:"anchor",deprecated:!1,pointerRules:p},"unipolar","%"),11:B.create({parent:this,fieldKey:11,fieldName:"color",deprecated:!1,pointerRules:p})}}};var Ag=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get elements(){return this.getField(1)}initializeFields(){return{1:G.hook({parent:this,fieldKey:1,fieldName:"elements",deprecated:!1,pointerRules:{accepts:[l.DeviceUserInterface],mandatory:!1,exclusive:!1}})}}};var Vh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ModularDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ModularDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitModularDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get modularSetup(){return this.getField(10)}get userInterface(){return this.getField(11)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:N.create({parent:this,fieldKey:10,fieldName:"modularSetup",deprecated:!1,pointerRules:p},l.ModularSetup,!0),11:Ag.create({parent:this,fieldKey:11,fieldName:"userInterface",deprecated:!1,pointerRules:p})}}};var jh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"StereoToolDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="StereoToolDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitStereoToolDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get volume(){return this.getField(10)}get panning(){return this.getField(11)}get stereo(){return this.getField(12)}get invertL(){return this.getField(13)}get invertR(){return this.getField(14)}get swap(){return this.getField(15)}get panningMixing(){return this.getField(20)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"volume",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-72,mid:0,max:12,scaling:"decibel"},"dB",0),11:E.create({parent:this,fieldKey:11,fieldName:"panning",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%",0),12:E.create({parent:this,fieldKey:12,fieldName:"stereo",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%",0),13:R.create({parent:this,fieldKey:13,fieldName:"invertL",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),14:R.create({parent:this,fieldKey:14,fieldName:"invertR",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),15:R.create({parent:this,fieldKey:15,fieldName:"swap",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),20:k.create({parent:this,fieldKey:20,fieldName:"panningMixing",deprecated:!1,pointerRules:p},{values:[0,1]},"",0)}}};var bu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"MaximizerDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="MaximizerDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitMaximizerDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get lookahead(){return this.getField(10)}get threshold(){return this.getField(11)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:R.create({parent:this,fieldKey:10,fieldName:"lookahead",deprecated:!1,pointerRules:p},!0),11:E.create({parent:this,fieldKey:11,fieldName:"threshold",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-30,max:0,scaling:"linear"},"dB",0)}}};var Kh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"CompressorDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="CompressorDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitCompressorDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get lookahead(){return this.getField(10)}get automakeup(){return this.getField(11)}get autoattack(){return this.getField(12)}get autorelease(){return this.getField(13)}get inputgain(){return this.getField(14)}get threshold(){return this.getField(15)}get ratio(){return this.getField(16)}get knee(){return this.getField(17)}get attack(){return this.getField(18)}get release(){return this.getField(19)}get makeup(){return this.getField(20)}get mix(){return this.getField(21)}get sideChain(){return this.getField(30)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:R.create({parent:this,fieldKey:10,fieldName:"lookahead",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},!1),11:R.create({parent:this,fieldKey:11,fieldName:"automakeup",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},!0),12:R.create({parent:this,fieldKey:12,fieldName:"autoattack",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},!1),13:R.create({parent:this,fieldKey:13,fieldName:"autorelease",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},!1),14:E.create({parent:this,fieldKey:14,fieldName:"inputgain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-30,max:30,scaling:"linear"},"dB",0),15:E.create({parent:this,fieldKey:15,fieldName:"threshold",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-60,max:0,scaling:"linear"},"dB",-10),16:E.create({parent:this,fieldKey:16,fieldName:"ratio",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:24,scaling:"exponential"},"",2),17:E.create({parent:this,fieldKey:17,fieldName:"knee",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:24,scaling:"linear"},"dB",0),18:E.create({parent:this,fieldKey:18,fieldName:"attack",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:100,scaling:"linear"},"ms",0),19:E.create({parent:this,fieldKey:19,fieldName:"release",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:5,max:1500,scaling:"linear"},"ms",25),20:E.create({parent:this,fieldKey:20,fieldName:"makeup",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-40,max:40,scaling:"linear"},"dB",0),21:E.create({parent:this,fieldKey:21,fieldName:"mix",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1),30:N.create({parent:this,fieldKey:30,fieldName:"sideChain",deprecated:!1,pointerRules:p},l.SideChain,!1)}}};var Wh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"GateDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="GateDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitGateDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get threshold(){return this.getField(10)}get return(){return this.getField(11)}get attack(){return this.getField(12)}get hold(){return this.getField(13)}get release(){return this.getField(14)}get floor(){return this.getField(15)}get inverse(){return this.getField(16)}get sideChain(){return this.getField(30)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"threshold",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-60,max:0,scaling:"linear"},"dB",-6),11:E.create({parent:this,fieldKey:11,fieldName:"return",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:24,scaling:"linear"},"dB",0),12:E.create({parent:this,fieldKey:12,fieldName:"attack",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:50,scaling:"linear"},"ms",1),13:E.create({parent:this,fieldKey:13,fieldName:"hold",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:500,scaling:"linear"},"ms",50),14:E.create({parent:this,fieldKey:14,fieldName:"release",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:2e3,scaling:"linear"},"ms",100),15:E.create({parent:this,fieldKey:15,fieldName:"floor",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-72,max:0,scaling:"linear"},"dB",-72),16:R.create({parent:this,fieldKey:16,fieldName:"inverse",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},!1),30:N.create({parent:this,fieldKey:30,fieldName:"sideChain",deprecated:!1,pointerRules:p},l.SideChain,!1)}}};var Lh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"DelayDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="DelayDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitDelayDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get delayMusical(){return this.getField(10)}get feedback(){return this.getField(11)}get cross(){return this.getField(12)}get filter(){return this.getField(13)}get wet(){return this.getField(14)}get dry(){return this.getField(15)}get preSyncTimeLeft(){return this.getField(16)}get preMillisTimeLeft(){return this.getField(17)}get preSyncTimeRight(){return this.getField(19)}get preMillisTimeRight(){return this.getField(20)}get delayMillis(){return this.getField(22)}get lfoSpeed(){return this.getField(23)}get lfoDepth(){return this.getField(24)}get version(){return this.getField(99)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"delayMusical",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"any","",13),11:E.create({parent:this,fieldKey:11,fieldName:"feedback",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.5),12:E.create({parent:this,fieldKey:12,fieldName:"cross",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1),13:E.create({parent:this,fieldKey:13,fieldName:"filter",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%",0),14:E.create({parent:this,fieldKey:14,fieldName:"wet",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",-6),15:E.create({parent:this,fieldKey:15,fieldName:"dry",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",0),16:E.create({parent:this,fieldKey:16,fieldName:"preSyncTimeLeft",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"any","",8),17:E.create({parent:this,fieldKey:17,fieldName:"preMillisTimeLeft",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:1e3,scaling:"linear"},"ms",0),19:E.create({parent:this,fieldKey:19,fieldName:"preSyncTimeRight",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"any","",0),20:E.create({parent:this,fieldKey:20,fieldName:"preMillisTimeRight",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:1e3,scaling:"linear"},"ms",0),22:E.create({parent:this,fieldKey:22,fieldName:"delayMillis",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:1e3,scaling:"linear"},"ms",0),23:E.create({parent:this,fieldKey:23,fieldName:"lfoSpeed",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.1,max:5,scaling:"exponential"},"Hz",.1),24:E.create({parent:this,fieldKey:24,fieldName:"lfoDepth",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:50,scaling:"linear"},"ms",0),99:k.create({parent:this,fieldKey:99,fieldName:"version",deprecated:!1,pointerRules:p},"any","")}}};var Zh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"CrusherDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="CrusherDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitCrusherDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get crush(){return this.getField(10)}get bits(){return this.getField(11)}get boost(){return this.getField(12)}get mix(){return this.getField(13)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"crush",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",0),11:k.create({parent:this,fieldKey:11,fieldName:"bits",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:16},"bits",16),12:E.create({parent:this,fieldKey:12,fieldName:"boost",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:24,scaling:"linear"},"dB",0),13:E.create({parent:this,fieldKey:13,fieldName:"mix",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1)}}};var Gh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"DattorroReverbDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="DattorroReverbDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitDattorroReverbDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get preDelay(){return this.getField(10)}get bandwidth(){return this.getField(11)}get inputDiffusion1(){return this.getField(12)}get inputDiffusion2(){return this.getField(13)}get decay(){return this.getField(14)}get decayDiffusion1(){return this.getField(15)}get decayDiffusion2(){return this.getField(16)}get damping(){return this.getField(17)}get excursionRate(){return this.getField(18)}get excursionDepth(){return this.getField(19)}get wet(){return this.getField(20)}get dry(){return this.getField(21)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"preDelay",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:1e3,scaling:"linear"},"ms",0),11:E.create({parent:this,fieldKey:11,fieldName:"bandwidth",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.9999),12:E.create({parent:this,fieldKey:12,fieldName:"inputDiffusion1",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.75),13:E.create({parent:this,fieldKey:13,fieldName:"inputDiffusion2",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.625),14:E.create({parent:this,fieldKey:14,fieldName:"decay",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.75),15:E.create({parent:this,fieldKey:15,fieldName:"decayDiffusion1",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.7),16:E.create({parent:this,fieldKey:16,fieldName:"decayDiffusion2",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.5),17:E.create({parent:this,fieldKey:17,fieldName:"damping",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.005),18:E.create({parent:this,fieldKey:18,fieldName:"excursionRate",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.5),19:E.create({parent:this,fieldKey:19,fieldName:"excursionDepth",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.7),20:E.create({parent:this,fieldKey:20,fieldName:"wet",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",-6),21:E.create({parent:this,fieldKey:21,fieldName:"dry",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",0)}}};var Hh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"VelocityDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="VelocityDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"midi-effect"});constructor(e){super(e)}accept(e){return P(e.visitVelocityDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get magnetPosition(){return this.getField(10)}get magnetStrength(){return this.getField(11)}get randomSeed(){return this.getField(12)}get randomAmount(){return this.getField(13)}get offset(){return this.getField(14)}get mix(){return this.getField(15)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.MIDIEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"magnetPosition",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.5),11:E.create({parent:this,fieldKey:11,fieldName:"magnetStrength",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%"),12:k.create({parent:this,fieldKey:12,fieldName:"randomSeed",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"any","",2048),13:E.create({parent:this,fieldKey:13,fieldName:"randomAmount",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%"),14:E.create({parent:this,fieldKey:14,fieldName:"offset",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%",0),15:E.create({parent:this,fieldKey:15,fieldName:"mix",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1)}}};var qh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"FoldDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="FoldDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitFoldDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get drive(){return this.getField(10)}get overSampling(){return this.getField(11)}get volume(){return this.getField(12)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"drive",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:30,scaling:"linear"},"dB",0),11:k.create({parent:this,fieldKey:11,fieldName:"overSampling",deprecated:!1,pointerRules:p},{length:3},"",0),12:E.create({parent:this,fieldKey:12,fieldName:"volume",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-18,max:0,scaling:"linear"},"dB",0)}}};var Jh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"TidalDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="TidalDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitTidalDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get slope(){return this.getField(10)}get symmetry(){return this.getField(11)}get rate(){return this.getField(20)}get depth(){return this.getField(21)}get offset(){return this.getField(22)}get channelOffset(){return this.getField(23)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"slope",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%",-.25),11:E.create({parent:this,fieldKey:11,fieldName:"symmetry",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.5),20:E.create({parent:this,fieldKey:20,fieldName:"rate",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",3),21:E.create({parent:this,fieldKey:21,fieldName:"depth",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","",1),22:E.create({parent:this,fieldKey:22,fieldName:"offset",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-180,max:180,scaling:"linear"},"\xB0",0),23:E.create({parent:this,fieldKey:23,fieldName:"channelOffset",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-180,max:180,scaling:"linear"},"\xB0",0)}}};var Qd=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get enabled(){return this.getField(1)}get frequency(){return this.getField(10)}get order(){return this.getField(11)}get q(){return this.getField(12)}initializeFields(){return{1:R.create({parent:this,fieldKey:1,fieldName:"enabled",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),10:E.create({parent:this,fieldKey:10,fieldName:"frequency",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:20,max:2e4,scaling:"exponential"},"Hz"),11:k.create({parent:this,fieldKey:11,fieldName:"order",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{length:4},""),12:E.create({parent:this,fieldKey:12,fieldName:"q",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.01,max:10,scaling:"exponential"},"")}}};var ep=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get enabled(){return this.getField(1)}get frequency(){return this.getField(10)}get gain(){return this.getField(11)}initializeFields(){return{1:R.create({parent:this,fieldKey:1,fieldName:"enabled",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),10:E.create({parent:this,fieldKey:10,fieldName:"frequency",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:20,max:2e4,scaling:"exponential"},"Hz"),11:E.create({parent:this,fieldKey:11,fieldName:"gain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-24,max:24,scaling:"linear"},"dB")}}};var Nu=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get enabled(){return this.getField(1)}get frequency(){return this.getField(10)}get gain(){return this.getField(11)}get q(){return this.getField(12)}initializeFields(){return{1:R.create({parent:this,fieldKey:1,fieldName:"enabled",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),10:E.create({parent:this,fieldKey:10,fieldName:"frequency",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:20,max:2e4,scaling:"exponential"},"Hz"),11:E.create({parent:this,fieldKey:11,fieldName:"gain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-24,max:24,scaling:"linear"},"dB"),12:E.create({parent:this,fieldKey:12,fieldName:"q",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.01,max:10,scaling:"exponential"},"")}}};var Xh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"RevampDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="RevampDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitRevampDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get highPass(){return this.getField(10)}get lowShelf(){return this.getField(11)}get lowBell(){return this.getField(12)}get midBell(){return this.getField(13)}get highBell(){return this.getField(14)}get highShelf(){return this.getField(15)}get lowPass(){return this.getField(16)}get gain(){return this.getField(17)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:Qd.create({parent:this,fieldKey:10,fieldName:"highPass",deprecated:!1,pointerRules:p}),11:ep.create({parent:this,fieldKey:11,fieldName:"lowShelf",deprecated:!1,pointerRules:p}),12:Nu.create({parent:this,fieldKey:12,fieldName:"lowBell",deprecated:!1,pointerRules:p}),13:Nu.create({parent:this,fieldKey:13,fieldName:"midBell",deprecated:!1,pointerRules:p}),14:Nu.create({parent:this,fieldKey:14,fieldName:"highBell",deprecated:!1,pointerRules:p}),15:ep.create({parent:this,fieldKey:15,fieldName:"highShelf",deprecated:!1,pointerRules:p}),16:Qd.create({parent:this,fieldKey:16,fieldName:"lowPass",deprecated:!1,pointerRules:p}),17:E.create({parent:this,fieldKey:17,fieldName:"gain",deprecated:!0,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-18,max:18,scaling:"linear"},"db")}}};var Yh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ReverbDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ReverbDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitReverbDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get decay(){return this.getField(10)}get preDelay(){return this.getField(11)}get damp(){return this.getField(12)}get filter(){return this.getField(13)}get wet(){return this.getField(14)}get dry(){return this.getField(15)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"decay",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.5),11:E.create({parent:this,fieldKey:11,fieldName:"preDelay",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:.5,scaling:"exponential"},"s",0),12:E.create({parent:this,fieldKey:12,fieldName:"damp",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",.5),13:E.create({parent:this,fieldKey:13,fieldName:"filter",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%",0),14:E.create({parent:this,fieldKey:14,fieldName:"wet",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",-3),15:E.create({parent:this,fieldKey:15,fieldName:"dry",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",0)}}};var Fg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get waveform(){return this.getField(1)}get volume(){return this.getField(2)}get octave(){return this.getField(3)}get tune(){return this.getField(4)}initializeFields(){return{1:k.create({parent:this,fieldKey:1,fieldName:"waveform",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{values:[0,1,2,3]},""),2:E.create({parent:this,fieldKey:2,fieldName:"volume",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","db",-1/0),3:k.create({parent:this,fieldKey:3,fieldName:"octave",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-3,max:3},"oct",0),4:E.create({parent:this,fieldKey:4,fieldName:"tune",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-1200,max:1200,scaling:"linear"},"ct")}}};var Eg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get waveform(){return this.getField(1)}get rate(){return this.getField(2)}get sync(){return this.getField(3)}get targetTune(){return this.getField(10)}get targetCutoff(){return this.getField(11)}get targetVolume(){return this.getField(12)}initializeFields(){return{1:k.create({parent:this,fieldKey:1,fieldName:"waveform",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{values:[0,1,2,3]},""),2:E.create({parent:this,fieldKey:2,fieldName:"rate",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1e-4,max:30,scaling:"exponential"},"Hz",1e-4),3:R.create({parent:this,fieldKey:3,fieldName:"sync",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},!1),10:E.create({parent:this,fieldKey:10,fieldName:"targetTune",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%"),11:E.create({parent:this,fieldKey:11,fieldName:"targetCutoff",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%"),12:E.create({parent:this,fieldKey:12,fieldName:"targetVolume",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%")}}};var Sg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get attack(){return this.getField(1)}get hold(){return this.getField(2)}get release(){return this.getField(3)}get volume(){return this.getField(4)}initializeFields(){return{1:E.create({parent:this,fieldKey:1,fieldName:"attack",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:5,scaling:"exponential"},"s",.001),2:E.create({parent:this,fieldKey:2,fieldName:"hold",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:5,scaling:"exponential"},"s",.001),3:E.create({parent:this,fieldKey:3,fieldName:"release",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:5,scaling:"exponential"},"s",.001),4:E.create({parent:this,fieldKey:4,fieldName:"volume",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","db",.001)}}};var _u=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"VaporisateurDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="VaporisateurDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"notes"});constructor(e){super(e)}accept(e){return P(e.visitVaporisateurDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get volume(){return this.getField(10)}get octave(){return this.getField(11)}get tune(){return this.getField(12)}get waveform(){return this.getField(13)}get cutoff(){return this.getField(14)}get resonance(){return this.getField(15)}get attack(){return this.getField(16)}get release(){return this.getField(17)}get filterEnvelope(){return this.getField(18)}get decay(){return this.getField(19)}get sustain(){return this.getField(20)}get glideTime(){return this.getField(21)}get voicingMode(){return this.getField(22)}get unisonCount(){return this.getField(23)}get unisonDetune(){return this.getField(24)}get unisonStereo(){return this.getField(25)}get filterOrder(){return this.getField(26)}get filterKeyboard(){return this.getField(27)}get lfo(){return this.getField(30)}get oscillators(){return this.getField(40)}get noise(){return this.getField(50)}get version(){return this.getField(99)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"volume",deprecated:!0,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",-6),11:k.create({parent:this,fieldKey:11,fieldName:"octave",deprecated:!0,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"any","oct"),12:E.create({parent:this,fieldKey:12,fieldName:"tune",deprecated:!0,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"any","ct"),13:k.create({parent:this,fieldKey:13,fieldName:"waveform",deprecated:!0,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"any",""),14:E.create({parent:this,fieldKey:14,fieldName:"cutoff",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:20,max:2e4,scaling:"exponential"},"Hz"),15:E.create({parent:this,fieldKey:15,fieldName:"resonance",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.01,max:10,scaling:"exponential"},"q"),16:E.create({parent:this,fieldKey:16,fieldName:"attack",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:5,scaling:"exponential"},"s"),17:E.create({parent:this,fieldKey:17,fieldName:"release",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:5,scaling:"exponential"},"s"),18:E.create({parent:this,fieldKey:18,fieldName:"filterEnvelope",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%"),19:E.create({parent:this,fieldKey:19,fieldName:"decay",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:5,scaling:"exponential"},"s",.001),20:E.create({parent:this,fieldKey:20,fieldName:"sustain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1),21:E.create({parent:this,fieldKey:21,fieldName:"glideTime",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",0),22:k.create({parent:this,fieldKey:22,fieldName:"voicingMode",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{values:[0,1]},"",1),23:k.create({parent:this,fieldKey:23,fieldName:"unisonCount",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{values:[1,3,5]},"",1),24:E.create({parent:this,fieldKey:24,fieldName:"unisonDetune",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:1200,scaling:"exponential"},"ct",30),25:E.create({parent:this,fieldKey:25,fieldName:"unisonStereo",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1),26:k.create({parent:this,fieldKey:26,fieldName:"filterOrder",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{values:[1,2,3,4]},"",1),27:E.create({parent:this,fieldKey:27,fieldName:"filterKeyboard",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","%"),30:Eg.create({parent:this,fieldKey:30,fieldName:"lfo",deprecated:!1,pointerRules:p}),40:Fh.create({parent:this,fieldKey:40,fieldName:"oscillators",deprecated:!1,pointerRules:p},e=>Fg.create(e),2),50:Sg.create({parent:this,fieldKey:50,fieldName:"noise",deprecated:!1,pointerRules:p}),99:k.create({parent:this,fieldKey:99,fieldName:"version",deprecated:!1,pointerRules:p},"any","")}}};var Pg=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get id(){return this.getField(1)}get label(){return this.getField(2)}initializeFields(){return{1:B.create({parent:this,fieldKey:1,fieldName:"id",deprecated:!1,pointerRules:p}),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p})}}};var Au=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"MIDIOutputDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="MIDIOutputDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"notes"});constructor(e){super(e)}accept(e){return P(e.visitMIDIOutputDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get deprecatedDevice(){return this.getField(10)}get channel(){return this.getField(11)}get deprecatedDelay(){return this.getField(12)}get parameters(){return this.getField(13)}get device(){return this.getField(14)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:Pg.create({parent:this,fieldKey:10,fieldName:"deprecatedDevice",deprecated:!0,pointerRules:p}),11:k.create({parent:this,fieldKey:11,fieldName:"channel",deprecated:!1,pointerRules:p},{min:0,max:15},"ch"),12:k.create({parent:this,fieldKey:12,fieldName:"deprecatedDelay",deprecated:!0,pointerRules:p},"any","ms",10),13:G.hook({parent:this,fieldKey:13,fieldName:"parameters",deprecated:!1,pointerRules:{accepts:[l.Parameter],mandatory:!1,exclusive:!1}}),14:N.create({parent:this,fieldKey:14,fieldName:"device",deprecated:!1,pointerRules:p},l.MIDIDevice,!1)}}};var Po=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"MIDIOutputBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="MIDIOutputBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitMIDIOutputBox,this)}get tags(){return t.Tags}get root(){return this.getField(1)}get device(){return this.getField(2)}get id(){return this.getField(3)}get label(){return this.getField(4)}get delayInMs(){return this.getField(5)}get sendTransportMessages(){return this.getField(6)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"root",deprecated:!1,pointerRules:p},l.MIDIDevice,!0),2:G.hook({parent:this,fieldKey:2,fieldName:"device",deprecated:!1,pointerRules:{accepts:[l.MIDIDevice],mandatory:!0,exclusive:!1}}),3:B.create({parent:this,fieldKey:3,fieldName:"id",deprecated:!1,pointerRules:p}),4:B.create({parent:this,fieldKey:4,fieldName:"label",deprecated:!1,pointerRules:p}),5:k.create({parent:this,fieldKey:5,fieldName:"delayInMs",deprecated:!1,pointerRules:p},{min:0,max:500},"ms",10),6:R.create({parent:this,fieldKey:6,fieldName:"sendTransportMessages",deprecated:!1,pointerRules:p},!0)}}};var Cs=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"MIDIOutputParameterBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="MIDIOutputParameterBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitMIDIOutputParameterBox,this)}get tags(){return t.Tags}get owner(){return this.getField(1)}get label(){return this.getField(2)}get controller(){return this.getField(3)}get value(){return this.getField(4)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"owner",deprecated:!1,pointerRules:p},l.Parameter,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p},""),3:k.create({parent:this,fieldKey:3,fieldName:"controller",deprecated:!1,pointerRules:p},{min:0,max:127},"#",64),4:E.create({parent:this,fieldKey:4,fieldName:"value",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!0,exclusive:!1}},"unipolar","%")}}};var Fu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"SoundfontDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="SoundfontDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"notes"});constructor(e){super(e)}accept(e){return P(e.visitSoundfontDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get file(){return this.getField(10)}get presetIndex(){return this.getField(11)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:N.create({parent:this,fieldKey:10,fieldName:"file",deprecated:!1,pointerRules:p},l.SoundfontFile,!1),11:k.create({parent:this,fieldKey:11,fieldName:"presetIndex",deprecated:!1,pointerRules:p},{min:0,max:65535},"")}}};var Eu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NanoDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="NanoDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"notes"});constructor(e){super(e)}accept(e){return P(e.visitNanoDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get volume(){return this.getField(10)}get file(){return this.getField(15)}get release(){return this.getField(20)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"volume",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",-3),15:N.create({parent:this,fieldKey:15,fieldName:"file",deprecated:!1,pointerRules:p},l.AudioFile,!1),20:E.create({parent:this,fieldKey:20,fieldName:"release",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:8,scaling:"exponential"},"s",.1)}}};var Su=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"PlayfieldDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="PlayfieldDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"notes"});constructor(e){super(e)}accept(e){return P(e.visitPlayfieldDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get samples(){return this.getField(10)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:G.hook({parent:this,fieldKey:10,fieldName:"samples",deprecated:!1,pointerRules:{accepts:[l.Sample],mandatory:!1,exclusive:!1}})}}};var $o=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"PlayfieldSampleBox",pointerRules:{accepts:[l.Editing,l.SideChain,l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="PlayfieldSampleBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"notes",copyable:!1});constructor(e){super(e)}accept(e){return P(e.visitPlayfieldSampleBox,this)}get tags(){return t.Tags}get device(){return this.getField(10)}get file(){return this.getField(11)}get midiEffects(){return this.getField(12)}get audioEffects(){return this.getField(13)}get index(){return this.getField(15)}get label(){return this.getField(20)}get icon(){return this.getField(21)}get enabled(){return this.getField(22)}get minimized(){return this.getField(23)}get mute(){return this.getField(40)}get solo(){return this.getField(41)}get exclude(){return this.getField(42)}get polyphone(){return this.getField(43)}get gate(){return this.getField(44)}get pitch(){return this.getField(45)}get sampleStart(){return this.getField(46)}get sampleEnd(){return this.getField(47)}get attack(){return this.getField(48)}get release(){return this.getField(49)}initializeFields(){return{10:N.create({parent:this,fieldKey:10,fieldName:"device",deprecated:!1,pointerRules:p},l.Sample,!0),11:N.create({parent:this,fieldKey:11,fieldName:"file",deprecated:!1,pointerRules:p},l.AudioFile,!0),12:G.hook({parent:this,fieldKey:12,fieldName:"midiEffects",deprecated:!1,pointerRules:{accepts:[l.MIDIEffectHost],mandatory:!1,exclusive:!1}}),13:G.hook({parent:this,fieldKey:13,fieldName:"audioEffects",deprecated:!1,pointerRules:{accepts:[l.AudioEffectHost],mandatory:!1,exclusive:!1}}),15:k.create({parent:this,fieldKey:15,fieldName:"index",deprecated:!1,pointerRules:p},{min:0,max:127},"",60),20:B.create({parent:this,fieldKey:20,fieldName:"label",deprecated:!0,pointerRules:p}),21:B.create({parent:this,fieldKey:21,fieldName:"icon",deprecated:!1,pointerRules:p}),22:R.create({parent:this,fieldKey:22,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),23:R.create({parent:this,fieldKey:23,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),40:R.create({parent:this,fieldKey:40,fieldName:"mute",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),41:R.create({parent:this,fieldKey:41,fieldName:"solo",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),42:R.create({parent:this,fieldKey:42,fieldName:"exclude",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),43:R.create({parent:this,fieldKey:43,fieldName:"polyphone",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}}),44:k.create({parent:this,fieldKey:44,fieldName:"gate",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{length:3},"",0),45:E.create({parent:this,fieldKey:45,fieldName:"pitch",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-1200,max:1200,scaling:"linear"},"ct"),46:E.create({parent:this,fieldKey:46,fieldName:"sampleStart",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",0),47:E.create({parent:this,fieldKey:47,fieldName:"sampleEnd",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1),48:E.create({parent:this,fieldKey:48,fieldName:"attack",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:5,scaling:"exponential"},"s",.001),49:E.create({parent:this,fieldKey:49,fieldName:"release",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.001,max:5,scaling:"exponential"},"s",.02)}}};var Pu=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"TapeDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain,l.Automation],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="TapeDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"audio"});constructor(e){super(e)}accept(e){return P(e.visitTapeDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get flutter(){return this.getField(10)}get wow(){return this.getField(11)}get noise(){return this.getField(12)}get saturation(){return this.getField(13)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"flutter",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%"),11:E.create({parent:this,fieldKey:11,fieldName:"wow",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%"),12:E.create({parent:this,fieldKey:12,fieldName:"noise",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%"),13:E.create({parent:this,fieldKey:13,fieldName:"saturation",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%")}}};var Qh=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ArpeggioDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ArpeggioDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"midi-effect"});constructor(e){super(e)}accept(e){return P(e.visitArpeggioDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get modeIndex(){return this.getField(10)}get numOctaves(){return this.getField(11)}get rateIndex(){return this.getField(12)}get gate(){return this.getField(13)}get repeat(){return this.getField(14)}get velocity(){return this.getField(15)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.MIDIEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:k.create({parent:this,fieldKey:10,fieldName:"modeIndex",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{length:3},"",0),11:k.create({parent:this,fieldKey:11,fieldName:"numOctaves",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:5},"oct",1),12:k.create({parent:this,fieldKey:12,fieldName:"rateIndex",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{length:17},"",9),13:E.create({parent:this,fieldKey:13,fieldName:"gate",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:2,scaling:"linear"},"",1),14:k.create({parent:this,fieldKey:14,fieldName:"repeat",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:16},"",1),15:E.create({parent:this,fieldKey:15,fieldName:"velocity",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"bipolar","",0)}}};var eg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"PitchDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="PitchDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"midi-effect"});constructor(e){super(e)}accept(e){return P(e.visitPitchDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get semiTones(){return this.getField(10)}get cents(){return this.getField(11)}get octaves(){return this.getField(12)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.MIDIEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:k.create({parent:this,fieldKey:10,fieldName:"semiTones",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-36,max:36},"st",0),11:E.create({parent:this,fieldKey:11,fieldName:"cents",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-50,max:50,scaling:"linear"},"ct",0),12:k.create({parent:this,fieldKey:12,fieldName:"octaves",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-7,max:7},"oct",0)}}};var tg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ZeitgeistDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ZeitgeistDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"midi-effect"});constructor(e){super(e)}accept(e){return P(e.visitZeitgeistDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get groove(){return this.getField(10)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.MIDIEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:N.create({parent:this,fieldKey:10,fieldName:"groove",deprecated:!1,pointerRules:p},l.Groove,!0)}}};var rg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NeuralAmpDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="NeuralAmpDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitNeuralAmpDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get modelJson(){return this.getField(10)}get inputGain(){return this.getField(11)}get outputGain(){return this.getField(12)}get mono(){return this.getField(13)}get mix(){return this.getField(14)}get model(){return this.getField(20)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:B.create({parent:this,fieldKey:10,fieldName:"modelJson",deprecated:!0,pointerRules:p}),11:E.create({parent:this,fieldKey:11,fieldName:"inputGain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",0),12:E.create({parent:this,fieldKey:12,fieldName:"outputGain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"decibel","dB",0),13:R.create({parent:this,fieldKey:13,fieldName:"mono",deprecated:!1,pointerRules:p},!0),14:E.create({parent:this,fieldKey:14,fieldName:"mix",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:1,scaling:"linear"},"%",1),20:N.create({parent:this,fieldKey:20,fieldName:"model",deprecated:!1,pointerRules:p},l.NeuralAmpModel,!1)}}};var ig=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"VocoderDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="VocoderDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitVocoderDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get carrierMinFreq(){return this.getField(10)}get carrierMaxFreq(){return this.getField(11)}get modulatorMinFreq(){return this.getField(12)}get modulatorMaxFreq(){return this.getField(13)}get qMin(){return this.getField(14)}get qMax(){return this.getField(15)}get envRelease(){return this.getField(16)}get mix(){return this.getField(17)}get bandCount(){return this.getField(18)}get modulatorSource(){return this.getField(19)}get envAttack(){return this.getField(20)}get gain(){return this.getField(21)}get sideChain(){return this.getField(30)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:E.create({parent:this,fieldKey:10,fieldName:"carrierMinFreq",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:20,max:2e4,scaling:"exponential"},"Hz",100),11:E.create({parent:this,fieldKey:11,fieldName:"carrierMaxFreq",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:20,max:2e4,scaling:"exponential"},"Hz",12e3),12:E.create({parent:this,fieldKey:12,fieldName:"modulatorMinFreq",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:20,max:2e4,scaling:"exponential"},"Hz",100),13:E.create({parent:this,fieldKey:13,fieldName:"modulatorMaxFreq",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:20,max:2e4,scaling:"exponential"},"Hz",12e3),14:E.create({parent:this,fieldKey:14,fieldName:"qMin",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:60,scaling:"exponential"},"",2),15:E.create({parent:this,fieldKey:15,fieldName:"qMax",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:60,scaling:"exponential"},"",20),16:E.create({parent:this,fieldKey:16,fieldName:"envRelease",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:1,max:1e3,scaling:"exponential"},"ms",30),17:E.create({parent:this,fieldKey:17,fieldName:"mix",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1),18:k.create({parent:this,fieldKey:18,fieldName:"bandCount",deprecated:!1,pointerRules:p},{min:8,max:16},"",16),19:B.create({parent:this,fieldKey:19,fieldName:"modulatorSource",deprecated:!1,pointerRules:p},"noise-pink"),20:E.create({parent:this,fieldKey:20,fieldName:"envAttack",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:.1,max:100,scaling:"exponential"},"ms",5),21:E.create({parent:this,fieldKey:21,fieldName:"gain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-20,max:20,scaling:"linear"},"dB",0),30:N.create({parent:this,fieldKey:30,fieldName:"sideChain",deprecated:!1,pointerRules:p},l.SideChain,!1)}}};var ng=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"WaveshaperDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="WaveshaperDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitWaveshaperDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get equation(){return this.getField(10)}get inputGain(){return this.getField(11)}get outputGain(){return this.getField(12)}get mix(){return this.getField(13)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:B.create({parent:this,fieldKey:10,fieldName:"equation",deprecated:!1,pointerRules:p},"hardclip"),11:E.create({parent:this,fieldKey:11,fieldName:"inputGain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:0,max:40,scaling:"linear"},"dB",0),12:E.create({parent:this,fieldKey:12,fieldName:"outputGain",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},{min:-24,max:24,scaling:"linear"},"dB",0),13:E.create({parent:this,fieldKey:13,fieldName:"mix",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"unipolar","%",1)}}};var ag=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"WerkstattDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="WerkstattDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"audio-effect"});constructor(e){super(e)}accept(e){return P(e.visitWerkstattDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get code(){return this.getField(10)}get parameters(){return this.getField(11)}get samples(){return this.getField(12)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.AudioEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:B.create({parent:this,fieldKey:10,fieldName:"code",deprecated:!1,pointerRules:p},""),11:G.hook({parent:this,fieldKey:11,fieldName:"parameters",deprecated:!1,pointerRules:{accepts:[l.Parameter],mandatory:!1,exclusive:!1}}),12:G.hook({parent:this,fieldKey:12,fieldName:"samples",deprecated:!1,pointerRules:{accepts:[l.Sample],mandatory:!1,exclusive:!1}})}}};var la=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"WerkstattParameterBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="WerkstattParameterBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitWerkstattParameterBox,this)}get tags(){return t.Tags}get owner(){return this.getField(1)}get label(){return this.getField(2)}get index(){return this.getField(3)}get value(){return this.getField(4)}get defaultValue(){return this.getField(5)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"owner",deprecated:!1,pointerRules:p},l.Parameter,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p},""),3:k.create({parent:this,fieldKey:3,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),4:E.create({parent:this,fieldKey:4,fieldName:"value",deprecated:!1,pointerRules:{accepts:[l.Modulation,l.Automation,l.MIDIControl],mandatory:!1,exclusive:!1}},"any",""),5:E.create({parent:this,fieldKey:5,fieldName:"defaultValue",deprecated:!1,pointerRules:p},"any","")}}};var zs=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"WerkstattSampleBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="WerkstattSampleBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitWerkstattSampleBox,this)}get tags(){return t.Tags}get owner(){return this.getField(1)}get label(){return this.getField(2)}get index(){return this.getField(3)}get file(){return this.getField(4)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"owner",deprecated:!1,pointerRules:p},l.Sample,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p},""),3:k.create({parent:this,fieldKey:3,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),4:N.create({parent:this,fieldKey:4,fieldName:"file",deprecated:!1,pointerRules:p},l.AudioFile,!1)}}};var og=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"SpielwerkDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="SpielwerkDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"midi-effect"});constructor(e){super(e)}accept(e){return P(e.visitSpielwerkDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get index(){return this.getField(2)}get label(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get code(){return this.getField(10)}get parameters(){return this.getField(11)}get samples(){return this.getField(12)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.MIDIEffectHost,!0),2:k.create({parent:this,fieldKey:2,fieldName:"index",deprecated:!1,pointerRules:p},"index",""),3:B.create({parent:this,fieldKey:3,fieldName:"label",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:B.create({parent:this,fieldKey:10,fieldName:"code",deprecated:!1,pointerRules:p},""),11:G.hook({parent:this,fieldKey:11,fieldName:"parameters",deprecated:!1,pointerRules:{accepts:[l.Parameter],mandatory:!1,exclusive:!1}}),12:G.hook({parent:this,fieldKey:12,fieldName:"samples",deprecated:!1,pointerRules:{accepts:[l.Sample],mandatory:!1,exclusive:!1}})}}};var $u=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ApparatDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ApparatDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"notes"});constructor(e){super(e)}accept(e){return P(e.visitApparatDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get code(){return this.getField(10)}get parameters(){return this.getField(11)}get samples(){return this.getField(12)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:B.create({parent:this,fieldKey:10,fieldName:"code",deprecated:!1,pointerRules:p},""),11:G.hook({parent:this,fieldKey:11,fieldName:"parameters",deprecated:!1,pointerRules:{accepts:[l.Parameter],mandatory:!1,exclusive:!1}}),12:G.hook({parent:this,fieldKey:12,fieldName:"samples",deprecated:!1,pointerRules:{accepts:[l.Sample],mandatory:!1,exclusive:!1}})}}};var ku=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"NoopInstrumentBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="NoopInstrumentBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"audio"});constructor(e){super(e)}accept(e){return P(e.visitNoopInstrumentBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1)}}};var sg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"CompositeDeviceBox",pointerRules:{accepts:[l.Device,l.Selection,l.MetaData,l.SideChain],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="CompositeDeviceBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({type:"device",deviceType:"instrument",content:"notes"});constructor(e){super(e)}accept(e){return P(e.visitCompositeDeviceBox,this)}get tags(){return t.Tags}get host(){return this.getField(1)}get label(){return this.getField(2)}get icon(){return this.getField(3)}get enabled(){return this.getField(4)}get minimized(){return this.getField(5)}get cells(){return this.getField(10)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"host",deprecated:!1,pointerRules:p},l.InstrumentHost,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:B.create({parent:this,fieldKey:3,fieldName:"icon",deprecated:!1,pointerRules:p}),4:R.create({parent:this,fieldKey:4,fieldName:"enabled",deprecated:!1,pointerRules:p},!0),5:R.create({parent:this,fieldKey:5,fieldName:"minimized",deprecated:!1,pointerRules:p},!1),10:G.hook({parent:this,fieldKey:10,fieldName:"cells",deprecated:!1,pointerRules:{accepts:[l.CompositeCell],mandatory:!1,exclusive:!1}})}}};var lg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"CompositeCellBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="CompositeCellBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitCompositeCellBox,this)}get tags(){return t.Tags}get composite(){return this.getField(1)}get instrument(){return this.getField(2)}get midiEffects(){return this.getField(3)}get audioEffects(){return this.getField(4)}get index(){return this.getField(5)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"composite",deprecated:!1,pointerRules:p},l.CompositeCell,!0),2:G.hook({parent:this,fieldKey:2,fieldName:"instrument",deprecated:!1,pointerRules:{accepts:[l.InstrumentHost],mandatory:!0,exclusive:!1}}),3:G.hook({parent:this,fieldKey:3,fieldName:"midiEffects",deprecated:!1,pointerRules:{accepts:[l.MIDIEffectHost],mandatory:!1,exclusive:!1}}),4:G.hook({parent:this,fieldKey:4,fieldName:"audioEffects",deprecated:!1,pointerRules:{accepts:[l.AudioEffectHost],mandatory:!1,exclusive:!1}}),5:k.create({parent:this,fieldKey:5,fieldName:"index",deprecated:!1,pointerRules:p},"index","")}}};var ug=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ModularBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="ModularBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitModularBox,this)}get tags(){return t.Tags}get collection(){return this.getField(1)}get device(){return this.getField(2)}get editing(){return this.getField(3)}get modules(){return this.getField(11)}get connections(){return this.getField(12)}get label(){return this.getField(13)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"collection",deprecated:!1,pointerRules:p},l.ModularSetup,!0),2:G.hook({parent:this,fieldKey:2,fieldName:"device",deprecated:!1,pointerRules:{accepts:[l.ModularSetup],mandatory:!0,exclusive:!1}}),3:G.hook({parent:this,fieldKey:3,fieldName:"editing",deprecated:!1,pointerRules:{accepts:[l.Editing],mandatory:!1,exclusive:!1}}),11:G.hook({parent:this,fieldKey:11,fieldName:"modules",deprecated:!1,pointerRules:{accepts:[l.ModuleCollection],mandatory:!1,exclusive:!1}}),12:G.hook({parent:this,fieldKey:12,fieldName:"connections",deprecated:!1,pointerRules:{accepts:[l.ConnectionCollection],mandatory:!1,exclusive:!1}}),13:B.create({parent:this,fieldKey:13,fieldName:"label",deprecated:!1,pointerRules:p})}}};var cg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ModuleConnectionBox",pointerRules:p,resource:void 0,ephemeral:!1}),n)}static ClassName="ModuleConnectionBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitModuleConnectionBox,this)}get tags(){return t.Tags}get collection(){return this.getField(1)}get source(){return this.getField(2)}get target(){return this.getField(3)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"collection",deprecated:!1,pointerRules:p},l.ConnectionCollection,!0),2:N.create({parent:this,fieldKey:2,fieldName:"source",deprecated:!1,pointerRules:p},l.VoltageConnection,!0),3:N.create({parent:this,fieldKey:3,fieldName:"target",deprecated:!1,pointerRules:p},l.VoltageConnection,!0)}}};var Li=class t extends Je{static create(e){return new t(e)}constructor(e){super(e)}get collection(){return this.getField(1)}get label(){return this.getField(2)}get x(){return this.getField(3)}get y(){return this.getField(4)}get collapsed(){return this.getField(5)}get removable(){return this.getField(6)}initializeFields(){return{1:N.create({parent:this,fieldKey:1,fieldName:"collection",deprecated:!1,pointerRules:p},l.ModuleCollection,!0),2:B.create({parent:this,fieldKey:2,fieldName:"label",deprecated:!1,pointerRules:p}),3:k.create({parent:this,fieldKey:3,fieldName:"x",deprecated:!1,pointerRules:p},"any","x"),4:k.create({parent:this,fieldKey:4,fieldName:"y",deprecated:!1,pointerRules:p},"any","y"),5:R.create({parent:this,fieldKey:5,fieldName:"collapsed",deprecated:!1,pointerRules:p},!1),6:R.create({parent:this,fieldKey:6,fieldName:"removable",deprecated:!1,pointerRules:p},!0)}}};var dg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ModularAudioInputBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ModularAudioInputBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitModularAudioInputBox,this)}get tags(){return t.Tags}get attributes(){return this.getField(1)}get output(){return this.getField(10)}initializeFields(){return{1:Li.create({parent:this,fieldKey:1,fieldName:"attributes",deprecated:!1,pointerRules:p}),10:G.hook({parent:this,fieldKey:10,fieldName:"output",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}})}}};var pg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ModularAudioOutputBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ModularAudioOutputBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitModularAudioOutputBox,this)}get tags(){return t.Tags}get attributes(){return this.getField(1)}get input(){return this.getField(10)}initializeFields(){return{1:Li.create({parent:this,fieldKey:1,fieldName:"attributes",deprecated:!1,pointerRules:p}),10:G.hook({parent:this,fieldKey:10,fieldName:"input",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}})}}};var fg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ModuleDelayBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ModuleDelayBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitModuleDelayBox,this)}get tags(){return t.Tags}get attributes(){return this.getField(1)}get voltageInput(){return this.getField(10)}get voltageOutput(){return this.getField(11)}get time(){return this.getField(20)}initializeFields(){return{1:Li.create({parent:this,fieldKey:1,fieldName:"attributes",deprecated:!1,pointerRules:p}),10:G.hook({parent:this,fieldKey:10,fieldName:"voltageInput",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}}),11:G.hook({parent:this,fieldKey:11,fieldName:"voltageOutput",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}}),20:E.create({parent:this,fieldKey:20,fieldName:"time",deprecated:!1,pointerRules:{accepts:[l.ParameterController],mandatory:!1,exclusive:!1}},{min:1,max:1e3,scaling:"exponential"},"ms",500)}}};var mg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ModuleMultiplierBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ModuleMultiplierBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitModuleMultiplierBox,this)}get tags(){return t.Tags}get attributes(){return this.getField(1)}get voltageInputX(){return this.getField(10)}get voltageInputY(){return this.getField(11)}get voltageOutput(){return this.getField(12)}get multiplier(){return this.getField(20)}initializeFields(){return{1:Li.create({parent:this,fieldKey:1,fieldName:"attributes",deprecated:!1,pointerRules:p}),10:G.hook({parent:this,fieldKey:10,fieldName:"voltageInputX",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}}),11:G.hook({parent:this,fieldKey:11,fieldName:"voltageInputY",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}}),12:G.hook({parent:this,fieldKey:12,fieldName:"voltageOutput",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}}),20:E.create({parent:this,fieldKey:20,fieldName:"multiplier",deprecated:!1,pointerRules:p},"unipolar","%")}}};var hg=class t extends D{static create(e,r,n){return e.stageBox(new t({uuid:r,graph:e,name:"ModuleGainBox",pointerRules:{accepts:[l.Selection],mandatory:!1,exclusive:!1},resource:void 0,ephemeral:!1}),n)}static ClassName="ModuleGainBox";static Resource=void 0;static Ephemeral=!1;static Tags=Object.freeze({});constructor(e){super(e)}accept(e){return P(e.visitModuleGainBox,this)}get tags(){return t.Tags}get attributes(){return this.getField(1)}get voltageInput(){return this.getField(10)}get voltageOutput(){return this.getField(12)}get gain(){return this.getField(20)}initializeFields(){return{1:Li.create({parent:this,fieldKey:1,fieldName:"attributes",deprecated:!1,pointerRules:p}),10:G.hook({parent:this,fieldKey:10,fieldName:"voltageInput",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}}),12:G.hook({parent:this,fieldKey:12,fieldName:"voltageOutput",deprecated:!1,pointerRules:{accepts:[l.VoltageConnection],mandatory:!1,exclusive:!1}}),20:E.create({parent:this,fieldKey:20,fieldName:"gain",deprecated:!1,pointerRules:{accepts:[l.ParameterController],mandatory:!1,exclusive:!1}},"decibel","dB")}}};var ai;(function(t){t.write=(e,r)=>{if(r.type==="none")e.disconnect(),e.setValue(0);else if(r.type==="linear")e.disconnect(),e.setValue(1);else if(r.type==="curve"){e.setValue(0);let n=e.pointerHub.filter(l.ValueInterpolation).at(0)?.box;W(n)?(fb(n,Fo),n.slope.setValue(r.slope)):Fo.create(e.box.graph,M.generate(),i=>{i.slope.setValue(r.slope),i.event.refer(e)})}},t.read=e=>{let r=e.pointerHub.incoming().at(0)?.box;return W(r)?(fb(r,Fo),{type:"curve",slope:r.slope.getValue()}):e.getValue()===0?ii.None:e.getValue()===1?ii.Linear:V("Unknown Interpolation value")}})(ai||(ai={}));var No=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Qe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},tp,Mu,Tt,rp,Mo,ip,Za=class t{constructor(e,r){this.type="value-event",tp.set(this,new Y),Mu.set(this,void 0),Tt.set(this,void 0),rp.set(this,void 0),Mo.set(this,void 0),ip.set(this,!1),No(this,Mu,e,"f"),No(this,Tt,r,"f"),No(this,rp,Qe(this,tp,"f").own(new nh(()=>ai.read(Qe(this,Tt,"f").interpolation))),"f");let n=()=>{Qe(this,rp,"f").invalidate(),this.collection.ifSome(i=>i.onEventPropertyChanged())};Qe(this,tp,"f").ownAll(Qe(this,Tt,"f").subscribe(ze.Children,i=>{if(!this.collection.isEmpty()&&(i.type==="primitive"||i.type==="pointer")){let a=this.collection.unwrap(),o=i.address.fieldKeys,s=ue.equals(Qe(this,Tt,"f").index.address.fieldKeys,o),u=ue.equals(Qe(this,Tt,"f").position.address.fieldKeys,o);s||u?a.requestSorting():a.onEventPropertyChanged()}}),Qe(this,Tt,"f").interpolation.subscribe(n),Qe(this,Tt,"f").interpolation.pointerHub.subscribe({onAdded:({box:i})=>{Qe(this,Mo,"f").terminate(),No(this,Mo,i.subscribe(ze.Children,n),"f"),n()},onRemoved:()=>{Qe(this,Mo,"f").terminate(),No(this,Mo,pe.Empty,"f"),n()}})),No(this,Mo,Qe(this,Tt,"f").interpolation.pointerHub.filter(l.ValueInterpolation).at(0)?.box.subscribe(ze.Children,n)??pe.Empty,"f")}onSelected(){No(this,ip,!0,"f"),this.collection.ifSome(e=>e.onEventPropertyChanged())}onDeselected(){No(this,ip,!1,"f"),this.collection.ifSome(e=>e.onEventPropertyChanged())}terminate(){Qe(this,Mo,"f").terminate(),Qe(this,tp,"f").terminate()}get box(){return Qe(this,Tt,"f")}get uuid(){return Qe(this,Tt,"f").address.uuid}get address(){return Qe(this,Tt,"f").address}get position(){return Qe(this,Tt,"f").position.getValue()}get index(){return Qe(this,Tt,"f").index.getValue()}set interpolation(e){ai.write(Qe(this,Tt,"f").interpolation,e)}get interpolation(){return Qe(this,rp,"f").get()}get value(){return Qe(this,Tt,"f").value.getValue()}get isSelected(){return Qe(this,ip,"f")}get collection(){return Qe(this,Tt,"f").events.targetVertex.map(e=>Qe(this,Mu,"f").boxAdapters.adapterFor(e.box,_r))}copyTo(e){let r=e?.position??this.position,n=e?.index??this.index,i=Sn.create(Qe(this,Mu,"f").boxGraph,M.generate(),a=>{a.position.setValue(r),a.index.setValue(n),a.events.refer(e?.events??this.collection.unwrap("collection").box.events),a.value.setValue(e?.value??this.value)});return ai.write(i.interpolation,e?.interpolation??this.interpolation),Qe(this,Mu,"f").boxAdapters.adapterFor(i,t)}copyFrom(e){return Qe(this,Tt,"f").position.setValue(e?.position??this.position),Qe(this,Tt,"f").index.setValue(e?.index??this.index),Qe(this,Tt,"f").events.refer(e?.events??this.collection.unwrap("collection").box.events),Qe(this,Tt,"f").value.setValue(e?.value??this.value),ai.write(Qe(this,Tt,"f").interpolation,e?.interpolation??this.interpolation),this}toString(){return`{ValueEventBoxAdapter position: ${this.position} index: ${this.index}}`}};tp=new WeakMap,Mu=new WeakMap,Tt=new WeakMap,rp=new WeakMap,Mo=new WeakMap,ip=new WeakMap;Za.Comparator=(t,e)=>{if(t===e)return V(`${t} is equal to itself`);let r=t.position-e.position;if(r!==0)return r;let n=t.index-e.index;return n!==0?n:V(`${t} and ${e} are identical in terms of comparison`)};var np=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ye=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ap,op,Io,Zi,Os,Iu,Ga,$g,_r=class t{constructor(e,r){ap.add(this),op.set(this,new Y),Io.set(this,void 0),Zi.set(this,void 0),Os.set(this,void 0),Iu.set(this,void 0),Ga.set(this,void 0),np(this,Io,e,"f"),np(this,Zi,r,"f"),np(this,Os,new fe,"f"),np(this,Iu,M.newSet(i=>i.uuid),"f"),np(this,Ga,ri.create(Za.Comparator),"f");let n=i=>{let a=Ce(i.accept({visitValueEventBox:o=>Ye(this,Io,"f").boxAdapters.adapterFor(o,Za)}),`Could not find adapter for ${i}`);Ye(this,Iu,"f").add(a)&&(Ye(this,Ga,"f").add(a),Ye(this,ap,"m",$g).call(this))};Ye(this,Zi,"f").events.pointerHub.incoming().forEach(({box:i})=>n(i)),Ye(this,op,"f").own(Ye(this,Zi,"f").events.pointerHub.subscribe({onAdded:({box:i})=>n(i),onRemoved:({box:{address:{uuid:i}}})=>{Ye(this,Ga,"f").remove(Ye(this,Iu,"f").removeByKey(i)),Ye(this,ap,"m",$g).call(this)}})),Ye(this,op,"f").own(Ye(this,Zi,"f").owners.pointerHub.subscribe({onAdded:()=>Ye(this,Os,"f").notify(this),onRemoved:()=>Ye(this,Os,"f").notify(this)}))}valueAt(e,r){return _h.valueAt(Ye(this,Ga,"f"),e,r)}copy(){let e=Ye(this,Io,"f").boxGraph,r=Pn.create(e,M.generate());return Ye(this,Ga,"f").asArray().forEach(n=>n.copyTo({events:r.events})),Ye(this,Io,"f").boxAdapters.adapterFor(r,t)}cut(e,r=S.unipolar()){let n=this.events.lowerEqual(e),i=this.events.greaterEqual(e);if(i===null)return n===null?b.None:b.wrap(this.createEvent({position:e,value:n.value,index:n.index,interpolation:n.interpolation}));if(n===null)return b.wrap(this.createEvent({position:e,value:i.value,index:i.index,interpolation:i.interpolation}));if(n.position===e)return b.wrap(n);if(i.position===e)return b.wrap(i);if(n.interpolation.type==="none")return b.wrap(this.createEvent({position:e,value:n.value,index:n.index,interpolation:n.interpolation}));if(n.interpolation.type==="linear"){let{position:a}=n,{position:o}=i,s=r.x(n.value),u=r.x(i.value),d=SS(s,u,(e-a)/(o-a));return b.wrap(this.createEvent({position:e,value:r.y(d),index:0,interpolation:n.interpolation}))}if(n.interpolation.type==="curve"){let{position:a}=n,{position:o}=i,s=r.x(n.value),u=r.x(i.value),d=o-a,m=e-a,x=qt.byHalf(d,s,qt.valueAt({slope:n.interpolation.slope,steps:d,y0:s,y1:u},d*.5),u),h=qt.valueAt(x,m),w=qt.slopeByHalf(s,qt.valueAt(x,m*.5),h);return ai.write(n.box.interpolation,ii.Curve(w)),b.wrap(this.createEvent({position:e,value:r.y(h),index:0,interpolation:ii.Curve(qt.slopeByHalf(h,qt.valueAt(x,(m+d)*.5),u))}))}return V("Unknown interpolation type")}subscribeChange(e){return Ye(this,Os,"f").subscribe(e)}createEvent({position:e,index:r,value:n,interpolation:i}){let a=Math.trunc(e),o=Ye(this,Iu,"f").values().find(u=>u.position===a&&u.index===r);if(W(o)&&o.box.isAttached())return o.box.value.setValue(n),ai.write(o.box.interpolation,i),o;let s=Sn.create(Ye(this,Io,"f").boxGraph,M.generate(),u=>{u.position.setValue(e),u.index.setValue(r),u.value.setValue(n),u.events.refer(Ye(this,Zi,"f").events)});return ai.write(s.interpolation,i),Ye(this,Io,"f").boxAdapters.adapterFor(s,Za)}requestSorting(){Ye(this,Ga,"f").onIndexingChanged(),this.onEventPropertyChanged()}onEventPropertyChanged(){Ye(this,ap,"m",$g).call(this)}terminate(){Ye(this,op,"f").terminate()}get box(){return Ye(this,Zi,"f")}get uuid(){return Ye(this,Zi,"f").address.uuid}get address(){return Ye(this,Zi,"f").address}get numOwners(){return Ye(this,Zi,"f").owners.pointerHub.filter(l.ValueEventCollection).length}get events(){return Ye(this,Ga,"f")}toString(){return`{ValueEventCollectionBox ${M.toString(Ye(this,Zi,"f").address.uuid)}}`}};op=new WeakMap,Io=new WeakMap,Zi=new WeakMap,Os=new WeakMap,Iu=new WeakMap,Ga=new WeakMap,ap=new WeakSet,$g=function(){Ye(this,Os,"f").notify(this)};var Us=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Re=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Vs,Bo,js,Qt,Ks,up,sp,lp,Bu,To=class{constructor(e,r){Vs.add(this),this.type="value-clip",Bo.set(this,new Y),js.set(this,void 0),Qt.set(this,void 0),Ks.set(this,void 0),up.set(this,void 0),sp.set(this,void 0),lp.set(this,pe.Empty),Us(this,js,e,"f"),Us(this,Qt,r,"f"),Us(this,sp,!0,"f"),Us(this,Ks,Re(this,Bo,"f").own(new Ki(!1)),"f"),Us(this,up,Re(this,Bo,"f").own(new fe),"f"),Re(this,Bo,"f").own(Re(this,Qt,"f").pointerHub.subscribe({onAdded:()=>Re(this,Vs,"m",Bu).call(this),onRemoved:()=>Re(this,Vs,"m",Bu).call(this)})),Re(this,Bo,"f").own(Re(this,Qt,"f").subscribe(ze.Children,n=>Re(this,Vs,"m",Bu).call(this))),Re(this,Bo,"f").own(Re(this,Qt,"f").events.catchupAndSubscribe(({targetVertex:n})=>{Re(this,lp,"f").terminate(),Us(this,lp,n.match({none:()=>pe.Empty,some:({box:i})=>Re(this,js,"f").boxAdapters.adapterFor(i,_r).subscribeChange(()=>Re(this,Vs,"m",Bu).call(this))}),"f"),Re(this,Vs,"m",Bu).call(this)})),Us(this,sp,!1,"f")}valueAt(e,r){let n=this.optCollection;return n.isEmpty()?r:n.unwrap().valueAt(e%this.duration,r)}catchupAndSubscribeSelected(e){return Re(this,Ks,"f").catchupAndSubscribe(e)}subscribeChange(e){return Re(this,up,"f").subscribe(e)}accept(e){return P(e.visitValueClipBoxAdapter,this)}consolidate(){this.isMirrowed&&Re(this,Qt,"f").events.refer(this.optCollection.unwrap("optCollection").copy().box.owners)}clone(e){let r=e?this.optCollection.unwrap("optCollection").copy().box.owners:Re(this,Qt,"f").events.targetVertex.unwrap("events.target");fu.create(Re(this,js,"f").boxGraph,M.generate(),n=>{n.index.setValue(this.indexField.getValue()),n.label.setValue(this.label),n.hue.setValue(this.hue),n.duration.setValue(this.duration),n.mute.setValue(this.mute),n.clips.refer(Re(this,Qt,"f").clips.targetVertex.unwrap("clips.target")),n.events.refer(r)})}onSelected(){Re(this,Ks,"f").setValue(!0)}onDeselected(){Re(this,Ks,"f").setValue(!1)}get isSelected(){return Re(this,Ks,"f").getValue()}terminate(){Re(this,lp,"f").terminate(),Re(this,Bo,"f").terminate()}get box(){return Re(this,Qt,"f")}get uuid(){return Re(this,Qt,"f").address.uuid}get address(){return Re(this,Qt,"f").address}get indexField(){return Re(this,Qt,"f").index}get duration(){return Re(this,Qt,"f").duration.getValue()}get mute(){return Re(this,Qt,"f").mute.getValue()}get hue(){return Re(this,Qt,"f").hue.getValue()}get hasCollection(){return!this.optCollection.isEmpty()}get events(){return this.optCollection.map(e=>e.events)}get optCollection(){return Re(this,Qt,"f").events.targetVertex.map(e=>Re(this,js,"f").boxAdapters.adapterFor(e.box,_r))}get label(){return Re(this,Qt,"f").label.getValue()}get trackBoxAdapter(){return Re(this,sp,"f")?b.None:Re(this,Qt,"f").clips.targetVertex.map(e=>Re(this,js,"f").boxAdapters.adapterFor(e.box,er))}get isMirrowed(){return this.optCollection.mapOr(e=>e.numOwners>1,!1)}get canMirror(){return!0}toString(){return`{ValueClipBoxAdapter ${M.toString(Re(this,Qt,"f").address.uuid)} d: ${Ne.toString(this.duration)}}`}};Bo=new WeakMap,js=new WeakMap,Qt=new WeakMap,Ks=new WeakMap,up=new WeakMap,sp=new WeakMap,lp=new WeakMap,Vs=new WeakSet,Bu=function(){Re(this,up,"f").notify(),this.trackBoxAdapter.unwrapOrNull()?.clips?.dispatchChange()};var KS=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Tu=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ib,Ws,kg,Du=class{constructor(e){this.type="transient-marker",Ib.set(this,new Y),Ws.set(this,void 0),kg.set(this,void 0),KS(this,Ws,e,"f"),KS(this,kg,new fe,"f")}get box(){return Tu(this,Ws,"f")}get uuid(){return Tu(this,Ws,"f").address.uuid}get address(){return Tu(this,Ws,"f").address}get position(){return Tu(this,Ws,"f").position.getValue()}subscribe(e){return Tu(this,kg,"f").subscribe(e)}terminate(){Tu(this,Ib,"f").terminate()}};Ib=new WeakMap,Ws=new WeakMap,kg=new WeakMap;var cp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ar=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ng,dp,ua,pp,Ru,Mg,kn=class t{constructor(e,r){Ng.set(this,new Y),dp.set(this,void 0),ua.set(this,void 0),pp.set(this,void 0),Ru.set(this,void 0),Mg.set(this,void 0),cp(this,dp,e,"f"),cp(this,ua,r,"f"),cp(this,pp,M.newSet(({uuid:n})=>n),"f"),cp(this,Ru,ri.create(t.Comparator),"f"),cp(this,Mg,Ah.memoizeAsync(async()=>{if(this.data.nonEmpty())return this.data.unwrap();let{promise:n,resolve:i,reject:a}=Promise.withResolvers(),o=this.getOrCreateLoader(),s=o.subscribe(u=>{u.type==="loaded"?(queueMicrotask(()=>s.terminate()),i(o.data.unwrap("State mismatch"))):u.type==="error"&&(queueMicrotask(()=>s.terminate()),a(new Error(u.reason)))});return n}),"f"),Ar(this,Ng,"f").ownAll(r.transientMarkers.pointerHub.catchupAndSubscribe({onAdded:n=>{let i=Ar(this,dp,"f").boxAdapters.adapterFor(n.box,Du);Ar(this,pp,"f").add(i)&&Ar(this,Ru,"f").add(i)},onRemoved:({box:{address:{uuid:n}}})=>{Ar(this,Ru,"f").remove(Ar(this,pp,"f").removeByKey(n))}}))}get box(){return Ar(this,ua,"f")}get uuid(){return Ar(this,ua,"f").address.uuid}get address(){return Ar(this,ua,"f").address}get startInSeconds(){return Ar(this,ua,"f").startInSeconds.getValue()}get endInSeconds(){return Ar(this,ua,"f").endInSeconds.getValue()}get transients(){return Ar(this,Ru,"f")}get fileName(){return Ar(this,ua,"f").fileName.getValue()}get data(){return this.getOrCreateLoader().data}get peaks(){return this.getOrCreateLoader().peaks}get audioData(){return Ar(this,Mg,"f").call(this)}getOrCreateLoader(){return Ar(this,dp,"f").sampleManager.getOrCreate(Ar(this,ua,"f").address.uuid)}terminate(){Ar(this,Ng,"f").terminate()}};Ng=new WeakMap,dp=new WeakMap,ua=new WeakMap,pp=new WeakMap,Ru=new WeakMap,Mg=new WeakMap;kn.Comparator=(t,e)=>{let r=t.position-e.position;return r===0?(console.warn(t,e),V("Events at the same position: "+t.position+", "+e.position)):r};var fp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Wr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},mp,Ig,Bg,Ha,gp,hp,Tg,Do=class{constructor(e,r){mp.add(this),this.type="warp-marker",Ig.set(this,new Y),Bg.set(this,void 0),Ha.set(this,void 0),gp.set(this,void 0),hp.set(this,!1),fp(this,Bg,e,"f"),fp(this,Ha,r,"f"),fp(this,gp,new fe,"f"),Wr(this,Ig,"f").own(r.subscribe(ze.Children,()=>Wr(this,mp,"m",Tg).call(this)))}onSelected(){fp(this,hp,!0,"f"),this.optWarping.ifSome(e=>e.onChanged()),Wr(this,mp,"m",Tg).call(this)}onDeselected(){fp(this,hp,!1,"f"),Wr(this,mp,"m",Tg).call(this)}get box(){return Wr(this,Ha,"f")}get uuid(){return Wr(this,Ha,"f").address.uuid}get address(){return Wr(this,Ha,"f").address}get position(){return Wr(this,Ha,"f").position.getValue()}get seconds(){return Wr(this,Ha,"f").seconds.getValue()}get isSelected(){return Wr(this,hp,"f")}get optWarping(){return Wr(this,Ha,"f").owner.targetVertex.map(e=>Wr(this,Bg,"f").boxAdapters.adapterFor(e.box,ca.isAudioPlayMode))}get isAnchor(){return this.optWarping.mapOr(({warpMarkers:e})=>this===e.optAt(0)||this===e.optAt(e.length()-1),!1)}subscribe(e){return Wr(this,gp,"f").subscribe(e)}terminate(){Wr(this,Ig,"f").terminate()}};Ig=new WeakMap,Bg=new WeakMap,Ha=new WeakMap,gp=new WeakMap,hp=new WeakMap,mp=new WeakSet,Tg=function(){Wr(this,gp,"f").notify(),this.optWarping.ifSome(e=>e.onChanged())};var Dg=(t,e)=>{let r=t.position-e.position;return r===0?(console.warn(t,e),V("Events at the same position: "+t.position+", "+e.position)):r};var vp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ir=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Rg,Cg,Ls,Zs,xp,Cu,da=class{constructor(e,r){Rg.set(this,new Y),Cg.set(this,void 0),Ls.set(this,void 0),Zs.set(this,void 0),xp.set(this,void 0),Cu.set(this,void 0),vp(this,Cg,e,"f"),vp(this,Ls,r,"f"),vp(this,Zs,new fe,"f"),vp(this,xp,M.newSet(({uuid:n})=>n),"f"),vp(this,Cu,ri.create(Dg),"f"),Ir(this,Rg,"f").ownAll(r.warpMarkers.pointerHub.catchupAndSubscribe({onAdded:n=>{let i=Ir(this,Cg,"f").boxAdapters.adapterFor(n.box,Do);Ir(this,xp,"f").add(i)&&(Ir(this,Cu,"f").add(i),Ir(this,Zs,"f").notify())},onRemoved:({box:{address:{uuid:n}}})=>{Ir(this,Cu,"f").remove(Ir(this,xp,"f").removeByKey(n)),Ir(this,Zs,"f").notify()}}))}get box(){return Ir(this,Ls,"f")}get uuid(){return Ir(this,Ls,"f").address.uuid}get address(){return Ir(this,Ls,"f").address}get warpMarkers(){return Ir(this,Cu,"f")}clone(){let e=gu.create(Ir(this,Ls,"f").graph,M.generate());return this.warpMarkers.asArray().forEach(r=>So.create(e.graph,M.generate(),n=>{n.position.setValue(r.position),n.seconds.setValue(r.seconds),n.owner.refer(e.warpMarkers)})),e}subscribe(e){return Ir(this,Zs,"f").subscribe(e)}onChanged(){Ir(this,Zs,"f").notify()}terminate(){Ir(this,Rg,"f").terminate()}};Rg=new WeakMap,Cg=new WeakMap,Ls=new WeakMap,Zs=new WeakMap,xp=new WeakMap,Cu=new WeakMap;var yp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},tr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},zg,Og,Nn,Gs,wp,zu,pa=class{constructor(e,r){zg.set(this,new Y),Og.set(this,void 0),Nn.set(this,void 0),Gs.set(this,void 0),wp.set(this,void 0),zu.set(this,void 0),yp(this,Og,e,"f"),yp(this,Nn,r,"f"),yp(this,Gs,new fe,"f"),yp(this,wp,M.newSet(({uuid:n})=>n),"f"),yp(this,zu,ri.create(Dg),"f"),tr(this,zg,"f").ownAll(r.warpMarkers.pointerHub.catchupAndSubscribe({onAdded:n=>{let i=tr(this,Og,"f").boxAdapters.adapterFor(n.box,Do);tr(this,wp,"f").add(i)&&(tr(this,zu,"f").add(i),tr(this,Gs,"f").notify())},onRemoved:({box:{address:{uuid:n}}})=>{tr(this,zu,"f").remove(tr(this,wp,"f").removeByKey(n)),tr(this,Gs,"f").notify()}}))}get box(){return tr(this,Nn,"f")}get uuid(){return tr(this,Nn,"f").address.uuid}get address(){return tr(this,Nn,"f").address}get warpMarkers(){return tr(this,zu,"f")}get playbackRate(){return tr(this,Nn,"f").playbackRate.getValue()}get cents(){return Math.log2(tr(this,Nn,"f").playbackRate.getValue())*1200}set cents(e){tr(this,Nn,"f").playbackRate.setValue(at(2**(e/1200),.5,2))}get transientPlayMode(){return Ra(tr(this,Nn,"f").transientPlayMode.getValue(),$h)}clone(){let e=vu.create(tr(this,Nn,"f").graph,M.generate(),r=>{r.transientPlayMode.setValue(this.transientPlayMode),r.playbackRate.setValue(this.playbackRate),r.warpMarkers});return this.warpMarkers.asArray().forEach(r=>So.create(e.graph,M.generate(),n=>{n.position.setValue(r.position),n.seconds.setValue(r.seconds),n.owner.refer(e.warpMarkers)})),e}subscribe(e){return tr(this,Gs,"f").subscribe(e)}onChanged(){tr(this,Gs,"f").notify()}terminate(){tr(this,zg,"f").terminate()}};zg=new WeakMap,Og=new WeakMap,Nn=new WeakMap,Gs=new WeakMap,wp=new WeakMap,zu=new WeakMap;var ca;(function(t){t.isAudioPlayMode=e=>e instanceof da||e instanceof pa})(ca||(ca={}));var _i=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ge=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Hs,Ou,qs,Dt,Js,Xs,bp,Ap,_p,Ro,Uu,Vu,ju,Ku=class{constructor(e,r){Hs.add(this),this.type="audio-clip",Ou.set(this,new Y),qs.set(this,void 0),Dt.set(this,void 0),Js.set(this,void 0),Xs.set(this,void 0),bp.set(this,void 0),Ap.set(this,void 0),_p.set(this,void 0),Ro.set(this,b.None),Uu.set(this,b.None),Vu.set(this,pe.Empty),_i(this,qs,e,"f"),_i(this,Dt,r,"f"),_i(this,_p,!0,"f"),_i(this,Js,new wr,"f"),_i(this,Xs,ge(this,Ou,"f").own(new Ki(!1)),"f"),_i(this,bp,Es.aware(e.tempoMap,r.timeBase,r.duration),"f"),_i(this,Ap,ge(this,Ou,"f").own(new fe),"f"),ge(this,Ou,"f").ownAll(ge(this,Dt,"f").pointerHub.subscribe({onAdded:()=>ge(this,Hs,"m",ju).call(this),onRemoved:()=>ge(this,Hs,"m",ju).call(this)}),ge(this,Dt,"f").playMode.catchupAndSubscribe(({targetVertex:n})=>{ge(this,Vu,"f").terminate(),n.match({none:()=>ge(this,Js,"f").clear(),some:({box:i})=>{let a=ge(this,qs,"f").boxAdapters.adapterFor(i,ca.isAudioPlayMode);_i(this,Vu,a.subscribe(()=>ge(this,Hs,"m",ju).call(this)),"f"),ge(this,Js,"f").wrap(a)}})}),ge(this,Dt,"f").file.catchupAndSubscribe(n=>{_i(this,Ro,n.targetVertex.map(i=>ge(this,qs,"f").boxAdapters.adapterFor(i.box,kn)),"f"),ge(this,Uu,"f").ifSome(i=>i.terminate()),_i(this,Uu,ge(this,Ro,"f").map(i=>i.getOrCreateLoader().subscribe(()=>ge(this,Hs,"m",ju).call(this))),"f")}),ge(this,Dt,"f").subscribe(ze.Children,n=>ge(this,Hs,"m",ju).call(this))),_i(this,_p,!1,"f")}catchupAndSubscribeSelected(e){return ge(this,Xs,"f").catchupAndSubscribe(e)}subscribeChange(e){return ge(this,Ap,"f").subscribe(e)}accept(e){return P(e.visitAudioClipBoxAdapter,this)}consolidate(){}clone(e){let r=this.observableOptPlayMode.map(n=>n.clone());hu.create(ge(this,qs,"f").boxGraph,M.generate(),n=>{n.index.setValue(this.indexField.getValue()),n.gain.setValue(this.gain.getValue()),n.timeBase.setValue(this.timeBase),n.label.setValue(this.label),n.hue.setValue(this.hue),n.duration.setValue(this.duration),n.mute.setValue(this.mute),n.clips.refer(ge(this,Dt,"f").clips.targetVertex.unwrap("clips.target")),n.file.refer(ge(this,Dt,"f").file.targetVertex.unwrap("file.target")),n.events.refer(ge(this,Dt,"f").events.targetVertex.unwrap("events.target")),r.ifSome(i=>n.playMode.refer(i))})}onSelected(){ge(this,Xs,"f").setValue(!0)}onDeselected(){ge(this,Xs,"f").setValue(!1)}get isSelected(){return ge(this,Xs,"f").getValue()}get box(){return ge(this,Dt,"f")}get uuid(){return ge(this,Dt,"f").address.uuid}get address(){return ge(this,Dt,"f").address}get indexField(){return ge(this,Dt,"f").index}get duration(){return ge(this,bp,"f").toPPQN(0)}set duration(e){ge(this,bp,"f").fromPPQN(e,0)}get mute(){return ge(this,Dt,"f").mute.getValue()}get hue(){return ge(this,Dt,"f").hue.getValue()}get gain(){return ge(this,Dt,"f").gain}get file(){return ge(this,Ro,"f").unwrap("Cannot access file.")}get optFile(){return ge(this,Ro,"f")}get observableOptPlayMode(){return ge(this,Js,"f")}get hasCollection(){return!this.optCollection.isEmpty()}get optCollection(){return b.None}get timeBase(){return Ra(ge(this,Dt,"f").timeBase.getValue(),Kr)}get waveformOffset(){return ge(this,Dt,"f").waveformOffset}get isPlayModeNoStretch(){return ge(this,Dt,"f").playMode.isEmpty()}get asPlayModePitchStretch(){return this.observableOptPlayMode.map(e=>$t(e,da)?e:null)}get asPlayModeTimeStretch(){return this.observableOptPlayMode.map(e=>$t(e,pa)?e:null)}get optWarpMarkers(){return this.observableOptPlayMode.map(e=>ca.isAudioPlayMode(e)?e.warpMarkers:null)}get label(){if(ge(this,Ro,"f").isEmpty())return"No Audio File";let e=ge(this,Ro,"f").unwrap().getOrCreateLoader().state;return e.type==="progress"?`${Math.round(e.progress*100)}%`:e.type==="error"?String(e.reason):ge(this,Dt,"f").label.getValue()}get trackBoxAdapter(){return ge(this,_p,"f")?b.None:ge(this,Dt,"f").clips.targetVertex.map(e=>ge(this,qs,"f").boxAdapters.adapterFor(e.box,er))}get isMirrowed(){return!1}get canMirror(){return!1}get canResize(){return ge(this,Js,"f").nonEmpty()}terminate(){ge(this,Uu,"f").ifSome(e=>e.terminate()),_i(this,Uu,b.None,"f"),ge(this,Vu,"f").terminate(),_i(this,Vu,pe.Empty,"f"),ge(this,Ou,"f").terminate()}toString(){return`{AudioClipBoxAdapter ${M.toString(ge(this,Dt,"f").address.uuid)} d: ${Ne.toString(this.duration)}}`}};Ou=new WeakMap,qs=new WeakMap,Dt=new WeakMap,Js=new WeakMap,Xs=new WeakMap,bp=new WeakMap,Ap=new WeakMap,_p=new WeakMap,Ro=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,Hs=new WeakSet,ju=function(){ge(this,Ap,"f").notify(),this.trackBoxAdapter.unwrapOrNull()?.clips?.dispatchChange()};var Fp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Wt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Wu,cr,Ug,Ep,Ys=class t{constructor(e,r){this.type="note-event",Wu.set(this,void 0),cr.set(this,void 0),Ug.set(this,void 0),Ep.set(this,!1),Fp(this,Wu,e,"f"),Fp(this,cr,r,"f"),Fp(this,Ug,Wt(this,cr,"f").subscribe(ze.Children,n=>{if(!this.collection.isEmpty()&&(n.type==="primitive"||n.type==="pointer")){let i=this.collection.unwrap(),a=n.address.fieldKeys,o=ue.equals(Wt(this,cr,"f").pitch.address.fieldKeys,a),s=ue.equals(Wt(this,cr,"f").position.address.fieldKeys,a);o||s?i.requestSorting():i.onEventPropertyChanged()}}),"f")}onSelected(){Fp(this,Ep,!0,"f"),this.collection.ifSome(e=>e.onEventPropertyChanged())}onDeselected(){Fp(this,Ep,!1,"f"),this.collection.ifSome(e=>e.onEventPropertyChanged())}terminate(){Wt(this,Ug,"f").terminate()}get box(){return Wt(this,cr,"f")}get uuid(){return Wt(this,cr,"f").address.uuid}get address(){return Wt(this,cr,"f").address}get position(){return Wt(this,cr,"f").position.getValue()}get duration(){return Wt(this,cr,"f").duration.getValue()}get complete(){return this.position+this.duration}get velocity(){return Wt(this,cr,"f").velocity.getValue()}get pitch(){return Wt(this,cr,"f").pitch.getValue()}get cent(){return Wt(this,cr,"f").cent.getValue()}get chance(){return Wt(this,cr,"f").chance.getValue()}get playCount(){return Wt(this,cr,"f").playCount.getValue()}get playCurve(){return Wt(this,cr,"f").playCurve.getValue()}get isSelected(){return Wt(this,Ep,"f")}get collection(){return Wt(this,cr,"f").events.targetVertex.map(e=>Wt(this,Wu,"f").boxAdapters.adapterFor(e.box,Gi))}normalizedPitch(){if(this.collection.isEmpty())return .5;let{minPitch:e,maxPitch:r}=this.collection.unwrap();return e===r?.5:1-(this.pitch-e)/(r-e)}copyAsNoteEvent(){return{type:"note-event",position:this.position,duration:this.duration,pitch:this.pitch,cent:this.cent,velocity:this.velocity}}copyTo(e){return Wt(this,Wu,"f").boxAdapters.adapterFor(Ao.create(Wt(this,Wu,"f").boxGraph,M.generate(),r=>{r.position.setValue(e?.position??this.position),r.duration.setValue(e?.duration??this.duration),r.pitch.setValue(e?.pitch??this.pitch),r.playCount.setValue(e?.playCount??this.playCount),r.events.refer(e?.events??this.collection.unwrap("collection").box.events),r.velocity.setValue(this.velocity),r.cent.setValue(this.cent),r.chance.setValue(this.chance)}),t)}computeCurveValue(e){return uu.curveFunc(e,this.playCurve)}canConsolidate(){return this.playCount>1}consolidate(){let e=this.playCount,r=this.collection.unwrap("collection").box.events,n=ue.create(i=>{let a=Math.floor(this.computeCurveValue(i/e)*this.duration),o=Math.floor(this.computeCurveValue((i+1)/e)*this.duration);return this.copyTo({position:Math.floor(this.position+a),duration:Math.max(1,o-a),playCount:1,events:r})},e);return Wt(this,cr,"f").delete(),n}};Wu=new WeakMap,cr=new WeakMap,Ug=new WeakMap,Ep=new WeakMap;var fa=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Fe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qa,Sp,Co,Mn,Qs,Pp,oi,jg,Kg,Wg,zo,Vg,$p,Gi=class t{constructor(e,r){qa.add(this),Sp.set(this,new Y),Co.set(this,void 0),Mn.set(this,void 0),Qs.set(this,void 0),Pp.set(this,void 0),oi.set(this,void 0),jg.set(this,60),Kg.set(this,60),Wg.set(this,0),zo.set(this,!1),fa(this,Co,e,"f"),fa(this,Mn,r,"f"),fa(this,Qs,new fe,"f"),fa(this,Pp,M.newSet(n=>n.uuid),"f"),fa(this,oi,ri.create(uu.Comparator),"f"),Fe(this,Sp,"f").own(Fe(this,Mn,"f").events.pointerHub.catchupAndSubscribe({onAdded:({box:n})=>{let i=Fe(this,Co,"f").boxAdapters.adapterFor(n,Ys);Fe(this,Pp,"f").add(i)&&(Fe(this,oi,"f").add(i),Fe(this,qa,"m",Vg).call(this))},onRemoved:({box:{address:{uuid:n}}})=>{Fe(this,oi,"f").remove(Fe(this,Pp,"f").removeByKey(n)),Fe(this,qa,"m",Vg).call(this)}})),Fe(this,Sp,"f").own(Fe(this,Mn,"f").owners.pointerHub.subscribe({onAdded:()=>Fe(this,Qs,"f").notify(this),onRemoved:()=>Fe(this,Qs,"f").notify(this)}))}copy(){let e=Fe(this,Co,"f").boxGraph,r=La.create(e,M.generate());return Fe(this,oi,"f").asArray().forEach(n=>n.copyTo({events:r.events})),Fe(this,Co,"f").boxAdapters.adapterFor(r,t)}createEvent({position:e,duration:r,velocity:n,pitch:i,chance:a,playCount:o,cent:s}){return Fe(this,Co,"f").boxAdapters.adapterFor(Ao.create(Fe(this,Co,"f").boxGraph,M.generate(),u=>{u.position.setValue(e),u.duration.setValue(r),u.velocity.setValue(n),u.pitch.setValue(i),u.chance.setValue(a),u.playCount.setValue(o),u.cent.setValue(s),u.events.refer(Fe(this,Mn,"f").events)}),Ys)}subscribeChange(e){return Fe(this,Qs,"f").subscribe(e)}selectable(){return Fe(this,oi,"f").asArray()}selectableAt(e){for(let r of Fe(this,oi,"f").asArray())if(r.position<=e.u&&e.u<r.complete&&r.pitch===e.v)return Jt.one(r);return Jt.empty()}selectablesBetween(e,r){let n=[],i=Fe(this,oi,"f").asArray(),a=Fe(this,oi,"f").ceilFirstIndex(r.u);for(let o=0;o<a;o++){let s=i[o];s.complete>e.u&&s.pitch>=e.v&&s.pitch<=r.v&&n.push(s)}return n}overlapping(e,r,n){let i=[];for(let a of Fe(this,oi,"f").asArray())a.pitch===n&&a.complete>e&&a.position<r&&i.push(a);return i}requestSorting(){Fe(this,oi,"f").onIndexingChanged(),this.onEventPropertyChanged()}onEventPropertyChanged(){Fe(this,qa,"m",Vg).call(this)}terminate(){Fe(this,Sp,"f").terminate()}get box(){return Fe(this,Mn,"f")}get uuid(){return Fe(this,Mn,"f").address.uuid}get address(){return Fe(this,Mn,"f").address}get numOwners(){return Fe(this,Mn,"f").owners.pointerHub.filter(l.NoteEventCollection).length}get events(){return Fe(this,zo,"f")||Fe(this,qa,"m",$p).call(this),Fe(this,oi,"f")}get minPitch(){return Fe(this,zo,"f")||Fe(this,qa,"m",$p).call(this),Fe(this,jg,"f")}get maxPitch(){return Fe(this,zo,"f")||Fe(this,qa,"m",$p).call(this),Fe(this,Kg,"f")}get maxDuration(){return Fe(this,zo,"f")||Fe(this,qa,"m",$p).call(this),Fe(this,Wg,"f")}toString(){return`{NoteEventCollectionBox ${M.toString(Fe(this,Mn,"f").address.uuid)}}`}};Sp=new WeakMap,Co=new WeakMap,Mn=new WeakMap,Qs=new WeakMap,Pp=new WeakMap,oi=new WeakMap,jg=new WeakMap,Kg=new WeakMap,Wg=new WeakMap,zo=new WeakMap,qa=new WeakSet,Vg=function(){fa(this,zo,!1,"f"),Fe(this,Qs,"f").notify(this)},$p=function(){let e=127,r=0,n=0;Fe(this,oi,"f").asArray().forEach(({pitch:i,duration:a})=>{e=Math.min(e,i),r=Math.max(r,i),n=Math.max(n,a)}),fa(this,jg,e,"f"),fa(this,Kg,r,"f"),fa(this,Wg,n,"f"),fa(this,zo,!0,"f")};var el=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ue=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},tl,Lu,rl,rr,il,Mp,kp,Np,Zu,Gu=class{constructor(e,r){tl.add(this),this.type="note-clip",Lu.set(this,new Y),rl.set(this,void 0),rr.set(this,void 0),il.set(this,void 0),Mp.set(this,void 0),kp.set(this,void 0),Np.set(this,pe.Empty),el(this,rl,e,"f"),el(this,rr,r,"f"),el(this,kp,!0,"f"),el(this,il,Ue(this,Lu,"f").own(new Ki(!1)),"f"),el(this,Mp,Ue(this,Lu,"f").own(new fe),"f"),Ue(this,Lu,"f").ownAll(Ue(this,rr,"f").pointerHub.subscribe({onAdded:()=>Ue(this,tl,"m",Zu).call(this),onRemoved:()=>Ue(this,tl,"m",Zu).call(this)}),Ue(this,rr,"f").subscribe(ze.Children,n=>Ue(this,tl,"m",Zu).call(this)),Ue(this,rr,"f").events.catchupAndSubscribe(({targetVertex:n})=>{Ue(this,Np,"f").terminate(),el(this,Np,n.match({none:()=>pe.Empty,some:({box:i})=>Ue(this,rl,"f").boxAdapters.adapterFor(i,Gi).subscribeChange(()=>Ue(this,tl,"m",Zu).call(this))}),"f"),Ue(this,tl,"m",Zu).call(this)})),el(this,kp,!1,"f")}catchupAndSubscribeSelected(e){return Ue(this,il,"f").catchupAndSubscribe(e)}subscribeChange(e){return Ue(this,Mp,"f").subscribe(e)}accept(e){return P(e.visitNoteClipBoxAdapter,this)}consolidate(){this.isMirrowed&&Ue(this,rr,"f").events.refer(this.optCollection.unwrap("optCollection").copy().box.owners)}clone(e){let r=e?this.optCollection.unwrap("optCollection").copy().box.owners:Ue(this,rr,"f").events.targetVertex.unwrap("events.target");pu.create(Ue(this,rl,"f").boxGraph,M.generate(),n=>{n.index.setValue(this.indexField.getValue()),n.label.setValue(this.label),n.hue.setValue(this.hue),n.duration.setValue(this.duration),n.mute.setValue(this.mute),n.clips.refer(Ue(this,rr,"f").clips.targetVertex.unwrap("clips.target")),n.events.refer(r)})}onSelected(){Ue(this,il,"f").setValue(!0)}onDeselected(){Ue(this,il,"f").setValue(!1)}get isSelected(){return Ue(this,il,"f").getValue()}terminate(){Ue(this,Np,"f").terminate(),Ue(this,Lu,"f").terminate()}get box(){return Ue(this,rr,"f")}get uuid(){return Ue(this,rr,"f").address.uuid}get address(){return Ue(this,rr,"f").address}get indexField(){return Ue(this,rr,"f").index}get duration(){return Ue(this,rr,"f").duration.getValue()}get mute(){return Ue(this,rr,"f").mute.getValue()}get hue(){return Ue(this,rr,"f").hue.getValue()}get events(){return this.optCollection.map(e=>e.events)}get hasCollection(){return!this.optCollection.isEmpty()}get optCollection(){return Ue(this,rr,"f").events.targetVertex.map(e=>Ue(this,rl,"f").boxAdapters.adapterFor(e.box,Gi))}get label(){return Ue(this,rr,"f").label.getValue()}get trackBoxAdapter(){return Ue(this,kp,"f")?b.None:Ue(this,rr,"f").clips.targetVertex.map(e=>Ue(this,rl,"f").boxAdapters.adapterFor(e.box,er))}get isMirrowed(){return this.optCollection.mapOr(e=>e.numOwners>1,!1)}get canMirror(){return!0}toString(){return`{NoteClipBoxAdapter ${M.toString(Ue(this,rr,"f").address.uuid)} d: ${Ne.toString(this.duration)}}`}};Lu=new WeakMap,rl=new WeakMap,rr=new WeakMap,il=new WeakMap,Mp=new WeakMap,kp=new WeakMap,Np=new WeakMap,tl=new WeakSet,Zu=function(){Ue(this,Mp,"f").notify(),this.trackBoxAdapter.unwrapOrNull()?.clips?.dispatchChange()};var WS={for:(t,e)=>Ce(e.accept({visitNoteClipBox:r=>t.adapterFor(r,Gu),visitValueClipBox:r=>t.adapterFor(r,To),visitAudioClipBox:r=>t.adapterFor(r,Ku)}),"")};var Lg=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Oo=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Zg,Hu,Ip,Bp,Gg=class{constructor(e,r){Zg.set(this,void 0),Hu.set(this,void 0),Ip.set(this,void 0),Bp.set(this,void 0),Lg(this,Zg,e,"f"),Lg(this,Hu,new Y,"f"),Lg(this,Ip,Oo(this,Hu,"f").own(new fe),"f"),Lg(this,Bp,Oo(this,Hu,"f").own(ur.create(e.box.clips,n=>WS.for(r,n),l.ClipCollection)),"f"),Oo(this,Bp,"f").subscribe({onAdd:()=>this.dispatchChange(),onRemove:()=>this.dispatchChange(),onReorder:()=>this.dispatchChange()})}get trackBoxAdapter(){return Oo(this,Zg,"f")}get collection(){return Oo(this,Bp,"f")}dispatchChange(){Oo(this,Ip,"f").notify()}subscribeChanges(e){return Oo(this,Ip,"f").subscribe(e)}terminate(){Oo(this,Hu,"f").terminate()}};Zg=new WeakMap,Hu=new WeakMap,Ip=new WeakMap,Bp=new WeakMap;var dB=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Hi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Lr,Hg=class{constructor(e){Lr.set(this,void 0),dB(this,Lr,e,"f")}get inField(){return Hi(this,Lr,"f").in}get outField(){return Hi(this,Lr,"f").out}get inSlopeField(){return Hi(this,Lr,"f").inSlope}get outSlopeField(){return Hi(this,Lr,"f").outSlope}get in(){return Hi(this,Lr,"f").in.getValue()}get out(){return Hi(this,Lr,"f").out.getValue()}get inSlope(){return Hi(this,Lr,"f").inSlope.getValue()}get outSlope(){return Hi(this,Lr,"f").outSlope.getValue()}get hasFading(){return xh.hasFading(this)}copyTo(e){e.in.setValue(this.in),e.out.setValue(this.out),e.inSlope.setValue(this.inSlope),e.outSlope.setValue(this.outSlope)}reset(){Hi(this,Lr,"f").in.setValue(0),Hi(this,Lr,"f").out.setValue(0),Hi(this,Lr,"f").inSlope.setValue(.75),Hi(this,Lr,"f").outSlope.setValue(.25)}};Lr=new WeakMap;var ht=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},X=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ai,Tp,qi,et,qu,Ju,Xu,Dp,In,Rp,Uo,Yu,Qu,ec,tc,rc,ic,nc,Ji,ac=class t{constructor(e,r){Ai.add(this),this.type="audio-region",Tp.set(this,void 0),qi.set(this,void 0),et.set(this,void 0),qu.set(this,void 0),Ju.set(this,void 0),Xu.set(this,void 0),Dp.set(this,void 0),In.set(this,void 0),Rp.set(this,void 0),Uo.set(this,b.None),Yu.set(this,pe.Empty),Qu.set(this,pe.Empty),ec.set(this,pe.Empty),tc.set(this,pe.Empty),rc.set(this,void 0),ic.set(this,Number.NaN),nc.set(this,Number.NaN),ht(this,qi,e,"f"),ht(this,et,r,"f"),ht(this,Tp,new Y,"f");let{timeBase:n,duration:i,loopDuration:a}=r;ht(this,qu,Es.aware(e.tempoMap,n,i),"f"),ht(this,Ju,Es.aware(e.tempoMap,n,a),"f"),ht(this,Xu,new wr,"f"),ht(this,Dp,new fe,"f"),ht(this,In,new Hg(r.fading),"f"),ht(this,rc,!1,"f"),ht(this,Rp,!0,"f"),X(this,Tp,"f").ownAll(X(this,et,"f").pointerHub.subscribe({onAdded:()=>X(this,Ai,"m",Ji).call(this),onRemoved:()=>X(this,Ai,"m",Ji).call(this)}),X(this,et,"f").file.catchupAndSubscribe(o=>{ht(this,Uo,o.targetVertex.map(s=>X(this,qi,"f").boxAdapters.adapterFor(s.box,kn)),"f"),X(this,Yu,"f").terminate(),ht(this,Yu,X(this,Uo,"f").mapOr(s=>s.getOrCreateLoader().subscribe(()=>X(this,Ai,"m",Ji).call(this)),pe.Empty),"f")}),X(this,et,"f").playMode.catchupAndSubscribe(({targetVertex:o})=>{X(this,Qu,"f").terminate(),o.match({none:()=>X(this,Xu,"f").clear(),some:({box:s})=>{let u=X(this,qi,"f").boxAdapters.adapterFor(s,ca.isAudioPlayMode);ht(this,Qu,u.subscribe(()=>X(this,Ai,"m",Ji).call(this)),"f"),X(this,Xu,"f").wrap(u)}})}),X(this,et,"f").timeBase.catchupAndSubscribe(o=>{X(this,ec,"f").terminate(),Ra(o.getValue(),Kr)===Kr.Seconds&&ht(this,ec,e.tempoMap.subscribe(()=>X(this,Ai,"m",Ji).call(this)),"f")}),X(this,et,"f").subscribe(ze.Children,o=>{if(!this.trackBoxAdapter.isEmpty()&&(o.type==="primitive"||o.type==="pointer")){let s=this.trackBoxAdapter.unwrap();X(this,et,"f").position.address.equals(o.address)?(s.regions.onIndexingChanged(),X(this,Ai,"m",Ji).call(this)):X(this,Ai,"m",Ji).call(this)}}),X(this,et,"f").events.catchupAndSubscribe(({targetVertex:o})=>{X(this,tc,"f").terminate(),ht(this,tc,o.match({none:()=>pe.Empty,some:({box:s})=>X(this,qi,"f").boxAdapters.adapterFor(s,_r).subscribeChange(()=>X(this,Ai,"m",Ji).call(this))}),"f"),X(this,Ai,"m",Ji).call(this)})),ht(this,Rp,!1,"f")}subscribeChange(e){return X(this,Dp,"f").subscribe(e)}accept(e){return P(e.visitAudioRegionBoxAdapter,this)}onSelected(){ht(this,rc,!0,"f"),X(this,Ai,"m",Ji).call(this)}onDeselected(){ht(this,rc,!1,"f"),X(this,Ai,"m",Ji).call(this)}get isSelected(){return X(this,rc,"f")}get box(){return X(this,et,"f")}get uuid(){return X(this,et,"f").address.uuid}get address(){return X(this,et,"f").address}get position(){return X(this,et,"f").position.getValue()}get duration(){return Number.isNaN(X(this,ic,"f"))&&ht(this,ic,X(this,qu,"f").toPPQN(this.position),"f"),X(this,ic,"f")}get complete(){return this.position+this.duration}get loopOffset(){return X(this,et,"f").loopOffset.getValue()}get loopDuration(){return Number.isNaN(X(this,nc,"f"))&&ht(this,nc,X(this,Ju,"f").toPPQN(this.position),"f"),X(this,nc,"f")}isNoteRegion(){return!1}isAudioRegion(){return!0}isValueRegion(){return!1}resolveDuration(e){return X(this,qu,"f").toPPQN(e)}resolveComplete(e){return e+this.resolveDuration(e)}resolveLoopDuration(e){return X(this,Ju,"f").toPPQN(e)}get offset(){return this.position-this.loopOffset}get mute(){return X(this,et,"f").mute.getValue()}get hue(){return X(this,et,"f").hue.getValue()}get gain(){return X(this,et,"f").gain}get fading(){return X(this,In,"f")}get file(){return X(this,Uo,"f").unwrap("Cannot access file.")}get optFile(){return X(this,Uo,"f")}get observableOptPlayMode(){return X(this,Xu,"f")}get timeBase(){return Ra(X(this,et,"f").timeBase.getValue(),Kr)}get waveformOffset(){return X(this,et,"f").waveformOffset}get isPlayModeNoStretch(){return X(this,et,"f").playMode.isEmpty()}get asPlayModePitchStretch(){return this.observableOptPlayMode.map(e=>$t(e,da)?e:null)}get asPlayModeTimeStretch(){return this.observableOptPlayMode.map(e=>$t(e,pa)?e:null)}get optWarpMarkers(){return this.observableOptPlayMode.map(e=>ca.isAudioPlayMode(e)?e.warpMarkers:null)}get label(){if(X(this,Uo,"f").isEmpty())return"No Audio File";let e=X(this,Uo,"f").unwrap().getOrCreateLoader().state;return e.type==="progress"?`${Math.round(e.progress*100)}%`:e.type==="error"?String(e.reason):X(this,et,"f").label.getValue()}get isMirrowed(){return this.optCollection.mapOr(e=>e.numOwners>1,!1)}get canMirror(){return!0}get canResize(){return!0}get trackBoxAdapter(){return X(this,et,"f").regions.targetVertex.map(e=>X(this,qi,"f").boxAdapters.adapterFor(e.box,er))}get hasCollection(){return this.optCollection.nonEmpty()}get optCollection(){return X(this,et,"f").events.targetVertex.map(e=>X(this,qi,"f").boxAdapters.adapterFor(e.box,_r))}set position(e){X(this,et,"f").position.setValue(e)}set duration(e){X(this,qu,"f").fromPPQN(e,this.position);let r=X(this,In,"f").in+X(this,In,"f").out;if(r>e){let n=e/r;X(this,In,"f").inField.setValue(X(this,In,"f").in*n),X(this,In,"f").outField.setValue(X(this,In,"f").out*n)}}set loopOffset(e){X(this,et,"f").loopOffset.setValue(Fs(e,this.loopDuration))}set loopDuration(e){X(this,Ju,"f").fromPPQN(e,this.position)}moveContentStart(e){let r=this.position,n=r+e;if(this.position=n,this.loopDuration=this.loopDuration-e,this.duration=this.duration-e,this.timeBase===Kr.Seconds){let i=e>=0?X(this,qi,"f").tempoMap.intervalToSeconds(r,n):-X(this,qi,"f").tempoMap.intervalToSeconds(n,r);X(this,et,"f").waveformOffset.setValue(this.waveformOffset.getValue()+i)}else this.optWarpMarkers.ifSome(i=>i.asArray().forEach(a=>a.box.position.setValue(a.position-e)))}copyTo(e){let r=this.optCollection.unwrap("Cannot make copy without event-collection"),n=e?.consolidate===!0?r.copy().box.owners:r.box.owners,i=this.observableOptPlayMode.map(o=>o.clone()),a=X(this,qi,"f").boxAdapters.adapterFor(Eo.create(X(this,qi,"f").boxGraph,M.generate(),o=>{o.timeBase.setValue(X(this,et,"f").timeBase.getValue()),o.position.setValue(e?.position??X(this,et,"f").position.getValue()),o.regions.refer(e?.target??X(this,et,"f").regions.targetVertex.unwrap("regions.target")),o.file.refer(X(this,et,"f").file.targetVertex.unwrap("file.target")),o.events.refer(n),o.mute.setValue(this.mute),o.hue.setValue(this.hue),o.label.setValue(this.label),o.gain.setValue(this.gain.getValue()),o.waveformOffset.setValue(this.waveformOffset.getValue()),i.ifSome(s=>o.playMode.refer(s)),X(this,In,"f").copyTo(o.fading)}),t);return a.loopDuration=e?.loopDuration??this.resolveLoopDuration(a.position),a.loopOffset=e?.loopOffset??this.loopOffset,a.duration=e?.duration??this.resolveDuration(a.position),a}consolidate(){}canFlatten(e){return e.length>0&&ue.satisfy(e,(r,n)=>r.trackBoxAdapter.contains(n.trackBoxAdapter.unwrap("trackBoxAdapter")))&&e.every(r=>r.isSelected&&r instanceof t)}flatten(e){return b.None}terminate(){X(this,Yu,"f").terminate(),ht(this,Yu,pe.Empty,"f"),X(this,ec,"f").terminate(),ht(this,ec,pe.Empty,"f"),X(this,Qu,"f").terminate(),ht(this,Qu,pe.Empty,"f"),X(this,tc,"f").terminate(),ht(this,tc,pe.Empty,"f"),X(this,Tp,"f").terminate()}toString(){return`{AudioRegionBoxAdapter ${M.toString(X(this,et,"f").address.uuid)}}`}};Tp=new WeakMap,qi=new WeakMap,et=new WeakMap,qu=new WeakMap,Ju=new WeakMap,Xu=new WeakMap,Dp=new WeakMap,In=new WeakMap,Rp=new WeakMap,Uo=new WeakMap,Yu=new WeakMap,Qu=new WeakMap,ec=new WeakMap,tc=new WeakMap,rc=new WeakMap,ic=new WeakMap,nc=new WeakMap,Ai=new WeakSet,Ji=function(){ht(this,ic,Number.NaN,"f"),ht(this,nc,Number.NaN,"f"),!X(this,Rp,"f")&&(X(this,Dp,"f").notify(),this.trackBoxAdapter.unwrapOrNull()?.regions?.dispatchChange())};var Ja=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Se=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ma,qg,ha,gt,Op,Cp,oc,zp,Xa,sc=class t{constructor(e,r){ma.add(this),this.type="note-region",qg.set(this,new Y),ha.set(this,void 0),gt.set(this,void 0),Op.set(this,void 0),Cp.set(this,void 0),oc.set(this,void 0),zp.set(this,pe.Empty),Ja(this,ha,e,"f"),Ja(this,gt,r,"f"),Ja(this,Op,new fe,"f"),Ja(this,oc,!1,"f"),Ja(this,Cp,!0,"f"),Se(this,qg,"f").ownAll(Se(this,gt,"f").pointerHub.subscribe({onAdded:()=>Se(this,ma,"m",Xa).call(this),onRemoved:()=>Se(this,ma,"m",Xa).call(this)}),Se(this,gt,"f").subscribe(ze.Children,n=>{if(!this.trackBoxAdapter.isEmpty()&&(n.type==="primitive"||n.type==="pointer")){let i=this.trackBoxAdapter.unwrap();Se(this,gt,"f").position.address.equals(n.address)?(i.regions.onIndexingChanged(),Se(this,ma,"m",Xa).call(this)):Se(this,ma,"m",Xa).call(this)}}),Se(this,gt,"f").events.catchupAndSubscribe(({targetVertex:n})=>{Se(this,zp,"f").terminate(),Ja(this,zp,n.match({none:()=>pe.Empty,some:({box:i})=>Se(this,ha,"f").boxAdapters.adapterFor(i,Gi).subscribeChange(()=>Se(this,ma,"m",Xa).call(this))}),"f"),Se(this,ma,"m",Xa).call(this)})),Ja(this,Cp,!1,"f")}set position(e){Se(this,gt,"f").position.setValue(e)}set duration(e){Se(this,gt,"f").duration.setValue(e)}set loopOffset(e){Se(this,gt,"f").loopOffset.setValue(e)}set loopDuration(e){Se(this,gt,"f").loopDuration.setValue(e)}isNoteRegion(){return!0}isAudioRegion(){return!1}isValueRegion(){return!1}moveContentStart(e){this.optCollection.ifSome(r=>r.events.asArray().forEach(n=>n.box.position.setValue(n.position-e))),this.position=this.position+e,this.loopDuration=this.loopDuration-e,this.duration=this.duration-e}subscribeChange(e){return Se(this,Op,"f").subscribe(e)}accept(e){return P(e.visitNoteRegionBoxAdapter,this)}onSelected(){Ja(this,oc,!0,"f"),Se(this,ma,"m",Xa).call(this)}onDeselected(){Ja(this,oc,!1,"f"),Se(this,ma,"m",Xa).call(this)}get isSelected(){return Se(this,oc,"f")}*iterateActiveNotesAt(e){let r=this.optCollection;if(r.isEmpty())return;let n=r.unwrap(),i=Oa.globalToLocal(this,e);for(let a of n.events.iterateFrom(i-n.maxDuration)){if(i<a.position)return;i<a.complete&&(yield a.copyAsNoteEvent())}}terminate(){Se(this,zp,"f").terminate(),Se(this,qg,"f").terminate()}get box(){return Se(this,gt,"f")}get uuid(){return Se(this,gt,"f").address.uuid}get address(){return Se(this,gt,"f").address}get position(){return Se(this,gt,"f").position.getValue()}get duration(){return Se(this,gt,"f").duration.getValue()}get loopOffset(){return Se(this,gt,"f").loopOffset.getValue()}get loopDuration(){return Se(this,gt,"f").loopDuration.getValue()}get offset(){return this.position-this.loopOffset}get complete(){return this.position+this.duration}resolveDuration(e){return this.duration}resolveComplete(e){return e+this.duration}resolveLoopDuration(e){return this.loopDuration}get mute(){return Se(this,gt,"f").mute.getValue()}get hue(){return Se(this,gt,"f").hue.getValue()}get hasCollection(){return this.optCollection.nonEmpty()}get optCollection(){return Se(this,gt,"f").events.targetVertex.map(e=>Se(this,ha,"f").boxAdapters.adapterFor(e.box,Gi))}get label(){return Se(this,gt,"f").label.getValue()}get trackBoxAdapter(){return Se(this,Cp,"f")?b.None:Se(this,gt,"f").regions.targetVertex.map(e=>Se(this,ha,"f").boxAdapters.adapterFor(e.box,er))}get isMirrowed(){return this.optCollection.mapOr(e=>e.numOwners>1,!1)}get canMirror(){return!0}get canResize(){return!0}copyTo(e){let r=this.optCollection.unwrap("Cannot make copy without event-collection"),n=e?.consolidate===!0?r.copy().box.owners:r.box.owners;return Se(this,ha,"f").boxAdapters.adapterFor(Ds.create(Se(this,ha,"f").boxGraph,M.generate(),i=>{i.position.setValue(e?.position??this.position),i.duration.setValue(e?.duration??this.duration),i.loopOffset.setValue(e?.loopOffset??this.loopOffset),i.loopDuration.setValue(e?.loopDuration??this.loopDuration),i.hue.setValue(this.hue),i.label.setValue(this.label),i.mute.setValue(this.mute),i.events.refer(n),i.regions.refer(e?.target??Se(this,gt,"f").regions.targetVertex.unwrap("regions.target"))}),t)}consolidate(){this.isMirrowed&&this.optCollection.ifSome(e=>{let r=Se(this,ha,"f").boxGraph,n=La.create(r,M.generate());e.events.asArray().forEach(i=>i.copyTo({events:n.events})),Se(this,gt,"f").events.refer(n.owners)})}canFlatten(e){return e.length>0&&ue.satisfy(e,(r,n)=>r.trackBoxAdapter.contains(n.trackBoxAdapter.unwrap("trackBoxAdapter")))&&e.every(r=>r.isSelected&&r instanceof t)}flatten(e){if(!this.canFlatten(e))return b.None;let r=Se(this,ha,"f").boxGraph,n=e.toSorted(go.Comparator),i=ue.getFirst(n,"Internal error (no first)"),a=ue.getLast(n,"Internal error (no last)"),o=i.position,s=a.position+a.duration,u=i.trackBoxAdapter.unwrap("trackBoxAdapter"),d=La.create(r,M.generate()),m=Array.from(u.regions.collection.iterateRange(o,s));return m.filter(x=>x.isSelected).forEach(x=>{let h=x;for(let{resultStart:w,resultEnd:A,rawStart:_}of Oa.locateLoops(h,h.position,h.complete)){let C=Math.floor(w-_),K=Math.floor(A-_);for(let U of h.optCollection.unwrap("optCollection").events.iterateRange(C,K))U.copyTo({position:U.position+_-i.position,events:d.events})}}),m.forEach(({box:x})=>x.delete()),b.wrap(Ds.create(r,M.generate(),x=>{x.position.setValue(o),x.duration.setValue(s-o),x.loopDuration.setValue(s-o),x.loopOffset.setValue(0),x.hue.setValue(this.hue),x.mute.setValue(this.mute),x.label.setValue(this.label),x.events.refer(d.owners),x.regions.refer(u.box.regions)}))}toString(){return`{NoteRegionBoxAdapter ${M.toString(Se(this,gt,"f").address.uuid)} p: ${Ne.toString(this.position)}, c: ${Ne.toString(this.complete)}}`}};qg=new WeakMap,ha=new WeakMap,gt=new WeakMap,Op=new WeakMap,Cp=new WeakMap,oc=new WeakMap,zp=new WeakMap,ma=new WeakSet,Xa=function(){Se(this,Op,"f").notify(),this.trackBoxAdapter.unwrapOrNull()?.regions?.dispatchChange()};var Ya=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ae=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Bn,lc,ga,vt,jp,uc,Up,Vp,va,Qa=class t{constructor(e,r){Bn.add(this),this.type="value-region",lc.set(this,new Y),ga.set(this,void 0),vt.set(this,void 0),jp.set(this,void 0),uc.set(this,void 0),Up.set(this,void 0),Vp.set(this,pe.Empty),Ya(this,ga,e,"f"),Ya(this,vt,r,"f"),Ya(this,Up,!0,"f"),Ya(this,jp,new fe,"f"),Ya(this,uc,!1,"f"),Ae(this,lc,"f").own(Ae(this,vt,"f").pointerHub.subscribe({onAdded:()=>Ae(this,Bn,"m",va).call(this),onRemoved:()=>Ae(this,Bn,"m",va).call(this)})),Ae(this,lc,"f").own(Ae(this,vt,"f").subscribe(ze.Children,n=>{if(!this.trackBoxAdapter.isEmpty()&&(n.type==="primitive"||n.type==="pointer")){let i=this.trackBoxAdapter.unwrap();Ae(this,vt,"f").position.address.equals(n.address)?(i.regions.onIndexingChanged(),Ae(this,Bn,"m",va).call(this)):Ae(this,Bn,"m",va).call(this)}})),Ae(this,lc,"f").own(Ae(this,vt,"f").events.catchupAndSubscribe(({targetVertex:n})=>{Ae(this,Vp,"f").terminate(),Ya(this,Vp,n.match({none:()=>pe.Empty,some:({box:i})=>Ae(this,ga,"f").boxAdapters.adapterFor(i,_r).subscribeChange(()=>Ae(this,Bn,"m",va).call(this))}),"f"),Ae(this,Bn,"m",va).call(this)})),Ya(this,Up,!1,"f")}valueAt(e,r){let n=this.optCollection;return n.isEmpty()?r:n.unwrap().valueAt(Oa.globalToLocal(this,e),r)}incomingValue(e){let r=this.optCollection;if(r.isEmpty())return e;let n=r.unwrap().events.greaterEqual(0);return W(n)&&n.position===0?n.value:this.valueAt(this.position,e)}outgoingValue(e){let r=this.optCollection;if(r.isEmpty())return e;let n=r.unwrap();return(this.complete-this.offset)%this.loopDuration===0?n.valueAt(this.loopDuration,e):n.valueAt(Oa.globalToLocal(this,this.complete),e)}subscribeChange(e){return Ae(this,jp,"f").subscribe(e)}accept(e){return P(e.visitValueRegionBoxAdapter,this)}onSelected(){Ya(this,uc,!0,"f"),Ae(this,Bn,"m",va).call(this)}onDeselected(){Ya(this,uc,!1,"f"),Ae(this,Bn,"m",va).call(this)}get isSelected(){return Ae(this,uc,"f")}onValuesPropertyChanged(){Ae(this,Bn,"m",va).call(this)}onValuesSortingChanged(){this.onValuesPropertyChanged()}terminate(){Ae(this,Vp,"f").terminate(),Ae(this,lc,"f").terminate()}get box(){return Ae(this,vt,"f")}get uuid(){return Ae(this,vt,"f").address.uuid}get address(){return Ae(this,vt,"f").address}get position(){return Ae(this,vt,"f").position.getValue()}get duration(){return Ae(this,vt,"f").duration.getValue()}get loopOffset(){return Ae(this,vt,"f").loopOffset.getValue()}get loopDuration(){return Ae(this,vt,"f").loopDuration.getValue()}get offset(){return this.position-this.loopOffset}get complete(){return this.position+this.duration}isNoteRegion(){return!1}isAudioRegion(){return!1}isValueRegion(){return!0}resolveDuration(e){return this.duration}resolveComplete(e){return e+this.duration}resolveLoopDuration(e){return this.loopDuration}get mute(){return Ae(this,vt,"f").mute.getValue()}get hue(){return Ae(this,vt,"f").hue.getValue()}get hasCollection(){return!this.optCollection.isEmpty()}get events(){return this.optCollection.map(e=>e.events)}get optCollection(){return Ae(this,vt,"f").events.targetVertex.map(e=>Ae(this,ga,"f").boxAdapters.adapterFor(e.box,_r))}get label(){return Ae(this,vt,"f").label.getValue()}get trackBoxAdapter(){return Ae(this,Up,"f")?b.None:Ae(this,vt,"f").regions.targetVertex.map(e=>Ae(this,ga,"f").boxAdapters.adapterFor(e.box,er))}get isMirrowed(){return this.optCollection.mapOr(e=>e.numOwners>1,!1)}get canMirror(){return!0}get canResize(){return!0}set position(e){Ae(this,vt,"f").position.setValue(e)}set duration(e){Ae(this,vt,"f").duration.setValue(e)}set loopOffset(e){Ae(this,vt,"f").loopOffset.setValue(e)}set loopDuration(e){Ae(this,vt,"f").loopDuration.setValue(e)}moveContentStart(e){this.optCollection.ifSome(r=>r.events.asArray().forEach(n=>n.box.position.setValue(n.position-e))),this.position=this.position+e,this.loopDuration=this.loopDuration-e,this.duration=this.duration-e}copyTo(e){let r=this.optCollection.unwrap("Cannot make copy without event-collection"),n=e?.consolidate===!0?r.copy().box.owners:r.box.owners;return Ae(this,ga,"f").boxAdapters.adapterFor(Rs.create(Ae(this,ga,"f").boxGraph,M.generate(),i=>{i.position.setValue(e?.position??this.position),i.duration.setValue(e?.duration??this.duration),i.loopOffset.setValue(e?.loopOffset??this.loopOffset),i.loopDuration.setValue(e?.loopDuration??this.loopDuration),i.hue.setValue(this.hue),i.label.setValue(this.label),i.mute.setValue(this.mute),i.events.refer(n),i.regions.refer(e?.target??Ae(this,vt,"f").regions.targetVertex.unwrap("regions.target"))}),t)}consolidate(){this.isMirrowed&&this.events.ifSome(e=>{let r=Ae(this,ga,"f").boxGraph,n=Pn.create(r,M.generate());e.asArray().forEach(i=>i.copyTo({events:n.events})),Ae(this,vt,"f").events.refer(n.owners)})}canFlatten(e){return e.length>0&&ue.satisfy(e,(r,n)=>r.trackBoxAdapter.contains(n.trackBoxAdapter.unwrap("trackBoxAdapter")))&&e.every(r=>r.isSelected&&r instanceof t)}flatten(e){if(!this.canFlatten(e))return b.None;let r=Ae(this,ga,"f").boxGraph,n=e.toSorted(go.Comparator),i=ue.getFirst(n,"Internal error (no first)"),a=ue.getLast(n,"Internal error (no last)"),o=i.position,s=a.position+a.duration,u=i.trackBoxAdapter.unwrap("trackBoxAdapter"),d=Array.from(u.regions.collection.iterateRange(o,s)),m=[];d.filter(A=>A.isSelected).forEach(A=>{let _=A,C=_.optCollection.unwrap("optCollection"),K=C.events;for(let{rawStart:U,regionStart:ee,regionEnd:re}of Oa.locateLoops(_,_.position,_.complete)){let me=ee-U,$e=re-U,Q=K.greaterEqual(me);if(!W(Q)||Q.position!==me){let Ge=K.lowerEqual(me);W(Ge)&&m.push({position:ee-o,value:C.valueAt(me,0),interpolation:Ge.interpolation})}let we=!1;for(let Ge of K.iterateRange(me,yr.MAX_VALUE)){let It=Ge.position+U;if(It<re)m.push({position:It-o,value:Ge.value,interpolation:Ge.interpolation});else if(It===re){m.push({position:It-o,value:Ge.value,interpolation:ii.None}),we=!0;break}else{m.push({position:re-o,value:C.valueAt($e,0),interpolation:ii.None}),we=!0;break}}we||m.push({position:re-o,value:C.valueAt($e,0),interpolation:ii.None})}});let x=[];for(let A of m){let _=x.length>0?x[x.length-1]:void 0;W(_)&&_.position===A.position&&_.value===A.value?x[x.length-1]=A:x.push(A)}let h=Pn.create(r,M.generate()),w=0;for(;w<x.length;){let A=w+1;for(;A<x.length&&x[A].position===x[w].position;)A++;let _=x[w],C=x[A-1],K=Sn.create(r,M.generate(),U=>{U.position.setValue(_.position),U.index.setValue(0),U.value.setValue(_.value),U.events.refer(h.events)});if(ai.write(K.interpolation,A-w>1?ii.None:_.interpolation),A-w>1){let U=Sn.create(r,M.generate(),ee=>{ee.position.setValue(C.position),ee.index.setValue(1),ee.value.setValue(C.value),ee.events.refer(h.events)});ai.write(U.interpolation,C.interpolation)}w=A}return d.forEach(({box:A})=>A.delete()),b.wrap(Rs.create(r,M.generate(),A=>{A.position.setValue(o),A.duration.setValue(s-o),A.loopDuration.setValue(s-o),A.loopOffset.setValue(0),A.hue.setValue(this.hue),A.mute.setValue(this.mute),A.label.setValue(this.label),A.events.refer(h.owners),A.regions.refer(u.box.regions)}))}toString(){return`{ValueRegionBoxAdapter ${M.toString(Ae(this,vt,"f").address.uuid)} p: ${Ne.toString(this.position)}, c: ${Ne.toString(this.complete)}}`}};lc=new WeakMap,ga=new WeakMap,vt=new WeakMap,jp=new WeakMap,uc=new WeakMap,Up=new WeakMap,Vp=new WeakMap,Bn=new WeakSet,va=function(){Ae(this,jp,"f").notify(),this.trackBoxAdapter.unwrapOrNull()?.regions?.dispatchChange()};var LS=(t,e)=>t.position-e.position,ZS={for:(t,e)=>Ce(e.accept({visitNoteRegionBox:r=>t.adapterFor(r,sc),visitAudioRegionBox:r=>t.adapterFor(r,ac),visitValueRegionBox:r=>t.adapterFor(r,Qa)}),"")};var cc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ir=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},dc,nl,Kp,pc,Vo,fc,Jg=class{constructor(e,r){dc.set(this,void 0),nl.set(this,void 0),Kp.set(this,void 0),pc.set(this,void 0),Vo.set(this,void 0),fc.set(this,void 0),cc(this,dc,e,"f"),cc(this,nl,new Y,"f"),cc(this,Kp,ir(this,nl,"f").own(new fe),"f"),cc(this,pc,ir(this,nl,"f").own(new Yt),"f"),cc(this,Vo,go.create(LS),"f"),cc(this,fc,M.newSet(n=>n.uuid),"f"),ir(this,nl,"f").ownAll(ir(this,dc,"f").box.regions.pointerHub.catchupAndSubscribe({onAdded:({box:n})=>{let i=ZS.for(r,n),a=ir(this,fc,"f").add(i);te(a,`Cannot add ${n}`),ir(this,Vo,"f").add(i);for(let o of ir(this,Vo,"f").iterateRange(i.position,i.complete))if(o!==i&&o.position<i.complete&&o.complete>i.position){console.warn("[TrackRegions] Overlapping region added",{track:ir(this,dc,"f").listIndex,added:{p:i.position,d:i.duration,c:i.complete},existing:{p:o.position,d:o.duration,c:o.complete},stack:new Error().stack});break}ir(this,pc,"f").forEach(o=>o.onAdded(i)),this.dispatchChange()},onRemoved:({box:{address:{uuid:n}}})=>{let i=ir(this,fc,"f").removeByKey(n);ir(this,Vo,"f").remove(i),ir(this,pc,"f").forEach(a=>a.onRemoved(i)),this.dispatchChange()}},l.RegionCollection))}get trackBoxAdapter(){return ir(this,dc,"f")}get collection(){return ir(this,Vo,"f")}get adapters(){return ir(this,fc,"f")}onIndexingChanged(){ir(this,Vo,"f").onIndexingChanged(),this.dispatchChange()}catchupAndSubscribe(e){return this.collection.asArray().forEach(e.onAdded),ir(this,pc,"f").subscribe(e)}subscribeChanges(e){return ir(this,Kp,"f").subscribe(e)}dispatchChange(){ir(this,Kp,"f").notify()}terminate(){ir(this,nl,"f").terminate()}};dc=new WeakMap,nl=new WeakMap,Kp=new WeakMap,pc=new WeakMap,Vo=new WeakMap,fc=new WeakMap;var ve;(function(t){t[t.Undefined=0]="Undefined",t[t.Notes=1]="Notes",t[t.Audio=2]="Audio",t[t.Value=3]="Value"})(ve||(ve={}));(function(t){t.toLabelString=e=>{switch(e){case t.Audio:return"Audio";case t.Notes:return"Note";case t.Value:return"Automation";case t.Undefined:default:return"N/A"}},t.toIconSymbol=e=>{switch(e){case t.Audio:return Le.Waveform;case t.Notes:return Le.Piano;case t.Value:return Le.Automation;case t.Undefined:return Le.AudioBus;default:return Le.Unknown}}})(ve||(ve={}));var Xg;(function(t){t.isDeviceBox=e=>e.tags.type==="device",t.isInstrumentDeviceBox=e=>t.isDeviceBox(e)&&e.tags.deviceType==="instrument",t.isEffectDeviceBox=e=>t.isDeviceBox(e)&&(e.tags.deviceType==="audio-effect"||e.tags.deviceType==="midi-effect"),t.isChainEffectOf=(e,r)=>t.isEffectDeviceBox(e)&&e.host.targetVertex.mapOr(n=>n.box===r,!1),t.lookupHostField=e=>W(e)&&"host"in e&&$t(e.host,N)?e.host:V(`Could not find 'host' field in '${e?.name}'`),t.lookupLabelField=e=>W(e)&&"label"in e&&$t(e.label,B)?e.label:V(`Could not find 'label' field in '${e?.name}'`),t.lookupEnabledField=e=>W(e)&&"enabled"in e&&$t(e.enabled,R)?e.enabled:V(`Could not find 'enabled' field in '${e?.name}'`),t.lookupMinimizedField=e=>W(e)&&"minimized"in e&&$t(e.minimized,R)?e.minimized:V(`Could not find 'minimized' field in '${e?.name}'`),t.lookupIndexField=e=>W(e)&&"index"in e&&$t(e.index,k)?e.index:V(`Could not find 'index' field in '${e?.name}'`)})(Xg||(Xg={}));var GS;(function(t){t.toTrackType=e=>{switch(e){case"midi":return ve.Notes;case"audio":return ve.Audio;default:return V()}}})(GS||(GS={}));var ae;(function(t){t.isAny=e=>e!==null&&typeof e=="object"&&"type"in e&&(e.type==="midi-effect"||e.type==="bus"||e.type==="instrument"||e.type==="audio-effect"),t.isEffect=e=>e!==null&&typeof e=="object"&&"type"in e&&(e.type==="midi-effect"||e.type==="audio-effect"),t.isInstrument=e=>e!==null&&typeof e=="object"&&"type"in e&&e.type==="instrument",t.isMidiEffect=e=>e!==null&&typeof e=="object"&&"type"in e&&e.type==="midi-effect",t.isAudioEffect=e=>e!==null&&typeof e=="object"&&"type"in e&&e.type==="audio-effect",t.isHost=e=>e!==null&&typeof e=="object"&&"class"in e&&e.class==="device-host",t.deleteEffectDevices=e=>{if(e.length===0)return;te(ue.satisfy(e,(i,a)=>i.deviceHost().address.equals(a.deviceHost().address)),"Devices are not connected to the same host");let r=e[0];(r.accepts==="audio"?r.deviceHost().audioEffects.field().pointerHub.filter(l.AudioEffectHost):r.accepts==="midi"?r.deviceHost().midiEffects.field().pointerHub.filter(l.MIDIEffectHost):V("unknown type")).map(({box:i})=>Xg.lookupIndexField(i)).filter(i=>e.some(a=>M.Comparator(a.uuid,i.address.uuid)!==0)).sort((i,a)=>i.getValue()-a.getValue()).forEach((i,a)=>i.setValue(a)),e.forEach(i=>i.box.delete())}})(ae||(ae={}));var Yg=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},vr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},mc,Qg,Tn,al,ev,tv=class{constructor(e,r){mc.set(this,void 0),Qg.set(this,new fe),Tn.set(this,void 0),al.set(this,void 0),ev.set(this,void 0),Yg(this,mc,e,"f"),Yg(this,Tn,ur.create(e.box.tracks,n=>r.adapterFor(n,er),l.TrackCollection),"f"),Yg(this,al,M.newSet(({uuid:n})=>n),"f"),Yg(this,ev,vr(this,Tn,"f").catchupAndSubscribe({onAdd:n=>vr(this,al,"f").add({uuid:n.uuid,subscription:n.regions.subscribeChanges(()=>vr(this,Qg,"f").notify())}),onRemove:({uuid:n})=>vr(this,al,"f").removeByKey(n).subscription.terminate(),onReorder:n=>{}}),"f")}create(e,r,n){let i=vr(this,mc,"f").box.graph,a=vr(this,mc,"f").box.tracks;Mr.create(i,M.generate(),o=>{o.index.setValue(n??vr(this,Tn,"f").getMinFreeIndex()),o.type.setValue(e),o.tracks.refer(a),o.target.refer(r)})}controls(e){return b.wrap(vr(this,Tn,"f").adapters().find(r=>r.target.targetVertex.contains(e),!1))}delete(e){let r=vr(this,Tn,"f").adapters(),n=r.indexOf(e);if(n===-1)return V(`Cannot delete ${e}. Does not exist.`);for(let i=n+1;i<r.length;i++)r[i].indexField.setValue(i-1);e.box.delete()}get audioUnitBox(){return vr(this,mc,"f").box}get collection(){return vr(this,Tn,"f")}values(){return vr(this,Tn,"f").adapters()}catchupAndSubscribe(e){return vr(this,Tn,"f").catchupAndSubscribe(e)}subscribeAnyChange(e){return vr(this,Qg,"f").subscribe(e)}terminate(){vr(this,Tn,"f").terminate(),vr(this,ev,"f").terminate(),vr(this,al,"f").forEach(({subscription:e})=>e.terminate()),vr(this,al,"f").clear()}};mc=new WeakMap,Qg=new WeakMap,Tn=new WeakMap,al=new WeakMap,ev=new WeakMap;var oe;(function(t){t.AudioBus="manuals/audio-bus",t.Arpeggio="manuals/devices/midi/arpeggio",t.Pitch="manuals/devices/midi/pitch",t.Spielwerk="manuals/devices/midi/spielwerk",t.Velocity="manuals/devices/midi/velocity",t.Zeitgeist="manuals/devices/midi/zeitgeist",t.StereoTool="manuals/devices/audio/stereo-tool",t.Delay="manuals/devices/audio/delay",t.DattorroReverb="manuals/devices/audio/dattorro-reverb",t.Maximizer="manuals/devices/audio/maximizer",t.Compressor="manuals/devices/audio/compressor",t.Gate="manuals/devices/audio/gate",t.Reverb="manuals/devices/audio/cheap-reverb",t.Crusher="manuals/devices/audio/crusher",t.Fold="manuals/devices/audio/fold",t.Tidal="manuals/devices/audio/tidal",t.Revamp="manuals/devices/audio/revamp",t.Modular="manuals/devices/audio/modular",t.NeuralAmp="manuals/devices/audio/neural-amp",t.Vocoder="manuals/devices/audio/vocoder",t.Waveshaper="manuals/devices/audio/waveshaper",t.Werkstatt="manuals/devices/audio/werkstatt",t.Apparat="manuals/devices/instruments/apparat",t.Tape="manuals/devices/instruments/tape",t.Nano="manuals/devices/instruments/nano",t.Playfield="manuals/devices/instruments/playfield",t.Vaporisateur="manuals/devices/instruments/vaporisateur",t.MIDIOutput="manuals/devices/instruments/midi-output",t.Soundfont="manuals/devices/instruments/soundfont"})(oe||(oe={}));var HS=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Dn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rv,Fi,Ei=class{constructor(e,r){this.type="bus",this.accepts="audio",this.manualUrl=oe.AudioBus,rv.set(this,void 0),Fi.set(this,void 0),HS(this,rv,e,"f"),HS(this,Fi,r,"f")}catchupAndSubscribe(e){return e(this),Dn(this,Fi,"f").subscribe(ze.Children,()=>e(this))}get uuid(){return Dn(this,Fi,"f").address.uuid}get address(){return Dn(this,Fi,"f").address}get box(){return Dn(this,Fi,"f")}get enabledField(){return Dn(this,Fi,"f").enabled}get minimizedField(){return Dn(this,Fi,"f").minimized}get iconField(){return Dn(this,Fi,"f").icon}get labelField(){return Dn(this,Fi,"f").label}get colorField(){return Dn(this,Fi,"f").color}get iconSymbol(){return Le.fromName(this.iconField.getValue()??"audio-bus")}deviceHost(){return Dn(this,rv,"f").boxAdapters.adapterFor(Dn(this,Fi,"f").output.targetVertex.unwrap("No AudioUnitBox found").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){}toString(){return`{${this.constructor.name}}`}};rv=new WeakMap,Fi=new WeakMap;var Wp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},kt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},eo,hc,gc,Si,Lp,iv=class{constructor(e,r){eo.set(this,void 0),hc.set(this,void 0),gc.set(this,void 0),Si.set(this,void 0),Lp.set(this,pe.Empty),Wp(this,eo,new Y,"f"),Wp(this,hc,kt(this,eo,"f").own(new fe),"f"),Wp(this,gc,kt(this,eo,"f").own(new Ki(Le.Unknown)),"f"),Wp(this,Si,kt(this,eo,"f").own(new wr),"f"),kt(this,eo,"f").own(kt(this,Si,"f").subscribe(n=>{kt(this,Lp,"f").terminate(),Wp(this,Lp,n.match({none:()=>(kt(this,hc,"f").notify(b.None),pe.Empty),some:({labelField:i,iconField:a})=>pe.many(a.catchupAndSubscribe(o=>kt(this,gc,"f").setValue(Le.fromName(o.getValue()))),i.catchupAndSubscribe(o=>kt(this,hc,"f").notify(b.wrap(o.getValue()))))}),"f")})),kt(this,eo,"f").own(e.catchupAndSubscribe({onAdded:({box:n,pointerType:i})=>{if(kt(this,Si,"f").nonEmpty()){let o=kt(this,Si,"f").unwrap();V(`AudioUnitInput already has an input. Existing: ${o.box.name}@${o.box.address.toString()} (type: ${o.type}), Incoming: ${n.name}@${n.address.toString()} (pointerType: ${String(i)})`)}let a=n instanceof $n?r.adapterFor(n,Ei):r.adapterFor(n,ae.isInstrument);kt(this,Si,"f").unwrapOrNull()!==a&&kt(this,Si,"f").wrap(a)},onRemoved:({box:n})=>{te(kt(this,Si,"f").unwrap("Cannot remove").box.address.equals(n.address),"Unexpected value to remove"),kt(this,Si,"f").clear()}},l.InstrumentHost,l.AudioOutput))}adapter(){return kt(this,Si,"f")}subscribe(e){return kt(this,Si,"f").subscribe(e)}catchupAndSubscribe(e){return e(kt(this,Si,"f")),this.subscribe(e)}catchupAndSubscribeLabelChange(e){return e(this.label),kt(this,hc,"f").subscribe(e)}catchupAndSubscribeIconChange(e){return kt(this,gc,"f").catchupAndSubscribe(e)}set label(e){this.adapter().ifSome(r=>r.labelField.setValue(e))}get label(){return this.adapter().map(e=>e.labelField.getValue())}set icon(e){this.adapter().ifSome(r=>r.iconField.setValue(Le.toName(e)))}get icon(){return this.adapter().match({none:()=>Le.Unknown,some:e=>Le.fromName(e.iconField.getValue())})}get iconValue(){return kt(this,gc,"f")}terminate(){kt(this,eo,"f").terminate(),kt(this,Lp,"f").terminate()}};eo=new WeakMap,hc=new WeakMap,gc=new WeakMap,Si=new WeakMap,Lp=new WeakMap;var qS=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ol=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},nv,to,de=class{constructor(e){nv.set(this,void 0),to.set(this,void 0),qS(this,nv,e,"f"),qS(this,to,Oe.newSet(r=>r.address),"f")}terminate(){ol(this,to,"f").forEach(e=>e.terminate()),ol(this,to,"f").clear()}parameters(){return ol(this,to,"f").values()}parameterAt(e){return ol(this,to,"f").getOrThrow(e,()=>new Error(`No ParameterAdapter found at [${e.toString()}]`))}createParameter(e,r,n,i,a,o){let s=new sl(ol(this,nv,"f"),e,r,n,i,a,o),u=ol(this,to,"f").add(s);return te(u,`Could not add adapter for ${e}`),s}removeParameter(e){return ol(this,to,"f").removeByKey(e)}};nv=new WeakMap,to=new WeakMap;var ll=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ft=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ul,Xi,jo,vc,av,ov,Zp,xc=class{constructor(e,r){ul.set(this,void 0),Xi.set(this,void 0),jo.set(this,void 0),vc.set(this,void 0),av.set(this,void 0),ov.set(this,void 0),Zp.set(this,pe.Empty),ll(this,ul,e,"f"),ll(this,Xi,r,"f"),ll(this,jo,new Y,"f"),ll(this,vc,Ft(this,jo,"f").own(new fe),"f"),Ft(this,jo,"f").own(r.targetBus.catchupAndSubscribe(()=>{Ft(this,Zp,"f").terminate(),ll(this,Zp,this.optTargetBus.match({none:()=>(Ft(this,vc,"f").notify(b.None),pe.Empty),some:n=>n.catchupAndSubscribe(i=>Ft(this,vc,"f").notify(b.wrap(i)))}),"f")})),ll(this,av,Ft(this,jo,"f").own(new sl(Ft(this,ul,"f"),Ft(this,Xi,"f").sendPan,S.bipolar(),$.percent({unit:"%",fractionDigits:0}),"panning")),"f"),ll(this,ov,Ft(this,jo,"f").own(new sl(Ft(this,ul,"f"),Ft(this,Xi,"f").sendGain,S.DefaultDecibel,$.numeric({unit:"dB",fractionDigits:1}),"gain")),"f")}catchupAndSubscribeBusChanges(e){return e(this.optTargetBus),Ft(this,vc,"f").subscribe(e)}get uuid(){return Ft(this,Xi,"f").address.uuid}get address(){return Ft(this,Xi,"f").address}get box(){return Ft(this,Xi,"f")}get indexField(){return Ft(this,Xi,"f").index}get sendPan(){return Ft(this,av,"f")}get sendGain(){return Ft(this,ov,"f")}get targetBus(){return Ft(this,ul,"f").boxAdapters.adapterFor(Ft(this,Xi,"f").targetBus.targetVertex.unwrap("no audioUnit").box,Ei)}get optTargetBus(){return Ft(this,Xi,"f").targetBus.targetVertex.flatMap(e=>b.wrap(e.box.accept({visitAudioBusBox:r=>Ft(this,ul,"f").boxAdapters.adapterFor(r,Ei)})))}delete(){Ft(this,Xi,"f").delete()}terminate(){Ft(this,jo,"f").terminate(),Ft(this,Zp,"f").terminate()}};ul=new WeakMap,Xi=new WeakMap,jo=new WeakMap,vc=new WeakMap,av=new WeakMap,ov=new WeakMap,Zp=new WeakMap;var Gp=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},xa=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},sv,lv,yc,wc,Hp,uv=class{constructor(e,r){sv.set(this,void 0),lv.set(this,void 0),yc.set(this,void 0),wc.set(this,void 0),Hp.set(this,pe.Empty),Gp(this,sv,e,"f"),Gp(this,lv,r,"f"),Gp(this,yc,new Y,"f"),Gp(this,wc,xa(this,yc,"f").own(new fe),"f"),xa(this,yc,"f").own(e.catchupAndSubscribe(()=>{xa(this,Hp,"f").terminate(),Gp(this,Hp,this.adapter.match({none:()=>(xa(this,wc,"f").notify(b.None),pe.Empty),some:n=>n.catchupAndSubscribe(i=>xa(this,wc,"f").notify(b.wrap(i)))}),"f")}))}subscribe(e){return xa(this,wc,"f").subscribe(e)}catchupAndSubscribe(e){return e(this.adapter),this.subscribe(e)}get adapter(){return xa(this,sv,"f").targetVertex.flatMap(e=>b.wrap(e.box.accept({visitAudioBusBox:r=>xa(this,lv,"f").adapterFor(r,Ei)})))}terminate(){xa(this,yc,"f").terminate(),xa(this,Hp,"f").terminate()}};sv=new WeakMap,lv=new WeakMap,yc=new WeakMap,wc=new WeakMap,Hp=new WeakMap;var ro=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},xe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},cv,JS,ya,Pi,Ot,dl,bc,cl,dv,qp,pv,fv,XS,YS,Yi=class{constructor(e,r){cv.add(this),this.class="device-host",ya.set(this,new Y),Pi.set(this,void 0),Ot.set(this,void 0),dl.set(this,void 0),bc.set(this,void 0),cl.set(this,void 0),dv.set(this,void 0),qp.set(this,void 0),pv.set(this,void 0),fv.set(this,void 0),ro(this,Pi,e,"f"),ro(this,Ot,r,"f"),ro(this,dl,xe(this,ya,"f").own(new de(xe(this,Pi,"f"))),"f"),ro(this,bc,xe(this,ya,"f").own(new tv(this,xe(this,Pi,"f").boxAdapters)),"f"),ro(this,cl,xe(this,ya,"f").own(new iv(xe(this,Ot,"f").input.pointerHub,xe(this,Pi,"f").boxAdapters)),"f"),ro(this,dv,xe(this,ya,"f").own(ur.create(xe(this,Ot,"f").midiEffects,n=>xe(this,Pi,"f").boxAdapters.adapterFor(n,ae.isMidiEffect),l.MIDIEffectHost)),"f"),ro(this,qp,xe(this,ya,"f").own(ur.create(xe(this,Ot,"f").audioEffects,n=>xe(this,Pi,"f").boxAdapters.adapterFor(n,ae.isAudioEffect),l.AudioEffectHost)),"f"),ro(this,pv,xe(this,ya,"f").own(ur.create(xe(this,Ot,"f").auxSends,n=>xe(this,Pi,"f").boxAdapters.adapterFor(n,xc),l.AuxSend)),"f"),ro(this,fv,xe(this,ya,"f").own(new uv(xe(this,Ot,"f").output,xe(this,Pi,"f").boxAdapters)),"f"),this.namedParameter=xe(this,cv,"m",XS).call(this,r),xe(this,cv,"m",YS).call(this)}get box(){return xe(this,Ot,"f")}get uuid(){return xe(this,Ot,"f").address.uuid}get address(){return xe(this,Ot,"f").address}get indexField(){return xe(this,Ot,"f").index}get type(){return xe(this,Ot,"f").type.getValue()}get captureBox(){return xe(this,Ot,"f").capture.targetVertex}get tracks(){return xe(this,bc,"f")}get input(){return xe(this,cl,"f")}get midiEffects(){return xe(this,dv,"f")}get audioEffects(){return xe(this,qp,"f")}get inputAdapter(){return xe(this,cl,"f").adapter()}get auxSends(){return xe(this,pv,"f")}get output(){return xe(this,fv,"f")}get isBus(){return this.input.adapter().mapOr(e=>e.type==="bus",!1)}get isInstrument(){return this.input.adapter().mapOr(e=>e.type==="instrument",!1)}get isOutput(){return xe(this,Ot,"f").output.targetVertex.mapOr(e=>e.box.address.equals(xe(this,Pi,"f").rootBoxAdapter.address),!1)}get midiEffectsField(){return xe(this,Ot,"f").midiEffects}get inputField(){return xe(this,Ot,"f").input}get audioEffectsField(){return xe(this,Ot,"f").audioEffects}get tracksField(){return xe(this,Ot,"f").tracks}get minimizedField(){return xe(this,cl,"f").adapter().unwrap("input.adapter").minimizedField}get isAudioUnit(){return!0}get label(){return xe(this,cl,"f").adapter().mapOr(e=>e.labelField.getValue(),"")}deviceHost(){return this}audioUnitBoxAdapter(){return this}*labeledAudioOutputs(){let e=this.input.adapter();e.nonEmpty()&&(yield*e.unwrap().labeledAudioOutputs());for(let r of xe(this,qp,"f").adapters())yield*r.labeledAudioOutputs();yield{address:this.address,label:"Channelstrip",children:()=>b.None}}indicesLimit(){let e=xe(this,Pi,"f").rootBoxAdapter.audioUnits.adapters(),r=this.indexField.getValue(),n=this.type,i=r,a=r;for(;i>0&&e[i-1].type===n;)i--;for(;a<e.length-1&&e[a+1].type===n;)a++;return[i,a+1]}move(e){xe(this,Pi,"f").rootBoxAdapter.audioUnits.move(this,e)}moveTrack(e,r){xe(this,bc,"f").collection.move(e,r)}deleteTrack(e){xe(this,bc,"f").delete(e)}toString(){return`{${this.constructor.name}}`}terminate(){xe(this,ya,"f").terminate()}};JS=Yi,ya=new WeakMap,Pi=new WeakMap,Ot=new WeakMap,dl=new WeakMap,bc=new WeakMap,cl=new WeakMap,dv=new WeakMap,qp=new WeakMap,pv=new WeakMap,fv=new WeakMap,cv=new WeakSet,XS=function(e){return{volume:xe(this,dl,"f").createParameter(e.volume,JS.VolumeMapper,$.decible,"volume"),panning:xe(this,dl,"f").createParameter(e.panning,S.bipolar(),$.panning,"panning",.5),mute:xe(this,dl,"f").createParameter(e.mute,S.bool,$.bool,"mute"),solo:xe(this,dl,"f").createParameter(e.solo,S.bool,$.bool,"solo")}},YS=function(){let e=this.address.toString(),r=xe(this,Ot,"f").capture.targetAddress.unwrapOrUndefined(),n=()=>`AudioUnit '${e}' must have a capture. AudioUnit is typed ${this.type} and has input ${xe(this,Ot,"f").input.pointerHub.incoming().at(0)?.box.name}, but capture is ${r}`;te(this.type!==At.Instrument||xe(this,Ot,"f").capture.targetAddress.nonEmpty(),n)};Yi.VolumeMapper=S.decibel(-96,-9,6);var _c=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ze=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},fl,Gr,Zr,pl,mv,hv,Jp,QS,eP,gv,er=class{constructor(e,r){fl.add(this),Gr.set(this,void 0),Zr.set(this,void 0),pl.set(this,void 0),mv.set(this,void 0),hv.set(this,void 0),Jp.set(this,void 0),_c(this,Gr,e,"f"),_c(this,Zr,r,"f"),_c(this,pl,new Y,"f"),_c(this,Jp,Ze(this,pl,"f").own(new Ki(-1)),"f"),_c(this,mv,Ze(this,pl,"f").own(new Gg(this,e.boxAdapters)),"f"),_c(this,hv,Ze(this,pl,"f").own(new Jg(this,e.boxAdapters)),"f")}catchupAndSubscribePath(e){let r=[b.None,b.None],n=()=>{r.every(i=>i.nonEmpty())?e(b.wrap(r.map(i=>i.unwrap()))):e(b.None)};return pe.many(Ze(this,fl,"m",QS).call(this,i=>{r[0].equals(i)||(r[0]=i,n())}),Ze(this,fl,"m",eP).call(this,i=>{r[1].equals(i)||(r[1]=i,n())}))}get context(){return Ze(this,Gr,"f")}set targetName(e){Ze(this,Zr,"f").target.targetVertex.ifSome(r=>{let n=r.box;if(n instanceof Xe){Ze(this,Gr,"f").boxAdapters.adapterFor(n,Yi).input.adapter().ifSome(a=>a.labelField.setValue(e));return}Ze(this,Gr,"f").boxAdapters.optAdapter(n).ifSome(i=>{"labelField"in i&&i.labelField instanceof B&&i.labelField.setValue(e)}),Ze(this,fl,"m",gv).call(this,n).flatMap(i=>Ze(this,Gr,"f").boxAdapters.optAdapter(i)).ifSome(i=>{"labelField"in i&&i.labelField instanceof B&&i.labelField.setValue(e)})})}get targetName(){return Ze(this,Zr,"f").target.targetVertex.flatMap(e=>{let r=e.box;if(r instanceof Xe)return Ze(this,Gr,"f").boxAdapters.adapterFor(r,Yi).input.label;let n=Ze(this,Gr,"f").boxAdapters.optAdapter(r);if(n.nonEmpty()){let a=n.unwrap();if("labelField"in a&&a.labelField instanceof B)return b.wrap(a.labelField.getValue())}let i=Ze(this,fl,"m",gv).call(this,r).flatMap(a=>Ze(this,Gr,"f").boxAdapters.optAdapter(a));if(i.nonEmpty()){let a=i.unwrap();if("labelField"in a&&a.labelField instanceof B)return b.wrap(a.labelField.getValue())}return b.wrap(r.name)})}terminate(){Ze(this,pl,"f").terminate()}get audioUnit(){return Ie(Ze(this,Zr,"f").tracks.targetVertex.unwrap("track has no audioUnit").box,Xe)}get target(){return Ze(this,Zr,"f").target}get clips(){return Ze(this,mv,"f")}get regions(){return Ze(this,hv,"f")}get enabled(){return Ze(this,Zr,"f").enabled}get indexField(){return Ze(this,Zr,"f").index}get type(){return Ze(this,Zr,"f").type.getValue()}get box(){return Ze(this,Zr,"f")}get uuid(){return Ze(this,Zr,"f").address.uuid}get address(){return Ze(this,Zr,"f").address}get listIndex(){return Ze(this,Jp,"f").getValue()}set listIndex(e){Ze(this,Jp,"f").setValue(e)}accepts(e){switch(e.type){case"audio-clip":return this.type===ve.Audio;case"note-clip":return this.type===ve.Notes;case"value-clip":return this.type===ve.Value;case"audio-region":return this.type===ve.Audio;case"note-region":return this.type===ve.Notes;case"value-region":return this.type===ve.Value}}valueAt(e,r){if(!this.enabled.getValue())return r;let n=r,i=Ze(this,Gr,"f").clipSequencing.iterate(this.uuid,e,e+TS);for(let{optClip:a,sectionFrom:o}of i)n=a.match({none:()=>{let s=this.regions.collection.lowerEqual(e,u=>!u.mute);if(s===null){let u=this.regions.collection.optAt(0);return $t(u,Qa)?u.incomingValue(r):r}else if($t(s,Qa))return e<s.complete?s.valueAt(e,r):s.outgoingValue(r);return r},some:s=>o===e&&$t(s,To)&&!s.mute?s.valueAt(e,r):r});return n}};Gr=new WeakMap,Zr=new WeakMap,pl=new WeakMap,mv=new WeakMap,hv=new WeakMap,Jp=new WeakMap,fl=new WeakSet,QS=function(e){let r=Ze(this,Zr,"f").target.targetVertex;if(r.nonEmpty()){let n=r.unwrap().box;if(n instanceof Xe)return Ze(this,Gr,"f").boxAdapters.adapterFor(n,Yi).input.catchupAndSubscribeLabelChange(s=>e(s));let i=Ze(this,Gr,"f").boxAdapters.optAdapter(n);if(i.nonEmpty()){let o=i.unwrap();if("labelField"in o&&o.labelField instanceof B)return o.labelField.catchupAndSubscribe(s=>e(b.wrap(s.getValue())))}let a=Ze(this,fl,"m",gv).call(this,n).flatMap(o=>Ze(this,Gr,"f").boxAdapters.optAdapter(o));if(a.nonEmpty()){let o=a.unwrap();if("labelField"in o&&o.labelField instanceof B)return o.labelField.catchupAndSubscribe(s=>e(b.wrap(s.getValue())))}return e(b.wrap(n.name)),pe.Empty}return e(b.None),pe.Empty},eP=function(e){let r=this.type;switch(r){case ve.Audio:case ve.Notes:return e(b.wrap(ve[r])),pe.Empty;case ve.Value:{let n=Ze(this,Zr,"f").target.targetVertex.unwrap("target.target");if(n.isField())e(Ze(this,Gr,"f").parameterFieldAdapters.opt(n.address).map(i=>i.name));else if(n.isBox())e(b.wrap(n.name));else return V("Illegal State. Vertex is not a field nor box.");return pe.Empty}case ve.Undefined:return e(b.wrap("")),pe.Empty;default:return e(b.None),pe.Empty}},gv=function(e){for(let[r]of e.outgoingEdges())if(r.pointerType===l.Parameter)return r.targetVertex.map(n=>n.box);return b.None};var nr=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ye=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},$i,ki,vv,xv,yv,ml,Ko,Wo,Lo,Zo,Go,hl,Ac,Xp,tP=[l.Automation,l.Modulation,l.MIDIControl,l.ParameterController],sl=class{constructor(e,r,n,i,a,o,s){$i.set(this,void 0),ki.set(this,void 0),vv.set(this,void 0),xv.set(this,void 0),yv.set(this,void 0),ml.set(this,new Y),Ko.set(this,void 0),Wo.set(this,void 0),Lo.set(this,void 0),Zo.set(this,void 0),Go.set(this,b.None),hl.set(this,b.None),Ac.set(this,null),Xp.set(this,!1),nr(this,$i,e,"f"),nr(this,ki,r,"f"),nr(this,Lo,n,"f"),nr(this,Zo,i,"f"),nr(this,vv,a,"f"),nr(this,xv,o??0,"f"),nr(this,yv,b.wrap(s),"f"),ye(this,ml,"f").own(ye(this,$i,"f").parameterFieldAdapters.register(this)),nr(this,Ko,ye(this,ml,"f").own(new fe),"f"),nr(this,Wo,new Yt,"f"),ye(this,ml,"f").own(ye(this,ki,"f").subscribe(()=>ye(this,Ko,"f").notify(this))),ye(this,ml,"f").own(ye(this,ki,"f").pointerHub.catchupAndSubscribe({onAdded:u=>{ye(this,Wo,"f").proxy.onControlSourceAdd(Bb(u.pointerType)),u.box.accept({visitTrackBox:d=>{te(ye(this,Go,"f").isEmpty(),"Already assigned");let m=ye(this,$i,"f").boxAdapters.adapterFor(d,er);nr(this,Go,b.wrap(m),"f"),ye(this,$i,"f").isMainThread&&nr(this,hl,b.wrap(ye(this,$i,"f").liveStreamReceiver.subscribeFloat(ye(this,ki,"f").address,x=>{ye(this,Ac,"f")!==x&&(nr(this,Ac,x,"f"),ye(this,Ko,"f").notify(this))})),"f")}})},onRemoved:u=>{ye(this,Wo,"f").proxy.onControlSourceRemove(Bb(u.pointerType)),u.box.accept({visitTrackBox:d=>{te(ye(this,Go,"f").unwrapOrNull()?.address?.equals(d.address)===!0,`Unknown ${d}`),nr(this,Go,b.None,"f"),ye(this,$i,"f").isMainThread&&(ye(this,hl,"f").ifSome(m=>m.terminate()),nr(this,hl,b.None,"f"),nr(this,Ac,null,"f"),ye(this,Ko,"f").notify(this))}})}},...tP)),r.getValue(),n.clamp(r.getValue())}registerMidiControl(){return ye(this,Wo,"f").proxy.onControlSourceAdd("midi"),nr(this,Xp,!0,"f"),{terminate:()=>{nr(this,Xp,!1,"f"),ye(this,Wo,"f").proxy.onControlSourceRemove("midi")}}}get field(){return ye(this,ki,"f")}get valueMapping(){return ye(this,Lo,"f")}get stringMapping(){return ye(this,Zo,"f")}get name(){return ye(this,vv,"f")}get anchor(){return ye(this,xv,"f")}get type(){return ye(this,ki,"f").type}get address(){return ye(this,ki,"f").address}get track(){return ye(this,Go,"f")}registerTracks(e){return ye(this,$i,"f").parameterFieldAdapters.registerTracks(this.address,e)}touchStart(){ye(this,$i,"f").parameterFieldAdapters.touchStart(this.address),ye(this,$i,"f").parameterFieldAdapters.notifyWrite(this,this.getUnitValue())}touchEnd(){ye(this,$i,"f").parameterFieldAdapters.touchEnd(this.address)}updateMappings(e,r){nr(this,Lo,e,"f"),nr(this,Zo,r,"f"),ye(this,Ko,"f").notify(this)}valueAt(e){let r=ye(this,Go,"f");if(r.nonEmpty()){let n=r.unwrap();if(n.enabled)return this.valueMapping.y(n.valueAt(e,this.getUnitValue()))}return this.getValue()}subscribe(e){return ye(this,Ko,"f").subscribe(e)}catchupAndSubscribe(e){return e(this),this.subscribe(e)}catchupAndSubscribeControlSources(e){return ye(this,Xp,"f")&&e.onControlSourceAdd("midi"),ye(this,ki,"f").pointerHub.filter(...tP).forEach(r=>e.onControlSourceAdd(Bb(r.pointerType))),ye(this,Wo,"f").subscribe(e)}getValue(){return ye(this,ki,"f").getValue()}setValue(e){if(e===this.getValue())return;let r=this.getUnitValue();ye(this,ki,"f").setValue(e),ye(this,$i,"f").parameterFieldAdapters.notifyWrite(this,r)}setUnitValue(e){this.setValue(ye(this,Lo,"f").y(e))}getUnitValue(){return ye(this,Lo,"f").x(this.getValue())}getControlledValue(){return ye(this,Lo,"f").y(this.getControlledUnitValue())}getControlledUnitValue(){return ye(this,Ac,"f")??this.getUnitValue()}getControlledPrintValue(){return ye(this,Zo,"f").x(this.getControlledValue())}getPrintValue(){return ye(this,Zo,"f").x(this.getValue())}setPrintValue(e){let r=ye(this,Zo,"f").y(e);r.type==="unitValue"?this.setUnitValue(at(r.value,0,1)):r.type==="explicit"?this.setValue(this.valueMapping.clamp(r.value)):console.debug(`Unknown text input: '${r.value}'`)}reset(){this.setValue(ye(this,yv,"f").unwrapOrElse(ye(this,ki,"f").initValue))}terminate(){ye(this,hl,"f").ifSome(e=>e.terminate()),nr(this,hl,b.None,"f"),ye(this,ml,"f").terminate()}};$i=new WeakMap,ki=new WeakMap,vv=new WeakMap,xv=new WeakMap,yv=new WeakMap,ml=new WeakMap,Ko=new WeakMap,Wo=new WeakMap,Lo=new WeakMap,Zo=new WeakMap,Go=new WeakMap,hl=new WeakMap,Ac=new WeakMap,Xp=new WeakMap;var Bb=t=>{switch(t){case l.Automation:return"automated";case l.Modulation:return"modulated";case l.MIDIControl:return"midi";case l.ParameterController:return"external";default:return V(`${t.toString()} is an unknown pointer type`)}};var wv={min:400,max:480,default:440};var Tb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Rn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},io,gl,bv,_v=class{constructor(e,r,n){io.set(this,void 0),gl.set(this,void 0),bv.set(this,void 0),Tb(this,io,M.newSet(i=>i.uuid),"f"),Tb(this,gl,new Yt,"f"),Tb(this,bv,e.catchupAndSubscribe({onAdded:i=>{let a=r(i.box),o=Rn(this,io,"f").add(a);te(o,`Could not add ${a}`),Rn(this,gl,"f").proxy.onAdd(a)},onRemoved:i=>{let a=i.box.address.uuid;Rn(this,gl,"f").proxy.onRemove(Rn(this,io,"f").removeByKey(a))}},n),"f")}subscribe(e){return Rn(this,gl,"f").subscribe(e)}catchupAndSubscribe(e){return Rn(this,io,"f").forEach(r=>e.onAdd(r)),this.subscribe(e)}adapters(){return Rn(this,io,"f").values()}size(){return Rn(this,io,"f").size()}isEmpty(){return this.size()===0}terminate(){Rn(this,io,"f").clear(),Rn(this,gl,"f").terminate(),Rn(this,bv,"f").terminate()}};io=new WeakMap,gl=new WeakMap,bv=new WeakMap;var Db=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},xt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Rb,si,Yp,Qi,Fr,rP,Cn=class{constructor(e,r){Rb.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Delay,Yp.set(this,void 0),Qi.set(this,void 0),Fr.set(this,void 0),Db(this,Yp,e,"f"),Db(this,Qi,r,"f"),Db(this,Fr,new de(xt(this,Yp,"f")),"f"),this.namedParameter=xt(this,Rb,"m",rP).call(this,r)}get box(){return xt(this,Qi,"f")}get uuid(){return xt(this,Qi,"f").address.uuid}get address(){return xt(this,Qi,"f").address}get indexField(){return xt(this,Qi,"f").index}get labelField(){return xt(this,Qi,"f").label}get enabledField(){return xt(this,Qi,"f").enabled}get minimizedField(){return xt(this,Qi,"f").minimized}get host(){return xt(this,Qi,"f").host}deviceHost(){return xt(this,Yp,"f").boxAdapters.adapterFor(xt(this,Qi,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){xt(this,Fr,"f").terminate()}};si=Cn,Yp=new WeakMap,Qi=new WeakMap,Fr=new WeakMap,Rb=new WeakSet,rP=function(e){return{preSyncTimeLeft:xt(this,Fr,"f").createParameter(e.preSyncTimeLeft,S.linearInteger(0,si.Fractions.length-1),si.FractionsStringMapping,"pre sync L"),preMillisTimeLeft:xt(this,Fr,"f").createParameter(e.preMillisTimeLeft,S.powerByCenter(100,0,si.MAX_MILLIS_TIME),$.numeric({unit:"ms",fractionDigits:1}),"pre ms L"),preSyncTimeRight:xt(this,Fr,"f").createParameter(e.preSyncTimeRight,S.linearInteger(0,si.Fractions.length-1),si.FractionsStringMapping,"pre sync R"),preMillisTimeRight:xt(this,Fr,"f").createParameter(e.preMillisTimeRight,S.powerByCenter(100,0,si.MAX_MILLIS_TIME),$.numeric({unit:"ms",fractionDigits:1}),"pre ms R"),delay:xt(this,Fr,"f").createParameter(e.delayMusical,S.linearInteger(0,si.Fractions.length-1),si.FractionsStringMapping,"delay"),millisTime:xt(this,Fr,"f").createParameter(e.delayMillis,S.powerByCenter(100,0,si.MAX_MILLIS_TIME),$.numeric({unit:"ms",fractionDigits:1}),"ms"),feedback:xt(this,Fr,"f").createParameter(e.feedback,S.unipolar(),$.numeric({unit:"%",fractionDigits:0}),"feedback"),cross:xt(this,Fr,"f").createParameter(e.cross,S.unipolar(),$.numeric({unit:"%",fractionDigits:0}),"cross"),lfoSpeed:xt(this,Fr,"f").createParameter(e.lfoSpeed,S.exponential(si.LFO_SPEED_MIN,si.LFO_SPEED_MAX),$.numeric({unit:"Hz",fractionDigits:2}),"lfo speed"),lfoDepth:xt(this,Fr,"f").createParameter(e.lfoDepth,S.power(4,0,si.LFO_DEPTH_MAX),$.numeric({unit:"ms",fractionDigits:1}),"lfo depth"),filter:xt(this,Fr,"f").createParameter(e.filter,S.bipolar(),$.numeric({unit:"%",fractionDigits:0}),"filter",.5),dry:xt(this,Fr,"f").createParameter(e.dry,S.DefaultDecibel,$.numeric({unit:"db",fractionDigits:1}),"dry"),wet:xt(this,Fr,"f").createParameter(e.wet,S.DefaultDecibel,$.numeric({unit:"db",fractionDigits:1}),"wet")}};Cn.Fractions=vo.builder().add([0,1]).add([1,128]).add([1,96]).add([1,64]).add([1,48]).add([1,32]).add([1,24]).add([3,64]).add([1,16]).add([1,12]).add([3,32]).add([1,8]).add([1,6]).add([3,16]).add([1,4]).add([5,16]).add([1,3]).add([3,8]).add([7,16]).add([1,2]).add([1,1]).asAscendingArray();Cn.FractionsStringMapping=$.indices("",si.Fractions.map(([t,e])=>t===0?"Off":`${t}/${e}`));Cn.MAX_MILLIS_TIME=1e3;Cn.LFO_SPEED_MIN=.1;Cn.LFO_SPEED_MAX=5;Cn.LFO_DEPTH_MAX=50;var Cb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},dr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},zb,Qp,en,wa,iP,Av=class{constructor(e,r){zb.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Reverb,Qp.set(this,void 0),en.set(this,void 0),wa.set(this,void 0),Cb(this,Qp,e,"f"),Cb(this,en,r,"f"),Cb(this,wa,new de(dr(this,Qp,"f")),"f"),this.namedParameter=dr(this,zb,"m",iP).call(this,r)}get box(){return dr(this,en,"f")}get uuid(){return dr(this,en,"f").address.uuid}get address(){return dr(this,en,"f").address}get indexField(){return dr(this,en,"f").index}get labelField(){return dr(this,en,"f").label}get enabledField(){return dr(this,en,"f").enabled}get minimizedField(){return dr(this,en,"f").minimized}get host(){return dr(this,en,"f").host}deviceHost(){return dr(this,Qp,"f").boxAdapters.adapterFor(dr(this,en,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){dr(this,wa,"f").terminate()}};Qp=new WeakMap,en=new WeakMap,wa=new WeakMap,zb=new WeakSet,iP=function(e){return{decay:dr(this,wa,"f").createParameter(e.decay,S.unipolar(),$.numeric({unit:"%",fractionDigits:0}),"Room-Size"),preDelay:dr(this,wa,"f").createParameter(e.preDelay,S.exponential(.001,.5),$.numeric({unit:"s",fractionDigits:1,unitPrefix:!0}),"Pre-Delay"),damp:dr(this,wa,"f").createParameter(e.damp,S.unipolar(),$.numeric({unit:"%",fractionDigits:0}),"damping"),filter:dr(this,wa,"f").createParameter(e.filter,S.bipolar(),$.numeric({unit:"%",fractionDigits:0}),"filter"),dry:dr(this,wa,"f").createParameter(e.dry,S.DefaultDecibel,$.numeric({unit:"db",fractionDigits:1}),"dry"),wet:dr(this,wa,"f").createParameter(e.wet,S.DefaultDecibel,$.numeric({unit:"db",fractionDigits:1}),"wet")}};var Ob=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Lt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Vb,ef,Ni,zn,oP,Fv=class{constructor(e,r){Vb.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Revamp,ef.set(this,void 0),Ni.set(this,void 0),zn.set(this,void 0),Ob(this,ef,e,"f"),Ob(this,Ni,r,"f"),Ob(this,zn,new de(Lt(this,ef,"f")),"f"),this.namedParameter=Lt(this,Vb,"m",oP).call(this,r)}get box(){return Lt(this,Ni,"f")}get uuid(){return Lt(this,Ni,"f").address.uuid}get address(){return Lt(this,Ni,"f").address}get indexField(){return Lt(this,Ni,"f").index}get labelField(){return Lt(this,Ni,"f").label}get enabledField(){return Lt(this,Ni,"f").enabled}get minimizedField(){return Lt(this,Ni,"f").minimized}get host(){return Lt(this,Ni,"f").host}get spectrum(){return Lt(this,Ni,"f").address.append(4095)}deviceHost(){return Lt(this,ef,"f").boxAdapters.adapterFor(Lt(this,Ni,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Lt(this,zn,"f").terminate()}};ef=new WeakMap,Ni=new WeakMap,zn=new WeakMap,Vb=new WeakSet,oP=function(e){return{highPass:nP(Lt(this,zn,"f"),e.highPass,"High-Pass"),lowShelf:aP(Lt(this,zn,"f"),e.lowShelf,"Low-Shelf"),lowBell:Ub(Lt(this,zn,"f"),e.lowBell,"Low-Bell"),midBell:Ub(Lt(this,zn,"f"),e.midBell,"Mid-Bell"),highBell:Ub(Lt(this,zn,"f"),e.highBell,"High-Bell"),highShelf:aP(Lt(this,zn,"f"),e.highShelf,"High-Shelf"),lowPass:nP(Lt(this,zn,"f"),e.lowPass,"Low-Pass")}};var jb=S.exponential(20,2e4),sP=S.linear(-24,24),lP=S.exponential(.01,10),nP=(t,e,r)=>({enabled:t.createParameter(e.enabled,S.bool,$.bool,"enabled"),frequency:t.createParameter(e.frequency,jb,$.numeric({unit:"Hz",fractionDigits:0}),`${r} Freq`),order:t.createParameter(e.order,S.linearInteger(0,3),$.indices("db",["12","24","36","48"]),`${r} Order`),q:t.createParameter(e.q,lP,$.numeric({fractionDigits:3}),`${r} Q`)}),aP=(t,e,r)=>({enabled:t.createParameter(e.enabled,S.bool,$.bool,"enabled"),frequency:t.createParameter(e.frequency,jb,$.numeric({unit:"Hz",fractionDigits:0}),`${r} Freq`),gain:t.createParameter(e.gain,sP,$.numeric({unit:"db",fractionDigits:1,bipolar:!0}),`${r} Gain`,.5)}),Ub=(t,e,r)=>({enabled:t.createParameter(e.enabled,S.bool,$.bool,"enabled"),frequency:t.createParameter(e.frequency,jb,$.numeric({unit:"Hz",fractionDigits:0}),`${r} Freq`),gain:t.createParameter(e.gain,sP,$.numeric({unit:"db",fractionDigits:1,bipolar:!0}),`${r} Gain`,.5),q:t.createParameter(e.q,lP,$.numeric({fractionDigits:3}),`${r} Q`)});var uP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},li=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ev,Sv,ui,Ho=class{constructor(e,r){this.type="marker-event",Ev.set(this,new Y),Sv.set(this,void 0),ui.set(this,void 0),uP(this,Sv,e,"f"),uP(this,ui,r,"f"),li(this,Ev,"f").own(li(this,ui,"f").subscribe(ze.Children,n=>{if(!this.trackAdapter.isEmpty()&&(n.type==="primitive"||n.type==="pointer")){let i=this.trackAdapter.unwrap();li(this,ui,"f").position.address.equals(n.address)?i.onSortingChanged():i.dispatchChange()}}))}get box(){return li(this,ui,"f")}get uuid(){return li(this,ui,"f").address.uuid}get address(){return li(this,ui,"f").address}get position(){return li(this,ui,"f").position.getValue()}get plays(){return li(this,ui,"f").plays.getValue()}get hue(){return li(this,ui,"f").hue.getValue()}get label(){return li(this,ui,"f").label.getValue()}get trackAdapter(){return li(this,ui,"f").track.targetVertex.map(e=>li(this,Sv,"f").boxAdapters.adapterFor(e.box,ba).markerTrack)}terminate(){li(this,Ev,"f").terminate()}toString(){return`{MarkerBoxAdapter ${M.toString(li(this,ui,"f").address.uuid).substring(0,4)}, plays: ${this.plays}`}};Ev=new WeakMap,Sv=new WeakMap,ui=new WeakMap;Ho.Comparator=(t,e)=>t.position-e.position;var tf=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},tn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rf,Fc,nf,vl,Pv,$v=class{constructor(e,r){rf.set(this,void 0),Fc.set(this,void 0),nf.set(this,void 0),vl.set(this,void 0),Pv.set(this,void 0),tf(this,rf,e,"f"),tf(this,Fc,r,"f"),this.changeNotifier=new fe,tf(this,nf,M.newSet(n=>n.uuid),"f"),tf(this,vl,ri.create(Ho.Comparator),"f"),tf(this,Pv,tn(this,Fc,"f").markers.pointerHub.catchupAndSubscribe({onAdded:({box:n})=>{if(n instanceof xu){let i=tn(this,rf,"f").boxAdapters.adapterFor(n,Ho),a=tn(this,nf,"f").add(i);te(a,"Could not add adapter"),tn(this,vl,"f").add(i),this.dispatchChange()}},onRemoved:({box:{address:{uuid:n}}})=>{tn(this,vl,"f").remove(tn(this,nf,"f").removeByKey(n)),this.dispatchChange()}}),"f")}subscribe(e){return this.changeNotifier.subscribe(e)}get context(){return tn(this,rf,"f")}get enabled(){return tn(this,Fc,"f").enabled.getValue()}get events(){return tn(this,vl,"f")}get object(){return tn(this,Fc,"f")}dispatchChange(){this.changeNotifier.notify()}onSortingChanged(){tn(this,vl,"f").onIndexingChanged(),this.dispatchChange()}terminate(){tn(this,Pv,"f").terminate()}};rf=new WeakMap,Fc=new WeakMap,nf=new WeakMap,vl=new WeakMap,Pv=new WeakMap;var cP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Mi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kv,Nv,Ii,xl=class{constructor(e,r){this.type="signature-event",kv.set(this,new Y),Nv.set(this,void 0),Ii.set(this,void 0),cP(this,Nv,e,"f"),cP(this,Ii,r,"f"),Mi(this,kv,"f").own(Mi(this,Ii,"f").subscribe(ze.Children,n=>this.trackAdapter.ifSome(i=>i.dispatchChange())))}get box(){return Mi(this,Ii,"f")}get uuid(){return Mi(this,Ii,"f").address.uuid}get address(){return Mi(this,Ii,"f").address}get index(){return Mi(this,Ii,"f").index.getValue()}get indexField(){return Mi(this,Ii,"f").index}get relativePosition(){return Mi(this,Ii,"f").relativePosition.getValue()}get nominator(){return Mi(this,Ii,"f").nominator.getValue()}get denominator(){return Mi(this,Ii,"f").denominator.getValue()}get trackAdapter(){return Mi(this,Ii,"f").events.targetVertex.map(e=>Mi(this,Nv,"f").boxAdapters.adapterFor(e.box,ba).signatureTrack)}terminate(){Mi(this,kv,"f").terminate()}toString(){return`{SignatureEventBoxAdapter ${this.nominator}/${this.denominator}}`}};kv=new WeakMap,Nv=new WeakMap,Ii=new WeakMap;xl.Comparator=(t,e)=>t.index-e.index;var Mv=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},yt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qo,af,of,yl,no,Jo,dP,Ec,Iv=class{constructor(e,r,n){qo.add(this),af.set(this,new Y),of.set(this,void 0),yl.set(this,void 0),no.set(this,void 0),Jo.set(this,void 0),Mv(this,of,e,"f"),Mv(this,yl,r,"f"),Mv(this,no,n,"f"),this.changeNotifier=new fe,Mv(this,Jo,yt(this,af,"f").own(ur.create(yt(this,no,"f").events,i=>e.boxAdapters.adapterFor(i,xl),l.SignatureAutomation)),"f"),yt(this,af,"f").ownAll(yt(this,yl,"f").subscribe(()=>this.dispatchChange()),yt(this,no,"f").enabled.subscribe(()=>this.dispatchChange()),yt(this,Jo,"f").subscribe({onAdd:i=>this.changeNotifier.notify(),onRemove:i=>this.changeNotifier.notify(),onReorder:i=>this.changeNotifier.notify()}))}subscribe(e){return this.changeNotifier.subscribe(e)}get context(){return yt(this,of,"f")}get enabled(){return yt(this,no,"f").enabled.getValue()}get object(){return yt(this,no,"f")}get size(){return yt(this,Jo,"f").size()}get storageSignature(){let{nominator:e,denominator:r}=yt(this,yl,"f");return[e.getValue(),r.getValue()]}nonEmpty(){return yt(this,Jo,"f").size()>0}dispatchChange(){this.changeNotifier.notify()}signatureAt(e){e=Math.max(0,e);let r=this.storageSignature;for(let{accumulatedPpqn:n,nominator:i,denominator:a}of this.iterateAll()){if(n>e)break;r=[i,a]}return r}*iterateAll(){let e=0,r=0,[n,i]=this.storageSignature;if(yield{index:-1,accumulatedPpqn:e,accumulatedBars:r,nominator:n,denominator:i},!!yt(this,no,"f").enabled.getValue())for(let a of yt(this,Jo,"f").adapters())e+=Ne.fromSignature(n,i)*a.relativePosition,r+=a.relativePosition,n=a.nominator,i=a.denominator,yield{index:a.index,accumulatedPpqn:e,accumulatedBars:r,nominator:n,denominator:i}}changeSignature(e,r){let n=Array.from(this.iterateAll()).slice(1),i=n.map(u=>u.accumulatedPpqn);yt(this,yl,"f").nominator.setValue(e),yt(this,yl,"f").denominator.setValue(r);let a=0,o=0,s=Ne.fromSignature(e,r);for(let u=0;u<n.length;u++){let d=n[u],m=this.adapterAt(d.index);if(m.isEmpty())continue;let h=(i[u]-a)/s,w=Math.floor(h),A=h-w;o+=A;let _=w;o>=1&&(_++,o--),_=Math.max(1,_),m.unwrap().box.relativePosition.setValue(_),a+=_*s,s=Ne.fromSignature(d.nominator,d.denominator)}}deleteAdapter(e){let r=e.index,n=Array.from(this.iterateAll()).slice(1),i=n.findIndex(w=>w.index===r);if(i===-1)return;let a=n.slice(i+1),o=a.map(w=>w.accumulatedPpqn),s=i>0?n[i-1]:null,[u,d]=s!==null?[s.nominator,s.denominator]:this.storageSignature,m=s!==null?s.accumulatedPpqn:0;e.box.delete();let x=m,h=Ne.fromSignature(u,d);for(let w=0;w<a.length;w++){let A=a[w],_=this.adapterAt(A.index);if(_.isEmpty())continue;let K=(o[w]-x)/h,U=Math.max(1,Math.round(K));_.unwrap().box.relativePosition.setValue(U),x+=U*h,h=Ne.fromSignature(A.nominator,A.denominator)}}createEvent(e,r,n){let i=Array.from(this.iterateAll()),a=i[0],o=0;for(let _=1;_<i.length&&!(i[_].accumulatedPpqn>e);_++)a=i[_],o=_;let s=Ne.fromSignature(a.nominator,a.denominator),u=(e-a.accumulatedPpqn)/s,d=Math.max(1,Math.round(u)),m=a.index+1,x=i.slice(o+1),h=a.accumulatedPpqn+d*s,w=Ne.fromSignature(r,n),A=x.map(_=>({event:_,adapter:this.adapterAt(_.index)})).filter(({adapter:_})=>_.nonEmpty()).map(({event:_,adapter:C})=>({event:_,adapter:C.unwrap()}));for(let _=0;_<A.length;_++){let{event:C,adapter:K}=A[_];if(K.box.index.setValue(C.index+1),_===0){let U=(C.accumulatedPpqn-h)/w;K.box.relativePosition.setValue(Math.max(1,Math.round(U)))}}mu.create(yt(this,of,"f").boxGraph,M.generate(),_=>{_.index.setValue(m),_.relativePosition.setValue(d),_.nominator.setValue(r),_.denominator.setValue(n),_.events.refer(yt(this,no,"f").events)})}adapterAt(e){return yt(this,Jo,"f").getAdapterByIndex(e)}moveEvent(e,r){let n=Array.from(this.iterateAll()).slice(1),i=n.findIndex(h=>h.index===e.index);if(i===-1)return;let a=n[i];if(r===a.accumulatedPpqn)return;let o=n.map(h=>h.accumulatedBars),s=yt(this,qo,"m",dP).call(this,r,a.index);if(s===a.accumulatedBars)return;let u=[...o];u[i]=s;let d=u.map((h,w)=>({bar:h,i:w})).sort((h,w)=>h.bar-w.bar).map(h=>h.i),m=n.map(h=>this.adapterAt(h.index).unwrap("adapterAt"));for(let h=0;h<d.length;h++)m[d[h]].box.index.setValue(h);let x=0;for(let h=0;h<d.length;h++){let w=d[h],A=m[w],_=u[w],C=Math.max(1,_-x);A.box.relativePosition.setValue(C),x=_}}floorToBar(e){let{event:r,barPpqn:n}=yt(this,qo,"m",Ec).call(this,e),i=Math.floor((e-r.accumulatedPpqn)/n);return r.accumulatedPpqn+i*n}ceilToBar(e){let{event:r,barPpqn:n}=yt(this,qo,"m",Ec).call(this,e),i=Math.ceil((e-r.accumulatedPpqn)/n);return r.accumulatedPpqn+i*n}roundToBar(e){let{event:r,barPpqn:n}=yt(this,qo,"m",Ec).call(this,e),i=Math.round((e-r.accumulatedPpqn)/n);return r.accumulatedPpqn+i*n}toParts(e){let{event:r}=yt(this,qo,"m",Ec).call(this,e),n=Ne.toParts(e-r.accumulatedPpqn,r.nominator,r.denominator);return{...n,bars:n.bars+r.accumulatedBars}}barLengthAt(e){let[r,n]=this.signatureAt(e);return Ne.fromSignature(r,n)}getBarInterval(e){let{event:r,barPpqn:n}=yt(this,qo,"m",Ec).call(this,e),i=Math.floor((e-r.accumulatedPpqn)/n),a=r.accumulatedPpqn+i*n;return{position:a,complete:a+n}}terminate(){yt(this,af,"f").terminate()}};af=new WeakMap,of=new WeakMap,yl=new WeakMap,no=new WeakMap,Jo=new WeakMap,qo=new WeakSet,dP=function(e,r){let n=null;for(let o of this.iterateAll())if(o.index!==r){if(o.accumulatedPpqn>e)break;n=o}if(Yn(n)){let[o,s]=this.storageSignature,u=Ne.fromSignature(o,s);return Math.max(1,Math.round(e/u))}let i=Ne.fromSignature(n.nominator,n.denominator),a=Math.round((e-n.accumulatedPpqn)/i);return Math.max(1,n.accumulatedBars+a)},Ec=function(e){let r=null;for(let n of this.iterateAll()){if(n.accumulatedPpqn>e)break;r=n}if(Yn(r)){let[n,i]=this.storageSignature;return{event:{index:-1,accumulatedPpqn:0,accumulatedBars:0,nominator:n,denominator:i},barPpqn:Ne.fromSignature(n,i)}}return{event:r,barPpqn:Ne.fromSignature(r.nominator,r.denominator)}};var sf=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ut=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},lf,_a,Bv,Tv,ao,uf,Dv,ba=class{constructor(e,r){lf.set(this,new Y),_a.set(this,void 0),Bv.set(this,void 0),Tv.set(this,void 0),ao.set(this,void 0),uf.set(this,void 0),Dv.set(this,()=>{let{tempoTrack:{enabled:s}}=Ut(this,_a,"f");return s.getValue()?Ut(this,ao,"f").isEmpty()?b.None:Ut(this,ao,"f").unwrap().events.isEmpty()?b.None:Ut(this,ao,"f"):b.None}),sf(this,_a,r,"f"),sf(this,Bv,new $v(e,r.markerTrack),"f"),sf(this,Tv,new Iv(e,r.signature,r.signatureTrack),"f"),sf(this,ao,new wr,"f"),sf(this,uf,new fe,"f");let n=Ut(this,lf,"f").own(new Y),i=()=>Ut(this,uf,"f").notify(Ut(this,Dv,"f").call(this)),{tempoTrack:{events:a,enabled:o}}=r;Ut(this,lf,"f").own(a.catchupAndSubscribe(({targetVertex:s})=>{n.terminate(),s.match({none:()=>Ut(this,ao,"f").clear(),some:({box:u})=>{let d=e.boxAdapters.adapterFor(u,_r);Ut(this,ao,"f").wrap(d),n.ownAll(d.subscribeChange(i),o.subscribe(i))}})}))}catchupAndSubscribeTempoAutomation(e){return e(Ut(this,Dv,"f").call(this)),Ut(this,uf,"f").subscribe(e)}get box(){return Ut(this,_a,"f")}get uuid(){return Ut(this,_a,"f").address.uuid}get address(){return Ut(this,_a,"f").address}get markerTrack(){return Ut(this,Bv,"f")}get signatureTrack(){return Ut(this,Tv,"f")}get tempoTrackEvents(){return Ut(this,ao,"f")}get signature(){let{nominator:e,denominator:r}=Ut(this,_a,"f").signature;return[e.getValue(),r.getValue()]}get signatureDuration(){let{nominator:e,denominator:r}=Ut(this,_a,"f").signature;return Ne.fromSignature(e.getValue(),r.getValue())}catchupAndSubscribeSignature(e){return e(this.signature),Ut(this,_a,"f").signature.subscribe(()=>e(this.signature))}terminate(){Ut(this,lf,"f").terminate()}};lf=new WeakMap,_a=new WeakMap,Bv=new WeakMap,Tv=new WeakMap,ao=new WeakMap,uf=new WeakMap,Dv=new WeakMap;var pB=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},cf=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Xo,Yo=class{constructor(e,r){Xo.set(this,void 0),pB(this,Xo,r,"f")}get box(){return cf(this,Xo,"f")}get uuid(){return cf(this,Xo,"f").address.uuid}get address(){return cf(this,Xo,"f").address}get source(){return cf(this,Xo,"f").source.targetVertex.unwrap("Insufficient Vertex")}get target(){return cf(this,Xo,"f").target.targetVertex.unwrap("Insufficient Vertex")}terminate(){}};Xo=new WeakMap;var wl=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},rn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Rv,bl,_l,Cv,zv,df,nn=class{constructor(e,r){Rv.set(this,void 0),bl.set(this,void 0),_l.set(this,void 0),Cv.set(this,void 0),zv.set(this,void 0),df.set(this,!1),wl(this,Rv,e,"f"),wl(this,bl,r,"f"),wl(this,_l,new Y,"f"),wl(this,Cv,r.attributes,"f"),wl(this,zv,rn(this,_l,"f").own(new de(e)),"f")}get inputs(){throw new Error("Method not implemented.")}get outputs(){throw new Error("Method not implemented.")}own(e){return rn(this,_l,"f").own(e)}ownAll(...e){rn(this,_l,"f").ownAll(...e)}onSelected(){wl(this,df,!0,"f")}onDeselected(){wl(this,df,!1,"f")}isSelected(){return rn(this,df,"f")}get box(){return rn(this,bl,"f")}get attributes(){return rn(this,Cv,"f")}get uuid(){return rn(this,bl,"f").address.uuid}get address(){return rn(this,bl,"f").address}get parameters(){return rn(this,zv,"f")}get modular(){return rn(this,Rv,"f").boxAdapters.adapterFor(rn(this,bl,"f").attributes.collection.targetVertex.unwrap("attributes.target").box,Qo)}terminate(){rn(this,_l,"f").terminate()}};Rv=new WeakMap,bl=new WeakMap,_l=new WeakMap,Cv=new WeakMap,zv=new WeakMap,df=new WeakMap;var Ov=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},oo=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Uv,es,pf,Vv,Br;(function(t){t.Input="input",t.Output="output"})(Br||(Br={}));var Tr=class t{static create(e,r,n,i){return new t(e,r,n,i??r.fieldName)}constructor(e,r,n,i){Uv.set(this,void 0),es.set(this,void 0),pf.set(this,void 0),Vv.set(this,void 0),Ov(this,Uv,e,"f"),Ov(this,es,r,"f"),Ov(this,pf,n,"f"),Ov(this,Vv,i,"f")}matches(e){return this.direction!==e.direction&&this.field.pointerRules.accepts.some(r=>e.field.pointerRules.accepts.some(n=>n===r))}get connections(){return oo(this,es,"f").pointerHub.isEmpty()?ue.empty():oo(this,es,"f").pointerHub.filter(l.VoltageConnection).map(({box:e})=>oo(this,Uv,"f").adapterFor(e,Yo))}get field(){return oo(this,es,"f")}get address(){return oo(this,es,"f").address}get direction(){return oo(this,pf,"f")}get name(){return oo(this,Vv,"f")}toString(){return`{ModuleConnectorAdapter address: ${oo(this,es,"f").address.toString()}, direction: ${oo(this,pf,"f")}}`}};Uv=new WeakMap,es=new WeakMap,pf=new WeakMap,Vv=new WeakMap;var Kb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ff=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},jv,mf,hf,Sc=class extends nn{constructor(e,r){super(e,r),jv.set(this,void 0),mf.set(this,void 0),hf.set(this,void 0),Kb(this,jv,this.parameters.createParameter(r.time,S.exponential(1,1e4),$.numeric({unit:"ms"}),"Time"),"f"),Kb(this,mf,Tr.create(e.boxAdapters,r.voltageInput,Br.Input,"Input"),"f"),Kb(this,hf,Tr.create(e.boxAdapters,r.voltageOutput,Br.Output,"Output"),"f")}get parameterTime(){return ff(this,jv,"f")}get voltageInput(){return ff(this,mf,"f")}get voltageOutput(){return ff(this,hf,"f")}get inputs(){return[ff(this,mf,"f")]}get outputs(){return[ff(this,hf,"f")]}};jv=new WeakMap,mf=new WeakMap,hf=new WeakMap;var fB=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pP=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},gf,Pc=class extends nn{constructor(e,r){super(e,r),gf.set(this,void 0),fB(this,gf,Tr.create(e.boxAdapters,r.input,Br.Input,"Input"),"f")}get voltageInput(){return pP(this,gf,"f")}get inputs(){return[pP(this,gf,"f")]}get outputs(){return ue.empty()}};gf=new WeakMap;var Wb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},vf=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Kv,xf,yf,$c=class extends nn{constructor(e,r){super(e,r),Kv.set(this,void 0),xf.set(this,void 0),yf.set(this,void 0),Wb(this,Kv,this.parameters.createParameter(r.gain,S.DefaultDecibel,$.numeric({unit:"db"}),"Gain"),"f"),Wb(this,xf,Tr.create(e.boxAdapters,r.voltageInput,Br.Input,"Input"),"f"),Wb(this,yf,Tr.create(e.boxAdapters,r.voltageOutput,Br.Output,"Output"),"f")}get parameterGain(){return vf(this,Kv,"f")}get voltageInput(){return vf(this,xf,"f")}get voltageOutput(){return vf(this,yf,"f")}get inputs(){return[vf(this,xf,"f")]}get outputs(){return[vf(this,yf,"f")]}};Kv=new WeakMap,xf=new WeakMap,yf=new WeakMap;var Lb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Zb=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Wv,Lv,Zv,kc=class extends nn{constructor(e,r){super(e,r),Wv.set(this,void 0),Lv.set(this,void 0),Zv.set(this,void 0),Lb(this,Wv,Tr.create(e.boxAdapters,r.voltageInputX,Br.Input,"X"),"f"),Lb(this,Lv,Tr.create(e.boxAdapters,r.voltageInputY,Br.Input,"Y"),"f"),Lb(this,Zv,Tr.create(e.boxAdapters,r.voltageOutput,Br.Output,"Result"),"f")}get inputs(){return[Zb(this,Wv,"f"),Zb(this,Lv,"f")]}get outputs(){return[Zb(this,Zv,"f")]}};Wv=new WeakMap,Lv=new WeakMap,Zv=new WeakMap;var mB=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},fP=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},wf,Nc=class extends nn{constructor(e,r){super(e,r),wf.set(this,void 0),mB(this,wf,Tr.create(e.boxAdapters,r.output,Br.Output,"Output"),"f")}get voltageOutput(){return fP(this,wf,"f")}get inputs(){return ue.empty()}get outputs(){return[fP(this,wf,"f")]}};wf=new WeakMap;var Mc;(function(t){t.isVertexOfModule=e=>e.box.accept({visitModuleGainBox:()=>!0,visitModuleDelayBox:()=>!0,visitModuleMultiplierBox:()=>!0,visitModularAudioInputBox:()=>!0,visitModularAudioOutputBox:()=>!0})??!1,t.adapterFor=(e,r)=>Ce(r.accept({visitModuleGainBox:n=>e.adapterFor(n,$c),visitModuleDelayBox:n=>e.adapterFor(n,Sc),visitModuleMultiplierBox:n=>e.adapterFor(n,kc),visitModularAudioInputBox:n=>e.adapterFor(n,Nc),visitModularAudioOutputBox:n=>e.adapterFor(n,Pc)}),`Could not find ModuleAdapter for ${r.name}`)})(Mc||(Mc={}));var mP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Al=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Gv,Hv,Fl,Gb,Ic=class{constructor(e,r){Gv.add(this),Hv.set(this,void 0),Fl.set(this,void 0),mP(this,Hv,e,"f"),mP(this,Fl,r,"f")}get box(){return Al(this,Fl,"f")}get uuid(){return Al(this,Fl,"f").address.uuid}get address(){return Al(this,Fl,"f").address}get moduleAdapter(){return Mc.adapterFor(Al(this,Hv,"f").boxAdapters,Al(this,Gv,"a",Gb).box)}get parameterAdapter(){return this.moduleAdapter.parameters.parameterAt(Al(this,Gv,"a",Gb).address)}terminate(){}};Hv=new WeakMap,Fl=new WeakMap,Gv=new WeakSet,Gb=function(){return Al(this,Fl,"f").parameter.targetVertex.unwrap("Parameter not assigned")};var hP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ci=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Bc,di,Tc=class{constructor(e,r){this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Modular,Bc.set(this,void 0),di.set(this,void 0),hP(this,Bc,e,"f"),hP(this,di,r,"f")}get box(){return ci(this,di,"f")}get uuid(){return ci(this,di,"f").address.uuid}get address(){return ci(this,di,"f").address}get indexField(){return ci(this,di,"f").index}get labelField(){return ci(this,di,"f").label}get enabledField(){return ci(this,di,"f").enabled}get minimizedField(){return ci(this,di,"f").minimized}get host(){return ci(this,di,"f").host}parameterAt(e){return V("Not yet implemented")}deviceHost(){return ci(this,Bc,"f").boxAdapters.adapterFor(ci(this,di,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}modular(){return ci(this,Bc,"f").boxAdapters.adapterFor(ci(this,di,"f").modularSetup.targetVertex.unwrap("No Modular found").box,Qo)}elements(){return ci(this,di,"f").userInterface.elements.pointerHub.filter(l.DeviceUserInterface).map(e=>ci(this,Bc,"f").boxAdapters.adapterFor(e.box,Ic))}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){}};Bc=new WeakMap,di=new WeakMap;var bf=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ot=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Dc,ts,Rc,Bi,El,Sl,Qo=class{constructor(e,r){Dc.set(this,new Y),ts.set(this,void 0),Rc.set(this,void 0),Bi.set(this,void 0),El.set(this,void 0),Sl.set(this,void 0),bf(this,Rc,e,"f"),bf(this,Bi,r,"f"),bf(this,ts,ot(this,Dc,"f").own(new Yt),"f"),bf(this,El,M.newSet(s=>s.uuid),"f"),bf(this,Sl,M.newSet(s=>s.uuid),"f");let n=s=>{let u=Mc.adapterFor(ot(this,Rc,"f").boxAdapters,s.box);ot(this,El,"f").add(u)&&ot(this,ts,"f").proxy.onModuleAdded(u)},i=s=>ot(this,ts,"f").proxy.onModuleRemoved(ot(this,El,"f").removeByKey(s.address.uuid)),a=s=>{let u=ot(this,Rc,"f").boxAdapters.adapterFor(s.box,Yo);ot(this,Sl,"f").add(u)&&ot(this,ts,"f").proxy.onConnectionAdded(u)},o=s=>ot(this,ts,"f").proxy.onConnectionRemoved(ot(this,Sl,"f").removeByKey(s.address.uuid));ot(this,Bi,"f").modules.pointerHub.filter(l.ModuleCollection).forEach(n),ot(this,Bi,"f").connections.pointerHub.filter(l.ConnectionCollection).forEach(a),ot(this,Dc,"f").own(ot(this,Bi,"f").modules.pointerHub.subscribe({onAdded:n,onRemoved:i},l.ModuleCollection)),ot(this,Dc,"f").own(ot(this,Bi,"f").connections.pointerHub.subscribe({onAdded:a,onRemoved:o},l.ConnectionCollection))}catchupAndSubscribe(e){return pb(e.onModuleAdded,r=>ot(this,El,"f").forEach(n=>r(n))),pb(e.onConnectionAdded,r=>ot(this,Sl,"f").forEach(n=>r(n))),ot(this,ts,"f").subscribe(e)}get box(){return ot(this,Bi,"f")}get address(){return ot(this,Bi,"f").address}get uuid(){return ot(this,Bi,"f").address.uuid}get editingField(){return ot(this,Bi,"f").editing}get labelField(){return ot(this,Bi,"f").label}get modules(){return ot(this,El,"f").values()}get connections(){return ot(this,Sl,"f").values()}get device(){return ot(this,Rc,"f").boxAdapters.adapterFor(Ce(ot(this,Bi,"f").device.pointerHub.incoming().at(0),"No device found").box,Tc)}terminate(){console.debug(`terminate ${this}`),ot(this,Dc,"f").terminate()}};Dc=new WeakMap,ts=new WeakMap,Rc=new WeakMap,Bi=new WeakMap,El=new WeakMap,Sl=new WeakMap;var _f=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Hr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Hb,zc,Af,qv,Cc,Ef,Jv,Ff,Xv,gP,Aa=class{constructor(e,r){Hb.add(this),this.type="groove-adapter",Af.set(this,new Y),qv.set(this,void 0),Cc.set(this,void 0),Ef.set(this,void 0),Jv.set(this,new yh({duration:()=>Hr(this,Xv,"f"),fx:n=>gb(n,Hr(this,Ff,"f")),fy:n=>gb(n,1-Hr(this,Ff,"f"))})),Ff.set(this,0),Xv.set(this,Ne.SemiQuaver*2),_f(this,qv,e,"f"),_f(this,Cc,r,"f"),_f(this,Ef,Hr(this,Af,"f").own(new de(Hr(this,qv,"f"))),"f"),this.namedParameter=Hr(this,Hb,"m",gP).call(this,r),Hr(this,Af,"f").ownAll(this.namedParameter.duration.catchupAndSubscribe(n=>_f(this,Xv,n.getValue(),"f")),this.namedParameter.amount.catchupAndSubscribe(n=>_f(this,Ff,ES(n.getValue(),.01),"f")))}unwarp(e){return Hr(this,Jv,"f").unwarp(e)}warp(e){return Hr(this,Jv,"f").warp(e)}get box(){return Hr(this,Cc,"f")}get uuid(){return Hr(this,Cc,"f").address.uuid}get address(){return Hr(this,Cc,"f").address}terminate(){Hr(this,Af,"f").terminate()}};zc=Aa,Af=new WeakMap,qv=new WeakMap,Cc=new WeakMap,Ef=new WeakMap,Jv=new WeakMap,Ff=new WeakMap,Xv=new WeakMap,Hb=new WeakSet,gP=function(e){return{duration:Hr(this,Ef,"f").createParameter(e.duration,S.values(zc.DurationPPQNs),$.values("",zc.DurationPPQNs,zc.DurationStrings),"duration"),amount:Hr(this,Ef,"f").createParameter(e.amount,S.unipolar(),$.percent({fractionDigits:0}),"amount")}};Aa.Durations=[[1,8],[1,4],[1,4],[1,2],[1,1],[2,1],[4,1],[8,1],[16,1]];Aa.DurationPPQNs=zc.Durations.map(([t,e])=>Ne.fromSignature(t,e));Aa.DurationStrings=zc.Durations.map(([t,e])=>`${t}/${e}`);var Oc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Rt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Fa,rs,Uc,Yv,Qv,Sf,Pf,qb,is=class{constructor(e,r,n,i,a){Fa.set(this,void 0),rs.set(this,void 0),Uc.set(this,void 0),Yv.set(this,void 0),Qv.set(this,void 0),Sf.set(this,new Y),Pf.set(this,void 0),qb.set(this,b.None),Oc(this,Fa,e,"f"),Oc(this,rs,r,"f"),Oc(this,Uc,n,"f"),Oc(this,Yv,i,"f"),Oc(this,Qv,a??0,"f"),Oc(this,Pf,Rt(this,Sf,"f").own(new fe),"f"),Rt(this,Sf,"f").own(Rt(this,Fa,"f").subscribe(()=>Rt(this,Pf,"f").notify(this))),e.getValue(),r.clamp(e.getValue())}get field(){return Rt(this,Fa,"f")}get valueMapping(){return Rt(this,rs,"f")}get stringMapping(){return Rt(this,Uc,"f")}get name(){return Rt(this,Yv,"f")}get anchor(){return Rt(this,Qv,"f")}get type(){return Rt(this,Fa,"f").type}get address(){return Rt(this,Fa,"f").address}get track(){return Rt(this,qb,"f")}subscribe(e){return Rt(this,Pf,"f").subscribe(e)}catchupAndSubscribe(e){return e(this),this.subscribe(e)}getValue(){return Rt(this,Fa,"f").getValue()}setValue(e){Rt(this,Fa,"f").setValue(Rt(this,rs,"f").clamp(e))}setUnitValue(e){this.setValue(Rt(this,rs,"f").y(e))}getUnitValue(){return Rt(this,rs,"f").x(this.getValue())}getPrintValue(){return Rt(this,Uc,"f").x(this.getValue())}setPrintValue(e){let r=Rt(this,Uc,"f").y(e);r.type==="unitValue"?this.setUnitValue(at(r.value,0,1)):r.type==="explicit"?this.setValue(this.valueMapping.clamp(r.value)):console.debug(`Unknown text input: '${r.value}'`)}reset(){this.setValue(Rt(this,rs,"f").clamp(Rt(this,Fa,"f").initValue))}terminate(){Rt(this,Sf,"f").terminate()}};Fa=new WeakMap,rs=new WeakMap,Uc=new WeakMap,Yv=new WeakMap,Qv=new WeakMap,Sf=new WeakMap,Pf=new WeakMap,qb=new WeakMap;var Vc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},an=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ea,ex,tx,rx,ix,nx,ax=class{constructor(e){Ea.set(this,void 0),ex.set(this,void 0),tx.set(this,void 0),rx.set(this,void 0),ix.set(this,void 0),nx.set(this,void 0),Vc(this,Ea,e,"f"),Vc(this,ex,new is(an(this,Ea,"f").keyboard,S.values([88,76,61,49]),$.numeric({fractionDigits:1}),"Keyboard Type"),"f"),Vc(this,tx,new is(an(this,Ea,"f").timeRangeInQuarters,S.exponential(1,64),$.numeric({fractionDigits:1}),"Time-Range"),"f"),Vc(this,rx,new is(an(this,Ea,"f").noteScale,S.exponential(.5,2),$.numeric({fractionDigits:1}),"Note Scale"),"f"),Vc(this,ix,new is(an(this,Ea,"f").noteLabels,S.bool,$.bool,"Note Labels"),"f"),Vc(this,nx,new is(an(this,Ea,"f").transpose,S.linearInteger(-48,48),$.numeric({fractionDigits:0}),"Transpose"),"f")}subscribe(e){return an(this,Ea,"f").box.subscribe(ze.Children,()=>e(this))}get object(){return an(this,Ea,"f")}get keyboard(){return an(this,ex,"f")}get timeRangeInQuarters(){return an(this,tx,"f")}get noteScale(){return an(this,rx,"f")}get noteLabels(){return an(this,ix,"f")}get transpose(){return an(this,nx,"f")}};Ea=new WeakMap,ex=new WeakMap,tx=new WeakMap,rx=new WeakMap,ix=new WeakMap,nx=new WeakMap;var $f=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ar=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Pl,Ti,$l,ox,sx,lx=class{constructor(e,r){Pl.set(this,void 0),Ti.set(this,void 0),$l.set(this,void 0),ox.set(this,void 0),sx.set(this,void 0),$f(this,Pl,e,"f"),$f(this,Ti,r,"f"),$f(this,$l,ur.create(ar(this,Ti,"f").audioUnits,n=>ar(this,Pl,"f").boxAdapters.adapterFor(n,Yi),l.AudioUnits),"f"),$f(this,ox,new _v(ar(this,Ti,"f").audioBusses.pointerHub,n=>ar(this,Pl,"f").boxAdapters.adapterFor(n,Ei),l.AudioBusses),"f"),$f(this,sx,new ax(ar(this,Ti,"f").pianoMode),"f")}get uuid(){return ar(this,Ti,"f").address.uuid}get address(){return ar(this,Ti,"f").address}get box(){return ar(this,Ti,"f")}get audioBusses(){return ar(this,ox,"f")}get audioUnits(){return ar(this,$l,"f")}get clips(){return ar(this,$l,"f").adapters().flatMap(e=>e.tracks.collection.adapters()).flatMap(e=>e.clips.collection.adapters())}get groove(){return ar(this,Pl,"f").boxAdapters.adapterFor(ar(this,Ti,"f").groove.targetVertex.unwrap("no groove").box,Aa)}get timeline(){return ar(this,Pl,"f").boxAdapters.adapterFor(ar(this,Ti,"f").timeline.targetVertex.unwrap("no timeline").box,ba)}get pianoMode(){return ar(this,sx,"f")}get created(){return new Date(ar(this,Ti,"f").created.getValue())}get midiOutputDevices(){return ar(this,Ti,"f").outputMidiDevices.pointerHub.incoming().map(({box:e})=>Ie(e,Po))}*labeledAudioOutputs(){for(let e of ar(this,$l,"f").adapters())yield{label:e.label,address:e.address,children:()=>b.wrap(e.labeledAudioOutputs())}}terminate(){ar(this,$l,"f").terminate()}};Pl=new WeakMap,Ti=new WeakMap,$l=new WeakMap,ox=new WeakMap,sx=new WeakMap;var Jb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Dr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Xb,kf,On,ns,vP,ux=class{constructor(e,r){Xb.add(this),this.type="instrument",this.accepts="audio",this.manualUrl=oe.Tape,kf.set(this,void 0),On.set(this,void 0),ns.set(this,void 0),Jb(this,kf,e,"f"),Jb(this,On,r,"f"),Jb(this,ns,new de(Dr(this,kf,"f")),"f"),this.namedParameter=Dr(this,Xb,"m",vP).call(this,r)}get box(){return Dr(this,On,"f")}get uuid(){return Dr(this,On,"f").address.uuid}get address(){return Dr(this,On,"f").address}get labelField(){return Dr(this,On,"f").label}get iconField(){return Dr(this,On,"f").icon}get defaultTrackType(){return ve.Audio}get enabledField(){return Dr(this,On,"f").enabled}get minimizedField(){return Dr(this,On,"f").minimized}get acceptsMidiEvents(){return!1}deviceHost(){return Dr(this,kf,"f").boxAdapters.adapterFor(Dr(this,On,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Dr(this,ns,"f").terminate()}};kf=new WeakMap,On=new WeakMap,ns=new WeakMap,Xb=new WeakSet,vP=function(e){return{flutter:Dr(this,ns,"f").createParameter(e.flutter,S.unipolar(),$.percent(),"flutter"),wow:Dr(this,ns,"f").createParameter(e.wow,S.unipolar(),$.percent(),"wow"),noise:Dr(this,ns,"f").createParameter(e.noise,S.unipolar(),$.percent(),"noise"),saturation:Dr(this,ns,"f").createParameter(e.saturation,S.unipolar(),$.percent(),"saturation")}};var kl=(()=>{let r=[1,2,3,4],n=["12","24","36","48"],i=[ra.sine,ra.triangle,ra.saw,ra.square],a=["Sine","Triangle","Saw","Square"];return{MIN_CUTOFF:20,MAX_CUTOFF:2e4,CUTOFF_VALUE_MAPPING:S.exponential(20,2e4),CUTOFF_STRING_MAPPING:$.numeric({unit:"Hz"}),FILTER_ORDER_VALUES:r,FILTER_ORDER_STRINGS:n,FILTER_ORDER_VALUE_MAPPING:S.values(r),FILTER_ORDER_STRING_MAPPING:$.values("db",r,n),LFO_WAVEFORM_VALUES:i,LFO_WAVEFORM_STRINGS:a,LFO_WAVEFORM_VALUE_MAPPING:S.values(i),LFO_WAVEFORM_STRING_MAPPING:$.values("",i,a)}})();var Yb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ve=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Qb,Nf,Un,it,xP,cx=class{constructor(e,r){Qb.add(this),this.type="instrument",this.accepts="midi",this.manualUrl=oe.Vaporisateur,Nf.set(this,void 0),Un.set(this,void 0),it.set(this,void 0),Yb(this,Nf,e,"f"),Yb(this,Un,r,"f"),Yb(this,it,new de(Ve(this,Nf,"f")),"f"),this.namedParameter=Ve(this,Qb,"m",xP).call(this,r)}get box(){return Ve(this,Un,"f")}get uuid(){return Ve(this,Un,"f").address.uuid}get address(){return Ve(this,Un,"f").address}get labelField(){return Ve(this,Un,"f").label}get iconField(){return Ve(this,Un,"f").icon}get defaultTrackType(){return ve.Notes}get enabledField(){return Ve(this,Un,"f").enabled}get minimizedField(){return Ve(this,Un,"f").minimized}get acceptsMidiEvents(){return!0}deviceHost(){return Ve(this,Nf,"f").boxAdapters.adapterFor(Ve(this,Un,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Ve(this,it,"f").terminate()}};Nf=new WeakMap,Un=new WeakMap,it=new WeakMap,Qb=new WeakSet,xP=function(e){let r=[Bs.Monophonic,Bs.Polyphonic];return{oscillators:e.oscillators.fields().map(n=>({waveform:Ve(this,it,"f").createParameter(n.waveform,S.linearInteger(0,3),$.indices("",["Sine","Triangle","Sawtooth","Square"]),"Waveform"),volume:Ve(this,it,"f").createParameter(n.volume,S.DefaultDecibel,$.numeric({unit:"db",fractionDigits:1}),"Volume"),octave:Ve(this,it,"f").createParameter(n.octave,S.linearInteger(-3,3),$.numeric({unit:"oct"}),"Octave",.5),tune:Ve(this,it,"f").createParameter(n.tune,S.linear(-1200,1200),$.numeric({unit:"ct",fractionDigits:0}),"Tune",.5)})),noise:{volume:Ve(this,it,"f").createParameter(e.noise.volume,S.DefaultDecibel,$.numeric({unit:"db",fractionDigits:1}),"Volume"),attack:Ve(this,it,"f").createParameter(e.noise.attack,S.exponential(.001,5),$.numeric({unit:"s",fractionDigits:3}),"Attack"),hold:Ve(this,it,"f").createParameter(e.noise.hold,S.exponential(.001,5),$.numeric({unit:"s",fractionDigits:3}),"Hold"),release:Ve(this,it,"f").createParameter(e.noise.release,S.exponential(.001,5),$.numeric({unit:"s",fractionDigits:3}),"Release")},filterOrder:Ve(this,it,"f").createParameter(e.filterOrder,kl.FILTER_ORDER_VALUE_MAPPING,kl.FILTER_ORDER_STRING_MAPPING,"Flt. Order"),cutoff:Ve(this,it,"f").createParameter(e.cutoff,kl.CUTOFF_VALUE_MAPPING,kl.CUTOFF_STRING_MAPPING,"Flt. Cutoff"),resonance:Ve(this,it,"f").createParameter(e.resonance,S.exponential(.01,10),$.numeric({unit:"q",fractionDigits:3}),"Flt. Q"),attack:Ve(this,it,"f").createParameter(e.attack,S.exponential(.001,5),$.numeric({unit:"s",fractionDigits:3}),"Attack"),decay:Ve(this,it,"f").createParameter(e.decay,S.exponential(.001,5),$.numeric({unit:"s",fractionDigits:3}),"Decay"),sustain:Ve(this,it,"f").createParameter(e.sustain,S.unipolar(),$.percent({fractionDigits:1}),"Sustain"),release:Ve(this,it,"f").createParameter(e.release,S.exponential(.001,5),$.numeric({unit:"s",fractionDigits:3}),"Release"),filterEnvelope:Ve(this,it,"f").createParameter(e.filterEnvelope,S.bipolar(),$.percent({fractionDigits:1}),"Flt. Env.",.5),filterKeyboard:Ve(this,it,"f").createParameter(e.filterKeyboard,S.bipolar(),$.percent({fractionDigits:1}),"Flt. Kbd.",.5),voicingMode:Ve(this,it,"f").createParameter(e.voicingMode,S.values(r),$.values("",r,["mono","poly"]),"Play Mode",.5),glideTime:Ve(this,it,"f").createParameter(e.glideTime,S.unipolar(),$.percent({fractionDigits:1}),"Glide time",0),unisonCount:Ve(this,it,"f").createParameter(e.unisonCount,S.values([1,3,5]),$.values("#",[1,3,5],[1,3,5].map(n=>String(n))),"Unisono",0),unisonDetune:Ve(this,it,"f").createParameter(e.unisonDetune,S.exponential(1,1200),$.numeric({unit:"ct",fractionDigits:0}),"Detune",0),unisonStereo:Ve(this,it,"f").createParameter(e.unisonStereo,S.unipolar(),$.percent({fractionDigits:0}),"Stereo",0),lfoWaveform:Ve(this,it,"f").createParameter(e.lfo.waveform,kl.LFO_WAVEFORM_VALUE_MAPPING,kl.LFO_WAVEFORM_STRING_MAPPING,"LFO Shape",0),lfoRate:Ve(this,it,"f").createParameter(e.lfo.rate,S.exponential(1e-4,30),$.numeric({unit:"Hz",fractionDigits:1,unitPrefix:!0}),"Rate",0),lfoTargetTune:Ve(this,it,"f").createParameter(e.lfo.targetTune,S.bipolar(),$.percent({fractionDigits:1}),"Vibrato \u29BF",.5),lfoTargetVolume:Ve(this,it,"f").createParameter(e.lfo.targetVolume,S.bipolar(),$.percent({fractionDigits:1}),"Tremolo \u29BF",.5),lfoTargetCutoff:Ve(this,it,"f").createParameter(e.lfo.targetCutoff,S.bipolar(),$.percent({fractionDigits:1}),"Cutoff \u29BF",.5)}};var e_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},t_,dx,Mf,on,Sa,yP,Nl=class{constructor(e,r){t_.add(this),this.type="midi-effect",this.accepts="midi",this.manualUrl=oe.Arpeggio,Mf.set(this,void 0),on.set(this,void 0),Sa.set(this,void 0),e_(this,Mf,e,"f"),e_(this,on,r,"f"),e_(this,Sa,new de(pr(this,Mf,"f")),"f"),this.namedParameter=pr(this,t_,"m",yP).call(this,r)}get box(){return pr(this,on,"f")}get uuid(){return pr(this,on,"f").address.uuid}get address(){return pr(this,on,"f").address}get indexField(){return pr(this,on,"f").index}get labelField(){return pr(this,on,"f").label}get enabledField(){return pr(this,on,"f").enabled}get minimizedField(){return pr(this,on,"f").minimized}get host(){return pr(this,on,"f").host}deviceHost(){return pr(this,Mf,"f").boxAdapters.adapterFor(pr(this,on,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}terminate(){pr(this,Sa,"f").terminate()}};dx=Nl,Mf=new WeakMap,on=new WeakMap,Sa=new WeakMap,t_=new WeakSet,yP=function(e){return{modeIndex:pr(this,Sa,"f").createParameter(e.modeIndex,S.linearInteger(0,2),$.indices("",["Up","Down","UpDown"]),"mode"),numOctaves:pr(this,Sa,"f").createParameter(e.numOctaves,S.linearInteger(1,5),$.numeric({unit:"",fractionDigits:0}),"Octaves"),rate:pr(this,Sa,"f").createParameter(e.rateIndex,S.linearInteger(0,dx.RateFractions.length-1),dx.RateStringMapping,"Rate"),gate:pr(this,Sa,"f").createParameter(e.gate,S.linear(0,2),$.percent({fractionDigits:0}),"Gate"),repeat:pr(this,Sa,"f").createParameter(e.repeat,S.linearInteger(1,16),$.numeric({fractionDigits:0}),"Repeat"),velocity:pr(this,Sa,"f").createParameter(e.velocity,S.bipolar(),$.percent({fractionDigits:0,bipolar:!1}),"Velocity")}};Nl.RateFractions=vo.builder().add([1,1]).add([1,2]).add([1,3]).add([1,4]).add([3,16]).add([1,6]).add([1,8]).add([3,32]).add([1,12]).add([1,16]).add([3,64]).add([1,24]).add([1,32]).add([1,48]).add([1,64]).add([1,96]).add([1,128]).asDescendingArray();Nl.RateStringMapping=$.indices("",dx.RateFractions.map(([t,e])=>`${t}/${e}`));var r_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Rr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},i_,If,sn,Ml,wP,px=class{constructor(e,r){i_.add(this),this.type="midi-effect",this.accepts="midi",this.manualUrl=oe.Pitch,If.set(this,void 0),sn.set(this,void 0),Ml.set(this,void 0),r_(this,If,e,"f"),r_(this,sn,r,"f"),r_(this,Ml,new de(Rr(this,If,"f")),"f"),this.namedParameter=Rr(this,i_,"m",wP).call(this,r)}get box(){return Rr(this,sn,"f")}get uuid(){return Rr(this,sn,"f").address.uuid}get address(){return Rr(this,sn,"f").address}get indexField(){return Rr(this,sn,"f").index}get labelField(){return Rr(this,sn,"f").label}get enabledField(){return Rr(this,sn,"f").enabled}get minimizedField(){return Rr(this,sn,"f").minimized}get host(){return Rr(this,sn,"f").host}deviceHost(){return Rr(this,If,"f").boxAdapters.adapterFor(Rr(this,sn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}terminate(){Rr(this,Ml,"f").terminate()}};If=new WeakMap,sn=new WeakMap,Ml=new WeakMap,i_=new WeakSet,wP=function(e){return{octaves:Rr(this,Ml,"f").createParameter(e.octaves,S.linearInteger(-7,7),$.numeric({unit:"oct",fractionDigits:0}),"octaves"),semiTones:Rr(this,Ml,"f").createParameter(e.semiTones,S.linearInteger(-36,36),$.numeric({unit:"st",fractionDigits:0}),"semi-tones"),cent:Rr(this,Ml,"f").createParameter(e.cents,S.linear(-50,50),$.numeric({unit:"cents",fractionDigits:1}),"cents")}};var hB=/^\/\/ @label .+$/m,bP=/^\/\/ @param .+$/gm,_P=/^\/\/ @sample .+$/gm;var AP=/^\/\/ @(group|param|sample) .+$/gm,FP=/^\/\/ @(?:param|sample) \S+/gm,jc=1e-6,gB=["linear","exp","int","bool"],vB=new class{x(t){return{value:t>=.5?"On":"Off",unit:""}}y(t){let e=t.trim().toLowerCase();return{type:"explicit",value:e==="on"||e==="true"||e==="yes"?1:0}}},EP=t=>{let e=t.replace(/^\/\/ @param\s+/,"").replace(/\s+\/\/.*$/,"").trim().split(/\s+/);if(e.length===0)throw new Error(`Malformed @param: '${t}'`);let r=e[0];if(e.length===1)return{label:r,defaultValue:0,min:0,max:1,mapping:"unipolar",unit:""};let n=e[1];if(n==="true"||n==="false")return{label:r,defaultValue:n==="true"?1:0,min:0,max:1,mapping:"bool",unit:""};if(n==="bool")return{label:r,defaultValue:0,min:0,max:1,mapping:"bool",unit:""};let i=parseFloat(n);if(isNaN(i))throw new Error(`Malformed @param: '${t}' \u2014 '${n}' is not a valid number`);if(e.length===2)return{label:r,defaultValue:i,min:0,max:1,mapping:"unipolar",unit:""};if(e.length===3&&e[2]==="bool")return{label:r,defaultValue:i>=.5?1:0,min:0,max:1,mapping:"bool",unit:""};if(e.length===4){let d=parseFloat(e[2]),m=parseFloat(e[3]);if(isNaN(d)||isNaN(m))throw new Error(`Malformed @param: '${t}' \u2014 min/max must be numbers`);if(m-d<jc)throw new Error(`Malformed @param: '${t}' \u2014 min (${d}) must be less than max (${m})`);if(i<d-jc||i>m+jc)throw new Error(`Malformed @param: '${t}' \u2014 default (${i}) must be within [${d}, ${m}]`);return{label:r,defaultValue:i,min:d,max:m,mapping:"linear",unit:""}}if(e.length<5)throw new Error(`Malformed @param: '${t}' \u2014 expected: // @param <name> <default> <min> <max> [type] [unit]`);let a=parseFloat(e[2]),o=parseFloat(e[3]),s=e[4],u=e.length>=6?e[5]:"";if(isNaN(a)||isNaN(o))throw new Error(`Malformed @param: '${t}' \u2014 min/max must be numbers`);if(!gB.includes(s))throw new Error(`Malformed @param: '${t}' \u2014 unknown mapping '${s}' (expected: linear, exp, int, bool)`);if(s!=="bool"&&o-a<jc)throw new Error(`Malformed @param: '${t}' \u2014 min (${a}) must be less than max (${o})`);if(i<a-jc||i>o+jc)throw new Error(`Malformed @param: '${t}' \u2014 default (${i}) must be within [${a}, ${o}]`);return{label:r,defaultValue:i,min:a,max:o,mapping:s,unit:u}},SP=(t,e)=>t.mapping===e.mapping&&t.min===e.min&&t.max===e.max&&t.unit===e.unit,xB=(t,e)=>SP(t,e)&&Math.abs(t.defaultValue-e.defaultValue)<1e-6,xr;(function(t){t.isEqual=xB,t.parseLabel=e=>{let r=hB.exec(e);if(r===null)return b.None;let n=r[0].replace(/^\/\/ @label\s+/,"").trim();if(n.length===0)throw new Error("Malformed @label: expected: // @label <name>");return b.wrap(n)},t.parseParams=e=>{let r=[],n;for(bP.lastIndex=0;(n=bP.exec(e))!==null;)r.push(EP(n[0]));return r},t.parseSamples=e=>{let r=[],n;for(_P.lastIndex=0;(n=_P.exec(e))!==null;){let i=n[0].replace(/^\/\/ @sample\s+/,"").replace(/\s+\/\/.*$/,"").trim().split(/\s+/);if(i.length===0||i[0].length===0)throw new Error(`Malformed @sample: '${n[0]}' \u2014 expected: // @sample <name>`);if(i.length>1)throw new Error(`Malformed @sample: '${n[0]}' \u2014 expected: // @sample <name>`);r.push({label:i[0]})}return r},t.parseDeclarationOrder=e=>{let r=new Map,n;FP.lastIndex=0;let i=0;for(;(n=FP.exec(e))!==null;){let a=n[0].replace(/^\/\/ @(?:param|sample)\s+/,"").split(/\s+/)[0];r.has(a)||r.set(a,i++)}return r},t.parseGroups=e=>{let r=[],n=null,i=[];AP.lastIndex=0;let a;for(;(a=AP.exec(e))!==null;){let o=a[0],s=a[1];if(s==="group"){(i.length>0||n!==null)&&r.push({group:n,items:i});let u=o.replace(/^\/\/ @group\s+/,"").trim().split(/\s+/);n={label:u[0],color:u[1]??"dark"},i=[]}else if(s==="param")i.push({type:"param",declaration:EP(o)});else if(s==="sample"){let u=o.replace(/^\/\/ @sample\s+/,"").replace(/\s+\/\/.*$/,"").trim().split(/\s+/);if(u.length===0||u[0].length===0)throw new Error(`Malformed @sample: '${o}' \u2014 expected: // @sample <name>`);i.push({type:"sample",declaration:{label:u[0]}})}}return(i.length>0||n!==null)&&r.push({group:n,items:i}),r},t.resolveValueMapping=e=>{switch(e.mapping){case"unipolar":return S.unipolar();case"linear":return S.linear(e.min,e.max);case"exp":return S.exponential(e.min,e.max);case"int":return S.linearInteger(e.min,e.max);case"bool":return S.linearInteger(0,1)}},t.resolveStringMapping=e=>{switch(e.mapping){case"unipolar":return $.percent();case"linear":return $.numeric({unit:e.unit,fractionDigits:2});case"exp":return $.numeric({unit:e.unit,fractionDigits:2});case"int":return $.numeric({unit:e.unit,fractionDigits:0});case"bool":return vB}},t.resolveParamMappings=e=>({valueMapping:t.resolveValueMapping(e),stringMapping:t.resolveStringMapping(e)}),t.subscribeScriptParams=(e,r,n)=>{let i=new Map,a=new fe;return{terminable:pe.many(n.pointerHub.catchupAndSubscribe({onAdded:(({box:s})=>{let u=Ie(s,la),d=u.label.getValue(),x=t.parseParams(r.getValue()).find(A=>A.label===d),{valueMapping:h,stringMapping:w}=W(x)?t.resolveParamMappings(x):{valueMapping:S.unipolar(),stringMapping:$.percent({fractionDigits:1})};e.createParameter(u.value,h,w,d,void 0,u.defaultValue.getValue()),W(x)&&i.set(d,x)}),onRemoved:(({box:s})=>{let u=Ie(s,la);i.delete(u.label.getValue()),e.removeParameter(u.value.address)})}),r.subscribe(()=>{let s=t.parseParams(r.getValue());for(let u of e.parameters()){let d=s.find(w=>w.label===u.name);if(!W(d))continue;let m=i.get(u.name);if(W(m)&&SP(m,d))continue;let{valueMapping:x,stringMapping:h}=t.resolveParamMappings(d);u.updateMappings(x,h),i.set(u.name,d)}a.notify()}),a),codeChanged:a}}})(xr||(xr={}));var fx=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Er=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Bf,Tf,ln,Df,mx,hx=class{constructor(e,r){Bf.set(this,new Y),this.type="midi-effect",this.accepts="midi",this.manualUrl=oe.Spielwerk,Tf.set(this,void 0),ln.set(this,void 0),Df.set(this,void 0),mx.set(this,void 0),fx(this,Tf,e,"f"),fx(this,ln,r,"f"),fx(this,Df,Er(this,Bf,"f").own(new de(Er(this,Tf,"f"))),"f");let{terminable:n,codeChanged:i}=xr.subscribeScriptParams(Er(this,Df,"f"),r.code,r.parameters);Er(this,Bf,"f").own(n),fx(this,mx,i,"f")}get box(){return Er(this,ln,"f")}get uuid(){return Er(this,ln,"f").address.uuid}get address(){return Er(this,ln,"f").address}get indexField(){return Er(this,ln,"f").index}get labelField(){return Er(this,ln,"f").label}get enabledField(){return Er(this,ln,"f").enabled}get minimizedField(){return Er(this,ln,"f").minimized}get host(){return Er(this,ln,"f").host}get parameters(){return Er(this,Df,"f")}get codeChanged(){return Er(this,mx,"f")}deviceHost(){return Er(this,Tf,"f").boxAdapters.adapterFor(Er(this,ln,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}terminate(){Er(this,Bf,"f").terminate()}};Bf=new WeakMap,Tf=new WeakMap,ln=new WeakMap,Df=new WeakMap,mx=new WeakMap;var gx=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Cr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Rf,Cf,Vn,zf,vx,xx=class{constructor(e,r){Rf.set(this,new Y),this.type="instrument",this.accepts="midi",this.manualUrl=oe.Apparat,Cf.set(this,void 0),Vn.set(this,void 0),zf.set(this,void 0),vx.set(this,void 0),gx(this,Cf,e,"f"),gx(this,Vn,r,"f"),gx(this,zf,Cr(this,Rf,"f").own(new de(Cr(this,Cf,"f"))),"f");let{terminable:n,codeChanged:i}=xr.subscribeScriptParams(Cr(this,zf,"f"),r.code,r.parameters);Cr(this,Rf,"f").own(n),gx(this,vx,i,"f")}get box(){return Cr(this,Vn,"f")}get uuid(){return Cr(this,Vn,"f").address.uuid}get address(){return Cr(this,Vn,"f").address}get labelField(){return Cr(this,Vn,"f").label}get iconField(){return Cr(this,Vn,"f").icon}get defaultTrackType(){return ve.Notes}get enabledField(){return Cr(this,Vn,"f").enabled}get minimizedField(){return Cr(this,Vn,"f").minimized}get acceptsMidiEvents(){return!0}get parameters(){return Cr(this,zf,"f")}get codeChanged(){return Cr(this,vx,"f")}deviceHost(){return Cr(this,Cf,"f").boxAdapters.adapterFor(Cr(this,Vn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Cr(this,Rf,"f").terminate()}};Rf=new WeakMap,Cf=new WeakMap,Vn=new WeakMap,zf=new WeakMap,vx=new WeakMap;var n_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},a_,Of,jn,Kc,PP,yx=class{constructor(e,r){a_.add(this),this.type="instrument",this.accepts="midi",this.manualUrl=oe.Nano,Of.set(this,void 0),jn.set(this,void 0),Kc.set(this,void 0),n_(this,Of,e,"f"),n_(this,jn,r,"f"),n_(this,Kc,new de(pi(this,Of,"f")),"f"),this.namedParameter=pi(this,a_,"m",PP).call(this,r)}get box(){return pi(this,jn,"f")}get uuid(){return pi(this,jn,"f").address.uuid}get address(){return pi(this,jn,"f").address}get labelField(){return pi(this,jn,"f").label}get iconField(){return pi(this,jn,"f").icon}get defaultTrackType(){return ve.Notes}get enabledField(){return pi(this,jn,"f").enabled}get minimizedField(){return pi(this,jn,"f").minimized}get acceptsMidiEvents(){return!0}deviceHost(){return pi(this,Of,"f").boxAdapters.adapterFor(pi(this,jn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){pi(this,Kc,"f").terminate()}};Of=new WeakMap,jn=new WeakMap,Kc=new WeakMap,a_=new WeakSet,PP=function(e){return{volume:pi(this,Kc,"f").createParameter(e.volume,S.DefaultDecibel,$.numeric({unit:"db",fractionDigits:1}),"volume"),release:pi(this,Kc,"f").createParameter(e.release,S.exponential(.001,8),$.numeric({unit:"s",fractionDigits:3}),"release")}};var Wc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},se=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},o_,Il,as,Be,wx,Uf,Di,Bl,$P,Lc=class{constructor(e,r){o_.add(this),this.class="device-host",this.accepts=!1,this.type="instrument",this.manualUrl="manuals/devices/instruments/playfield",Il.set(this,new Y),as.set(this,void 0),Be.set(this,void 0),wx.set(this,void 0),Uf.set(this,void 0),Di.set(this,void 0),Bl.set(this,b.None),Wc(this,as,e,"f"),Wc(this,Be,r,"f"),Wc(this,wx,se(this,Il,"f").own(ur.create(se(this,Be,"f").midiEffects,n=>se(this,as,"f").boxAdapters.adapterFor(n,ae.isMidiEffect),l.MIDIEffectHost)),"f"),Wc(this,Uf,se(this,Il,"f").own(ur.create(se(this,Be,"f").audioEffects,n=>se(this,as,"f").boxAdapters.adapterFor(n,ae.isAudioEffect),l.AudioEffectHost)),"f"),Wc(this,Di,se(this,Il,"f").own(new de(se(this,as,"f"))),"f"),this.namedParameter=se(this,o_,"m",$P).call(this,r),se(this,Il,"f").own(se(this,Be,"f").file.catchupAndSubscribe(n=>{Wc(this,Bl,n.targetVertex.map(({box:i})=>se(this,as,"f").boxAdapters.adapterFor(i,kn)),"f"),se(this,Bl,"f").unwrapOrNull()?.getOrCreateLoader()}))}get box(){return se(this,Be,"f")}get uuid(){return se(this,Be,"f").address.uuid}get address(){return se(this,Be,"f").address}get peakAddress(){return se(this,Be,"f").address.append(1001)}get indexField(){return se(this,Be,"f").index}get gate(){return se(this,Be,"f").gate.getValue()}get exclude(){return se(this,Be,"f").exclude.getValue()}get label(){return`${this.device().labelField.getValue()} > ${se(this,Bl,"f").mapOr(e=>e.box.fileName.getValue(),"No file")}`}get fileLabel(){return`${se(this,Bl,"f").mapOr(e=>e.box.fileName.getValue(),"No file")}`}get iconField(){return se(this,Be,"f").icon}get defaultTrackType(){return ve.Notes}get acceptsMidiEvents(){return!0}get midiEffectsField(){return se(this,Be,"f").midiEffects}get inputField(){return this.audioUnitBoxAdapter().box.input}get audioEffectsField(){return se(this,Be,"f").audioEffects}get tracksField(){return this.audioUnitBoxAdapter().box.tracks}get isAudioUnit(){return!1}file(){return se(this,Bl,"f")}fileUUID(){return se(this,Be,"f").file.targetAddress.unwrap("file.targetAddr").uuid}resetParameters(){se(this,Be,"f").mute.reset(),se(this,Be,"f").solo.reset(),se(this,Be,"f").exclude.reset(),se(this,Be,"f").polyphone.reset(),se(this,Be,"f").pitch.reset(),se(this,Be,"f").attack.reset(),se(this,Be,"f").release.reset(),se(this,Be,"f").sampleStart.reset(),se(this,Be,"f").sampleEnd.reset(),se(this,Be,"f").gate.reset()}copyToIndex(e){$o.create(se(this,Be,"f").graph,M.generate(),r=>{r.file.refer(se(this,Be,"f").file.targetVertex.unwrap("file.target")),r.device.refer(se(this,Be,"f").device.targetVertex.unwrap("device.target")),r.index.setValue(e),r.mute.setValue(se(this,Be,"f").mute.getValue()),r.solo.setValue(se(this,Be,"f").solo.getValue()),r.sampleStart.setValue(se(this,Be,"f").sampleStart.getValue()),r.sampleEnd.setValue(se(this,Be,"f").sampleEnd.getValue()),r.attack.setValue(se(this,Be,"f").attack.getValue()),r.release.setValue(se(this,Be,"f").release.getValue()),r.pitch.setValue(se(this,Be,"f").pitch.getValue()),r.exclude.setValue(se(this,Be,"f").exclude.getValue()),r.gate.setValue(se(this,Be,"f").gate.getValue())})}get midiEffects(){return se(this,wx,"f")}get inputAdapter(){return b.wrap(this)}get audioEffects(){return se(this,Uf,"f")}get labelField(){return Ie(se(this,Be,"f").file.targetVertex.unwrap("file.target").box,Wi).fileName}get enabledField(){return se(this,Be,"f").enabled}get minimizedField(){return se(this,Be,"f").minimized}device(){return se(this,as,"f").boxAdapters.adapterFor(se(this,Be,"f").device.targetVertex.unwrap("device.target").box,Zc)}deviceHost(){return this.device().deviceHost()}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.fileLabel,children:()=>b.None};for(let e of se(this,Uf,"f").adapters())yield*e.labeledAudioOutputs()}terminate(){se(this,Il,"f").terminate()}};Il=new WeakMap,as=new WeakMap,Be=new WeakMap,wx=new WeakMap,Uf=new WeakMap,Di=new WeakMap,Bl=new WeakMap,o_=new WeakSet,$P=function(e){return{gate:se(this,Di,"f").createParameter(e.gate,S.linearInteger(0,2),$.indices("",["Off","On","Loop"]),"Gate"),mute:se(this,Di,"f").createParameter(e.mute,S.bool,$.bool,"Mute"),solo:se(this,Di,"f").createParameter(e.solo,S.bool,$.bool,"Solo"),polyphone:se(this,Di,"f").createParameter(e.polyphone,S.bool,$.bool,"Polyphone"),exclude:se(this,Di,"f").createParameter(e.exclude,S.bool,$.bool,"Exclude"),pitch:se(this,Di,"f").createParameter(e.pitch,S.linear(-1200,1200),$.numeric({unit:"cents",bipolar:!0,fractionDigits:0}),"Pitch",0),sampleStart:se(this,Di,"f").createParameter(e.sampleStart,S.unipolar(),$.percent(),"Start",0),sampleEnd:se(this,Di,"f").createParameter(e.sampleEnd,S.unipolar(),$.percent(),"End",1),attack:se(this,Di,"f").createParameter(e.attack,S.exponential(.001,5),$.numeric({unit:"s",unitPrefix:!0,fractionDigits:1}),"Attack"),release:se(this,Di,"f").createParameter(e.release,S.exponential(.001,5),$.numeric({unit:"s",unitPrefix:!0,fractionDigits:1}),"Release")}};var bx=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},qr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Gc,Kn,Hc,_x,Zc=class{constructor(e,r){this.type="instrument",this.accepts="midi",this.manualUrl=oe.Playfield,Gc.set(this,void 0),Kn.set(this,void 0),Hc.set(this,void 0),_x.set(this,void 0),bx(this,Gc,e,"f"),bx(this,Kn,r,"f"),bx(this,Hc,ur.create(r.samples,n=>e.boxAdapters.adapterFor(n,Lc),l.Sample),"f"),bx(this,_x,new de(qr(this,Gc,"f")),"f")}reset(){qr(this,Hc,"f").adapters().forEach(e=>e.box.delete())}get box(){return qr(this,Kn,"f")}get uuid(){return qr(this,Kn,"f").address.uuid}get address(){return qr(this,Kn,"f").address}get labelField(){return qr(this,Kn,"f").label}get iconField(){return qr(this,Kn,"f").icon}get defaultTrackType(){return ve.Notes}get enabledField(){return qr(this,Kn,"f").enabled}get minimizedField(){return qr(this,Kn,"f").minimized}get acceptsMidiEvents(){return!0}get samples(){return qr(this,Hc,"f")}get context(){return qr(this,Gc,"f")}deviceHost(){return qr(this,Gc,"f").boxAdapters.adapterFor(qr(this,Kn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None};for(let e of qr(this,Hc,"f").adapters())yield{address:e.address,label:e.fileLabel,children:()=>b.wrap(e.labeledAudioOutputs())}}terminate(){qr(this,_x,"f").terminate()}};Gc=new WeakMap,Kn=new WeakMap,Hc=new WeakMap,_x=new WeakMap;var s_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},fr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},l_,Vf,un,Pa,kP,Ax=class{constructor(e,r){l_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.StereoTool,Vf.set(this,void 0),un.set(this,void 0),Pa.set(this,void 0),s_(this,Vf,e,"f"),s_(this,un,r,"f"),s_(this,Pa,new de(fr(this,Vf,"f")),"f"),this.namedParameter=fr(this,l_,"m",kP).call(this,r)}get box(){return fr(this,un,"f")}get uuid(){return fr(this,un,"f").address.uuid}get address(){return fr(this,un,"f").address}get indexField(){return fr(this,un,"f").index}get labelField(){return fr(this,un,"f").label}get enabledField(){return fr(this,un,"f").enabled}get minimizedField(){return fr(this,un,"f").minimized}get host(){return fr(this,un,"f").host}deviceHost(){return fr(this,Vf,"f").boxAdapters.adapterFor(fr(this,un,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){fr(this,Pa,"f").terminate()}};Vf=new WeakMap,un=new WeakMap,Pa=new WeakMap,l_=new WeakSet,kP=function(e){return{volume:fr(this,Pa,"f").createParameter(e.volume,S.decibel(-72,0,12),$.numeric({unit:"db",fractionDigits:1}),"Volume"),panning:fr(this,Pa,"f").createParameter(e.panning,S.bipolar(),$.panning,"Panning",.5),stereo:fr(this,Pa,"f").createParameter(e.stereo,S.bipolar(),$.numeric({unit:"%",fractionDigits:0}),"stereo",.5),invertL:fr(this,Pa,"f").createParameter(e.invertL,S.bool,$.bool,"Invert Left"),invertR:fr(this,Pa,"f").createParameter(e.invertR,S.bool,$.bool,"Invert Right"),swap:fr(this,Pa,"f").createParameter(e.swap,S.bool,$.bool,"Swap")}};var jf;(function(t){t.checkType=e=>e!==null&&typeof e=="object"&&"type"in e&&e.type==="groove-adapter"})(jf||(jf={}));var NP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},fi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qc,mi,Fx=class{constructor(e,r){this.type="midi-effect",this.accepts="midi",this.manualUrl=oe.Zeitgeist,qc.set(this,void 0),mi.set(this,void 0),NP(this,qc,e,"f"),NP(this,mi,r,"f"),this.groove()}get box(){return fi(this,mi,"f")}get uuid(){return fi(this,mi,"f").address.uuid}get address(){return fi(this,mi,"f").address}get indexField(){return fi(this,mi,"f").index}get labelField(){return fi(this,mi,"f").label}get enabledField(){return fi(this,mi,"f").enabled}get minimizedField(){return fi(this,mi,"f").minimized}get host(){return fi(this,mi,"f").host}deviceHost(){return fi(this,qc,"f").boxAdapters.adapterFor(fi(this,mi,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}groove(){return fi(this,qc,"f").boxAdapters.adapterFor(fi(this,mi,"f").groove.targetVertex.unwrap("no groove").box,jf.checkType)}catchupAndSubscribeGroove(e){return fi(this,mi,"f").groove.catchupAndSubscribe(r=>e(fi(this,qc,"f").boxAdapters.adapterFor(r.targetVertex.unwrap("No groove found").box,jf.checkType)))}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}terminate(){}};qc=new WeakMap,mi=new WeakMap;var MP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Wn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ex,Ri,Sx=class{constructor(e,r){this.type="audio-effect",this.accepts="audio",this.manualUrl="",Ex.set(this,void 0),Ri.set(this,void 0),MP(this,Ex,e,"f"),MP(this,Ri,r,"f")}get box(){return Wn(this,Ri,"f")}get uuid(){return Wn(this,Ri,"f").address.uuid}get address(){return Wn(this,Ri,"f").address}get indexField(){return Wn(this,Ri,"f").index}get labelField(){return Wn(this,Ri,"f").label}get enabledField(){return Wn(this,Ri,"f").enabled}get minimizedField(){return Wn(this,Ri,"f").minimized}get host(){return Wn(this,Ri,"f").host}get commentField(){return Wn(this,Ri,"f").comment}deviceHost(){return Wn(this,Ex,"f").boxAdapters.adapterFor(Wn(this,Ri,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){}};Ex=new WeakMap,Ri=new WeakMap;var IP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ln=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Px,Ci,$x=class{constructor(e,r){this.type="midi-effect",this.accepts="midi",this.manualUrl="",Px.set(this,void 0),Ci.set(this,void 0),IP(this,Px,e,"f"),IP(this,Ci,r,"f")}get box(){return Ln(this,Ci,"f")}get uuid(){return Ln(this,Ci,"f").address.uuid}get address(){return Ln(this,Ci,"f").address}get indexField(){return Ln(this,Ci,"f").index}get labelField(){return Ln(this,Ci,"f").label}get enabledField(){return Ln(this,Ci,"f").enabled}get minimizedField(){return Ln(this,Ci,"f").minimized}get host(){return Ln(this,Ci,"f").host}get commentField(){return Ln(this,Ci,"f").comment}deviceHost(){return Ln(this,Px,"f").boxAdapters.adapterFor(Ln(this,Ci,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}terminate(){}};Px=new WeakMap,Ci=new WeakMap;var os=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},je=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},u_,c_,Kf,hi,kx,Jc,Zn,cn,Xc,BP,d_,Nx=class{constructor(e,r){u_.add(this),this.type="instrument",this.accepts="midi",this.manualUrl=oe.Soundfont,c_.set(this,new Y),Kf.set(this,void 0),hi.set(this,void 0),kx.set(this,void 0),Jc.set(this,void 0),Zn.set(this,void 0),cn.set(this,void 0),Xc.set(this,pe.Empty),d_.set(this,n=>n.match({none:()=>{je(this,cn,"f").clear(),je(this,Zn,"f").clear()},some:i=>i.soundfont.match({none:()=>{je(this,cn,"f").clear(),je(this,Zn,"f").clear(),je(this,Xc,"f").terminate(),os(this,Xc,i.subscribe(a=>{if(a.type==="loaded"){let o=i.soundfont.unwrap("soundfont");je(this,cn,"f").wrap(o.presets[this.presetIndex]??o.presets[0]),je(this,Zn,"f").wrap(o)}else a.type==="error"?(je(this,cn,"f").clear(),je(this,Zn,"f").clear()):a.type==="idle"&&(je(this,cn,"f").clear(),je(this,Zn,"f").clear())}),"f")},some:a=>{je(this,Zn,"f").wrap(a),je(this,cn,"f").wrap(a.presets[this.presetIndex]??a.presets[0])}})})),os(this,Kf,e,"f"),os(this,hi,r,"f"),os(this,kx,new de(je(this,Kf,"f")),"f"),this.namedParameter=je(this,u_,"m",BP).call(this,r),os(this,Jc,new wr,"f"),os(this,Zn,new wr,"f"),os(this,cn,new wr,"f"),je(this,c_,"f").ownAll(je(this,Jc,"f").subscribe(je(this,d_,"f")),je(this,hi,"f").file.catchupAndSubscribe(({targetVertex:n})=>je(this,Jc,"f").wrapOption(n.map(({box:i})=>e.soundfontManager.getOrCreate(i.address.uuid)))),je(this,hi,"f").presetIndex.catchupAndSubscribe(n=>je(this,Zn,"f").match({none:()=>je(this,cn,"f").clear(),some:i=>je(this,cn,"f").wrap(i.presets[n.getValue()]??i.presets[0])})))}get loader(){return je(this,Jc,"f")}get soundfont(){return je(this,Zn,"f")}get preset(){return je(this,cn,"f")}get presetIndex(){return je(this,hi,"f").presetIndex.getValue()}get box(){return je(this,hi,"f")}get uuid(){return je(this,hi,"f").address.uuid}get address(){return je(this,hi,"f").address}get labelField(){return je(this,hi,"f").label}get iconField(){return je(this,hi,"f").icon}get defaultTrackType(){return ve.Notes}get enabledField(){return je(this,hi,"f").enabled}get minimizedField(){return je(this,hi,"f").minimized}get acceptsMidiEvents(){return!0}deviceHost(){return je(this,Kf,"f").boxAdapters.adapterFor(je(this,hi,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){je(this,Xc,"f").terminate(),os(this,Xc,pe.Empty,"f"),je(this,kx,"f").terminate()}};c_=new WeakMap,Kf=new WeakMap,hi=new WeakMap,kx=new WeakMap,Jc=new WeakMap,Zn=new WeakMap,cn=new WeakMap,Xc=new WeakMap,d_=new WeakMap,u_=new WeakSet,BP=function(e){return{}};var TP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Wf=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Mx,Tl,Ix=class{constructor(e,r){Mx.set(this,void 0),Tl.set(this,void 0),TP(this,Mx,e,"f"),TP(this,Tl,r,"f")}get box(){return Wf(this,Tl,"f")}get uuid(){return Wf(this,Tl,"f").address.uuid}get address(){return Wf(this,Tl,"f").address}get soundfont(){return this.getOrCreateLoader().soundfont}getOrCreateLoader(){return Wf(this,Mx,"f").soundfontManager.getOrCreate(Wf(this,Tl,"f").address.uuid)}terminate(){}};Mx=new WeakMap,Tl=new WeakMap;var p_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},gi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},f_,Lf,dn,Zf,DP,Bx=class{constructor(e,r){f_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Maximizer,Lf.set(this,void 0),dn.set(this,void 0),Zf.set(this,void 0),p_(this,Lf,e,"f"),p_(this,dn,r,"f"),p_(this,Zf,new de(gi(this,Lf,"f")),"f"),this.namedParameter=gi(this,f_,"m",DP).call(this,r)}get box(){return gi(this,dn,"f")}get uuid(){return gi(this,dn,"f").address.uuid}get address(){return gi(this,dn,"f").address}get indexField(){return gi(this,dn,"f").index}get labelField(){return gi(this,dn,"f").label}get enabledField(){return gi(this,dn,"f").enabled}get minimizedField(){return gi(this,dn,"f").minimized}get host(){return gi(this,dn,"f").host}deviceHost(){return gi(this,Lf,"f").boxAdapters.adapterFor(gi(this,dn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){gi(this,Zf,"f").terminate()}};Lf=new WeakMap,dn=new WeakMap,Zf=new WeakMap,f_=new WeakSet,DP=function(e){return{threshold:gi(this,Zf,"f").createParameter(e.threshold,S.linear(-24,0),$.decible,"Threshold")}};var m_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},wt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},h_,Gf,zi,zr,RP,Tx=class{constructor(e,r){h_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Compressor,Gf.set(this,void 0),zi.set(this,void 0),zr.set(this,void 0),m_(this,Gf,e,"f"),m_(this,zi,r,"f"),m_(this,zr,new de(wt(this,Gf,"f")),"f"),this.namedParameter=wt(this,h_,"m",RP).call(this,r)}get box(){return wt(this,zi,"f")}get uuid(){return wt(this,zi,"f").address.uuid}get address(){return wt(this,zi,"f").address}get indexField(){return wt(this,zi,"f").index}get labelField(){return wt(this,zi,"f").label}get enabledField(){return wt(this,zi,"f").enabled}get minimizedField(){return wt(this,zi,"f").minimized}get host(){return wt(this,zi,"f").host}get sideChain(){return wt(this,zi,"f").sideChain}deviceHost(){return wt(this,Gf,"f").boxAdapters.adapterFor(wt(this,zi,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){wt(this,zr,"f").terminate()}};Gf=new WeakMap,zi=new WeakMap,zr=new WeakMap,h_=new WeakSet,RP=function(e){return{lookahead:wt(this,zr,"f").createParameter(e.lookahead,S.bool,$.bool,"Lookahead"),automakeup:wt(this,zr,"f").createParameter(e.automakeup,S.bool,$.bool,"Auto Makeup"),autoattack:wt(this,zr,"f").createParameter(e.autoattack,S.bool,$.bool,"Auto Attack"),autorelease:wt(this,zr,"f").createParameter(e.autorelease,S.bool,$.bool,"Auto Release"),inputgain:wt(this,zr,"f").createParameter(e.inputgain,S.linear(-30,30),$.decible,"Input Gain"),threshold:wt(this,zr,"f").createParameter(e.threshold,S.linear(-60,0),$.decible,"Threshold"),ratio:wt(this,zr,"f").createParameter(e.ratio,S.exponential(1,24),$.numeric({fractionDigits:1}),"Ratio"),knee:wt(this,zr,"f").createParameter(e.knee,S.linear(0,24),$.decible,"Knee"),attack:wt(this,zr,"f").createParameter(e.attack,S.linear(0,100),$.numeric({unit:"ms",fractionDigits:1}),"Attack Time"),release:wt(this,zr,"f").createParameter(e.release,S.linear(5,1500),$.numeric({unit:"ms",fractionDigits:1}),"Release Time"),makeup:wt(this,zr,"f").createParameter(e.makeup,S.linear(-40,40),$.decible,"Makeup Gain"),mix:wt(this,zr,"f").createParameter(e.mix,S.unipolar(),$.percent(),"Dry/Wet")}};var g_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Zt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},v_,Hf,Oi,Gn,CP,Dx=class{constructor(e,r){v_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Gate,Hf.set(this,void 0),Oi.set(this,void 0),Gn.set(this,void 0),g_(this,Hf,e,"f"),g_(this,Oi,r,"f"),g_(this,Gn,new de(Zt(this,Hf,"f")),"f"),this.namedParameter=Zt(this,v_,"m",CP).call(this,r)}get box(){return Zt(this,Oi,"f")}get uuid(){return Zt(this,Oi,"f").address.uuid}get address(){return Zt(this,Oi,"f").address}get indexField(){return Zt(this,Oi,"f").index}get labelField(){return Zt(this,Oi,"f").label}get enabledField(){return Zt(this,Oi,"f").enabled}get minimizedField(){return Zt(this,Oi,"f").minimized}get host(){return Zt(this,Oi,"f").host}get sideChain(){return Zt(this,Oi,"f").sideChain}deviceHost(){return Zt(this,Hf,"f").boxAdapters.adapterFor(Zt(this,Oi,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Zt(this,Gn,"f").terminate()}};Hf=new WeakMap,Oi=new WeakMap,Gn=new WeakMap,v_=new WeakSet,CP=function(e){return{inverse:Zt(this,Gn,"f").createParameter(e.inverse,S.bool,$.bool,"Inverse"),threshold:Zt(this,Gn,"f").createParameter(e.threshold,S.linear(-80,0),$.decible,"Threshold"),return:Zt(this,Gn,"f").createParameter(e.return,S.linear(0,24),$.decible,"Return"),attack:Zt(this,Gn,"f").createParameter(e.attack,S.linear(0,1e3),$.numeric({unit:"ms",fractionDigits:1}),"Attack"),hold:Zt(this,Gn,"f").createParameter(e.hold,S.linear(0,500),$.numeric({unit:"ms",fractionDigits:1}),"Hold"),release:Zt(this,Gn,"f").createParameter(e.release,S.linear(1,2e3),$.numeric({unit:"ms",fractionDigits:1}),"Release"),floor:Zt(this,Gn,"f").createParameter(e.floor,S.decibel(-72,-12,0),$.decible,"Floor")}};var x_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Sr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},y_,qf,pn,ss,zP,Rx=class{constructor(e,r){y_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Crusher,qf.set(this,void 0),pn.set(this,void 0),ss.set(this,void 0),x_(this,qf,e,"f"),x_(this,pn,r,"f"),x_(this,ss,new de(Sr(this,qf,"f")),"f"),this.namedParameter=Sr(this,y_,"m",zP).call(this,r)}get box(){return Sr(this,pn,"f")}get uuid(){return Sr(this,pn,"f").address.uuid}get address(){return Sr(this,pn,"f").address}get indexField(){return Sr(this,pn,"f").index}get labelField(){return Sr(this,pn,"f").label}get enabledField(){return Sr(this,pn,"f").enabled}get minimizedField(){return Sr(this,pn,"f").minimized}get host(){return Sr(this,pn,"f").host}deviceHost(){return Sr(this,qf,"f").boxAdapters.adapterFor(Sr(this,pn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Sr(this,ss,"f").terminate()}};qf=new WeakMap,pn=new WeakMap,ss=new WeakMap,y_=new WeakSet,zP=function(e){return{crush:Sr(this,ss,"f").createParameter(e.crush,S.unipolar(),$.percent(),"Crush"),bits:Sr(this,ss,"f").createParameter(e.bits,S.linearInteger(1,16),$.numeric(),"Bits"),boost:Sr(this,ss,"f").createParameter(e.boost,S.linear(0,24),$.decible,"Boost"),mix:Sr(this,ss,"f").createParameter(e.mix,S.exponential(.001,1),$.percent(),"Mix")}};var w_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Jr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},b_,Jf,fn,Yc,OP,Cx=class{constructor(e,r){b_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Fold,Jf.set(this,void 0),fn.set(this,void 0),Yc.set(this,void 0),w_(this,Jf,e,"f"),w_(this,fn,r,"f"),w_(this,Yc,new de(Jr(this,Jf,"f")),"f"),this.namedParameter=Jr(this,b_,"m",OP).call(this,r)}get box(){return Jr(this,fn,"f")}get uuid(){return Jr(this,fn,"f").address.uuid}get address(){return Jr(this,fn,"f").address}get indexField(){return Jr(this,fn,"f").index}get labelField(){return Jr(this,fn,"f").label}get enabledField(){return Jr(this,fn,"f").enabled}get minimizedField(){return Jr(this,fn,"f").minimized}get host(){return Jr(this,fn,"f").host}deviceHost(){return Jr(this,Jf,"f").boxAdapters.adapterFor(Jr(this,fn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Jr(this,Yc,"f").terminate()}};Jf=new WeakMap,fn=new WeakMap,Yc=new WeakMap,b_=new WeakSet,OP=function(e){return{drive:Jr(this,Yc,"f").createParameter(e.drive,S.linear(0,30),$.decible,"Drive"),volume:Jr(this,Yc,"f").createParameter(e.volume,S.linear(-18,0),$.decible,"Volume")}};var zx=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},or=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Xf,Yf,mn,Qc,ed,Ox=class{constructor(e,r){Xf.set(this,new Y),this.type="instrument",this.accepts="midi",this.manualUrl=oe.MIDIOutput,Yf.set(this,void 0),mn.set(this,void 0),Qc.set(this,void 0),ed.set(this,void 0),zx(this,Yf,e,"f"),zx(this,mn,r,"f"),zx(this,Qc,new wr,"f"),zx(this,ed,or(this,Xf,"f").own(new de(or(this,Yf,"f"))),"f"),or(this,Xf,"f").ownAll(r.parameters.pointerHub.catchupAndSubscribe({onAdded:(({box:n})=>or(this,ed,"f").createParameter(Ie(n,Cs).value,S.unipolar(),$.percent({fractionDigits:1}),"",0)),onRemoved:(({box:n})=>or(this,ed,"f").removeParameter(Ie(n,Cs).value.address))}),or(this,mn,"f").device.catchupAndSubscribe(({targetVertex:n})=>n.match({none:()=>or(this,Qc,"f").clear(),some:({box:i})=>or(this,Qc,"f").wrap(Ie(i,Po))})))}get box(){return or(this,mn,"f")}get uuid(){return or(this,mn,"f").address.uuid}get address(){return or(this,mn,"f").address}get labelField(){return or(this,mn,"f").label}get iconField(){return or(this,mn,"f").icon}get defaultTrackType(){return ve.Notes}get enabledField(){return or(this,mn,"f").enabled}get minimizedField(){return or(this,mn,"f").minimized}get acceptsMidiEvents(){return!0}get parameters(){return or(this,ed,"f")}get midiDevice(){return or(this,Qc,"f")}deviceHost(){return or(this,Yf,"f").boxAdapters.adapterFor(or(this,mn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){or(this,Xf,"f").terminate()}};Xf=new WeakMap,Yf=new WeakMap,mn=new WeakMap,Qc=new WeakMap,ed=new WeakMap;var Ux=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Gt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},__,Qf,hn,$a,em,UP,Vx=class{constructor(e,r){__.add(this),this.type="midi-effect",this.accepts="midi",this.manualUrl=oe.Velocity,Qf.set(this,void 0),hn.set(this,void 0),$a.set(this,void 0),em.set(this,void 0),Ux(this,Qf,e,"f"),Ux(this,hn,r,"f"),Ux(this,$a,new de(Gt(this,Qf,"f")),"f"),Ux(this,em,dh.create(),"f"),this.namedParameter=Gt(this,__,"m",UP).call(this,r)}computeVelocity(e,r){let{magnetPosition:n,magnetStrength:i,randomSeed:a,randomAmount:o,offset:s,mix:u}=this.namedParameter;Gt(this,em,"f").setSeed(a.valueAt(e)+e);let d=r+(n.valueAt(e)-r)*i.valueAt(e),m=(Gt(this,em,"f").uniform()*2-1)*o.valueAt(e),x=s.valueAt(e),h=u.valueAt(e);return r*(1-h)+FS(d+m+x)*h}get box(){return Gt(this,hn,"f")}get uuid(){return Gt(this,hn,"f").address.uuid}get address(){return Gt(this,hn,"f").address}get indexField(){return Gt(this,hn,"f").index}get labelField(){return Gt(this,hn,"f").label}get enabledField(){return Gt(this,hn,"f").enabled}get minimizedField(){return Gt(this,hn,"f").minimized}get host(){return Gt(this,hn,"f").host}deviceHost(){return Gt(this,Qf,"f").boxAdapters.adapterFor(Gt(this,hn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}terminate(){Gt(this,$a,"f").terminate()}};Qf=new WeakMap,hn=new WeakMap,$a=new WeakMap,em=new WeakMap,__=new WeakSet,UP=function(e){return{magnetPosition:Gt(this,$a,"f").createParameter(e.magnetPosition,S.unipolar(),$.percent(),"Position"),magnetStrength:Gt(this,$a,"f").createParameter(e.magnetStrength,S.unipolar(),$.percent(),"Strength"),randomSeed:Gt(this,$a,"f").createParameter(e.randomSeed,S.linearInteger(0,65535),$.numeric({unit:"",fractionDigits:0}),"Seed"),randomAmount:Gt(this,$a,"f").createParameter(e.randomAmount,S.unipolar(),$.percent(),"Amount"),offset:Gt(this,$a,"f").createParameter(e.offset,S.bipolar(),$.percent(),"Offset"),mix:Gt(this,$a,"f").createParameter(e.mix,S.unipolar(),$.percent(),"Mix")}};var A_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},mr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},F_,E_,tm,gn,ka,VP,Dl=class{constructor(e,r){F_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Tidal,tm.set(this,void 0),gn.set(this,void 0),ka.set(this,void 0),A_(this,tm,e,"f"),A_(this,gn,r,"f"),A_(this,ka,new de(mr(this,tm,"f")),"f"),this.namedParameter=mr(this,F_,"m",VP).call(this,r)}get box(){return mr(this,gn,"f")}get uuid(){return mr(this,gn,"f").address.uuid}get address(){return mr(this,gn,"f").address}get indexField(){return mr(this,gn,"f").index}get labelField(){return mr(this,gn,"f").label}get enabledField(){return mr(this,gn,"f").enabled}get minimizedField(){return mr(this,gn,"f").minimized}get host(){return mr(this,gn,"f").host}deviceHost(){return mr(this,tm,"f").boxAdapters.adapterFor(mr(this,gn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){mr(this,ka,"f").terminate()}};E_=Dl,tm=new WeakMap,gn=new WeakMap,ka=new WeakMap,F_=new WeakSet,VP=function(e){let{RateFractions:r,RateStringMapping:n}=E_;return{slope:mr(this,ka,"f").createParameter(e.slope,S.bipolar(),$.percent({fractionDigits:1}),"Slope",.5),symmetry:mr(this,ka,"f").createParameter(e.symmetry,S.unipolar(),$.percent({fractionDigits:1,bipolar:!0}),"Symmetry",.5),rate:mr(this,ka,"f").createParameter(e.rate,S.values(r.map((i,a)=>a)),n,"Rate",0),depth:mr(this,ka,"f").createParameter(e.depth,S.unipolar(),$.percent({fractionDigits:1}),"Depth",0),offset:mr(this,ka,"f").createParameter(e.offset,S.linear(-180,180),$.numeric({unit:"\xB0",fractionDigits:0}),"Offset",.5),channelOffset:mr(this,ka,"f").createParameter(e.channelOffset,S.linear(-180,180),$.numeric({unit:"\xB0",fractionDigits:0}),"Ch. Offset",.5)}};Dl.RateFractions=vo.builder().add([1,1]).add([1,2]).add([1,3]).add([1,4]).add([3,16]).add([1,6]).add([1,8]).add([3,32]).add([1,12]).add([1,16]).add([3,64]).add([1,24]).add([1,32]).add([1,48]).add([1,64]).add([1,96]).add([1,128]).asDescendingArray();Dl.RateStringMapping=$.indices("",E_.RateFractions.map(([t,e])=>`${t}/${e}`));var S_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},bt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},P_,rm,Xr,vi,jP,jx=class{constructor(e,r){P_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Vocoder,rm.set(this,void 0),Xr.set(this,void 0),vi.set(this,void 0),S_(this,rm,e,"f"),S_(this,Xr,r,"f"),S_(this,vi,new de(bt(this,rm,"f")),"f"),this.namedParameter=bt(this,P_,"m",jP).call(this,r)}get box(){return bt(this,Xr,"f")}get uuid(){return bt(this,Xr,"f").address.uuid}get address(){return bt(this,Xr,"f").address}get indexField(){return bt(this,Xr,"f").index}get labelField(){return bt(this,Xr,"f").label}get enabledField(){return bt(this,Xr,"f").enabled}get minimizedField(){return bt(this,Xr,"f").minimized}get host(){return bt(this,Xr,"f").host}get sideChain(){return bt(this,Xr,"f").sideChain}get modulatorSpectrum(){return bt(this,Xr,"f").address.append(4094)}get carrierSpectrum(){return bt(this,Xr,"f").address.append(4095)}deviceHost(){return bt(this,rm,"f").boxAdapters.adapterFor(bt(this,Xr,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){bt(this,vi,"f").terminate()}};rm=new WeakMap,Xr=new WeakMap,vi=new WeakMap,P_=new WeakSet,jP=function(e){let r=S.exponential(20,2e4),n=$.numeric({unit:"Hz",fractionDigits:0}),i=S.exponential(1,60),a=$.numeric({fractionDigits:1});return{carrierMinFreq:bt(this,vi,"f").createParameter(e.carrierMinFreq,r,n,"Carrier Min"),carrierMaxFreq:bt(this,vi,"f").createParameter(e.carrierMaxFreq,r,n,"Carrier Max"),modulatorMinFreq:bt(this,vi,"f").createParameter(e.modulatorMinFreq,r,n,"Mod Min"),modulatorMaxFreq:bt(this,vi,"f").createParameter(e.modulatorMaxFreq,r,n,"Mod Max"),qMin:bt(this,vi,"f").createParameter(e.qMin,i,a,"Q Min"),qMax:bt(this,vi,"f").createParameter(e.qMax,i,a,"Q Max"),envAttack:bt(this,vi,"f").createParameter(e.envAttack,S.exponential(.1,100),$.numeric({unit:"ms",fractionDigits:1}),"Attack"),envRelease:bt(this,vi,"f").createParameter(e.envRelease,S.exponential(1,1e3),$.numeric({unit:"ms",fractionDigits:0}),"Release"),gain:bt(this,vi,"f").createParameter(e.gain,S.linear(-20,20),$.decible,"Gain"),mix:bt(this,vi,"f").createParameter(e.mix,S.unipolar(),$.percent(),"Mix")}};var $_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Et=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},k_,im,vn,Or,KP,Kx=class{constructor(e,r){k_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.DattorroReverb,im.set(this,void 0),vn.set(this,void 0),Or.set(this,void 0),$_(this,im,e,"f"),$_(this,vn,r,"f"),$_(this,Or,new de(Et(this,im,"f")),"f"),this.namedParameter=Et(this,k_,"m",KP).call(this,r)}get box(){return Et(this,vn,"f")}get uuid(){return Et(this,vn,"f").address.uuid}get address(){return Et(this,vn,"f").address}get indexField(){return Et(this,vn,"f").index}get labelField(){return Et(this,vn,"f").label}get enabledField(){return Et(this,vn,"f").enabled}get minimizedField(){return Et(this,vn,"f").minimized}get host(){return Et(this,vn,"f").host}deviceHost(){return Et(this,im,"f").boxAdapters.adapterFor(Et(this,vn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Et(this,Or,"f").terminate()}};im=new WeakMap,vn=new WeakMap,Or=new WeakMap,k_=new WeakSet,KP=function(e){return{preDelay:Et(this,Or,"f").createParameter(e.preDelay,S.linear(0,1e3),$.numeric({unit:e.preDelay.unit}),"Pre-Delay"),bandwidth:Et(this,Or,"f").createParameter(e.bandwidth,S.unipolar(),$.percent(),"Bandwidth"),inputDiffusion1:Et(this,Or,"f").createParameter(e.inputDiffusion1,S.unipolar(),$.percent(),"Tank 1"),inputDiffusion2:Et(this,Or,"f").createParameter(e.inputDiffusion2,S.unipolar(),$.percent(),"Tank 2"),decay:Et(this,Or,"f").createParameter(e.decay,S.unipolar(),$.percent(),"Decay"),decayDiffusion1:Et(this,Or,"f").createParameter(e.decayDiffusion1,S.unipolar(),$.percent(),"Tank 1"),decayDiffusion2:Et(this,Or,"f").createParameter(e.decayDiffusion2,S.unipolar(),$.percent(),"Tank 2"),damping:Et(this,Or,"f").createParameter(e.damping,S.unipolar(),$.percent(),"Damping"),excursionRate:Et(this,Or,"f").createParameter(e.excursionRate,S.unipolar(),$.numeric({unit:e.excursionRate.unit}),"Rate"),excursionDepth:Et(this,Or,"f").createParameter(e.excursionDepth,S.unipolar(),$.numeric({unit:e.excursionDepth.unit}),"Depth"),wet:Et(this,Or,"f").createParameter(e.wet,S.DefaultDecibel,$.decible,"Wet"),dry:Et(this,Or,"f").createParameter(e.dry,S.DefaultDecibel,$.decible,"Dry")}};var WP=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},td=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},N_,so,rd=class{constructor(e,r){N_.set(this,void 0),so.set(this,void 0),WP(this,N_,e,"f"),WP(this,so,r,"f")}get box(){return td(this,so,"f")}get uuid(){return td(this,so,"f").address.uuid}get address(){return td(this,so,"f").address}get labelField(){return td(this,so,"f").label}get modelField(){return td(this,so,"f").model}getModelJson(){return td(this,so,"f").model.getValue()}terminate(){}};N_=new WeakMap,so=new WeakMap;var M_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Vt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},I_,id,Pr,Rl,LP,Wx=class{constructor(e,r){I_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.NeuralAmp,id.set(this,void 0),Pr.set(this,void 0),Rl.set(this,void 0),M_(this,id,e,"f"),M_(this,Pr,r,"f"),M_(this,Rl,new de(Vt(this,id,"f")),"f"),this.namedParameter=Vt(this,I_,"m",LP).call(this,r)}get box(){return Vt(this,Pr,"f")}get uuid(){return Vt(this,Pr,"f").address.uuid}get address(){return Vt(this,Pr,"f").address}get indexField(){return Vt(this,Pr,"f").index}get labelField(){return Vt(this,Pr,"f").label}get enabledField(){return Vt(this,Pr,"f").enabled}get minimizedField(){return Vt(this,Pr,"f").minimized}get host(){return Vt(this,Pr,"f").host}get modelField(){return Vt(this,Pr,"f").model}get monoField(){return Vt(this,Pr,"f").mono}get spectrum(){return Vt(this,Pr,"f").address.append(4095)}getModelAdapter(){let e=Vt(this,Pr,"f").model.targetVertex;return e.isEmpty()?b.None:b.wrap(Vt(this,id,"f").boxAdapters.adapterFor(e.unwrap().box,rd))}getModelJson(){let e=this.getModelAdapter();return e.nonEmpty()?e.unwrap().getModelJson():Vt(this,Pr,"f").modelJson.getValue()}deviceHost(){return Vt(this,id,"f").boxAdapters.adapterFor(Vt(this,Pr,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Vt(this,Rl,"f").terminate()}};id=new WeakMap,Pr=new WeakMap,Rl=new WeakMap,I_=new WeakSet,LP=function(e){return{inputGain:Vt(this,Rl,"f").createParameter(e.inputGain,S.decibel(-72,0,12),$.numeric({unit:"dB",fractionDigits:1}),"input"),outputGain:Vt(this,Rl,"f").createParameter(e.outputGain,S.decibel(-72,0,12),$.numeric({unit:"dB",fractionDigits:1}),"output"),mix:Vt(this,Rl,"f").createParameter(e.mix,S.linear(0,1),$.percent(),"Mix")}};var B_=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ur=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},T_,nm,xn,Cl,ZP,Lx=class{constructor(e,r){T_.add(this),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Waveshaper,nm.set(this,void 0),xn.set(this,void 0),Cl.set(this,void 0),B_(this,nm,e,"f"),B_(this,xn,r,"f"),B_(this,Cl,new de(Ur(this,nm,"f")),"f"),this.namedParameter=Ur(this,T_,"m",ZP).call(this,r)}get box(){return Ur(this,xn,"f")}get uuid(){return Ur(this,xn,"f").address.uuid}get address(){return Ur(this,xn,"f").address}get indexField(){return Ur(this,xn,"f").index}get labelField(){return Ur(this,xn,"f").label}get enabledField(){return Ur(this,xn,"f").enabled}get minimizedField(){return Ur(this,xn,"f").minimized}get host(){return Ur(this,xn,"f").host}deviceHost(){return Ur(this,nm,"f").boxAdapters.adapterFor(Ur(this,xn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){Ur(this,Cl,"f").terminate()}};nm=new WeakMap,xn=new WeakMap,Cl=new WeakMap,T_=new WeakSet,ZP=function(e){return{inputGain:Ur(this,Cl,"f").createParameter(e.inputGain,S.linear(0,40),$.decible,"Input"),outputGain:Ur(this,Cl,"f").createParameter(e.outputGain,S.linear(-24,24),$.decible,"Output"),mix:Ur(this,Cl,"f").createParameter(e.mix,S.unipolar(),$.percent(),"Mix")}};var Zx=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},$r=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},am,om,yn,sm,Gx,Hx=class{constructor(e,r){am.set(this,new Y),this.type="audio-effect",this.accepts="audio",this.manualUrl=oe.Werkstatt,om.set(this,void 0),yn.set(this,void 0),sm.set(this,void 0),Gx.set(this,void 0),Zx(this,om,e,"f"),Zx(this,yn,r,"f"),Zx(this,sm,$r(this,am,"f").own(new de($r(this,om,"f"))),"f");let{terminable:n,codeChanged:i}=xr.subscribeScriptParams($r(this,sm,"f"),r.code,r.parameters);$r(this,am,"f").own(n),Zx(this,Gx,i,"f")}get box(){return $r(this,yn,"f")}get uuid(){return $r(this,yn,"f").address.uuid}get address(){return $r(this,yn,"f").address}get indexField(){return $r(this,yn,"f").index}get labelField(){return $r(this,yn,"f").label}get enabledField(){return $r(this,yn,"f").enabled}get minimizedField(){return $r(this,yn,"f").minimized}get host(){return $r(this,yn,"f").host}get parameters(){return $r(this,sm,"f")}get codeChanged(){return $r(this,Gx,"f")}deviceHost(){return $r(this,om,"f").boxAdapters.adapterFor($r(this,yn,"f").host.targetVertex.unwrap("no device-host").box,ae.isHost)}audioUnitBoxAdapter(){return this.deviceHost().audioUnitBoxAdapter()}*labeledAudioOutputs(){yield{address:this.address,label:this.labelField.getValue(),children:()=>b.None}}terminate(){$r(this,am,"f").terminate()}};am=new WeakMap,om=new WeakMap,yn=new WeakMap,sm=new WeakMap,Gx=new WeakMap;var ce=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},yB,le,wB,bB,_B,AB;le=new WeakMap,wB=new WeakMap,bB=new WeakMap,_B=new WeakMap,yB=new WeakSet,AB=function(e){return Ce(e.accept({visitArpeggioDeviceBox:r=>new Nl(ce(this,le,"f"),r),visitAudioBusBox:r=>new Ei(ce(this,le,"f"),r),visitAudioClipBox:r=>new Ku(ce(this,le,"f"),r),visitAudioFileBox:r=>new kn(ce(this,le,"f"),r),visitAudioTimeStretchBox:r=>new pa(ce(this,le,"f"),r),visitAudioPitchStretchBox:r=>new da(ce(this,le,"f"),r),visitTransientMarkerBox:r=>new Du(r),visitWarpMarkerBox:r=>new Do(ce(this,le,"f"),r),visitApparatDeviceBox:r=>new xx(ce(this,le,"f"),r),visitAudioRegionBox:r=>new ac(ce(this,le,"f"),r),visitAudioUnitBox:r=>new Yi(ce(this,le,"f"),r),visitAuxSendBox:r=>new xc(ce(this,le,"f"),r),visitMaximizerDeviceBox:r=>new Bx(ce(this,le,"f"),r),visitCompressorDeviceBox:r=>new Tx(ce(this,le,"f"),r),visitGateDeviceBox:r=>new Dx(ce(this,le,"f"),r),visitCrusherDeviceBox:r=>new Rx(ce(this,le,"f"),r),visitDattorroReverbDeviceBox:r=>new Kx(ce(this,le,"f"),r),visitDelayDeviceBox:r=>new Cn(ce(this,le,"f"),r),visitDeviceInterfaceKnobBox:r=>new Ic(ce(this,le,"f"),r),visitTidalDeviceBox:r=>new Dl(ce(this,le,"f"),r),visitFoldDeviceBox:r=>new Cx(ce(this,le,"f"),r),visitGrooveShuffleBox:r=>new Aa(ce(this,le,"f"),r),visitMarkerBox:r=>new Ho(ce(this,le,"f"),r),visitSignatureEventBox:r=>new xl(ce(this,le,"f"),r),visitMIDIOutputDeviceBox:r=>new Ox(ce(this,le,"f"),r),visitModularAudioInputBox:r=>new Nc(ce(this,le,"f"),r),visitModularAudioOutputBox:r=>new Pc(ce(this,le,"f"),r),visitModularBox:r=>new Qo(ce(this,le,"f"),r),visitModularDeviceBox:r=>new Tc(ce(this,le,"f"),r),visitModuleConnectionBox:r=>new Yo(ce(this,le,"f"),r),visitModuleDelayBox:r=>new Sc(ce(this,le,"f"),r),visitModuleGainBox:r=>new $c(ce(this,le,"f"),r),visitModuleMultiplierBox:r=>new kc(ce(this,le,"f"),r),visitNanoDeviceBox:r=>new yx(ce(this,le,"f"),r),visitNeuralAmpDeviceBox:r=>new Wx(ce(this,le,"f"),r),visitNeuralAmpModelBox:r=>new rd(ce(this,le,"f"),r),visitNoteClipBox:r=>new Gu(ce(this,le,"f"),r),visitNoteEventBox:r=>new Ys(ce(this,le,"f"),r),visitNoteEventCollectionBox:r=>new Gi(ce(this,le,"f"),r),visitNoteRegionBox:r=>new sc(ce(this,le,"f"),r),visitPitchDeviceBox:r=>new px(ce(this,le,"f"),r),visitPlayfieldDeviceBox:r=>new Zc(ce(this,le,"f"),r),visitPlayfieldSampleBox:r=>new Lc(ce(this,le,"f"),r),visitRevampDeviceBox:r=>new Fv(ce(this,le,"f"),r),visitReverbDeviceBox:r=>new Av(ce(this,le,"f"),r),visitRootBox:r=>new lx(ce(this,le,"f"),r),visitSoundfontDeviceBox:r=>new Nx(ce(this,le,"f"),r),visitSoundfontFileBox:r=>new Ix(ce(this,le,"f"),r),visitSpielwerkDeviceBox:r=>new hx(ce(this,le,"f"),r),visitStereoToolDeviceBox:r=>new Ax(ce(this,le,"f"),r),visitTapeDeviceBox:r=>new ux(ce(this,le,"f"),r),visitTimelineBox:r=>new ba(ce(this,le,"f"),r),visitTrackBox:r=>new er(ce(this,le,"f"),r),visitUnknownAudioEffectDeviceBox:r=>new Sx(ce(this,le,"f"),r),visitUnknownMidiEffectDeviceBox:r=>new $x(ce(this,le,"f"),r),visitValueClipBox:r=>new To(ce(this,le,"f"),r),visitValueEventBox:r=>new Za(ce(this,le,"f"),r),visitValueEventCollectionBox:r=>new _r(ce(this,le,"f"),r),visitValueRegionBox:r=>new Qa(ce(this,le,"f"),r),visitVaporisateurDeviceBox:r=>new cx(ce(this,le,"f"),r),visitVocoderDeviceBox:r=>new jx(ce(this,le,"f"),r),visitWaveshaperDeviceBox:r=>new Lx(ce(this,le,"f"),r),visitWerkstattDeviceBox:r=>new Hx(ce(this,le,"f"),r),visitVelocityDeviceBox:r=>new Vx(ce(this,le,"f"),r),visitZeitgeistDeviceBox:r=>new Fx(ce(this,le,"f"),r)}),`Could not find factory for ${e}`)};var nd;(function(t){t.PEAKS=Oe.compose(M.Lowest).append(0),t.SPECTRUM=Oe.compose(M.Lowest).append(1),t.WAVEFORM=Oe.compose(M.Lowest).append(2)})(nd||(nd={}));var GP;(function(t){t.countStems=e=>e.match({none:()=>1,some:r=>W(r.stems)?Object.keys(r.stems).length:1}),t.sanitizeFileName=e=>e.replace(/[<>:"/\\|?*\x00-\x1F]/g,"_").trim(),t.sanitizeExportNamesInPlace=e=>{if(!W(e.stems))return;let r=e.stems,n=new Map,i=a=>{let o=n.get(a)??0,s=a;for(;n.has(s);)o++,s=`${a} ${o}`;return n.set(a,o),n.set(s,1),s};Object.keys(r).forEach(a=>{let o=r[a];o.fileName=i(t.sanitizeFileName(o.fileName))})}})(GP||(GP={}));var qx=512,HP=bi.createBuilder({position:bi.float,bpm:bi.float,playbackTimestamp:bi.float,countInBeatsRemaining:bi.float,isPlaying:bi.bool,isCountingIn:bi.bool,isRecording:bi.bool,perfIndex:bi.int32,perfBuffer:bi.floats(qx)});var qP;(function(t){t.store=(e,r,n)=>{if(n==="")return V("MetaData.store: origin must be unique to your app.");let i=e.pointerHub.filter(l.MetaData).map(({box:o})=>o).find(o=>o instanceof En&&o.origin.getValue()===n),a=o=>{o.target.refer(e),o.origin.setValue(n),o.value.setValue(JSON.stringify(r))};cb(i)?a(i):En.create(e.graph,M.generate(),a)},t.read=(e,r)=>{if(r==="")return V("MetaData.read: origin must be unique to your app.");let n=e.pointerHub.filter(l.MetaData).map(({box:i})=>i).find(i=>i instanceof En&&i.origin.getValue()===r);if(cb(n)){let{status:i,value:a,error:o}=Ct(()=>JSON.parse(n.value.getValue()));if(i==="success")return a;console.warn(o)}return null},t.clear=(e,r)=>{if(r==="")return V("MetaData.clear: origin must be unique to your app.");e.pointerHub.filter(l.MetaData).map(({box:n})=>n).filter(n=>n instanceof En&&n.origin.getValue()===r).forEach(n=>n.delete())},t.catchupAndSubscribe=(e,r,n)=>{if(r==="")return V("MetaData.catchupAndSubscribe: origin must be unique to your app.");let i=M.newSet(s=>s.uuid),a=s=>{let{status:u,value:d,error:m}=Ct(()=>JSON.parse(s.value.getValue()));u==="success"?n(b.wrap(d)):(console.warn(m),n(b.None))},o=e.pointerHub.catchupAndSubscribe({onAdded:({box:s})=>{if(!(s instanceof En)||s.origin.getValue()!==r)return;let u=s.value.catchupAndSubscribe(()=>a(s));i.add({uuid:s.address.uuid,subscription:u})},onRemoved:({box:s})=>{if(!(s instanceof En)||s.origin.getValue()!==r)return;i.removeByKey(s.address.uuid).subscription.terminate(),n(b.None)}},l.MetaData);return{terminate:()=>{o.terminate(),i.forEach(({subscription:s})=>s.terminate()),i.clear()}}}})(qP||(qP={}));var FB,EB,SB,PB;FB=new WeakMap,EB=new WeakMap,SB=new WeakMap,PB=new WeakMap;var ls;(function(t){let e;(function(r){r[r.NoteOn=144]="NoteOn",r[r.NoteOff=128]="NoteOff",r[r.PitchBend=224]="PitchBend",r[r.Controller=176]="Controller",r[r.Start=250]="Start",r[r.Continue=251]="Continue",r[r.Stop=252]="Stop",r[r.Clock=248]="Clock",r[r.Position=242]="Position"})(e=t.Command||(t.Command={})),t.readCommand=r=>r[0]&240,t.readChannel=r=>r[0]&15,t.readParam1=r=>r.length>1?r[1]&255:0,t.readParam2=r=>r.length>2?r[2]&255:0,t.readPitch=r=>r[1],t.readVelocity=r=>r[2]/127,t.isNoteOn=r=>t.readCommand(r)===e.NoteOn&&t.readVelocity(r)>0,t.isNoteOff=r=>t.readCommand(r)===e.NoteOff||t.readCommand(r)===e.NoteOn&&t.readVelocity(r)===0,t.isPitchWheel=r=>t.readCommand(r)===e.PitchBend,t.isController=r=>t.readCommand(r)===e.Controller,t.isClock=r=>r[0]===e.Clock,t.isStart=r=>r[0]===e.Start,t.isContinue=r=>r[0]===e.Continue,t.isStop=r=>r[0]===e.Stop,t.isPosition=r=>r[0]===e.Position,t.asPitchBend=r=>{let n=t.readParam1(r)&127,i=t.readParam2(r)&127,a=n|i<<7;return 8192>=a?a/8192-1:(a-8191)/8192},t.asValue=r=>{let n=t.readParam2(r);return n>64?.5+(n-63)/128:n<64?n/128:.5},t.Clock=new Uint8Array([e.Clock]),t.Start=new Uint8Array([e.Start]),t.Continue=new Uint8Array([e.Continue]),t.Stop=new Uint8Array([e.Stop]),t.noteOn=(r,n,i)=>new Uint8Array([e.NoteOn|r,n,i]),t.noteOff=(r,n)=>new Uint8Array([e.NoteOff|r,n,0]),t.control=(r,n,i)=>new Uint8Array([e.Controller|r,n&127,i&127]),t.position=(r,n)=>new Uint8Array([e.Position,r&127,n&127]),t.positionInPPQN=r=>{let n=Math.floor(r/96),i=n&127,a=n>>7&127;return new Uint8Array([e.Position,i,a])},t.accept=(r,n)=>{Yn(r)||(t.isNoteOn(r)?P(n.noteOn,t.readPitch(r),t.readVelocity(r)):t.isNoteOff(r)?P(n.noteOff,t.readPitch(r)):t.isPitchWheel(r)?P(n.pitchBend,t.asPitchBend(r)):t.isController(r)?P(n.controller,t.readParam1(r),t.readParam2(r)/127):t.isClock(r)?P(n.clock):t.isStart(r)?P(n.start):t.isContinue(r)?P(n.continue):t.isStop(r)?P(n.stop):t.isPosition(r)&&P(n.songPos,t.readParam1(r)|t.readParam2(r)<<7))},t.debug=r=>r===null?"null":t.isNoteOn(r)?`NoteOn #${t.readChannel(r)} ${t.readPitch(r)} : ${t.readVelocity(r).toFixed(2)}`:t.isNoteOff(r)?`NoteOff #${t.readChannel(r)} ${t.readPitch(r)}`:t.isPitchWheel(r)?`PitchWheel #${t.readChannel(r)} ${t.asPitchBend(r)}`:t.isController(r)?`Control #${t.readChannel(r)} ${t.asValue(r)}`:t.isClock(r)?"Clock":t.isStart(r)?"Start":t.isContinue(r)?"Continue":t.isStop(r)?"Stop":t.isPosition(r)?`SongPosition ${t.readParam1(r)|t.readParam2(r)<<7}`:"Unknown"})(ls||(ls={}));var lo;(function(t){t.on=(e,r,n)=>({type:"note-on",uuid:e,pitch:r,velocity:n}),t.off=(e,r)=>({type:"note-off",uuid:e,pitch:r}),t.audition=(e,r,n,i)=>({type:"note-audition",uuid:e,pitch:r,duration:n,velocity:i}),t.isOn=e=>e.type==="note-on",t.isOff=e=>e.type==="note-off",t.isAudition=e=>e.type==="note-audition",t.fromEvent=(e,r)=>{let n=e.data;if(ls.isNoteOn(n)){let i=ls.readPitch(n),a=ls.readVelocity(n);return{type:"note-on",uuid:r,pitch:i,velocity:a}}else if(ls.isNoteOff(n)){let i=ls.readPitch(n);return{type:"note-off",uuid:r,pitch:i}}return V("Unknown MIDI event")}})(lo||(lo={}));var JP;(function(t){t.start=(e,r,n,i=1)=>{let a=!0;return e(lo.on(r,n,i)),{terminate:()=>{a&&(e(lo.off(r,n)),a=!1)}}}})(JP||(JP={}));var XP=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},$B,kB,YP,QP,NB,MB;kB=new WeakMap,YP=new WeakMap,QP=new WeakMap,NB=new WeakMap,$B=new WeakSet,MB=function(e,r){return e.subscribeIntegers(r,n=>{XP(this,YP,"f").replace(n.buffer)&&XP(this,QP,"f").notify(this)})};var IB,BB,TB,DB,RB,CB;IB=new WeakMap,BB=new WeakMap,TB=new WeakMap,DB=new WeakMap,RB=new WeakMap,CB=new WeakMap;var Hn={isClipBox:t=>t.accept({visitNoteClipBox:e=>!0,visitAudioClipBox:e=>!0,visitValueClipBox:e=>!0})??!1,isRegionBox:t=>t.accept({visitNoteRegionBox:e=>!0,visitAudioRegionBox:e=>!0,visitValueRegionBox:e=>!0})??!1,asRegionBox:t=>t.accept({visitNoteRegionBox:e=>e,visitAudioRegionBox:e=>e,visitValueRegionBox:e=>e})??V("Could not cast to AnyRegionBox"),isLoopableRegionBox:t=>t.accept({visitNoteRegionBox:e=>!0,visitAudioRegionBox:e=>!0,visitValueRegionBox:e=>!0})??!1};var Jx={min:30,max:1e3,default:120};var Xx;(function(t){t.isTimeSignatureValid=(e,r)=>!Number.isInteger(e)||e<1||e>31?Nr.err("Numerator needs to be a interger between 1 and 31"):!Number.isInteger(r)||r<1||r>32||(r&r-1)!==0?Nr.err("Denominator must be a power of two between 1 and 32"):Nr.ok([e,r]),t.clampBpm=e=>Number.isFinite(e)?at(e,Jx.min,Jx.max):Jx.default,t.clampBaseFrequency=e=>Number.isFinite(e)?at(e,wv.min,wv.max):wv.default,t.hasOverlappingRegions=e=>e.boxes().some(r=>r.accept({visitTrackBox:n=>{for(let[i,a]of ue.iterateAdjacent(n.regions.pointerHub.incoming().map(({box:o})=>Hn.asRegionBox(o)).sort(({position:o},{position:s})=>o.getValue()-s.getValue()))){if(i instanceof Eo&&i.timeBase.getValue()===Kr.Seconds)return!1;if(i.position.getValue()+i.duration.getValue()>a.position.getValue())return!0}return!1}})??!1)})(Xx||(Xx={}));var e$;(function(t){t.parseTimeSignature=e=>{let[r,n]=e.split("/"),i=parseInt(r,10),a=parseInt(n,10);return Xx.isTimeSignatureValid(i,a)}})(e$||(e$={}));var t$;(function(t){t.reader=({sab:e,numChunks:r,numberOfChannels:n,bufferSize:i},a)=>{let o=!0,s=new Int32Array(e,0,2),u=new Float32Array(e,8),d=new Float32Array(n*i),m=typeof document>"u",x=()=>{if(!o)return;let h=Atomics.load(s,1),w=Atomics.load(s,0);if(h===w){if(m)Atomics.wait(s,0,w);else{setTimeout(x,1);return}w=Atomics.load(s,0)}for(;h!==w;){let A=h*n*i;d.set(u.subarray(A,A+n*i));let _=[];for(let C=0;C<n;C++){let K=C*i,U=K+i;_.push(d.slice(K,U))}if(h=(h+1)%r,Atomics.store(s,1,h),!o)return;a(_)}x()};return x(),{stop:()=>o=!1}},t.writer=({sab:e,numChunks:r,numberOfChannels:n,bufferSize:i})=>{let a=new Int32Array(e,0,2),o=new Float32Array(e,8);return Object.freeze({write:s=>{if(s.length!==n)return;for(let m of s)if(m.length!==i)return V("Each channel buffer must contain 'bufferSize' samples");let u=Atomics.load(a,0),d=u*n*i;s.forEach((m,x)=>o.set(m,d+x*i)),Atomics.store(a,0,(u+1)%r),Atomics.notify(a,0)}})}})(t$||(t$={}));var zB=1,OB=t=>new RegExp(`^// @${t} (\\w+) (\\d+) (\\d+)
4
+ `),Yx=(t,e)=>{let r=t.match(e);return r!==null?{userCode:t.slice(r[0].length),update:parseInt(r[3])}:{userCode:t,update:0}},R_=new WeakMap,UB=(t,e,r)=>{let n=t.graph,i=R_.get(t)??new Map,a=t.parameters.pointerHub.filter(),o=new Map;for(let d of a){let m=Ie(d.box,la);o.set(m.label.getValue(),m)}let s=new Set;for(let{label:d}of e)s.add(d);for(let[d,m]of o)s.has(d)||m.delete();s.clear();let u=new Map;for(let d of e){if(s.has(d.label))continue;s.add(d.label);let m=r.get(d.label)??0,x=o.get(d.label),h=i.get(d.label),w=!W(h)||!xr.isEqual(h,d);W(x)&&w&&(x.delete(),o.delete(d.label));let A=o.get(d.label);W(A)?A.index.getValue()!==m&&A.index.setValue(m):la.create(n,M.generate(),_=>{_.owner.refer(t.parameters),_.label.setValue(d.label),_.index.setValue(m),_.value.setValue(d.defaultValue),_.defaultValue.setValue(d.defaultValue)}),u.set(d.label,d)}R_.set(t,u)},VB=(t,e,r)=>{let n=t.graph,i=t.samples.pointerHub.filter(),a=new Map;for(let s of i){let u=Ie(s.box,zs);a.set(u.label.getValue(),u)}let o=new Set;for(let{label:s}of e)o.add(s);for(let[s,u]of a)o.has(s)||(u.file.targetVertex.ifSome(({box:d})=>{let m=d.pointerHub.size()===1;u.file.defer(),m&&d.delete()}),u.delete());o.clear();for(let s of e){if(o.has(s.label))continue;o.add(s.label);let u=r.get(s.label)??0,d=a.get(s.label);W(d)?d.index.getValue()!==u&&d.index.setValue(u):zs.create(n,M.generate(),m=>{m.owner.refer(t.samples),m.label.setValue(s.label),m.index.setValue(u)})}},D_=(t,e,r,n)=>{let i=xr.parseDeclarationOrder(n),a=xr.parseParams(n).map(s=>({label:s.label,index:i.get(s.label)??0,mapping:s.mapping,min:s.min,max:s.max,unit:s.unit})),o=xr.parseSamples(n).map(s=>({label:s.label,index:i.get(s.label)??0}));return`
5
+ if (typeof globalThis.openDAW === "undefined") { globalThis.openDAW = {} }
6
+ if (typeof globalThis.openDAW.${t.registryName} === "undefined") { globalThis.openDAW.${t.registryName} = {} }
7
+ globalThis.openDAW.${t.registryName}["${e}"] = {
8
+ update: ${r},
9
+ create: (function ${t.functionName}() {
10
+ ${n}
11
+ return Processor
12
+ })(),
13
+ params: ${JSON.stringify(a)},
14
+ samples: ${JSON.stringify(o)}
15
+ }
16
+ `},r$=t=>{new Function(t)},i$=async(t,e)=>{let r=new Blob([e],{type:"application/javascript"}),n=URL.createObjectURL(r);try{await t.audioWorklet.addModule(n)}finally{URL.revokeObjectURL(n)}},n$;(function(t){t.wrap=D_,t.create=e=>{let r=OB(e.headerTag),n=a=>`// @${e.headerTag} js ${zB} ${a}
17
+ `,i=0;return{stripHeader:a=>Yx(a,r).userCode,load:async(a,o)=>{let{userCode:s,update:u}=Yx(o.code.getValue(),r);if(u===0)return;let d=xr.parseParams(s),m=new Map;for(let w of d)m.set(w.label,w);R_.set(o,m);let x=M.toString(o.address.uuid),h=D_(e,x,u,s);return r$(h),i$(a,h)},compile:async(a,o,s,u,d=!1)=>{let m=Yx(u,r).userCode,x=Yx(s.code.getValue(),r).update;i=Math.max(i,x);let h=i+1;i=h;let w=M.toString(s.address.uuid),A=xr.parseParams(m),_=xr.parseSamples(m),C=xr.parseDeclarationOrder(m),K=D_(e,w,h,m);r$(K);let U=xr.parseLabel(m),ee=()=>{s.code.setValue(n(h)+m),U.ifSome(re=>s.label.setValue(re)),UB(s,A,C),VB(s,_,C)};return d?o.append(ee):o.modify(ee),i$(a,K)}}}})(n$||(n$={}));var C_={isRegion:t=>Hn.isRegionBox(t.box),isLoopableRegion:t=>Hn.isLoopableRegionBox(t.box)};var st=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Nt=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},a$,Qx,z_,ey,lm,us,zl,Ol,jB,KB,o$,WB,LB,Ul,Vl,jl,ty,s$,ZB,GB,HB,qB,JB;Qx=new WeakMap,z_=new WeakMap,ey=new WeakMap,lm=new WeakMap,us=new WeakMap,zl=new WeakMap,Ol=new WeakMap,a$=new WeakSet,jB=function(e,r){Nt(this,Qx,e,"f"),Nt(this,z_,r,"f"),Nt(this,ey,-2,"f"),Nt(this,lm,Number.NEGATIVE_INFINITY,"f"),Nt(this,us,0,"f"),Nt(this,zl,1,"f"),Nt(this,Ol,0,"f")},KB=function(e){let r=st(this,Qx,"f");if(r.length===0)return st(this,z_,"f");let n=st(this,a$,"m",o$).call(this,e);if(n===st(this,ey,"f")&&e===st(this,lm,"f")+gh)return Nt(this,lm,e,"f"),Nt(this,us,st(this,zl,"f")*st(this,us,"f")+st(this,Ol,"f"),"f");if(Nt(this,ey,n,"f"),Nt(this,lm,e,"f"),n<0)return Nt(this,zl,1,"f"),Nt(this,Ol,0,"f"),Nt(this,us,n===-1?r[0].value:r[r.length-1].value,"f");let i=r[n],a=r[n+1],o=i.interpolation;if(o.type==="none")return Nt(this,zl,1,"f"),Nt(this,Ol,0,"f"),Nt(this,us,i.value,"f");if(o.type==="linear")return Nt(this,zl,1,"f"),Nt(this,Ol,(a.value-i.value)*gh/(a.position-i.position),"f"),Nt(this,us,i.value+(e-i.position)/(a.position-i.position)*(a.value-i.value),"f");{let{m:s,q:u}=qt.coefficients({slope:o.slope,steps:(a.position-i.position)/gh,y0:i.value,y1:a.value});return Nt(this,zl,s,"f"),Nt(this,Ol,u,"f"),Nt(this,us,qt.valueAt({slope:o.slope,steps:a.position-i.position,y0:i.value,y1:a.value},e-i.position),"f")}},o$=function(e){let r=st(this,Qx,"f");if(e<r[0].position)return-1;let n=r.length-1;if(e>=r[n].position)return-3;let i=0,a=n;for(;i<a;){let o=i+a+1>>1;r[o].position<=e?i=o:a=o-1}return i};LB=new WeakMap,Ul=new WeakMap,Vl=new WeakMap,jl=new WeakMap,ty=new WeakMap,s$=new WeakMap,ZB=new WeakMap,GB=new WeakMap,WB=new WeakSet,HB=function(){st(this,Vl,"f").length=0,st(this,jl,"f").length=0,Nt(this,s$,Number.NaN,"f");let e=st(this,Ul,"f").tempoTrackEvents;if(e.isEmpty())return;let r=e.unwrap();if(r.events.isEmpty())return;let n=r.events.asArray(),i=st(this,Ul,"f").box.bpm.getValue(),a=[{ppqn:0,seconds:0,bpm:r.valueAt(0,i)}],o=0,s=0;for(let d of n){let m=d.position;m<=s||(o+=st(this,ty,"f").integrate(n,s,m,i),s=m,a.push({ppqn:m,seconds:o,bpm:r.valueAt(m,i)}))}st(this,Vl,"f").push(...a);let u=a.slice().sort((d,m)=>d.seconds-m.seconds);st(this,jl,"f").push(...u)},qB=function(e){if(e<=0)return 0;let r=st(this,Ul,"f").box.bpm.getValue(),n=st(this,Ul,"f").tempoTrackEvents;if(n.isEmpty())return Ne.pulsesToSeconds(e,r);let i=n.unwrap();if(i.events.isEmpty())return Ne.pulsesToSeconds(e,r);let a=i.events.asArray(),o=0,s=0;if(st(this,Vl,"f").length>0){let u=mt.rightMostMapped(st(this,Vl,"f"),e,ho,d=>d.ppqn);if(u>=0){let d=st(this,Vl,"f")[u];if(o=d.ppqn,s=d.seconds,u===st(this,Vl,"f").length-1)return s+Ne.pulsesToSeconds(e-o,d.bpm)}}return s+st(this,ty,"f").integrate(a,o,e,r)},JB=function(e){if(e<=0)return 0;let r=st(this,Ul,"f").box.bpm.getValue(),n=st(this,Ul,"f").tempoTrackEvents;if(n.isEmpty())return Ne.secondsToPulses(e,r);let i=n.unwrap();if(i.events.isEmpty())return Ne.secondsToPulses(e,r);let a=i.events.asArray(),o=0,s=0;if(st(this,jl,"f").length>0){let u=mt.rightMostMapped(st(this,jl,"f"),e,ho,d=>d.seconds);if(u>=0){let d=st(this,jl,"f")[u];if(o=d.ppqn,s=d.seconds,u===st(this,jl,"f").length-1)return o+Ne.secondsToPulses(e-s,d.bpm)}}return st(this,ty,"f").advance(a,o,s,e,r)};var l$;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Loop=2]="Loop"})(l$||(l$={}));var XB,YB,QB,eT;XB=new WeakMap,YB=new WeakMap,QB=new WeakMap,eT=new WeakMap;var tT,rT,iT,nT;tT=new WeakMap,rT=new WeakMap,iT=new WeakMap,nT=new WeakMap;var ke={};Da(ke,{$brand:()=>U_,$input:()=>s1,$output:()=>o1,NEVER:()=>O_,TimePrecision:()=>d1,ZodAny:()=>eE,ZodArray:()=>nE,ZodBase64:()=>$w,ZodBase64URL:()=>kw,ZodBigInt:()=>Dd,ZodBigIntFormat:()=>Iw,ZodBoolean:()=>Td,ZodCIDRv4:()=>Sw,ZodCIDRv6:()=>Pw,ZodCUID:()=>yw,ZodCUID2:()=>ww,ZodCatch:()=>SE,ZodCodec:()=>Um,ZodCustom:()=>Vm,ZodCustomStringFormat:()=>Id,ZodDate:()=>Dm,ZodDefault:()=>wE,ZodDiscriminatedUnion:()=>oE,ZodE164:()=>Nw,ZodEmail:()=>gw,ZodEmoji:()=>vw,ZodEnum:()=>Nd,ZodError:()=>DR,ZodExactOptional:()=>vE,ZodFile:()=>hE,ZodFirstPartyTypeKind:()=>OE,ZodFunction:()=>RE,ZodGUID:()=>Nm,ZodIPv4:()=>Fw,ZodIPv6:()=>Ew,ZodISODate:()=>cw,ZodISODateTime:()=>uw,ZodISODuration:()=>pw,ZodISOTime:()=>dw,ZodIntersection:()=>sE,ZodIssueCode:()=>CR,ZodJWT:()=>Mw,ZodKSUID:()=>Aw,ZodLazy:()=>BE,ZodLiteral:()=>mE,ZodMAC:()=>GF,ZodMap:()=>pE,ZodNaN:()=>$E,ZodNanoID:()=>xw,ZodNever:()=>rE,ZodNonOptional:()=>zw,ZodNull:()=>YF,ZodNullable:()=>yE,ZodNumber:()=>Bd,ZodNumberFormat:()=>Xl,ZodObject:()=>Cm,ZodOptional:()=>Cw,ZodPipe:()=>Om,ZodPrefault:()=>_E,ZodPreprocess:()=>kE,ZodPromise:()=>DE,ZodReadonly:()=>NE,ZodRealError:()=>wi,ZodRecord:()=>kd,ZodSet:()=>fE,ZodString:()=>Md,ZodStringFormat:()=>dt,ZodSuccess:()=>EE,ZodSymbol:()=>JF,ZodTemplateLiteral:()=>IE,ZodTransform:()=>gE,ZodTuple:()=>uE,ZodType:()=>Te,ZodULID:()=>bw,ZodURL:()=>Tm,ZodUUID:()=>Ba,ZodUndefined:()=>XF,ZodUnion:()=>zm,ZodUnknown:()=>tE,ZodVoid:()=>iE,ZodXID:()=>_w,ZodXor:()=>aE,_ZodString:()=>hw,_default:()=>bE,_function:()=>JN,any:()=>PN,array:()=>Rm,base64:()=>cN,base64url:()=>dN,bigint:()=>_N,boolean:()=>qF,catch:()=>PE,check:()=>XN,cidrv4:()=>lN,cidrv6:()=>uN,clone:()=>Yr,codec:()=>ZN,coerce:()=>UE,config:()=>jt,core:()=>po,cuid:()=>eN,cuid2:()=>tN,custom:()=>YN,date:()=>kN,decode:()=>UF,decodeAsync:()=>jF,describe:()=>QN,discriminatedUnion:()=>DN,e164:()=>pN,email:()=>Wk,emoji:()=>Yk,encode:()=>OF,encodeAsync:()=>VF,endsWith:()=>yd,enum:()=>Dw,exactOptional:()=>xE,file:()=>jN,flattenError:()=>gm,float32:()=>xN,float64:()=>yN,formatError:()=>vm,fromJSONSchema:()=>oM,function:()=>JN,getErrorMap:()=>OR,globalRegistry:()=>kr,gt:()=>Ma,gte:()=>ei,guid:()=>Lk,hash:()=>vN,hex:()=>gN,hostname:()=>hN,httpUrl:()=>Xk,includes:()=>vd,instanceof:()=>tM,int:()=>fw,int32:()=>wN,int64:()=>AN,intersection:()=>lE,invertCodec:()=>GN,ipv4:()=>aN,ipv6:()=>sN,iso:()=>$d,json:()=>iM,jwt:()=>fN,keyof:()=>NN,ksuid:()=>nN,lazy:()=>TE,length:()=>ql,literal:()=>VN,locales:()=>Em,looseObject:()=>BN,looseRecord:()=>CN,lowercase:()=>hd,lt:()=>Na,lte:()=>Vi,mac:()=>oN,map:()=>zN,maxLength:()=>Hl,maxSize:()=>gs,meta:()=>eM,mime:()=>wd,minLength:()=>co,minSize:()=>Ia,multipleOf:()=>hs,nan:()=>LN,nanoid:()=>Qk,nativeEnum:()=>UN,negative:()=>Qy,never:()=>Bw,nonnegative:()=>tw,nonoptional:()=>FE,nonpositive:()=>ew,normalize:()=>bd,null:()=>QF,nullable:()=>Im,nullish:()=>KN,number:()=>HF,object:()=>MN,optional:()=>Mm,overwrite:()=>Jn,parse:()=>DF,parseAsync:()=>RF,partialRecord:()=>RN,pipe:()=>mw,positive:()=>Yy,prefault:()=>AE,preprocess:()=>nM,prettifyError:()=>Q_,promise:()=>qN,property:()=>rw,readonly:()=>ME,record:()=>dE,refine:()=>CE,regex:()=>md,regexes:()=>Ui,registry:()=>My,safeDecode:()=>WF,safeDecodeAsync:()=>ZF,safeEncode:()=>KF,safeEncodeAsync:()=>LF,safeParse:()=>CF,safeParseAsync:()=>zF,set:()=>ON,setErrorMap:()=>zR,size:()=>Gl,slugify:()=>Ed,startsWith:()=>xd,strictObject:()=>IN,string:()=>km,stringFormat:()=>mN,stringbool:()=>rM,success:()=>WN,superRefine:()=>zE,symbol:()=>EN,templateLiteral:()=>HN,toJSONSchema:()=>ow,toLowerCase:()=>Ad,toUpperCase:()=>Fd,transform:()=>Rw,treeifyError:()=>Y_,trim:()=>_d,tuple:()=>cE,uint32:()=>bN,uint64:()=>FN,ulid:()=>rN,undefined:()=>SN,union:()=>Tw,unknown:()=>Jl,uppercase:()=>gd,url:()=>Jk,util:()=>H,uuid:()=>Zk,uuidv4:()=>Gk,uuidv6:()=>Hk,uuidv7:()=>qk,void:()=>$N,xid:()=>iN,xor:()=>TN});var po={};Da(po,{$ZodAny:()=>$A,$ZodArray:()=>BA,$ZodAsyncError:()=>qn,$ZodBase64:()=>xA,$ZodBase64URL:()=>yA,$ZodBigInt:()=>Ay,$ZodBigIntFormat:()=>FA,$ZodBoolean:()=>bm,$ZodCIDRv4:()=>hA,$ZodCIDRv6:()=>gA,$ZodCUID:()=>iA,$ZodCUID2:()=>nA,$ZodCatch:()=>XA,$ZodCheck:()=>ft,$ZodCheckBigIntFormat:()=>B0,$ZodCheckEndsWith:()=>L0,$ZodCheckGreaterThan:()=>vy,$ZodCheckIncludes:()=>K0,$ZodCheckLengthEquals:()=>O0,$ZodCheckLessThan:()=>gy,$ZodCheckLowerCase:()=>V0,$ZodCheckMaxLength:()=>C0,$ZodCheckMaxSize:()=>T0,$ZodCheckMimeType:()=>G0,$ZodCheckMinLength:()=>z0,$ZodCheckMinSize:()=>D0,$ZodCheckMultipleOf:()=>M0,$ZodCheckNumberFormat:()=>I0,$ZodCheckOverwrite:()=>H0,$ZodCheckProperty:()=>Z0,$ZodCheckRegex:()=>U0,$ZodCheckSizeEquals:()=>R0,$ZodCheckStartsWith:()=>W0,$ZodCheckStringFormat:()=>pd,$ZodCheckUpperCase:()=>j0,$ZodCodec:()=>Am,$ZodCustom:()=>a1,$ZodCustomStringFormat:()=>_A,$ZodDate:()=>IA,$ZodDefault:()=>GA,$ZodDiscriminatedUnion:()=>RA,$ZodE164:()=>wA,$ZodEmail:()=>Q0,$ZodEmoji:()=>tA,$ZodEncodeError:()=>cs,$ZodEnum:()=>VA,$ZodError:()=>hm,$ZodExactOptional:()=>LA,$ZodFile:()=>KA,$ZodFunction:()=>r1,$ZodGUID:()=>X0,$ZodIPv4:()=>pA,$ZodIPv6:()=>fA,$ZodISODate:()=>uA,$ZodISODateTime:()=>lA,$ZodISODuration:()=>dA,$ZodISOTime:()=>cA,$ZodIntersection:()=>CA,$ZodJWT:()=>bA,$ZodKSUID:()=>sA,$ZodLazy:()=>n1,$ZodLiteral:()=>jA,$ZodMAC:()=>mA,$ZodMap:()=>OA,$ZodNaN:()=>YA,$ZodNanoID:()=>rA,$ZodNever:()=>NA,$ZodNonOptional:()=>qA,$ZodNull:()=>PA,$ZodNullable:()=>ZA,$ZodNumber:()=>_y,$ZodNumberFormat:()=>AA,$ZodObject:()=>O$,$ZodObjectJIT:()=>TA,$ZodOptional:()=>Ey,$ZodPipe:()=>Sy,$ZodPrefault:()=>HA,$ZodPreprocess:()=>QA,$ZodPromise:()=>i1,$ZodReadonly:()=>e1,$ZodRealError:()=>yi,$ZodRecord:()=>zA,$ZodRegistry:()=>Ny,$ZodSet:()=>UA,$ZodString:()=>Zl,$ZodStringFormat:()=>ct,$ZodSuccess:()=>JA,$ZodSymbol:()=>EA,$ZodTemplateLiteral:()=>t1,$ZodTransform:()=>WA,$ZodTuple:()=>Fy,$ZodType:()=>Pe,$ZodULID:()=>aA,$ZodURL:()=>eA,$ZodUUID:()=>Y0,$ZodUndefined:()=>SA,$ZodUnion:()=>_m,$ZodUnknown:()=>kA,$ZodVoid:()=>MA,$ZodXID:()=>oA,$ZodXor:()=>DA,$brand:()=>U_,$constructor:()=>I,$input:()=>s1,$output:()=>o1,Doc:()=>wm,JSONSchema:()=>Vk,JSONSchemaGenerator:()=>sw,NEVER:()=>O_,TimePrecision:()=>d1,_any:()=>I1,_array:()=>O1,_base64:()=>Hy,_base64url:()=>qy,_bigint:()=>E1,_boolean:()=>A1,_catch:()=>PR,_check:()=>Uk,_cidrv4:()=>Zy,_cidrv6:()=>Gy,_coercedBigint:()=>S1,_coercedBoolean:()=>F1,_coercedDate:()=>C1,_coercedNumber:()=>v1,_coercedString:()=>u1,_cuid:()=>Oy,_cuid2:()=>Uy,_custom:()=>V1,_date:()=>R1,_decode:()=>sy,_decodeAsync:()=>uy,_default:()=>FR,_discriminatedUnion:()=>pR,_e164:()=>Jy,_email:()=>Iy,_emoji:()=>Cy,_encode:()=>oy,_encodeAsync:()=>ly,_endsWith:()=>yd,_enum:()=>xR,_file:()=>U1,_float32:()=>y1,_float64:()=>w1,_gt:()=>Ma,_gte:()=>ei,_guid:()=>Sm,_includes:()=>vd,_int:()=>x1,_int32:()=>b1,_int64:()=>P1,_intersection:()=>fR,_ipv4:()=>Wy,_ipv6:()=>Ly,_isoDate:()=>f1,_isoDateTime:()=>p1,_isoDuration:()=>h1,_isoTime:()=>m1,_jwt:()=>Xy,_ksuid:()=>Ky,_lazy:()=>MR,_length:()=>ql,_literal:()=>wR,_lowercase:()=>hd,_lt:()=>Na,_lte:()=>Vi,_mac:()=>c1,_map:()=>gR,_max:()=>Vi,_maxLength:()=>Hl,_maxSize:()=>gs,_mime:()=>wd,_min:()=>ei,_minLength:()=>co,_minSize:()=>Ia,_multipleOf:()=>hs,_nan:()=>z1,_nanoid:()=>zy,_nativeEnum:()=>yR,_negative:()=>Qy,_never:()=>T1,_nonnegative:()=>tw,_nonoptional:()=>ER,_nonpositive:()=>ew,_normalize:()=>bd,_null:()=>M1,_nullable:()=>AR,_number:()=>g1,_optional:()=>_R,_overwrite:()=>Jn,_parse:()=>ld,_parseAsync:()=>ud,_pipe:()=>$R,_positive:()=>Yy,_promise:()=>IR,_property:()=>rw,_readonly:()=>kR,_record:()=>hR,_refine:()=>j1,_regex:()=>md,_safeDecode:()=>dy,_safeDecodeAsync:()=>fy,_safeEncode:()=>cy,_safeEncodeAsync:()=>py,_safeParse:()=>cd,_safeParseAsync:()=>dd,_set:()=>vR,_size:()=>Gl,_slugify:()=>Ed,_startsWith:()=>xd,_string:()=>l1,_stringFormat:()=>Sd,_stringbool:()=>Z1,_success:()=>SR,_superRefine:()=>K1,_symbol:()=>k1,_templateLiteral:()=>NR,_toLowerCase:()=>Ad,_toUpperCase:()=>Fd,_transform:()=>bR,_trim:()=>_d,_tuple:()=>mR,_uint32:()=>_1,_uint64:()=>$1,_ulid:()=>Vy,_undefined:()=>N1,_union:()=>cR,_unknown:()=>B1,_uppercase:()=>gd,_url:()=>Pm,_uuid:()=>By,_uuidv4:()=>Ty,_uuidv6:()=>Dy,_uuidv7:()=>Ry,_void:()=>D1,_xid:()=>jy,_xor:()=>dR,clone:()=>Yr,config:()=>jt,createStandardJSONSchemaMethod:()=>Pd,createToJSONSchemaMethod:()=>G1,decode:()=>IT,decodeAsync:()=>TT,describe:()=>W1,encode:()=>MT,encodeAsync:()=>BT,extractDefs:()=>xs,finalize:()=>ys,flattenError:()=>gm,formatError:()=>vm,globalConfig:()=>Kl,globalRegistry:()=>kr,initializeContext:()=>vs,isValidBase64:()=>vA,isValidBase64URL:()=>D$,isValidJWT:()=>R$,locales:()=>Em,meta:()=>L1,parse:()=>ny,parseAsync:()=>ay,prettifyError:()=>Q_,process:()=>lt,regexes:()=>Ui,registry:()=>My,safeDecode:()=>RT,safeDecodeAsync:()=>zT,safeEncode:()=>DT,safeEncodeAsync:()=>CT,safeParse:()=>e0,safeParseAsync:()=>t0,toDotPath:()=>m$,toJSONSchema:()=>ow,treeifyError:()=>Y_,util:()=>H,version:()=>q0});var u$,O_=Object.freeze({status:"aborted"});function I(t,e,r){function n(s,u){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:u,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,u);let d=o.prototype,m=Object.keys(d);for(let x=0;x<m.length;x++){let h=m[x];h in s||(s[h]=d[h].bind(s))}}let i=r?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:t});function o(s){var u;let d=r?.Parent?new a:this;n(d,s),(u=d._zod).deferred??(u.deferred=[]);for(let m of d._zod.deferred)m();return d}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}var U_=Symbol("zod_brand"),qn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},cs=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(u$=globalThis).__zod_globalConfig??(u$.__zod_globalConfig={});var Kl=globalThis.__zod_globalConfig;function jt(t){return t&&Object.assign(Kl,t),Kl}var H={};Da(H,{BIGINT_FORMAT_RANGES:()=>J_,Class:()=>j_,NUMBER_FORMAT_RANGES:()=>q_,aborted:()=>ms,allowsEval:()=>L_,assert:()=>uT,assertEqual:()=>aT,assertIs:()=>sT,assertNever:()=>lT,assertNotEqual:()=>oT,assignProp:()=>ps,base64ToUint8Array:()=>d$,base64urlToUint8Array:()=>ST,cached:()=>od,captureStackTrace:()=>iy,cleanEnum:()=>ET,cleanRegex:()=>dm,clone:()=>Yr,cloneDef:()=>dT,createTransparentProxy:()=>vT,defineLazy:()=>Ke,esc:()=>ry,escapeRegex:()=>wn,explicitlyAborted:()=>X_,extend:()=>wT,finalizeIssue:()=>Qr,floatSafeRemainder:()=>K_,getElementAtPath:()=>pT,getEnumValues:()=>cm,getLengthableOrigin:()=>mm,getParsedType:()=>gT,getSizableOrigin:()=>fm,hexToUint8Array:()=>$T,isObject:()=>Wl,isPlainObject:()=>fs,issue:()=>sd,joinValues:()=>O,jsonStringifyReplacer:()=>ad,merge:()=>_T,mergeDefs:()=>uo,normalizeParams:()=>J,nullish:()=>ds,numKeys:()=>hT,objectClone:()=>cT,omit:()=>yT,optionalKeys:()=>H_,parsedType:()=>Z,partial:()=>AT,pick:()=>xT,prefixIssues:()=>xi,primitiveTypes:()=>G_,promiseAllObject:()=>fT,propertyKeyTypes:()=>pm,randomString:()=>mT,required:()=>FT,safeExtend:()=>bT,shallowClone:()=>Z_,slugify:()=>W_,stringifyPrimitive:()=>L,uint8ArrayToBase64:()=>p$,uint8ArrayToBase64url:()=>PT,uint8ArrayToHex:()=>kT,unwrapMessage:()=>um});function aT(t){return t}function oT(t){return t}function sT(t){}function lT(t){throw new Error("Unexpected value in exhaustive check")}function uT(t){}function cm(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function O(t,e="|"){return t.map(r=>L(r)).join(e)}function ad(t,e){return typeof e=="bigint"?e.toString():e}function od(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ds(t){return t==null}function dm(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function K_(t,e){let r=t/e,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}var c$=Symbol("evaluating");function Ke(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==c$)return n===void 0&&(n=c$,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function cT(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function ps(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function uo(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function dT(t){return uo(t._zod.def)}function pT(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function fT(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let a=0;a<e.length;a++)i[e[a]]=n[a];return i})}function mT(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function ry(t){return JSON.stringify(t)}function W_(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var iy="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Wl(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var L_=od(()=>{if(Kl.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function fs(t){if(Wl(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Wl(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Z_(t){return fs(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function hT(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var gT=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},pm=new Set(["string","number","symbol"]),G_=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wn(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yr(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function J(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function vT(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,a){return e??(e=t()),Reflect.set(e,n,i,a)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function L(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function H_(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var q_={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},J_={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function xT(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let a=uo(t._zod.def,{get shape(){let o={};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(o[s]=r.shape[s])}return ps(this,"shape",o),o},checks:[]});return Yr(t,a)}function yT(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let a=uo(t._zod.def,{get shape(){let o={...t._zod.def.shape};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete o[s]}return ps(this,"shape",o),o},checks:[]});return Yr(t,a)}function wT(t,e){if(!fs(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let a=t._zod.def.shape;for(let o in e)if(Object.getOwnPropertyDescriptor(a,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=uo(t._zod.def,{get shape(){let a={...t._zod.def.shape,...e};return ps(this,"shape",a),a}});return Yr(t,i)}function bT(t,e){if(!fs(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=uo(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return ps(this,"shape",n),n}});return Yr(t,r)}function _T(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=uo(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return ps(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return Yr(t,r)}function AT(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let o=uo(e._zod.def,{get shape(){let s=e._zod.def.shape,u={...s};if(r)for(let d in r){if(!(d in s))throw new Error(`Unrecognized key: "${d}"`);r[d]&&(u[d]=t?new t({type:"optional",innerType:s[d]}):s[d])}else for(let d in s)u[d]=t?new t({type:"optional",innerType:s[d]}):s[d];return ps(this,"shape",u),u},checks:[]});return Yr(e,o)}function FT(t,e,r){let n=uo(e._zod.def,{get shape(){let i=e._zod.def.shape,a={...i};if(r)for(let o in r){if(!(o in a))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(a[o]=new t({type:"nonoptional",innerType:i[o]}))}else for(let o in i)a[o]=new t({type:"nonoptional",innerType:i[o]});return ps(this,"shape",a),a}});return Yr(e,n)}function ms(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function X_(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function xi(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function um(t){return typeof t=="string"?t:t?.message}function Qr(t,e,r){let n=t.message?t.message:um(t.inst?._zod.def?.error?.(t))??um(e?.error?.(t))??um(r.customError?.(t))??um(r.localeError?.(t))??"Invalid input",{inst:i,continue:a,input:o,...s}=t;return s.path??(s.path=[]),s.message=n,e?.reportInput&&(s.input=o),s}function fm(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function mm(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Z(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function sd(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function ET(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function d$(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function p$(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function ST(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return d$(e+r)}function PT(t){return p$(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $T(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function kT(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var j_=class{constructor(...e){}};var f$=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,ad,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},hm=I("$ZodError",f$),yi=I("$ZodError",f$,{Parent:Error});function gm(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function vm(t,e=r=>r.message){let r={_errors:[]},n=(i,a=[])=>{for(let o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>n({issues:s},[...a,...o.path]));else if(o.code==="invalid_key")n({issues:o.issues},[...a,...o.path]);else if(o.code==="invalid_element")n({issues:o.issues},[...a,...o.path]);else{let s=[...a,...o.path];if(s.length===0)r._errors.push(e(o));else{let u=r,d=0;for(;d<s.length;){let m=s[d];d===s.length-1?(u[m]=u[m]||{_errors:[]},u[m]._errors.push(e(o))):u[m]=u[m]||{_errors:[]},u=u[m],d++}}}};return n(t),r}function Y_(t,e=r=>r.message){let r={errors:[]},n=(i,a=[])=>{var o,s;for(let u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>n({issues:d},[...a,...u.path]));else if(u.code==="invalid_key")n({issues:u.issues},[...a,...u.path]);else if(u.code==="invalid_element")n({issues:u.issues},[...a,...u.path]);else{let d=[...a,...u.path];if(d.length===0){r.errors.push(e(u));continue}let m=r,x=0;for(;x<d.length;){let h=d[x],w=x===d.length-1;typeof h=="string"?(m.properties??(m.properties={}),(o=m.properties)[h]??(o[h]={errors:[]}),m=m.properties[h]):(m.items??(m.items=[]),(s=m.items)[h]??(s[h]={errors:[]}),m=m.items[h]),w&&m.errors.push(e(u)),x++}}};return n(t),r}function m$(t){let e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function Q_(t){let e=[],r=[...t.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${m$(n.path)}`);return e.join(`
18
+ `)}var ld=t=>(e,r,n,i)=>{let a=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new qn;if(o.issues.length){let s=new(i?.Err??t)(o.issues.map(u=>Qr(u,a,jt())));throw iy(s,i?.callee),s}return o.value},ny=ld(yi),ud=t=>async(e,r,n,i)=>{let a=n?{...n,async:!0}:{async:!0},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let s=new(i?.Err??t)(o.issues.map(u=>Qr(u,a,jt())));throw iy(s,i?.callee),s}return o.value},ay=ud(yi),cd=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new qn;return a.issues.length?{success:!1,error:new(t??hm)(a.issues.map(o=>Qr(o,i,jt())))}:{success:!0,data:a.value}},e0=cd(yi),dd=t=>async(e,r,n)=>{let i=n?{...n,async:!0}:{async:!0},a=e._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new t(a.issues.map(o=>Qr(o,i,jt())))}:{success:!0,data:a.value}},t0=dd(yi),oy=t=>(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return ld(t)(e,r,i)},MT=oy(yi),sy=t=>(e,r,n)=>ld(t)(e,r,n),IT=sy(yi),ly=t=>async(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return ud(t)(e,r,i)},BT=ly(yi),uy=t=>async(e,r,n)=>ud(t)(e,r,n),TT=uy(yi),cy=t=>(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return cd(t)(e,r,i)},DT=cy(yi),dy=t=>(e,r,n)=>cd(t)(e,r,n),RT=dy(yi),py=t=>async(e,r,n)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return dd(t)(e,r,i)},CT=py(yi),fy=t=>async(e,r,n)=>dd(t)(e,r,n),zT=fy(yi);var Ui={};Da(Ui,{base64:()=>v0,base64url:()=>my,bigint:()=>F0,boolean:()=>S0,browserEmail:()=>ZT,cidrv4:()=>h0,cidrv6:()=>g0,cuid:()=>r0,cuid2:()=>i0,date:()=>w0,datetime:()=>_0,domain:()=>qT,duration:()=>l0,e164:()=>y0,email:()=>c0,emoji:()=>d0,extendedDuration:()=>OT,guid:()=>u0,hex:()=>JT,hostname:()=>HT,html5Email:()=>KT,httpProtocol:()=>x0,idnEmail:()=>LT,integer:()=>E0,ipv4:()=>p0,ipv6:()=>f0,ksuid:()=>o0,lowercase:()=>k0,mac:()=>m0,md5_base64:()=>YT,md5_base64url:()=>QT,md5_hex:()=>XT,nanoid:()=>s0,null:()=>P0,number:()=>hy,rfc5322Email:()=>WT,sha1_base64:()=>tD,sha1_base64url:()=>rD,sha1_hex:()=>eD,sha256_base64:()=>nD,sha256_base64url:()=>aD,sha256_hex:()=>iD,sha384_base64:()=>sD,sha384_base64url:()=>lD,sha384_hex:()=>oD,sha512_base64:()=>cD,sha512_base64url:()=>dD,sha512_hex:()=>uD,string:()=>A0,time:()=>b0,ulid:()=>n0,undefined:()=>$0,unicodeEmail:()=>h$,uppercase:()=>N0,uuid:()=>Ll,uuid4:()=>UT,uuid6:()=>VT,uuid7:()=>jT,xid:()=>a0});var r0=/^[cC][0-9a-z]{6,}$/,i0=/^[0-9a-z]+$/,n0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,a0=/^[0-9a-vA-V]{20}$/,o0=/^[A-Za-z0-9]{27}$/,s0=/^[a-zA-Z0-9_-]{21}$/,l0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,OT=/^[-+]?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)?)??$/,u0=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ll=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,UT=Ll(4),VT=Ll(6),jT=Ll(7),c0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,KT=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,WT=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,h$=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,LT=h$,ZT=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,GT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function d0(){return new RegExp(GT,"u")}var p0=/^(?:(?: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])$/,f0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,m0=t=>{let e=wn(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},h0=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,g0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,v0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,my=/^[A-Za-z0-9_-]*$/,HT=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,qT=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,x0=/^https?$/,y0=/^\+[1-9]\d{6,14}$/,g$="(?:(?:\\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])))",w0=new RegExp(`^${g$}$`);function v$(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function b0(t){return new RegExp(`^${v$(t)}$`)}function _0(t){let e=v$({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${g$}T(?:${n})$`)}var A0=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},F0=/^-?\d+n?$/,E0=/^-?\d+$/,hy=/^-?\d+(?:\.\d+)?$/,S0=/^(?:true|false)$/i,P0=/^null$/i;var $0=/^undefined$/i;var k0=/^[^A-Z]*$/,N0=/^[^a-z]*$/,JT=/^[0-9a-fA-F]*$/;function xm(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function ym(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var XT=/^[0-9a-fA-F]{32}$/,YT=xm(22,"=="),QT=ym(22),eD=/^[0-9a-fA-F]{40}$/,tD=xm(27,"="),rD=ym(27),iD=/^[0-9a-fA-F]{64}$/,nD=xm(43,"="),aD=ym(43),oD=/^[0-9a-fA-F]{96}$/,sD=xm(64,""),lD=ym(64),uD=/^[0-9a-fA-F]{128}$/,cD=xm(86,"=="),dD=ym(86);var ft=I("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),y$={number:"number",bigint:"bigint",object:"date"},gy=I("$ZodCheckLessThan",(t,e)=>{ft.init(t,e);let r=y$[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<a&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),vy=I("$ZodCheckGreaterThan",(t,e)=>{ft.init(t,e);let r=y$[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>a&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),M0=I("$ZodCheckMultipleOf",(t,e)=>{ft.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):K_(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),I0=I("$ZodCheckNumberFormat",(t,e)=>{ft.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,a]=q_[e.format];t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,s.minimum=i,s.maximum=a,r&&(s.pattern=E0)}),t._zod.check=o=>{let s=o.value;if(r){if(!Number.isInteger(s)){o.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}s<i&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:t,continue:!e.abort})}}),B0=I("$ZodCheckBigIntFormat",(t,e)=>{ft.init(t,e);let[r,n]=J_[e.format];t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,a.minimum=r,a.maximum=n}),t._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}}),T0=I("$ZodCheckMaxSize",(t,e)=>{var r;ft.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ds(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;i.size<=e.maximum||n.issues.push({origin:fm(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),D0=I("$ZodCheckMinSize",(t,e)=>{var r;ft.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ds(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;i.size>=e.minimum||n.issues.push({origin:fm(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),R0=I("$ZodCheckSizeEquals",(t,e)=>{var r;ft.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ds(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.size,i.maximum=e.size,i.size=e.size}),t._zod.check=n=>{let i=n.value,a=i.size;if(a===e.size)return;let o=a>e.size;n.issues.push({origin:fm(i),...o?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),C0=I("$ZodCheckMaxLength",(t,e)=>{var r;ft.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ds(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;if(i.length<=e.maximum)return;let o=mm(i);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),z0=I("$ZodCheckMinLength",(t,e)=>{var r;ft.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ds(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let o=mm(i);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),O0=I("$ZodCheckLengthEquals",(t,e)=>{var r;ft.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!ds(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{let i=n.value,a=i.length;if(a===e.length)return;let o=mm(i),s=a>e.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),pd=I("$ZodCheckStringFormat",(t,e)=>{var r,n;ft.init(t,e),t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),U0=I("$ZodCheckRegex",(t,e)=>{pd.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),V0=I("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=k0),pd.init(t,e)}),j0=I("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=N0),pd.init(t,e)}),K0=I("$ZodCheckIncludes",(t,e)=>{ft.init(t,e);let r=wn(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let a=i._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),W0=I("$ZodCheckStartsWith",(t,e)=>{ft.init(t,e);let r=new RegExp(`^${wn(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),L0=I("$ZodCheckEndsWith",(t,e)=>{ft.init(t,e);let r=new RegExp(`.*${wn(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function x$(t,e,r){t.issues.length&&e.issues.push(...xi(r,t.issues))}var Z0=I("$ZodCheckProperty",(t,e)=>{ft.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>x$(i,r,e.property));x$(n,r,e.property)}}),G0=I("$ZodCheckMimeType",(t,e)=>{ft.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}}),H0=I("$ZodCheckOverwrite",(t,e)=>{ft.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var wm=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
19
+ `).filter(o=>o),i=Math.min(...n.map(o=>o.length-o.trimStart().length)),a=n.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(let o of a)this.content.push(o)}compile(){let e=Function,r=this?.args,i=[...(this?.content??[""]).map(a=>` ${a}`)];return new e(...r,i.join(`
20
+ `))}};var q0={major:4,minor:4,patch:3};var Pe=I("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=q0;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let a of i._zod.onattach)a(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(o,s,u)=>{let d=ms(o),m;for(let x of s){if(x._zod.def.when){if(X_(o)||!x._zod.def.when(o))continue}else if(d)continue;let h=o.issues.length,w=x._zod.check(o);if(w instanceof Promise&&u?.async===!1)throw new qn;if(m||w instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await w,o.issues.length!==h&&(d||(d=ms(o,h)))});else{if(o.issues.length===h)continue;d||(d=ms(o,h))}}return m?m.then(()=>o):o},a=(o,s,u)=>{if(ms(o))return o.aborted=!0,o;let d=i(s,n,u);if(d instanceof Promise){if(u.async===!1)throw new qn;return d.then(m=>t._zod.parse(m,u))}return t._zod.parse(d,u)};t._zod.run=(o,s)=>{if(s.skipChecks)return t._zod.parse(o,s);if(s.direction==="backward"){let d=t._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return d instanceof Promise?d.then(m=>a(m,o,s)):a(d,o,s)}let u=t._zod.parse(o,s);if(u instanceof Promise){if(s.async===!1)throw new qn;return u.then(d=>i(d,n,s))}return i(u,n,s)}}Ke(t,"~standard",()=>({validate:i=>{try{let a=e0(t,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return t0(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Zl=I("$ZodString",(t,e)=>{Pe.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??A0(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),ct=I("$ZodStringFormat",(t,e)=>{pd.init(t,e),Zl.init(t,e)}),X0=I("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=u0),ct.init(t,e)}),Y0=I("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Ll(n))}else e.pattern??(e.pattern=Ll());ct.init(t,e)}),Q0=I("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=c0),ct.init(t,e)}),eA=I("$ZodURL",(t,e)=>{ct.init(t,e),t._zod.check=r=>{try{let n=r.value.trim();if(!e.normalize&&e.protocol?.source===x0.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}let i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),tA=I("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=d0()),ct.init(t,e)}),rA=I("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=s0),ct.init(t,e)}),iA=I("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=r0),ct.init(t,e)}),nA=I("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=i0),ct.init(t,e)}),aA=I("$ZodULID",(t,e)=>{e.pattern??(e.pattern=n0),ct.init(t,e)}),oA=I("$ZodXID",(t,e)=>{e.pattern??(e.pattern=a0),ct.init(t,e)}),sA=I("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=o0),ct.init(t,e)}),lA=I("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=_0(e)),ct.init(t,e)}),uA=I("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=w0),ct.init(t,e)}),cA=I("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=b0(e)),ct.init(t,e)}),dA=I("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=l0),ct.init(t,e)}),pA=I("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=p0),ct.init(t,e),t._zod.bag.format="ipv4"}),fA=I("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=f0),ct.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),mA=I("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=m0(e.delimiter)),ct.init(t,e),t._zod.bag.format="mac"}),hA=I("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=h0),ct.init(t,e)}),gA=I("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=g0),ct.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,a]=n;if(!a)throw new Error;let o=Number(a);if(`${o}`!==a)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function vA(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var xA=I("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=v0),ct.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{vA(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function D$(t){if(!my.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return vA(r)}var yA=I("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=my),ct.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{D$(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),wA=I("$ZodE164",(t,e)=>{e.pattern??(e.pattern=y0),ct.init(t,e)});function R$(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}var bA=I("$ZodJWT",(t,e)=>{ct.init(t,e),t._zod.check=r=>{R$(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),_A=I("$ZodCustomStringFormat",(t,e)=>{ct.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),_y=I("$ZodNumber",(t,e)=>{Pe.init(t,e),t._zod.pattern=t._zod.bag.pattern??hy,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let a=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...a?{received:a}:{}}),r}}),AA=I("$ZodNumberFormat",(t,e)=>{I0.init(t,e),_y.init(t,e)}),bm=I("$ZodBoolean",(t,e)=>{Pe.init(t,e),t._zod.pattern=S0,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),Ay=I("$ZodBigInt",(t,e)=>{Pe.init(t,e),t._zod.pattern=F0,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),FA=I("$ZodBigIntFormat",(t,e)=>{B0.init(t,e),Ay.init(t,e)}),EA=I("$ZodSymbol",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),SA=I("$ZodUndefined",(t,e)=>{Pe.init(t,e),t._zod.pattern=$0,t._zod.values=new Set([void 0]),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),PA=I("$ZodNull",(t,e)=>{Pe.init(t,e),t._zod.pattern=P0,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),$A=I("$ZodAny",(t,e)=>{Pe.init(t,e),t._zod.parse=r=>r}),kA=I("$ZodUnknown",(t,e)=>{Pe.init(t,e),t._zod.parse=r=>r}),NA=I("$ZodNever",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),MA=I("$ZodVoid",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),IA=I("$ZodDate",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:t}),r}});function b$(t,e,r){t.issues.length&&e.issues.push(...xi(r,t.issues)),e.value[r]=t.value}var BA=I("$ZodArray",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let a=[];for(let o=0;o<i.length;o++){let s=i[o],u=e.element._zod.run({value:s,issues:[]},n);u instanceof Promise?a.push(u.then(d=>b$(d,r,o))):b$(u,r,o)}return a.length?Promise.all(a).then(()=>r):r}});function by(t,e,r,n,i,a){let o=r in n;if(t.issues.length){if(i&&a&&!o)return;e.issues.push(...xi(r,t.issues))}if(!o&&!i){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?o&&(e.value[r]=void 0):e.value[r]=t.value}function C$(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=H_(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function z$(t,e,r,n,i,a){let o=[],s=i.keySet,u=i.catchall._zod,d=u.def.type,m=u.optin==="optional",x=u.optout==="optional";for(let h in e){if(h==="__proto__"||s.has(h))continue;if(d==="never"){o.push(h);continue}let w=u.run({value:e[h],issues:[]},n);w instanceof Promise?t.push(w.then(A=>by(A,r,h,e,m,x))):by(w,r,h,e,m,x)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:a}),t.length?Promise.all(t).then(()=>r):r}var O$=I("$ZodObject",(t,e)=>{if(Pe.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let u={...s};return Object.defineProperty(e,"shape",{value:u}),u}})}let n=od(()=>C$(e));Ke(t._zod,"propValues",()=>{let s=e.shape,u={};for(let d in s){let m=s[d]._zod;if(m.values){u[d]??(u[d]=new Set);for(let x of m.values)u[d].add(x)}}return u});let i=Wl,a=e.catchall,o;t._zod.parse=(s,u)=>{o??(o=n.value);let d=s.value;if(!i(d))return s.issues.push({expected:"object",code:"invalid_type",input:d,inst:t}),s;s.value={};let m=[],x=o.shape;for(let h of o.keys){let w=x[h],A=w._zod.optin==="optional",_=w._zod.optout==="optional",C=w._zod.run({value:d[h],issues:[]},u);C instanceof Promise?m.push(C.then(K=>by(K,s,h,d,A,_))):by(C,s,h,d,A,_)}return a?z$(m,d,s,u,n.value,t):m.length?Promise.all(m).then(()=>s):s}}),TA=I("$ZodObjectJIT",(t,e)=>{O$.init(t,e);let r=t._zod.parse,n=od(()=>C$(e)),i=h=>{let w=new wm(["shape","payload","ctx"]),A=n.value,_=ee=>{let re=ry(ee);return`shape[${re}]._zod.run({ value: input[${re}], issues: [] }, ctx)`};w.write("const input = payload.value;");let C=Object.create(null),K=0;for(let ee of A.keys)C[ee]=`key_${K++}`;w.write("const newResult = {};");for(let ee of A.keys){let re=C[ee],me=ry(ee),$e=h[ee],Q=$e?._zod?.optin==="optional",we=$e?._zod?.optout==="optional";w.write(`const ${re} = ${_(ee)};`),Q&&we?w.write(`
21
+ if (${re}.issues.length) {
22
+ if (${me} in input) {
23
+ payload.issues = payload.issues.concat(${re}.issues.map(iss => ({
24
+ ...iss,
25
+ path: iss.path ? [${me}, ...iss.path] : [${me}]
26
+ })));
27
+ }
28
+ }
29
+
30
+ if (${re}.value === undefined) {
31
+ if (${me} in input) {
32
+ newResult[${me}] = undefined;
33
+ }
34
+ } else {
35
+ newResult[${me}] = ${re}.value;
36
+ }
37
+
38
+ `):Q?w.write(`
39
+ if (${re}.issues.length) {
40
+ payload.issues = payload.issues.concat(${re}.issues.map(iss => ({
41
+ ...iss,
42
+ path: iss.path ? [${me}, ...iss.path] : [${me}]
43
+ })));
44
+ }
45
+
46
+ if (${re}.value === undefined) {
47
+ if (${me} in input) {
48
+ newResult[${me}] = undefined;
49
+ }
50
+ } else {
51
+ newResult[${me}] = ${re}.value;
52
+ }
53
+
54
+ `):w.write(`
55
+ const ${re}_present = ${me} in input;
56
+ if (${re}.issues.length) {
57
+ payload.issues = payload.issues.concat(${re}.issues.map(iss => ({
58
+ ...iss,
59
+ path: iss.path ? [${me}, ...iss.path] : [${me}]
60
+ })));
61
+ }
62
+ if (!${re}_present && !${re}.issues.length) {
63
+ payload.issues.push({
64
+ code: "invalid_type",
65
+ expected: "nonoptional",
66
+ input: undefined,
67
+ path: [${me}]
68
+ });
69
+ }
70
+
71
+ if (${re}_present) {
72
+ if (${re}.value === undefined) {
73
+ newResult[${me}] = undefined;
74
+ } else {
75
+ newResult[${me}] = ${re}.value;
76
+ }
77
+ }
78
+
79
+ `)}w.write("payload.value = newResult;"),w.write("return payload;");let U=w.compile();return(ee,re)=>U(h,ee,re)},a,o=Wl,s=!Kl.jitless,d=s&&L_.value,m=e.catchall,x;t._zod.parse=(h,w)=>{x??(x=n.value);let A=h.value;return o(A)?s&&d&&w?.async===!1&&w.jitless!==!0?(a||(a=i(e.shape)),h=a(h,w),m?z$([],A,h,w,x,t):h):r(h,w):(h.issues.push({expected:"object",code:"invalid_type",input:A,inst:t}),h)}});function _$(t,e,r,n){for(let a of t)if(a.issues.length===0)return e.value=a.value,e;let i=t.filter(a=>!ms(a));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(a=>a.issues.map(o=>Qr(o,n,jt())))}),e)}var _m=I("$ZodUnion",(t,e)=>{Pe.init(t,e),Ke(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Ke(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Ke(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),Ke(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>dm(i.source)).join("|")})$`)}});let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(n,i)=>{if(r)return r(n,i);let a=!1,o=[];for(let s of e.options){let u=s._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)o.push(u),a=!0;else{if(u.issues.length===0)return u;o.push(u)}}return a?Promise.all(o).then(s=>_$(s,n,t,i)):_$(o,n,t,i)}});function A$(t,e,r,n){let i=t.filter(a=>a.issues.length===0);return i.length===1?(e.value=i[0].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(a=>a.issues.map(o=>Qr(o,n,jt())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}var DA=I("$ZodXor",(t,e)=>{_m.init(t,e),e.inclusive=!1;let r=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(n,i)=>{if(r)return r(n,i);let a=!1,o=[];for(let s of e.options){let u=s._zod.run({value:n.value,issues:[]},i);u instanceof Promise?(o.push(u),a=!0):o.push(u)}return a?Promise.all(o).then(s=>A$(s,n,t,i)):A$(o,n,t,i)}}),RA=I("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,_m.init(t,e);let r=t._zod.parse;Ke(t._zod,"propValues",()=>{let i={};for(let a of e.options){let o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let[s,u]of Object.entries(o)){i[s]||(i[s]=new Set);for(let d of u)i[s].add(d)}}return i});let n=od(()=>{let i=e.options,a=new Map;for(let o of i){let s=o._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let u of s){if(a.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);a.set(u,o)}}return a});t._zod.parse=(i,a)=>{let o=i.value;if(!Wl(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:t}),i;let s=n.value.get(o?.[e.discriminator]);return s?s._zod.run(i,a):e.unionFallback||a.direction==="backward"?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(n.value.keys()),input:o,path:[e.discriminator],inst:t}),i)}}),CA=I("$ZodIntersection",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,a=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([u,d])=>F$(r,u,d)):F$(r,a,o)}});function J0(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(fs(t)&&fs(e)){let r=Object.keys(e),n=Object.keys(t).filter(a=>r.indexOf(a)!==-1),i={...t,...e};for(let a of n){let o=J0(t[a],e[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i[a]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],a=e[n],o=J0(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function F$(t,e,r){let n=new Map,i;for(let s of e.issues)if(s.code==="unrecognized_keys"){i??(i=s);for(let u of s.keys)n.has(u)||n.set(u,{}),n.get(u).l=!0}else t.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let u of s.keys)n.has(u)||n.set(u,{}),n.get(u).r=!0;else t.issues.push(s);let a=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(a.length&&i&&t.issues.push({...i,keys:a}),ms(t))return t;let o=J0(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}var Fy=I("$ZodTuple",(t,e)=>{Pe.init(t,e);let r=e.items;t._zod.parse=(n,i)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let o=[],s=E$(r,"optin"),u=E$(r,"optout");if(!e.rest){if(a.length<s)return n.issues.push({code:"too_small",minimum:s,inclusive:!0,input:a,inst:t,origin:"array"}),n;a.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:t,origin:"array"})}let d=new Array(r.length);for(let m=0;m<r.length;m++){let x=r[m]._zod.run({value:a[m],issues:[]},i);x instanceof Promise?o.push(x.then(h=>{d[m]=h})):d[m]=x}if(e.rest){let m=r.length-1,x=a.slice(r.length);for(let h of x){m++;let w=e.rest._zod.run({value:h,issues:[]},i);w instanceof Promise?o.push(w.then(A=>S$(A,n,m))):S$(w,n,m)}}return o.length?Promise.all(o).then(()=>P$(d,n,r,a,u)):P$(d,n,r,a,u)}});function E$(t,e){for(let r=t.length-1;r>=0;r--)if(t[r]._zod[e]!=="optional")return r+1;return 0}function S$(t,e,r){t.issues.length&&e.issues.push(...xi(r,t.issues)),e.value[r]=t.value}function P$(t,e,r,n,i){for(let a=0;a<r.length;a++){let o=t[a],s=a<n.length;if(o.issues.length){if(!s&&a>=i){e.value.length=a;break}e.issues.push(...xi(a,o.issues))}e.value[a]=o.value}for(let a=e.value.length-1;a>=n.length&&(r[a]._zod.optout==="optional"&&e.value[a]===void 0);a--)e.value.length=a;return e}var zA=I("$ZodRecord",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!fs(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let a=[],o=e.keyType._zod.values;if(o){r.value={};let s=new Set;for(let d of o)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){s.add(typeof d=="number"?d.toString():d);let m=e.keyType._zod.run({value:d,issues:[]},n);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(w=>Qr(w,n,jt())),input:d,path:[d],inst:t});continue}let x=m.value,h=e.valueType._zod.run({value:i[d],issues:[]},n);h instanceof Promise?a.push(h.then(w=>{w.issues.length&&r.issues.push(...xi(d,w.issues)),r.value[x]=w.value})):(h.issues.length&&r.issues.push(...xi(d,h.issues)),r.value[x]=h.value)}let u;for(let d in i)s.has(d)||(u=u??[],u.push(d));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:u})}else{r.value={};for(let s of Reflect.ownKeys(i)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,s))continue;let u=e.keyType._zod.run({value:s,issues:[]},n);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&hy.test(s)&&u.issues.length){let x=e.keyType._zod.run({value:Number(s),issues:[]},n);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(u=x)}if(u.issues.length){e.mode==="loose"?r.value[s]=i[s]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(x=>Qr(x,n,jt())),input:s,path:[s],inst:t});continue}let m=e.valueType._zod.run({value:i[s],issues:[]},n);m instanceof Promise?a.push(m.then(x=>{x.issues.length&&r.issues.push(...xi(s,x.issues)),r.value[u.value]=x.value})):(m.issues.length&&r.issues.push(...xi(s,m.issues)),r.value[u.value]=m.value)}}return a.length?Promise.all(a).then(()=>r):r}}),OA=I("$ZodMap",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let a=[];r.value=new Map;for(let[o,s]of i){let u=e.keyType._zod.run({value:o,issues:[]},n),d=e.valueType._zod.run({value:s,issues:[]},n);u instanceof Promise||d instanceof Promise?a.push(Promise.all([u,d]).then(([m,x])=>{$$(m,x,r,o,i,t,n)})):$$(u,d,r,o,i,t,n)}return a.length?Promise.all(a).then(()=>r):r}});function $$(t,e,r,n,i,a,o){t.issues.length&&(pm.has(typeof n)?r.issues.push(...xi(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:a,issues:t.issues.map(s=>Qr(s,o,jt()))})),e.issues.length&&(pm.has(typeof n)?r.issues.push(...xi(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:e.issues.map(s=>Qr(s,o,jt()))})),r.value.set(t.value,e.value)}var UA=I("$ZodSet",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let a=[];r.value=new Set;for(let o of i){let s=e.valueType._zod.run({value:o,issues:[]},n);s instanceof Promise?a.push(s.then(u=>k$(u,r))):k$(s,r)}return a.length?Promise.all(a).then(()=>r):r}});function k$(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var VA=I("$ZodEnum",(t,e)=>{Pe.init(t,e);let r=cm(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>pm.has(typeof i)).map(i=>typeof i=="string"?wn(i):i.toString()).join("|")})$`),t._zod.parse=(i,a)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:t}),i}}),jA=I("$ZodLiteral",(t,e)=>{if(Pe.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?wn(n):n?wn(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:e.values,input:a,inst:t}),n}}),KA=I("$ZodFile",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}}),WA=I("$ZodTransform",(t,e)=>{Pe.init(t,e),t._zod.optin="optional",t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new cs(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r.fallback=!0,r));if(i instanceof Promise)throw new qn;return r.value=i,r.fallback=!0,r}});function N$(t,e){return e===void 0&&(t.issues.length||t.fallback)?{issues:[],value:void 0}:t}var Ey=I("$ZodOptional",(t,e)=>{Pe.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Ke(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Ke(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${dm(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=r.value,a=e.innerType._zod.run(r,n);return a instanceof Promise?a.then(o=>N$(o,i)):N$(a,i)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),LA=I("$ZodExactOptional",(t,e)=>{Ey.init(t,e),Ke(t._zod,"values",()=>e.innerType._zod.values),Ke(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),ZA=I("$ZodNullable",(t,e)=>{Pe.init(t,e),Ke(t._zod,"optin",()=>e.innerType._zod.optin),Ke(t._zod,"optout",()=>e.innerType._zod.optout),Ke(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${dm(r.source)}|null)$`):void 0}),Ke(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),GA=I("$ZodDefault",(t,e)=>{Pe.init(t,e),t._zod.optin="optional",Ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>M$(a,e)):M$(i,e)}});function M$(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var HA=I("$ZodPrefault",(t,e)=>{Pe.init(t,e),t._zod.optin="optional",Ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),qA=I("$ZodNonOptional",(t,e)=>{Pe.init(t,e),Ke(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>I$(a,t)):I$(i,t)}});function I$(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var JA=I("$ZodSuccess",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new cs("ZodSuccess");let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),XA=I("$ZodCatch",(t,e)=>{Pe.init(t,e),t._zod.optin="optional",Ke(t._zod,"optout",()=>e.innerType._zod.optout),Ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.value,a.issues.length&&(r.value=e.catchValue({...r,error:{issues:a.issues.map(o=>Qr(o,n,jt()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(a=>Qr(a,n,jt()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),YA=I("$ZodNaN",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Sy=I("$ZodPipe",(t,e)=>{Pe.init(t,e),Ke(t._zod,"values",()=>e.in._zod.values),Ke(t._zod,"optin",()=>e.in._zod.optin),Ke(t._zod,"optout",()=>e.out._zod.optout),Ke(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=e.out._zod.run(r,n);return a instanceof Promise?a.then(o=>xy(o,e.in,n)):xy(a,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(a=>xy(a,e.out,n)):xy(i,e.out,n)}});function xy(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues,fallback:t.fallback},r)}var Am=I("$ZodCodec",(t,e)=>{Pe.init(t,e),Ke(t._zod,"values",()=>e.in._zod.values),Ke(t._zod,"optin",()=>e.in._zod.optin),Ke(t._zod,"optout",()=>e.out._zod.optout),Ke(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let a=e.in._zod.run(r,n);return a instanceof Promise?a.then(o=>yy(o,e,n)):yy(a,e,n)}else{let a=e.out._zod.run(r,n);return a instanceof Promise?a.then(o=>yy(o,e,n)):yy(a,e,n)}}});function yy(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(a=>wy(t,a,e.out,r)):wy(t,i,e.out,r)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(a=>wy(t,a,e.in,r)):wy(t,i,e.in,r)}}function wy(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}var QA=I("$ZodPreprocess",(t,e)=>{Sy.init(t,e)}),e1=I("$ZodReadonly",(t,e)=>{Pe.init(t,e),Ke(t._zod,"propValues",()=>e.innerType._zod.propValues),Ke(t._zod,"values",()=>e.innerType._zod.values),Ke(t._zod,"optin",()=>e.innerType?._zod?.optin),Ke(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(B$):B$(i)}});function B$(t){return t.value=Object.freeze(t.value),t}var t1=I("$ZodTemplateLiteral",(t,e)=>{Pe.init(t,e);let r=[];for(let n of e.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let a=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(a,o))}else if(n===null||G_.has(typeof n))r.push(wn(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"string",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),n)}),r1=I("$ZodFunction",(t,e)=>(Pe.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=t._def.input?ny(t._def.input,n):n,a=Reflect.apply(r,this,i);return t._def.output?ny(t._def.output,a):a}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=t._def.input?await ay(t._def.input,n):n,a=await Reflect.apply(r,this,i);return t._def.output?await ay(t._def.output,a):a}},t._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let n=t.constructor;return Array.isArray(r[0])?new n({type:"function",input:new Fy({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new n({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let n=t.constructor;return new n({type:"function",input:t._def.input,output:r})},t)),i1=I("$ZodPromise",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),n1=I("$ZodLazy",(t,e)=>{Pe.init(t,e),Ke(t._zod,"innerType",()=>{let r=e;return r._cachedInner||(r._cachedInner=e.getter()),r._cachedInner}),Ke(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),Ke(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),Ke(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),Ke(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),a1=I("$ZodCustom",(t,e)=>{ft.init(t,e),Pe.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(a=>T$(a,r,n,t));T$(i,r,n,t)}});function T$(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(sd(i))}}var Em={};Da(Em,{ar:()=>U$,az:()=>V$,be:()=>K$,bg:()=>W$,ca:()=>L$,cs:()=>Z$,da:()=>G$,de:()=>H$,el:()=>q$,en:()=>Py,eo:()=>J$,es:()=>X$,fa:()=>Y$,fi:()=>Q$,fr:()=>ek,frCA:()=>tk,he:()=>rk,hr:()=>ik,hu:()=>nk,hy:()=>ok,id:()=>sk,is:()=>lk,it:()=>uk,ja:()=>ck,ka:()=>dk,kh:()=>pk,km:()=>$y,ko:()=>fk,lt:()=>hk,mk:()=>gk,ms:()=>vk,nl:()=>xk,no:()=>yk,ota:()=>wk,pl:()=>_k,ps:()=>bk,pt:()=>Ak,ro:()=>Fk,ru:()=>Sk,sl:()=>Pk,sv:()=>$k,ta:()=>kk,th:()=>Nk,tr:()=>Mk,ua:()=>Ik,uk:()=>ky,ur:()=>Bk,uz:()=>Tk,vi:()=>Dk,yo:()=>zk,zhCN:()=>Rk,zhTW:()=>Ck});var fD=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(i){return t[i]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${a}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return i.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${L(i.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${i.minimum.toString()} ${o.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${i.prefix}"`:a.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${a.suffix}"`:a.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${a.includes}"`:a.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${a.pattern}`:`${r[a.format]??i.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${O(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function U$(){return{localeError:fD()}}var mD=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${a}, daxil olan ${s}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${L(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${a}${i.maximum.toString()} ${o.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${a.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:a.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${a.suffix}" il\u0259 bitm\u0259lidir`:a.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${a.includes}" daxil olmal\u0131d\u0131r`:a.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${a.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[a.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${O(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function V$(){return{localeError:mD()}}function j$(t,e,r,n){let i=Math.abs(t),a=i%10,o=i%100;return o>=11&&o<=19?n:a===1?e:a>=2&&a<=4?r:n}var hD=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(i){return t[i]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${a}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return i.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${L(i.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);if(o){let s=Number(i.maximum),u=j$(s,o.unit.one,o.unit.few,o.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${a}${i.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);if(o){let s=Number(i.minimum),u=j$(s,o.unit.one,o.unit.few,o.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${o.verb} ${a}${i.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${a.includes}"`:a.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[a.format]??i.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${O(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function K$(){return{localeError:hD()}}var gD=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(i){return t[i]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${a}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${L(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${a}${i.maximum.toString()} ${o.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${a}${i.minimum.toString()} ${o.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;if(a.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${a.prefix}"`;if(a.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${a.suffix}"`;if(a.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${a.includes}"`;if(a.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${a.pattern}`;let o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return a.format==="emoji"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="datetime"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="date"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),a.format==="time"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="duration"&&(o="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${o} ${r[a.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${O(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function W$(){return{localeError:gD()}}var vD=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(i){return t[i]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${a}, s'ha rebut ${s}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${L(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${O(i.values," o ")}`;case"too_big":{let a=i.inclusive?"com a m\xE0xim":"menys de",o=e(i.origin);return o?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${a} ${i.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"com a m\xEDnim":"m\xE9s de",o=e(i.origin);return o?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${a} ${i.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${a.prefix}"`:a.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format inv\xE0lid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${a.pattern}`:`Format inv\xE0lid per a ${r[a.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}};function L$(){return{localeError:vD()}}var xD=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(i){return t[i]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${a}, obdr\u017Eeno ${s}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${L(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${a}${i.maximum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${a}${i.minimum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${a.prefix}"`:a.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${a.suffix}"`:a.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${a.includes}"`:a.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${a.pattern}`:`Neplatn\xFD form\xE1t ${r[a.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${O(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};function Z$(){return{localeError:xD()}}var yD=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(i){return t[i]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${s}`:`Ugyldigt input: forventede ${a}, fik ${s}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${L(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin),s=n[i.origin]??i.origin;return o?`For stor: forventede ${s??"value"} ${o.verb} ${a} ${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin),s=n[i.origin]??i.origin;return o?`For lille: forventede ${s} ${o.verb} ${a} ${i.minimum.toString()} ${o.unit}`:`For lille: forventede ${s} havde ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${r[a.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${O(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}};function G$(){return{localeError:yD()}}var wD=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(i){return t[i]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${a}, erhalten ${s}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${L(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ist`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ist`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ung\xFCltiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ung\xFCltiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ung\xFCltiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${a.pattern} entsprechen`:`Ung\xFCltig: ${r[a.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${O(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}};function H$(){return{localeError:wD()}}var bD=()=>{let t={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(i){return t[i]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return typeof i.expected=="string"&&/^[A-Z]/.test(i.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${i.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${a}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return i.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${L(i.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${a}${i.maximum.toString()} ${o.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${a}${i.minimum.toString()} ${o.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${a.prefix}"`:a.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${a.suffix}"`:a.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${a.includes}"`:a.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${a.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[a.format]??i.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${i.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${i.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${i.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${O(i.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${i.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${i.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function q$(){return{localeError:bD()}}var _D=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(i){return t[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return`Invalid input: expected ${a}, received ${s}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${L(i.values[0])}`:`Invalid option: expected one of ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(o=>`'${o}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Py(){return{localeError:_D()}}var AD=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(i){return t[i]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${a}, ricevi\u011Dis ${s}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${L(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${a}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${a}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${a.prefix}"`:a.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${a.suffix}"`:a.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${a.includes}"`:a.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${a.pattern}`:`Nevalida ${r[a.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${O(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function J$(){return{localeError:AD()}}var FD=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(i){return t[i]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${a}, recibido ${s}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${L(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin),s=n[i.origin]??i.origin;return o?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${a}${i.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin),s=n[i.origin]??i.origin;return o?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${a}${i.minimum.toString()} ${o.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${r[a.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}};function X$(){return{localeError:FD()}}var ED=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(i){return t[i]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${a} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${L(i.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${O(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} ${o.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:a.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:a.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${a.includes}" \u0628\u0627\u0634\u062F`:a.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${a.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[a.format]??i.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${O(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Y$(){return{localeError:ED()}}var SD=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(i){return t[i]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${a}, oli ${s}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${L(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Liian suuri: ${o.subject} t\xE4ytyy olla ${a}${i.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Liian pieni: ${o.subject} t\xE4ytyy olla ${a}${i.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${a.includes}"`:a.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${a.pattern}`:`Virheellinen ${r[a.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${O(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Q$(){return{localeError:SD()}}var PD=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${a} attendu, ${s} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${L(i.values[0])} attendu`:`Option invalide : une valeur parmi ${O(i.values,"|")} attendue`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Trop grand : ${n[i.origin]??"valeur"} doit ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[i.origin]??"valeur"} doit \xEAtre ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Trop petit : ${n[i.origin]??"valeur"} doit ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Trop petit : ${n[i.origin]??"valeur"} doit \xEAtre ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${a.pattern}`:`${r[a.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${O(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function ek(){return{localeError:PD()}}var $D=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${a}, re\xE7u ${s}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${L(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"\u2264":"<",o=e(i.origin);return o?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${a}${i.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"\u2265":">",o=e(i.origin);return o?`Trop petit : attendu que ${i.origin} ait ${a}${i.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${i.origin} soit ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${a.pattern}`:`${r[a.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${O(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function tk(){return{localeError:$D()}}var kD=()=>{let t={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=d=>d?t[d]:void 0,n=d=>{let m=r(d);return m?m.label:d??t.unknown.label},i=d=>`\u05D4${n(d)}`,a=d=>(r(d)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",o=d=>d?e[d]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return d=>{switch(d.code){case"invalid_type":{let m=d.expected,x=u[m??""]??n(m),h=Z(d.input),w=u[h]??t[h]?.label??h;return/^[A-Z]/.test(d.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${d.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${w}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}, \u05D4\u05EA\u05E7\u05D1\u05DC ${w}`}case"invalid_value":{if(d.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${L(d.values[0])}`;let m=d.values.map(w=>L(w));if(d.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${m[0]} \u05D0\u05D5 ${m[1]}`;let x=m[m.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${m.slice(0,-1).join(", ")} \u05D0\u05D5 ${x}`}case"too_big":{let m=o(d.origin),x=i(d.origin??"value");if(d.origin==="string")return`${m?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${x} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.maximum.toString()} ${m?.unit??""} ${d.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(d.origin==="number"){let A=d.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${d.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${x} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${A}`}if(d.origin==="array"||d.origin==="set"){let A=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",_=d.inclusive?`${d.maximum} ${m?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${d.maximum} ${m?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${x} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let h=d.inclusive?"<=":"<",w=a(d.origin??"value");return m?.unit?`${m.longLabel} \u05DE\u05D3\u05D9: ${x} ${w} ${h}${d.maximum.toString()} ${m.unit}`:`${m?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${x} ${w} ${h}${d.maximum.toString()}`}case"too_small":{let m=o(d.origin),x=i(d.origin??"value");if(d.origin==="string")return`${m?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${x} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.minimum.toString()} ${m?.unit??""} ${d.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(d.origin==="number"){let A=d.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${d.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${x} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${A}`}if(d.origin==="array"||d.origin==="set"){let A=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(d.minimum===1&&d.inclusive){let C=(d.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${x} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${C}`}let _=d.inclusive?`${d.minimum} ${m?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${d.minimum} ${m?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${x} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let h=d.inclusive?">=":">",w=a(d.origin??"value");return m?.unit?`${m.shortLabel} \u05DE\u05D3\u05D9: ${x} ${w} ${h}${d.minimum.toString()} ${m.unit}`:`${m?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${x} ${w} ${h}${d.minimum.toString()}`}case"invalid_format":{let m=d;if(m.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${m.prefix}"`;if(m.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${m.suffix}"`;if(m.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${m.includes}"`;if(m.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${m.pattern}`;let x=s[m.format],h=x?.label??m.format,A=(x?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${h} \u05DC\u05D0 ${A}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${d.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${d.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${d.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${O(d.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i(d.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function rk(){return{localeError:kD()}}var ND=()=>{let t={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(i){return t[i]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},n={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${i.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${a}, a primljeno je ${s}`}case"invalid_value":return i.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${L(i.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin),s=n[i.origin]??i.origin;return o?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${a}${i.maximum.toString()} ${o.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin),s=n[i.origin]??i.origin;return o?`Premalo: o\u010Dekivano da ${s} ima ${a}${i.minimum.toString()} ${o.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${a.prefix}"`:a.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${a.suffix}"`:a.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${a.includes}"`:a.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${a.pattern}`:`Neispravna ${r[a.format]??i.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${i.divisor}`;case"unrecognized_keys":return`Neprepoznat${i.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${O(i.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[i.origin]??i.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[i.origin]??i.origin}`;default:return"Neispravan unos"}}};function ik(){return{localeError:ND()}}var MD=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(i){return t[i]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${a}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${L(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${a}${i.maximum.toString()} ${o.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${a}${i.minimum.toString()} ${o.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\xC9rv\xE9nytelen string: "${a.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:a.format==="ends_with"?`\xC9rv\xE9nytelen string: "${a.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:a.format==="includes"?`\xC9rv\xE9nytelen string: "${a.includes}" \xE9rt\xE9ket kell tartalmaznia`:a.format==="regex"?`\xC9rv\xE9nytelen string: ${a.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[a.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function nk(){return{localeError:MD()}}function ak(t,e,r){return Math.abs(t)===1?e:r}function fd(t){if(!t)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=t[t.length-1];return t+(e.includes(r)?"\u0576":"\u0568")}var ID=()=>{let t={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(i){return t[i]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${a}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return i.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${L(i.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);if(o){let s=Number(i.maximum),u=ak(s,o.unit.one,o.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${fd(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${a}${i.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${fd(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);if(o){let s=Number(i.minimum),u=ak(s,o.unit.one,o.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${fd(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${a}${i.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${fd(i.origin)} \u056C\u056B\u0576\u056B ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${a.prefix}"-\u0578\u057E`:a.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${a.suffix}"-\u0578\u057E`:a.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${a.includes}"`:a.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${a.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[a.format]??i.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${O(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${fd(i.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${fd(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function ok(){return{localeError:ID()}}var BD=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(i){return t[i]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${a}, diterima ${s}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${L(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${a}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Terlalu kecil: diharapkan ${i.origin} memiliki ${a}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${r[a.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function sk(){return{localeError:BD()}}var TD=()=>{let t={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function e(i){return t[i]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${a}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${L(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${a}${i.maximum.toString()} ${o.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${a}${i.minimum.toString()} ${o.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${a.prefix}"`:a.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${a.suffix}"`:a.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${a.includes}"`:a.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${a.pattern}`:`Rangt ${r[a.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${O(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}};function lk(){return{localeError:TD()}}var DD=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(i){return t[i]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${s}`:`Input non valido: atteso ${a}, ricevuto ${s}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${L(i.values[0])}`:`Opzione non valida: atteso uno tra ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Troppo grande: ${i.origin??"valore"} deve avere ${a}${i.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Troppo piccolo: ${i.origin} deve avere ${a}${i.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${i.origin} deve essere ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Input non valido: ${r[a.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${O(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function uk(){return{localeError:DD()}}var RD=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(i){return t[i]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${a}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${L(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${O(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let a=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",o=e(i.origin);return o?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o.unit??"\u8981\u7D20"}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let a=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",o=e(i.origin);return o?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o.unit}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${a.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[a.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${i.keys.length>1?"\u7FA4":""}: ${O(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function ck(){return{localeError:RD()}}var CD=()=>{let t={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(i){return t[i]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${a}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${L(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${O(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${a.prefix}"-\u10D8\u10D7`:a.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${a.suffix}"-\u10D8\u10D7`:a.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${a.includes}"-\u10E1`:a.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${a.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[a.format]??i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${O(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function dk(){return{localeError:CD()}}var zD=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(i){return t[i]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return i.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${L(i.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${i.maximum.toString()} ${o.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${a} ${i.minimum.toString()} ${o.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${a.prefix}"`:a.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${a.suffix}"`:a.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${a.includes}"`:a.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${a.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[a.format]??i.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${O(i.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function $y(){return{localeError:zD()}}function pk(){return $y()}var OD=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(i){return t[i]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${a}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${L(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${O(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let a=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",o=a==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),u=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${u} ${a}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${a}${o}`}case"too_small":{let a=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",o=a==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),u=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${u} ${a}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${a}${o}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:a.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${a.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[a.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${O(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function fk(){return{localeError:OD()}}var Fm=t=>t.charAt(0).toUpperCase()+t.slice(1);function mk(t){let e=Math.abs(t),r=e%10,n=e%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var UD=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(i,a,o,s){let u=t[i]??null;return u===null?u:{unit:u.unit[a],verb:u.verb[s][o?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${a}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${L(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${O(i.values,"|")} pasirinkim\u0173`;case"too_big":{let a=n[i.origin]??i.origin,o=e(i.origin,mk(Number(i.maximum)),i.inclusive??!1,"smaller");if(o?.verb)return`${Fm(a??i.origin??"reik\u0161m\u0117")} ${o.verb} ${i.maximum.toString()} ${o.unit??"element\u0173"}`;let s=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Fm(a??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${i.maximum.toString()} ${o?.unit}`}case"too_small":{let a=n[i.origin]??i.origin,o=e(i.origin,mk(Number(i.minimum)),i.inclusive??!1,"bigger");if(o?.verb)return`${Fm(a??i.origin??"reik\u0161m\u0117")} ${o.verb} ${i.minimum.toString()} ${o.unit??"element\u0173"}`;let s=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Fm(a??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${i.minimum.toString()} ${o?.unit}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${a.prefix}"`:a.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${a.suffix}"`:a.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${a.includes}"`:a.format==="regex"?`Eilut\u0117 privalo atitikti ${a.pattern}`:`Neteisingas ${r[a.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${O(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let a=n[i.origin]??i.origin;return`${Fm(a??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function hk(){return{localeError:UD()}}var VD=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(i){return t[i]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${L(i.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${a}${i.maximum.toString()} ${o.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${a}${i.minimum.toString()} ${o.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${O(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function gk(){return{localeError:VD()}}var jD=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(i){return t[i]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${s}`:`Input tidak sah: dijangka ${a}, diterima ${s}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${L(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Terlalu besar: dijangka ${i.origin??"nilai"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Terlalu kecil: dijangka ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${r[a.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${O(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function vk(){return{localeError:jD()}}var KD=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(i){return t[i]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${a}, ontving ${s}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${L(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin),s=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return o?`Te ${s}: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${s}: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} is`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin),s=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return o?`Te ${s}: verwacht dat ${i.origin} ${a}${i.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${s}: verwacht dat ${i.origin} ${a}${i.minimum.toString()} is`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${r[a.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function xk(){return{localeError:KD()}}var WD=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(i){return t[i]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${s}`:`Ugyldig input: forventet ${a}, fikk ${s}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${L(i.values[0])}`:`Ugyldig valg: forventet en av ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${a}${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`For lite(n): forventet ${i.origin} til \xE5 ha ${a}${i.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${r[a.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${O(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function yk(){return{localeError:WD()}}var LD=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${a}, al\u0131nan ${s}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${L(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${a}${i.maximum.toString()} ${o.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${a}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${a}${i.minimum.toString()} ${o.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${a}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let a=i;return a.format==="starts_with"?`F\xE2sit metin: "${a.prefix}" ile ba\u015Flamal\u0131.`:a.format==="ends_with"?`F\xE2sit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`F\xE2sit metin: "${a.includes}" ihtiv\xE2 etmeli.`:a.format==="regex"?`F\xE2sit metin: ${a.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[a.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function wk(){return{localeError:LD()}}var ZD=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(i){return t[i]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${a} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${L(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${O(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} ${o.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:a.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:a.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${a.includes}" \u0648\u0644\u0631\u064A`:a.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${a.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[a.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${O(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function bk(){return{localeError:ZD()}}var GD=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(i){return t[i]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${a}, otrzymano ${s}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${L(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${i.maximum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${i.minimum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${a.prefix}"`:a.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${a.suffix}"`:a.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${a.includes}"`:a.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${a.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[a.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function _k(){return{localeError:GD()}}var HD=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(i){return t[i]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${a}, recebido ${s}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${L(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${a}${i.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Muito pequeno: esperado que ${i.origin} tivesse ${a}${i.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${a.prefix}"`:a.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inv\xE1lido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${a.pattern}`:`${r[a.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${O(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}};function Ak(){return{localeError:HD()}}var qD=()=>{let t={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(i){return t[i]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},n={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return`Intrare invalid\u0103: a\u0219teptat ${a}, primit ${s}`}case"invalid_value":return i.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${L(i.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} s\u0103 fie ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Prea mic: a\u0219teptat ca ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Prea mic: a\u0219teptat ca ${i.origin} s\u0103 fie ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${a.prefix}"`:a.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${a.suffix}"`:a.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${a.includes}"`:a.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${a.pattern}`:`Format invalid: ${r[a.format]??i.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${i.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${O(i.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${i.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${i.origin}`;default:return"Intrare invalid\u0103"}}};function Fk(){return{localeError:qD()}}function Ek(t,e,r,n){let i=Math.abs(t),a=i%10,o=i%100;return o>=11&&o<=19?n:a===1?e:a>=2&&a<=4?r:n}var JD=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(i){return t[i]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${a}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${L(i.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);if(o){let s=Number(i.maximum),u=Ek(s,o.unit.one,o.unit.few,o.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${a}${i.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);if(o){let s=Number(i.minimum),u=Ek(s,o.unit.one,o.unit.few,o.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${a}${i.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[a.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${O(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Sk(){return{localeError:JD()}}var XD=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(i){return t[i]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${a}, prejeto ${s}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${L(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${a}${i.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${a}${i.minimum.toString()} ${o.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${r[a.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${O(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function Pk(){return{localeError:XD()}}var YD=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(i){return t[i]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${a}, fick ${s}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${L(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.maximum.toString()} ${o.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.minimum.toString()} ${o.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${a.includes}"`:a.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${a.pattern}"`:`Ogiltig(t) ${r[a.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${O(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function $k(){return{localeError:YD()}}var QD=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(i){return t[i]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return i.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${L(i.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${O(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${i.maximum.toString()} ${o.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${a}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${a}${i.minimum.toString()} ${o.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${a}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${a.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[a.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${O(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function kk(){return{localeError:QD()}}var eR=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(i){return t[i]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${a} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${L(i.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",o=e(i.origin);return o?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.maximum.toString()} ${o.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",o=e(i.origin);return o?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.minimum.toString()} ${o.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${a.prefix}"`:a.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${a.suffix}"`:a.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${a.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:a.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${a.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[a.format]??i.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${i.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${O(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Nk(){return{localeError:eR()}}var tR=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(i){return t[i]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${a}, al\u0131nan ${s}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${L(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${a}${i.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ge\xE7ersiz metin: "${a.prefix}" ile ba\u015Flamal\u0131`:a.format==="ends_with"?`Ge\xE7ersiz metin: "${a.suffix}" ile bitmeli`:a.format==="includes"?`Ge\xE7ersiz metin: "${a.includes}" i\xE7ermeli`:a.format==="regex"?`Ge\xE7ersiz metin: ${a.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[a.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${O(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Mk(){return{localeError:tR()}}var rR=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(i){return t[i]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${a}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${L(i.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${a.prefix}"`:a.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${a.suffix}"`:a.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${a.includes}"`:a.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${a.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[a.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${O(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function ky(){return{localeError:rR()}}function Ik(){return ky()}var iR=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(i){return t[i]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${a} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${L(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${O(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${a}${i.maximum.toString()} ${o.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${a}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${a}${i.minimum.toString()} ${o.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${a}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${a.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[a.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${i.keys.length>1?"\u0632":""}: ${O(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Bk(){return{localeError:iR()}}var nR=()=>{let t={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(i){return t[i]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${a}, qabul qilingan ${s}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${L(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Juda katta: kutilgan ${i.origin??"qiymat"} ${a}${i.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Juda kichik: kutilgan ${i.origin} ${a}${i.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${a.prefix}" bilan boshlanishi kerak`:a.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${a.suffix}" bilan tugashi kerak`:a.format==="includes"?`Noto\u2018g\u2018ri satr: "${a.includes}" ni o\u2018z ichiga olishi kerak`:a.format==="regex"?`Noto\u2018g\u2018ri satr: ${a.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[a.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${O(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Tk(){return{localeError:nR()}}var aR=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(i){return t[i]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${a}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${L(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${a.prefix}"`:a.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${a.suffix}"`:a.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${a.includes}"`:a.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${a.pattern}`:`${r[a.format]??i.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${O(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Dk(){return{localeError:aR()}}var oR=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(i){return t[i]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${a}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${L(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${a}${i.maximum.toString()} ${o.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.prefix}" \u5F00\u5934`:a.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.suffix}" \u7ED3\u5C3E`:a.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${a.pattern}`:`\u65E0\u6548${r[a.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${O(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Rk(){return{localeError:oR()}}var sR=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(i){return t[i]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${a}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${L(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${a}${i.maximum.toString()} ${o.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${a}${i.minimum.toString()} ${o.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.prefix}" \u958B\u982D`:a.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.suffix}" \u7D50\u5C3E`:a.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${a.pattern}`:`\u7121\u6548\u7684 ${r[a.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${O(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Ck(){return{localeError:sR()}}var lR=()=>{let t={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function e(i){return t[i]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let a=n[i.expected]??i.expected,o=Z(i.input),s=n[o]??o;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${a}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${L(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${O(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${o.verb} ${a}${i.maximum} ${o.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${a}${i.maximum}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${o.verb} ${a}${i.minimum} ${o.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${a}${i.minimum}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${a.prefix}"`:a.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${a.suffix}"`:a.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${a.includes}"`:a.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${a.pattern}`:`A\u1E63\xEC\u1E63e: ${r[a.format]??i.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${O(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function zk(){return{localeError:lR()}}var Ok,o1=Symbol("ZodOutput"),s1=Symbol("ZodInput"),Ny=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function My(){return new Ny}(Ok=globalThis).__zod_globalRegistry??(Ok.__zod_globalRegistry=My());var kr=globalThis.__zod_globalRegistry;function l1(t,e){return new t({type:"string",...J(e)})}function u1(t,e){return new t({type:"string",coerce:!0,...J(e)})}function Iy(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...J(e)})}function Sm(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...J(e)})}function By(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...J(e)})}function Ty(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...J(e)})}function Dy(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...J(e)})}function Ry(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...J(e)})}function Pm(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...J(e)})}function Cy(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...J(e)})}function zy(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...J(e)})}function Oy(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...J(e)})}function Uy(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...J(e)})}function Vy(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...J(e)})}function jy(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...J(e)})}function Ky(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...J(e)})}function Wy(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...J(e)})}function Ly(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...J(e)})}function c1(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...J(e)})}function Zy(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...J(e)})}function Gy(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...J(e)})}function Hy(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...J(e)})}function qy(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...J(e)})}function Jy(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...J(e)})}function Xy(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...J(e)})}var d1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function p1(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...J(e)})}function f1(t,e){return new t({type:"string",format:"date",check:"string_format",...J(e)})}function m1(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...J(e)})}function h1(t,e){return new t({type:"string",format:"duration",check:"string_format",...J(e)})}function g1(t,e){return new t({type:"number",checks:[],...J(e)})}function v1(t,e){return new t({type:"number",coerce:!0,checks:[],...J(e)})}function x1(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...J(e)})}function y1(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...J(e)})}function w1(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...J(e)})}function b1(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...J(e)})}function _1(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...J(e)})}function A1(t,e){return new t({type:"boolean",...J(e)})}function F1(t,e){return new t({type:"boolean",coerce:!0,...J(e)})}function E1(t,e){return new t({type:"bigint",...J(e)})}function S1(t,e){return new t({type:"bigint",coerce:!0,...J(e)})}function P1(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...J(e)})}function $1(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...J(e)})}function k1(t,e){return new t({type:"symbol",...J(e)})}function N1(t,e){return new t({type:"undefined",...J(e)})}function M1(t,e){return new t({type:"null",...J(e)})}function I1(t){return new t({type:"any"})}function B1(t){return new t({type:"unknown"})}function T1(t,e){return new t({type:"never",...J(e)})}function D1(t,e){return new t({type:"void",...J(e)})}function R1(t,e){return new t({type:"date",...J(e)})}function C1(t,e){return new t({type:"date",coerce:!0,...J(e)})}function z1(t,e){return new t({type:"nan",...J(e)})}function Na(t,e){return new gy({check:"less_than",...J(e),value:t,inclusive:!1})}function Vi(t,e){return new gy({check:"less_than",...J(e),value:t,inclusive:!0})}function Ma(t,e){return new vy({check:"greater_than",...J(e),value:t,inclusive:!1})}function ei(t,e){return new vy({check:"greater_than",...J(e),value:t,inclusive:!0})}function Yy(t){return Ma(0,t)}function Qy(t){return Na(0,t)}function ew(t){return Vi(0,t)}function tw(t){return ei(0,t)}function hs(t,e){return new M0({check:"multiple_of",...J(e),value:t})}function gs(t,e){return new T0({check:"max_size",...J(e),maximum:t})}function Ia(t,e){return new D0({check:"min_size",...J(e),minimum:t})}function Gl(t,e){return new R0({check:"size_equals",...J(e),size:t})}function Hl(t,e){return new C0({check:"max_length",...J(e),maximum:t})}function co(t,e){return new z0({check:"min_length",...J(e),minimum:t})}function ql(t,e){return new O0({check:"length_equals",...J(e),length:t})}function md(t,e){return new U0({check:"string_format",format:"regex",...J(e),pattern:t})}function hd(t){return new V0({check:"string_format",format:"lowercase",...J(t)})}function gd(t){return new j0({check:"string_format",format:"uppercase",...J(t)})}function vd(t,e){return new K0({check:"string_format",format:"includes",...J(e),includes:t})}function xd(t,e){return new W0({check:"string_format",format:"starts_with",...J(e),prefix:t})}function yd(t,e){return new L0({check:"string_format",format:"ends_with",...J(e),suffix:t})}function rw(t,e,r){return new Z0({check:"property",property:t,schema:e,...J(r)})}function wd(t,e){return new G0({check:"mime_type",mime:t,...J(e)})}function Jn(t){return new H0({check:"overwrite",tx:t})}function bd(t){return Jn(e=>e.normalize(t))}function _d(){return Jn(t=>t.trim())}function Ad(){return Jn(t=>t.toLowerCase())}function Fd(){return Jn(t=>t.toUpperCase())}function Ed(){return Jn(t=>W_(t))}function O1(t,e,r){return new t({type:"array",element:e,...J(r)})}function cR(t,e,r){return new t({type:"union",options:e,...J(r)})}function dR(t,e,r){return new t({type:"union",options:e,inclusive:!1,...J(r)})}function pR(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...J(n)})}function fR(t,e,r){return new t({type:"intersection",left:e,right:r})}function mR(t,e,r,n){let i=r instanceof Pe,a=i?n:r,o=i?r:null;return new t({type:"tuple",items:e,rest:o,...J(a)})}function hR(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...J(n)})}function gR(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...J(n)})}function vR(t,e,r){return new t({type:"set",valueType:e,...J(r)})}function xR(t,e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new t({type:"enum",entries:n,...J(r)})}function yR(t,e,r){return new t({type:"enum",entries:e,...J(r)})}function wR(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...J(r)})}function U1(t,e){return new t({type:"file",...J(e)})}function bR(t,e){return new t({type:"transform",transform:e})}function _R(t,e){return new t({type:"optional",innerType:e})}function AR(t,e){return new t({type:"nullable",innerType:e})}function FR(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Z_(r)}})}function ER(t,e,r){return new t({type:"nonoptional",innerType:e,...J(r)})}function SR(t,e){return new t({type:"success",innerType:e})}function PR(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function $R(t,e,r){return new t({type:"pipe",in:e,out:r})}function kR(t,e){return new t({type:"readonly",innerType:e})}function NR(t,e,r){return new t({type:"template_literal",parts:e,...J(r)})}function MR(t,e){return new t({type:"lazy",getter:e})}function IR(t,e){return new t({type:"promise",innerType:e})}function V1(t,e,r){let n=J(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function j1(t,e,r){return new t({type:"custom",check:"custom",fn:e,...J(r)})}function K1(t,e){let r=Uk(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(sd(i,n.value,r._zod.def));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=r),a.continue??(a.continue=!r._zod.def.abort),n.issues.push(sd(a))}},t(n.value,n)),e);return r}function Uk(t,e){let r=new ft({check:"custom",...J(e)});return r._zod.check=t,r}function W1(t){let e=new ft({check:"describe"});return e._zod.onattach=[r=>{let n=kr.get(r)??{};kr.add(r,{...n,description:t})}],e._zod.check=()=>{},e}function L1(t){let e=new ft({check:"meta"});return e._zod.onattach=[r=>{let n=kr.get(r)??{};kr.add(r,{...n,...t})}],e._zod.check=()=>{},e}function Z1(t,e){let r=J(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(w=>typeof w=="string"?w.toLowerCase():w),i=i.map(w=>typeof w=="string"?w.toLowerCase():w));let a=new Set(n),o=new Set(i),s=t.Codec??Am,u=t.Boolean??bm,d=t.String??Zl,m=new d({type:"string",error:r.error}),x=new u({type:"boolean",error:r.error}),h=new s({type:"pipe",in:m,out:x,transform:((w,A)=>{let _=w;return r.case!=="sensitive"&&(_=_.toLowerCase()),a.has(_)?!0:o.has(_)?!1:(A.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:A.value,inst:h,continue:!1}),{})}),reverseTransform:((w,A)=>w===!0?n[0]||"true":i[0]||"false"),error:r.error});return h}function Sd(t,e,r,n={}){let i=J(n),a={...J(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:s=>r.test(s),...i};return r instanceof RegExp&&(a.pattern=r),new t(a)}function vs(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??kr,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function lt(t,e,r={path:[],schemaPath:[]}){var n;let i=t._zod.def,a=e.seen.get(t);if(a)return a.count++,r.schemaPath.includes(t)&&(a.cycle=r.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,o);let s=t._zod.toJSONSchema?.();if(s)o.schema=s;else{let m={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,m);else{let h=o.schema,w=e.processors[i.type];if(!w)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);w(t,e,h,m)}let x=t._zod.parent;x&&(o.ref||(o.ref=x),lt(x,e,m),e.seen.get(x).isParent=!0)}let u=e.metadataRegistry.get(t);return u&&Object.assign(o.schema,u),e.io==="input"&&ti(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&"_prefault"in o.schema&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function xs(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let o of t.seen.entries()){let s=t.metadataRegistry.get(o[0])?.id;if(s){let u=n.get(s);if(u&&u!==o[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,o[0])}}let i=o=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let x=t.external.registry.get(o[0])?.id,h=t.external.uri??(A=>A);if(x)return{ref:h(x)};let w=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=w,{defId:w,ref:`${h("__shared")}#/${s}/${w}`}}if(o[1]===r)return{ref:"#"};let d=`#/${s}/`,m=o[1].schema.id??`__schema${t.counter++}`;return{defId:m,ref:d+m}},a=o=>{if(o[1].schema.$ref)return;let s=o[1],{ref:u,defId:d}=i(o);s.def={...s.schema},d&&(s.defId=d);let m=s.schema;for(let x in m)delete m[x];m.$ref=u};if(t.cycles==="throw")for(let o of t.seen.entries()){let s=o[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
80
+
81
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of t.seen.entries()){let s=o[1];if(e===o[0]){a(o);continue}if(t.external){let d=t.external.registry.get(o[0])?.id;if(e!==o[0]&&d){a(o);continue}}if(t.metadataRegistry.get(o[0])?.id){a(o);continue}if(s.cycle){a(o);continue}if(s.count>1&&t.reused==="ref"){a(o);continue}}}function ys(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let u=t.seen.get(s);if(u.ref===null)return;let d=u.def??u.schema,m={...d},x=u.ref;if(u.ref=null,x){n(x);let w=t.seen.get(x),A=w.schema;if(A.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(A)):Object.assign(d,A),Object.assign(d,m),s._zod.parent===x)for(let C in d)C==="$ref"||C==="allOf"||C in m||delete d[C];if(A.$ref&&w.def)for(let C in d)C==="$ref"||C==="allOf"||C in w.def&&JSON.stringify(d[C])===JSON.stringify(w.def[C])&&delete d[C]}let h=s._zod.parent;if(h&&h!==x){n(h);let w=t.seen.get(h);if(w?.schema.$ref&&(d.$ref=w.schema.$ref,w.def))for(let A in d)A==="$ref"||A==="allOf"||A in w.def&&JSON.stringify(d[A])===JSON.stringify(w.def[A])&&delete d[A]}t.override({zodSchema:s,jsonSchema:d,path:u.path??[]})};for(let s of[...t.seen.entries()].reverse())n(s[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let s=t.external.registry.get(e)?.id;if(!s)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(s)}Object.assign(i,r.def??r.schema);let a=t.metadataRegistry.get(e)?.id;a!==void 0&&i.id===a&&delete i.id;let o=t.external?.defs??{};for(let s of t.seen.entries()){let u=s[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,o[u.defId]=u.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let s=JSON.parse(JSON.stringify(i));return Object.defineProperty(s,"~standard",{value:{...e["~standard"],jsonSchema:{input:Pd(e,"input",t.processors),output:Pd(e,"output",t.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ti(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return ti(n.element,r);if(n.type==="set")return ti(n.valueType,r);if(n.type==="lazy")return ti(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return ti(n.innerType,r);if(n.type==="intersection")return ti(n.left,r)||ti(n.right,r);if(n.type==="record"||n.type==="map")return ti(n.keyType,r)||ti(n.valueType,r);if(n.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:ti(n.in,r)||ti(n.out,r);if(n.type==="object"){for(let i in n.shape)if(ti(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(ti(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(ti(i,r))return!0;return!!(n.rest&&ti(n.rest,r))}return!1}var G1=(t,e={})=>r=>{let n=vs({...r,processors:e});return lt(t,n),xs(n,t),ys(n,t)},Pd=(t,e,r={})=>n=>{let{libraryOptions:i,target:a}=n??{},o=vs({...i??{},target:a,io:e,processors:r});return lt(t,o),xs(o,t),ys(o,t)};var BR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},H1=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:a,maximum:o,format:s,patterns:u,contentEncoding:d}=t._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof o=="number"&&(i.maxLength=o),s&&(i.format=BR[s]??s,i.format===""&&delete i.format,s==="time"&&delete i.format),d&&(i.contentEncoding=d),u&&u.size>0){let m=[...u];m.length===1?i.pattern=m[0].source:m.length>1&&(i.allOf=[...m.map(x=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},q1=(t,e,r,n)=>{let i=r,{minimum:a,maximum:o,format:s,multipleOf:u,exclusiveMaximum:d,exclusiveMinimum:m}=t._zod.bag;typeof s=="string"&&s.includes("int")?i.type="integer":i.type="number";let x=typeof m=="number"&&m>=(a??Number.NEGATIVE_INFINITY),h=typeof d=="number"&&d<=(o??Number.POSITIVE_INFINITY),w=e.target==="draft-04"||e.target==="openapi-3.0";x?w?(i.minimum=m,i.exclusiveMinimum=!0):i.exclusiveMinimum=m:typeof a=="number"&&(i.minimum=a),h?w?(i.maximum=d,i.exclusiveMaximum=!0):i.exclusiveMaximum=d:typeof o=="number"&&(i.maximum=o),typeof u=="number"&&(i.multipleOf=u)},J1=(t,e,r,n)=>{r.type="boolean"},X1=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Y1=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Q1=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},eF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},tF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},rF=(t,e,r,n)=>{r.not={}},iF=(t,e,r,n)=>{},nF=(t,e,r,n)=>{},aF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},oF=(t,e,r,n)=>{let i=t._zod.def,a=cm(i.entries);a.every(o=>typeof o=="number")&&(r.type="number"),a.every(o=>typeof o=="string")&&(r.type="string"),r.enum=a},sF=(t,e,r,n)=>{let i=t._zod.def,a=[];for(let o of i.values)if(o===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let o=a[0];r.type=o===null?"null":typeof o,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[o]:r.const=o}else a.every(o=>typeof o=="number")&&(r.type="number"),a.every(o=>typeof o=="string")&&(r.type="string"),a.every(o=>typeof o=="boolean")&&(r.type="boolean"),a.every(o=>o===null)&&(r.type="null"),r.enum=a},lF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},uF=(t,e,r,n)=>{let i=r,a=t._zod.pattern;if(!a)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=a.source},cF=(t,e,r,n)=>{let i=r,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:s,mime:u}=t._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),u?u.length===1?(a.contentMediaType=u[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=u.map(d=>({contentMediaType:d}))):Object.assign(i,a)},dF=(t,e,r,n)=>{r.type="boolean"},pF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},fF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},mF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},hF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},gF=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},vF=(t,e,r,n)=>{let i=r,a=t._zod.def,{minimum:o,maximum:s}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=lt(a.element,e,{...n,path:[...n.path,"items"]})},xF=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="object",i.properties={};let o=a.shape;for(let d in o)i.properties[d]=lt(o[d],e,{...n,path:[...n.path,"properties",d]});let s=new Set(Object.keys(o)),u=new Set([...s].filter(d=>{let m=a.shape[d]._zod;return e.io==="input"?m.optin===void 0:m.optout===void 0}));u.size>0&&(i.required=Array.from(u)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=lt(a.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},nw=(t,e,r,n)=>{let i=t._zod.def,a=i.inclusive===!1,o=i.options.map((s,u)=>lt(s,e,{...n,path:[...n.path,a?"oneOf":"anyOf",u]}));a?r.oneOf=o:r.anyOf=o},yF=(t,e,r,n)=>{let i=t._zod.def,a=lt(i.left,e,{...n,path:[...n.path,"allOf",0]}),o=lt(i.right,e,{...n,path:[...n.path,"allOf",1]}),s=d=>"allOf"in d&&Object.keys(d).length===1,u=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];r.allOf=u},wF=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="array";let o=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",u=a.items.map((h,w)=>lt(h,e,{...n,path:[...n.path,o,w]})),d=a.rest?lt(a.rest,e,{...n,path:[...n.path,s,...e.target==="openapi-3.0"?[a.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=u,d&&(i.items=d)):e.target==="openapi-3.0"?(i.items={anyOf:u},d&&i.items.anyOf.push(d),i.minItems=u.length,d||(i.maxItems=u.length)):(i.items=u,d&&(i.additionalItems=d));let{minimum:m,maximum:x}=t._zod.bag;typeof m=="number"&&(i.minItems=m),typeof x=="number"&&(i.maxItems=x)},bF=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="object";let o=a.keyType,u=o._zod.bag?.patterns;if(a.mode==="loose"&&u&&u.size>0){let m=lt(a.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let x of u)i.patternProperties[x.source]=m}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=lt(a.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=lt(a.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let d=o._zod.values;if(d){let m=[...d].filter(x=>typeof x=="string"||typeof x=="number");m.length>0&&(i.required=m)}},_F=(t,e,r,n)=>{let i=t._zod.def,a=lt(i.innerType,e,n),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},AF=(t,e,r,n)=>{let i=t._zod.def;lt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},FF=(t,e,r,n)=>{let i=t._zod.def;lt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},EF=(t,e,r,n)=>{let i=t._zod.def;lt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},SF=(t,e,r,n)=>{let i=t._zod.def;lt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},PF=(t,e,r,n)=>{let i=t._zod.def,a=i.in._zod.traits.has("$ZodTransform"),o=e.io==="input"?a?i.out:i.in:i.out;lt(o,e,n);let s=e.seen.get(t);s.ref=o},$F=(t,e,r,n)=>{let i=t._zod.def;lt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,r.readOnly=!0},kF=(t,e,r,n)=>{let i=t._zod.def;lt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},aw=(t,e,r,n)=>{let i=t._zod.def;lt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},NF=(t,e,r,n)=>{let i=t._zod.innerType;lt(i,e,n);let a=e.seen.get(t);a.ref=i},iw={string:H1,number:q1,boolean:J1,bigint:X1,symbol:Y1,null:Q1,undefined:eF,void:tF,never:rF,any:iF,unknown:nF,date:aF,enum:oF,literal:sF,nan:lF,template_literal:uF,file:cF,success:dF,custom:pF,function:fF,transform:mF,map:hF,set:gF,array:vF,object:xF,union:nw,intersection:yF,tuple:wF,record:bF,nullable:_F,nonoptional:AF,default:FF,prefault:EF,catch:SF,pipe:PF,readonly:$F,promise:kF,optional:aw,lazy:NF};function ow(t,e){if("_idmap"in t){let n=t,i=vs({...e,processors:iw}),a={};for(let u of n._idmap.entries()){let[d,m]=u;lt(m,i)}let o={},s={registry:n,uri:e?.uri,defs:a};i.external=s;for(let u of n._idmap.entries()){let[d,m]=u;xs(i,m),o[d]=ys(i,m)}if(Object.keys(a).length>0){let u=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[u]:a}}return{schemas:o}}let r=vs({...e,processors:iw});return lt(t,r),xs(r,t),ys(r,t)}var sw=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=vs({processors:iw,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return lt(e,this.ctx,r)}emit(e,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),xs(this.ctx,e);let n=ys(this.ctx,e),{"~standard":i,...a}=n;return a}};var Vk={};var $m={};Da($m,{ZodAny:()=>eE,ZodArray:()=>nE,ZodBase64:()=>$w,ZodBase64URL:()=>kw,ZodBigInt:()=>Dd,ZodBigIntFormat:()=>Iw,ZodBoolean:()=>Td,ZodCIDRv4:()=>Sw,ZodCIDRv6:()=>Pw,ZodCUID:()=>yw,ZodCUID2:()=>ww,ZodCatch:()=>SE,ZodCodec:()=>Um,ZodCustom:()=>Vm,ZodCustomStringFormat:()=>Id,ZodDate:()=>Dm,ZodDefault:()=>wE,ZodDiscriminatedUnion:()=>oE,ZodE164:()=>Nw,ZodEmail:()=>gw,ZodEmoji:()=>vw,ZodEnum:()=>Nd,ZodExactOptional:()=>vE,ZodFile:()=>hE,ZodFunction:()=>RE,ZodGUID:()=>Nm,ZodIPv4:()=>Fw,ZodIPv6:()=>Ew,ZodIntersection:()=>sE,ZodJWT:()=>Mw,ZodKSUID:()=>Aw,ZodLazy:()=>BE,ZodLiteral:()=>mE,ZodMAC:()=>GF,ZodMap:()=>pE,ZodNaN:()=>$E,ZodNanoID:()=>xw,ZodNever:()=>rE,ZodNonOptional:()=>zw,ZodNull:()=>YF,ZodNullable:()=>yE,ZodNumber:()=>Bd,ZodNumberFormat:()=>Xl,ZodObject:()=>Cm,ZodOptional:()=>Cw,ZodPipe:()=>Om,ZodPrefault:()=>_E,ZodPreprocess:()=>kE,ZodPromise:()=>DE,ZodReadonly:()=>NE,ZodRecord:()=>kd,ZodSet:()=>fE,ZodString:()=>Md,ZodStringFormat:()=>dt,ZodSuccess:()=>EE,ZodSymbol:()=>JF,ZodTemplateLiteral:()=>IE,ZodTransform:()=>gE,ZodTuple:()=>uE,ZodType:()=>Te,ZodULID:()=>bw,ZodURL:()=>Tm,ZodUUID:()=>Ba,ZodUndefined:()=>XF,ZodUnion:()=>zm,ZodUnknown:()=>tE,ZodVoid:()=>iE,ZodXID:()=>_w,ZodXor:()=>aE,_ZodString:()=>hw,_default:()=>bE,_function:()=>JN,any:()=>PN,array:()=>Rm,base64:()=>cN,base64url:()=>dN,bigint:()=>_N,boolean:()=>qF,catch:()=>PE,check:()=>XN,cidrv4:()=>lN,cidrv6:()=>uN,codec:()=>ZN,cuid:()=>eN,cuid2:()=>tN,custom:()=>YN,date:()=>kN,describe:()=>QN,discriminatedUnion:()=>DN,e164:()=>pN,email:()=>Wk,emoji:()=>Yk,enum:()=>Dw,exactOptional:()=>xE,file:()=>jN,float32:()=>xN,float64:()=>yN,function:()=>JN,guid:()=>Lk,hash:()=>vN,hex:()=>gN,hostname:()=>hN,httpUrl:()=>Xk,instanceof:()=>tM,int:()=>fw,int32:()=>wN,int64:()=>AN,intersection:()=>lE,invertCodec:()=>GN,ipv4:()=>aN,ipv6:()=>sN,json:()=>iM,jwt:()=>fN,keyof:()=>NN,ksuid:()=>nN,lazy:()=>TE,literal:()=>VN,looseObject:()=>BN,looseRecord:()=>CN,mac:()=>oN,map:()=>zN,meta:()=>eM,nan:()=>LN,nanoid:()=>Qk,nativeEnum:()=>UN,never:()=>Bw,nonoptional:()=>FE,null:()=>QF,nullable:()=>Im,nullish:()=>KN,number:()=>HF,object:()=>MN,optional:()=>Mm,partialRecord:()=>RN,pipe:()=>mw,prefault:()=>AE,preprocess:()=>nM,promise:()=>qN,readonly:()=>ME,record:()=>dE,refine:()=>CE,set:()=>ON,strictObject:()=>IN,string:()=>km,stringFormat:()=>mN,stringbool:()=>rM,success:()=>WN,superRefine:()=>zE,symbol:()=>EN,templateLiteral:()=>HN,transform:()=>Rw,tuple:()=>cE,uint32:()=>bN,uint64:()=>FN,ulid:()=>rN,undefined:()=>SN,union:()=>Tw,unknown:()=>Jl,url:()=>Jk,uuid:()=>Zk,uuidv4:()=>Gk,uuidv6:()=>Hk,uuidv7:()=>qk,void:()=>$N,xid:()=>iN,xor:()=>TN});var lw={};Da(lw,{endsWith:()=>yd,gt:()=>Ma,gte:()=>ei,includes:()=>vd,length:()=>ql,lowercase:()=>hd,lt:()=>Na,lte:()=>Vi,maxLength:()=>Hl,maxSize:()=>gs,mime:()=>wd,minLength:()=>co,minSize:()=>Ia,multipleOf:()=>hs,negative:()=>Qy,nonnegative:()=>tw,nonpositive:()=>ew,normalize:()=>bd,overwrite:()=>Jn,positive:()=>Yy,property:()=>rw,regex:()=>md,size:()=>Gl,slugify:()=>Ed,startsWith:()=>xd,toLowerCase:()=>Ad,toUpperCase:()=>Fd,trim:()=>_d,uppercase:()=>gd});var $d={};Da($d,{ZodISODate:()=>cw,ZodISODateTime:()=>uw,ZodISODuration:()=>pw,ZodISOTime:()=>dw,date:()=>IF,datetime:()=>MF,duration:()=>TF,time:()=>BF});var uw=I("ZodISODateTime",(t,e)=>{lA.init(t,e),dt.init(t,e)});function MF(t){return p1(uw,t)}var cw=I("ZodISODate",(t,e)=>{uA.init(t,e),dt.init(t,e)});function IF(t){return f1(cw,t)}var dw=I("ZodISOTime",(t,e)=>{cA.init(t,e),dt.init(t,e)});function BF(t){return m1(dw,t)}var pw=I("ZodISODuration",(t,e)=>{dA.init(t,e),dt.init(t,e)});function TF(t){return h1(pw,t)}var jk=(t,e)=>{hm.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>vm(t,r)},flatten:{value:r=>gm(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,ad,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,ad,2)}},isEmpty:{get(){return t.issues.length===0}}})},DR=I("ZodError",jk),wi=I("ZodError",jk,{Parent:Error});var DF=ld(wi),RF=ud(wi),CF=cd(wi),zF=dd(wi),OF=oy(wi),UF=sy(wi),VF=ly(wi),jF=uy(wi),KF=cy(wi),WF=dy(wi),LF=py(wi),ZF=fy(wi);var Kk=new WeakMap;function Bm(t,e,r){let n=Object.getPrototypeOf(t),i=Kk.get(n);if(i||(i=new Set,Kk.set(n,i)),!i.has(e)){i.add(e);for(let a in r){let o=r[a];Object.defineProperty(n,a,{configurable:!0,enumerable:!1,get(){let s=o.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var Te=I("ZodType",(t,e)=>(Pe.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Pd(t,"input"),output:Pd(t,"output")}}),t.toJSONSchema=G1(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.parse=(r,n)=>DF(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>CF(t,r,n),t.parseAsync=async(r,n)=>RF(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>zF(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>OF(t,r,n),t.decode=(r,n)=>UF(t,r,n),t.encodeAsync=async(r,n)=>VF(t,r,n),t.decodeAsync=async(r,n)=>jF(t,r,n),t.safeEncode=(r,n)=>KF(t,r,n),t.safeDecode=(r,n)=>WF(t,r,n),t.safeEncodeAsync=async(r,n)=>LF(t,r,n),t.safeDecodeAsync=async(r,n)=>ZF(t,r,n),Bm(t,"ZodType",{check(...r){let n=this.def;return this.clone(H.mergeDefs(n,{checks:[...n.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return Yr(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(CE(r,n))},superRefine(r,n){return this.check(zE(r,n))},overwrite(r){return this.check(Jn(r))},optional(){return Mm(this)},exactOptional(){return xE(this)},nullable(){return Im(this)},nullish(){return Mm(Im(this))},nonoptional(r){return FE(this,r)},array(){return Rm(this)},or(r){return Tw([this,r])},and(r){return lE(this,r)},transform(r){return mw(this,Rw(r))},default(r){return bE(this,r)},prefault(r){return AE(this,r)},catch(r){return PE(this,r)},pipe(r){return mw(this,r)},readonly(){return ME(this)},describe(r){let n=this.clone();return kr.add(n,{description:r}),n},meta(...r){if(r.length===0)return kr.get(this);let n=this.clone();return kr.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(t,"description",{get(){return kr.get(t)?.description},configurable:!0}),t)),hw=I("_ZodString",(t,e)=>{Zl.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(n,i,a)=>H1(t,n,i,a);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,Bm(t,"_ZodString",{regex(...n){return this.check(md(...n))},includes(...n){return this.check(vd(...n))},startsWith(...n){return this.check(xd(...n))},endsWith(...n){return this.check(yd(...n))},min(...n){return this.check(co(...n))},max(...n){return this.check(Hl(...n))},length(...n){return this.check(ql(...n))},nonempty(...n){return this.check(co(1,...n))},lowercase(n){return this.check(hd(n))},uppercase(n){return this.check(gd(n))},trim(){return this.check(_d())},normalize(...n){return this.check(bd(...n))},toLowerCase(){return this.check(Ad())},toUpperCase(){return this.check(Fd())},slugify(){return this.check(Ed())}})}),Md=I("ZodString",(t,e)=>{Zl.init(t,e),hw.init(t,e),t.email=r=>t.check(Iy(gw,r)),t.url=r=>t.check(Pm(Tm,r)),t.jwt=r=>t.check(Xy(Mw,r)),t.emoji=r=>t.check(Cy(vw,r)),t.guid=r=>t.check(Sm(Nm,r)),t.uuid=r=>t.check(By(Ba,r)),t.uuidv4=r=>t.check(Ty(Ba,r)),t.uuidv6=r=>t.check(Dy(Ba,r)),t.uuidv7=r=>t.check(Ry(Ba,r)),t.nanoid=r=>t.check(zy(xw,r)),t.guid=r=>t.check(Sm(Nm,r)),t.cuid=r=>t.check(Oy(yw,r)),t.cuid2=r=>t.check(Uy(ww,r)),t.ulid=r=>t.check(Vy(bw,r)),t.base64=r=>t.check(Hy($w,r)),t.base64url=r=>t.check(qy(kw,r)),t.xid=r=>t.check(jy(_w,r)),t.ksuid=r=>t.check(Ky(Aw,r)),t.ipv4=r=>t.check(Wy(Fw,r)),t.ipv6=r=>t.check(Ly(Ew,r)),t.cidrv4=r=>t.check(Zy(Sw,r)),t.cidrv6=r=>t.check(Gy(Pw,r)),t.e164=r=>t.check(Jy(Nw,r)),t.datetime=r=>t.check(MF(r)),t.date=r=>t.check(IF(r)),t.time=r=>t.check(BF(r)),t.duration=r=>t.check(TF(r))});function km(t){return l1(Md,t)}var dt=I("ZodStringFormat",(t,e)=>{ct.init(t,e),hw.init(t,e)}),gw=I("ZodEmail",(t,e)=>{Q0.init(t,e),dt.init(t,e)});function Wk(t){return Iy(gw,t)}var Nm=I("ZodGUID",(t,e)=>{X0.init(t,e),dt.init(t,e)});function Lk(t){return Sm(Nm,t)}var Ba=I("ZodUUID",(t,e)=>{Y0.init(t,e),dt.init(t,e)});function Zk(t){return By(Ba,t)}function Gk(t){return Ty(Ba,t)}function Hk(t){return Dy(Ba,t)}function qk(t){return Ry(Ba,t)}var Tm=I("ZodURL",(t,e)=>{eA.init(t,e),dt.init(t,e)});function Jk(t){return Pm(Tm,t)}function Xk(t){return Pm(Tm,{protocol:Ui.httpProtocol,hostname:Ui.domain,...H.normalizeParams(t)})}var vw=I("ZodEmoji",(t,e)=>{tA.init(t,e),dt.init(t,e)});function Yk(t){return Cy(vw,t)}var xw=I("ZodNanoID",(t,e)=>{rA.init(t,e),dt.init(t,e)});function Qk(t){return zy(xw,t)}var yw=I("ZodCUID",(t,e)=>{iA.init(t,e),dt.init(t,e)});function eN(t){return Oy(yw,t)}var ww=I("ZodCUID2",(t,e)=>{nA.init(t,e),dt.init(t,e)});function tN(t){return Uy(ww,t)}var bw=I("ZodULID",(t,e)=>{aA.init(t,e),dt.init(t,e)});function rN(t){return Vy(bw,t)}var _w=I("ZodXID",(t,e)=>{oA.init(t,e),dt.init(t,e)});function iN(t){return jy(_w,t)}var Aw=I("ZodKSUID",(t,e)=>{sA.init(t,e),dt.init(t,e)});function nN(t){return Ky(Aw,t)}var Fw=I("ZodIPv4",(t,e)=>{pA.init(t,e),dt.init(t,e)});function aN(t){return Wy(Fw,t)}var GF=I("ZodMAC",(t,e)=>{mA.init(t,e),dt.init(t,e)});function oN(t){return c1(GF,t)}var Ew=I("ZodIPv6",(t,e)=>{fA.init(t,e),dt.init(t,e)});function sN(t){return Ly(Ew,t)}var Sw=I("ZodCIDRv4",(t,e)=>{hA.init(t,e),dt.init(t,e)});function lN(t){return Zy(Sw,t)}var Pw=I("ZodCIDRv6",(t,e)=>{gA.init(t,e),dt.init(t,e)});function uN(t){return Gy(Pw,t)}var $w=I("ZodBase64",(t,e)=>{xA.init(t,e),dt.init(t,e)});function cN(t){return Hy($w,t)}var kw=I("ZodBase64URL",(t,e)=>{yA.init(t,e),dt.init(t,e)});function dN(t){return qy(kw,t)}var Nw=I("ZodE164",(t,e)=>{wA.init(t,e),dt.init(t,e)});function pN(t){return Jy(Nw,t)}var Mw=I("ZodJWT",(t,e)=>{bA.init(t,e),dt.init(t,e)});function fN(t){return Xy(Mw,t)}var Id=I("ZodCustomStringFormat",(t,e)=>{_A.init(t,e),dt.init(t,e)});function mN(t,e,r={}){return Sd(Id,t,e,r)}function hN(t){return Sd(Id,"hostname",Ui.hostname,t)}function gN(t){return Sd(Id,"hex",Ui.hex,t)}function vN(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=Ui[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Sd(Id,n,i,e)}var Bd=I("ZodNumber",(t,e)=>{_y.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(n,i,a)=>q1(t,n,i,a),Bm(t,"ZodNumber",{gt(n,i){return this.check(Ma(n,i))},gte(n,i){return this.check(ei(n,i))},min(n,i){return this.check(ei(n,i))},lt(n,i){return this.check(Na(n,i))},lte(n,i){return this.check(Vi(n,i))},max(n,i){return this.check(Vi(n,i))},int(n){return this.check(fw(n))},safe(n){return this.check(fw(n))},positive(n){return this.check(Ma(0,n))},nonnegative(n){return this.check(ei(0,n))},negative(n){return this.check(Na(0,n))},nonpositive(n){return this.check(Vi(0,n))},multipleOf(n,i){return this.check(hs(n,i))},step(n,i){return this.check(hs(n,i))},finite(){return this}});let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function HF(t){return g1(Bd,t)}var Xl=I("ZodNumberFormat",(t,e)=>{AA.init(t,e),Bd.init(t,e)});function fw(t){return x1(Xl,t)}function xN(t){return y1(Xl,t)}function yN(t){return w1(Xl,t)}function wN(t){return b1(Xl,t)}function bN(t){return _1(Xl,t)}var Td=I("ZodBoolean",(t,e)=>{bm.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>J1(t,r,n,i)});function qF(t){return A1(Td,t)}var Dd=I("ZodBigInt",(t,e)=>{Ay.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(n,i,a)=>X1(t,n,i,a),t.gte=(n,i)=>t.check(ei(n,i)),t.min=(n,i)=>t.check(ei(n,i)),t.gt=(n,i)=>t.check(Ma(n,i)),t.gte=(n,i)=>t.check(ei(n,i)),t.min=(n,i)=>t.check(ei(n,i)),t.lt=(n,i)=>t.check(Na(n,i)),t.lte=(n,i)=>t.check(Vi(n,i)),t.max=(n,i)=>t.check(Vi(n,i)),t.positive=n=>t.check(Ma(BigInt(0),n)),t.negative=n=>t.check(Na(BigInt(0),n)),t.nonpositive=n=>t.check(Vi(BigInt(0),n)),t.nonnegative=n=>t.check(ei(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(hs(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function _N(t){return E1(Dd,t)}var Iw=I("ZodBigIntFormat",(t,e)=>{FA.init(t,e),Dd.init(t,e)});function AN(t){return P1(Iw,t)}function FN(t){return $1(Iw,t)}var JF=I("ZodSymbol",(t,e)=>{EA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Y1(t,r,n,i)});function EN(t){return k1(JF,t)}var XF=I("ZodUndefined",(t,e)=>{SA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>eF(t,r,n,i)});function SN(t){return N1(XF,t)}var YF=I("ZodNull",(t,e)=>{PA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Q1(t,r,n,i)});function QF(t){return M1(YF,t)}var eE=I("ZodAny",(t,e)=>{$A.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>iF(t,r,n,i)});function PN(){return I1(eE)}var tE=I("ZodUnknown",(t,e)=>{kA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>nF(t,r,n,i)});function Jl(){return B1(tE)}var rE=I("ZodNever",(t,e)=>{NA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>rF(t,r,n,i)});function Bw(t){return T1(rE,t)}var iE=I("ZodVoid",(t,e)=>{MA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>tF(t,r,n,i)});function $N(t){return D1(iE,t)}var Dm=I("ZodDate",(t,e)=>{IA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(n,i,a)=>aF(t,n,i,a),t.min=(n,i)=>t.check(ei(n,i)),t.max=(n,i)=>t.check(Vi(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function kN(t){return R1(Dm,t)}var nE=I("ZodArray",(t,e)=>{BA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>vF(t,r,n,i),t.element=e.element,Bm(t,"ZodArray",{min(r,n){return this.check(co(r,n))},nonempty(r){return this.check(co(1,r))},max(r,n){return this.check(Hl(r,n))},length(r,n){return this.check(ql(r,n))},unwrap(){return this.element}})});function Rm(t,e){return O1(nE,t,e)}function NN(t){let e=t._zod.def.shape;return Dw(Object.keys(e))}var Cm=I("ZodObject",(t,e)=>{TA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>xF(t,r,n,i),H.defineLazy(t,"shape",()=>e.shape),Bm(t,"ZodObject",{keyof(){return Dw(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Jl()})},loose(){return this.clone({...this._zod.def,catchall:Jl()})},strict(){return this.clone({...this._zod.def,catchall:Bw()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return H.extend(this,r)},safeExtend(r){return H.safeExtend(this,r)},merge(r){return H.merge(this,r)},pick(r){return H.pick(this,r)},omit(r){return H.omit(this,r)},partial(...r){return H.partial(Cw,this,r[0])},required(...r){return H.required(zw,this,r[0])}})});function MN(t,e){let r={type:"object",shape:t??{},...H.normalizeParams(e)};return new Cm(r)}function IN(t,e){return new Cm({type:"object",shape:t,catchall:Bw(),...H.normalizeParams(e)})}function BN(t,e){return new Cm({type:"object",shape:t,catchall:Jl(),...H.normalizeParams(e)})}var zm=I("ZodUnion",(t,e)=>{_m.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>nw(t,r,n,i),t.options=e.options});function Tw(t,e){return new zm({type:"union",options:t,...H.normalizeParams(e)})}var aE=I("ZodXor",(t,e)=>{zm.init(t,e),DA.init(t,e),t._zod.processJSONSchema=(r,n,i)=>nw(t,r,n,i),t.options=e.options});function TN(t,e){return new aE({type:"union",options:t,inclusive:!1,...H.normalizeParams(e)})}var oE=I("ZodDiscriminatedUnion",(t,e)=>{zm.init(t,e),RA.init(t,e)});function DN(t,e,r){return new oE({type:"union",options:e,discriminator:t,...H.normalizeParams(r)})}var sE=I("ZodIntersection",(t,e)=>{CA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>yF(t,r,n,i)});function lE(t,e){return new sE({type:"intersection",left:t,right:e})}var uE=I("ZodTuple",(t,e)=>{Fy.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>wF(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});function cE(t,e,r){let n=e instanceof Pe,i=n?r:e,a=n?e:null;return new uE({type:"tuple",items:t,rest:a,...H.normalizeParams(i)})}var kd=I("ZodRecord",(t,e)=>{zA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>bF(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});function dE(t,e,r){return!e||!e._zod?new kd({type:"record",keyType:km(),valueType:t,...H.normalizeParams(e)}):new kd({type:"record",keyType:t,valueType:e,...H.normalizeParams(r)})}function RN(t,e,r){let n=Yr(t);return n._zod.values=void 0,new kd({type:"record",keyType:n,valueType:e,...H.normalizeParams(r)})}function CN(t,e,r){return new kd({type:"record",keyType:t,valueType:e,mode:"loose",...H.normalizeParams(r)})}var pE=I("ZodMap",(t,e)=>{OA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>hF(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(Ia(...r)),t.nonempty=r=>t.check(Ia(1,r)),t.max=(...r)=>t.check(gs(...r)),t.size=(...r)=>t.check(Gl(...r))});function zN(t,e,r){return new pE({type:"map",keyType:t,valueType:e,...H.normalizeParams(r)})}var fE=I("ZodSet",(t,e)=>{UA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>gF(t,r,n,i),t.min=(...r)=>t.check(Ia(...r)),t.nonempty=r=>t.check(Ia(1,r)),t.max=(...r)=>t.check(gs(...r)),t.size=(...r)=>t.check(Gl(...r))});function ON(t,e){return new fE({type:"set",valueType:t,...H.normalizeParams(e)})}var Nd=I("ZodEnum",(t,e)=>{VA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(n,i,a)=>oF(t,n,i,a),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let a={};for(let o of n)if(r.has(o))a[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Nd({...e,checks:[],...H.normalizeParams(i),entries:a})},t.exclude=(n,i)=>{let a={...e.entries};for(let o of n)if(r.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new Nd({...e,checks:[],...H.normalizeParams(i),entries:a})}});function Dw(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Nd({type:"enum",entries:r,...H.normalizeParams(e)})}function UN(t,e){return new Nd({type:"enum",entries:t,...H.normalizeParams(e)})}var mE=I("ZodLiteral",(t,e)=>{jA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>sF(t,r,n,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function VN(t,e){return new mE({type:"literal",values:Array.isArray(t)?t:[t],...H.normalizeParams(e)})}var hE=I("ZodFile",(t,e)=>{KA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>cF(t,r,n,i),t.min=(r,n)=>t.check(Ia(r,n)),t.max=(r,n)=>t.check(gs(r,n)),t.mime=(r,n)=>t.check(wd(Array.isArray(r)?r:[r],n))});function jN(t){return U1(hE,t)}var gE=I("ZodTransform",(t,e)=>{WA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>mF(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new cs(t.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(H.issue(a,r.value,e));else{let o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),r.issues.push(H.issue(o))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r.fallback=!0,r)):(r.value=i,r.fallback=!0,r)}});function Rw(t){return new gE({type:"transform",transform:t})}var Cw=I("ZodOptional",(t,e)=>{Ey.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>aw(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Mm(t){return new Cw({type:"optional",innerType:t})}var vE=I("ZodExactOptional",(t,e)=>{LA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>aw(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function xE(t){return new vE({type:"optional",innerType:t})}var yE=I("ZodNullable",(t,e)=>{ZA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>_F(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Im(t){return new yE({type:"nullable",innerType:t})}function KN(t){return Mm(Im(t))}var wE=I("ZodDefault",(t,e)=>{GA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>FF(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function bE(t,e){return new wE({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():H.shallowClone(e)}})}var _E=I("ZodPrefault",(t,e)=>{HA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>EF(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function AE(t,e){return new _E({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():H.shallowClone(e)}})}var zw=I("ZodNonOptional",(t,e)=>{qA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>AF(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function FE(t,e){return new zw({type:"nonoptional",innerType:t,...H.normalizeParams(e)})}var EE=I("ZodSuccess",(t,e)=>{JA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>dF(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function WN(t){return new EE({type:"success",innerType:t})}var SE=I("ZodCatch",(t,e)=>{XA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>SF(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function PE(t,e){return new SE({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var $E=I("ZodNaN",(t,e)=>{YA.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>lF(t,r,n,i)});function LN(t){return z1($E,t)}var Om=I("ZodPipe",(t,e)=>{Sy.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>PF(t,r,n,i),t.in=e.in,t.out=e.out});function mw(t,e){return new Om({type:"pipe",in:t,out:e})}var Um=I("ZodCodec",(t,e)=>{Om.init(t,e),Am.init(t,e)});function ZN(t,e,r){return new Um({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function GN(t){let e=t._zod.def;return new Um({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}var kE=I("ZodPreprocess",(t,e)=>{Om.init(t,e),QA.init(t,e)}),NE=I("ZodReadonly",(t,e)=>{e1.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>$F(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function ME(t){return new NE({type:"readonly",innerType:t})}var IE=I("ZodTemplateLiteral",(t,e)=>{t1.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>uF(t,r,n,i)});function HN(t,e){return new IE({type:"template_literal",parts:t,...H.normalizeParams(e)})}var BE=I("ZodLazy",(t,e)=>{n1.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>NF(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});function TE(t){return new BE({type:"lazy",getter:t})}var DE=I("ZodPromise",(t,e)=>{i1.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>kF(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function qN(t){return new DE({type:"promise",innerType:t})}var RE=I("ZodFunction",(t,e)=>{r1.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>fF(t,r,n,i)});function JN(t){return new RE({type:"function",input:Array.isArray(t?.input)?cE(t?.input):t?.input??Rm(Jl()),output:t?.output??Jl()})}var Vm=I("ZodCustom",(t,e)=>{a1.init(t,e),Te.init(t,e),t._zod.processJSONSchema=(r,n,i)=>pF(t,r,n,i)});function XN(t){let e=new ft({check:"custom"});return e._zod.check=t,e}function YN(t,e){return V1(Vm,t??(()=>!0),e)}function CE(t,e={}){return j1(Vm,t,e)}function zE(t,e){return K1(t,e)}var QN=W1,eM=L1;function tM(t,e={}){let r=new Vm({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...H.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var rM=(...t)=>Z1({Codec:Um,Boolean:Td,String:Md},...t);function iM(t){let e=TE(()=>Tw([km(t),HF(),qF(),QF(),Rm(e),dE(km(),e)]));return e}function nM(t,e){return new kE({type:"pipe",in:Rw(t),out:e})}var CR={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function zR(t){jt({customError:t})}function OR(){return jt().customError}var OE;OE||(OE={});var ie={...$m,...lw,iso:$d},UR=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function VR(t,e){let r=t.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function jR(t,e){if(!t.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=t.slice(1).split("/").filter(Boolean);if(r.length===0)return e.rootSchema;let n=e.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let i=r[1];if(!i||!e.defs[i])throw new Error(`Reference not found: ${t}`);return e.defs[i]}throw new Error(`Reference not found: ${t}`)}function aM(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return ie.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let i=t.$ref;if(e.refs.has(i))return e.refs.get(i);if(e.processing.has(i))return ie.lazy(()=>{if(!e.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return e.refs.get(i)});e.processing.add(i);let a=jR(i,e),o=Vr(a,e);return e.refs.set(i,o),e.processing.delete(i),o}if(t.enum!==void 0){let i=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&i.length===1&&i[0]===null)return ie.null();if(i.length===0)return ie.never();if(i.length===1)return ie.literal(i[0]);if(i.every(o=>typeof o=="string"))return ie.enum(i);let a=i.map(o=>ie.literal(o));return a.length<2?a[0]:ie.union([a[0],a[1],...a.slice(2)])}if(t.const!==void 0)return ie.literal(t.const);let r=t.type;if(Array.isArray(r)){let i=r.map(a=>{let o={...t,type:a};return aM(o,e)});return i.length===0?ie.never():i.length===1?i[0]:ie.union(i)}if(!r)return ie.any();let n;switch(r){case"string":{let i=ie.string();if(t.format){let a=t.format;a==="email"?i=i.check(ie.email()):a==="uri"||a==="uri-reference"?i=i.check(ie.url()):a==="uuid"||a==="guid"?i=i.check(ie.uuid()):a==="date-time"?i=i.check(ie.iso.datetime()):a==="date"?i=i.check(ie.iso.date()):a==="time"?i=i.check(ie.iso.time()):a==="duration"?i=i.check(ie.iso.duration()):a==="ipv4"?i=i.check(ie.ipv4()):a==="ipv6"?i=i.check(ie.ipv6()):a==="mac"?i=i.check(ie.mac()):a==="cidr"?i=i.check(ie.cidrv4()):a==="cidr-v6"?i=i.check(ie.cidrv6()):a==="base64"?i=i.check(ie.base64()):a==="base64url"?i=i.check(ie.base64url()):a==="e164"?i=i.check(ie.e164()):a==="jwt"?i=i.check(ie.jwt()):a==="emoji"?i=i.check(ie.emoji()):a==="nanoid"?i=i.check(ie.nanoid()):a==="cuid"?i=i.check(ie.cuid()):a==="cuid2"?i=i.check(ie.cuid2()):a==="ulid"?i=i.check(ie.ulid()):a==="xid"?i=i.check(ie.xid()):a==="ksuid"&&(i=i.check(ie.ksuid()))}typeof t.minLength=="number"&&(i=i.min(t.minLength)),typeof t.maxLength=="number"&&(i=i.max(t.maxLength)),t.pattern&&(i=i.regex(new RegExp(t.pattern))),n=i;break}case"number":case"integer":{let i=r==="integer"?ie.number().int():ie.number();typeof t.minimum=="number"&&(i=i.min(t.minimum)),typeof t.maximum=="number"&&(i=i.max(t.maximum)),typeof t.exclusiveMinimum=="number"?i=i.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(i=i.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?i=i.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(i=i.lt(t.maximum)),typeof t.multipleOf=="number"&&(i=i.multipleOf(t.multipleOf)),n=i;break}case"boolean":{n=ie.boolean();break}case"null":{n=ie.null();break}case"object":{let i={},a=t.properties||{},o=new Set(t.required||[]);for(let[u,d]of Object.entries(a)){let m=Vr(d,e);i[u]=o.has(u)?m:m.optional()}if(t.propertyNames){let u=Vr(t.propertyNames,e),d=t.additionalProperties&&typeof t.additionalProperties=="object"?Vr(t.additionalProperties,e):ie.any();if(Object.keys(i).length===0){n=ie.record(u,d);break}let m=ie.object(i).passthrough(),x=ie.looseRecord(u,d);n=ie.intersection(m,x);break}if(t.patternProperties){let u=t.patternProperties,d=Object.keys(u),m=[];for(let h of d){let w=Vr(u[h],e),A=ie.string().regex(new RegExp(h));m.push(ie.looseRecord(A,w))}let x=[];if(Object.keys(i).length>0&&x.push(ie.object(i).passthrough()),x.push(...m),x.length===0)n=ie.object({}).passthrough();else if(x.length===1)n=x[0];else{let h=ie.intersection(x[0],x[1]);for(let w=2;w<x.length;w++)h=ie.intersection(h,x[w]);n=h}break}let s=ie.object(i);t.additionalProperties===!1?n=s.strict():typeof t.additionalProperties=="object"?n=s.catchall(Vr(t.additionalProperties,e)):n=s.passthrough();break}case"array":{let i=t.prefixItems,a=t.items;if(i&&Array.isArray(i)){let o=i.map(u=>Vr(u,e)),s=a&&typeof a=="object"&&!Array.isArray(a)?Vr(a,e):void 0;s?n=ie.tuple(o).rest(s):n=ie.tuple(o),typeof t.minItems=="number"&&(n=n.check(ie.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(ie.maxLength(t.maxItems)))}else if(Array.isArray(a)){let o=a.map(u=>Vr(u,e)),s=t.additionalItems&&typeof t.additionalItems=="object"?Vr(t.additionalItems,e):void 0;s?n=ie.tuple(o).rest(s):n=ie.tuple(o),typeof t.minItems=="number"&&(n=n.check(ie.minLength(t.minItems))),typeof t.maxItems=="number"&&(n=n.check(ie.maxLength(t.maxItems)))}else if(a!==void 0){let o=Vr(a,e),s=ie.array(o);typeof t.minItems=="number"&&(s=s.min(t.minItems)),typeof t.maxItems=="number"&&(s=s.max(t.maxItems)),n=s}else n=ie.array(ie.any());break}default:throw new Error(`Unsupported type: ${r}`)}return n}function Vr(t,e){if(typeof t=="boolean")return t?ie.any():ie.never();let r=aM(t,e),n=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let s=t.anyOf.map(d=>Vr(d,e)),u=ie.union(s);r=n?ie.intersection(r,u):u}if(t.oneOf&&Array.isArray(t.oneOf)){let s=t.oneOf.map(d=>Vr(d,e)),u=ie.xor(s);r=n?ie.intersection(r,u):u}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)r=n?r:ie.any();else{let s=n?r:Vr(t.allOf[0],e),u=n?0:1;for(let d=u;d<t.allOf.length;d++)s=ie.intersection(s,Vr(t.allOf[d],e));r=s}t.nullable===!0&&e.version==="openapi-3.0"&&(r=ie.nullable(r)),t.readOnly===!0&&(r=ie.readonly(r)),t.default!==void 0&&(r=r.default(t.default));let i={},a=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of a)s in t&&(i[s]=t[s]);let o=["contentEncoding","contentMediaType","contentSchema"];for(let s of o)s in t&&(i[s]=t[s]);for(let s of Object.keys(t))UR.has(s)||(i[s]=t[s]);return Object.keys(i).length>0&&e.registry.add(r,i),t.description&&(r=r.describe(t.description)),r}function oM(t,e){if(typeof t=="boolean")return t?ie.any():ie.never();let r;try{r=JSON.parse(JSON.stringify(t))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=VR(r,e?.defaultTarget),i=r.$defs||r.definitions||{},a={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:r,registry:e?.registry??kr};return Vr(r,a)}var UE={};Da(UE,{bigint:()=>ZR,boolean:()=>LR,date:()=>GR,number:()=>WR,string:()=>KR});function KR(t){return u1(Md,t)}function WR(t){return v1(Bd,t)}function LR(t){return F1(Td,t)}function ZR(t){return S1(Dd,t)}function GR(t){return C1(Dm,t)}jt(Py());var lM=[1,2,4,8],uM=[1,2,3,4,5,6,7,8],cM=["disable-track","mute-region"],dM=["none","all","previous-only"],pM=ke.object({metronome:ke.object({enabled:ke.boolean(),beatSubDivision:ke.union(lM.map(t=>ke.literal(t))),gain:ke.number().min(Number.NEGATIVE_INFINITY).max(0),monophonic:ke.boolean()}).default({enabled:!1,beatSubDivision:1,gain:-6,monophonic:!0}),playback:ke.object({timestampEnabled:ke.boolean(),pauseOnLoopDisabled:ke.boolean(),truncateNotesAtRegionEnd:ke.boolean()}).default({timestampEnabled:!0,pauseOnLoopDisabled:!1,truncateNotesAtRegionEnd:!1}),debug:ke.object({dspLoadMeasurement:ke.boolean()}).default({dspLoadMeasurement:!1}),recording:ke.object({countInBars:ke.union(uM.map(t=>ke.literal(t))),allowTakes:ke.boolean(),automationEnabled:ke.boolean(),olderTakeAction:ke.union(cM.map(t=>ke.literal(t))),olderTakeScope:ke.union(dM.map(t=>ke.literal(t))),inputLatency:ke.number().min(-1)}).default({countInBars:1,allowTakes:!0,automationEnabled:!0,olderTakeAction:"mute-region",olderTakeScope:"previous-only",inputLatency:0})}),sM;(function(t){t.BeatSubDivisionOptions=lM,t.RecordingCountInBars=uM,t.OlderTakeActionOptions=cM,t.OlderTakeScopeOptions=dM})(sM||(sM={}));var ws={[At.Instrument]:0,[At.Aux]:1,[At.Bus]:2,[At.Output]:3};var Ow;(function(t){t.create=({boxGraph:e,mandatoryBoxes:{rootBox:r,primaryAudioBusBox:n}},i,a,o)=>{let s=o??t.orderAndGetIndex(r,i);return console.debug(`createAudioUnit type: ${i}, insertIndex: ${s}`),Xe.create(e,M.generate(),u=>{u.collection.refer(r.audioUnits),u.output.refer(n.input),u.index.setValue(s),u.type.setValue(i),a.ifSome(d=>u.capture.refer(d))})},t.orderAndGetIndex=(e,r)=>{let n=ni.collectIndexedBoxes(e.audioUnits,Xe),i=ws[r],a=0;for(;a<n.length&&!(ws[n[a].type.getValue()]>i);a++);let o=a;for(;a<n.length;)n[a].index.setValue(++a);return o},t.trackTypeToCapture=(e,r)=>{switch(r){case ve.Audio:return b.wrap(oa.create(e,M.generate()));case ve.Notes:return b.wrap(sa.create(e,M.generate()));default:return b.None}}})(Ow||(Ow={}));var fM;(function(t){t.create=(e,r,n,i,a)=>{console.debug(`createAudioBus '${r}', type: ${i}, color: ${a}`);let{boxGraph:o,mandatoryBoxes:{rootBox:s}}=e;te(s.isAttached(),"rootBox not attached");let u=M.generate(),d=$n.create(o,u,x=>{x.collection.refer(s.audioBusses),x.label.setValue(r),x.icon.setValue(Le.toName(n)),x.color.setValue(a.toString())}),m=Ow.create(e,i,b.None);return Mr.create(o,M.generate(),x=>{x.tracks.refer(m.tracks),x.target.refer(m),x.index.setValue(0),x.type.setValue(ve.Undefined)}),d.output.refer(m.input),d}})(fM||(fM={}));var mM;(function(t){t.forAudioType=e=>{switch(e){case At.Output:return wo.blue;case At.Aux:return wo.purple;case At.Bus:return wo.orange;case At.Instrument:return wo.green;default:return wo.dark}},t.forTrackType=e=>{switch(e){case ve.Audio:return 200;case ve.Notes:return 45;case ve.Value:return 156;default:return 0}}})(mM||(mM={}));var hM;(function(t){t.Tape={defaultName:"Tape",defaultIcon:Le.Tape,briefDescription:"Audio Player",description:"Plays audio regions & clips",manualPage:oe.Tape,trackType:ve.Audio,create:(n,i,a,o,s)=>Pu.create(n,M.generate(),u=>{u.label.setValue(a),u.icon.setValue(Le.toName(o)),u.flutter.setValue(.2),u.wow.setValue(.05),u.noise.setValue(.02),u.saturation.setValue(.5),u.host.refer(i)})},t.Nano={defaultName:"Nano",defaultIcon:Le.NanoWave,briefDescription:"Simple Sampler",description:"Simple sampler",manualPage:oe.Nano,trackType:ve.Notes,create:(n,i,a,o,s)=>Eu.create(n,M.generate(),u=>{u.label.setValue(a),u.icon.setValue(Le.toName(o)),W(s)&&u.file.refer(s),u.host.refer(i)})},t.Playfield={defaultName:"Playfield",defaultIcon:Le.Playfield,briefDescription:"Drum Machine",description:"Drum computer",manualPage:oe.Playfield,trackType:ve.Notes,create:(n,i,a,o,s)=>{let u=Su.create(n,M.generate(),d=>{d.label.setValue(a),d.icon.setValue(Le.toName(o)),d.host.refer(i)});return W(s)&&s.filter(({note:d,uuid:m,name:x,durationInSeconds:h,exclude:w})=>{let A=e(n,m,x,h);$o.create(n,M.generate(),_=>{_.device.refer(u.samples),_.file.refer(A),_.index.setValue(d),_.exclude.setValue(w)})}),u}},t.Vaporisateur={defaultName:"Vaporisateur",defaultIcon:Le.Piano,briefDescription:"Subtractive Synth",description:"Classic subtractive synthesizer",manualPage:oe.Vaporisateur,trackType:ve.Notes,create:(n,i,a,o,s)=>_u.create(n,M.generate(),u=>{u.label.setValue(a),u.icon.setValue(Le.toName(o)),u.cutoff.setInitValue(8e3),u.resonance.setInitValue(.1),u.attack.setInitValue(.005),u.decay.setInitValue(.1),u.sustain.setInitValue(.5),u.release.setInitValue(.5),u.voicingMode.setInitValue(Bs.Polyphonic),u.lfo.rate.setInitValue(1),u.oscillators.fields()[0].waveform.setInitValue(ra.saw),u.oscillators.fields()[0].volume.setInitValue(-6),u.oscillators.fields()[1].volume.setInitValue(Number.NEGATIVE_INFINITY),u.oscillators.fields()[1].waveform.setInitValue(ra.square),u.host.refer(i),u.version.setValue(2)})},t.MIDIOutput={defaultName:"MIDIOutput",defaultIcon:Le.Midi,briefDescription:"Send MIDI",description:"MIDI Output",manualPage:oe.MIDIOutput,trackType:ve.Notes,create:(n,i,a,o,s)=>Au.create(n,M.generate(),u=>{u.label.setValue(a),u.icon.setValue(Le.toName(o)),u.host.refer(i)})},t.Soundfont={defaultName:"Soundfont",defaultIcon:Le.SoundFont,briefDescription:"Soundfont Player",description:"Soundfont Player",manualPage:oe.Soundfont,trackType:ve.Notes,create:(n,i,a,o)=>Fu.create(n,M.generate(),s=>{s.label.setValue(a),s.icon.setValue(Le.toName(o)),s.host.refer(i)})},t.Apparat={defaultName:"Apparat",defaultIcon:Le.Code,briefDescription:"Scriptable Instrument",description:"User-scripted instrument",manualPage:oe.Apparat,trackType:ve.Notes,create:(n,i,a,o)=>$u.create(n,M.generate(),s=>{s.label.setValue(a),s.icon.setValue(Le.toName(o)),s.host.refer(i)})},t.Named={Apparat:t.Apparat,MIDIOutput:t.MIDIOutput,Nano:t.Nano,Playfield:t.Playfield,Soundfont:t.Soundfont,Tape:t.Tape,Vaporisateur:t.Vaporisateur};let e=(n,i,a,o)=>n.findBox(i).unwrapOrElse(()=>Wi.create(n,i,s=>{s.fileName.setValue(a),s.endInSeconds.setValue(o)})),r=(n,i,a)=>n.findBox(i).unwrapOrElse(()=>aa.create(n,i,o=>o.fileName.setValue(a)))})(hM||(hM={}));var Yl;(function(t){t.empty=n=>{let i=new Ua(b.wrap(Ka.create)),a=new Date().toISOString();console.debug(`New Project created on ${a}`),i.beginTransaction();let o=wu.create(i,M.generate(),h=>{h.label.setValue("Groove Shuffle")}),s=_o.create(i,M.generate(),h=>{h.groove.refer(o),h.created.setValue(a)}),u=$n.create(i,M.generate(),h=>{h.collection.refer(s.audioBusses),h.label.setValue("Output"),h.icon.setValue(Le.toName(Le.SpeakerHeadphone)),h.color.setValue(wo.blue.toString())}),d=Xe.create(i,M.generate(),h=>{h.type.setValue(At.Output),h.collection.refer(s.audioUnits),h.output.refer(s.outputDevice),h.index.setValue(0)});n.createOutputMaximizer&&bu.create(i,M.generate(),h=>{h.label.setValue("Master Maximizer"),h.index.setValue(0),h.host.refer(d.audioEffects),h.lookahead.setValue(!1)});let m=Ts.create(i,M.generate());Pn.create(i,M.generate(),h=>m.tempoTrack.events.refer(h.owners)),s.timeline.refer(m.root),u.output.refer(d.input);let x=[];if(n.createDefaultUser){let h=Wa.create(i,M.generate());h.root.refer(s.users),x.push(h)}return i.endTransaction(),{boxGraph:i,mandatoryBoxes:{rootBox:s,primaryAudioBusBox:u,primaryAudioUnitBox:d,timelineBox:m,userInterfaceBoxes:x}}},t.encode=n=>{let i=Xt.create();i.writeInt(1330660686),i.writeInt(2);let a=n.toArrayBuffer();return i.writeInt(a.byteLength),i.writeBytes(new Int8Array(a)),i.toArrayBuffer()},t.decode=n=>{let i=new rt(n);te(i.readInt()===1330660686,"Corrupt header. Probably not an openDAW project file."),te(i.readInt()===2,"Deprecated Format");let a=i.readInt(),o=new Int8Array(a);i.readBytes(o);let s=new Ua(b.wrap(Ka.create));return s.fromArrayBuffer(o.buffer,!1),{boxGraph:s,mandatoryBoxes:t.findMandatoryBoxes(s)}},t.findMandatoryBoxes=n=>{let i=n.boxes().find(a=>a.accept({visitRootBox:()=>!0}));if(W(i)){let a=Ie(i.outputDevice.pointerHub.incoming().at(0)?.box,Xe),o=Ie(a.input.pointerHub.incoming().at(0)?.box,$n),s=Ie(i.timeline.targetVertex.unwrap("TimelineBox not found").box,Ts),u=i.users.pointerHub.incoming().map(({box:d})=>Ie(d,Wa));return{rootBox:i,primaryAudioBusBox:o,primaryAudioUnitBox:a,timelineBox:s,userInterfaceBoxes:u}}return V("Could not find mandatory boxes")}})(Yl||(Yl={}));var Mt;(function(t){let e=({graph:n},{graph:i})=>n===i,r=(n,i)=>n.index.getValue()-i.index.getValue();t.excludeTimelinePredicate=n=>n.accept({visitTrackBox:()=>!0})===!0,t.shouldExclude=n=>n.ephemeral||n.name===yu.ClassName,t.generateMap=(n,i,a,o)=>{let s=M.newSet(({source:u})=>u);return s.addMany([...n.filter(({output:{targetAddress:u}})=>u.nonEmpty()).map(u=>({source:u.output.targetAddress.unwrap().uuid,target:o})),...n.map(u=>({source:u.collection.targetAddress.unwrap("AudioUnitBox was not connected to a RootBox").uuid,target:a})),...n.map(u=>({source:u.address.uuid,target:M.generate()})),...i.map(u=>({source:u.address.uuid,target:u.resource==="preserved"?u.address.uuid:M.generate()}))]),s},t.copyBoxes=(n,i,a,o)=>{let s=M.newSet(d=>d);o.forEach(d=>{d.resource==="preserved"&&i.findBox(d.address.uuid).nonEmpty()&&s.add(d.address.uuid)});let u=d=>{for(let[m,x]of d.outgoingEdges())if(m.mandatory&&!x.isBox()&&s.hasKey(x.uuid))return!0;return!1};N.decodeWith({map:(d,m)=>m.flatMap(x=>n.opt(x.uuid).match({some:({target:h})=>b.wrap(x.moveTo(h)),none:()=>i.findBox(x.uuid).nonEmpty()?b.wrap(x):b.None}))},()=>{a.forEach(d=>{let m=new rt(d.toArrayBuffer()),x=n.get(d.address.uuid,"uuid mapping").target;i.createBox(d.name,x,h=>h.read(m))}),o.forEach(d=>{if(s.hasKey(d.address.uuid)||u(d))return;let m=new rt(d.toArrayBuffer()),x=n.get(d.address.uuid,"uuid mapping").target;i.createBox(d.name,x,h=>h.read(m))})})},t.reorderAudioUnits=(n,i,a,o)=>{let s=i.toSorted(r).map(h=>Ie(a.graph.findBox(n.get(h.address.uuid,"uuid mapping").target).unwrap("Target AudioUnit has not been copied"),Xe)),u=new Set(s),m=ni.collectIndexedBoxes(a.audioUnits,Xe).filter(h=>!u.has(h)),x;if(W(o)){let h=at(o,0,m.length);x=[...m.slice(0,h),...s,...m.slice(h)]}else{let h=m.toSorted((_,C)=>(ws[_.type.getValue()]??0)-(ws[C.type.getValue()]??0)),w=s.reduce((_,C)=>Math.max(_,ws[C.type.getValue()]??0),0),A=h.findIndex(_=>(ws[_.type.getValue()]??0)>w);A===-1&&(A=h.length),x=[...h.slice(0,A),...s,...h.slice(A)]}x.forEach((h,w)=>h.index.setValue(w))},t.extractRegions=(n,{boxGraph:i,mandatoryBoxes:{primaryAudioBusBox:a,rootBox:o}},s=0)=>{te(ue.satisfy(n,e),"Region smust be from the same BoxGraph");let u=new Set(n),d=new Set,m=new lh;n.forEach(K=>{let U=Ie(K.regions.targetVertex.unwrap("regions.target").box,Mr);d.add(U);let ee=Ie(U.tracks.targetVertex.unwrap("tracks.target").box,Xe);m.add(ee,U)}),console.debug(`Found ${m.keyCount()} audioUnits`),console.debug(`Found ${d.size} tracks`);let x=[...m.keys()],h=K=>t.shouldExclude(K)||$t(K,Mr)&&!d.has(K)||Hn.isRegionBox(K)&&!u.has(K),w=Array.from(x[0].graph.dependenciesOf(x,{alwaysFollowMandatory:!0,stopAtResources:!0,excludeBox:h}).boxes),A=t.generateMap(x,w,o.audioUnits.address.uuid,a.address.uuid);t.copyBoxes(A,i,x,w),t.reorderAudioUnits(A,x,o),m.forEach((K,U)=>[...U].sort(r).forEach((ee,re)=>{let me=i.findBox(A.get(ee.address.uuid,"uuid mapping").target).unwrap("Target Track has not been copied");Ie(me,Mr).index.setValue(re)}));let _=n.reduce((K,U)=>Math.min(K,U.position.getValue()),Number.MAX_VALUE),C=s-_;n.forEach(K=>{let U=i.findBox(A.get(K.address.uuid,"uuid mapping").target).unwrap("Target Track has not been copied"),{position:ee}=Hn.asRegionBox(U);ee.setValue(ee.getValue()+C)})}})(Mt||(Mt={}));var gM;(function(t){t.transfer=(e,{boxGraph:r,mandatoryBoxes:{primaryAudioBusBox:n,rootBox:i}},a={})=>{let o=e.filter(x=>x.type.getValue()!==At.Output);if(o.length===0)return[];let s=x=>Mt.shouldExclude(x)||a?.excludeTimeline===!0&&Mt.excludeTimelinePredicate(x),u=Array.from(o[0].graph.dependenciesOf(o,{alwaysFollowMandatory:!0,stopAtResources:!0,excludeBox:s}).boxes),d=Mt.generateMap(o,u,i.audioUnits.address.uuid,n.address.uuid);Mt.copyBoxes(d,r,o,u),Mt.reorderAudioUnits(d,o,i,a.insertIndex);let m=o.map(x=>Ie(i.graph.findBox(d.get(x.address.uuid,"uuid mapping").target).unwrap("Target AudioUnit has not been copied"),Xe));if(a.deleteSource===!0){let x=Ie(o[0].collection.targetVertex.unwrap("collection.target").box,_o);o.forEach(h=>h.delete()),ni.collectIndexedBoxes(x.audioUnits,Xe).forEach((h,w)=>h.index.setValue(w))}return m}})(gM||(gM={}));var vM;(function(t){t.transfer=(e,r,n,i=!0)=>{let a=r.graph,o=M.newSet(h=>h.address.uuid);o.add(e);for(let h of e.graph.dependenciesOf(e,{alwaysFollowMandatory:!0,stopAtResources:!0,excludeBox:w=>w.ephemeral}).boxes)o.add(h);let s=M.newSet(h=>h);o.forEach(h=>{h.resource==="preserved"&&a.findBox(h.address.uuid).nonEmpty()&&s.add(h.address.uuid)});let u=h=>{if(h.resource==="preserved"&&s.hasKey(h.address.uuid))return!0;for(let[,w]of h.outgoingEdges())if(s.hasKey(w.uuid)&&!w.isBox())return!0;return!1},d=o.values().filter(h=>!u(h)),m=M.newSet(h=>h.source);d.forEach(h=>{m.add({source:h.address.uuid,target:h.resource==="preserved"?h.address.uuid:M.generate()})}),s.forEach(h=>m.add({source:h,target:h}));let x=null;return N.decodeWith({map:(h,w)=>{let A=w.flatMap(_=>m.opt(_.uuid).map(C=>_.moveTo(C.target)));return A.nonEmpty()?A:h.pointerType===l.RegionCollection?b.wrap(r.regions.address):h.pointerType===l.ClipCollection?b.wrap(r.clips.address):b.None}},()=>d.forEach(h=>{let w=new rt(h.toArrayBuffer()),A=m.get(h.address.uuid,"uuid mapping").target;a.createBox(h.name,A,_=>{if(_.read(w),Hn.isRegionBox(_)){let C=Hn.asRegionBox(_);C.position.setValue(n),x=C}})})),i&&e.delete(),Ce(x,"Failed to create region copy")}})(vM||(vM={}));var Kt;(function(t){t.MAGIC_HEADER_OPEN=1330664005,t.FORMAT_VERSION=1;let e;(function(r){r[r.Midi=0]="Midi",r[r.Audio=1]="Audio"})(e=t.ChainKind||(t.ChainKind={}))})(Kt||(Kt={}));var xM;(function(t){t.decode=(e,r)=>{let n=new rt(e.slice(0,8));if(n.readInt()!==Kt.MAGIC_HEADER_OPEN)return lu.notify({message:"Invalid preset file.",icon:"Warning"}),[];let i=n.readInt();if(i!==Kt.FORMAT_VERSION)return console.warn(`Unsupported preset version ${i} (supports ${Kt.FORMAT_VERSION})`),lu.notify({message:"Unsupported preset version.",icon:"Warning"}),[];let a=new Ua(b.wrap(Ka.create));try{a.fromArrayBuffer(e.slice(8),!1)}catch(A){return console.warn(A),lu.notify({message:"Could not import preset.",icon:"Warning"}),[]}let o={};for(let A of a.boxes())o[A.name]=(o[A.name]??0)+1;console.info("PresetDecoder.decode: source graph boxes",o);let s=a.boxes().filter(A=>$t(A,Xe)).filter(A=>A.type.getValue()!==At.Output),u=A=>Mt.shouldExclude(A),d=Array.from(a.dependenciesOf(s,{alwaysFollowMandatory:!0,stopAtResources:!0,excludeBox:u}).boxes),{mandatoryBoxes:{rootBox:m,primaryAudioBusBox:x}}=r,h=Mt.generateMap(s,d,m.audioUnits.address.uuid,x.address.uuid);Mt.copyBoxes(h,r.boxGraph,s,d),Mt.reorderAudioUnits(h,s,m);let w=s.map(A=>Ie(m.graph.findBox(h.get(A.address.uuid,"uuid mapping").target).unwrap("Target AudioUnit has not been copied"),Xe)).filter(A=>A.type.getValue()!==At.Output);return w.forEach(A=>{let _=A.input.pointerHub.incoming().at(0)?.box;if(!W(_))return;let C=A.tracks.pointerHub.incoming().length;console.info(`PresetDecoder.decode: AudioUnit ${M.toString(A.address.uuid)} has ${C} pre-copied track(s)`),!(C>0)&&A.capture.targetVertex.ifSome(({box:K})=>{K instanceof sa?Mr.create(r.boxGraph,M.generate(),U=>{U.index.setValue(0),U.type.setValue(ve.Notes),U.target.refer(A),U.tracks.refer(A.tracks)}):K instanceof oa&&Mr.create(r.boxGraph,M.generate(),U=>{U.index.setValue(0),U.type.setValue(ve.Audio),U.target.refer(A),U.tracks.refer(A.tracks)})})}),w},t.peekHasTimeline=e=>{if(e.byteLength<8)return!1;let r=new rt(e.slice(0,8));if(r.readInt()!==Kt.MAGIC_HEADER_OPEN||r.readInt()!==Kt.FORMAT_VERSION)return!1;let n=new Ua(b.wrap(Ka.create));if(Ct(()=>n.fromArrayBuffer(e.slice(8),!1)).status==="failure")return!1;for(let a of n.boxes())if($t(a,Mr))return!0;return!1},t.replaceAudioUnit=(e,r,n)=>{console.debug("ReplaceAudioUnit with preset...");let i=Yl.empty({createDefaultUser:!1,createOutputMaximizer:!1}),a=i.boxGraph,o=r.graph;a.beginTransaction(),t.decode(e,i),a.endTransaction();let s=i.mandatoryBoxes.rootBox.audioUnits.pointerHub.incoming().map(({box:U})=>Ie(U,Xe)).find(U=>U.type.getValue()!==At.Output);if(db(s))return Nr.err("Preset contains no valid audio unit. Please send the file to the developers.");let u=s.capture.targetVertex.mapOr(({box:U})=>U.name,""),d=r.capture.targetVertex.mapOr(({box:U})=>U.name,"");if(u!==d)return Nr.err("Cannot replace incompatible instruments");let m=n?.keepMIDIEffects!==!0,x=n?.keepAudioEffects!==!0,h=n?.keepTimeline!==!0;console.debug("replaceMIDIEffects",m),console.debug("replaceAudioEffects",x),console.debug("replaceTimeline",h),Ce(r.input.pointerHub.incoming().at(0)?.box,"Target has no input").delete(),m?r.midiEffects.pointerHub.incoming().forEach(({box:U})=>U.delete()):(a.beginTransaction(),s.midiEffects.pointerHub.incoming().forEach(({box:U})=>U.delete()),a.endTransaction()),x?r.audioEffects.pointerHub.incoming().forEach(({box:U})=>U.delete()):(a.beginTransaction(),s.audioEffects.pointerHub.incoming().forEach(({box:U})=>U.delete()),a.endTransaction()),s.tracks.pointerHub.incoming().length>0&&h&&r.tracks.pointerHub.incoming().forEach(({box:U})=>U.delete());let A=U=>!!(U.accept({visitCaptureMidiBox:ee=>!0,visitCaptureAudioBox:ee=>!0})===!0||!h&&Mt.excludeTimelinePredicate(U)),_=M.newSet(({source:U})=>U),C=Array.from(a.dependenciesOf(s,{excludeBox:A,alwaysFollowMandatory:!0,stopAtResources:!0}).boxes);_.addMany([{source:s.address.uuid,target:r.address.uuid},...C.map(({address:{uuid:U},name:ee})=>({source:U,target:ee===Wi.ClassName||ee===aa.ClassName?U:M.generate()}))]);let K=M.newSet(U=>U);return C.forEach(U=>{(U instanceof Wi||U instanceof aa)&&o.findBox(U.address.uuid).nonEmpty()&&K.add(U.address.uuid)}),N.decodeWith({map:(U,ee)=>ee.flatMap(re=>_.opt(re.uuid).match({some:({target:me})=>b.wrap(re.moveTo(me)),none:()=>o.findBox(re.uuid).nonEmpty()?b.wrap(re):b.None}))},()=>{C.forEach(U=>{if((U instanceof Wi||U instanceof aa)&&K.opt(U.address.uuid).nonEmpty())return;let ee=new rt(U.toArrayBuffer()),re=U.name,me=_.get(U.address.uuid,"uuid mapping").target;o.createBox(re,me,$e=>$e.read(ee))})}),Nr.Ok},t.insertEffectChain=(e,r,n,i)=>{let a=new rt(e.slice(0,8));if(a.readInt()!==Kt.MAGIC_HEADER_OPEN)return Nr.err("Invalid preset header");let o=a.readInt();if(o!==Kt.FORMAT_VERSION)return Nr.err(`Unsupported preset version ${o} (this build supports ${Kt.FORMAT_VERSION}).`);let s=new Ua(b.wrap(Ka.create)),u=Ct(()=>s.fromArrayBuffer(e.slice(8),!1));if(u.status==="failure")return Nr.err(`Failed to decode preset: ${String(u.error)}`);let d=s.boxes().filter(Q=>$t(Q,Xe)).map(Q=>Ie(Q,Xe)).find(Q=>Q.type.getValue()!==At.Output);if(db(d))return Nr.err("Preset contains no audio unit");let m=i===Kt.ChainKind.Audio?d.audioEffects:d.midiEffects,x=ni.collectIndexedBoxes(m);if(x.length===0)return Nr.err("Preset contains no effects of the requested kind");let h=i===Kt.ChainKind.Audio?r.audioEffects:r.midiEffects,w=h.address,A=i===Kt.ChainKind.Audio?l.AudioEffectHost:l.MIDIEffectHost,_=r.graph,C=x.length,K=ni.collectIndexedBoxes(h);for(let Q=K.length-1;Q>=0;Q--){let we=K[Q],Ge=we.index.getValue();Ge>=n&&we.index.setValue(Ge+C)}let U=Q=>Mt.shouldExclude(Q)||Mt.excludeTimelinePredicate(Q)||Q instanceof Xe,ee=new Set(x),re=Array.from(s.dependenciesOf(x,{alwaysFollowMandatory:!0,stopAtResources:!0,excludeBox:U}).boxes).filter(Q=>!ee.has(Q)),me=M.newSet(Q=>Q);re.forEach(Q=>{Q.resource==="preserved"&&_.findBox(Q.address.uuid).nonEmpty()&&me.add(Q.address.uuid)});let $e=M.newSet(({source:Q})=>Q);return $e.addMany([...x.map(Q=>({source:Q.address.uuid,target:M.generate()})),...re.map(Q=>({source:Q.address.uuid,target:Q.resource==="preserved"?Q.address.uuid:M.generate()}))]),N.decodeWith({map:(Q,we)=>Q.pointerType===A?b.wrap(w):we.flatMap(Ge=>$e.opt(Ge.uuid).match({some:({target:It})=>b.wrap(Ge.moveTo(It)),none:()=>_.findBox(Ge.uuid).nonEmpty()?b.wrap(Ge):b.None}))},()=>{x.forEach((Q,we)=>{let Ge=new rt(Q.toArrayBuffer()),It=$e.get(Q.address.uuid,"uuid mapping").target;_.createBox(Q.name,It,Xn=>{Xn.read(Ge),ni.isIndexedBox(Xn)&&Xn.index.setValue(n+we)})}),re.forEach(Q=>{if(me.hasKey(Q.address.uuid))return;let we=new rt(Q.toArrayBuffer()),Ge=$e.get(Q.address.uuid,"uuid mapping").target;_.createBox(Q.name,Ge,It=>It.read(we))})}),Nr.Ok}})(xM||(xM={}));var yM;(function(t){t.encode=(e,r={})=>{let n=Xt.create();n.writeInt(Kt.MAGIC_HEADER_OPEN),n.writeInt(Kt.FORMAT_VERSION);let i=Yl.empty({createOutputMaximizer:!1,createDefaultUser:!1}),{boxGraph:a,mandatoryBoxes:{rootBox:o,primaryAudioBusBox:s}}=i,u=[e],d=r.excludeEffect??(()=>!1),m=r.includeTimeline===!0,x=_=>Mt.shouldExclude(_)||!m&&Mt.excludeTimelinePredicate(_)||d(_);a.beginTransaction();let h=Array.from(e.graph.dependenciesOf(u,{alwaysFollowMandatory:!0,stopAtResources:!0,excludeBox:x}).boxes),w={};for(let _ of h)w[_.name]=(w[_.name]??0)+1;console.info(`PresetEncoder.encode: includeTimeline=${m}, deps=${h.length}`,w);let A=Mt.generateMap(u,h,o.audioUnits.address.uuid,s.address.uuid);return Mt.copyBoxes(A,a,u,h),Mt.reorderAudioUnits(A,u,o),a.endTransaction(),ue.concatArrayBuffers(n.toArrayBuffer(),a.toArrayBuffer())},t.encodeEffects=(e,r)=>{let n=Xt.create();n.writeInt(Kt.MAGIC_HEADER_OPEN),n.writeInt(Kt.FORMAT_VERSION);let i=Yl.empty({createOutputMaximizer:!1,createDefaultUser:!1}),{boxGraph:a,mandatoryBoxes:{rootBox:o,primaryAudioBusBox:s}}=i;a.beginTransaction();let u=r===Kt.ChainKind.Audio?oa.create(a,M.generate()):sa.create(a,M.generate()),d=Xe.create(a,M.generate(),m=>{m.collection.refer(o.audioUnits),m.output.refer(s.input),m.index.setValue(0),m.type.setValue(At.Instrument),m.capture.refer(u)});if(ku.create(a,M.generate(),m=>{m.host.refer(d.input)}),e.length>0){let m=e[0].graph,x=K=>Mt.shouldExclude(K)||Mt.excludeTimelinePredicate(K)||K instanceof Xe,h=new Set(e),w=Array.from(m.dependenciesOf(e,{alwaysFollowMandatory:!0,stopAtResources:!0,excludeBox:x}).boxes).filter(K=>!h.has(K)),A=M.newSet(({source:K})=>K);A.addMany([...e.map(K=>({source:K.address.uuid,target:M.generate()})),...w.map(K=>({source:K.address.uuid,target:K.resource==="preserved"?K.address.uuid:M.generate()}))]);let _=r===Kt.ChainKind.Audio?d.audioEffects:d.midiEffects,C=r===Kt.ChainKind.Audio?l.AudioEffectHost:l.MIDIEffectHost;N.decodeWith({map:(K,U)=>K.pointerType===C?b.wrap(_.address):U.flatMap(ee=>A.opt(ee.uuid).match({some:({target:re})=>b.wrap(ee.moveTo(re)),none:()=>a.findBox(ee.uuid).nonEmpty()?b.wrap(ee):b.None}))},()=>{e.forEach((K,U)=>{let ee=new rt(K.toArrayBuffer()),re=A.get(K.address.uuid,"uuid mapping").target;a.createBox(K.name,re,me=>{me.read(ee),ni.isIndexedBox(me)&&me.index.setValue(U)})}),w.forEach(K=>{let U=new rt(K.toArrayBuffer()),ee=A.get(K.address.uuid,"uuid mapping").target;a.createBox(K.name,ee,re=>re.read(U))})})}return a.endTransaction(),ue.concatArrayBuffers(n.toArrayBuffer(),a.toArrayBuffer())}})(yM||(yM={}));var wM;(function(t){t.existingInstrumentNames=e=>e.audioUnits.pointerHub.incoming().map(({box:r})=>{let n=Ie(r,Xe).input.pointerHub.incoming().at(0);if(n===void 0)return"N/A";let i=n.box;return"label"in i&&i.label instanceof B?i.label.getValue():"N/A"})})(wM||(wM={}));var bM=ke.object({name:ke.string(),bpm:ke.number(),duration:ke.number(),sample_rate:ke.number(),origin:ke.enum(["openDAW","recording","import"]),custom:ke.string().optional()});var yoe=bM.extend({uuid:M.zType(ke)});var HR,qR,JR,XR,YR,QR;HR=new WeakMap,qR=new WeakMap,JR=new WeakMap,XR=new WeakMap,YR=new WeakMap,QR=new WeakMap;var e2,t2,r2,i2,n2,a2;e2=new WeakMap,t2=new WeakMap,r2=new WeakMap,i2=new WeakMap,n2=new WeakMap,a2=new WeakMap;var o2=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},sr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},bs,s2,l2,jm,_M,Uw,VE,Km,u2,jE,AM,FM,KE,EM;s2=new WeakMap,l2=new WeakMap,jm=new WeakMap,_M=new WeakMap,Uw=new WeakMap,VE=new WeakMap,Km=new WeakMap,bs=new WeakSet,u2=function(e){let r=sr(this,Km,"f");o2(this,Km,e.isEmpty()?b.None:b.wrap(e.unwrap()),"f"),r.ifSome(n=>sr(this,bs,"m",jE).call(this,n)),sr(this,Km,"f").ifSome(n=>{r.contains(n)||sr(this,bs,"m",jE).call(this,n)})},jE=function(e){let r=sr(this,_M,"f").hasKey(e.address.uuid)&&!sr(this,Km,"f").contains(e),n=sr(this,Uw,"f").hasKey(e.address.uuid);r!==n&&(r?sr(this,Uw,"f").add({user:e,terminable:sr(this,bs,"m",AM).call(this,e)}):sr(this,Uw,"f").removeByKey(e.address.uuid).terminable.terminate())},AM=function(e){let r=M.newSet(i=>i.box.address.uuid),n=e.selection.pointerHub.catchupAndSubscribe({onAdded:i=>{let a=Ie(i.box,na);a.selectable.targetVertex.ifSome(o=>{let s=o;r.add({box:a,selectable:s})&&sr(this,bs,"m",FM).call(this,s,e)})},onRemoved:i=>{let a=Ie(i.box,na),o=r.removeByKeyIfExist(a.address.uuid);W(o)&&sr(this,bs,"m",KE).call(this,o.selectable,e)}},l.Selection);return{terminate:()=>{n.terminate(),r.forEach(i=>sr(this,bs,"m",KE).call(this,i.selectable,e)),r.clear()}}},FM=function(e,r){(sr(this,jm,"f").getOrNull(e.address)??sr(this,bs,"m",EM).call(this,e)).owners.add(r),sr(this,VE,"f").proxy.onSelected(e,r)},KE=function(e,r){let n=sr(this,jm,"f").getOrNull(e.address);W(n)&&(n.owners.removeByKey(r.address.uuid),n.owners.size()===0&&sr(this,jm,"f").removeByKey(e.address),sr(this,VE,"f").proxy.onDeselected(e,r))},EM=function(e){let r={selectable:e,owners:M.newSet(n=>n.address.uuid)};return sr(this,jm,"f").add(r),r};var Rd=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},c2,d2,WE,LE,ZE,p2,f2,m2;d2=new WeakMap,WE=new WeakMap,LE=new WeakMap,ZE=new WeakMap,p2=new WeakMap,f2=new WeakMap,c2=new WeakSet,m2=function(e){return e.pointerHub.catchupAndSubscribe({onAdded:r=>{let n=Ie(r.box,na);te(n.isAttached(),"SelectionBox is not attached");let i=n.selectable.targetVertex.unwrap(()=>`SelectionBox has no target (${n.selectable.targetAddress.unwrapOrUndefined()?.toString()??"No address"})`),a={box:n,selectable:i};Rd(this,ZE,"f").proxy.onSelected(i),te(Rd(this,WE,"f").add(a),"Could not add to entityMap"),te(Rd(this,LE,"f").add(a),"Could not add to selectableMap")},onRemoved:r=>{let n=Ie(r.box,na),i=Rd(this,WE,"f").removeByKey(n.address.uuid);te(i.box===n,"Broken selection");let a=i.selectable;Rd(this,ZE,"f").proxy.onDeselected(a),Rd(this,LE,"f").removeByKey(a.address)}},l.Selection)};var SM=ke.object({name:ke.string(),size:ke.number().int(),url:ke.string(),license:ke.string(),origin:ke.enum(["openDAW","import"])});var Voe=SM.extend({uuid:M.zType(ke)});var PM;(function(t){t.cut=(e,r,n)=>{if(e.position>=r||r>=e.complete)return b.None;if(C_.isLoopableRegion(e)){let{position:i,complete:a,loopOffset:o,loopDuration:s}=e;return e.duration=r-i,b.wrap(e.copyTo({position:r,duration:a-r,loopOffset:Fs(o+(r-i),s),consolidate:n}))}else return V("Not yet implemented")},t.clip=(e,r,n)=>{if(C_.isLoopableRegion(e)){let{position:i,complete:a,loopOffset:o,loopDuration:s}=e;return r-i<=0?V(`first part duration will be zero or negative(${r-i})`):a-n<=0?V(`second part duration will be zero or negative(${a-n})`):(e.duration=r-i,e.copyTo({position:n,duration:a-n,loopOffset:Fs(o+(n-i),s)}))}else return V("Not yet implemented")}})(PM||(PM={}));var Vw=class{#e;#t;#r=0;#i=0;#n=0;#a=0;constructor(e){this.#e=new Int32Array(e),this.#t=new Float64Array(e)}start(){let e=Atomics.load(this.#e,1),r=Atomics.load(this.#e,2),n=this.#t[2],i=this.#t[3];this.#o();let a=0;return this.#r>0&&this.#i===this.#r+1&&(a=this.#a-this.#n),this.#r=e,this.#i=r,this.#n=n,this.#a=i,a}end(){this.#o()}#o(){Atomics.add(this.#e,0,1),Atomics.notify(this.#e,0)}};var jw=class t{static PEAK_DECAY=Math.exp(-1/(sampleRate*.25));static RMS_WINDOW=Math.floor(sampleRate*.1);#e;#t;#r;#i;#n;#a=0;#o=0;#s=0;#c=0;constructor(e,r){this.#e=e,this.#t=r,this.#r=new Float32Array(4),this.#i=ue.create(()=>new wh(t.RMS_WINDOW),2),this.#n=this.#e.broadcastFloats(this.#t,this.#r,n=>{this.#r[0]=this.#a,this.#r[1]=this.#o,this.#r[2]=this.#s,this.#r[3]=this.#c})}clear(){this.#i[0].clear(),this.#i[1].clear(),this.#a=0,this.#o=0}process(e,r,n=0,i=ta){let a=i-n,o=t.PEAK_DECAY**a,s=0,u=0;for(let d=n;d<i;d++){let m=Math.abs(e[d]),x=Math.abs(r[d]);m>s&&(s=m),x>u&&(u=x)}this.#a=Math.max(s,this.#a*o),this.#o=Math.max(u,this.#o*o),this.#s=this.#i[0].processBlock(e,n,i),this.#c=this.#i[1].processBlock(r,n,i)}processStereo([e,r],n=0,i=ta){this.process(e,r,n,i)}terminate(){this.#n.terminate()}};var Kw=class{#e;#t;#r;#i;#n=new Map;#a=[];constructor(e,r){this.#e=e,this.#t=new Uint32Array(r,0,2),this.#r=new Uint32Array(r,8),this.#i=(this.#r.length>>1)-1}send(e,r,n){let i=this.#n.get(e);if(th(i)){if(i=this.#a.length,i>=64)return console.error(`Too many MIDI devices: ${i}, max is 64`),!1;this.#n.set(e,i),this.#a.push(e),this.#e.postMessage({registerDevice:e,id:i})}let a=Atomics.load(this.#t,0),o=a+1&this.#i;if(o===Atomics.load(this.#t,1))return!1;let s=r.length,u=r[0]??0,d=r[1]??0,m=r[2]??0,x=s<<30|i<<24|u<<16|d<<8|m,h=n|0,w=a<<1;return this.#r[w]=x,this.#r[w+1]=h,Atomics.store(this.#t,0,o),this.#e.postMessage(null),!0}};var Ww=t=>{let e="",r=0,n=()=>(t[r++]??0)&63;for(;r<t.length;){let i=t[r++]??0,a=i<128?i:(i&224)===192?(i&31)<<6|n():(i&240)===224?(i&15)<<12|n()<<6|n():(i&248)===240?(i&7)<<18|n()<<12|n()<<6|n():65533;e+=a<=1114111?String.fromCodePoint(a):"\uFFFD"}return e};var GE=16,Lw=class{#e=new Map;#t=[new Uint8Array(1),new Uint8Array(2),new Uint8Array(3)];#r=null;connect(e,r){this.#r=new Kw(e,r)}drain(e,r){let n=e.midi_out_count();if(n===0)return;let i=e.input_reserve(n*GE),a=e.midi_out_take(i),o=this.#r;if(o===null)return;let s=new Uint8Array(r.buffer,i,a*GE).slice(),u=new DataView(s.buffer);for(let d=0;d<a;d++){let m=d*GE,x=u.getUint32(m,!0),h=Math.min(Math.max(u.getUint8(m+7),1),3),w=u.getFloat64(m+8,!0),A=this.#t[h-1];A[0]=u.getUint8(m+4),h>1&&(A[1]=u.getUint8(m+5)),h>2&&(A[2]=u.getUint8(m+6)),o.send(this.#i(e,r,x),A,w)}}#i(e,r,n){let i=this.#e.get(n);if(W(i))return i;let a=e.input_reserve(256),o=e.midi_out_device_id(n,a,256),s=o===0?"":Ww(new Uint8Array(r.buffer,a,o));return this.#e.set(n,s),s}};var $M=(t,e)=>{let r=t.panic_message_len();return r===0?"":Ww(new Uint8Array(e.buffer,t.panic_message_ptr(),r))};var h2=["host_pull_events","host_pulse_to_offset","host_bind_parameter","host_bind_broadcast","host_broadcast_ptr","host_broadcast_active","host_update_parameters","host_first_update_position","host_next_update_position","host_resolve_sample","host_observe_sample","host_resolve_soundfont","host_observe_soundfont","host_observe_field","host_observe_target_string","host_bind_sidechain","host_resolve_input","host_self_uuid","host_panic","host_base_frequency"],Zw=(t,e)=>{let r=0,n=0,i=e;for(;;){let a=t[i++];if(r|=(a&127)<<n,(a&128)===0)break;n+=7}return[r>>>0,i]},g2=t=>{let e=WebAssembly.Module.customSections(t,"dylink.0");if(e.length===0)return{memorySize:0,tableSize:0};let r=new Uint8Array(e[0]),n=0;for(;n<r.length;){let i=r[n++],[a,o]=Zw(r,n);if(i===1){let[s,u]=Zw(r,o),[,d]=Zw(r,u),[m]=Zw(r,d);return{memorySize:s,tableSize:m}}n=o+a}return{memorySize:0,tableSize:0}},kM=(t,e,r)=>{let n=r.length,i=t.input_reserve(n),a=new Uint8Array(e.buffer,i,n);for(let o=0;o<n;o++)a[o]=r.charCodeAt(o)&255;return n},NM=(t,e,r,n,i,a,o)=>{let{memorySize:s,tableSize:u}=g2(n),d=t.device_alloc(s),m=u>0?r.grow(u):r.length,x=t.device_alloc(262144),h={memory:e,__indirect_function_table:r,__memory_base:new WebAssembly.Global({value:"i32",mutable:!1},d),__table_base:new WebAssembly.Global({value:"i32",mutable:!1},m),__stack_pointer:new WebAssembly.Global({value:"i32",mutable:!0},x+262144)};for(let K of h2){let U=t[K];if(typeof U!="function")throw new Error(`engine is missing the device host export '${K}'`);h[K]=U}Object.assign(h,o);let w=new WebAssembly.Instance(n,{env:h}).exports;w.__wasm_apply_data_relocs?.(),w.__wasm_call_ctors?.();let A=K=>{if(K===void 0)return 0;let U=r.grow(1);return r.set(U,K),U},_=r.grow(1);r.set(_,w.process_events??w.process);let C=t.device_register(_,w.state_size(a),w.kind(),A(w.init),A(w.parameter_changed),A(w.field_changed),A(w.sample_changed),A(w.soundfont_changed),A(w.reset),A(w.terminate),w.midi_effects_field?.()??0,w.audio_effects_field?.()??0,w.observe_param_collection_field?.()??0,w.observe_sample_collection_field?.()??0);t.device_set_box_type(C,kM(t,e,i))},MM=(t,e,r)=>{t.composite_register(kM(t,e,r.boxType),r.childrenField,r.indexKey,r.excludeKey,r.cellInstrumentField,r.cellMidiField,r.cellAudioField,r.childEnabledKey,r.childMuteKey,r.childSoloKey)};var v2=1,Gw=class{retained=[];scheduled=[];sourceToOutput=new Map;reset(){this.retained.length=0,this.scheduled.length=0,this.sourceToOutput.clear()}},x2=(t,e,r,n,i,a,o,s,u)=>{let d=e*40;t.setFloat64(d+0,n,!0),t.setUint32(d+8,0,!0),t.setUint32(d+12,r,!0),t.setUint32(d+16,i,!0),t.setUint32(d+20,a,!0),t.setFloat32(d+24,o,!0),t.setFloat32(d+28,s,!0),t.setFloat64(d+32,u,!0)},y2=(t,e)=>t==null?"process yielded undefined":typeof t.pitch!="number"||t.pitch!==t.pitch?`Invalid pitch: ${t.pitch}`:t.pitch<0||t.pitch>127?`Pitch out of range: ${t.pitch} (must be 0-127)`:typeof t.velocity!="number"||t.velocity!==t.velocity?`Invalid velocity: ${t.velocity}`:t.velocity<0||t.velocity>1?`Velocity out of range: ${t.velocity} (must be 0-1)`:typeof t.duration!="number"||t.duration!==t.duration?`Invalid duration: ${t.duration}`:t.duration<=0?`Duration must be positive: ${t.duration}`:typeof t.position!="number"||t.position!==t.position?`Invalid position: ${t.position}`:t.position<e?`Position ${t.position} is in the past (block starts at ${e})`:null,BM=(t,e,r,n,i,a,o,s,u,d,m,x,h)=>{let w=new DataView(r,n,i*40),A=new DataView(r,a,o*40),_=0,C=($e,Q,we,Ge,It,Xn,He)=>{if(_>=o)throw new Error(`Note flood: exceeded ${o} output notes per range`);x2(A,_++,$e,Q,we,Ge,It,Xn,He)};for(let $e=t.retained.length-1;$e>=0;$e--){let Q=t.retained[$e],we=Q.position+Q.duration;we<u&&(t.retained.splice($e,1),C(1,we,Q.id,Q.pitch,0,0,0))}let K=[];for(let $e=0;$e<i;$e++){let Q=$e*40,we=w.getUint32(Q+12,!0),Ge=w.getUint32(Q+16,!0),It=w.getFloat64(Q+0,!0),Xn=w.getUint32(Q+20,!0);if(we===0)K.push({gate:!0,id:Ge,position:It,duration:w.getFloat64(Q+32,!0),pitch:Xn,velocity:w.getFloat32(Q+24,!0),cent:w.getFloat32(Q+28,!0)});else if(we===1){let He=t.sourceToOutput.get(Ge);if(He!==void 0){for(let Pt of He){let Zm=t.retained.findIndex(tu=>tu.id===Pt);if(Zm>=0){let tu=t.retained.splice(Zm,1)[0];C(1,It,tu.id,tu.pitch,0,0,0)}}t.sourceToOutput.delete(Ge)}K.push({gate:!1,id:Ge,position:It,pitch:Xn})}}for(let $e=t.scheduled.length-1;$e>=0;$e--){let Q=t.scheduled[$e];Q.position>=s&&Q.position<u&&(t.scheduled.splice($e,1),C(0,Q.position,IM(t,Q),Q.pitch,Q.velocity,Q.cent,Q.duration))}let U=-1,ee={[Symbol.iterator](){let $e=0;return{next(){if($e>=K.length)return U=-1,{done:!0,value:void 0};let Q=K[$e++];return Q.gate&&(U=Q.id),{done:!1,value:Q}}}}},re={from:s,to:u,bpm:d,s0:x,s1:h,flags:m},me=0;for(let $e of e.process(re,ee)){if(++me>128)throw new Error("Note flood: exceeded 128 notes per block");let Q=y2($e,s);if(Q!==null)throw new Error(Q);let we={position:$e.position,duration:$e.duration,pitch:$e.pitch,velocity:$e.velocity,cent:$e.cent??0};if(we.position>=u){if(t.scheduled.length>=128)throw new Error("Scheduler full: exceeded 128 scheduled notes");t.scheduled.push(we)}else{let Ge=IM(t,we);if(U>=0){let It=t.sourceToOutput.get(U);It===void 0&&(It=new Set,t.sourceToOutput.set(U,It)),It.add(Ge)}C(0,we.position,Ge,we.pitch,we.velocity,we.cent,we.duration)}}return _},IM=(t,e)=>{let r=v2++;return t.retained.push({id:r,position:e.position,duration:e.duration,pitch:e.pitch,velocity:e.velocity,cent:e.cent}),r};var Hw=128,w2=375,HE=0,DM=1,RM=2,b2={[HE]:"apparatProcessors",[DM]:"werkstattProcessors",[RM]:"spielwerkProcessors"},_2=0,TM=1e3,qE=class{constructor(e,r,n){this.uuid=e;this.kind=r;this.registryName=n}proc=null;currentUpdate=-1;silenced=!1;paramMappings=new Map;rawParams=new Map;sampleLabels=new Map;sampleHandles=new Map;limiter=null;spielwerk=null;missingCalls=0;warnedMissing=!1},A2=t=>{switch(t.mapping){case"unipolar":return S.unipolar();case"linear":return S.linear(t.min,t.max);case"exp":return S.exponential(t.min,t.max);case"int":return S.linearInteger(t.min,t.max);case"bool":return S.linearInteger(0,1);default:return S.unipolar()}},F2=(t,e,r)=>{for(let n=0;n<t.length;n++){let i=t[n];for(let a=e;a<r;a++){let o=i[a];if(o!==o)return`NaN detected in output channel ${n} at sample ${a}`;if(o>TM||o<-TM)return`Signal overflow in channel ${n} at sample ${a} (amplitude: ${o.toFixed(1)})`}}return null},qw=class{#e;#t;#r;#i;#n=new Map;#a=new Map;#o=1;constructor(e,r,n,i=()=>{}){this.#e=e,this.#t=r,this.#r=n,this.#i=i}imports(){return{host_script_create:(e,r,n)=>this.#s(e,r,n),host_script_audio:(e,r,n,i,a,o,s,u,d,m,x,h)=>this.#l(e,r,n,i,a,o,s,u,d,m,x,h),host_script_note_on:(e,r,n,i,a)=>this.#u(e,r,n,i,a),host_script_note_off:(e,r)=>this.#p(e,r),host_script_reset:e=>this.#d(e),host_script_param:(e,r,n,i)=>this.#v(e,r,n,i),host_script_sample:(e,r,n,i)=>this.#m(e,r,n,i),host_script_notes:(e,r,n,i,a,o,s,u,d,m,x)=>this.#w(e,r,n,i,a,o,s,u,d,m,x),host_script_release:e=>this.#g(e)}}#s(e,r,n){let i=M.toString(new Uint8Array(this.#e.buffer,e,16).slice()),a=this.#a.get(i);W(a)&&this.#g(a);let o=this.#o++;return this.#n.set(o,new qE(i,r,b2[r]??"werkstattProcessors")),this.#a.set(i,o),o}#c(e){let r=globalThis.openDAW?.[e.registryName]?.[e.uuid];if(r===void 0&&e.currentUpdate===-1)return!e.warnedMissing&&++e.missingCalls>w2&&(e.warnedMissing=!0,this.#i(e.uuid,`No Processor registered at globalThis.openDAW.${e.registryName}[${e.uuid}] \u2014 device is rendering silence`)),null;if(r!==void 0&&r.update!==e.currentUpdate)try{let n=new r.create;if(e.paramMappings=new Map(r.params.map(i=>[i.index,{label:i.label,mapping:A2(i)}])),e.sampleLabels=new Map(r.samples.map(i=>[i.index,i.label])),e.kind===HE){n.samples={};for(let i of e.sampleLabels.values())n.samples[i]=null;e.limiter??=new bh(this.#r)}e.kind===RM&&(e.spielwerk=new Gw),e.proc=n,e.currentUpdate=r.update,e.silenced=!1;for(let[i,a]of e.rawParams)this.#f(e,i,a.kind,a.value);for(let[i,a]of e.sampleHandles)this.#h(e,i,a)}catch(n){this.#x(e,`Failed to instantiate Processor: ${n}`)}return e.silenced?null:e.proc}#l(e,r,n,i,a,o,s,u,d,m,x,h){let w=this.#n.get(e);if(w===void 0)return 1;let A=this.#c(w);if(A===null)return 1;let _=this.#e.buffer,C=new Float32Array(_,i,Hw),K=new Float32Array(_,a,Hw),U={index:u,p0:d,p1:m,s0:o,s1:s,bpm:x,flags:h};try{if(w.kind===DM){let re={src:[new Float32Array(_,r,Hw),new Float32Array(_,n,Hw)],out:[C,K]};A.process(re,U)}else{for(let[re,me]of w.sampleHandles)this.#h(w,re,me);C.fill(0,o,s),K.fill(0,o,s),A.process([C,K],U)}}catch(re){return this.#x(w,`Runtime error: ${re}`),1}let ee=F2([C,K],o,s);return ee!==null?(C.fill(0,o,s),K.fill(0,o,s),this.#x(w,ee),1):(w.kind===HE&&w.limiter!==null&&w.limiter.replace({channels:()=>[C,K]},o,s),0)}#u(e,r,n,i,a){let o=this.#n.get(e);o!==void 0&&this.#c(o)?.noteOn?.(r,n,i,a)}#p(e,r){let n=this.#n.get(e);n!==void 0&&this.#c(n)?.noteOff?.(r)}#d(e){let r=this.#n.get(e);r?.proc?.reset?.(),r?.spielwerk?.reset()}#v(e,r,n,i){let a=this.#n.get(e);a!==void 0&&(a.rawParams.set(r,{kind:n,value:i}),this.#f(a,r,n,i))}#f(e,r,n,i){let a=e.paramMappings.get(r);if(a===void 0)return;let o=n===_2?a.mapping.y(i):i;e.proc?.paramChanged?.(a.label,o)}#m(e,r,n,i){let a=this.#n.get(e);if(a===void 0)return;let o=i!==0?n:-1;a.sampleHandles.set(r,o),this.#h(a,r,o)}#w(e,r,n,i,a,o,s,u,d,m,x){let h=this.#n.get(e);if(h===void 0)return 0;let w=this.#c(h);if(w===null||h.spielwerk===null)return 0;try{return BM(h.spielwerk,w,this.#e.buffer,r,n,i,a,o,s,u,d,m,x)}catch(A){return this.#x(h,`Runtime error: ${A}`),0}}#h(e,r,n){if(e.proc===null)return;let i=e.sampleLabels.get(r);if(i===void 0)return;if(n<0){e.proc.samples[i]=null;return}let a=this.#t.input_reserve(16);if(this.#t.host_resolve_sample(n,a)===0){e.proc.samples[i]=null;return}let o=new DataView(this.#e.buffer,a,16),s=o.getUint32(0,!0),u=o.getUint32(4,!0),d=o.getUint32(8,!0),m=o.getFloat32(12,!0),x=[];for(let h=0;h<d;h++)x.push(new Float32Array(this.#e.buffer,s+h*u*4,u));e.proc.samples[i]={sampleRate:m,numberOfFrames:u,numberOfChannels:d,frames:x}}#x(e,r){e.silenced=!0,this.#i(e.uuid,r)}#g(e){let r=this.#n.get(e);W(r)&&(this.#n.delete(e),this.#a.get(r.uuid)===e&&this.#a.delete(r.uuid))}liveBridgeCount(){return this.#n.size}};var Jw=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},tt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},St,Ql,eu,Wm,Lm=class t{constructor(e,r=128){if(St.set(this,void 0),Ql.set(this,void 0),eu.set(this,void 0),Wm.set(this,void 0),Jw(this,St,e,"f"),Jw(this,Wm,r,"f"),Jw(this,Ql,e._malloc(r*4),"f"),Jw(this,eu,e._malloc(r*4),"f"),tt(this,Ql,"f")===0||tt(this,eu,"f")===0)throw new Error("Failed to allocate audio buffers")}static async create(e,r=128){let n=await e();return new t(n,r)}static fromModule(e,r=128){return new t(e,r)}dispose(){tt(this,St,"f")._free(tt(this,Ql,"f")),tt(this,St,"f")._free(tt(this,eu,"f"))}createInstance(){return tt(this,St,"f")._nam_createInstance()}destroyInstance(e){tt(this,St,"f")._nam_destroyInstance(e)}getInstanceCount(){return tt(this,St,"f")._nam_getInstanceCount()}loadModel(e,r){let n=tt(this,St,"f").lengthBytesUTF8(r)+1,i=tt(this,St,"f")._malloc(n);if(i===0)return!1;try{return tt(this,St,"f").stringToUTF8(r,i,n),tt(this,St,"f")._nam_loadModel(e,i)}finally{tt(this,St,"f")._free(i)}}unloadModel(e){tt(this,St,"f")._nam_unloadModel(e)}hasModel(e){return tt(this,St,"f")._nam_hasModel(e)}process(e,r,n){let i=Math.min(r.length,n.length,tt(this,Wm,"f")),a=tt(this,Ql,"f")>>2,o=tt(this,eu,"f")>>2;tt(this,St,"f").HEAPF32.set(r.subarray(0,i),a),tt(this,St,"f")._nam_process(e,tt(this,Ql,"f"),tt(this,eu,"f"),i),n.set(tt(this,St,"f").HEAPF32.subarray(o,o+i))}processInPlace(e,r){this.process(e,r,r)}setSampleRate(e){tt(this,St,"f")._nam_setSampleRate(e)}getSampleRate(){return tt(this,St,"f")._nam_getSampleRate()}setMaxBufferSize(e){tt(this,St,"f")._nam_setMaxBufferSize(e)}getMaxBufferSize(){return tt(this,St,"f")._nam_getMaxBufferSize()}getModelLoudness(e){return tt(this,St,"f")._nam_getModelLoudness(e)}hasModelLoudness(e){return tt(this,St,"f")._nam_hasModelLoudness(e)}reset(e){tt(this,St,"f")._nam_reset(e)}get bufferSize(){return tt(this,Wm,"f")}};St=new WeakMap,Ql=new WeakMap,eu=new WeakMap,Wm=new WeakMap;var JE;(function(t){t.parse=e=>JSON.parse(e),t.isArchitecture2=e=>e.architecture==="WaveNet"&&e.config.layers!==void 0&&e.config.layers.some(r=>r.gating_mode!==void 0||r.bottleneck!==void 0)})(JE||(JE={}));var E2=(()=>{var t=import.meta.url;return(function(e={}){var r=e,n,i;r.ready=new Promise((c,f)=>{n=c,i=f});var a=Object.assign({},r),o=[],s="./this.program",u=(c,f)=>{throw f},d=typeof window=="object",m=typeof importScripts=="function",x=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",h="";function w(c){return r.locateFile?r.locateFile(c,h):h+c}var A,_,C;(d||m)&&(m?h=self.location.href:typeof document<"u"&&document.currentScript&&(h=document.currentScript.src),t&&(h=t),h.indexOf("blob:")!==0?h=h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):h="",A=c=>{var f=new XMLHttpRequest;return f.open("GET",c,!1),f.send(null),f.responseText},m&&(C=c=>{var f=new XMLHttpRequest;return f.open("GET",c,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),_=(c,f,g)=>{var y=new XMLHttpRequest;y.open("GET",c,!0),y.responseType="arraybuffer",y.onload=()=>{if(y.status==200||y.status==0&&y.response){f(y.response);return}g()},y.onerror=g,y.send(null)});var K=r.print||console.log.bind(console),U=r.printErr||console.error.bind(console);Object.assign(r,a),a=null,r.arguments&&(o=r.arguments),r.thisProgram&&(s=r.thisProgram),r.quit&&(u=r.quit);var ee;r.wasmBinary&&(ee=r.wasmBinary),typeof WebAssembly!="object"&&ru("no native wasm support detected");var re,me=!1,$e;function Q(c,f){c||ru(f)}var we,Ge,It,Xn,He,Pt,Zm,tu;function tS(){var c=re.buffer;r.HEAP8=we=new Int8Array(c),r.HEAP16=It=new Int16Array(c),r.HEAPU8=Ge=new Uint8Array(c),r.HEAPU16=Xn=new Uint16Array(c),r.HEAP32=He=new Int32Array(c),r.HEAPU32=Pt=new Uint32Array(c),r.HEAPF32=Zm=new Float32Array(c),r.HEAPF64=tu=new Float64Array(c)}var rS=[],iS=[],nS=[],GM=!1;function HM(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)XM(r.preRun.shift());rb(rS)}function qM(){GM=!0,!r.noFSInit&&!v.init.initialized&&v.init(),v.ignorePermissions=!1,fo.init(),rb(iS)}function JM(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)QM(r.postRun.shift());rb(nS)}function XM(c){rS.unshift(c)}function YM(c){iS.unshift(c)}function QM(c){nS.unshift(c)}var _s=0,eb=null,zd=null;function M2(c){return c}function tb(c){_s++,r.monitorRunDependencies?.(_s)}function Gm(c){if(_s--,r.monitorRunDependencies?.(_s),_s==0&&(eb!==null&&(clearInterval(eb),eb=null),zd)){var f=zd;zd=null,f()}}function ru(c){r.onAbort?.(c),c="Aborted("+c+")",U(c),me=!0,$e=1,c+=". Build with -sASSERTIONS for more info.";var f=new WebAssembly.RuntimeError(c);throw i(f),f}var eI="data:application/octet-stream;base64,",aS=c=>c.startsWith(eI),As;r.locateFile?(As="nam.wasm",aS(As)||(As=w(As))):As=new URL("nam.wasm",import.meta.url).href;function oS(c){if(c==As&&ee)return new Uint8Array(ee);if(C)return C(c);throw"both async and sync fetching of the wasm failed"}function tI(c){return!ee&&(d||m)&&typeof fetch=="function"?fetch(c,{credentials:"same-origin"}).then(f=>{if(!f.ok)throw"failed to load wasm binary file at '"+c+"'";return f.arrayBuffer()}).catch(()=>oS(c)):Promise.resolve().then(()=>oS(c))}function sS(c,f,g){return tI(c).then(y=>WebAssembly.instantiate(y,f)).then(y=>y).then(g,y=>{U(`failed to asynchronously prepare wasm: ${y}`),ru(y)})}function rI(c,f,g,y){return!c&&typeof WebAssembly.instantiateStreaming=="function"&&!aS(f)&&typeof fetch=="function"?fetch(f,{credentials:"same-origin"}).then(F=>{var T=WebAssembly.instantiateStreaming(F,g);return T.then(y,function(z){return U(`wasm streaming compile failed: ${z}`),U("falling back to ArrayBuffer instantiation"),sS(f,g,y)})}):sS(f,g,y)}function iI(){var c={a:CI};function f(y,F){return pt=y.exports,re=pt.l,tS(),YM(pt.m),Gm("wasm-instantiate"),pt}tb("wasm-instantiate");function g(y){f(y.instance)}if(r.instantiateWasm)try{return r.instantiateWasm(c,f)}catch(y){U(`Module.instantiateWasm callback failed with error: ${y}`),i(y)}return rI(ee,As,c,g).catch(i),{}}var qe,hr,rb=c=>{for(;c.length>0;)c.shift()(r)},I2=r.noExitRuntime||!0;function nI(c){this.excPtr=c,this.ptr=c-24,this.set_type=function(f){Pt[this.ptr+4>>2]=f},this.get_type=function(){return Pt[this.ptr+4>>2]},this.set_destructor=function(f){Pt[this.ptr+8>>2]=f},this.get_destructor=function(){return Pt[this.ptr+8>>2]},this.set_caught=function(f){f=f?1:0,we[this.ptr+12>>0]=f},this.get_caught=function(){return we[this.ptr+12>>0]!=0},this.set_rethrown=function(f){f=f?1:0,we[this.ptr+13>>0]=f},this.get_rethrown=function(){return we[this.ptr+13>>0]!=0},this.init=function(f,g){this.set_adjusted_ptr(0),this.set_type(f),this.set_destructor(g)},this.set_adjusted_ptr=function(f){Pt[this.ptr+16>>2]=f},this.get_adjusted_ptr=function(){return Pt[this.ptr+16>>2]},this.get_exception_ptr=function(){var f=bS(this.get_type());if(f)return Pt[this.excPtr>>2];var g=this.get_adjusted_ptr();return g!==0?g:this.excPtr}}var lS=0,aI=0,oI=(c,f,g)=>{var y=new nI(c);throw y.init(f,g),lS=c,aI++,lS},sI=()=>{ru("")},lI=(c,f,g)=>Ge.copyWithin(c,f,f+g),uI=()=>536870912,cI=c=>{var f=re.buffer,g=(c-f.byteLength+65535)/65536;try{return re.grow(g),tS(),1}catch{}},dI=c=>{var f=Ge.length;c>>>=0;var g=uI();if(c>g)return!1;for(var y=(ne,Me)=>ne+(Me-ne%Me)%Me,F=1;F<=4;F*=2){var T=f*(1+.2/F);T=Math.min(T,c+100663296);var z=Math.min(g,y(Math.max(c,T),65536)),j=cI(z);if(j)return!0}return!1},ib={},pI=()=>s||"./this.program",Od=()=>{if(!Od.strings){var c=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",f={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:c,_:pI()};for(var g in ib)ib[g]===void 0?delete f[g]:f[g]=ib[g];var y=[];for(var g in f)y.push(`${g}=${f[g]}`);Od.strings=y}return Od.strings},fI=(c,f)=>{for(var g=0;g<c.length;++g)we[f++>>0]=c.charCodeAt(g);we[f>>0]=0},ut={isAbs:c=>c.charAt(0)==="/",splitPath:c=>{var f=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return f.exec(c).slice(1)},normalizeArray:(c,f)=>{for(var g=0,y=c.length-1;y>=0;y--){var F=c[y];F==="."?c.splice(y,1):F===".."?(c.splice(y,1),g++):g&&(c.splice(y,1),g--)}if(f)for(;g;g--)c.unshift("..");return c},normalize:c=>{var f=ut.isAbs(c),g=c.substr(-1)==="/";return c=ut.normalizeArray(c.split("/").filter(y=>!!y),!f).join("/"),!c&&!f&&(c="."),c&&g&&(c+="/"),(f?"/":"")+c},dirname:c=>{var f=ut.splitPath(c),g=f[0],y=f[1];return!g&&!y?".":(y&&(y=y.substr(0,y.length-1)),g+y)},basename:c=>{if(c==="/")return"/";c=ut.normalize(c),c=c.replace(/\/$/,"");var f=c.lastIndexOf("/");return f===-1?c:c.substr(f+1)},join:function(){var c=Array.prototype.slice.call(arguments);return ut.normalize(c.join("/"))},join2:(c,f)=>ut.normalize(c+"/"+f)},mI=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return c=>crypto.getRandomValues(c);ru("initRandomDevice")},uS=c=>(uS=mI())(c),Ta={resolve:function(){for(var c="",f=!1,g=arguments.length-1;g>=-1&&!f;g--){var y=g>=0?arguments[g]:v.cwd();if(typeof y!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!y)return"";c=y+"/"+c,f=ut.isAbs(y)}return c=ut.normalizeArray(c.split("/").filter(F=>!!F),!f).join("/"),(f?"/":"")+c||"."},relative:(c,f)=>{c=Ta.resolve(c).substr(1),f=Ta.resolve(f).substr(1);function g(Me){for(var We=0;We<Me.length&&Me[We]==="";We++);for(var nt=Me.length-1;nt>=0&&Me[nt]==="";nt--);return We>nt?[]:Me.slice(We,nt-We+1)}for(var y=g(c.split("/")),F=g(f.split("/")),T=Math.min(y.length,F.length),z=T,j=0;j<T;j++)if(y[j]!==F[j]){z=j;break}for(var ne=[],j=z;j<y.length;j++)ne.push("..");return ne=ne.concat(F.slice(z)),ne.join("/")}},cS=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,iu=(c,f,g)=>{for(var y=f+g,F=f;c[F]&&!(F>=y);)++F;if(F-f>16&&c.buffer&&cS)return cS.decode(c.subarray(f,F));for(var T="";f<F;){var z=c[f++];if(!(z&128)){T+=String.fromCharCode(z);continue}var j=c[f++]&63;if((z&224)==192){T+=String.fromCharCode((z&31)<<6|j);continue}var ne=c[f++]&63;if((z&240)==224?z=(z&15)<<12|j<<6|ne:z=(z&7)<<18|j<<12|ne<<6|c[f++]&63,z<65536)T+=String.fromCharCode(z);else{var Me=z-65536;T+=String.fromCharCode(55296|Me>>10,56320|Me&1023)}}return T},nb=[],Hm=c=>{for(var f=0,g=0;g<c.length;++g){var y=c.charCodeAt(g);y<=127?f++:y<=2047?f+=2:y>=55296&&y<=57343?(f+=4,++g):f+=3}return f},ab=(c,f,g,y)=>{if(!(y>0))return 0;for(var F=g,T=g+y-1,z=0;z<c.length;++z){var j=c.charCodeAt(z);if(j>=55296&&j<=57343){var ne=c.charCodeAt(++z);j=65536+((j&1023)<<10)|ne&1023}if(j<=127){if(g>=T)break;f[g++]=j}else if(j<=2047){if(g+1>=T)break;f[g++]=192|j>>6,f[g++]=128|j&63}else if(j<=65535){if(g+2>=T)break;f[g++]=224|j>>12,f[g++]=128|j>>6&63,f[g++]=128|j&63}else{if(g+3>=T)break;f[g++]=240|j>>18,f[g++]=128|j>>12&63,f[g++]=128|j>>6&63,f[g++]=128|j&63}}return f[g]=0,g-F};function qm(c,f,g){var y=g>0?g:Hm(c)+1,F=new Array(y),T=ab(c,F,0,F.length);return f&&(F.length=T),F}var hI=()=>{if(!nb.length){var c=null;if(typeof window<"u"&&typeof window.prompt=="function"?(c=window.prompt("Input: "),c!==null&&(c+=`
82
+ `)):typeof readline=="function"&&(c=readline(),c!==null&&(c+=`
83
+ `)),!c)return null;nb=qm(c,!0)}return nb.shift()},fo={ttys:[],init(){},shutdown(){},register(c,f){fo.ttys[c]={input:[],output:[],ops:f},v.registerDevice(c,fo.stream_ops)},stream_ops:{open(c){var f=fo.ttys[c.node.rdev];if(!f)throw new v.ErrnoError(43);c.tty=f,c.seekable=!1},close(c){c.tty.ops.fsync(c.tty)},fsync(c){c.tty.ops.fsync(c.tty)},read(c,f,g,y,F){if(!c.tty||!c.tty.ops.get_char)throw new v.ErrnoError(60);for(var T=0,z=0;z<y;z++){var j;try{j=c.tty.ops.get_char(c.tty)}catch{throw new v.ErrnoError(29)}if(j===void 0&&T===0)throw new v.ErrnoError(6);if(j==null)break;T++,f[g+z]=j}return T&&(c.node.timestamp=Date.now()),T},write(c,f,g,y,F){if(!c.tty||!c.tty.ops.put_char)throw new v.ErrnoError(60);try{for(var T=0;T<y;T++)c.tty.ops.put_char(c.tty,f[g+T])}catch{throw new v.ErrnoError(29)}return y&&(c.node.timestamp=Date.now()),T}},default_tty_ops:{get_char(c){return hI()},put_char(c,f){f===null||f===10?(K(iu(c.output,0)),c.output=[]):f!=0&&c.output.push(f)},fsync(c){c.output&&c.output.length>0&&(K(iu(c.output,0)),c.output=[])},ioctl_tcgets(c){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(c,f,g){return 0},ioctl_tiocgwinsz(c){return[24,80]}},default_tty1_ops:{put_char(c,f){f===null||f===10?(U(iu(c.output,0)),c.output=[]):f!=0&&c.output.push(f)},fsync(c){c.output&&c.output.length>0&&(U(iu(c.output,0)),c.output=[])}}},dS=c=>{ru()},De={ops_table:null,mount(c){return De.createNode(null,"/",16895,0)},createNode(c,f,g,y){if(v.isBlkdev(g)||v.isFIFO(g))throw new v.ErrnoError(63);De.ops_table||={dir:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr,lookup:De.node_ops.lookup,mknod:De.node_ops.mknod,rename:De.node_ops.rename,unlink:De.node_ops.unlink,rmdir:De.node_ops.rmdir,readdir:De.node_ops.readdir,symlink:De.node_ops.symlink},stream:{llseek:De.stream_ops.llseek}},file:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr},stream:{llseek:De.stream_ops.llseek,read:De.stream_ops.read,write:De.stream_ops.write,allocate:De.stream_ops.allocate,mmap:De.stream_ops.mmap,msync:De.stream_ops.msync}},link:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr,readlink:De.node_ops.readlink},stream:{}},chrdev:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr},stream:v.chrdev_stream_ops}};var F=v.createNode(c,f,g,y);return v.isDir(F.mode)?(F.node_ops=De.ops_table.dir.node,F.stream_ops=De.ops_table.dir.stream,F.contents={}):v.isFile(F.mode)?(F.node_ops=De.ops_table.file.node,F.stream_ops=De.ops_table.file.stream,F.usedBytes=0,F.contents=null):v.isLink(F.mode)?(F.node_ops=De.ops_table.link.node,F.stream_ops=De.ops_table.link.stream):v.isChrdev(F.mode)&&(F.node_ops=De.ops_table.chrdev.node,F.stream_ops=De.ops_table.chrdev.stream),F.timestamp=Date.now(),c&&(c.contents[f]=F,c.timestamp=F.timestamp),F},getFileDataAsTypedArray(c){return c.contents?c.contents.subarray?c.contents.subarray(0,c.usedBytes):new Uint8Array(c.contents):new Uint8Array(0)},expandFileStorage(c,f){var g=c.contents?c.contents.length:0;if(!(g>=f)){var y=1024*1024;f=Math.max(f,g*(g<y?2:1.125)>>>0),g!=0&&(f=Math.max(f,256));var F=c.contents;c.contents=new Uint8Array(f),c.usedBytes>0&&c.contents.set(F.subarray(0,c.usedBytes),0)}},resizeFileStorage(c,f){if(c.usedBytes!=f)if(f==0)c.contents=null,c.usedBytes=0;else{var g=c.contents;c.contents=new Uint8Array(f),g&&c.contents.set(g.subarray(0,Math.min(f,c.usedBytes))),c.usedBytes=f}},node_ops:{getattr(c){var f={};return f.dev=v.isChrdev(c.mode)?c.id:1,f.ino=c.id,f.mode=c.mode,f.nlink=1,f.uid=0,f.gid=0,f.rdev=c.rdev,v.isDir(c.mode)?f.size=4096:v.isFile(c.mode)?f.size=c.usedBytes:v.isLink(c.mode)?f.size=c.link.length:f.size=0,f.atime=new Date(c.timestamp),f.mtime=new Date(c.timestamp),f.ctime=new Date(c.timestamp),f.blksize=4096,f.blocks=Math.ceil(f.size/f.blksize),f},setattr(c,f){f.mode!==void 0&&(c.mode=f.mode),f.timestamp!==void 0&&(c.timestamp=f.timestamp),f.size!==void 0&&De.resizeFileStorage(c,f.size)},lookup(c,f){throw v.genericErrors[44]},mknod(c,f,g,y){return De.createNode(c,f,g,y)},rename(c,f,g){if(v.isDir(c.mode)){var y;try{y=v.lookupNode(f,g)}catch{}if(y)for(var F in y.contents)throw new v.ErrnoError(55)}delete c.parent.contents[c.name],c.parent.timestamp=Date.now(),c.name=g,f.contents[g]=c,f.timestamp=c.parent.timestamp,c.parent=f},unlink(c,f){delete c.contents[f],c.timestamp=Date.now()},rmdir(c,f){var g=v.lookupNode(c,f);for(var y in g.contents)throw new v.ErrnoError(55);delete c.contents[f],c.timestamp=Date.now()},readdir(c){var f=[".",".."];for(var g of Object.keys(c.contents))f.push(g);return f},symlink(c,f,g){var y=De.createNode(c,f,41471,0);return y.link=g,y},readlink(c){if(!v.isLink(c.mode))throw new v.ErrnoError(28);return c.link}},stream_ops:{read(c,f,g,y,F){var T=c.node.contents;if(F>=c.node.usedBytes)return 0;var z=Math.min(c.node.usedBytes-F,y);if(z>8&&T.subarray)f.set(T.subarray(F,F+z),g);else for(var j=0;j<z;j++)f[g+j]=T[F+j];return z},write(c,f,g,y,F,T){if(f.buffer===we.buffer&&(T=!1),!y)return 0;var z=c.node;if(z.timestamp=Date.now(),f.subarray&&(!z.contents||z.contents.subarray)){if(T)return z.contents=f.subarray(g,g+y),z.usedBytes=y,y;if(z.usedBytes===0&&F===0)return z.contents=f.slice(g,g+y),z.usedBytes=y,y;if(F+y<=z.usedBytes)return z.contents.set(f.subarray(g,g+y),F),y}if(De.expandFileStorage(z,F+y),z.contents.subarray&&f.subarray)z.contents.set(f.subarray(g,g+y),F);else for(var j=0;j<y;j++)z.contents[F+j]=f[g+j];return z.usedBytes=Math.max(z.usedBytes,F+y),y},llseek(c,f,g){var y=f;if(g===1?y+=c.position:g===2&&v.isFile(c.node.mode)&&(y+=c.node.usedBytes),y<0)throw new v.ErrnoError(28);return y},allocate(c,f,g){De.expandFileStorage(c.node,f+g),c.node.usedBytes=Math.max(c.node.usedBytes,f+g)},mmap(c,f,g,y,F){if(!v.isFile(c.node.mode))throw new v.ErrnoError(43);var T,z,j=c.node.contents;if(!(F&2)&&j.buffer===we.buffer)z=!1,T=j.byteOffset;else{if((g>0||g+f<j.length)&&(j.subarray?j=j.subarray(g,g+f):j=Array.prototype.slice.call(j,g,g+f)),z=!0,T=dS(f),!T)throw new v.ErrnoError(48);we.set(j,T)}return{ptr:T,allocated:z}},msync(c,f,g,y,F){return De.stream_ops.write(c,f,0,y,g,!1),0}}},gI=(c,f,g,y)=>{var F=y?"":`al ${c}`;_(c,T=>{Q(T,`Loading data file "${c}" failed (no arrayBuffer).`),f(new Uint8Array(T)),F&&Gm(F)},T=>{if(g)g();else throw`Loading data file "${c}" failed.`}),F&&tb(F)},vI=(c,f,g,y,F,T)=>{v.createDataFile(c,f,g,y,F,T)},xI=r.preloadPlugins||[],yI=(c,f,g,y)=>{typeof Browser<"u"&&Browser.init();var F=!1;return xI.forEach(T=>{F||T.canHandle(f)&&(T.handle(c,f,g,y),F=!0)}),F},wI=(c,f,g,y,F,T,z,j,ne,Me)=>{var We=f?Ta.resolve(ut.join2(c,f)):c,nt=`cp ${We}`;function Ee(be){function _e(Bt){Me?.(),j||vI(c,f,Bt,y,F,ne),T?.(),Gm(nt)}yI(be,We,_e,()=>{z?.(),Gm(nt)})||_e(be)}tb(nt),typeof g=="string"?gI(g,be=>Ee(be),z):Ee(g)},bI=c=>{var f={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},g=f[c];if(typeof g>"u")throw new Error(`Unknown file open mode: ${c}`);return g},ob=(c,f)=>{var g=0;return c&&(g|=365),f&&(g|=146),g},v={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(c,f={}){if(c=Ta.resolve(c),!c)return{path:"",node:null};var g={follow_mount:!0,recurse_count:0};if(f=Object.assign(g,f),f.recurse_count>8)throw new v.ErrnoError(32);for(var y=c.split("/").filter(nt=>!!nt),F=v.root,T="/",z=0;z<y.length;z++){var j=z===y.length-1;if(j&&f.parent)break;if(F=v.lookupNode(F,y[z]),T=ut.join2(T,y[z]),v.isMountpoint(F)&&(!j||j&&f.follow_mount)&&(F=F.mounted.root),!j||f.follow)for(var ne=0;v.isLink(F.mode);){var Me=v.readlink(T);T=Ta.resolve(ut.dirname(T),Me);var We=v.lookupPath(T,{recurse_count:f.recurse_count+1});if(F=We.node,ne++>40)throw new v.ErrnoError(32)}}return{path:T,node:F}},getPath(c){for(var f;;){if(v.isRoot(c)){var g=c.mount.mountpoint;return f?g[g.length-1]!=="/"?`${g}/${f}`:g+f:g}f=f?`${c.name}/${f}`:c.name,c=c.parent}},hashName(c,f){for(var g=0,y=0;y<f.length;y++)g=(g<<5)-g+f.charCodeAt(y)|0;return(c+g>>>0)%v.nameTable.length},hashAddNode(c){var f=v.hashName(c.parent.id,c.name);c.name_next=v.nameTable[f],v.nameTable[f]=c},hashRemoveNode(c){var f=v.hashName(c.parent.id,c.name);if(v.nameTable[f]===c)v.nameTable[f]=c.name_next;else for(var g=v.nameTable[f];g;){if(g.name_next===c){g.name_next=c.name_next;break}g=g.name_next}},lookupNode(c,f){var g=v.mayLookup(c);if(g)throw new v.ErrnoError(g,c);for(var y=v.hashName(c.id,f),F=v.nameTable[y];F;F=F.name_next){var T=F.name;if(F.parent.id===c.id&&T===f)return F}return v.lookup(c,f)},createNode(c,f,g,y){var F=new v.FSNode(c,f,g,y);return v.hashAddNode(F),F},destroyNode(c){v.hashRemoveNode(c)},isRoot(c){return c===c.parent},isMountpoint(c){return!!c.mounted},isFile(c){return(c&61440)===32768},isDir(c){return(c&61440)===16384},isLink(c){return(c&61440)===40960},isChrdev(c){return(c&61440)===8192},isBlkdev(c){return(c&61440)===24576},isFIFO(c){return(c&61440)===4096},isSocket(c){return(c&49152)===49152},flagsToPermissionString(c){var f=["r","w","rw"][c&3];return c&512&&(f+="w"),f},nodePermissions(c,f){return v.ignorePermissions?0:f.includes("r")&&!(c.mode&292)||f.includes("w")&&!(c.mode&146)||f.includes("x")&&!(c.mode&73)?2:0},mayLookup(c){var f=v.nodePermissions(c,"x");return f||(c.node_ops.lookup?0:2)},mayCreate(c,f){try{var g=v.lookupNode(c,f);return 20}catch{}return v.nodePermissions(c,"wx")},mayDelete(c,f,g){var y;try{y=v.lookupNode(c,f)}catch(T){return T.errno}var F=v.nodePermissions(c,"wx");if(F)return F;if(g){if(!v.isDir(y.mode))return 54;if(v.isRoot(y)||v.getPath(y)===v.cwd())return 10}else if(v.isDir(y.mode))return 31;return 0},mayOpen(c,f){return c?v.isLink(c.mode)?32:v.isDir(c.mode)&&(v.flagsToPermissionString(f)!=="r"||f&512)?31:v.nodePermissions(c,v.flagsToPermissionString(f)):44},MAX_OPEN_FDS:4096,nextfd(){for(var c=0;c<=v.MAX_OPEN_FDS;c++)if(!v.streams[c])return c;throw new v.ErrnoError(33)},getStreamChecked(c){var f=v.getStream(c);if(!f)throw new v.ErrnoError(8);return f},getStream:c=>v.streams[c],createStream(c,f=-1){return v.FSStream||(v.FSStream=function(){this.shared={}},v.FSStream.prototype={},Object.defineProperties(v.FSStream.prototype,{object:{get(){return this.node},set(g){this.node=g}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(g){this.shared.flags=g}},position:{get(){return this.shared.position},set(g){this.shared.position=g}}})),c=Object.assign(new v.FSStream,c),f==-1&&(f=v.nextfd()),c.fd=f,v.streams[f]=c,c},closeStream(c){v.streams[c]=null},chrdev_stream_ops:{open(c){var f=v.getDevice(c.node.rdev);c.stream_ops=f.stream_ops,c.stream_ops.open?.(c)},llseek(){throw new v.ErrnoError(70)}},major:c=>c>>8,minor:c=>c&255,makedev:(c,f)=>c<<8|f,registerDevice(c,f){v.devices[c]={stream_ops:f}},getDevice:c=>v.devices[c],getMounts(c){for(var f=[],g=[c];g.length;){var y=g.pop();f.push(y),g.push.apply(g,y.mounts)}return f},syncfs(c,f){typeof c=="function"&&(f=c,c=!1),v.syncFSRequests++,v.syncFSRequests>1&&U(`warning: ${v.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var g=v.getMounts(v.root.mount),y=0;function F(z){return v.syncFSRequests--,f(z)}function T(z){if(z)return T.errored?void 0:(T.errored=!0,F(z));++y>=g.length&&F(null)}g.forEach(z=>{if(!z.type.syncfs)return T(null);z.type.syncfs(z,c,T)})},mount(c,f,g){var y=g==="/",F=!g,T;if(y&&v.root)throw new v.ErrnoError(10);if(!y&&!F){var z=v.lookupPath(g,{follow_mount:!1});if(g=z.path,T=z.node,v.isMountpoint(T))throw new v.ErrnoError(10);if(!v.isDir(T.mode))throw new v.ErrnoError(54)}var j={type:c,opts:f,mountpoint:g,mounts:[]},ne=c.mount(j);return ne.mount=j,j.root=ne,y?v.root=ne:T&&(T.mounted=j,T.mount&&T.mount.mounts.push(j)),ne},unmount(c){var f=v.lookupPath(c,{follow_mount:!1});if(!v.isMountpoint(f.node))throw new v.ErrnoError(28);var g=f.node,y=g.mounted,F=v.getMounts(y);Object.keys(v.nameTable).forEach(z=>{for(var j=v.nameTable[z];j;){var ne=j.name_next;F.includes(j.mount)&&v.destroyNode(j),j=ne}}),g.mounted=null;var T=g.mount.mounts.indexOf(y);g.mount.mounts.splice(T,1)},lookup(c,f){return c.node_ops.lookup(c,f)},mknod(c,f,g){var y=v.lookupPath(c,{parent:!0}),F=y.node,T=ut.basename(c);if(!T||T==="."||T==="..")throw new v.ErrnoError(28);var z=v.mayCreate(F,T);if(z)throw new v.ErrnoError(z);if(!F.node_ops.mknod)throw new v.ErrnoError(63);return F.node_ops.mknod(F,T,f,g)},create(c,f){return f=f!==void 0?f:438,f&=4095,f|=32768,v.mknod(c,f,0)},mkdir(c,f){return f=f!==void 0?f:511,f&=1023,f|=16384,v.mknod(c,f,0)},mkdirTree(c,f){for(var g=c.split("/"),y="",F=0;F<g.length;++F)if(g[F]){y+="/"+g[F];try{v.mkdir(y,f)}catch(T){if(T.errno!=20)throw T}}},mkdev(c,f,g){return typeof g>"u"&&(g=f,f=438),f|=8192,v.mknod(c,f,g)},symlink(c,f){if(!Ta.resolve(c))throw new v.ErrnoError(44);var g=v.lookupPath(f,{parent:!0}),y=g.node;if(!y)throw new v.ErrnoError(44);var F=ut.basename(f),T=v.mayCreate(y,F);if(T)throw new v.ErrnoError(T);if(!y.node_ops.symlink)throw new v.ErrnoError(63);return y.node_ops.symlink(y,F,c)},rename(c,f){var g=ut.dirname(c),y=ut.dirname(f),F=ut.basename(c),T=ut.basename(f),z,j,ne;if(z=v.lookupPath(c,{parent:!0}),j=z.node,z=v.lookupPath(f,{parent:!0}),ne=z.node,!j||!ne)throw new v.ErrnoError(44);if(j.mount!==ne.mount)throw new v.ErrnoError(75);var Me=v.lookupNode(j,F),We=Ta.relative(c,y);if(We.charAt(0)!==".")throw new v.ErrnoError(28);if(We=Ta.relative(f,g),We.charAt(0)!==".")throw new v.ErrnoError(55);var nt;try{nt=v.lookupNode(ne,T)}catch{}if(Me!==nt){var Ee=v.isDir(Me.mode),be=v.mayDelete(j,F,Ee);if(be)throw new v.ErrnoError(be);if(be=nt?v.mayDelete(ne,T,Ee):v.mayCreate(ne,T),be)throw new v.ErrnoError(be);if(!j.node_ops.rename)throw new v.ErrnoError(63);if(v.isMountpoint(Me)||nt&&v.isMountpoint(nt))throw new v.ErrnoError(10);if(ne!==j&&(be=v.nodePermissions(j,"w"),be))throw new v.ErrnoError(be);v.hashRemoveNode(Me);try{j.node_ops.rename(Me,ne,T)}catch(_e){throw _e}finally{v.hashAddNode(Me)}}},rmdir(c){var f=v.lookupPath(c,{parent:!0}),g=f.node,y=ut.basename(c),F=v.lookupNode(g,y),T=v.mayDelete(g,y,!0);if(T)throw new v.ErrnoError(T);if(!g.node_ops.rmdir)throw new v.ErrnoError(63);if(v.isMountpoint(F))throw new v.ErrnoError(10);g.node_ops.rmdir(g,y),v.destroyNode(F)},readdir(c){var f=v.lookupPath(c,{follow:!0}),g=f.node;if(!g.node_ops.readdir)throw new v.ErrnoError(54);return g.node_ops.readdir(g)},unlink(c){var f=v.lookupPath(c,{parent:!0}),g=f.node;if(!g)throw new v.ErrnoError(44);var y=ut.basename(c),F=v.lookupNode(g,y),T=v.mayDelete(g,y,!1);if(T)throw new v.ErrnoError(T);if(!g.node_ops.unlink)throw new v.ErrnoError(63);if(v.isMountpoint(F))throw new v.ErrnoError(10);g.node_ops.unlink(g,y),v.destroyNode(F)},readlink(c){var f=v.lookupPath(c),g=f.node;if(!g)throw new v.ErrnoError(44);if(!g.node_ops.readlink)throw new v.ErrnoError(28);return Ta.resolve(v.getPath(g.parent),g.node_ops.readlink(g))},stat(c,f){var g=v.lookupPath(c,{follow:!f}),y=g.node;if(!y)throw new v.ErrnoError(44);if(!y.node_ops.getattr)throw new v.ErrnoError(63);return y.node_ops.getattr(y)},lstat(c){return v.stat(c,!0)},chmod(c,f,g){var y;if(typeof c=="string"){var F=v.lookupPath(c,{follow:!g});y=F.node}else y=c;if(!y.node_ops.setattr)throw new v.ErrnoError(63);y.node_ops.setattr(y,{mode:f&4095|y.mode&-4096,timestamp:Date.now()})},lchmod(c,f){v.chmod(c,f,!0)},fchmod(c,f){var g=v.getStreamChecked(c);v.chmod(g.node,f)},chown(c,f,g,y){var F;if(typeof c=="string"){var T=v.lookupPath(c,{follow:!y});F=T.node}else F=c;if(!F.node_ops.setattr)throw new v.ErrnoError(63);F.node_ops.setattr(F,{timestamp:Date.now()})},lchown(c,f,g){v.chown(c,f,g,!0)},fchown(c,f,g){var y=v.getStreamChecked(c);v.chown(y.node,f,g)},truncate(c,f){if(f<0)throw new v.ErrnoError(28);var g;if(typeof c=="string"){var y=v.lookupPath(c,{follow:!0});g=y.node}else g=c;if(!g.node_ops.setattr)throw new v.ErrnoError(63);if(v.isDir(g.mode))throw new v.ErrnoError(31);if(!v.isFile(g.mode))throw new v.ErrnoError(28);var F=v.nodePermissions(g,"w");if(F)throw new v.ErrnoError(F);g.node_ops.setattr(g,{size:f,timestamp:Date.now()})},ftruncate(c,f){var g=v.getStreamChecked(c);if((g.flags&2097155)===0)throw new v.ErrnoError(28);v.truncate(g.node,f)},utime(c,f,g){var y=v.lookupPath(c,{follow:!0}),F=y.node;F.node_ops.setattr(F,{timestamp:Math.max(f,g)})},open(c,f,g){if(c==="")throw new v.ErrnoError(44);f=typeof f=="string"?bI(f):f,g=typeof g>"u"?438:g,f&64?g=g&4095|32768:g=0;var y;if(typeof c=="object")y=c;else{c=ut.normalize(c);try{var F=v.lookupPath(c,{follow:!(f&131072)});y=F.node}catch{}}var T=!1;if(f&64)if(y){if(f&128)throw new v.ErrnoError(20)}else y=v.mknod(c,g,0),T=!0;if(!y)throw new v.ErrnoError(44);if(v.isChrdev(y.mode)&&(f&=-513),f&65536&&!v.isDir(y.mode))throw new v.ErrnoError(54);if(!T){var z=v.mayOpen(y,f);if(z)throw new v.ErrnoError(z)}f&512&&!T&&v.truncate(y,0),f&=-131713;var j=v.createStream({node:y,path:v.getPath(y),flags:f,seekable:!0,position:0,stream_ops:y.stream_ops,ungotten:[],error:!1});return j.stream_ops.open&&j.stream_ops.open(j),r.logReadFiles&&!(f&1)&&(v.readFiles||(v.readFiles={}),c in v.readFiles||(v.readFiles[c]=1)),j},close(c){if(v.isClosed(c))throw new v.ErrnoError(8);c.getdents&&(c.getdents=null);try{c.stream_ops.close&&c.stream_ops.close(c)}catch(f){throw f}finally{v.closeStream(c.fd)}c.fd=null},isClosed(c){return c.fd===null},llseek(c,f,g){if(v.isClosed(c))throw new v.ErrnoError(8);if(!c.seekable||!c.stream_ops.llseek)throw new v.ErrnoError(70);if(g!=0&&g!=1&&g!=2)throw new v.ErrnoError(28);return c.position=c.stream_ops.llseek(c,f,g),c.ungotten=[],c.position},read(c,f,g,y,F){if(y<0||F<0)throw new v.ErrnoError(28);if(v.isClosed(c))throw new v.ErrnoError(8);if((c.flags&2097155)===1)throw new v.ErrnoError(8);if(v.isDir(c.node.mode))throw new v.ErrnoError(31);if(!c.stream_ops.read)throw new v.ErrnoError(28);var T=typeof F<"u";if(!T)F=c.position;else if(!c.seekable)throw new v.ErrnoError(70);var z=c.stream_ops.read(c,f,g,y,F);return T||(c.position+=z),z},write(c,f,g,y,F,T){if(y<0||F<0)throw new v.ErrnoError(28);if(v.isClosed(c))throw new v.ErrnoError(8);if((c.flags&2097155)===0)throw new v.ErrnoError(8);if(v.isDir(c.node.mode))throw new v.ErrnoError(31);if(!c.stream_ops.write)throw new v.ErrnoError(28);c.seekable&&c.flags&1024&&v.llseek(c,0,2);var z=typeof F<"u";if(!z)F=c.position;else if(!c.seekable)throw new v.ErrnoError(70);var j=c.stream_ops.write(c,f,g,y,F,T);return z||(c.position+=j),j},allocate(c,f,g){if(v.isClosed(c))throw new v.ErrnoError(8);if(f<0||g<=0)throw new v.ErrnoError(28);if((c.flags&2097155)===0)throw new v.ErrnoError(8);if(!v.isFile(c.node.mode)&&!v.isDir(c.node.mode))throw new v.ErrnoError(43);if(!c.stream_ops.allocate)throw new v.ErrnoError(138);c.stream_ops.allocate(c,f,g)},mmap(c,f,g,y,F){if((y&2)!==0&&(F&2)===0&&(c.flags&2097155)!==2)throw new v.ErrnoError(2);if((c.flags&2097155)===1)throw new v.ErrnoError(2);if(!c.stream_ops.mmap)throw new v.ErrnoError(43);return c.stream_ops.mmap(c,f,g,y,F)},msync(c,f,g,y,F){return c.stream_ops.msync?c.stream_ops.msync(c,f,g,y,F):0},munmap:c=>0,ioctl(c,f,g){if(!c.stream_ops.ioctl)throw new v.ErrnoError(59);return c.stream_ops.ioctl(c,f,g)},readFile(c,f={}){if(f.flags=f.flags||0,f.encoding=f.encoding||"binary",f.encoding!=="utf8"&&f.encoding!=="binary")throw new Error(`Invalid encoding type "${f.encoding}"`);var g,y=v.open(c,f.flags),F=v.stat(c),T=F.size,z=new Uint8Array(T);return v.read(y,z,0,T,0),f.encoding==="utf8"?g=iu(z,0):f.encoding==="binary"&&(g=z),v.close(y),g},writeFile(c,f,g={}){g.flags=g.flags||577;var y=v.open(c,g.flags,g.mode);if(typeof f=="string"){var F=new Uint8Array(Hm(f)+1),T=ab(f,F,0,F.length);v.write(y,F,0,T,void 0,g.canOwn)}else if(ArrayBuffer.isView(f))v.write(y,f,0,f.byteLength,void 0,g.canOwn);else throw new Error("Unsupported data type");v.close(y)},cwd:()=>v.currentPath,chdir(c){var f=v.lookupPath(c,{follow:!0});if(f.node===null)throw new v.ErrnoError(44);if(!v.isDir(f.node.mode))throw new v.ErrnoError(54);var g=v.nodePermissions(f.node,"x");if(g)throw new v.ErrnoError(g);v.currentPath=f.path},createDefaultDirectories(){v.mkdir("/tmp"),v.mkdir("/home"),v.mkdir("/home/web_user")},createDefaultDevices(){v.mkdir("/dev"),v.registerDevice(v.makedev(1,3),{read:()=>0,write:(y,F,T,z,j)=>z}),v.mkdev("/dev/null",v.makedev(1,3)),fo.register(v.makedev(5,0),fo.default_tty_ops),fo.register(v.makedev(6,0),fo.default_tty1_ops),v.mkdev("/dev/tty",v.makedev(5,0)),v.mkdev("/dev/tty1",v.makedev(6,0));var c=new Uint8Array(1024),f=0,g=()=>(f===0&&(f=uS(c).byteLength),c[--f]);v.createDevice("/dev","random",g),v.createDevice("/dev","urandom",g),v.mkdir("/dev/shm"),v.mkdir("/dev/shm/tmp")},createSpecialDirectories(){v.mkdir("/proc");var c=v.mkdir("/proc/self");v.mkdir("/proc/self/fd"),v.mount({mount(){var f=v.createNode(c,"fd",16895,73);return f.node_ops={lookup(g,y){var F=+y,T=v.getStreamChecked(F),z={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>T.path}};return z.parent=z,z}},f}},{},"/proc/self/fd")},createStandardStreams(){r.stdin?v.createDevice("/dev","stdin",r.stdin):v.symlink("/dev/tty","/dev/stdin"),r.stdout?v.createDevice("/dev","stdout",null,r.stdout):v.symlink("/dev/tty","/dev/stdout"),r.stderr?v.createDevice("/dev","stderr",null,r.stderr):v.symlink("/dev/tty1","/dev/stderr");var c=v.open("/dev/stdin",0),f=v.open("/dev/stdout",1),g=v.open("/dev/stderr",1)},ensureErrnoError(){v.ErrnoError||(v.ErrnoError=function(f,g){this.name="ErrnoError",this.node=g,this.setErrno=function(y){this.errno=y},this.setErrno(f),this.message="FS error"},v.ErrnoError.prototype=new Error,v.ErrnoError.prototype.constructor=v.ErrnoError,[44].forEach(c=>{v.genericErrors[c]=new v.ErrnoError(c),v.genericErrors[c].stack="<generic error, no stack>"}))},staticInit(){v.ensureErrnoError(),v.nameTable=new Array(4096),v.mount(De,{},"/"),v.createDefaultDirectories(),v.createDefaultDevices(),v.createSpecialDirectories(),v.filesystems={MEMFS:De}},init(c,f,g){v.init.initialized=!0,v.ensureErrnoError(),r.stdin=c||r.stdin,r.stdout=f||r.stdout,r.stderr=g||r.stderr,v.createStandardStreams()},quit(){v.init.initialized=!1;for(var c=0;c<v.streams.length;c++){var f=v.streams[c];f&&v.close(f)}},findObject(c,f){var g=v.analyzePath(c,f);return g.exists?g.object:null},analyzePath(c,f){try{var g=v.lookupPath(c,{follow:!f});c=g.path}catch{}var y={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var g=v.lookupPath(c,{parent:!0});y.parentExists=!0,y.parentPath=g.path,y.parentObject=g.node,y.name=ut.basename(c),g=v.lookupPath(c,{follow:!f}),y.exists=!0,y.path=g.path,y.object=g.node,y.name=g.node.name,y.isRoot=g.path==="/"}catch(F){y.error=F.errno}return y},createPath(c,f,g,y){c=typeof c=="string"?c:v.getPath(c);for(var F=f.split("/").reverse();F.length;){var T=F.pop();if(T){var z=ut.join2(c,T);try{v.mkdir(z)}catch{}c=z}}return z},createFile(c,f,g,y,F){var T=ut.join2(typeof c=="string"?c:v.getPath(c),f),z=ob(y,F);return v.create(T,z)},createDataFile(c,f,g,y,F,T){var z=f;c&&(c=typeof c=="string"?c:v.getPath(c),z=f?ut.join2(c,f):c);var j=ob(y,F),ne=v.create(z,j);if(g){if(typeof g=="string"){for(var Me=new Array(g.length),We=0,nt=g.length;We<nt;++We)Me[We]=g.charCodeAt(We);g=Me}v.chmod(ne,j|146);var Ee=v.open(ne,577);v.write(Ee,g,0,g.length,0,T),v.close(Ee),v.chmod(ne,j)}},createDevice(c,f,g,y){var F=ut.join2(typeof c=="string"?c:v.getPath(c),f),T=ob(!!g,!!y);v.createDevice.major||(v.createDevice.major=64);var z=v.makedev(v.createDevice.major++,0);return v.registerDevice(z,{open(j){j.seekable=!1},close(j){y?.buffer?.length&&y(10)},read(j,ne,Me,We,nt){for(var Ee=0,be=0;be<We;be++){var _e;try{_e=g()}catch{throw new v.ErrnoError(29)}if(_e===void 0&&Ee===0)throw new v.ErrnoError(6);if(_e==null)break;Ee++,ne[Me+be]=_e}return Ee&&(j.node.timestamp=Date.now()),Ee},write(j,ne,Me,We,nt){for(var Ee=0;Ee<We;Ee++)try{y(ne[Me+Ee])}catch{throw new v.ErrnoError(29)}return We&&(j.node.timestamp=Date.now()),Ee}}),v.mkdev(F,T,z)},forceLoadFile(c){if(c.isDevice||c.isFolder||c.link||c.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(A)try{c.contents=qm(A(c.url),!0),c.usedBytes=c.contents.length}catch{throw new v.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile(c,f,g,y,F){function T(){this.lengthKnown=!1,this.chunks=[]}if(T.prototype.get=function(be){if(!(be>this.length-1||be<0)){var _e=be%this.chunkSize,Bt=be/this.chunkSize|0;return this.getter(Bt)[_e]}},T.prototype.setDataGetter=function(be){this.getter=be},T.prototype.cacheLength=function(){var be=new XMLHttpRequest;if(be.open("HEAD",g,!1),be.send(null),!(be.status>=200&&be.status<300||be.status===304))throw new Error("Couldn't load "+g+". Status: "+be.status);var _e=Number(be.getResponseHeader("Content-length")),Bt,ji=(Bt=be.getResponseHeader("Accept-Ranges"))&&Bt==="bytes",jr=(Bt=be.getResponseHeader("Content-Encoding"))&&Bt==="gzip",q=1024*1024;ji||(q=_e);var he=(_t,_n)=>{if(_t>_n)throw new Error("invalid range ("+_t+", "+_n+") or no bytes requested!");if(_n>_e-1)throw new Error("only "+_e+" bytes available! programmer error!");var lr=new XMLHttpRequest;if(lr.open("GET",g,!1),_e!==q&&lr.setRequestHeader("Range","bytes="+_t+"-"+_n),lr.responseType="arraybuffer",lr.overrideMimeType&&lr.overrideMimeType("text/plain; charset=x-user-defined"),lr.send(null),!(lr.status>=200&&lr.status<300||lr.status===304))throw new Error("Couldn't load "+g+". Status: "+lr.status);return lr.response!==void 0?new Uint8Array(lr.response||[]):qm(lr.responseText||"",!0)},gr=this;gr.setDataGetter(_t=>{var _n=_t*q,lr=(_t+1)*q-1;if(lr=Math.min(lr,_e-1),typeof gr.chunks[_t]>"u"&&(gr.chunks[_t]=he(_n,lr)),typeof gr.chunks[_t]>"u")throw new Error("doXHR failed!");return gr.chunks[_t]}),(jr||!_e)&&(q=_e=1,_e=this.getter(0).length,q=_e,K("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=_e,this._chunkSize=q,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var z=new T;Object.defineProperties(z,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var j={isDevice:!1,contents:z}}else var j={isDevice:!1,url:g};var ne=v.createFile(c,f,j,y,F);j.contents?ne.contents=j.contents:j.url&&(ne.contents=null,ne.url=j.url),Object.defineProperties(ne,{usedBytes:{get:function(){return this.contents.length}}});var Me={},We=Object.keys(ne.stream_ops);We.forEach(Ee=>{var be=ne.stream_ops[Ee];Me[Ee]=function(){return v.forceLoadFile(ne),be.apply(null,arguments)}});function nt(Ee,be,_e,Bt,ji){var jr=Ee.node.contents;if(ji>=jr.length)return 0;var q=Math.min(jr.length-ji,Bt);if(jr.slice)for(var he=0;he<q;he++)be[_e+he]=jr[ji+he];else for(var he=0;he<q;he++)be[_e+he]=jr.get(ji+he);return q}return Me.read=(Ee,be,_e,Bt,ji)=>(v.forceLoadFile(ne),nt(Ee,be,_e,Bt,ji)),Me.mmap=(Ee,be,_e,Bt,ji)=>{v.forceLoadFile(ne);var jr=dS(be);if(!jr)throw new v.ErrnoError(48);return nt(Ee,we,jr,be,_e),{ptr:jr,allocated:!0}},ne.stream_ops=Me,ne}},Jm=(c,f)=>c?iu(Ge,c,f):"",mo={DEFAULT_POLLMASK:5,calculateAt(c,f,g){if(ut.isAbs(f))return f;var y;if(c===-100)y=v.cwd();else{var F=mo.getStreamFromFD(c);y=F.path}if(f.length==0){if(!g)throw new v.ErrnoError(44);return y}return ut.join2(y,f)},doStat(c,f,g){try{var y=c(f)}catch(j){if(j&&j.node&&ut.normalize(f)!==ut.normalize(v.getPath(j.node)))return-54;throw j}He[g>>2]=y.dev,He[g+4>>2]=y.mode,Pt[g+8>>2]=y.nlink,He[g+12>>2]=y.uid,He[g+16>>2]=y.gid,He[g+20>>2]=y.rdev,hr=[y.size>>>0,(qe=y.size,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],He[g+24>>2]=hr[0],He[g+28>>2]=hr[1],He[g+32>>2]=4096,He[g+36>>2]=y.blocks;var F=y.atime.getTime(),T=y.mtime.getTime(),z=y.ctime.getTime();return hr=[Math.floor(F/1e3)>>>0,(qe=Math.floor(F/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],He[g+40>>2]=hr[0],He[g+44>>2]=hr[1],Pt[g+48>>2]=F%1e3*1e3,hr=[Math.floor(T/1e3)>>>0,(qe=Math.floor(T/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],He[g+56>>2]=hr[0],He[g+60>>2]=hr[1],Pt[g+64>>2]=T%1e3*1e3,hr=[Math.floor(z/1e3)>>>0,(qe=Math.floor(z/1e3),+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],He[g+72>>2]=hr[0],He[g+76>>2]=hr[1],Pt[g+80>>2]=z%1e3*1e3,hr=[y.ino>>>0,(qe=y.ino,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],He[g+88>>2]=hr[0],He[g+92>>2]=hr[1],0},doMsync(c,f,g,y,F){if(!v.isFile(f.node.mode))throw new v.ErrnoError(43);if(y&2)return 0;var T=Ge.slice(c,c+g);v.msync(f,T,F,g,y)},varargs:void 0,get(){var c=He[+mo.varargs>>2];return mo.varargs+=4,c},getp(){return mo.get()},getStr(c){var f=Jm(c);return f},getStreamFromFD(c){var f=v.getStreamChecked(c);return f}},_I=(c,f)=>{var g=0;return Od().forEach((y,F)=>{var T=f+g;Pt[c+F*4>>2]=T,fI(y,T),g+=y.length+1}),0},AI=(c,f)=>{var g=Od();Pt[c>>2]=g.length;var y=0;return g.forEach(F=>y+=F.length+1),Pt[f>>2]=y,0};function FI(c){try{var f=mo.getStreamFromFD(c);return v.close(f),0}catch(g){if(typeof v>"u"||g.name!=="ErrnoError")throw g;return g.errno}}var EI=(c,f,g,y)=>{for(var F=0,T=0;T<g;T++){var z=Pt[f>>2],j=Pt[f+4>>2];f+=8;var ne=v.read(c,we,z,j,y);if(ne<0)return-1;if(F+=ne,ne<j)break;typeof y<"u"&&(y+=ne)}return F};function SI(c,f,g,y){try{var F=mo.getStreamFromFD(c),T=EI(F,f,g);return Pt[y>>2]=T,0}catch(z){if(typeof v>"u"||z.name!=="ErrnoError")throw z;return z.errno}}var PI=(c,f)=>f+2097152>>>0<4194305-!!c?(c>>>0)+f*4294967296:NaN;function $I(c,f,g,y,F){var T=PI(f,g);try{if(isNaN(T))return 61;var z=mo.getStreamFromFD(c);return v.llseek(z,T,y),hr=[z.position>>>0,(qe=z.position,+Math.abs(qe)>=1?qe>0?+Math.floor(qe/4294967296)>>>0:~~+Math.ceil((qe-+(~~qe>>>0))/4294967296)>>>0:0)],He[F>>2]=hr[0],He[F+4>>2]=hr[1],z.getdents&&T===0&&y===0&&(z.getdents=null),0}catch(j){if(typeof v>"u"||j.name!=="ErrnoError")throw j;return j.errno}}var kI=(c,f,g,y)=>{for(var F=0,T=0;T<g;T++){var z=Pt[f>>2],j=Pt[f+4>>2];f+=8;var ne=v.write(c,we,z,j,y);if(ne<0)return-1;F+=ne,typeof y<"u"&&(y+=ne)}return F};function NI(c,f,g,y){try{var F=mo.getStreamFromFD(c),T=kI(F,f,g);return Pt[y>>2]=T,0}catch(z){if(typeof v>"u"||z.name!=="ErrnoError")throw z;return z.errno}}var Xm=c=>c%4===0&&(c%100!==0||c%400===0),MI=(c,f)=>{for(var g=0,y=0;y<=f;g+=c[y++]);return g},pS=[31,29,31,30,31,30,31,31,30,31,30,31],fS=[31,28,31,30,31,30,31,31,30,31,30,31],II=(c,f)=>{for(var g=new Date(c.getTime());f>0;){var y=Xm(g.getFullYear()),F=g.getMonth(),T=(y?pS:fS)[F];if(f>T-g.getDate())f-=T-g.getDate()+1,g.setDate(1),F<11?g.setMonth(F+1):(g.setMonth(0),g.setFullYear(g.getFullYear()+1));else return g.setDate(g.getDate()+f),g}return g},mS=(c,f)=>{we.set(c,f)},BI=(c,f,g,y)=>{var F=Pt[y+40>>2],T={tm_sec:He[y>>2],tm_min:He[y+4>>2],tm_hour:He[y+8>>2],tm_mday:He[y+12>>2],tm_mon:He[y+16>>2],tm_year:He[y+20>>2],tm_wday:He[y+24>>2],tm_yday:He[y+28>>2],tm_isdst:He[y+32>>2],tm_gmtoff:He[y+36>>2],tm_zone:F?Jm(F):""},z=Jm(g),j={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var ne in j)z=z.replace(new RegExp(ne,"g"),j[ne]);var Me=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],We=["January","February","March","April","May","June","July","August","September","October","November","December"];function nt(q,he,gr){for(var _t=typeof q=="number"?q.toString():q||"";_t.length<he;)_t=gr[0]+_t;return _t}function Ee(q,he){return nt(q,he,"0")}function be(q,he){function gr(_n){return _n<0?-1:_n>0?1:0}var _t;return(_t=gr(q.getFullYear()-he.getFullYear()))===0&&(_t=gr(q.getMonth()-he.getMonth()))===0&&(_t=gr(q.getDate()-he.getDate())),_t}function _e(q){switch(q.getDay()){case 0:return new Date(q.getFullYear()-1,11,29);case 1:return q;case 2:return new Date(q.getFullYear(),0,3);case 3:return new Date(q.getFullYear(),0,2);case 4:return new Date(q.getFullYear(),0,1);case 5:return new Date(q.getFullYear()-1,11,31);case 6:return new Date(q.getFullYear()-1,11,30)}}function Bt(q){var he=II(new Date(q.tm_year+1900,0,1),q.tm_yday),gr=new Date(he.getFullYear(),0,4),_t=new Date(he.getFullYear()+1,0,4),_n=_e(gr),lr=_e(_t);return be(_n,he)<=0?be(lr,he)<=0?he.getFullYear()+1:he.getFullYear():he.getFullYear()-1}var ji={"%a":q=>Me[q.tm_wday].substring(0,3),"%A":q=>Me[q.tm_wday],"%b":q=>We[q.tm_mon].substring(0,3),"%B":q=>We[q.tm_mon],"%C":q=>{var he=q.tm_year+1900;return Ee(he/100|0,2)},"%d":q=>Ee(q.tm_mday,2),"%e":q=>nt(q.tm_mday,2," "),"%g":q=>Bt(q).toString().substring(2),"%G":q=>Bt(q),"%H":q=>Ee(q.tm_hour,2),"%I":q=>{var he=q.tm_hour;return he==0?he=12:he>12&&(he-=12),Ee(he,2)},"%j":q=>Ee(q.tm_mday+MI(Xm(q.tm_year+1900)?pS:fS,q.tm_mon-1),3),"%m":q=>Ee(q.tm_mon+1,2),"%M":q=>Ee(q.tm_min,2),"%n":()=>`
84
+ `,"%p":q=>q.tm_hour>=0&&q.tm_hour<12?"AM":"PM","%S":q=>Ee(q.tm_sec,2),"%t":()=>" ","%u":q=>q.tm_wday||7,"%U":q=>{var he=q.tm_yday+7-q.tm_wday;return Ee(Math.floor(he/7),2)},"%V":q=>{var he=Math.floor((q.tm_yday+7-(q.tm_wday+6)%7)/7);if((q.tm_wday+371-q.tm_yday-2)%7<=2&&he++,he){if(he==53){var _t=(q.tm_wday+371-q.tm_yday)%7;_t!=4&&(_t!=3||!Xm(q.tm_year))&&(he=1)}}else{he=52;var gr=(q.tm_wday+7-q.tm_yday-1)%7;(gr==4||gr==5&&Xm(q.tm_year%400-1))&&he++}return Ee(he,2)},"%w":q=>q.tm_wday,"%W":q=>{var he=q.tm_yday+7-(q.tm_wday+6)%7;return Ee(Math.floor(he/7),2)},"%y":q=>(q.tm_year+1900).toString().substring(2),"%Y":q=>q.tm_year+1900,"%z":q=>{var he=q.tm_gmtoff,gr=he>=0;return he=Math.abs(he)/60,he=he/60*100+he%60,(gr?"+":"-")+("0000"+he).slice(-4)},"%Z":q=>q.tm_zone,"%%":()=>"%"};z=z.replace(/%%/g,"\0\0");for(var ne in ji)z.includes(ne)&&(z=z.replace(new RegExp(ne,"g"),ji[ne](T)));z=z.replace(/\0\0/g,"%");var jr=qm(z,!1);return jr.length>f?0:(mS(jr,c),jr.length-1)},TI=(c,f,g,y,F)=>BI(c,f,g,y),hS=c=>{var f=r["_"+c];return f},gS=(c,f,g)=>ab(c,Ge,f,g),DI=c=>{var f=Hm(c)+1,g=sb(f);return gS(c,g,f),g},vS=(c,f,g,y,F)=>{var T={string:_e=>{var Bt=0;return _e!=null&&_e!==0&&(Bt=DI(_e)),Bt},array:_e=>{var Bt=sb(_e.length);return mS(_e,Bt),Bt}};function z(_e){return f==="string"?Jm(_e):f==="boolean"?!!_e:_e}var j=hS(c),ne=[],Me=0;if(y)for(var We=0;We<y.length;We++){var nt=T[g[We]];nt?(Me===0&&(Me=yS()),ne[We]=nt(y[We])):ne[We]=y[We]}var Ee=j.apply(null,ne);function be(_e){return Me!==0&&wS(Me),z(_e)}return Ee=be(Ee),Ee},RI=(c,f,g,y)=>{var F=!g||g.every(z=>z==="number"||z==="boolean"),T=f!=="string";return T&&F&&!y?hS(c):function(){return vS(c,f,g,arguments,y)}},xS=function(c,f,g,y){c||(c=this),this.parent=c,this.mount=c.mount,this.mounted=null,this.id=v.nextInode++,this.name=f,this.mode=g,this.node_ops={},this.stream_ops={},this.rdev=y},Ym=365,Qm=146;Object.defineProperties(xS.prototype,{read:{get:function(){return(this.mode&Ym)===Ym},set:function(c){c?this.mode|=Ym:this.mode&=~Ym}},write:{get:function(){return(this.mode&Qm)===Qm},set:function(c){c?this.mode|=Qm:this.mode&=~Qm}},isFolder:{get:function(){return v.isDir(this.mode)}},isDevice:{get:function(){return v.isChrdev(this.mode)}}}),v.FSNode=xS,v.createPreloadedFile=wI,v.staticInit();var CI={a:oI,b:sI,k:lI,i:dI,e:_I,f:AI,g:FI,h:SI,j:$I,c:NI,d:TI},pt=iI(),zI=()=>(zI=pt.m)(),OI=r._nam_createInstance=()=>(OI=r._nam_createInstance=pt.n)(),UI=r._nam_destroyInstance=c=>(UI=r._nam_destroyInstance=pt.o)(c),VI=r._nam_getInstanceCount=()=>(VI=r._nam_getInstanceCount=pt.p)(),jI=r._nam_loadModel=(c,f)=>(jI=r._nam_loadModel=pt.q)(c,f),KI=r._nam_unloadModel=c=>(KI=r._nam_unloadModel=pt.r)(c),WI=r._nam_hasModel=c=>(WI=r._nam_hasModel=pt.s)(c),LI=r._nam_process=(c,f,g,y)=>(LI=r._nam_process=pt.t)(c,f,g,y),ZI=r._nam_setSampleRate=c=>(ZI=r._nam_setSampleRate=pt.u)(c),GI=r._nam_getSampleRate=()=>(GI=r._nam_getSampleRate=pt.v)(),HI=r._nam_setMaxBufferSize=c=>(HI=r._nam_setMaxBufferSize=pt.w)(c),qI=r._nam_getMaxBufferSize=()=>(qI=r._nam_getMaxBufferSize=pt.x)(),JI=r._nam_getModelLoudness=c=>(JI=r._nam_getModelLoudness=pt.y)(c),XI=r._nam_hasModelLoudness=c=>(XI=r._nam_hasModelLoudness=pt.z)(c),YI=r._nam_reset=c=>(YI=r._nam_reset=pt.A)(c),QI=r._free=c=>(QI=r._free=pt.B)(c),eB=r._malloc=c=>(eB=r._malloc=pt.C)(c),tB=()=>(tB=pt.__errno_location)(),yS=()=>(yS=pt.E)(),wS=c=>(wS=pt.F)(c),sb=c=>(sb=pt.G)(c),rB=c=>(rB=pt.__cxa_increment_exception_refcount)(c),bS=c=>(bS=pt.H)(c);r.ccall=vS,r.cwrap=RI,r.stringToUTF8=gS,r.lengthBytesUTF8=Hm;var eh;zd=function c(){eh||_S(),eh||(zd=c)};function _S(){if(_s>0||(HM(),_s>0))return;function c(){eh||(eh=!0,r.calledRun=!0,!me&&(qM(),n(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),JM()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),c()},1)):c()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return _S(),e.ready})})(),XE=E2;var YE=class{constructor(e){this.uuid=e}instances=[-1,-1];json=null;loaded=!1;mono=!0},S2=(t,e)=>{if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},Xw=class{#e;#t;#r;#i=new Map;#n=new Map;#a=1;#o=null;#s=null;#c=!1;#l=!1;constructor(e,r,n){this.#e=e,this.#t=r,this.#r=n}async settle(){for(;this.#c;)await new Promise(e=>setTimeout(e,1))}imports(){return{host_nam_create:e=>this.#u(e),host_nam_load:(e,r,n)=>this.#p(e,r,n),host_nam_set_mono:(e,r)=>this.#d(e,r!==0),host_nam_process:(e,r,n,i,a,o,s)=>this.#v(e,r,n,i,a,o,s),host_nam_reset:e=>this.#f(e),host_nam_release:e=>this.#m(e)}}#u(e){let r=M.toString(new Uint8Array(this.#e.buffer,e,16).slice()),n=this.#n.get(r);if(W(n))return n;let i=this.#a++;return this.#i.set(i,new YE(r)),this.#n.set(r,i),i}#p(e,r,n){let i=this.#i.get(e);if(!W(i))return;if(n===0){i.json=null,this.#x(i);return}let a=new Uint8Array(this.#e.buffer,r,n).slice();W(i.json)&&S2(i.json,a)||(i.json=a,W(this.#s)?this.#h(i):this.#w())}#d(e,r){let n=this.#i.get(e);if(!W(n))return;n.mono=r;let i=this.#s;W(i)&&(r?n.instances[1]>=0&&(i.unloadModel(n.instances[1]),i.destroyInstance(n.instances[1]),n.instances[1]=-1):n.instances[1]<0&&(n.instances[1]=i.createInstance(),W(n.json)&&n.loaded&&(n.loaded=this.#g(n.instances[1],n.json)&&n.loaded)))}#v(e,r,n,i,a,o,s){let u=this.#i.get(e),d=this.#s;if(!W(u)||!W(d)||!u.loaded||u.instances[0]<0)return 0;let m=this.#e.buffer;if(d.process(u.instances[0],new Float32Array(m,r,o),new Float32Array(m,i,o)),s>1){if(u.instances[1]<0)return 0;d.process(u.instances[1],new Float32Array(m,n,o),new Float32Array(m,a,o))}return 1}#f(e){let r=this.#i.get(e),n=this.#s;if(!(!W(r)||!W(n)))for(let i of r.instances)i>=0&&n.reset(i)}#m(e){let r=this.#i.get(e);if(!W(r))return;let n=this.#s;if(W(n))for(let i of r.instances)i>=0&&(n.unloadModel(i),n.destroyInstance(i));this.#i.delete(e),this.#n.get(r.uuid)===e&&this.#n.delete(r.uuid)}#w(){this.#c||this.#l||W(this.#s)||(this.#c=!0,this.#t().then(e=>XE({wasmBinary:e,locateFile:()=>""})).then(e=>{this.#o=e;let r=Lm.fromModule(e);r.setSampleRate(this.#r),this.#s=r,this.#c=!1;for(let n of this.#i.values())W(n.json)&&this.#h(n)}).catch(e=>{this.#c=!1,this.#l=!0,console.error("Failed to load NAM WASM:",e)}))}#h(e){let r=this.#s;!W(r)||!W(e.json)||(e.instances[0]<0&&(e.instances[0]=r.createInstance()),!e.mono&&e.instances[1]<0&&(e.instances[1]=r.createInstance()),e.loaded=this.#g(e.instances[0],e.json),e.instances[1]>=0&&(e.loaded=this.#g(e.instances[1],e.json)&&e.loaded))}#x(e){e.loaded=!1;let r=this.#s;if(W(r))for(let n of e.instances)n>=0&&r.unloadModel(n)}#g(e,r){let n=this.#o;if(!W(n))return!1;let i=n._malloc(r.length+1);n.HEAPU8.set(r,i),n.HEAPU8[i+r.length]=0;let a=n._nam_loadModel(e,i);return n._free(i),a||console.error("NAM loadModel failed"),!!a}};var bn={Pan:17,AttackVolEnv:34,DecayVolEnv:36,SustainVolEnv:37,ReleaseVolEnv:38,KeyRange:43,VelRange:44,CoarseTune:51,FineTune:52,SampleId:53,SampleModes:54,OverridingRootKey:58},P2=1330857522,$2=32,CM=24,zM=40,OM=8,k2=({samples:t,presets:e})=>{let r=e.reduce((h,w)=>h+w.length,0),n=$2,i=n+t.length*CM,a=i+r*zM,o=a+e.length*OM,s=t.reduce((h,w)=>h+w.pcm.length,0),u=new ArrayBuffer(o+s*4),d=new DataView(u);d.setUint32(0,P2,!0),d.setUint32(4,1,!0),d.setUint32(8,t.length,!0),d.setUint32(12,r,!0),d.setUint32(16,e.length,!0),d.setUint32(20,n,!0),d.setUint32(24,i,!0),d.setUint32(28,a,!0);let m=o;t.forEach((h,w)=>{let A=n+w*CM;d.setUint32(A,m,!0),d.setUint32(A+4,h.pcm.length,!0),d.setFloat32(A+8,h.sampleRate,!0),d.setUint32(A+12,h.loopStart,!0),d.setUint32(A+16,h.loopEnd,!0),new Float32Array(u,m,h.pcm.length).set(h.pcm),m+=h.pcm.length*4});let x=0;return e.forEach((h,w)=>{let A=a+w*OM;d.setUint32(A,x,!0),d.setUint32(A+4,h.length,!0);for(let _ of h){let C=i+x*zM;d.setUint8(C,_.keyLo),d.setUint8(C+1,_.keyHi),d.setUint8(C+2,_.velLo),d.setUint8(C+3,_.velHi),d.setUint32(C+4,_.sampleIndex,!0),d.setUint32(C+8,_.rootKey,!0),d.setUint32(C+12,_.loopMode,!0),d.setFloat32(C+16,_.pan,!0),d.setFloat32(C+20,_.attack,!0),d.setFloat32(C+24,_.decay,!0),d.setFloat32(C+28,_.sustain,!0),d.setFloat32(C+32,_.release,!0),x++}}),u},Qw=(t,e)=>t.generators[e]?.value,Cd=(t,e,r)=>Qw(e,r)??Qw(t,r),QE=t=>t!==void 0?Math.pow(2,t/1200):.005,Yw=(t,e)=>t.generators[e]?.range??{lo:0,hi:127},UM=t=>{let e=[],r=new Map,n=a=>{let o=r.get(a);if(o!==void 0)return o;let s=new Float32Array(a.data.length);for(let d=0;d<s.length;d++)s[d]=a.data[d]/32768;let u=e.length;return e.push({pcm:s,sampleRate:a.header.sampleRate,loopStart:a.header.startLoop,loopEnd:a.header.endLoop}),r.set(a,u),u},i=t.presets.map(a=>{let o=[];for(let s of a.zones){let u=Yw(s,bn.KeyRange),d=Yw(s,bn.VelRange);for(let m of s.instrument.zones){let x=Yw(m,bn.KeyRange),h=Yw(m,bn.VelRange),w=Math.max(u.lo,x.lo),A=Math.min(u.hi,x.hi),_=Math.max(d.lo,h.lo),C=Math.min(d.hi,h.hi);if(w>A||_>C)continue;let K=m.sample??t.samples[Qw(m,bn.SampleId)??0];if(K===void 0)continue;let U=n(K),ee=Qw(m,bn.OverridingRootKey)??K.header.originalPitch??60,re=Cd(s,m,bn.SampleModes)??0,me=Cd(s,m,bn.SustainVolEnv);o.push({keyLo:w,keyHi:A,velLo:_,velHi:C,sampleIndex:U,rootKey:ee,loopMode:re===1||re===3?1:0,pan:(Cd(s,m,bn.Pan)??0)/1e3,attack:QE(Cd(s,m,bn.AttackVolEnv)),decay:QE(Cd(s,m,bn.DecayVolEnv)),sustain:1-(me??0)/1e3,release:QE(Cd(s,m,bn.ReleaseVolEnv))})}}return o});return k2({samples:e,presets:i})};var N2=512,VM=(t,e,r)=>{let n=Ct(()=>$M(t,e));return n.status==="failure"||n.value.length===0?r:new Error(`wasm panic: ${n.value}`,{cause:r})},jM=(t,e,r,n)=>{let i=new WebAssembly.Table({initial:N2,element:"anyfunc"}),a=W(globalThis.performance)?()=>performance.now()*1e3:()=>Date.now()*1e3,o=new WebAssembly.Instance(t.engineModule,{env:{memory:e,__indirect_function_table:i,host_perf_now:a}}).exports;o.init(r);let s=new qw(e,o,r,(m,x)=>n.deviceMessage(m,x)),u=new Xw(e,()=>n.fetchNamWasm(),r),d={...s.imports(),...u.imports()};return t.deviceModules.forEach((m,x)=>NM(o,e,i,m,t.deviceBoxTypes[x],r,d)),t.composites.forEach(m=>MM(o,e,m)),o},KM=(t,e,r,n,i,a)=>{let o=s=>{let u=s.catch(a);n.add(u),u.finally(()=>n.delete(u))};for(;;){let s=t.input_reserve(16),u=t.sample_take_request(s);if(u<0)break;let d=new Uint8Array(e.buffer,s,16).slice();o(r.fetchAudio(d).then(m=>{let{numberOfFrames:x,numberOfChannels:h,sampleRate:w,frames:A}=m,_=x*Float32Array.BYTES_PER_ELEMENT,C=t.sample_allocate(u,h*_);if(C!==0){for(let K=0;K<h;K++)new Float32Array(e.buffer,C+K*_,x).set(A[K]);t.sample_set_ready(u,x,h,w)}},m=>{t.sample_allocate(u,4),t.sample_set_ready(u,1,1,i),r.log(`sample load failed: ${m}`)}))}for(;;){let s=t.input_reserve(16),u=t.soundfont_take_request(s);if(u<0)break;let d=new Uint8Array(e.buffer,s,16).slice();o(r.fetchSoundfont(d).then(m=>{let x=new Uint8Array(UM(m)),h=t.soundfont_allocate(u,x.byteLength);h!==0&&(new Uint8Array(e.buffer,h,x.byteLength).set(x),t.soundfont_set_ready(u))},m=>r.log(`soundfont load failed: ${m}`)))}};var WM="engine-wasm-processor",LM="engine-sync-bytes",ZM="engine-frozen-audio";var eS=class extends AudioWorkletProcessor{#e=new Y;#t;#r;#i;#n=new Float32Array(qx);#a;#o;#s;#c;#l;#u=[];#p;#d;#v=new Lw;#f=new Set;#m=-1;#w=[];#h=!1;#x=!0;#g=!1;#_=!1;#A=!1;#E=0;#F=0;constructor({processorOptions:e}){super();let{syncStreamBuffer:r,controlFlagsBuffer:n,hrClockBuffer:i,variant:a}=e,{engineModule:o,deviceModules:s,deviceBoxTypes:u,composites:d,memory:m}=a;this.#t=m;let x=DS.for(this.port);this.#a=An.sender(x.channel("engine-to-client"),_=>new class{log(C){_.dispatchAndForget(this.log,C)}error(C){_.dispatchAndForget(this.error,C)}deviceMessage(C,K){_.dispatchAndForget(this.deviceMessage,C,K)}fetchAudio(C){return _.dispatchAndReturn(this.fetchAudio,C)}fetchSoundfont(C){return _.dispatchAndReturn(this.fetchSoundfont,C)}fetchNamWasm(){return _.dispatchAndReturn(this.fetchNamWasm)}notifyClipSequenceChanges(C){_.dispatchAndForget(this.notifyClipSequenceChanges,C)}switchMarkerState(C){_.dispatchAndForget(this.switchMarkerState,C)}ready(){_.dispatchAndForget(this.ready)}});let h=jM({engineModule:o,deviceModules:s,deviceBoxTypes:u,composites:d},m,sampleRate,this.#a);this.#r=h,this.#c=new Int32Array(n),this.#i=new Vw(i),this.#s=ph.writer(HP(),r,_=>{let C=new DataView(this.#t.buffer,h.engine_state_ptr(),h.engine_state_len());_.position=C.getFloat32(0),_.bpm=C.getFloat32(4),_.playbackTimestamp=this.#F,_.countInBeatsRemaining=C.getFloat32(12),_.isPlaying=C.getUint8(16)===1,_.isCountingIn=C.getUint8(17)===1,_.isRecording=C.getUint8(18)===1,this.#A&&(_.perfBuffer.set(this.#n),_.perfIndex=this.#E)}),this.#l=this.#e.own(Ph.create(x,"engine-live-data")),this.#p=this.#e.own(new jw(this.#l,nd.PEAKS)),this.#d=new mh;let w=new Float32Array(this.#d.numBins()),A=new Float32Array(this.#d.numBins());this.#o=new Yd(x.channel("engine-preferences"),pM.parse({})),this.#e.ownAll(this.#l.broadcastFloats(nd.SPECTRUM,w,_=>{_&&(w.set(this.#d.bins()),this.#d.decay=!0)}),this.#l.broadcastFloats(nd.WAVEFORM,A,_=>{_&&A.set(this.#d.waveform())}),this.#o.catchupAndSubscribe(_=>h.set_metronome_enabled(_?1:0),"metronome","enabled"),this.#o.catchupAndSubscribe(_=>h.set_metronome_gain(_),"metronome","gain"),this.#o.catchupAndSubscribe(_=>h.set_metronome_beat_sub_division(_),"metronome","beatSubDivision"),this.#o.catchupAndSubscribe(_=>h.set_metronome_monophonic(_?1:0),"metronome","monophonic"),this.#o.catchupAndSubscribe(_=>h.set_allow_takes(_?1:0),"recording","allowTakes"),this.#o.catchupAndSubscribe(_=>h.set_pause_on_loop_disabled(_?1:0),"playback","pauseOnLoopDisabled"),this.#o.catchupAndSubscribe(_=>h.set_truncate_notes_at_region_end(_?1:0),"playback","truncateNotesAtRegionEnd"),this.#o.catchupAndSubscribe(_=>this.#A=_,"debug","dspLoadMeasurement"),An.executor(x.channel(LM),{applyUpdates:_=>this.#y(()=>this.#B(_)),checksum:_=>this.#S(_)}),An.executor(x.channel(ZM),{frozenAllocate:(_,C)=>{let{status:K,value:U,error:ee}=Ct(()=>h.frozen_allocate(_,C));return K==="failure"?(this.#b(ee),Promise.reject(ee)):Promise.resolve(U)},frozenAttach:(_,C,K,U)=>this.#y(()=>{let ee=h.input_reserve(16);new Uint8Array(this.#t.buffer,ee,16).set(_),h.set_frozen_audio(C,K,U)}),frozenClear:_=>this.#y(()=>{let C=h.input_reserve(16);new Uint8Array(this.#t.buffer,C,16).set(_),h.clear_frozen_audio()})}),An.executor(x.channel("engine-commands"),{play:()=>this.#y(()=>this.#M()),stop:_=>this.#y(()=>this.#I(_)),setPosition:_=>this.#y(()=>{this.#F=_,h.set_position(_)}),prepareRecordingState:_=>this.#y(()=>{this.#_=!0,h.prepare_recording_state(_?1:0,this.#o.settings.recording.countInBars)}),stopRecording:()=>this.#y(()=>{this.#_=!1,h.stop_recording()}),queryLoadingComplete:()=>Promise.all(this.#f).then(()=>!0),panic:()=>{this.#g=!0},loadClickSound:(_,C)=>this.#y(()=>{let{frames:K,numberOfFrames:U,numberOfChannels:ee,sampleRate:re}=C,me=Math.min(ee,2),$e=h.click_allocate(U,me);for(let Q=0;Q<me;Q++)new Float32Array(this.#t.buffer,$e+Q*U*4,U).set(K[Q]);h.set_click_sound(_,U,me,re)}),setFrozenAudio:(_,C)=>this.#y(()=>{if(C===null){let we=h.input_reserve(16);new Uint8Array(this.#t.buffer,we,16).set(_),h.clear_frozen_audio();return}let{frames:K,numberOfFrames:U,numberOfChannels:ee,sampleRate:re}=C,me=Math.min(ee,2),$e=h.frozen_allocate(U,me);if($e===0)return;for(let we=0;we<me;we++)new Float32Array(this.#t.buffer,$e+we*U*4,U).set(K[we]);let Q=h.input_reserve(16);new Uint8Array(this.#t.buffer,Q,16).set(_),h.set_frozen_audio(U,me,re)}),updateMonitoringMap:_=>this.#y(()=>{this.#w=_;let C=h.input_reserve(_.length*24),K=new DataView(this.#t.buffer,C,_.length*24);_.forEach(({uuid:U,channels:ee},re)=>{new Uint8Array(this.#t.buffer,C+re*24,16).set(U),K.setInt32(re*24+16,ee[0],!0),K.setInt32(re*24+20,ee.length>1?ee[1]:-1,!0)}),h.set_monitoring_map(_.length)}),noteSignal:_=>this.#y(()=>this.#N(_)),ignoreNoteRegion:_=>this.#y(()=>{let C=h.input_reserve(16);new Uint8Array(this.#t.buffer,C,16).set(_),h.ignore_note_region()}),scheduleClipPlay:_=>this.#y(()=>_.forEach(C=>{let K=h.input_reserve(16);new Uint8Array(this.#t.buffer,K,16).set(C),h.schedule_clip_play()})),scheduleClipStop:_=>this.#y(()=>_.forEach(C=>{let K=h.input_reserve(16);new Uint8Array(this.#t.buffer,K,16).set(C),h.schedule_clip_stop()})),setupMIDI:(_,C)=>this.#v.connect(_,C),terminate:()=>{this.#x=!1,this.#u.forEach(_=>_.terminate()),this.#u.length=0,this.#e.terminate()}})),this.#a.ready()}process(e,r){if(!this.#x)return!1;if(Atomics.load(this.#c,0)===1)return this.#s.tryWrite(),!0;let{status:n,error:i}=Ct(()=>this.#P(e,r));return n==="failure"?(this.#b(i),!1):!0}#b(e){console.debug(e),this.#x=!1,this.#a.error(VM(this.#r,this.#t,e)),this.#e.terminate()}#y(e){let{status:r,error:n}=Ct(e);r==="failure"&&this.#b(n)}#S(e){let r=new Int8Array(this.#t.buffer,this.#r.checksum_ptr(),32);if(e.length===r.length&&e.every((i,a)=>i===r[a]))return Promise.resolve();let n=new Error("box-graph checksum mismatch: the engine mirror diverged from the source graph");return this.#a.error(n),Promise.reject(n)}#P(e,[r,n]){if(this.#g)return V("Manual Panic");let i=this.#A?this.#i.start():0,a=this.#r,o=this.#w;if(o.length>0){let h=e[0]??[],w=new Float32Array(this.#t.buffer,a.monitor_input_ptr(),8*ta);w.fill(0);for(let{channels:A}of o)for(let _ of A){let C=h[_];C!==void 0&&_<8&&w.set(C,_*ta)}}if(a.render(),o.length>0&&n!==void 0){let h=new Float32Array(this.#t.buffer,a.monitor_output_ptr(),8*ta);for(let{channels:w}of o)for(let A of w){let _=n[A];_!==void 0&&A<8&&_.set(h.subarray(A*ta,(A+1)*ta))}}let s=r[0].length,u=this.#t.buffer,d=a.output_ptr(),m=new Float32Array(u,d,s),x=new Float32Array(u,d+s*Float32Array.BYTES_PER_ELEMENT,s);r[0].set(m),r.length>1&&r[1].set(x),this.#p.process(r[0],r[1]??r[0]),this.#d.process(r[0],r[1]??r[0],0,ta),this.#T(),this.#A&&(this.#i.end(),this.#n[this.#E]=i,this.#E=(this.#E+1)%qx),this.#l.flush(),this.#s.tryWrite(),this.#$(),this.#k(),this.#v.drain(a,this.#t)}#$(){let e=this.#r,r=e.clip_changes_count();if(r===0)return;let n=e.input_reserve(r*20),i=e.clip_changes_take(n),a=new DataView(this.#t.buffer,n,i*20),o=[],s=[],u=[];for(let d=0;d<i;d++){let m=new Uint8Array(this.#t.buffer,n+d*20,16).slice(),x=a.getUint32(d*20+16,!0);x===0?o.push(m):x===1?s.push(m):u.push(m)}this.#a.notifyClipSequenceChanges({started:o,stopped:s,obsolete:u})}#k(){let e=this.#r,r=e.marker_changes_count();if(r===0)return;let n=e.input_reserve(r*24),i=e.marker_changes_take(n),a=new DataView(this.#t.buffer,n,i*24);for(let o=0;o<i;o++)if(a.getUint32(o*24+20,!0)===1){let u=new Uint8Array(this.#t.buffer,n+o*24,16).slice();this.#a.switchMarkerState([u,a.getUint32(o*24+16,!0)])}else this.#a.switchMarkerState(null)}#N(e){let r=this.#r.input_reserve(16);new Uint8Array(this.#t.buffer,r,16).set(e.uuid),lo.isOn(e)?this.#r.note_signal_on(e.pitch,e.velocity):lo.isOff(e)?this.#r.note_signal_off(e.pitch):lo.isAudition(e)&&this.#r.note_signal_audition(e.pitch,e.duration,e.velocity)}#M(){this.#o.settings.playback.timestampEnabled&&this.#r.set_position(this.#F),this.#_=!0,this.#r.play()}#I(e){let r=new DataView(this.#t.buffer,this.#r.engine_state_ptr(),this.#r.engine_state_len()),n=this.#_||r.getUint8(16)===1,i=r.getUint8(17)===1||r.getUint8(18)===1;this.#_=!1,this.#r.pause(),i&&this.#r.set_position(this.#o.settings.playback.timestampEnabled?this.#F:0),(e||!n)&&(this.#r.stop(),this.#F=0,this.#p.clear())}#B(e){let r=new Uint8Array(e),n=this.#r.input_reserve(r.length);new Uint8Array(this.#t.buffer,n,r.length).set(r);let i=this.#r.apply_updates(r.length);if(i!==0){this.#a.error(new Error(`apply_updates rejected a transaction (code ${i})`));return}!this.#h&&this.#r.bind()===0&&(this.#h=!0),KM(this.#r,this.#t,this.#a,this.#f,sampleRate,a=>this.#b(a))}#T(){let e=this.#r.broadcast_generation();if(e===this.#m)return;this.#m=e,this.#u.forEach(n=>n.terminate()),this.#u.length=0;let r=this.#r.broadcast_count();for(let n=0;n<r;n++){let i=this.#r.input_reserve(48);if(this.#r.broadcast_entry(n,i)===0)continue;let a=new DataView(this.#t.buffer,i,48),o=new Uint8Array(this.#t.buffer,i,16).slice(),s=a.getUint32(16,!0),u=a.getUint32(20,!0),d=a.getUint32(24,!0),m=a.getUint32(28,!0),x=[];for(let w=0;w<m;w++)x.push(a.getUint16(32+w*2,!0));let h=Oe.compose(o,...x);if(s===0){let w=new Float32Array(this.#t.buffer,u,d);this.#u.push(this.#l.broadcastFloat(h,()=>w[0]))}else if(s===2){let w=new Int32Array(this.#t.buffer,u,d),A=new Int32Array(this.#t.buffer,u+4,d-1);this.#u.push(this.#l.broadcastIntegers(h,A,()=>{A[Math.min(w[0],A.length-1)]=0,w[0]=0}))}else if(s===3){let w=new Int32Array(this.#t.buffer,u,d);this.#u.push(this.#l.broadcastIntegers(h,w,()=>{}))}else{let w=new Float32Array(this.#t.buffer,u,d);this.#u.push(this.#l.broadcastFloats(h,w,A=>this.#r.broadcast_set_active(n,A?1:0)))}}}};registerProcessor(WM,eS);
85
+ /*! Bundled license information:
86
+
87
+ @opendaw/nam-wasm/dist/index.js:
88
+ (**
89
+ * @opendaw/nam-wasm
90
+ *
91
+ * Neural Amp Modeler WASM with multi-instance support.
92
+ * Designed for integration with Web Audio AudioWorklets.
93
+ *
94
+ * @license MIT
95
+ *)
96
+ */
97
+ //# sourceMappingURL=wasm-processor.js.map