@shumai-one/shumai 0.2.0 → 0.2.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.
- package/bin/chunk-0aj303as.js +3 -0
- package/bin/{chunk-kbzm1pwx.js → chunk-0qkj838r.js} +1 -1
- package/bin/{chunk-5a2maxwp.js → chunk-0rxhc7ka.js} +2 -2
- package/bin/chunk-0xbf8bcg.js +2 -0
- package/bin/{chunk-xh2ntgmk.js → chunk-14fh4s1a.js} +2 -2
- package/bin/{chunk-6mn3jqm9.js → chunk-15sefy5t.js} +2 -2
- package/bin/{chunk-mjan6b09.js → chunk-1wm57c6y.js} +3 -3
- package/bin/{chunk-pf8edn5x.js → chunk-1xpec5r8.js} +2 -2
- package/bin/chunk-23d3968z.js +2 -0
- package/bin/{chunk-r3n9zpfw.js → chunk-262hkppb.js} +2 -2
- package/bin/{chunk-3n1k9qt5.js → chunk-29tx9qe2.js} +1 -1
- package/bin/chunk-2aamsc5v.js +2 -0
- package/bin/chunk-2aascrtb.js +2 -0
- package/bin/chunk-2dsmsa6a.js +3 -0
- package/bin/chunk-2g12s6mc.js +2 -0
- package/bin/chunk-31baz5n0.js +2 -0
- package/bin/{chunk-a5kfa0k9.js → chunk-3rmc8nz6.js} +1 -1
- package/bin/{chunk-dyybbn07.js → chunk-46ar48f9.js} +1 -1
- package/bin/chunk-4e3jbp84.js +1 -0
- package/bin/chunk-4jk0y1w1.js +1 -0
- package/bin/{chunk-7ddaxdpf.js → chunk-4qpa7b5t.js} +1 -1
- package/bin/{chunk-8wv3kdz9.js → chunk-54tr7y2x.js} +2 -2
- package/bin/{chunk-ehfk24cf.js → chunk-5d2q46mx.js} +1 -1
- package/bin/{chunk-2cmg5sfn.js → chunk-5m9be8an.js} +2 -2
- package/bin/{chunk-yk3k5g5w.js → chunk-5r8858hx.js} +2 -2
- package/bin/{chunk-fwe9g818.js → chunk-5t6c3038.js} +1 -1
- package/bin/chunk-6z65xd0w.js +3 -0
- package/bin/{chunk-cp18trqb.js → chunk-77r8w95d.js} +2 -2
- package/bin/chunk-7b17fb36.js +6 -0
- package/bin/chunk-7e06b2zb.js +2 -0
- package/bin/{chunk-29ectt6g.js → chunk-7hsgmjpa.js} +2 -2
- package/bin/chunk-7we7ex0m.js +3 -0
- package/bin/{chunk-6r9w7z15.js → chunk-88fg1sw7.js} +2 -2
- package/bin/chunk-891h8br6.js +3 -0
- package/bin/{chunk-m7jfszqt.js → chunk-8mkfgcvb.js} +2 -2
- package/bin/chunk-8qg47kj6.js +3 -0
- package/bin/chunk-8tf6kgdj.js +2 -0
- package/bin/{chunk-s8d2045p.js → chunk-8wqfkm4c.js} +1 -1
- package/bin/{chunk-3rajscaz.js → chunk-922nnh39.js} +1 -1
- package/bin/{chunk-aakzq0w1.js → chunk-925q4paa.js} +1 -1
- package/bin/{chunk-frm7vz6v.js → chunk-92xxys10.js} +6 -6
- package/bin/chunk-97jzve52.js +4 -0
- package/bin/{chunk-w4y97tzy.js → chunk-9ab6k4rq.js} +1 -1
- package/bin/chunk-9avkn3x1.js +3 -0
- package/bin/{chunk-22dje1f5.js → chunk-9h027f50.js} +1 -1
- package/bin/{chunk-ec88pb09.js → chunk-9h3ds7rn.js} +2 -2
- package/bin/chunk-av71yjaa.js +1 -0
- package/bin/{chunk-xpqcvxej.js → chunk-b8js74jk.js} +1 -1
- package/bin/chunk-bd71dp4j.js +8 -0
- package/bin/{chunk-yhj8c5re.js → chunk-bs0fjz3w.js} +2 -2
- package/bin/chunk-byqc8tzq.js +1 -0
- package/bin/chunk-c45rh4hk.js +3 -0
- package/bin/chunk-ccw7mjgq.js +5 -0
- package/bin/{chunk-3x62t1m0.js → chunk-cxhmr356.js} +1 -1
- package/bin/chunk-d2vxmn9v.js +3 -0
- package/bin/chunk-d3wmdjze.js +8 -0
- package/bin/{chunk-z42cyc20.js → chunk-de99643r.js} +2 -2
- package/bin/{chunk-4kk5g619.js → chunk-dghtwyq1.js} +2 -2
- package/bin/chunk-dqgv5yy1.js +6 -0
- package/bin/chunk-e3s3rz2e.js +12 -0
- package/bin/chunk-e52nga6c.js +3 -0
- package/bin/chunk-e7ndw3hg.js +12 -0
- package/bin/chunk-f14sqw1d.js +1 -0
- package/bin/chunk-f7sbkfmk.js +2 -0
- package/bin/{chunk-mnv6pj0k.js → chunk-fa2g2wge.js} +2 -2
- package/bin/{chunk-fcb14agg.js → chunk-fbte2rmd.js} +1 -1
- package/bin/chunk-fcvtgx1y.js +7 -0
- package/bin/chunk-fd5a3pdd.js +1 -0
- package/bin/{chunk-49ej1y67.js → chunk-fepymbka.js} +2 -2
- package/bin/{chunk-j8q688sx.js → chunk-fz88kkk1.js} +2 -2
- package/bin/chunk-g6zzg6v2.js +1 -0
- package/bin/chunk-g8th86na.js +2 -0
- package/bin/chunk-gswbc6y9.js +2 -0
- package/bin/{chunk-d1ka11hc.js → chunk-gtrc5ka2.js} +1 -1
- package/bin/chunk-h0ytx8zc.js +2 -0
- package/bin/{chunk-gdm6y33a.js → chunk-hkbybhww.js} +1 -1
- package/bin/chunk-hr97a5j5.js +4 -0
- package/bin/{chunk-dypsm6m2.js → chunk-j8qtab70.js} +1 -1
- package/bin/{chunk-hdk93ghf.js → chunk-jf3vn5c3.js} +2 -2
- package/bin/{chunk-ajqsprm0.js → chunk-kfhtk3eh.js} +2 -2
- package/bin/chunk-kr06nrbx.js +2 -0
- package/bin/{chunk-9rw65s3e.js → chunk-m4zpf9gg.js} +2 -2
- package/bin/{chunk-y1xs4c5j.js → chunk-mqjzmn0e.js} +1 -1
- package/bin/{chunk-d2y3rbjm.js → chunk-mzg1h07d.js} +1 -1
- package/bin/{chunk-ysq64j13.js → chunk-n4meg9wb.js} +1 -1
- package/bin/{chunk-acxm86fh.js → chunk-nrwna4ha.js} +1 -1
- package/bin/chunk-nyhqy6q2.js +62 -0
- package/bin/{chunk-4zq8vxcy.css → chunk-pmswtfe3.css} +1 -1
- package/bin/chunk-pq18zenh.js +2 -0
- package/bin/chunk-pxw97qbq.js +3 -0
- package/bin/chunk-q09dfja5.js +3 -0
- package/bin/{chunk-m54p1cvp.js → chunk-q24epdh8.js} +2 -2
- package/bin/{chunk-k5w64spz.js → chunk-qksb0v3c.js} +2 -2
- package/bin/chunk-qqk51620.js +2 -0
- package/bin/chunk-r0w920zb.js +1 -0
- package/bin/{chunk-08m8mzfa.js → chunk-re0b7sj7.js} +1 -1
- package/bin/chunk-rtngbgpk.js +7 -0
- package/bin/{chunk-5tmf3c0g.js → chunk-ry33f2qk.js} +2 -2
- package/bin/{chunk-9n0etqsy.js → chunk-s1n39qte.js} +1 -1
- package/bin/{chunk-3qdn3pty.js → chunk-s46zwr4p.js} +1 -1
- package/bin/chunk-s8t74q9m.js +1 -0
- package/bin/chunk-sd86v1e6.js +1 -0
- package/bin/{chunk-kpy0kpna.js → chunk-srn8t0v7.js} +2 -2
- package/bin/chunk-szzff7gd.js +1 -0
- package/bin/{chunk-fwf8yne2.js → chunk-t3t6021k.js} +2 -2
- package/bin/{chunk-eadb78m8.js → chunk-ta7bfdrn.js} +1 -1
- package/bin/chunk-thsbcbay.js +8 -0
- package/bin/chunk-tspps87j.js +1 -0
- package/bin/chunk-w7dn1m95.js +2 -0
- package/bin/chunk-w88219ex.js +3 -0
- package/bin/{chunk-pqm0g14r.js → chunk-wc8sc9r9.js} +2 -2
- package/bin/chunk-wg98cacx.js +2 -0
- package/bin/chunk-wsyg4rwg.js +2 -0
- package/bin/{chunk-n5hfy93f.js → chunk-xcwbg4w9.js} +3 -3
- package/bin/{chunk-dgx2zxze.js → chunk-xyjw8w3r.js} +2 -2
- package/bin/chunk-y2qp11v9.js +1 -0
- package/bin/{chunk-1fpqq6ed.js → chunk-ybhgmvxa.js} +2 -2
- package/bin/{chunk-1wq9hjjr.js → chunk-ygz6pawn.js} +1 -1
- package/bin/{chunk-mv79zk8q.js → chunk-ymeycphq.js} +3 -3
- package/bin/{chunk-wv4fe1fj.js → chunk-zemrvz79.js} +2 -2
- package/bin/{chunk-3rt9mnj3.js → chunk-ztmj61z9.js} +1 -1
- package/bin/chunk-zzx99j8t.js +2 -0
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +308 -283
- package/package.json +7 -7
- package/prisma/migrations/20260722022359_add_skill_permission/migration.sql +2 -0
- package/prisma/migrations/20260723025234_add_ai_usage_table/migration.sql +28 -0
- package/prisma/migrations/20260723032755_add_ai_usage_unique_constraint/migration.sql +8 -0
- package/prisma/schema.prisma +26 -0
- package/bin/chunk-09wp20mv.js +0 -1
- package/bin/chunk-0at8vxt5.js +0 -3
- package/bin/chunk-0zv7f9ca.js +0 -2
- package/bin/chunk-2k4vp654.js +0 -2
- package/bin/chunk-2s5a64nr.js +0 -2
- package/bin/chunk-2tbya52d.js +0 -2
- package/bin/chunk-2vs3evc7.js +0 -14
- package/bin/chunk-33169en9.js +0 -8
- package/bin/chunk-33ee1cvv.js +0 -2
- package/bin/chunk-3m39v371.js +0 -1
- package/bin/chunk-4hnrd4qh.js +0 -2
- package/bin/chunk-6c4c7t0n.js +0 -1
- package/bin/chunk-6frqqxkv.js +0 -1
- package/bin/chunk-7rhjej0x.js +0 -3
- package/bin/chunk-7wvgtw25.js +0 -3
- package/bin/chunk-8s0ae37g.js +0 -1
- package/bin/chunk-94h8644q.js +0 -2
- package/bin/chunk-ac2ky3q0.js +0 -12
- package/bin/chunk-axx5bh38.js +0 -2
- package/bin/chunk-cthpdt54.js +0 -11
- package/bin/chunk-d0earxhc.js +0 -4
- package/bin/chunk-d0n8nxp3.js +0 -3
- package/bin/chunk-d22pyc5n.js +0 -1
- package/bin/chunk-dmgjse02.js +0 -4
- package/bin/chunk-e5833tbd.js +0 -2
- package/bin/chunk-g7wrxnmd.js +0 -1
- package/bin/chunk-gk7158n4.js +0 -2
- package/bin/chunk-hb5v9ees.js +0 -2
- package/bin/chunk-jrvrg4fx.js +0 -1
- package/bin/chunk-k712q1zj.js +0 -2
- package/bin/chunk-kef0rnwn.js +0 -1
- package/bin/chunk-n296vcfw.js +0 -3
- package/bin/chunk-n6jgyv4y.js +0 -3
- package/bin/chunk-nar4s9v9.js +0 -3
- package/bin/chunk-nn8e9j7c.js +0 -1
- package/bin/chunk-nwtb6dt1.js +0 -62
- package/bin/chunk-ps4h3387.js +0 -5
- package/bin/chunk-q4f5vvtx.js +0 -2
- package/bin/chunk-qqesrgjk.js +0 -7
- package/bin/chunk-qz9xht6d.js +0 -2
- package/bin/chunk-symna5cj.js +0 -1
- package/bin/chunk-twzgpwst.js +0 -2
- package/bin/chunk-vgvmt2m1.js +0 -2
- package/bin/chunk-w4t9n9te.js +0 -6
- package/bin/chunk-z14hh99h.js +0 -2
- package/bin/chunk-zsdwska1.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ch as N5,mh as x0,oh as TJ,ph as PZ}from"./chunk-nyhqy6q2.js";import{Vk as TZ}from"./chunk-0qkj838r.js";var FQ=TZ(x0(),1);var b5=({onResize:J,className:Q=""})=>{let[Z,$]=FQ.useState(!1),q=FQ.useRef(0);FQ.useEffect(()=>{if(!Z)return;let K=(B)=>{let N=B.clientX-q.current;q.current=B.clientX,J(N)},X=()=>{$(!1),document.body.style.cursor=""};return document.addEventListener("mousemove",K),document.addEventListener("mouseup",X),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",X),document.body.style.cursor=""}},[Z,J]);let Y=(K)=>{K.preventDefault(),K.stopPropagation(),$(!0),q.current=K.clientX},H=()=>TJ("div",{className:"absolute inset-y-0 -left-4 -right-4 z-20 cursor-col-resize touch-none"});return PZ("div",{className:`group relative z-20 flex h-full w-[2px] cursor-col-resize items-center justify-center bg-border transition-all hover:bg-transparent ${Q}`,onMouseDown:Y,children:[TJ(H,{}),TJ("div",{className:`absolute inset-y-0 w-[2px] transition-all duration-300 ease-out
|
|
2
2
|
${Z?"bg-blue-600 shadow-[0_0_15px_rgba(37,99,235,0.6)] opacity-100":"bg-blue-400 opacity-0 group-hover:opacity-100 group-hover:shadow-[0_0_8px_rgba(96,165,250,0.5)]"}
|
|
3
3
|
`}),TJ("div",{className:`absolute top-1/2 left-1/2 h-10 w-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-blue-600 transition-all duration-300 ease-out
|
|
4
4
|
${Z?"opacity-100 scale-100 shadow-[0_0_10px_rgba(37,99,235,0.5)]":"opacity-0 scale-75 group-hover:opacity-100 group-hover:scale-100"}`})]})};var e$=Symbol.for("preact-signals");function xZ(){if(!(PJ>1)){var J,Q=!1;(function(){var q=SZ;SZ=void 0;while(q!==void 0){if(q.S.v===q.v)q.S.i=q.i;q=q.o}})();while(cQ!==void 0){var Z=cQ;cQ=void 0,EZ++;while(Z!==void 0){var $=Z.u;if(Z.u=void 0,Z.f&=-3,!(8&Z.f)&&_9(Z))try{Z.c()}catch(q){if(!Q)J=q,Q=!0}Z=$}}if(EZ=0,PJ--,Q)throw J}else PJ--}function JJ(J){if(PJ>0)return J();h0=++Jq,PJ++;try{return J()}finally{xZ()}}var k=void 0;function C(J){var Q=k;k=void 0;try{return J()}finally{k=Q}}var p9,cQ=void 0,PJ=0,EZ=0,Jq=0,h0=0,SZ=void 0,kZ=0;function d9(J){if(k!==void 0){var Q=J.n;if(Q===void 0||Q.t!==k){if(Q={i:0,S:J,p:k.s,n:void 0,t:k,e:void 0,x:void 0,r:Q},k.s!==void 0)k.s.n=Q;if(k.s=Q,J.n=Q,32&k.f)J.S(Q);return Q}else if(Q.i===-1){if(Q.i=0,Q.n!==void 0){if(Q.n.p=Q.p,Q.p!==void 0)Q.p.n=Q.n;Q.p=k.s,Q.n=void 0,k.s.n=Q,k.s=Q}return Q}}}function r(J,Q){this.v=J,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=Q==null?void 0:Q.watched,this.Z=Q==null?void 0:Q.unwatched,this.name=Q==null?void 0:Q.name}r.prototype.brand=e$;r.prototype.h=function(){return!0};r.prototype.S=function(J){var Q=this,Z=this.t;if(Z!==J&&J.e===void 0)if(J.x=Z,this.t=J,Z!==void 0)Z.e=J;else C(function(){var $;($=Q.W)==null||$.call(Q)})};r.prototype.U=function(J){var Q=this;if(this.t!==void 0){var{e:Z,x:$}=J;if(Z!==void 0)Z.x=$,J.e=void 0;if($!==void 0)$.e=Z,J.x=void 0;if(J===this.t){if(this.t=$,$===void 0)C(function(){var q;(q=Q.Z)==null||q.call(Q)})}}};r.prototype.subscribe=function(J){var Q=this;return o(function(){var Z=Q.value,$=k;k=void 0;try{J(Z)}finally{k=$}},{name:"sub"})};r.prototype.valueOf=function(){return this.value};r.prototype.toString=function(){return this.value+""};r.prototype.toJSON=function(){return this.value};r.prototype.peek=function(){var J=this;return C(function(){return J.value})};Object.defineProperty(r.prototype,"value",{get:function(){var J=d9(this);if(J!==void 0)J.i=this.i;return this.v},set:function(J){if(J!==this.v){if(EZ>100)throw Error("Cycle detected");(function(Z){if(PJ!==0&&EZ===0){if(Z.l!==h0)Z.l=h0,SZ={S:Z,v:Z.v,i:Z.i,o:SZ}}})(this),this.v=J,this.i++,kZ++,PJ++;try{for(var Q=this.t;Q!==void 0;Q=Q.x)Q.t.N()}finally{xZ()}}}});function IJ(J,Q){return new r(J,Q)}function _9(J){for(var Q=J.s;Q!==void 0;Q=Q.n)if(Q.S.i!==Q.i||!Q.S.h()||Q.S.i!==Q.i)return!0;return!1}function c9(J){for(var Q=J.s;Q!==void 0;Q=Q.n){var Z=Q.S.n;if(Z!==void 0)Q.r=Z;if(Q.S.n=Q,Q.i=-1,Q.n===void 0){J.s=Q;break}}}function l9(J){var Q=J.s,Z=void 0;while(Q!==void 0){var $=Q.p;if(Q.i===-1){if(Q.S.U(Q),$!==void 0)$.n=Q.n;if(Q.n!==void 0)Q.n.p=$}else Z=Q;if(Q.S.n=Q.r,Q.r!==void 0)Q.r=void 0;Q=$}J.s=Z}function sJ(J,Q){r.call(this,void 0),this.x=J,this.s=void 0,this.g=kZ-1,this.f=4,this.W=Q==null?void 0:Q.watched,this.Z=Q==null?void 0:Q.unwatched,this.name=Q==null?void 0:Q.name}sJ.prototype=new r;sJ.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32)return!0;if(this.f&=-5,this.g===kZ)return!0;if(this.g=kZ,this.f|=1,this.i>0&&!_9(this))return this.f&=-2,!0;var J=k;try{c9(this),k=this;var Q=this.x();if(16&this.f||this.v!==Q||this.i===0)this.v=Q,this.f&=-17,this.i++}catch(Z){this.v=Z,this.f|=16,this.i++}return k=J,l9(this),this.f&=-2,!0};sJ.prototype.S=function(J){if(this.t===void 0){this.f|=36;for(var Q=this.s;Q!==void 0;Q=Q.n)Q.S.S(Q)}r.prototype.S.call(this,J)};sJ.prototype.U=function(J){if(this.t!==void 0){if(r.prototype.U.call(this,J),this.t===void 0){this.f&=-33;for(var Q=this.s;Q!==void 0;Q=Q.n)Q.S.U(Q)}}};sJ.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var J=this.t;J!==void 0;J=J.x)J.t.N()}};Object.defineProperty(sJ.prototype,"value",{get:function(){if(1&this.f)throw Error("Cycle detected");var J=d9(this);if(this.h(),J!==void 0)J.i=this.i;if(16&this.f)throw this.v;return this.v}});function y0(J,Q){return new sJ(J,Q)}function s9(J){var Q=J.m;if(J.m=void 0,typeof Q=="function"){PJ++;var Z=k;k=void 0;try{Q()}catch($){throw J.f&=-2,J.f|=8,f0(J),$}finally{k=Z,xZ()}}}function f0(J){for(var Q=J.s;Q!==void 0;Q=Q.n)Q.S.U(Q);J.x=void 0,J.s=void 0,s9(J)}function Qq(J){if(k!==this)throw Error("Out-of-order effect");if(l9(this),k=J,this.f&=-2,8&this.f)f0(this);xZ()}function zQ(J,Q){if(this.x=J,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=Q==null?void 0:Q.name,p9)p9.push(this)}zQ.prototype.c=function(){var J=this.S();try{if(8&this.f)return;if(this.x===void 0)return;var Q=this.x();if(typeof Q=="function")this.m=Q}finally{J()}};zQ.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,s9(this),c9(this),PJ++;var J=k;return k=this,Qq.bind(this,J)};zQ.prototype.N=function(){if(!(2&this.f))this.f|=2,this.u=cQ,cQ=this};zQ.prototype.d=function(){if(this.f|=8,!(1&this.f))f0(this)};zQ.prototype.dispose=function(){this.d()};function o(J,Q){var Z=new zQ(J,Q);try{Z.c()}catch(q){throw Z.d(),q}var $=Z.d.bind(Z);return $[Symbol.dispose]=$,$}var{create:Zq,defineProperty:s0,defineProperties:$q,getOwnPropertyDescriptor:qq,getOwnPropertyDescriptors:Yq,getOwnPropertySymbols:o9}=Object,Kq=Object.prototype.hasOwnProperty,Hq=Object.prototype.propertyIsEnumerable,n9=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),MQ=(J)=>{throw TypeError(J)},m0=(J,Q,Z)=>(Q in J)?s0(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Xq=(J,Q)=>{for(var Z in Q||(Q={}))if(Kq.call(Q,Z))m0(J,Z,Q[Z]);if(o9){for(var Z of o9(Q))if(Hq.call(Q,Z))m0(J,Z,Q[Z])}return J},Wq=(J,Q)=>$q(J,Yq(Q)),i9=(J,Q)=>s0(J,"name",{value:Q,configurable:!0}),Bq=(J)=>{var Q;return[,,,Zq((Q=J==null?void 0:J[n9("metadata")])!=null?Q:null)]},a9=["class","method","getter","setter","accessor","field","value","get","set"],lQ=(J)=>J!==void 0&&typeof J!=="function"?MQ("Function expected"):J,Nq=(J,Q,Z,$,q)=>({kind:a9[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?MQ("Already initialized"):q.push(lQ(Y||null))}),r9=(J,Q)=>m0(Q,n9("metadata"),J[3]),oJ=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},wQ=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=a9[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&qq(W<4?q:{get[Z](){return LJ(this,Y)},set[Z](V){return vJ(this,Y,V)}},Z));W?L&&W<4&&i9(Y,(W>2?"set ":W>1?"get ":"")+Z):i9(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Nq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>Uq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?LJ:Lq)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>vJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)lQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)MQ("Object expected");else lQ(H=K.get)&&(U.get=H),lQ(H=K.set)&&(U.set=H),lQ(H=K.init)&&A.unshift(H)}return W||r9(J,q),U&&s0(q,Z,U),L?W^4?Y:U:q},o0=(J,Q,Z)=>Q.has(J)||MQ("Cannot "+Z),Uq=(J,Q)=>Object(Q)!==Q?MQ('Cannot use the "in" operator on this value'):J.has(Q),LJ=(J,Q,Z)=>(o0(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),sQ=(J,Q,Z)=>Q.has(J)?MQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),vJ=(J,Q,Z,$)=>(o0(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Lq=(J,Q,Z)=>(o0(J,Q,"access private method"),Z);function AQ(J,Q){if(Q){let Z;return y0(()=>{let $=J();if($&&Z&&Q(Z,$))return Z;return Z=$,$})}return y0(J)}function EJ(J,Q){if(Object.is(J,Q))return!0;if(J===null||Q===null)return!1;if(typeof J==="function"&&typeof Q==="function")return J===Q;if(J instanceof Set&&Q instanceof Set){if(J.size!==Q.size)return!1;for(let Z of J)if(!Q.has(Z))return!1;return!0}if(Array.isArray(J)){if(!Array.isArray(Q)||J.length!==Q.length)return!1;return!J.some(($,q)=>!EJ($,Q[q]))}if(typeof J==="object"&&typeof Q==="object"){let Z=Object.keys(J),$=Object.keys(Q);if(Z.length!==$.length)return!1;return!Z.some((Y)=>!EJ(J[Y],Q[Y]))}return!1}function T({get:J},Q){return{init(Z){return IJ(Z)},get(){return J.call(this).value},set(Z){let $=J.call(this);if($.peek()===Z)return;$.value=Z}}}function h(J,Q){let Z=new WeakMap;return function(){let $=Z.get(this);if(!$)$=AQ(J.bind(this)),Z.set(this,$);return $.value}}function v0(J=!0){return function(Q,Z){Z.addInitializer(function(){let $=Z.kind==="field"?this:Z.static?this:Object.getPrototypeOf(this),q=Object.getOwnPropertyDescriptor($,Z.name);if(q)Object.defineProperty($,Z.name,Wq(Xq({},q),{enumerable:J}))})}}function nJ(...J){let Q=J.map((Z)=>o(Z));return()=>Q.forEach((Z)=>Z())}var t9,e9,J8,Q8,Z8,$8,QJ,i0,b0,p0,d0,t,n0,g0,q8,_0,a0,u0,c0,l0;$8=[T],Z8=[T],Q8=[T],J8=[v0()],e9=[v0()],t9=[v0()];var jJ=class{constructor(J,Q=Object.is){this.defaultValue=J,this.equals=Q,oJ(QJ,5,this),sQ(this,t),sQ(this,i0,oJ(QJ,8,this)),oJ(QJ,11,this),sQ(this,n0,oJ(QJ,12,this)),oJ(QJ,15,this),sQ(this,a0,oJ(QJ,16,this)),oJ(QJ,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return LJ(this,t,c0)}get initial(){return LJ(this,t,p0)}get previous(){return LJ(this,t,q8)}set current(J){let Q=C(()=>LJ(this,t,c0));if(J&&Q&&this.equals(Q,J))return;JJ(()=>{if(!LJ(this,t,p0))vJ(this,t,J,d0);vJ(this,t,Q,_0),vJ(this,t,J,l0)})}reset(J=this.defaultValue){JJ(()=>{vJ(this,t,void 0,_0),vJ(this,t,J,d0),vJ(this,t,J,l0)})}};QJ=Bq(null);i0=new WeakMap;t=new WeakSet;n0=new WeakMap;a0=new WeakMap;b0=wQ(QJ,20,"#initial",$8,t,i0),p0=b0.get,d0=b0.set;g0=wQ(QJ,20,"#previous",Z8,t,n0),q8=g0.get,_0=g0.set;u0=wQ(QJ,20,"#current",Q8,t,a0),c0=u0.get,l0=u0.set;wQ(QJ,2,"current",J8,jJ);wQ(QJ,2,"initial",e9,jJ);wQ(QJ,2,"previous",t9,jJ);r9(QJ,jJ);function hZ(J){return C(()=>{let Q={};for(let Z in J)Q[Z]=J[Z];return Q})}var iJ,o5=class{constructor(){sQ(this,iJ,new WeakMap)}get(J,Q){var Z;return J?(Z=LJ(this,iJ).get(J))==null?void 0:Z.get(Q):void 0}set(J,Q,Z){var $;if(!J)return;if(!LJ(this,iJ).has(J))LJ(this,iJ).set(J,new Map);return($=LJ(this,iJ).get(J))==null?void 0:$.set(Q,Z)}clear(J){var Q;return J?(Q=LJ(this,iJ).get(J))==null?void 0:Q.clear():void 0}};iJ=new WeakMap;var{create:Gq,defineProperty:Q1,getOwnPropertyDescriptor:Vq,getOwnPropertySymbols:Y8}=Object,Fq=Object.prototype.hasOwnProperty,zq=Object.prototype.propertyIsEnumerable,X8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),IQ=(J)=>{throw TypeError(J)},K8=Math.pow,r0=(J,Q,Z)=>(Q in J)?Q1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,Mq=(J,Q)=>{for(var Z in Q||(Q={}))if(Fq.call(Q,Z))r0(J,Z,Q[Z]);if(Y8){for(var Z of Y8(Q))if(zq.call(Q,Z))r0(J,Z,Q[Z])}return J},H8=(J,Q)=>Q1(J,"name",{value:Q,configurable:!0}),wq=(J)=>{var Q;return[,,,Gq((Q=J==null?void 0:J[X8("metadata")])!=null?Q:null)]},W8=["class","method","getter","setter","accessor","field","value","get","set"],oQ=(J)=>J!==void 0&&typeof J!=="function"?IQ("Function expected"):J,Aq=(J,Q,Z,$,q)=>({kind:W8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?IQ("Already initialized"):q.push(oQ(Y||null))}),B8=(J,Q)=>r0(Q,X8("metadata"),J[3]),Iq=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},N8=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=W8[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&Vq(W<4?q:{get[Z](){return t0(this,Y)},set[Z](V){return e0(this,Y,V)}},Z));W?L&&W<4&&H8(Y,(W>2?"set ":W>1?"get ":"")+Z):H8(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Aq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>jq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?t0:Rq)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>e0(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)oQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)IQ("Object expected");else oQ(H=K.get)&&(U.get=H),oQ(H=K.set)&&(U.set=H),oQ(H=K.init)&&A.unshift(H)}return W||B8(J,q),U&&Q1(q,Z,U),L?W^4?Y:U:q},Z1=(J,Q,Z)=>Q.has(J)||IQ("Cannot "+Z),jq=(J,Q)=>Object(Q)!==Q?IQ('Cannot use the "in" operator on this value'):J.has(Q),t0=(J,Q,Z)=>(Z1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),Oq=(J,Q,Z)=>Q.has(J)?IQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),e0=(J,Q,Z,$)=>(Z1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),Rq=(J,Q,Z)=>(Z1(J,Q,"access private method"),Z),e=class J{constructor(Q,Z){this.x=Q,this.y=Z}static delta(Q,Z){return new J(Q.x-Z.x,Q.y-Z.y)}static distance(Q,Z){return Math.hypot(Q.x-Z.x,Q.y-Z.y)}static equals(Q,Z){return Q.x===Z.x&&Q.y===Z.y}static from({x:Q,y:Z}){return new J(Q,Z)}},XJ=class J{constructor(Q,Z,$,q){this.left=Q,this.top=Z,this.width=$,this.height=q,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(Q,Z){let{top:$,left:q,width:Y,height:H,scale:K}=this,X=new J(q+Q,$+Z,Y,H);return X.scale=Mq({},K),X}get boundingRectangle(){let{width:Q,height:Z,left:$,top:q,right:Y,bottom:H}=this;return{width:Q,height:Z,left:$,top:q,right:Y,bottom:H}}get center(){let{left:Q,top:Z,right:$,bottom:q}=this;return new e((Q+$)/2,(Z+q)/2)}get area(){let{width:Q,height:Z}=this;return Q*Z}equals(Q){if(!(Q instanceof J))return!1;let{left:Z,top:$,width:q,height:Y}=this;return Z===Q.left&&$===Q.top&&q===Q.width&&Y===Q.height}containsPoint(Q){let{top:Z,left:$,bottom:q,right:Y}=this;return Z<=Q.y&&Q.y<=q&&$<=Q.x&&Q.x<=Y}intersectionArea(Q){if(Q instanceof J)return Dq(this,Q);return 0}intersectionRatio(Q){let{area:Z}=this,$=this.intersectionArea(Q);return $/(Q.area+Z-$)}get bottom(){let{top:Q,height:Z}=this;return Q+Z}get right(){let{left:Q,width:Z}=this;return Q+Z}get aspectRatio(){let{width:Q,height:Z}=this;return Q/Z}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:Q,left:Z,width:$,height:q}){return new J(Z,Q,$,q)}static delta(Q,Z,$={x:"center",y:"center"}){let q=(Y,H)=>{let K=$[H],X=H==="x"?Y.left:Y.top,B=H==="x"?Y.width:Y.height;if(K=="start")return X;if(K=="end")return X+B;return X+B/2};return e.delta({x:q(Q,"x"),y:q(Q,"y")},{x:q(Z,"x"),y:q(Z,"y")})}static intersectionRatio(Q,Z){return J.from(Q).intersectionRatio(J.from(Z))}};function Dq(J,Q){let Z=Math.max(Q.top,J.top),$=Math.max(Q.left,J.left),q=Math.min(Q.left+Q.width,J.left+J.width),Y=Math.min(Q.top+Q.height,J.top+J.height),H=q-$,K=Y-Z;if($<q&&Z<Y)return H*K;return 0}var U8,L8,J1,yZ,iQ,nQ=class extends(J1=jJ,L8=[h],U8=[h],J1){constructor(J){let Q=e.from(J);super(Q,(Z,$)=>e.equals(Z,$));Iq(iQ,5,this),Oq(this,yZ,0),this.velocity={x:0,y:0}}get delta(){return e.delta(this.current,this.initial)}get direction(){let{current:J,previous:Q}=this;if(!Q)return null;let Z={x:J.x-Q.x,y:J.y-Q.y};if(!Z.x&&!Z.y)return null;if(Math.abs(Z.x)>Math.abs(Z.y))return Z.x>0?"right":"left";return Z.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Q}=this,Z=e.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-t0(this,yZ),H=(K)=>Math.round(K/Y*100);JJ(()=>{e0(this,yZ,q),this.velocity={x:H($.x),y:H($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(e.from(J)),this.velocity={x:0,y:0}}};iQ=wq(J1);yZ=new WeakMap;N8(iQ,2,"delta",L8,nQ);N8(iQ,2,"direction",U8,nQ);B8(iQ,nQ);function fZ({x:J,y:Q},Z){let $=Math.abs(J),q=Math.abs(Q);if(typeof Z==="number")return Math.sqrt(K8($,2)+K8(q,2))>Z;if("x"in Z&&"y"in Z)return $>Z.x&&q>Z.y;if("x"in Z)return $>Z.x;if("y"in Z)return q>Z.y;return!1}var G8=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(G8||{}),$1=Object.values(G8);var{create:Cq,defineProperty:X1,defineProperties:Tq,getOwnPropertyDescriptor:Pq,getOwnPropertyDescriptors:Eq,getOwnPropertySymbols:dZ}=Object,M8=Object.prototype.hasOwnProperty,w8=Object.prototype.propertyIsEnumerable,A8=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),TQ=(J)=>{throw TypeError(J)},Y1=(J,Q,Z)=>(Q in J)?X1(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,W1=(J,Q)=>{for(var Z in Q||(Q={}))if(M8.call(Q,Z))Y1(J,Z,Q[Z]);if(dZ){for(var Z of dZ(Q))if(w8.call(Q,Z))Y1(J,Z,Q[Z])}return J},B1=(J,Q)=>Tq(J,Eq(Q)),V8=(J,Q)=>X1(J,"name",{value:Q,configurable:!0}),I8=(J,Q)=>{var Z={};for(var $ in J)if(M8.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&dZ){for(var $ of dZ(J))if(Q.indexOf($)<0&&w8.call(J,$))Z[$]=J[$]}return Z},PQ=(J)=>{var Q;return[,,,Cq((Q=J==null?void 0:J[A8("metadata")])!=null?Q:null)]},j8=["class","method","getter","setter","accessor","field","value","get","set"],aQ=(J)=>J!==void 0&&typeof J!=="function"?TQ("Function expected"):J,Sq=(J,Q,Z,$,q)=>({kind:j8[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?TQ("Already initialized"):q.push(aQ(Y||null))}),rJ=(J,Q)=>Y1(Q,A8("metadata"),J[3]),O=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Q&1?Y[q].call(Z):$=Y[q].call(Z,$);return $},P=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N,W=Q&7,G=!!(Q&8),L=!!(Q&16),F=W>3?J.length+1:W?G?1:2:0,z=j8[W+5],A=W>3&&(J[F-1]=[]),I=J[F]||(J[F]=[]),U=W&&(!L&&!G&&(q=q.prototype),W<5&&(W>3||!L)&&Pq(W<4?q:{get[Z](){return u(this,Y)},set[Z](V){return WJ(this,Y,V)}},Z));W?L&&W<4&&V8(Y,(W>2?"set ":W>1?"get ":"")+Z):V8(q,Z);for(var M=$.length-1;M>=0;M--){if(B=Sq(W,Z,X={},J[3],I),W){if(B.static=G,B.private=L,N=B.access={has:L?(V)=>kq(q,V):(V)=>(Z in V)},W^3)N.get=L?(V)=>(W^1?u:O8)(V,q,W^4?Y:U.get):(V)=>V[Z];if(W>2)N.set=L?(V,w)=>WJ(V,q,w,W^4?Y:U.set):(V,w)=>V[Z]=w}if(K=(0,$[M])(W?W<4?L?Y:U[z]:W>4?void 0:{get:U.get,set:U.set}:q,B),X._=1,W^4||K===void 0)aQ(K)&&(W>4?A.unshift(K):W?L?Y=K:U[z]=K:q=K);else if(typeof K!=="object"||K===null)TQ("Object expected");else aQ(H=K.get)&&(U.get=H),aQ(H=K.set)&&(U.set=H),aQ(H=K.init)&&A.unshift(H)}return W||rJ(J,q),U&&X1(q,Z,U),L?W^4?Y:U:q},N1=(J,Q,Z)=>Q.has(J)||TQ("Cannot "+Z),kq=(J,Q)=>Object(Q)!==Q?TQ('Cannot use the "in" operator on this value'):J.has(Q),u=(J,Q,Z)=>(N1(J,Q,"read from private field"),Z?Z.call(J):Q.get(J)),E=(J,Q,Z)=>Q.has(J)?TQ("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),WJ=(J,Q,Z,$)=>(N1(J,Q,"write to private field"),$?$.call(J,Z):Q.set(J,Z),Z),O8=(J,Q,Z)=>(N1(J,Q,"access private method"),Z);function R8(J,Q){return{plugin:J,options:Q}}function EQ(J){return(Q)=>{return R8(J,Q)}}function CQ(J){if(typeof J==="function")return{plugin:J,options:void 0};return J}var D8,eQ,U1,bZ;D8=[T];var $J=class{constructor(J,Q){this.manager=J,this.options=Q,E(this,U1,O(eQ,8,this,!1)),O(eQ,11,this),E(this,bZ,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return C(()=>{return this.disabled})}configure(J){this.options=J}registerEffect(J){let Q=o(J.bind(this));return u(this,bZ).add(Q),Q}destroy(){u(this,bZ).forEach((J)=>J())}static configure(J){return R8(this,J)}};eQ=PQ(null);U1=new WeakMap;bZ=new WeakMap;P(eQ,4,"disabled",D8,$J,U1);rJ(eQ,$J);var SQ=class extends $J{},gZ,q1=class{constructor(J){this.manager=J,this.instances=new Map,E(this,gZ,[])}get values(){return Array.from(this.instances.values())}set values(J){let Q=J.map(CQ).reduce(($,q)=>{let Y=$.find(({plugin:H})=>H===q.plugin);if(Y)return Y.options=q.options,$;return[...$,q]},[]),Z=Q.map(({plugin:$})=>$);for(let $ of u(this,gZ))if(!Z.includes($)){if($.prototype instanceof SQ)continue;this.unregister($)}for(let{plugin:$,options:q}of Q)this.register($,q);WJ(this,gZ,Z)}get(J){return this.instances.get(J)}register(J,Q){let Z=this.instances.get(J);if(Z){if(Z.options!==Q)Z.options=Q;return Z}let $=new J(this.manager,Q);return this.instances.set(J,$),$}unregister(J){let Q=this.instances.get(J);if(Q)Q.destroy(),this.instances.delete(J)}destroy(){for(let J of this.instances.values())J.destroy();this.instances.clear()}};gZ=new WeakMap;function xq(J,Q){if(J.priority===Q.priority){if(J.type===Q.type)return Q.value-J.value;return Q.type-J.type}return Q.priority-J.priority}var vZ=[],jQ,OQ,hq=class extends $J{constructor(J){super(J);E(this,jQ),E(this,OQ),this.computeCollisions=this.computeCollisions.bind(this),WJ(this,OQ,IJ(vZ)),this.destroy=nJ(()=>{let Q=this.computeCollisions(),Z=C(()=>this.manager.dragOperation.position.current);if(Q!==vZ){let $=u(this,jQ);if(WJ(this,jQ,Z),$&&Z.x==$.x&&Z.y==$.y)return}else WJ(this,jQ,void 0);u(this,OQ).value=Q},()=>{let{dragOperation:Q}=this.manager;if(Q.status.initialized)this.forceUpdate()})}forceUpdate(J=!0){C(()=>{if(J)u(this,OQ).value=this.computeCollisions();else WJ(this,jQ,void 0)})}computeCollisions(J,Q){let{registry:Z,dragOperation:$}=this.manager,{source:q,shape:Y,status:H}=$;if(!H.initialized||!Y)return vZ;let K=[],X=[];for(let B of J!=null?J:Z.droppables){if(B.disabled)continue;if(q&&!B.accepts(q))continue;let N=Q!=null?Q:B.collisionDetector;if(!N)continue;X.push(B),B.shape;let W=C(()=>N({droppable:B,dragOperation:$}));if(W){if(B.collisionPriority!=null)W.priority=B.collisionPriority;K.push(W)}}if(X.length===0)return vZ;return K.sort(xq),K}get collisions(){return u(this,OQ).value}};jQ=new WeakMap;OQ=new WeakMap;var C8,T8,P8,L1,E8,zJ,G1,DQ,V1,F1;P8=[T],T8=[T],C8=[T];var SJ=class J{constructor(Q,Z){E(this,G1,O(zJ,8,this)),O(zJ,11,this),E(this,DQ),E(this,V1,O(zJ,12,this)),O(zJ,15,this),E(this,F1,O(zJ,16,this)),O(zJ,19,this);let{effects:$,id:q,data:Y={},disabled:H=!1,register:K=!0}=Q,X=q;if(WJ(this,DQ,IJ(q)),this.manager=Z,this.data=Y,this.disabled=H,this.effects=()=>{var B;return[()=>{let{id:N,manager:W}=this;if(N===X)return;return X=N,W==null||W.registry.register(this),()=>W==null?void 0:W.registry.unregister(this)},...(B=$==null?void 0:$())!=null?B:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),Z&&K)queueMicrotask(this.register)}get id(){var Q,Z;let $=u(this,DQ).value;return(Z=(Q=J.pendingIdChanges)==null?void 0:Q.get(this))!=null?Z:$}set id(Q){var Z,$;let q=($=(Z=J.pendingIdChanges)==null?void 0:Z.get(this))!=null?$:u(this,DQ).peek();if(Q===q)return;if(!J.pendingIdChanges)J.pendingIdChanges=new Map,queueMicrotask(()=>{var Y;return O8(Y=J,L1,E8).call(Y)});J.pendingIdChanges.set(this,Q)}register(){var Q;return(Q=this.manager)==null?void 0:Q.registry.register(this)}unregister(){var Q;(Q=this.manager)==null||Q.registry.unregister(this)}destroy(){var Q;(Q=this.manager)==null||Q.registry.unregister(this)}};zJ=PQ(null);L1=new WeakSet;E8=function(){let J=SJ.pendingIdChanges;if(SJ.pendingIdChanges=null,J)JJ(()=>{for(let[Q,Z]of J)u(Q,DQ).value=Z})};G1=new WeakMap;DQ=new WeakMap;V1=new WeakMap;F1=new WeakMap;P(zJ,4,"manager",P8,SJ,G1);P(zJ,4,"data",T8,SJ,V1);P(zJ,4,"disabled",C8,SJ,F1);E(SJ,L1);rJ(zJ,SJ);SJ.pendingIdChanges=null;var _Z=SJ,F8=class{constructor(){this.map=IJ(new Map),this.cleanupFunctions=new WeakMap,this.register=(J,Q)=>{let Z=this.map.peek(),$=Z.get(J),q=()=>this.unregister(J,Q);if($===Q)return q;if($){if($.id===J){let K=this.cleanupFunctions.get($);K==null||K(),this.cleanupFunctions.delete($)}}let Y=new Map(Z);for(let[K,X]of Z)if(X===Q&&K!==J){Y.delete(K);break}Y.set(J,Q),this.map.value=Y;let H=nJ(...Q.effects());return this.cleanupFunctions.set(Q,H),q},this.unregister=(J,Q)=>{let Z=this.map.peek();if(Z.get(J)!==Q)return;let $=this.cleanupFunctions.get(Q);$==null||$(),this.cleanupFunctions.delete(Q);let q=new Map(Z);q.delete(J),this.map.value=q}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(J){return this.map.value.has(J)}get(J){return this.map.value.get(J)}destroy(){for(let J of this){let Q=this.cleanupFunctions.get(J);Q==null||Q(),J.destroy()}this.map.value=new Map}},S8,k8,x8,h8,y8,f8,K1,ZJ,z1,M1,w1,MJ=class extends(K1=_Z,f8=[T],y8=[T],h8=[T],x8=[h],k8=[h],S8=[h],K1){constructor(J,Q){var Z=J,{modifiers:$,type:q,sensors:Y,plugins:H,effects:K}=Z,X=I8(Z,["modifiers","type","sensors","plugins","effects"]);super(B1(W1({},X),{effects:()=>{var B;return[...(B=K==null?void 0:K())!=null?B:[],()=>{let{manager:N,plugins:W}=this;if(!N||!W)return;for(let G of W){let{plugin:L}=CQ(G);N.registry.plugins.register(L)}}]}}),Q);O(ZJ,5,this),E(this,z1,O(ZJ,8,this)),O(ZJ,11,this),E(this,M1,O(ZJ,12,this)),O(ZJ,15,this),E(this,w1,O(ZJ,16,this,this.isDragSource?"dragging":"idle")),O(ZJ,19,this),this.type=q,this.sensors=Y,this.modifiers=$,this.alignment=X.alignment,this.plugins=H}pluginConfig(J){if(!this.plugins)return;for(let Q of this.plugins){let Z=CQ(Q);if(Z.plugin===J)return Z.options}return}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var J,Q;return((Q=(J=this.manager)==null?void 0:J.dragOperation.source)==null?void 0:Q.id)===this.id}};ZJ=PQ(K1);z1=new WeakMap;M1=new WeakMap;w1=new WeakMap;P(ZJ,4,"type",f8,MJ,z1);P(ZJ,4,"modifiers",y8,MJ,M1);P(ZJ,4,"status",h8,MJ,w1);P(ZJ,2,"isDropping",x8,MJ);P(ZJ,2,"isDragging",k8,MJ);P(ZJ,2,"isDragSource",S8,MJ);rJ(ZJ,MJ);var v8,b8,g8,u8,m8,p8,H1,c,A1,I1,j1,O1,R1,wJ=class extends(H1=_Z,p8=[T],m8=[T],u8=[T],g8=[T],b8=[T],v8=[h],H1){constructor(J,Q){var Z=J,{accept:$,collisionDetector:q,collisionPriority:Y,type:H}=Z,K=I8(Z,["accept","collisionDetector","collisionPriority","type"]);super(K,Q);O(c,5,this),E(this,A1,O(c,8,this)),O(c,11,this),E(this,I1,O(c,12,this)),O(c,15,this),E(this,j1,O(c,16,this)),O(c,19,this),E(this,O1,O(c,20,this)),O(c,23,this),E(this,R1,O(c,24,this)),O(c,27,this),this.accept=$,this.collisionDetector=q,this.collisionPriority=Y,this.type=H}accepts(J){let{accept:Q}=this;if(!Q)return!0;if(typeof Q==="function")return Q(J);if(!J.type)return!1;if(Array.isArray(Q))return Q.includes(J.type);return J.type===Q}get isDropTarget(){var J,Q;return((Q=(J=this.manager)==null?void 0:J.dragOperation.target)==null?void 0:Q.id)===this.id}};c=PQ(H1);A1=new WeakMap;I1=new WeakMap;j1=new WeakMap;O1=new WeakMap;R1=new WeakMap;P(c,4,"accept",p8,wJ,A1);P(c,4,"type",m8,wJ,I1);P(c,4,"collisionDetector",u8,wJ,j1);P(c,4,"collisionPriority",g8,wJ,O1);P(c,4,"shape",b8,wJ,R1);P(c,2,"isDropTarget",v8,wJ);rJ(c,wJ);var yq=class{constructor(){this.registry=new Map}addEventListener(J,Q){let{registry:Z}=this,$=new Set(Z.get(J));return $.add(Q),Z.set(J,$),()=>this.removeEventListener(J,Q)}removeEventListener(J,Q){let{registry:Z}=this,$=new Set(Z.get(J));$.delete(Q),Z.set(J,$)}dispatch(J,...Q){let{registry:Z}=this,$=Z.get(J);if(!$)return;for(let q of $)q(...Q)}},fq=class extends yq{constructor(J){super();this.manager=J}dispatch(J,Q){let Z=[Q,this.manager];super.dispatch(J,...Z)}};function uZ(J,Q=!0){let Z=!1;return B1(W1({},J),{cancelable:Q,get defaultPrevented(){return Z},preventDefault(){if(!Q)return;Z=!0}})}var vq=class extends SQ{constructor(J){super(J);let Q=($,q)=>$.map(({id:Y})=>Y).join("")===q.map(({id:Y})=>Y).join(""),Z=[];this.destroy=nJ(()=>{let{dragOperation:$,collisionObserver:q}=J;if($.status.initializing)Z=[],q.enable()},()=>{let{collisionObserver:$,monitor:q}=J,{collisions:Y}=$;if($.isDisabled())return;if(_Z.pendingIdChanges)return;let H=uZ({collisions:Y});if(q.dispatch("collision",H),H.defaultPrevented)return;if(Q(Y,Z))return;else Z=Y;let[K]=Y;C(()=>{var X;if((K==null?void 0:K.id)!==((X=J.dragOperation.target)==null?void 0:X.id))$.disable(),J.actions.setDropTarget(K==null?void 0:K.id).then(()=>{$.enable()})})})}},OJ=((J)=>{return J[J.Lowest=0]="Lowest",J[J.Low=1]="Low",J[J.Normal=2]="Normal",J[J.High=3]="High",J[J.Highest=4]="Highest",J})(OJ||{}),RJ=((J)=>{return J[J.Collision=0]="Collision",J[J.ShapeIntersection=1]="ShapeIntersection",J[J.PointerIntersection=2]="PointerIntersection",J})(RJ||{}),d8,_8,c8,l8,s8,o8,i8,GJ,D1;i8=[T],o8=[h],s8=[h],l8=[h],c8=[h],_8=[h],d8=[h];var kJ=class{constructor(){O(GJ,5,this),E(this,D1,O(GJ,8,this,"idle")),O(GJ,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){let{value:J}=this;return J!=="idle"&&J!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(J){this.value=J}};GJ=PQ(null);D1=new WeakMap;P(GJ,4,"value",i8,kJ,D1);P(GJ,2,"current",o8,kJ);P(GJ,2,"idle",s8,kJ);P(GJ,2,"initializing",l8,kJ);P(GJ,2,"initialized",c8,kJ);P(GJ,2,"dragging",_8,kJ);P(GJ,2,"dropped",d8,kJ);rJ(GJ,kJ);var bq=class{constructor(J){this.manager=J}setDragSource(J){let{dragOperation:Q}=this.manager;Q.sourceIdentifier=typeof J==="string"||typeof J==="number"?J:J.id}setDropTarget(J){return C(()=>{let{dragOperation:Q}=this.manager,Z=J!=null?J:null;if(Q.targetIdentifier===Z)return Promise.resolve(!1);Q.targetIdentifier=Z;let $=uZ({operation:Q.snapshot()});if(Q.status.dragging)this.manager.monitor.dispatch("dragover",$);return this.manager.renderer.rendering.then(()=>$.defaultPrevented)})}start(J){return C(()=>{let{dragOperation:Q}=this.manager;if(J.source!=null)this.setDragSource(J.source);if(!Q.source)throw Error("Cannot start a drag operation without a drag source");if(!Q.status.idle)throw Error("Cannot start a drag operation while another is active");let $=new AbortController,{event:q,coordinates:Y}=J;JJ(()=>{Q.status.set("initialization-pending"),Q.shape=null,Q.canceled=!1,Q.activatorEvent=q!=null?q:null,Q.position.reset(Y)});let H=uZ({operation:Q.snapshot()});if(this.manager.monitor.dispatch("beforedragstart",H),H.defaultPrevented)return Q.reset(),$.abort(),$;return Q.status.set("initializing"),Q.controller=$,this.manager.renderer.rendering.then(()=>{if($.signal.aborted)return;let{status:K}=Q;if(K.current!=="initializing")return;JJ(()=>{Q.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:q,operation:Q.snapshot(),cancelable:!1})})}),$})}move(J){return C(()=>{var Q,Z;let{dragOperation:$}=this.manager,{status:q,controller:Y}=$;if(!q.dragging||!Y||Y.signal.aborted)return;let H=uZ({nativeEvent:J.event,operation:$.snapshot(),by:J.by,to:J.to},(Q=J.cancelable)!=null?Q:!0);if((Z=J.propagate)!=null?Z:!0)this.manager.monitor.dispatch("dragmove",H);queueMicrotask(()=>{var K,X,B,N,W;if(H.defaultPrevented)return;let G=(W=J.to)!=null?W:{x:$.position.current.x+((X=(K=J.by)==null?void 0:K.x)!=null?X:0),y:$.position.current.y+((N=(B=J.by)==null?void 0:B.y)!=null?N:0)};$.position.current=G})})}stop(J={}){return C(()=>{var Q,Z;let{dragOperation:$}=this.manager,{controller:q}=$;if(!q||q.signal.aborted)return;let Y,H=()=>{let X={resume:()=>{},abort:()=>{}};return Y=new Promise((B,N)=>{X.resume=B,X.abort=N}),X};q.abort();let K=()=>{this.manager.renderer.rendering.then(()=>{$.status.set("dropped");let X=C(()=>{var N;return((N=$.source)==null?void 0:N.status)==="dropping"}),B=()=>{if($.controller===q)$.controller=void 0;$.reset()};if(X){let{source:N}=$,W=o(()=>{if((N==null?void 0:N.status)==="idle")W(),B()})}else this.manager.renderer.rendering.then(B)})};if($.canceled=(Q=J.canceled)!=null?Q:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:J.event,operation:$.snapshot(),canceled:(Z=J.canceled)!=null?Z:!1,suspend:H}),Y)Y.then(K).catch(()=>$.reset());else K()})}},aJ=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}},n8=class extends AbortController{constructor(J,Q){super();this.constraints=J,this.onActivate=Q,this.activated=!1;for(let Z of J!=null?J:[])Z.controller=this}onEvent(J){var Q;if(this.activated)return;if((Q=this.constraints)==null?void 0:Q.length)for(let Z of this.constraints)Z.onEvent(J);else this.activate(J)}activate(J){if(this.activated)return;this.activated=!0,this.onActivate(J)}abort(J){this.activated=!1,super.abort(J)}},mZ,C1=class{constructor(J){this.options=J,E(this,mZ)}set controller(J){WJ(this,mZ,J),J.signal.addEventListener("abort",()=>this.abort())}activate(J){var Q;(Q=u(this,mZ))==null||Q.activate(J)}};mZ=new WeakMap;var z8=class extends $J{constructor(J,Q){super(J,Q);this.manager=J,this.options=Q}apply(J){return J.transform}},gq=class{constructor(J){this.draggables=new F8,this.droppables=new F8,this.plugins=new q1(J),this.sensors=new q1(J),this.modifiers=new q1(J)}register(J,Q){if(J instanceof MJ)return this.draggables.register(J.id,J);if(J instanceof wJ)return this.droppables.register(J.id,J);if(J.prototype instanceof z8)return this.modifiers.register(J,Q);if(J.prototype instanceof aJ)return this.sensors.register(J,Q);if(J.prototype instanceof $J)return this.plugins.register(J,Q);throw Error("Invalid instance type")}unregister(J){if(J instanceof _Z){if(J instanceof MJ)return this.draggables.unregister(J.id,J);if(J instanceof wJ)return this.droppables.unregister(J.id,J);return()=>{}}if(J.prototype instanceof z8)return this.modifiers.unregister(J);if(J.prototype instanceof aJ)return this.sensors.unregister(J);if(J.prototype instanceof $J)return this.plugins.unregister(J);throw Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},a8,r8,t8,e8,J2,Q2,Z2,$2,q2,rQ,pZ,RQ,g,T1,P1,E1,S1,k1,tQ;q2=[h],$2=[T],Z2=[T],Q2=[T],J2=[T],e8=[T],t8=[h],r8=[h],a8=[h];var AJ=class{constructor(J){O(g,5,this),E(this,rQ),E(this,pZ),E(this,RQ,new jJ(void 0,(Q,Z)=>Q&&Z?Q.equals(Z):Q===Z)),this.status=new kJ,E(this,T1,O(g,8,this,!1)),O(g,11,this),E(this,P1,O(g,12,this,null)),O(g,15,this),E(this,E1,O(g,16,this,null)),O(g,19,this),E(this,S1,O(g,20,this,null)),O(g,23,this),E(this,k1,O(g,24,this,[])),O(g,27,this),this.position=new nQ({x:0,y:0}),E(this,tQ,{x:0,y:0}),WJ(this,rQ,J)}get shape(){let{current:J,initial:Q,previous:Z}=u(this,RQ);if(!J||!Q)return null;return{current:J,initial:Q,previous:Z}}set shape(J){if(!J)u(this,RQ).reset();else u(this,RQ).current=J}get source(){var J;let Q=this.sourceIdentifier;if(Q==null)return null;let Z=u(this,rQ).registry.draggables.get(Q);if(Z)WJ(this,pZ,Z);return(J=Z!=null?Z:u(this,pZ))!=null?J:null}get target(){var J;let Q=this.targetIdentifier;return Q!=null?(J=u(this,rQ).registry.droppables.get(Q))!=null?J:null:null}get transform(){let{x:J,y:Q}=this.position.delta,Z={x:J,y:Q};for(let $ of this.modifiers)Z=$.apply(B1(W1({},this.snapshot()),{transform:Z}));return WJ(this,tQ,Z),Z}snapshot(){return C(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:u(this,tQ),shape:this.shape?hZ(this.shape):null,position:hZ(this.position),status:hZ(this.status),canceled:this.canceled}))}reset(){JJ(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,u(this,RQ).reset(),this.position.reset({x:0,y:0}),WJ(this,tQ,{x:0,y:0}),this.modifiers=[]})}};g=PQ(null);rQ=new WeakMap;pZ=new WeakMap;RQ=new WeakMap;T1=new WeakMap;P1=new WeakMap;E1=new WeakMap;S1=new WeakMap;k1=new WeakMap;tQ=new WeakMap;P(g,2,"shape",q2,AJ);P(g,4,"canceled",$2,AJ,T1);P(g,4,"activatorEvent",Z2,AJ,P1);P(g,4,"sourceIdentifier",Q2,AJ,E1);P(g,4,"targetIdentifier",J2,AJ,S1);P(g,4,"modifiers",e8,AJ,k1);P(g,2,"source",t8,AJ);P(g,2,"target",r8,AJ);P(g,2,"transform",a8,AJ);rJ(g,AJ);var uq={get rendering(){return Promise.resolve()}};function VJ(J,Q){if(typeof J==="function")return J(Q);return J!=null?J:Q}var Y2=class{constructor(J){this.destroy=()=>{if(!this.dragOperation.status.idle)this.actions.stop({canceled:!0});this.dragOperation.modifiers.forEach((W)=>W.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var Q;let Z=J!=null?J:{},$=VJ(Z.plugins,[]),q=VJ(Z.sensors,[]),Y=VJ(Z.modifiers,[]),H=(Q=Z.renderer)!=null?Q:uq,K=new fq(this),X=new gq(this);this.registry=X,this.monitor=K,this.renderer=H,this.actions=new bq(this),this.dragOperation=new AJ(this),this.collisionObserver=new hq(this),this.plugins=[vq,...$],this.modifiers=Y,this.sensors=q;let{destroy:B}=this,N=nJ(()=>{var W,G,L;let F=C(()=>this.dragOperation.modifiers),z=this.modifiers;for(let A of F)if(!z.includes(A))A.destroy();this.dragOperation.modifiers=(L=(G=(W=this.dragOperation.source)==null?void 0:W.modifiers)==null?void 0:G.map((A)=>{let{plugin:I,options:U}=CQ(A);return new I(this,U)}))!=null?L:z});this.destroy=()=>{N(),B()}}get plugins(){return this.registry.plugins.values}set plugins(J){this.registry.plugins.values=J}get modifiers(){return this.registry.modifiers.values}set modifiers(J){this.registry.modifiers.values=J}get sensors(){return this.registry.sensors.values}set sensors(J){this.registry.sensors.values=J}};var U2=(J)=>{throw TypeError(J)},y1=(J,Q,Z)=>Q.has(J)||U2("Cannot "+Z),R=(J,Q,Z)=>(y1(J,Q,"read from private field"),Q.get(J)),YJ=(J,Q,Z)=>Q.has(J)?U2("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),BJ=(J,Q,Z,$)=>(y1(J,Q,"write to private field"),Q.set(J,Z),Z),L2=(J,Q,Z)=>(y1(J,Q,"access private method"),Z);function eZ(J){if(!J)return!1;if(J instanceof KeyframeEffect)return!0;return"getKeyframes"in J&&typeof J.getKeyframes==="function"}function f1(J,Q){let Z=J.getAnimations(),$=null;for(let q of Z){if(q.playState!=="running")continue;let{effect:Y}=q,K=(eZ(Y)?Y.getKeyframes():[]).filter(Q);if(K.length>0)$=[K[K.length-1],q]}return $}function J0(J){let{width:Q,height:Z,top:$,left:q,bottom:Y,right:H}=J.getBoundingClientRect();return{width:Q,height:Z,top:$,left:q,bottom:Y,right:H}}function v1(J){let Q=Object.prototype.toString.call(J);return Q==="[object Window]"||Q==="[object global]"}function KZ(J){return"nodeType"in J}function NJ(J){var Q,Z,$;if(!J)return window;if(v1(J))return J;if(!KZ(J))return window;if("defaultView"in J)return(Q=J.defaultView)!=null?Q:window;return($=(Z=J.ownerDocument)==null?void 0:Z.defaultView)!=null?$:window}function Q0(J){let{Document:Q}=NJ(J);return J instanceof Q||"nodeType"in J&&J.nodeType===Node.DOCUMENT_NODE}function xJ(J){if(!J||v1(J))return!1;return J instanceof NJ(J).HTMLElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("html")}function G2(J){return J instanceof NJ(J).SVGElement||"namespaceURI"in J&&typeof J.namespaceURI==="string"&&J.namespaceURI.endsWith("svg")}function QQ(J){if(!J)return document;if(v1(J))return J.document;if(!KZ(J))return document;if(Q0(J))return J;if(xJ(J)||G2(J))return J.ownerDocument;return document}function mq(J){var Q,Z,$,q;let{documentElement:Y}=QQ(J),H=NJ(J).visualViewport,K=(Q=H==null?void 0:H.width)!=null?Q:Y.clientWidth,X=(Z=H==null?void 0:H.height)!=null?Z:Y.clientHeight,B=($=H==null?void 0:H.offsetTop)!=null?$:0,N=(q=H==null?void 0:H.offsetLeft)!=null?q:0;return{top:B,left:N,right:N+K,bottom:B+X,width:K,height:X}}function pq(J,Q){if(dq(J)&&J.open===!1)return!1;let{overflow:Z,overflowX:$,overflowY:q}=getComputedStyle(J);return Z==="visible"&&$==="visible"&&q==="visible"}function dq(J){return J.tagName==="DETAILS"}function iZ(J,Q=J.getBoundingClientRect(),Z=0){var $,q,Y,H,K;let X=Q,{ownerDocument:B}=J,N=($=B.defaultView)!=null?$:window,W=J.parentElement;while(W&&W!==B.documentElement){if(!pq(W)){let M=W.getBoundingClientRect(),V=Z*(M.bottom-M.top),w=Z*(M.right-M.left),f=Z*(M.bottom-M.top),j=Z*(M.right-M.left);X={top:Math.max(X.top,M.top-V),right:Math.min(X.right,M.right+w),bottom:Math.min(X.bottom,M.bottom+f),left:Math.max(X.left,M.left-j),width:0,height:0},X.width=X.right-X.left,X.height=X.bottom-X.top}W=W.parentElement}let G=N.visualViewport,L=(q=G==null?void 0:G.offsetTop)!=null?q:0,F=(Y=G==null?void 0:G.offsetLeft)!=null?Y:0,z=(H=G==null?void 0:G.width)!=null?H:N.innerWidth,A=(K=G==null?void 0:G.height)!=null?K:N.innerHeight,I=Z*A,U=Z*z;if(X={top:Math.max(X.top,L-I),right:Math.min(X.right,F+z+U),bottom:Math.min(X.bottom,L+A+I),left:Math.max(X.left,F-U),width:0,height:0},X.width=X.right-X.left,X.height=X.bottom-X.top,X.width<0)X.width=0;if(X.height<0)X.height=0;return X}function ZQ(J){return{x:J.clientX,y:J.clientY}}var V2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nZ(J=document,Q=new Set){if(Q.has(J))return[];Q.add(J);let Z=[J];for(let $ of Array.from(J.querySelectorAll("iframe, frame")))try{let q=$.contentDocument;if(q&&!Q.has(q))Z.push(...nZ(q,Q))}catch(q){}try{let $=J.defaultView;if($&&$!==window.top){let q=$.parent;if(q&&q.document&&q.document!==J)Z.push(...nZ(q.document,Q))}}catch($){}return Z}function Z0(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function b1(){var J,Q;let Z=Z0()?window.visualViewport:null;return{x:(J=Z==null?void 0:Z.offsetLeft)!=null?J:0,y:(Q=Z==null?void 0:Z.offsetTop)!=null?Q:0}}function $0(J){if(!J||!KZ(J))return!1;return J instanceof NJ(J).ShadowRoot}function HZ(J){if(J&&KZ(J)){let Q=J.getRootNode();if($0(Q))return Q;else if(Q instanceof Document)return Q}return QQ(J)}function g1(J){return J.matchMedia("(prefers-reduced-motion: reduce)").matches}function F2(J){let Z=J.cloneNode(!0),$=Array.from(J.querySelectorAll("input, textarea, select, canvas, [contenteditable]"));return Array.from(Z.querySelectorAll("input, textarea, select, canvas, [contenteditable]")).forEach((Y,H)=>{let K=$[H];if(K2(Y)&&K2(K)){if(Y.type!=="file")Y.value=K.value;if(Y.type==="radio"&&Y.name)Y.name=`Cloned__${Y.name}`}if(H2(Y)&&H2(K)&&K.width>0&&K.height>0){let X=Y.getContext("2d");X==null||X.drawImage(K,0,0)}}),Z}function K2(J){return"value"in J}function H2(J){return J.tagName==="CANVAS"}function u1(J,{x:Q,y:Z}){let $=J.elementFromPoint(Q,Z);if(_q($)){let{contentDocument:q}=$;if(q){let{left:Y,top:H}=$.getBoundingClientRect();return u1(q,{x:Q-Y,y:Z-H})}}return $}function _q(J){return(J==null?void 0:J.tagName)==="IFRAME"}var m1=new WeakMap;function z2(J){return Boolean(J.closest(`
|
|
@@ -68,4 +68,4 @@ import{$f as x0,bg as TJ,cg as PZ,og as N5}from"./chunk-nwtb6dt1.js";import{Zj a
|
|
|
68
68
|
visibility: hidden;
|
|
69
69
|
}
|
|
70
70
|
`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function mY(J,Q="hidden"){return C(()=>{let{element:Z,manager:$}=J;if(!Z||!$)return;let q=pY(Z,$.registry.droppables),Y=[],H=F2(Z),{remove:K}=H;return dY(q,H,Y),_Y(H,Q),H.remove=()=>{Y.forEach((X)=>X()),K.call(H)},H})}function pY(J,Q){let Z=new Map;for(let $ of Q){if(!$.element)continue;if(J===$.element||J.contains($.element)){let q=`${AZ}${H0("dom-id")}`;$.element.setAttribute(q,""),Z.set($,q)}}return Z}function dY(J,Q,Z){for(let[$,q]of J){if(!$.element)continue;let Y=`[${q}]`,H=Q.matches(Y)?Q:Q.querySelector(Y);if($.element.removeAttribute(q),!H)continue;let K=$.element;$.proxy=H,H.removeAttribute(q),m1.set(K,H),Z.push(()=>{m1.delete(K),$.proxy=void 0})}}function _Y(J,Q="hidden"){J.setAttribute("inert","true"),J.setAttribute("tab-index","-1"),J.setAttribute("aria-hidden","true"),J.setAttribute(U0,Q)}function J$(J,Q){if(J===Q)return!0;return JQ(J)===JQ(Q)}function f2(J){let{target:Q}=J;if("newState"in J&&J.newState==="closed"&&gJ(Q)&&Q.hasAttribute("popover"))requestAnimationFrame(()=>$Q(Q))}function i1(J){return J.tagName==="TR"}function cY(J,Q,Z){let $=new MutationObserver((q)=>{let Y=!1;for(let H of q){if(H.target!==J){Y=!0;continue}if(H.type!=="attributes")continue;let K=H.attributeName;if(K.startsWith("aria-")||bY.includes(K))continue;let X=J.getAttribute(K);if(K==="style"){if(kQ(J)&&kQ(Q)){let B=J.style;for(let N of Array.from(Q.style))if(B.getPropertyValue(N)==="")Q.style.removeProperty(N);for(let N of Array.from(B)){if(gY.includes(N)||N.startsWith(n))continue;let W=B.getPropertyValue(N);Q.style.setProperty(N,W)}}}else if(X!==null)Q.setAttribute(K,X);else Q.removeAttribute(K)}if(Y&&Z)Q.replaceChildren(...J.cloneNode(!0).childNodes)});return $.observe(J,{attributes:!0,subtree:!0,childList:!0}),$}function lY(J,Q,Z){let $=new MutationObserver((q)=>{for(let Y of q){if(Y.addedNodes.length===0)continue;for(let H of Array.from(Y.addedNodes)){if(H.contains(J)&&J.nextElementSibling!==Q){J.insertAdjacentElement("afterend",Q),$Q(Z);return}if(H.contains(Q)&&Q.previousElementSibling!==J){Q.insertAdjacentElement("beforebegin",J),$Q(Z);return}}}if(J.isConnected&&Q.isConnected&&J.nextElementSibling!==Q)J.insertAdjacentElement("afterend",Q),$Q(Z)});return $.observe(J.ownerDocument.body,{childList:!0,subtree:!0}),$}function sY(J){return new ResizeObserver(()=>{var Q,Z,$;let q=new hJ(J.placeholder,{frameTransform:J.frameTransform,ignoreTransforms:!0}),Y=(Q=J.transformOrigin)!=null?Q:{x:1,y:1},H=(J.width-q.width)*Y.x+J.delta.x,K=(J.height-q.height)*Y.y+J.delta.y,X=b1();if(J.styles.set({width:q.width-J.widthOffset,height:q.height-J.heightOffset,top:J.top+K+X.y,left:J.left+H+X.x},n),(Z=J.getElementMutationObserver())==null||Z.takeRecords(),i1(J.element)&&i1(J.placeholder)){let z=Array.from(J.element.cells),A=Array.from(J.placeholder.cells);if(!J.getSavedCellWidths())J.setSavedCellWidths(z.map((I)=>I.style.width));for(let[I,U]of z.entries()){let M=A[I];U.style.width=`${M.getBoundingClientRect().width}px`}}let B=($=J.getTranslate())!=null?$:{x:0,y:0},N=J.left+H+X.x+B.x,W=J.top+K+X.y+B.y,G=q.width-J.widthOffset,L=q.height-J.heightOffset,F=J.frameTransform;J.dragOperation.shape=new XJ(N*F.scaleX+F.x,W*F.scaleY+F.y,G*F.scaleX,L*F.scaleY)})}var oY=250,iY="ease";function nY(J){var Q,Z,$,q;let{animation:Y}=J;if(typeof Y==="function"){let U=Y({source:J.source,element:J.element,feedbackElement:J.feedbackElement,placeholder:J.placeholder,translate:J.translate,moved:J.moved});Promise.resolve(U).then(()=>{J.cleanup(),requestAnimationFrame(J.restoreFocus)});return}let{duration:H=oY,easing:K=iY}=Y!=null?Y:{};$Q(J.feedbackElement);let[,X]=(Q=f1(J.feedbackElement,(U)=>("translate"in U)))!=null?Q:[];X==null||X.pause();let B=(Z=J.placeholder)!=null?Z:J.element,N={frameTransform:J$(J.feedbackElement,B)?null:void 0},W=new hJ(J.feedbackElement,N),G=($=xQ(DJ(J.feedbackElement).translate))!=null?$:J.translate,L=new hJ(B,N),F=XJ.delta(W,L,J.alignment),z={x:G.x-F.x,y:G.y-F.y},A=Math.round(W.intrinsicHeight)!==Math.round(L.intrinsicHeight)?{minHeight:[`${W.intrinsicHeight}px`,`${L.intrinsicHeight}px`],maxHeight:[`${W.intrinsicHeight}px`,`${L.intrinsicHeight}px`]}:{},I=Math.round(W.intrinsicWidth)!==Math.round(L.intrinsicWidth)?{minWidth:[`${W.intrinsicWidth}px`,`${L.intrinsicWidth}px`],maxWidth:[`${W.intrinsicWidth}px`,`${L.intrinsicWidth}px`]}:{};J.styles.set({transition:J.transition},n),J.feedbackElement.setAttribute(o1,""),(q=J.getElementMutationObserver())==null||q.takeRecords(),P2({element:J.feedbackElement,keyframes:$9(FZ(FZ({},A),I),{translate:[`${G.x}px ${G.y}px 0`,`${z.x}px ${z.y}px 0`]}),options:{duration:g1(NJ(J.feedbackElement))?0:J.moved||J.feedbackElement!==J.element?H:0,easing:K}}).then(()=>{J.feedbackElement.removeAttribute(o1),X==null||X.finish(),J.cleanup(),requestAnimationFrame(J.restoreFocus)})}var Q$,n1,zZ,K9,W0,Z$,$$,uQ=class extends(n1=$J,Q$=[T],n1){constructor(Q,Z){super(Q,Z);m(this,W0),m(this,K9,l(zZ,8,this)),l(zZ,11,this),this.state={initial:{},current:{}};let $=Q.registry.plugins.get(V0),q=$==null?void 0:$.register(uY);if(q){let Y=this.destroy.bind(this);this.destroy=()=>{q(),Y()}}this.registerEffect(XQ(this,W0,Z$).bind(this,$)),this.registerEffect(XQ(this,W0,$$))}};zZ=pQ(n1);K9=new WeakMap;W0=new WeakSet;Z$=function(J){let{overlay:Q}=this;if(!Q||!J)return;let Z=HZ(Q);if(!Z)return;return J.addRoot(Z)};$$=function(){var J,Q,Z,$,q,Y,H;let{state:K,manager:X,options:B}=this,{dragOperation:N}=X,{position:W,source:G,status:L}=N;if(L.idle){K.current={},K.initial={};return}if(!G)return;let{element:F}=G,z=G.pluginConfig(uQ),A=(Q=(J=z==null?void 0:z.feedback)!=null?J:B==null?void 0:B.feedback)!=null?Q:"default",I=typeof A==="function"?A(G,X):A;if(!F||I==="none"||!L.initialized||L.initializing)return;let{initial:U}=K,M=(Z=this.overlay)!=null?Z:F,V=qQ(M),w=qQ(F),f=!J$(F,M),j=new hJ(F,{frameTransform:f?w:null,ignoreTransforms:!f}),p={x:w.scaleX/V.scaleX,y:w.scaleY/V.scaleY},{width:b,height:y,top:GQ,left:s}=j;if(f)b=b/p.x,y=y/p.y;let v=new E2(M),R0=DJ(F),{transition:A9,translate:I9,boxSizing:v$,paddingBlockStart:b$,paddingBlockEnd:g$,paddingInlineStart:u$,paddingInlineEnd:m$,borderInlineStartWidth:p$,borderInlineEndWidth:d$,borderBlockStartWidth:_$,borderBlockEndWidth:c$}=R0,OZ=A9.split(",").filter((S)=>!/^\s*(transform|translate|scale)\b/.test(S)).join(","),cJ=WZ(R0),l$=R0.transform,j9=I==="clone",O9=v$==="content-box",R9=O9?parseInt(u$)+parseInt(m$)+parseInt(p$)+parseInt(d$):0,D9=O9?parseInt(b$)+parseInt(g$)+parseInt(_$)+parseInt(c$):0,KJ=I!=="move"&&!this.overlay?mY(G,j9?"clone":"hidden"):null,D0=C(()=>K0(X.dragOperation.activatorEvent));if(!U.translate){if(this.overlay&&cJ)U.translate={x:cJ.x,y:cJ.y};else if(I9!=="none"){let S=xQ(I9);if(S)U.translate=S}}if(!U.transformOrigin){let S=C(()=>W.current),_=s+(($=cJ==null?void 0:cJ.x)!=null?$:0),HJ=GQ+((q=cJ==null?void 0:cJ.y)!=null?q:0);U.transformOrigin={x:(S.x-_*V.scaleX-V.x)/(b*V.scaleX),y:(S.y-HJ*V.scaleY-V.y)/(y*V.scaleY)}}let{transformOrigin:VQ}=U,C9=GQ*V.scaleY+V.y,T9=s*V.scaleX+V.x;if(!U.coordinates){if(U.coordinates={x:T9,y:C9},p.x!==1||p.y!==1){let{scaleX:S,scaleY:_}=w,{x:HJ,y:fJ}=VQ;U.coordinates.x+=(b*S-b)*HJ,U.coordinates.y+=(y*_-y)*fJ}}if(!U.dimensions)U.dimensions={width:b,height:y};if(!U.frameTransform)U.frameTransform=V;let P9={x:U.coordinates.x-T9,y:U.coordinates.y-C9},E9={width:(U.dimensions.width*U.frameTransform.scaleX-b*V.scaleX)*VQ.x,height:(U.dimensions.height*U.frameTransform.scaleY-y*V.scaleY)*VQ.y},C0={x:P9.x/V.scaleX+E9.width,y:P9.y/V.scaleY+E9.height},S9={left:s+C0.x,top:GQ+C0.y};M.setAttribute(CJ,"true");let k9=C(()=>N.transform),x9=(Y=U.translate)!=null?Y:{x:0,y:0},s$=k9.x*V.scaleX+x9.x,o$=k9.y*V.scaleY+x9.y,h9=b1();if(v.set({width:b-R9,height:y-D9,top:S9.top+h9.y,left:S9.left+h9.x,translate:`${s$}px ${o$}px 0`,transform:this.overlay?"none":l$,transition:OZ?`${OZ}, translate 0ms linear`:"translate 0ms linear",scale:f?`${p.x} ${p.y}`:"","transform-origin":`${VQ.x*100}% ${VQ.y*100}%`},n),KJ){if(F.insertAdjacentElement("afterend",KJ),B==null?void 0:B.rootElement)(typeof B.rootElement==="function"?B.rootElement(G):B.rootElement).appendChild(F)}if(q0(M)){if(!M.hasAttribute("popover"))M.setAttribute("popover","manual");$Q(M),M.addEventListener("beforetoggle",f2)}let lJ,T0,RZ,y9=sY({placeholder:KJ,element:F,feedbackElement:M,frameTransform:V,transformOrigin:VQ,width:b,height:y,top:GQ,left:s,widthOffset:R9,heightOffset:D9,delta:C0,styles:v,dragOperation:N,getTranslate:()=>K.current.translate,getElementMutationObserver:()=>lJ,getSavedCellWidths:()=>RZ,setSavedCellWidths:(S)=>{RZ=S}}),f9=new hJ(M);C(()=>N.shape=f9);let P0=NJ(M),v9=(S)=>{this.manager.actions.stop({event:S})},i$=g1(P0);if(D0)P0.addEventListener("resize",v9);if(C(()=>G.status)==="idle")requestAnimationFrame(()=>G.status="dragging");if(KJ)y9.observe(KJ),lJ=cY(F,KJ,j9),T0=lY(F,KJ,M);let b9=(H=X.dragOperation.source)==null?void 0:H.id,n$=()=>{var S;if(!D0||b9==null)return;let _=X.registry.draggables.get(b9),HJ=(S=_==null?void 0:_.handle)!=null?S:_==null?void 0:_.element;if(xJ(HJ))HJ.focus()},E0=()=>{var S;if(lJ==null||lJ.disconnect(),T0==null||T0.disconnect(),y9.disconnect(),P0.removeEventListener("resize",v9),q0(M))M.removeEventListener("beforetoggle",f2),M.removeAttribute("popover");if(M.removeAttribute(CJ),v.reset(),RZ&&i1(F)){let fJ=Array.from(F.cells);for(let[S0,DZ]of fJ.entries())DZ.style.width=(S=RZ[S0])!=null?S:""}G.status="idle";let _=K.current.translate!=null,HJ=N.status.dragging;if(KJ&&(!HJ&&_||KJ.parentElement!==M.parentElement)&&M.isConnected)KJ.replaceWith(M);KJ==null||KJ.remove()},a$=B==null?void 0:B.dropAnimation,g9=this,r$=nJ(()=>{var S,_,HJ;let{transform:fJ,status:S0}=N;if(!fJ.x&&!fJ.y&&!K.current.translate)return;if(S0.dragging){let DZ=(S=U.translate)!=null?S:{x:0,y:0},CZ={x:fJ.x/V.scaleX+DZ.x,y:fJ.y/V.scaleY+DZ.y},u9=K.current.translate,t$=C(()=>N.modifiers),k0=C(()=>{var _Q;return(_Q=N.shape)==null?void 0:_Q.current}),dQ=B==null?void 0:B.keyboardTransition,m9=D0&&!i$&&dQ!==null?`${(_=dQ==null?void 0:dQ.duration)!=null?_:250}ms ${(HJ=dQ==null?void 0:dQ.easing)!=null?HJ:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(v.set({transition:OZ?`${OZ}, translate ${m9}`:`translate ${m9}`,translate:`${CZ.x}px ${CZ.y}px 0`},n),lJ==null||lJ.takeRecords(),k0&&k0!==f9&&u9&&!t$.length){let _Q=e.delta(CZ,u9);N.shape=XJ.from(k0.boundingRectangle).translate(_Q.x*V.scaleX,_Q.y*V.scaleY)}else N.shape=new hJ(M);K.current.translate=CZ}},function(){if(N.status.dropped){this.dispose(),G.status="dropping";let S=(z==null?void 0:z.dropAnimation)!==void 0?z.dropAnimation:g9.dropAnimation!==void 0?g9.dropAnimation:a$,_=K.current.translate,HJ=_!=null;if(!_&&F!==M)_={x:0,y:0};if(!_||S===null){E0();return}X.renderer.rendering.then(()=>{nY({source:G,element:F,feedbackElement:M,placeholder:KJ,translate:_,moved:HJ,transition:A9,alignment:G.alignment,styles:v,animation:S!=null?S:void 0,getElementMutationObserver:()=>lJ,cleanup:E0,restoreFocus:n$})})}});return()=>{E0(),r$()}};FJ(zZ,4,"overlay",Q$,uQ,K9);WQ(zZ,uQ);uQ.configure=EQ(uQ);var F0=uQ,BZ=!0,aY=!1,q$,Y$,K$,H$,mJ,H9,X9;H$=(K$=[T],UJ.Forward),Y$=(q$=[T],UJ.Reverse);var MZ=class{constructor(){m(this,H9,l(mJ,8,this,BZ)),l(mJ,11,this),m(this,X9,l(mJ,12,this,BZ)),l(mJ,15,this)}isLocked(J){if(J===UJ.Idle)return!1;if(J==null)return this[UJ.Forward]===BZ&&this[UJ.Reverse]===BZ;return this[J]===BZ}unlock(J){if(J===UJ.Idle)return;this[J]=aY}};mJ=pQ(null);H9=new WeakMap;X9=new WeakMap;FJ(mJ,4,H$,K$,MZ,H9);FJ(mJ,4,Y$,q$,MZ,X9);WQ(mJ,MZ);var rY=[UJ.Forward,UJ.Reverse],v2=class{constructor(){this.x=new MZ,this.y=new MZ}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},tY=class extends $J{constructor(J){super(J);let Q=IJ(new v2),Z=null;this.signal=Q,o(()=>{let{status:$}=J.dragOperation;if(!$.initialized){Z=null,Q.value=new v2;return}let{delta:q}=J.dragOperation.position;if(Z){let Y={x:b2(q.x,Z.x),y:b2(q.y,Z.y)},H=Q.peek();JJ(()=>{for(let K of $1)for(let X of rY)if(Y[K]===X)H[K].unlock(X);Q.value=H})}Z=q})}get current(){return this.signal.peek()}};function b2(J,Q){return Math.sign(J-Q)}var X$,a1,wZ,W9,uJ,r1,z0=class extends(a1=SQ,X$=[T],a1){constructor(J){super(J);m(this,W9,l(wZ,8,this,!1)),l(wZ,11,this),m(this,uJ),m(this,r1,()=>{if(!x(this,uJ))return;let{element:Y,by:H}=x(this,uJ);if(H.y)Y.scrollTop+=H.y;if(H.x)Y.scrollLeft+=H.x}),this.scroll=(Y,H)=>{var K;if(this.disabled)return!1;let X=this.getScrollableElements();if(!X)return qJ(this,uJ,void 0),!1;let{position:B}=this.manager.dragOperation,N=B==null?void 0:B.current;if(N){let{by:W}=Y!=null?Y:{},G=W?{x:g2(W.x),y:g2(W.y)}:void 0,L=G?void 0:this.scrollIntentTracker.current;if(L==null?void 0:L.isLocked())return!1;for(let F of X){let z=D2(F,W);if(z.x||z.y){let{speed:A,direction:I}=C2(F,N,G,H==null?void 0:H.acceleration,H==null?void 0:H.threshold);if(L){for(let U of $1)if(L[U].isLocked(I[U]))A[U]=0,I[U]=0}if(I.x||I.y){let{x:U,y:M}=W!=null?W:I,V=U*A.x,w=M*A.y;if(V||w){let f=(K=x(this,uJ))==null?void 0:K.by;if(this.autoScrolling&&f){if(f.x&&!V||f.y&&!w)continue}return qJ(this,uJ,{element:F,by:{x:V,y:w}}),XZ.schedule(x(this,r1)),!0}}}}}return qJ(this,uJ,void 0),!1};let Q=null,Z=null,$=AQ(()=>{let{position:Y,source:H}=J.dragOperation;if(!Y)return null;let K=u1(HZ(H==null?void 0:H.element),Y.current);if(K)Q=K;return K!=null?K:Q}),q=AQ(()=>{let Y=$.value,{documentElement:H}=QQ(Y);if(!Y||Y===H){let{target:K}=J.dragOperation,X=K==null?void 0:K.element;if(X){let B=Y0(X,{excludeElement:!1});return Z=B,B}}if(Y){let K=Y0(Y,{excludeElement:!1});if(this.autoScrolling&&Z&&K.size<(Z==null?void 0:Z.size))return Z;return Z=K,K}return Z=null,null},EJ);this.getScrollableElements=()=>{return q.value},this.scrollIntentTracker=new tY(J),this.destroy=J.monitor.addEventListener("dragmove",(Y)=>{if(this.disabled||Y.defaultPrevented||!K0(J.dragOperation.activatorEvent)||!Y.by)return;if(this.scroll({by:Y.by}))Y.preventDefault()})}};wZ=pQ(a1);W9=new WeakMap;uJ=new WeakMap;r1=new WeakMap;FJ(wZ,4,"autoScrolling",X$,z0,W9);WQ(wZ,z0);function g2(J){if(J>0)return UJ.Forward;if(J<0)return UJ.Reverse;return UJ.Idle}var eY=class{constructor(J){this.scheduler=J,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:Q,resolvers:Z}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(let $ of Q)$();for(let $ of Z)$()}}schedule(J){if(this.tasks.add(J),!this.pending)this.pending=!0,this.scheduler(this.flush);return new Promise((Q)=>this.resolvers.add(Q))}},J5=new eY((J)=>{if(typeof requestAnimationFrame==="function")requestAnimationFrame(J);else J()}),Q5=10,t1=class extends $J{constructor(Q,Z){super(Q,Z);let $=Q.registry.plugins.get(z0);if(!$)throw Error("AutoScroller plugin depends on Scroller plugin");this.destroy=o(()=>{var q,Y,H;if(this.disabled)return;let{position:K,status:X}=Q.dragOperation;if(X.dragging){let B={acceleration:(q=this.options)==null?void 0:q.acceleration,threshold:typeof((Y=this.options)==null?void 0:Y.threshold)==="number"?{x:this.options.threshold,y:this.options.threshold}:(H=this.options)==null?void 0:H.threshold};if($.scroll(void 0,B)){$.autoScrolling=!0;let W=setInterval(()=>J5.schedule(()=>$.scroll(void 0,B)),Q5);return()=>{clearInterval(W)}}else $.autoScrolling=!1}})}};t1.configure=EQ(t1);var W$=t1,u2={capture:!0,passive:!0},UZ,Z5=class extends SQ{constructor(J){super(J);m(this,UZ),this.handleScroll=()=>{if(x(this,UZ)==null)qJ(this,UZ,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),qJ(this,UZ,void 0)},50))};let{dragOperation:Q}=this.manager;this.destroy=o(()=>{var Z,$,q;if(Q.status.dragging){let H=(q=($=(Z=Q.source)==null?void 0:Z.element)==null?void 0:$.ownerDocument)!=null?q:document;return H.addEventListener("scroll",this.handleScroll,u2),()=>{H.removeEventListener("scroll",this.handleScroll,u2)}}})}};UZ=new WeakMap;var $5="* { user-select: none !important; -webkit-user-select: none !important; }",q5=class extends $J{constructor(J){super(J);this.manager=J;let Q=J.registry.plugins.get(V0),Z=Q==null?void 0:Q.register($5);if(this.destroy=o(()=>{let{dragOperation:$}=this.manager;if($.status.initialized)return _1(),document.addEventListener("selectionchange",_1,{capture:!0}),()=>{document.removeEventListener("selectionchange",_1,{capture:!0})}}),Z){let $=this.destroy.bind(this);this.destroy=()=>{Z(),$()}}}};function _1(){var J;(J=document.getSelection())==null||J.removeAllRanges()}var LZ=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(J,Q){var Z;let $=(Z=Q.handle)!=null?Z:Q.element;return J.target!==$}}),yQ,L0=class extends aJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,yQ,[]),this.listeners=new p1,this.handleSourceKeyDown=($,q,Y)=>{if(this.disabled||$.defaultPrevented)return;if(!gJ($.target))return;if(q.disabled)return;let{keyboardCodes:H=LZ.keyboardCodes,preventActivation:K=LZ.preventActivation}=Y!=null?Y:{};if(!H.start.includes($.code))return;if(!this.manager.dragOperation.status.idle)return;if(K==null?void 0:K($,q))return;this.handleStart($,q,Y)}}bind(Q,Z=this.options){return o(()=>{var q;let Y=(q=Q.handle)!=null?q:Q.element,H=(K)=>{if(K0(K))this.handleSourceKeyDown(K,Q,Z)};if(Y)return Y.addEventListener("keydown",H),()=>{Y.removeEventListener("keydown",H)}})}handleStart(Q,Z,$){let{element:q}=Z;if(!q)throw Error("Source draggable does not have an associated element");Q.preventDefault(),Q.stopImmediatePropagation(),T2(q);let{center:Y}=new hJ(q);if(this.manager.actions.start({event:Q,coordinates:{x:Y.x,y:Y.y},source:Z}).signal.aborted)return this.cleanup();this.sideEffects();let K=QQ(q),X=[this.listeners.bind(K,[{type:"keydown",listener:(B)=>this.handleKeyDown(B,Z,$),options:{capture:!0}}])];x(this,yQ).push(...X)}handleKeyDown(Q,Z,$){let{keyboardCodes:q=LZ.keyboardCodes}=$!=null?$:{};if(hQ(Q,[...q.end,...q.cancel])){Q.preventDefault();let Y=hQ(Q,q.cancel);this.handleEnd(Q,Y);return}if(hQ(Q,q.up))this.handleMove("up",Q);else if(hQ(Q,q.down))this.handleMove("down",Q);if(hQ(Q,q.left))this.handleMove("left",Q);else if(hQ(Q,q.right))this.handleMove("right",Q)}handleEnd(Q,Z){this.manager.actions.stop({event:Q,canceled:Z}),this.cleanup()}handleMove(Q,Z){var $,q;let{shape:Y}=this.manager.dragOperation,H=Z.shiftKey?5:1,K={x:0,y:0},X=(q=($=this.options)==null?void 0:$.offset)!=null?q:LZ.offset;if(typeof X==="number")X={x:X,y:X};if(!Y)return;switch(Q){case"up":K={x:0,y:-X.y*H};break;case"down":K={x:0,y:X.y*H};break;case"left":K={x:-X.x*H,y:0};break;case"right":K={x:X.x*H,y:0};break}if(K.x||K.y)Z.preventDefault(),this.manager.actions.move({event:Z,by:K})}sideEffects(){let Q=this.manager.registry.plugins.get(W$);if((Q==null?void 0:Q.disabled)===!1)Q.disable(),x(this,yQ).push(()=>{Q.enable()})}cleanup(){x(this,yQ).forEach((Q)=>Q()),qJ(this,yQ,[])}destroy(){this.cleanup(),this.listeners.clear()}};yQ=new WeakMap;L0.configure=EQ(L0);L0.defaults=LZ;var B$=L0;function hQ(J,Q){return Q.includes(J.code)}var YQ,Y5=class extends C1{constructor(){super(...arguments);m(this,YQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,YQ,ZQ(J));break;case"pointermove":if(!x(this,YQ))return;let{x:Q,y:Z}=ZQ(J),$={x:Q-x(this,YQ).x,y:Z-x(this,YQ).y},{tolerance:q}=this.options;if(q&&fZ($,q)){this.abort();return}if(fZ($,this.options.value))this.activate(J);break;case"pointerup":this.abort();break}}abort(){qJ(this,YQ,void 0)}};YQ=new WeakMap;var fQ,KQ,K5=class extends C1{constructor(){super(...arguments);m(this,fQ),m(this,KQ)}onEvent(J){switch(J.type){case"pointerdown":qJ(this,KQ,ZQ(J)),qJ(this,fQ,setTimeout(()=>this.activate(J),this.options.value));break;case"pointermove":if(!x(this,KQ))return;let{x:Q,y:Z}=ZQ(J),$={x:Q-x(this,KQ).x,y:Z-x(this,KQ).y};if(fZ($,this.options.tolerance))this.abort();break;case"pointerup":this.abort();break}}abort(){if(x(this,fQ))clearTimeout(x(this,fQ)),qJ(this,KQ,void 0),qJ(this,fQ,void 0)}};fQ=new WeakMap;KQ=new WeakMap;var bQ=class{};bQ.Delay=K5;bQ.Distance=Y5;var e1=Object.freeze({activationConstraints(J,Q){var Z;let{pointerType:$,target:q}=J;if($==="mouse"&&gJ(q)&&(Q.handle===q||((Z=Q.handle)==null?void 0:Z.contains(q))))return;if($==="touch")return[new bQ.Delay({value:250,tolerance:5})];if(k2(q)&&!J.defaultPrevented)return[new bQ.Delay({value:200,tolerance:0})];return[new bQ.Delay({value:200,tolerance:10}),new bQ.Distance({value:5})]},preventActivation(J,Q){var Z;let{target:$}=J;if($===Q.element)return!1;if($===Q.handle)return!1;if(!gJ($))return!1;if((Z=Q.handle)==null?void 0:Z.contains($))return!1;return z2($)}}),vQ,G0=class extends aJ{constructor(Q,Z){super(Q);this.manager=Q,this.options=Z,m(this,vQ,new Set),this.listeners=new p1,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:$,coordinates:q}=this.latest;if(!$||!q)return;this.manager.actions.move({event:$,to:q})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(Q,Z,$=this.options){let{activationConstraints:q=e1.activationConstraints}=$!=null?$:{};return typeof q==="function"?q(Q,Z):q}bind(Q,Z=this.options){return o(()=>{var q;let Y=new AbortController,{signal:H}=Y,K=(B)=>{if(S2(B))this.handlePointerDown(B,Q,Z)},X=[(q=Q.handle)!=null?q:Q.element];if(Z==null?void 0:Z.activatorElements)if(Array.isArray(Z.activatorElements))X=Z.activatorElements;else X=Z.activatorElements(Q);for(let B of X){if(!B)continue;W5(B.ownerDocument.defaultView),B.addEventListener("pointerdown",K,{signal:H})}return()=>Y.abort()})}handlePointerDown(Q,Z,$){if(this.disabled||!Q.isPrimary||Q.button!==0||!gJ(Q.target)||Z.disabled||H5(Q)||!this.manager.dragOperation.status.idle)return;let{preventActivation:q=e1.preventActivation}=$!=null?$:{};if(q==null?void 0:q(Q,Z))return;let{target:Y}=Q,H=xJ(Y)&&Y.draggable&&Y.getAttribute("draggable")==="true",K=qQ(Z.element),{x:X,y:B}=ZQ(Q);this.initialCoordinates={x:X*K.scaleX+K.x,y:B*K.scaleY+K.y};let N=this.activationConstraints(Q,Z,$);Q.sensor=this;let W=new n8(N,(z)=>this.handleStart(Z,z));W.signal.onabort=()=>this.handleCancel(Q),W.onEvent(Q),this.controller=W;let G=nZ(),L=this.listeners.bind(G,[{type:"pointermove",listener:(z)=>this.handlePointerMove(z,Z)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:H?this.handleCancel:X0,options:{capture:!0}}]),F=()=>{L(),this.initialCoordinates=void 0};x(this,vQ).add(F)}handlePointerMove(Q,Z){var $,q;if((($=this.controller)==null?void 0:$.activated)===!1){(q=this.controller)==null||q.onEvent(Q);return}if(this.manager.dragOperation.status.dragging){let Y=ZQ(Q),H=qQ(Z.element);Y.x=Y.x*H.scaleX+H.x,Y.y=Y.y*H.scaleY+H.y,Q.preventDefault(),Q.stopPropagation(),this.latest.event=Q,this.latest.coordinates=Y,XZ.schedule(this.handleMove)}}handlePointerUp(Q){let{status:Z}=this.manager.dragOperation;if(!Z.idle){Q.preventDefault(),Q.stopPropagation();let $=!Z.initialized;this.manager.actions.stop({event:Q,canceled:$})}this.cleanup()}handleKeyDown(Q){if(Q.key==="Escape")Q.preventDefault(),this.handleCancel(Q)}handleStart(Q,Z){let{manager:$,initialCoordinates:q}=this;if(!q||!$.dragOperation.status.idle)return;if(Z.defaultPrevented)return;if($.actions.start({coordinates:q,event:Z,source:Q}).signal.aborted)return this.cleanup();Z.preventDefault();let K=QQ(Z.target).body;try{K.setPointerCapture(Z.pointerId)}catch(N){this.handleCancel(Z);return}let X=gJ(Z.target)?[Z.target,K]:K,B=this.listeners.bind(X,[{type:"touchmove",listener:X0,options:{passive:!1}},{type:"click",listener:X0},{type:"contextmenu",listener:X0},{type:"keydown",listener:this.handleKeyDown}]);x(this,vQ).add(B)}handleCancel(Q){let{dragOperation:Z}=this.manager;if(Z.status.initialized)this.manager.actions.stop({event:Q,canceled:!0});this.cleanup()}cleanup(){let{controller:Q}=this;if(this.controller=void 0,Q&&!Q.signal.aborted)Q.abort();this.latest={event:void 0,coordinates:void 0},x(this,vQ).forEach((Z)=>Z()),x(this,vQ).clear()}destroy(){this.cleanup(),this.listeners.clear()}};vQ=new WeakMap;G0.configure=EQ(G0);G0.defaults=e1;var N$=G0;function H5(J){return"sensor"in J}function X0(J){J.preventDefault()}function X5(){}var m2=new WeakSet;function W5(J){if(!J||m2.has(J))return;J.addEventListener("touchmove",X5,{capture:!1,passive:!1}),m2.add(J)}var HQ={modifiers:[],plugins:[yY,W$,vY,F0,q5],sensors:[N$,B$]},B9=class extends Y2{constructor(J={}){let Q=VJ(J.plugins,HQ.plugins),Z=VJ(J.sensors,HQ.sensors),$=VJ(J.modifiers,HQ.modifiers);super($9(FZ({},J),{plugins:[Z5,z0,V0,...Q],sensors:Z,modifiers:$}))}},U$,L$,J9,pJ,N9,U9,IZ=class extends(J9=MJ,L$=[T],U$=[T],J9){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[],handle:Y}=Z,H=c2(Z,["element","effects","handle"]);super(FZ({effects:()=>[...q(),()=>{var K,X;let{manager:B}=this;if(!B)return;let W=((X=(K=this.sensors)==null?void 0:K.map(CQ))!=null?X:[...B.sensors]).map((G)=>{let L=G instanceof aJ?G:B.registry.register(G.plugin),F=G instanceof aJ?void 0:G.options;return L.bind(this,F)});return function(){W.forEach((L)=>L())}}]},H),Q);m(this,N9,l(pJ,8,this)),l(pJ,11,this),m(this,U9,l(pJ,12,this)),l(pJ,15,this),this.element=$,this.handle=Y}};pJ=pQ(J9);N9=new WeakMap;U9=new WeakMap;FJ(pJ,4,"handle",L$,IZ,N9);FJ(pJ,4,"element",U$,IZ,U9);WQ(pJ,IZ);var G$,V$,Q9,dJ,L9,c1,F$,z$,VZ,G9,M0=class extends(Q9=wJ,V$=[T],G$=[T],Q9){constructor(J,Q){var Z=J,{element:$,effects:q=()=>[]}=Z,Y=c2(Z,["element","effects"]);let{collisionDetector:H=x2}=Y,K=(B)=>{let{manager:N,element:W}=this;if(!W||B===null){this.shape=void 0;return}if(!N)return;let G=new hJ(W),L=C(()=>this.shape);if(G&&(L==null?void 0:L.equals(G)))return L;return this.shape=G,G},X=IJ(!1);super($9(FZ({},Y),{collisionDetector:H,effects:()=>[...q(),()=>{let{element:B,manager:N}=this;if(!N)return;let{dragOperation:W}=N,{source:G}=W;X.value=Boolean(G&&W.status.initialized&&B&&!this.disabled&&this.accepts(G))},()=>{let{element:B}=this;if(X.value&&B){let N=new O2(B,K);return()=>{N.disconnect(),this.shape=void 0}}},()=>{var B;if((B=this.manager)==null?void 0:B.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),Q);m(this,VZ),m(this,L9,l(dJ,8,this)),l(dJ,11,this),m(this,G9,l(dJ,12,this)),l(dJ,15,this),this.element=$,this.refreshShape=()=>K()}set element(J){qJ(this,VZ,J,z$)}get element(){var J;return(J=this.proxy)!=null?J:x(this,VZ,F$)}};dJ=pQ(Q9);L9=new WeakMap;VZ=new WeakSet;G9=new WeakMap;c1=FJ(dJ,20,"#element",V$,VZ,L9),F$=c1.get,z$=c1.set;FJ(dJ,4,"proxy",G$,M0,G9);WQ(dJ,M0);var D=TZ(x0(),1);var d=TZ(x0(),1);var V9=TZ(N5(),1);function B5(J){return J!=null&&typeof J==="object"&&"current"in J}function BQ(J){var Q;if(J==null)return;if(B5(J))return(Q=J.current)!=null?Q:void 0;return J}var U5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",NQ=U5?d.useLayoutEffect:d.useEffect;function M$(){let J=d.useState(0)[1];return d.useCallback(()=>{J((Q)=>Q+1)},[J])}function L5(J,Q=!1){let Z=d.useRef(J.peek()),$=d.useRef(!1),q=M$();return NQ(()=>o(()=>{let Y=Z.current,H=J.value;if(Y!==H){if(Z.current=H,!$.current)return;if(Q)V9.flushSync(q);else q()}}),[J,Q,q]),{get value(){return $.current=!0,J.peek()}}}function w$(J,Q=[],Z=!1){let $=d.useRef(J);return $.current=J,L5(d.useMemo(()=>AQ(()=>$.current()),Q),Z)}function w0(J,Q){let Z=d.useRef(new Map),$=M$();return NQ(()=>{if(!J){Z.current.clear();return}return o(()=>{var q;let Y=!1,H=!1;for(let K of Z.current){let[X]=K,B=C(()=>K[1]),N=J[X];if(B!==N)Y=!0,Z.current.set(X,N),H=(q=Q==null?void 0:Q(X,B,N))!=null?q:!1}if(Y)if(H)queueMicrotask(()=>V9.flushSync($));else $()})},[J]),d.useMemo(()=>J?new Proxy(J,{get(q,Y){let H=q[Y];return Z.current.set(Y,H),H}}):J,[J])}function NH(J,Q){J()}function UQ(J){let Q=d.useRef(J);return NQ(()=>{Q.current=J},[J]),Q}function a(J,Q,Z=d.useEffect,$=Object.is){let q=d.useRef(J);Z(()=>{let Y=q.current;if(!$(J,Y))q.current=J,Q(J,Y)},[Q,J])}function A0(J,Q){let Z=d.useRef(BQ(J));NQ(()=>{let $=BQ(J);if($!==Z.current)Z.current=$,Q($)})}var{defineProperty:G5,defineProperties:V5,getOwnPropertyDescriptors:F5,getOwnPropertySymbols:j0}=Object,I$=Object.prototype.hasOwnProperty,j$=Object.prototype.propertyIsEnumerable,A$=(J,Q,Z)=>(Q in J)?G5(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,O$=(J,Q)=>{for(var Z in Q||(Q={}))if(I$.call(Q,Z))A$(J,Z,Q[Z]);if(j0){for(var Z of j0(Q))if(j$.call(Q,Z))A$(J,Z,Q[Z])}return J},R$=(J,Q)=>V5(J,F5(Q)),z5=(J,Q)=>{var Z={};for(var $ in J)if(I$.call(J,$)&&Q.indexOf($)<0)Z[$]=J[$];if(J!=null&&j0){for(var $ of j0(J))if(Q.indexOf($)<0&&j$.call(J,$))Z[$]=J[$]}return Z},M5=new B9,M9=D.createContext(M5),w5=D.memo(D.forwardRef(({children:J},Q)=>{let[Z,$]=D.useState(0),q=D.useRef(null),Y=D.useRef(null),H=D.useMemo(()=>({renderer:{get rendering(){var K;return(K=q.current)!=null?K:Promise.resolve()}},trackRendering(K){if(!q.current)q.current=new Promise((X)=>{Y.current=X});D.startTransition(()=>{K(),$((X)=>X+1)})}}),[]);return NQ(()=>{var K;(K=Y.current)==null||K.call(Y),q.current=null},[J,Z]),D.useImperativeHandle(Q,()=>H),null})),F9=[void 0,EJ];function wH(J){var Q=J,{children:Z,onCollision:$,onBeforeDragStart:q,onDragStart:Y,onDragMove:H,onDragOver:K,onDragEnd:X}=Q,B=z5(Q,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);let N=D.useRef(null),{plugins:W,modifiers:G,sensors:L}=B,F=VJ(W,HQ.plugins),z=VJ(L,HQ.sensors),A=VJ(G,HQ.modifiers),I=UQ(q),U=UQ(Y),M=UQ(K),V=UQ(H),w=UQ(X),f=UQ($),j=A5(()=>{var p;return(p=B.manager)!=null?p:new B9(B)});return D.useEffect(()=>{if(!N.current)throw Error("Renderer not found");let{renderer:p,trackRendering:b}=N.current,{monitor:y}=j;j.renderer=p;let GQ=[y.addEventListener("beforedragstart",(s)=>{let v=I.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragstart",(s)=>{var v;return(v=U.current)==null?void 0:v.call(U,s,j)}),y.addEventListener("dragover",(s)=>{let v=M.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragmove",(s)=>{let v=V.current;if(v)b(()=>v(s,j))}),y.addEventListener("dragend",(s)=>{let v=w.current;if(v)b(()=>v(s,j))}),y.addEventListener("collision",(s)=>{var v;return(v=f.current)==null?void 0:v.call(f,s,j)})];return()=>GQ.forEach((s)=>s())},[j]),a(F,()=>j&&(j.plugins=F),...F9),a(z,()=>j&&(j.sensors=z),...F9),a(A,()=>j&&(j.modifiers=A),...F9),PZ(M9.Provider,{value:j,children:[TJ(w5,{ref:N,children:Z}),Z]})}function A5(J){let Q=D.useRef(null);if(!Q.current)Q.current=J();return D.useInsertionEffect(()=>{return()=>{var Z;return(Z=Q.current)==null?void 0:Z.destroy()}},[]),Q.current}function D$(){return D.useContext(M9)}function C$(J){var Q;let Z=(Q=D$())!=null?Q:void 0,[$]=D.useState(()=>J(Z));if($.manager!==Z)$.manager=Z;return NQ($.register,[Z,$]),$}function AH(J){let{disabled:Q,data:Z,element:$,handle:q,id:Y,modifiers:H,sensors:K,plugins:X}=J,B=C$((W)=>new IZ(R$(O$({},J),{register:!1,handle:BQ(q),element:BQ($)}),W)),N=w0(B,I5);return a(Y,()=>B.id=Y),A0(q,(W)=>B.handle=W),A0($,(W)=>B.element=W),a(Z,()=>Z&&(B.data=Z)),a(Q,()=>B.disabled=Q===!0),a(K,()=>B.sensors=K),a(H,()=>B.modifiers=H,void 0,EJ),a(X,()=>B.plugins=X,void 0,EJ),a(J.alignment,()=>B.alignment=J.alignment),{draggable:N,get isDragging(){return N.isDragging},get isDropping(){return N.isDropping},get isDragSource(){return N.isDragSource},handleRef:D.useCallback((W)=>{B.handle=W!=null?W:void 0},[B]),ref:D.useCallback((W)=>{var G,L;if(!W&&((G=B.element)==null?void 0:G.isConnected)&&!((L=B.manager)==null?void 0:L.dragOperation.status.idle))return;B.element=W!=null?W:void 0},[B])}}function I5(J,Q,Z){if(J==="isDragSource"&&!Z&&Q)return!0;return!1}function IH({children:J,className:Q,dropAnimation:Z,style:$,tag:q,disabled:Y}){var H;let K=D.useRef(null),X=D$(),B=(H=w$(()=>X==null?void 0:X.dragOperation.source,[X]).value)!=null?H:null,N=typeof Y==="function"?Y(B):Y;D.useEffect(()=>{if(!K.current||!X||N)return;let L=X.plugins.find((F)=>F instanceof F0);if(!L)return;return L.overlay=K.current,()=>{L.overlay=void 0}},[X,N]),D.useEffect(()=>{if(!X)return;let L=X.plugins.find((F)=>F instanceof F0);if(!L)return;return L.dropAnimation=Z,()=>{L.dropAnimation=void 0}},[X,Z]);let W=D.useMemo(()=>{if(!X)return null;let L=new Proxy(X.registry,{get(F,z){if(z==="register"||z==="unregister")return j5;return F[z]}});return new Proxy(X,{get(F,z){if(z==="registry")return L;return F[z]}})},[X]);return TJ(M9.Provider,{value:W,children:D.createElement(q||"div",{ref:K,className:Q,style:$,"data-dnd-overlay":!0},G())});function G(){if(!B||N)return null;if(typeof J==="function")return TJ(O5,{source:B,children:J});return J}}function j5(){return()=>{}}function O5({children:J,source:Q}){return J(w0(Q))}var{create:R5,defineProperty:T$,getOwnPropertyDescriptor:D5}=Object,P$=(J,Q)=>(Q=Symbol[J])?Q:Symbol.for("Symbol."+J),O0=(J)=>{throw TypeError(J)},C5=(J,Q,Z)=>(Q in J)?T$(J,Q,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[Q]=Z,T5=(J)=>{var Q;return[,,,R5((Q=J==null?void 0:J[P$("metadata")])!=null?Q:null)]},E$=["class","method","getter","setter","accessor","field","value","get","set"],S$=(J)=>J!==void 0&&typeof J!=="function"?O0("Function expected"):J,P5=(J,Q,Z,$,q)=>({kind:E$[J],name:Q,metadata:$,addInitializer:(Y)=>Z._?O0("Already initialized"):q.push(S$(Y||null))}),E5=(J,Q)=>C5(Q,P$("metadata"),J[3]),S5=(J,Q,Z,$)=>{for(var q=0,Y=J[Q>>1],H=Y&&Y.length;q<H;q++)Y[q].call(Z);return $},k$=(J,Q,Z,$,q,Y)=>{var H,K,X,B,N=Q&7,W=!1,G=!1,L=2,F=E$[N+5],z=J[L]||(J[L]=[]),A=(q=q.prototype,D5(q,Z));for(var I=$.length-1;I>=0;I--)X=P5(N,Z,K={},J[3],z),X.static=W,X.private=G,B=X.access={has:(U)=>(Z in U)},B.get=(U)=>U[Z],H=(0,$[I])(A[F],X),K._=1,S$(H)&&(A[F]=H);return A&&T$(q,Z,A),q},x$=(J,Q,Z)=>Q.has(J)||O0("Cannot "+Z),k5=(J,Q,Z)=>(x$(J,Q,"read from private field"),Q.get(J)),x5=(J,Q,Z)=>Q.has(J)?O0("Cannot add the same private member more than once"):Q instanceof WeakSet?Q.add(J):Q.set(J,Z),h5=(J,Q,Z,$)=>(x$(J,Q,"write to private field"),Q.set(J,Z),Z),LQ=class J{constructor(Q,Z){this.x=Q,this.y=Z}static delta(Q,Z){return new J(Q.x-Z.x,Q.y-Z.y)}static distance(Q,Z){return Math.hypot(Q.x-Z.x,Q.y-Z.y)}static equals(Q,Z){return Q.x===Z.x&&Q.y===Z.y}static from({x:Q,y:Z}){return new J(Q,Z)}},h$,y$,z9,I0,jZ,w9=class extends(z9=jJ,y$=[h],h$=[h],z9){constructor(J){let Q=LQ.from(J);super(Q,(Z,$)=>LQ.equals(Z,$));S5(jZ,5,this),x5(this,I0,0),this.velocity={x:0,y:0}}get delta(){return LQ.delta(this.current,this.initial)}get direction(){let{current:J,previous:Q}=this;if(!Q)return null;let Z={x:J.x-Q.x,y:J.y-Q.y};if(!Z.x&&!Z.y)return null;if(Math.abs(Z.x)>Math.abs(Z.y))return Z.x>0?"right":"left";return Z.y>0?"down":"up"}get current(){return super.current}set current(J){let{current:Q}=this,Z=LQ.from(J),$={x:Z.x-Q.x,y:Z.y-Q.y},q=Date.now(),Y=q-k5(this,I0),H=(K)=>Math.round(K/Y*100);JJ(()=>{h5(this,I0,q),this.velocity={x:H($.x),y:H($.y)},super.current=Z})}reset(J=this.defaultValue){super.reset(LQ.from(J)),this.velocity={x:0,y:0}}};jZ=T5(z9);I0=new WeakMap;k$(jZ,2,"delta",y$,w9);k$(jZ,2,"direction",h$,w9);E5(jZ,w9);var f$=((J)=>{return J.Horizontal="x",J.Vertical="y",J})(f$||{});Object.values(f$);var y5=({dragOperation:J,droppable:Q})=>{let Z=J.position.current;if(!Z)return null;let{id:$}=Q;if(!Q.shape)return null;if(Q.shape.containsPoint(Z)){let q=LQ.distance(Q.shape.center,Z);return{id:$,value:1/q,type:RJ.PointerIntersection,priority:OJ.High}}return null},f5=({dragOperation:J,droppable:Q})=>{let{shape:Z}=J;if(!Q.shape||!(Z==null?void 0:Z.current))return null;let $=Z.current.intersectionArea(Q.shape);if($){let{position:q}=J,Y=LQ.distance(Q.shape.center,q.current),K=$/(Z.current.area+Q.shape.area-$)/Y;return{id:Q.id,value:K,type:RJ.ShapeIntersection,priority:OJ.Normal}}return null},v5=(J)=>{var Q;return(Q=y5(J))!=null?Q:f5(J)};function jH(J){let{collisionDetector:Q,data:Z,disabled:$,element:q,id:Y,accept:H,type:K}=J,X=C$((N)=>new M0(R$(O$({},J),{register:!1,element:BQ(q)}),N)),B=w0(X);return a(Y,()=>X.id=Y),A0(q,(N)=>X.element=N),a(H,()=>X.accept=H,void 0,EJ),a(Q,()=>X.collisionDetector=Q!=null?Q:v5),a(Z,()=>Z&&(X.data=Z)),a($,()=>X.disabled=$===!0),a(K,()=>X.type=K),{droppable:B,get isDropTarget(){return B.isDropTarget},ref:D.useCallback((N)=>{var W,G;if(!N&&((W=X.element)==null?void 0:W.isConnected)&&!((G=X.manager)==null?void 0:G.dragOperation.status.idle))return;X.element=N!=null?N:void 0},[X])}}
|
|
71
|
-
export{JJ as
|
|
71
|
+
export{JJ as ga,C as ha,o as ia,EJ as ja,T as ka,o5 as la,XJ as ma,EQ as na,$J as oa,z8 as pa,VJ as qa,NJ as ra,iZ as sa,g1 as ta,m1 as ua,DJ as va,T2 as wa,P2 as xa,OK as ya,hJ as za,K0 as Aa,x2 as Ba,gK as Ca,F0 as Da,z0 as Ea,B$ as Fa,bQ as Ga,N$ as Ha,IZ as Ia,M0 as Ja,BQ as Ka,NQ as La,w0 as Ma,NH as Na,a as Oa,A0 as Pa,wH as Qa,C$ as Ra,AH as Sa,IH as Ta,jH as Ua,b5 as Va};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as V}from"./chunk-2g12s6mc.js";import"./chunk-f7sbkfmk.js";import"./chunk-fepymbka.js";import"./chunk-xyjw8w3r.js";import"./chunk-ccw7mjgq.js";import"./chunk-pq18zenh.js";import"./chunk-wsyg4rwg.js";import"./chunk-7e06b2zb.js";import"./chunk-srn8t0v7.js";import"./chunk-kfhtk3eh.js";import"./chunk-kr06nrbx.js";import"./chunk-b8js74jk.js";import"./chunk-0xbf8bcg.js";import{wf as U}from"./chunk-5r8858hx.js";import"./chunk-88fg1sw7.js";import{zf as N}from"./chunk-ry33f2qk.js";import"./chunk-77r8w95d.js";import"./chunk-t3t6021k.js";import"./chunk-54tr7y2x.js";import"./chunk-1xpec5r8.js";import"./chunk-0rxhc7ka.js";import"./chunk-fa2g2wge.js";import"./chunk-fz88kkk1.js";import"./chunk-dghtwyq1.js";import{bh as K}from"./chunk-gswbc6y9.js";import{Gh as H,Sh as J,mh as Z,oh as q,th as D,uh as G}from"./chunk-nyhqy6q2.js";import{Vk as Y}from"./chunk-0qkj838r.js";var W=Y(Z(),1);function _(){let{projectId:h}=$.useParams(),{teamId:v,ensureTeamIdForProject:w}=K();W.useEffect(()=>{w(h)},[h,w]);let{data:A}=G(U(h)),b=A?.rootFolder,{data:X}=D({queryKey:["folders",b],queryFn:async()=>{let B=await J.api.folders[":folderId"].$get({param:{folderId:b}});if(!B.ok)throw Error("failed to fetch folder");return await B.json()},enabled:!!b});if(!v||!b||!X)return q(N,{});return q(V,{teamId:v,projectId:h,projectName:A.name??"",assetId:b,rootFolderId:b})}var $=H("/projects/$projectId/")({component:_});export{$ as Route};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{S as
|
|
1
|
+
import{Lh as Z,mh as W,oh as b,ph as Y}from"./chunk-nyhqy6q2.js";import{Vk as R}from"./chunk-0qkj838r.js";var r=Z((u)=>({uploading:0,tasks:{},fileProgress:{},increment:()=>u((d)=>({uploading:d.uploading+1})),decrement:()=>u((d)=>({uploading:d.uploading-1})),startTask:(d,k,F)=>u((o)=>{let l={},s=0;F.forEach((f)=>{l[f.fileId]={fileId:f.fileId,name:f.name,loaded:0,total:f.size,status:"uploading"},s+=f.size});let g={...o.tasks,[d]:{taskId:d,name:k,loaded:0,total:s,files:l}},P={...o.fileProgress};return F.forEach((f)=>{P[f.fileId]=l[f.fileId]}),{tasks:g,fileProgress:P}}),updateFileProgress:(d,k,F)=>u((o)=>{let l=o.tasks[d];if(!l)return{};let s=l.files[k];if(!s)return{};let g={...s,loaded:F},P={...l.files,[k]:g},f=Object.values(P).reduce((p,w)=>p+w.loaded,0);return{tasks:{...o.tasks,[d]:{...l,loaded:f,files:P}},fileProgress:{...o.fileProgress,[k]:g}}}),completeFile:(d,k)=>u((F)=>{let o=F.tasks[d];if(!o)return{};let l=o.files[k];if(!l)return{};let s={...l,status:"completed",loaded:l.total},g={...o.files,[k]:s},P=Object.values(g).reduce((f,p)=>f+p.loaded,0);return{tasks:{...F.tasks,[d]:{...o,loaded:P,files:g}},fileProgress:{...F.fileProgress,[k]:s}}}),failFile:(d,k)=>u((F)=>{let o=F.tasks[d];if(!o)return{};let l=o.files[k];if(!l)return{};let s={...l,status:"failed"},g={...o.files,[k]:s},P=Object.values(g).reduce((f,p)=>f+p.loaded,0);return{tasks:{...F.tasks,[d]:{...o,loaded:P,files:g}},fileProgress:{...F.fileProgress,[k]:s}}})}));var a=R(W(),1);var q=10,Q=10,$=q*Q,S=({spriteUrl:u,thumbnailUrl:d,videoWidth:k,videoHeight:F,className:o=""})=>{let l=a.useRef(null),[s,g]=a.useState({width:0,height:0}),[P,f]=a.useState({width:0,height:0}),[p,w]=a.useState(!1),[c,E]=a.useState(!1),[V,J]=a.useState(!1),[K,N]=a.useState(0),[j,n]=a.useState(0);a.useEffect(()=>{if(!l.current)return;let t=new ResizeObserver((m)=>{for(let B of m)g({width:B.contentRect.width,height:B.contentRect.height})});return t.observe(l.current),()=>t.disconnect()},[]);let X=a.useCallback(()=>{if(c||V)return;J(!0);let t=new Image;t.src=u,t.onload=()=>{f({width:t.naturalWidth,height:t.naturalHeight}),E(!0),J(!1)},t.onerror=()=>{console.error("Failed to load sprite image"),J(!1)}},[u,c,V]),M=()=>{w(!0),X()},A=()=>{w(!1)},D=(t)=>{if(!l.current)return;let m=l.current.getBoundingClientRect(),B=t.clientX-m.left,y=Math.max(0,Math.min(B,m.width));n(y);let T=y/m.width,U=Math.min(Math.floor(T*$),$-1);N(U)},G=a.useMemo(()=>{if(s.width===0||s.height===0)return{};let t=k/F;if(P.width>0&&P.height>0){let z=P.width/q,i=P.height/Q;t=z/i}let m=s.width/s.height,B,y;if(m>t)y=s.height,B=y*t;else B=s.width,y=B/t;let T=Math.ceil(B),U=Math.ceil(y),I=T*q,O=U*Q,v=K%q,x=Math.floor(K/q),C=-(v*T),_=-(x*U);return{backgroundImage:`url(${u})`,backgroundSize:`${I}px ${O}px`,backgroundPosition:`${C}px ${_}px`,backgroundRepeat:"no-repeat",width:`${T}px`,height:`${U}px`,imageRendering:"auto"}},[s,k,F,K,u,P]);return Y("div",{ref:l,className:`relative w-full h-full overflow-hidden cursor-crosshair group bg-black select-none ${o}`,onMouseEnter:M,onMouseLeave:A,onMouseMove:D,children:[b("img",{src:d,alt:"Thumbnail",className:`absolute inset-0 w-full h-full object-contain transition-opacity duration-200 ${p&&c?"opacity-0":"opacity-100"}`,draggable:!1}),p&&!c&&b("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 z-10",children:b("div",{className:"w-6 h-6 border-2 border-white/30 border-t-white rounded-full animate-spin"})}),c&&b("div",{className:`absolute inset-0 flex items-center justify-center transition-opacity duration-75 ${p?"opacity-100":"opacity-0"}`,children:b("div",{style:G})}),p&&b("div",{className:"absolute top-0 bottom-0 w-0.5 bg-red-500 shadow-[0_0_4px_rgba(255,0,0,0.8)] z-20 pointer-events-none",style:{transform:`translateX(${j}px)`}})]})};
|
|
2
|
+
export{S as eg,r as fg};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Rb as $Q}from"./chunk-891h8br6.js";import{Ub as c,Vb as XQ,Wb as l}from"./chunk-e3s3rz2e.js";import"./chunk-3rmc8nz6.js";import{Yb as VQ}from"./chunk-s1n39qte.js";import{Zb as g}from"./chunk-9avkn3x1.js";import{ec as GQ,fc as FQ}from"./chunk-w88219ex.js";import{hc as YQ}from"./chunk-2dsmsa6a.js";import"./chunk-ta7bfdrn.js";import{lc as u}from"./chunk-pxw97qbq.js";import{ke as NQ}from"./chunk-8qg47kj6.js";import{le as x,me as JQ,ne as zQ}from"./chunk-c45rh4hk.js";import"./chunk-ybhgmvxa.js";import{af as ZQ}from"./chunk-q09dfja5.js";import{bf as QQ}from"./chunk-d2vxmn9v.js";import"./chunk-bs0fjz3w.js";import"./chunk-0qkj838r.js";function i(Q){let $=Q.filter((G)=>G!==void 0);if($.length===0)return{cleanup:()=>{}};if($.length===1)return{signal:$[0],cleanup:()=>{}};let Z=new AbortController,Y=[],F=(G)=>{if(!Z.signal.aborted)Z.abort(G.reason)};for(let G of $){if(G.aborted){F(G);break}let V=()=>F(G);G.addEventListener("abort",V,{once:!0}),Y.push({signal:G,listener:V})}return{signal:Z.signal,cleanup:()=>{for(let{signal:G,listener:V}of Y)G.removeEventListener("abort",V)}}}var PQ={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function v(Q,$){let Z=Q.toLowerCase(),Y=Q.toUpperCase();return $?.[Z]||$?.[Y]||g(Z)||g(Y)||""}function AQ(Q){if(Q instanceof URL)return Q;try{return new URL(Q)}catch{return}}function UQ(Q,$,Z){let Y=v("no_proxy",Z).toLowerCase();if(!Y)return!0;if(Y==="*")return!1;return Y.split(/[,\s]/).every((F)=>{if(!F)return!0;let G=F.match(/^(.+):(\d+)$/),V=G?G[1]:F,j=G?Number.parseInt(G[2],10):0;if(j&&j!==$)return!0;if(!/^[.*]/.test(V))return Q!==V;if(V.startsWith("*"))V=V.slice(1);return!Q.endsWith(V)})}function wQ(Q,$){let Z=AQ(Q);if(!Z?.protocol||!Z.host)return"";let Y=Z.protocol.split(":",1)[0],F=Z.host.replace(/:\d*$/,""),G=Number.parseInt(Z.port,10)||PQ[Y]||0;if(!UQ(F,G,$))return"";let V=v(`${Y}_proxy`,$)||v("all_proxy",$);if(V&&!V.includes("://"))V=`${Y}://${V}`;return V}var CQ="Unsupported proxy protocol. SOCKS and PAC proxy URLs are not supported; use an HTTP or HTTPS proxy URL.";function a(Q,$){let Z=wQ(Q,$);if(!Z)return;let Y;try{Y=new URL(Z)}catch(F){throw Error(`Invalid proxy URL ${JSON.stringify(Z)}: ${F instanceof Error?F.message:String(F)}`)}if(Y.protocol!=="http:"&&Y.protocol!=="https:")throw Error(`${CQ} Got ${Y.protocol}`);return Y}function EQ(){if(typeof process>"u"||!(process.versions?.node||process.versions?.bun))return null;return process.getBuiltinModule?.("node:os")??null}var T=EQ(),fQ="https://chatgpt.com/backend-api",MQ="https://api.openai.com/auth",SQ=0,n=1000,TQ=60000,hQ=15000,IQ=3,jQ=new Set(["openai","openai-codex","opencode"]),xQ=1009,kQ="websocket_connection_limit_reached",bQ=new Set(["completed","incomplete","failed","cancelled","queued","in_progress"]);function gQ(Q){return/GoUsageLimitError|FreeUsageLimitError|Monthly usage limit reached|available balance|insufficient_quota|out of budget|quota exceeded|billing/i.test(Q)}function vQ(Q,$){if(Q===429&&gQ($))return!1;if(Q===429||Q===500||Q===502||Q===503||Q===504)return!0;return/rate.?limit|overloaded|service.?unavailable|upstream.?connect|connection.?refused/i.test($)}function yQ(Q){let $=Q.get("retry-after-ms");if($!==null){let G=Number($);if(Number.isFinite(G))return Math.max(0,G)}let Z=Q.get("retry-after");if(!Z)return;let Y=Number(Z);if(Number.isFinite(Y))return Math.max(0,Y*1000);let F=Date.parse(Z);if(!Number.isNaN(F))return Math.max(0,F-Date.now());return}function mQ(Q,$){let Z=$?.maxRetryDelayMs??TQ;return Z>0?Math.min(Q,Z):Q}function r(Q,$){return new Promise((Z,Y)=>{if($?.aborted){Y(Error("Request was aborted"));return}let F=setTimeout(Z,Q);$?.addEventListener("abort",()=>{clearTimeout(F),Y(Error("Request was aborted"))})})}function t(Q){if(Q===void 0)return;if(!Number.isFinite(Q)||Q<0)throw Error(`Invalid timeoutMs: ${String(Q)}`);return Math.floor(Q)}function uQ(){if(typeof process>"u"||!(process.versions?.node||process.versions?.bun))return null;return process.getBuiltinModule?.("node:zlib")??null}function cQ(Q){let $=uQ();if(!$||typeof $.zstdCompressSync!=="function")return null;try{let Z=$.zstdCompressSync(Q,{params:{[$.constants.ZSTD_c_compressionLevel]:IQ}});return new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength)}catch{return null}}var lQ=(Q,$,Z)=>{let Y=new QQ;return(async()=>{let F={role:"assistant",content:[],api:"openai-codex-responses",provider:Q.provider,model:Q.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let G=Z?.apiKey;if(!G)throw Error(`No API key for provider: ${Q.provider}`);let V=qZ(G),j=pQ(Q,$,Z),N=await Z?.onPayload?.(j,Q);if(N!==void 0)j=N;let X=Z?.sessionId||_Z(),W=OZ(Q.headers,Z?.headers,V,G,Z?.sessionId),J=RZ(Q.headers,Z?.headers,V,G,X),_=JSON.stringify(j),z=t(Z?.timeoutMs),q=t(Z?.websocketConnectTimeoutMs),D=Z?.transport||"auto",B=D!=="sse"&&BQ(Z?.sessionId);if(B)s(Z?.sessionId);if(D!=="sse"&&!B){let O=!1,H=!1;while(!0){O=!1;try{if(await WZ(iQ(Q.baseUrl),j,J,F,Y,Q,()=>{O=!0},z,q,Z),Z?.signal?.aborted)throw Error("Request was aborted");Y.push({type:"done",reason:F.stopReason,message:F}),Y.end();return}catch(A){let C=Z?.signal?.aborted,S=!O&&rQ(A);if(!C&&S&&!H){H=!0;continue}if(C||nQ(A)&&!S)throw A;if(zQ(F,JQ("provider_transport_failure",A,{configuredTransport:D,fallbackTransport:O?void 0:"sse",eventsEmitted:O,phase:O?"after_message_stream_start":"before_message_stream_start",requestBytes:new TextEncoder().encode(_).byteLength})),YZ(Z?.sessionId,A),O)throw A;s(Z?.sessionId);break}}}let R=cQ(_);if(R)W.set("content-encoding","zstd");let K=R??_,L,w,b=Z?.maxRetries??SQ;for(let O=0;O<=b;O++){if(Z?.signal?.aborted)throw Error("Request was aborted");try{let H=z!==void 0&&z>0?AbortSignal.timeout(z):void 0,A=i([Z?.signal,H]);try{L=await fetch(DQ(Q.baseUrl),{method:"POST",headers:W,body:K,signal:A.signal})}catch(E){if(H?.aborted&&!Z?.signal?.aborted)throw Error(`Codex SSE response headers timed out after ${z}ms`);throw E}finally{A.cleanup()}if(await Z?.onResponse?.({status:L.status,headers:u(L.headers)},Q),L.ok)break;let C=await L.text();if(O<b&&vQ(L.status,C)){let E=yQ(L.headers),HQ=E===void 0?n*2**O:L.status===429?mQ(E,Z):E;await r(HQ,Z?.signal);continue}let S=new Response(C,{status:L.status,statusText:L.statusText}),d=await BZ(S);throw Error(d.friendlyMessage||d.message)}catch(H){if(H instanceof Error){if(H.name==="AbortError"||H.message==="Request was aborted")throw Error("Request was aborted")}if(w=H instanceof Error?H:Error(String(H)),O<b&&!w.message.includes("usage limit")){let A=n*2**O;await r(A,Z?.signal);continue}throw w}}if(!L?.ok)throw w??Error("Failed after retries");if(!L.body)throw Error("No response body");if(Y.push({type:"start",partial:F}),await aQ(L,F,Y,Q,Z),Z?.signal?.aborted)throw Error("Request was aborted");Y.push({type:"done",reason:F.stopReason,message:F}),Y.end()}catch(G){for(let V of F.content)delete V.partialJson;F.stopReason=Z?.signal?.aborted?"aborted":"error",F.errorMessage=FQ(GQ(G)),Y.push({type:"error",reason:F.stopReason,error:F}),Y.end()}})(),Y},bZ=(Q,$,Z)=>{let Y=Z?.apiKey;if(!Y)throw Error(`No API key for provider: ${Q.provider}`);let F=YQ(Q,$,Z,Y),G=Z?.reasoning?ZQ(Q,Z.reasoning):void 0;return lQ(Q,$,{...F,reasoningEffort:G==="off"?void 0:G})};function pQ(Q,$,Z){let Y=$Q($,Q.compat?.supportsToolSearch??!1),F=c(Q,$,jQ,{includeSystemPrompt:!1,deferredTools:Y.deferred}),G={model:Q.id,store:!1,stream:!0,instructions:$.systemPrompt||"You are a helpful assistant.",input:F,text:{verbosity:Z?.textVerbosity||"low"},include:["reasoning.encrypted_content"],prompt_cache_key:VQ(Z?.sessionId),tool_choice:Z?.toolChoice??"auto",parallel_tool_calls:!0};if(Z?.temperature!==void 0)G.temperature=Z.temperature;if(Z?.serviceTier!==void 0)G.service_tier=Z.serviceTier;if(Y.immediate.length>0)G.tools=XQ(Y.immediate,{strict:null});if(Z?.reasoningEffort!==void 0){let V=Z.reasoningEffort==="none"?Q.thinkingLevelMap?.off??"none":Q.thinkingLevelMap?.[Z.reasoningEffort]??Z.reasoningEffort;if(V!==null)G.reasoning={effort:V,summary:Z.reasoningSummary??"auto"}}return G}function dQ(Q,$){switch($){case"flex":return 0.5;case"priority":return Q.id==="gpt-5.5"?2.5:2;default:return 1}}function KQ(Q,$,Z){let Y=dQ(Z,$);if(Y===1)return;Q.cost.input*=Y,Q.cost.output*=Y,Q.cost.cacheRead*=Y,Q.cost.cacheWrite*=Y,Q.cost.total=Q.cost.input+Q.cost.output+Q.cost.cacheRead+Q.cost.cacheWrite}function LQ(Q,$){if(Q==="default"&&($==="flex"||$==="priority"))return $;return Q??$}function DQ(Q){let Z=(Q&&Q.trim().length>0?Q:fQ).replace(/\/+$/,"");if(Z.endsWith("/codex/responses"))return Z;if(Z.endsWith("/codex"))return`${Z}/responses`;return`${Z}/codex/responses`}function iQ(Q){let $=new URL(DQ(Q));if($.protocol==="https:")$.protocol="wss:";if($.protocol==="http:")$.protocol="ws:";return $.toString()}async function aQ(Q,$,Z,Y,F){await l(WQ(oQ(Q,F?.signal)),$,Z,Y,{serviceTier:F?.serviceTier,resolveServiceTier:LQ,applyServiceTierPricing:(G,V)=>KQ(G,V,Y)})}class f extends Error{code;payload;constructor(Q,$){super(Q);this.name="CodexApiError",this.code=$?.code,this.payload=$?.payload,this.cause=$?.cause}}class k extends Error{payload;constructor(Q,$){super(Q);this.name="CodexProtocolError",this.payload=$?.payload,this.cause=$?.cause}}function nQ(Q){return Q instanceof f||Q instanceof k}function rQ(Q){return Q instanceof f&&Q.code===kQ}function tQ(Q){let $=Q.error&&typeof Q.error==="object"?Q.error:void 0;return{code:typeof Q.code==="string"?Q.code:typeof $?.code==="string"?$.code:void 0,message:typeof Q.message==="string"?Q.message:typeof $?.message==="string"?$.message:void 0}}async function*WQ(Q){for await(let $ of Q){let Z=typeof $.type==="string"?$.type:void 0;if(!Z)continue;if(Z==="error"){let{code:Y,message:F}=tQ($);throw new f(`Codex error: ${F||Y||JSON.stringify($)}`,{code:Y,payload:$})}if(Z==="response.failed"){let Y=$.response,F=Y?.error?.code,G=Y?.error?.message;throw new f(G||"Codex response failed",{code:F,payload:$})}if(Z==="response.done"||Z==="response.completed"||Z==="response.incomplete"){let Y=$.response,F=Y?{...Y,status:sQ(Y.status)}:Y;yield{...$,type:"response.completed",response:F};return}yield $}}function sQ(Q){if(typeof Q!=="string")return;return bQ.has(Q)?Q:void 0}async function*oQ(Q,$){if(!Q.body)return;let Z=Q.body.getReader(),Y=new TextDecoder,F="",G=()=>{Z.cancel().catch(()=>{})};$?.addEventListener("abort",G,{once:!0});try{while(!0){if($?.aborted)throw Error("Request was aborted");let{done:V,value:j}=await Z.read();if($?.aborted)throw Error("Request was aborted");if(V)break;F+=Y.decode(j,{stream:!0});let N=F.indexOf(`
|
|
3
|
+
|
|
4
|
+
`);while(N!==-1){let X=F.slice(0,N);F=F.slice(N+2);let W=X.split(`
|
|
5
|
+
`).filter((J)=>J.startsWith("data:")).map((J)=>J.slice(5).trim());if(W.length>0){let J=W.join(`
|
|
6
|
+
`).trim();if(J&&J!=="[DONE]")try{yield JSON.parse(J)}catch(_){throw new k(`Invalid Codex SSE JSON: ${x(_)}`,{cause:_,payload:J})}}N=F.indexOf(`
|
|
7
|
+
|
|
8
|
+
`)}}}finally{$?.removeEventListener("abort",G);try{await Z.cancel()}catch{}try{Z.releaseLock()}catch{}}}var eQ="responses_websockets=2026-02-06",QZ=300000,ZZ=3300000,P=new Map,M=new Map,I=new Set;function p(Q){let $=M.get(Q);if(!$)$={requests:0,connectionsCreated:0,connectionsReused:0,cachedContextRequests:0,storeTrueRequests:0,fullContextRequests:0,deltaRequests:0,lastInputItems:0,websocketFailures:0,sseFallbacks:0},M.set(Q,$);return $}function gZ(Q){let $=M.get(Q);return $?{...$}:void 0}function vZ(Q){if(Q){M.delete(Q),I.delete(Q);return}M.clear(),I.clear()}function $Z(Q){let $=(Z)=>{if(Z.idleTimer)clearTimeout(Z.idleTimer);U(Z.socket,1000,"debug_close")};if(Q){let Z=P.get(Q);if(Z)$(Z);P.delete(Q);return}for(let Z of P.values())$(Z);P.clear()}NQ($Z);function BQ(Q){return Q?I.has(Q):!1}function s(Q){if(!Q)return;let $=p(Q);$.sseFallbacks++,$.websocketFallbackActive=BQ(Q)}function YZ(Q,$){if(!Q)return;I.add(Q);let Z=p(Q);Z.websocketFailures++,Z.lastWebSocketError=x($),Z.websocketFallbackActive=!0}var y=null;async function GZ(Q){if(!Q&&y)return y;if(typeof process<"u"&&process.versions?.bun){let Z=class extends WebSocket{constructor(Y,F){let G={};if(Array.isArray(F)||typeof F==="string")G={protocols:F};else G={...F};let V=a(Y.toString().replace(/^wss:/,"https:").replace(/^ws:/,"http:"),Q);super(Y,{...G,...V?{proxy:V.toString()}:{}})}};if(!Q)y=Z;return Z}let $=globalThis.WebSocket;if(typeof $!=="function")return null;return $}class qQ extends Error{code;reason;wasClean;constructor(Q,$){super(Q);this.name="WebSocketCloseError",this.code=$?.code,this.reason=$?.reason,this.wasClean=$?.wasClean}}function FZ(Q){let $=Q.readyState;return typeof $==="number"?$:void 0}function h(Q){let $=FZ(Q);return $===void 0||$===1}function VZ(Q){return Date.now()-Q.createdAt>=ZZ}function U(Q,$=1000,Z="done"){try{Q.close($,Z)}catch{}}function o(Q,$){if($.idleTimer)clearTimeout($.idleTimer);$.idleTimer=setTimeout(()=>{if($.busy)return;U($.socket,1000,"idle_timeout"),P.delete(Q)},QZ)}async function m(Q,$,Z,Y=hQ,F){let G=await GZ(F);if(!G)throw Error("WebSocket transport is not available in this runtime");let V=u($);return delete V["OpenAI-Beta"],new Promise((j,N)=>{let X=!1,W,J;try{J=new G(Q,{headers:V})}catch(K){N(K instanceof Error?K:Error(String(K)));return}let _=()=>{if(W)clearTimeout(W),W=void 0;J.removeEventListener("open",q),J.removeEventListener("error",D),J.removeEventListener("close",B),Z?.removeEventListener("abort",R)},z=(K,L)=>{if(X)return;if(X=!0,_(),L)U(J,1000,L);N(K)},q=()=>{if(X)return;X=!0,_(),j(J)},D=(K)=>{z(_Q(K))},B=(K)=>{z(OQ(K))},R=()=>{z(Error("Request was aborted"),"aborted")};if(J.addEventListener("open",q),J.addEventListener("error",D),J.addEventListener("close",B),Z?.addEventListener("abort",R),Y>0)W=setTimeout(()=>{z(Error(`WebSocket connect timeout after ${Y}ms`),"connect_timeout")},Y);if(Z?.aborted)R()})}async function XZ(Q,$,Z,Y,F,G){if(!Z){let X=await m(Q,$,Y,F,G);return{socket:X,reused:!1,release:()=>U(X)}}let V=P.get(Z);if(V){if(V.idleTimer)clearTimeout(V.idleTimer),V.idleTimer=void 0;if(!V.busy&&VZ(V))U(V.socket,1000,"connection_age_limit"),P.delete(Z);else if(!V.busy&&h(V.socket))return V.busy=!0,{socket:V.socket,entry:V,reused:!0,release:({keep:X}={})=>{if(!X||!h(V.socket)){U(V.socket),P.delete(Z);return}V.busy=!1,o(Z,V)}};if(V.busy){let X=await m(Q,$,Y,F,G);return{socket:X,reused:!1,release:()=>{U(X)}}}if(!h(V.socket))U(V.socket),P.delete(Z)}let j=await m(Q,$,Y,F,G),N={socket:j,busy:!0,createdAt:Date.now()};return P.set(Z,N),{socket:j,entry:N,reused:!1,release:({keep:X}={})=>{if(!X||!h(N.socket)){if(U(N.socket),N.idleTimer)clearTimeout(N.idleTimer);if(P.get(Z)===N)P.delete(Z);return}N.busy=!1,o(Z,N)}}}function _Q(Q){if(Q&&typeof Q==="object"){let $="message"in Q?Q.message:void 0;if(typeof $==="string"&&$.length>0)return Error($);let Z="error"in Q?Q.error:void 0;if(Z instanceof Error&&Z.message.length>0)return Z;if(Z&&typeof Z==="object"&&"message"in Z){let Y=Z.message;if(typeof Y==="string"&&Y.length>0)return Error(Y)}}return Error("WebSocket error")}function OQ(Q){if(Q&&typeof Q==="object"){let $="code"in Q?Q.code:void 0,Z="reason"in Q?Q.reason:void 0,Y="wasClean"in Q?Q.wasClean:void 0,F=typeof $==="number"?` ${$}`:"",G=typeof Z==="string"&&Z.length>0?` ${Z}`:"";if(!G&&$===xQ)G=" message too big";return new qQ(`WebSocket closed${F}${G}`.trim(),{code:typeof $==="number"?$:void 0,reason:typeof Z==="string"&&Z.length>0?Z:void 0,wasClean:typeof Y==="boolean"?Y:void 0})}return Error("WebSocket closed")}async function NZ(Q){if(typeof Q==="string")return Q;if(Q instanceof ArrayBuffer)return new TextDecoder().decode(new Uint8Array(Q));if(ArrayBuffer.isView(Q)){let $=Q;return new TextDecoder().decode(new Uint8Array($.buffer,$.byteOffset,$.byteLength))}if(Q&&typeof Q==="object"&&"arrayBuffer"in Q){let Z=await Q.arrayBuffer();return new TextDecoder().decode(new Uint8Array(Z))}return null}async function*JZ(Q,$,Z){let Y=[],F=null,G=!1,V=null,j=!1,N=()=>{if(!F)return;let z=F;F=null,z()},X=(z)=>{(async()=>{let q=null;try{if(!z||typeof z!=="object"||!("data"in z))return;if(q=await NZ(z.data),!q)return;let D=JSON.parse(q),B=typeof D.type==="string"?D.type:"";if(B==="response.completed"||B==="response.done"||B==="response.incomplete")j=!0,G=!0;Y.push(D),N()}catch(D){V=new k(`Invalid Codex WebSocket JSON: ${x(D)}`,{cause:D,payload:q}),G=!0,N()}})()},W=(z)=>{V=_Q(z),G=!0,N()},J=(z)=>{if(j){G=!0,N();return}if(!V)V=OQ(z);G=!0,N()},_=()=>{V=Error("Request was aborted"),G=!0,N()};Q.addEventListener("message",X),Q.addEventListener("error",W),Q.addEventListener("close",J),$?.addEventListener("abort",_);try{while(!0){if($?.aborted)throw Error("Request was aborted");if(Y.length>0){yield Y.shift();continue}if(G)break;let z;await new Promise((q,D)=>{if(F=q,Z!==void 0&&Z>0)z=setTimeout(()=>{let B=Error(`WebSocket idle timeout after ${Z}ms`);V=B,G=!0,F=null,U(Q,1000,"idle_timeout"),D(B)},Z)}).finally(()=>{if(z)clearTimeout(z)})}if(V)throw V;if(!j)throw Error("WebSocket stream closed before response.completed")}finally{Q.removeEventListener("message",X),Q.removeEventListener("error",W),Q.removeEventListener("close",J),$?.removeEventListener("abort",_)}}function e(Q){let{input:$,previous_response_id:Z,...Y}=Q;return Y}function zZ(Q,$){return JSON.stringify(Q??[])===JSON.stringify($??[])}function jZ(Q,$){return JSON.stringify(e(Q))===JSON.stringify(e($))}function KZ(Q,$){if(!jZ(Q,$.lastRequestBody))return;let Z=Q.input??[],Y=[...$.lastRequestBody.input??[],...$.lastResponseItems];if(Z.length<Y.length)return;let F=Z.slice(0,Y.length);if(!zZ(F,Y))return;return Z.slice(Y.length)}function LZ(Q,$){let Z=Q.continuation;if(!Z)return $;let Y=KZ($,Z);if(!Y||!Z.lastResponseId)return Q.continuation=void 0,$;return{...$,previous_response_id:Z.lastResponseId,input:Y}}async function*DZ(Q,$,Z,Y){let F=!1;for await(let G of Q){if(!F)F=!0,Y(),Z.push({type:"start",partial:$});yield G}}async function WZ(Q,$,Z,Y,F,G,V,j,N,X){let{socket:W,entry:J,reused:_,release:z}=await XZ(Q,Z,X?.sessionId,X?.signal,N,X?.env),q=!0,D=X?.transport==="websocket-cached"||X?.transport==="auto",B=$,R=D&&J?LZ(J,B):B,K=X?.sessionId?p(X.sessionId):void 0;if(K){if(K.requests++,_)K.connectionsReused++;else K.connectionsCreated++;if(D)K.cachedContextRequests++;if(R.store===!0)K.storeTrueRequests++;if(K.lastInputItems=R.input?.length??0,R.previous_response_id)K.deltaRequests++,K.lastDeltaInputItems=R.input?.length??0,K.lastPreviousResponseId=R.previous_response_id;else K.fullContextRequests++,K.lastDeltaInputItems=void 0,K.lastPreviousResponseId=void 0}try{if(W.send(JSON.stringify({type:"response.create",...R})),await l(DZ(WQ(JZ(W,X?.signal,j)),Y,F,V),Y,F,G,{serviceTier:X?.serviceTier,resolveServiceTier:LQ,applyServiceTierPricing:(L,w)=>KQ(L,w,G)}),X?.signal?.aborted)q=!1;else if(D&&J&&Y.responseId){let L=c(G,{messages:[Y]},jQ,{includeSystemPrompt:!1}).filter((w)=>w.type!=="function_call_output");J.continuation={lastRequestBody:B,lastResponseId:Y.responseId,lastResponseItems:L}}}catch(L){if(J)J.continuation=void 0;throw q=!1,L}finally{z({keep:q})}}async function BZ(Q){let $=await Q.text(),Z=$||Q.statusText||"Request failed",Y;try{let G=JSON.parse($)?.error;if(G){let V=G.code||G.type||"";if(/usage_limit_reached|usage_not_included|rate_limit_exceeded/i.test(V)||Q.status===429){let j=G.plan_type?` (${G.plan_type.toLowerCase()} plan)`:"",N=G.resets_at?Math.max(0,Math.round((G.resets_at*1000-Date.now())/60000)):void 0,X=N!==void 0?` Try again in ~${N} min.`:"";Y=`You have hit your ChatGPT usage limit${j}.${X}`.trim()}Z=G.message||Y||Z}}catch{}return{message:Z,friendlyMessage:Y}}function qZ(Q){try{let $=Q.split(".");if($.length!==3)throw Error("Invalid token");let Y=JSON.parse(atob($[1]))?.[MQ]?.chatgpt_account_id;if(!Y)throw Error("No account ID in token");return Y}catch{throw Error("Failed to extract accountId from token")}}function _Z(){if(typeof globalThis.crypto?.randomUUID==="function")return globalThis.crypto.randomUUID();return`codex_${Date.now()}_${Math.random().toString(36).slice(2,10)}`}function RQ(Q,$,Z,Y){let F=new Headers(Q);for(let[V,j]of Object.entries($||{}))if(j===null)F.delete(V);else F.set(V,j);F.set("Authorization",`Bearer ${Y}`),F.set("chatgpt-account-id",Z),F.set("originator","pi");let G=T?`pi (${T.platform()} ${T.release()}; ${T.arch()})`:"pi (browser)";return F.set("User-Agent",G),F}function OZ(Q,$,Z,Y,F){let G=RQ(Q,$,Z,Y);if(G.set("OpenAI-Beta","responses=experimental"),G.set("accept","text/event-stream"),G.set("content-type","application/json"),F)G.set("session-id",F),G.set("x-client-request-id",F);return G}function RZ(Q,$,Z,Y,F){let G=RQ(Q,$,Z,Y);return G.delete("accept"),G.delete("content-type"),G.delete("OpenAI-Beta"),G.delete("openai-beta"),G.set("OpenAI-Beta",eQ),G.set("x-client-request-id",F),G.set("session-id",F),G}export{bZ as streamSimple,lQ as stream,vZ as resetOpenAICodexWebSocketDebugStats,gZ as getOpenAICodexWebSocketDebugStats,$Z as closeOpenAICodexWebSocketSessions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as U}from"./chunk-2g12s6mc.js";import"./chunk-f7sbkfmk.js";import"./chunk-fepymbka.js";import"./chunk-xyjw8w3r.js";import"./chunk-ccw7mjgq.js";import"./chunk-pq18zenh.js";import"./chunk-wsyg4rwg.js";import"./chunk-7e06b2zb.js";import"./chunk-srn8t0v7.js";import"./chunk-kfhtk3eh.js";import"./chunk-kr06nrbx.js";import"./chunk-b8js74jk.js";import"./chunk-0xbf8bcg.js";import{cf as N}from"./chunk-jf3vn5c3.js";import"./chunk-88fg1sw7.js";import{zf as K}from"./chunk-ry33f2qk.js";import"./chunk-77r8w95d.js";import"./chunk-t3t6021k.js";import"./chunk-54tr7y2x.js";import"./chunk-1xpec5r8.js";import"./chunk-0rxhc7ka.js";import"./chunk-fa2g2wge.js";import"./chunk-fz88kkk1.js";import"./chunk-dghtwyq1.js";import{bh as J}from"./chunk-gswbc6y9.js";import{Gh as G,Sh as H,mh as Z,oh as q,th as B,uh as D}from"./chunk-nyhqy6q2.js";import{Vk as Y}from"./chunk-0qkj838r.js";var V=Y(Z(),1);function _(){let{projectId:h,folderId:W}=z.useParams(),{teamId:v,ensureTeamIdForProject:w}=J();V.useEffect(()=>{w(h)},[h,w]);let{data:A}=D(N(h)),b=A?.rootFolder,{data:X}=B({queryKey:["folders",b],queryFn:()=>(async()=>{return await(await H.api.folders[":folderId"].$get({param:{folderId:b}})).json()})(),enabled:!!b});if(!v||!b||!X)return q(K,{});return q(U,{teamId:v,projectId:h,projectName:A.name??"",assetId:W,rootFolderId:b})}var z=G("/projects/$projectId/folders/$folderId")({component:_});export{z as Route};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-xg9xscqz.js";import{Ac as I,Sc as w}from"./chunk-e7ndw3hg.js";import"./chunk-0aj303as.js";import"./chunk-0qkj838r.js";function R(q,$){if(typeof q==="string"&&typeof $==="string")return q.toLowerCase()===$.toLowerCase();return q===$}function y(q,$){if(typeof q!=="string")return $.includes(q);return $.some((E)=>typeof E==="string"&&q.toLowerCase()===E.toLowerCase())}function j(q,$){return!y(q,$)}function g(q,$){if(typeof q!=="string"||typeof $!=="string")return!1;return q.toLowerCase().includes($.toLowerCase())}function f(q,$){if(typeof q!=="string"||typeof $!=="string")return!1;return q.toLowerCase().startsWith($.toLowerCase())}function V(q,$){if(typeof q!=="string"||typeof $!=="string")return!1;return q.toLowerCase().endsWith($.toLowerCase())}var v=(q,$)=>{let E=null,M=w({config:{adapterId:"memory",adapterName:"Memory Adapter",usePlural:!1,debugLogs:$?.debugLogs||!1,supportsArrays:!0,customTransformInput(P){if(P.options.advanced?.database?.generateId==="serial"&&P.field==="id"&&P.action==="create")return q[P.model].length+1;return P.data},transaction:async(P)=>{let A=structuredClone(q);try{return await P(M(E))}catch(_){throw Object.keys(q).forEach((S)=>{q[S]=A[S]}),_}}},adapter:({getFieldName:P,getDefaultFieldName:A,options:_,getModelName:S})=>{let N=(x,K,Y)=>{if(!K)return x;return x.sort((L,Z)=>{let z=P({model:Y,field:K.field}),D=L[z],X=Z[z],Q=0;if(D==null&&X==null)Q=0;else if(D==null)Q=-1;else if(X==null)Q=1;else if(typeof D==="string"&&typeof X==="string")Q=D.localeCompare(X);else if(D instanceof Date&&X instanceof Date)Q=D.getTime()-X.getTime();else if(typeof D==="number"&&typeof X==="number")Q=D-X;else if(typeof D==="boolean"&&typeof X==="boolean")Q=D===X?0:D?1:-1;else Q=String(D).localeCompare(String(X));return K.direction==="asc"?Q:-Q})};function F(x,K,Y,L){let Z=(()=>{let X=q[K];if(!X)throw I.error(`[MemoryAdapter] Model ${K} not found in the DB`,Object.keys(q)),Error(`Model ${K} not found`);let Q=(G,O)=>{let{field:J,value:H,operator:B,mode:k="sensitive"}=O,U=k==="insensitive"&&(typeof H==="string"||Array.isArray(H)&&H.every((W)=>typeof W==="string"));switch(B){case"in":if(!Array.isArray(H))throw Error("Value must be an array");if(U)return y(G[J],H);return H.includes(G[J]);case"not_in":if(!Array.isArray(H))throw Error("Value must be an array");if(U)return j(G[J],H);return!H.includes(G[J]);case"contains":if(U)return g(G[J],H);return G[J]?.includes(H);case"starts_with":if(U)return f(G[J],H);return G[J].startsWith(H);case"ends_with":if(U)return V(G[J],H);return G[J].endsWith(H);case"ne":return U?!R(G[J],H):G[J]!==H;case"gt":return H!=null&&Boolean(G[J]>H);case"gte":return H!=null&&Boolean(G[J]>=H);case"lt":return H!=null&&Boolean(G[J]<H);case"lte":return H!=null&&Boolean(G[J]<=H);default:if(U)return R(G[J],H);if(H===null)return G[J]==null;return G[J]===H}},T=X.filter((G)=>{if(!x.length||x.length===0)return!0;let O=Q(G,x[0]);for(let J of x){let H=Q(G,J);if(J.connector==="OR")O=O||H;else O=O&&H}return O});if(L?.length&&L.length>0)T=T.map((G)=>Object.fromEntries(Object.entries(G).filter(([O])=>L.includes(A({model:K,field:O})))));return T})();if(!Y)return Z;let z=new Map,D=new Map;for(let X of Z){let Q=String(X.id);if(!z.has(Q)){let G={...X};for(let[O,J]of Object.entries(Y)){let H=S(O);if(J.relation==="one-to-one")G[H]=null;else G[H]=[],D.set(`${Q}-${O}`,new Set)}z.set(Q,G)}let T=z.get(Q);for(let[G,O]of Object.entries(Y)){let J=S(G),H=q[J];if(!H)throw I.error(`[MemoryAdapter] JoinOption model ${J} not found in the DB`,Object.keys(q)),Error(`JoinOption model ${J} not found`);let B=H.filter((k)=>k[O.on.to]===X[O.on.from]);if(O.relation==="one-to-one")T[J]=B[0]||null;else{let k=D.get(`${Q}-${G}`),U=O.limit??100,W=0;for(let C of B){if(W>=U)break;if(!k.has(C.id))T[J].push(C),k.add(C.id),W++}}}}return Array.from(z.values())}return{create:async({model:x,data:K})=>{if(_.advanced?.database?.generateId==="serial")K.id=q[S(x)].length+1;if(!q[x])q[x]=[];return q[x].push(K),K},findOne:async({model:x,where:K,select:Y,join:L})=>{let Z=F(K,x,L,Y);if(L){let z=Z;if(!z.length)return null;return z[0]}return Z[0]||null},findMany:async({model:x,where:K,sortBy:Y,limit:L,select:Z,offset:z,join:D})=>{let X=F(K||[],x,D,Z);if(D){let T=X;if(!T.length)return[];N(T,Y,x);let G=T;if(z!==void 0)G=G.slice(z);if(L!==void 0)G=G.slice(0,L);return G}let Q=N(X,Y,x);if(z!==void 0)Q=Q.slice(z);if(L!==void 0)Q=Q.slice(0,L);return Q||[]},count:async({model:x,where:K})=>{if(K)return F(K,x).length;return q[x].length},update:async({model:x,where:K,update:Y})=>{let L=F(K,x);return L.forEach((Z)=>{Object.assign(Z,Y)}),L[0]||null},delete:async({model:x,where:K})=>{let Y=q[x],L=F(K,x);q[x]=Y.filter((Z)=>!L.includes(Z))},deleteMany:async({model:x,where:K})=>{let Y=q[x],L=F(K,x),Z=0;return q[x]=Y.filter((z)=>{if(L.includes(z))return Z++,!1;return!L.includes(z)}),Z},consumeOne:async({model:x,where:K})=>{let Y=q[x],L=F(K,x)[0];if(!L)return null;return q[x]=Y.filter((Z)=>Z!==L),L},updateMany({model:x,where:K,update:Y}){let L=F(K,x);return L.forEach((Z)=>{Object.assign(Z,Y)}),L[0]||null}}}});return(P)=>{return E=P,M(P)}};export{v as memoryAdapter};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function V(q){if(!(q instanceof Error))return{message:F(q),messageCarriesBody:!1};let w=q,A=I(w),D=K(w),H=D===void 0||q.message.includes(D);return{status:A,body:D,message:q.message,messageCarriesBody:H}}function I(q){if(typeof q.statusCode==="number")return q.statusCode;if(typeof q.status==="number")return q.status;if(typeof q.$metadata?.httpStatusCode==="number")return q.$metadata.httpStatusCode;if(typeof q.$response?.statusCode==="number")return q.$response.statusCode;return}function K(q){let w=P(q);if(w===void 0)return;let A=w.trim();if(A.length===0)return;return Q(A,4000)}function P(q){if(typeof q.body==="string")return q.body;if(G(q.error))return F(q.error);let w=q.$response?.body;if(typeof w==="string")return w;if(G(w))return F(w);return}function G(q){return typeof q==="object"&&q!==null&&Object.keys(q).length>0}function W(q,w){if(q.messageCarriesBody||q.status===void 0||q.body===void 0)return w!==void 0&&q.status!==void 0?`${w} (${q.status}): ${q.message}`:q.message;return w!==void 0?`${w} (${q.status}): ${q.body}`:`${q.status}: ${q.body}`}function Q(q,w){if(q.length<=w)return q;return`${q.slice(0,w)}... [truncated ${q.length-w} chars]`}function F(q){try{let w=JSON.stringify(q);return w===void 0?String(q):w}catch{return String(q)}}
|
|
3
|
+
export{V as ec,W as fc};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{l as
|
|
1
|
+
import{gk as o,oh as a}from"./chunk-nyhqy6q2.js";function l({className:t,...e}){return a("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:a("table",{"data-slot":"table",className:o("w-full caption-bottom text-sm",t),...e})})}function n({className:t,...e}){return a("thead",{"data-slot":"table-header",className:o("[&_tr]:border-b",t),...e})}function c({className:t,...e}){return a("tbody",{"data-slot":"table-body",className:o("[&_tr:last-child]:border-0",t),...e})}function d({className:t,...e}){return a("tr",{"data-slot":"table-row",className:o("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),...e})}function s({className:t,...e}){return a("th",{"data-slot":"table-head",className:o("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}function b({className:t,...e}){return a("td",{"data-slot":"table-cell",className:o("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e})}
|
|
2
|
+
export{l as a,n as b,c,d,s as e,b as f};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Of as Rf,Pf as Lf,Qf as Vf,Rf as Cf,Wf as Hf,Xf as Jf,Yf as Kf,Zf as Qf,_f as Wf,bg as _f}from"./chunk-77r8w95d.js";import{hg as Zf,ig as Gf}from"./chunk-54tr7y2x.js";import{jg as zf}from"./chunk-1xpec5r8.js";import{pg as $f}from"./chunk-fa2g2wge.js";import{$g as l,Rg as Sf,Sg as a,Tg as Nf,Ug as Uf,Vg as W,Yg as qf,Zg as g,_g as p,ah as c,ch as Xf}from"./chunk-gswbc6y9.js";import{Bh as u,Dh as d,Mi as n,Sh as i,Ti as o,Wi as s,Zh as x,_i as ff,gk as D,mk as X,nh as O,oh as f,ph as V,qi as e,vi as j,wi as r}from"./chunk-nyhqy6q2.js";function Yf({teamId:K,projectId:L,projectName:_,ancestorFolders:B,currentAsset:U,isRootFolder:Y,displayStyle:E,onDisplayStyleChange:h,isLeftSidebarCollapsed:P,onLeftSidebarToggle:T,isRightSidebarCollapsed:$,onRightSidebarToggle:v,isChatbotOpen:Z=!1,onChatbotToggle:N,isPublic:Q=!1,onFolderClick:w,fileId:q,shareId:G,downloadInfo:z,versions:S,compareMode:J=!1,canCompareVersions:b=!1,onCompareVersions:A}){let k=u(),{canEdit:y}=Xf(L),I=!1,m=(R)=>{if(!q)return;if(Q&&G){k({to:"/share/$shareId/files/$fileId",params:{shareId:G,fileId:q},search:(C)=>({...C,version:R})});return}if(!L)return;k({to:"/projects/$projectId/files/$fileId",params:{projectId:L,fileId:q},search:(C)=>({...C,version:R})})},M=async(R)=>{if(!q)return;try{let C=G?await i.api.shares[":shareId"].files[":fileId"]["download-url"].$post({param:{shareId:G,fileId:q},json:{key:R}}):await i.api.files["download-url"].$post({json:{key:R,assetId:q}});if(!C.ok)return;let{url:H}=await C.json(),F=document.createElement("a");F.href=H,F.download="",document.body.appendChild(F),F.click(),document.body.removeChild(F)}catch{}},Bf=U.proxyType!=="audio"&&z?.videoTranscodes&&z.videoTranscodes.filter((R)=>!R.isRaw).length>0,Ef=Q?[{name:_,id:"root"},...B.slice().reverse().map((R)=>({name:R.name||"",id:R.id}))]:[{name:X.all_projects(),path:`/teams/${K}`,isMuted:!0},{name:_,path:`/projects/${L}`},...B.slice().reverse().map((R)=>({name:R.name||"",path:`/projects/${L}/folders/${R.id}`}))];return V("div",{className:"flex h-14 flex-wrap items-center justify-between gap-2 border-b border-border bg-card px-4 py-2",children:[V("div",{className:"flex min-w-0 flex-shrink items-center gap-1",children:[Ef.map((R,C)=>V("div",{className:"flex items-center gap-1",children:[C>0&&f("span",{className:"text-muted-foreground",children:"/"}),R.path?f(d,{to:R.path,className:D("truncate rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground",R.isMuted?"text-muted-foreground":"text-foreground"),children:R.name}):f("button",{onClick:()=>R.id&&w?.(R.id),className:"truncate rounded px-2 py-1 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground text-foreground",children:R.name})]},C)),!Y&&!J&&V("div",{className:"flex items-center gap-1",children:[f("span",{className:"text-muted-foreground",children:"/"}),U.type==="folder"?f("span",{className:"truncate rounded px-2 py-1 text-sm font-medium text-foreground",children:U.name}):V(Sf,{children:[V(Nf,{className:"flex items-center gap-1 truncate rounded px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:[f("span",{children:U.name}),U.version!==void 0&&V(zf,{variant:"outline",className:"px-1 py-0 text-xs",children:["v",U.version]}),f(r,{className:"h-4 w-4"})]}),V(Uf,{className:"w-56",children:[Bf?V(p,{children:[f(l,{className:"flex items-center gap-2",children:f("span",{children:X.download()})}),f(a,{children:V(c,{className:"w-48",children:[f(qf,{children:X.download()}),z?.videoTranscodes?.filter((R)=>!R.isRaw).map((R)=>{let C=Math.max(R.width,R.height),H=`${R.height}p`;if(C>=3840)H="2160p";else if(C>=1920)H="1080p";else if(C>=1280)H="720p";else if(C>=960)H="540p";else if(C>=640)H="360p";else if(C>=320)H="180p";return V(W,{onClick:()=>M(R.key),className:"flex items-center justify-between",children:[f("span",{children:H}),f("span",{className:"text-xs text-muted-foreground",children:"MP4"})]},H)}),z?.originalKey&&V(O,{children:[f(g,{}),V(W,{onClick:()=>M(z.originalKey),className:"flex items-center justify-between",children:[f("span",{children:"Original"}),f("span",{className:"text-xs text-muted-foreground",children:U.name?.split(".").pop()?.toUpperCase()||"RAW"})]})]})]})})]}):f(W,{onClick:()=>z?.originalKey&&M(z.originalKey),disabled:!z?.originalKey,children:X.download()}),y&&f(W,{onClick:()=>console.log("Rename"),children:"Rename"}),y&&f(W,{onClick:()=>console.log("Delete"),children:"Delete"}),b&&A&&V(O,{children:[f(g,{}),V(W,{onClick:()=>A(),children:[f(x,{className:"h-4 w-4"}),f("span",{children:X.compare_versions()})]})]}),S&&S.length>0&&V(O,{children:[f(g,{}),V(p,{children:[V(l,{className:"flex items-center gap-2",children:[f(o,{className:"h-4 w-4"}),f("span",{children:"Versions"})]}),f(a,{children:V(c,{className:"w-80 p-1",children:[f("div",{className:"flex flex-col gap-1 max-h-96 overflow-y-auto",children:S.map((R)=>{let C=U.version===R.version;return V(W,{onClick:()=>m(R.id),className:"flex items-center gap-3 py-2 px-3 rounded-md cursor-pointer focus:bg-accent focus:text-accent-foreground",children:[V("div",{className:"flex-shrink-0 flex items-center justify-center bg-muted dark:bg-muted-foreground/20 text-muted-foreground dark:text-muted-foreground rounded-full px-2 py-0.5 text-xs font-semibold select-none min-w-[2rem]",children:["v",R.version]}),f("div",{className:"h-10 w-16 flex-shrink-0 overflow-hidden rounded-md border border-border bg-muted flex items-center justify-center",children:R.previewUrl?f("img",{src:R.previewUrl,alt:R.name||void 0,className:"h-full w-full object-cover"}):f(n,{className:"h-4 w-4 text-muted-foreground"})}),V("div",{className:"flex flex-col flex-1 min-w-0 text-left",children:[f("span",{className:"truncate text-sm font-semibold text-foreground",children:R.name}),f("span",{className:"truncate text-xs text-muted-foreground",children:R.creator?.name||"Unknown"})]}),C&&f(j,{className:"h-4 w-4 text-primary ml-auto flex-shrink-0"})]},R.id)})}),f(g,{}),f("div",{className:"p-1",children:f("button",{className:"w-full text-center text-xs font-medium py-2 px-3 rounded-md bg-muted/80 hover:bg-muted text-foreground transition-colors",onClick:()=>console.log("Manage versions"),children:"Manage versions..."})})]})})]})]})]})]})]})]}),V("div",{className:"flex items-center gap-2",children:[V("div",{className:"flex flex-shrink-0 items-center gap-1 rounded-md border border-border bg-background p-1",children:[!q&&!Q&&T&&f("button",{onClick:T,className:"rounded p-1.5 text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",title:P?"Show Left Sidebar":"Hide Left Sidebar",children:P?f(Hf,{className:"h-4 w-4"}):f(Kf,{className:"h-4 w-4 fill-primary stroke-0"})}),!q&&!Q&&E&&h&&V(O,{children:[f("button",{onClick:()=>h("card"),className:`rounded p-1.5 transition-colors ${E==="card"?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:"Card View",children:f(s,{className:"h-4 w-4"})}),f("button",{onClick:()=>h("list"),className:`rounded p-1.5 transition-colors ${E==="list"?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:"List View",children:f(ff,{className:"h-4 w-4"})})]}),f("button",{onClick:v,className:`rounded p-1.5 transition-colors ${!$&&!Z?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,title:$?"Show Right Sidebar":"Hide Right Sidebar",children:!$&&!Z?f(Qf,{className:"h-4 w-4 fill-primary stroke-0"}):f(Jf,{className:"h-4 w-4"})})]}),!Q&&N&&f(Rf,{children:V(Lf,{children:[f(Vf,{asChild:!0,children:f("span",{children:f("button",{disabled:!1,onClick:N,className:D("h-9 w-9 flex items-center justify-center rounded-full border border-border bg-background transition-colors",Z?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground",!1),children:Z?f(Wf,{className:"h-6 w-6 text-primary transition-colors"}):f(e,{className:"h-6 w-6 text-muted-foreground transition-colors"})})})}),f(Cf,{children:f("p",{children:Z?X.hide_chatbot():X.show_chatbot()})})]})})]})]})}function cf(){let{projectState:K}=Zf(),L=$f(),{isChatbotOpen:_,setIsChatbotOpen:B}=Gf();if(!K)return f(hf,{});let{teamId:U,projectId:Y,projectName:E,ancestorFolders:h,currentAsset:P,isRootFolder:T,fileId:$,downloadInfo:v,versions:Z,isPublic:N,shareId:Q,onFolderClick:w,compareMode:q,canCompareVersions:G,onCompareVersions:z}=K,S=!!$,J=!!Q&&!S,b=S?L.fileViewLeftSidebarCollapsed:J?L.shareConfigLeftSidebarCollapsed:L.fileListLeftSidebarCollapsed,A=N?void 0:()=>S?L.setFileViewLeftSidebarCollapsed(!L.fileViewLeftSidebarCollapsed):J?L.setShareConfigLeftSidebarCollapsed(!L.shareConfigLeftSidebarCollapsed):L.setFileListLeftSidebarCollapsed(!L.fileListLeftSidebarCollapsed),k=N&&K.isRightSidebarCollapsed!==void 0?K.isRightSidebarCollapsed:S?L.fileViewRightSidebarCollapsed:J?L.shareConfigRightSidebarCollapsed:L.fileListRightSidebarCollapsed,y=N&&K.onRightSidebarToggle?K.onRightSidebarToggle:()=>{if(!N&&_)if(B(!1),S)L.setFileViewRightSidebarCollapsed(!1);else if(J)L.setShareConfigRightSidebarCollapsed(!1);else L.setFileListRightSidebarCollapsed(!1);else if(S)L.setFileViewRightSidebarCollapsed(!L.fileViewRightSidebarCollapsed);else if(J)L.setShareConfigRightSidebarCollapsed(!L.shareConfigRightSidebarCollapsed);else L.setFileListRightSidebarCollapsed(!L.fileListRightSidebarCollapsed)},I=N?void 0:()=>{B(!_)},m=Y?L.viewModes[Y]??"card":"card";return f(Yf,{teamId:U,projectId:Y,projectName:E,ancestorFolders:h,currentAsset:P,isRootFolder:T,displayStyle:S||J?void 0:m,onDisplayStyleChange:S||J?void 0:N?void 0:(t)=>{if(Y)L.setViewMode(Y,t)},isLeftSidebarCollapsed:b,onLeftSidebarToggle:A,isRightSidebarCollapsed:k,onRightSidebarToggle:y,isChatbotOpen:!N&&_,onChatbotToggle:I,isPublic:N,shareId:Q,fileId:$,downloadInfo:v,versions:Z,onFolderClick:w,compareMode:q,canCompareVersions:G,onCompareVersions:z})}function hf(){return f("div",{className:"flex h-14 flex-wrap items-center justify-center gap-2 border-b border-border bg-card px-4 py-2 flex-shrink-0",children:f(_f,{className:"w-10 h-10 text-orange-600"})})}
|
|
2
|
+
export{cf as pf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ng as e}from"./chunk-0rxhc7ka.js";import{$j as n,ak as C,gk as s,oh as r,ph as l,vi as x,wi as f,zi as b}from"./chunk-nyhqy6q2.js";function se({...t}){return r(n.Root,{"data-slot":"select",...t})}function pe({...t}){return r(n.Value,{"data-slot":"select-value",...t})}function ce({className:t,size:o="default",children:i,...p}){return l(n.Trigger,{"data-slot":"select-trigger","data-size":o,className:s("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...p,children:[i,r(n.Icon,{asChild:!0,children:r(f,{className:"size-4 opacity-50"})})]})}function le({className:t,children:o,position:i="item-aligned",align:p="center",...d}){return r(n.Portal,{children:l(n.Content,{"data-slot":"select-content",className:s("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",i==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:i,align:p,...d,children:[r(T,{}),r(n.Viewport,{className:s("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:o}),r(w,{})]})})}function me({className:t,children:o,...i}){return l(n.Item,{"data-slot":"select-item",className:s("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...i,children:[r("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:r(n.ItemIndicator,{children:r(x,{className:"size-4"})})}),r(n.ItemText,{children:o})]})}function T({className:t,...o}){return r(n.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:s("flex cursor-default items-center justify-center py-1",t),...o,children:r(b,{className:"size-4"})})}function w({className:t,...o}){return r(n.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:s("flex cursor-default items-center justify-center py-1",t),...o,children:r(f,{className:"size-4"})})}var c=e.object({cursor:e.string().optional(),total:e.number().optional(),totalSize:e.number().optional()}),a=e.object({first:e.coerce.number().optional(),after:e.string().optional()});var he=e.object({name:e.string()}),A=e.object({id:e.string(),name:e.string(),rootFolder:e.string().optional(),updatedAt:e.union([e.string(),e.date()])});var xe=e.object({data:e.array(A),pageInfo:c}),be=e.object({teamId:e.string(),userId:e.string()}),Re=e.object({id:e.string(),name:e.string(),email:e.string().optional(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional(),unreadNotificationCount:e.number().optional()}),Ie=e.object({name:e.string().optional(),imageKey:e.string().nullable().optional()}),ve=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),email:e.string().optional(),type:e.enum(["human","agent"]).optional(),image:e.string().optional(),scope:e.enum(["team","project"]).optional()}),qe=e.object({includeAgents:e.string().optional().transform((t)=>t==="true")}),N={best_match:"best_match",all:"all"},je=e.union([e.object({key:e.literal("transcode.videoStrategy"),value:e.nativeEnum(N)})]),Pe=e.object({allowedDomains:e.array(e.string()),pendingDomains:e.array(e.string()).default([])});var ke=e.object({role:e.enum(["editor","reviewer"])});var R=e.enum(["chat","autofill","embedding"]),I=e.enum(["off","minimal","low","medium","high","xhigh"]),F=e.object({id:e.string().optional(),skillId:e.string(),skill:e.object({id:e.string(),name:e.string()}).optional()}),Te=e.object({id:e.string(),name:e.string(),type:R,enabled:e.boolean(),avatar:e.string().optional(),providerId:e.string().optional(),modelId:e.string().optional(),thinkingLevel:I.optional().default("off"),systemPrompt:e.string().optional(),soul:e.string().optional(),skills:e.array(F).optional(),deniedTools:e.array(e.string()).optional()}),v=e.object({name:e.string().min(1),type:R,enabled:e.boolean().optional().default(!0),avatar:e.string().optional(),providerId:e.string().optional(),modelId:e.string().optional(),thinkingLevel:I.optional().default("off"),systemPrompt:e.string().optional(),soul:e.string().optional(),skills:e.array(e.string()).optional(),deniedTools:e.array(e.string()).optional()}),we=v.superRefine((t,o)=>{if(t.type==="chat"||t.type==="autofill"){if(!t.providerId)o.addIssue({code:e.ZodIssueCode.custom,message:"providerId is required for chat/autofill agents",path:["providerId"]});if(!t.modelId)o.addIssue({code:e.ZodIssueCode.custom,message:"modelId is required for chat/autofill agents",path:["modelId"]})}}),Ae=v.superRefine((t,o)=>{if(t.type==="chat"||t.type==="autofill"){if(!t.providerId)o.addIssue({code:e.ZodIssueCode.custom,message:"providerId is required for chat/autofill agents",path:["providerId"]});if(!t.modelId)o.addIssue({code:e.ZodIssueCode.custom,message:"modelId is required for chat/autofill agents",path:["modelId"]})}}),Ne=e.object({id:e.string(),sessionId:e.string(),entry:e.unknown()});var Le=e.object({apiKey:e.string().optional(),baseUrl:e.string().optional(),chatModels:e.array(e.string()).optional()}),M=e.enum(["1h","24h","7d","30d"]),Ve=e.object({timeframe:M.default("30d"),userId:e.string().optional()});var Ee=e.object({data:e.array(e.lazy(()=>D)),pageInfo:c}),q=e.object({proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),thumbnailUrl:e.string().optional(),originalHeight:e.number().optional(),originalWidth:e.number().optional(),spriteUrl:e.string().optional(),duration:e.number().optional(),pageCount:e.number().optional()}),L=e.object({type:e.string().nullable(),preview:q.nullable()}),m=e.object({id:e.string(),name:e.string(),image:e.string().optional()}),V=e.object({fieldId:e.string(),value:e.any()}),B=e.object({id:e.string(),name:e.string()}),O=e.object({duration:e.number().optional(),originalWidth:e.number().optional(),originalHeight:e.number().optional(),frameRate:e.number().optional(),totalFrames:e.number().optional(),startTimecode:e.string().optional()}),D=e.object({id:e.string(),name:e.string(),sizeByte:e.number(),fileCount:e.number(),type:e.string(),targetType:e.string().optional().nullable(),status:e.string(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),latestChildren:e.array(L).optional(),preview:q.nullable().optional(),createdAt:e.string(),updatedAt:e.string(),deletedAt:e.string().nullable().optional(),projectId:e.string().optional().nullable(),creator:m.nullable().optional(),fieldValues:e.array(V).optional(),sortIndex:e.string().optional().nullable(),startTime:e.number().optional().nullable(),endTime:e.number().optional().nullable(),media:e.object({original:e.object({downloadUrl:e.string(),key:e.string().optional()}).optional(),videoTranscodes:e.array(e.object({id:e.string(),url:e.string(),key:e.string(),width:e.number(),height:e.number(),size:e.number(),isRaw:e.boolean()})).optional(),imageTranscodes:e.array(e.object({id:e.string(),url:e.string(),key:e.string(),width:e.number(),height:e.number(),size:e.number(),isRaw:e.boolean()})).optional(),videoPreview:e.object({url:e.string(),key:e.string().optional()}).optional(),pdfTranscode:e.object({url:e.string(),key:e.string().optional()}).optional(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),metadata:O.optional()}).optional(),ancestorFolders:e.array(B).optional(),versionStack:e.object({id:e.string(),versions:e.array(e.object({version:e.number(),current:e.boolean(),id:e.string(),name:e.string().optional().nullable(),previewUrl:e.string().optional().nullable(),creator:e.object({id:e.string(),name:e.string().nullable()}).nullable().optional()}))}).optional().nullable()}),Ge=e.object({name:e.string(),type:e.string(),projectId:e.string().optional(),parentId:e.string().optional(),key:e.string().optional(),sizeByte:e.number().optional(),contentType:e.string().optional(),creatorId:e.string().optional()}),Qe=e.object({assetId:e.string()}),_e=e.object({id:e.string(),name:e.string()}),Ze=e.object({assetId:e.string().optional(),assetType:e.string(),projectId:e.string().optional(),showDeleted:e.boolean().optional(),prefix:e.string().optional(),sort:e.string().optional(),order:e.string().optional(),...a.shape}),Ke=e.object({assetId:e.string(),userId:e.string(),replyToId:e.string().optional(),message:e.string(),annotations:e.any().optional(),second:e.number().optional(),attachmentIds:e.array(e.string())}),E=e.object({id:e.string(),assetId:e.string(),url:e.string(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional()}),G=e.object({id:e.string(),assetId:e.string(),message:e.string().nullable(),annotations:e.any(),second:e.number().nullable(),creator:m,replies:e.array(e.lazy(()=>G)),attachments:e.array(E),mentions:e.array(m),createdAt:e.string(),updatedAt:e.string(),sessionId:e.string().nullable(),isCompleted:e.boolean(),completionLastChangedBy:m.nullable()}),He=e.object({isCompleted:e.boolean()}),Je=e.object({newParentId:e.string(),assetIds:e.array(e.string()),creatorId:e.string().optional()}),We=e.object({newParentId:e.string(),assetIds:e.array(e.string()),withComments:e.boolean().default(!1),creatorId:e.string().optional()}),Xe=e.object({name:e.string()}),Ye=e.object({beforeIndex:e.string().optional(),afterIndex:e.string().optional()}),$e=e.object({ids:e.array(e.string())}),ze=e.object({ids:e.array(e.string())}),et=e.object({file:e.instanceof(File)}),tt=e.object({key:e.string()}),ot=e.object({fileName:e.string(),contentType:e.string(),size:e.number()}),rt=e.object({id:e.string(),uploadUrl:e.string()}),nt=e.object({ids:e.array(e.string())}),Q=e.object({id:e.string(),name:e.string(),url:e.string()}),it=e.object({files:e.array(Q)});var pt=e.object({userCount:e.number()}),ct=e.object({name:e.string().min(1,"Name is required").max(100,"Name is too long")}),lt=e.object({id:e.string(),token:e.string(),name:e.string(),createdAt:e.string()});var _=e.enum(["is","eq","neq","gt","gte","lt","lte","contains","notContains","isEmpty","isNotEmpty","in","notIn","hasAny","hasAll","hasNone","isWithin"]),Z=e.object({field:e.string(),operator:_,value:e.any()}),K=e.enum(["asc","desc"]),H=e.object({field:e.string(),order:K}),J=e.enum(["AND","OR"]),W=e.enum(["file","folder"]),u=e.object({operator:J.optional().default("AND"),conditions:e.array(Z).optional().default([]),sort:H.optional(),assetType:W.optional(),showSymlink:e.boolean().optional(),recursively:e.boolean().optional().default(!0),query:e.string().optional(),isSemantic:e.boolean().optional().default(!1)}),ut=u.extend(a.shape);var g=e.object({sourceFolderId:e.string(),searchFilter:u}),X=e.object({id:e.string(),name:e.string(),filter:g,projectId:e.string(),createdAt:e.string(),updatedAt:e.string(),creator:e.object({id:e.string(),name:e.string(),image:e.string().optional().nullable()}).optional().nullable()}),xt=e.object({name:e.string(),filter:g}),bt=e.object({name:e.string().optional(),filter:g.optional()});var Rt=e.object({data:e.array(X),pageInfo:e.object({cursor:e.string().optional(),total:e.number().optional()})});var qt=e.object({name:e.string(),parentId:e.string()}),jt=e.object({name:e.string()}),Pt=e.object({ids:e.array(e.string())}),kt=e.object({ids:e.array(e.string())});var Tt=e.object({code:e.string(),role:e.enum(["editor","reviewer","owner"]),teamId:e.string(),teamName:e.string(),projectId:e.string().optional(),projectName:e.string().optional(),inviterName:e.string(),isUsed:e.boolean()}),wt=e.object({role:e.enum(["editor","reviewer"])}),At=e.object({role:e.enum(["editor","reviewer"])}),Nt=e.object({code:e.string()});var Lt={text:"text",longText:"longText",select:"select",selectMulti:"selectMulti",rating:"rating",number:"number",toggle:"toggle",date:"date",user:"user",userMulti:"userMulti"},Vt=e.object({id:e.string(),displayName:e.string(),color:e.string().optional()}),y=e.object({name:e.string(),type:e.enum(["text","longText","select","selectMulti","rating","number","toggle","date","user","userMulti"]),text:e.any().optional(),longText:e.any().optional(),select:e.any().optional(),selectMulti:e.any().optional(),rating:e.any().optional(),number:e.any().optional(),toggle:e.any().optional(),date:e.any().optional(),user:e.any().optional(),userMulti:e.any().optional()}),Bt=e.object({key:e.string().optional(),label:e.string().optional(),scope:e.string().optional(),config:y,aiAutofill:e.boolean().default(!1),description:e.string().default("")}),Ot=e.object({label:e.string().optional(),config:y,aiAutofill:e.boolean().optional(),description:e.string().optional()}),Y=e.object({fieldId:e.string(),visible:e.boolean()}),Dt=e.array(Y),$=e.object({key:e.string(),value:e.any()}),Et=e.array($),Gt=e.object({id:e.string(),config:y,scope:e.string(),readOnly:e.boolean(),visible:e.boolean(),description:e.string(),aiAutofill:e.boolean()});var j=e.object({id:e.string().optional(),name:e.string().optional(),role:e.string().optional()}),P=e.object({id:e.string().optional(),name:e.string().optional()}),z=e.object({id:e.string().optional(),proxyType:e.enum(["image","video","audio","pdf"]).nullable().optional(),name:e.string().optional(),preview:e.string().optional(),thumbnailUrl:e.string().optional(),originalWidth:e.number().optional(),originalHeight:e.number().optional()}),Zt=e.object({id:e.string().optional(),creator:j.optional(),type:e.string().optional(),team:P.optional(),project:P.optional(),asset:z.optional(),user:j.optional(),createdAt:e.string().optional(),isRead:e.boolean().optional()}),Kt=e.object({unreadOnly:e.union([e.boolean(),e.string()]).transform((t)=>t===!0||t==="true").optional(),after:e.string().optional(),pageSize:e.coerce.number().optional()}),Ht=e.object({notificationId:e.string().min(1)}),Jt=e.object({comments:e.boolean().default(!0),replies:e.boolean().default(!0),mentions:e.boolean().default(!0),yourUploads:e.boolean().default(!1),otherUploads:e.boolean().default(!0),statusUpdates:e.boolean().default(!0)});var $t=e.object({name:e.string(),coverImageKey:e.string().optional(),enableNotification:e.boolean().default(!0)}),zt=e.object({name:e.string().optional(),coverImageKey:e.string().optional(),enableNotification:e.boolean().optional()}),ee=e.object({id:e.string(),name:e.string(),teamId:e.string(),rootFolder:e.string().optional(),coverImage:e.string().optional(),coverImageKey:e.string().optional(),enableNotification:e.boolean(),updatedAt:e.union([e.string(),e.date()])}),eo=e.object({sortBy:e.string().optional(),sortDirection:e.enum(["asc","desc"]).optional()}).merge(a),to=e.object({data:e.array(ee),pageInfo:c}),oo=e.object({teamId:e.string()}),ro=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional(),scope:e.enum(["team","project"]).optional()}),no=e.object({id:e.string(),name:e.string()}),io=e.object({assetType:e.string(),sort:e.enum(["createdAt","name","size"]).optional(),order:e.enum(["asc","desc"]).optional()}).merge(a),ao=e.object({role:e.enum(["editor","reviewer"])}),so=e.object({userId:e.string(),role:e.enum(["owner","editor","reviewer"])}),po=e.object({id:e.string(),name:e.string(),role:e.enum(["owner","editor","reviewer","bot","unknown"]),image:e.string().optional()});var k=["openai-completions","mistral-conversations","openai-responses","azure-openai-responses","openai-codex-responses","anthropic-messages","bedrock-converse-stream","google-generative-ai","google-vertex"],te=e.object({api:e.enum(k).optional(),reasoning:e.boolean().default(!1),input:e.array(e.enum(["text","image"])).default(["text"]),contextWindow:e.number().int().positive().default(128000),maxTokens:e.number().int().positive().default(4096),cost:e.object({input:e.number().nonnegative().default(0),output:e.number().nonnegative().default(0),cacheRead:e.number().nonnegative().default(0),cacheWrite:e.number().nonnegative().default(0)})}),S=e.object({id:e.string().optional(),modelId:e.string().min(1,"Model ID is required"),name:e.string().min(0).default(""),config:te}),h=e.object({baseUrl:e.string().url("Must be a valid URL").optional().or(e.literal("")),apiKey:e.string().optional().or(e.literal("")),api:e.enum(k),headers:e.record(e.string(),e.string()).optional(),authHeader:e.boolean().optional()}),mo=e.object({name:e.string().min(1,"Provider name is required"),config:h,models:e.array(S).min(1,"At least one model is required")}),fo=e.object({config:h,models:e.array(S).min(1,"At least one model is required")}),uo=e.object({id:e.string(),name:e.string(),isBuiltin:e.boolean(),config:h,models:e.array(S).optional(),modelsCount:e.number().optional(),createdAt:e.date(),updatedAt:e.date()});var ho=e.object({name:e.string().min(1),expireAt:e.string().datetime().optional(),password:e.string().optional(),isDisabled:e.boolean().optional(),defaultSortOrder:e.string().optional(),viewMode:e.string().optional()}),xo=e.object({name:e.string().min(1).optional(),expireAt:e.string().datetime().optional().nullable(),password:e.string().optional().nullable(),isDisabled:e.boolean().optional(),defaultSortOrder:e.string().optional().nullable(),viewMode:e.string().optional().nullable(),fieldVisibility:e.record(e.string(),e.boolean()).optional().nullable()}),bo=a.extend({projectId:e.string().optional()}),Ro=e.object({assetIds:e.array(e.string().min(1)).min(1)});var qo=e.object({assetId:e.string().optional(),githubUrl:e.string().optional(),override:e.boolean().optional()}),jo=e.object({config:e.object({environmentVariables:e.array(e.object({name:e.string(),default:e.string().optional()}))})}),Po=e.object({permission:e.enum(["owner","editor","reviewer"])});var U=e.lazy(()=>e.object({name:e.string(),id:e.string(),size:e.number(),children:e.array(U),type:e.string(),mediaType:e.string().optional()})),Co=e.object({parentId:e.string(),files:e.array(U)}),oe=e.object({id:e.string(),fileId:e.string(),url:e.string()}),To=e.object({taskId:e.string(),presignedUrls:e.array(oe),createdAssets:e.array(e.object({tempId:e.string(),assetId:e.string()})).optional()}),wo=e.object({fileId:e.string(),errorMessage:e.string().optional()}),Ao=e.object({id:e.string(),name:e.string(),total:e.number(),uploaded:e.number(),createdAt:e.string()}),No=e.object({bucket:e.string(),key:e.string(),Signature:e.string()}),Fo=e.object({file:e.instanceof(File)});var re=e.object({key:e.string(),value:e.unknown()}),Vo=e.object({value:e.unknown()}),Bo=e.array(re);var Eo=e.object({fileIds:e.array(e.string())}),Go=e.object({fileId:e.string(),beforeId:e.string()});var Zo=e.object({agentId:e.string(),textPrompt:e.string().optional(),attachedFiles:e.array(e.string()).optional(),assetIds:e.array(e.string()).optional(),sessionId:e.string().optional(),contextAssetId:e.string().optional(),projectId:e.string().optional()}).superRefine((t,o)=>{let i=t.textPrompt&&t.textPrompt.trim().length>0,p=t.attachedFiles&&t.attachedFiles.length>0,d=t.assetIds&&t.assetIds.length>0;if(!i&&!p&&!d)o.addIssue({code:e.ZodIssueCode.custom,message:"At least one of textPrompt, attachedFiles, or assetIds must be provided.",path:["textPrompt"]})}),Ko=e.object({id:e.string(),agentId:e.string(),userId:e.string().nullable(),assetId:e.string().nullable(),userCommentId:e.string().nullable(),name:e.string().nullable().optional(),createdAt:e.string(),updatedAt:e.string()}),Ho=e.intersection(e.object({id:e.string()}),e.unknown());function xr({className:t,orientation:o="horizontal",decorative:i=!0,...p}){return r(C.Root,{"data-slot":"separator",decorative:i,orientation:o,className:s("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...p})}
|
|
2
|
+
export{se as V,pe as W,ce as X,le as Y,me as Z,I as _,Lt as $,k as aa,S as ba,h as ca,N as da,xr as ea};
|