@shumai-one/shumai 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/bin/{chunk-gg1gwjtn.js → chunk-0jkqmbcx.js} +1 -1
  2. package/bin/{chunk-t5561vz5.js → chunk-0t8q76ac.js} +1 -1
  3. package/bin/chunk-0xern7e4.js +1 -0
  4. package/bin/{chunk-9p5n3m2z.js → chunk-0ycwr0kb.js} +1 -1
  5. package/bin/{chunk-55myfmhy.js → chunk-0yngn45x.js} +2 -2
  6. package/bin/{chunk-jtd7rydv.js → chunk-1khzycf9.js} +1 -1
  7. package/bin/{chunk-fwbrcfaq.js → chunk-1sqz0va1.js} +2 -2
  8. package/bin/{chunk-w4ycztv5.js → chunk-1xzc6z02.js} +1 -1
  9. package/bin/{chunk-y1t47c7f.js → chunk-2086rsb2.js} +1 -1
  10. package/bin/{chunk-5wrakb8p.js → chunk-260wywfb.js} +1 -1
  11. package/bin/{chunk-6edadcpn.js → chunk-2mqqghrz.js} +2 -2
  12. package/bin/{chunk-ghz19a7t.js → chunk-2xmsrq7f.js} +2 -2
  13. package/bin/{chunk-nh8azwsx.js → chunk-38g3s1f3.js} +2 -2
  14. package/bin/{chunk-0jesq6sm.js → chunk-3dx0p1ge.js} +1 -1
  15. package/bin/{chunk-ce50f746.js → chunk-3kqdgddm.js} +2 -2
  16. package/bin/{chunk-z0tbq08w.js → chunk-3xzgddev.js} +1 -1
  17. package/bin/{chunk-1b7shyfp.js → chunk-48nzw50r.js} +1 -1
  18. package/bin/{chunk-w16jgdfx.js → chunk-4bn9eb9h.js} +1 -1
  19. package/bin/chunk-4egayx81.js +2 -0
  20. package/bin/{chunk-ef5v7gta.js → chunk-4rbzswqs.js} +2 -2
  21. package/bin/{chunk-crdvxq38.js → chunk-503qq6sa.js} +2 -2
  22. package/bin/{chunk-d8bpqbdw.js → chunk-50keqtz9.js} +1 -1
  23. package/bin/{chunk-mmrtjcst.js → chunk-5gtew41y.js} +1 -1
  24. package/bin/chunk-60hpa5kf.js +3 -0
  25. package/bin/{chunk-4a9sdfyp.js → chunk-69tt1pvr.js} +2 -2
  26. package/bin/{chunk-rmm6y799.js → chunk-6fv38qdc.js} +2 -2
  27. package/bin/{chunk-vgr9db5g.js → chunk-6v39c8eg.js} +2 -2
  28. package/bin/{chunk-kaxwma6y.js → chunk-6zs49mef.js} +1 -1
  29. package/bin/{chunk-y8vw7zv1.js → chunk-7872prvg.js} +1 -1
  30. package/bin/{chunk-kk0gx8eg.js → chunk-7hnw6y6d.js} +2 -2
  31. package/bin/{chunk-47093mwk.js → chunk-7k3ccca6.js} +1 -1
  32. package/bin/chunk-815ezj20.js +1 -0
  33. package/bin/{chunk-ew4cxkcc.js → chunk-81tb4v5v.js} +2 -2
  34. package/bin/{chunk-ym47952x.js → chunk-83k0wa5k.js} +2 -2
  35. package/bin/{chunk-8js9m1j7.js → chunk-85eg9xqx.js} +1 -1
  36. package/bin/{chunk-vqgz25av.js → chunk-86aagej8.js} +1 -1
  37. package/bin/{chunk-f44d9fpd.js → chunk-87wqbn4g.js} +2 -2
  38. package/bin/chunk-8y1v9dm9.js +2 -0
  39. package/bin/{chunk-20wtz3kc.js → chunk-98j2z6he.js} +3 -3
  40. package/bin/chunk-9gq9782d.js +1 -0
  41. package/bin/{chunk-y0yrmcf3.js → chunk-9gzy30zm.js} +2 -2
  42. package/bin/{chunk-0sajh8fw.js → chunk-9nyhmtp9.js} +2 -2
  43. package/bin/{chunk-7b60a9sy.js → chunk-9s02m95j.js} +2 -2
  44. package/bin/{chunk-c9bpf8gp.js → chunk-9xhnmnnb.js} +2 -2
  45. package/bin/{chunk-hcvpb1hw.js → chunk-a0k1b4sq.js} +1 -1
  46. package/bin/{chunk-7fm1hznx.js → chunk-af6wbhkv.js} +2 -2
  47. package/bin/{chunk-sx7kparv.js → chunk-b3jh3hf1.js} +2 -2
  48. package/bin/{chunk-74zstxav.js → chunk-b8v7jvkb.js} +2 -2
  49. package/bin/{chunk-9tnfhrnh.js → chunk-bancgvrc.js} +2 -2
  50. package/bin/{chunk-a5fw02xq.js → chunk-br5xkaf7.js} +3 -3
  51. package/bin/chunk-bv88se28.css +1 -0
  52. package/bin/{chunk-nh31ma8d.js → chunk-cqq8e3hc.js} +2 -2
  53. package/bin/{chunk-mgbqjbfc.js → chunk-dej1gq35.js} +1 -1
  54. package/bin/{chunk-mhj0pqq3.js → chunk-dv1zpd2p.js} +2 -2
  55. package/bin/{chunk-0jr6q4j4.js → chunk-eetrc0j1.js} +2 -2
  56. package/bin/{chunk-6awkqp09.js → chunk-esrtafz0.js} +1 -1
  57. package/bin/chunk-eztggp8r.js +1 -0
  58. package/bin/{chunk-n198tewr.js → chunk-f2j2cqd1.js} +2 -2
  59. package/bin/{chunk-1f8rr3ef.js → chunk-fcs4v6jq.js} +2 -2
  60. package/bin/{chunk-dfzmqx1v.js → chunk-ftc48rbb.js} +3 -3
  61. package/bin/{chunk-pm64et9d.js → chunk-g60v3jc1.js} +1 -1
  62. package/bin/chunk-gf5ds9r9.js +2 -0
  63. package/bin/{chunk-f2eh802w.js → chunk-gjdmnfms.js} +1 -1
  64. package/bin/{chunk-gra3617w.js → chunk-gjn3w26y.js} +2 -2
  65. package/bin/{chunk-8jdgzy22.js → chunk-h9emz0zb.js} +2 -2
  66. package/bin/{chunk-3egeywt8.js → chunk-h9k2atte.js} +1 -1
  67. package/bin/{chunk-fzaw1e34.js → chunk-hqkmdp31.js} +2 -2
  68. package/bin/{chunk-9annjnj2.js → chunk-jszpvg8e.js} +2 -2
  69. package/bin/{chunk-snexx7ks.js → chunk-k48y9e5s.js} +1 -1
  70. package/bin/{chunk-d2qp8g98.js → chunk-karn564z.js} +2 -2
  71. package/bin/{chunk-fdm1yc29.js → chunk-kkq4wvnc.js} +1 -1
  72. package/bin/{chunk-aeg4kya9.js → chunk-kpn9d97x.js} +1 -1
  73. package/bin/chunk-ksx113sp.js +1 -0
  74. package/bin/chunk-m6a4rzdt.js +62 -0
  75. package/bin/chunk-mw8f8ngt.js +7 -0
  76. package/bin/{chunk-w98wvk17.js → chunk-n4gghgrj.js} +2 -2
  77. package/bin/{chunk-hqbzjzsm.js → chunk-n76r6s9k.js} +2 -2
  78. package/bin/{chunk-g70eyttc.js → chunk-nvjp2rnh.js} +2 -2
  79. package/bin/{chunk-29nhtrfv.js → chunk-p4c4z0f2.js} +1 -1
  80. package/bin/{chunk-ex4qa7gv.js → chunk-ptw49k86.js} +1 -1
  81. package/bin/{chunk-tqxmj05h.js → chunk-qcqw7wnv.js} +2 -2
  82. package/bin/{chunk-z0zevgb6.js → chunk-qdycy714.js} +1 -1
  83. package/bin/{chunk-gewh7p42.js → chunk-qh9rz2ee.js} +2 -2
  84. package/bin/{chunk-mxee09jk.js → chunk-qmpph1gt.js} +2 -2
  85. package/bin/{chunk-dmjzrdan.js → chunk-qy93r7tm.js} +2 -2
  86. package/bin/{chunk-j1awxx51.js → chunk-r5dv0rfv.js} +2 -2
  87. package/bin/{chunk-gct52xks.js → chunk-rfyaphas.js} +2 -2
  88. package/bin/chunk-rvspnthy.js +1 -0
  89. package/bin/{chunk-9hsfjqgq.js → chunk-s0hgykza.js} +2 -2
  90. package/bin/chunk-sjjndwt4.js +2 -0
  91. package/bin/{chunk-8g0mhzsg.js → chunk-t3tp9trj.js} +2 -2
  92. package/bin/{chunk-1fq10abj.js → chunk-t9t9evan.js} +2 -2
  93. package/bin/{chunk-vw1rhgjs.js → chunk-tpp9qf5m.js} +2 -2
  94. package/bin/chunk-tvg9gvqs.js +1 -0
  95. package/bin/{chunk-yzra1x8f.js → chunk-tzt4c1dm.js} +2 -2
  96. package/bin/{chunk-js0genbf.js → chunk-v8w2nxew.js} +1 -1
  97. package/bin/{chunk-z2ef8zpz.js → chunk-v98e3gex.js} +1 -1
  98. package/bin/{chunk-89kqtj7x.js → chunk-vxpnp4xg.js} +2 -2
  99. package/bin/{chunk-4ajat3xv.js → chunk-x3ynjbt5.js} +14 -14
  100. package/bin/{chunk-800vdz5n.js → chunk-x6532q76.js} +1 -1
  101. package/bin/chunk-xp4dcyk3.js +1 -0
  102. package/bin/chunk-y8aehqr8.js +2 -0
  103. package/bin/{chunk-n9cjmkky.js → chunk-ytzk81tr.js} +1 -1
  104. package/bin/chunk-yvxt48r4.js +1 -0
  105. package/bin/{chunk-q7xfrtnj.js → chunk-zg60j9x2.js} +1 -1
  106. package/bin/{chunk-bq2aq6v8.js → chunk-zjj9qj6y.js} +2 -2
  107. package/bin/{chunk-gx5rjm9m.js → chunk-zqg4f56h.js} +1 -1
  108. package/bin/{chunk-thj4cpev.js → chunk-zwgf211t.js} +2 -2
  109. package/bin/shumai-app.html +1 -1
  110. package/bin/shumai-app.js +240 -245
  111. package/package.json +7 -7
  112. package/prisma/migrations/20260813022501_backfill_autofill_source_in_config/migration.sql +8 -0
  113. package/prisma/migrations/20260813022502_drop_legacy_autofill_columns/migration.sql +12 -0
  114. package/prisma/migrations/20260813122613_add_network_sandbox_enabled_column/migration.sql +2 -0
  115. package/prisma/migrations/20260813122618_migrate_legacy_sandboxes_enabled/migration.sql +2 -0
  116. package/prisma/schema.prisma +8 -9
  117. package/bin/chunk-1hn9v6hv.js +0 -2
  118. package/bin/chunk-2882s5sp.js +0 -1
  119. package/bin/chunk-3htn4m2d.js +0 -7
  120. package/bin/chunk-6bztpk7h.js +0 -1
  121. package/bin/chunk-76hs7g0x.js +0 -2
  122. package/bin/chunk-e5s7202g.js +0 -2
  123. package/bin/chunk-f5zg7b38.js +0 -1
  124. package/bin/chunk-gh64hag9.js +0 -2
  125. package/bin/chunk-h0p8yew4.js +0 -1
  126. package/bin/chunk-hgngnc1k.js +0 -1
  127. package/bin/chunk-jt4yh37q.js +0 -62
  128. package/bin/chunk-k0xpskyq.js +0 -1
  129. package/bin/chunk-nhc72y4x.js +0 -2
  130. package/bin/chunk-px6q3jpz.js +0 -1
  131. package/bin/chunk-sx3by19j.js +0 -1
  132. package/bin/chunk-vz75bqvx.js +0 -2
  133. package/bin/chunk-wa8k9fwx.js +0 -1
  134. package/bin/chunk-z3p3qz9d.js +0 -3
  135. package/bin/chunk-zv85aqwb.css +0 -1
@@ -1,2 +0,0 @@
1
- import{da as n,ea as o,fa as r}from"./chunk-ym47952x.js";import{ha as _}from"./chunk-nhc72y4x.js";import{Aa as D5,Ba as f5,Ca as x5,Da as j5,Ea as y5,Fa as _5,Ga as v5,Ha as D2,Ia as f2,Ja as x2,Ka as h5,La as g5,Ma as m5,Na as b5,Oa as P1,Pa as T1,Qa as O1,Ra as c5,Sa as u5,Ta as Z2,Ua as $1,Va as J1,Wa as Z1,Xa as h,Ya as X2,Za as S1,_a as X1,pa as v,qa as O2,ra as E5,sa as _0,ta as S2,ua as I5,va as E2,xa as y2,za as I2}from"./chunk-ef5v7gta.js";import{hb as g0}from"./chunk-ce50f746.js";import{ug as K2}from"./chunk-0jr6q4j4.js";import{Jg as U0}from"./chunk-7fm1hznx.js";import{$g as P2,Lg as S0,Mg as y,Rg as q5,Wg as B0}from"./chunk-6edadcpn.js";import{fh as L1,hh as R1,ih as k1,jh as C1}from"./chunk-w98wvk17.js";import{$h as O0,Ak as A0,Bj as c2,Bk as L0,Di as N1,Eh as b2,Ek as I,Fi as H2,Fk as h0,Gi as w0,Hi as z5,Hj as G1,Ii as G5,Jj as M1,Oi as M5,Pj as s0,Qj as U1,Sj as w1,Uh as n0,Uj as F1,Vh as Q5,Yj as V1,Zj as A1,aj as B1,bj as W1,bk as F0,kj as z1,ni as K1,pi as q1,rk as m0,vh as u,wh as Q2,wk as R0,xh as K,yh as A,yk as $0,zh as H1,zk as V0}from"./chunk-jt4yh37q.js";import{Il as c}from"./chunk-mgbqjbfc.js";function v1($){let J=$.lastIndexOf(".");if(J>0)return[0,J];return[0,$.length]}function i4($){$.focus();let[J,Z]=v1($.value);if(typeof $.setSelectionRange==="function")$.setSelectionRange(J,Z);else $.select()}var a2=Symbol.for("immer-nothing"),p2=Symbol.for("immer-draftable"),b=Symbol.for("immer-state");function l($,...J){throw Error(`[Immer] minified error nr: ${$}. Full error at: https://bit.ly/3cXEKWf`)}var k0=Object.getPrototypeOf;function N0($){return!!$&&!!$[b]}function Y0($){if(!$)return!1;return t2($)||Array.isArray($)||!!$[p2]||!!$.constructor?.[p2]||T0($)||p0($)}var h1=Object.prototype.constructor.toString(),i2=new WeakMap;function t2($){if(!$||typeof $!=="object")return!1;let J=Object.getPrototypeOf($);if(J===null||J===Object.prototype)return!0;let Z=Object.hasOwnProperty.call(J,"constructor")&&J.constructor;if(Z===Object)return!0;if(typeof Z!=="function")return!1;let X=i2.get(Z);if(X===void 0)X=Function.toString.call(Z),i2.set(Z,X);return X===h1}function c0($,J,Z=!0){if(l0($)===0)(Z?Reflect.ownKeys($):Object.keys($)).forEach((Y)=>{J(Y,$[Y],$)});else $.forEach((X,Y)=>J(Y,X,$))}function l0($){let J=$[b];return J?J.type_:Array.isArray($)?1:T0($)?2:p0($)?3:0}function W2($,J){return l0($)===2?$.has(J):Object.prototype.hasOwnProperty.call($,J)}function e2($,J,Z){let X=l0($);if(X===2)$.set(J,Z);else if(X===3)$.add(Z);else $[J]=Z}function g1($,J){if($===J)return $!==0||1/$===1/J;else return $!==$&&J!==J}function T0($){return $ instanceof Map}function p0($){return $ instanceof Set}function X0($){return $.copy_||$.base_}function z2($,J){if(T0($))return new Map($);if(p0($))return new Set($);if(Array.isArray($))return Array.prototype.slice.call($);let Z=t2($);if(J===!0||J==="class_only"&&!Z){let X=Object.getOwnPropertyDescriptors($);delete X[b];let Y=Reflect.ownKeys(X);for(let q=0;q<Y.length;q++){let Q=Y[q],H=X[Q];if(H.writable===!1)H.writable=!0,H.configurable=!0;if(H.get||H.set)X[Q]={configurable:!0,writable:!0,enumerable:H.enumerable,value:$[Q]}}return Object.create(k0($),X)}else{let X=k0($);if(X!==null&&Z)return{...$};let Y=Object.create(X);return Object.assign(Y,$)}}function F2($,J=!1){if(i0($)||N0($)||!Y0($))return $;if(l0($)>1)Object.defineProperties($,{set:b0,add:b0,clear:b0,delete:b0});if(Object.freeze($),J)Object.values($).forEach((Z)=>F2(Z,!0));return $}function m1(){l(2)}var b0={value:m1};function i0($){if($===null||typeof $!=="object")return!0;return Object.isFrozen($)}var b1={};function Q0($){let J=b1[$];if(!J)l(0,$);return J}var C0;function $5(){return C0}function c1($,J){return{drafts_:[],parent_:$,immer_:J,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function n2($,J){if(J)Q0("Patches"),$.patches_=[],$.inversePatches_=[],$.patchListener_=J}function G2($){M2($),$.drafts_.forEach(u1),$.drafts_=null}function M2($){if($===C0)C0=$.parent_}function o2($){return C0=c1(C0,$)}function u1($){let J=$[b];if(J.type_===0||J.type_===1)J.revoke_();else J.revoked_=!0}function r2($,J){J.unfinalizedDrafts_=J.drafts_.length;let Z=J.drafts_[0];if($!==void 0&&$!==Z){if(Z[b].modified_)G2(J),l(4);if(Y0($)){if($=u0(J,$),!J.parent_)d0(J,$)}if(J.patches_)Q0("Patches").generateReplacementPatches_(Z[b].base_,$,J.patches_,J.inversePatches_)}else $=u0(J,Z,[]);if(G2(J),J.patches_)J.patchListener_(J.patches_,J.inversePatches_);return $!==a2?$:void 0}function u0($,J,Z){if(i0(J))return J;let X=$.immer_.shouldUseStrictIteration(),Y=J[b];if(!Y)return c0(J,(q,Q)=>s2($,Y,J,q,Q,Z),X),J;if(Y.scope_!==$)return J;if(!Y.modified_)return d0($,Y.base_,!0),Y.base_;if(!Y.finalized_){Y.finalized_=!0,Y.scope_.unfinalizedDrafts_--;let q=Y.copy_,Q=q,H=!1;if(Y.type_===3)Q=new Set(q),q.clear(),H=!0;if(c0(Q,(G,z)=>s2($,Y,q,G,z,Z,H),X),d0($,q,!1),Z&&$.patches_)Q0("Patches").generatePatches_(Y,Z,$.patches_,$.inversePatches_)}return Y.copy_}function s2($,J,Z,X,Y,q,Q){if(Y==null)return;if(typeof Y!=="object"&&!Q)return;let H=i0(Y);if(H&&!Q)return;if(N0(Y)){let G=q&&J&&J.type_!==3&&!W2(J.assigned_,X)?q.concat(X):void 0,z=u0($,Y,G);if(e2(Z,X,z),N0(z))$.canAutoFreeze_=!1;else return}else if(Q)Z.add(Y);if(Y0(Y)&&!H){if(!$.immer_.autoFreeze_&&$.unfinalizedDrafts_<1)return;if(J&&J.base_&&J.base_[X]===Y&&H)return;if(u0($,Y),(!J||!J.scope_.parent_)&&typeof X!=="symbol"&&(T0(Z)?Z.has(X):Object.prototype.propertyIsEnumerable.call(Z,X)))d0($,Y)}}function d0($,J,Z=!1){if(!$.parent_&&$.immer_.autoFreeze_&&$.canAutoFreeze_)F2(J,Z)}function d1($,J){let Z=Array.isArray($),X={type_:Z?1:0,scope_:J?J.scope_:$5(),modified_:!1,finalized_:!1,assigned_:{},parent_:J,base_:$,draft_:null,copy_:null,revoke_:null,isManual_:!1},Y=X,q=V2;if(Z)Y=[X],q=P0;let{revoke:Q,proxy:H}=Proxy.revocable(Y,q);return X.draft_=H,X.revoke_=Q,H}var V2={get($,J){if(J===b)return $;let Z=X0($);if(!W2(Z,J))return l1($,Z,J);let X=Z[J];if($.finalized_||!Y0(X))return X;if(X===N2($.base_,J))return B2($),$.copy_[J]=w2(X,$);return X},has($,J){return J in X0($)},ownKeys($){return Reflect.ownKeys(X0($))},set($,J,Z){let X=J5(X0($),J);if(X?.set)return X.set.call($.draft_,Z),!0;if(!$.modified_){let Y=N2(X0($),J),q=Y?.[b];if(q&&q.base_===Z)return $.copy_[J]=Z,$.assigned_[J]=!1,!0;if(g1(Z,Y)&&(Z!==void 0||W2($.base_,J)))return!0;B2($),U2($)}if($.copy_[J]===Z&&(Z!==void 0||(J in $.copy_))||Number.isNaN(Z)&&Number.isNaN($.copy_[J]))return!0;return $.copy_[J]=Z,$.assigned_[J]=!0,!0},deleteProperty($,J){if(N2($.base_,J)!==void 0||J in $.base_)$.assigned_[J]=!1,B2($),U2($);else delete $.assigned_[J];if($.copy_)delete $.copy_[J];return!0},getOwnPropertyDescriptor($,J){let Z=X0($),X=Reflect.getOwnPropertyDescriptor(Z,J);if(!X)return X;return{writable:!0,configurable:$.type_!==1||J!=="length",enumerable:X.enumerable,value:Z[J]}},defineProperty(){l(11)},getPrototypeOf($){return k0($.base_)},setPrototypeOf(){l(12)}},P0={};c0(V2,($,J)=>{P0[$]=function(){return arguments[0]=arguments[0][0],J.apply(this,arguments)}});P0.deleteProperty=function($,J){return P0.set.call(this,$,J,void 0)};P0.set=function($,J,Z){return V2.set.call(this,$[0],J,Z,$[0])};function N2($,J){let Z=$[b];return(Z?X0(Z):$)[J]}function l1($,J,Z){let X=J5(J,Z);return X?"value"in X?X.value:X.get?.call($.draft_):void 0}function J5($,J){if(!(J in $))return;let Z=k0($);while(Z){let X=Object.getOwnPropertyDescriptor(Z,J);if(X)return X;Z=k0(Z)}return}function U2($){if(!$.modified_){if($.modified_=!0,$.parent_)U2($.parent_)}}function B2($){if(!$.copy_)$.copy_=z2($.base_,$.scope_.immer_.useStrictShallowCopy_)}var p1=class{constructor($){if(this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(J,Z,X)=>{if(typeof J==="function"&&typeof Z!=="function"){let q=Z;Z=J;let Q=this;return function(G=q,...z){return Q.produce(G,(M)=>Z.call(this,M,...z))}}if(typeof Z!=="function")l(6);if(X!==void 0&&typeof X!=="function")l(7);let Y;if(Y0(J)){let q=o2(this),Q=w2(J,void 0),H=!0;try{Y=Z(Q),H=!1}finally{if(H)G2(q);else M2(q)}return n2(q,X),r2(Y,q)}else if(!J||typeof J!=="object"){if(Y=Z(J),Y===void 0)Y=J;if(Y===a2)Y=void 0;if(this.autoFreeze_)F2(Y,!0);if(X){let q=[],Q=[];Q0("Patches").generateReplacementPatches_(J,Y,q,Q),X(q,Q)}return Y}else l(1,J)},this.produceWithPatches=(J,Z)=>{if(typeof J==="function")return(Q,...H)=>this.produceWithPatches(Q,(G)=>J(G,...H));let X,Y;return[this.produce(J,Z,(Q,H)=>{X=Q,Y=H}),X,Y]},typeof $?.autoFreeze==="boolean")this.setAutoFreeze($.autoFreeze);if(typeof $?.useStrictShallowCopy==="boolean")this.setUseStrictShallowCopy($.useStrictShallowCopy);if(typeof $?.useStrictIteration==="boolean")this.setUseStrictIteration($.useStrictIteration)}createDraft($){if(!Y0($))l(8);if(N0($))$=i1($);let J=o2(this),Z=w2($,void 0);return Z[b].isManual_=!0,M2(J),Z}finishDraft($,J){let Z=$&&$[b];if(!Z||!Z.isManual_)l(9);let{scope_:X}=Z;return n2(X,J),r2(void 0,X)}setAutoFreeze($){this.autoFreeze_=$}setUseStrictShallowCopy($){this.useStrictShallowCopy_=$}setUseStrictIteration($){this.useStrictIteration_=$}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches($,J){let Z;for(Z=J.length-1;Z>=0;Z--){let Y=J[Z];if(Y.path.length===0&&Y.op==="replace"){$=Y.value;break}}if(Z>-1)J=J.slice(Z+1);let X=Q0("Patches").applyPatches_;if(N0($))return X($,J);return this.produce($,(Y)=>X(Y,J))}};function w2($,J){let Z=T0($)?Q0("MapSet").proxyMap_($,J):p0($)?Q0("MapSet").proxySet_($,J):d1($,J);return(J?J.scope_:$5()).drafts_.push(Z),Z}function i1($){if(!N0($))l(10,$);return Z5($)}function Z5($){if(!Y0($)||i0($))return $;let J=$[b],Z,X=!0;if(J){if(!J.modified_)return J.base_;J.finalized_=!0,Z=z2($,J.scope_.immer_.useStrictShallowCopy_),X=J.scope_.immer_.shouldUseStrictIteration()}else Z=z2($,!0);if(c0(Z,(Y,q)=>{e2(Z,Y,Z5(q))},X),J)J.finalized_=!1;return Z}var n1=new p1,X5=n1.produce;var o1=($)=>(J,Z,X)=>{return X.setState=(Y,q,...Q)=>{let H=typeof Y==="function"?X5(Y):Y;return J(H,q,...Q)},$(X.setState,Z,X)},Y5=o1;var o0=n0()(Q5(Y5(($,J)=>({members:[],loading:!1,fetchMembers:async(Z,X,Y)=>{if(!Y&&J().loadedTeamId===Z&&J().loadedWithAgents===X)return;$({loading:!0});try{let q=await O0.api.teams[":teamId"].members.$get({param:{teamId:Z},query:{includeAgents:X?"true":"false"}});if(!q.ok)throw Error("failed to fetch members");let Q=await q.json();$({members:Q||[],loadedTeamId:Z,loadedWithAgents:X,loading:!1})}catch{$({loading:!1})}}}))));var H5=n0(($)=>({fields:[],loadedProjectId:null,setFields:(J,Z)=>$({fields:J,loadedProjectId:Z}),updateFields:(J)=>$({fields:J})}));function A2($,J,Z){let X=y($,Z?.in);if(isNaN(J))return S0(Z?.in||$,NaN);if(!J)return X;let Y=X.getDate(),q=S0(Z?.in||$,X.getTime());q.setMonth(X.getMonth()+J+1,0);let Q=q.getDate();if(Y>=Q)return q;else return X.setFullYear(q.getFullYear(),q.getMonth(),Y),X}function K5($,J){let Z=y($,J?.in),X=Z.getMonth();return Z.setFullYear(Z.getFullYear(),X+1,0),Z.setHours(23,59,59,999),Z}function N5($,J){let[Z,X]=q5($,J.start,J.end);return{start:Z,end:X}}function B5($,J){let{start:Z,end:X}=N5(J?.in,$),Y=+Z>+X,q=Y?+Z:+X,Q=Y?X:Z;Q.setHours(0,0,0,0);let H=J?.step??1;if(!H)return[];if(H<0)H=-H,Y=!Y;let G=[];while(+Q<=q)G.push(S0(Z,Q)),Q.setDate(Q.getDate()+H),Q.setHours(0,0,0,0);return Y?G.reverse():G}function r0($,J){return y($,J?.in).getDate()}function W5($,J){return y($,J?.in).getDay()}function L2($,J){return y($,J?.in).getHours()}function R2($,J){return y($,J?.in).getMinutes()}function k2($,J){return y($,J?.in).getMonth()}function C2($,J){return y($,J?.in).getFullYear()}var a=c(u(),1);var r1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.date,[q,Q]=a.useState(!1),H=a.useRef(null),G=$?new Date($):new Date,z=B0(G)?G:new Date,[M,U]=a.useState(z);a.useEffect(()=>{if(q&&$){let N=new Date($);if(B0(N))U(N)}},[q,$]),a.useEffect(()=>{let N=(k)=>{if(H.current&&!H.current.contains(k.target)){if(q)Q(!1)}};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[q]);let W=()=>{if(!X)Q(!0)},F=(N)=>{if(!N)return"";let k=new Date(N);if(!B0(k))return"Invalid Date";let O="PPP";if(Y?.displayFormat==="usa")O="MM/dd/yyyy";else if(Y?.displayFormat==="euro")O="dd/MM/yyyy";else if(Y?.displayFormat==="iso")O="yyyy-MM-dd";if(Y?.includeTime)if(Y?.timeFormat==="twenty_four_hour")O+=" HH:mm";else O+=" p";let D=P2(k,O);if(Y?.displayTimezone)D+=` (${Intl.DateTimeFormat().resolvedOptions().timeZone})`;return D},B=new Date(M.getFullYear(),M.getMonth(),1),T=K5(M),P=B5({start:B,end:T}),R=W5(B),S=(N)=>{let k=new Date(N);if(Y?.includeTime)k.setHours(L2(z)),k.setMinutes(R2(z));let O=k.toISOString();if(Z(O),!Y?.includeTime)Q(!1)},w=(N,k)=>{let O=$?new Date($):new Date;if(!B0(O))O.setTime(new Date().getTime());if(N==="hour")O.setHours(k);if(N==="minute")O.setMinutes(k);let D=O.toISOString();Z(D)},L=Array.from({length:24},(N,k)=>k),V=Array.from({length:12},(N,k)=>k*5);if(q)return A("div",{className:"relative w-full",ref:H,children:[K("div",{className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm shadow-sm min-h-[28px] flex items-center",children:$?F($):K("span",{className:"text-muted-foreground",children:"Select date..."})}),A("div",{className:"absolute z-50 top-full left-0 mt-1 bg-popover border border-border rounded-lg shadow-xl flex flex-col md:flex-row overflow-hidden min-w-[280px]",children:[A("div",{className:"p-4 w-64",children:[A("div",{className:"flex justify-between items-center mb-4",children:[K("button",{onClick:()=>U(A2(M,-1)),className:"p-1 hover:bg-accent rounded",children:K(z5,{className:"w-4 h-4"})}),K("span",{className:"font-semibold text-sm",children:P2(M,"MMMM yyyy")}),K("button",{onClick:()=>U(A2(M,1)),className:"p-1 hover:bg-accent rounded",children:K(G5,{className:"w-4 h-4"})})]}),K("div",{className:"grid grid-cols-7 gap-1 text-center text-xs mb-2 text-muted-foreground",children:["Su","Mo","Tu","We","Th","Fr","Sa"].map((N)=>K("div",{children:N},N))}),A("div",{className:"grid grid-cols-7 gap-1 text-center text-sm",children:[Array.from({length:R}).map((N,k)=>K("div",{},`empty-${k}`)),P.map((N)=>{let k=$?new Date($):null,O=k&&B0(k)&&r0(k)===r0(N)&&k2(k)===k2(N)&&C2(k)===C2(N);return K("button",{onClick:()=>S(N),className:`w-8 h-8 rounded-full flex items-center justify-center hover:bg-accent transition-colors ${O?"bg-primary text-primary-foreground hover:bg-primary/90":"text-foreground"}`,children:r0(N)},N.toString())})]})]}),Y?.includeTime&&A("div",{className:"border-l border-border bg-muted w-32 flex flex-col",children:[A("div",{className:"p-2 border-b border-border text-xs font-semibold text-muted-foreground flex items-center justify-center gap-1",children:[K(M5,{className:"w-3 h-3"})," Time"]}),A("div",{className:"flex flex-1 h-64",children:[K("div",{className:"flex-1 overflow-y-auto scrollbar-hide border-r border-border",children:L.map((N)=>K("div",{onClick:()=>w("hour",N),className:`px-2 py-1 text-center text-sm cursor-pointer hover:bg-accent ${L2(z)===N?"bg-primary/10 font-medium text-primary":""}`,children:N.toString().padStart(2,"0")},N))}),K("div",{className:"flex-1 overflow-y-auto scrollbar-hide",children:V.map((N)=>K("div",{onClick:()=>w("minute",N),className:`px-2 py-1 text-center text-sm cursor-pointer hover:bg-accent ${R2(z)===N?"bg-primary/10 font-medium text-primary":""}`,children:N.toString().padStart(2,"0")},N))})]})]})]})]});return K("div",{onClick:W,className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded border border-transparent transition-colors ${!X?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$?F($):K("span",{className:"text-muted-foreground italic",children:"Empty"})})},U5=r1;var p=c(u(),1);var s1=({value:$,onSave:J,readOnly:Z})=>{let[X,Y]=p.useState(!1),[q,Q]=p.useState($||""),H=p.useRef(null),G=p.useRef(null),[z,M]=p.useState(!1);p.useEffect(()=>{Q($||"")},[$]),p.useEffect(()=>{if(X&&H.current)H.current.focus(),M(!1)},[X]),p.useEffect(()=>{let B=(T)=>{if(z&&G.current&&!G.current.contains(T.target))M(!1)};if(z)document.addEventListener("mousedown",B);return()=>{document.removeEventListener("mousedown",B)}},[z]);let U=()=>{Y(!1),J(q)},W=(B)=>{B.stopPropagation(),M(!0)},F=(B)=>{if(B.stopPropagation(),!Z)Y(!0)};if(X)return K("textarea",{ref:H,value:q,onChange:(B)=>Q(B.target.value),onBlur:U,className:"w-full min-h-[80px] p-2 border border-ring rounded bg-background text-sm outline-none shadow-sm resize-none"});return A("div",{ref:G,className:"relative w-full text-sm",children:[K("div",{onClick:W,className:`w-full text-foreground rounded border border-transparent transition-all px-2 py-1 line-clamp-2 max-h-[3rem] overflow-hidden ${!Z?"cursor-pointer hover:bg-accent hover:border-border":"cursor-pointer"}`,title:"Click to expand",children:$?$:K("span",{className:"text-muted-foreground italic",children:"Empty"})}),z&&K("div",{onClick:F,className:`absolute top-0 left-0 w-full min-h-full h-auto z-50 bg-background border border-ring rounded shadow-lg px-2 py-1 whitespace-pre-wrap ${!Z?"cursor-text":""}`,children:$?$:K("span",{className:"text-muted-foreground italic",children:"Empty"})})]})},w5=s1;var t=c(u(),1);var a1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.number,[q,Q]=t.useState(!1),[H,G]=t.useState(""),z=t.useRef(null);t.useEffect(()=>{G($!==void 0&&$!==null?$.toString():"")},[$]),t.useEffect(()=>{if(q&&z.current)z.current.focus()},[q]);let M=()=>{if(!X)Q(!0)},U=()=>{if(Q(!1),H==="")Z(void 0);else{let B=parseFloat(H);Z(isNaN(B)?void 0:B)}},W=(B)=>{if(B.key==="Enter")B.stopPropagation(),z.current?.blur()},F=(B)=>{if(B===void 0||B===null||isNaN(B))return"";return B.toFixed(Y?.scale)};if(q)return K("input",{ref:z,type:"number",step:1/Math.pow(10,Y?.scale||0),value:H,onChange:(B)=>G(B.target.value),onBlur:U,onKeyDown:W,onDoubleClick:(B)=>B.stopPropagation(),className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm outline-none shadow-sm text-left font-mono"});return K("div",{onClick:M,onDoubleClick:(B)=>B.stopPropagation(),className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded border border-transparent transition-colors text-left font-mono ${!X?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$!==void 0&&$!==null?F($):K("span",{className:"text-muted-foreground italic font-sans text-left block",children:"Empty"})})},F5=a1;var V5=c(u(),1);var t1=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.rating,q=Math.max(2,Math.min(6,Y?.maxValue||5)),[Q,H]=V5.useState(null),G=(M,U)=>{if(M.stopPropagation(),X)return;let W;if($===U)W=0;else W=U;Z(W)},z=Array.from({length:q},(M,U)=>U+1);return K("div",{className:"flex items-center gap-1 h-[28px]",onMouseLeave:()=>!X&&H(null),onDoubleClick:(M)=>M.stopPropagation(),children:z.map((M)=>{let U=Q!==null?M<=Q:M<=($||0);return K("button",{onClick:(W)=>G(W,M),onMouseEnter:()=>!X&&H(M),className:`focus:outline-none transition-transform ${!X?"cursor-pointer hover:scale-110":"cursor-default"}`,type:"button",disabled:X,children:K(s0,{className:`w-5 h-5 transition-colors ${U?"fill-yellow-400 text-yellow-400":"fill-muted text-muted-foreground/30"}`})},M)})})},A5=t1;var E1=c(u(),1);var H0;(function($){$.Base32IncorrectEncoding="B32_ENC_INVALID",$.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",$.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",$.EncodeTimeNegative="ENC_TIME_NEG",$.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",$.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",$.PRNGDetectFailure="PRNG_DETECT",$.ULIDInvalid="ULID_INVALID",$.Unexpected="UNEXPECTED",$.UUIDInvalid="UUID_INVALID"})(H0||(H0={}));class W0 extends Error{constructor($,J){super(`${J} (${$})`);this.name="ULIDError",this.code=$}}function e1($){let J=Math.floor($()*32)%32;return"0123456789ABCDEFGHJKMNPQRSTVWXYZ".charAt(J)}function $4($){let J=J4(),Z=J&&(J.crypto||J.msCrypto)||null;if(typeof Z?.getRandomValues==="function")return()=>{let X=new Uint8Array(1);return Z.getRandomValues(X),X[0]/256};else if(typeof Z?.randomBytes==="function")return()=>Z.randomBytes(1).readUInt8()/256;throw new W0(H0.PRNGDetectFailure,"Failed to find a reliable PRNG")}function J4(){if(Y4())return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;return null}function Z4($,J){let Z="";for(;$>0;$--)Z=e1(J)+Z;return Z}function X4($,J=10){if(isNaN($))throw new W0(H0.EncodeTimeValueMalformed,`Time must be a number: ${$}`);else if($>281474976710655)throw new W0(H0.EncodeTimeSizeExceeded,`Cannot encode a time larger than 281474976710655: ${$}`);else if($<0)throw new W0(H0.EncodeTimeNegative,`Time must be positive: ${$}`);else if(Number.isInteger($)===!1)throw new W0(H0.EncodeTimeValueMalformed,`Time must be an integer: ${$}`);let Z,X="";for(let Y=J;Y>0;Y--)Z=$%32,X="0123456789ABCDEFGHJKMNPQRSTVWXYZ".charAt(Z)+X,$=($-Z)/32;return X}function Y4(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function L5($,J){let Z=J||$4(),X=!$||isNaN($)?Date.now():$;return X4(X,10)+Z4(16,Z)}var v0=c(u(),1);var{create:Q4,defineProperty:d5,defineProperties:H4,getOwnPropertyDescriptor:K4,getOwnPropertyDescriptors:q4,getOwnPropertySymbols:J2}=Object,l5=Object.prototype.hasOwnProperty,p5=Object.prototype.propertyIsEnumerable,N4=($,J)=>(J=Symbol[$])?J:Symbol.for("Symbol."+$),j0=($)=>{throw TypeError($)},j2=($,J,Z)=>(J in $)?d5($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,R5=($,J)=>{for(var Z in J||(J={}))if(l5.call(J,Z))j2($,Z,J[Z]);if(J2){for(var Z of J2(J))if(p5.call(J,Z))j2($,Z,J[Z])}return $},k5=($,J)=>H4($,q4(J)),B4=($,J)=>{var Z={};for(var X in $)if(l5.call($,X)&&J.indexOf(X)<0)Z[X]=$[X];if($!=null&&J2){for(var X of J2($))if(J.indexOf(X)<0&&p5.call($,X))Z[X]=$[X]}return Z},W4=($)=>{var J;return[,,,Q4((J=void 0)!=null?J:null)]},i5=["class","method","getter","setter","accessor","field","value","get","set"],I0=($)=>$!==void 0&&typeof $!=="function"?j0("Function expected"):$,z4=($,J,Z,X,Y)=>({kind:i5[$],name:J,metadata:X,addInitializer:(q)=>Z._?j0("Already initialized"):Y.push(I0(q||null))}),G4=($,J)=>j2(J,N4("metadata"),$[3]),a0=($,J,Z,X)=>{for(var Y=0,q=$[J>>1],Q=q&&q.length;Y<Q;Y++)J&1?q[Y].call(Z):X=q[Y].call(Z,X);return X},n5=($,J,Z,X,Y,q)=>{var Q,H,G,z,M,U=J&7,W=!1,F=!1,B=$.length+1,T=i5[U+5],P=$[B-1]=[],R=$[B]||($[B]=[]),S=(Y=Y.prototype,K4({get[Z](){return D0(this,q)},set[Z](L){return K0(this,q,L)}},Z));for(var w=X.length-1;w>=0;w--)if(z=z4(U,Z,G={},$[3],R),z.static=W,z.private=F,M=z.access={has:(L)=>(Z in L)},M.get=(L)=>L[Z],M.set=(L,V)=>L[Z]=V,H=(0,X[w])({get:S.get,set:S.set},z),G._=1,H===void 0)I0(H)&&(S[T]=H);else if(typeof H!=="object"||H===null)j0("Object expected");else I0(Q=H.get)&&(S.get=Q),I0(Q=H.set)&&(S.set=Q),I0(Q=H.init)&&P.unshift(Q);return S&&d5(Y,Z,S),Y},o5=($,J,Z)=>J.has($)||j0("Cannot "+Z),D0=($,J,Z)=>(o5($,J,"read from private field"),J.get($)),E0=($,J,Z)=>J.has($)?j0("Cannot add the same private member more than once"):J instanceof WeakSet?J.add($):J.set($,Z),K0=($,J,Z,X)=>(o5($,J,"write to private field"),J.set($,Z),Z);function i($){return $ instanceof g2||$ instanceof a5}var t0=10,M4=class extends y2{constructor($){super($);let J=E5(()=>{let{dragOperation:X}=$;if(!x2(X.activatorEvent))return;if(!i(X.source))return;if(X.status.initialized){let Y=$.registry.plugins.get(b5);if(Y)return Y.disable(),()=>Y.enable()}}),Z=$.monitor.addEventListener("dragmove",(X,Y)=>{queueMicrotask(()=>{if(this.disabled||X.defaultPrevented||!X.nativeEvent)return;let{dragOperation:q}=Y;if(!x2(X.nativeEvent))return;if(!i(q.source))return;if(!q.shape)return;let{actions:Q,collisionObserver:H,registry:G}=Y,{by:z}=X;if(!z)return;let M=U4(z),{source:U,target:W}=q,{center:F}=q.shape.current,B=[],T=[];v(()=>{for(let V of G.droppables){let{id:N}=V;if(!V.accepts(U)||N===(W==null?void 0:W.id)&&i(V)||!V.element)continue;let k=V.shape,O=new f2(V.element,{getBoundingClientRect:(D)=>f5(D,void 0,0.2)});if(!O.height||!O.width)continue;if(M=="down"&&F.y+t0<O.center.y||M=="up"&&F.y-t0>O.center.y||M=="left"&&F.x-t0>O.center.x||M=="right"&&F.x+t0<O.center.x)B.push(V),V.shape=O,T.push(()=>V.shape=k)}}),X.preventDefault(),H.disable();let P=H.computeCollisions(B,g5);v(()=>T.forEach((V)=>V()));let[R]=P;if(!R)return;let{id:S}=R,{index:w,group:L}=U.sortable;Q.setDropTarget(S).then(()=>{let{source:V,target:N,shape:k}=q;if(!V||!i(V)||!k)return;let{index:O,group:D,target:f}=V.sortable,g=w!==O||L!==D,m=g?f:N==null?void 0:N.element;if(!m)return;_5(m);let C=new f2(m);if(!C)return;let E=E2.delta(C,E2.from(k.current.boundingRectangle),V.alignment);if(Q.move({by:E}),g)Q.setDropTarget(V.id).then(()=>H.enable());else H.enable()})})});this.destroy=()=>{Z(),J()}}};function U4($){let{x:J,y:Z}=$;if(J>0)return"right";else if(J<0)return"left";else if(Z>0)return"down";else if(Z<0)return"up"}var{defineProperty:w4,defineProperties:F4,getOwnPropertyDescriptors:V4,getOwnPropertySymbols:C5}=Object,A4=Object.prototype.hasOwnProperty,L4=Object.prototype.propertyIsEnumerable,P5=($,J,Z)=>(J in $)?w4($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,z0=($,J)=>{for(var Z in J||(J={}))if(A4.call(J,Z))P5($,Z,J[Z]);if(C5){for(var Z of C5(J))if(L4.call(J,Z))P5($,Z,J[Z])}return $},G0=($,J)=>F4($,V4(J));function R4($,J,Z){if(J===Z)return $;let X=$.slice();return X.splice(Z,0,X.splice(J,1)[0]),X}function T2($){return"initialIndex"in $&&typeof $.initialIndex==="number"&&"index"in $&&typeof $.index==="number"}function k4($,J,Z){var X,Y,q;let{source:Q,target:H,canceled:G}=J.operation;if(!Q||!H||G){if("preventDefault"in J)J.preventDefault();return $}let z=(L,V)=>L===V||typeof L==="object"&&("id"in L)&&L.id===V;if(Array.isArray($)){let L=$.findIndex((N)=>z(N,Q.id)),V=$.findIndex((N)=>z(N,H.id));if(L===-1||V===-1){if(T2(Q)){let{initialIndex:N,index:k}=Q;if(N===k||N<0||N>=$.length){if("preventDefault"in J)J.preventDefault();return $}return Z($,N,k)}return $}if(!G&&"index"in Q&&typeof Q.index==="number"){let N=Q.index;if(N!==L)return Z($,L,N)}return Z($,L,V)}let M=Object.entries($),U=-1,W,F=-1,B;for(let[L,V]of M){if(U===-1){if(U=V.findIndex((N)=>z(N,Q.id)),U!==-1)W=L}if(F===-1){if(F=V.findIndex((N)=>z(N,H.id)),F!==-1)B=L}if(U!==-1&&F!==-1)break}if(U===-1&&T2(Q)){let{initialGroup:L,initialIndex:V,group:N,index:k}=Q;if(L==null||N==null||!(L in $)||!(N in $)){if("preventDefault"in J)J.preventDefault();return $}if(L===N&&V===k){if("preventDefault"in J)J.preventDefault();return $}if(L===N)return G0(z0({},$),{[L]:Z($[L],V,k)});let O=$[L][V];return G0(z0({},$),{[L]:[...$[L].slice(0,V),...$[L].slice(V+1)],[N]:[...$[N].slice(0,k),O,...$[N].slice(k)]})}if(!Q.manager)return $;let{dragOperation:T}=Q.manager,P=(Y=(X=T.shape)==null?void 0:X.current.center)!=null?Y:T.position.current;if(B==null){if(H.id in $){let L=H.shape&&P.y>H.shape.center.y?$[H.id].length:0;B=H.id,F=L}}if(W==null||B==null||W===B&&U===F){if(W!=null&&W===B&&U===F&&T2(Q)){let L=Q.group!=null&&Q.group!==W,V=Q.index!==U;if(L||V){let N=(q=Q.group)!=null?q:W;if(N in $){if(W===N)return G0(z0({},$),{[W]:Z($[W],U,Q.index)});let k=$[W][U];return G0(z0({},$),{[W]:[...$[W].slice(0,U),...$[W].slice(U+1)],[N]:[...$[N].slice(0,Q.index),k,...$[N].slice(Q.index)]})}}}if("preventDefault"in J)J.preventDefault();return $}if(W===B)return G0(z0({},$),{[W]:Z($[W],U,F)});let S=H.shape&&Math.round(P.y)>Math.round(H.shape.center.y)?1:0,w=$[W][U];return G0(z0({},$),{[W]:[...$[W].slice(0,U),...$[W].slice(U+1)],[B]:[...$[B].slice(0,F+S),w,...$[B].slice(F+S)]})}function C4($,J){return k4($,J,R4)}var T5="__default__",P4=class extends y2{constructor($){super($);let J=()=>{let X=new Map;for(let Y of $.registry.droppables)if(Y instanceof g2){let{sortable:q}=Y,{group:Q}=q,H=X.get(Q);if(!H)H=new Set,X.set(Q,H);H.add(q)}for(let[Y,q]of X)X.set(Y,new Set(e0(q)));return X},Z=[$.monitor.addEventListener("dragover",(X,Y)=>{if(this.disabled)return;let{dragOperation:q}=Y,{source:Q,target:H}=q;if(!i(Q)||!i(H))return;if(Q.sortable===H.sortable)return;let G=J(),z=Q.sortable.group===H.sortable.group,M=G.get(Q.sortable.group),U=z?M:G.get(H.sortable.group);if(!M||!U)return;queueMicrotask(()=>{if(X.defaultPrevented)return;Y.renderer.rendering.then(()=>{var W,F,B;let T=J();for(let[f,g]of G.entries()){let m=Array.from(g).entries();for(let[C,E]of m)if(E.index!==C||E.group!==f||!((W=T.get(f))==null?void 0:W.has(E)))return}let P=Q.sortable.element,R=H.sortable.element;if(!R||!P)return;if(!z&&H.id===Q.sortable.group)return;let S=e0(M),w=z?S:e0(U),L=(F=Q.sortable.group)!=null?F:T5,V=(B=H.sortable.group)!=null?B:T5,N={[L]:S,[V]:w},k=C4(N,X);if(N===k)return;let O=k[V].indexOf(Q.sortable),D=k[V].indexOf(H.sortable);Y.collisionObserver.disable(),O5(P,O,R,D),v(()=>{for(let[f,g]of k[L].entries())g.index=f;if(!z)for(let[f,g]of k[V].entries())g.group=H.sortable.group,g.index=f}),Y.actions.setDropTarget(Q.id).then(()=>Y.collisionObserver.enable())})})}),$.monitor.addEventListener("dragend",(X,Y)=>{if(!X.canceled)return;let{dragOperation:q}=Y,{source:Q}=q;if(!i(Q))return;if(Q.sortable.initialIndex===Q.sortable.index&&Q.sortable.initialGroup===Q.sortable.group)return;queueMicrotask(()=>{let H=J(),G=H.get(Q.sortable.initialGroup);if(!G)return;Y.renderer.rendering.then(()=>{for(let[F,B]of H.entries()){let T=Array.from(B).entries();for(let[P,R]of T)if(R.index!==P||R.group!==F)return}let z=e0(G),M=Q.sortable.element,U=z[Q.sortable.initialIndex],W=U==null?void 0:U.element;if(!U||!W||!M)return;O5(M,U.index,W,Q.index),v(()=>{for(let[F,B]of H.entries()){let T=Array.from(B).values();for(let P of T)P.index=P.initialIndex,P.group=P.initialGroup}})})})})];this.destroy=()=>{for(let X of Z)X()}}};function O5($,J,Z,X){let Y=X<J?"afterend":"beforebegin";Z.insertAdjacentElement(Y,$)}function T4($,J){return $.index-J.index}function e0($){return Array.from($).sort(T4)}var S5=[M4,P4],_2={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},$2=new I5,r5,s5,e,v2,f0,x0,h2,M0;s5=[S2],r5=[S2];var y0=class{constructor($,J){E0(this,v2,a0(e,8,this)),a0(e,11,this),E0(this,f0),E0(this,x0),E0(this,h2,a0(e,12,this)),a0(e,15,this),E0(this,M0),this.register=()=>{return v(()=>{var W,F;(W=this.manager)==null||W.registry.register(this.droppable),(F=this.manager)==null||F.registry.register(this.draggable)}),()=>this.unregister()},this.unregister=()=>{v(()=>{var W,F;(W=this.manager)==null||W.registry.unregister(this.droppable),(F=this.manager)==null||F.registry.unregister(this.draggable)})},this.destroy=()=>{v(()=>{this.droppable.destroy(),this.draggable.destroy()})};var Z=$,{effects:X=()=>[],group:Y,index:q,sensors:Q,type:H,transition:G=_2,plugins:z}=Z,M=B4(Z,["effects","group","index","sensors","type","transition","plugins"]);let U=I2(z,S5);this.droppable=new g2(M,J,this),this.draggable=new a5(k5(R5({},M),{plugins:U,effects:()=>[()=>{var W,F,B;let T=(W=this.manager)==null?void 0:W.dragOperation.status;if((T==null?void 0:T.initializing)&&this.id===((B=(F=this.manager)==null?void 0:F.dragOperation.source)==null?void 0:B.id))$2.clear(this.manager);if(T==null?void 0:T.dragging)$2.set(this.manager,this.id,O2(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{let{index:W,group:F,manager:B}=this,T=D0(this,x0),P=D0(this,f0);if(W!==T||F!==P)K0(this,x0,W),K0(this,f0,F),this.animate()},()=>{var W,F;let{target:B}=this,{isDragSource:T}=this.draggable;if(((F=(W=this.draggable.pluginConfig(m5))==null?void 0:W.feedback)!=null?F:"default")==="move"&&T)this.droppable.disabled=!B},...X()],type:H,sensors:Q}),J,this),K0(this,M0,M.element),this.manager=J,this.index=q,K0(this,x0,q),this.group=Y,K0(this,f0,Y),this.type=H,this.transition=G}get initialIndex(){var $,J;return(J=($=$2.get(this.manager,this.id))==null?void 0:$.initialIndex)!=null?J:this.index}get initialGroup(){var $,J;return(J=($=$2.get(this.manager,this.id))==null?void 0:$.initialGroup)!=null?J:this.group}animate(){O2(()=>{let{manager:$,transition:J}=this,{shape:Z}=this.droppable;if(!$)return;let{idle:X}=$.dragOperation.status;if(!Z||!J||X&&!J.idle)return;$.renderer.rendering.then(()=>{let{element:Y}=this;if(!Y)return;for(let M of Y.getAnimations())if("transitionProperty"in M&&(M.transitionProperty==="transform"||M.transitionProperty==="translate"||M.transitionProperty==="scale"))M.cancel();let q=this.refreshShape();if(!q)return;let Q={x:Z.boundingRectangle.left-q.boundingRectangle.left,y:Z.boundingRectangle.top-q.boundingRectangle.top},{translate:H}=y5(Y),G=D2(Y,H,!1),z=D2(Y,H);if(Q.x||Q.y){let M=x5(D5(Y))?k5(R5({},J),{duration:0}):J;v5({element:Y,keyframes:{translate:[`${G.x+Q.x}px ${G.y+Q.y}px ${G.z}`,`${z.x}px ${z.y}px ${z.z}`]},options:M}).then(()=>{if(!$.dragOperation.status.dragging)this.droppable.shape=void 0})}})})}get manager(){return this.draggable.manager}set manager($){v(()=>{this.draggable.manager=$,this.droppable.manager=$})}set element($){v(()=>{let J=D0(this,M0),Z=this.droppable.element,X=this.draggable.element;if(!Z||Z===J)this.droppable.element=$;if(!X||X===J)this.draggable.element=$;K0(this,M0,$)})}get element(){var $,J;let Z=D0(this,M0);if(!Z)return;return(J=($=j5.get(Z))!=null?$:Z)!=null?J:this.droppable.element}set target($){this.droppable.element=$}get target(){return this.droppable.element}set source($){this.draggable.element=$}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set plugins($){this.draggable.plugins=I2($,S5)}set disabled($){v(()=>{this.droppable.disabled=$,this.draggable.disabled=$})}set data($){v(()=>{this.droppable.data=$,this.draggable.data=$})}set handle($){this.draggable.handle=$}set id($){this.droppable.id=$,this.draggable.id=$}get id(){return this.droppable.id}set sensors($){this.draggable.sensors=$}set modifiers($){this.draggable.modifiers=$}set collisionPriority($){this.droppable.collisionPriority=$}set collisionDetector($){this.droppable.collisionDetector=$!=null?$:h5}set alignment($){this.draggable.alignment=$}get alignment(){return this.draggable.alignment}set type($){v(()=>{this.droppable.type=$,this.draggable.type=$})}get type(){return this.draggable.type}set accept($){this.droppable.accept=$}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts($){return this.droppable.accepts($)}};e=W4();v2=new WeakMap;f0=new WeakMap;x0=new WeakMap;h2=new WeakMap;M0=new WeakMap;n5(e,4,"index",s5,y0,v2);n5(e,4,"group",r5,y0,h2);G4(e,y0);var a5=class extends c5{constructor($,J,Z){super($,J);this.sortable=Z}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},g2=class extends u5{constructor($,J,Z){super($,J);this.sortable=Z}get index(){return this.sortable.index}get group(){return this.sortable.group}};var{defineProperty:O4,defineProperties:S4,getOwnPropertyDescriptors:E4,getOwnPropertySymbols:t5}=Object,I4=Object.prototype.hasOwnProperty,D4=Object.prototype.propertyIsEnumerable,e5=($,J,Z)=>(J in $)?O4($,J,{enumerable:!0,configurable:!0,writable:!0,value:Z}):$[J]=Z,m2=($,J)=>{for(var Z in J||(J={}))if(I4.call(J,Z))e5($,Z,J[Z]);if(t5){for(var Z of t5(J))if(D4.call(J,Z))e5($,Z,J[Z])}return $},f4=($,J)=>S4($,E4(J));function Y1($){let{accept:J,collisionDetector:Z,collisionPriority:X,id:Y,data:q,element:Q,handle:H,index:G,group:z,disabled:M,modifiers:U,sensors:W,target:F,type:B,plugins:T}=$,P=m2(m2({},_2),$.transition),R=X1((w)=>{return new y0(f4(m2({},$),{transition:P,register:!1,handle:Z2(H),element:Z2(Q),target:Z2(F)}),w)}),S=J1(R,x4);return h(Y,()=>R.id=Y),$1(()=>{v(()=>{R.group=z,R.index=G})},[R,z,G]),h(B,()=>R.type=B),h(J,()=>R.accept=J,void 0,_0),h(q,()=>q&&(R.data=q)),h(G,()=>{var w;if(((w=R.manager)==null?void 0:w.dragOperation.status.idle)&&(P==null?void 0:P.idle))R.refreshShape()},Z1),X2(H,(w)=>R.handle=w),X2(Q,(w)=>R.element=w),X2(F,(w)=>R.target=w),h(M,()=>R.disabled=M===!0),h(W,()=>R.sensors=W),h(Z,()=>R.collisionDetector=Z),h(X,()=>R.collisionPriority=X),h(T,()=>R.plugins=T,void 0,_0),h(P,()=>R.transition=P,void 0,_0),h(U,()=>R.modifiers=U,void 0,_0),h($.alignment,()=>R.alignment=$.alignment),{sortable:S,get isDragging(){return S.isDragging},get isDropping(){return S.isDropping},get isDragSource(){return S.isDragSource},get isDropTarget(){return S.isDropTarget},handleRef:v0.useCallback((w)=>{R.handle=w!=null?w:void 0},[R]),ref:v0.useCallback((w)=>{var L,V;if(!w&&((L=R.element)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.element=w!=null?w:void 0},[R]),sourceRef:v0.useCallback((w)=>{var L,V;if(!w&&((L=R.source)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.source=w!=null?w:void 0},[R]),targetRef:v0.useCallback((w)=>{var L,V;if(!w&&((L=R.target)==null?void 0:L.isConnected)&&!((V=R.manager)==null?void 0:V.dragOperation.status.idle))return;R.target=w!=null?w:void 0},[R])}}function x4($,J,Z){if($==="isDragSource"&&!Z&&J)return!0;return!1}function j4($,J,Z){let X=$.slice();return X.splice(Z,0,X.splice(J,1)[0]),X}function Q1($,J,Z,X){if(Z===X)return $;let Y=j4(J,Z,X),q=new Set(J.map((H)=>H.id)),Q=0;return $.map((H)=>q.has(H.id)?Y[Q++]:H)}async function N$($){let J=[],Z=[],X=$.items;if(X)for(let Q=0;Q<X.length;Q++){let H=X[Q];if(H.kind==="file"){let G=H.webkitGetAsEntry?.();if(G)Z.push({entry:G,path:""})}}else return Array.from($.files);let Y=(Q)=>{return new Promise((H)=>{Q.readEntries((G)=>H(G),()=>H([]))})},q=(Q)=>{return new Promise((H,G)=>{Q.file((z)=>H(z),(z)=>G(z))})};while(Z.length>0){let Q=Z.shift();if(!Q)continue;let{entry:H,path:G}=Q;if(H.isFile)try{let z=await q(H),M=G?`${G}/${z.name}`:z.name;Object.defineProperty(z,"webkitRelativePath",{value:M,writable:!1,configurable:!0}),J.push(z)}catch(z){console.error("Error reading file entry:",z)}else if(H.isDirectory){let z=H.createReader(),M=[],U=await Y(z);while(U.length>0)M=M.concat(U),U=await Y(z);let W=G?`${G}/${H.name}`:H.name;for(let F of M)Z.push({entry:F,path:W})}}return J}var d=c(u(),1);var Y2=["red","orange","yellow","green","blue","purple","gray"],u2={red:{bg:"rgba(239, 68, 68, 0.15)",text:"#ef4444",hex:"#ef4444"},orange:{bg:"rgba(249, 115, 22, 0.15)",text:"#f97316",hex:"#f97316"},yellow:{bg:"rgba(234, 179, 8, 0.15)",text:"#ca8a04",hex:"#eab308"},green:{bg:"rgba(34, 197, 94, 0.15)",text:"#16a34a",hex:"#22c55e"},blue:{bg:"rgba(59, 130, 246, 0.15)",text:"#2563eb",hex:"#3b82f6"},purple:{bg:"rgba(168, 85, 247, 0.15)",text:"#9333ea",hex:"#a855f7"},gray:{bg:"rgba(128, 128, 128, 0.15)",text:"#4b5563",hex:"#808080"},system:{bg:"rgba(128, 128, 128, 0.1)",text:"#6b7280",hex:"#808080"}};function q0($){if(!$)return{backgroundColor:"rgba(128, 128, 128, 0.1)",color:"#6b7280"};let J=$.toLowerCase(),Z=u2[J];if(Z)return{backgroundColor:Z.bg,color:Z.text};if($.startsWith("#"))return{backgroundColor:`${$}33`,color:$};return{backgroundColor:"rgba(128, 128, 128, 0.1)",color:$}}function y4($=[]){let J=new Set($.map((X)=>X.color?.toLowerCase()).filter(Boolean)),Z=Y2.filter((X)=>!J.has(X.toLowerCase()));if(Z.length>0)return Z[Math.floor(Math.random()*Z.length)];return Y2[Math.floor(Math.random()*Y2.length)]}var _4={[_.text]:F1,[_.longText]:q1,[_.select]:z1,[_.selectMulti]:U1,[_.rating]:s0,[_.number]:W1,[_.toggle]:w1,[_.date]:N1,[_.user]:V1,[_.userMulti]:A1};function v4({field:$,index:J,onVisibilityChange:Z}){let{ref:X,handleRef:Y}=Y1({id:$.id,index:J}),q=$.config?.type?_4[$.config.type]:null;return A("div",{ref:X,className:"flex items-center justify-between p-2 rounded-md hover:bg-muted",children:[A("div",{className:"flex items-center gap-2",children:[K("div",{ref:Y,className:"cursor-grab",children:K(B1,{className:"h-4 w-4 text-muted-foreground"})}),q&&K(q,{className:"h-4 w-4 text-muted-foreground shrink-0"}),$.aiAutofill&&K(K1,{className:"h-4 w-4 text-muted-foreground shrink-0"}),K("span",{className:"text-sm truncate",children:$.config?.name})]}),K(g0,{checked:$.visible,onCheckedChange:(Q)=>Z($.id,Q)})]})}function E$({projectId:$,onManageFields:J,onSave:Z}){let{fields:X,updateFields:Y}=H5(),[q,Q]=d.useState(""),[H,G]=d.useState("list"),[z,M]=d.useState(""),[U,W]=d.useState(""),[F,B]=d.useState(!1),[T,P]=d.useState(""),[R,S]=d.useState([]),w=H1();d.useEffect(()=>{w.invalidateQueries({queryKey:["fields",$]})},[$,w]);let L=O0.api.projects[":projectId"].fields.order.$patch,{mutate:V}=b2({mutationFn:async(C)=>{if(!(await L(C)).ok)throw Error(I.failed_update_fields_order());return null}}),N=O0.api.projects[":projectId"].fields.$post,{mutate:k}=b2({mutationFn:async(C)=>{let E=await N(C);if(!E.ok)throw Error(I.failed_create_field());return await E.json()},onSuccess:(C)=>{let E={...C,visible:!0},x=[...X,E];Y(x),M(""),S([]),V({param:{projectId:$},json:x.map((j)=>({fieldId:j.id,visible:j.visible||!1}))}),Z?.()}}),O=d.useMemo(()=>X.filter((C)=>C.config?.name?.toLowerCase().includes(q.toLowerCase())),[X,q]),D=(C)=>{if(C.canceled)return;let{source:E}=C.operation;if(!i(E))return;let{initialIndex:x,index:j}=E;if(x===j)return;let d2=Q1(X,O,x,j);Y(d2),V({param:{projectId:$},json:d2.map((l2)=>({fieldId:l2.id,visible:l2.visible||!1}))})},f=(C,E)=>{let x=X.map((j)=>j.id===C?{...j,visible:E}:j);Y(x),V({param:{projectId:$},json:x.map((j)=>({fieldId:j.id,visible:j.visible||!1}))})},g=()=>{if(!z||!U)return;let C=U===_.select?{select:{options:R}}:U===_.selectMulti?{selectMulti:{options:R}}:{};k({param:{projectId:$},json:{config:{name:z,type:U,...C},label:z,aiAutofill:F,description:T}})},m=X.filter((C)=>C.visible).length;if(H==="create")return K("div",{className:"w-80 p-4",children:A("div",{className:"space-y-4",children:[A("div",{className:"space-y-2",children:[K(U0,{htmlFor:"field-name",children:I.field_name()}),K(h0,{id:"field-name",placeholder:I.new_field_placeholder(),value:z,onChange:(C)=>M(C.target.value),autoFocus:!0})]}),A("div",{className:"space-y-2",children:[K(U0,{children:I.field_type()}),A(L1,{children:[K(R1,{asChild:!0,children:A($0,{variant:"outline",className:"w-full justify-between font-normal",children:[U?K("span",{className:"capitalize",children:U.replace(/_/g," ")}):K("span",{className:"text-muted-foreground border-dashed",children:I.select_field_type()}),K(w0,{className:"ml-2 h-4 w-4 opacity-50"})]})}),K(k1,{className:"w-[--radix-dropdown-menu-trigger-width]",children:Object.values(_).map((C)=>K(C1,{onClick:()=>{W(C),S([])},className:"capitalize",children:C.replace(/_/g," ")},C))})]})]}),A("div",{className:"space-y-2",children:[K(U0,{htmlFor:"field-desc",children:I.description()}),K(h0,{id:"field-desc",placeholder:I.description_optional_placeholder(),value:T,onChange:(C)=>P(C.target.value)})]}),A("div",{className:"flex items-center space-x-2",children:[K(g0,{id:"ai-autofill",checked:F,onCheckedChange:B}),K(U0,{htmlFor:"ai-autofill",children:I.ai_autofill()})]}),(U===_.select||U===_.selectMulti)&&A("div",{className:"space-y-2",children:[A("div",{className:"flex items-center justify-between",children:[K(U0,{className:"text-sm font-medium",children:I.options()}),A($0,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>{let C={id:L5(),displayName:I.new_option(),color:y4(R)};S([...R,C])},children:[K(c2,{className:"h-4 w-4 mr-1"})," ",I.add_option()]})]}),K("div",{className:"space-y-2 max-h-40 overflow-y-auto pr-1",children:R.map((C,E)=>A("div",{className:"flex items-center gap-2",children:[K(h0,{value:C.displayName,onChange:(x)=>{let j=[...R];j[E]={...C,displayName:x.target.value},S(j)},placeholder:I.option_name_placeholder(),className:"h-8 flex-1"}),A(n,{children:[K(o,{asChild:!0,children:K("button",{type:"button",className:"w-6 h-6 rounded-full border shrink-0 cursor-pointer focus:outline-none hover:scale-105 transition-transform",style:{backgroundColor:u2[C.color||""]?.hex||C.color||"#808080"}})}),K(r,{className:"p-2 w-auto",align:"end",children:K("div",{className:"flex gap-1",children:Y2.map((x)=>K("button",{type:"button",className:"w-5 h-5 rounded-full border cursor-pointer hover:scale-110 transition-transform",style:{backgroundColor:u2[x]?.hex||x},onClick:()=>{let j=[...R];j[E]={...C,color:x},S(j)}},x))})})]}),K($0,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>{S(R.filter((x,j)=>j!==E))},children:K(F0,{className:"h-4 w-4"})})]},C.id))})]}),A("div",{className:"flex gap-2 pt-2",children:[K($0,{variant:"secondary",className:"flex-1",onClick:()=>{G("list"),M(""),W(""),B(!1),P(""),S([])},children:I.cancel()}),K($0,{className:"flex-1",onClick:g,disabled:!z||!U,children:I.save()})]})]})});return A("div",{className:"w-80 p-4",children:[K("div",{className:"flex items-center justify-between mb-4",children:A("h3",{className:"font-semibold",children:[I.fields()," ",K("span",{className:"text-muted-foreground text-sm font-normal",children:I.visible_count({count:m})})]})}),A("div",{className:"relative mb-4",children:[K(G1,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),K(h0,{placeholder:I.search_fields_placeholder(),value:q,onChange:(C)=>Q(C.target.value),className:"pl-8"})]}),K("div",{className:"max-h-60 overflow-y-auto pr-2",children:K(S1,{sensors:[O1.configure({activationConstraints:[new T1.Distance({value:8})]}),P1],onDragEnd:D,children:O.map((C,E)=>K(v4,{field:C,index:E,onVisibilityChange:f},C.id))})}),J&&A("div",{className:"mt-4 space-y-2",children:[A($0,{variant:"secondary",className:"w-full",onClick:J,children:[K(M1,{className:"h-4 w-4 mr-2"}),I.manage_fields()]}),A($0,{className:"w-full",onClick:()=>G("create"),children:[K(c2,{className:"h-4 w-4 mr-2"}),I.new_field()]})]})]})}var h4=({value:$,config:J,onSave:Z,readOnly:X})=>{let Y=J?.select,[q,Q]=E1.useState(!1),H=Y?.options?.find((W)=>W.id===$),G=()=>{if(!X)Q(!0)},z=(W)=>{Z(W),Q(!1)};return K("div",{className:"relative w-full",onClick:(W)=>W.stopPropagation(),children:A(n,{open:!X&&q,onOpenChange:(W)=>{if(X)return;Q(W)},children:[K(o,{asChild:!0,children:A("div",{onClick:G,className:`flex items-center justify-between w-full min-h-[28px] px-2 py-1 rounded border border-transparent transition-colors ${!X?"cursor-pointer hover:bg-accent hover:border-border group":""}`,children:[((W)=>{if(!W)return K("span",{className:"text-muted-foreground italic",children:"Select an option"});return K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(W.color),children:W.displayName})})(H),!X&&K(w0,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100"})]})}),A(r,{className:"p-1 w-[--radix-popover-trigger-width] min-w-[150px] max-h-60 overflow-auto bg-popover border border-border rounded-lg shadow-lg",align:"start",children:[A("div",{onClick:()=>z(""),className:"px-3 py-2 text-sm text-muted-foreground hover:bg-accent cursor-pointer flex items-center gap-2",children:[K(F0,{className:"w-3 h-3"})," Clear"]}),Y?.options?.map((W)=>K("div",{onClick:()=>z(W.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center",children:K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(W.color),children:W.displayName})},W.id))]})]})})},I1=h4;var J0=c(u(),1);var g4=({value:$=[],config:J,onSave:Z,readOnly:X})=>{let Y=J?.selectMulti,q=J0.useRef(null),[Q,H]=J0.useState(!1),[G,z]=J0.useState(!1),[M,U]=J0.useState($.length),W=Y?.options?.filter((w)=>($||[]).includes(w.id))||[];J0.useLayoutEffect(()=>{if(Q||G){U(W.length);return}if(q.current){let w=q.current.offsetWidth,V=document.createElement("canvas").getContext("2d");if(V){V.font="12px ui-sans-serif, system-ui, sans-serif";let N=0,k=0,D=w-28;for(let f=0;f<W.length;f++){let m=V.measureText(W[f].displayName).width+16+4;if(N+m>D&&f<W.length-1)break;if(f===W.length-1){if(N+m<=w)k++;break}N+=m,k++}U(k)}}},[W,Q,G,$]);let F=(w)=>{let L=$||[],V;if(L.includes(w))V=L.filter((N)=>N!==w);else V=[...L,w];Z(V)},B=(w)=>{if(w.stopPropagation(),Q)return;let L=W.length-M;if(!G&&L>0)z(!0);else if(!X)H(!0)},T=(w)=>{if(w.stopPropagation(),!X)H(!0)},P=W.length-M;return K("div",{className:"relative w-full",onClick:(w)=>w.stopPropagation(),children:A(n,{open:!X&&(G&&!Q||Q),onOpenChange:(w)=>{if(X)return;if(!w)z(!1),H(!1)},children:[K(o,{asChild:!0,children:A("div",{ref:q,onClick:B,className:`w-full px-1 py-1 flex flex-wrap gap-1 rounded border border-transparent transition-all box-border h-[32px] overflow-hidden ${!X||P>0?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:[W.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),W.slice(0,M).map((w)=>K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border border-transparent whitespace-nowrap h-[22px]",style:q0(w.color),children:w.displayName},w.id)),P>0&&A("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-muted text-muted-foreground h-[22px]",children:["+",P]})]})}),K(r,{className:`p-1 bg-popover border rounded-lg shadow-xl max-h-60 overflow-auto ${G&&!Q?"w-[--radix-popover-trigger-width] min-w-[200px] flex flex-wrap gap-1 border-ring min-h-[32px] h-auto cursor-pointer":"w-64 border-border"}`,align:"start",onClick:G&&!Q?T:void 0,children:G&&!Q?A(Q2,{children:[W.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),W.map((w)=>K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium border border-transparent whitespace-nowrap h-[22px]",style:q0(w.color),children:w.displayName},w.id))]}):Y?.options?.map((w)=>{let L=($||[]).includes(w.id);return A("div",{onClick:()=>F(w.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center justify-between",children:[K("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium",style:q0(w.color),children:w.displayName}),L&&K(H2,{className:"w-4 h-4 text-primary"})]},w.id)})})]})})},D1=g4;var Z0=c(u(),1);var m4=({value:$,onSave:J,readOnly:Z})=>{let[X,Y]=Z0.useState(!1),[q,Q]=Z0.useState($||""),H=Z0.useRef(null);Z0.useEffect(()=>{Q($||"")},[$]),Z0.useEffect(()=>{if(X&&H.current)H.current.focus()},[X]);let G=()=>{if(!Z)Y(!0)},z=()=>{Y(!1),J(q)},M=(U)=>{if(U.key==="Enter")H.current?.blur()};if(X)return K("input",{ref:H,type:"text",value:q,onChange:(U)=>Q(U.target.value),onBlur:z,onKeyDown:M,className:"w-full px-2 py-1 border border-ring rounded bg-background text-sm outline-none shadow-sm"});return K("div",{onClick:G,className:`w-full min-h-[28px] px-2 py-1 text-sm text-foreground rounded truncate border border-transparent transition-colors ${!Z?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:$||K("span",{className:"text-muted-foreground italic",children:"Empty"})})},f1=m4;var b4=({value:$,onSave:J,readOnly:Z})=>{return K("div",{className:"flex items-center h-[28px] w-full",onClick:(Y)=>Y.stopPropagation(),children:K(g0,{checked:$,onCheckedChange:(Y)=>{if(!Z)J(Y)},disabled:Z,className:"cursor-pointer"})})},x1=b4;var q2=c(u(),1);var c4=({value:$,onSave:J,readOnly:Z})=>{let X=K2(),{members:Y,fetchMembers:q}=o0(),[Q,H]=q2.useState(!1);q2.useEffect(()=>{if(X)q(X)},[X,q]);let G=Y.find((B)=>B.id===$),z=()=>{if(!Z)H(!0)},M=(B)=>{J(B),H(!1)},U=(B)=>{if(Z)return;H(B)},W=(B)=>{return B.split(" ").map((T)=>T[0]).slice(0,2).join("").toUpperCase()};return K("div",{className:"relative w-full",onClick:(B)=>B.stopPropagation(),children:A(n,{open:!Z&&Q,onOpenChange:U,children:[K(o,{asChild:!0,children:A("div",{onClick:z,className:`flex items-center justify-between w-full h-[28px] px-2 rounded border border-transparent transition-colors ${!Z?"cursor-pointer hover:bg-accent hover:border-border group":""}`,children:[((B)=>{if(!B)return K("span",{className:"text-muted-foreground italic text-sm",children:"Select user"});return A("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium bg-muted text-foreground border h-[22px]",children:[A(V0,{className:"w-4 h-4",children:[K(A0,{src:B.image,alt:B.name,className:"object-cover"}),K(L0,{className:"text-[8px] bg-rose-400 text-black font-semibold",children:W(B.name)})]}),K("span",{className:"truncate max-w-[120px]",children:B.name})]})})(G),!Z&&K(w0,{className:"w-4 h-4 text-muted-foreground opacity-0 group-hover:opacity-100"})]})}),A(r,{className:"p-1 w-[--radix-popover-trigger-width] min-w-[200px] max-h-60 overflow-auto bg-popover border border-border rounded-lg shadow-lg",align:"start",children:[A("div",{onClick:()=>M(""),className:"px-3 py-2 text-sm text-muted-foreground hover:bg-accent cursor-pointer flex items-center gap-2 rounded-sm",children:[K(F0,{className:"w-3 h-3"})," Clear"]}),Y.map((B)=>A("div",{onClick:()=>M(B.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center gap-2 rounded-sm",children:[A(V0,{className:"w-5 h-5",children:[K(A0,{src:B.image,alt:B.name,className:"object-cover"}),K(L0,{className:"text-[10px] bg-rose-400 text-black font-semibold",children:W(B.name)})]}),K("span",{className:"text-sm font-medium text-foreground",children:B.name})]},B.id))]})]})})},j1=c4;var s=c(u(),1);var u4=({value:$=[],onSave:J,readOnly:Z})=>{let X=K2(),{members:Y,fetchMembers:q}=o0(),Q=s.useRef(null),[H,G]=s.useState(!1),[z,M]=s.useState(!1),[U,W]=s.useState($.length);s.useEffect(()=>{if(X)q(X)},[X,q]);let F=Y.filter((N)=>($||[]).includes(N.id)),B=(N)=>{return N.split(" ").map((k)=>k[0]).slice(0,2).join("").toUpperCase()};s.useLayoutEffect(()=>{if(H||z){W(F.length);return}if(Q.current){let N=Q.current.offsetWidth,O=document.createElement("canvas").getContext("2d");if(O){O.font="12px ui-sans-serif, system-ui, sans-serif";let D=0,f=0,m=N-28;for(let C=0;C<F.length;C++){let x=O.measureText(F[C].name).width+42;if(D+x>m&&C<F.length-1)break;if(C===F.length-1){if(D+x<=N)f++;break}D+=x,f++}W(f)}}},[F,H,z,$]);let T=(N)=>{let k=$||[],O;if(k.includes(N))O=k.filter((D)=>D!==N);else O=[...k,N];J(O)},P=(N)=>{if(N.stopPropagation(),H)return;let k=F.length-U;if(!z&&k>0)M(!0);else if(!Z)G(!0)},R=(N)=>{if(N.stopPropagation(),!Z)G(!0)},S=F.length-U,w=z&&!H||H,L=(N)=>{if(Z)return;if(!N)M(!1),G(!1)},V=(N)=>{return A("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium bg-muted text-foreground border whitespace-nowrap h-[22px]",children:[A(V0,{className:"w-4 h-4",children:[K(A0,{src:N.image,alt:N.name,className:"object-cover"}),K(L0,{className:"text-[8px] bg-rose-400 text-black font-semibold",children:B(N.name)})]}),K("span",{className:"truncate max-w-[100px]",children:N.name})]},N.id)};return K("div",{className:"relative w-full",onClick:(N)=>N.stopPropagation(),children:A(n,{open:!Z&&w,onOpenChange:L,children:[K(o,{asChild:!0,children:A("div",{ref:Q,onClick:P,className:`w-full px-1 py-1 flex flex-wrap gap-1 rounded border border-transparent transition-all box-border h-[32px] overflow-hidden ${!Z||S>0?"cursor-pointer hover:bg-accent hover:border-border":""}`,children:[F.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),F.slice(0,U).map(V),S>0&&A("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded-full text-xs font-medium bg-muted text-muted-foreground h-[22px]",children:["+",S]})]})}),K(r,{className:`p-1 bg-popover border rounded-lg shadow-xl max-h-60 overflow-auto ${z&&!H?"w-[--radix-popover-trigger-width] min-w-[200px] flex flex-wrap gap-1 border-ring min-h-[32px] h-auto cursor-pointer":"w-64 border-border"}`,align:"start",onClick:z&&!H?R:void 0,children:z&&!H?A(Q2,{children:[F.length===0&&K("span",{className:"text-muted-foreground text-sm italic px-1 pt-0.5",children:"Empty"}),F.map(V)]}):Y.map((N)=>{let k=($||[]).includes(N.id);return A("div",{onClick:()=>T(N.id),className:"px-3 py-2 hover:bg-accent cursor-pointer flex items-center justify-between rounded-sm",children:[A("div",{className:"flex items-center gap-2",children:[A(V0,{className:"w-5 h-5",children:[K(A0,{src:N.image,alt:N.name,className:"object-cover"}),K(L0,{className:"text-[10px] bg-rose-400 text-black font-semibold",children:B(N.name)})]}),K("span",{className:"text-sm font-medium text-foreground",children:N.name})]}),k&&K(H2,{className:"w-4 h-4 text-primary"})]},N.id)})})]})})},y1=u4;var d4=($)=>{if(!$.config)return K("div",{children:"Unknown Field Type"});switch($.config.type){case"text":return K(f1,{...$,value:$.value,onSave:$.onSave});case"longText":return K(w5,{...$,value:$.value,onSave:$.onSave});case"select":return K(I1,{...$,value:$.value,onSave:$.onSave});case"selectMulti":return K(D1,{...$,value:$.value,onSave:$.onSave});case"rating":return K(A5,{...$,value:$.value,onSave:$.onSave});case"number":return K(F5,{...$,value:$.value,onSave:$.onSave});case"toggle":return K(x1,{...$,value:$.value,onSave:$.onSave});case"date":return K(U5,{...$,value:$.value,onSave:$.onSave});case"user":return K(j1,{...$,value:$.value,onSave:$.onSave});case"userMulti":return K(y1,{...$,value:$.value,onSave:$.onSave});default:return K("div",{children:"Unknown Field Type"})}},k6=d4;var T6=({progress:$,className:J})=>{let X=2*Math.PI*20,Y=X-Math.min(100,Math.max(0,$))/100*X;return A("svg",{viewBox:"0 0 50 50",className:R0("w-12 h-12",J),children:[K("circle",{cx:"25",cy:"25",r:20,className:"stroke-muted",strokeWidth:"4",fill:"transparent"}),K("circle",{cx:"25",cy:"25",r:20,className:"stroke-primary transition-all duration-300 ease-out",strokeWidth:"4",fill:"transparent",strokeDasharray:X,strokeDashoffset:Y,transform:"rotate(-90 25 25)"}),K("text",{x:"50%",y:"50%",textAnchor:"middle",dy:".3em",className:"fill-foreground text-[10px] font-bold",children:`${Math.round($)}%`})]})};var l4=($)=>{if(isNaN($))return"00:00";let J=new Date($*1000),Z=J.getUTCHours(),X=J.getUTCMinutes().toString().padStart(2,"0"),Y=J.getUTCSeconds().toString().padStart(2,"0");if(Z)return`${Z}:${X}:${Y}`;return`${X}:${Y}`},E6=($,J,Z,X)=>{if(Z==="frames")return`${$} fr`;if(Z==="standard")return l4($/J);let Y=Math.round(J),q=J!==Y,Q=!1;if(q&&(Y===30||Y===60))Q=!0;let H=0;if(X){let B=X.match(/^([012]\d):(\d\d):(\d\d)(:|;|\.)(\d+)$/);if(B){let T=parseInt(B[1],10),P=parseInt(B[2],10),R=parseInt(B[3],10),S=parseInt(B[5],10);if(Q=B[4]!==":",H=(T*3600+P*60+R)*Y+S,Q){let w=T*60+P,L=J<30?2:4;H-=L*(w-Math.floor(w/10))}}}let G=$+H;if(Q){let B=J<30?2:4,T=Math.floor(G/(17982*B/2)),P=G%(17982*B/2);if(P<B)P=P+B;G+=9*B*T+B*Math.floor((P-B)/(1798*B/2))}let z=G%Y,M=Math.floor(G/Y)%60,U=Math.floor(G/(Y*60))%60,W=Math.floor(G/(Y*3600))%24,F=Q?";":":";return`${W.toString().padStart(2,"0")}:${U.toString().padStart(2,"0")}:${M.toString().padStart(2,"0")}${F}${z.toString().padStart(2,"0")}`};var I6=($,J)=>{if(!J)return 0;let Z=1/J;return $*Z+Z/2},p4=($)=>Math.max(100,3000/($||30)),D6=({dbTotalFrames:$,containerDuration:J,frameRate:Z})=>{let X=Z||30,Y=Math.round(J*X);if($<=0)return Y;let q=$/X,Q=J-q,H=p4(X)/1000;return Q>H?Y:$};var _1=c(u(),1);function y6({className:$,defaultValue:J,value:Z,min:X=0,max:Y=100,...q}){let Q=_1.useMemo(()=>Array.isArray(Z)?Z:Array.isArray(J)?J:[X,Y],[Z,J,X,Y]);return A(m0.Root,{"data-slot":"slider",defaultValue:J,value:Z,min:X,max:Y,className:R0("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",$),...q,children:[K(m0.Track,{"data-slot":"slider-track",className:R0("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:K(m0.Range,{"data-slot":"slider-range",className:R0("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:Q.length},(H,G)=>K(m0.Thumb,{"data-slot":"slider-thumb",className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},G))]})}
2
- export{A2 as x,K5 as y,N5 as z,k2 as A,C2 as B,Q1 as C,N$ as D,H5 as E,L5 as F,T6 as G,i4 as H,A5 as I,i as J,Y1 as K,Y2 as L,u2 as M,q0 as N,y4 as O,_4 as P,E$ as Q,o0 as R,k6 as S,l4 as T,E6 as U,I6 as V,p4 as W,D6 as X,y6 as Y};
@@ -1,2 +0,0 @@
1
- import{u as p}from"./chunk-mhj0pqq3.js";import{$ as _z,Z as Yz,_ as Zz,aa as $z,ba as Kz}from"./chunk-0sajh8fw.js";import{bb as Uz}from"./chunk-ef5v7gta.js";import{db as A}from"./chunk-gct52xks.js";import{wg as v}from"./chunk-0jr6q4j4.js";import{dh as Jz}from"./chunk-6edadcpn.js";import{rh as Xz}from"./chunk-w98wvk17.js";import{$h as r,Ai as M,Bi as s,Bj as zz,Ch as n,Ek as Y,Gi as b,Tj as S,ak as Gz,cj as h,ki as o,ti as t,vh as Bz,vi as e,wh as B,wk as T,xh as z,yh as J,zh as a}from"./chunk-jt4yh37q.js";import{Il as Rz}from"./chunk-mgbqjbfc.js";var _=Rz(Bz(),1);function uz({projectId:O,contextAssetId:R}){let{isHistoryMode:W,setIsHistoryMode:I,currentSessionId:Vz,chatAssets:u,removeAsset:Wz,messages:E,historySessions:g,isStreaming:D,fetchHistorySessions:m,loadSession:Lz,deleteSession:Nz,startNewSession:Qz,sendMessage:Pz,abortActiveSession:Oz,selectedAgentId:H,setSelectedAgentId:w,inputText:C,setInputText:l}=v(),{teamId:Z,ensureTeamIdForProject:j}=Xz();_.useEffect(()=>{if(O)j(O)},[O,j]);let{data:Dz=[]}=n({queryKey:["agents",Z],queryFn:async()=>{if(!Z)return[];let G=await r.api.teams[":teamId"].agents.$get({param:{teamId:Z}});if(!G.ok)throw Error("failed to fetch agents");return G.json()},enabled:!!Z}),F=Dz.filter((G)=>G.type==="chat"&&G.enabled);_.useEffect(()=>{if(F.length>0){if(!F.some((X)=>X.id===H))w(F[0].id)}},[F,H,w]);let d=_.useRef(null),y=_.useRef(null),k=_.useRef(!0),f=_.useRef(!0);_.useEffect(()=>{f.current=!0,k.current=!0},[O,R,W]),_.useEffect(()=>{let G=y.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!G)return;let{scrollTop:X,isAtBottom:$}=v.getState(),V=setTimeout(()=>{if($)G.scrollTop=G.scrollHeight;else G.scrollTop=X;let Q=setTimeout(()=>{f.current=!1},50);return()=>clearTimeout(Q)},0);return()=>clearTimeout(V)},[O,R,W]),_.useEffect(()=>{let G=y.current?.querySelector('[data-slot="scroll-area-viewport"]');if(!G)return;let X=()=>{if(f.current)return;let $=G.scrollTop,V=G.scrollHeight-$-G.clientHeight<10;v.getState().setScrollState($,V)};return G.addEventListener("scroll",X),()=>{G.removeEventListener("scroll",X)}},[O,R,W]);let{ref:qz,isDropTarget:Ez}=Uz({id:"chatbot-sidebar",data:{type:"chatbot-sidebar"}});_.useEffect(()=>{if(!W){let{isAtBottom:G}=v.getState();if(G||D){let X=k.current?"auto":"smooth";d.current?.scrollIntoView({behavior:X})}k.current=!1}},[E,D,W]),_.useEffect(()=>{if(W&&Z)m(Z)},[W,m,Z]);let q=a(),Fz=_.useCallback(()=>{q.invalidateQueries({queryKey:["search"]}),q.invalidateQueries({queryKey:["folders"]}),q.invalidateQueries({queryKey:["files"]}),q.invalidateQueries({queryKey:["file"]}),q.invalidateQueries({queryKey:["version_stacks"]}),q.invalidateQueries({queryKey:["projects"]})},[q]),x=()=>{if(!C.trim()||D||!Z)return;Pz(Z,C,O,R,Fz),l("")},Hz=(G)=>{if(G.nativeEvent.isComposing)return;if(G.key==="Enter"&&!G.shiftKey)G.preventDefault(),x()},c=(G)=>{if(typeof G==="string")return G;if(Array.isArray(G))return G.map((X)=>{if(typeof X==="string")return X;if(X&&typeof X==="object"&&"type"in X&&X.type==="text"&&"text"in X)return String(X.text);return""}).join("");return""},i=(G)=>{return G.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:")},Cz=(G)=>{switch(G.role){case"user":return z("div",{className:"flex justify-end w-full",children:z("div",{className:"bg-primary text-primary-foreground rounded-lg px-3 py-2 max-w-[85%] text-sm whitespace-pre-wrap shadow-xs break-words",children:c(G.content)})},G.id);case"assistant":{let $=G.content;if(!$)return null;let V=[];if($.forEach((K,L)=>{if(!K||typeof K!=="object")return;let N=K;switch(N.type){case"text":{let U=N.text;if(typeof U!=="string"||!U.trim())return;V.push(z("div",{className:"text-sm leading-[1.8] prose prose-sm dark:prose-invert max-w-none break-words",children:z(p,{components:{pre:({node:P,...vz})=>z("pre",{className:"whitespace-pre-wrap break-all break-words bg-muted text-foreground p-4 rounded-md border border-border/50 font-mono text-sm",...vz})},children:i(U)})},`txt-${L}`));break}case"thinking":{let U=N.thinking;if(typeof U!=="string"||!U.trim())return;V.push(J("details",{className:"group border border-border/50 rounded-lg bg-muted/20 my-2 overflow-hidden",children:[J("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-medium text-muted-foreground select-none cursor-pointer hover:bg-muted/40 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[z(s,{className:"h-3.5 w-3.5 text-primary/70 animate-pulse"}),z("span",{children:Y.role_thinking()||"Thinking"}),z(b,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),z("div",{className:"p-3 pt-0 text-xs text-muted-foreground/90 border-t border-border/40 bg-muted/10 leading-relaxed prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap font-sans",children:z(p,{children:i(U)})})]},`think-${L}`));break}case"toolCall":{let U=String(N.name||N.toolName||Y.unknown()),P=N.arguments||N.args;V.push(J("details",{className:"group border border-border/50 rounded-lg bg-violet-500/5 my-2 overflow-hidden",children:[J("summary",{className:"flex items-center gap-2 p-2.5 text-xs font-semibold text-violet-600 dark:text-violet-400 select-none cursor-pointer hover:bg-violet-500/10 transition-colors list-none [&::-webkit-details-marker]:hidden",children:[z(Gz,{className:"h-3.5 w-3.5"}),z("span",{children:Y.calling_tool()}),z("span",{className:"font-mono bg-violet-500/10 px-1.5 py-0.5 rounded text-[11px] text-violet-700 dark:text-violet-300",children:U}),z(b,{className:"h-3 w-3 ml-auto transition-transform group-open:rotate-180"})]}),!!P&&J("div",{className:"p-3 pt-0 text-[10px] text-muted-foreground/90 border-t border-border/40 bg-violet-500/5 font-sans",children:[z("div",{className:"text-[9px] text-muted-foreground/60 uppercase font-bold tracking-wider mb-1.5",children:Y.tool_arguments()||"Arguments"}),z("pre",{className:"font-mono bg-muted/30 p-2 rounded border border-border/30 overflow-x-auto max-h-32",children:JSON.stringify(P,null,2)})]})]},`tool-${L}`));break}case"image":{let U=String(N.mimeType||"image/png"),P=String(N.data||"");V.push(z("div",{className:"my-2 max-w-full",children:P?z("img",{src:P.startsWith("data:")?P:`data:${U};base64,${P}`,alt:"Attached asset",className:"max-h-60 rounded border border-border/50 object-contain shadow-xs"}):z("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:Y.image_object()})},`img-${L}`));break}default:{let U=JSON.stringify(K,null,2);if(U==="{}")return;V.push(z("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:U},`other-${L}`))}}}),V.length===0)return null;let Q=!1;if($.length>0){let K=$[$.length-1];if(typeof K==="string"&&K.trim().length>0)Q=!0;else if(K&&typeof K==="object"){let L=K;if(L.type==="text"&&typeof L.text==="string"&&L.text.trim().length>0)Q=!0}}return J("div",{className:"flex flex-col w-full space-y-1",children:[z("div",{className:"space-y-2 w-full",children:V}),Q&&z("div",{className:"text-[10px] text-muted-foreground self-start italic pt-1",children:Y.created_by_agent()})]},G.id)}case"toolResult":return z("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-muted/40 p-2 rounded-md border border-border/50",children:z("span",{className:"font-semibold",children:Y.tool_result_with_name({name:G.toolName||"tool"})})},G.id);case"thinking_level_change":case"custom":{let X=G;if(X.customType==="context_display_info"){let Q=X.details?.assets||[];if(Q.length===0)return null;return J("div",{className:"text-xs text-muted-foreground bg-muted/40 p-2.5 rounded-lg border border-border/50 space-y-1 my-1",children:[z("div",{className:"font-semibold",children:Y.assets_added_to_context()}),z("ul",{className:"list-disc list-inside space-y-0.5",children:Q.map((K)=>J("li",{className:"truncate",children:[K.name," ",J("span",{className:"text-muted-foreground/70",children:["(",K.type,")"]})]},K.id))})]},G.id)}let $=X.content||"";return z("div",{className:"text-center text-xs text-muted-foreground italic bg-muted/20 py-1.5 rounded",children:c($)},G.id)}default:return null}};return J("div",{ref:qz,className:T("relative flex flex-col h-full bg-background transition-colors duration-200 min-h-0"),children:[Ez&&z("div",{className:"absolute inset-0 bg-accent/30 border-2 border-primary z-50 pointer-events-none flex items-center justify-center p-6 text-center animate-in fade-in duration-150",children:J("div",{className:"bg-background/95 text-foreground px-4 py-3 rounded-xl border border-border/80 flex flex-col items-center gap-2 shadow-lg max-w-[80%] animate-in zoom-in-95 duration-150",children:[z(M,{className:"h-6 w-6 text-primary animate-bounce"}),z("span",{className:"text-sm font-semibold text-foreground",children:Y.chatbot_drag_drop_hint()||"Drop assets here"})]})}),z("div",{className:"flex items-center justify-between p-4 pt-[0.7rem] flex-shrink-0",children:W?J(B,{children:[z("div",{className:"flex items-center gap-2 font-semibold",children:z("span",{children:Y.history()})}),z("button",{onClick:()=>I(!1),className:"p-1.5 hover:bg-accent rounded-md text-muted-foreground hover:text-foreground transition-colors",title:"Close History",children:z(t,{className:"h-4 w-4"})})]}):J(B,{children:[z("div",{className:"flex items-center gap-2 font-semibold",children:z("span",{children:Y.shumai_agent()})}),J("div",{className:"flex items-center gap-1",children:[z("button",{onClick:Qz,className:"p-1.5 hover:bg-accent rounded-md text-muted-foreground hover:text-foreground transition-colors",title:Y.new_chat(),children:z(zz,{className:"h-4 w-4"})}),z("button",{onClick:()=>I(!0),className:"p-1.5 hover:bg-accent rounded-md text-muted-foreground hover:text-foreground transition-colors",title:Y.history(),children:z(h,{className:"h-4 w-4"})})]})]})}),W?z(A,{className:"flex-1 p-4 min-h-0",children:g.length===0?J("div",{className:"flex flex-col items-center justify-center h-48 text-muted-foreground p-4 text-center",children:[z(h,{className:"h-8 w-8 mb-2 opacity-50 text-muted-foreground"}),z("p",{className:"text-sm",children:Y.no_history_sessions()})]}):z("div",{className:"space-y-2 pb-4",children:g.map((G)=>{let X=G.id===Vz;return J("div",{className:T("group relative flex items-center justify-between p-3 border rounded-lg transition-all cursor-pointer bg-card",X?"border-primary":"border-border hover:bg-accent/30"),children:[J("div",{onClick:()=>Z&&Lz(Z,G.id),className:"flex-1 min-w-0 pr-6",children:[z("div",{className:"text-sm font-semibold text-foreground truncate",children:G.name||Y.new_chat()}),z("div",{className:"text-xs text-muted-foreground mt-0.5",children:Jz(G.createdAt)})]}),z("button",{onClick:($)=>{if($.stopPropagation(),Z&&confirm(Y.delete_session_confirm()))Nz(Z,G.id)},className:"absolute right-3 opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-destructive p-1 rounded hover:bg-muted",title:"Delete Session",children:z(S,{className:"h-4 w-4"})})]},G.id)})})}):J(B,{children:[z(A,{ref:y,className:"flex-1 p-4 min-h-0 [&>div>div]:!block",children:E.length===0?J("div",{className:"flex flex-col items-center justify-center h-48 border-2 border-dashed border-border rounded-lg text-muted-foreground p-4 text-center",children:[z(M,{className:"h-8 w-8 mb-2 opacity-50 text-muted-foreground"}),z("p",{className:"text-sm",children:Y.chatbot_drag_drop_hint()})]}):J("div",{className:"space-y-4 pb-4",children:[E.map(Cz),D&&E.length>0&&E[E.length-1].role==="user"&&J("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground italic",children:[z(o,{className:"h-3 w-3 animate-spin text-primary"}),z("span",{children:"Thinking..."})]}),z("div",{ref:d})]})}),z("div",{className:"p-2 flex-shrink-0 bg-background",children:J("div",{className:"relative flex flex-col w-full border border-foreground/20 rounded-2xl shadow-xs transition-all duration-200 focus-within:ring-2 focus-within:ring-primary focus-within:border-transparent bg-background overflow-hidden",children:[u.length>0&&z("div",{className:"flex flex-col gap-1.5 min-h-0 max-h-[160px] overflow-y-auto border-b border-border bg-muted/5 p-3 divide-y divide-border/50",children:u.map((G)=>J("div",{className:"flex items-center justify-between py-1.5 text-xs group",children:[J("div",{className:"flex items-baseline gap-1.5 min-w-0 pr-2",children:[z("span",{className:"truncate font-medium text-foreground",children:G.name}),z("span",{className:"text-[9px] text-muted-foreground uppercase flex-shrink-0",children:G.type})]}),z("button",{onClick:()=>Wz(G.id),className:"text-muted-foreground hover:text-destructive transition-colors p-0.5",title:Y.remove_from_context(),children:z(S,{className:"h-3.5 w-3.5"})})]},G.id))}),z("textarea",{value:C,onChange:(G)=>l(G.target.value),onKeyDown:Hz,placeholder:"Type a message...",rows:2,className:"w-full bg-transparent border-none focus:ring-0 focus:outline-hidden resize-none min-h-[44px] max-h-[120px] px-3 py-2 text-sm focus-visible:outline-hidden focus:ring-transparent focus:border-transparent focus-visible:ring-0",disabled:D}),J("div",{className:"flex justify-between items-center px-3 pb-2 pt-1",children:[z("div",{className:"flex items-center gap-1.5 min-w-0 max-w-[70%]",children:F.length>0?J(Yz,{value:H||"",onValueChange:(G)=>w(G),disabled:D,children:[z(_z,{className:"h-8 border-none bg-transparent hover:bg-muted text-muted-foreground hover:text-foreground focus:ring-0 focus:ring-offset-0 px-2 py-0 gap-1.5 text-xs shrink-0 select-none shadow-none max-w-full",children:z(Zz,{placeholder:Y.select_agent()})}),z($z,{children:F.map((G)=>z(Kz,{value:G.id,children:J("div",{className:"flex items-center gap-2",children:[G.avatar?z("img",{src:G.avatar,alt:G.name,className:"w-4 h-4 rounded-full object-cover"}):z(M,{className:"w-4 h-4 text-muted-foreground"}),z("span",{className:"text-xs",children:G.name})]})},G.id))})]}):z("div",{className:"flex items-center gap-1.5 px-2 py-1 text-[11px] text-muted-foreground/60 italic select-none",children:z("span",{children:Y.no_chat_agents_warning()})})}),D?z("button",{onClick:()=>{if(Z)Oz(Z)},className:"p-2 rounded-full transition-all duration-200 flex items-center justify-center shrink-0 shadow-sm bg-destructive text-destructive-foreground hover:bg-destructive/90 transform hover:-translate-y-0.5",title:"Stop generation",children:z("div",{className:"h-4 w-4 flex items-center justify-center",children:z("div",{className:"h-3 w-3 bg-current rounded-[2px] bg-white"})})}):z("button",{onClick:x,disabled:!C.trim()||!H,className:T("p-2 rounded-full transition-all duration-200 flex items-center justify-center shrink-0 shadow-sm",C.trim()&&H?"bg-primary text-primary-foreground hover:bg-primary/95 transform hover:-translate-y-0.5":"bg-muted text-muted-foreground cursor-not-allowed opacity-50"),children:z(e,{className:"h-4 w-4"})})]})]})})]})]})}
2
- export{uz as m};
@@ -1 +0,0 @@
1
- import{i as a}from"./chunk-8g0mhzsg.js";import"./chunk-hqbzjzsm.js";import"./chunk-4ajat3xv.js";import"./chunk-mhj0pqq3.js";import"./chunk-3htn4m2d.js";import"./chunk-76hs7g0x.js";import"./chunk-0sajh8fw.js";import"./chunk-j1awxx51.js";import"./chunk-ym47952x.js";import"./chunk-nhc72y4x.js";import"./chunk-vw1rhgjs.js";import"./chunk-ef5v7gta.js";import"./chunk-gct52xks.js";import"./chunk-55myfmhy.js";import"./chunk-mmrtjcst.js";import"./chunk-ce50f746.js";import"./chunk-d2qp8g98.js";import"./chunk-8jdgzy22.js";import"./chunk-vgr9db5g.js";import"./chunk-mxee09jk.js";import"./chunk-bq2aq6v8.js";import"./chunk-0jr6q4j4.js";import"./chunk-7b60a9sy.js";import"./chunk-f44d9fpd.js";import"./chunk-4a9sdfyp.js";import"./chunk-n198tewr.js";import"./chunk-ghz19a7t.js";import"./chunk-7fm1hznx.js";import"./chunk-6edadcpn.js";import"./chunk-w98wvk17.js";import{Ph as t,xh as e}from"./chunk-jt4yh37q.js";import"./chunk-mgbqjbfc.js";function o(){let{shareId:s,folderId:n}=r.useParams();return e(a,{shareId:s,initialFolderId:n})}var r=t("/share/$shareId/folders/$folderId")({component:o});export{r as Route};
@@ -1,2 +0,0 @@
1
- import{fk as d,uk as p,vh as m,wk as i,xh as o}from"./chunk-jt4yh37q.js";import{Il as c}from"./chunk-mgbqjbfc.js";var n=c(m(),1);var l=d("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 min-w-9 px-2",sm:"h-8 min-w-8 px-1.5",lg:"h-10 min-w-10 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});var u=n.createContext({size:"default",variant:"default",spacing:0});function y({className:s,variant:r,size:a,spacing:e=0,children:g,...t}){return o(p.Root,{"data-slot":"toggle-group","data-variant":r,"data-size":a,"data-spacing":e,style:{"--gap":e},className:i("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",s),...t,children:o(u.Provider,{value:{variant:r,size:a,spacing:e},children:g})})}function R({className:s,children:r,variant:a,size:e,...g}){let t=n.useContext(u);return o(p.Item,{"data-slot":"toggle-group-item","data-variant":t.variant||a,"data-size":t.size||e,"data-spacing":t.spacing,className:i(l({variant:t.variant||a,size:t.size||e}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",s),...g,children:r})}
2
- export{y as a,R as b};
@@ -1 +0,0 @@
1
- import{l as x}from"./chunk-thj4cpev.js";import"./chunk-e5s7202g.js";import"./chunk-tqxmj05h.js";import"./chunk-4ajat3xv.js";import"./chunk-mhj0pqq3.js";import"./chunk-3htn4m2d.js";import"./chunk-76hs7g0x.js";import"./chunk-0sajh8fw.js";import"./chunk-j1awxx51.js";import"./chunk-ym47952x.js";import"./chunk-nhc72y4x.js";import"./chunk-vw1rhgjs.js";import"./chunk-ef5v7gta.js";import"./chunk-gct52xks.js";import"./chunk-55myfmhy.js";import"./chunk-mmrtjcst.js";import"./chunk-ce50f746.js";import"./chunk-d2qp8g98.js";import{zf as f}from"./chunk-y0yrmcf3.js";import{Qf as p}from"./chunk-9hsfjqgq.js";import"./chunk-nh8azwsx.js";import"./chunk-mxee09jk.js";import"./chunk-bq2aq6v8.js";import"./chunk-0jr6q4j4.js";import"./chunk-7b60a9sy.js";import"./chunk-f44d9fpd.js";import"./chunk-4a9sdfyp.js";import"./chunk-n198tewr.js";import"./chunk-ghz19a7t.js";import"./chunk-7fm1hznx.js";import"./chunk-6edadcpn.js";import{rh as h}from"./chunk-w98wvk17.js";import{$h as c,Ch as l,Dh as r,Ph as o,vh as w,xh as a}from"./chunk-jt4yh37q.js";import{Il as m}from"./chunk-mgbqjbfc.js";var g=m(w(),1);function v(){let{projectId:e}=d.useParams(),{teamId:s,ensureTeamIdForProject:n}=h();g.useEffect(()=>{n(e)},[e,n]);let{data:i}=r(f(e)),t=i?.rootFolder,{data:b}=l({queryKey:["folders",t],queryFn:()=>(async()=>{return await(await c.api.folders[":folderId"].$get({param:{folderId:t}})).json()})(),enabled:!!t});if(!s||!t||!b)return a(p,{});return a(x,{teamId:s,projectId:e,projectName:i.name??"",assetId:"recently-deleted",rootFolderId:t})}var d=o("/projects/$projectId/recently-deleted")({component:v});export{d as Route};
@@ -1 +0,0 @@
1
- import{i as a}from"./chunk-8g0mhzsg.js";import"./chunk-hqbzjzsm.js";import"./chunk-4ajat3xv.js";import"./chunk-mhj0pqq3.js";import"./chunk-3htn4m2d.js";import"./chunk-76hs7g0x.js";import"./chunk-0sajh8fw.js";import"./chunk-j1awxx51.js";import"./chunk-ym47952x.js";import"./chunk-nhc72y4x.js";import"./chunk-vw1rhgjs.js";import"./chunk-ef5v7gta.js";import"./chunk-gct52xks.js";import"./chunk-55myfmhy.js";import"./chunk-mmrtjcst.js";import"./chunk-ce50f746.js";import"./chunk-d2qp8g98.js";import"./chunk-8jdgzy22.js";import"./chunk-vgr9db5g.js";import"./chunk-mxee09jk.js";import"./chunk-bq2aq6v8.js";import"./chunk-0jr6q4j4.js";import"./chunk-7b60a9sy.js";import"./chunk-f44d9fpd.js";import"./chunk-4a9sdfyp.js";import"./chunk-n198tewr.js";import"./chunk-ghz19a7t.js";import"./chunk-7fm1hznx.js";import"./chunk-6edadcpn.js";import"./chunk-w98wvk17.js";import{Ph as t,xh as e}from"./chunk-jt4yh37q.js";import"./chunk-mgbqjbfc.js";function n(){let{shareId:s}=o.useParams();return e(a,{shareId:s})}var o=t("/share/$shareId/")({component:n});export{o as Route};