1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1170],{1878:(e,t,n)=>{"use strict";n.d(t,{$:()=>r,V:()=>i});var r=function(){},i=function(){}},9459:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});let r=(e,t,n)=>Math.min(Math.max(n,e),t)},22186:(e,t,n)=>{"use strict";n.d(t,{$I:()=>J,$m:()=>en,BF:()=>Y,Bg:()=>L,Br:()=>ep,CT:()=>q,G5:()=>W,G8:()=>M,GP:()=>j,Gn:()=>R,HJ:()=>w,IL:()=>r,JW:()=>B,K0:()=>P,Ms:()=>h,Nt:()=>b,PE:()=>E,QM:()=>C,QT:()=>er,RF:()=>z,Sn:()=>g,So:()=>X,Sr:()=>ee,Sw:()=>c,T4:()=>ey,TY:()=>et,UK:()=>U,WN:()=>x,WR:()=>N,W_:()=>a,Xt:()=>Z,Yi:()=>p,ZD:()=>v,d6:()=>ei,dU:()=>em,fu:()=>eh,hf:()=>s,hk:()=>_,ij:()=>S,k9:()=>F,lK:()=>K,lP:()=>u,mB:()=>m,p7:()=>y,pU:()=>A,pe:()=>ef,rU:()=>d,rd:()=>O,sQ:()=>Q,sU:()=>H,tB:()=>o,wR:()=>i,wZ:()=>eo,wi:()=>G,x$:()=>eg,y8:()=>k,zU:()=>$});class r{constructor(){this._eventListeners={},this.dispatchEvent=this.dispatchEvent.bind(this),this.addEventListener=this.addEventListener.bind(this),this.removeEventListener=this.removeEventListener.bind(this),this.hasEventListener=this.hasEventListener.bind(this)}addEventListener(e,t){let n=this._eventListeners;void 0===n[e]&&(n[e]=[]),n[e].includes(t)||n[e].push(t)}hasEventListener(e,t){let n=this._eventListeners;return void 0!==n[e]&&n[e].includes(t)}removeEventListener(e,t){let n=this._eventListeners[e];if(void 0!==n){let e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){let t=this._eventListeners[e.type];if(void 0!==t){e.target=this;let n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e)}}}async function i(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}function o(){return(typeof performance>"u"?Date:performance).now()}class a extends r{constructor(){super(...arguments),this._onPointerDown=e=>{if(0!==e.button||!this._element)return;this._pointerUp=void 0;let t=e.clientX/this._element.clientWidth*2-1,n=-(2*(e.clientY/this._element.clientHeight))+1,r=o();this._pointerDown={x:t,y:n,time:r},this._pointer=this._pointerDown,this.dispatchEvent({type:"dragStart",pointer:this._pointerDown})},this._onPointerMove=e=>{if(!this._pointerDown||!this._pointer||!this._element)return;let t=e.clientX/this._element.clientWidth*2-1,n=-(2*(e.clientY/this._element.clientHeight))+1,r=o();this.dispatchEvent({type:"drag",pointer:this._pointer,drag:{x:t-this._pointerDown.x,y:n-this._pointerDown.y,time:r-this._pointerDown.time},delta:{x:t-this._pointer.x,y:n-this._pointer.y,time:r-this._pointer.time}}),this._pointer={x:t,y:n,time:o()},e.buttons%2==0&&this._onPointerUp(e)},this._onPointerUp=e=>{if(0!==e.button||!this._pointerDown||!this._element)return;let t=e.clientX/this._element.clientWidth*2-1,n=-(2*(e.clientY/this._element.clientHeight))+1,r=o();this._pointerUp={x:t,y:n,time:r},this.dispatchEvent({type:"dragEnd",pointer:this._pointerUp,drag:{x:this._pointerUp.x-this._pointerDown.x,y:this._pointerUp.y-this._pointerDown.y,time:this._pointerUp.time-this._pointerDown.time}}),this._pointerDown=void 0,this._pointer=void 0}}get element(){return this._element}set element(e){this._element!==e&&(this._element&&this._removeElement(),this._element=e,this._element&&this._addElement())}_removeElement(){var e,t,n,r,i;null==(e=this._element)||e.removeEventListener("pointerdown",this._onPointerDown),null==(t=this._element)||t.removeEventListener("pointermove",this._onPointerMove),null==(n=this._element)||n.removeEventListener("pointerup",this._onPointerUp),null==(r=this._element)||r.removeEventListener("pointercancel",this._onPointerUp),null==(i=this._element)||i.removeEventListener("pointerout",this._onPointerUp)}_addElement(){var e,t,n,r,i;null==(e=this._element)||e.addEventListener("pointerdown",this._onPointerDown),null==(t=this._element)||t.addEventListener("pointermove",this._onPointerMove),null==(n=this._element)||n.addEventListener("pointerup",this._onPointerUp),null==(r=this._element)||r.addEventListener("pointercancel",this._onPointerUp),null==(i=this._element)||i.addEventListener("pointerout",this._onPointerUp)}dispose(){this.element=void 0}}class s{constructor(e){this.options={limit:500,debug:!1,bindHotKeys:!1},this.enabled=!0,this.presets={},this._keyDown=e=>{if(!this.enabled)return;let t=e.ctrlKey||e.metaKey;"KeyZ"===e.code&&t&&!e.shiftKey?this.undo():("KeyZ"===e.code&&t&&e.shiftKey||"KeyY"===e.code&&e.ctrlKey)&&this.redo()},Object.assign(this.options,e),this.limit=e.limit,this.options=e,this.reset(),e.bindHotKeys&&this.bindHotKeys(),this.log(`Initialized with stack limit of ${this.limit} commands`)}bindHotKeys(){return this.log("Bound 'undo' and 'redo' actions to 'Ctrl/Cmd+Z', 'Ctrl+Y' & 'Ctrl/Cmd+Shift+Z' hot keys"),(this.options.hotKeyRoot??document).addEventListener("keydown",this._keyDown),this}dispose(){return(this.options.hotKeyRoot??document).removeEventListener("keydown",this._keyDown),this.reset()}record(e){return this.enabled&&this._record(e),this}replaceLast(e){let t=this.peek();if(t)return this.log("replace",t,"with",e),this.stack[this.sp]=e,this}execute(e){if(!this.enabled)return;let t=this._rc(e),n=t.redo;return this.record.apply(this,t),this.log("Executing function..."),n.apply(e),this}_rc(e){if(!e.type)return e;{let t=this.presets[e.type];if("function"==typeof t)return t(e);throw console.error(e,t,this.presets),Error("Preset command not found")}}_record(e){this.enabled&&(this.log("Recording command",e),this._rebase(),this.stack.push(e),this.sp++,this._keepLimit())}_rebase(){this.canRedo()&&(this.stack.length=this.sp+1)}_keepLimit(){if(this.stack.length<=this.limit)return;let e=this.stack.length-this.limit;this.log("Stack size reached its limit: ${this.limit} commands. Cutting off most old commands..."),1===e?this.stack.shift():this.stack.splice(0,e),this.sp-=e}
1undo(){if(!this.canUndo())return this;let e=this.stack[this.sp];return this.log("undo"),this.sp--,this._rc(e).undo(),this}canUndo(){return this.sp>=0&&this.enabled}peek(){return this.canUndo()?this.stack[this.sp]:null}redo(){if(!this.canRedo())return this;let e=this.stack[this.sp+1];return this.log("redo"),this.sp++,this._rc(e).redo(),this}canRedo(){return this.sp<this.stack.length-1&&this.enabled}peekForward(){return this.canRedo()?this.stack[this.sp+1]:null}setLimit(e){let t=this.stack.length-this.sp-1;if(e<1||"number"!=typeof e)throw TypeError(`JSUndoManager.setLimit(): unexpected argument limit=${e}. Should be a positive number`);return e<t?console.warn(`JSUndoManager.setLimit(): cannot set stack limit (${e}) less than the number of 'redoable' commands (${t})`):(this.limit=Math.floor(e),this._keepLimit()),this}reset(){return this.log("reset"),this.stack=[],this.sp=-1,this}isEmpty(){return!this.stack.length}isFull(){return this.stack.length===this.limit}getSize(){return this.stack.length}log(e,...t){this.options.debug&&console.log(`Command Manager: ${e}`,...t)}}let l=class e{constructor(t=e.DECAY_MILLISECONDS){this.velocity=0,this.naturalFrequency=0,this.setDecayTime(t)}setDecayTime(t){this.naturalFrequency=1/Math.max(e.MIN_DECAY_MILLISECONDS,t)}update(e,t,n,r){let i=2e-4*this.naturalFrequency;if(null==e||0===r||e===t&&0===this.velocity)return t;if(n<0)return e;let o=e-t,a=this.velocity+this.naturalFrequency*o,s=o+n*a,l=Math.exp(-this.naturalFrequency*n),u=(a-this.naturalFrequency*s)*l,c=-this.naturalFrequency*(u+a*l);return Math.abs(u)<i*Math.abs(r)&&c*o>=0?(this.velocity=0,t):(this.velocity=u,t+s*l)}};function u(){let e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}function c({innerHTML:e="",id:t,classList:n,addToBody:r=!0,elementTag:i="div"}){let o=document.createElement(i);return t&&(o.id=t),o.innerHTML=e,n&&o.classList.add(...n),r&&document.body.appendChild(o),o}function d(e,t=document.head){let n=document.createElement("style");return n.type="text/css",n.innerText=e,null==t||t.appendChild(n),n}function p(e){if(!window)return console.warn("window is required"),"";let t="",n=new Uint8Array(e),r=n.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(n[e]);return window.btoa(t)}function h(e){if(!window)return console.warn("window is required"),new Uint8Array(0);let t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}l.SETTLING_TIME=1e4,l.MIN_DECAY_MILLISECONDS=.001,l.DECAY_MILLISECONDS=50;let f={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function m(e,t){return new f[e](t)}function g(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})}function y(e){if(!e||""===e||e.match(/__MACOSX\/.*\._/))return"";let t=(e=e.replace(/\?.*$/,"")).split(/[\\/]/).pop()??"",n=t.lastIndexOf(".");return""===t||n<1?"":t.slice(n+1)}function b(e){return RegExp.escape?RegExp.escape(e):e.replace(/[.*+?^${}()|[\]/\\=!:]/g,"\\$&")}function v(e){return e.replace(/[&<>"']/g,function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";default:return e}})}let w=(e,...t)=>String.raw({raw:e},...t),_=(e,...t)=>String.raw({raw:e},...t);function x(e,t){let n=window.URL.createObjectURL(e),r=document.createElement("a");r.style.display="none",r.href=n,r.download=t,document.body.appendChild(r),r.click(),setTimeout(()=>{document.body.removeChild(r),window.URL.revokeObjectURL(n)},1e3)}async function k(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>t(r.result),r.onerror=e=>n(r.error),r.onabort=e=>n(Error("Read aborted")),r.readAsDataURL(e)})}function E(e,t){return x(e,t??e.name)}async function C(e=!1,t=!1,n){let r=document.createElement("input");r.type="file",r.multiple=e,r.accept=n||"*",r.webkitdirectory=t,r.style.display="none",document.body.appendChild(r),r.click();let i=await new Promise(e=>{r.onchange=t=>{e(Array.from(r.files||[]))}});return document.body.removeChild(r),i}function M(){var e;let t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t}function O(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}function A(e,t,n,r=!0,i=!1){return!!(e&&function(e,t,n=!0,r=!1){let i=function(e,t){let n;do n=Object.getOwnPropertyDescriptor(e,t);while(!n&&(e=Object.getPrototypeOf(e)));return n}(e,t);return!!(null!=i&&i.set)||n&&(null==i?void 0:i.writable)!==!1&&(null==i?void 0:i.get)===void 0||r&&!i}(e,t,r,i))&&(e[t]=n,!0)}function j(e,...t){return"function"==typeof e&&(e=e(...t)),e}function S(e,t,n){for(let r of n){let n=e[r];void 0!==n&&A(t,r,n,!0)}return t}function z(e,t){for(let n of t)if(!e.includes(n))return!1;return!0}function L(e,t){return function(...n){return e(...n),t&&t.call(this,...n)}}function U(e,t,n=!1){for("string"==typeof e&&(e=e.split("."));e.length>0&&t;){let r=e.splice(0,1)[0];if(!(r.length<1))if(Array.isArray(t))t=t[parseInt(r)];else if("object"==typeof t&&r in t)t=t[r];else{if(n)throw Error("invalid access, check "+r+" in "+t);return}}return t}function R(e,t){return Object.hasOwn?Object.hasOwn(e,t):e.hasOwnProperty(t)}function P(e,t,n=!0){let r=n?e:{};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function I(e,t){return Object.fromEntries(Object.entries(e).map(e=>t(e)))}let D={priority:1/0,type:"Object",serialize:(e,t)=>I(e,([e,n])=>[e,$.Serialize(n,t,!1)]),deserialize:(e,t,n)=>Object.assign(t||{},I(e,([e,r])=>[e,$.Deserialize(r,null==t?void 0:t[e],n,!1)])),isType:e=>(e.constructor||Object)===Object},T=class e{static GetSerializer(t){return e.Serializers.find(e=>e.isType(t))}static RegisterSerializer(...t){for(let n of t){let t=n.priority??1e10,r=function(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return -1}(e.Serializers,e=>void 0!==e.priority&&e.priority<t);r>=0?e.Serializers.splice(r+1,0,n):e.Serializers.push(n)}}static UnregisterSerializer(...t){for(let n of t){let t=e.Serializers.indexOf(n);t>=0&&e.Serializers.splice(t,1)}}static Serialize(t,n,r=!1){if("function"==typeof t)return;if(!r){let r=e.GetSerializer(t);if(r)return r.serialize(t,n);if("function"==typeof t.toJSON){let e=t.toJSON(n,!0);return t.serializableClassId&&e&&(e.serializableClassId=t.serializableClassId),e}}let i=t.constructor??Object,o={};for(;i&&i!==Object;){for(let[r,a]of e.TypeMap.get(i)??[])o[r]=e.Serialize(t[a],n,!1);i=Object.getPrototypeOf(i)}return t.serializableClassId&&(o.serializableClassId=t.serializableClassId),o}static Deserialize(t,n,r,i=!1){if(void 0===t||n===t)return n;if(t&&"object"==typeof t&&(t.constructor||Object)===Object&&t.resource&&"string"==typeof t.resource&&t.uuid){let e=null==r?void 0:r[t.resource];if(!e)return console.warn(`Serialization: Resource ${t.resource} not found`),n;let i=t.uuid,o=e[i];if(!o)return console.warn(`Serialization: Resource ${t.resource} with uuid ${i} not found`),n;if("object"==typeof(t=o)&&(t.__useCount=t.__useCount?t.__useCount+1:1),n===t)return n;if(t&&"object"==typeof t)if((t.constructor||Object)!==Object)if(!n)return t;else{if(n.uuid&&n.uuid===i){if("function"==typeof n.copy&&!0===n.copyOnDeserialize)return n.copy(t),n;console.warn("Serialization: replacing object",n,"with deserialized resource",t)}else if(!n.uuid&&"function"==typeof n.copy&&!0===n.copyOnDeserialize)return n.copy(t),n;return t}else console.error("Serialization: during Deserialize, meta should only have class instances, not js objects",t,n,r)}if(t&&"object"==typeof t&&(t.constructor||Object)!==Object&&!Array.isArray(t)&&!t.serializableClassId){if(t instanceof Blob)return t;console.warn("Serialization: Data might already be deserialized. It will be cloned, or copied to source",t,"source",n,t.constructor,t.constructor!==Object)}if(t&&"object"==typeof t){let r=r=>{let i=e.SerializableClasses.get(r);i&&(n=i.DataInConstructor?new i(t):new i)};t.serializableClassId&&(!n||n.serializableClassId!==t.serializableClassId)&&r(t.serializableClassId),t.type&&(!n||n.type!==t.type)&&r(t.type),!Array.isArray(n)&&Array.isArray(t)?n=[]:"object"!=typeof n&&(t.constructor||Object)===Object&&(n={})}if("function"==typeof n)return console.error("Serialization: Cannot deserialize into a function",n,t),n;if(!i){let i=e.GetSerializer(t);if(i&&i!==D)return i.deserialize(t,n,r)}if(!t||null==n||"object"!=typeof n)return t;if(!i&&"function"==typeof(null==n?void 0:n.fromJSON))return n.fromJSON(t,r,!0),n;let o=n.constructor??Object;if(o===Object)return D.deserialize(t,n,r);for(;o&&o!==Object;){for(let[i,a]of e.TypeMap.get(o)??[]){let o=n[a],s=e.Deserialize(t[i],o,r,!1);s!==o&&A(n,a,s,!0)}
1o=Object.getPrototypeOf(o)}return n}};T.TypeMap=new WeakMap,T.SerializableClasses=new Map,T.Serializers=[{priority:0,type:"Array",isType:e=>Array.isArray(e),serialize:(e,t)=>e.map(e=>T.Serialize(e,t,!1)),deserialize:(e,t,n)=>{let r=e.length;Array.isArray(t)||(t=[]);for(let i=0;i<r;i++){let r=e[i],o=t.length>i?T.Deserialize(r,t[i],n,!1):T.Deserialize(r,void 0,n,!1);t.length<=i?t.push(o):t[i]=o}return t}},{priority:0,isType:e=>!e||"object"!=typeof e,serialize:e=>{if(e&&"number"==typeof e){if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN"}return e},deserialize:(e,t)=>{if("number"==typeof t){if("Infinity"===e)return 1/0;if("-Infinity"===e)return-1/0;if("NaN"===e)return NaN}return e}},D];let $=T,V=class e{static callFunction(t,n,r=[]){if(!n)return t(...r);if(t.name&&n[t.name]===t)return t.call(n,...r);e.methodMap.has(n)||e.methodMap.set(n,new WeakMap);let i=e.methodMap.get(n);if(!i.has(t)){let e=n;for(;e;){for(let o of Object.values(Object.getOwnPropertyDescriptors(e)))if(o.value===t)return i.set(t,!0),t.call(n,...r);e=Object.getPrototypeOf(e)}i.set(t,!1)}return i.get(t)?t.call(n,...r):t(...r)}};V.methodMap=new WeakMap;let G=V;function F(e,t="param"){if(!e)throw Error("onChange: fnKey is undefined, make sure the function exists or provide a string");return(n,r,i)=>{let o={get(){return this[`_oc_${r}`]},set(n){var i;let o=this[`_oc_${r}`];if(o===n)return;this[`_oc_${r}`]=n;let a="param"===t?[r,n,o,this]:"object"===t?[{key:r,value:n,oldValue:o,target:this}]:[];"string"==typeof e?null==(i=this[e])||i.call(this,...a):"function"==typeof e&&G.callFunction(e,this,a)}};if(i)return R(i,"value")&&delete i.value,R(i,"writable")&&delete i.writable,R(i,"initializer")&&delete i.initializer,Object.assign(i,o);Object.defineProperty(n,r,o)}}function q(e,t="void"){if(!e)throw Error("onChange: fnKey is undefined, make sure the function exists or provide a string");return F(e,t)}function B(e,t="object"){if(!e)throw Error("onChange: fnKey is undefined, make sure the function exists or provide a string");return F(e,t)}function N(e){return F((t,n,r,i)=>{if(!i.dispatchEvent)throw Error("onChangeDispatchEvent: target does not have dispatchEvent");i.dispatchEvent({type:e||`${t}-changed`,detail:{key:t,value:n,oldValue:r}})},"param")}function K(e){return(t,n)=>{let r=t.constructor;if(r===Object)throw Error("All properties in an object are serialized by default");$.TypeMap.has(r)||$.TypeMap.set(r,[]),$.TypeMap.get(r).push([e||n,n])}}function H(e){return t=>(t.prototype.serializableClassId=e,$.SerializableClasses.set(e,t),t)}async function W(e,t,n,r=12){let i="string"==typeof t?new TextEncoder().encode(t):t,o=await crypto.subtle.digest("SHA-256",i),a=crypto.getRandomValues(new Uint8Array(r)),s=Array.from(a).map(e=>String.fromCharCode(e)).join(""),l={name:"AES-GCM",iv:a},u=await crypto.subtle.importKey("raw",o,l,!1,["encrypt"]),c="string"==typeof e?new TextEncoder().encode(e):e,d=Array.from(new Uint8Array(await crypto.subtle.encrypt(l,u,c))),p=d.map(e=>String.fromCharCode(e)).join(""),h=n?"string"==typeof n?n:new TextDecoder().decode(n):"",f=n?"string"==typeof n?new TextEncoder().encode(n):Array.from(n):[];return"string"==typeof e?h+s+p:new Uint8Array([...f,...a,...d])}async function Q(e,t,n=12){let r="string"==typeof t?new TextEncoder().encode(t):t,i=await crypto.subtle.digest("SHA-256",r),o=e.slice(0,n),a={name:"AES-GCM",iv:"string"==typeof o?new Uint8Array(Array.from(o).map(e=>e.charCodeAt(0))):o},s=await crypto.subtle.importKey("raw",i,a,!1,["decrypt"]),l=e.slice(n),u="string"==typeof l?new Uint8Array(Array.from(l).map(e=>e.charCodeAt(0))):l;try{let t=await crypto.subtle.decrypt(a,s,u);return"string"==typeof e?new TextDecoder().decode(t):new Uint8Array(t)}catch{throw Error("Decrypt failed")}}function Y(e,t=8192,n=!1,r="image/png"){if(!(e.width||e.videoWidth)||!(e.height||e.videoHeight))return"";let i=function(e,t=8192,n=!1){var r;let i=e.width||e.videoWidth,o=e.height||e.videoHeight;if(!i||!o)throw Error("Invalid bitmap");let a=document.createElement("canvas");a.width=Math.min(t,i),a.height=Math.floor(1+a.width*o/i);let s=e instanceof ImageBitmap,l=s&&n&&.5>Math.abs(a.width-i)?a.getContext("bitmaprenderer"):void 0;return l?l.transferFromImageBitmap(e):null==(r=a.getContext("2d"))||r.drawImage(e,0,0,a.width,a.height),s&&n&&e.close(),a}(e,t,!1),o=i.toDataURL(r);return i.remove(),n&&e instanceof ImageBitmap&&e.close(),o}async function J(e){return new Promise((t,n)=>{let r=new Image;r.addEventListener("load",()=>{let e=document.createElement("canvas");e.width=r.width,e.height=r.height;let i=e.getContext("2d");if(!i)return void n(Error("Could not get 2d context"));i.drawImage(r,0,0,e.width,e.height),t(i.getImageData(0,0,e.width,e.height)),e.remove(),r.remove()},!1),r.addEventListener("error",e=>{r.remove(),n(e)},!1),r.src=e})}function Z(e){let t=document.createElement("canvas");t.width=e.width||e.videoWidth||1,t.height=e.height||e.videoHeight||1;let n=t.getContext("2d");if(!n)throw Error("Unable to get 2d context");return n.translate(0,e.height||e.videoHeight||1),n.scale(1,-1),n.drawImage(e,0,0),t}let X=e=>
1`data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='7' fill='%23${e}'/%3E%3C/svg%3E%0A`,ee=e=>`data:image/svg+xml,%3Csvg viewBox='0 0 80 14' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext style='font: 8px "Roboto Mono", "Source Code Pro", Menlo, Courier, monospace; fill: white;' x='9' y='9'%3E${e}%3C/text%3E%3C/svg%3E%0A`;function et(e,t){return Math.abs(e)>Math.abs(t)?e:t}function en(e,t,n){return e&~(1<<t)|!!n<<t}function er(){let e=(e,t)=>e.toString(16).padStart(t,"0"),t=crypto.getRandomValues(new Uint8Array(16));t[6]=15&t[6]|64,t[8]=63&t[8]|128;let n=new DataView(t.buffer);return`${e(n.getUint32(0),8)}-${e(n.getUint16(4),4)}-${e(n.getUint16(6),4)}-${e(n.getUint16(8),4)}-${e(n.getUint32(10),8)}${e(n.getUint16(14),4)}`}function ei(e,t=null){var n;return null!=(n=null==window?void 0:window.location)&&n.href?new URL(window.location.href).searchParams.get(e)??t:t}let eo={alert:async e=>window.alert(e),prompt:async(e,t,n)=>window.prompt(e,t),confirm:async e=>window.confirm(e),confirmSync:e=>window.confirm(e)},ea=null;function es(e){return` 2${e.title?`<div class="dialog-title">${v(e.title)}</div>`:""} 3<div class="dialog-message">${v(e.message).replace(/((https?:\/\/|www\.)[^\s<]+)/g,e=>{let t=e;return t.startsWith("http")||(t="https://"+t),`<a href="${t}" target="_blank" rel="noopener noreferrer" class="dialog-link"><span class="dialog-link-text">${v(e)}</span></a>`}).replace(/\n/g,"<br>")}</div> 4`}let el=e=>` 5<div class="dialog-content"> 6${es(e)} 7</div> 8<div class="dialog-footer"> 9 ${e.ok&&`<button class="dialog-button dialog-ok">${v(e.ok)}</button>`||""} 10</div> 11`,eu=e=>` 12<div class="dialog-content"> 13${es(e)} 14</div> 15<div class="dialog-footer"> 16 ${e.cancel&&`<button class="dialog-button dialog-cancel">${v(e.cancel)}</button>`||""} 17 ${e.ok&&`<button class="dialog-button dialog-ok">${v(e.ok)}</button>`||""} 18</div> 19`,ec=e=>` 20<div class="dialog-content"> 21 ${es(e)} 22 <input class="dialog-input" type="text" value="${e.defaultValue??""}" style="margin-top:0.5rem;"/> 23</div> 24<div class="dialog-footer"> 25 ${e.cancel&&`<button class="dialog-button dialog-cancel">${v(e.cancel)}</button>`||""} 26 ${e.ok&&`<button class="dialog-button dialog-ok">${v(e.ok)}</button>`||""} 27</div> 28`;function ed(e,{message:t,...n}){ea||((ea=document.createElement("style")).textContent='.dialog-container{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1000;border-radius:10px;padding:20px;max-width:calc(100% - 32px);width:calc(100% - 32px);color:#0a0a0a;background-color:#fff;border:1px solid oklch(.922 0 0);box-shadow:#0000 0 0,#0000 0 0,#0000 0 0,#0000 0 0,#0000001a 0 10px 15px -3px,#0000001a 0 4px 6px -4px;display:flex;gap:1rem;flex-direction:column;box-sizing:border-box;font-family:Inter,-apple-system,"system-ui",Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";transition:max-width .5s,width .5s,height .5s}.dialog-content{display:flex;flex-direction:column;gap:.5rem;text-align:center}.dialog-title{font-size:1.125rem;font-weight:600;line-height:1.5;color:#0a0a0a}.dialog-message{color:#737373;font-size:.875rem;line-height:1.42}.dialog-footer{display:flex;gap:10px;flex-direction:column-reverse}@media (width >= 40rem){.dialog-content{text-align:left}.dialog-container{max-width:512px;width:512px}.dialog-footer{flex-direction:row;justify-content:flex-end}}.dialog-button,.dialog-input{height:2.25rem;box-sizing:border-box}.dialog-input{width:100%;padding:.25rem .75rem;font-size:1rem;border:1px solid oklch(.922 0 0);border-radius:.5rem;background:transparent;color:#0a0a0a;outline:none;transition:outline-width .2s}.dialog-button{padding:.5rem 1rem;box-shadow:#0000 0 0,#0000 0 0,#0000 0 0,#0000000d 0 1px 2px;border-radius:.5rem;border:1px solid oklch(.922 0 0);cursor:pointer;font-size:.875rem;background-color:#fff;color:#0a0a0a;transition:background-color .2s ease,color .2s ease,outline-width .2s ease}.dialog-button:focus,.dialog-input:focus{outline:3px solid #6d7a8c66}.dialog-button:hover{background-color:#f8f8f8}.dialog-ok{background-color:#0a0a0a;color:#fff}.dialog-ok:hover{background-color:#222}.dialog-link{max-width:100%;display:inline-block;vertical-align:bottom;text-decoration:underline;color:var(#2563eb);overflow:hidden}.dialog-link-text{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}',document.head.appendChild(ea));let r=document.createElement("div"),i=null==t?void 0:t.split(":")[0];return i&&t&&(t=t.replace(i+":","").trim()),r.innerHTML=e({...n,message:t,title:i}),r.classList.add("dialog-container"),document.body.appendChild(r),r}let ep={alert:async e=>{let t=ed(el,{message:e||"Alert",ok:"Okay"});return new Promise(e=>{let n=t.querySelector(".dialog-ok"),r=e=>
28{("Enter"===e.key||"Escape"===e.key)&&(e.preventDefault(),null==n||n.click())};window.addEventListener("keydown",r),null==n||n.addEventListener("click",()=>{window.removeEventListener("keydown",r),document.body.removeChild(t),e()}),null==n||n.focus()})},prompt:async(e,t,n=!0)=>{let r=ed(ec,{message:e||"Enter some text",ok:"OK",cancel:n?"Cancel":void 0,defaultValue:t});return new Promise(e=>{let t=r.querySelector(".dialog-ok"),n=r.querySelector(".dialog-cancel"),i=r.querySelector(".dialog-input");i.addEventListener("keydown",e=>{"Enter"===e.key&&(e.preventDefault(),null==t||t.click())});let o=e=>{"Escape"===e.key&&n&&(e.preventDefault(),null==n||n.click())},a=()=>{window.removeEventListener("keydown",o),document.body.removeChild(r)};window.addEventListener("keydown",o),null==t||t.addEventListener("click",()=>{let t=i.value;a(),e(t)}),null==n||n.addEventListener("click",()=>{a(),e(null)}),null==i||i.focus(),null==i||i.select()})},confirm:async e=>{let t=ed(eu,{message:e||"Are you sure?",ok:"Yes",cancel:"No"});return new Promise(e=>{let n=t.querySelector(".dialog-ok"),r=t.querySelector(".dialog-cancel"),i=e=>{"Escape"===e.key&&r&&(e.preventDefault(),r.click())},o=()=>{window.removeEventListener("keydown",i),document.body.removeChild(t)};window.addEventListener("keydown",i),null==n||n.addEventListener("click",()=>{o(),e(!0)}),null==r||r.addEventListener("click",()=>{o(),e(!1)}),null==r||r.focus()})},confirmSync:e=>window.confirm(e)};function eh(e){return null===e||"object"!=typeof e?e:Array.isArray(e)?e.map(eh):e._ui_isPrimitive||"function"!=typeof e.clone||!1===e._ui_primitiveClone?e:e.clone()}function ef(e,t){return null===e||"object"!=typeof e||null===t||"object"!=typeof t?e===t:Array.isArray(e)?Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>ef(e,t[n])):e._ui_isPrimitive||"function"!=typeof e.equals||!1===e._ui_primitiveEquals?e===t:!!e.equals(t)}function em(e,t){if(null===t||"object"!=typeof t)return t;if(!Array.isArray(t))return t._ui_isPrimitive||"function"!=typeof t.copy||!1===t._ui_primitiveCopy?t:!e||"object"!=typeof e||Array.isArray(e)||e._ui_isPrimitive||"function"!=typeof e.copy||!1===e._ui_primitiveCopy?eh(t):(e.copy(t),e);if(!(e&&Array.isArray(e)))return eh(t);if(e.length<t.length){for(let n=0;n<e.length;n++)e[n]=em(e[n],t[n]);for(let n=e.length;n<t.length;n++)e.push(eh(t[n]))}else{for(let n=0;n<t.length;n++)e[n]=em(e[n],t[n]);e.length=t.length}return e}function eg(e,t,n,r=2e3){if(!e||!e.enabled)return;if(t.type!==n)return e.record(t);let i=e.peek(),o=!!i&&i.type===n&&i.uid===t.uid;o&&(!i.final&&t.time-i.time<r?(t.lastVal=i.lastVal,t.val=eh(t.val),e.replaceLast(t)):o=!1),o||ef(t.lastVal,t.val)||(t.val=eh(t.val),e.record(t))}function ey(e,t,n,r,i,o,a=!0,s=2e3,l=!1,u){let[c,d]=t,p=r.lastValue??(null==c?void 0:c[d]),h=r.last??!0,f=ef(p,n),m=eh(p),g=!(f?!h:!c||em(p,n)!==p&&!A(c,d,n,!0,!0))&&(h||!f);return a&&g&&e&&eg(e,{type:o,lastVal:m,val:n,final:h,props:r,time:Date.now(),uid:i,binding:l?t:void 0,onUndoRedo:u},o,s),{last:h,value:n,lastValue:m,undoable:g}}},32204:function(e){var t;(t=function(){function e(e){return i.appendChild(e.dom),e}function n(e){for(var t=0;t<i.children.length;t++)i.children[t].style.display=t===e?"block":"none";r=e}var r=0,i=document.createElement("div");i.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",i.addEventListener("click",function(e){e.preventDefault(),n(++r%i.children.length)},!1);var o=(performance||Date).now(),a=o,s=0,l=e(new t.Panel("FPS","#0ff","#002")),u=e(new t.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=e(new t.Panel("MB","#f08","#201"));return n(0),{REVISION:16,dom:i,addPanel:e,showPanel:n,begin:function(){o=(performance||Date).now()},end:function(){s++;var e=(performance||Date).now();if(u.update(e-o,200),e>a+1e3&&(l.update(1e3*s/(e-a),100),a=e,s=0,c)){var t=performance.memory;c.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){o=this.end()},domElement:i,setMode:n}}).Panel=function(e,t,n){var r=1/0,i=0,o=Math.round,a=o(window.devicePixelRatio||1),s=80*a,l=48*a,u=3*a,c=2*a,d=3*a,p=15*a,h=74*a,f=30*a,m=document.createElement("canvas");m.width=s,m.height=l,m.style.cssText="width:80px;height:48px";var g=m.getContext("2d");return g.font="bold "+9*a+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=n,g.fillRect(0,0,s,l),g.fillStyle=t,g.fillText(e,u,c),g.fillRect(d,p,h,f),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d,p,h,f),{dom:m,update:function(l,y){r=Math.min(r,l),i=Math.max(i,l),g.fillStyle=n,g.globalAlpha=1,g.fillRect(0,0,s,p),g.fillStyle=t,g.fillText(o(l)+" "+e+" ("+o(r)+"-"+o(i)+")",u,c),g.drawImage(m,d+a,p,h-a,f,d,p,h-a,f),g.fillRect(d+h-a,p,a,f),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d+h-a,p,a,o((1-l/y)*f))}}},e.exports=t},39570:(e,t,n)=>{"use strict";n.d(t,{G:()=>B});let r=(e,t,n)=>{let r=t-e;return 0===r?1:(n-e)/r},i=(e,t,n)=>-n*e+n*t+e,o=(e,t)=>n=>Math.max(Math.min(n,t),e),a=e=>
28e%1?Number(e.toFixed(5)):e,s=/(-)?([\d]*\.?[\d])+/g,l=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,u=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function c(e){return"string"==typeof e}let d={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},p=Object.assign(Object.assign({},d),{transform:o(0,1)});Object.assign(Object.assign({},d),{default:1});let h=(e,t)=>n=>!!(c(n)&&u.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),f=(e,t,n)=>r=>{if(!c(r))return r;let[i,o,a,l]=r.match(s);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:void 0!==l?parseFloat(l):1}},m=o(0,255),g=Object.assign(Object.assign({},d),{transform:e=>Math.round(m(e))}),y={test:h("rgb","red"),parse:f("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+g.transform(e)+", "+g.transform(t)+", "+g.transform(n)+", "+a(p.transform(r))+")"},b={test:h("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:y.transform},v=e=>({test:t=>c(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`});v("deg");let w=v("%");v("px"),v("vh"),v("vw"),Object.assign(Object.assign({},w),{parse:e=>w.parse(e)/100,transform:e=>w.transform(100*e)});let _={test:h("hsl","hue"),parse:f("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+w.transform(a(t))+", "+w.transform(a(n))+", "+a(p.transform(r))+")"};var x=n(1878);function k(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function E({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,a=0;if(t/=100){let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=k(s,r,e+1/3),o=k(s,r,e),a=k(s,r,e-1/3)}else i=o=a=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*a),alpha:r}}let C=(e,t,n)=>{let r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},M=[b,y,_],O=e=>M.find(t=>t.test(e)),A=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,j=(e,t)=>{let n=O(e),r=O(t);(0,x.V)(!!n,A(e)),(0,x.V)(!!r,A(t));let o=n.parse(e),a=r.parse(t);n===_&&(o=E(o),n=y),r===_&&(a=E(a),r=y);let s=Object.assign({},o);return e=>{for(let t in s)"alpha"!==t&&(s[t]=C(o[t],a[t],e));return s.alpha=i(o.alpha,a.alpha,e),n.transform(s)}},S={test:e=>y.test(e)||b.test(e)||_.test(e),parse:e=>y.test(e)?y.parse(e):_.test(e)?_.parse(e):b.parse(e),transform:e=>c(e)?e:e.hasOwnProperty("red")?y.transform(e):_.transform(e)},z="${c}",L="${n}";function U(e){"number"==typeof e&&(e=`${e}`);let t=[],n=0,r=e.match(l);r&&(n=r.length,e=e.replace(l,z),t.push(...r.map(S.parse)));let i=e.match(s);return i&&(e=e.replace(s,L),t.push(...i.map(d.parse))),{values:t,numColors:n,tokenised:e}}let R={parse:function(e){return U(e).values},createTransformer:function(e){let{values:t,numColors:n,tokenised:r}=U(e),i=t.length;return e=>{let t=r;for(let r=0;r<i;r++)t=t.replace(r<n?z:L,r<n?S.transform(e[r]):a(e[r]));return t}}},P=(e,t)=>n=>t(e(n)),I=(...e)=>e.reduce(P);function D(e,t){return"number"==typeof e?n=>i(e,t,n):S.test(e)?j(e,t):G(e,t)}let T=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>D(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}},$=(e,t)=>{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=D(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function V(e){let t=R.parse(e),n=t.length,r=0,i=0,o=0;for(let e=0;e<n;e++)r||"number"==typeof t[e]?r++:void 0!==t[e].hue?o++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:o}}let G=(e,t)=>{let n=R.createTransformer(t),r=V(e),i=V(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?I(T(r.parsed,i.parsed),n):((0,x.$)(!0,`Complex values '${e}' and '${t}
28' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),n=>`${n>0?t:e}`)};var F=n(9459);let q=(e,t)=>n=>i(e,t,n);function B(e,t,{clamp:n=!0,ease:i,mixer:o}={}){let a=e.length;(0,x.V)(a===t.length,"Both input and output ranges must be the same length"),(0,x.V)(!i||!Array.isArray(i)||i.length===a-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let s=function(e,t,n){let r=[],i=n||function(e){if("number"==typeof e)return q;if("string"==typeof e)if(S.test(e))return j;else return G;return Array.isArray(e)?T:"object"==typeof e?$:void 0}(e[0]),o=e.length-1;for(let n=0;n<o;n++){let o=i(e[n],e[n+1]);t&&(o=I(Array.isArray(t)?t[n]:t,o)),r.push(o)}return r}(t,i,o),l=2===a?function([e,t],[n]){return i=>n(r(e,t,i))}(e,s):function(e,t){let n=e.length,i=n-1;return o=>{let a=0,s=!1;if(o<=e[0]?s=!0:o>=e[i]&&(a=i-1,s=!0),!s){let t=1;for(;t<n&&!(e[t]>o)&&t!==i;t++);a=t-1}let l=r(e[a],e[a+1],o);return t[a](l)}}(e,s);return n?t=>l((0,F.q)(e[0],e[a-1],t)):l}},58560:(e,t,n)=>{"use strict";n.d(t,{i7:()=>o});var r=n(39570),i=n(69258);function o({from:e=0,to:t=1,ease:n,offset:o,duration:a=300}){var s;let l={done:!1,value:e},u=Array.isArray(t)?t:[e,t],c=(s=o&&o.length===u.length?o:function(e){let t=e.length;return e.map((e,n)=>0!==n?n/(t-1):0)}(u),s.map(e=>e*a));function d(){return(0,r.G)(c,u,{ease:Array.isArray(n)?n:u.map(()=>n||i.am).splice(0,u.length-1)})}let p=d();return{next:e=>(l.value=p(e),l.done=e>=a,l),flipTarget:()=>{u.reverse(),p=d()}}}},69258:(e,t,n)=>{"use strict";n.d(t,{bt:()=>b,dg:()=>m,ZZ:()=>y,Sz:()=>g,ip:()=>k,wm:()=>E,Te:()=>x,po:()=>p,tn:()=>f,yT:()=>h,a6:()=>u,am:()=>d,vT:()=>c,sn:()=>l});let r=e=>t=>1-e(1-t),i=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,o=e=>t=>t*t*((e+1)*t-e),a=4/11,s=8/11,l=e=>e,u=e=>Math.pow(e,2),c=r(u),d=i(u),p=e=>1-Math.sin(Math.acos(e)),h=r(p),f=i(h),m=o(1.525),g=r(m),y=i(m),b=(e=>{let t=o(e);return e=>(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))})(1.525),v=4356/361,w=35442/1805,_=16061/1805,x=e=>{if(1===e||0===e)return e;let t=e*e;return e<a?7.5625*t:e<s?9.075*t-9.9*e+3.4:e<.9?v*t-w*e+_:10.8*e*e-20.52*e+10.72},k=r(x),E=e=>e<.5?.5*(1-x(1-2*e)):.5*x(2*e-1)+.5},75150:(e,t,n)=>{"use strict";function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}n.d(t,{i:()=>z}),Object.create,Object.create;var i=n(1878),o=n(9459);function a(e,t){return e*Math.sqrt(1-t*t)}let s=["duration","bounce"],l=["stiffness","damping","mass"];function u(e,t){return t.some(t=>void 0!==e[t])}function c(e){var{from:t=0,to:n=1,restSpeed:c=2,restDelta:p}=e,h=r(e,["from","to","restSpeed","restDelta"]);let f={done:!1,value:t},{stiffness:m,damping:g,mass:y,velocity:b,duration:v,isResolvedFromDuration:w}=function(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!u(e,l)&&u(e,s)){let n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let s,l;(0,i.$)(e<=1e4,"Spring duration must be 10 seconds or less");let u=1-t;u=(0,o.q)(.05,1,u),e=(0,o.q)(.01,10,e/1e3),u<1?(s=t=>{let r=t*u,i=r*e;return .001-(r-n)/a(t,u)*Math.exp(-i)},l=t=>{let r=t*u*e,i=Math.pow(u,2)*Math.pow(t,2)*e,o=Math.exp(-r),l=a(Math.pow(t,2),u);return(r*n+n-i)*o*(-s(t)+.001>0?-1:1)/l}):(s=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),l=t=>e*e*(n-t)*Math.exp(-t*e));let c=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(s,l,5/e);if(e*=1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(c,2)*r;return{stiffness:t,damping:2*u*Math.sqrt(r*t),duration:e}}}(e);(t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(h),_=d,x=d;function k(){let e=b?-(b/1e3):0,r=n-t,i=g/(2*Math.sqrt(m*y)),o=Math.sqrt(m/y)/1e3;if(void 0===p&&(p=Math.min(Math.abs(n-t)/100,.4)),i<1){let t=a(o,i);_=a=>n-Math.exp(-i*o*a)*((e+i*o*r)/t*Math.sin(t*a)+r*Math.cos(t*a)),x=n=>{let a=Math.exp(-i*o*n);return i*o*a*(Math.sin(t*n)*(e+i*o*r)/t+r*Math.cos(t*n))-a*(Math.cos(t*n)*(e+i*o*r)-t*r*Math.sin(t*n))}}else if(1===i)_=t=>n-Math.exp(-o*t)*(r+(e+o*r)*t);else{let t=o*Math.sqrt(i*i-1);_=a=>{let s=Math.exp(-i*o*a),l=Math.min(t*a,300);return n-s*((e+i*o*r)*Math.sinh(l)+t*r*Math.cosh(l))/t}}}return k(),{next:e=>{let t=_(e);if(w)f.done=e>=v;else{let r=Math.abs(1e3*x(e))<=c,i=Math.abs(n-t)<=p;f.done=r&&i}return f.value=f.done?n:t,f},flipTarget:()=>{b=-b,[t,n]=[n,t],k()}}}c.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;let d=e=>0;var p=n(58560);let h={keyframes:p.i7,spring:c,decay:function({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){let a={done:!1,value:t},s=n*e,l=t+s,u=void 0===o?l:o(l);return u!==l&&(s=u-t),{next:e=>{let t=-s*Math.exp(-e/r);return a.done=!(t>i||t<-i),a.value=a.done?u:u+t,a},flipTarget:()=>{}}}},f=1/60*1e3,m="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),g="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(m()),f),y=!0,b=!1,v=!1,w={delta:0,timestamp:0},_=["read","update","preRender","render","postRender"],x=_.reduce((e,t)=>
28(e[t]=function(e){let t=[],n=[],r=0,i=!1,o=!1,a=new WeakSet,s={schedule:(e,o=!1,s=!1)=>{let l=s&&i,u=l?t:n;return o&&a.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length)for(let n=0;n<r;n++){let r=t[n];r(l),a.has(r)&&(s.schedule(r),e())}i=!1,o&&(o=!1,s.process(l))}};return s}(()=>b=!0),e),{}),k=_.reduce((e,t)=>{let n=x[t];return e[t]=(e,t=!1,r=!1)=>(b||O(),n.schedule(e,t,r)),e},{}),E=_.reduce((e,t)=>(e[t]=x[t].cancel,e),{});_.reduce((e,t)=>(e[t]=()=>x[t].process(w),e),{});let C=e=>x[e].process(w),M=e=>{b=!1,w.delta=y?f:Math.max(Math.min(e-w.timestamp,40),1),w.timestamp=e,v=!0,_.forEach(C),v=!1,b&&(y=!1,g(M))},O=()=>{b=!0,y=!0,v||g(M)};var A=n(39570);function j(e,t,n=0){return e-t-n}let S=e=>{let t=({delta:t})=>e(t);return{start:()=>k.update(t,!0),stop:()=>E.update(t)}};function z(e){let t,n,i;var o,{from:a,autoplay:s=!0,driver:l=S,elapsed:u=0,repeat:d=0,repeatType:f="loop",repeatDelay:m=0,onPlay:g,onStop:y,onComplete:b,onRepeat:v,onUpdate:w}=e,_=r(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:x}=_,k=0,E=_.duration,C=!1,M=!0,O=function(e){if(Array.isArray(e.to))return p.i7;if(h[e.type])return h[e.type];let t=new Set(Object.keys(e));if(t.has("ease")||t.has("duration")&&!t.has("dampingRatio"));else if(t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta"))return c;return p.i7}(_);(null==(o=O.needsInterpolation)?void 0:o.call(O,a,x))&&(i=(0,A.G)([0,100],[a,x],{clamp:!1}),a=0,x=100);let z=O(Object.assign(Object.assign({},_),{from:a,to:x}));return s&&(null==g||g(),(t=l(function(e){M||(e=-e);let r=Math.max(0,u+=e);if(!C||r<=(E||0)){let e=z.next(r);n=e.value,i&&(n=i(n)),C=M?e.done:u<=0}if(null==w||w(n),C)if(0===k&&(null!=E||(E=u)),k<d){var o,a;o=u,a=E,(M?o>=a+m:o<=-m)&&(k++,"reverse"===f?u=function(e,t,n=0,r=!0){return r?j(t+-e,t,n):t-(e-t)+n}(u,E,m,M=k%2==0):(u=j(u,E,m),"mirror"===f&&z.flipTarget()),C=!1,v&&v())}else t.stop(),b&&b()})).start()),{stop:()=>{null==y||y(),t.stop()}}}},78436:(e,t,n)=>{"use strict";n.d(t,{$j:()=>o,Ei:()=>d,Jx:()=>v,LI:()=>c,QX:()=>s,SV:()=>a,X0:()=>f,ex:()=>h,gS:()=>C,gp:()=>b,hE:()=>m,id:()=>w,m7:()=>g,mB:()=>y,q0:()=>p,q1:()=>_,rp:()=>l});var r=n(22186);let i=class{};function o(e,t,n,r,i=!0){let a;r=void 0!==r?r:e[t],n=n??t+"";let l=r?.uiConfig;if(l)a=l;else{var u;let o=null==(u=r)?null:Array.isArray(u)?"folder":"boolean"==typeof u?"checkbox":"number"==typeof u?"number":"string"==typeof u?"input":"function"==typeof u?"button":"number"==typeof u.x?"vec":"number"==typeof u.r?"color":u.isTexture?"image":"object"==typeof u?"folder":null;"folder"===o?a=s(n,r,{},"folder",i,t+""):o&&(a={type:o,label:n,property:[e,t],propertyKey:t+""})}return a&&!a.label&&(a.label=n),a}function a(e){if(!e)return[];let t=e.constructor||Object;t===Array&&(t=Object);let n=[],r=[];for(;t&&t!==Object;)r.push(t),t=Object.getPrototypeOf(t);if(!r.length||Array.isArray(e))for(let t of"object"==typeof e?Object.keys(e):Array.isArray(e)?e.map((e,t)=>t):[]){let r=e[t];if(null==r)continue;let i=o(e,t,t+"",r,!0);i&&n.push(i)}return r.reverse().forEach(t=>{i.Map.get(t)?.forEach(({params:t,propKey:r,uiType:i})=>{let a;if(i||(a=()=>o(e,r)),a||(a={property:[e,r],type:i||"input"}),t){let n="function"==typeof t.params?t.params(e):t.params||{},r={...t};if(delete r.params,"function"==typeof a){let e=a;a=()=>{let t=e();return t&&Object.assign(t,{...r,...n})}}else Object.assign(a,{...r,...n})}n.push(a)})}),n}function s(e,t,n={},i="folder",o=!1,l){return{type:i,label:e,children:o?[()=>a(t)]:a(t),uuid:(0,r.QT)(),propertyKey:l,...n}}function l(e,t){var n;return n=(n,r,i)=>{let o=i.findIndex(e=>e.propKey===r);if(o&&o<0)i.push({params:t||{},propKey:r,uiType:e});else throw Error(`Property ${r} already has a uiConfig decorator`)},(e,t)=>{let r=e.constructor;if(r===Object)throw Error("Not possible to use uiConfig decorator on an object, use class instead");i.Map.has(r)||i.Map.set(r,[]),n(e,t,i.Map.get(r))}}function u(e,t,n="panel"){return r=>class extends r{constructor(){super(...arguments),this.uiConfig=s(e,this,t||{},n)}}}function c(e,t){return l("monitor",{label:e,params:t})}function d(e,t,n,r){return l("slider",{label:e,bounds:t,stepSize:n,params:r})}function p(e,t,n,r){return l("vec",{label:e,bounds:t,stepSize:n,params:r})}function h(e,t,n){return Array.isArray(t)&&"string"==typeof t[0]&&(t=t.map(e=>({label:e,value:e}))),l("dropdown",{label:e,children:t,params:n})}function f(e,t){return l("button",{label:e,params:t})}function m(e,t){return l("input",{label:e,params:t})}function g(e,t){return l("number",{label:e,params:t})}function y(e,t){return l("color",{label:e,params:t})}function b(e,t){return l("image",{label:e,params:t})}function v(e,t){return l("checkbox",{label:e,params:t})}function w(e,t){return u(e,t,"panel")}function _(e,t){return u(e,t,"folder")}i.Map=new WeakMap;let x={setValue:"UiConfigMethods_set",action:"UiConfigMethods_action"},k=class e{constructor(e){this._renderer=e,this.undoEditingWaitTime=2e3,this.undoPresets={[x.setValue]:e=>{let t=()=>{e.onUndoRedo&&e.onUndoRedo(e),e.uid.uiRefresh?.(!1)};return{undo:()=>{this.setValue(e.uid,e.lastVal,e.props,void 0,!1).then(t)},redo:()=>{this.setValue(e.uid,e.val,e.props,void 0,!1).then(t)}}},[x.action]:e=>{let t=()=>{e.onUndoRedo&&e.onUndoRedo(e),e.uid.uiRefresh?.(!1)};return{undo:async()=>{await e.undo.call(e.target,...e.args),t()},redo:async()=>{await e.redo.call(e.target,...e.args),t()}}}}}
28recordUndo(e){(0,r.x$)(this._renderer.undoManager,e,x.setValue,this.undoEditingWaitTime)}async performAction(t,n,r,i,o){return e.PerformAction(t,n,r,i,o,this._renderer.undoManager,this.undoEditingWaitTime)}getValue(t,n,r=!0){return e.GetValue(t,n,r)}async setValue(t,n,r,i,o=!0){return e.SetValue(t,n,r,i,o,this._renderer,this._renderer.undoManager,this.undoEditingWaitTime)}async dispatchOnChange(t,n){return this.runAtEvent(t,()=>e.DispatchOnChangeSync(t,n))}async clickButton(t,n){return this.runAtEvent(t,async()=>{let i=e.GetBinding(t,!1),o=i[0],a=i[1],s=!1===(0,r.GP)(t.sendArgs,t)?[]:n?.args??[],l=[];if(o){let e=o[a]??o.value;"function"==typeof e?l.push([e,o]):e&&console.warn("Invalid action type for button",e)}for(let[e,n]of("function"==typeof t.onClick&&l.push([t.onClick,t]),l))await this.performAction(n,e,s,t);await this.dispatchOnChange(t,{})})}async runAtEvent(t,n){return e.RunAtEvent(t,n,this._renderer)}static async RunAtEvent(e,t,n){let i=(0,r.GP)(e.dispatchMode,e)??this.DefaultDispatchMode;return"immediate"!==i&&n?new Promise(e=>{let r=async()=>{n.removeEventListener(i,r),e(await t())};n.addEventListener(i,r)}):t()}static GetBinding(e,t=!0){let n=(0,r.GP)(e.property,e),i=(0,r.GP)(e.path,e);if(void 0===n&&Object.hasOwn(e,"value")&&(n=[e,"value"]),void 0===n&&t&&(n=(0,r.GP)(e.parentProperty,e)),!n||"object"!=typeof n[0]||!n[1])return[void 0,""];if("string"==typeof n[1]&&i&&i.length&&(n=[n[0],n[1]+"."+i]),"string"==typeof n[1]&&n[1].includes(".")){let t=n[1].split("."),r=n[0],i=t.pop()||"";for(let i of t)if(!(r=Array.isArray(r)?r[parseInt(i)]:r[i]))return console.warn("Cannot determine property, invalid property path",e,n),[void 0,""];n=[r,i]}return Array.isArray(n[0])&&"string"==typeof n[1]&&(n[1]=parseInt(n[1])),n}static GetRawValue(e){let[t,n]=this.GetBinding(e);return t?t[n]:void 0}static GetValue(e,t,n=!0){let[i,o]=this.GetBinding(e);if(!i)return;let a=i[o];return void 0!==t&&void 0!==a?(0,r.pe)(t,a)&&!n?void 0:(0,r.dU)(t,a):(0,r.fu)(a)}static DispatchOnChangeSync(e,t,...n){let r=[{type:"change",last:t.last??!0,config:t.config??e,configPath:[e,...t.configPath||[]],target:e,value:t.value,lastValue:t.lastValue},...n];"function"==typeof e.onChange?e.onChange(...r):Array.isArray(e.onCh
28ange)?e.onChange.flat().forEach(e=>"function"==typeof e&&e?.(...r)):e.onChange&&console.error("Invalid onChange type, must be a function or array of functions",e.onChange),e.parentOnChange?.(...r)}static RecordUndo(e,t,n){(0,r.x$)(t,e,x.setValue,n)}static async PerformAction(e,t,n,r,i,o,a){let s=()=>void 0===e?t(...n):t.call(e,...n),l=await s(),u="function"==typeof l?l:l?.undo?.bind(l),c="function"!=typeof l?l?.action?.bind(l):null,d="function"==typeof l?s:l?.redo?.bind(l)??c;"function"==typeof c&&(l=await c()),"function"==typeof u&&this.RecordUndo({type:"UiConfigMethods_action",uid:r,target:e,undo:u,redo:d,args:n,onUndoRedo:i},o,a)}static async SetValue(e,t,n,i,o=!0,a,s,l){return this.RunAtEvent(e,()=>{let a=this.GetBinding(e),u=(0,r.T4)(s,a,t,n,e,x.setValue,o,l,!1,void 0);return(!!u.undoable||!!i)&&(this.DispatchOnChangeSync(e,{...n,...u}),!0)},a)}static GetLabel(e){return((0,r.GP)(e.label,e)??this.GetBinding(e)?.[1])+""}static GetChildren(e){return((0,r.GP)(e.children,e)??[]).map(t=>(0,r.GP)(t,e)).flat(2).filter(e=>e)}static InitUiConfig(e){e&&(e.type||(console.warn("No type for config",e),e.type="input"),e.uuid||(e.uuid=(0,r.QT)()),void 0===e.property&&(e.binding?e.property=e.binding:void 0===e.value?(e.getValue||e.setValue)&&(Object.defineProperty(e,"value",{get:()=>e.getValue&&e.getValue(),set:t=>e.setValue&&e.setValue(t)}),e.property=[e,"value"]):(e.getValue||e.setValue)&&console.warn("getValue/setValue is ignored since value is provided",e),e.property))}static GetBounds(e,t=!1){let n=(0,r.GP)(e.bounds),i=(n?.length??0)>=2?n[1]:t?1/0:1,o=(n?.length??0)>=1?n[0]:t?-1/0:0,a=(0,r.GP)(e.stepSize)||(t?.01:Math.pow(10,Math.floor(Math.log10((i-o)/100))));return{min:o,max:i,step:a}}static GetBaseProps(e){let t=(0,r.GP)(e.hidden)??!1;return{hidden:t,disabled:(0,r.GP)(e.disabled)??!1,readOnly:(0,r.GP)(e.readOnly)??!1}}getBinding(t,n=!0){return e.GetBinding(t,n)}getRawValue(t){return e.GetRawValue(t)}getLabel(t){return e.GetLabel(t)}getChildren(t){return e.GetChildren(t)}initUiConfig(t){return e.InitUiConfig(t)}getBounds(t,n=!1){return e.GetBounds(t,n)}getBaseProps(t){return e.GetBaseProps(t)}dispatchOnChangeSync(t,n,...r){e.DispatchOnChangeSync(t,n,...r)}};k.DefaultDispatchMode="immediate";class E extends r.IL{constructor(e=!0,t,n){super(),this._rafId=null,this.raf=()=>{this._autoFrameEvents&&(this.dispatchEvent({type:"preFrame"}),this.dispatchEvent({type:"preRender"}),this.dispatchEvent({type:"postRender"}),this.dispatchEvent({type:"postFrame"}),this._rafId=requestAnimationFrame(this.raf))},this._refreshQueue={preRender:[],postRender:[],preFrame:[],postFrame:[]},this._lastModeTime={preRender:0,postRender:0,preFrame:0,postFrame:0},this.methods=t||new k(this),this.undoManager=!1===n?void 0:n||new r.hf({bindHotKeys:!0,limit:1e3,debug:null!==(0,r.d6)("debugUndo")}),this._autoFrameEvents=e,e&&(this.addEventListener("preFrame",()=>this.refreshQueue("preFrame")),this.addEventListener("postFrame",()=>this.refreshQueue("postFrame")),this.addEventListener("preRender",()=>this.refreshQueue("preRender")),this.addEventListener("postRender",()=>this.refreshQueue("postRender")))}get undoManager(){return this._undoManager}set undoManager(e){this._undoManager=e,this._undoManager&&Object.assign(this._undoManager.presets,this.methods.undoPresets)}start(){null===this._rafId&&(this._rafId=requestAnimationFrame(this.raf))}stop(){null!==this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null)}refreshQueue(e){let t=this._refreshQueue[e],n=[],i=(0,r.tB)(),o=i-this._lastModeTime[e];t.forEach(e=>{e[1]>.001?(e[1]-=o,n.push(e)):this._refreshUiConfigObject(e[0])}),this._refreshQueue[e]=n,this._lastModeTime[e]=i}_addToRefreshQueue(e,t,n){let r=t.uuid,i=this._refreshQueue[e],o=i.find(e=>e[2]===r);o?o[1]=Math.max(o[1],n):i.push([t,n,r]),this._refreshQueue[e]=i}disposeUiConfig(e,t=!0){e&&(e.uiRef&&(t&&e.uiRef.dispose?.(),e.uiRef=void 0),e.uiRefType=void 0,e.uiRefresh=void 0)}addToRefreshQueue(e,t,n,i){for(let o of n?this._flattenUiConfig(t):[t])"immediate"===e?(0,r.wR)(i).then(()=>this._refreshUiConfigObject(o)):this._addToRefreshQueue(e,o,i)}_flattenUiConfig(e,t){return t=t??[],e&&e.uiRef&&(t.push(e),"function"!=typeof e.children)&&e.children?.forEach(e
28=>{"function"!=typeof e&&e&&(Array.isArray(e)?e.forEach(e=>t=this._flattenUiConfig(e,t)):t=this._flattenUiConfig(e,t))}),t}}class C extends E{constructor(e=document.body,t=!0,n,r){super(t,n,r),this.config={type:"panel",label:"Configuration",children:[]},this._uiContainer=this._createUiContainer(),e.appendChild(this._uiContainer),this.start()}unmount(){this.disposeUiConfig(this.config),this._uiContainer.remove(),this.stop()}appendChild(e,t){e&&(Object.assign(e,t),this.config.children.push(e),this.refreshRoot())}removeChild(e){let t=this.config.children.indexOf(e);-1!==t&&(this.config.children.splice(t,1),this.disposeUiConfig(e),this.refreshRoot())}refreshRoot(e=!0,t="postFrame",n=0){this.config.uiRefresh?.(e,t,n)}_createUiContainer(){return(0,r.Sw)({id:"uiConfigContainer",addToBody:!1})}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.