@rizom/brain 0.2.0-alpha.379 → 0.2.0-alpha.380
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/dist/brain.js +37 -37
- package/dist/chunks/{app-zxr5x34a.js → app-nvdgwkjv.js} +2 -2
- package/dist/chunks/{index-jfb71q5v.js → index-0asz7jsc.js} +2 -2
- package/dist/chunks/{index-jfb71q5v.js.map → index-0asz7jsc.js.map} +1 -1
- package/dist/chunks/{index-e7kyv559.js → index-5b1wstvc.js} +3 -3
- package/dist/chunks/{index-e7kyv559.js.map → index-5b1wstvc.js.map} +1 -1
- package/dist/chunks/{index-2dv6ee5j.js → index-bttt0hwq.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/model.js +37 -37
- package/dist/model.js.map +1 -1
- package/dist/ui/studio-app.css +9 -3
- package/dist/ui/studio-app.js +3 -3
- package/dist/ui/studio-app.js.map +1 -1
- package/dist/ui/studio-asset-manifest.json +18 -18
- package/dist/ui/studio-chunks/{account-view-xe37mz6g.js → account-view-54k15mfk.js} +2 -2
- package/dist/ui/studio-chunks/{account-view-xe37mz6g.js.map → account-view-54k15mfk.js.map} +1 -1
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-rk8j2gp8.js → highlighted-body-OFNGDK62-z3qjyyn6.js} +2 -2
- package/dist/ui/studio-chunks/{highlighted-body-OFNGDK62-rk8j2gp8.js.map → highlighted-body-OFNGDK62-z3qjyyn6.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-kgem2nc7.js → main-7hrg1q8k.js} +2 -2
- package/dist/ui/studio-chunks/{main-kgem2nc7.js.map → main-7hrg1q8k.js.map} +1 -1
- package/dist/ui/studio-chunks/main-gnx0qn72.js +7 -0
- package/dist/ui/studio-chunks/{main-wrwp0bss.js.map → main-gnx0qn72.js.map} +8 -8
- package/dist/ui/studio-chunks/{main-jyb12r9e.js → main-ppw6n9n7.js} +10 -10
- package/dist/ui/studio-chunks/{main-jyb12r9e.js.map → main-ppw6n9n7.js.map} +4 -3
- package/dist/ui/studio-chunks/{main-19ek6kcp.js → main-v7s3nh4a.js} +4 -4
- package/dist/ui/studio-chunks/{main-19ek6kcp.js.map → main-v7s3nh4a.js.map} +1 -1
- package/dist/ui/studio-chunks/{main-j8m9t6k5.js → main-xt7avfqt.js} +2 -2
- package/dist/ui/studio-chunks/{main-j8m9t6k5.js.map → main-xt7avfqt.js.map} +1 -1
- package/dist/ui/studio-chunks/{mermaid-GHXKKRXX-cvdypvaf.js → mermaid-GHXKKRXX-1rrd687e.js} +1 -1
- package/dist/ui/studio-chunks/{studio-chat-workspace-yk5ycrr7.js → studio-chat-workspace-myavww9e.js} +3 -3
- package/dist/ui/studio-chunks/{studio-chat-workspace-yk5ycrr7.js.map → studio-chat-workspace-myavww9e.js.map} +1 -1
- package/package.json +1 -1
- package/dist/ui/studio-chunks/main-wrwp0bss.js +0 -7
- /package/dist/chunks/{app-zxr5x34a.js.map → app-nvdgwkjv.js.map} +0 -0
- /package/dist/chunks/{index-2dv6ee5j.js.map → index-bttt0hwq.js.map} +0 -0
- /package/dist/ui/studio-chunks/{mermaid-GHXKKRXX-cvdypvaf.js.map → mermaid-GHXKKRXX-1rrd687e.js.map} +0 -0
package/dist/ui/studio-app.css
CHANGED
|
@@ -74,10 +74,9 @@
|
|
|
74
74
|
.x91luw6:not(#\#){margin:7px 0 3px}
|
|
75
75
|
.xe4ajzu:not(#\#){padding:0 0 10px}
|
|
76
76
|
.xri99sx:not(#\#){padding:0 0 12px}
|
|
77
|
-
.
|
|
77
|
+
.x6jaaxu:not(#\#){padding:0 10px 0 36px}
|
|
78
78
|
.x5b5r1n:not(#\#){padding:0 18px}
|
|
79
79
|
.xxmtint:not(#\#){padding:0 20px}
|
|
80
|
-
.xst3r74:not(#\#){padding:0 6px}
|
|
81
80
|
.x1xq1gxn:not(#\#){padding:0 8px}
|
|
82
81
|
.xlwzp9b:not(#\#){padding:0 9px 0 12px}
|
|
83
82
|
.x1astma3:not(#\#){padding:0 9px}
|
|
@@ -106,6 +105,7 @@
|
|
|
106
105
|
.xaukpwp:not(#\#){padding:22px 18px 16px}
|
|
107
106
|
.x1easoi4:not(#\#){padding:22px 4px}
|
|
108
107
|
.x10czhz2:not(#\#){padding:24px 8px 24px 0}
|
|
108
|
+
.x1f7pr5y:not(#\#){padding:24px 8px}
|
|
109
109
|
.xggk2y7:not(#\#){padding:24px}
|
|
110
110
|
.xga4tv:not(#\#){padding:26px 26px 60px}
|
|
111
111
|
.x11wck8f:not(#\#){padding:26px 36px}
|
|
@@ -224,6 +224,7 @@
|
|
|
224
224
|
.x17qtykl:not(#\#):not(#\#){padding-inline:20px}
|
|
225
225
|
.x1tcxzho:not(#\#):not(#\#){padding-inline:36px}
|
|
226
226
|
.xfn1xvj:not(#\#):not(#\#){padding-inline:4px}
|
|
227
|
+
.xb1dmaa:not(#\#):not(#\#){padding-inline:8px 10px}
|
|
227
228
|
.x1q4txso:not(#\#):not(#\#){padding-inline:9px}
|
|
228
229
|
.x1ku5rj1:not(#\#):not(#\#){place-items:center}
|
|
229
230
|
.x1hl2dhg:not(#\#):not(#\#){text-decoration:none}
|
|
@@ -496,6 +497,7 @@
|
|
|
496
497
|
.x1kyqaxf:not(#\#):not(#\#):not(#\#){text-transform:lowercase}
|
|
497
498
|
.x6mezaz:not(#\#):not(#\#):not(#\#){text-transform:none}
|
|
498
499
|
.xtvhhri:not(#\#):not(#\#):not(#\#){text-transform:uppercase}
|
|
500
|
+
.x9tu13d:not(#\#):not(#\#):not(#\#){transform:rotate(-90deg)}
|
|
499
501
|
.x11lhmoz:not(#\#):not(#\#):not(#\#){transform:translate(-50%,-50%)}
|
|
500
502
|
.x5i6ehr:not(#\#):not(#\#):not(#\#){transform:translateX(-100%)}
|
|
501
503
|
.xbryuvx:not(#\#):not(#\#):not(#\#){transform:translateX(0)}
|
|
@@ -506,6 +508,7 @@
|
|
|
506
508
|
.x11vqxbs:not(#\#):not(#\#):not(#\#){transition-property:background-color,border-color,box-shadow}
|
|
507
509
|
.x15406qy:not(#\#):not(#\#):not(#\#){transition-property:background-color}
|
|
508
510
|
.xq90yva:not(#\#):not(#\#):not(#\#){transition-property:border-color,background-color}
|
|
511
|
+
.x11xpdln:not(#\#):not(#\#):not(#\#){transition-property:transform}
|
|
509
512
|
.xwji4o3:not(#\#):not(#\#):not(#\#){transition-timing-function:ease}
|
|
510
513
|
.x87ps6o:not(#\#):not(#\#):not(#\#){user-select:none}
|
|
511
514
|
.x16dsc37:not(#\#):not(#\#):not(#\#){vertical-align:top}
|
|
@@ -552,6 +555,7 @@
|
|
|
552
555
|
.x1fanpfn:focus-within:not(#\#):not(#\#):not(#\#){outline-offset:2px}
|
|
553
556
|
.x7s97pk:focus-visible:not(#\#):not(#\#):not(#\#){outline-offset:2px}
|
|
554
557
|
.xye1tj0:is([data-disabled]):not(#\#):not(#\#):not(#\#){pointer-events:none}
|
|
558
|
+
.x53p255:is([open] > summary > *):not(#\#):not(#\#):not(#\#){transform:none}
|
|
555
559
|
.xu021ln:is([data-state='checked']):not(#\#):not(#\#):not(#\#){transform:translateX(18px)}
|
|
556
560
|
.x1npbu3a:has(> aside > [data-leaf-open="false"]):not(#\#):not(#\#):not(#\#){grid-template-columns:124px minmax(0,1fr)}
|
|
557
561
|
.xyt8a73:nth-child(even):not(#\#):not(#\#):not(#\#){background-color:color-mix(in srgb,var(--console-text) 3%,transparent)}
|
|
@@ -695,6 +699,7 @@
|
|
|
695
699
|
.xn3w4p2:not(#\#):not(#\#):not(#\#):not(#\#){height:44px}
|
|
696
700
|
.xegnrdp:not(#\#):not(#\#):not(#\#):not(#\#){height:9px}
|
|
697
701
|
.xt7dq6l:not(#\#):not(#\#):not(#\#):not(#\#){height:auto}
|
|
702
|
+
.x2e9ysv:not(#\#):not(#\#):not(#\#):not(#\#){height:var(--console-touch)}
|
|
698
703
|
.xu96u03:not(#\#):not(#\#):not(#\#):not(#\#){left:0}
|
|
699
704
|
.x1qpfodn:not(#\#):not(#\#):not(#\#):not(#\#){left:16px}
|
|
700
705
|
.x1nrll8i:not(#\#):not(#\#):not(#\#):not(#\#){left:50%}
|
|
@@ -705,7 +710,6 @@
|
|
|
705
710
|
.x1u7kmwd:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:14px}
|
|
706
711
|
.x1fqp7bg:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:15px}
|
|
707
712
|
.x1yztbdb:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:16px}
|
|
708
|
-
.xieb3on:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:20px}
|
|
709
713
|
.x91k8ka:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:22px}
|
|
710
714
|
.x12nagc:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:4px}
|
|
711
715
|
.xzueoph:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:6px}
|
|
@@ -739,6 +743,7 @@
|
|
|
739
743
|
.xxc7z9f:not(#\#):not(#\#):not(#\#):not(#\#){max-width:360px}
|
|
740
744
|
.x197vjsw:not(#\#):not(#\#):not(#\#):not(#\#){max-width:430px}
|
|
741
745
|
.x6amaq2:not(#\#):not(#\#):not(#\#):not(#\#){max-width:48ch}
|
|
746
|
+
.x73t7g:not(#\#):not(#\#):not(#\#):not(#\#){max-width:55%}
|
|
742
747
|
.xiky8lt:not(#\#):not(#\#):not(#\#):not(#\#){max-width:62ch}
|
|
743
748
|
.xw7nakj:not(#\#):not(#\#):not(#\#):not(#\#){max-width:calc(100vw - 32px)}
|
|
744
749
|
.x2lwn1j:not(#\#):not(#\#):not(#\#):not(#\#){min-height:0}
|
|
@@ -815,6 +820,7 @@
|
|
|
815
820
|
.x14atkfc:not(#\#):not(#\#):not(#\#):not(#\#){width:auto}
|
|
816
821
|
.xk0hezx:not(#\#):not(#\#):not(#\#):not(#\#){width:min(430px,calc(100vw - 32px))}
|
|
817
822
|
.xv9tjks:not(#\#):not(#\#):not(#\#):not(#\#){width:min(520px,calc(100vw - 32px))}
|
|
823
|
+
.x6uih76:not(#\#):not(#\#):not(#\#):not(#\#){width:var(--console-touch)}
|
|
818
824
|
.xtobj18:is([data-state='active']):not(#\#):not(#\#):not(#\#):not(#\#){border-bottom-color:var(--console-accent)}
|
|
819
825
|
.x1hwe9mw:is([data-studio-split] *):not(#\#):not(#\#):not(#\#):not(#\#){border-right-width:1px}
|
|
820
826
|
.x1e76f22:is([data-climate=instrument] *):not(#\#):not(#\#):not(#\#):not(#\#){border-top-color:var(--console-accent)}
|
package/dist/ui/studio-app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as lO,d as sO,e as aO,f as rO}from"./studio-chunks/main-j8m9t6k5.js";import{$ as wh,A as NO,Aa as QO,B as Lo,Ba as GO,C as _O,Ca as WO,D as L1,Da as iR,E as UO,Ea as Um,F as Tn,Fa as nO,G as x1,H as Fn,I as as,J as ym,K as cr,L as Wn,M as Em,N as sh,O as bm,P as gM,Q as yM,R as ah,S as jE,T as IE,U as G,V as bD,W as l1,X as eD,Y as sD,Z as Rm,_ as zm,aa as uO,ba as v1,ca as Hm,da as Oi,ea as qO,fa as VO,g as JO,ga as jO,h as RO,ha as pl,i as KO,ia as IO,j as da,ja as $O,k as qm,ka as B1,l as LO,la as PO,m as eR,ma as YO,n as BO,na as z1,o as Vm,oa as H1,p as Qt,pa as kh,q as It,qa as dr,r as E1,ra as Sh,s as M1,sa as cO,t as D1,ta as S1,u as O1,ua as fO,v as zO,va as XO,wa as hO,x as HO,xa as k1,y as pa,ya as dO,z as R1,za as pO}from"./studio-chunks/main-wrwp0bss.js";import"./studio-chunks/main-19ek6kcp.js";import{$a as ZD,Ab as Nm,Bb as mO,Ma as le,Na as cs,Oa as _e,Pa as bn,Ra as oO,Sa as We,Ta as Vp,Ua as Ks,Xa as JD,ab as KD,bb as Ji,cb as b2,db as qD,eb as VD,fb as jD,gb as v2,hb as m1,ib as g1,jb as y1,kb as b1,nb as tr,ob as Up,pb as wo,qb as ai,rb as MO,sb as hr,tb as DO,ub as pr,vb as tR,wb as nR,xb as Gu,yb as eO,zb as w1}from"./studio-chunks/main-jyb12r9e.js";import{Cb as tt,Db as Sb,Fb as OO,Gb as Fl,Ib as qz}from"./studio-chunks/main-kgem2nc7.js";var r2=Sb(function(Uz){(function(){function t(){if(ee=!1,ze){var Q=Uz.unstable_now();lt=Q;var de=!0;try{e:{V=!1,j&&(j=!1,ot(Tt),Tt=-1),_=!0;var pe=L;try{t:{c(Q);for(R=l(w);R!==null&&!(R.expirationTime>Q&&d());){var st=R.callback;if(typeof st==="function"){R.callback=null,L=R.priorityLevel;var $e=st(R.expirationTime<=Q);if(Q=Uz.unstable_now(),typeof $e==="function"){R.callback=$e,c(Q),de=!0;break t}R===l(w)&&s(w),c(Q)}else s(w);R=l(w)}if(R!==null)de=!0;else{var Li=l(k);Li!==null&&m(h,Li.startTime-Q),de=!1}}break e}finally{R=null,L=pe,_=!1}de=void 0}}finally{de?K():ze=!1}}}function i(Q,de){var pe=Q.length;Q.push(de);e:for(;0<pe;){var st=pe-1>>>1,$e=Q[st];if(0<r($e,de))Q[st]=de,Q[pe]=$e,pe=st;else break e}}function l(Q){return Q.length===0?null:Q[0]}function s(Q){if(Q.length===0)return null;var de=Q[0],pe=Q.pop();if(pe!==de){Q[0]=pe;e:for(var st=0,$e=Q.length,Li=$e>>>1;st<Li;){var Bo=2*(st+1)-1,oo=Q[Bo],Hn=Bo+1,Lt=Q[Hn];if(0>r(oo,pe))Hn<$e&&0>r(Lt,oo)?(Q[st]=Lt,Q[Hn]=pe,st=Hn):(Q[st]=oo,Q[Bo]=pe,st=Bo);else if(Hn<$e&&0>r(Lt,pe))Q[st]=Lt,Q[Hn]=pe,st=Hn;else break e}}return de}function r(Q,de){var pe=Q.sortIndex-de.sortIndex;return pe!==0?pe:Q.id-de.id}function c(Q){for(var de=l(k);de!==null;){if(de.callback===null)s(k);else if(de.startTime<=Q)s(k),de.sortIndex=de.expirationTime,i(w,de);else break;de=l(k)}}function h(Q){if(j=!1,c(Q),!V)if(l(w)!==null)V=!0,ze||(ze=!0,K());else{var de=l(k);de!==null&&m(h,de.startTime-Q)}}function d(){return ee?!0:Uz.unstable_now()-lt<ae?!1:!0}function m(Q,de){Tt=be(function(){Q(Uz.unstable_now())},de)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),Uz.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var y=performance;Uz.unstable_now=function(){return y.now()}}else{var b=Date,S=b.now();Uz.unstable_now=function(){return b.now()-S}}var w=[],k=[],E=1,R=null,L=3,_=!1,V=!1,j=!1,ee=!1,be=typeof setTimeout==="function"?setTimeout:null,ot=typeof clearTimeout==="function"?clearTimeout:null,Rt=typeof setImmediate<"u"?setImmediate:null,ze=!1,Tt=-1,ae=5,lt=-1;if(typeof Rt==="function")var K=function(){Rt(t)};else if(typeof MessageChannel<"u"){var Ue=new MessageChannel,Gt=Ue.port2;Ue.port1.onmessage=t,K=function(){Gt.postMessage(null)}}else K=function(){be(t,0)};Uz.unstable_IdlePriority=5,Uz.unstable_ImmediatePriority=1,Uz.unstable_LowPriority=4,Uz.unstable_NormalPriority=3,Uz.unstable_Profiling=null,Uz.unstable_UserBlockingPriority=2,Uz.unstable_cancelCallback=function(Q){Q.callback=null},Uz.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<Q?Math.floor(1000/Q):5},Uz.unstable_getCurrentPriorityLevel=function(){return L},Uz.unstable_next=function(Q){switch(L){case 1:case 2:case 3:var de=3;break;default:de=L}var pe=L;L=de;try{return Q()}finally{L=pe}},Uz.unstable_requestPaint=function(){ee=!0},Uz.unstable_runWithPriority=function(Q,de){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var pe=L;L=Q;try{return de()}finally{L=pe}},Uz.unstable_scheduleCallback=function(Q,de,pe){var st=Uz.unstable_now();switch(typeof pe==="object"&&pe!==null?(pe=pe.delay,pe=typeof pe==="number"&&0<pe?st+pe:st):pe=st,Q){case 1:var $e=-1;break;case 2:$e=250;break;case 5:$e=1073741823;break;case 4:$e=1e4;break;default:$e=5000}return $e=pe+$e,Q={id:E++,callback:de,priorityLevel:Q,startTime:pe,expirationTime:$e,sortIndex:-1},pe>st?(Q.sortIndex=pe,i(k,Q),l(w)===null&&Q===l(k)&&(j?(ot(Tt),Tt=-1):j=!0,m(h,pe-st))):(Q.sortIndex=$e,i(w,Q),V||_||(V=!0,ze||(ze=!0,K()))),Q},Uz.unstable_shouldYield=d,Uz.unstable_wrapCallback=function(Q){var de=L;return function(){var pe=L;L=de;try{return Q.apply(this,arguments)}finally{L=pe}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var u2=Sb(function(Vz){var Pe=tt(r2()),wu=tt(Fl()),wb=tt(qz());(function(){function t(e,n){for(e=e.memoizedState;e!==null&&0<n;)e=e.next,n--;return e}function i(e,n,o,a){if(o>=n.length)return a;var u=n[o],f=sn(e)?e.slice():Me({},e);return f[u]=i(e[u],n,o+1,a),f}function l(e,n,o){if(n.length!==o.length)console.warn("copyWithRename() expects paths of the same length");else{for(var a=0;a<o.length-1;a++)if(n[a]!==o[a]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return s(e,n,o,0)}}function s(e,n,o,a){var u=n[a],f=sn(e)?e.slice():Me({},e);return a+1===n.length?(f[o[a]]=f[u],sn(f)?f.splice(u,1):delete f[u]):f[u]=s(e[u],n,o,a+1),f}function r(e,n,o){var a=n[o],u=sn(e)?e.slice():Me({},e);if(o+1===n.length)return sn(u)?u.splice(a,1):delete u[a],u;return u[a]=r(e[a],n,o+1),u}function c(){return!1}function h(){return null}function d(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function m(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function y(){}function b(){}function S(e){var n=[];return e.forEach(function(o){n.push(o)}),n.sort().join(", ")}function w(e,n,o,a){return new ER(e,n,o,a)}function k(e,n){e.context===Ls&&(V0(e.current,2,n,e,null,null),Lr())}function E(e,n){if(ji!==null){var o=n.staleFamilies;n=n.updatedFamilies,Rc(),pS(e.current,n,o),Lr()}}function R(e){ji=e}function L(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function V(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function j(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function ee(e){if(_(e)!==e)throw Error("Unable to find node on an unmounted component.")}function be(e){var n=e.alternate;if(!n){if(n=_(e),n===null)throw Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var o=e,a=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(a=u.return,a!==null){o=a;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return ee(u),e;if(f===a)return ee(u),n;f=f.sibling}throw Error("Unable to find node on an unmounted component.")}if(o.return!==a.return)o=u,a=f;else{for(var p=!1,g=u.child;g;){if(g===o){p=!0,o=u,a=f;break}if(g===a){p=!0,a=u,o=f;break}g=g.sibling}if(!p){for(g=f.child;g;){if(g===o){p=!0,o=f,a=u;break}if(g===a){p=!0,a=f,o=u;break}g=g.sibling}if(!p)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(o.alternate!==a)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(o.tag!==3)throw Error("Unable to find node on an unmounted component.");return o.stateNode.current===o?e:n}function ot(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=ot(e),n!==null)return n;e=e.sibling}return null}function Rt(e){if(e===null||typeof e!=="object")return null;return e=wk&&e[wk]||e["@@iterator"],typeof e==="function"?e:null}function ze(e){if(e==null)return null;if(typeof e==="function")return e.$$typeof===GL?null:e.displayName||e.name||null;if(typeof e==="string")return e;switch(e){case qr:return"Fragment";case X0:return"Profiler";case Ld:return"StrictMode";case G0:return"Suspense";case W0:return"SuspenseList";case F0:return"Activity"}if(typeof e==="object")switch(typeof e.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Ur:return"Portal";case el:return e.displayName||"Context";case Q0:return(e._context.displayName||"Context")+".Consumer";case jc:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bd:return n=e.displayName||null,n!==null?n:ze(e.type)||"Memo";case Si:n=e._payload,e=e._init;try{return ze(e(n))}catch(o){}}return null}function Tt(e){return typeof e.tag==="number"?ae(e):typeof e.name==="string"?e.name:null}function ae(e){var n=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return n.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ze(n);case 8:return n===Ld?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof n==="function")return n.displayName||n.name||null;if(typeof n==="string")return n;break;case 29:if(n=e._debugInfo,n!=null){for(var o=n.length-1;0<=o;o--)if(typeof n[o].name==="string")return n[o].name}if(e.return!==null)return ae(e.return)}return null}function lt(e){return{current:e}}function K(e,n){0>Bl?console.error("Unexpected pop."):(n!==Z0[Bl]&&console.error("Unexpected Fiber popped."),e.current=J0[Bl],J0[Bl]=null,Z0[Bl]=null,Bl--)}function Ue(e,n,o){Bl++,J0[Bl]=e.current,Z0[Bl]=o,e.current=n}function Gt(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function Q(e,n){Ue(Ts,n,e),Ue(Ic,e,e),Ue(As,null,e);var o=n.nodeType;switch(o){case 9:case 11:o=o===9?"#document":"#fragment",n=(n=n.documentElement)?(n=n.namespaceURI)?Yx(n):Ql:Ql;break;default:if(o=n.tagName,n=n.namespaceURI)n=Yx(n),n=Xx(n,o);else switch(o){case"svg":n=vu;break;case"math":n=Rp;break;default:n=Ql}}o=o.toLowerCase(),o=q1(null,o),o={context:n,ancestorInfo:o},K(As,e),Ue(As,o,e)}function de(e){K(As,e),K(Ic,e),K(Ts,e)}function pe(){return Gt(As.current)}function st(e){e.memoizedState!==null&&Ue(zd,e,e);var n=Gt(As.current),o=e.type,a=Xx(n.context,o);o=q1(n.ancestorInfo,o),a={context:a,ancestorInfo:o},n!==a&&(Ue(Ic,e,e),Ue(As,a,e))}function $e(e){Ic.current===e&&(K(As,e),K(Ic,e)),zd.current===e&&(K(zd,e),zf._currentValue=Ka)}function Li(){}function Bo(){if($c===0){xk=console.log,kk=console.info,Ck=console.warn,Ak=console.error,Tk=console.group,Ek=console.groupCollapsed,Mk=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Li,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$c++}function oo(){if($c--,$c===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Me({},e,{value:xk}),info:Me({},e,{value:kk}),warn:Me({},e,{value:Ck}),error:Me({},e,{value:Ak}),group:Me({},e,{value:Tk}),groupCollapsed:Me({},e,{value:Ek}),groupEnd:Me({},e,{value:Mk})})}0>$c&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Hn(e){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=n,e.startsWith(`Error: react-stack-top-frame
|
|
1
|
+
import{c as lO,d as sO,e as aO,f as rO}from"./studio-chunks/main-xt7avfqt.js";import{$ as wh,A as NO,Aa as pO,B as Lo,Ba as QO,C as _O,Ca as GO,D as L1,Da as WO,E as UO,Ea as iR,F as Tn,Fa as Um,G as x1,H as Fn,I as as,J as ym,K as cr,L as Wn,M as Em,N as sh,O as bm,P as gM,Q as yM,R as ah,S as jE,T as IE,U as G,V as bD,W as l1,X as eD,Y as sD,Z as Rm,_ as zm,aa as uO,ba as v1,ca as Hm,da as Oi,ea as qO,fa as VO,g as JO,ga as jO,h as RO,ha as pl,i as KO,ia as IO,j as da,ja as $O,k as qm,ka as B1,l as LO,la as PO,m as eR,ma as YO,n as BO,na as z1,o as Vm,oa as H1,p as Qt,pa as kh,q as It,qa as nO,r as E1,ra as dr,s as M1,sa as Sh,t as D1,ta as cO,u as O1,ua as S1,v as zO,va as fO,wa as XO,x as HO,xa as hO,y as pa,ya as k1,z as R1,za as dO}from"./studio-chunks/main-gnx0qn72.js";import"./studio-chunks/main-v7s3nh4a.js";import{Ab as w1,Bb as Nm,Cb as mO,Ma as le,Na as cs,Oa as _e,Pa as bn,Sa as oO,Ta as We,Ua as Vp,Va as Ks,Ya as JD,ab as ZD,bb as KD,cb as Ji,db as b2,eb as qD,fb as VD,gb as jD,hb as v2,ib as m1,jb as g1,kb as y1,lb as b1,ob as tr,pb as Up,qb as wo,rb as ai,sb as MO,tb as hr,ub as DO,vb as pr,wb as tR,xb as nR,yb as Gu,zb as eO}from"./studio-chunks/main-ppw6n9n7.js";import{Db as tt,Eb as Sb,Gb as OO,Hb as Fl,Jb as qz}from"./studio-chunks/main-7hrg1q8k.js";var r2=Sb(function(Uz){(function(){function t(){if(ee=!1,ze){var Q=Uz.unstable_now();lt=Q;var de=!0;try{e:{V=!1,j&&(j=!1,ot(Tt),Tt=-1),_=!0;var pe=L;try{t:{c(Q);for(R=l(w);R!==null&&!(R.expirationTime>Q&&d());){var st=R.callback;if(typeof st==="function"){R.callback=null,L=R.priorityLevel;var $e=st(R.expirationTime<=Q);if(Q=Uz.unstable_now(),typeof $e==="function"){R.callback=$e,c(Q),de=!0;break t}R===l(w)&&s(w),c(Q)}else s(w);R=l(w)}if(R!==null)de=!0;else{var Li=l(k);Li!==null&&m(h,Li.startTime-Q),de=!1}}break e}finally{R=null,L=pe,_=!1}de=void 0}}finally{de?K():ze=!1}}}function i(Q,de){var pe=Q.length;Q.push(de);e:for(;0<pe;){var st=pe-1>>>1,$e=Q[st];if(0<r($e,de))Q[st]=de,Q[pe]=$e,pe=st;else break e}}function l(Q){return Q.length===0?null:Q[0]}function s(Q){if(Q.length===0)return null;var de=Q[0],pe=Q.pop();if(pe!==de){Q[0]=pe;e:for(var st=0,$e=Q.length,Li=$e>>>1;st<Li;){var Bo=2*(st+1)-1,oo=Q[Bo],Hn=Bo+1,Lt=Q[Hn];if(0>r(oo,pe))Hn<$e&&0>r(Lt,oo)?(Q[st]=Lt,Q[Hn]=pe,st=Hn):(Q[st]=oo,Q[Bo]=pe,st=Bo);else if(Hn<$e&&0>r(Lt,pe))Q[st]=Lt,Q[Hn]=pe,st=Hn;else break e}}return de}function r(Q,de){var pe=Q.sortIndex-de.sortIndex;return pe!==0?pe:Q.id-de.id}function c(Q){for(var de=l(k);de!==null;){if(de.callback===null)s(k);else if(de.startTime<=Q)s(k),de.sortIndex=de.expirationTime,i(w,de);else break;de=l(k)}}function h(Q){if(j=!1,c(Q),!V)if(l(w)!==null)V=!0,ze||(ze=!0,K());else{var de=l(k);de!==null&&m(h,de.startTime-Q)}}function d(){return ee?!0:Uz.unstable_now()-lt<ae?!1:!0}function m(Q,de){Tt=be(function(){Q(Uz.unstable_now())},de)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),Uz.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var y=performance;Uz.unstable_now=function(){return y.now()}}else{var b=Date,S=b.now();Uz.unstable_now=function(){return b.now()-S}}var w=[],k=[],E=1,R=null,L=3,_=!1,V=!1,j=!1,ee=!1,be=typeof setTimeout==="function"?setTimeout:null,ot=typeof clearTimeout==="function"?clearTimeout:null,Rt=typeof setImmediate<"u"?setImmediate:null,ze=!1,Tt=-1,ae=5,lt=-1;if(typeof Rt==="function")var K=function(){Rt(t)};else if(typeof MessageChannel<"u"){var Ue=new MessageChannel,Gt=Ue.port2;Ue.port1.onmessage=t,K=function(){Gt.postMessage(null)}}else K=function(){be(t,0)};Uz.unstable_IdlePriority=5,Uz.unstable_ImmediatePriority=1,Uz.unstable_LowPriority=4,Uz.unstable_NormalPriority=3,Uz.unstable_Profiling=null,Uz.unstable_UserBlockingPriority=2,Uz.unstable_cancelCallback=function(Q){Q.callback=null},Uz.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<Q?Math.floor(1000/Q):5},Uz.unstable_getCurrentPriorityLevel=function(){return L},Uz.unstable_next=function(Q){switch(L){case 1:case 2:case 3:var de=3;break;default:de=L}var pe=L;L=de;try{return Q()}finally{L=pe}},Uz.unstable_requestPaint=function(){ee=!0},Uz.unstable_runWithPriority=function(Q,de){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var pe=L;L=Q;try{return de()}finally{L=pe}},Uz.unstable_scheduleCallback=function(Q,de,pe){var st=Uz.unstable_now();switch(typeof pe==="object"&&pe!==null?(pe=pe.delay,pe=typeof pe==="number"&&0<pe?st+pe:st):pe=st,Q){case 1:var $e=-1;break;case 2:$e=250;break;case 5:$e=1073741823;break;case 4:$e=1e4;break;default:$e=5000}return $e=pe+$e,Q={id:E++,callback:de,priorityLevel:Q,startTime:pe,expirationTime:$e,sortIndex:-1},pe>st?(Q.sortIndex=pe,i(k,Q),l(w)===null&&Q===l(k)&&(j?(ot(Tt),Tt=-1):j=!0,m(h,pe-st))):(Q.sortIndex=$e,i(w,Q),V||_||(V=!0,ze||(ze=!0,K()))),Q},Uz.unstable_shouldYield=d,Uz.unstable_wrapCallback=function(Q){var de=L;return function(){var pe=L;L=de;try{return Q.apply(this,arguments)}finally{L=pe}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var u2=Sb(function(Vz){var Pe=tt(r2()),wu=tt(Fl()),wb=tt(qz());(function(){function t(e,n){for(e=e.memoizedState;e!==null&&0<n;)e=e.next,n--;return e}function i(e,n,o,a){if(o>=n.length)return a;var u=n[o],f=sn(e)?e.slice():Me({},e);return f[u]=i(e[u],n,o+1,a),f}function l(e,n,o){if(n.length!==o.length)console.warn("copyWithRename() expects paths of the same length");else{for(var a=0;a<o.length-1;a++)if(n[a]!==o[a]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return s(e,n,o,0)}}function s(e,n,o,a){var u=n[a],f=sn(e)?e.slice():Me({},e);return a+1===n.length?(f[o[a]]=f[u],sn(f)?f.splice(u,1):delete f[u]):f[u]=s(e[u],n,o,a+1),f}function r(e,n,o){var a=n[o],u=sn(e)?e.slice():Me({},e);if(o+1===n.length)return sn(u)?u.splice(a,1):delete u[a],u;return u[a]=r(e[a],n,o+1),u}function c(){return!1}function h(){return null}function d(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function m(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function y(){}function b(){}function S(e){var n=[];return e.forEach(function(o){n.push(o)}),n.sort().join(", ")}function w(e,n,o,a){return new ER(e,n,o,a)}function k(e,n){e.context===Ls&&(V0(e.current,2,n,e,null,null),Lr())}function E(e,n){if(ji!==null){var o=n.staleFamilies;n=n.updatedFamilies,Rc(),pS(e.current,n,o),Lr()}}function R(e){ji=e}function L(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function V(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function j(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function ee(e){if(_(e)!==e)throw Error("Unable to find node on an unmounted component.")}function be(e){var n=e.alternate;if(!n){if(n=_(e),n===null)throw Error("Unable to find node on an unmounted component.");return n!==e?null:e}for(var o=e,a=n;;){var u=o.return;if(u===null)break;var f=u.alternate;if(f===null){if(a=u.return,a!==null){o=a;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===o)return ee(u),e;if(f===a)return ee(u),n;f=f.sibling}throw Error("Unable to find node on an unmounted component.")}if(o.return!==a.return)o=u,a=f;else{for(var p=!1,g=u.child;g;){if(g===o){p=!0,o=u,a=f;break}if(g===a){p=!0,a=u,o=f;break}g=g.sibling}if(!p){for(g=f.child;g;){if(g===o){p=!0,o=f,a=u;break}if(g===a){p=!0,a=f,o=u;break}g=g.sibling}if(!p)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(o.alternate!==a)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(o.tag!==3)throw Error("Unable to find node on an unmounted component.");return o.stateNode.current===o?e:n}function ot(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=ot(e),n!==null)return n;e=e.sibling}return null}function Rt(e){if(e===null||typeof e!=="object")return null;return e=wk&&e[wk]||e["@@iterator"],typeof e==="function"?e:null}function ze(e){if(e==null)return null;if(typeof e==="function")return e.$$typeof===GL?null:e.displayName||e.name||null;if(typeof e==="string")return e;switch(e){case qr:return"Fragment";case X0:return"Profiler";case Ld:return"StrictMode";case G0:return"Suspense";case W0:return"SuspenseList";case F0:return"Activity"}if(typeof e==="object")switch(typeof e.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Ur:return"Portal";case el:return e.displayName||"Context";case Q0:return(e._context.displayName||"Context")+".Consumer";case jc:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bd:return n=e.displayName||null,n!==null?n:ze(e.type)||"Memo";case Si:n=e._payload,e=e._init;try{return ze(e(n))}catch(o){}}return null}function Tt(e){return typeof e.tag==="number"?ae(e):typeof e.name==="string"?e.name:null}function ae(e){var n=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(n._context.displayName||"Context")+".Consumer";case 10:return n.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ze(n);case 8:return n===Ld?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof n==="function")return n.displayName||n.name||null;if(typeof n==="string")return n;break;case 29:if(n=e._debugInfo,n!=null){for(var o=n.length-1;0<=o;o--)if(typeof n[o].name==="string")return n[o].name}if(e.return!==null)return ae(e.return)}return null}function lt(e){return{current:e}}function K(e,n){0>Bl?console.error("Unexpected pop."):(n!==Z0[Bl]&&console.error("Unexpected Fiber popped."),e.current=J0[Bl],J0[Bl]=null,Z0[Bl]=null,Bl--)}function Ue(e,n,o){Bl++,J0[Bl]=e.current,Z0[Bl]=o,e.current=n}function Gt(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function Q(e,n){Ue(Ts,n,e),Ue(Ic,e,e),Ue(As,null,e);var o=n.nodeType;switch(o){case 9:case 11:o=o===9?"#document":"#fragment",n=(n=n.documentElement)?(n=n.namespaceURI)?Yx(n):Ql:Ql;break;default:if(o=n.tagName,n=n.namespaceURI)n=Yx(n),n=Xx(n,o);else switch(o){case"svg":n=vu;break;case"math":n=Rp;break;default:n=Ql}}o=o.toLowerCase(),o=q1(null,o),o={context:n,ancestorInfo:o},K(As,e),Ue(As,o,e)}function de(e){K(As,e),K(Ic,e),K(Ts,e)}function pe(){return Gt(As.current)}function st(e){e.memoizedState!==null&&Ue(zd,e,e);var n=Gt(As.current),o=e.type,a=Xx(n.context,o);o=q1(n.ancestorInfo,o),a={context:a,ancestorInfo:o},n!==a&&(Ue(Ic,e,e),Ue(As,a,e))}function $e(e){Ic.current===e&&(K(As,e),K(Ic,e)),zd.current===e&&(K(zd,e),zf._currentValue=Ka)}function Li(){}function Bo(){if($c===0){xk=console.log,kk=console.info,Ck=console.warn,Ak=console.error,Tk=console.group,Ek=console.groupCollapsed,Mk=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Li,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$c++}function oo(){if($c--,$c===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Me({},e,{value:xk}),info:Me({},e,{value:kk}),warn:Me({},e,{value:Ck}),error:Me({},e,{value:Ak}),group:Me({},e,{value:Tk}),groupCollapsed:Me({},e,{value:Ek}),groupEnd:Me({},e,{value:Mk})})}0>$c&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Hn(e){var n=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=n,e.startsWith(`Error: react-stack-top-frame
|
|
2
2
|
`)&&(e=e.slice(29)),n=e.indexOf(`
|
|
3
3
|
`),n!==-1&&(e=e.slice(n+1)),n=e.indexOf("react_stack_bottom_frame"),n!==-1&&(n=e.lastIndexOf(`
|
|
4
4
|
`,n)),n!==-1)e=e.slice(0,n);else return"";return e}function Lt(e){if(K0===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);K0=n&&n[1]||"",Dk=-1<o.stack.indexOf(`
|
|
@@ -242,6 +242,6 @@ You might need to use a local HTTP server (instead of file://): https://react.de
|
|
|
242
242
|
|
|
243
243
|
[Open the Inbox item](${i.backlink})`;return{draft:l,body:i.body?`${i.body}
|
|
244
244
|
|
|
245
|
-
${s}`:s}}function dN(t,i,l){let s={...t};if(l==="")return delete s[i.name],s;if(i.widget==="boolean")return s[i.name]=l===!0,s;if(i.widget==="number")return s[i.name]=Number(l),s;return s[i.name]=l,s}var xh={mode:{kind:"browse"},draft:{},body:"",save:{kind:"idle"},deleteOpen:!1};function xO(t){if(t.mode.kind==="browse")return!1;if(t.mode.kind==="create")return!0;return t.body!==t.mode.entity.body||JSON.stringify(t.draft)!==JSON.stringify(t.mode.entity.frontmatter)}function kO(t,i){switch(i.type){case"collectionChanged":return xh;case"documentOpened":return{mode:{kind:"edit",entity:i.document.entity},draft:i.document.draft,body:i.document.body,save:i.save??{kind:"idle"},deleteOpen:!1};case"creationStarted":if(t.mode.kind!=="browse")return t;return{mode:{kind:"create"},draft:i.draft,body:i.body??"",save:{kind:"idle"},deleteOpen:!1};case"browseRequested":return xh;case"fieldChanged":return t.mode.kind==="browse"?t:{...t,draft:dN(t.draft,i.descriptor,i.raw)};case"fieldAssistApplied":return t.mode.kind==="browse"?t:{...t,draft:{...t.draft,[i.field]:i.suggestion}};case"bodyChanged":return t.mode.kind==="browse"?t:{...t,body:i.body};case"saveStarted":return t.mode.kind==="browse"?t:{...t,save:{kind:"saving"}};case"saveFailed":return t.mode.kind==="browse"?t:{...t,save:i.save};case"deleteRequested":return t.mode.kind==="edit"?{...t,deleteOpen:!0}:t;case"deleteCancelled":return t.deleteOpen?{...t,deleteOpen:!1}:t;case"deleteSucceeded":return t.mode.kind==="edit"?xh:t;case"deleteFailed":return t.mode.kind==="edit"?{...t,deleteOpen:!1,save:{kind:"error",message:i.message}}:t}}function CO(t,i,l){return{studioChatHandoff:{version:1,sourceId:t,itemId:i,label:l,prompt:"Help me understand this Inbox item and decide what to do next."}}}function AO(t){if(typeof t!=="object"||t===null)return null;let i=Reflect.get(t,"studioChatHandoff");if(typeof i!=="object"||i===null)return null;let l=Reflect.get(i,"version"),s=Reflect.get(i,"sourceId"),r=Reflect.get(i,"itemId"),c=Reflect.get(i,"label"),h=Reflect.get(i,"prompt");if(l!==1||typeof s!=="string"||!/^[a-z][a-z0-9-]*$/.test(s)||s.length>64||typeof r!=="string"||r.trim().length===0||r.length>300||typeof c!=="string"||c.trim().length===0||c.length>160||typeof h!=="string"||h.trim().length===0||h.length>1e4)return null;return{sourceId:s,itemId:r,label:c,prompt:h}}function Ku(t){if(t instanceof pr)switch(t.status){case 401:return"Your session is no longer authenticated. Sign in again in another tab, then retry here. Keep this tab open to preserve your draft.";case 403:return"You do not currently have permission to read this content. Ask an administrator to check access, then retry.";case 404:return"This content is unavailable. It may have moved, been removed, or be outside your access. Choose another destination or retry.";case 429:return"Studio is receiving too many requests. Wait briefly before retrying."}return`Studio could not load this data. Check your connection or retry later. ${Oi(t)}`}var TO=new Set(["offset","limit"]);function EO(t,i){if(t?.urlQuery!==!0)return{};let l={};for(let[s,r]of new URLSearchParams(i))if(!TO.has(s))l[s]=r;return l}function C1(t){let i=new URLSearchParams,l=Object.entries(t).filter(([r,c])=>!TO.has(r)&&c!==void 0&&(typeof c!=="number"||Number.isFinite(c))).sort(([r],[c])=>r.localeCompare(c));for(let[r,c]of l)i.set(r,String(c));let s=i.toString();return s?`?${s}`:""}function ec(t,i){return`${t}${C1(i)}`}function A1(t,i,l,s){if(s!==i)return;t.replace(ec(i,l))}function T1(t){let i=hr.safeParse(DO(new URLSearchParams(t))),l=i.success?i.data:hr.parse({});return{...l,offset:Math.floor(l.offset/l.limit)*l.limit}}function mr(t){let i=new URLSearchParams;if(t.offset>0)i.set("offset",String(t.offset));if(t.limit!==MO)i.set("limit",String(t.limit));if(t.q)i.set("q",t.q);if(t.visibility!=="all")i.set("visibility",t.visibility);if(t.status)i.set("status",t.status);if(t.sort!=="updated-desc")i.set("sort",t.sort);let l=i.toString();return l?`?${l}`:""}var vn=tt(bn(),1),pN=oe.lazy(async()=>({default:(await import("./studio-chunks/account-view-xe37mz6g.js")).AccountApp})),mN=oe.lazy(async()=>({default:(await import("./studio-chunks/studio-chat-workspace-yk5ycrr7.js")).StudioChatWorkspace}));function gN(t){let i=new URLSearchParams(t).get("session")?.trim();return i&&i.length<=256?i:null}function yN(){let t=window.history.state;return h2(t)?t:{}}var bN=[],vN=[],SN={},wN=["public","trusted","admin"];function xN(t,i){let l=document.querySelector("[data-studio-root]"),s=l?.getAttribute("data-studio-principal-name")??"Your account",r=l?.getAttribute("data-studio-principal-role"),c=wN.find((h)=>h===r)??"public";return{displayName:s,role:c,routePath:t,studioPath:i}}function FO(){let t=LO(),i=Vm({select:(U)=>U.location.pathname}),l=Vm({select:(U)=>U.location.searchStr}),s=Vm({select:(U)=>U.location.state}),r=QO(),c=oe.useMemo(()=>i===E1?{kind:"workspace",workspaceId:M1}:_O(i,r),[i,r]),h=oe.useMemo(()=>c.kind==="collection"&&new URLSearchParams(l).get("mode")==="create",[l,c]),d=i,[m,y]=oe.useState(null),[b,S]=oe.useState(null),[w,k]=oe.useState({}),[E,R]=oe.useReducer(kO,xh),{mode:L,draft:_,body:V,save:j}=E,ee=xO(E),[be]=oe.useState(()=>new HO),ot=oe.useSyncExternalStore(be.subscribe,be.hasDrafts,be.hasDrafts),[Rt,ze]=oe.useState({hasDraft:!1,busy:!1}),Tt=BO({shouldBlockFn:({next:U})=>ee||i===E1&&zO({...Rt,hasDraft:ot},U.pathname),enableBeforeUnload:ee||ot||Rt.busy,withResolver:!0}),[ae,lt]=oe.useState({kind:"idle"}),[K,Ue]=oe.useState("preview"),[Gt,Q]=oe.useState("details"),de=oe.useRef(null),pe=oe.useCallback((U)=>{de.current=U,Q(U)},[]),[st,$e]=oe.useState(null),[Li,Bo]=oe.useState(0),[oo,Hn]=oe.useState(null),Lt=oe.useRef(0),zo=oe.useRef(null),nn=oe.useRef(0),ma=oe.useRef(b);ma.current=b;let at=RO(),Bt=Gu(),Le=da(IO(Bt)),Y=Le.data?.types??null,fi=Y?.find((U)=>U.entityType===b),Je=fi?.capabilities,Ut=oe.useMemo(()=>fi?.isSingleton?T1(""):T1(l),[fi?.isSingleton,l]),Et=Ut.offset,ve=Le.data?.workspaces??vN,Ge=ve.find((U)=>U.id===m),Sn=Ge?.rendererName===UO,ml=Ge?.rendererName===D1,Ze=Ge?.rendererName==="DeclarativeOperatorWorkspace",gl=m?w[m]:void 0,fn=Ge?.urlQuery!==!0||gl?.urlSearch===l,Bi=oe.useMemo(()=>EO(Ge,l),[Ge,l]),Ho=m?gl&&fn?gl.query:Bi:SN,No=da({...$O(Bt,m??"",Ho),enabled:Ze}),yl=No.data??null,bl=yl?.data??null,zi=No.error?Ku(No.error):null,fs=L.kind==="edit"?L.entity.id:null,vl=da({...PO(Bt,b??"",fs??""),enabled:b!==null&&fs!==null&&Je?.canAssist===!0&&Je.canUpdate}).data??bN,Hi=da({...YO(Bt),enabled:b!==null}).data??null,Ni=da({...H1(Bt,b??"",Ut),enabled:b!==null}),gr=b?Ni.data?.entities??null:null,hi=Ni.data?.total,yr=da({...z1(Bt,b??""),enabled:b!==null}),hn=b?yr.data??null:null;da({...kh(Bt,b??"",fs??""),enabled:b!==null&&fs!==null});let ne=qm({mutationFn:(U)=>jO(Bt,U)}),on=qm({mutationFn:(U)=>VO(Bt,U)}),Nn=qm({mutationFn:(U)=>qO(Bt,U)}),Sl=on.isPending,lo=Ze&&yl?yl.data:null;oe.useEffect(()=>{if(!b||!fi||m||c.kind!=="collection"&&c.kind!=="entity"||c.entityType!==b)return;if(hi===void 0)return;let U=Math.floor(Math.max(0,hi-1)/Ut.limit)*Ut.limit;if(Et>U)t.history.replace(`${i}${mr({...Ut,offset:U})}`,t.history.location.state)},[fi,m,Et,hi,Ut,b,i,c,t.history]),oe.useEffect(()=>{if(!m||!lo?.refreshAfterMs)return;let U=window.setTimeout(()=>{at.invalidateQueries({queryKey:pl.workspace(m)})},lo.refreshAfterMs);return()=>window.clearTimeout(U)},[m,lo,at]),oe.useEffect(()=>{if(Ge?.urlQuery!==!0||c.kind!=="workspace"||c.workspaceId!==Ge.id)return;let U=Lo(r,Ge.id);if(ec(U,Bi)!==`${U}${l}`)A1(t.history,U,Bi,window.location.pathname)},[Ge,r,Bi,l,c,t.history]),oe.useEffect(()=>{if(!Y)return;if($e(null),c.kind==="not-found"){nn.current+=1,$e(`Studio route not found: ${c.pathname}`);return}if(c.kind==="workspace"){let Se=ve.find((Te)=>Te.id===c.workspaceId);if(!Se){let Te=GO(r,c.workspaceId,l,ve);if(Te){t.history.replace(Te);return}nn.current+=1,$e(`Workspace unavailable for this account: ${c.workspaceId}`);return}y(Se.id),S(null);return}let U=c.kind==="collection"||c.kind==="entity"?c.entityType:void 0,re=Y.find((Se)=>!Se.isSingleton)??Y[0];if(c.kind==="home"){let Se=WO(r,Y,ve);if(Se!==r){t.history.replace(Se);return}}let Oe=U??re?.entityType??null;if(U!==void 0&&!Y.some((Se)=>Se.entityType===U)){nn.current+=1,$e(`Collection unavailable for this account: ${U}`);return}y(null),S(Oe)},[l,c,t.history,r,Y,ve]),oe.useEffect(()=>{if(j.kind!=="saved"||!Hi?.git)return;if(Bm({save:j,git:Hi.git,baselineCommit:oo}).committed==="done")return;if(Date.now()-Lt.current>20000)return;let re=window.setTimeout(()=>{at.invalidateQueries({queryKey:pl.syncStatus()})},900);return()=>window.clearTimeout(re)},[j,Hi,oo,at]),oe.useEffect(()=>{if(!b||c.kind==="workspace"||c.kind==="not-found")return;let U=c.kind==="entity"&&c.entityType===b?c.id:null,re=++nn.current;R({type:"collectionChanged"}),Q("details"),lt({kind:"idle"});let Oe=!0,Se=()=>Oe&&re===nn.current;return at.fetchQuery({...z1(Bt,b),staleTime:0}).then(async(Te)=>{if(!Oe||re!==nn.current)return;let qe=gO(Te,de.current);if(Q(qe),window.matchMedia("(max-width: 640px)").matches&&qe!=="details")Ue(qe==="write"?"source":"preview");if(h&&U===null){if(Y?.find((ln)=>ln.entityType===b)?.capabilities.canCreate!==!0){$e(`Creating ${b} is not allowed.`);return}let Cl=SO(window.history.state,b,()=>window.history.replaceState(vO(yN()),"",window.location.href)),ro=wO(Te.fields,Cl);R({type:"creationStarted",draft:ro.draft,body:ro.body});return}if(U!==null)return at.fetchQuery({...kh(Bt,b,U),staleTime:0}).then((kl)=>{if(!Oe||re!==nn.current)return;let Cl=Ju(kl),ro=zo.current,ln=ro?.pathname===d?ro.save:{kind:"idle"};if(ro?.pathname===d)zo.current=null;R({type:"documentOpened",document:Cl,save:ln})});if(Te.isSingleton){let kl=await at.ensureQueryData(H1(Bt,b));if(!Se())return;let Cl=kl.entities[0];if(Cl)return at.fetchQuery({...kh(Bt,b,Cl.id),staleTime:0}).then((ro)=>{if(!Oe||re!==nn.current)return;let ln=Ju(ro);R({type:"documentOpened",document:ln})});R({type:"creationStarted",draft:wh(Te.fields)})}return}).catch((Te)=>{if(Oe&&re===nn.current)$e(Ku(Te))}),()=>{Oe=!1}},[h,d,b,Li,at,i,c,Y]);let Mt=oe.useCallback((U,re={kind:"idle"})=>{if(!b)return;let Oe=R1(r,b,U);if(Oe!==d){zo.current={pathname:Oe,save:re},t.history.push(`${Oe}${mr(Ut)}`,{studioCollectionPath:`${pa(r,b)}${mr(Ut)}`},re.kind==="saved"?{ignoreBlocker:!0}:void 0);return}let Se=++nn.current,Te=b;at.fetchQuery({...kh(Bt,b,U),staleTime:0}).then((qe)=>{if(Se!==nn.current||ma.current!==Te)return;let kl=Ju(qe);R({type:"documentOpened",document:kl,save:re}),lt({kind:"idle"})}).catch((qe)=>{if(Se===nn.current)$e(Ku(qe))})},[r,d,b,Ut,at,t.history]),so=oe.useCallback((U,re)=>{let Oe=R1(r,U,re);zo.current={pathname:Oe,save:{kind:"idle"}},t.history.push(Oe,{studioCollectionPath:pa(r,U)})},[r,t.history]),wl=oe.useCallback((U,re,Oe,Se)=>{t.history.push(NO(r,"note"),p2(U,`entity://${encodeURIComponent(Oe)}/${encodeURIComponent(Se)}`,re))},[r,t.history]),xl=oe.useCallback((U,re,Oe)=>{if(ve.some((Se)=>Se.rendererName===D1)){t.history.push(O1(r),CO(U,re,Oe));return}},[t.history,r,ve]),ic=oe.useCallback((U)=>{switch(U.target){case"account-settings":{t.history.push(Lo(r,L1));return}case"invitations":t.history.push(ec(Lo(r,"admin:administration"),{tab:"invitations"}));return;case"admin-peer-invite":{t.history.push(ec(Lo(r,"admin:administration"),{tab:"invitations",peerId:U.peerId,displayName:U.displayName}));return}case"inbox":{let re={};if("source"in U){if(re.sourceId="mail-items",U.filter==="high-priority")re["facet.mail-priority"]="high";else if(U.filter==="needs-reply")re["facet.needs-reply"]="true";else if(U.filter==="unclassified")re["facet.category"]="unclassified"}t.history.push(ec(Lo(r,"unified-inbox:inbox"),re));return}case"publishing":t.history.push(Lo(r,"content-pipeline:publishing"));return;case"site":t.history.push(Lo(r,"site-builder:site"));return;case"inbox-open-entity":so(U.entityType,U.entityId);return;case"inbox-capture-note":wl(U.title,U.summary,U.entityType,U.entityId);return;case"inbox-discuss-in-chat":xl(U.sourceId,U.itemId,U.label)}},[wl,r,xl,so,l,t.history]),br=oe.useCallback((U)=>{t.history.push(pa(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),vr=oe.useCallback((U)=>{if(!b)return;t.history.push(`${pa(r,b)}${mr({...Ut,offset:U})}`),window.scrollTo({top:0,left:0})},[b,Ut,r,t.history]),hs=oe.useCallback((U)=>{t.history.push(U===M1?O1(r):Lo(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),ao=oe.useCallback(()=>{if(!hn||Je?.canCreate!==!0)return;R({type:"creationStarted",draft:wh(hn.fields)}),lt({kind:"idle"})},[Je,hn]),Zn=oe.useCallback(()=>{if(!b)return;let U=`${pa(r,b)}${mr(Ut)}`,re=t.history.location.state;if(typeof re==="object"&&re!==null&&"studioCollectionPath"in re&&re.studioCollectionPath===U&&t.history.canGoBack()){t.history.back();return}t.history.replace(U)},[r,b,Ut,t.history]),Ch=oe.useCallback((U,re)=>{if(!b||L.kind!=="edit"||Je?.canUpdate!==!0||Je.canAssist!==!0||V.trim().length===0)return;lt({kind:"loading",field:re,variant:U}),Bt.requestFieldAssist({variant:U,entityType:b,id:L.entity.id,targetField:re}).then((Oe)=>{let Se=Oe.variant==="summarise"?Oe.suggestion:Oe.suggestions;lt({kind:"suggested",field:Oe.targetField,variant:Oe.variant,suggestion:Se})}).catch((Oe)=>{lt({kind:"error",field:re,message:Oi(Oe)})})},[Je,V,b,L]),$m=oe.useCallback((U,re)=>{R({type:"fieldAssistApplied",field:U,suggestion:re}),lt({kind:"idle"})},[]),oc=oe.useCallback(()=>{if(!b||L.kind==="browse"||!hn)return;if(L.kind==="create"?Je?.canCreate!==!0:Je?.canUpdate!==!0)return;Lt.current=Date.now(),Hn(Hi?.git?.lastCommit??null),R({type:"saveStarted"});let U=hn.hasBody?{body:V}:{},re=XO(hn.fields,_),Oe=L.kind==="create"?{kind:"create",entityType:b,frontmatter:re,...U}:{kind:"update",entityType:b,id:L.entity.id,frontmatter:re,baseContentHash:L.entity.contentHash,...U},Se=nn.current;ne.mutate(Oe,{onSuccess:async(Te)=>{if(await Promise.all([at.invalidateQueries({queryKey:pl.entities(b)}),at.invalidateQueries({queryKey:pl.syncStatus()}),...L.kind==="create"?[at.invalidateQueries({queryKey:pl.navigation()})]:[]]),Se!==nn.current)return;let qe="skipped"in Te&&Te.skipped===!0;Mt(Te.entityId,{kind:"saved",noop:qe})},onError:(Te)=>{if(Se!==nn.current)return;if(Te instanceof pr&&Te.issues.length>0)Q("details");R({type:"saveFailed",save:Te instanceof pr&&Te.status===409?{kind:"conflict",message:Oi(Te)}:{kind:"error",message:Te instanceof pr&&Te.issues.length>0?Te.message||"Validation failed":Oi(Te),...Te instanceof pr?{issues:Te.issues}:{}}})}})},[Je,b,L,_,V,hn,Mt,Hi,at,ne]),Ah=oe.useCallback(()=>{if(!b||L.kind!=="edit"||Sl||Je?.canDelete!==!0)return;let{id:U}=L.entity;on.mutate({entityType:b,id:U},{onSuccess:async()=>{R({type:"deleteSucceeded"}),at.removeQueries({queryKey:pl.entity(b,U)}),await Promise.all([at.invalidateQueries({queryKey:pl.entities(b)}),at.invalidateQueries({queryKey:pl.syncStatus()}),at.invalidateQueries({queryKey:pl.navigation()})]),t.history.replace(pa(r,b),void 0,{ignoreBlocker:!0})},onError:(re)=>{R({type:"deleteFailed",message:Oi(re)})}})},[Je,r,b,L,Sl,at,on,t.history]),Sr=oe.useCallback(async(U)=>{let re=ve.find((qe)=>qe.pluginId==="content-pipeline"&&qe.entityTypes.includes(U.entityType));if(!re)throw Error("Publishing is unavailable");let Oe={entityType:U.entityType,entityId:U.entityId,...U.type==="reorder"?{position:U.position}:{}};if(U.type==="publish"&&!U.confirmation){let qe=await Nn.mutateAsync({workspaceId:re.id,action:{actionId:"publish",label:"Publish now",input:Oe,invocation:{mode:"prepare"}}});if(typeof qe!=="object"||qe===null||!("kind"in qe)||qe.kind!=="prepared-confirmation"||!("token"in qe)||typeof qe.token!=="string"||!("summary"in qe)||typeof qe.summary!=="string"||!("expiresAt"in qe)||typeof qe.expiresAt!=="string")throw Error("Publishing confirmation is unavailable");return{needsConfirmation:!0,summary:qe.summary,args:{confirmed:!0,confirmationToken:qe.token,contentHash:qe.token,expiresAt:qe.expiresAt}}}let Se=await Nn.mutateAsync({workspaceId:re.id,action:{actionId:U.type,label:U.type,input:Oe,...U.type==="publish"&&U.confirmation?{invocation:{mode:"execute",token:U.confirmation.confirmationToken}}:{}}});if(typeof Se!=="object"||Se===null)throw Error("Publishing returned an invalid result");let Te="success"in Se&&Se.success===!1?{success:!1,error:"error"in Se&&typeof Se.error==="string"?Se.error:"Publishing failed",..."code"in Se&&typeof Se.code==="string"?{code:Se.code}:{}}:{success:!0};if(!d1(Te)&&!p1(Te)){if(await B1(at,re.id),L.kind==="edit"&&b===U.entityType&&L.entity.id===U.entityId)Mt(U.entityId)}return Te},[b,L,Mt,at,Nn,ve]),Kn=oe.useCallback(async(U)=>{if(!m)throw Error("Declarative workspace is unavailable");try{let re=await Nn.mutateAsync({workspaceId:m,action:U});return await B1(at,m),re}finally{Nn.reset()}},[m,Nn,at]),Th=oe.useCallback((U,re,Oe)=>{let Se=ve.find((qe)=>qe.id===U),Te=Se?.urlQuery===!0?l:void 0;if(Se?.urlQuery===!0&&Oe!==void 0){let qe=Lo(r,U);Te=C1(Oe),A1(t.history,qe,Oe,window.location.pathname)}k((qe)=>({...qe,[U]:{query:re,...Te!==void 0?{urlSearch:Te}:{}}}))},[r,l,t.history,ve]),_i=st??(Le.error?Ku(Le.error):Ni.error?Ku(Ni.error):null),lc=()=>{if($e(null),Le.error)Le.refetch();if(Ni.error)Ni.refetch();if(No.error)No.refetch();if(L.kind==="browse")Bo((U)=>U+1)};if(_i&&!Y)return vn.jsxDEV(Zu,{message:_i,error:!0,onRetry:lc},void 0,!1,void 0,this);if(!Y)return vn.jsxDEV(Zu,{message:"Loading…"},void 0,!1,void 0,this);if(Sn){let U=Lo(r,L1);return vn.jsxDEV(yO,{types:Y,workspaces:ve,workspaceId:Ge.id,selectEntityType:br,selectWorkspace:hs,children:vn.jsxDEV(oe.Suspense,{fallback:vn.jsxDEV(It,{children:"Opening Account…"},void 0,!1,void 0,this),children:vn.jsxDEV(pN,{bootstrap:xN(U,r)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}if(ml)return vn.jsxDEV(vn.Fragment,{children:[vn.jsxDEV(oe.Suspense,{fallback:vn.jsxDEV(Zu,{message:"Opening Chat…"},void 0,!1,void 0,this),children:vn.jsxDEV(mN,{apiPath:Ge.chatApiPath,draftStore:be,onNavigationStateChange:ze,studioBasePath:r,sessionId:gN(l),types:Y,workspaces:ve,handoff:AO(s),navigate:(U,re)=>{t.history.push(U,void 0,{ignoreBlocker:re?.preserveWork===!0})},selectEntityType:br,selectWorkspace:hs},void 0,!1,void 0,this)},void 0,!1,void 0,this),Tt.status==="blocked"&&vn.jsxDEV(Ji,{mark:"↩",title:"Leave this conversation?",titleId:"chat-navigation-title",cancelLabel:"Stay",confirmLabel:"Leave",onCancel:()=>Tt.reset(),onConfirm:()=>Tt.proceed(),children:vn.jsxDEV("p",{children:"Your draft stays in this tab. Leaving stops receiving the response, but does not undo completed actions or background jobs."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(m?!bl&&!zi:b&&!hn&&!_i)return vn.jsxDEV(Zu,{message:"Loading…"},void 0,!1,void 0,this);if(!m&&(!b||!hn&&!_i))return vn.jsxDEV(Zu,{message:_i??"No readable collections are available for this account.",error:Boolean(_i),..._i?{onHome:()=>t.history.push(r)}:{}},void 0,!1,void 0,this);return vn.jsxDEV(bO,{activeWorkspaceId:m,types:Y,workspaces:ve,workspaceError:zi,readError:_i,onRetryRead:lc,declarativeWorkspaceData:lo,workspaceQuery:Ho,entityType:b,entities:gr,entityOffset:Et,entityLimit:Ut.limit,entityTotal:hi??0,collectionQuery:Ut,onCollectionQueryChange:(U)=>{if(!b)return;t.history.push(`${pa(r,b)}${mr({...U,offset:0})}`),window.scrollTo({top:0,left:0})},entityListLoading:Ni.isPending,schema:hn,editor:E,fieldAssistState:ae,bodyMode:K,mobilePane:Gt,syncStatus:Hi,baselineCommit:oo,agentTargets:vl,deleting:Sl,hasUnsavedChanges:ee,navigationBlocked:Tt.status==="blocked",dispatchEditor:R,setFieldAssistState:lt,setBodyMode:Ue,setMobilePane:pe,backToList:Zn,selectEntityType:br,selectWorkspace:hs,changeEntityPage:vr,openWorkspaceEntity:so,openWorkspaceLaunch:ic,performPublishingAction:Sr,performDeclarativeAction:Kn,onWorkspaceQueryChange:Th,startCreate:ao,openEntity:Mt,runFieldAssist:Ch,applyFieldAssist:$m,save:oc,remove:Ah,onNavigationReset:()=>Tt.reset?.(),onNavigationProceed:()=>Tt.proceed?.()},void 0,!1,void 0,this)}function ZO(){return new JO({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1},mutations:{retry:!1}}})}var Im=tt(bn(),1),jm=document.querySelector("[data-studio-root]");if(jm){let t=jm.getAttribute("data-studio-base-path")??"/studio",i=new tR({basePath:t});jm.textContent="";let l=ZO(),s=iR(t,FO);oR.createRoot(jm).render(Im.jsxDEV(KO,{client:l,children:Im.jsxDEV(nR,{api:i,children:Im.jsxDEV(eR,{router:s},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this))}
|
|
245
|
+
${s}`:s}}function dN(t,i,l){let s={...t};if(l==="")return delete s[i.name],s;if(i.widget==="boolean")return s[i.name]=l===!0,s;if(i.widget==="number")return s[i.name]=Number(l),s;return s[i.name]=l,s}var xh={mode:{kind:"browse"},draft:{},body:"",save:{kind:"idle"},deleteOpen:!1};function xO(t){if(t.mode.kind==="browse")return!1;if(t.mode.kind==="create")return!0;return t.body!==t.mode.entity.body||JSON.stringify(t.draft)!==JSON.stringify(t.mode.entity.frontmatter)}function kO(t,i){switch(i.type){case"collectionChanged":return xh;case"documentOpened":return{mode:{kind:"edit",entity:i.document.entity},draft:i.document.draft,body:i.document.body,save:i.save??{kind:"idle"},deleteOpen:!1};case"creationStarted":if(t.mode.kind!=="browse")return t;return{mode:{kind:"create"},draft:i.draft,body:i.body??"",save:{kind:"idle"},deleteOpen:!1};case"browseRequested":return xh;case"fieldChanged":return t.mode.kind==="browse"?t:{...t,draft:dN(t.draft,i.descriptor,i.raw)};case"fieldAssistApplied":return t.mode.kind==="browse"?t:{...t,draft:{...t.draft,[i.field]:i.suggestion}};case"bodyChanged":return t.mode.kind==="browse"?t:{...t,body:i.body};case"saveStarted":return t.mode.kind==="browse"?t:{...t,save:{kind:"saving"}};case"saveFailed":return t.mode.kind==="browse"?t:{...t,save:i.save};case"deleteRequested":return t.mode.kind==="edit"?{...t,deleteOpen:!0}:t;case"deleteCancelled":return t.deleteOpen?{...t,deleteOpen:!1}:t;case"deleteSucceeded":return t.mode.kind==="edit"?xh:t;case"deleteFailed":return t.mode.kind==="edit"?{...t,deleteOpen:!1,save:{kind:"error",message:i.message}}:t}}function CO(t,i,l){return{studioChatHandoff:{version:1,sourceId:t,itemId:i,label:l,prompt:"Help me understand this Inbox item and decide what to do next."}}}function AO(t){if(typeof t!=="object"||t===null)return null;let i=Reflect.get(t,"studioChatHandoff");if(typeof i!=="object"||i===null)return null;let l=Reflect.get(i,"version"),s=Reflect.get(i,"sourceId"),r=Reflect.get(i,"itemId"),c=Reflect.get(i,"label"),h=Reflect.get(i,"prompt");if(l!==1||typeof s!=="string"||!/^[a-z][a-z0-9-]*$/.test(s)||s.length>64||typeof r!=="string"||r.trim().length===0||r.length>300||typeof c!=="string"||c.trim().length===0||c.length>160||typeof h!=="string"||h.trim().length===0||h.length>1e4)return null;return{sourceId:s,itemId:r,label:c,prompt:h}}function Ku(t){if(t instanceof pr)switch(t.status){case 401:return"Your session is no longer authenticated. Sign in again in another tab, then retry here. Keep this tab open to preserve your draft.";case 403:return"You do not currently have permission to read this content. Ask an administrator to check access, then retry.";case 404:return"This content is unavailable. It may have moved, been removed, or be outside your access. Choose another destination or retry.";case 429:return"Studio is receiving too many requests. Wait briefly before retrying."}return`Studio could not load this data. Check your connection or retry later. ${Oi(t)}`}var TO=new Set(["offset","limit"]);function EO(t,i){if(t?.urlQuery!==!0)return{};let l={};for(let[s,r]of new URLSearchParams(i))if(!TO.has(s))l[s]=r;return l}function C1(t){let i=new URLSearchParams,l=Object.entries(t).filter(([r,c])=>!TO.has(r)&&c!==void 0&&(typeof c!=="number"||Number.isFinite(c))).sort(([r],[c])=>r.localeCompare(c));for(let[r,c]of l)i.set(r,String(c));let s=i.toString();return s?`?${s}`:""}function ec(t,i){return`${t}${C1(i)}`}function A1(t,i,l,s){if(s!==i)return;t.replace(ec(i,l))}function T1(t){let i=hr.safeParse(DO(new URLSearchParams(t))),l=i.success?i.data:hr.parse({});return{...l,offset:Math.floor(l.offset/l.limit)*l.limit}}function mr(t){let i=new URLSearchParams;if(t.offset>0)i.set("offset",String(t.offset));if(t.limit!==MO)i.set("limit",String(t.limit));if(t.q)i.set("q",t.q);if(t.visibility!=="all")i.set("visibility",t.visibility);if(t.status)i.set("status",t.status);if(t.sort!=="updated-desc")i.set("sort",t.sort);let l=i.toString();return l?`?${l}`:""}var vn=tt(bn(),1),pN=oe.lazy(async()=>({default:(await import("./studio-chunks/account-view-54k15mfk.js")).AccountApp})),mN=oe.lazy(async()=>({default:(await import("./studio-chunks/studio-chat-workspace-myavww9e.js")).StudioChatWorkspace}));function gN(t){let i=new URLSearchParams(t).get("session")?.trim();return i&&i.length<=256?i:null}function yN(){let t=window.history.state;return h2(t)?t:{}}var bN=[],vN=[],SN={},wN=["public","trusted","admin"];function xN(t,i){let l=document.querySelector("[data-studio-root]"),s=l?.getAttribute("data-studio-principal-name")??"Your account",r=l?.getAttribute("data-studio-principal-role"),c=wN.find((h)=>h===r)??"public";return{displayName:s,role:c,routePath:t,studioPath:i}}function FO(){let t=LO(),i=Vm({select:(U)=>U.location.pathname}),l=Vm({select:(U)=>U.location.searchStr}),s=Vm({select:(U)=>U.location.state}),r=QO(),c=oe.useMemo(()=>i===E1?{kind:"workspace",workspaceId:M1}:_O(i,r),[i,r]),h=oe.useMemo(()=>c.kind==="collection"&&new URLSearchParams(l).get("mode")==="create",[l,c]),d=i,[m,y]=oe.useState(null),[b,S]=oe.useState(null),[w,k]=oe.useState({}),[E,R]=oe.useReducer(kO,xh),{mode:L,draft:_,body:V,save:j}=E,ee=xO(E),[be]=oe.useState(()=>new HO),ot=oe.useSyncExternalStore(be.subscribe,be.hasDrafts,be.hasDrafts),[Rt,ze]=oe.useState({hasDraft:!1,busy:!1}),Tt=BO({shouldBlockFn:({next:U})=>ee||i===E1&&zO({...Rt,hasDraft:ot},U.pathname),enableBeforeUnload:ee||ot||Rt.busy,withResolver:!0}),[ae,lt]=oe.useState({kind:"idle"}),[K,Ue]=oe.useState("preview"),[Gt,Q]=oe.useState("details"),de=oe.useRef(null),pe=oe.useCallback((U)=>{de.current=U,Q(U)},[]),[st,$e]=oe.useState(null),[Li,Bo]=oe.useState(0),[oo,Hn]=oe.useState(null),Lt=oe.useRef(0),zo=oe.useRef(null),nn=oe.useRef(0),ma=oe.useRef(b);ma.current=b;let at=RO(),Bt=Gu(),Le=da(IO(Bt)),Y=Le.data?.types??null,fi=Y?.find((U)=>U.entityType===b),Je=fi?.capabilities,Ut=oe.useMemo(()=>fi?.isSingleton?T1(""):T1(l),[fi?.isSingleton,l]),Et=Ut.offset,ve=Le.data?.workspaces??vN,Ge=ve.find((U)=>U.id===m),Sn=Ge?.rendererName===UO,ml=Ge?.rendererName===D1,Ze=Ge?.rendererName==="DeclarativeOperatorWorkspace",gl=m?w[m]:void 0,fn=Ge?.urlQuery!==!0||gl?.urlSearch===l,Bi=oe.useMemo(()=>EO(Ge,l),[Ge,l]),Ho=m?gl&&fn?gl.query:Bi:SN,No=da({...$O(Bt,m??"",Ho),enabled:Ze}),yl=No.data??null,bl=yl?.data??null,zi=No.error?Ku(No.error):null,fs=L.kind==="edit"?L.entity.id:null,vl=da({...PO(Bt,b??"",fs??""),enabled:b!==null&&fs!==null&&Je?.canAssist===!0&&Je.canUpdate}).data??bN,Hi=da({...YO(Bt),enabled:b!==null}).data??null,Ni=da({...H1(Bt,b??"",Ut),enabled:b!==null}),gr=b?Ni.data?.entities??null:null,hi=Ni.data?.total,yr=da({...z1(Bt,b??""),enabled:b!==null}),hn=b?yr.data??null:null;da({...kh(Bt,b??"",fs??""),enabled:b!==null&&fs!==null});let ne=qm({mutationFn:(U)=>jO(Bt,U)}),on=qm({mutationFn:(U)=>VO(Bt,U)}),Nn=qm({mutationFn:(U)=>qO(Bt,U)}),Sl=on.isPending,lo=Ze&&yl?yl.data:null;oe.useEffect(()=>{if(!b||!fi||m||c.kind!=="collection"&&c.kind!=="entity"||c.entityType!==b)return;if(hi===void 0)return;let U=Math.floor(Math.max(0,hi-1)/Ut.limit)*Ut.limit;if(Et>U)t.history.replace(`${i}${mr({...Ut,offset:U})}`,t.history.location.state)},[fi,m,Et,hi,Ut,b,i,c,t.history]),oe.useEffect(()=>{if(!m||!lo?.refreshAfterMs)return;let U=window.setTimeout(()=>{at.invalidateQueries({queryKey:pl.workspace(m)})},lo.refreshAfterMs);return()=>window.clearTimeout(U)},[m,lo,at]),oe.useEffect(()=>{if(Ge?.urlQuery!==!0||c.kind!=="workspace"||c.workspaceId!==Ge.id)return;let U=Lo(r,Ge.id);if(ec(U,Bi)!==`${U}${l}`)A1(t.history,U,Bi,window.location.pathname)},[Ge,r,Bi,l,c,t.history]),oe.useEffect(()=>{if(!Y)return;if($e(null),c.kind==="not-found"){nn.current+=1,$e(`Studio route not found: ${c.pathname}`);return}if(c.kind==="workspace"){let Se=ve.find((Te)=>Te.id===c.workspaceId);if(!Se){let Te=GO(r,c.workspaceId,l,ve);if(Te){t.history.replace(Te);return}nn.current+=1,$e(`Workspace unavailable for this account: ${c.workspaceId}`);return}y(Se.id),S(null);return}let U=c.kind==="collection"||c.kind==="entity"?c.entityType:void 0,re=Y.find((Se)=>!Se.isSingleton)??Y[0];if(c.kind==="home"){let Se=WO(r,Y,ve);if(Se!==r){t.history.replace(Se);return}}let Oe=U??re?.entityType??null;if(U!==void 0&&!Y.some((Se)=>Se.entityType===U)){nn.current+=1,$e(`Collection unavailable for this account: ${U}`);return}y(null),S(Oe)},[l,c,t.history,r,Y,ve]),oe.useEffect(()=>{if(j.kind!=="saved"||!Hi?.git)return;if(Bm({save:j,git:Hi.git,baselineCommit:oo}).committed==="done")return;if(Date.now()-Lt.current>20000)return;let re=window.setTimeout(()=>{at.invalidateQueries({queryKey:pl.syncStatus()})},900);return()=>window.clearTimeout(re)},[j,Hi,oo,at]),oe.useEffect(()=>{if(!b||c.kind==="workspace"||c.kind==="not-found")return;let U=c.kind==="entity"&&c.entityType===b?c.id:null,re=++nn.current;R({type:"collectionChanged"}),Q("details"),lt({kind:"idle"});let Oe=!0,Se=()=>Oe&&re===nn.current;return at.fetchQuery({...z1(Bt,b),staleTime:0}).then(async(Te)=>{if(!Oe||re!==nn.current)return;let qe=gO(Te,de.current);if(Q(qe),window.matchMedia("(max-width: 640px)").matches&&qe!=="details")Ue(qe==="write"?"source":"preview");if(h&&U===null){if(Y?.find((ln)=>ln.entityType===b)?.capabilities.canCreate!==!0){$e(`Creating ${b} is not allowed.`);return}let Cl=SO(window.history.state,b,()=>window.history.replaceState(vO(yN()),"",window.location.href)),ro=wO(Te.fields,Cl);R({type:"creationStarted",draft:ro.draft,body:ro.body});return}if(U!==null)return at.fetchQuery({...kh(Bt,b,U),staleTime:0}).then((kl)=>{if(!Oe||re!==nn.current)return;let Cl=Ju(kl),ro=zo.current,ln=ro?.pathname===d?ro.save:{kind:"idle"};if(ro?.pathname===d)zo.current=null;R({type:"documentOpened",document:Cl,save:ln})});if(Te.isSingleton){let kl=await at.ensureQueryData(H1(Bt,b));if(!Se())return;let Cl=kl.entities[0];if(Cl)return at.fetchQuery({...kh(Bt,b,Cl.id),staleTime:0}).then((ro)=>{if(!Oe||re!==nn.current)return;let ln=Ju(ro);R({type:"documentOpened",document:ln})});R({type:"creationStarted",draft:wh(Te.fields)})}return}).catch((Te)=>{if(Oe&&re===nn.current)$e(Ku(Te))}),()=>{Oe=!1}},[h,d,b,Li,at,i,c,Y]);let Mt=oe.useCallback((U,re={kind:"idle"})=>{if(!b)return;let Oe=R1(r,b,U);if(Oe!==d){zo.current={pathname:Oe,save:re},t.history.push(`${Oe}${mr(Ut)}`,{studioCollectionPath:`${pa(r,b)}${mr(Ut)}`},re.kind==="saved"?{ignoreBlocker:!0}:void 0);return}let Se=++nn.current,Te=b;at.fetchQuery({...kh(Bt,b,U),staleTime:0}).then((qe)=>{if(Se!==nn.current||ma.current!==Te)return;let kl=Ju(qe);R({type:"documentOpened",document:kl,save:re}),lt({kind:"idle"})}).catch((qe)=>{if(Se===nn.current)$e(Ku(qe))})},[r,d,b,Ut,at,t.history]),so=oe.useCallback((U,re)=>{let Oe=R1(r,U,re);zo.current={pathname:Oe,save:{kind:"idle"}},t.history.push(Oe,{studioCollectionPath:pa(r,U)})},[r,t.history]),wl=oe.useCallback((U,re,Oe,Se)=>{t.history.push(NO(r,"note"),p2(U,`entity://${encodeURIComponent(Oe)}/${encodeURIComponent(Se)}`,re))},[r,t.history]),xl=oe.useCallback((U,re,Oe)=>{if(ve.some((Se)=>Se.rendererName===D1)){t.history.push(O1(r),CO(U,re,Oe));return}},[t.history,r,ve]),ic=oe.useCallback((U)=>{switch(U.target){case"account-settings":{t.history.push(Lo(r,L1));return}case"invitations":t.history.push(ec(Lo(r,"admin:administration"),{tab:"invitations"}));return;case"admin-peer-invite":{t.history.push(ec(Lo(r,"admin:administration"),{tab:"invitations",peerId:U.peerId,displayName:U.displayName}));return}case"inbox":{let re={};if("source"in U){if(re.sourceId="mail-items",U.filter==="high-priority")re["facet.mail-priority"]="high";else if(U.filter==="needs-reply")re["facet.needs-reply"]="true";else if(U.filter==="unclassified")re["facet.category"]="unclassified"}t.history.push(ec(Lo(r,"unified-inbox:inbox"),re));return}case"publishing":t.history.push(Lo(r,"content-pipeline:publishing"));return;case"site":t.history.push(Lo(r,"site-builder:site"));return;case"inbox-open-entity":so(U.entityType,U.entityId);return;case"inbox-capture-note":wl(U.title,U.summary,U.entityType,U.entityId);return;case"inbox-discuss-in-chat":xl(U.sourceId,U.itemId,U.label)}},[wl,r,xl,so,l,t.history]),br=oe.useCallback((U)=>{t.history.push(pa(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),vr=oe.useCallback((U)=>{if(!b)return;t.history.push(`${pa(r,b)}${mr({...Ut,offset:U})}`),window.scrollTo({top:0,left:0})},[b,Ut,r,t.history]),hs=oe.useCallback((U)=>{t.history.push(U===M1?O1(r):Lo(r,U)),window.scrollTo({top:0,left:0})},[r,t.history]),ao=oe.useCallback(()=>{if(!hn||Je?.canCreate!==!0)return;R({type:"creationStarted",draft:wh(hn.fields)}),lt({kind:"idle"})},[Je,hn]),Zn=oe.useCallback(()=>{if(!b)return;let U=`${pa(r,b)}${mr(Ut)}`,re=t.history.location.state;if(typeof re==="object"&&re!==null&&"studioCollectionPath"in re&&re.studioCollectionPath===U&&t.history.canGoBack()){t.history.back();return}t.history.replace(U)},[r,b,Ut,t.history]),Ch=oe.useCallback((U,re)=>{if(!b||L.kind!=="edit"||Je?.canUpdate!==!0||Je.canAssist!==!0||V.trim().length===0)return;lt({kind:"loading",field:re,variant:U}),Bt.requestFieldAssist({variant:U,entityType:b,id:L.entity.id,targetField:re}).then((Oe)=>{let Se=Oe.variant==="summarise"?Oe.suggestion:Oe.suggestions;lt({kind:"suggested",field:Oe.targetField,variant:Oe.variant,suggestion:Se})}).catch((Oe)=>{lt({kind:"error",field:re,message:Oi(Oe)})})},[Je,V,b,L]),$m=oe.useCallback((U,re)=>{R({type:"fieldAssistApplied",field:U,suggestion:re}),lt({kind:"idle"})},[]),oc=oe.useCallback(()=>{if(!b||L.kind==="browse"||!hn)return;if(L.kind==="create"?Je?.canCreate!==!0:Je?.canUpdate!==!0)return;Lt.current=Date.now(),Hn(Hi?.git?.lastCommit??null),R({type:"saveStarted"});let U=hn.hasBody?{body:V}:{},re=XO(hn.fields,_),Oe=L.kind==="create"?{kind:"create",entityType:b,frontmatter:re,...U}:{kind:"update",entityType:b,id:L.entity.id,frontmatter:re,baseContentHash:L.entity.contentHash,...U},Se=nn.current;ne.mutate(Oe,{onSuccess:async(Te)=>{if(await Promise.all([at.invalidateQueries({queryKey:pl.entities(b)}),at.invalidateQueries({queryKey:pl.syncStatus()}),...L.kind==="create"?[at.invalidateQueries({queryKey:pl.navigation()})]:[]]),Se!==nn.current)return;let qe="skipped"in Te&&Te.skipped===!0;Mt(Te.entityId,{kind:"saved",noop:qe})},onError:(Te)=>{if(Se!==nn.current)return;if(Te instanceof pr&&Te.issues.length>0)Q("details");R({type:"saveFailed",save:Te instanceof pr&&Te.status===409?{kind:"conflict",message:Oi(Te)}:{kind:"error",message:Te instanceof pr&&Te.issues.length>0?Te.message||"Validation failed":Oi(Te),...Te instanceof pr?{issues:Te.issues}:{}}})}})},[Je,b,L,_,V,hn,Mt,Hi,at,ne]),Ah=oe.useCallback(()=>{if(!b||L.kind!=="edit"||Sl||Je?.canDelete!==!0)return;let{id:U}=L.entity;on.mutate({entityType:b,id:U},{onSuccess:async()=>{R({type:"deleteSucceeded"}),at.removeQueries({queryKey:pl.entity(b,U)}),await Promise.all([at.invalidateQueries({queryKey:pl.entities(b)}),at.invalidateQueries({queryKey:pl.syncStatus()}),at.invalidateQueries({queryKey:pl.navigation()})]),t.history.replace(pa(r,b),void 0,{ignoreBlocker:!0})},onError:(re)=>{R({type:"deleteFailed",message:Oi(re)})}})},[Je,r,b,L,Sl,at,on,t.history]),Sr=oe.useCallback(async(U)=>{let re=ve.find((qe)=>qe.pluginId==="content-pipeline"&&qe.entityTypes.includes(U.entityType));if(!re)throw Error("Publishing is unavailable");let Oe={entityType:U.entityType,entityId:U.entityId,...U.type==="reorder"?{position:U.position}:{}};if(U.type==="publish"&&!U.confirmation){let qe=await Nn.mutateAsync({workspaceId:re.id,action:{actionId:"publish",label:"Publish now",input:Oe,invocation:{mode:"prepare"}}});if(typeof qe!=="object"||qe===null||!("kind"in qe)||qe.kind!=="prepared-confirmation"||!("token"in qe)||typeof qe.token!=="string"||!("summary"in qe)||typeof qe.summary!=="string"||!("expiresAt"in qe)||typeof qe.expiresAt!=="string")throw Error("Publishing confirmation is unavailable");return{needsConfirmation:!0,summary:qe.summary,args:{confirmed:!0,confirmationToken:qe.token,contentHash:qe.token,expiresAt:qe.expiresAt}}}let Se=await Nn.mutateAsync({workspaceId:re.id,action:{actionId:U.type,label:U.type,input:Oe,...U.type==="publish"&&U.confirmation?{invocation:{mode:"execute",token:U.confirmation.confirmationToken}}:{}}});if(typeof Se!=="object"||Se===null)throw Error("Publishing returned an invalid result");let Te="success"in Se&&Se.success===!1?{success:!1,error:"error"in Se&&typeof Se.error==="string"?Se.error:"Publishing failed",..."code"in Se&&typeof Se.code==="string"?{code:Se.code}:{}}:{success:!0};if(!d1(Te)&&!p1(Te)){if(await B1(at,re.id),L.kind==="edit"&&b===U.entityType&&L.entity.id===U.entityId)Mt(U.entityId)}return Te},[b,L,Mt,at,Nn,ve]),Kn=oe.useCallback(async(U)=>{if(!m)throw Error("Declarative workspace is unavailable");try{let re=await Nn.mutateAsync({workspaceId:m,action:U});return await B1(at,m),re}finally{Nn.reset()}},[m,Nn,at]),Th=oe.useCallback((U,re,Oe)=>{let Se=ve.find((qe)=>qe.id===U),Te=Se?.urlQuery===!0?l:void 0;if(Se?.urlQuery===!0&&Oe!==void 0){let qe=Lo(r,U);Te=C1(Oe),A1(t.history,qe,Oe,window.location.pathname)}k((qe)=>({...qe,[U]:{query:re,...Te!==void 0?{urlSearch:Te}:{}}}))},[r,l,t.history,ve]),_i=st??(Le.error?Ku(Le.error):Ni.error?Ku(Ni.error):null),lc=()=>{if($e(null),Le.error)Le.refetch();if(Ni.error)Ni.refetch();if(No.error)No.refetch();if(L.kind==="browse")Bo((U)=>U+1)};if(_i&&!Y)return vn.jsxDEV(Zu,{message:_i,error:!0,onRetry:lc},void 0,!1,void 0,this);if(!Y)return vn.jsxDEV(Zu,{message:"Loading…"},void 0,!1,void 0,this);if(Sn){let U=Lo(r,L1);return vn.jsxDEV(yO,{types:Y,workspaces:ve,workspaceId:Ge.id,selectEntityType:br,selectWorkspace:hs,children:vn.jsxDEV(oe.Suspense,{fallback:vn.jsxDEV(It,{children:"Opening Account…"},void 0,!1,void 0,this),children:vn.jsxDEV(pN,{bootstrap:xN(U,r)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}if(ml)return vn.jsxDEV(vn.Fragment,{children:[vn.jsxDEV(oe.Suspense,{fallback:vn.jsxDEV(Zu,{message:"Opening Chat…"},void 0,!1,void 0,this),children:vn.jsxDEV(mN,{apiPath:Ge.chatApiPath,draftStore:be,onNavigationStateChange:ze,studioBasePath:r,sessionId:gN(l),types:Y,workspaces:ve,handoff:AO(s),navigate:(U,re)=>{t.history.push(U,void 0,{ignoreBlocker:re?.preserveWork===!0})},selectEntityType:br,selectWorkspace:hs},void 0,!1,void 0,this)},void 0,!1,void 0,this),Tt.status==="blocked"&&vn.jsxDEV(Ji,{mark:"↩",title:"Leave this conversation?",titleId:"chat-navigation-title",cancelLabel:"Stay",confirmLabel:"Leave",onCancel:()=>Tt.reset(),onConfirm:()=>Tt.proceed(),children:vn.jsxDEV("p",{children:"Your draft stays in this tab. Leaving stops receiving the response, but does not undo completed actions or background jobs."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(m?!bl&&!zi:b&&!hn&&!_i)return vn.jsxDEV(Zu,{message:"Loading…"},void 0,!1,void 0,this);if(!m&&(!b||!hn&&!_i))return vn.jsxDEV(Zu,{message:_i??"No readable collections are available for this account.",error:Boolean(_i),..._i?{onHome:()=>t.history.push(r)}:{}},void 0,!1,void 0,this);return vn.jsxDEV(bO,{activeWorkspaceId:m,types:Y,workspaces:ve,workspaceError:zi,readError:_i,onRetryRead:lc,declarativeWorkspaceData:lo,workspaceQuery:Ho,entityType:b,entities:gr,entityOffset:Et,entityLimit:Ut.limit,entityTotal:hi??0,collectionQuery:Ut,onCollectionQueryChange:(U)=>{if(!b)return;t.history.push(`${pa(r,b)}${mr({...U,offset:0})}`),window.scrollTo({top:0,left:0})},entityListLoading:Ni.isPending,schema:hn,editor:E,fieldAssistState:ae,bodyMode:K,mobilePane:Gt,syncStatus:Hi,baselineCommit:oo,agentTargets:vl,deleting:Sl,hasUnsavedChanges:ee,navigationBlocked:Tt.status==="blocked",dispatchEditor:R,setFieldAssistState:lt,setBodyMode:Ue,setMobilePane:pe,backToList:Zn,selectEntityType:br,selectWorkspace:hs,changeEntityPage:vr,openWorkspaceEntity:so,openWorkspaceLaunch:ic,performPublishingAction:Sr,performDeclarativeAction:Kn,onWorkspaceQueryChange:Th,startCreate:ao,openEntity:Mt,runFieldAssist:Ch,applyFieldAssist:$m,save:oc,remove:Ah,onNavigationReset:()=>Tt.reset?.(),onNavigationProceed:()=>Tt.proceed?.()},void 0,!1,void 0,this)}function ZO(){return new JO({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1},mutations:{retry:!1}}})}var Im=tt(bn(),1),jm=document.querySelector("[data-studio-root]");if(jm){let t=jm.getAttribute("data-studio-base-path")??"/studio",i=new tR({basePath:t});jm.textContent="";let l=ZO(),s=iR(t,FO);oR.createRoot(jm).render(Im.jsxDEV(KO,{client:l,children:Im.jsxDEV(nR,{api:i,children:Im.jsxDEV(eR,{router:s},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this))}
|
|
246
246
|
|
|
247
|
-
//# debugId=
|
|
247
|
+
//# debugId=E3FC7076B688699164756E2164756E21
|