mirror of
https://github.com/UiO-Gaming/uiogaming.no-backend.git
synced 2026-11-05 13:56:49 +01:00
fix some vulns
This commit is contained in:
188 files changed
+6968
-7131
No files matched your search
Vendored
+2
-2
@@ -165,7 +165,7 @@
|
||||
return true
|
||||
})
|
||||
})()
|
||||
</script><link href="/static/lib-DFOz7_5_.css" rel="stylesheet"/><link href="/static/PerspectiveProvider-CVaQBlks-VQ0ZgwGb.css" rel="stylesheet"/><style>
|
||||
</script><link href="/static/lib-BFHl89nf.css" rel="stylesheet"/><link href="/static/PerspectiveProvider-qJFIbsuW-Di-8vf7M.css" rel="stylesheet"/><style>
|
||||
@font-face {
|
||||
font-family: Inter;
|
||||
font-style: normal;
|
||||
@@ -268,7 +268,7 @@
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
</style><script src="https://core.sanity-cdn.com/bridge.js" async type="module" data-sanity-core></script>
|
||||
</head><body><div id="sanity"></div><script type="application/json" id="sanity-resource-bindings">[]</script><script src="/static/sanity-CoxvCVZ8.js" type="module"></script><noscript><div class="sanity-app-no-js__root"><div class="sanity-app-no-js__content"><style type="text/css">
|
||||
</head><body><div id="sanity"></div><script src="/static/sanity-GsYh3wpj.js" type="module"></script><noscript><div class="sanity-app-no-js__root"><div class="sanity-app-no-js__content"><style type="text/css">
|
||||
.sanity-app-no-js__root {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{bl as a,hl as o,vl as s}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";var c=e(n(),1),l=i(),u=r();function d(e){let n=(0,l.c)(25),{children:r}=e,{dataset:i,projectId:d}=a(),f=s(o),[p,m]=(0,c.useState)(null),[h,g]=(0,c.useState)(!1),[_,v]=(0,c.useState)(!1),[y,b]=(0,c.useState)(null),x;n[0]!==i||n[1]!==f||n[2]!==d?(x=async()=>(await f.request({url:`/projects/${d}/datasets?datasetProfile=comments&addonFor=${i}`,tag:`sanity.studio`}))?.[0]?.name,n[0]=i,n[1]=f,n[2]=d,n[3]=x):x=n[3];let S=x,C;n[4]!==f||n[5]!==d?(C=e=>f.withConfig({dataset:e,projectId:d,requestTagPrefix:`sanity.studio`,useCdn:!1}),n[4]=f,n[5]=d,n[6]=C):C=n[6];let w=C,T;n[7]!==i||n[8]!==S||n[9]!==w||n[10]!==f?(T=async()=>{g(!0);try{let e=await S();if(e){let t=w(e);return m(t),g(!1),t}}catch{}return(async()=>{let e=(await f.request({url:`/comments/${i}/setup`,method:`POST`}))?.datasetName;if(!e)return g(!1),null;let t=w(e);return m(t),t})().finally(()=>{g(!1)})},n[7]=i,n[8]=S,n[9]=w,n[10]=f,n[11]=T):T=n[11];let E=T,D,O;n[12]!==S||n[13]!==w?(D=()=>{S().then(e=>{if(!e)return;let t=w(e);m(t)}).catch(e=>{b(e)}).finally(()=>{v(!0)})},O=[S,w],n[12]=S,n[13]=w,n[14]=D,n[15]=O):(D=n[14],O=n[15]),(0,c.useEffect)(D,O);let k;n[16]!==p||n[17]!==y||n[18]!==E||n[19]!==h||n[20]!==_?(k={client:p,createAddonDataset:E,isCreatingDataset:h,ready:_,error:y},n[16]=p,n[17]=y,n[18]=E,n[19]=h,n[20]=_,n[21]=k):k=n[21];let A=k,j;return n[22]!==r||n[23]!==A?(j=(0,u.jsx)(t.Provider,{value:A,children:r}),n[22]=r,n[23]=A,n[24]=j):j=n[24],j}function f(e){let n=(0,l.c)(2);if((0,c.useContext)(t))return e.children;let r;return n[0]===e?r=n[1]:(r=(0,u.jsx)(d,{...e}),n[0]=e,n[1]=r),r}export{f as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Nd as t,Od as n,Rf as r,jd as i}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as a,t as o}from"./jsx-runtime-BpzPEenQ.js";import{t as s}from"./compiler-runtime-sKsOXjDo.js";var c=e(a(),1),l=s(),u=o();function d(e){let a=(0,l.c)(25),{children:o}=e,{dataset:s,projectId:d}=t(),f=i(n),[p,m]=(0,c.useState)(null),[h,g]=(0,c.useState)(!1),[_,v]=(0,c.useState)(!1),[y,b]=(0,c.useState)(null),x;a[0]!==s||a[1]!==f||a[2]!==d?(x=async()=>(await f.request({url:`/projects/${d}/datasets?datasetProfile=comments&addonFor=${s}`,tag:`sanity.studio`}))?.[0]?.name,a[0]=s,a[1]=f,a[2]=d,a[3]=x):x=a[3];let S=x,C;a[4]!==f||a[5]!==d?(C=e=>f.withConfig({dataset:e,projectId:d,requestTagPrefix:`sanity.studio`,useCdn:!1}),a[4]=f,a[5]=d,a[6]=C):C=a[6];let w=C,T;a[7]!==s||a[8]!==S||a[9]!==w||a[10]!==f?(T=async()=>{g(!0);try{let e=await S();if(e){let t=w(e);return m(t),g(!1),t}}catch{}return(async()=>{let e=(await f.request({url:`/comments/${s}/setup`,method:`POST`}))?.datasetName;if(!e)return g(!1),null;let t=w(e);return m(t),t})().finally(()=>{g(!1)})},a[7]=s,a[8]=S,a[9]=w,a[10]=f,a[11]=T):T=a[11];let E=T,D,O;a[12]!==S||a[13]!==w?(D=()=>{S().then(e=>{if(!e)return;let t=w(e);m(t)}).catch(e=>{b(e)}).finally(()=>{v(!0)})},O=[S,w],a[12]=S,a[13]=w,a[14]=D,a[15]=O):(D=a[14],O=a[15]),(0,c.useEffect)(D,O);let k;a[16]!==p||a[17]!==y||a[18]!==E||a[19]!==h||a[20]!==_?(k={client:p,createAddonDataset:E,isCreatingDataset:h,ready:_,error:y},a[16]=p,a[17]=y,a[18]=E,a[19]=h,a[20]=_,a[21]=k):k=a[21];let A=k,j;return a[22]!==o||a[23]!==A?(j=(0,u.jsx)(r.Provider,{value:A,children:o}),a[22]=o,a[23]=A,a[24]=j):j=a[24],j}function f(e){let t=(0,l.c)(2);if((0,c.useContext)(r))return e.children;let n;return t[0]===e?n=t[1]:(n=(0,u.jsx)(d,{...e}),t[0]=e,t[1]=n),n}export{f as t};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/resources-B2JQiyBa-CwazuJcA.js","static/lib-D7dq6hfV.js","static/rolldown-runtime-Dd_uD5pT.js","static/PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js","static/jsx-runtime-BpzPEenQ.js","static/compiler-runtime-sKsOXjDo.js","static/from-B8yXq1Hf.js","static/clientStore-Cq3vrK4Q-X8Ukd-3S.js","static/preload-helper-DjzSQ1t3.js","static/isRecord-Kfmt-nk--BGze3w87.js","static/request-CYLhJzOA-R7VqCP01.js","static/resolveEditInfo-Cz-smq3a-BkgfIKD_.js","static/dist-LVcARZxB.js","static/Spinner-Dk8hTAm3.js","static/Close-B_ZEgT1V.js","static/ChevronDown-BpYUc-AP.js","static/ToggleArrowRight-Ds3XaLpQ.js","static/Checkmark-OT7tsNpL.js","static/Remove-B96Rrnq-.js","static/stegaClean-YZRATV86-BdUaXCkw.js","static/isRecord-Kfmt-nk--BbRXhYkF.js","static/WarningOutline-DOBjmorn.js","static/request-CYLhJzOA-4VlvBNTk.js","static/ChevronRight-Cf6GkXSa.js","static/Document-0Zpczu4q.js","static/Bolt-CkliNuRS.js","static/Clock-ClG7Ty9T.js","static/Dot-D4h2WemU.js","static/Calendar-DCYqUUNo.js","static/Search-QbUIQb6W.js","static/ChevronLeft-BzE8YX6u.js","static/EarthGlobe-Dqu4Dt_R.js","static/EllipsisHorizontal-BuWLk1Hy.js","static/InfoOutline-BLtnjxbN.js","static/ErrorOutline-Cl-3_nRG.js","static/EarthAmericas-DLWVWv9X.js","static/Image-BrMFkN0j.js","static/Trash-BxG6GrjH.js","static/ArrowLeft-x2OZCZTu.js","static/Edit-CAHlBqGT.js","static/AddCircle-BZjvWs4R.js","static/Circle-DkcW-8WT.js","static/Publish-BYF7r5nk.js","static/Timeline-X-VaErdm.js","static/Unpublish-B0p_ZGt2.js","static/ArrowDown-CM5h1Tfl.js","static/ArrowRight-D293IkFJ.js","static/Revert-BmEXeO7H.js","static/Copy-BTQgeMVP.js","static/Sync-B1MBhh7o.js","static/AccessDenied-PrzSvkgv.js","static/Documents-C8KrBFzU.js","static/Download-DeIn0VAL.js","static/ChevronUp-3VMiyA07.js","static/Link-Cl1VSeDJ.js","static/Ulist-CYD_2mDY.js","static/BinaryDocument-D1GQsa0h.js","static/Upload-ChJKE2jO.js","static/ReadOnly-BkEx9qPu.js","static/Reset-CgCZnejz.js","static/Launch-DuEs-KHJ.js","static/Unknown-CEYtdaCK.js","static/Add-CwQ5TpM8.js","static/Lock-Ui2f2sVi.js","static/EyeOpen-DOBSuUsK.js","static/BulbOutline-BN--Ec2H.js","static/HelpCircle-8HZ3whUD.js","static/Collapse-B22lXxln.js","static/Expand-CQC9Ec3E.js","static/BlockElement-CQIVGSb1.js","static/Bold-CGtaOUDj.js","static/Code-COts8HnY.js","static/InlineElement-BWl55c6a.js","static/Italic-BmVn7uuk.js","static/Olist-BBuinWyR.js","static/Strikethrough-BszDIkmY.js","static/Underline-BdG8-Er-.js","static/ThLarge-CjFCbJnr.js","static/Desktop-msdzf3th.js","static/Moon-NrRkSdh3.js","static/Sun-OgXegq7_.js","static/DragHandle-CKP6vPDQ.js","static/AddDocument-Ca_v8JdZ.js","static/InsertAbove-C8i6y-4D.js","static/InsertBelow-BILWhc2X.js","static/Crop-DW3NFLyK.js","static/PerspectiveProvider-qJFIbsuW-Di-8vf7M.css","static/CommentsProvider-DHVaZIPI-DonUdARw.js","static/types--2f-avvL-DfAXA8nG.js","static/Controls-Dx7QJOxz.js","static/Sort-CFTgH29c.js","static/validationUtils-Dwef0BLR-DSZmlLZW.js","static/SingleDocReleaseUpsellProvider-eSYyzLjC-DBu0--ZA.js","static/Clipboard-BeSdPeHT.js","static/BlockContent-Bw8BGwBw.js","static/CheckmarkCircle-B6SBY4QE.js","static/Number-CjvU0EcK.js","static/String-DHDsSmJ_.js","static/Undo-qtvfkxbn.js","static/ComposeSparkles-Dn7kooau.js","static/Unlink-MiIozO9s.js","static/Comment-CPMW8FMx.js","static/Task-DGtH1mzn.js","static/Feedback-CkbzKydh.js","static/FaceHappy-1ocsUhoA.js","static/FaceIndifferent-CIPzkDxf.js","static/FaceSad-lhl7n__s.js","static/Sparkle-CUquRU1h.js","static/EyeClosed-BnY-JoVE.js","static/Unlock-B4_-ahLp.js","static/DoubleChevronRight-PxmJHA0v.js","static/Menu-BoI111KG.js","static/Leave-_nWak6QB.js","static/AddUser-CTyeR_e2.js","static/Cog-0goaM-Or.js","static/Users-BDbacX-A.js","static/Bug-CFB9Jubh.js","static/Github-BTBOp21P.js","static/Refresh-C_m5vs8N.js","static/useAddonDataset-BvCgByG6-PgDcQUJg.js","static/helpers-D_aQC6Do-BbFlOJg3.js","static/buildRangeDecorationSelectionsFromComments-B6nJH-Wx-DkTEGwwW.js","static/CommentsListItem-B4CoDHda-B92j42qR.js","static/LinkRemoved-LZtddC2J.js","static/CommentsList-CmhU6-yt-CzUxgKBX.js","static/CommentsEnabledProvider-CEeES47b-BEr5KMWm.js","static/useComments-Bi1m7AzT-CGyuZP86.js","static/CommentsEnabledProvider-By3TCGFl-gLI34tgD.js","static/AddonDatasetProvider-CF_RtUZo-BoMlopck.js","static/lib-BFHl89nf.css"])))=>i.map(i=>d[i]);
|
||||
import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{i as n,l as r,s as i,t as a}from"./lib-D7dq6hfV.js";import{$s as o,A as s,Aa as c,Af as l,Am as u,Ao as d,Ap as f,Ar as p,B as m,Bc as h,Bl as g,C as _,Cs as v,Ct as y,Dl as b,Do as x,Dp as S,Dr as C,Ds as w,Ei as T,Ep as E,Er as D,Es as O,Fa as k,Fl as A,Fr as j,Ft as M,G as N,Gr as P,Gs as F,H as I,Ho as L,Il as R,Io as z,Ir as B,Iu as V,Jc as ee,Ks as H,Ll as te,Ls as ne,Lu as re,Md as ie,Ml as U,Mn as ae,Mo as W,Mp as G,Ms as oe,Mu as K,Nd as se,O as ce,Od as le,Oi as ue,Oo as de,Pr as fe,Qo as pe,Qt as me,Rd as he,Ro as ge,Rr as _e,Rs as ve,Ru as ye,Sc as be,Sd as q,Tl as xe,To as Se,Tp as Ce,Up as we,V as Te,Va as Ee,W as De,Wc as Oe,Wr as ke,Xo as Ae,Yf as je,Yl as Me,Yo as Ne,Ys as Pe,Zc as Fe,Zi as Ie,Zs as Le,_ as Re,_d as ze,_l as Be,ac as Ve,ad as He,ar as Ue,as as We,b as Ge,ba as Ke,bc as qe,bf as Je,bl as Ye,cc as Xe,cd as Ze,da as Qe,dc as $e,dm as et,dp as tt,ds as nt,ec as rt,ed as it,fa as at,fl as ot,fp as st,fr as ct,fs as lt,ft as ut,gc as dt,gl as ft,gu as pt,hc as mt,hu as ht,ic as gt,im as _t,ir as vt,is as yt,ja as bt,jd as xt,jo as St,js as Ct,ju as wt,kd as Tt,ki as Et,ko as Dt,ks as Ot,l as kt,la as At,lc as jt,ld as Mt,ls as Nt,ms as Pt,mu as Ft,nc as It,nd as Lt,nr as Rt,ns as zt,oa as Bt,oc as Vt,os as Ht,pc as Ut,pm as Wt,pr as Gt,q as Kt,qi as qt,ra as Jt,rc as Yt,rs as Xt,sc as Zt,sd as Qt,so as $t,sp as en,ss as tn,ta as nn,tc as rn,tl as an,tt as on,uc as sn,um as cn,up as ln,us as un,v as dn,va as fn,vd as pn,vu as mn,w as hn,wi as gn,wm as _n,wo as vn,wp as yn,ws as bn,xi as xn,y as Sn,ya as Cn,zc as wn,zr as Tn}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as En,t as Dn}from"./jsx-runtime-BpzPEenQ.js";import{t as On}from"./compiler-runtime-sKsOXjDo.js";import{t as kn}from"./from-B8yXq1Hf.js";import{At as An,Q as jn,X as Mn,at as Nn,ht as Pn,it as Fn,lt as In,nt as Ln,ot as Rn,q as zn,rt as Bn,st as Vn,wt as Hn,xt as Un,yt as Wn}from"./clientStore-Cq3vrK4Q-X8Ukd-3S.js";import{i as Gn,n as Kn,t as qn}from"./CommentsProvider-DHVaZIPI-DonUdARw.js";import{An as Jn,At as Yn,Bt as Xn,Ct as Zn,E as Qn,En as $n,Et as er,F as tr,Ft as nr,Gt as rr,Ht as ir,It as ar,Jt as or,Kt as sr,Lt as cr,Nn as lr,Nt as ur,O as dr,On as fr,P as pr,Pt as mr,Rt as hr,St as gr,T as _r,Tt as vr,Ut as yr,Vt as br,W as xr,Wt as Sr,Yt as Cr,_n as wr,an as Tr,at as Er,b as Dr,bn as Or,cr as kr,dn as Ar,fn as jr,fr as Mr,hr as Nr,ht as Pr,i as Fr,in as Ir,ir as Lr,it as Rr,jt as zr,l as Br,ln as Vr,lr as Hr,mn as Ur,mt as Wr,nn as Gr,nr as Kr,nt as qr,ot as Jr,p as Yr,pt as Xr,qt as Zr,rn as Qr,rr as $r,tr as ei,u as ti,un as ni,w as ri,x as ii,xn as ai}from"./types--2f-avvL-DfAXA8nG.js";import{t as oi}from"./preload-helper-DjzSQ1t3.js";import{B as si,Bt as ci,Dt as li,Et as ui,Gt as di,O as fi,Pt as pi,Qt as mi,R as hi,S as gi,St as J,T as _i,U as vi,Ut as yi,V as bi,Vt as xi,Zt as Si,_ as Ci,at as wi,b as Ti,bt as Ei,c as Di,ct as Oi,dt as ki,et as Ai,f as ji,ft as Mi,g as Ni,h as Pi,j as Fi,k as Ii,p as Li,r as Y,s as Ri,st as zi,t as Bi,tt as Vi,x as Hi,yt as Ui}from"./dist-LVcARZxB.js";import{a as Wi,c as Gi,d as Ki,l as qi,o as Ji,s as Yi,u as Xi}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as Zi}from"./Close-B_ZEgT1V.js";import{t as Qi}from"./WarningOutline-DOBjmorn.js";import{t as $i}from"./ChevronDown-BpYUc-AP.js";import{t as ea}from"./Checkmark-OT7tsNpL.js";import{t as ta}from"./ChevronRight-Cf6GkXSa.js";import{t as na}from"./Document-0Zpczu4q.js";import{t as ra}from"./Search-QbUIQb6W.js";import{t as ia}from"./InfoOutline-BLtnjxbN.js";import{t as aa}from"./ErrorOutline-Cl-3_nRG.js";import{t as oa}from"./EarthAmericas-DLWVWv9X.js";import{t as sa}from"./ArrowLeft-x2OZCZTu.js";import{t as ca}from"./Unpublish-B0p_ZGt2.js";import{t as la}from"./ArrowRight-D293IkFJ.js";import{t as ua}from"./Revert-BmEXeO7H.js";import{t as da}from"./Copy-BTQgeMVP.js";import{t as fa}from"./Sync-B1MBhh7o.js";import{t as pa}from"./Documents-C8KrBFzU.js";import{t as ma}from"./ChevronUp-3VMiyA07.js";import{t as ha}from"./Link-Cl1VSeDJ.js";import{t as ga}from"./ReadOnly-BkEx9qPu.js";import{t as _a}from"./Launch-DuEs-KHJ.js";import{t as va}from"./Unknown-CEYtdaCK.js";import{t as ya}from"./Add-CwQ5TpM8.js";import{t as ba}from"./Lock-Ui2f2sVi.js";import{t as xa}from"./Collapse-B22lXxln.js";import{t as Sa}from"./Expand-CQC9Ec3E.js";import{t as Ca}from"./Sort-CFTgH29c.js";import{t as wa}from"./ComposeSparkles-Dn7kooau.js";import{n as Ta}from"./CommentsEnabledProvider-CEeES47b-BEr5KMWm.js";import{t as Ea}from"./CommentsEnabledProvider-By3TCGFl-gLI34tgD.js";import{t as Da}from"./Stack-DWymSM37.js";import{t as Oa}from"./StackCompact-appU5vbP.js";import{t as ka}from"./Transfer-CJnKiHxh.js";import{t as Aa}from"./DocumentRemove-CzwTDkkJ.js";import{t as ja}from"./Pause-ibSxMIa3.js";import{t as Ma}from"./Star-_p_HG-Ts.js";import{t as Na}from"./StarFilled-CSrmmOKn.js";import{t as Pa}from"./SplitVertical-uh7MyVDf.js";import{t as Fa}from"./Share-D41CqXzI.js";imLine truncated
|
||||
-1
@@ -1 +0,0 @@
|
||||
import{b as e}from"./Observable-BrARBsae.js";import{t}from"./Subject-UgBXjL8-.js";var n=function(t){e(n,t);function n(e){var n=t.call(this)||this;return n._value=e,n}return Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(t);export{n as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{Bi as i,Ci as a,Fi as o,Gi as s,Si as c,Vi as l,Wi as u,Xs as d,Zc as f,aa as p,ki as m,oa as h,qi as g,qs as _}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as v,b as y,c as b,t as x}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{ft as S,gt as C,mt as w,p as T}from"./dist-BOMXfkZi.js";import{t as E}from"./Close-B_ZEgT1V.js";import{t as D}from"./ChevronRight-Cf6GkXSa.js";import{t as O}from"./ChevronLeft-BzE8YX6u.js";var k=e(t(),1),ee=r(),A=n();function j(e,t){let n=d(e,t?.in).getDay();return n===0||n===6}function M(e){let t=(0,ee.c)(33),{date:n,focused:r,isCurrentMonth:i,isToday:a,onSelect:o,selected:s,disabled:c,dateStyles:l}=e,u;t[0]===l?u=t[1]:(u=l===void 0?{}:l,t[0]=l,t[1]=u);let d=u,f;t[2]!==n||t[3]!==o||t[4]!==s?(f=()=>{o(s?void 0:n)},t[2]=n,t[3]=o,t[4]=s,t[5]=f):f=t[5];let p=f,m;m=a||s?`primary`:(j(n),`default`);let h;t[6]===n?h=t[7]:(h=n.toDateString(),t[6]=n,t[7]=h);let g=r?`true`:``,_;t[8]!==n||t[9]!==a?(_=a?`day-tile-today`:`day-tile-${n.getDate()}-${n.getMonth()}`,t[8]=n,t[9]=a,t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v={position:`relative`},t[11]=v):v=t[11];let y=!s&&!i?.35:1,b;t[12]!==d||t[13]!==y?(b={opacity:y,textAlign:`center`,...d},t[12]=d,t[13]=y,t[14]=b):b=t[14];let x;t[15]!==n||t[16]!==s?(x=s?(0,A.jsx)(E,{}):n.getDate(),t[15]=n,t[16]=s,t[17]=x):x=t[17];let w;t[18]!==b||t[19]!==x?(w=(0,A.jsx)(S,{size:1,style:b,children:x}),t[18]=b,t[19]=x,t[20]=w):w=t[20];let T;t[21]!==c||t[22]!==p||t[23]!==s||t[24]!==w||t[25]!==h||t[26]!==g||t[27]!==_||t[28]!==m?(T=(0,A.jsx)(C,{"aria-label":h,"aria-pressed":s,as:`button`,__unstable_focusRing:!0,"data-weekday":!0,"data-focused":g,"data-testid":_,role:`button`,tabIndex:-1,onClick:p,paddingX:3,paddingY:4,radius:2,selected:s,style:v,tone:m,disabled:c,children:w}),t[21]=c,t[22]=p,t[23]=s,t[24]=w,t[25]=h,t[26]=g,t[27]=_,t[28]=m,t[29]=T):T=t[29];let D;return t[30]!==s||t[31]!==T?(D=(0,A.jsx)(`div`,{"aria-selected":s,"data-ui":`CalendarDay`,children:T}),t[30]=s,t[31]=T,t[32]=D):D=t[32],D}function te(e){let t=(0,ee.c)(36),{date:n,renderCalendarDay:r,hidden:a,disabled:s,timeZoneScope:c}=e,{getCurrentZoneDate:u}=p(c),d=r||M,g=o(n),{weekInfo:_}=h(),{firstDay:v}=_,b,x,S,C,w,T;if(t[0]!==v||t[1]!==a){let e=m(v);x=y,w=a||!1,T=`CalendarMonth`,b=f,t[8]===Symbol.for(`react.memo_cache_sentinel`)?(S={gap:`1px`,gridTemplateColumns:`repeat(7, 1fr)`},t[8]=S):S=t[8],C=e.map(N),t[0]=v,t[1]=a,t[2]=b,t[3]=x,t[4]=S,t[5]=C,t[6]=w,t[7]=T}else b=t[2],x=t[3],S=t[4],C=t[5],w=t[6],T=t[7];let E;if(t[9]!==d||t[10]!==n||t[11]!==s||t[12]!==u||t[13]!==e.focused||t[14]!==e.onSelect||t[15]!==e.selected||t[16]!==g){let r;t[18]!==d||t[19]!==n||t[20]!==s||t[21]!==u||t[22]!==e.focused||t[23]!==e.onSelect||t[24]!==e.selected?(r=(t,r)=>t.days.map((t,a)=>{let o=e.focused&&l(t,e.focused),c=e.selected&&l(t,e.selected),f=l(t,u()),p=i(t,e.focused||n);return(0,A.jsx)(d,{date:t,focused:o,isCurrentMonth:p,isToday:f,onSelect:e.onSelect,selected:c,disabled:s},`${r}-${a}`)}),t[18]=d,t[19]=n,t[20]=s,t[21]=u,t[22]=e.focused,t[23]=e.onSelect,t[24]=e.selected,t[25]=r):r=t[25],E=g.map(r),t[9]=d,t[10]=n,t[11]=s,t[12]=u,t[13]=e.focused,t[14]=e.onSelect,t[15]=e.selected,t[16]=g,t[17]=E}else E=t[17];let D;t[26]!==b||t[27]!==S||t[28]!==C||t[29]!==E?(D=(0,A.jsxs)(b,{style:S,children:[C,E]}),t[26]=b,t[27]=S,t[28]=C,t[29]=E,t[30]=D):D=t[30];let O;return t[31]!==x||t[32]!==w||t[33]!==T||t[34]!==D?(O=(0,A.jsx)(x,{"aria-hidden":w,"data-ui":T,children:D}),t[31]=x,t[32]=w,t[33]=T,t[34]=D,t[35]=O):O=t[35],O}function N(e){return(0,A.jsx)(C,{paddingY:3,children:(0,A.jsx)(T,{size:1,style:{textAlign:`center`},children:e.slice(0,1)})},e)}var ne=(0,A.jsx)(`span`,{"data-preserve-focus":!0,style:{overflow:`hidden`,position:`absolute`,outline:`none`},tabIndex:-1});function P(e){let t=(0,ee.c)(87),n,r,i,o,l,d,f,m;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4],l=t[5],d=t[6],f=t[7],m=t[8]):({ref:n,focusedDate:o,onFocusedDateChange:r,onSelect:i,selectedDate:f,renderCalendarDay:l,timeZoneScope:m,...d}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=l,t[6]=d,t[7]=f,t[8]=m);let h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=new Date,t[9]=h):h=t[9];let[C,T]=(0,k.useState)(h),{t:E}=v(),{zoneDateToUtc:j}=p(m),M=o||C,N;t[10]!==r||t[11]!==o?(N=e=>{r&&o?r(e):T(e)},t[10]=r,t[11]=o,t[12]=N):N=t[12];let P=N,re;t[13]!==P||t[14]!==j?(re=e=>{P(j(e))},t[13]=P,t[14]=j,t[15]=re):re=t[15];let ie=re,ae;t[16]!==M||t[17]!==ie?(ae=e=>ie(g(M,e)),t[16]=M,t[17]=ie,t[18]=ae):ae=t[18];let F=ae,oe;t[19]!==P||t[20]!==i||t[21]!==j?(oe=e=>{if(e){let t=j(u(s(e,e.getHours()),e.getMinutes()));i(t),P(t)}else i(void 0)},t[19]=P,t[20]=i,t[21]=j,t[22]=oe):oe=t[22];let se=oe,I=(0,k.useRef)(null),ce;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(ce=()=>I.current,t[23]=ce):ce=t[23],(0,k.useImperativeHandle)(n,ce);let le;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>{I.current?.querySeleLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Co as t,Ha as n,Sd as r,Ua as i,Ya as a,Za as o,au as s,co as c,lo as l,nu as u,rc as d,ro as f,to as p,uc as m,uo as h,yo as g}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as _,t as v}from"./jsx-runtime-BpzPEenQ.js";import{t as y}from"./compiler-runtime-sKsOXjDo.js";import{Et as b,St as x,i as S,r as C,t as w,x as T}from"./dist-LVcARZxB.js";import{t as E}from"./Close-B_ZEgT1V.js";import{t as D}from"./ChevronRight-Cf6GkXSa.js";import{t as O}from"./ChevronLeft-BzE8YX6u.js";var k=e(_(),1),ee=y(),A=v();function j(e,t){let n=s(e,t?.in).getDay();return n===0||n===6}function M(e){let t=(0,ee.c)(33),{date:n,focused:r,isCurrentMonth:i,isToday:a,onSelect:o,selected:s,disabled:c,dateStyles:l}=e,u;t[0]===l?u=t[1]:(u=l===void 0?{}:l,t[0]=l,t[1]=u);let d=u,f;t[2]!==n||t[3]!==o||t[4]!==s?(f=()=>{o(s?void 0:n)},t[2]=n,t[3]=o,t[4]=s,t[5]=f):f=t[5];let p=f,m;m=a||s?`primary`:(j(n),`default`);let h;t[6]===n?h=t[7]:(h=n.toDateString(),t[6]=n,t[7]=h);let g=r?`true`:``,_;t[8]!==n||t[9]!==a?(_=a?`day-tile-today`:`day-tile-${n.getDate()}-${n.getMonth()}`,t[8]=n,t[9]=a,t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v={position:`relative`},t[11]=v):v=t[11];let y=!s&&!i?.35:1,S;t[12]!==d||t[13]!==y?(S={opacity:y,textAlign:`center`,...d},t[12]=d,t[13]=y,t[14]=S):S=t[14];let C;t[15]!==n||t[16]!==s?(C=s?(0,A.jsx)(E,{}):n.getDate(),t[15]=n,t[16]=s,t[17]=C):C=t[17];let w;t[18]!==S||t[19]!==C?(w=(0,A.jsx)(x,{size:1,style:S,children:C}),t[18]=S,t[19]=C,t[20]=w):w=t[20];let T;t[21]!==c||t[22]!==p||t[23]!==s||t[24]!==w||t[25]!==h||t[26]!==g||t[27]!==_||t[28]!==m?(T=(0,A.jsx)(b,{"aria-label":h,"aria-pressed":s,as:`button`,__unstable_focusRing:!0,"data-weekday":!0,"data-focused":g,"data-testid":_,role:`button`,tabIndex:-1,onClick:p,paddingX:3,paddingY:4,radius:2,selected:s,style:v,tone:m,disabled:c,children:w}),t[21]=c,t[22]=p,t[23]=s,t[24]=w,t[25]=h,t[26]=g,t[27]=_,t[28]=m,t[29]=T):T=t[29];let D;return t[30]!==s||t[31]!==T?(D=(0,A.jsx)(`div`,{"aria-selected":s,"data-ui":`CalendarDay`,children:T}),t[30]=s,t[31]=T,t[32]=D):D=t[32],D}function te(e){let n=(0,ee.c)(36),{date:r,renderCalendarDay:i,hidden:s,disabled:u,timeZoneScope:d}=e,{getCurrentZoneDate:f}=t(d),p=i||M,m=o(r),{weekInfo:h}=g(),{firstDay:_}=h,v,y,b,x,C,T;if(n[0]!==_||n[1]!==s){let e=a(_);y=w,C=s||!1,T=`CalendarMonth`,v=S,n[8]===Symbol.for(`react.memo_cache_sentinel`)?(b={gap:`1px`,gridTemplateColumns:`repeat(7, 1fr)`},n[8]=b):b=n[8],x=e.map(N),n[0]=_,n[1]=s,n[2]=v,n[3]=y,n[4]=b,n[5]=x,n[6]=C,n[7]=T}else v=n[2],y=n[3],b=n[4],x=n[5],C=n[6],T=n[7];let E;if(n[9]!==p||n[10]!==r||n[11]!==u||n[12]!==f||n[13]!==e.focused||n[14]!==e.onSelect||n[15]!==e.selected||n[16]!==m){let t;n[18]!==p||n[19]!==r||n[20]!==u||n[21]!==f||n[22]!==e.focused||n[23]!==e.onSelect||n[24]!==e.selected?(t=(t,n)=>t.days.map((t,i)=>{let a=e.focused&&l(t,e.focused),o=e.selected&&l(t,e.selected),s=l(t,f()),d=c(t,e.focused||r);return(0,A.jsx)(p,{date:t,focused:a,isCurrentMonth:d,isToday:s,onSelect:e.onSelect,selected:o,disabled:u},`${n}-${i}`)}),n[18]=p,n[19]=r,n[20]=u,n[21]=f,n[22]=e.focused,n[23]=e.onSelect,n[24]=e.selected,n[25]=t):t=n[25],E=m.map(t),n[9]=p,n[10]=r,n[11]=u,n[12]=f,n[13]=e.focused,n[14]=e.onSelect,n[15]=e.selected,n[16]=m,n[17]=E}else E=n[17];let D;n[26]!==v||n[27]!==b||n[28]!==x||n[29]!==E?(D=(0,A.jsxs)(v,{style:b,children:[x,E]}),n[26]=v,n[27]=b,n[28]=x,n[29]=E,n[30]=D):D=n[30];let O;return n[31]!==y||n[32]!==C||n[33]!==T||n[34]!==D?(O=(0,A.jsx)(y,{"aria-hidden":C,"data-ui":T,children:D}),n[31]=y,n[32]=C,n[33]=T,n[34]=D,n[35]=O):O=n[35],O}function N(e){return(0,A.jsx)(b,{paddingY:3,children:(0,A.jsx)(T,{size:1,style:{textAlign:`center`},children:e.slice(0,1)})},e)}var ne=(0,A.jsx)(`span`,{"data-preserve-focus":!0,style:{overflow:`hidden`,position:`absolute`,outline:`none`},tabIndex:-1});function P(e){let a=(0,ee.c)(87),o,s,c,l,g,_,v,y;a[0]===e?(o=a[1],s=a[2],c=a[3],l=a[4],g=a[5],_=a[6],v=a[7],y=a[8]):({ref:o,focusedDate:l,onFocusedDateChange:s,onSelect:c,selectedDate:v,renderCalendarDay:g,timeZoneScope:y,..._}=e,a[0]=e,a[1]=o,a[2]=s,a[3]=c,a[4]=l,a[5]=g,a[6]=_,a[7]=v,a[8]=y);let b;a[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=new Date,a[9]=b):b=a[9];let[S,T]=(0,k.useState)(b),{t:E}=r(),{zoneDateToUtc:j}=t(y),M=l||S,N;a[10]!==s||a[11]!==l?(N=e=>{s&&l?s(e):T(e)},a[10]=s,a[11]=l,a[12]=N):N=a[12];let P=N,re;a[13]!==P||a[14]!==j?(re=e=>{P(j(e))},a[13]=P,a[14]=j,a[15]=re):re=a[15];let ie=re,ae;a[16]!==M||a[17]!==ie?(ae=e=>ie(h(M,e)),a[16]=M,a[17]=ie,a[18]=ae):ae=a[18];let F=ae,oe;a[19]!==P||a[20]!==c||a[21]!==j?(oe=e=>{if(e){let t=j(f(p(e,e.getHours()),e.getMinutes()));c(t),P(t)}else c(void 0)},a[19]=P,a[20]=c,a[21]=j,a[22]=oe):oe=a[22];let se=oe,I=(0,k.useRef)(null),ce;a[23]===Symbol.for(`react.memo_cache_sentinel`)?(ce=()=>I.current,a[23]=ce):ce=a[23],(0,k.useImperativeHandle)(o,ce);let le;a[24]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>{I.current?.querySelector(`[data-focused="true"]`)?.focus()}Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{Ct as i,cr as a,ll as o,sr as s,ul as c}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{b as l}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{Ft as u,Nt as d,Vt as f,dt as p}from"./dist-BOMXfkZi.js";var m=e(t(),1),h=r(),g=n(),_=`Expected a function`;function v(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(_);return c(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),o(e,t,{leading:r,maxWait:t,trailing:i})}var y=`a,button`,b=u.div.withConfig({displayName:`FocusOverlayDiv`,componentId:`sc-pkuwet-0`})(({theme:e,offset:t})=>d`bottom:${-t}px;border-radius:${f(e.sanity.radius[1])};left:${-t}px;pointer-events:none;position:absolute;right:${-t}px;top:${-t}px;z-index:2;${S}:focus-visible &{box-shadow:${i({base:e.sanity.color.base,focusRing:e.sanity.focusRing})};}`),x=u.div.withConfig({displayName:`PointerOverlayDiv`,componentId:`sc-pkuwet-1`})`bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:1;@media (hover:hover){&[data-enabled='true']{display:block;}}`,S=u(l).withConfig({displayName:`VirtualListBox`,componentId:`sc-pkuwet-2`})`height:100%;outline:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;width:100%;`,C=u(l).attrs(({$height:e})=>({style:{height:`${e}px`}})).withConfig({displayName:`VirtualListChildBox`,componentId:`sc-pkuwet-3`})`position:relative;width:100%;`;function w({ref:e,activeItemDataAttr:t=`data-active`,ariaLabel:n,ariaMultiselectable:r=!1,autoFocus:i,canReceiveFocus:a,fixedHeight:o,focusRingOffset:c=0,getItemDisabled:l,getItemKey:u,getItemSelected:d,initialIndex:f,initialScrollAlign:p=`start`,inputElement:h,itemHeight:_,items:w,onEndReached:T,onEndReachedIndexOffset:E=0,onlyShowSelectionWhenActive:D,overscan:re,renderItem:ie,testId:ae,wrapAround:O=!0,...oe}){let k=(0,m.useRef)(!1),[A]=(0,m.useState)((0,m.useId)()),j=(0,m.useRef)(f??0),[M,se]=(0,m.useState)(null),[ce,N]=(0,m.useState)(!1),[P,le]=(0,m.useState)(null),[F,ue]=(0,m.useState)(null),de=(0,m.useCallback)(e=>{if(!T)return;let[t]=[...e.getVirtualItems()].reverse();t&&t.index>=w.length-E-1&&k.current&&T()},[T,w.length,E]),I=s({count:w.length,getItemKey:u,getScrollElement:()=>F,estimateSize:()=>_,measureElement:ne,onChange:de,overscan:re}),L=(0,m.useMemo)(()=>te(w,l,d),[l,d,w]),R=(0,m.useMemo)(()=>L.filter(e=>!e.disabled).length,[L]),z=(0,m.useCallback)(e=>P?.setAttribute(`data-enabled`,(!e).toString()),[P]),B=(0,m.useCallback)(e=>`${A}-item-${e}`,[A]),V=(0,m.useCallback)(()=>`${A}-children`,[A]),H=(0,m.useCallback)(()=>{let e=[h,F].some(e=>document.activeElement===e);D&&!e&&!ce||Array.from(M?.children||[])?.forEach(e=>{let n=Number(e.dataset?.index),r=L[n]?.activeIndex;e.querySelector(y)?.toggleAttribute(t,r===j.current)})},[t,M?.children,ce,h,L,D,F]),U=(0,m.useCallback)(()=>{Array.from(M?.children||[])?.forEach(e=>{e.querySelector(y)?.toggleAttribute(t,!1)})},[t,M?.children]),fe=(0,m.useMemo)(()=>v(H,200),[H]),W=(0,m.useCallback)(()=>{let e=j?.current;w.length>0?(h?.setAttribute(`aria-activedescendant`,B(e)),F?.setAttribute(`aria-activedescendant`,B(e))):(h?.removeAttribute(`aria-activedescendant`),F?.removeAttribute(`aria-activedescendant`))},[B,h,w.length,F]),pe=(0,m.useCallback)(()=>{let e=M?.parentElement;if(M&&e){let t=e.getBoundingClientRect().top-M.getBoundingClientRect().top;return I.getVirtualItemForOffset(t)?.index??-1}return-1},[M,I]),G=(0,m.useCallback)(({index:e,scrollAlign:t,scrollIntoView:n=!0})=>{if(j.current=e,W(),H(),n){let n=L.findIndex(t=>t.activeIndex===e);n>-1&&I.scrollToIndex(n,t?{align:t}:{})}},[W,L,H,I]),K=(0,m.useCallback)(e=>{let t=-1,n=R-1;if(e===`next`){let e=O?0:n;t=j.current<R-1?j.current+1:e}if(e===`previous`){let e=O?n:0;t=j.current>0?j.current-1:e}G({index:t,scrollIntoView:!0}),z(!1)},[R,z,G,O]),q=(0,m.useCallback)(e=>{switch(e){case`input`:h?.focus();break;case`list`:F?.focus()}},[h,F]),J=(0,m.useCallback)(()=>{h?.focus()},[h]),Y=(0,m.useCallback)(()=>{F?.focus()},[F]),me=(0,m.useCallback)(e=>()=>{G({index:e,scrollIntoView:!1})},[G]),X=(0,m.useCallback)(()=>{H()},[H]),Z=(0,m.useCallback)(e=>t=>{let n=Array.from(M?.children||[]);if(n.length&&(t.key===`ArrowDown`&&(t.preventDefault(),q(e),K(`next`)),t.key===`ArrowUp`&&(t.preventDefault(),q(e),K(`previous`)),t.key===`Enter`)){t.preventDefault(),q(e);let r=n.find(e=>Number(e.dataset.index)===L.findIndex(e=>e.activeIndex===j.current));r&&(r?.querySelector(y))?.click()}},[M?.children,q,L,K]),Q=(0,m.useCallback)(e=>Z(`input`)(e),[Z]),$=(0,m.useCallback)(e=>Z(`list`)(e),[Z]),he=(0,m.useCallback)(()=>{D&&(H(),N(!0))},[D,H]),ge=(0,m.useCallback)(()=>{D&&(U(),N(!1))},[U,D]);(0,m.useImperativeHandle)(e,()=>({focusInputElement(){J()},focusListElement(){Y()},getTopIndex(){return pe()},scrollToIndex(e){G({index:e}),z(!0)}}),[z,J,Y,pe,G]),(0,m.useEffect)(()=>{f!==void 0&&!k.current&&G({index:f,scrollAlign:p,scrollIntoView:!0}),k.current=!0},[Line truncated
|
||||
@@ -0,0 +1,5 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Df as t,Ef as n,Jf as r,Qs as i,Sd as a,Wf as o,Yr as s,Ys as c,Zs as l,ai as u,ci as d,di as f,ec as p,fi as m,gf as h,hf as g,ii as _,ju as v,lc as y,li as b,mi as x,nc as S,oi as C,pc as w,pi as T,pu as E,rc as D,ri as O,rr as k,si as A,uc as j,ui as M,vi as N,yi as P,yu as F}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as I,t as L}from"./jsx-runtime-BpzPEenQ.js";import{t as R}from"./compiler-runtime-sKsOXjDo.js";import{et as z,pr as B}from"./types--2f-avvL-DfAXA8nG.js";import{Et as V,Gt as H,Ot as U,Qt as ee,Ut as W,_ as G,et as te,f as ne,ft as re,j as K,l as ie,o as q,pt as ae,r as J,s as oe,t as se}from"./dist-LVcARZxB.js";import{a as ce,n as le}from"./helpers-D_aQC6Do-BbFlOJg3.js";var Y=e(I(),1),X=R(),Z=L();function ue(){let e=(0,Y.useContext)(r);if(!e)throw Error(`useComments must be used within a CommentsProvider`);return e}var Q={behavior:`smooth`,inline:`center`,scrollMode:`if-needed`},de={...Q,block:`start`},fe={...Q,block:`center`},$={...Q,block:`center`},pe={comment:{...Q,block:`center`},field:$,group:de,"inline-comment":fe};function me(e){return e.replace(/[[\]_"_=.]/g,``)}function he(e){return{"data-comments-comment-id":me(e)}}function ge(e){return{"data-comments-field-id":me(e)}}function _e(e){return{"data-comments-group-id":me(e)}}function ve(e){return{"data-comments-inline-comment-id":me(e)}}function ye(e){let t=(0,X.c)(14),n;t[0]===e?n=t[1]:(n=e||{},t[0]=e,t[1]=n);let{boundaryElement:r}=n,[i,a]=(0,Y.useState)(null);i?.type;let o=pe[i?.type||`comment`],s=i?.type===`comment`?r:void 0,c;t[2]!==o||t[3]!==s?(c={...o,boundary:s},t[2]=o,t[3]=s,t[4]=c):c=t[4];let l=c,u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{a({type:`comment`,id:e})},t[5]=u):u=t[5];let d=u,f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{a({type:`group`,id:e})},t[6]=f):f=t[6];let p=f,m;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>{a({type:`field`,id:e})},t[7]=m):m=t[7];let h=m,g;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{a({type:`inline-comment`,id:e})},t[8]=g):g=t[8];let _=g,v,y;t[9]!==l||t[10]!==i?(v=()=>{let e=requestAnimationFrame(()=>{if(!i)return;let{type:e,id:t}=i,n=document?.querySelector(`[data-comments-${e}-id="${me(t)}"]`);n&&x(n,l)});return()=>{cancelAnimationFrame(e)}},y=[l,i],t[9]=l,t[10]=i,t[11]=v,t[12]=y):(v=t[11],y=t[12]),(0,Y.useEffect)(v,y);let b;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b={scrollToComment:d,scrollToField:h,scrollToGroup:p,scrollToInlineComment:_},t[13]=b):b=t[13],b}var be=`_1xg999m0`;function xe(e){let t=(0,X.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(q,{className:be,size:1,as:`div`,trim:!0,children:n}),t[0]=n,t[1]=r),r}var Se=h({name:`mention`,type:`object`,fields:[{name:`userId`,type:`string`}]}),Ce=h({type:`block`,name:`block`,of:[Se],marks:{annotations:[]},styles:[{title:`Normal`,value:`normal`}],lists:[]}),we=g({type:`array`,name:`body`,of:[Ce]}),Te=E.compile({name:`comments`,types:[we]}).get(`body`);function Ee(e){let t=(0,X.c)(25),{t:n}=a(z),{onClose:r,onConfirm:i}=e,o;t[0]===r?o=t[1]:(o=e=>{e.stopPropagation(),r()},t[0]=r,t[1]=o);let s=o,c;t[2]===i?c=t[3]:(c=e=>{e.stopPropagation(),i()},t[2]=i,t[3]=c);let l=c,u;t[4]===n?u=t[5]:(u=n(`discard.header`),t[4]=n,t[5]=u);let d;t[6]===s?d=t[7]:(d={onClick:s},t[6]=s,t[7]=d);let f;t[8]===n?f=t[9]:(f=n(`discard.button-confirm`),t[8]=n,t[9]=f);let m;t[10]!==l||t[11]!==f?(m={onClick:l,text:f,tone:`critical`},t[10]=l,t[11]=f,t[12]=m):m=t[12];let h;t[13]!==d||t[14]!==m?(h={cancelButton:d,confirmButton:m},t[13]=d,t[14]=m,t[15]=h):h=t[15];let g;t[16]===n?g=t[17]:(g=n(`discard.text`),t[16]=n,t[17]=g);let _;t[18]===g?_=t[19]:(_=(0,Z.jsx)(q,{size:1,as:`div`,trim:!0,children:g}),t[18]=g,t[19]=_);let v;return t[20]!==r||t[21]!==u||t[22]!==h||t[23]!==_?(v=(0,Z.jsx)(U,{tone:`default`,children:(0,Z.jsx)(G,{zOffset:9999999,children:(0,Z.jsx)(p,{header:u,id:`discard-comment-dialog`,onClose:r,width:0,onClickOutside:r,footer:h,children:_})})}),t[20]=r,t[21]=u,t[22]=h,t[23]=_,t[24]=v):v=t[24],v}var De=H(ie).withConfig({displayName:`StyledAvatar`,componentId:`sc-lay0rn-0`})`svg > ellipse{stroke:transparent;}`,Oe=/[^\p{Alpha}\p{White_Space}]/gu,ke=/\p{White_Space}+/u;function Ae(e){let t=e.replace(Oe,``).split(ke);return t.length===1?`${t[0].charAt(0)}`.toUpperCase():`${t[0].charAt(0)}${t[t.length-1].charAt(0)}`}function je(e){let t=(0,X.c)(12),n,r;t[0]===e?(n=t[1],r=t[2]):({user:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r;i?.displayName;let a=i?.displayName||``,o;t[3]===a?o=t[4]:(o=Ae(a),t[3]=a,t[4]=o);let s=o;if(!i){let e;return t[5]===n?e=t[6]:(e=(0,Z.jsx)(De,{...n}),t[5]=n,t[6]=e),e}let c=i?.imageUrl,l=i?.displayName,u;return t[7]!==s||t[8]!==n||t[9]!==c||t[10]!==l?(u=(0,Z.jsx)(De,{initials:s,src:c,title:l,...n}),t[7]=s,t[8]=n,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function Me(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i,a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`Line truncated
|
||||
min-height: ${ee(e.theme).avatar.sizes[1]?.size}px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
`);function it(e){let t=(0,X.c)(41),{avatarSize:n,currentUser:r,focusLock:o,onBlur:s,onFocus:c,onKeyDown:l,onSubmit:u,placeholder:d,renderBlock:f,withAvatar:p}=e,m=n===void 0?1:n,[h]=i(r.id),{canSubmit:g,expandOnFocus:_,focused:v,hasChanges:y,insertAtChar:b,openMentions:x,readOnly:S,mentionOptions:C}=Ue(),{t:w}=a(z),T;t[0]!==m||t[1]!==h||t[2]!==p?(T=p?(0,Z.jsx)(rt,{children:(0,Z.jsx)(je,{user:h,size:m})}):null,t[0]=m,t[1]=h,t[2]=p,t[3]=T):T=t[3];let E=T,O;t[4]!==b||t[5]!==x?(O=e=>{e.stopPropagation(),b(),x()},t[4]=b,t[5]=x,t[6]=O):O=t[6];let k=O,A=_&&!g?`true`:`false`,M=v?`true`:`false`,N=S?`transparent`:`default`,P;t[7]!==o||t[8]!==s||t[9]!==c||t[10]!==l||t[11]!==u||t[12]!==d||t[13]!==f?(P=(0,Z.jsx)($e,{"data-ui":`CommentInputEditableWrap`,paddingX:1,paddingY:2,children:(0,Z.jsx)(Ze,{focusLock:o,onBlur:s,onFocus:c,onKeyDown:l,onSubmit:u,placeholder:d,renderBlock:f})}),t[7]=o,t[8]=s,t[9]=c,t[10]=l,t[11]=u,t[12]=d,t[13]=f,t[14]=P):P=t[14];let F;t[15]!==k||t[16]!==C.disabled||t[17]!==S||t[18]!==w?(F=!C.disabled&&(0,Z.jsx)(D,{"aria-label":w(`compose.mention-user-aria-label`),"data-testid":`comment-input-mention-button`,disabled:S,icon:Me,mode:`bleed`,type:`button`,onClick:k,tooltipProps:{content:w(`compose.mention-user-tooltip`)}}),t[15]=k,t[16]=C.disabled,t[17]=S,t[18]=w,t[19]=F):F=t[19];let I;t[20]!==g||t[21]!==y||t[22]!==C.disabled||t[23]!==u||t[24]!==S||t[25]!==w?(I=u&&(0,Z.jsxs)(Z.Fragment,{children:[!C.disabled&&(0,Z.jsx)(et,{}),(0,Z.jsx)(D,{"aria-label":w(`compose.send-comment-aria-label`),"data-testid":`comment-input-send-button`,disabled:!g||!y||S,icon:Ne,mode:y&&g?`default`:`bleed`,onClick:u,tone:y&&g?`primary`:`default`,tooltipProps:{content:w(`compose.send-comment-tooltip`)}})]}),t[20]=g,t[21]=y,t[22]=C.disabled,t[23]=u,t[24]=S,t[25]=w,t[26]=I):I=t[26];let L;t[27]!==F||t[28]!==I?(L=(0,Z.jsx)(J,{alignItems:`center`,"data-ui":`CommentInputActions`,gap:1,justifyContent:`flex-end`,padding:1,children:(0,Z.jsxs)(j,{children:[F,I]})}),t[27]=F,t[28]=I,t[29]=L):L=t[29];let R;t[30]!==P||t[31]!==L?(R=(0,Z.jsxs)(oe,{children:[P,L]}),t[30]=P,t[31]=L,t[32]=R):R=t[32];let B;t[33]!==R||t[34]!==A||t[35]!==M||t[36]!==N?(B=(0,Z.jsx)(nt,{id:`comment-input-root`,"data-expand-on-focus":A,"data-focused":M,flex:1,sizing:`border`,tone:N,children:R}),t[33]=R,t[34]=A,t[35]=M,t[36]=N,t[37]=B):B=t[37];let V;return t[38]!==E||t[39]!==B?(V=(0,Z.jsxs)(J,{alignItems:`flex-start`,gap:2,children:[E,B]}),t[38]=E,t[39]=B,t[40]=V):V=t[40],V}function at(e){let t=(0,X.c)(42),{children:r,expandOnFocus:i,focused:a,focusOnMount:s,mentionOptions:c,onMentionMenuOpenChange:l,value:u,readOnly:d}=e,f=i!==void 0&&i,p=s!==void 0&&s,h=m(),[g,_]=(0,Y.useState)(!1),[v,y]=(0,Y.useState)(``),[x,S]=(0,Y.useState)(null),C;t[0]===u?C=t[1]:(C=le(u),t[0]=u,t[1]=C);let w=C,T=ce(u),E;t[2]!==h||t[3]!==d?(E=()=>{d||b.focus(h)},t[2]=h,t[3]=d,t[4]=E):E=t[4];let D=E,O;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{_(!1),y(``),S(null)},t[5]=O):O=t[5];let A=O,j;t[6]!==h||t[7]!==c?.disabled?(j=()=>{c?.disabled||(_(!0),y(``),_(!0),S(b.getSelection(h)))},t[6]=h,t[7]=c?.disabled,t[8]=j):j=t[8],c?.disabled;let M=j,N;t[9]!==h||t[10]!==c?.disabled||t[11]!==v||t[12]!==M?(N=e=>{if(c?.disabled)return;let t=b.getSelection(h),r=t?t.focus.offset:0,i=b.focusChild(h),a=n(i)&&i||void 0,o=e.inputType===`insertText`,s=e.inputType===`deleteContentBackward`,l=o&&e.data===`@`,u=a?.text.slice(0,Math.max(0,r)).lastIndexOf(`@`)||0,d=a?.text.slice(r-1,r)===` `,f=o&&e.data===` `&&!v;if(l&&(r<1||d)){M();return}if(f||s&&(a?.text.length===1||u===(a?.text.length||0)-1)){A();return}if(n(i)){let t=i.text.slice(u+1,r);o&&(t+=e.data),s&&(t=t.slice(0,Math.max(0,t.length-1))),y(t)}},t[9]=h,t[10]=c?.disabled,t[11]=v,t[12]=M,t[13]=N):N=t[13],c?.disabled;let P=N,F;t[14]===h?F=t[15]:(F=()=>{_(!0),b.focus(h),b.insertChild(h,h.schemaTypes.span,{text:`@`}),S(b.getSelection(h))},t[14]=h,t[15]=F);let I=F,L;t[16]!==g||t[17]!==l?(L=()=>l?.(g),t[16]=g,t[17]=l,t[18]=L):L=t[18],k(g,L);let R;t[19]!==h||t[20]!==x?(R=e=>{let t=h.schemaTypes.inlineObjects.find(ot),[r,i]=x&&b.findByPath(h,x.focus.path)||[];if(r&&n(r)&&i&&t){b.focus(h);let n=b.getSelection(h)?.focus.offset;n!==void 0&&(b.delete(h,{anchor:{path:i,offset:r.text.lastIndexOf(`@`)},focus:{path:i,offset:n}},{mode:`selected`}),b.insertChild(h,t,{userId:e}),b.insertChild(h,h.schemaTypes.span,{text:` `}))}},t[19]=h,t[20]=x,t[21]=R):R=t[21];let z=R,B=!!d,V;t[22]!==w||t[23]!==h||t[24]!==f||t[25]!==D||t[26]!==p||t[27]!==a||t[28]!==T||t[29]!==I||t[30]!==z||t[31]!==c||t[32]!==g||t[33]!==v||t[34]!==P||t[35]!==M||t[36]!==B||t[37]!==u?(V={canSubmit:w,closeMentions:A,editor:h,expandOnFocus:f,focused:a,focusEditor:D,focusOnMount:p,hasChanges:T,insertAtChar:I,insertMention:z,mentionOptions:c,mentionsMenuOpen:g,mentionsSearchTerm:v,onBeforeInput:P,openMentions:M,readOnly:B,value:u},t[22]=w,t[23]=h,t[24]=f,t[25]=D,t[26]=p,t[27]=a,t[28]=T,t[29]=I,t[30]=z,t[31]=c,t[32]=g,t[33]=v,t[34]=P,t[35]=M,t[36]=B,t[37]=u,t[38]=V):V=t[38];let H=V,U;return t[39]!==r||t[40]!==H?(U
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Kf as t,ju as n,tp as r}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as i,t as a}from"./jsx-runtime-BpzPEenQ.js";import{t as o}from"./compiler-runtime-sKsOXjDo.js";import{Et as s}from"./types--2f-avvL-DfAXA8nG.js";import{t as c}from"./CommentsEnabledProvider-By3TCGFl-gLI34tgD.js";var l=e(i(),1),u=o(),d=a();function f(e){let n=(0,u.c)(6),{children:r}=e,[i,a]=(0,l.useState)(null),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{a(e)},n[0]=o):o=n[0];let s=o,c;n[1]===i?c=n[2]:(c={authoringPath:i,setAuthoringPath:s},n[1]=i,n[2]=c);let f=c,p;return n[3]!==r||n[4]!==f?(p=(0,d.jsx)(t.Provider,{value:f,children:r}),n[3]=r,n[4]=f,n[5]=p):p=n[5],p}var p=(0,l.memo)(function(e){let t=(0,u.c)(8),{children:i}=e,[a,o]=(0,l.useState)(null),s;t[0]===a?s=t[1]:(s=e=>{n(a,e)||o(e)},t[0]=a,t[1]=s);let c=s,f;t[2]!==c||t[3]!==a?(f={selectedPath:a,setSelectedPath:c},t[2]=c,t[3]=a,t[4]=f):f=t[4];let p=f,m;return t[5]!==i||t[6]!==p?(m=(0,d.jsx)(r.Provider,{value:p,children:i}),t[5]=i,t[6]=p,t[7]=m):m=t[7],m});function m(e){let t=(0,u.c)(8),{documentId:n,documentType:r}=e;if(s().mode!==null){let n;return t[0]===e?n=t[1]:(n=(0,d.jsx)(h,{...e}),t[0]=e,t[1]=n),n}let i;t[2]===e?i=t[3]:(i=(0,d.jsx)(h,{...e}),t[2]=e,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,d.jsx)(c,{groupId:n,documentType:r,children:i}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function h(e){let t=(0,u.c)(6);if(!s().enabled){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let n;t[2]===e?n=t[3]:(n=e.renderDefault(e),t[2]=e,t[3]=n);let r;return t[4]===n?r=t[5]:(r=(0,d.jsx)(p,{children:(0,d.jsx)(f,{children:n})}),t[4]=n,t[5]=r),r}export{m as CommentsDocumentLayout};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{Tt as n,v as r}from"./types--2f-avvL-DfAXA8nG.js";import{n as i,t as a}from"./CommentsEnabledProvider-CEeES47b-BEr5KMWm.js";var o=t(),s=e();function c(e){let t=(0,o.c)(8),{documentId:r,documentType:a}=e;if(n().mode!==null){let n;return t[0]===e?n=t[1]:(n=(0,s.jsx)(l,{...e}),t[0]=e,t[1]=n),n}let c;t[2]===e?c=t[3]:(c=(0,s.jsx)(l,{...e}),t[2]=e,t[3]=c);let u;return t[4]!==r||t[5]!==a||t[6]!==c?(u=(0,s.jsx)(i,{documentId:r,documentType:a,children:c}),t[4]=r,t[5]=a,t[6]=c,t[7]=u):u=t[7],u}function l(e){let t=(0,o.c)(6);if(!n().enabled){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let i;t[2]===e?i=t[3]:(i=e.renderDefault(e),t[2]=e,t[3]=i);let c;return t[4]===i?c=t[5]:(c=(0,s.jsx)(r,{children:(0,s.jsx)(a,{children:i})}),t[4]=i,t[5]=c),c}export{c as CommentsDocumentLayout};
|
||||
@@ -1 +0,0 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{t as n}from"./useCommentsEnabled-BPc3788v-CjDVtXqh.js";import{n as r,r as i,t as a}from"./CommentsSelectedPathProvider-BpUQa6SK-BUkvAe53.js";var o=t(),s=e();function c(e){let t=(0,o.c)(8),{documentId:i,documentType:a}=e;if(n().mode!==null){let n;return t[0]===e?n=t[1]:(n=(0,s.jsx)(l,{...e}),t[0]=e,t[1]=n),n}let c;t[2]===e?c=t[3]:(c=(0,s.jsx)(l,{...e}),t[2]=e,t[3]=c);let u;return t[4]!==i||t[5]!==a||t[6]!==c?(u=(0,s.jsx)(r,{documentId:i,documentType:a,children:c}),t[4]=i,t[5]=a,t[6]=c,t[7]=u):u=t[7],u}function l(e){let t=(0,o.c)(6);if(!n().enabled){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let r;t[2]===e?r=t[3]:(r=e.renderDefault(e),t[2]=e,t[3]=r);let c;return t[4]===r?c=t[5]:(c=(0,s.jsx)(i,{children:(0,s.jsx)(a,{children:r})}),t[4]=r,t[5]=c),c}export{c as CommentsDocumentLayout};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Md as t,S as n,Xf as r,or as i}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as a,t as o}from"./jsx-runtime-BpzPEenQ.js";import{t as s}from"./compiler-runtime-sKsOXjDo.js";import{o as c}from"./stegaClean-YZRATV86-BdUaXCkw.js";var l=e(a(),1),u=s(),d=o();function f(e,r){let a=(0,u.c)(3),{enabled:o,isLoading:s,error:l}=i(n.studioComments),{enabled:d}=t().document.comments,f=d({documentType:r,documentId:c(e)}),p;bb0:{if(s||!f||l){let e;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={enabled:!1,mode:null},a[0]=e):e=a[0],p=e;break bb0}let e=o?`default`:`upsell`,t;a[1]===e?t=a[2]:(t={enabled:!0,mode:e},a[1]=e,a[2]=t),p=t}return p}var p=(0,l.memo)(function(e){let t=(0,u.c)(3),{children:n,groupId:i,documentType:a}=e,o=f(i,a),s;return t[0]!==n||t[1]!==o?(s=(0,d.jsx)(r.Provider,{value:o,children:n}),t[0]=n,t[1]=o,t[2]=s):s=t[2],s});export{p as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Gf as t,Md as n,S as r,Yf as i,or as a}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as o,t as s}from"./jsx-runtime-BpzPEenQ.js";import{t as c}from"./compiler-runtime-sKsOXjDo.js";import{o as l}from"./stegaClean-YZRATV86-BdUaXCkw.js";var u=e(o(),1),d=c(),f=s();function p(e){let n=(0,d.c)(6),{children:r}=e,[i,a]=(0,u.useState)(null),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{a(e)},n[0]=o):o=n[0];let s=o,c;n[1]===i?c=n[2]:(c={authoringPath:i,setAuthoringPath:s},n[1]=i,n[2]=c);let l=c,p;return n[3]!==r||n[4]!==l?(p=(0,f.jsx)(t.Provider,{value:l,children:r}),n[3]=r,n[4]=l,n[5]=p):p=n[5],p}function m(e,t){let i=(0,d.c)(3),{enabled:o,isLoading:s,error:c}=a(r.studioComments),{enabled:u}=n().document.comments,f=u({documentType:t,documentId:l(e)}),p;bb0:{if(s||!f||c){let e;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={enabled:!1,mode:null},i[0]=e):e=i[0],p=e;break bb0}let e=o?`default`:`upsell`,t;i[1]===e?t=i[2]:(t={enabled:!0,mode:e},i[1]=e,i[2]=t),p=t}return p}var h=(0,u.memo)(function(e){let t=(0,d.c)(3),{children:n,documentId:r,documentType:a}=e,o=m(r,a),s;return t[0]!==n||t[1]!==o?(s=(0,f.jsx)(i.Provider,{value:o,children:n}),t[0]=n,t[1]=o,t[2]=s):s=t[2],s});export{h as n,p as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$t as t,Hl as n,Kf as r,Sd as i,To as ee,Vl as a,Zs as te,cd as o,lc as s,ld as c,nc as ne,nf as l,rc as re}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as u,t as d}from"./jsx-runtime-BpzPEenQ.js";import{t as f}from"./compiler-runtime-sKsOXjDo.js";import{Et as p,et as m,n as h}from"./types--2f-avvL-DfAXA8nG.js";import{Gt as g,Ut as _,Y as v,a as y,et as b,it as ie,o as ae,r as x,s as S,yt as oe}from"./dist-LVcARZxB.js";import{t as C}from"./Comment-CPMW8FMx.js";import{i as w,n as T,r as E}from"./helpers-D_aQC6Do-BbFlOJg3.js";import{AddCommentIcon as se}from"./AddComment-DzLuhpXr.js";import{l as D,o as O,t as k,u as ce}from"./CommentInput-C1kF5k49-kVUiwefG.js";import{n as le,t as A}from"./useCommentsUpsell-dtlhkiSW-Ba-EmyX0.js";var j=e(u(),1),ue=f(),M=d();function de(){let e=(0,j.useContext)(r);if(!e)throw Error(`useCommentsAuthoringPath: missing context value`);return e}var N=`srqqgt0`;function P(e){let t=(0,ue.c)(69),{count:n,currentUser:r,fieldTitle:a,mentionOptions:te,onChange:o,onClick:c,onClose:l,onCommentAdd:u,onDiscard:d,onInputKeyDown:f,open:p,readOnly:h,value:g}=e,{t:_}=i(m),v=(0,j.useRef)(null),[ie,S]=(0,j.useState)(null),w=(0,j.useRef)(null),E=n>0,D;t[0]!==ie||t[1]!==l||t[2]!==p?(D=()=>{p&&(l(),ie?.focus())},t[0]=ie,t[1]=l,t[2]=p,t[3]=D):D=t[3];let O=D,ce;t[4]!==O||t[5]!==u?(ce=e=>{u(e),O()},t[4]=O,t[5]=u,t[6]=ce):ce=t[6];let le=ce,A;t[7]===g?A=t[8]:(A=T(g),t[7]=g,t[8]=A);let de=A,P;t[9]!==O||t[10]!==de?(P=()=>{if(!de){O();return}w.current?.discardDialogController.open()},t[9]=O,t[10]=de,t[11]=P):P=t[11];let F=P,I;t[12]===f?I=t[13]:(I=e=>{e.isDefaultPrevented()||f&&f(e)},t[12]=f,t[13]=I);let fe=I,L;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{w.current?.discardDialogController.close()},t[14]=L):L=t[14];let pe=L,R;t[15]!==O||t[16]!==d?(R=()=>{w.current?.discardDialogController.close(),O(),d()},t[15]=O,t[16]=d,t[17]=R):R=t[17];let z=R,B;t[18]===F?B=t[19]:(B=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),F())},t[18]=F,t[19]=B);let me=B,V;if(t[20]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>[v.current],t[20]=V):V=t[20],b(p&&F,V),!E){let e;t[21]===a?e=t[22]:(e={field:a},t[21]=a,t[22]=e);let n;t[23]!==_||t[24]!==e?(n=(0,M.jsx)(ee,{t:_,i18nKey:`compose.add-comment-input-placeholder`,values:e}),t[23]=_,t[24]=e,t[25]=n):n=t[25];let i=n,s;t[26]!==r||t[27]!==z||t[28]!==fe||t[29]!==le||t[30]!==te||t[31]!==o||t[32]!==i||t[33]!==h||t[34]!==g?(s=(0,M.jsx)(x,{className:N,padding:2,gap:4,flexDirection:`column`,children:(0,M.jsx)(k,{currentUser:r,focusLock:!0,focusOnMount:!0,mentionOptions:te,onChange:o,onDiscardCancel:pe,onDiscardConfirm:z,onKeyDown:fe,onSubmit:le,placeholder:i,readOnly:h,ref:w,value:g})}),t[26]=r,t[27]=z,t[28]=fe,t[29]=le,t[30]=te,t[31]=o,t[32]=i,t[33]=h,t[34]=g,t[35]=s):s=t[35];let l=s,u;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`bottom-end`],t[36]=u):u=t[36];let d;t[37]===_?d=t[38]:(d=_(`field-button.aria-label-add`),t[37]=_,t[38]=d);let f;t[39]===_?f=t[40]:(f=_(`field-button.title`),t[39]=_,t[40]=f);let m;t[41]===f?m=t[42]:(m={content:f,placement:`top`},t[41]=f,t[42]=m);let y;t[43]!==c||t[44]!==p||t[45]!==h||t[46]!==d||t[47]!==m?(y=(0,M.jsx)(`div`,{children:(0,M.jsx)(re,{"aria-label":d,disabled:h,icon:se,mode:`bleed`,onClick:c,ref:S,selected:p,tooltipProps:m})}),t[43]=c,t[44]=p,t[45]=h,t[46]=d,t[47]=m,t[48]=y):y=t[48];let b;return t[49]!==l||t[50]!==me||t[51]!==p||t[52]!==y?(b=(0,M.jsx)(ne,{constrainSize:!0,content:l,fallbackPlacements:u,open:p,placement:`right-start`,portal:!0,ref:v,onKeyDown:me,children:y}),t[49]=l,t[50]=me,t[51]=p,t[52]=y,t[53]=b):b=t[53],b}let H;t[54]!==n||t[55]!==_?(H=_(`field-button.content`,{count:n}),t[54]=n,t[55]=_,t[56]=H):H=t[56];let U;t[57]===_?U=t[58]:(U=_(`field-button.aria-label-open`),t[57]=_,t[58]=U);let W;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,M.jsx)(y,{muted:!0,size:1,icon:C,style:{margin:`-0.375rem`}}),t[59]=W):W=t[59];let G=n>9?`9+`:n,K;t[60]===G?K=t[61]:(K=(0,M.jsxs)(x,{alignItems:`center`,gap:2,children:[W,(0,M.jsx)(ae,{size:0,as:`div`,trim:!0,children:G})]}),t[60]=G,t[61]=K);let q;t[62]!==c||t[63]!==U||t[64]!==K?(q=(0,M.jsx)(oe,{"aria-label":U,mode:`bleed`,onClick:c,padding:2,gap:2,children:K}),t[62]=c,t[63]=U,t[64]=K,t[65]=q):q=t[65];let J;return t[66]!==q||t[67]!==H?(J=(0,M.jsx)(s,{portal:!0,placement:`top`,content:H,children:q}),t[66]=q,t[67]=H,t[68]=J):J=t[68],J}var F=new Map,I=[],fe={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};function L(e){let t=(0,ue.c)(5),{enabled:n,mode:r}=p();if(!n){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let i;return t[2]!==r||t[3]!==e?(i=(0,M.jsx)(z,{...e,mode:r}),t[2]=r,t[3]=e,t[4]=i):i=t[4],i}var pe=g(o.div).withConfig({displayName:`HighlightDiv`,componentId:`sc-gt2o49-0`})(({theme:e})=>{let{radius:t,space:n,color:r}=e.sanity,i=v[h][r.dark?900:50].hex;return _`mix-blend-mode:${r.dark?`screen`:`multiply`};border-radius:${t[3]}px;top:-${n[2]}px;left:-${n[2]}Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$t as t,Gf as n,Hl as r,Sd as i,To as ee,Vl as a,Zs as o,cd as te,lc as s,ld as ne,nc as re,nf as c,rc as ie}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as l,t as u}from"./jsx-runtime-BpzPEenQ.js";import{t as d}from"./compiler-runtime-sKsOXjDo.js";import{Dt as f,J as p,Ot as m,Tt as h,dt as g,g as ae,gt as oe,r as _,tt as v,vt as y}from"./types--2f-avvL-DfAXA8nG.js";import{Gt as b,Ut as x,Y as S,a as C,et as se,it as ce,o as w,r as T,s as E,yt as le}from"./dist-LVcARZxB.js";import{t as ue}from"./Comment-CPMW8FMx.js";import{t as D}from"./useAddonDataset-BvCgByG6-PgDcQUJg.js";import{t as O}from"./useComments-Bi1m7AzT-CGyuZP86.js";import{AddCommentIcon as k}from"./AddComment-DzLuhpXr.js";import{t as de}from"./useCommentsUpsell-a8ecO894-CXaANVNE.js";var A=e(l(),1),fe=d(),j=u();function pe(){let e=(0,A.useContext)(n);if(!e)throw Error(`useCommentsAuthoringPath: missing context value`);return e}var M=b(T).withConfig({displayName:`ContentStack`,componentId:`sc-kyng0k-0`})`width:320px;`;function me(e){let t=(0,fe.c)(69),{count:n,currentUser:r,fieldTitle:a,isCreatingDataset:o,mentionOptions:te,onChange:ne,onClick:c,onClose:l,onCommentAdd:u,onDiscard:d,onInputKeyDown:f,open:p,value:m}=e,{t:h}=i(v),{error:oe}=D(),_=(0,A.useRef)(null),[y,b]=(0,A.useState)(null),x=(0,A.useRef)(null),S=n>0,ce;t[0]!==y||t[1]!==l||t[2]!==p?(ce=()=>{p&&(l(),y?.focus())},t[0]=y,t[1]=l,t[2]=p,t[3]=ce):ce=t[3];let E=ce,O;t[4]!==E||t[5]!==u?(O=e=>{u(e),E()},t[4]=E,t[5]=u,t[6]=O):O=t[6];let de=O,pe;t[7]===m?pe=t[8]:(pe=g(m),t[7]=m,t[8]=pe);let me=pe,N;t[9]!==E||t[10]!==me?(N=()=>{if(!me){E();return}x.current?.discardDialogController.open()},t[9]=E,t[10]=me,t[11]=N):N=t[11];let P=N,F;t[12]===f?F=t[13]:(F=e=>{e.isDefaultPrevented()||f&&f(e)},t[12]=f,t[13]=F);let I=F,L;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{x.current?.discardDialogController.close()},t[14]=L):L=t[14];let he=L,R;t[15]!==E||t[16]!==d?(R=()=>{x.current?.discardDialogController.close(),E(),d()},t[15]=E,t[16]=d,t[17]=R):R=t[17];let ge=R,z;t[18]===P?z=t[19]:(z=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),P())},t[18]=P,t[19]=z);let B=z,V;if(t[20]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>[_.current],t[20]=V):V=t[20],se(p&&P,V),!S){let e;t[21]===a?e=t[22]:(e={field:a},t[21]=a,t[22]=e);let n;t[23]!==h||t[24]!==e?(n=(0,j.jsx)(ee,{t:h,i18nKey:`compose.add-comment-input-placeholder`,values:e}),t[23]=h,t[24]=e,t[25]=n):n=t[25];let i=n,s;t[26]!==r||t[27]!==ge||t[28]!==I||t[29]!==de||t[30]!==o||t[31]!==te||t[32]!==ne||t[33]!==i||t[34]!==m?(s=(0,j.jsx)(M,{padding:2,gap:4,flexDirection:`column`,children:(0,j.jsx)(ae,{currentUser:r,focusLock:!0,focusOnMount:!0,mentionOptions:te,onChange:ne,onDiscardCancel:he,onDiscardConfirm:ge,onKeyDown:I,onSubmit:de,placeholder:i,readOnly:o,ref:x,value:m})}),t[26]=r,t[27]=ge,t[28]=I,t[29]=de,t[30]=o,t[31]=te,t[32]=ne,t[33]=i,t[34]=m,t[35]=s):s=t[35];let l=s,u;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`bottom-end`],t[36]=u):u=t[36];let d;t[37]===h?d=t[38]:(d=h(`field-button.aria-label-add`),t[37]=h,t[38]=d);let f=o||!!oe,g;t[39]===h?g=t[40]:(g=h(`field-button.title`),t[39]=h,t[40]=g);let v;t[41]===g?v=t[42]:(v={content:g,placement:`top`},t[41]=g,t[42]=v);let y;t[43]!==c||t[44]!==p||t[45]!==d||t[46]!==f||t[47]!==v?(y=(0,j.jsx)(`div`,{children:(0,j.jsx)(ie,{"aria-label":d,disabled:f,icon:k,mode:`bleed`,onClick:c,ref:b,selected:p,tooltipProps:v})}),t[43]=c,t[44]=p,t[45]=d,t[46]=f,t[47]=v,t[48]=y):y=t[48];let S;return t[49]!==l||t[50]!==B||t[51]!==p||t[52]!==y?(S=(0,j.jsx)(re,{constrainSize:!0,content:l,fallbackPlacements:u,open:p,placement:`right-start`,portal:!0,ref:_,onKeyDown:B,children:y}),t[49]=l,t[50]=B,t[51]=p,t[52]=y,t[53]=S):S=t[53],S}let H;t[54]!==n||t[55]!==h?(H=h(`field-button.content`,{count:n}),t[54]=n,t[55]=h,t[56]=H):H=t[56];let U;t[57]===h?U=t[58]:(U=h(`field-button.aria-label-open`),t[57]=h,t[58]=U);let W;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,j.jsx)(C,{muted:!0,size:1,icon:ue,style:{margin:`-0.375rem`}}),t[59]=W):W=t[59];let G=n>9?`9+`:n,K;t[60]===G?K=t[61]:(K=(0,j.jsxs)(T,{alignItems:`center`,gap:2,children:[W,(0,j.jsx)(w,{size:0,as:`div`,trim:!0,children:G})]}),t[60]=G,t[61]=K);let q;t[62]!==c||t[63]!==U||t[64]!==K?(q=(0,j.jsx)(le,{"aria-label":U,mode:`bleed`,onClick:c,padding:2,gap:2,children:K}),t[62]=c,t[63]=U,t[64]=K,t[65]=q):q=t[65];let J;return t[66]!==q||t[67]!==H?(J=(0,j.jsx)(s,{portal:!0,placement:`top`,content:H,children:q}),t[66]=q,t[67]=H,t[68]=J):J=t[68],J}var N=new Map,P=[],F={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};function I(e){let t=(0,fe.c)(5),{enabled:n,mode:r}=h();if(!n){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let i;return t[2]!==r||t[3]!==e?(i=(0,j.jsx)(R,{...e,mode:r}),t[2]=r,t[3]=e,t[4]=i):i=t[4],i}var L=b(te.div).withConfig({displayName:`HighlightDiv`,componentId:`sc-9nisbw-0`})(({theme:e})=>{let{radius:t,space:n,color:r}=e.sanity,i=S[_][r.daLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{p as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{Co as ee,Vt as te,Xc as ne,Zl as re,bo as a,cl as o,da as s,sl as c}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as l,s as u,t as d,w as f,x as p}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{Ft as m,K as h,Nt as g,V as _,Y as v,dt as y,ft as b,lt as x}from"./dist-BOMXfkZi.js";import{_ as S,a as C,b as ie,g as ae,m as oe,t as w,u as se,v as T,x as E}from"./useComments-CVvkxQg3-CVUv-UC3.js";import{t as D}from"./useAddonDataset-BvCgByG6-fdH-dSqr.js";import{t as O}from"./useCommentsEnabled-BPc3788v-CjDVtXqh.js";import{t as ce}from"./Comment-CPMW8FMx.js";import{t as le}from"./useCommentsSelectedPath-D5HXM3NF-DGscP8oF.js";import{AddCommentIcon as k}from"./AddComment-DzLuhpXr.js";import{t as ue}from"./useCommentsUpsell-a8ecO894-C8eFiI7z.js";var A=e(n(),1),de=i(),j=r();function M(){let e=(0,A.useContext)(t);if(!e)throw Error(`useCommentsAuthoringPath: missing context value`);return e}var N=m(y).withConfig({displayName:`ContentStack`,componentId:`sc-tkibmo-0`})`width:320px;`;function fe(e){let t=(0,de.c)(69),{count:n,currentUser:r,fieldTitle:i,isCreatingDataset:te,mentionOptions:ne,onChange:re,onClick:a,onClose:o,onCommentAdd:c,onDiscard:f,onInputKeyDown:m,open:g,value:_}=e,{t:v}=l(oe),{error:y}=D(),S=(0,A.useRef)(null),[ie,w]=(0,A.useState)(null),se=(0,A.useRef)(null),T=n>0,E;t[0]!==ie||t[1]!==o||t[2]!==g?(E=()=>{g&&(o(),ie?.focus())},t[0]=ie,t[1]=o,t[2]=g,t[3]=E):E=t[3];let O=E,le;t[4]!==O||t[5]!==c?(le=e=>{c(e),O()},t[4]=O,t[5]=c,t[6]=le):le=t[6];let ue=le,M;t[7]===_?M=t[8]:(M=ae(_),t[7]=_,t[8]=M);let fe=M,P;t[9]!==O||t[10]!==fe?(P=()=>{if(!fe){O();return}se.current?.discardDialogController.open()},t[9]=O,t[10]=fe,t[11]=P):P=t[11];let pe=P,F;t[12]===m?F=t[13]:(F=e=>{e.isDefaultPrevented()||m&&m(e)},t[12]=m,t[13]=F);let I=F,L;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{se.current?.discardDialogController.close()},t[14]=L):L=t[14];let me=L,R;t[15]!==O||t[16]!==f?(R=()=>{se.current?.discardDialogController.close(),O(),f()},t[15]=O,t[16]=f,t[17]=R):R=t[17];let he=R,z;t[18]===pe?z=t[19]:(z=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),pe())},t[18]=pe,t[19]=z);let B=z,V;if(t[20]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>[S.current],t[20]=V):V=t[20],h(g&&pe,V),!T){let e;t[21]===i?e=t[22]:(e={field:i},t[21]=i,t[22]=e);let n;t[23]!==v||t[24]!==e?(n=(0,j.jsx)(ee,{t:v,i18nKey:`compose.add-comment-input-placeholder`,values:e}),t[23]=v,t[24]=e,t[25]=n):n=t[25];let o=n,c;t[26]!==r||t[27]!==he||t[28]!==I||t[29]!==ue||t[30]!==te||t[31]!==ne||t[32]!==re||t[33]!==o||t[34]!==_?(c=(0,j.jsx)(N,{padding:2,gap:4,children:(0,j.jsx)(C,{currentUser:r,focusLock:!0,focusOnMount:!0,mentionOptions:ne,onChange:re,onDiscardCancel:me,onDiscardConfirm:he,onKeyDown:I,onSubmit:ue,placeholder:o,readOnly:te,ref:se,value:_})}),t[26]=r,t[27]=he,t[28]=I,t[29]=ue,t[30]=te,t[31]=ne,t[32]=re,t[33]=o,t[34]=_,t[35]=c):c=t[35];let l=c,u;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`bottom-end`],t[36]=u):u=t[36];let f;t[37]===v?f=t[38]:(f=v(`field-button.aria-label-add`),t[37]=v,t[38]=f);let p=te||!!y,m;t[39]===v?m=t[40]:(m=v(`field-button.title`),t[39]=v,t[40]=m);let h;t[41]===m?h=t[42]:(h={content:m,placement:`top`},t[41]=m,t[42]=h);let b;t[43]!==a||t[44]!==g||t[45]!==f||t[46]!==p||t[47]!==h?(b=(0,j.jsx)(`div`,{children:(0,j.jsx)(d,{"aria-label":f,disabled:p,icon:k,mode:`bleed`,onClick:a,ref:w,selected:g,tooltipProps:h})}),t[43]=a,t[44]=g,t[45]=f,t[46]=p,t[47]=h,t[48]=b):b=t[48];let x;return t[49]!==l||t[50]!==B||t[51]!==g||t[52]!==b?(x=(0,j.jsx)(s,{constrainSize:!0,content:l,fallbackPlacements:u,open:g,placement:`right-start`,portal:!0,ref:S,onKeyDown:B,children:b}),t[49]=l,t[50]=B,t[51]=g,t[52]=b,t[53]=x):x=t[53],x}let H;t[54]!==n||t[55]!==v?(H=v(`field-button.content`,{count:n}),t[54]=n,t[55]=v,t[56]=H):H=t[56];let U;t[57]===v?U=t[58]:(U=v(`field-button.aria-label-open`),t[57]=v,t[58]=U);let W;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,j.jsx)(b,{size:1,children:(0,j.jsx)(ce,{})}),t[59]=W):W=t[59];let G=n>9?`9+`:n,K;t[60]===G?K=t[61]:(K=(0,j.jsxs)(p,{alignItems:`center`,gap:2,children:[W,(0,j.jsx)(b,{size:0,children:G})]}),t[60]=G,t[61]=K);let q;t[62]!==a||t[63]!==U||t[64]!==K?(q=(0,j.jsx)(x,{"aria-label":U,mode:`bleed`,onClick:a,padding:2,gap:2,children:K}),t[62]=a,t[63]=U,t[64]=K,t[65]=q):q=t[65];let J;return t[66]!==q||t[67]!==H?(J=(0,j.jsx)(u,{portal:!0,placement:`top`,content:H,children:q}),t[66]=q,t[67]=H,t[68]=J):J=t[68],J}var P=new Map,pe=[],F={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};function I(e){let t=(0,de.c)(5),{enabled:n,mode:r}=O();if(!n){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let i;return t[2]!==r||t[3]!==e?(i=(0,j.jsx)(R,{...e,mode:r}),t[2]=r,t[3]=e,t[4]=i):i=t[4],i}var L=m(f.div).withConfig({displayName:`HighlightDiv`,componentId:`sc
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{Fn as i,Nc as a,Xc as o,Zl as s,bo as c,da as l,li as u,ll as d,mr as f,sl as p}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as m,t as h,w as g}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{A as _,i as v}from"./lib-BUPHIzf9.js";import{Ft as y,K as b,X as ee,a as te,dt as x}from"./dist-BOMXfkZi.js";import{_ as S,a as ne,b as re,g as C,m as w,v as ie,x as ae}from"./useComments-CVvkxQg3-CVUv-UC3.js";import{t as oe}from"./useAddonDataset-BvCgByG6-fdH-dSqr.js";import{t as T}from"./useCommentsEnabled-BPc3788v-CjDVtXqh.js";import{a as se,i as ce,n as le,o as ue,r as de,t as E}from"./buildTextSelectionFromFragment-DGgSjC7F-DWdaMBxz.js";import{t as fe}from"./useCommentsSelectedPath-D5HXM3NF-DGscP8oF.js";import{AddCommentIcon as pe}from"./AddComment-DzLuhpXr.js";import{t as me}from"./useCommentsUpsell-a8ecO894-C8eFiI7z.js";var D=e(t(),1),O=r(),k=n();function A(e){if(!e||!e.length)return null;let t=e.map(e=>e.getBoundingClientRect()),n=Math.min(...t.map(e=>e.x))||0,r=Math.min(...t.map(e=>e.y))||0,i=Math.max(...t.map(e=>e.right))||0,a=Math.max(...t.map(e=>e.bottom))||0;return{x:n,y:r,width:i-n,height:a-r,top:r,right:i,bottom:a,left:n}}function he(e){let t=(0,O.c)(5),{scrollElement:n,disabled:r,selector:i}=e,[a,o]=(0,D.useState)(null),s,c;return t[0]!==r||t[1]!==n||t[2]!==i?(s=()=>{if(r)return;let e=()=>{let e=document?.querySelectorAll(i);if(!e)return;let t=A(Array.from(e));o(t)};if(e(),n)return n.addEventListener(`wheel`,e),()=>{n.removeEventListener(`wheel`,e)}},c=[n,r,i],t[0]=r,t[1]=n,t[2]=i,t[3]=s,t[4]=c):(s=t[3],c=t[4]),(0,D.useEffect)(s,c),a}function ge(e){let t=(0,O.c)(6),{scrollElement:n,disabled:r,selector:i}=e,a;t[0]!==r||t[1]!==n||t[2]!==i?(a={scrollElement:n,disabled:r,selector:i},t[0]=r,t[1]=n,t[2]=i,t[3]=a):a=t[3];let o=he(a),s;bb0:{if(!o){s=null;break bb0}let e;t[4]===o?e=t[5]:(e={getBoundingClientRect:()=>o},t[4]=o,t[5]=e),s=e}return s}function _e(){let e=window.getSelection(),t=null;return e&&e.rangeCount>0&&(t=e.getRangeAt(0)),t?.getBoundingClientRect()||null}var j=y(g.create(l)).withConfig({displayName:`MotionPopover`,componentId:`sc-7suyjs-0`})`user-select:none;`,M=[`bottom`,`top`],N={hidden:{opacity:0,y:-4},visible:{opacity:1,y:0}};function ve(e){let t=(0,O.c)(13),{disabled:n,onClick:r,onClickOutside:i,referenceElement:a}=e,o=(0,D.useRef)(null),{t:s}=m(w),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>[o.current],t[0]=c):c=t[0],b(i,c);let l;t[1]===s?l=t[2]:(l=s(`inline-add-comment-button.disabled-overlap-title`),t[1]=s,t[2]=l);let u=l,d;t[3]===s?d=t[4]:(d=s(`inline-add-comment-button.title`),t[3]=s,t[4]=d);let f=n?u:d,p=n?E:pe,g;t[5]!==n||t[6]!==r||t[7]!==p||t[8]!==f?(g=(0,k.jsx)(h,{"data-testid":`inline-comment-button`,disabled:n,icon:p,mode:`bleed`,onClick:r,ref:o,text:f}),t[5]=n,t[6]=r,t[7]=p,t[8]=f,t[9]=g):g=t[9];let _=g,v;return t[10]!==_||t[11]!==a?(v=(0,k.jsx)(j,{animate:`visible`,content:_,contentEditable:!1,fallbackPlacements:M,initial:`hidden`,open:!0,padding:1,placement:`bottom`,portal:!0,referenceElement:a,variants:N}),t[10]=_,t[11]=a,t[12]=v):v=t[12],v}var P=[`bottom`,`top`],F=y(x).withConfig({displayName:`RootStack`,componentId:`sc-dr8aeg-0`})`width:250px;`;function ye(e){let t=(0,O.c)(20),{currentUser:n,mentionOptions:r,onChange:i,onClickOutside:a,onDiscardConfirm:o,onSubmit:s,referenceElement:c,value:u}=e,d=(0,D.useRef)(null),f=(0,D.useRef)(null),p=ee().elements?.documentScrollElement||null,m;t[0]===o?m=t[1]:(m=()=>{d.current?.discardDialogController.close(),o()},t[0]=o,t[1]=m);let h=m,g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{d.current?.discardDialogController.close()},t[2]=g):g=t[2];let _=g,v;t[3]!==a||t[4]!==u?(v=()=>{if(C(u)){d.current?.discardDialogController.open();return}a()},t[3]=a,t[4]=u,t[5]=v):v=t[5];let y;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>[f.current],t[6]=y):y=t[6],b(v,y);let x;t[7]!==n||t[8]!==h||t[9]!==r||t[10]!==i||t[11]!==s||t[12]!==u?(x=(0,k.jsx)(F,{padding:2,ref:f,children:(0,k.jsx)(ne,{currentUser:n,focusLock:!0,focusOnMount:!0,mentionOptions:r,onChange:i,onDiscardCancel:_,onDiscardConfirm:h,onSubmit:s,ref:d,value:u})}),t[7]=n,t[8]=h,t[9]=r,t[10]=i,t[11]=s,t[12]=u,t[13]=x):x=t[13];let S;t[14]!==p||t[15]!==x?(S=(0,k.jsx)(te,{element:p,children:x}),t[14]=p,t[15]=x,t[16]=S):S=t[16];let re=S,w;return t[17]!==re||t[18]!==c?(w=(0,k.jsx)(l,{content:re,"data-ui":`InlineCommentInputPopover`,fallbackPlacements:P,open:!0,placement:`bottom`,portal:!0,referenceElement:c}),t[17]=re,t[18]=c,t[19]=w):w=t[19],w}var I=[];function L(e){let t=(0,O.c)(5),{enabled:n,mode:r}=T(),i=u(),a=e.schemaType.name===`sanity.assist.instruction.prompt`,o=!!i.__internal_comments;if(!n||a||!o){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let s;return t[2]!==r||t[3]!==e?(s=(0,k.jsx)(be,{...e,mode:r}),t[2]=r,t[3]=e,t[4]=s):s=t[4],s}var be=(0,D.memo)(function(e){let t=(0Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Cf as t,Df as n,Ef as r,Hl as i,Ll as a,Pu as o,Sc as s,Sd as c,Tu as l,Vl as u,Zs as d,cd as f,ju as p,ka as m,ld as h,li as g,nc as _,nf as v,rc as y,vf as b,yc as x}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as S,t as C}from"./jsx-runtime-BpzPEenQ.js";import{t as w}from"./compiler-runtime-sKsOXjDo.js";import{Et as T,et as E,n as D}from"./types--2f-avvL-DfAXA8nG.js";import{Gt as ee,Ut as te,Y as O,at as ne,et as re,p as ie,r as k,s as ae}from"./dist-LVcARZxB.js";import{i as oe,n as A,r as j}from"./helpers-D_aQC6Do-BbFlOJg3.js";import{n as M,t as N}from"./buildRangeDecorationSelectionsFromComments-B6nJH-Wx-DkTEGwwW.js";import{AddCommentIcon as P}from"./AddComment-DzLuhpXr.js";import{c as se,l as ce,t as le,u as ue}from"./CommentInput-C1kF5k49-kVUiwefG.js";import{n as de,t as fe}from"./useCommentsUpsell-dtlhkiSW-Ba-EmyX0.js";var F=e(S(),1),I=w(),L=C(),pe=ee.span.withConfig({displayName:`HighlightSpan`,componentId:`sc-8rkq2u-0`})(({theme:e})=>{let t=e.sanity.v2?.color._dark,n=O[D][t?800:100].hex,r=O[D][t?700:300].hex,i=O[D][t?700:200].hex,a=O[D][t?600:400].hex,o=O[D][t?700:200].hex,s=O[D][t?600:400].hex;return te`box-sizing:border-box;transition:background-color 100ms ease,border-color 100ms ease;*{mix-blend-mode:${t?`screen`:`multiply`};}&[data-inline-comment-state='added'][data-inline-comment-nested='false']{background-color:${n};border-bottom:2px solid ${r};}&[data-inline-comment-state='added'][data-inline-comment-nested='true']{background-color:${o};border-bottom:2px solid ${s};}&[data-inline-comment-state='added'][data-inline-comment-nested='false'][data-hovered='true']{background-color:${i};border-bottom:2px solid ${a};}&[data-inline-comment-state='authoring']{background-color:${n};border-bottom:2px solid ${r};}`});function me(e){let t=(0,I.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({ref:s,children:n,isAdded:r,isAuthoring:i,isHovered:a,isNested:o,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=r?`added`:i?`authoring`:void 0,u=a?`true`:`false`,d=o?`true`:`false`,f;return t[8]!==n||t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==u||t[13]!==d?(f=(0,L.jsx)(pe,{...c,"data-hovered":u,"data-inline-comment-nested":d,"data-inline-comment-state":l,ref:s,children:n}),t[8]=n,t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=d,t[14]=f):f=t[14],f}var he=(0,F.memo)(function(e){let t=(0,I.c)(20),{children:n,commentId:r,currentHoveredCommentId:i,onClick:a,onHoverEnd:o,onHoverStart:s,selectedThreadId:c,threadId:l}=e,u=(0,F.useRef)(null),[d,f]=(0,F.useState)(!1),[p,m]=(0,F.useState)(null),h,g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{let e=u.current?.previousSibling,t=u.current?.nextSibling;if(!e||!t){f(!1);return}let[n]=Object.keys(se(``)),r=e.getAttribute(n),i=t.getAttribute(n),a=!!(r&&i&&r===i);m(a?r:null),f(a)},g=[],t[0]=h,t[1]=g):(h=t[0],g=t[1]),(0,F.useEffect)(h,g);let _;t[2]!==r||t[3]!==s?(_=()=>s(r),t[2]=r,t[3]=s,t[4]=_):_=t[4];let v=_,y;t[5]===o?y=t[6]:(y=()=>o(null),t[5]=o,t[6]=y);let b=y,x;t[7]!==r||t[8]!==a?(x=()=>a(r),t[7]=r,t[8]=a,t[9]=x):x=t[9];let S=x,C=i===r||i===p&&d||c===l,w;t[10]===l?w=t[11]:(w=se(l),t[10]=l,t[11]=w);let T;return t[12]!==n||t[13]!==S||t[14]!==v||t[15]!==b||t[16]!==d||t[17]!==C||t[18]!==w?(T=(0,L.jsx)(me,{isAdded:!0,isHovered:C,isNested:d,onClick:S,onMouseEnter:v,onMouseLeave:b,ref:u,...w,children:n}),t[12]=n,t[13]=S,t[14]=v,t[15]=b,t[16]=d,t[17]=C,t[18]=w,t[19]=T):T=t[19],T});function ge(e){let{comments:t,currentHoveredCommentId:n,onDecorationClick:r,onDecorationHoverEnd:i,onDecorationHoverStart:a,onDecorationMoved:o,selectedThreadId:s,value:c,documentValue:l,basePath:u}=e;return M({comments:t,value:c,documentValue:l,basePath:u}).map(({selection:e,comment:t,range:c})=>({component:({children:e})=>(0,L.jsx)(he,{commentId:t._id,currentHoveredCommentId:n,onClick:r,onHoverEnd:i,onHoverStart:a,selectedThreadId:s,threadId:t.threadId,children:e}),onMoved:o,selection:e,payload:{commentId:t._id,range:c}}))}function R(e,i){let a=e.path[0],o=e.path[e.path.length-1];if(!t(a)||!t(o))return null;let s=i.find(e=>e._key===a._key);if(!n(s))return null;let c=s.children.findIndex(e=>e._key===o._key);if(c===-1)return null;let l=s.children.slice(0,c).reduce((e,t)=>e+(r(t)?t.text.length:0),0);return{_key:s._key,offset:l+e.offset}}function _e(e,t){let n=e.backward?{anchor:e.focus,focus:e.anchor}:e,r=R(n.anchor,t),i=R(n.focus,t);return!r||!i?null:{start:r,end:i}}function ve(e,t){let n=e.flatMap(e=>{if(e===null)return[];let n=_e(e,t);return n?[n]:[]});if(n.length===0)return null;let r=new Map(t.map((e,t)=>[e._key,t])),i=(e,t)=>(r.get(e._key)??-1)-(r.get(t._key)??-1)||e.offset-t.offset,a=n.map(e=>e.start).sort(i),o=n.map(e=>e.end).sort(i);return{start:a[0],end:o[o.length-1]}}function ye(e){let{comment:t,value:n,documentValue:r,basePath:i}=e,a=M({comments:[t],value:n,documentValue:r,basePath:i}).filter(e=>e.range.text);return{range:ve(a.map(e=>e.selection),n),selection:{type:`text`,valuLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Df as t,Pu as n,Sc as r,Sd as i,Vl as a,Zs as o,cd as s,ju as c,ka as l,ld as u,li as d,nc as f,nf as p,rc as m,vf as h}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as g,t as _}from"./jsx-runtime-BpzPEenQ.js";import{t as v}from"./compiler-runtime-sKsOXjDo.js";import{Dt as y,Ot as b,Q as x,Tt as S,X as C,Z as ee,dt as te,g as ne,gt as re,h as ie,m as w,rt as ae,tt as T,vt as oe}from"./types--2f-avvL-DfAXA8nG.js";import{Gt as E,at as se,et as D,p as ce,r as O,s as le}from"./dist-LVcARZxB.js";import{t as ue}from"./useAddonDataset-BvCgByG6-PgDcQUJg.js";import{t as de}from"./useComments-Bi1m7AzT-CGyuZP86.js";import{AddCommentIcon as k}from"./AddComment-DzLuhpXr.js";import{t as fe}from"./useCommentsUpsell-a8ecO894-CXaANVNE.js";var A=e(g(),1),j=v(),M=_();function pe(e){if(!e||!e.length)return null;let t=e.map(e=>e.getBoundingClientRect()),n=Math.min(...t.map(e=>e.x))||0,r=Math.min(...t.map(e=>e.y))||0,i=Math.max(...t.map(e=>e.right))||0,a=Math.max(...t.map(e=>e.bottom))||0;return{x:n,y:r,width:i-n,height:a-r,top:r,right:i,bottom:a,left:n}}function N(e){let t=(0,j.c)(5),{scrollElement:n,disabled:r,selector:i}=e,[a,o]=(0,A.useState)(null),s,c;return t[0]!==r||t[1]!==n||t[2]!==i?(s=()=>{if(r)return;let e=()=>{let e=document?.querySelectorAll(i);if(!e)return;let t=pe(Array.from(e));o(t)};if(e(),n)return n.addEventListener(`wheel`,e),()=>{n.removeEventListener(`wheel`,e)}},c=[n,r,i],t[0]=r,t[1]=n,t[2]=i,t[3]=s,t[4]=c):(s=t[3],c=t[4]),(0,A.useEffect)(s,c),a}function me(e){let t=(0,j.c)(6),{scrollElement:n,disabled:r,selector:i}=e,a;t[0]!==r||t[1]!==n||t[2]!==i?(a={scrollElement:n,disabled:r,selector:i},t[0]=r,t[1]=n,t[2]=i,t[3]=a):a=t[3];let o=N(a),s;bb0:{if(!o){s=null;break bb0}let e;t[4]===o?e=t[5]:(e={getBoundingClientRect:()=>o},t[4]=o,t[5]=e),s=e}return s}function he(){let e=window.getSelection(),t=null;return e&&e.rangeCount>0&&(t=e.getRangeAt(0)),t?.getBoundingClientRect()||null}var P=E(s.create(f)).withConfig({displayName:`MotionPopover`,componentId:`sc-7suyjs-0`})`user-select:none;`,F=[`bottom`,`top`],I={hidden:{opacity:0,y:-4},visible:{opacity:1,y:0}};function ge(e){let t=(0,j.c)(13),{disabled:n,onClick:r,onClickOutside:a,referenceElement:o}=e,s=(0,A.useRef)(null),{t:c}=i(T),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>[s.current],t[0]=l):l=t[0],D(a,l);let u;t[1]===c?u=t[2]:(u=c(`inline-add-comment-button.disabled-overlap-title`),t[1]=c,t[2]=u);let d=u,f;t[3]===c?f=t[4]:(f=c(`inline-add-comment-button.title`),t[3]=c,t[4]=f);let p=n?d:f,h=n?w:k,g;t[5]!==n||t[6]!==r||t[7]!==h||t[8]!==p?(g=(0,M.jsx)(m,{"data-testid":`inline-comment-button`,disabled:n,icon:h,mode:`bleed`,onClick:r,ref:s,text:p}),t[5]=n,t[6]=r,t[7]=h,t[8]=p,t[9]=g):g=t[9];let _=g,v;return t[10]!==_||t[11]!==o?(v=(0,M.jsx)(P,{animate:`visible`,content:_,contentEditable:!1,fallbackPlacements:F,initial:`hidden`,open:!0,padding:1,placement:`bottom`,portal:!0,referenceElement:o,variants:I}),t[10]=_,t[11]=o,t[12]=v):v=t[12],v}var L=[`bottom`,`top`],R=E(O).withConfig({displayName:`RootStack`,componentId:`sc-orhtcy-0`})`width:250px;`;function _e(e){let t=(0,j.c)(20),{currentUser:n,mentionOptions:r,onChange:i,onClickOutside:a,onDiscardConfirm:o,onSubmit:s,referenceElement:c,value:l}=e,u=(0,A.useRef)(null),d=(0,A.useRef)(null),p=se().elements?.documentScrollElement||null,m;t[0]===o?m=t[1]:(m=()=>{u.current?.discardDialogController.close(),o()},t[0]=o,t[1]=m);let h=m,g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{u.current?.discardDialogController.close()},t[2]=g):g=t[2];let _=g,v;t[3]!==a||t[4]!==l?(v=()=>{if(te(l)){u.current?.discardDialogController.open();return}a()},t[3]=a,t[4]=l,t[5]=v):v=t[5];let y;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>[d.current],t[6]=y):y=t[6],D(v,y);let b;t[7]!==n||t[8]!==h||t[9]!==r||t[10]!==i||t[11]!==s||t[12]!==l?(b=(0,M.jsx)(R,{padding:2,ref:d,flexDirection:`column`,children:(0,M.jsx)(ne,{currentUser:n,focusLock:!0,focusOnMount:!0,mentionOptions:r,onChange:i,onDiscardCancel:_,onDiscardConfirm:h,onSubmit:s,ref:u,value:l})}),t[7]=n,t[8]=h,t[9]=r,t[10]=i,t[11]=s,t[12]=l,t[13]=b):b=t[13];let x;t[14]!==p||t[15]!==b?(x=(0,M.jsx)(ce,{element:p,children:b}),t[14]=p,t[15]=b,t[16]=x):x=t[16];let S=x,C;return t[17]!==S||t[18]!==c?(C=(0,M.jsx)(f,{content:S,"data-ui":`InlineCommentInputPopover`,fallbackPlacements:L,open:!0,placement:`bottom`,portal:!0,referenceElement:c}),t[17]=S,t[18]=c,t[19]=C):C=t[19],C}var z=[];function ve(e){let t=(0,j.c)(5),{enabled:n,mode:i}=S(),a=r(),o=e.schemaType.name===`sanity.assist.instruction.prompt`,s=!!a.__internal_comments;if(!n||o||!s){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let c;return t[2]!==i||t[3]!==e?(c=(0,M.jsx)(ye,{...e,mode:i}),t[2]=i,t[3]=e,t[4]=c):c=t[4],c}var ye=(0,A.memo)(function(e){let n=(0,j.c)(107),{mode:r,onItemClose:i,onItemOpen:s}=e,f=o(),m=se(),{comments:h,getComment:g,mentionOptions:_,onCommentsOpen:v,operation:S,setStatus:te,status:ne}=de(),{error:re}Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Fl as t,Qf as n,Sd as r,Zs as i,dc as a,nc as o,oc as s,rc as c,sc as l,sd as u}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as d,t as f}from"./jsx-runtime-BpzPEenQ.js";import{t as p}from"./compiler-runtime-sKsOXjDo.js";import{Dt as m,H as h,Ot as ee,Tt as g,gt as _,kt as v,tt as te}from"./types--2f-avvL-DfAXA8nG.js";import{Et as y,Gt as b,Pt as ne,R as x,Vt as S,et as re,n as C,o as w,r as ie,s as T,t as E}from"./dist-LVcARZxB.js";import{t as D}from"./Close-B_ZEgT1V.js";import{t as O}from"./ChevronDown-BpYUc-AP.js";import{t as k}from"./Checkmark-OT7tsNpL.js";import{t as A}from"./CommentsListItem-B4CoDHda-B92j42qR.js";import{t as j}from"./CommentsList-CmhU6-yt-CzUxgKBX.js";import{t as ae}from"./useAddonDataset-BvCgByG6-PgDcQUJg.js";import{t as M}from"./useComments-Bi1m7AzT-CGyuZP86.js";import{t as N}from"./useCommentsUpsell-a8ecO894-CXaANVNE.js";var P=e(d(),1),F=p(),I=f(),L=b(E).withConfig({displayName:`Root`,componentId:`sc-eolnz3-0`})`max-width:280px;`,R=S`from{opacity:0;}to{opacity:1;}`,z=b(o).withConfig({displayName:`StyledPopover`,componentId:`sc-eolnz3-1`})`opacity:0;animation:${R} 200ms 500ms forwards;`;function B(e){let t=(0,F.c)(23),n,i;t[0]===e?(n=t[1],i=t[2]):({onDismiss:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let{t:a}=r(te),o;t[3]===a?o=t[4]:(o=a(`onboarding.header`),t[3]=a,t[4]=o);let s;t[5]===o?s=t[6]:(s=(0,I.jsx)(w,{weight:`medium`,size:1,as:`div`,trim:!0,children:o}),t[5]=o,t[6]=s);let l;t[7]===a?l=t[8]:(l=a(`onboarding.body`),t[7]=a,t[8]=l);let u;t[9]===l?u=t[10]:(u=(0,I.jsx)(w,{size:1,as:`div`,trim:!0,children:l}),t[9]=l,t[10]=u);let d;t[11]===a?d=t[12]:(d=a(`onboarding.dismiss`),t[11]=a,t[12]=d);let f;t[13]!==n||t[14]!==d?(f=(0,I.jsx)(ie,{justifyContent:`flex-end`,marginTop:2,children:(0,I.jsx)(c,{text:d,tone:`primary`,onClick:n})}),t[13]=n,t[14]=d,t[15]=f):f=t[15];let p;t[16]!==s||t[17]!==u||t[18]!==f?(p=(0,I.jsx)(L,{padding:4,children:(0,I.jsxs)(T,{gap:3,children:[s,u,f]})}),t[16]=s,t[17]=u,t[18]=f,t[19]=p):p=t[19];let m;return t[20]!==i||t[21]!==p?(m=(0,I.jsx)(z,{content:p,open:!0,portal:!0,...i}),t[20]=i,t[21]=p,t[22]=m):m=t[22],m}function oe(e){let t=(0,F.c)(4),{data:n,onPrimaryClick:r,onSecondaryClick:i}=e,a;return t[0]!==n||t[1]!==r||t[2]!==i?(a=(0,I.jsx)(C,{size:1,children:(0,I.jsx)(E,{marginBottom:6,children:(0,I.jsx)(h,{data:n,onPrimaryClick:r,onSecondaryClick:i})})}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):a=t[3],a}function se(){let e=(0,P.useContext)(n);if(!e)throw Error(`useCommentsOnboarding: missing context value`);return e}function ce(e){let t=(0,F.c)(9),{error:n}=e,{t:i}=r(te),a;t[0]===i?a=t[1]:(a=i(`inspector-error.title`),t[0]=i,t[1]=a);let o;t[2]===a?o=t[3]:(o=(0,I.jsx)(w,{size:1,weight:`medium`,as:`div`,trim:!0,children:a}),t[2]=a,t[3]=o);let s;t[4]===n.message?s=t[5]:(s=(0,I.jsx)(w,{size:1,muted:!0,as:`div`,trim:!0,children:n.message}),t[4]=n.message,t[5]=s);let c;return t[6]!==o||t[7]!==s?(c=(0,I.jsx)(E,{padding:2,children:(0,I.jsx)(y,{paddingX:2,paddingY:3,tone:`critical`,border:!0,radius:3,children:(0,I.jsxs)(T,{gap:3,children:[o,s]})})}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}var le=b(y).withConfig({displayName:`Root`,componentId:`sc-efi4zg-0`})({position:`relative`,zIndex:`1`,lineHeight:`0`});function ue(e){let t=(0,F.c)(57),{t:n}=r(te),{ref:i,onClose:o,onViewChange:u,view:d,mode:f}=e,p;t[0]===u?p=t[1]:(p=()=>u(`open`),t[0]=u,t[1]=p);let m=p,h;t[2]===u?h=t[3]:(h=()=>u(`resolved`),t[2]=u,t[3]=h);let ee=h,g;t[4]===n?g=t[5]:(g=n(`feature-name`),t[4]=n,t[5]=g);let _;t[6]===g?_=t[7]:(_=(0,I.jsx)(ie,{alignItems:`center`,flexBasis:`0%`,flexGrow:1,gap:2,paddingY:2,padding:3,children:(0,I.jsx)(w,{as:`h1`,size:1,weight:`medium`,trim:!0,children:g})}),t[6]=g,t[7]=_);let v;t[8]!==n||t[9]!==d?(v=n(d===`open`?`status-filter.status-open`:`status-filter.status-resolved`),t[8]=n,t[9]=d,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,I.jsx)(c,{text:v,mode:`bleed`,iconRight:O}),t[11]=v,t[12]=y);let b;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b={width:`180px`},t[13]=b):b=t[13];let ne=d===`open`?k:void 0,x;t[14]===n?x=t[15]:(x=n(`status-filter.status-open-full`),t[14]=n,t[15]=x);let S;t[16]!==m||t[17]!==ne||t[18]!==x?(S=(0,I.jsx)(l,{iconRight:ne,onClick:m,text:x}),t[16]=m,t[17]=ne,t[18]=x,t[19]=S):S=t[19];let re=d===`resolved`?k:void 0,C;t[20]===n?C=t[21]:(C=n(`status-filter.status-resolved-full`),t[20]=n,t[21]=C);let T;t[22]!==f||t[23]!==n?(T=f===`upsell`?{content:n(`status-filter.status-resolved-full-upsell`)}:void 0,t[22]=f,t[23]=n,t[24]=T):T=t[24];let E=f===`upsell`,A;t[25]!==ee||t[26]!==re||t[27]!==C||t[28]!==T||t[29]!==E?(A=(0,I.jsx)(l,{iconRight:re,onClick:ee,text:C,tooltipProps:T,disabled:E}),t[25]=ee,t[26]=re,t[27]=C,t[28]=T,t[29]=E,t[30]=A):A=t[30];let j;t[31]!==A||t[32]!==S?(j=(0,I.jsxs)(a,{style:b,children:[S,A]}),t[31]=A,t[32]=S,t[33]=j):j=t[33];let ae;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ae={placement:`bottom-end`},t[34]=ae):ae=t[34];let M;t[35]!==j||t[36]!==y?(M=(0,I.jsx)(s,{id:`comment-status-menu-button`Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{_ as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{Yc as a,bo as o,da as s,tl as c}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as ee,a as l,b as u,i as d,l as f,t as te,x as ne}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{A as p,Ft as m,K as h,dt as g,ft as _,gt as v,jt as y,s as b,wt as re}from"./dist-BOMXfkZi.js";import{t as x}from"./Close-B_ZEgT1V.js";import{t as ie}from"./ChevronDown-BpYUc-AP.js";import{t as ae}from"./Checkmark-OT7tsNpL.js";import{_ as S,b as C,m as oe,x as se}from"./useComments-CVvkxQg3-CVUv-UC3.js";import{t as w}from"./useAddonDataset-BvCgByG6-fdH-dSqr.js";import{t as T}from"./useCommentsEnabled-BPc3788v-CjDVtXqh.js";import{t as ce}from"./CommentsListItem-DwZqY9F--7eLKoeE7.js";import{n as E,t as D}from"./useCommentsTelemetry-PyPsqrBr-DCqrQPLx.js";import{t as le}from"./useCommentsSelectedPath-D5HXM3NF-DGscP8oF.js";import{t as O}from"./UpsellPanel-BzCgrrZO-BKE9DmdX.js";import{t as k}from"./useCommentsUpsell-a8ecO894-C8eFiI7z.js";var A=e(n(),1),j=i(),M=r(),N=m(u).withConfig({displayName:`Root`,componentId:`sc-1god8x-0`})`max-width:280px;`,P=y`from{opacity:0;}to{opacity:1;}`,F=m(s).withConfig({displayName:`StyledPopover`,componentId:`sc-1god8x-1`})`opacity:0;animation:${P} 200ms 500ms forwards;`;function I(e){let t=(0,j.c)(23),n,r;t[0]===e?(n=t[1],r=t[2]):({onDismiss:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{t:i}=ee(oe),a;t[3]===i?a=t[4]:(a=i(`onboarding.header`),t[3]=i,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,M.jsx)(_,{weight:`medium`,size:1,children:a}),t[5]=a,t[6]=o);let s;t[7]===i?s=t[8]:(s=i(`onboarding.body`),t[7]=i,t[8]=s);let c;t[9]===s?c=t[10]:(c=(0,M.jsx)(_,{size:1,children:s}),t[9]=s,t[10]=c);let l;t[11]===i?l=t[12]:(l=i(`onboarding.dismiss`),t[11]=i,t[12]=l);let u;t[13]!==n||t[14]!==l?(u=(0,M.jsx)(ne,{justifyContent:`flex-end`,marginTop:2,children:(0,M.jsx)(te,{text:l,tone:`primary`,onClick:n})}),t[13]=n,t[14]=l,t[15]=u):u=t[15];let d;t[16]!==o||t[17]!==c||t[18]!==u?(d=(0,M.jsx)(N,{padding:4,children:(0,M.jsxs)(g,{gap:3,children:[o,c,u]})}),t[16]=o,t[17]=c,t[18]=u,t[19]=d):d=t[19];let f;return t[20]!==r||t[21]!==d?(f=(0,M.jsx)(F,{content:d,open:!0,portal:!0,...r}),t[20]=r,t[21]=d,t[22]=f):f=t[22],f}function ue(e){let t=(0,j.c)(4),{data:n,onPrimaryClick:r,onSecondaryClick:i}=e,a;return t[0]!==n||t[1]!==r||t[2]!==i?(a=(0,M.jsx)(b,{width:1,children:(0,M.jsx)(u,{marginBottom:6,children:(0,M.jsx)(O,{data:n,onPrimaryClick:r,onSecondaryClick:i})})}),t[0]=n,t[1]=r,t[2]=i,t[3]=a):a=t[3],a}function de(){let e=(0,A.useContext)(t);if(!e)throw Error(`useCommentsOnboarding: missing context value`);return e}function fe(e){let t=(0,j.c)(9),{error:n}=e,{t:r}=ee(oe),i;t[0]===r?i=t[1]:(i=r(`inspector-error.title`),t[0]=r,t[1]=i);let a;t[2]===i?a=t[3]:(a=(0,M.jsx)(_,{size:1,weight:`medium`,children:i}),t[2]=i,t[3]=a);let o;t[4]===n.message?o=t[5]:(o=(0,M.jsx)(_,{size:1,muted:!0,children:n.message}),t[4]=n.message,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,M.jsx)(u,{padding:2,children:(0,M.jsx)(v,{paddingX:2,paddingY:3,tone:`critical`,border:!0,radius:3,children:(0,M.jsxs)(g,{gap:3,children:[a,o]})})}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}var pe=m(v).withConfig({displayName:`Root`,componentId:`sc-fyfx0r-0`})({position:`relative`,zIndex:`1`,lineHeight:`0`});function me(e){let t=(0,j.c)(57),{t:n}=ee(oe),{ref:r,onClose:i,onViewChange:a,view:o,mode:s}=e,c;t[0]===a?c=t[1]:(c=()=>a(`open`),t[0]=a,t[1]=c);let u=c,p;t[2]===a?p=t[3]:(p=()=>a(`resolved`),t[2]=a,t[3]=p);let m=p,h;t[4]===n?h=t[5]:(h=n(`feature-name`),t[4]=n,t[5]=h);let g;t[6]===h?g=t[7]:(g=(0,M.jsx)(ne,{alignItems:`center`,flexBasis:`0%`,flexGrow:1,gap:2,paddingY:2,padding:3,children:(0,M.jsx)(_,{as:`h1`,size:1,weight:`medium`,children:h})}),t[6]=h,t[7]=g);let v;t[8]!==n||t[9]!==o?(v=n(o===`open`?`status-filter.status-open`:`status-filter.status-resolved`),t[8]=n,t[9]=o,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,M.jsx)(te,{text:v,mode:`bleed`,iconRight:ie}),t[11]=v,t[12]=y);let b;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b={width:`180px`},t[13]=b):b=t[13];let re=o===`open`?ae:void 0,S;t[14]===n?S=t[15]:(S=n(`status-filter.status-open-full`),t[14]=n,t[15]=S);let C;t[16]!==u||t[17]!==re||t[18]!==S?(C=(0,M.jsx)(l,{iconRight:re,onClick:u,text:S}),t[16]=u,t[17]=re,t[18]=S,t[19]=C):C=t[19];let se=o===`resolved`?ae:void 0,w;t[20]===n?w=t[21]:(w=n(`status-filter.status-resolved-full`),t[20]=n,t[21]=w);let T;t[22]!==s||t[23]!==n?(T=s===`upsell`?{content:n(`status-filter.status-resolved-full-upsell`)}:void 0,t[22]=s,t[23]=n,t[24]=T):T=t[24];let ce=s===`upsell`,E;t[25]!==m||t[26]!==se||t[27]!==w||t[28]!==T||t[29]!==ce?(E=(0,M.jsx)(l,{iconRight:se,onClick:m,text:w,tooltipProps:T,disabled:ce}),t[25]=m,t[26]=se,t[27]=w,t[28]=T,t[29]=ce,t[30]=E):E=t[30];let D;t[31]!==E||t[32]!==C?(D=(0,M.jsxs)(f,{style:b,children:[C,E]}),t[31]=E,t[32]=C,t[33]=D):D=t[33];let le;t[34]===Symbol.for(`react.memo_cache_sent
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$f as t,Fl as n,Rd as r,Sd as i,To as a,Ys as o,Zs as s,ad as c,dc as l,lc as u,nc as d,nf as f,oc as p,rc as m,sc as h,sd as g}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as _,t as v}from"./jsx-runtime-BpzPEenQ.js";import{t as y}from"./compiler-runtime-sKsOXjDo.js";import{Et as b,H as x,et as S}from"./types--2f-avvL-DfAXA8nG.js";import{Et as C,Gt as w,Pt as T,R as E,Ut as D,Vt as O,a as k,et as A,n as j,o as M,p as N,r as P,s as F,t as I,yt as L}from"./dist-LVcARZxB.js";import{t as ee}from"./Close-B_ZEgT1V.js";import{t as te}from"./ChevronDown-BpYUc-AP.js";import{t as ne}from"./Checkmark-OT7tsNpL.js";import{t as R}from"./ChevronRight-Cf6GkXSa.js";import{n as z,r as B}from"./helpers-D_aQC6Do-BbFlOJg3.js";import{l as V,s as H,t as U,u as re}from"./CommentInput-C1kF5k49-kVUiwefG.js";import{n as ie,t as ae}from"./useCommentsUpsell-dtlhkiSW-Ba-EmyX0.js";import{n as oe,r as se,t as ce}from"./CommentsListItem-Dyi91Dx1-CJKLG-KR.js";var W=e(_(),1),G=y(),K=v();function q(e){return{open:{title:e(`list-status.empty-state-open-title`),message:e(`list-status.empty-state-open-text`)},resolved:{title:e(`list-status.empty-state-resolved-title`),message:e(`list-status.empty-state-resolved-text`)}}}function le(e){let t=(0,G.c)(17),{status:n,error:r,loading:a,hasNoComments:s}=e,{t:c}=i(S),l;t[0]===c?l=t[1]:(l=q(c),t[0]=c,t[1]=l);let u=l;if(r){let e;t[2]===c?e=t[3]:(e=c(`list-status.error`),t[2]=c,t[3]=e);let n;return t[4]===e?n=t[5]:(n=(0,K.jsx)(P,{alignItems:`center`,justifyContent:`center`,flexBasis:`0%`,flexGrow:1,padding:4,children:(0,K.jsx)(P,{alignItems:`center`,children:(0,K.jsx)(M,{size:1,muted:!0,as:`div`,trim:!0,children:e})})}),t[4]=e,t[5]=n),n}if(a){let e;t[6]===c?e=t[7]:(e=c(`list-status.loading`),t[6]=c,t[7]=e);let n;return t[8]===e?n=t[9]:(n=(0,K.jsx)(o,{showText:!0,title:e}),t[8]=e,t[9]=n),n}if(s){let e=u[n],r;t[10]===e.title?r=t[11]:(r=(0,K.jsx)(M,{align:`center`,size:1,muted:!0,weight:`medium`,as:`div`,trim:!0,children:e.title}),t[10]=e.title,t[11]=r);let i=u[n],a;t[12]===i.message?a=t[13]:(a=(0,K.jsx)(M,{align:`center`,size:1,muted:!0,as:`div`,trim:!0,children:i.message}),t[12]=i.message,t[13]=a);let o;return t[14]!==r||t[15]!==a?(o=(0,K.jsx)(P,{alignItems:`center`,justifyContent:`center`,flexBasis:`0%`,flexGrow:1,children:(0,K.jsx)(j,{size:0,padding:4,children:(0,K.jsxs)(F,{gap:3,children:[r,a]})})}),t[14]=r,t[15]=a,t[16]=o):o=t[16],o}return null}var J=(0,K.jsx)(k,{muted:!0,icon:R,style:{margin:`-0.4375rem`}}),Y=(e,t)=>(0,K.jsx)(I,{as:`li`,children:(0,K.jsx)(M,{truncate:1,size:1,weight:`medium`,as:`div`,trim:!0,children:e})},`${e}-${t}`);function X(e){let t=(0,G.c)(11),{titlePath:n,maxLength:r}=e,i;bb0:{let e=n.length,a=Math.ceil(r/2),o=Math.floor(r/2);if(r&&e>r){let r;t[0]!==o||t[1]!==a||t[2]!==e||t[3]!==n?(r=[...n.slice(0,a-1),n.slice(a-1,e-o),...n.slice(e-o)],t[0]=o,t[1]=a,t[2]=e,t[3]=n,t[4]=r):r=t[4],i=r;break bb0}i=n}let a=i,o;if(t[5]!==a){let e;t[7]===a.length?e=t[8]:(e=(e,t)=>{let n=`${e}-${t}`,r=t<a.length-1;return Array.isArray(e)?(0,K.jsxs)(W.Fragment,{children:[(0,K.jsx)(u,{content:(0,K.jsx)(P,{gap:2,padding:2,flexDirection:`column`,children:e.map(Y)}),children:(0,K.jsx)(I,{children:Y(`...`,t)})}),r&&J]},n):(0,K.jsxs)(W.Fragment,{children:[Y(e,t),r&&J]},n)},t[7]=a.length,t[8]=e),o=a.map(e),t[5]=a,t[6]=o}else o=t[6];let s=o,c;return t[9]===s?c=t[10]:(c=(0,K.jsx)(P,{alignItems:`center`,as:`ol`,gap:2,children:s}),t[9]=s,t[10]=c),c}var Z=[];function ue(e){let t=(0,G.c)(25),{currentUser:n,fieldTitle:r,mentionOptions:o,mode:s,onBlur:c,onFocus:l,onKeyDown:u,onNewThreadCreate:d,readOnly:f}=e,{t:p}=i(S),[m,h]=(0,W.useState)(Z),g=(0,W.useRef)(null),_;t[0]===d?_=t[1]:(_=e=>{d?.(e),h(Z)},t[0]=d,t[1]=_);let v=_,y;t[2]===m?y=t[3]:(y=z(m),t[2]=m,t[3]=y);let b=y,x;t[4]===b?x=t[5]:(x=()=>{b&&g.current?.discardDialogController.open()},t[4]=b,t[5]=x);let C=x,w;t[6]!==u||t[7]!==C?(w=e=>{e.isDefaultPrevented()||(e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),C()),u&&u(e))},t[6]=u,t[7]=C,t[8]=w):w=t[8];let T=w,E;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(E=()=>{h(Z),g.current?.discardDialogController.close(),g.current?.focus()},t[9]=E):E=t[9];let D=E,O;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>{g.current?.discardDialogController.close()},t[10]=O):O=t[10];let k=O,A;t[11]!==r||t[12]!==s||t[13]!==p?(A=s===`upsell`?p(`compose.add-comment-input-placeholder-upsell`):(0,K.jsx)(a,{t:p,i18nKey:`compose.add-comment-input-placeholder`,values:{field:r}}),t[11]=r,t[12]=s,t[13]=p,t[14]=A):A=t[14];let j=A,M=f||s===`upsell`,N;return t[15]!==n||t[16]!==T||t[17]!==v||t[18]!==o||t[19]!==c||t[20]!==l||t[21]!==j||t[22]!==M||t[23]!==m?(N=(0,K.jsx)(U,{currentUser:n,expandOnFocus:!0,mentionOptions:o,onBlur:c,onChange:h,onDiscardCancel:k,onDiscardConfirm:D,onKeyDown:T,onFocus:l,onSubmit:v,placeholder:j,readOnly:M,ref:g,value:m}),t[15]=n,t[16]=T,t[17]=v,t[18]=o,t[19]=c,t[20]=l,t[21]=j,t[22]=M,t[23]=m,t[24]=N):N=t[24],N}var de=w(P).withConfig(Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Sd as t,To as n,Ys as r,lc as i,nf as a}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as o,t as s}from"./jsx-runtime-BpzPEenQ.js";import{t as c}from"./compiler-runtime-sKsOXjDo.js";import{Y as l,dt as u,g as d,tt as f}from"./types--2f-avvL-DfAXA8nG.js";import{Gt as p,Ut as m,a as h,n as g,o as _,p as v,r as y,s as b,t as x,yt as S}from"./dist-LVcARZxB.js";import{t as C}from"./ChevronRight-Cf6GkXSa.js";import{n as w,r as T}from"./CommentsListItem-B4CoDHda-B92j42qR.js";var E=e(o(),1),D=c(),O=s();function k(e){return{open:{title:e(`list-status.empty-state-open-title`),message:e(`list-status.empty-state-open-text`)},resolved:{title:e(`list-status.empty-state-resolved-title`),message:e(`list-status.empty-state-resolved-text`)}}}function A(e){let n=(0,D.c)(17),{status:i,error:a,loading:o,hasNoComments:s}=e,{t:c}=t(f),l;n[0]===c?l=n[1]:(l=k(c),n[0]=c,n[1]=l);let u=l;if(a){let e;n[2]===c?e=n[3]:(e=c(`list-status.error`),n[2]=c,n[3]=e);let t;return n[4]===e?t=n[5]:(t=(0,O.jsx)(y,{alignItems:`center`,justifyContent:`center`,flexBasis:`0%`,flexGrow:1,padding:4,children:(0,O.jsx)(y,{alignItems:`center`,children:(0,O.jsx)(_,{size:1,muted:!0,as:`div`,trim:!0,children:e})})}),n[4]=e,n[5]=t),t}if(o){let e;n[6]===c?e=n[7]:(e=c(`list-status.loading`),n[6]=c,n[7]=e);let t;return n[8]===e?t=n[9]:(t=(0,O.jsx)(r,{showText:!0,title:e}),n[8]=e,n[9]=t),t}if(s){let e=u[i],t;n[10]===e.title?t=n[11]:(t=(0,O.jsx)(_,{align:`center`,size:1,muted:!0,weight:`medium`,as:`div`,trim:!0,children:e.title}),n[10]=e.title,n[11]=t);let r=u[i],a;n[12]===r.message?a=n[13]:(a=(0,O.jsx)(_,{align:`center`,size:1,muted:!0,as:`div`,trim:!0,children:r.message}),n[12]=r.message,n[13]=a);let o;return n[14]!==t||n[15]!==a?(o=(0,O.jsx)(y,{alignItems:`center`,justifyContent:`center`,flexBasis:`0%`,flexGrow:1,children:(0,O.jsx)(g,{size:0,padding:4,children:(0,O.jsxs)(b,{gap:3,children:[t,a]})})}),n[14]=t,n[15]=a,n[16]=o):o=n[16],o}return null}var j=(0,O.jsx)(h,{muted:!0,icon:C,style:{margin:`-0.4375rem`}}),M=(e,t)=>(0,O.jsx)(x,{as:`li`,children:(0,O.jsx)(_,{truncate:1,size:1,weight:`medium`,as:`div`,trim:!0,children:e})},`${e}-${t}`);function N(e){let t=(0,D.c)(11),{titlePath:n,maxLength:r}=e,a;bb0:{let e=n.length,i=Math.ceil(r/2),o=Math.floor(r/2);if(r&&e>r){let r;t[0]!==o||t[1]!==i||t[2]!==e||t[3]!==n?(r=[...n.slice(0,i-1),n.slice(i-1,e-o),...n.slice(e-o)],t[0]=o,t[1]=i,t[2]=e,t[3]=n,t[4]=r):r=t[4],a=r;break bb0}a=n}let o=a,s;if(t[5]!==o){let e;t[7]===o.length?e=t[8]:(e=(e,t)=>{let n=`${e}-${t}`,r=t<o.length-1;return Array.isArray(e)?(0,O.jsxs)(E.Fragment,{children:[(0,O.jsx)(i,{content:(0,O.jsx)(y,{gap:2,padding:2,flexDirection:`column`,children:e.map(M)}),children:(0,O.jsx)(x,{children:M(`...`,t)})}),r&&j]},n):(0,O.jsxs)(E.Fragment,{children:[M(e,t),r&&j]},n)},t[7]=o.length,t[8]=e),s=o.map(e),t[5]=o,t[6]=s}else s=t[6];let c=s,l;return t[9]===c?l=t[10]:(l=(0,O.jsx)(y,{alignItems:`center`,as:`ol`,gap:2,children:c}),t[9]=c,t[10]=l),l}var P=[];function F(e){let r=(0,D.c)(25),{currentUser:i,fieldTitle:a,mentionOptions:o,mode:s,onBlur:c,onFocus:l,onKeyDown:p,onNewThreadCreate:m,readOnly:h}=e,{t:g}=t(f),[_,v]=(0,E.useState)(P),y=(0,E.useRef)(null),b;r[0]===m?b=r[1]:(b=e=>{m?.(e),v(P)},r[0]=m,r[1]=b);let x=b,S;r[2]===_?S=r[3]:(S=u(_),r[2]=_,r[3]=S);let C=S,w;r[4]===C?w=r[5]:(w=()=>{C&&y.current?.discardDialogController.open()},r[4]=C,r[5]=w);let T=w,k;r[6]!==p||r[7]!==T?(k=e=>{e.isDefaultPrevented()||(e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),T()),p&&p(e))},r[6]=p,r[7]=T,r[8]=k):k=r[8];let A=k,j;r[9]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>{v(P),y.current?.discardDialogController.close(),y.current?.focus()},r[9]=j):j=r[9];let M=j,N;r[10]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>{y.current?.discardDialogController.close()},r[10]=N):N=r[10];let F=N,I;r[11]!==a||r[12]!==s||r[13]!==g?(I=s===`upsell`?g(`compose.add-comment-input-placeholder-upsell`):(0,O.jsx)(n,{t:g,i18nKey:`compose.add-comment-input-placeholder`,values:{field:a}}),r[11]=a,r[12]=s,r[13]=g,r[14]=I):I=r[14];let L=I,R=h||s===`upsell`,z;return r[15]!==i||r[16]!==A||r[17]!==x||r[18]!==o||r[19]!==c||r[20]!==l||r[21]!==L||r[22]!==R||r[23]!==_?(z=(0,O.jsx)(d,{currentUser:i,expandOnFocus:!0,mentionOptions:o,onBlur:c,onChange:v,onDiscardCancel:F,onDiscardConfirm:M,onKeyDown:A,onFocus:l,onSubmit:x,placeholder:L,readOnly:R,ref:y,value:_}),r[15]=i,r[16]=A,r[17]=x,r[18]=o,r[19]=c,r[20]=l,r[21]=L,r[22]=R,r[23]=_,r[24]=z):z=r[24],z}var I=p(y).withConfig({displayName:`HeaderFlex`,componentId:`sc-u3p3r5-0`})`min-height:25px;`,L=p(S).withConfig({displayName:`BreadcrumbsButton`,componentId:`sc-u3p3r5-1`})(({theme:e})=>{let t=e.sanity.color.base.fg;return m`--card-fg-color:${t};max-width:100%;`});function R(e){let n=(0,D.c)(36),{breadcrumbs:r,canCreateNewThread:i,children:o,currentUser:s,fieldPath:c,isSelected:l,mentionOptions:u,mode:d,onNewThreadCreate:p,onPathSelect:m,readOnly:h}=e,{t:g}=t(f),_;n[0]!==c||n[1]!==p?(_=e=>Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Ar as t,Df as n,Do as r,Kr as i,Qs as a,Sd as o,To as s,Tu as c,da as l,dc as u,ec as d,fa as f,la as p,lc as m,nc as h,oc as g,pc as _,rc as v,rr as y,sc as b,uc as x,wo as S}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as C,t as w}from"./jsx-runtime-BpzPEenQ.js";import{t as T}from"./compiler-runtime-sKsOXjDo.js";import{$ as E,M as D,_ as O,c as k,dt as A,g as ee,gt as te,k as j,o as M,q as ne,r as re,tt as ie,wt as ae}from"./types--2f-avvL-DfAXA8nG.js";import{Et as N,Gt as P,Pt as oe,Qt as F,Ut as I,Y as L,a as se,et as ce,i as R,j as le,o as z,r as B,s as ue,t as V,yt as H}from"./dist-LVcARZxB.js";import{t as de}from"./ChevronDown-BpYUc-AP.js";import{t as fe}from"./Trash-BxG6GrjH.js";import{t as pe}from"./Edit-CAHlBqGT.js";import{t as me}from"./Link-Cl1VSeDJ.js";import{t as he}from"./CheckmarkCircle-B6SBY4QE.js";import{t as ge}from"./Undo-qtvfkxbn.js";import{t as _e}from"./LinkRemoved-LZtddC2J.js";var U=e(C(),1),W=T(),G=w();function ve(e){return{thread:{title:e(`delete-thread.title`),body:e(`delete-thread.body`),confirmButtonText:e(`delete-thread.confirm`)},comment:{title:e(`delete-comment.title`),body:e(`delete-comment.body`),confirmButtonText:e(`delete-comment.confirm`)}}}function ye(e){let t=(0,W.c)(27),{isParent:n,onClose:r,commentId:i,onConfirm:a,loading:s,error:c}=e,{t:l}=o(ie),u;t[0]===l?u=t[1]:(u=ve(l),t[0]=l,t[1]=u);let{title:f,body:p,confirmButtonText:m}=u[n?`thread`:`comment`],h;t[2]!==i||t[3]!==a?(h=()=>{a(i)},t[2]=i,t[3]=a,t[4]=h):h=t[4];let g=h,_;t[5]===r?_=t[6]:(_={onClick:r},t[5]=r,t[6]=_);let v;t[7]!==m||t[8]!==g||t[9]!==s?(v={loading:s,onClick:g,text:m,tone:`critical`},t[7]=m,t[8]=g,t[9]=s,t[10]=v):v=t[10];let y;t[11]!==_||t[12]!==v?(y={cancelButton:_,confirmButton:v},t[11]=_,t[12]=v,t[13]=y):y=t[13];let b;t[14]===p?b=t[15]:(b=(0,G.jsx)(z,{size:1,as:`div`,trim:!0,children:p}),t[14]=p,t[15]=b);let x;t[16]!==c||t[17]!==l?(x=c&&(0,G.jsx)(S,{tone:`critical`,children:l(`delete-dialog.error`)}),t[16]=c,t[17]=l,t[18]=x):x=t[18];let C;t[19]!==b||t[20]!==x?(C=(0,G.jsxs)(ue,{gap:4,children:[b,x]}),t[19]=b,t[20]=x,t[21]=C):C=t[21];let w;return t[22]!==r||t[23]!==y||t[24]!==C||t[25]!==f?(w=(0,G.jsx)(d,{footer:y,header:f,id:`delete-comment-dialog`,onClose:r,width:0,children:C}),t[22]=r,t[23]=y,t[24]=C,t[25]=f,t[26]=w):w=t[26],w}var be=P.div.withConfig({displayName:`SpacerAvatar`,componentId:`sc-negkme-0`})(e=>{let t=F(e.theme),{$size:n=1}=e;return I`min-width:${t.avatar.sizes[n]?.size}px;`}),xe=/\b(https?:\/\/[^\s,()]+(?:\.[^\s,()]+)*|www\.[^\s,()]+\.[^\s,()]{2,})\b/g;function Se(e){e.stopPropagation()}function Ce(e){let t=e.startsWith(`http`)?e:`https://${e}`;return(0,G.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,onClick:Se,children:e},e)}var we=[e=>typeof e==`string`?e.split(xe).flatMap(e=>e.match(xe)?Ce(e):e):e];function Te(e){return Array.isArray(e)?e.flatMap(e=>{let t=[e];for(let e of we)t=t.flatMap(e);return t}):e}var Ee=P(ue).withConfig({displayName:`PortableTextWrap`,componentId:`sc-f594nj-0`})(()=>I`& > [data-ui='Text']:not(:first-child){margin-top:1em;}& > [data-ui='Text']:empty{display:none;}`),De=[];function K(e){let t=(0,W.c)(4),n;t[0]===e.children?n=t[1]:(n=Te(e.children),t[0]=e.children,t[1]=n);let r=n,i;return t[2]===r?i=t[3]:(i=(0,G.jsx)(D,{children:r}),t[2]=r,t[3]=i),i}var Oe={block:{normal:K,h1:K,h2:K,h3:K,h4:K,h5:K,h6:K,blockquote:K,code:K},list:{bullet:U.Fragment,number:U.Fragment,checkmarks:U.Fragment},listItem:{bullet:K,number:K,checkmarks:K},marks:{strong:U.Fragment,em:U.Fragment,code:U.Fragment,underline:U.Fragment,strikeThrough:U.Fragment,link:U.Fragment},types:{mention:e=>(0,G.jsx)(j,{userId:e?.value?.userId,selected:!1})}};function ke(e){let t=(0,W.c)(2),{blocks:n}=e,r=n||De,a;return t[0]===r?a=t[1]:(a=(0,G.jsx)(Ee,{children:(0,G.jsx)(i,{value:r,components:Oe})}),t[0]=r,t[1]=a),a}function q(e){let t=(0,W.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i,a,o,s,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(`path`,{d:`M10.1044 10.4011L10.1044 10.9972`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),a=(0,G.jsx)(`path`,{d:`M14.2393 10.4011L14.2393 10.9972`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),o=(0,G.jsx)(`path`,{d:`M7.12128 14.1151C7.70803 15.0226 9.66113 16.8377 11.7735 16.8377C13.8859 16.8377 15.6713 15.0226 16.4257 14.1151`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),s=(0,G.jsx)(`path`,{d:`M16.703 6.43905C15.3486 5.36511 13.6357 4.72374 11.773 4.72374C7.38731 4.72374 3.83203 8.27902 3.83203 12.6647C3.83203 17.0503 7.38731 20.6056 11.773 20.6056C16.0995 20.6056 19.618 17.1455 19.712 12.8415`,stroke:`currentColor`,strokeWidth:1.2}),c=(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M19.1135 9.03425L19.1135 11.4903L20.3135 11.4903L20.3135 9.03425L22.7693 9.03425L22.7693 7.83425L20.3135 7.83425L20.3135 5.37941L19.1135 5.37941L19.1135 7.83425L16.6584 7.83425L16.6584 9.03425L19.11
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{$n as i,Co as a,Dn as o,En as s,Mr as c,To as l,Zc as u,da as d,gc as f,la as p,ni as m,ti as h,wo as g,xo as _}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as v,a as y,b,c as x,d as S,i as C,l as w,s as T,t as E,x as D}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{A as O}from"./lib-BUPHIzf9.js";import{C as k,Ft as A,Ht as j,K as ee,Nt as M,V as N,dt as te,ft as P,gt as F,lt as ne,wt as I}from"./dist-BOMXfkZi.js";import{t as L}from"./ChevronDown-BpYUc-AP.js";import{t as re}from"./Edit-CAHlBqGT.js";import{t as R}from"./Trash-BxG6GrjH.js";import{t as z}from"./Link-Cl1VSeDJ.js";import{_ as ie,a as ae,c as B,g as oe,i as se,l as V,m as ce,o as le,p as ue,r as de,s as H,t as fe,y as pe}from"./useComments-CVvkxQg3-CVUv-UC3.js";import{t as me}from"./CheckmarkCircle-B6SBY4QE.js";import{t as he}from"./Undo-qtvfkxbn.js";import{t as U}from"./LinkRemoved-LZtddC2J.js";var W=e(t(),1),G=r(),K=n();function ge(e){return{thread:{title:e(`delete-thread.title`),body:e(`delete-thread.body`),confirmButtonText:e(`delete-thread.confirm`)},comment:{title:e(`delete-comment.title`),body:e(`delete-comment.body`),confirmButtonText:e(`delete-comment.confirm`)}}}function _e(e){let t=(0,G.c)(27),{isParent:n,onClose:r,commentId:i,onConfirm:a,loading:o,error:s}=e,{t:c}=v(ce),u;t[0]===c?u=t[1]:(u=ge(c),t[0]=c,t[1]=u);let{title:d,body:f,confirmButtonText:m}=u[n?`thread`:`comment`],h;t[2]!==i||t[3]!==a?(h=()=>{a(i)},t[2]=i,t[3]=a,t[4]=h):h=t[4];let g=h,_;t[5]===r?_=t[6]:(_={onClick:r},t[5]=r,t[6]=_);let y;t[7]!==m||t[8]!==g||t[9]!==o?(y={loading:o,onClick:g,text:m,tone:`critical`},t[7]=m,t[8]=g,t[9]=o,t[10]=y):y=t[10];let b;t[11]!==_||t[12]!==y?(b={cancelButton:_,confirmButton:y},t[11]=_,t[12]=y,t[13]=b):b=t[13];let x;t[14]===f?x=t[15]:(x=(0,K.jsx)(P,{size:1,children:f}),t[14]=f,t[15]=x);let S;t[16]!==s||t[17]!==c?(S=s&&(0,K.jsx)(l,{tone:`critical`,children:c(`delete-dialog.error`)}),t[16]=s,t[17]=c,t[18]=S):S=t[18];let C;t[19]!==x||t[20]!==S?(C=(0,K.jsxs)(te,{gap:4,children:[x,S]}),t[19]=x,t[20]=S,t[21]=C):C=t[21];let w;return t[22]!==r||t[23]!==b||t[24]!==C||t[25]!==d?(w=(0,K.jsx)(p,{footer:b,header:d,id:`delete-comment-dialog`,onClose:r,width:0,children:C}),t[22]=r,t[23]=b,t[24]=C,t[25]=d,t[26]=w):w=t[26],w}var ve=A.div.withConfig({displayName:`SpacerAvatar`,componentId:`sc-negkme-0`})(e=>{let t=j(e.theme),{$size:n=1}=e;return M`min-width:${t.avatar.sizes[n]?.size}px;`}),ye=/\b(https?:\/\/[^\s,()]+(?:\.[^\s,()]+)*|www\.[^\s,()]+\.[^\s,()]{2,})\b/g;function be(e){e.stopPropagation()}function xe(e){let t=e.startsWith(`http`)?e:`https://${e}`;return(0,K.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,onClick:be,children:e},e)}var Se=[e=>typeof e==`string`?e.split(ye).flatMap(e=>e.match(ye)?xe(e):e):e];function Ce(e){return Array.isArray(e)?e.flatMap(e=>{let t=[e];for(let e of Se)t=t.flatMap(e);return t}):e}var we=A(te).withConfig({displayName:`PortableTextWrap`,componentId:`sc-4mjho1-0`})(()=>M`& > [data-ui='Text']:not(:first-child){margin-top:1em;}& > [data-ui='Text']:has(> span:empty){display:none;}`),Te=[];function q(e){let t=(0,G.c)(4),n;t[0]===e.children?n=t[1]:(n=Ce(e.children),t[0]=e.children,t[1]=n);let r=n,i;return t[2]===r?i=t[3]:(i=(0,K.jsx)(B,{children:r}),t[2]=r,t[3]=i),i}var J={block:{normal:q,h1:q,h2:q,h3:q,h4:q,h5:q,h6:q,blockquote:q,code:q},list:{bullet:W.Fragment,number:W.Fragment,checkmarks:W.Fragment},listItem:{bullet:q,number:q,checkmarks:q},marks:{strong:W.Fragment,em:W.Fragment,code:W.Fragment,underline:W.Fragment,strikeThrough:W.Fragment,link:W.Fragment},types:{mention:e=>(0,K.jsx)(H,{userId:e?.value?.userId,selected:!1})}};function Ee(e){let t=(0,G.c)(2),{blocks:n}=e,r=n||Te,a;return t[0]===r?a=t[1]:(a=(0,K.jsx)(we,{children:(0,K.jsx)(i,{value:r,components:J})}),t[0]=r,t[1]=a),a}function De(e){let t=(0,G.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i,a,o,s,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,K.jsx)(`path`,{d:`M10.1044 10.4011L10.1044 10.9972`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),a=(0,K.jsx)(`path`,{d:`M14.2393 10.4011L14.2393 10.9972`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),o=(0,K.jsx)(`path`,{d:`M7.12128 14.1151C7.70803 15.0226 9.66113 16.8377 11.7735 16.8377C13.8859 16.8377 15.6713 15.0226 16.4257 14.1151`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),s=(0,K.jsx)(`path`,{d:`M16.703 6.43905C15.3486 5.36511 13.6357 4.72374 11.773 4.72374C7.38731 4.72374 3.83203 8.27902 3.83203 12.6647C3.83203 17.0503 7.38731 20.6056 11.773 20.6056C16.0995 20.6056 19.618 17.1455 19.712 12.8415`,stroke:`currentColor`,strokeWidth:1.2}),c=(0,K.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M19.1135 9.03425L19.1135 11.4903L20.3135 11.4903L20.3135 9.03425L22.7693 9.03425L22.7693 7.83425L20.3135 7.83425L20.3135 5.37941L19.1135 5.37941L19.1135
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Ar as t,Df as n,Do as r,Js as i,Kr as a,Qs as o,Sd as s,To as c,Tu as l,da as u,dc as d,ec as f,fa as p,la as m,lc as h,nc as g,oc as _,pc as v,qs as y,rc as b,rr as x,sc as S,uc as C,wo as w}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as T,t as E}from"./jsx-runtime-BpzPEenQ.js";import{t as D}from"./compiler-runtime-sKsOXjDo.js";import{a as O,et as ee,n as k,s as A}from"./types--2f-avvL-DfAXA8nG.js";import{Et as j,Gt as M,Pt as N,Qt as P,St as te,Ut as F,Y as I,a as ne,c as L,et as re,i as ie,j as ae,o as R,r as z,s as B,t as oe,yt as se}from"./dist-LVcARZxB.js";import{l as V,u as ce}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as le}from"./ChevronDown-BpYUc-AP.js";import{t as ue}from"./Trash-BxG6GrjH.js";import{t as de}from"./Edit-CAHlBqGT.js";import{t as fe}from"./Link-Cl1VSeDJ.js";import{t as pe}from"./CheckmarkCircle-B6SBY4QE.js";import{t as H}from"./Undo-qtvfkxbn.js";import{t as me}from"./LinkRemoved-LZtddC2J.js";import{a as he,n as ge,t as _e}from"./helpers-D_aQC6Do-BbFlOJg3.js";import{a as ve,i as ye,l as be,n as xe,r as Se,t as Ce}from"./CommentInput-C1kF5k49-kVUiwefG.js";var U=e(T(),1),W=D(),G=E();function we(e){return{thread:{title:e(`delete-thread.title`),body:e(`delete-thread.body`),confirmButtonText:e(`delete-thread.confirm`)},comment:{title:e(`delete-comment.title`),body:e(`delete-comment.body`),confirmButtonText:e(`delete-comment.confirm`)}}}function Te(e){let t=(0,W.c)(27),{isParent:n,onClose:r,commentId:i,onConfirm:a,loading:o,error:c}=e,{t:l}=s(ee),u;t[0]===l?u=t[1]:(u=we(l),t[0]=l,t[1]=u);let{title:d,body:p,confirmButtonText:m}=u[n?`thread`:`comment`],h;t[2]!==i||t[3]!==a?(h=()=>{a(i)},t[2]=i,t[3]=a,t[4]=h):h=t[4];let g=h,_;t[5]===r?_=t[6]:(_={onClick:r},t[5]=r,t[6]=_);let v;t[7]!==m||t[8]!==g||t[9]!==o?(v={loading:o,onClick:g,text:m,tone:`critical`},t[7]=m,t[8]=g,t[9]=o,t[10]=v):v=t[10];let y;t[11]!==_||t[12]!==v?(y={cancelButton:_,confirmButton:v},t[11]=_,t[12]=v,t[13]=y):y=t[13];let b;t[14]===p?b=t[15]:(b=(0,G.jsx)(R,{size:1,as:`div`,trim:!0,children:p}),t[14]=p,t[15]=b);let x;t[16]!==c||t[17]!==l?(x=c&&(0,G.jsx)(w,{tone:`critical`,children:l(`delete-dialog.error`)}),t[16]=c,t[17]=l,t[18]=x):x=t[18];let S;t[19]!==b||t[20]!==x?(S=(0,G.jsxs)(B,{gap:4,children:[b,x]}),t[19]=b,t[20]=x,t[21]=S):S=t[21];let C;return t[22]!==r||t[23]!==y||t[24]!==S||t[25]!==d?(C=(0,G.jsx)(f,{footer:y,header:d,id:`delete-comment-dialog`,onClose:r,width:0,children:S}),t[22]=r,t[23]=y,t[24]=S,t[25]=d,t[26]=C):C=t[26],C}var Ee=M.div.withConfig({displayName:`SpacerAvatar`,componentId:`sc-negkme-0`})(e=>{let t=P(e.theme),{$size:n=1}=e;return F`min-width:${t.avatar.sizes[n]?.size}px;`}),De=/\b(https?:\/\/[^\s,()]+(?:\.[^\s,()]+)*|www\.[^\s,()]+\.[^\s,()]{2,})\b/g;function Oe(e){e.stopPropagation()}function K(e){let t=e.startsWith(`http`)?e:`https://${e}`;return(0,G.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,onClick:Oe,children:e},e)}var ke=[e=>typeof e==`string`?e.split(De).flatMap(e=>e.match(De)?K(e):e):e];function q(e){return Array.isArray(e)?e.flatMap(e=>{let t=[e];for(let e of ke)t=t.flatMap(e);return t}):e}var Ae=M(B).withConfig({displayName:`PortableTextWrap`,componentId:`sc-f594nj-0`})(()=>F`& > [data-ui='Text']:not(:first-child){margin-top:1em;}& > [data-ui='Text']:empty{display:none;}`),je=[];function J(e){let t=(0,W.c)(4),n;t[0]===e.children?n=t[1]:(n=q(e.children),t[0]=e.children,t[1]=n);let r=n,i;return t[2]===r?i=t[3]:(i=(0,G.jsx)(ye,{children:r}),t[2]=r,t[3]=i),i}var Me={block:{normal:J,h1:J,h2:J,h3:J,h4:J,h5:J,h6:J,blockquote:J,code:J},list:{bullet:U.Fragment,number:U.Fragment,checkmarks:U.Fragment},listItem:{bullet:J,number:J,checkmarks:J},marks:{strong:U.Fragment,em:U.Fragment,code:U.Fragment,underline:U.Fragment,strikeThrough:U.Fragment,link:U.Fragment},types:{mention:e=>(0,G.jsx)(Se,{userId:e?.value?.userId,selected:!1})}};function Ne(e){let t=(0,W.c)(2),{blocks:n}=e,r=n||je,i;return t[0]===r?i=t[1]:(i=(0,G.jsx)(Ae,{children:(0,G.jsx)(a,{value:r,components:Me})}),t[0]=r,t[1]=i),i}function Y(e){let t=(0,W.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i,a,o,s,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(`path`,{d:`M10.1044 10.4011L10.1044 10.9972`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),a=(0,G.jsx)(`path`,{d:`M14.2393 10.4011L14.2393 10.9972`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),o=(0,G.jsx)(`path`,{d:`M7.12128 14.1151C7.70803 15.0226 9.66113 16.8377 11.7735 16.8377C13.8859 16.8377 15.6713 15.0226 16.4257 14.1151`,stroke:`currentColor`,strokeWidth:1.2,strokeLinecap:`square`}),s=(0,G.jsx)(`path`,{d:`M16.703 6.43905C15.3486 5.36511 13.6357 4.72374 11.773 4.72374C7.38731 4.72374 3.83203 8.27902 3.83203 12.6647C3.83203 17.0503 7.38731 20.6056 11.773 20.6056C16.0995 20.6056 19.618 17.1455 19.712 12.8415`,stroke:`currentColor`,strokeWidth:1.2}),c=(0,G.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M19.1135 9.034
Line truncated
|
||||
@@ -0,0 +1,29 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$t as t,An as n,Bo as r,Cf as i,D as a,Df as o,E as s,Em as c,Fl as l,Gi as u,Hl as d,In as f,Ir as p,Is as m,Jf as h,K as g,Md as _,Ms as v,Nd as y,Ns as b,O as x,Oa as S,Od as C,Ol as w,Or as T,Ou as E,Qt as D,Ru as O,Sd as k,Sl as A,Tf as j,Tl as M,Tm as N,U as P,Xo as F,Yc as I,Ys as L,Zf as R,Zs as ee,_s as z,_t as te,aa as ne,ap as B,bt as V,cr as H,ed as re,et as U,g as W,gl as ie,gs as G,h as ae,hp as K,hr as oe,hs as se,ic as ce,jd as le,js as q,k as ue,mp as de,n as fe,nf as J,oa as pe,p as me,qf as he,r as ge,tl as _e,ur as ve,va as Y,vs as ye,vt as be,x as xe,xc as Se,xt as Ce,yc as we,yf as Te,ys as Ee,yt as De,z as Oe}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as ke,t as Ae}from"./jsx-runtime-BpzPEenQ.js";import{t as je}from"./compiler-runtime-sKsOXjDo.js";import{f as Me,l as Ne,o as Pe}from"./from-B8yXq1Hf.js";import{Q as X,St as Fe,X as Ie,ct as Le,ft as Re,ht as ze,lt as Be,mt as Ve,q as He,rt as Ue,xt as We}from"./clientStore-Cq3vrK4Q-X8Ukd-3S.js";import{Bt as Ge,Et as Ke,Tt as qe,dr as Je,gt as Ye,hn as Xe,mr as Ze}from"./types--2f-avvL-DfAXA8nG.js";import{Et as Qe,St as $e,s as et,t as tt}from"./dist-LVcARZxB.js";import{a as nt,d as rt,l as it,o as at,s as ot,u as st}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as ct}from"./useAddonDataset-BvCgByG6-PgDcQUJg.js";import{r as lt}from"./helpers-D_aQC6Do-BbFlOJg3.js";import{t as ut}from"./buildRangeDecorationSelectionsFromComments-B6nJH-Wx-DkTEGwwW.js";function dt(){var e=[...arguments],t=Fe(e),n=c(e),r=n.args,i=n.keys,a=new Me(function(e){var t=r.length;if(!t){e.complete();return}for(var n=Array(t),a=t,o=t,s=function(t){var s=!1;Pe(r[t]).subscribe(Ne(e,function(e){s||(s=!0,o--),n[t]=e},function(){return a--},void 0,function(){(!a||!s)&&(o||e.next(i?N(i,n):n),e.complete())}))},c=0;c<t;c++)s(c)});return t?a.pipe(Ve(t)):a}var Z=e(ke(),1),Q=je(),$=Ae();function ft(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n={componentProps:e,componentResolver:te},t[0]=e,t[1]=n),m(n)}function pt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={defaultComponent:ft,pick:se},e[0]=t):t=e[0],q(t)}function mt(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n={componentProps:e,componentResolver:be},t[0]=e,t[1]=n),m(n)}function ht(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={defaultComponent:mt,pick:G},e[0]=t):t=e[0],q(t)}function gt(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n={componentProps:e,componentResolver:De},t[0]=e,t[1]=n),m(n)}function _t(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={defaultComponent:gt,pick:z},e[0]=t):t=e[0],q(t)}function vt(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n={componentProps:e,componentResolver:V},t[0]=e,t[1]=n),m(n)}function yt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={defaultComponent:vt,pick:ye},e[0]=t):t=e[0],q(t)}function bt(e){let t=(0,Q.c)(2),n;return t[0]===e?n=t[1]:(n={componentProps:e,componentResolver:Ce},t[0]=e,t[1]=n),m(n)}function xt(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={defaultComponent:bt,pick:Ee},e[0]=t):t=e[0],q(t)}function St(e){let t=(0,Q.c)(28),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[a,o]=(0,Z.useState)(r),{onPathOpen:s}=H(),{hasAnyFullscreen:c,allFullscreenPaths:l}=ve(),u;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=(e,t)=>{o(n=>n.some(t=>t.id===e)?n:[...n,{id:e,path:t}])},t[1]=u):u=t[1];let d=u,f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{o(t=>t.filter(t=>t.id!==e))},t[2]=f):f=t[2];let p=f,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=(e,t)=>{o(n=>n.map(n=>n.id===e?{...n,path:t}:n))},t[3]=m):m=t[3];let h=m,g;t[4]===l?g=t[5]:(g=e=>l.filter(t=>{let n=Se(t);if(n.length>e.length||!n.every((t,n)=>{let r=e[n];return i(t)&&i(r)?t._key===r._key:t===r}))return!1;if(n.some(Tt))return!0;let r=e[n.length];return!i(r)}),t[4]=l,t[5]=g);let _=g,v;t[6]===s?v=t[7]:(v=()=>{s(Y),o([])},t[6]=s,t[7]=v);let y=v,b;t[8]!==y||t[9]!==_||t[10]!==s?(b=e=>{let t=_(e);if(t&&t.length>0){let e=t.reduce(wt),n=Se(e);s(n),o(e=>e.filter(e=>!e.path||e.path.length>=n.length?!1:e.path.every((e,t)=>{let r=n[t];return i(e)&&i(r)?e._key===r._key:e===r})))}else y()},t[8]=y,t[9]=_,t[10]=s,t[11]=b):b=t[11];let x=b,S;t[12]!==l||t[13]!==y||t[14]!==x||t[15]!==c||t[16]!==s||t[17]!==a?(S=e=>{let t=a[a.length-1]?.path;if(e?.toParent&&a.length>=2){let e=a[a.length-2];if(e?.path){s(e.path),o(Ct);return}}if(t&&c()&&l.length>=1){x(t);return}y()},t[12]=l,t[13]=y,t[14]=x,t[15]=c,t[16]=s,t[17]=a,t[18]=S):S=t[18];let C=S,w;t[19]===s?w=t[20]:(w=e=>{s(e),o(t=>t.filter(t=>!t.path||t.path.length>=e.length?!1:t.path.every((t,n)=>{let r=e[n];return i(t)&&i(r)?t._key===r._key:t===r})))},t[19]=s,t[20]=w);let T=w,E;t[21]!==C||t[22]!==T||t[23]!==a?(E={stack:a,push:d,remove:p,update:h,close:C,navigateTo:T},t[21]=C,t[22]=T,t[23]=a,t[24]=E):E=t[24];let D=ELine truncated
|
||||
_createdAt,
|
||||
_id,
|
||||
authorId,
|
||||
contentSnapshot,
|
||||
context,
|
||||
lastEditedAt,
|
||||
message,
|
||||
parentCommentId,
|
||||
reactions,
|
||||
status,
|
||||
target,
|
||||
threadId
|
||||
} | order(_createdAt desc)`,[d,f]=(0,Z.useReducer)(gn,_n),[p,m]=(0,Z.useState)(n!==null),[h,g]=(0,Z.useState)(null),_=(0,Z.useRef)(!1),v;t[2]===r?v=t[3]:(v=at(r),t[2]=r,t[3]=v);let y;t[4]===o?y=t[5]:(y=o?{documentVersionId:o}:{},t[4]=o,t[5]=y);let b;t[6]!==v||t[7]!==y?(b={documentId:v,...y},t[6]=v,t[7]=y,t[8]=b):b=t[8];let x=b,S;t[9]!==n||t[10]!==x||t[11]!==u?(S=async()=>{if(!n){m(!1);return}try{let e=await n.fetch(u,x);f({type:`COMMENTS_SET`,comments:e}),m(!1)}catch(e){g(e)}},t[9]=n,t[10]=x,t[11]=u,t[12]=S):S=t[12];let C=S,w;t[13]!==C||t[14]!==i||t[15]!==a?(w=async e=>{if(e.type===`welcome`&&!_.current&&(m(!0),await C(),m(!1),_.current=!0),e.type===`reconnect`&&(m(!0),_.current=!1),e.type===`mutation`){if(e.transition===`appear`){let t=e.result;t&&f({type:`COMMENT_RECEIVED`,payload:t})}if(e.transition===`disappear`&&f({type:`COMMENT_DELETED`,id:e.documentId}),e.transition===`update`){let t=e.result,n=e.result?._id||``,r=e.transactionId,o=a.get(n),s=r===o;if(!s&&o)return;t&&(f({type:`COMMENT_UPDATED`,payload:t}),s&&i(n))}}},t[13]=C,t[14]=i,t[15]=a,t[16]=w):w=t[16];let T=w,E;bb0:{if(!n){let e;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=We(),t[17]=e):e=t[17],E=e;break bb0}let e;if(t[18]!==n.observable||t[19]!==l||t[20]!==x){let r;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>(g(e),We(e)),t[22]=r):r=t[22],e=n.observable.listen(`*[${l}]`,x,vn).pipe(Ue(r)),t[18]=n.observable,t[19]=l,t[20]=x,t[21]=e}else e=t[21];E=e}let D=E,O,k;t[23]!==T||t[24]!==D?(O=()=>{let e=D.subscribe(T);return()=>{e?.unsubscribe()}},k=[T,D],t[23]=T,t[24]=D,t[25]=O,t[26]=k):(O=t[25],k=t[26]),(0,Z.useEffect)(O,k);let A;t[27]===d.comments?A=t[28]:(A=Object.values(d.comments),t[27]=d.comments,t[28]=A);let j=A,M;return t[29]!==j||t[30]!==h||t[31]!==p?(M={data:j,dispatch:f,error:h,loading:p},t[29]=j,t[30]=h,t[31]=p,t[32]=M):M=t[32],M}function xn(e,t){let n=l(t),r=n[0];if(r&&j(e)){let t=e?.fields?.find(e=>e.name===r);if(t){let e=d(n.slice(1));return e?xn(t.type,e):t}}}function Sn(e,t){if(typeof t==`number`)return t;let n=T(e,t);return n!==-1&&n}function Cn(e){try{return l(e)}catch{return[]}}function wn(e){let{currentUser:n,schemaType:r,fieldPath:i,documentValue:a}=e,o=Cn(i),s=[],c=r;return o.forEach((e,r)=>{let i=o.slice(0,r+1),l=o.slice(0,r),u=xn(c,d([e])),p=e.hasOwnProperty(`_key`),m=we(a,l),h=we(a,i),g={document:a,currentUser:n,parent:m,value:h,path:i};if(p&&Array.isArray(m)){let t=Sn(m,e),n=typeof t==`number`;s.push({invalid:t===!1,isArrayItem:!0,title:n?`#${Number(t)+1}`:`Unknown array item`});return}if(u?.type){let e=f(u.type.hidden,g);s.push({invalid:e,isArrayItem:!1,title:t(u.type)}),c=u.type;return}if(Te(c)){let n=we(a,l)?._type,r=c?.of?.find(e=>e.name===n),i=r?.fields?.find(t=>t.name===e);if(!n&&h){let n=(c?.of?.map(e=>e?.fields).filter(Boolean).flat())?.find(t=>t?.name===e),r=f(n?.type?.hidden,g);n&&(s.push({invalid:r,isArrayItem:!1,title:t(n?.type)}),c=n?.type);return}if(!i){s.push({invalid:!0,isArrayItem:!1,title:`Unknown field`});return}let o=t(i?.type),u=f(r?.type?.hidden,g),d=f(i?.type.hidden,g),p=u||d;s.push({invalid:p,isArrayItem:!1,title:o}),c=i?.type;return}s.push({invalid:!0,isArrayItem:!1,title:`Unknown field`})}),s}var Tn=[];function En(e){let{comments:t,currentUser:n,documentValue:r,schemaType:i,type:a}=e,o=t?.filter(e=>!e.parentCommentId);return a===`task`?o.map(e=>{let n=t?.filter(t=>t.parentCommentId===e._id);return{commentsCount:[e,...n].length,parentComment:e,replies:n,threadId:e.threadId,hasReferencedValue:!1,breadcrumbs:Tn,fieldPath:``}}):a===`field`?o.map(e=>{let a=wn({currentUser:n,documentValue:r,fieldPath:e.target.path?.field||``,schemaType:i}),o=!1;if(Ye(e)&&(o=!!(e.target.path?.selection&&e.target.path.selection.value.some(e=>e.text))),a.some(e=>e.invalid))return;let s=t?.filter(t=>t.parentCommentId===e._id),c=[e,...s].length,l=o;return{breadcrumbs:a,commentsCount:c,fieldPath:e.target.path?.field||``,parentComment:e,replies:s,threadId:e.threadId,hasReferencedValue:l}}).filter(Boolean):Tn}var Dn=[],On={open:Dn,resolved:Dn},kn=(0,Z.memo)(function(e){let t=(0,Q.c)(88),{children:n,documentId:r,documentType:i,isCommentsOpen:a,onCommentsOpen:o,sortOrder:s,type:c,getCommentLink:l,onClearSelectedComment:u,selectedCommentId:d,isConnecting:f,onPathOpen:p,releaseId:m,mentionsDisabled:h}=e,g=qe(),[_,v]=(0,Z.useState)(`open`),{client:b,createAddonDataset:x,isCreatingDataset:S}=ct(),C;t[0]===r?C=t[1]:(C=at(r),t[0]=r,t[1]=C);let w=C,T=Ge(w,i,`low`,m),E=M(),D;t[2]!==i||t[3]!==E?(D=E.get(i),t[2]=i,t[3]=E,t[4]=D):D=t[4];let O=D,k=ee(),{name:A,dataset:j,projectId:N}=y(),P;bb0:{if(m){P=T.version;break bb0}P=T.draft||T.published}let F=P,I=F?._rev,[L]=(0,Z.useState)(An),R;t[5]===L?R=t[6]:(R=e=>{L.delete(e)},t[5]=L,t[6]=R);let z=R,te;t[7]!==b||t[8]!==r||t[9]!==z||t[10]!==m||t[11]!==L?(te={documentId:r,releaseId:m,client:b,transactionsIdMap:L,onLatestTransactionIdReceived:z},t[7]=b,t[8]=r,t[9]=z,t[10]=m,t[11]=L,t[12]=te):te=t[12];let{dispatch:B,data:V,error:H,loading:re}=bn(te),U=V===void 0?Dn:V,W;t[13]===L?W=t[14]:(W
Line truncated
|
||||
_createdAt,
|
||||
_id,
|
||||
_rev,
|
||||
_type,
|
||||
_system,
|
||||
contentSnapshot,
|
||||
context,
|
||||
lastEditedAt,
|
||||
message,
|
||||
parentCommentId,
|
||||
reactions,
|
||||
status,
|
||||
target,
|
||||
threadId
|
||||
} | order(_createdAt desc)`,params:{gdr:t,...i.params}}}function er(e,t){let n={};for(let t of e)n[t._key]={...t};for(let e of t)n[e._key]={...n[e._key],...e};return Object.values(n)}function tr(e){return e.reduce((e,t)=>({...e,[t._id]:t}),{})}function nr(e,t){switch(t.type){case`COMMENTS_SET`:{let n=tr(t.comments);return{...e,comments:n}}case`COMMENT_ADDED`:{let n=t.payload,r=n,i={[n._id]:{...e.comments[n._id],...r,_state:n._state||void 0,_createdAt:n._createdAt||new Date().toISOString()}};return{...e,comments:{...e.comments,...i}}}case`COMMENT_RECEIVED`:{let n=t.payload;return{...e,comments:{...e.comments,[n._id]:n}}}case`COMMENT_DELETED`:{let{[t.id]:n,...r}=e.comments;return Object.keys(r).forEach(e=>{r[e].parentCommentId===t.id&&delete r[e]}),{...e,comments:r}}case`COMMENT_UPDATED`:{let n=t.payload,r=n._id,i=e.comments[r],a=er(i?.reactions?.filter(e=>e?._optimisticState)||[],n.reactions||[]),o={...i,...n,reactions:a};return{...e,comments:{...e.comments,[r]:o}}}default:return e}}var rr={comments:{}},ir={events:[`welcome`,`mutation`,`reconnect`],includeResult:!0,includeAllVersions:!0,visibility:`query`,tag:`comments-store`};function ar(e){let t=(0,Q.c)(35),{client:n,groupId:r,versionId:i,type:a,onLatestTransactionIdReceived:o,transactionsIdMap:s,ready:c}=e,l=c===void 0||c,[u,d]=(0,Z.useReducer)(nr,rr),[f,p]=(0,Z.useState)(n!==null&&l),[m,h]=(0,Z.useState)(null),g=(0,Z.useRef)(!1),_;t[0]!==n?.collaboration.comments||t[1]!==r?(_=n?.collaboration.comments.getTargetDocumentRef(r)??null,t[0]=n?.collaboration.comments,t[1]=r,t[2]=_):_=t[2];let v=_,y;t[3]!==v||t[4]!==a||t[5]!==i?(y=$n({gdr:v,versionId:i,type:a}),t[3]=v,t[4]=a,t[5]=i,t[6]=y):y=t[6];let{query:b,params:x}=y,S;t[7]===x?S=t[8]:(S=JSON.stringify(x),t[7]=x,t[8]=S);let C=`${b}:${S}:${l}`,[w,T]=(0,Z.useState)(C);w!==C&&(T(C),d({type:`COMMENTS_SET`,comments:[]}),p(!!(n&&v&&l)),h(null));let E;t[9]!==n||t[10]!==v||t[11]!==x||t[12]!==b||t[13]!==l?(E=async()=>{if(!n||!v||!l){p(!1);return}try{let e=await n.collaboration.comments.fetch(b,x);d({type:`COMMENTS_SET`,comments:e}),h(null),p(!1)}catch(e){h(e)}},t[9]=n,t[10]=v,t[11]=x,t[12]=b,t[13]=l,t[14]=E):E=t[14];let D=E,O;t[15]!==D||t[16]!==o||t[17]!==s?(O=async e=>{if(e.type===`welcome`&&!g.current&&(p(!0),await D(),p(!1),g.current=!0),e.type===`reconnect`&&(p(!0),g.current=!1),e.type===`mutation`){if(e.transition===`appear`){let t=e.result;if(!t)return;let n=s.get(t._id);if(n&&e.transactionId!==n)return;d({type:`COMMENT_RECEIVED`,payload:t})}if(e.transition===`disappear`&&d({type:`COMMENT_DELETED`,id:e.documentId}),e.transition===`update`){let t=e.result,n=e.result?._id||``,r=e.transactionId,i=s.get(n),a=r===i;if(!a&&i)return;t&&(d({type:`COMMENT_UPDATED`,payload:t}),a&&o(n))}}},t[15]=D,t[16]=o,t[17]=s,t[18]=O):O=t[18];let k=O,A;bb0:{if(!n||!v||!l){let e;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(e=We(),t[19]=e):e=t[19],A=e;break bb0}let e;if(t[20]!==n.collaboration.comments||t[21]!==x||t[22]!==b){let r;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>(h(e),We()),t[24]=r):r=t[24],e=n.collaboration.comments.listen(b,x,ir).pipe(Ue(r)),t[20]=n.collaboration.comments,t[21]=x,t[22]=b,t[23]=e}else e=t[23];A=e}let j=A,M,N;t[25]!==k||t[26]!==j?(M=()=>{g.current=!1;let e=j.subscribe(k);return()=>{e?.unsubscribe()}},N=[k,j],t[25]=k,t[26]=j,t[27]=M,t[28]=N):(M=t[27],N=t[28]),(0,Z.useEffect)(M,N);let P;t[29]===u.comments?P=t[30]:(P=Object.values(u.comments),t[29]=u.comments,t[30]=P);let F=P,I;return t[31]!==F||t[32]!==m||t[33]!==f?(I={data:F,dispatch:d,error:m,loading:f},t[31]=F,t[32]=m,t[33]=f,t[34]=I):I=t[34],I}function or(e,t){let n=l(t),r=n[0];if(r&&j(e)){let t=e?.fields?.find(e=>e.name===r);if(t){let e=d(n.slice(1));return e?or(t.type,e):t}}}function sr(e,t){if(typeof t==`number`)return t;let n=T(e,t);return n!==-1&&n}function cr(e){let{currentUser:n,schemaType:r,fieldPath:i,documentValue:a}=e,o=l(i),s=[],c=r;return o.forEach((e,r)=>{let i=o.slice(0,r+1),l=o.slice(0,r),u=or(c,d([e])),p=e.hasOwnProperty(`_key`),m=we(a,l),h=we(a,i),g={document:a,currentUser:n,parent:m,value:h,path:i};if(p&&Array.isArray(m)){let t=sr(m,e),n=typeof t==`number`;s.push({invalid:t===!1,isArrayItem:!0,title:n?`#${Number(t)+1}`:`Unknown array item`});return}if(u?.type){let e=f(u.type.hidden,g);s.push({invalid:e,isArrayItem:!1,title:t(u.type)}),c=u.type;return}if(Te(c)){let n=we(a,l)?._type,r=c?.of?.find(e=>e.name===n),i=r?.fields?.find(t=>t.name===e);if(!n&&h){let n=(c?.of?.map(e=>e?.fields).filter(Boolean).flat())?.find(t=>t?.name===e),r=f(n?.type?.hidden,g);n&&(s.push({invalid:r,isArrayItem:!1,title:t(n?.type)}),c=n?.type);return}if(!i){s.push({invalid:!0,isArrayItem:!1,title:`Unknown field`});return}let o=t(i?.type),u=f(r?.type?.hidden,g),d=f(i?.type.hidden,g),p=u||d;s.push({invalid:p,isArrayItem:!1,title:o}),c=i?.type;return}s.push({invalid:!0,isArrayItem:!1,title:`Unknown field`})}),s}function lr(e){let t=e.indexOf(ut[0]),n=e.indexOf(ut[1]);return t===-1||n===-1?!!e:n>t+1}var ur=[];function dr(e){let{comments:t,currentUser:n,d
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{h as t,p as n,v as r}from"./_singletons-C3kYIdI9.js";import{n as i,t as a}from"./jsx-runtime-BpzPEenQ.js";import{t as o}from"./compiler-runtime-sKsOXjDo.js";import{Nc as s,jn as c,x as l,yl as u}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{i as d}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import"./draftUtils-D3HJGQaW-BnJ8Os95.js";var f=e(i(),1),p=o(),m=a();function h(e){let t=(0,p.c)(6),{children:r}=e,[i,a]=(0,f.useState)(null),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{a(e)},t[0]=o):o=t[0];let s=o,c;t[1]===i?c=t[2]:(c={authoringPath:i,setAuthoringPath:s},t[1]=i,t[2]=c);let l=c,u;return t[3]!==r||t[4]!==l?(u=(0,m.jsx)(n.Provider,{value:l,children:r}),t[3]=r,t[4]=l,t[5]=u):u=t[5],u}function g(e,t){let n=(0,p.c)(3),{enabled:r,isLoading:i,error:a}=c(l.studioComments),{enabled:o}=u().document.comments,s=o({documentType:t,documentId:d(e)}),f;bb0:{if(i||!s||a){let e;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={enabled:!1,mode:null},n[0]=e):e=n[0],f=e;break bb0}let e=r?`default`:`upsell`,t;n[1]===e?t=n[2]:(t={enabled:!0,mode:e},n[1]=e,n[2]=t),f=t}return f}var _=(0,f.memo)(function(e){let n=(0,p.c)(3),{children:r,documentId:i,documentType:a}=e,o=g(i,a),s;return n[0]!==r||n[1]!==o?(s=(0,m.jsx)(t.Provider,{value:o,children:r}),n[0]=r,n[1]=o,n[2]=s):s=n[2],s}),v=(0,f.memo)(function(e){let t=(0,p.c)(8),{children:n}=e,[i,a]=(0,f.useState)(null),o;t[0]===i?o=t[1]:(o=e=>{s(i,e)||a(e)},t[0]=i,t[1]=o);let c=o,l;t[2]!==c||t[3]!==i?(l={selectedPath:i,setSelectedPath:c},t[2]=c,t[3]=i,t[4]=l):l=t[4];let u=l,d;return t[5]!==n||t[6]!==u?(d=(0,m.jsx)(r.Provider,{value:u,children:n}),t[5]=n,t[6]=u,t[7]=d):d=t[7],d});export{_ as n,v as r,h as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{_ as t,y as n}from"./_singletons-C3kYIdI9.js";import{n as r,t as i}from"./jsx-runtime-BpzPEenQ.js";import{t as a}from"./compiler-runtime-sKsOXjDo.js";import{At as o,Yn as s,jn as c,nt as l,x as u}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{t as d}from"./AddonDatasetProvider-C26Rc0B9-BQLPb_HX.js";var f=e(r(),1),p=a(),m=i(),h=`sanityStudio:comments:inspector:onboarding:dismissed:v1`,g=e=>{try{window.localStorage.setItem(h,JSON.stringify(e))}catch{}},_=()=>{try{let e=window.localStorage.getItem(h);return e?JSON.parse(e):!1}catch{return!1}};function v(e){let n=(0,p.c)(7),{children:r}=e,i;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=_(),n[0]=i):i=n[0];let[a,o]=(0,f.useState)(i),s;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o(!0),g(!0)},n[1]=s):s=n[1];let c=s,l;n[2]===a?l=n[3]:(l={setDismissed:c,isDismissed:a},n[2]=a,n[3]=l);let u=l,d;return n[4]!==r||n[5]!==u?(d=(0,m.jsx)(t.Provider,{value:u,children:r}),n[4]=r,n[5]=u,n[6]=d):d=n[6],d}function y(e){let t=(0,p.c)(9),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={dataUri:`/journey/comments`,feature:`comments`},t[0]=r):r=t[0];let i=s(r),a=e.children,c;t[1]===i?c=t[2]:(c=o(i),t[1]=i,t[2]=c);let u;t[3]===c?u=t[4]:(u=(0,m.jsx)(l,{...c}),t[3]=c,t[4]=u);let d;return t[5]!==i||t[6]!==e.children||t[7]!==u?(d=(0,m.jsxs)(n.Provider,{value:i,children:[a,u]}),t[5]=i,t[6]=e.children,t[7]=u,t[8]=d):d=t[8],d}function b(e){let t=(0,p.c)(8),{enabled:n,isLoading:r}=c(u.studioComments),i;t[0]===e?i=t[1]:(i=e.renderDefault(e),t[0]=e,t[1]=i);let a=i,o;t[2]!==a||t[3]!==n||t[4]!==r?(o=!n&&!r?(0,m.jsx)(y,{children:a}):a,t[2]=a,t[3]=n,t[4]=r,t[5]=o):o=t[5];let s;return t[6]===o?s=t[7]:(s=(0,m.jsx)(d,{children:(0,m.jsx)(v,{children:o})}),t[6]=o,t[7]=s),s}export{b as CommentsStudioLayout};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$ as t,Jt as n,Qf as r,S as i,np as a,or as o,xr as s}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as c,t as l}from"./jsx-runtime-BpzPEenQ.js";import{t as u}from"./compiler-runtime-sKsOXjDo.js";import{t as d}from"./AddonDatasetProvider-CF_RtUZo-BoMlopck.js";var f=e(c(),1),p=u(),m=l(),h=`sanityStudio:comments:inspector:onboarding:dismissed:v1`,g=e=>{try{window.localStorage.setItem(h,JSON.stringify(e))}catch{}},_=()=>{try{let e=window.localStorage.getItem(h);return e?JSON.parse(e):!1}catch{return!1}};function v(e){let t=(0,p.c)(7),{children:n}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=_(),t[0]=i):i=t[0];let[a,o]=(0,f.useState)(i),s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o(!0),g(!0)},t[1]=s):s=t[1];let c=s,l;t[2]===a?l=t[3]:(l={setDismissed:c,isDismissed:a},t[2]=a,t[3]=l);let u=l,d;return t[4]!==n||t[5]!==u?(d=(0,m.jsx)(r.Provider,{value:u,children:n}),t[4]=n,t[5]=u,t[6]=d):d=t[6],d}function y(e){let r=(0,p.c)(9),i;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={dataUri:`/journey/comments`,feature:`comments`},r[0]=i):i=r[0];let o=s(i),c=e.children,l;r[1]===o?l=r[2]:(l=n(o),r[1]=o,r[2]=l);let u;r[3]===l?u=r[4]:(u=(0,m.jsx)(t,{...l}),r[3]=l,r[4]=u);let d;return r[5]!==o||r[6]!==e.children||r[7]!==u?(d=(0,m.jsxs)(a.Provider,{value:o,children:[c,u]}),r[5]=o,r[6]=e.children,r[7]=u,r[8]=d):d=r[8],d}function b(e){let t=(0,p.c)(8),{enabled:n,isLoading:r}=o(i.studioComments),a;t[0]===e?a=t[1]:(a=e.renderDefault(e),t[0]=e,t[1]=a);let s=a,c;t[2]!==s||t[3]!==n||t[4]!==r?(c=!n&&!r?(0,m.jsx)(y,{children:s}):s,t[2]=s,t[3]=n,t[4]=r,t[5]=c):c=t[5];let l;return t[6]===c?l=t[7]:(l=(0,m.jsx)(d,{children:(0,m.jsx)(v,{children:c})}),t[6]=c,t[7]=l),l}export{b as CommentsStudioLayout};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$ as t,$f as n,Jt as r,S as i,or as a,rp as o,xr as s}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as c,t as l}from"./jsx-runtime-BpzPEenQ.js";import{t as u}from"./compiler-runtime-sKsOXjDo.js";import{t as d}from"./AddonDatasetProvider-CF_RtUZo-BoMlopck.js";var f=e(c(),1),p=u(),m=l(),h=`sanityStudio:comments:inspector:onboarding:dismissed:v1`,g=e=>{try{window.localStorage.setItem(h,JSON.stringify(e))}catch{}},_=()=>{try{let e=window.localStorage.getItem(h);return e?JSON.parse(e):!1}catch{return!1}};function v(e){let t=(0,p.c)(7),{children:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=_(),t[0]=i):i=t[0];let[a,o]=(0,f.useState)(i),s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o(!0),g(!0)},t[1]=s):s=t[1];let c=s,l;t[2]===a?l=t[3]:(l={setDismissed:c,isDismissed:a},t[2]=a,t[3]=l);let u=l,d;return t[4]!==r||t[5]!==u?(d=(0,m.jsx)(n.Provider,{value:u,children:r}),t[4]=r,t[5]=u,t[6]=d):d=t[6],d}function y(e){let n=(0,p.c)(9),i;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={dataUri:`/journey/comments`,feature:`comments`},n[0]=i):i=n[0];let a=s(i),c=e.children,l;n[1]===a?l=n[2]:(l=r(a),n[1]=a,n[2]=l);let u;n[3]===l?u=n[4]:(u=(0,m.jsx)(t,{...l}),n[3]=l,n[4]=u);let d;return n[5]!==a||n[6]!==e.children||n[7]!==u?(d=(0,m.jsxs)(o.Provider,{value:a,children:[c,u]}),n[5]=a,n[6]=e.children,n[7]=u,n[8]=d):d=n[8],d}function b(e){let t=(0,p.c)(8),{enabled:n,isLoading:r}=a(i.studioComments),o;t[0]===e?o=t[1]:(o=e.renderDefault(e),t[0]=e,t[1]=o);let s=o,c;t[2]!==s||t[3]!==n||t[4]!==r?(c=!n&&!r?(0,m.jsx)(y,{children:s}):s,t[2]=s,t[3]=n,t[4]=r,t[5]=c):c=t[5];let l;return t[6]===c?l=t[7]:(l=(0,m.jsx)(d,{children:(0,m.jsx)(v,{children:c})}),t[6]=c,t[7]=l),l}export{b as CommentsStudioLayout};
|
||||
@@ -0,0 +1 @@
|
||||
import{Cr as e,Nd as t,Om as n,Sd as r,St as i,cl as a,ed as o,f as s,gn as c,im as l,lc as u,ot as d,tl as f,ua as p,wm as m}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{t as h}from"./jsx-runtime-BpzPEenQ.js";import{t as g}from"./compiler-runtime-sKsOXjDo.js";import{At as _,Q as v,X as y,ct as b,ht as x,rt as S,xt as C}from"./clientStore-Cq3vrK4Q-X8Ukd-3S.js";import{V as w,vn as ee}from"./types--2f-avvL-DfAXA8nG.js";import{St as te}from"./dist-LVcARZxB.js";import{t as ne}from"./ErrorOutline-Cl-3_nRG.js";var T=g(),E=h(),D=new WeakMap;function O(e){let t=D.get(e);if(t)return t;let n=new Map(e.map(e=>[e.name,new Set(e.values.map(e=>e.value))]));return D.set(e,n),n}function k(e,t){let n=O(t),r=[];for(let[t,i]of Object.entries(e)){let e=n.get(t);if(!e){r.push({key:t,value:i,type:`unknown-key`});continue}e.has(i)||r.push({key:t,value:i,type:`unknown-value`})}return r}var A=/^[a-z][a-z0-9_-]{0,63}$/,re=[`_`,`$`];function j(e){let t=e.trim();if(t){for(let e of re)if(t.startsWith(e))return`reserved`;if(t.includes(`:`)||!A.test(t))return`invalid`}}function M(e){if(!e.trim())return`empty`;if(e.includes(`,`))return`invalid`}function N(e){return typeof e==`string`&&e.trim()||void 0}function ie(e,t){if(!Array.isArray(e))return console.warn(`[sanity] Dropped conditions entry "${t}": values must be an array`),[];let n=new Set,r=[];for(let i of e){if(typeof i==`string`){let e=i.trim();if(M(e)){console.warn(`[sanity] Dropped invalid conditions value "${i}" for key "${t}"`);continue}if(n.has(e)){console.warn(`[sanity] Dropped duplicate conditions value "${e}" for key "${t}"`);continue}n.add(e),r.push({value:e,title:e});continue}if(!f(i)||typeof i.value!=`string`){console.warn(`[sanity] Dropped invalid conditions value for key "${t}"`);continue}let e=i.value.trim();if(M(e)){console.warn(`[sanity] Dropped invalid conditions value "${i.value}" for key "${t}"`);continue}if(n.has(e)){console.warn(`[sanity] Dropped duplicate conditions value "${e}" for key "${t}"`);continue}n.add(e),r.push({value:e,title:N(i.title)??e,description:N(i.description)})}return r}function ae(e,t){if(!Array.isArray(e))throw Error(`Expected conditions to resolve to an array`);let n=new Set,r=[];for(let i of e){if(!f(i)||typeof i.name!=`string`){console.warn(`[sanity] Dropped invalid \`${t}\` entry: expected an object with a name string`);continue}let e=i.name.trim();if(j(e)){console.warn(`[sanity] Dropped invalid conditions key "${i.name}"`);continue}if(n.has(e)){console.warn(`[sanity] Dropped duplicate conditions key "${e}"`);continue}let a=ie(i.values,e);if(a.length===0){console.warn(`[sanity] Dropped conditions entry "${e}": no valid values`);continue}n.add(e),r.push({name:e,title:N(i.title)??e,description:N(i.description),values:a})}return r}var P=3e4,F={mode:`mapped`,status:`loading`},I={status:`loading`},L=()=>void 0,R=new WeakMap,z=0,B=new WeakMap,V=0;function H(e){let t=R.get(e);return t===void 0&&(t=z++,R.set(e,t)),t}function U(e,t){return`${H(e)}:${t.workspaceName}:${t.context.projectId}:${t.context.dataset}:${t.context.type}`}function W(e,t){return`${H(e)}:${t.workspaceName}:${t.context.projectId}:${t.context.dataset}`}function G(e,t){let n=B.get(e);return n===void 0&&(n=V++,B.set(e,n)),`static:${n}:${t}`}function K(e){return e instanceof Error?e:Error(String(e))}function q(e){return Error(`Expected \`beta.variants.types.${e}.conditions\` to include at least one valid entry`)}function J(e,t){let n=ae(e,`beta.variants.types.${t}.conditions`);if(n.length===0)throw q(t);return{mode:`mapped`,status:`ready`,definitions:n}}function oe(e,t){let n=K(e);return console.error(`[sanity] Invalid \`beta.variants.types.${t}.conditions\``,n),{mode:`mapped`,status:`error`,error:n}}function se(e,t,n){let r=K(e);return console.error(`[sanity] Failed to resolve \`beta.variants.types.${n}.conditions\``,r),{mode:`mapped`,status:`error`,error:r,retry:t}}function ce(e){return Array.isArray(e)||typeof e==`function`}function Y(e){if(f(e)&&Object.keys(e).length===0)return i();if(!f(e))throw Error(`Expected \`beta.variants.types\` to resolve to an object, but received ${p(e)}`);for(let[t,n]of Object.entries(e)){if(!c(t))throw Error(`Expected \`beta.variants.types\` keys to be lowercase identifiers, but received ${JSON.stringify(t)}`);if(d(t),!f(n))throw Error(`Expected \`beta.variants.types.${t}\` to be an object, but received ${p(n)}`);if(n.conditions!==void 0&&!ce(n.conditions))throw Error(`Expected \`beta.variants.types.${t}.conditions\` to be an array or a function`)}return e}function le(e,t,r){return b(()=>Promise.resolve(e(t))).pipe(n({first:P}),x(e=>J(e,t.type)),S(e=>C(se(e,r,t.type))),l(F))}var ue=a(function(e,t){let{context:n}=t,r=new _,i=()=>r.next();return r.pipe(l(void 0),y(()=>le(e,n,i)),v({bufferSize:1,refCount:!1}))},U),de=a(function(e,t){try{return C(J(e,t))}catch(e){return C(oe(e,t))}},G);function fe(e,t,n){return e===void 0?C({mode:`freeform`}):Array.isArray(e)?de(e,t.type):typeof e==`function`?ue(e,{context:t,workspaceName:n}):C({mode:`mappe
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{Ha as i,Hr as a,Ia as o,Ka as s,Ko as c,Qa as l,Sa as u,Uc as d,Uo as f,Va as p,Vr as m,_i as h,aa as g,ba as _,bl as v,el as y,ha as b,ja as x,jn as S,ma as C,qa as w,so as T,x as E}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as D,a as O,b as k,i as A,l as j,p as M,s as ee,w as N,x as te}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{t as P}from"./from-D9LOdazm.js";import{t as F}from"./useScheduledDraftMenuActions-Cn0nU-oE-CETpe1XB.js";import{Ft as I,Nt as L,dt as ne,ft as R,gt as re,lt as ie,p as ae,ut as oe}from"./dist-BOMXfkZi.js";import{t as se}from"./ChevronDown-BpYUc-AP.js";import{t as ce}from"./Calendar-DCYqUUNo.js";import{t as le}from"./ErrorOutline-Cl-3_nRG.js";import{t as ue}from"./EyeOpen-DOBSuUsK.js";import{t as de}from"./Add-CwQ5TpM8.js";import{t as fe}from"./Lock-Ui2f2sVi.js";import{_ as z,b as B,x as pe}from"./releases.telemetry-B5f7B-by-Big6UBEW.js";import{a as V,o as me}from"./useBundleDocuments-COX6yIJF--Mmq8r9n.js";import{t as H}from"./plugin-Cc1O7Ixm-Dk-6-U3N.js";import{r as U}from"./SingleDocReleaseUpsellProvider-6B58QoVy-Cr1fZ6ra.js";import{t as W}from"./plugin-CfnAN8IH-BsbRbVsz.js";import{f as G,l as K,n as q,r as J,t as Y}from"./navigation.telemetry-B8PhK1vB-BgS3_BQP.js";import{t as he}from"./ToneIcon-DgovBh2L-Cc0bZCsU.js";import{t as ge}from"./Sparkle-CUquRU1h.js";import{t as _e}from"./EyeClosed-BnY-JoVE.js";var X=e(t(),1),Z=r(),Q=n();function $(){let e=(0,Z.c)(3),t=a(),n=B(),r;return e[0]!==n||e[1]!==t?(r=e=>{let{variantId:r,perspective:i}=e;t.navigate({stickyParams:{variant:r?c(r):null,...i?{excludedPerspectives:null,perspective:z(i,n)}:{}}})},e[0]=n,e[1]=t,e[2]=r):r=e[2],r}var ve=e=>{let t=(0,Z.c)(29),{onCreateRelease:n}=e,{t:r}=D(),{createRelease:i}=V(),{checkWithPermissionGuard:a}=G(),s=K(),c;t[0]!==a||t[1]!==i||t[2]!==s?(c=P(a(i,s(o()))),t[0]=a,t[1]=i,t[2]=s,t[3]=c):c=t[3];let u=d(c),f=l().data.length,{releases:p}=v(),m=p?.limit??1/0,h=f>=m,g;t[4]===r?g=t[5]:(g=r(`release.action.create-new`),t[4]=r,t[5]=g);let _;t[6]!==n||t[7]!==g?(_={icon:de,onClick:n,"data-testid":`create-new-release-button`,text:g},t[6]=n,t[7]=g,t[8]=_):_=t[8];let y=_;if(h){let e;t[9]===r?e=t[10]:(e=r(`release.action.create-new`),t[9]=r,t[10]=e);let n;t[11]!==r||t[12]!==m?(n=r(`release.action.new-release.limit-reached`,{count:m}),t[11]=r,t[12]=m,t[13]=n):n=t[13];let i;t[14]===n?i=t[15]:(i={content:n},t[14]=n,t[15]=i);let a;return t[16]!==y||t[17]!==e||t[18]!==i?(a=(0,Q.jsx)(O,{...y,text:e,tooltipProps:i,disabled:!0}),t[16]=y,t[17]=e,t[18]=i,t[19]=a):a=t[19],a}if(!u){let e;t[20]===r?e=t[21]:(e=r(`release.action.permission.error`),t[20]=r,t[21]=e);let n;t[22]===e?n=t[23]:(n={content:e},t[22]=e,t[23]=n);let i;return t[24]!==y||t[25]!==n?(i=(0,Q.jsx)(O,{...y,tooltipProps:n,disabled:!0}),t[24]=y,t[25]=n,t[26]=i):i=t[26],i}let b;return t[27]===y?b=t[28]:(b=(0,Q.jsx)(O,{...y}),t[27]=y,t[28]=b),b};function ye(){let e=(0,Z.c)(2),{timeZone:t}=g(F),n;return e[0]===t.name?n=e[1]:(n=e=>x(e,t.name),e[0]=t.name,e[1]=n),n}var be=L`position:relative;cursor:default;&::before{content:'';position:absolute;display:block;inset:-4px;border-radius:9999px;}`;function xe(e){let t=(0,Z.c)(18),{children:n,text:r}=e,i=(0,X.useRef)(null),[a,o]=(0,X.useState)(null),[s,c]=(0,X.useState)(!1),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{if(!i.current)return;let e=i.current.offsetWidth;o(e)},t[0]=l):l=t[0];let u;t[1]===r?u=t[2]:(u=[r],t[1]=r,t[2]=u),(0,X.useLayoutEffect)(l,u);let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{c(!0)},t[3]=d):d=t[3];let f=d,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{c(!1)},t[4]=p):p=t[4];let m=p,h=a===null?`auto`:a,g=s?`hidden`:`visible`,_;t[5]!==h||t[6]!==g?(_={display:`inline-block`,width:h,overflow:g},t[5]=h,t[6]=g,t[7]=_):_=t[7];let v=a||`auto`,y;t[8]===v?y=t[9]:(y={width:v},t[8]=v,t[9]=y);let b;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(b={type:`spring`,bounce:0,duration:.3},t[10]=b):b=t[10];let x;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(x={display:`inline-block`,whiteSpace:`nowrap`,verticalAlign:`middle`},t[11]=x):x=t[11];let S;t[12]===n?S=t[13]:(S=(0,Q.jsx)(`div`,{ref:i,style:x,children:n}),t[12]=n,t[13]=S);let C;return t[14]!==S||t[15]!==_||t[16]!==y?(C=(0,Q.jsx)(N.div,{style:_,animate:y,transition:b,onAnimationStart:f,onAnimationComplete:m,children:S}),t[14]=S,t[15]=_,t[16]=y,t[17]=C):C=t[17],C}var Se={"--card-icon-color":`var(--card-badge-suggest-icon-color)`},Ce=(0,X.memo)(function(e){let t=(0,Z.c)(14),{bundle:n}=e,{t:r}=D(),i=pe(),{selectedPerspectiveName:a}=T(),o=a===n.id,s;t[0]===r?s=t[1]:(s=r(`version.agent-bundle.proposed-changes`),t[0]=r,t[1]=s);let c=s,l;t[2]!==n.id||t[3]!==i?(l=()=>i(n.id),t[2]=n.id,t[3]=i,t[4]=l):l=t[4];let u=l,d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(k,{flexBasis:`auto`,flexGrow:0,flexShrink:0,paddingX:3,paddingY:2,children:(0,Q.jsx)(RLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{Refractor as n,hasLanguage as r}from"./dist-BnDij-KK.js";var i=t(),a=e();function o(e){let t=(0,i.c)(5),{language:o,value:s}=e;if(!r(o)){let e;return t[0]===s?e=t[1]:(e=(0,a.jsx)(`code`,{children:s}),t[0]=s,t[1]=e),e}let c;return t[2]!==o||t[3]!==s?(c=(0,a.jsx)(n,{inline:!0,language:o,value:s}),t[2]=o,t[3]=s,t[4]=c):c=t[4],c}export{o as default};
|
||||
-1
@@ -1 +0,0 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{Refractor as n,hasLanguage as r}from"./dist-BnDij-KK.js";var i=e(),a=t();function o(e){let t=(0,a.c)(5),{language:o,value:s}=e;if(!r(o)){let e;return t[0]===s?e=t[1]:(e=(0,i.jsx)(`code`,{children:s}),t[0]=s,t[1]=e),e}let c;return t[2]!==o||t[3]!==s?(c=(0,i.jsx)(n,{inline:!0,language:o,value:s}),t[2]=o,t[3]=s,t[4]=c):c=t[4],c}export{o as default};
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function i(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function a(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function o(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}function c(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function l(e){return this instanceof l?(this.v=e,this):new l(e)}function u(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,f)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{u(r[e](t))}catch(e){p(a[0][3],e)}}function u(e){e.value instanceof l?Promise.resolve(e.value.v).then(d,f):p(a[0][2],e)}function d(e){c(`next`,e)}function f(e){c(`throw`,e)}function p(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function d(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof a==`function`?a(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function f(e){return typeof e==`function`}function p(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var m=p(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
|
||||
`+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
|
||||
`):``,this.name=`UnsubscriptionError`,this.errors=t}});function h(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var g=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s){if(this._parentage=null,Array.isArray(s))try{for(var l=a(s),u=l.next();!u.done;u=l.next())u.value.remove(this)}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}else s.remove(this)}var d=this.initialTeardown;if(f(d))try{d()}catch(e){i=e instanceof m?e.errors:[e]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var h=a(p),g=h.next();!g.done;g=h.next()){var _=g.value;try{y(_)}catch(e){i??=[],e instanceof m?i=c(c([],o(i)),o(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}if(i)throw new m(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)y(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&h(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&h(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),_=g.EMPTY;function v(e){return e instanceof g||e&&`closed`in e&&f(e.remove)&&f(e.add)&&f(e.unsubscribe)}function y(e){f(e)?e():e.unsubscribe()}var b={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},x={setTimeout:function(e,t){var n=[...arguments].slice(2),r=x.delegate;return r?.setTimeout?r.setTimeout.apply(r,c([e,t],o(n))):setTimeout.apply(void 0,c([e,t],o(n)))},clearTimeout:function(e){return(x.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function S(e){x.setTimeout(function(){var t=b.onUnhandledError;if(t)t(e);else throw e})}function C(){}var w=(function(){return D(`C`,void 0,void 0)})();function T(e){return D(`E`,void 0,e)}function E(e){return D(`N`,e,void 0)}function D(e,t,n){return{kind:e,value:t,error:n}}var O=null;function k(e){if(b.useDeprecatedSynchronousErrorHandling){var t=!O;if(t&&(O={errorThrown:!1,error:null}),e(),t){var n=O,r=n.errorThrown,i=n.error;if(O=null,r)throw i}}else e()}function A(e){b.useDeprecatedSynchronousErrorHandling&&O&&(O.errorThrown=!0,O.error=e)}var j=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,v(t)&&t.add(n)):n.destination=z,n}return n.create=function(e,t,n){return new F(e,t,n)},n.prototype.next=function(e){this.isStopped?R(E(e),this):this._next(e)},n.prototype.error=function(e){this.isStopped?R(T(e),this):(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped?R(w,this):(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(g),M=Function.prototype.bind;function N(e,t){return M.call(e,t)}var P=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){I(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){I(e)}else I(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){I(e)}},e}(),F=function(e){t(n,e);function n(t,n,r){var i=e.call(this)||this,a;if(f(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&b.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&N(t.next,o),error:t.error&&N(t.error,o),complete:t.complete&&N(t.complete,o)}):a=t}return i.destination=new P(a),i}return n}(j);function I(e){b.useDeprecatedSynchronousErrorHandling?A(e):S(e)}function L(e){throw e}function R(e,t){var n=b.onStoppedNotification;n&&x.setTimeout(function(){return n(e,t)})}var z={closed:!0,next:C,error:L,complete:C},B=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function V(e){return e}function H(){return U([...arguments])}function U(e){return e.length===0?V:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var W=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.s
Line truncated
|
||||
-1
@@ -1 +0,0 @@
|
||||
import{b as e,m as t,o as n}from"./Observable-BrARBsae.js";function r(e){return t(e?.lift)}function i(e){return function(t){if(r(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function a(e,t,n,r,i){return new o(e,t,n,r,i)}var o=function(t){e(n,t);function n(e,n,r,i,a,o){var s=t.call(this,e)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,s._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return n.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((e=this.onFinalize)==null||e.call(this))}},n}(n);export{i,a as n,r,o as t};
|
||||
@@ -1,196 +0,0 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/telemetryManager-UIEiMtC0-DMk2w9qd.js","static/logger-DAtJb5RQ-Y7uUAH66.js","static/Observable-BrARBsae.js","static/OperatorSubscriber-BASvuWFQ.js","static/from-D9LOdazm.js","static/map-UaEckSmz.js","static/dist-CXbg9KOR.js","static/Subject-UgBXjL8-.js","static/clientStore-BtE2-q2i-B38VED9C.js","static/rolldown-runtime-Dd_uD5pT.js","static/authStore-CtE9bLHW-D5dT_tdN.js","static/filter-C5fzbndz.js","static/stegaClean-BU_A08x3.js","static/preload-helper-Czpn1I53.js","static/browser-Cic9HASE.js","static/refractor-CC48DwHi-B34huZKn.js","static/jsx-runtime-BpzPEenQ.js","static/compiler-runtime-sKsOXjDo.js","static/dist-BnDij-KK.js","static/AccessDenied-PrzSvkgv.js","static/Activity-BzZJr7I2.js","static/AddCircle-BZjvWs4R.js","static/AddComment-DzLuhpXr.js","static/AddDocument-Ca_v8JdZ.js","static/Add-CwQ5TpM8.js","static/AddUser-CTyeR_e2.js","static/Api-BBIspMzg.js","static/Archive-CNM-Azpz.js","static/ArrowDown-CM5h1Tfl.js","static/ArrowLeft-x2OZCZTu.js","static/ArrowRight-D293IkFJ.js","static/ArrowTopRight-YjzSsA0g.js","static/sanity-CoxvCVZ8.js","static/lib-fMxT732z.js","static/_singletons-C3kYIdI9.js","static/BehaviorSubject-CugQrNFr.js","static/Tab-Dx6d0Ug4-B1PSmv4K.js","static/dist-BOMXfkZi.js","static/Spinner-Dk8hTAm3.js","static/Close-B_ZEgT1V.js","static/ChevronDown-BpYUc-AP.js","static/ToggleArrowRight-Ds3XaLpQ.js","static/Checkmark-OT7tsNpL.js","static/Remove-B96Rrnq-.js","static/ChevronRight-Cf6GkXSa.js","static/WorkspaceLoader-DppHZGrz-4nw6yzeL.js","static/SearchProvider-BoC91Z5A-C4CoG1BJ.js","static/lib-BUPHIzf9.js","static/resolveEditInfo-Cz-smq3a-CfSS_zkA.js","static/isRecord-Kfmt-nk--BGze3w87.js","static/draftUtils-D3HJGQaW-BnJ8Os95.js","static/WarningOutline-DOBjmorn.js","static/Clock-ClG7Ty9T.js","static/Search-QbUIQb6W.js","static/ErrorOutline-Cl-3_nRG.js","static/Trash-BxG6GrjH.js","static/Unknown-CEYtdaCK.js","static/CommandList-DJKGk0Iq-Dt5aZzT5.js","static/Sort-CFTgH29c.js","static/Controls-Dx7QJOxz.js","static/useScheduledDraftMenuActions-Cn0nU-oE-CETpe1XB.js","static/Calendar-DCYqUUNo.js","static/Edit-CAHlBqGT.js","static/Publish-BYF7r5nk.js","static/useBundleDocuments-COX6yIJF--Mmq8r9n.js","static/request-BhMuKj0D-CchCio66.js","static/Document-0Zpczu4q.js","static/ChevronLeft-BzE8YX6u.js","static/Image-BrMFkN0j.js","static/Link-Cl1VSeDJ.js","static/Ulist-CYD_2mDY.js","static/Copy-BTQgeMVP.js","static/Reset-CgCZnejz.js","static/BinaryDocument-D1GQsa0h.js","static/useComments-CVvkxQg3-CVUv-UC3.js","static/useAddonDataset-BvCgByG6-fdH-dSqr.js","static/useCommentsEnabled-BPc3788v-CjDVtXqh.js","static/releases.telemetry-B5f7B-by-Big6UBEW.js","static/plugin-Cc1O7Ixm-Dk-6-U3N.js","static/Unpublish-B0p_ZGt2.js","static/Revert-BmEXeO7H.js","static/ScheduledPublishingEnabledProvider-Bsqi_oGE-ifxCN0BN.js","static/validationUtils-BmZy4eyG-CdX1fJfy.js","static/plugin-CfnAN8IH-BsbRbVsz.js","static/SingleDocReleaseUpsellProvider-6B58QoVy-Cr1fZ6ra.js","static/CheckmarkCircle-B6SBY4QE.js","static/scheduleItem-DlZ2dANV-5erJqKQi.js","static/InfoOutline-BLtnjxbN.js","static/SchedulePublishingUpsellProvider-DEWq56BP-Cs5120Xl.js","static/plugin-Df5P0jUJ-BV5TdKPm.js","static/useTasksNavigation-CMv6pzvb-DUNxXR3l.js","static/useTasksEnabled-DBNZp6wF-C6IkIDac.js","static/i18n-wE_ar7lY-CIg8gZHf.js","static/ComposeSparkles-Dn7kooau.js","static/Undo-qtvfkxbn.js","static/Clipboard-BeSdPeHT.js","static/BlockContent-Bw8BGwBw.js","static/Number-CjvU0EcK.js","static/String-DHDsSmJ_.js","static/Unlink-MiIozO9s.js","static/Comment-CPMW8FMx.js","static/Task-DGtH1mzn.js","static/Bolt-CkliNuRS.js","static/EyeOpen-DOBSuUsK.js","static/Launch-DuEs-KHJ.js","static/Sync-B1MBhh7o.js","static/HelpCircle-8HZ3whUD.js","static/Documents-C8KrBFzU.js","static/Upload-ChJKE2jO.js","static/Lock-Ui2f2sVi.js","static/CommentsListItem-DwZqY9F--7eLKoeE7.js","static/LinkRemoved-LZtddC2J.js","static/buildTextSelectionFromFragment-DGgSjC7F-DWdaMBxz.js","static/useCommentsTelemetry-PyPsqrBr-DCqrQPLx.js","static/CommentsSelectedPathProvider-BpUQa6SK-BUkvAe53.js","static/useCommentsSelectedPath-D5HXM3NF-DGscP8oF.js","static/useStudioUrl-DaWT6DFg-C41SEEvP.js","static/RelativeTime-Dxz29E4j-CPrzVxaW.js","static/navigation.telemetry-B8PhK1vB-BgS3_BQP.js","static/EarthGlobe-Dqu4Dt_R.js","static/GlobalPerspectiveMenu-pECu-cdV-DxuNOpED.js","static/ToneIcon-DgovBh2L-Cc0bZCsU.js","static/Sparkle-CUquRU1h.js","static/EyeClosed-BnY-JoVE.js","static/useReleasesToolAvailable-CO-nywsk-CUFWvAZp.js","static/schedules-6ZvpdVC8-DDoGp6dg.js","static/AddonDatasetProvider-C26Rc0B9-BQLPb_HX.js","static/UpsellPanel-BzCgrrZO-BKE9DmdX.js","static/useDocumentPreviewValues-Df5XHGi_-HMtAXFMO.js","static/Feedback-CkbzKydh.js","static/FaceHappy-1ocsUhoA.js","static/FaceIndifferent-CIPzkDxf.js","static/FaceSad-lhl7n__s.js","static/Unlock-B4_-ahLp.js","static/Menu-BoI111KG.js","static/Leave-_nWak6QB.js","static/Cog-0goaM-Or.js","static/Users-BDbacX-A.js","static/Bug-CFB9Jubh.js","static/Github-BTBOp21P.js","statiLine truncated
|
||||
import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{B as n,C as r,D as i,E as a,Et as o,G as s,Gt as c,It as l,J as u,Jt as d,Kt as f,L as p,Mt as m,N as h,Nt as g,O as _,Ot as v,P as y,R as b,S as x,U as S,V as C,W as w,Wt as T,X as E,Xt as D,Zt as O,a as k,at as A,bt as j,c as M,ct as N,d as P,dt as F,ft as I,i as L,it as R,k as z,l as B,lt as V,mt as H,o as U,ot as W,pt as ee,rt as te,st as ne,t as re,u as ie,ut as ae,x as oe,xt as se,yt as ce,z as le}from"./_singletons-C3kYIdI9.js";import{n as ue,t as de}from"./jsx-runtime-BpzPEenQ.js";import{t as fe}from"./compiler-runtime-sKsOXjDo.js";import{A as pe,C as me,D as he,E as ge,F as _e,I as ve,N as G,O as ye,P as be,T as xe,_ as Se,a as Ce,b as K,c as we,d as Te,f as Ee,g as De,h as Oe,i as ke,k as Ae,l as je,m as Me,n as Ne,o as Pe,p as Fe,s as Ie,t as Le,v as Re,w as ze,x as Be,y as Ve}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{S as He,T as Ue,b as We,c as Ge,d as Ke,f as qe,h as Je,m as Ye,n as Xe,p as Ze,r as Qe,t as $e,w as et}from"./Observable-BrARBsae.js";import{i as tt,n as nt,r as rt,t as it}from"./OperatorSubscriber-BASvuWFQ.js";import{t as at}from"./Subject-UgBXjL8-.js";import{t as ot}from"./BehaviorSubject-CugQrNFr.js";import{$ as st,B as ct,C as lt,D as ut,E as dt,F as ft,G as pt,H as mt,I as ht,J as gt,K as _t,L as vt,M as yt,N as bt,O as xt,P as St,Q as Ct,R as wt,S as Tt,T as Et,U as Dt,V as Ot,W as kt,X as At,Y as jt,Z as Mt,_ as Nt,a as Pt,b as Ft,d as It,et as Lt,f as Rt,g as zt,h as eee,j as Bt,k as Vt,l as Ht,n as Ut,o as Wt,p as Gt,q as Kt,r as qt,s as Jt,t as Yt,tt as Xt,u as Zt,v as Qt,w as $t,x as en,y as tn,z as nn}from"./authStore-CtE9bLHW-D5dT_tdN.js";import{_ as rn,a as an,b as on,h as sn,i as cn,l as ln,m as un,o as dn,s as fn,t as pn,v as mn}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{a as hn,n as gn,o as _n,t as vn}from"./from-D9LOdazm.js";import{n as yn,t as q}from"./map-UaEckSmz.js";import{n as bn,t as xn}from"./filter-C5fzbndz.js";import{a as Sn,c as Cn,i as wn,o as Tn,r as En,s as Dn}from"./dist-CXbg9KOR.js";import{t as On}from"./preload-helper-Czpn1I53.js";import{a as kn,i as An,n as jn,r as Mn}from"./clientStore-BtE2-q2i-B38VED9C.js";import{A as Nn,B as Pn,C as Fn,D as In,E as Ln,I as Rn,L as zn,M as Bn,N as Vn,O as Hn,R as Un,S as Wn,T as Gn,a as Kn,b as qn,c as Jn,d as Yn,f as Xn,g as Zn,h as Qn,i as $n,j as er,k as tr,l as nr,m as rr,o as ir,p as ar,s as or,u as sr,v as tee,w as cr,x as lr,y as ur,z as dr}from"./lib-BUPHIzf9.js";import{$ as fr,A as pr,At as mr,Bt as hr,C as gr,D as _r,Dt as vr,Et as yr,F as br,Ft as J,Ht as xr,It as Sr,J as Cr,K as wr,Lt as Tr,M as Er,Mt as Dr,N as Or,Nt as kr,O as Ar,Ot as jr,Pt as Mr,Q as Nr,S as Pr,St as Fr,Tt as Ir,Ut as Lr,V as Rr,Vt as zr,W as Br,X as Vr,Y as Hr,Z as Ur,_ as Wr,_t as Gr,a as Kr,b as qr,c as Jr,ct as Yr,dt as Xr,et as Zr,f as Qr,ft as Y,g as $r,gt as ei,h as ti,ht as ni,i as ri,it as ii,k as ai,lt as oi,m as si,mt as ci,n as li,nt as ui,o as di,pt as fi,r as pi,s as mi,st as hi,t as gi,u as _i,ut as vi,v as yi,wt as bi,xt as xi,y as Si,yt as Ci,zt as wi}from"./dist-BOMXfkZi.js";import{a as Ti,c as Ei,i as Di,l as Oi,o as ki,r as Ai,s as ji}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import{a as Mi,c as Ni,i as Pi,n as Fi,o as Ii,r as Li,s as Ri,t as zi}from"./draftUtils-D3HJGQaW-BnJ8Os95.js";import{t as Bi}from"./WarningOutline-DOBjmorn.js";import{t as Vi}from"./Spinner-Dk8hTAm3.js";import{t as Hi}from"./Close-B_ZEgT1V.js";import{c as Ui,d as Wi,t as Gi}from"./request-BhMuKj0D-CchCio66.js";import{t as Ki}from"./dist-Z8cIRxoB-BxEClkut.js";import{t as qi}from"./ChevronDown-BpYUc-AP.js";import{t as Ji}from"./ToggleArrowRight-Ds3XaLpQ.js";import{t as Yi}from"./Checkmark-OT7tsNpL.js";import{t as Xi}from"./ChevronRight-Cf6GkXSa.js";import{t as Zi}from"./Document-0Zpczu4q.js";import{t as Qi}from"./Bolt-CkliNuRS.js";import{t as $i}from"./Clock-ClG7Ty9T.js";import{t as ea}from"./Dot-D4h2WemU.js";import{t as ta}from"./Calendar-DCYqUUNo.js";import{t as na}from"./Search-QbUIQb6W.js";import{t as ra}from"./ChevronLeft-BzE8YX6u.js";import{t as ia}from"./EarthGlobe-Dqu4Dt_R.js";import{t as aa}from"./ErrorOutline-Cl-3_nRG.js";import{t as oa}from"./InfoOutline-BLtnjxbN.js";import{t as sa}from"./EllipsisHorizontal-BuWLk1Hy.js";import{t as ca}from"./EarthAmericas-DLWVWv9X.js";import{t as la}from"./ArrowLeft-x2OZCZTu.js";import{t as ua}from"./ArrowRight-D293IkFJ.js";import{t as da}from"./AddCircle-BZjvWs4R.js";import{t as fa}from"./Circle-DkcW-8WT.js";import{t as pa}from"./Edit-CAHlBqGT.js";import{t as ma}from"./Publish-BYF7r5nk.js";import{t as ha}from"./Timeline-X-VaErdm.js";import{t as ga}from"./Trash-BxG6GrjH.js";import{t as _a}from"./Unpublish-B0p_ZGt2.js";import{t as va}from"./ArrowDown-CM5h1Tfl.js";import{t as ya}from"./Revert-BmEXeO7H.js";import{t as ba}from"./Image-BrMFkN0j.js";import{t as xa}from"./BulbOutline-BN--Ec2H.js";import{t as Sa}from"./Unknown-CEYtdaCK.js";import{t as Ca}from"./EyeOpen-DOBSuUsK.js";import{t as wa}from"./Link-Cl1VSeDJ.js";import{t as Ta}from"Line truncated
|
||||
- ${n.map(e=>e.error.message).join(`
|
||||
- `)}`);return e}),cd=(0,Yu.make)(e=>{dd(e),fd(e)}),ld=(0,Yu.make)(e=>{dd(e),md(e)}),ud=(0,Yu.make)(e=>{dd(e),pd(e)});function dd(e){if(e.length===0)throw Error(`Must be a non-empty string`);if(!Zu.test(e))throw Error(`Not a valid document ID: "${e}" \u2013 Must match the ${Zu} RegExp`);return e}function fd(e){if(!e.startsWith(td))throw Error(`Not a valid draft ID: "${e}" \u2013 must start with "${td}"`);if(e.length===td.length)throw Error(`Not a valid draft ID: "${e}" \u2013 must have at least one character followed by "${td}"`);return e}function pd(e){if(!e.startsWith(nd))throw Error(`Not a valid version ID: "${e}" \u2013 must start with "${nd}"`);if(e.length===nd.length)throw Error(`Not a valid version ID: "${e}" \u2013 must have at least one character followed by "${nd}"`);let[,t,...n]=e.split(`.`);if(!t||!Zu.test(t))throw Error(`Not a valid version ID: "${e}" \u2013 VERSION must match the ${Zu} RegExp in versions.[VERSION].id`);if(n.length===0)throw Error(`Not a valid version ID: "${e}" \u2013 missing document ID in versions.bundle.[ID]`);if(t===`drafts`||t===`versions`)throw Error(`Not a valid version ID: "${e}" \u2013 invalid VERSION "${t}" in versions.[VERSION].id`);return e}function md(e){if(e.startsWith(td)||e.startsWith(nd))throw Error(`Not a valid published ID: "${e}" \u2013 cannot start with "${td}" or "${nd}"`);return e}function hd(e){return e.startsWith(td)}function gd(e){return!hd(e)&&!_d(e)}function _d(e){return e.startsWith(nd)}function vd(e){if(hd(e))return ld(e.slice(td.length));if(_d(e)){let[,,...t]=e.split(ed);return ld(t.join(ed))}return e}function yd(e){if(_d(e)){let[,,...t]=e.split(ed);return cd(td+t.join(ed))}return gd(e)?cd(td+e):e}function bd(e,t){return _d(e)||hd(e)?bd(vd(e),t):ud(nd+t+ed+e)}function xd(e){let[,t]=e.split(ed);return t}function Sd({values:e,fallback:t,validator:n}){let r=0;function i(n=0){return e[r+n]??t}function a(e){let t=i();return typeof e<`u`&&n(e,t,r),r++,t}function o(){return r<e.length}return Object.defineProperty(i,"position",{get:()=>r}),Object.assign(i,{hasNext:o,consume:a})}function Cd(e){return wd(Sd({values:e,fallback:``,validator:(e,t,n)=>{if(typeof e==`string`&&e!==t)throw SyntaxError(`Expected \`${e}\` at position ${n}${t?` but got \`${t}\` instead`:``}`);if(e instanceof RegExp&&!e.test(t))throw SyntaxError(`Expected character \`${t}\` at position ${n} to match ${e}`)}}))}function wd(e){let t=[];for(;e.hasNext();){let n=e(),r=e.position;if(/\s/.test(n)){e.consume();continue}switch(n){case`"`:t.push(Td(e));continue;case`'`:t.push(nee(e));continue;case`[`:case`]`:case`,`:case`:`:case`?`:case`*`:e.consume(),t.push({type:n,position:r});continue;case`$`:case`@`:if(/[a-zA-Z_$]/.test(e(1))){t.push(ree(e));continue}e.consume(),t.push({type:`This`,position:r});continue;case`.`:if(e.consume(),e()===`.`){e.consume(),t.push({type:`..`,position:r});continue}t.push({type:`.`,position:r});continue;case`=`:case`!`:case`>`:case`<`:t.push(Od(e));continue;default:if(/[0-9]/.test(n)||n===`-`&&/[0-9]/.test(e(1))){t.push(kd(e));continue}if(/[a-zA-Z_$]/.test(n)){t.push(Ed(e));continue}throw Error(`Unexpected character '${n}' at position ${r}`)}}return t.push({type:`EOF`,position:e.position}),t}function Td(e){let t=e.position,n=``;for(e.consume(`"`);e.hasNext()&&e()!==`"`;)e()===`\\`?n+=Dd(e):n+=e.consume();return e.consume(`"`),{type:`String`,value:n,position:t}}function nee(e){let t=e.position,n=``;for(e.consume(`'`);e.hasNext()&&e()!==`'`;)e()===`\\`?n+=Dd(e):n+=e.consume();return e.consume(`'`),{type:`Identifier`,value:n,position:t}}function ree(e){let t=e.position,n=``;for(n+=e.consume(/[a-zA-Z_$]/);/[a-zA-Z0-9_$]/.test(e());)n+=e.consume();return{type:`Identifier`,value:n,position:t}}function Ed(e){let t=e.position,n=``;for(n+=e.consume(/[a-zA-Z_$]/);/[a-zA-Z0-9_$]/.test(e());)n+=e.consume();return n===`null`?{type:`Null`,position:t}:n===`true`?{type:`Boolean`,value:!0,position:t}:n===`false`?{type:`Boolean`,value:!1,position:t}:{type:`Identifier`,value:n,position:t}}function Dd(e){e.consume(`\\`);let t=e.consume();switch(t){case`"`:case`'`:case`\\`:case`/`:return t;case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
|
||||
`;case`r`:return`\r`;case`t`:return` `;case`u`:{let t=``;for(let n=0;n<4;n++)t+=e.consume(/[0-9a-fA-F]/);return String.fromCharCode(parseInt(t,16))}default:throw Error(`Invalid escape sequence \\${t} at position ${e.position-1}`)}}function Od(e){let t=e.position,n=e(),r=e(1);if(n===`=`&&r===`=`)return e.consume(),e.consume(),{type:`Operator`,value:`==`,position:t};if(n===`!`&&r===`=`)return e.consume(),e.consume(),{type:`Operator`,value:`!=`,position:t};if(n===`>`&&r===`=`)return e.consume(),e.consume(),{type:`Operator`,value:`>=`,position:t};if(n===`<`&&r===`=`)return e.consume(),e.consume(),{type:`Operator`,value:`<=`,position:t};if(n===`>`)return e.consume(),{type:`Operator`,value:`>`,position:t};if(n===`<`)return e.consume(),{type:`Operator`,value:`<`,position:t};throw SyntaxError(`Invalid operator at position ${t}`)}function kd(e){let t=e.position,n=``;for(e()===`-`&&(n+=e.consume());/[0-9]/.test(e());)n+=e.consume();if(e()===`.`&&/[0-9]/.test(e(1)))for(n+=e.consume();/[0-9]/.test(e());)n+=e.consume();return{type:`Number`,value:parseFloat(n),position:t}}var Ad=class extends SyntaxError{constructor(e,t){super(t?`Expected ${t} at position ${e.position} but got ${e.type} instead`:`Unexpected token ${e.type} at position ${e.position}`)}};function jd(e){let t=Cd(e);if(t.length<=1)throw SyntaxError(`Empty expression`);let n=t.at(-1);if(n.type!==`EOF`)throw new Ad(n);let r=Sd({values:t,fallback:n,validator:(e,t)=>{if(t.type!==e)throw new Ad(t,e)}}),i=Md(r);return r.consume(`EOF`),i}function Md(e){switch(e().type){case`This`:case`Identifier`:case`*`:case`[`:case`.`:case`..`:return Nd(e);case`String`:{let{value:t}=e.consume(`String`);return{type:`String`,value:t}}case`Number`:{let{value:t}=e.consume(`Number`);return{type:`Number`,value:t}}case`Boolean`:{let{value:t}=e.consume(`Boolean`);return{type:`Boolean`,value:t}}case`Null`:return e.consume(`Null`),{type:`Null`};default:throw new Ad(e())}}function Nd(e){let t;if(e().type===`.`||e().type===`..`){let n=e().type===`..`;if(e.consume(),e().type===`EOF`||e().type===`]`||e().type===`,`){if(n)t={type:`Path`,base:{type:`Path`,segment:{type:`This`}},recursive:n,segment:{type:`Wildcard`}};else throw new Ad(e(),`Path Segment`)}else t={type:`Path`,base:{type:`Path`,segment:{type:`This`}},recursive:n,segment:Pd(e)}}else t={type:`Path`,segment:Pd(e)};for(;;){if(e().type===`[`){let n=Fd(e);t={type:`Path`,base:t,recursive:!1,segment:n};continue}if(e().type===`.`||e().type===`..`){let n=e().type===`..`;e.consume();let r=Pd(e);t={type:`Path`,base:t,recursive:n,segment:r};continue}break}return t}function Pd(e){let t=e();if(t.type===`This`)return e.consume(),{type:`This`};if(t.type===`Identifier`)return e.consume(),{type:`Identifier`,name:t.value};if(t.type===`*`)return e.consume(),{type:`Wildcard`};if(t.type===`[`)return Fd(e);throw new Ad(t,`Path Segment`)}function Fd(e){let t=[];for(e.consume(`[`),t.push(Id(e));e().type===`,`;)e.consume(),t.push(Id(e));return e.consume(`]`),{type:`Subscript`,elements:t}}function Id(e){if(e().type===`:`||e().type===`Number`)return Ld(e);let t=Md(e);if(e().type===`Operator`){let{value:n}=e.consume(`Operator`);return{type:`Comparison`,left:t,operator:n,right:Md(e)}}return e().type===`?`&&t.type===`Path`?(e.consume(),{type:`Existence`,base:t}):t}function Ld(e){if(e().type===`Number`){let{value:t}=e.consume(`Number`);if(e().type===`:`){if(e.consume(),e().type===`Number`){let{value:n}=e.consume(`Number`);return{type:`Slice`,start:t,end:n}}return{type:`Slice`,start:t}}return{type:`Number`,value:t}}if(e().type===`:`){if(e.consume(),e().type===`Number`){let{value:t}=e.consume(`Number`);return{type:`Slice`,end:t}}return{type:`Path`,segment:{type:`Wildcard`}}}throw new Ad(e(),`Number or Slice`)}function Rd(e){switch(e.type){case`String`:case`Number`:case`Boolean`:return JSON.stringify(e.value);case`Path`:return zd(e);case`Null`:return`null`;default:throw Error(`Unknown node type: ${e.type}`)}}function zd(e){if(!e)return``;let t=zd(e.base),n=Bd(e.segment);return e.recursive?`${t}..${n}`:t?n.startsWith(`[`)?`${t}${n}`:`${t}.${n}`:n}function Bd(e){switch(e.type){case`This`:return`@`;case`Wildcard`:return`*`;case`Subscript`:return`[${e.elements.map(Hd).join(`,`)}]`;case`Identifier`:return/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(e.name)?e.name:Vd(e.name);default:throw Error(`Unknown segment type: ${e.type}`)}}function Vd(e){return`'${JSON.stringify(e).slice(1,-1).replace(/'/g,`\\'`).replace(/\\"/g,`"`)}'`}function Hd(e){switch(e.type){case`Slice`:return`${e.start??``}:${e.end??``}`;case`Comparison`:return`${Rd(e.left)}${e.operator}${Rd(e.right)}`;case`Existence`:return`${zd(e.base)}?`;case`String`:case`Number`:case`Boolean`:case`Null`:case`Path`:return Rd(e);default:throw Error(`Unknown subscript element type: ${e.type}`)}}var Ud=`key:`,Wd=`field:`,Gd=`index:`;function Kd(){let e=new Map;function t(e){return Yd(e)?`${Ud}${e._key}`:typeof e==`string`?`${Wd}${e}`:`${Gd}${e}`}function n(e,[r,...i]){if(typeof r>`u`)return;let a=t(r);if(!i.length){e.set(a,!0);return}l
Line truncated
|
||||
_createdAt,
|
||||
_id,
|
||||
_rev,
|
||||
authorId,
|
||||
contentSnapshot,
|
||||
context,
|
||||
lastEditedAt,
|
||||
message,
|
||||
parentCommentId,
|
||||
reactions,
|
||||
status,
|
||||
target,
|
||||
threadId
|
||||
} | order(_createdAt desc)`}function op(e){return`*[${ip(e)}]`}function sp(e){if(!lt(e))throw Error(`Comments are only supported for dataset resources, received: ${JSON.stringify(e)}`);return e}function cp(e){if(typeof e!=`object`||!e||!(`statusCode`in e))return!1;let{statusCode:t}=e;return t===403||t===404}function lp(e,{projectId:t,dataset:n}){return e.observable.request({uri:`/projects/${t}/datasets?datasetProfile=comments&addonFor=${n}`,tag:`comments.addon-dataset.list`}).pipe(q(e=>e?.[0]?.name))}function up(e,t){return Mn(e,{apiVersion:tp,projectId:t.projectId,useProjectHostname:!0}).observable.pipe(yt(e=>lp(e,t).pipe(dn(e=>cp(e)?sn(void 0):on))))}async function dp(e,t){let n=await bn(Mn(e,{apiVersion:tp,projectId:t.projectId,useProjectHostname:!0}).observable.pipe(Hs(1)));try{return await bn(lp(n,t))}catch(e){if(cp(e))return;throw e}}var fp=en({name:`CommentsAddonDataset`,getInitialState:()=>({status:`unknown`}),initialize:({instance:e,state:t,key:n})=>{let r=up(e,sp(n.resource)).subscribe(e=>t.set(`setAddonDataset`,e?{status:`resolved`,datasetName:e}:{status:`missing`}));return()=>r.unsubscribe()}}),pp=Nt(fp,Ft(({state:e})=>{if(e.status!==`unknown`)return e.datasetName??null})),mp=Nt(fp,({instance:e,state:t,key:n})=>{let r=t.get();if(r.datasetName)return Promise.resolve(r.datasetName);if(r.provisioning)return r.provisioning;let i=sp(n.resource),a=(async()=>{let t=await dp(e,i);if(t)return t;let n=await jn(e,{apiVersion:tp,projectId:i.projectId,useProjectHostname:!0}).request({uri:`/comments/${i.dataset}/setup`,method:`POST`,tag:`comments.addon-dataset.setup`});if(!n?.datasetName)throw Error(`Creating the comments addon dataset returned no dataset name.`);return n.datasetName})().then(e=>(t.set(`setAddonDataset`,{status:`resolved`,datasetName:e,provisioning:void 0}),e)).catch(e=>{throw t.set(`clearProvisioning`,{provisioning:void 0}),e});return t.set(`startProvisioning`,{provisioning:a}),a}),hp=Nt(fp,({instance:e,key:t})=>{let{projectId:n}=sp(t.resource);return pp(e,{resource:t.resource}).observable.pipe(wt(),xn(e=>e!==void 0),yt(t=>typeof t==`string`?Mn(e,{apiVersion:ep,projectId:n,dataset:t}).observable:sn(null)))}),gp=/\.(true|false|null)(?=$|[.[])/g,_p=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^"']+/g;function vp(e){return e.replace(_p,e=>e.startsWith(`"`)||e.startsWith(`'`)?e:e.replace(gp,`["$1"]`))}function yp(e){return vp(Xd(e))}function bp(e){let t=new Map;for(let n of e){if(!n.parentCommentId)continue;let e=t.get(n.parentCommentId);e?e.push(n):t.set(n.parentCommentId,[n])}let n=[];for(let r of e){if(r.parentCommentId)continue;let e=(t.get(r.id)??[]).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),i=e[e.length-1];n.push({threadId:r.threadId,fieldPath:r.fieldPath,parentComment:r,replies:e,commentsCount:e.length+1,status:r.status,lastActivityAt:i?i.createdAt:r.createdAt})}return n}function xp(e){let{target:t}=e;return{id:e._id,createdAt:e._createdAt,...e.authorId?{authorId:e.authorId}:{},message:e.message,threadId:e.threadId,...e.parentCommentId?{parentCommentId:e.parentCommentId}:{},status:e.status,...e.lastEditedAt?{lastEditedAt:e.lastEditedAt}:{},documentId:t.document._ref,documentType:t.documentType,fieldPath:t.path?.field??``,...t.path?.selection?{selection:t.path.selection}:{},...e.contentSnapshot===void 0?{}:{contentSnapshot:e.contentSnapshot},reactions:(e.reactions??[]).map(({shortName:e,userId:t,addedAt:n})=>({shortName:e,userId:t,addedAt:n})),...e._state?{state:e._state}:{}}}function Sp(e){if(e.type===`mutation`){if(e.transition===`disappear`)return{type:`disappear`,commentId:e.documentId};if(e.result)return e.transition===`appear`?{type:`appear`,comment:e.result}:{type:`update`,comment:e.result,transactionId:e.transactionId}}}function Cp(e){let{client:t,documentId:n,documentVersionId:r}=e,i={documentId:n,...r?{documentVersionId:r}:{}},a=t.observable.listen(op(r),i,rp).pipe(ft()),o=a.pipe(q(Sp),xn(e=>e!==void 0));return a.pipe(xn(e=>e.type===`welcome`),yt(()=>new $e(e=>{let n=[],a=!1,s=o.subscribe({next:t=>{a?e.next(t):n.push(t)},error:t=>e.error(t)}),c=t.observable.fetch(ap(r),i,{tag:`comments.list`}).pipe(Hs(1)).subscribe({next:t=>{e.next({type:`snapshot`,comments:t}),a=!0;for(let t of n)e.next(t);n.length=0},error:t=>{e.next({type:`error`,error:t}),e.complete()}});return()=>{s.unsubscribe(),c.unsubscribe(),n.length=0}})))}function wp({documentId:e,documentVersionId:t}){return JSON.stringify([e,t??null])}function Tp(e){let[t,n]=JSON.parse(e);return{documentId:t,...n?{documentVersionId:n}:{}}}var Ep=(e,t)=>n=>{let r=n.entries[e],i=[...r?.subscribers??[],t];return{...n,entries:{...n.entries,[e]:{...r,subscribers:i}}}},Dp=(e,t)=>n=>{let r=n.entries[e];if(!r)return n;let i=r.subscribers.filter(e=>e!==t);if(!i.length){let t={...n.pendingCreates},i={...n.pendingTransactions};for(let e of Object.keys(r.comments??{}))delete t[e],delete i[e];return{...n,entries:kn(n.entries,e),pendingCreates:t,pendingTransactions:i}}return{...n,entries:{...n.entries,[e]:{...r,subscribers:i}}}},Op=(e,t)=>n=>{
Line truncated
|
||||
`,i),o===-1&&(o=e.length-1);let c=e.slice(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s===a&&(c=e.slice(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}let a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}}function Sre(e,t,n){let r=e,i=t,a=xre(r,i);r=a.chars1,i=a.chars2;let o=a.lineArray,s=Dg(r,i,{checkLines:!1,deadline:n.deadline});bre(s,o),s=jg(s),s.push([0,``]);let c=0,l=0,u=0,d=``,f=``;for(;c<s.length;){switch(s[c][0]){case 1:u++,f+=s[c][1];break;case-1:l++,d+=s[c][1];break;case 0:if(l>=1&&u>=1){s.splice(c-l-u,l+u),c=c-l-u;let e=Dg(d,f,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)s.splice(c,0,e[t]);c+=e.length}u=0,l=0,d=``,f=``;break;default:throw Error(`Unknown diff operation.`)}c++}return s.pop(),s}function Cre(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,a=e.length>t.length?t:e,o=i.indexOf(a);if(o!==-1)return r=[[1,i.substring(0,o)],[0,a],[1,i.substring(o+a.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(a.length===1)return[[-1,e],[1,t]];let s=yre(e,t);if(s){let e=s[0],t=s[1],r=s[2],i=s[3],a=s[4],o=Dg(e,r,n),c=Dg(t,i,n);return o.concat([[0,a]],c)}return n.checkLines&&e.length>100&&t.length>100?Sre(e,t,n):vre(e,t,n.deadline)}var wre=Object.defineProperty,wg=Object.getOwnPropertySymbols,Tre=Object.prototype.hasOwnProperty,Ere=Object.prototype.propertyIsEnumerable,Tg=(e,t,n)=>t in e?wre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dre=(e,t)=>{for(var n in t||={})Tre.call(t,n)&&Tg(e,n,t[n]);if(wg)for(var n of wg(t))Ere.call(t,n)&&Tg(e,n,t[n]);return e};function Eg(e,t,n){if(e===null||t===null)throw Error(`Null input. (diff)`);let r=Dg(e,t,kre(n||{}));return jre(r),r}function Dg(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let a=yg(r,i),o=r.substring(0,a);r=r.substring(a),i=i.substring(a),a=bg(r,i);let s=r.substring(r.length-a);r=r.substring(0,r.length-a),i=i.substring(0,i.length-a);let c=Cre(r,i,n);return o&&c.unshift([0,o]),s&&c.push([0,s]),c=Ig(c),c}function Ore(e){let t=1;return typeof e<`u`&&(t=e<=0?Number.MAX_VALUE:e),Date.now()+t*1e3}function kre(e){return Dre({checkLines:!0,deadline:Ore(e.timeout||1)},e)}function Og(e,t,n){return n===1?e+t:t+e}function kg(e,t){return t===1?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function Are(e,t,n,r){return r===1?e[t][1][e[t][1].length-1]===e[n][1][e[n][1].length-1]:e[t][1][0]===e[n][1][0]}function Ag(e,t,n){let r=n===1?-1:1,i=null,a=null,o=t+n;for(;o>=0&&o<e.length&&(i===null||a===null);o+=n){let[s,c]=e[o];if(c.length!==0){if(s===1){i===null&&(i=o);continue}if(s===-1){a===null&&(a=o);continue}if(s===0){if(i===null&&a===null){let[i,a]=kg(e[t][1],n);e[t][1]=i,e[o][1]=Og(e[o][1],a,r);return}break}}}if(i!==null&&a!==null&&Are(e,i,a,n)){let[o,s]=kg(e[i][1],r),[c]=kg(e[a][1],r);e[i][1]=o,e[a][1]=c,e[t][1]=Og(e[t][1],s,n);return}let[s,c]=kg(e[t][1],n);e[t][1]=s,i===null?(e.splice(o,0,[1,c]),a!==null&&a>=o&&a++):e[i][1]=Og(e[i][1],c,r),a===null?e.splice(o,0,[-1,c]):e[a][1]=Og(e[a][1],c,r)}function jre(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(r.length===0)continue;let i=r[0],a=r[r.length-1];_re(a)&&n===0&&Ag(e,t,1),xg(i)&&n===0&&Ag(e,t,-1)}for(let t=0;t<e.length;t++)e[t][1].length===0&&e.splice(t,1)}function jg(e){let t=e.map(e=>_g(e)),n=!1,r=[],i=0,a=null,o=0,s=0,c=0,l=0,u=0;for(;o<t.length;)t[o][0]===0?(r[i++]=o,s=l,c=u,l=0,u=0,a=t[o][1]):(t[o][0]===1?l+=t[o][1].length:u+=t[o][1].length,a&&a.length<=Math.max(s,c)&&a.length<=Math.max(l,u)&&(t.splice(r[i-1],0,[-1,a]),t[r[i-1]+1][0]=1,i--,i--,o=i>0?r[i-1]:-1,s=0,c=0,l=0,u=0,a=null,n=!0)),o++;for(n&&(t=Ig(t)),t=Fg(t),o=1;o<t.length;){if(t[o-1][0]===-1&&t[o][0]===1){let e=t[o-1][1],n=t[o][1],r=vg(e,n),i=vg(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(o,0,[0,n.substring(0,r)]),t[o-1][1]=e.substring(0,e.length-r),t[o+1][1]=n.substring(r),o++):(i>=e.length/2||i>=n.length/2)&&(t.splice(o,0,[0,e.substring(0,i)]),t[o-1][0]=1,t[o-1][1]=n.substring(0,n.length-i),t[o+1][0]=-1,t[o+1][1]=e.substring(i),o++),o++}o++}return t}var Mg=/[^a-zA-Z0-9]/,Ng=/\s/,Pg=/[\r\n]/,Mre=/\n\r?\n$/,Nre=/^\r?\n\r?\n/;function Fg(e){let t=e.map(e=>_g(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(Mg),a=r.match(Mg),o=i&&n.match(Ng),s=a&&r.match(Ng),c=o&&n.match(Pg),l=s&&r.match(Pg),u=c&&e.match(Mre),d=l&&t.match(Nre);return u||d?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}let r=1;for(;r<t.length-1;){if(t[r-1][0]===0&&t[r+1][0]===0){let e=t[r-1][1],i=t[r][1],a=t[r+1][1],o=bg(e,i);if(o){let t=i.substring(i.length-o);e=e.substring(0,e.length-o),i=t+i.substring(0,i.length-o),a=t+a}let s=e,c=i,l=a,u=n(e,i)+n(i,a);for(;i.charAt(0)===a.charAt(0);){e+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);let t=n(e,i)+n(i,a);t>=u&&(u=t,s=e,c=i,l=a)}t[r-1][1]!==s&&(s?t[r-1][1]=s:(t.splice(r-1,1),r--),t[r][1]=c,l?t[r+1][1]=l:(t.splice(r+1,1),r--))}r++}return t}function Ig(e){let t=e.map(e=>_g(e));t.push([0,``]);let n=0,
Line truncated
|
||||
`),r=0;for(;r<n.length;){let e=n[r].match(rie);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=Ug($g(e[1]),$g(e[3]));for(t.push(i),e[2]===``?(i.start1--,i.utf8Start1--,i.length1=1,i.utf8Length1=1):e[2]===`0`?(i.length1=0,i.utf8Length1=0):(i.start1--,i.utf8Start1--,i.utf8Length1=$g(e[2]),i.length1=i.utf8Length1),e[4]===``?(i.start2--,i.utf8Start2--,i.length2=1,i.utf8Length2=1):e[4]===`0`?(i.length2=0,i.utf8Length2=0):(i.start2--,i.utf8Start2--,i.utf8Length2=$g(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e=n[r],t=e.charAt(0);if(t===`@`)break;if(t===``){r++;continue}let a;try{a=decodeURI(e.slice(1))}catch{throw Error(`Illegal escape in parse: ${e}`)}let o=Bg(a)-a.length;if(t===`-`)i.diffs.push([-1,a]),i.length1-=o;else if(t===`+`)i.diffs.push([1,a]),i.length2-=o;else if(t===` `)i.diffs.push([0,a]),i.length1-=o,i.length2-=o;else throw Error(`Invalid patch mode "${t}" in: ${a}`);r++}}return t}function $g(e){return parseInt(e,10)}function e_(e){return e.map(iie).join(``)}function iie(e){let{utf8Length1:t,utf8Length2:n,utf8Start1:r,utf8Start2:i,diffs:a}=e,o;o=t===0?`${r},0`:t===1?`${r+1}`:`${r+1},${t}`;let s;s=n===0?`${i},0`:n===1?`${i+1}`:`${i+1},${n}`;let c=[`@@ -${o} +${s} @@
|
||||
`],l;for(let e=0;e<a.length;e++){switch(a[e][0]){case 1:l=`+`;break;case-1:l=`-`;break;case 0:l=` `;break;default:throw Error(`Unknown patch operation.`)}c[e+1]=`${l+encodeURI(a[e][1])}
|
||||
`}return c.join(``).replace(/%20/g,` `)}var aie=[`Value`,`Copy`,`Blank`,`ReturnIntoArray`,`ReturnIntoObject`,`ReturnIntoObjectSameKey`,`PushField`,`PushElement`,`PushParent`,`Pop`,`PushFieldCopy`,`PushFieldBlank`,`PushElementCopy`,`PushElementBlank`,`ReturnIntoObjectPop`,`ReturnIntoObjectSameKeyPop`,`ReturnIntoArrayPop`,`ObjectSetFieldValue`,`ObjectCopyField`,`ObjectDeleteField`,`ArrayAppendValue`,`ArrayAppendSlice`,`StringAppendString`,`StringAppendSlice`],t_=class{model;root;patch;i;inputStack;outputStack;constructor(e,t,n){this.model=e,this.root=t,this.patch=n,this.i=0,this.inputStack=[],this.outputStack=[]}read(){return this.patch[this.i++]}process(){for(this.inputStack.push({value:this.root}),this.outputStack.push({value:this.root});this.i<this.patch.length;){let e=this.read(),t=aie[e];if(!t)throw Error(`Unknown opcode: ${e}`);let n=`process${t}`;this[n].apply(this)}let e=this.outputStack.pop();return this.finalizeOutput(e)}inputEntry(){return this.inputStack[this.inputStack.length-1]}inputKey(e,t){return e.keys||=this.model.objectGetKeys(e.value).sort(),e.keys[t]}outputEntry(){return this.outputStack[this.outputStack.length-1]}outputArray(){let e=this.outputEntry();return e.writeValue||=this.model.copyArray(e.value),e.writeValue}outputObject(){let e=this.outputEntry();return e.writeValue||=this.model.copyObject(e.value),e.writeValue}outputString(){let e=this.outputEntry();return e.writeValue||=this.model.copyString(e.value),e.writeValue}finalizeOutput(e){return e.writeValue?this.model.finalize(e.writeValue):e.value}processValue(){let e=this.model.wrap(this.read());this.outputStack.push({value:e})}processCopy(){let e=this.inputEntry();this.outputStack.push({value:e.value})}processBlank(){this.outputStack.push({value:null})}processReturnIntoArray(){let e=this.outputStack.pop(),t=this.finalizeOutput(e),n=this.outputArray();this.model.arrayAppendValue(n,t)}processReturnIntoObject(){let e=this.read(),t=this.outputStack.pop(),n=this.finalizeOutput(t);n=this.model.markChanged(n);let r=this.outputObject();this.model.objectSetField(r,e,n)}processReturnIntoObjectSameKey(){let e=this.inputEntry(),t=this.outputStack.pop(),n=this.finalizeOutput(t),r=this.outputObject();this.model.objectSetField(r,e.key,n)}processPushField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.model.objectGetField(t.value,n);this.inputStack.push({value:r,key:n})}processPushElement(){let e=this.read(),t=this.inputEntry(),n=this.model.arrayGetElement(t.value,e);this.inputStack.push({value:n})}processPop(){this.inputStack.pop()}processPushFieldCopy(){this.processPushField(),this.processCopy()}processPushFieldBlank(){this.processPushField(),this.processBlank()}processPushElementCopy(){this.processPushElement(),this.processCopy()}processPushElementBlank(){this.processPushElement(),this.processBlank()}processReturnIntoObjectPop(){this.processReturnIntoObject(),this.processPop()}processReturnIntoObjectSameKeyPop(){this.processReturnIntoObjectSameKey(),this.processPop()}processReturnIntoArrayPop(){this.processReturnIntoArray(),this.processPop()}processObjectSetFieldValue(){this.processValue(),this.processReturnIntoObject()}processObjectCopyField(){this.processPushField(),this.processCopy(),this.processReturnIntoObjectSameKey(),this.processPop()}processObjectDeleteField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.outputObject();this.model.objectDeleteField(r,n)}processArrayAppendValue(){let e=this.model.wrap(this.read()),t=this.outputArray();this.model.arrayAppendValue(t,e)}processArrayAppendSlice(){let e=this.read(),t=this.read(),n=this.outputArray(),r=this.inputEntry().value;this.model.arrayAppendSlice(n,r,e,t)}processStringAppendString(){let e=this.model.wrap(this.read()),t=this.outputString();this.model.stringAppendValue(t,e)}processStringAppendSlice(){let e=this.read(),t=this.read(),n=this.outputString(),r=this.inputEntry().value;this.model.stringAppendSlice(n,r,e,t)}};function n_(e){return e>>16?4:e>>11?3:e>>7?2:1}function r_(e){let t=0;for(let n=0;n<e.length;n++){let r=n_(e.codePointAt(n));r==4&&n++,t+=r}return t}function i_(e,t,n=0){let r=n,i=0;for(i=n;r<t;i++){let t=n_(e.codePointAt(i));t===4&&i++,r+=t}return i}function oie(e,t){let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;){let n=e.codePointAt(i);if(n!==t.codePointAt(i))return r;let a=n_(n);r+=a,i+=a===4?2:1}return r}function sie(e,t,n=0){let r=Math.min(e.length,t.length)-n,i=0;for(let n=0;n<r;){let r=e.codePointAt(e.length-1-n);if(r!==t.codePointAt(t.length-1-n))return i;let a=n_(r);i+=a,n+=a===4?2:1}return i}var a_=class{meta;constructor(e){this.meta=e}wrap(e){return this.wrapWithMeta(e,this.meta,this.meta)}wrapWithMeta(e,t,n=this.meta){return{data:e,startMeta:t,endMeta:n}}asObject(e){if(!e.content){let t={};for(let[n,r]of Object.entries(e.data))t[n]=this.wrapWithMeta(r,e.startMeta);e.content={type:`object`,fields:t}}return e.content}asArray(e){if(!e.content){let t=e.data.map(t=>this.wrapWithMeta(t,e.startMeta));e.content={type:`arrLine truncated
|
||||
|
||||
`)}return null}function Q_(e,t=[]){for(let n of e)if(Array.isArray(n))Q_(n,t);else if(typeof n==`object`&&n){let e=$_(n);e!==null&&t.push(e)}return t}function $_(e){if(typeof e._type!=`string`)return null;let t=e.children;if(!Array.isArray(t))return null;let n=``;for(let e of t)e&&typeof e==`object`&&typeof e._type==`string`&&e._type===`span`&&typeof e.text==`string`&&(n+=e.text);return n}var ev={};ev.text=xv(e=>e,(e,t)=>{let n=Rie(t);return n===null?h_:b_(n)});var tv={};tv.all=wv(()=>({array:{type:`Everything`}}),function*(e,t){typeof t==`object`&&t&&`_type`in t&&t._type===`system.release`&&(yield t)});var nv={};nv.projectId=bv((e,t)=>t.context.sanity?b_(t.context.sanity.projectId):h_),nv.dataset=bv((e,t)=>t.context.sanity?b_(t.context.sanity.dataset):h_),nv.versionOf=xv(([e])=>[e,{type:`This`}],(e,t,n)=>{if(t.type!==`string`)return h_;let r=t.data;if(n.type!==`object`||typeof n.data._id!=`string`)return h_;if(n.data._id===r)return g_;let i=n.data._id.split(`.`);return i.length>=2&&i[0]===`drafts`&&i.slice(1).join(`.`)===r||i.length>=3&&i[0]===`versions`&&i.slice(2).join(`.`)===r?g_:__}),nv.partOfRelease=xv(e=>[e[0],{type:`This`}],(e,t,n)=>{if(t.type!==`string`)return h_;let r=t.data;if(n.type!==`object`||typeof n.data._id!=`string`)return h_;let i=n.data._id.split(`.`);return i.length>=3&&i[0]===`versions`&&i[1]===r?g_:__});var rv={};rv.query=bv(()=>{throw Error(`not implemented`)}),rv.semanticSimilarity=bv(()=>{throw Error(`not implemented`)});var iv={};iv.attributes=bv(()=>{throw Error(`not implemented`)});var av={datetime:1,number:2,string:3,boolean:4};function ov(e,t){let n=w_(e);if(n!==w_(t))return null;switch(n){case`number`:case`boolean`:return e-t;case`string`:return e<t?-1:+(e>t);case`datetime`:return e.compareTo(t);default:return null}}function zie(e,t){let n=w_(e),r=w_(t),i=av[n]||100,a=av[r]||100;if(i!==a)return i-a;let o=ov(e,t);return o===null&&(o=0),o}var Bie=class e{params;source;value;parent;context;isHidden=!1;constructor(e,t,n,r,i){this.params=e,this.source=t,this.value=n,this.context=r,this.parent=i}createNested(t){return this.isHidden?new e(this.params,this.source,t,this.context,this.parent):new e(this.params,this.source,t,this.context,this)}createHidden(e){let t=this.createNested(e);return t.isHidden=!0,t}};async function sv(e,t){if(e.type===`OpCall`&&e.op===`match`)return Hie(e.left,e.right,t);if(e.type===`FuncCall`&&e.name===`boost`){let n=await sv(e.args[0],t),r=await vv(e.args[1],t);return r.type===`number`&&n>0?n+r.data:0}switch(e.type){case`Or`:return await sv(e.left,t)+await sv(e.right,t);case`And`:{let n=await sv(e.left,t),r=await sv(e.right,t);return n===0||r===0?0:n+r}default:{let n=await vv(e,t);return+(n.type===`boolean`&&n.data===!0)}}}function cv(e,t){if(e.type===`OpCall`&&e.op===`match`)return Vie(e.left,e.right,t);if(e.type===`FuncCall`&&e.name===`boost`){let n=cv(e.args[0],t),r=_v(e.args[1],t);return r.type===`number`&&n>0?n+r.data:0}switch(e.type){case`Or`:return cv(e.left,t)+cv(e.right,t);case`And`:{let n=cv(e.left,t),r=cv(e.right,t);return n===0||r===0?0:n+r}default:{let n=_v(e,t);return+(n.type===`boolean`&&n.data===!0)}}}function Vie(e,t,n){let r=lv(_v(e,n),_v(t,n));if(typeof r==`number`)return r;throw Error(`Found synchronous value in match()`)}async function Hie(e,t,n){return lv(await vv(e,n),await vv(t,n))}function lv(e,t){let n=A_(e,e=>O_(e)),r=A_(t,e=>k_(e)),i=(e,t)=>{if(!t.success||e.parts.length===0||t.parts.length===0)return 0;let n=0;for(let r of t.parts){let t=e.parts.reduce((e,t)=>e+ +!!r.test(t),0);n+=t*2.2/(t+1.2)}return n};return`then`in n||`then`in r?(async()=>i(await n,await r))():i(n,r)}function uv(e){let t=[],n=[];for(let r of e){let e=`asc`;r.type===`Desc`?(e=`desc`,r=r.base):r.type===`Asc`&&(r=r.base),t.push(r),n.push(e)}return{mappers:t,directions:n}}function dv(e,t){return e.sort((e,n)=>{for(let r=0;r<t.length;r++){let i=zie(e[r+2],n[r+2]);if(t[r]===`desc`&&(i=-i),i!==0)return i}return e[1]-n[1]}),e.map(e=>e[0])}var fv={};fv.order={executeSync({base:e,args:t},n){let{mappers:r,directions:i}=uv(t),a=[],o=0,s=i.length;for(let t of e.data){let e=n.createNested(C_(t)),i=[t,o];for(let t=0;t<s;t++){let n=_v(r[t],e);i.push(n.data)}a.push(i),o++}return S_(dv(a,i))},async executeAsync({base:e,args:t},n){let{mappers:r,directions:i}=uv(t),a=[],o=0,s=i.length;for await(let t of e){let e=n.createNested(t),i=[await t.get(),o];for(let t=0;t<s;t++){let n=await vv(r[t],e);i.push(await n.get())}a.push(i),o++}return S_(dv(a,i))}},fv.score={async executeAsync({base:e,args:t},n){let r=[],i=[];for await(let a of e){if(a.type!==`object`){r.push(await a.get());continue}let e=n.createNested(a),o=typeof a.data._score==`number`?a.data._score:0;for(let n of t)o+=await sv(n,e);let s=Object.assign({},a.data,{_score:o});i.push(s)}return i.sort((e,t)=>t._score-e._score),C_(i)},executeSync({base:e,args:t},n){let r=[],i=[];for(let a of e.data){if(w_(a)!==`object`){r.push(a);continue}let e=a,o=n.createNested(C_(a)),s=typeof e._score==`number`?e._score:0;for(let e of t)s+=cv(
Line truncated
|
||||
`,r:`\r`,t:` `};function lae(e){let t=parseInt(e,16);return String.fromCharCode(t)}var Zv=class extends Error{name=`GroqQueryError`};function Qv(e,t=new Set){let n={group(e){return{type:`Group`,base:e.process(n)}},everything(){return{type:`Everything`}},this(){return{type:`This`}},parent(){return{type:`Parent`,n:1}},dblparent(e){return{type:`Parent`,n:e.process(n).n+1}},traverse(e){let t=e.process(n),r=[];for(;e.getMark().name!==`traversal_end`;)r.push(e.process(i));e.shift();let a=null;for(let e=r.length-1;e>=0;e--)a=r[e](a);if((t.type===`Everything`||t.type===`Array`||t.type===`PipeFuncCall`)&&(a=Jv(e=>e,a)),a===null)throw Error(`BUG: unexpected empty traversal`);return a.build(t)},this_attr(e){let t=e.processString();return t===`null`?{type:`Value`,value:null}:t===`true`?{type:`Value`,value:!0}:t===`false`?{type:`Value`,value:!1}:{type:`AccessAttribute`,name:t}},neg(e){return{type:`Neg`,base:e.process(n)}},pos(e){return{type:`Pos`,base:e.process(n)}},add(e){return{type:`OpCall`,op:`+`,left:e.process(n),right:e.process(n)}},sub(e){return{type:`OpCall`,op:`-`,left:e.process(n),right:e.process(n)}},mul(e){return{type:`OpCall`,op:`*`,left:e.process(n),right:e.process(n)}},div(e){return{type:`OpCall`,op:`/`,left:e.process(n),right:e.process(n)}},mod(e){return{type:`OpCall`,op:`%`,left:e.process(n),right:e.process(n)}},pow(e){return{type:`OpCall`,op:`**`,left:e.process(n),right:e.process(n)}},comp(e){let t=e.process(n);return{type:`OpCall`,op:e.processString(),left:t,right:e.process(n)}},in_range(e){let t=e.process(n),r=e.getMark().name===`inc_range`;return e.shift(),{type:`InRange`,base:t,left:e.process(n),right:e.process(n),isInclusive:r}},str(e){let t=``;loop:for(;e.hasMark();){let n=e.getMark();switch(n.name){case`str_end`:t+=e.processStringEnd();break loop;case`str_pause`:t+=e.processStringEnd();break;case`str_start`:e.shift();break;case`single_escape`:{let n=e.slice(1);e.shift(),t+=cae[n];break}case`unicode_hex`:e.shift(),t+=lae(e.processStringEnd());break;default:throw Error(`unexpected mark: ${n.name}`)}}return{type:`Value`,value:t}},integer(e){let t=e.processStringEnd();return{type:`Value`,value:Number(t)}},float(e){let t=e.processStringEnd();return{type:`Value`,value:Number(t)}},sci(e){let t=e.processStringEnd();return{type:`Value`,value:Number(t)}},object(e){let t=[];for(;e.getMark().name!==`object_end`;)t.push(e.process(r));return e.shift(),{type:`Object`,attributes:t}},array(e){let t=[];for(;e.getMark().name!==`array_end`;){let r=!1;e.getMark().name===`array_splat`&&(r=!0,e.shift());let i=e.process(n);t.push({type:`ArrayElement`,value:i,isSplat:r})}return e.shift(),{type:`Array`,elements:t}},tuple(e){let t=[];for(;e.getMark().name!==`tuple_end`;)t.push(e.process(n));return e.shift(),{type:`Tuple`,members:t}},func_call(r){let i=`global`;r.getMark().name===`namespace`&&(r.shift(),i=r.processString());let o=r.processString();if(i===`global`&&o===`select`){let e={type:`Select`,alternatives:[]};for(;r.getMark().name!==`func_args_end`;)if(r.getMark().name===`pair`){if(e.fallback)throw new Zv(`unexpected argument to select()`);r.shift();let t=r.process(n),i=r.process(n);e.alternatives.push({type:`SelectAlternative`,condition:t,value:i})}else{if(e.fallback)throw new Zv(`unexpected argument to select()`);e.fallback=r.process(n)}return r.shift(),e}let s=[];for(;r.getMark().name!==`func_args_end`;)dae(i,o,s.length)?s.push(r.process(a)):s.push(r.process(n));if(r.shift(),i===`global`&&(o===`before`||o===`after`)&&r.parseOptions.mode===`delta`)return{type:`Context`,key:o};if(i===`global`&&o===`boost`&&!r.allowBoost)throw new Zv(`unexpected boost`);let c=r.customFunctions[`${i}::${o}`];if(c!==void 0){let n=ry(e,t),i=new Fv(r.string,c.marks,r.customFunctions,e).process(n);return ey(o,i.params.length,s.length),ty(i.body,e=>Xv(e,i.params),e=>uae(e,i.params,s))}let l=Nie[i];if(!l)throw new Zv(`Undefined namespace: ${i}`);let u=l[o];if(!u||(u.arity!==void 0&&ey(o,u.arity,s.length),u.mode!==void 0&&u.mode!==r.parseOptions.mode))throw new Zv(`Undefined function: ${o}`);return{type:`FuncCall`,namespace:i,name:o,args:s}},pipecall(e){let t=e.process(n);e.shift();let r=`global`;if(e.getMark().name===`namespace`&&(e.shift(),r=e.processString()),r!==`global`)throw new Zv(`Undefined namespace: ${r}`);let i=e.processString(),a=[],o=e.allowBoost;for(i===`score`&&(e.allowBoost=!0);;){let t=e.getMark().name;if(t===`func_args_end`)break;if(i===`order`){if(t===`asc`){e.shift(),a.push({type:`Asc`,base:e.process(n)});continue}if(t===`desc`){e.shift(),a.push({type:`Desc`,base:e.process(n)});continue}}a.push(e.process(n))}e.shift(),e.allowBoost=o;let s=Pie[i];if(!s)throw new Zv(`Undefined pipe function: ${i}`);return s.arity&&ey(i,s.arity,a.length),{type:`PipeFuncCall`,base:t,name:i,args:a}},pair(){throw new Zv(`unexpected =>`)},and(e){return{type:`And`,left:e.process(n),right:e.process(n)}},or(e){return{type:`Or`,left:e.process(n),right:e.process(n)}},not(e){return{type:`Not`,base:e.process(n)}},asc(){throw new Zv(`unexpected asc`)},
Line truncated
|
||||
`&&(r++,i=n+1);this.line=r,this.column=e-i+1}};function ny(e,t={}){let n=nae(e);if(n.type===`error`)throw new fae(n.position,e,n.message);pae(e,n.customFunctions,t);let r=new Fv(e,n.marks,n.customFunctions,t),i=Qv(t);return r.process(i)}function ry(e,t=new Set){return{func_decl(n){let r=n.processString(),i=n.processString(),a=`${r}::${i}`;if(t.has(a))throw new Zv(`Recursive function definition detected for ${a}`);let o=Qv(e,new Set([...t,a])),s=[];for(;n.getMark().name!==`func_params_end`;){let e=n.process(o);if(e.type!==`Parameter`)throw Error(`expected parameter`);s.push(e)}if(s.length!==1)throw new Zv(`Custom functions can only have one parameter`);return n.shift(),{type:`FuncDeclaration`,namespace:r,name:i,params:s,body:n.process(o)}}}}function pae(e,t,n){for(let r in t){if(!t.hasOwnProperty(r))continue;let i=t[r],a=new Fv(e,i.marks,t,n),o=ry(n),s=a.process(o);ty(s.body,e=>Xv(e,s.params))}}var{compare:mae}=new Intl.Collator(`en`);Pv(`typeEvaluator:evaluate:trace`,{log:console.log.bind(console)}),Pv(`typeEvaluator:evaluate:debug`,{log:console.log.bind(console)}),Pv(`typeEvaluator:evaluate:warn`);var hae=/^[A-Za-z_][A-Za-z0-9_]*$/;function iy(e){return e.reduce((e,t,n)=>{if(Array.isArray(t))return`${e}[${t.join(`:`)}]`;if(ay(t))return`${e}[_key=="${t._key}"]`;if(typeof t==`number`)return`${e}[${t}]`;if(typeof t==`string`&&!hae.test(t))return`${e}['${t}']`;if(typeof t==`string`)return`${e}${n===0?``:`.`}${t}`;throw Error(`Unsupported path segment "${t}"`)},``)}function ay(e){return typeof e==`object`&&!!e&&`_key`in e&&typeof e._key==`string`}var oy=class extends Error{path;value;serializedPath;constructor(e,t,n){let r=iy(t);super(`${e} (at '${r}')`),this.path=t,this.serializedPath=r,this.value=n}},gae=/^[a-z0-9][a-z0-9_.-]+$/i,_ae=/^[a-zA-Z_][a-zA-Z0-9_-]*$/,vae=/^[a-z_]/i;function sy(e,t,n){if(!vae.test(e))throw new oy(`Keys must start with a letter (a-z)`,n.concat(e),t);if(!_ae.test(e))throw new oy(`Keys can only contain letters, numbers and underscores`,n.concat(e),t);if(e===`_key`||e===`_ref`||e===`_type`){if(typeof t!=`string`)throw new oy(`Keys must be strings`,n.concat(e),t);if(!gae.test(t))throw new oy(`Invalid key - use less exotic characters`,n.concat(e),t)}return e}function cy(e,t){if(`difference`in Set.prototype)return e.difference(t);let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function yae(e,t){if(`intersection`in Set.prototype)return e.intersection(t);let n=new Set;for(let r of e)t.has(r)&&n.add(r);return n}var bae=[`_id`,`_type`,`_createdAt`,`_updatedAt`,`_rev`],xae=1e6,Sae=.4,Cae=1e4;function ly(e,t,n=[]){return fy(uy(e,t,n))}function uy(e,t,n=[],r=[]){return e===t?r:typeof e==`string`&&typeof t==`string`?(Aae(e,t,n,r),r):Array.isArray(e)&&Array.isArray(t)?(Tae(e,t,n,r),r):hy(e)&&hy(t)?(wae(e,t,n,r),r):t===void 0?(r.push({op:`unset`,path:n}),r):(r.push({op:`set`,path:n,value:t}),r)}function wae(e,t,n,r){let i=n.length===0,a=Object.keys(e).filter(i?dy:_y).map(t=>sy(t,e[t],n)),o=a.length,s=Object.keys(t).filter(i?dy:_y).map(e=>sy(e,t[e],n)),c=s.length;for(let e=0;e<o;e++){let i=a[e];i in t||r.push({op:`unset`,path:n.concat(i)})}for(let i=0;i<c;i++){let a=s[i];uy(e[a],t[a],n.concat([a]),r)}return r}function Tae(e,t,n,r){return py(e)&&py(t)?Dae(e,t,n,r):Eae(e,t,n,r)}function Eae(e,t,n,r){if(t.length>e.length&&r.push({op:`insert`,position:`after`,path:n.concat([-1]),items:t.slice(e.length).map(gy)}),t.length<e.length){let i=e.length-t.length===1,a=e.slice(t.length);py(a)?r.push(...a.map(e=>({op:`unset`,path:n.concat({_key:e._key})}))):r.push({op:`unset`,path:n.concat([i?t.length:[t.length,``]])})}for(let e=0;e<t.length;e++)if(Array.isArray(t[e]))throw new oy(`Multi-dimensional arrays not supported`,n.concat(e),t[e]);let i=Math.min(e.length,t.length),a=e.slice(0,i),o=t.slice(0,i);for(let e=0;e<a.length;e++)uy(a[e],gy(o[e]),n.concat(e),r);return r}function Dae(e,t,n,r){let i=new Map(e.map(e=>[e._key,e])),a=new Map(t.map(e=>[e._key,e])),o=new Set(i.keys()),s=new Set(a.keys()),c=cy(o,s),l=cy(s,o),u=yae(o,s),d=Array.from(cy(o,c)),f=Array.from(cy(s,l)),p=[];for(let e=0;e<u.size;e++){let t=d[e],n=f[e];t!==n&&p.push({sourceKey:t,targetKey:n})}p.length&&r.push({op:`reorder`,path:n,snapshot:e,reorders:p});for(let e of u)uy(i.get(e),a.get(e),[...n,{_key:e}],r);for(let e of c)r.push({op:`unset`,path:[...n,{_key:e}]});if(l.size){let e,t=[],i=()=>{t.length&&r.push({op:`insert`,...e?{position:`after`,path:[...n,{_key:e}]}:{position:`before`,path:[...n,0]},items:t})};for(let n of s)l.has(n)?t.push(a.get(n)):u.has(n)&&(i(),e=n,t=[]);i()}return r}function Oae(e,t){let n=Math.max(e.length,t.length);return n>xae?!1:n<Cae||!(Math.abs(t.length-e.length)/n>Sae)}function kae(e,t,n){let r=n.at(-1);if(!(typeof r==`string`&&r.startsWith(`_`))&&Oae(e,t))try{return{op:`diffMatchPatch`,path:n,value:e_(Yg(e,t))}}catch{return}}function Aae(e,t,n,r){let i=kae(e,t,n);return r.push(i??{op:`set`,path:n,value:t}),r}function dy(e){return bae.indexOf(e)===-1}function fy(e,t){let[n,...r]=e;if(!n)return t?[t]:[];switch(n.
Line truncated
|
||||
`)}${Mce.map(e=>`"${e}": ${e}`).join(`,
|
||||
`)}`;var Nce=[`.sanity.studio`,`.sanity.io`];function Pce(e){let t=e.location?.hostname;return typeof t==`string`&&t.length>0?t.toLowerCase():null}function Fce(e){return e===`localhost`||e===`127.0.0.1`}function Ice(e){return Nce.some(t=>e.endsWith(t))}function Lce(){if(typeof window<`u`){let e=Pce(window);return e?Fce(e)?`development`:Ice(e)?`production`:null:null}return null}var qb=pn(`telemetry`),Jb=new WeakMap,Yb=new WeakMap,Xb=new WeakSet;function Rce(e,t){let n=Lce();if(!n){qb.trace(`initTelemetry skipped: environment not eligible`,{internal:!0});return}if(!t){qb.trace(`initTelemetry skipped: no projectId`,{internal:!0});return}Jb.has(e)||Xb.has(e)||(Xb.add(e),qb.debug(`initializing telemetry`,{projectId:t,environment:n}),Promise.all([On(()=>import(`./telemetryManager-UIEiMtC0-DMk2w9qd.js`).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6,7])),On(()=>import(`./clientStore-BtE2-q2i-B38VED9C.js`).then(e=>e.t).then(e=>e.t),__vite__mapDeps([8,9,10,2,3,7,1,4,5,11,12,13])),On(()=>import(`./authStore-CtE9bLHW-D5dT_tdN.js`).then(e=>e.i).then(e=>e.n),__vite__mapDeps([10,9,2,3,7,1,4,5,11,12,13]))]).then(async([{createTelemetryManager:r},{getClient:i},{getTokenState:a}])=>{if(e.isDisposed()){Xb.delete(e),qb.debug(`telemetry skipped: instance disposed before imports resolved`);return}let o=a(e).getCurrent();if(qb.trace(`auth token check`,{tokenPresent:!!o,internal:!0}),!o&&(qb.debug(`waiting for auth token`),!await new Promise(t=>{if(e.isDisposed())return t(!1);let n={unsubscribe:()=>{}},r=e.onDispose(()=>{n.unsubscribe(),t(!1)}),i=!1,o=a(e).observable.subscribe(e=>{i||!e||(i=!0,qb.debug(`auth token received`),r(),t(!0),n.unsubscribe())});n.unsubscribe=()=>o.unsubscribe(),i&&n.unsubscribe()})||e.isDisposed())){Xb.delete(e),qb.debug(`telemetry skipped: no token resolved or instance disposed`);return}let s=r({sessionId:e.instanceId,getClient:()=>i(e,{apiVersion:`2024-11-12`}),projectId:t,environment:n}),c=await s.checkConsent();if(qb.debug(`consent check complete`,{consented:c}),!c||e.isDisposed()){Xb.delete(e),s.dispose();return}Xb.delete(e),Jb.set(e,s);let l=Yb.get(e);if(l){qb.debug(`flushing buffered hooks`,{hooks:Array.from(l)});for(let e of l)s.logHookFirstUsed(e);Yb.delete(e)}let u=e.config,d=typeof u.perspective==`string`?u.perspective:`published`,f=u.auth?.token?`token`:u.studio?.auth?.token?`studio`:`default`;qb.info(`telemetry session started`,{projectId:t,perspective:d,authMethod:f,environment:n}),s.logSessionStarted({projectId:t,perspective:d,authMethod:f}),e.onDispose(()=>{s.endSession(),Jb.delete(e),qb.debug(`telemetry session ended`)})}).catch(t=>{Xb.delete(e),qb.warn(`telemetry init failed`,{error:t})}))}(0,X.createContext)(null);var zce=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){Line truncated
|
||||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||||
`+ie+e+ae}var se=!1;function ce(e,t){if(!e||se)return``;se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||||
`),l=s.split(`
|
||||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?oe(n):``}function le(e,t){switch(e.tag){case 26:case 27:case 5:return oe(e.type);case 16:return oe(`Lazy`);case 13:return e.child!==t&&t!==null?oe(`Suspense Fallback`):oe(`Suspense`);case 19:return oe(`SuspenseList`);case 0:case 15:return ce(e.type,!1);case 11:return ce(e.type.render,!1);case 1:return ce(e.type,!0);case 31:return oe(`Activity`);default:return``}}function de(e){try{var t=``,n=null;do t+=le(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||||
Error generating stack: `+e.message+`
|
||||
`+e.stack}}var fe=Object.prototype.hasOwnProperty,pe=t.unstable_scheduleCallback,me=t.unstable_cancelCallback,he=t.unstable_shouldYield,ge=t.unstable_requestPaint,_e=t.unstable_now,ve=t.unstable_getCurrentPriorityLevel,G=t.unstable_ImmediatePriority,ye=t.unstable_UserBlockingPriority,be=t.unstable_NormalPriority,xe=t.unstable_LowPriority,Se=t.unstable_IdlePriority,Ce=t.log,K=t.unstable_setDisableYieldValue,we=null,Te=null;function Ee(e){if(typeof Ce==`function`&&K(e),Te&&typeof Te.setStrictMode==`function`)try{Te.setStrictMode(we,e)}catch{}}var De=Math.clz32?Math.clz32:Ae,Oe=Math.log,ke=Math.LN2;function Ae(e){return e>>>=0,e===0?32:31-(Oe(e)/ke|0)|0}var je=256,Me=262144,Ne=4194304;function Pe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Pe(n))):i=Pe(o):i=Pe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Pe(n))):i=Pe(o)):i=Pe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ie(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Le(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Re(){var e=Ne;return Ne<<=1,!(Ne&62914560)&&(Ne=4194304),e}function ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Be(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ve(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-De(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&He(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function He(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-De(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ue(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-De(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function We(e,t){var n=t&-t;return n=n&42?1:Ge(n),(n&(e.suspendedLanes|t))===0?n:0}function Ge(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ke(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function qe(){var e=P.p;return e===0?(e=window.event,e===void 0?32:lp(e.type)):e}function Je(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Ye=Math.random().toString(36).slice(2),Xe=`__reactFiber$`+Ye,Ze=`__reactProps$`+Ye,Qe=`__reactContainer$`+Ye,$e=`__reactEvents$`+Ye,et=`__reactListeners$`+Ye,tt=`__reactHandles$`+Ye,nt=`__reactResources$`+Ye,rt=`__reactMarker$`+Ye;function it(e){delete e[Xe],delete e[Ze],delete e[$e],delete e[et],delete e[tt]}function at(e){var t=e[Xe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qe]||n[Xe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=sf(e);e!==null;){if(n=e[Xe])return n;e=sf(e)}return t}e=n,n=e.parentNode}return null}function ot(e){if(e=e[Xe]||e[Qe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function st(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ct(e){var t=e[nt];return t||=e[nt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function lt(e){e[rt]=!0}var ut=new Set,dt={};function ft(e,t){pt(e,t),pt(e+`Capture`,t)}function pt(e,t){for(dt[e]=t,e=0;e<t.length;e++)ut.add(t[e])}var mt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\Line truncated
|
||||
`).replace(ree,``)}function Dd(e,t){return t=Ed(t),Ed(e)===t}function Od(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ft(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ft(e,``+r);break;case`className`:yt(e,`class`,r);break;case`tabIndex`:yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:yt(e,n,r);break;case`style`:Rt(e,r,o);break;case`data`:if(t!==`object`){yt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Vt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Od(e,t,`name`,a.name,a,null),Od(e,t,`formEncType`,a.formEncType,a,null),Od(e,t,`formMethod`,a.formMethod,a,null),Od(e,t,`formTarget`,a.formTarget,a,null)):(Od(e,t,`encType`,a.encType,a,null),Od(e,t,`method`,a.method,a,null),Od(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Vt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ht);break;case`onScroll`:r!=null&&gd(`scroll`,e);break;case`onScrollEnd`:r!=null&&gd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Vt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:gd(`beforetoggle`,e),gd(`toggle`,e),vt(e,`popover`,r);break;case`xlinkActuate`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=eee.get(n)||n,vt(e,n,r))}}function kd(e,t,n,r,a,o){switch(n){case`style`:Rt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ft(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ft(e,``+r);break;case`onScroll`:r!=null&&gd(`scroll`,e);break;case`onScrollEnd`:r!=null&&gd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ht);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHT
Line truncated
|
||||
`);for(let t=e.length;t-->1;)e.splice(t,0,`
|
||||
`);c.children=c.children.concat(e.map(e=>({_type:`@text`,text:e})))}else c.children=c.children.concat(i)}}return i.children}function fT(e,t){let n=[],r;for(let i=0;i<e.length;i++){let a=e[i];if(a){if(!oT(a)){n.push(a),r=void 0;continue}if(!r){let e=mT(a,i,t,0);r=e.current,n.push(e.root);continue}if(_he(a,r)){r.children.push(a);continue}if((a.level||1)>r.level){let e=mT(a,i,t,r.level);gT(r,e.root),r=e.current;continue}if((a.level||1)<r.level){let e=n[n.length-1],o=e&&_T(e,a);if(o){r=o,r.children.push(a);continue}let s=mT(a,i,t,0);r=s.current,n.push(s.root);continue}if(a.listItem!==r.listItem){let e=n[n.length-1],o=e&&_T(e,{level:a.level||1});if(o&&o.listItem===a.listItem){r=o,r.children.push(a);continue}{let e=mT(a,i,t,0);r=e.current,n.push(e.root);continue}}console.warn(`Unknown state encountered for block`,a),n.push(a)}}return n}function _he(e,t){return(e.level||1)===t.level&&e.listItem===t.listItem}function pT(e,t,n,r,i){let a=r===(e.level||1)?``:`-${r}`;return{_type:`@list`,_key:`${e._key||`${t}`}-parent${a}`,mode:n,level:r,listItem:e.listItem,children:i}}function mT(e,t,n,r){let i=e.level||1,a=r+1,o=pT(e,t,n,a,hT(e,t,n,a,i)),s=o;for(let r=a+1;r<=i;r++){let a=pT(e,t,n,r,hT(e,t,n,r,i));gT(s,a),s=a}return{root:o,current:s}}function hT(e,t,n,r,i){return r===i?[e]:n===`html`?[vhe(e,t,r)]:[]}function vhe(e,t,n){return{...e,_key:`${e._key||`${t}`}-placeholder-${n}`,children:[],level:n}}function gT(e,t){if(e.mode===`html`&&t.mode===`html`){let n=e.children.length-1,r=e.children[n];if(!r)return;e.children[n]={...r,children:[...r.children,t]};return}e.mode===`direct`&&t.mode===`direct`&&e.children.push(t)}function _T(e,t){let n=t.level||1,r=t.listItem||`normal`,i=typeof t.listItem==`string`;if(sT(e)&&(e.level||1)===n&&i&&(e.listItem||`normal`)===r)return e;if(!(`children`in e))return;let a=e.children[e.children.length-1];return a&&!iT(a)?_T(a,t):void 0}function vT(e){let t=``;return e.children.forEach(e=>{lT(e)?t+=e.text:cT(e)&&(t+=vT(e))}),t}var yhe=/^\s/,bhe=/\s$/;function yT(e){let t=Array.isArray(e)?e:[e],n=``;return t.forEach((e,r)=>{if(!aT(e))return;let i=!1;e.children.forEach(e=>{iT(e)?(n+=i&&n&&!bhe.test(n)&&!yhe.test(e.text)?` `:``,n+=e.text,i=!1):i=!0}),r!==t.length-1&&(n+=`
|
||||
|
||||
`)}),n}var xhe=t(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),She=t(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=xhe(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),bT=t(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/
Line truncated
|
||||
Please move {options: {preview: ...}} to {..., preview: ...} on the type/field definition of "${e.name}".
|
||||
`)}function C_e(e){let t=e.preview||(e.options||{}).preview;t&&`fields`in t&&console.warn(`Heads up! "preview.fields" should be renamed to "preview.select". Please update the preview config for "${e.name}".
|
||||
`)}function w_e(e){for(let t in e)if(e.hasOwnProperty(t))return!1;return!0}function tD(e,t,n){if(n>t.maxDepth)return`...`;if(Array.isArray(e)){if(e.length===0)return`[empty]`;let r=Math.max(e.length-t.maxBreadth),i=e.slice(0,t.maxBreadth).map((e,r)=>tD(e,t,n+1)).concat(r>0?`…+${r}`:[]).join(`, `);return n===0?i:`[${i}]`}if(typeof e==`object`&&e){let r=Object.keys(e).filter(n=>!t.ignoreKeys.includes(n)&&e[n]!==void 0);if(w_e(Sw(e,r)))return`{empty}`;let i=r.slice(0,t.maxBreadth).map(r=>`${r}: ${tD(e[r],t,n+1)}`).join(`, `);return n===0?i:`{${i}}`}let r=String(e);return r===``?`""`:r}function T_e(e,t={}){return tD(e,{maxDepth:`maxDepth`in t?t.maxDepth:2,maxBreadth:`maxBreadth`in t?t.maxBreadth:2,ignoreKeys:`ignoreKeys`in t?t.ignoreKeys:[]},0)}var E_e={maxEntries:2,maxDepth:2,maxBreadth:2,ignoreKeys:[`_id`,`_type`,`_key`,`_ref`]};function D_e(e){return t=>({title:T_e(Sw(t,e),E_e)})}function O_e(e){return e.type===`array`&&e.of&&e.of.some(e=>e.type===`block`)||!1}var k_e=[`title`,`name`,`label`,`heading`,`header`,`caption`],A_e=[`description`,...k_e];function j_e(e,t){return IE(e.to||[]).some(e=>e.type===t)}function M_e(e){return j_e(e,`sanity.imageAsset`)}function N_e(e){let t=e.fields||[],n=t.find(M_e);if(n)return n.name;let r=t.find(e=>(e.fields||[]).some(M_e));return r?`${r.name}.asset`:void 0}function P_e(e){return j_e(e,`sanity.fileAsset`)}function F_e(e){let t=e.fields||[],n=t.find(P_e);if(n)return n.name;let r=t.find(e=>(e.fields||[]).some(P_e));return r?`${r.name}.asset`:void 0}function I_e(e){let t={fields:[],...e},n=t.fields.filter(e=>e.type===`string`).map(e=>e.name),r=t.fields.filter(O_e).map(e=>e.name),i=k_e.find(e=>n.includes(e)||r.includes(e)),a=A_e.find(e=>e!==i&&(n.includes(e)||r.includes(e)));i||(i=n[0]||r[0],a=n[1]||r[1]);let o=t.fields.find(e=>e.type===`image`),s=N_e(t);if(!i){let e=F_e(t);e&&(i=`${e}.originalFilename`),s&&(i=`${s}.originalFilename`)}if(!i&&!s){let e=t.fields.map(e=>e.name);return{select:e.reduce((e,t)=>(e[t]=t,e),{}),prepare:D_e(e)}}return{select:Yge({title:i,description:a,media:o?o.name:s},qge)}}function L_e(e){return e.reduce((e,t)=>(e[t]=t,e),{})}function R_e(e){if(!e)return e;let t=e.select||e.fields||{};return Array.isArray(t)?{...Sw(e,[`prepare`,`component`]),select:L_e(t)}:{...Sw(e,[`prepare`,`component`]),select:t}}function nD(e){return function(){return S_e(e),C_e(e),R_e(e.preview||(e.options||{}).preview)||I_e(e)}}var z_e={type:`object`,name:`link`,title:`Link`,i18nTitleKey:`inputs.portable-text.annotation.link`,options:{modal:{type:`popover`}},fields:[{name:`href`,type:`url`,title:`Link`,description:`A valid web, email, phone, or relative link.`,validation:e=>e.uri({scheme:[`http`,`https`,`tel`,`mailto`],allowRelative:!0})}]},B_e={type:`text`,name:`text`,title:`Text`},V_e={name:`marks`,type:`array`,of:[{type:`string`}],title:`Marks`},H_e={bullet:{title:`Bulleted list`,value:`bullet`,i18nTitleKey:`inputs.portable-text.list-type.bullet`},numbered:{title:`Numbered list`,value:`number`,i18nTitleKey:`inputs.portable-text.list-type.number`}},U_e=[H_e.bullet,H_e.numbered],rD={normal:{title:`Normal`,value:`normal`,i18nTitleKey:`inputs.portable-text.style.normal`},h1:{title:`Heading 1`,value:`h1`,i18nTitleKey:`inputs.portable-text.style.h1`},h2:{title:`Heading 2`,value:`h2`,i18nTitleKey:`inputs.portable-text.style.h2`},h3:{title:`Heading 3`,value:`h3`,i18nTitleKey:`inputs.portable-text.style.h3`},h4:{title:`Heading 4`,value:`h4`,i18nTitleKey:`inputs.portable-text.style.h4`},h5:{title:`Heading 5`,value:`h5`,i18nTitleKey:`inputs.portable-text.style.h5`},h6:{title:`Heading 6`,value:`h6`,i18nTitleKey:`inputs.portable-text.style.h6`},blockquote:{title:`Quote`,value:`blockquote`,i18nTitleKey:`inputs.portable-text.style.quote`}},W_e=[rD.normal,rD.h1,rD.h2,rD.h3,rD.h4,rD.h5,rD.h6,rD.blockquote],iD={strong:{title:`Strong`,value:`strong`,i18nTitleKey:`inputs.portable-text.decorator.strong`},em:{title:`Italic`,value:`em`,i18nTitleKey:`inputs.portable-text.decorator.emphasis`},code:{title:`Code`,value:`code`,i18nTitleKey:`inputs.portable-text.decorator.code`},underline:{title:`Underline`,value:`underline`,i18nTitleKey:`inputs.portable-text.decorator.underline`},strikeThrough:{title:`Strike`,value:`strike-through`,i18nTitleKey:`inputs.portable-text.decorator.strike-through`}},G_e=[iD.strong,iD.em,iD.code,iD.underline,iD.strikeThrough],K_e=[z_e],q_e=[`type`,`name`,`title`,`jsonType`,`description`,`options`,`fieldsets`,`icon`],aD={name:`block`,title:`Block`,type:null,jsonType:`object`},J_e={},Y_e={get(){return aD},extend(e,t){let n={...e.options||J_e},{marks:r,styles:i,lists:a,of:o,...s}=e,c=[$_e(r,o),Z_e(i),Q_e(a),{name:`markDefs`,title:`Mark definitions`,type:`array`,of:r?.annotations||K_e},{name:`level`,title:`Indentation`,type:`number`}].concat(e.fields||[]),l={...s,options:n},u=Object.assign(Sw(aD,q_e),l,{type:aD});return ZE(u,`fields`,()=>c.map(e=>t.cachedField(e))),ZE(u,`preview`,nD(e)),ZE(u,KE,()=>({...l,fields:u.fields,preview:u.preview}),{enumerable:!1,writable:!1}),d(u);f
Line truncated
|
||||
`))}var Exe=async(e,t)=>{if(!e)return!0;let{i18n:n}=t;if(typeof e!=`object`||Array.isArray(e))return{code:$O.slugInvalidType,details:{actualType:sk(e)},message:n.t(`validation:slug.not-object`)};if(!Rn(e)||e.current.trim().length===0)return{code:$O.slugMissingCurrent,message:n.t(`validation:slug.missing-current`)};let r=t?.type?.options?.isUnique||vk,i={...t,parent:t.parent,type:t.type,defaultIsUnique:vk};return await r(e.current,i)?!0:{code:$O.slugNotUnique,details:{slug:e.current},message:n.t(`validation:slug.not-unique`,{slug:e.current})}},Dxe={array:!0,boolean:!0,date:!0,number:!0,object:!0,string:!0},Oxe=e=>e in Dxe;function yk(e,t=new Set){return!e||t.has(e)?[]:(t.add(e),[...e.type?yk(e.type,t):[],e])}function kxe(e,t){let n=e;Oxe(t.jsonType)&&(n=n.type(t.jsonType));let r=t?.options&&typeof t.options==`object`&&`list`in t.options&&t.options.list;return Array.isArray(r)&&(n=n.valid(r.map(e=>Axe(e,t)))),t.name===`datetime`||t.name===`date`?n.type(`Date`):t.name===`url`?n.uri():t.name===`slug`?n.custom(Exe,{bypassConcurrencyLimit:!0}):t.name===`reference`?n.reference():t.name===`email`?n.email():n}function bk(e){return e?!(`fields`in e)&&e.type?bk(e.type):!(`fields`in e)||!Array.isArray(e.fields)?!1:e.fields.some(e=>e.name===`value`):!1}function Axe(e,t){return t.jsonType===`object`&&bk(t)||e.value===void 0?e:e.value}var xk=e=>e.flag===`uri`;function jxe(e,t){if(!yk(t).some(e=>e.name===`url`))return e;let n=new gk(t).uri()._rules.find(xk)?.constraint,r=e=>xk(e)&&NC(e.constraint,n),i=e=>xk(e)&&!NC(e.constraint,n);return e.some(e=>e._rules.some(i))?e.map(e=>{if(!e._rules.some(r))return e;let t=e.clone();return t._rules=e._rules.filter(e=>!r(e)),t}):e}function Sk(e,t){if(!e)return[];let n=e.validation;if(Array.isArray(n))return jxe(n.flatMap(n=>Sk({...e,validation:n},t)),e);let r=Object.values(yk(e).reduce((e,t)=>(e[t.name]=t,e),{})).reduce(kxe,new gk(e));return n&&typeof n==`object`?[n]:n&&typeof n==`function`?Sk({...e,validation:n(r,t)},t):[r]}var Mxe=function(e,t){let n=Date.now();return globalThis.setTimeout(()=>{e({didTimeout:!1,timeRemaining(){return Math.max(0,Date.now()-n)}})},0)},Nxe=function(e){return globalThis.clearTimeout(e)},Ck=typeof window>`u`?void 0:window,Pxe=Ck?.requestIdleCallback||Mxe,Fxe=Ck?.cancelIdleCallback||Nxe,Ixe=e=>t=>{if(typeof t!=`object`||!t)return!0;let n=new Set(e.fields?.map(e=>e.name));return Object.keys(t).filter(e=>!e.startsWith(`_`)).filter(e=>!n.has(e)).map(t=>({code:$O.objectUnknownField,details:{fieldName:t,typeName:e.name},message:`Field '${t}' does not exist on type '${e.name}'`,path:[t]}))},wk=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function Tk(e){let t=[];e._fieldRules&&t.push(e._fieldRules);for(let n of e._rules)if(n.flag===`all`||n.flag===`either`){let e=n.constraint;if(Array.isArray(e))for(let n of e)t.push(...Tk(n))}return t}function Lxe(e,t){if(t.length===1)return t[0];let n=Pn(e)&&e._type,r=e==null||!n&&sk(e).toLowerCase();return r&&r!==`object`?t.find(e=>e.jsonType===r):t.find(e=>e.type?.name===n)||t.find(e=>e.name===n)||t.find(e=>e.name===`object`&&r===`object`)}var Ek=new WeakMap;function Rxe({document:e,getClient:t,i18n:n=sxe(),schema:r,getDocumentExists:i,environment:a,maxCustomValidationConcurrency:o,currentUser:s}){if(typeof e?._type!=`string`)throw Error(`Tried to validate a value without a '_type'`);let c=r.get(e._type);if(!c)return a===`studio`?(console.warn(`Schema type for object type "%s" not found, skipping validation`,e._type),sn([])):sn([{code:$O.documentUnknownType,details:{documentType:e._type},level:`warning`,message:`Could not find schema type for type '${e._type}', skipping validation`,path:[]}]);let l=Ek.get(r);l||(l=new ege(o??5),Ek.set(r,l));let u={getClient:t,schema:r,parent:void 0,value:e,path:[],document:e,type:c,i18n:n,getDocumentExists:i,environment:a,customValidationConcurrencyLimiter:l,currentUser:s};return vn(n.loadNamespaces([`validation`])).pipe(yt(()=>Dk(u)),q(e=>e.map(Hxe)),dn(e=>{console.error(e);let t=e?.message||`Unknown error`,n={code:$O.validationException,level:`error`,message:t,item:{message:t},path:[]};return sn([n])}))}function zxe(e){return un(Dk(e))}function Dk({value:e,type:t,path:n=[],parent:r,customValidationConcurrencyLimiter:i,environment:a,...o}){let s=o.hidden===!0,c=(e,t,n,r,i)=>e?i||cxe(e.hidden,{...o,parent:n,value:t,path:r||[],currentUser:o.currentUser??null}):i,l=c(t,e,r,n,s),u=e=>t?.jsonType===`object`&&yk(t).find(e=>[`object`,`document`,`file`,`image`].includes(e.name))&&a!==`studio`?e.custom(Ixe(t),{bypassConcurrencyLimit:!0}).warning():e,d=Sk(t,{...o,hidden:l,environment:a,parent:r,path:n,type:t}),f=d.map(u).map(s=>pt(()=>s.validate(e,{...o,environment:a,hidden:l,parent:r,path:n,type:t,__internal:{customValidationConcurrencyLimiter:i}}))),p=[],m=d.some(e=>e.isRequired());if(t?.jsonType===`object`&&(e||e==null&&m)){let r=t.fields.reduce((e,t)=>(e[t.name]=t.type,e),{});p=p.concat(d.flatMap(e=>Tk(e)).flatMap(e=>Object.entries(e)).flatMap(([t,s])=>{let d=r[t];return Sk({...d,validation:s}).m
Line truncated
|
||||
|
||||
Keys:
|
||||
`+String(t.keys))+(`
|
||||
|
||||
Values:
|
||||
`+String(e)));c(t);for(var n=0;n<t.callbacks.length;n++){var r=e[n];r instanceof Error?t.callbacks[n].reject(r):t.callbacks[n].resolve(r)}}).catch(function(n){s(e,t,n)})}function s(e,t,n){c(t);for(var r=0;r<t.keys.length;r++)e.clear(t.keys[r]),t.callbacks[r].reject(n)}function c(e){if(e.cacheHits)for(var t=0;t<e.cacheHits.length;t++)e.cacheHits[t]()}function l(e){if(e&&e.batch===!1)return 1;var t=e&&e.maxBatchSize;if(t===void 0)return 1/0;if(typeof t!=`number`||t<1)throw TypeError(`maxBatchSize must be a positive number: `+t);return t}function u(e){var t=e&&e.batchScheduleFn;if(t===void 0)return r;if(typeof t!=`function`)throw TypeError(`batchScheduleFn must be a function: `+t);return t}function d(e){var t=e&&e.cacheKeyFn;if(t===void 0)return function(e){return e};if(typeof t!=`function`)throw TypeError(`cacheKeyFn must be a function: `+t);return t}function f(e){if(e&&e.cache===!1)return null;var t=e&&e.cacheMap;if(t===void 0)return new Map;if(t!==null){var n=[`get`,`set`,`delete`,`clear`].filter(function(e){return t&&typeof t[e]!=`function`});if(n.length!==0)throw TypeError(`Custom cacheMap missing methods: `+n.join(`, `))}return t}function p(e){return e&&e.name?e.name:null}function m(e){return typeof e==`object`&&!!e&&typeof e.length==`number`&&(e.length===0||e.length>0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}t.exports=n}))(),1),hSe=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,gSe=e=>crypto.getRandomValues(new Uint8Array(e)),_Se=(e,t,n)=>{let r=256-256%e.length;if(r===256){let r=e.length-1;return(i=t)=>{if(!i)return``;let a=``;for(;;){let t=n(i),o=i;for(;o--;)if(a+=e[t[o]&r],a.length>=i)return a}}}let i=Math.ceil(409.6*t/r);return(a=t)=>{if(!a)return``;let o=``;for(;;){let t=n(i),s=i;for(;s--;)if(t[s]<r&&(o+=e[t[s]%e.length],o.length>=a))return o}}},Hk=(e,t=21)=>_Se(e,t|0,gSe),Uk=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=hSe[n[e]&63];return t},vSe=Math.floor,ySe=Math.random;function bSe(e,t){return e+vSe(ySe()*(t-e+1))}function Wk(e){var t=e.length;return t?e[bSe(0,t-1)]:void 0}function xSe(e){return Wk(Mw(e))}function SSe(e){return(HS(e)?Wk:xSe)(e)}var CSe=t(((e,t)=>{(function(){var e,n,r,i,a,o;typeof performance<`u`&&performance!==null&&performance.now?t.exports=function(){return performance.now()}:typeof process<`u`&&process!==null&&process.hrtime?(t.exports=function(){return(e()-a)/1e6},n=process.hrtime,e=function(){var e=n();return e[0]*1e9+e[1]},i=e(),o=process.uptime()*1e9,a=i-o):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(e)})),wSe=e(t(((e,t)=>{for(var n=CSe(),r=typeof window>`u`?global:window,i=[`moz`,`webkit`],a=`AnimationFrame`,o=r[`request`+a],s=r[`cancel`+a]||r[`cancelRequest`+a],c=0;!o&&c<i.length;c++)o=r[i[c]+`Request`+a],s=r[i[c]+`Cancel`+a]||r[i[c]+`CancelRequest`+a];if(!o||!s){var l=0,u=0,d=[],f=1e3/60;o=function(e){if(d.length===0){var t=n(),r=Math.max(0,f-(t-l));l=r+t,setTimeout(function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(l)}catch(e){setTimeout(function(){throw e},0)}},Math.round(r))}return d.push({handle:++u,callback:e,cancelled:!1}),u},s=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}t.exports=function(e){return o.call(r,e)},t.exports.cancel=function(){s.apply(r,arguments)},t.exports.polyfill=function(e){e||=r,e.requestAnimationFrame=o,e.cancelAnimationFrame=s}}))(),1);function Gk(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Kk(e,t={}){return`scheduler`in window&&typeof window.scheduler?.postTask==`function`?window.scheduler.postTask(e,t):e()}function qk(e){return tS(e)}function Jk(e,t){let n={...e,...t};return Object.keys(n).forEach(r=>{let i=t[r],a=e[r];qk(i)&&qk(a)&&(n[r]=Jk(a,i))}),n}var TSe=[`_dataset`,`_projectId`,`_strengthenOnPublish`,`_key`,`_ref`,`_type`,`_weak`];function ESe(e){return e&&e.length>0?`"${e}"`:e}function Yk(e,t){let n=e=>`Template "${t.id}" initial value: ${e}`;if(!qk(e))throw Error(n(`resolved to a non-object`));if(e._type&&t.schemaType!==e._type)throw Error(n(`includes "_type"-property (${e._type}) that does not match template (${t.schemaType})`));try{return Xk(e)}catch(e){throw e.message=n(e.message),e}}function Xk(e,t=[],n=!1){if(Array.isArray(e))return e.map((e,n)=>{if(Array.isArray(e))throw Error(`multidimensional arrays are not supported (at path "${Fx(t)}")`);return Xk(e,t.concat(n),!0)});if(!qk(e))return e;let r=n&&!e._key?{_key:Xx()}:{};return t.length>0&&!e._type&&e._ref&&(r._type=`reference`),e._ref&&DSe(e,t),Object.keys(e).reduce((n,r)=>(n[r]=Xk(e[r],t.concat([r])),n),r)}function DSe(e,t=[]){if(!e._type&&e.type)throw Error(`Reference is missing "_type", but has a "type" property at path "${Fx(t)}"`);let n=Object.keys(e).filter(e=>!TSe.includes(e));if(n.length>0){let e=n.length>1?`properties`:`property`;throw Error(`Disallowed ${e} found in reference: ${n.map(ESe).join(Line truncated
|
||||
`);for(let t=0;t<s.length-1;++t){let i=s[t].trim();if(i.length!==0)try{e.enqueue(JSON.parse(i))}catch(t){e.error(t),r=!0,n.cancel();return}}return a=s[s.length-1],n.read().then(t).catch(t=>e.error(t))}).catch(t=>e.error(t))},cancel(){r=!0,n.cancel()}})}function vM(e){return{id:e,hasAttrs:!1,attrs:null,rev:null,events:[],aligned:!1}}function HTe(e,t){let n=t.events.findIndex(t=>e.id===t.transactionId);return n>=0?n+1:t.rev?t.rev===e.id?0:-1:0}function yM(e,t){if(e.hasAttrs=!0,t){if(e.attrs={...t},typeof e.attrs._rev!=`string`)throw Error(`snapshot has no _rev`);e.rev=e.attrs._rev,delete e.attrs._rev}else e.attrs=null,e.rev=null;e.events=[]}var UTe=class{timeline;earliestTransactionId=null;constructor(e){this.timeline=e,this._states={draft:vM(e.draftId),published:vM(e.publishedId)}}_states;appendRemoteSnapshotEvent(e){if(e.version===`version`)return;let t=this._states[e.version];if(e.type===`snapshot`){this._maybeInvalidateHistory(),yM(t,e.document);return}e.type===`remoteMutation`&&(t.aligned?(this._apply(t,e),this.timeline.addRemoteMutation(e)):t.hasAttrs?t.events.push(e):yM(t,e.head))}prependHistoryEvent(e){if(!this.acceptsHistory)throw Error(`cannot prepend history at this point`);for(let t of Object.values(this._states))if(!t.aligned){let n=HTe(e,t);n>=0&&this._alignAtIndex(t,n)}this.timeline.addTranslogEntry(e),this.earliestTransactionId=e.id}didReachEarliestEntry(){for(let e of Object.values(this._states))if(!e.aligned){if(e.attrs!==null)throw Error(`unable to find translog entry to align to`);this._alignAtIndex(e,0)}this.timeline.didReachEarliestEntry()}get isAligned(){return Object.values(this._states).every(e=>e.aligned)}get acceptsHistory(){return this._isComplete}get currentDocument(){return{draft:this._states.draft.attrs,published:this._states.published.attrs}}_alignAtIndex(e,t){for(let n of e.events.slice(0,t))this._apply(e,n);for(let n of e.events.slice(t))this._apply(e,n),this.timeline.addRemoteMutation(n);e.events=[],e.aligned=!0}get _isComplete(){return Object.values(this._states).every(e=>e.hasAttrs)}_apply(e,t){e.attrs=u_(e.attrs,t.effects.apply),e.rev=t.transactionId}_maybeInvalidateHistory(){if(this._isComplete){for(let e of Object.values(this._states))e.aligned=!1;this.earliestTransactionId=null,this.timeline.reset()}}},WTe=class{timeline;start;end;doc;constructor(e,t,n,r){this.timeline=e,this.start=n,this.end=r,this.doc=t}same(e,t){return this.start===e&&this.end===t}_startDocument;_endDocument;_diff;endAttributes(){return bM(this.endDocument())}endDocument(){return this._endDocument||=this.timeline.replayBackwardsUntil(this.end.end,this.doc),this._endDocument}startAttributes(){return bM(this.startDocument())}startDocument(){if(!this.start)throw Error(`start required`);return this._startDocument||=this.timeline.replayBackwardsBetween(this.start.end,this.end.end-1,this.endDocument()),this._startDocument}diff(){if(!this._diff){if(!this.start)throw Error(`start required`);this._diff=this.timeline.calculateDiff(this.startDocument(),this.endDocument(),this.start.index+1,this.end.index)}return this._diff}};function bM(e){return e.draft||e.published}var GTe=class{timeline;client;handler;version=0;selectionState=`inactive`;constructor(e){this.timeline=e.timeline,this.client=e.client,this.handler=e.handler,this._aligner=new UTe(this.timeline),this.markChange()}_aligner;_fetchMore=!1;_fetchAtLeast=0;_isRunning=!1;_isSuspended=!1;_didErr=!1;_since=null;_sinceTime=null;_rev=null;_revTime=null;_reconstruction;setHandler(e){this.handler=e}clearRange(){this.setRange(null,null)}setRange(e,t){t!==this._rev&&this.setRevTime(t),e!==this._since&&this.setSinceTime(e);let n=10;if(this._sinceTime===`loading`||this._revTime===`loading`||!this._aligner.isAligned)this.selectionState=`loading`;else if(this._sinceTime===`invalid`||this._revTime===`invalid`)this.selectionState=`invalid`;else if(this._sinceTime){this.selectionState=`range`;let e=this._revTime||this.timeline.lastChunk();this._sinceTime.index>e.index?(this._revTime=`invalid`,this.selectionState=`invalid`):this.setReconstruction(this._sinceTime,e)}else this._revTime?(this.selectionState=`rev`,this.setReconstruction(null,this._revTime)):(this.selectionState=`inactive`,n=0);this._fetchAtLeast=n,this.start()}setLoadMore(e){this._fetchMore=e,this.start()}get sinceTime(){return this._sinceTime&&typeof this._sinceTime==`object`?this._sinceTime:null}get revTime(){return this._revTime&&typeof this._revTime==`object`?this._revTime:null}get isLoading(){return this._isRunning}get realRevChunk(){return this.revTime||this.timeline.lastChunk()}onOlderRevision(){return!!this._rev&&(this.selectionState===`range`||this.selectionState===`rev`)}findRangeForNewRev(e){let t=this.timeline.isLatestChunk(e)?null:this.timeline.createTimeId(e);if(!this._since)return[null,t];let n=this.sinceTime;return n&&n.index<e.index?[this._since,t]:[`@lastPublished`,t]}findRangeForNewSince(e){let t=this.revTime;return t&&e.index<t.index?[this.timeline.createTimeId(e),this._rev]:[this.time
Line truncated
|
||||
`).filter(Boolean).map(e=>JSON.parse(e))},YTe=e=>(0,Ok.reduce)(e,(e,t)=>Bn(t)&&!e.includes(t._ref)?[...e,t._ref]:e,[]);function CM(e,t){return Array.isArray(e)?t(e.map(e=>CM(e,t)).filter(e=>e!==void 0)):Gk(e)?t(Object.keys(e).reduce((n,r)=>{let i=CM(e[r],t);return i!==void 0&&(n[r]=i),n},{})):t(e)}var XTe=(e,t)=>CM(e,e=>Bn(e)?t(e):e),ZTe=(e,t)=>XTe(e,e=>t[e._ref]?e:void 0);function QTe(e,t,n,r,i){return vn(SM(e,n,r)).pipe(fn(n=>{if(!n)throw Error(`Unable to find document with ID ${t} at revision ${r}`);if(r!==`lastRevision`&&n?._rev!==r)throw Error(`Restored revision ${n?._rev} does not match expected revision ${r}`);let i=YTe(n).map(e=>`"${e}": defined(*[_id=="${e}"]._id)`).join(`,`);return e.observable.fetch(`{${i}}`).pipe(q(e=>ZTe(n,e)))}),q(e=>{let{_updatedAt:t,...r}=e;return{...r,_id:n}}),fn(r=>{let a=hd(n)||_d(n);if(i?.useServerDocumentActions&&a){let a={actionType:`sanity.action.document.replaceDraft`,publishedId:t,attributes:r};return rj(e,Li(t,{version:Ti(n)})).observable.action(i.fromDeleted?[{actionType:`sanity.action.document.create`,publishedId:t,attributes:r,ifExists:`fail`},a]:a)}return e.observable.createOrReplace(r,{visibility:`async`})}),q(()=>void 0))}function $Te({client:e}){return{getDocumentAtRevision:(t,n)=>SM(e,t,n),getHistory:(t,n)=>KTe(e,t,n),getTransactions:t=>JTe(e,t),restore:(t,n,r,i)=>QTe(e,t,n,r,i),getTimelineController:qTe}}var wM=(()=>{if(typeof process<`u`&&process.versions!==void 0&&process.versions.node!==void 0)return!1;let e=`__tmp_supports_local_storage`;try{return typeof localStorage>`u`?!1:(localStorage.setItem(e,`---`),localStorage.removeItem(e),!0)}catch{return!1}})();function eEe(){let e=Object.create(null);return{getKey(t){return e[t]||null},setKey(t,n){e[t]=n}}}function tEe(e){try{return JSON.parse(e)}catch(e){return console.warn(`Failed to parse settings: ${e.message}`),null}}function nEe(){if(!wM)return eEe();function e(e){let t=localStorage.getItem(e);return t===null?null:tEe(t)}return{getKey:e,setKey:function(e,t){t==null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}}}var TM=nEe();function rEe(e){function t(t){return mt(sn(TM.getKey(t)),e.getKey(t).pipe(cn(e=>{TM.setKey(t,e)}))).pipe(wt(NC))}function n(t,n){return TM.setKey(t,n),e.setKey(t,n)}return{getKey:t,setKey:n}}function iEe({client:e}){let t=e.withConfig(ax),n=new Vk.default(async e=>{let n=(await t.request({url:`/users/me/keyvalue/${e.join(`,`)}`}).catch(t=>(console.error(`Error fetching data:`,t),Array(e.length).fill(null)))||[]).reduce((e,t)=>(t?.key&&(e[t.key]=t.value),e),{});return e.map(e=>n[e]||null)});return{getKey:e=>n.load(e),setKey:(e,r)=>t.request({method:`PUT`,url:`/users/me/keyvalue`,body:[{key:e,value:r}]}).then(e=>{let t=e[0];return n.clear(t.key),n.prime(t.key,t.value),t.value},e=>(console.error(`Error setting data:`,e),null))}}function aEe({client:e}){let t=iEe({client:e}),n=new at;function r(e){return t.getKey(e)}function i(e,r){return n.next({type:`optimistic`,key:e,value:r}),t.setKey(e,r).then(t=>(n.next({type:`commit`,key:e,value:t}),t))}return{getKey(e){return _t(r(e),n.pipe(xn(t=>t.key===e),q(e=>e.value),wt(NC)))},setKey:i}}function oEe(e){return rEe(aEe(e))}var sEe=e=>{if(e.type===`rollCall`)return{type:`rollCall`,userId:e.i,sessionId:e.session};if(e.type===`state`){let{sessionId:t,locations:n}=e.m;return{type:`state`,userId:e.i,sessionId:t,timestamp:new Date().toISOString(),locations:n}}if(e.type===`disconnect`)return{type:`disconnect`,userId:e.i,sessionId:e.m.session,timestamp:new Date().toISOString()};throw Error(`Got unknown presence event: ${JSON.stringify(e)}`)},cEe=(e,t)=>[e.listen(`presence`).pipe(q(sEe)).pipe(ft()),n=>n.type===`rollCall`?e.request(`presence_rollcall`,{session:t}):n.type===`state`?e.request(`presence_announce`,{data:{locations:n.locations,sessionId:t}}):n.type===`disconnect`?e.request(`presence_disconnect`,{session:t}):on],lEe=[`pqSMwf6hH`,`pnLYqNfv5`,`priDVVmy8`,`p0NFOU0j8`,`pTDl2jw8d`,`pHMeQnTse`,`pDQYzJbyS`,`pZyoPHKUs`,`p4Tyi2Be5`,`pb9vii060`,`pE8yhOisw`,`p7Fd2C6Cj`,`p3exSgYCx`,`pbIQRYViC`,`p8GJaTEhN`,`p27ewL8aM`,`pYg97z75S`,`pdLr4quHv`,`pkJXiDgg6`,`pkl4UAKcA`,`pNoExists`],uEe=[[`nested`,`first`],[`nested`,`second`],[`nestedArray`,{_key:`565c867c8dac`},`arrayNo1`,{_key:`a645548a8f01`},`arrayNo1`,{_key:`1685e372c40f`},`fieldNo0`],[`nestedArray`,{_key:`565c867c8dac`},`fieldNo0`],[`nestedArray`,{_key:`565c867c8dac`},`arrayNo19`,{_key:`a02e7a93e2a2`},`fieldNo0`],[`nestedArray`,{_key:`565c867c8dac`},`arrayNo19`,{_key:`a02e7a93e2a2`},`fieldNo19`],[`address`,`country`],[`address`,`street`],[`customInputWithDefaultPresence`,`row3`,`cell3`]],dEe=pt(()=>Dt(0,1e4)).pipe(nc(lEe),q((e,t)=>({type:`state`,userId:e,sessionId:e+t,timestamp:new Date().toISOString(),locations:[{type:`document`,documentId:`presence-debug`,lastActiveAt:new Date().toISOString(),path:SSe(uEe)}]})),St()),EM=`presence_session_id`,fEe=()=>Uk(16);function pEe(){try{return window.sessionStorage.getItem(EM)}catch{}return null}function mEe(e){try{window.sessionStorage.se
Line truncated
|
||||
`)}function JM(e){let t=(0,Z.c)(5),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let r=n,i=(0,X.useContext)(u)?.currentLocale.id,a;return t[2]!==i||t[3]!==r?(a=i?GM.listFormat(i,r):GM.listFormat(`en-US`,{...r,style:`narrow`}),t[2]=i,t[3]=r,t[4]=a):a=t[4],a}var FEe=/^<(?<tag>[^\s\d<][^/?><]+)\/?>/,IEe=/<\/(?<tag>[^>]+)>/,LEe=/<[^>]+\/>/,REe=/^[A-Z][A-Za-z0-9]+$/,zEe=/^[a-z]+$/,BEe=/{{\s*?([^}]+)\s*?}}/g;function VEe(e){let t=[],n=``,r=``,i=e;for(;i.length>0;)if(!r&&i[0]===`<`){let e=WEe(i);if(e){let a=e.groups.tag;KEe(a),n&&=(t.push(...YM(n)),``),UEe(e[0])?t.push({type:`tagOpen`,selfClosing:!0,name:a}):(t.push({type:`tagOpen`,name:a}),r=a),i=i.slice(e[0].length)}else n+=i[0],i=i.slice(1)}else if(r&&i[0]===`<`&&i[1]!==`<`){let e=GEe(i);if(e){let a=e.groups.tag;if(i[1]!==`/`)throw Error(`Expected closing tag for <${r}>, but found new opening tag <${a}>. Nested tags is not supported.`);if(a!==r)throw Error(`Expected closing tag for <${r}>, but found closing tag </${a}> instead. Make sure each opening tag has a matching closing tag.`);n&&=(t.push(...YM(n)),``),t.push({type:`tagClose`,name:a}),r=``,i=i.slice(e[0].length)}else n+=i[0],i=i.slice(1)}else n+=i[0],i=i.slice(1);if(r)throw Error(`No matching closing tag for <${r}> found. Either make it self closing (e.g. "<${r}/>") or close it (e.g "<${r}>...</${r}>").`);return n&&t.push(...YM(n)),t}function YM(e){let t=[],n=e.matchAll(BEe),r=0;for(let i of n){if(i.index===void 0)continue;let n=e.slice(r,i.index);n.length>0&&t.push({type:`text`,text:n}),t.push(HEe(i[0])),r+=n.length+i[0].length}return r<e.length&&t.push({type:`text`,text:e.slice(r)}),t}function HEe(e){let[t,...n]=e.replace(/^\{\{|\}\}$/g,``).trim().split(/\s*,\s*/);if(n.length===1&&n[0]===`list`)return{type:`interpolation`,variable:t,formatters:n};if(n.length>0)throw Error(`Interpolations with formatters are not supported when using <Translate>. Found "${e}". Utilize "useTranslation" instead, or format the values passed to <Translate> ahead of time.`);return{type:`interpolation`,variable:t}}function UEe(e){return LEe.test(e)}function WEe(e){return e.match(FEe)}function GEe(e){return e.match(IEe)}function KEe(e){if(!REe.test(e)&&!zEe.test(e))throw Error(e.trim()===e?`Invalid tag "<${e}>". Tag names must be lowercase HTML tags or start with an uppercase letter and can only include letters and numbers.`:`Invalid tag "<${e}>". No whitespace allowed in tags.`)}var qEe=/^[A-Z]/,JEe=new Set([`abbr`,`address`,`cite`,`code`,`del`,`em`,`ins`,`kbd`,`q`,`samp`,`strong`,`sub`,`sup`]);function XM(e){let t=(0,Z.c)(27),n=e.values&&`count`in e.values&&typeof e.values.count==`number`?e.values.count:void 0,r;t[0]!==e.context||t[1]!==e.i18nKey||t[2]!==e.t||t[3]!==n?(r=e.t(e.i18nKey,{context:e.context,skipInterpolation:!0,count:n}),t[0]=e.context,t[1]=e.i18nKey,t[2]=e.t,t[3]=n,t[4]=r):r=t[4];let i=r,a;t[5]===i?a=t[6]:(a=VEe(i),t[5]=i,t[6]=a);let o=a,s=JM(),c;t[7]===s?c=t[8]:(c=e=>s.format(e),t[7]=s,t[8]=c);let l;if(t[9]!==e.componentProps||t[10]!==e.components||t[11]!==e.context||t[12]!==e.i18nKey||t[13]!==e.t||t[14]!==e.values||t[15]!==c||t[16]!==o){let n={list:c},r;t[18]===e.components?r=t[19]:(r=e.components||{},t[18]=e.components,t[19]=r);let i=r;try{l=ZM(o,e.values,i,e.componentProps,n)}catch(n){let r=n,i=r instanceof Error?r.message:String(r);console.warn(`Translate: Failed to render translation for key "${e.i18nKey}": ${i}`);let a;t[20]!==e.context||t[21]!==e.i18nKey||t[22]!==e.t||t[23]!==e.values?(a=e.t(e.i18nKey,{context:e.context,replace:e.values}),t[20]=e.context,t[21]=e.i18nKey,t[22]=e.t,t[23]=e.values,t[24]=a):a=t[24],l=a}t[9]=e.componentProps,t[10]=e.components,t[11]=e.context,t[12]=e.i18nKey,t[13]=e.t,t[14]=e.values,t[15]=c,t[16]=o,t[17]=l}else l=t[17];let u;return t[25]===l?u=t[26]:(u=(0,Q.jsx)(Q.Fragment,{children:l}),t[25]=l,t[26]=u),u}function ZM(e,t,n,r,i){let[a,...o]=e;if(!a)return null;if(a.type===`interpolation`){let e=t?t[a.variable]:void 0;if(e===void 0)return`{{${a.variable}}}`;let s=YEe(e,a.formatters||[],i);return(0,Q.jsxs)(Q.Fragment,{children:[s,ZM(o,t,n,r,i)]})}if(a.type===`text`)return(0,Q.jsxs)(Q.Fragment,{children:[a.text,ZM(o,t,n,r,i)]});if(a.type===`tagOpen`&&a.selfClosing){let e=n[a.name];if(!e)throw Error(`Component not found: ${a.name}`);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(e,{...typeof e==`string`?void 0:r}),ZM(o,t,n,r,i)]})}if(a.type===`tagOpen`&&!a.selfClosing){let e=o.findIndex(e=>e.type===`tagClose`),s=o[e];if(s&&a.name!==s.name)throw Error(`Nested tags is not allowed`);let c=n[a.name];if(!c&&qEe.test(a.name))throw Error(`Component not defined: ${a.name}`);if(!c&&!JEe.has(a.name))throw Error(`HTML tag "${a.name}" is not allowed`);let l=o.slice(0,e),u=o.slice(e+1),d=c||a.name;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{...typeof d==`string`?void 0:r,children:ZM(l,t,n,r,i)}),ZM(u,t,n,r,i)]})}return null}function YEe(e,t,n){let r=e;for(let i of t)if(i===`list`){if(Array.isArray(e))r=n.list(e);else throw Error(`List formatter used on non-array value`)}returnLine truncated
|
||||
"updatedAt": ${a}[0]._updatedAt,
|
||||
"documentIds": ${a}[].docId,
|
||||
},`}},{subquery:``,projection:``})},cOe=e=>{let t=(t,n=!1)=>{if(!t?.length||!e)return sn({data:null,error:null,loading:!1});let{subquery:r,projection:i}=sOe(t),a=e.observable.fetch(`{${r}}{${i}}`,{},{tag:`release-docs.fetch`}).pipe(yt(e=>sn({data:Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[n]:{...r,documentCount:r.documentIds?.length||0}}},{}),error:null,loading:!1})),dn(e=>(console.error(`Failed to fetch release metadata`,e),sn({data:null,error:e,loading:!1}))));return ys(()=>n,a.pipe(lc({loading:!0,data:null,error:null})),a)},n=n=>!n?.length||!e?on:e.observable.listen(`*[(${n.reduce((e,t,n)=>`${e}${n===0?``:` ||`} sanity::partOfRelease("${t}")`,``)})]`,{},{includeResult:!0,includeAllVersions:!0,visibility:`query`,events:[`mutation`],tag:`release-docs.listen`}).pipe(dn(e=>(console.error(`Failed to listen for release metadata`,e),on)),As(1e3),xn(e=>e.length>0),yt(e=>{let n=e.reduce((e,t)=>{if(`type`in t&&t.type===`mutation`){let n=t.documentId.split(`.`)[1];return e.includes(n)?e:[...e,n]}return e},[]);return n.length?t(n):on}));return e=>mt(t(e,!0),n(e))};function lOe(e){return(e??[]).reduce((e,t)=>(e.set(t._id,t),e),new Map)}function uOe(e,t){switch(t.type){case`LOADING_STATE_CHANGED`:return{...e,state:t.payload.loading?`loading`:`loaded`,error:t.payload.error};case`RELEASES_SET`:{let n=lOe(t.payload);return{...e,releases:n}}default:return e}}var dOe=`*[${`_type=="${eTe}" && _id in path("${zj}.*")`}] {
|
||||
_id,
|
||||
_type,
|
||||
_rev,
|
||||
_createdAt,
|
||||
_updatedAt,
|
||||
state,
|
||||
finalDocumentStates,
|
||||
publishAt,
|
||||
publishedAt,
|
||||
"metadata": coalesce(metadata, {
|
||||
"title": "",
|
||||
"releaseType": "undecided",
|
||||
}),
|
||||
// Content Lake initially encoded non-error states as {error: {message: ""}}. This projection
|
||||
// ensures the error field only appears if the document has a non-empty error message.
|
||||
...select(
|
||||
length(error.message) > 0 => { error },
|
||||
{}
|
||||
),
|
||||
} | order(_createdAt desc)`,wP={releases:new Map,state:`initialising`};function fOe(e){let{client:t}=e,n=new at,r=new ot(!1);function i(e){n.next(e)}let a=sn({action:{type:`LOADING_STATE_CHANGED`,payload:{loading:!0,error:void 0}}}).pipe(xn(()=>!r.value),cn(()=>r.next(!0)),Fs(Jj(t,dOe,{},{tag:`releases.listen`}).pipe(cn(()=>r.next(!1)),q(e=>({response:e})))),dn(e=>sn({action:{type:`LOADING_STATE_CHANGED`,payload:{loading:!1,error:e}}})),yt(e=>`action`in e?sn(e.action):sn({type:`RELEASES_SET`,payload:e.response},{type:`LOADING_STATE_CHANGED`,payload:{loading:!1,error:void 0}}))),o=_t(mt(a,n)).pipe(xn(e=>e!==void 0),cc((e,t)=>uOe(e,t),wP),lc(wP),St(1));return{state$:o,errorCount$:o.pipe(pOe(),St(1)),getMetadataStateForSlugs$:cOe(t),dispatch:i}}function pOe(){return Xe(yt(({releases:e})=>vn(e.values()).pipe(xn(e=>e.state===`active`),xn(e=>e.error!==void 0),zs())),wt())}function TP(){let e=(0,Z.c)(5),t=AM(),n=nx(),r=FM(),i=ix(NA),a;return e[0]!==r||e[1]!==t||e[2]!==i||e[3]!==n?(a=t.get({dependencies:[n,r],namespace:`ReleasesStore`})||fOe({client:i,previewStore:r}),t.set({dependencies:[n,r],namespace:`ReleasesStore`,value:a}),e[0]=r,e[1]=t,e[2]=i,e[3]=n,e[4]=a):a=e[4],a}function EP(e){return`${zj}.${e}`}function DP(){let e=(0,X.useContext)(re);if(!e)throw Error("Could not find `ActiveWorkspaceMatcher` context");return e}function OP(e){let t=(0,Z.c)(9),{documentId:n,documentType:r,resourceType:i,resourceId:a,schemaName:o}=e,{node:s}=HM();if(i!==`studio`&&!a)throw Error(`resourceId is required for media-library and canvas resources`);let c;t[0]!==n||t[1]!==r||t[2]!==s||t[3]!==a||t[4]!==i||t[5]!==o?(c=e=>{let t=()=>{let t={type:`dashboard/v1/events/history`,data:{eventType:e,document:{id:n,type:r,resource:{id:a,type:i,schemaName:o}}}};s?.post?.(t.type,t.data)};try{t()}catch(e){let t=e;throw console.error(`Failed to record history event:`,t),t}},t[0]=n,t[1]=r,t[2]=s,t[3]=a,t[4]=i,t[5]=o,t[6]=c):c=t[6];let l=c,u;return t[7]===l?u=t[8]:(u={recordEvent:l},t[7]=l,t[8]=u),u}function mOe(e){let t=(0,Z.c)(28),{api:n,publishedDocId:r,docTypeName:i,version:a}=e,{activeWorkspace:o}=DP(),s;t[0]!==r||t[1]!==a?(s=a?ki(r,a):r,t[0]=r,t[1]=a,t[2]=s):s=t[2];let c;t[3]!==o.dataset||t[4]!==o.projectId?(c=[o.projectId,o.dataset],t[3]=o.dataset,t[4]=o.projectId,t[5]=c):c=t[5];let l=c.join(`.`),u;t[6]!==o.name||t[7]!==i||t[8]!==s||t[9]!==l?(u={resourceType:`studio`,documentId:s,documentType:i,resourceId:l,schemaName:o.name},t[6]=o.name,t[7]=i,t[8]=s,t[9]=l,t[10]=u):u=t[10];let{recordEvent:d}=OP(u),f=_S(VM().capabilities),[p,m]=(0,X.useState)(!1),h;t[11]===p?h=t[12]:(h=e=>{p||(e(),m(!0))},t[11]=p,t[12]=h);let g=h;f?.comlink;let _=f?.comlink,v;t[13]!==d||t[14]!==_?(v={hasComlink:_,recordEvent:d},t[13]=d,t[14]=_,t[15]=v):v=t[15];let y=v,b;t[16]===y?b=t[17]:(b=kP({...y,operationName:`delete`,comlinkEventType:`deleted`}),t[16]=y,t[17]=b);let x=b,S;t[18]===y?S=t[19]:(S=kP({...y,operationName:`del`,comlinkEventType:`deleted`}),t[18]=y,t[19]=S);let C=S,w;t[20]!==y||t[21]!==g?(w=kP({...y,operationName:`patch`,comlinkEventType:`edited`,preRecordEvent:g}),t[20]=y,t[21]=g,t[22]=w):w=t[22];let T=w,E;return t[23]!==n||t[24]!==C||t[25]!==x||t[26]!==T?(E=x(C(T(n))),t[23]=n,t[24]=C,t[25]=x,t[26]=T,t[27]=E):E=t[27],E}function kP({operationName:e,comlinkEventType:t,hasComlink:n,recordEvent:r,preRecordEvent:i=e=>e()}){return function(a){return n?{...a,[e]:{...a[e],execute:(...n)=>{i(()=>r(t)),a[e].execute(...n)}}}:a}}function hOe(e){let t=(0,Z.c)(11),n;t[0]===e?n=t[1]:(n=Yj(e),t[0]=e,t[1]=n);let r=n,i=r?.kind,a=r?.kind===`version`||r?.kind===`variant`?r.scopeId:void 0,o=r?.kind===`variant`||r?.kind===`target-missing`?r.variantId:void 0,s=r?.kind===`variant`?r.allowCreate:void 0,c;bb0:switch(i){case`version`:{let e;t[2]===a?e=t[3]:(e={kind:`version`,scopeId:a},t[2]=a,t[3]=e),c=e;break bb0}case`variant`:{let e;t[4]!==s||t[5]!==a||t[6]!==o?(e=s===void 0?{kind:`variant`,scopeId:a,variantId:o}:{kind:`variant`,scopeId:a,variantId:o,allowCreate:s},t[4]=s,t[5]=a,t[6]=o,t[7]=e):e=t[7],c=e;break bb0}case`target-missing`:{let e;t[8]===o?e=t[9]:(e=o===void 0?{kind:`target-missing`}:{kind:`target-missing`,variantId:o},t[8]=o,t[9]=e),c=e;break bb0}case`unresolved`:{let e;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e={kind:`unresolved`},t[10]=e):e=t[10],c=e;break bb0}default:c=void 0}return c}function AP(e,t,n){let r=(0,Z.c)(9),i=IM(),a=hOe(n),o;r[0]!==t||r[1]!==i.pair||r[2]!==e||r[3]!==a?(o=i.pair.editOperations(e,t,a),r[0]=t,r[1]=i.pair,r[2]=e,r[3]=a,r[4]=o):o=r[4];let s=_S(o),c;return r[5]!==s||r[6]!==t||r[7]!==e?(c={api:s,docTypeName:t,publishedDocId:e},r[5]=s,r[6]=t,r[7]=e,r[8]=c):c=r[8],mOe(c)}var jP=`drafts`,MP=`published`,NP=`asap`,PP=[`archived`,`published`],FP={asap:{tone:`caution`},scheduled:{tone:`suggest`},undecided:{tone:`neutral`}},gOe=[`asap`,`scheduled`,`undecided`];function _Oe(e){return typeof e==`string`&&gOe.includes(e)}function IP(e){return typeof e==`object`&&!!e&&`_type`in e&&e._type===`system.release`}function LP(e){return e.metadata?.cardin
Line truncated
|
||||
_id,
|
||||
_type,
|
||||
_rev,
|
||||
_createdAt,
|
||||
_updatedAt,
|
||||
name,
|
||||
conditions,
|
||||
"priority": coalesce(priority, 0),
|
||||
metadata,
|
||||
} | order(_createdAt desc)`,eF={variants:new Map,state:`initialising`};function UOe(e){let{client:t,enabled:n}=e;if(!n)return{state$:sn({variants:new Map,state:`loaded`}),dispatch:()=>{}};let r=new at;function i(e){r.next(e)}let a=sn({type:`LOADING_STATE_CHANGED`,payload:{loading:!0,error:void 0}}).pipe(Fs(Jj(t,HOe,{},{tag:`variants.listen`}).pipe(q(e=>({type:`FETCH_SUCCEEDED`,payload:e})))),dn(e=>sn({type:`LOADING_STATE_CHANGED`,payload:{loading:!1,error:e}})));return{state$:mt(a,r).pipe(cc((e,t)=>VOe(e,t),eF),lc(eF),St(1)),dispatch:i}}function tF(){let e=(0,Z.c)(5),t=nx(),n=!!t.beta?.variants?.enabled,r=AM(),i=ix(lx),a;return e[0]!==r||e[1]!==i||e[2]!==n||e[3]!==t?(a=r.get({dependencies:[t],namespace:`VariantsStore`})||UOe({client:i,enabled:n}),r.set({dependencies:[t],namespace:`VariantsStore`,value:a}),e[0]=r,e[1]=i,e[2]=n,e[3]=t,e[4]=a):a=e[4],a}function nF(){let e=(0,Z.c)(8),{state$:t}=tF(),{variants:n,error:r,state:i}=_S(t),a;e[0]===n?a=e[1]:(a=Array.from(n.values()),e[0]=n,e[1]=a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=[`loading`,`initialising`],e[2]=o):o=e[2];let s=o.includes(i),c;return e[3]!==r||e[4]!==a||e[5]!==s||e[6]!==n?(c={data:a,byId:n,error:r,loading:s},e[3]=r,e[4]=a,e[5]=s,e[6]=n,e[7]=c):c=e[7],c}var rF={status:`resolving`};function WOe(e,t){if(e!==`drafts`||!t)return;let n=t._system.draft?._ref;if(!n)return;let r=Ti(n);if(r)return{id:n,scopeId:r}}function iF(e){if(e.status===`ready`)return e.scopeId;if(e.status===`variant-missing`)return e.creatableTarget?.scopeId}function GOe(e){return e.status===`variant-missing`?e.creatableTarget:void 0}function aF(e){switch(e.status){case`resolving`:return{kind:`unresolved`};case`variant-missing`:return e.creatableTarget?{kind:`variant`,scopeId:e.creatableTarget.scopeId,variantId:e.variant._id,allowCreate:!0}:{kind:`target-missing`,variantId:e.variant._id};case`variant-definition-document-not-found`:return{kind:`target-missing`};case`ready`:return e.variant?e.scopeId?{kind:`variant`,scopeId:e.scopeId,variantId:e.variant._id}:{kind:`target-missing`,variantId:e.variant._id}:e.scopeId;default:return}}function KOe(e){let{bundle:t,selectedVariant:n,selectedVariantName:r,variantsLoading:i,versions:a,versionsLoading:o}=e;if(!r){if(o)return rF;let e=ZP({bundle:t,variant:void 0,documentVersions:a});return{status:`ready`,targetDocument:e,scopeId:e?._system.scopeId??void 0,variant:void 0,publishedSibling:void 0}}if(i)return rF;if(!n)return{status:`variant-definition-document-not-found`,requestedVariantName:r};if(o)return rF;let s=ZP({bundle:t,variant:n._id,documentVersions:a}),c=QP({variant:n._id,documentVersions:a});return s?{status:`ready`,targetDocument:s,scopeId:s._system.scopeId??void 0,variant:n,publishedSibling:c}:{status:`variant-missing`,variant:n,bundle:t,publishedSibling:c,creatableTarget:WOe(t,c)}}function oF(e){let t=(0,Z.c)(9),n;t[0]===e?n=t[1]:(n={documentId:e},t[0]=e,t[1]=n);let{versions:r,loading:i}=JP(n),{bundle:a,selectedVariant:o,selectedVariantName:s}=qP(),{loading:c}=nF(),l;return t[2]!==a||t[3]!==o||t[4]!==s||t[5]!==c||t[6]!==r||t[7]!==i?(l=KOe({bundle:a,selectedVariant:o,selectedVariantName:s,variantsLoading:c,versions:r,versionsLoading:i}),t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=r,t[7]=i,t[8]=l):l=t[8],l}function qOe(){return St({bufferSize:1,refCount:!0})}function JOe(e,t){let n=e.get(t);if(!n)throw Error(`No such schema type: ${t}`);return n}function YOe({grantsStore:e,permission:t,draft:n,version:r,published:i,liveEdit:a}){let o=r||n||i,s=o===r?r:o===n?`draft`:`published`,{checkDocumentPermission:c}=e;switch(t){case`delete`:return a?[[`delete published document (live-edit)`,c(`update`,i)]]:[[`delete draft document`,c(`update`,n)],[`delete published document`,c(`update`,i)]];case`discardDraft`:return a?[]:[[`delete draft document`,c(`update`,n)]];case`discardVersion`:return a?[]:[[`delete version`,c(`update`,r||null)]];case`publish`:return a?[]:[[`update published document at its current state`,c(`update`,i)],[`delete draft document`,c(`update`,n)],[`create published document from draft`,c(`create`,n&&{...n,_id:Di(n._id)})]];case`unpublish`:return a?[]:[[`update draft document at its current state`,c(`create`,n)],[`delete published document`,c(`update`,i)],[`create draft document from published version`,c(`create`,i&&{...i,_id:Ai(i._id)})]];case`update`:return a?[[`update published document (live-edit)`,c(`update`,i)]]:[[`update ${s} document`,c(`update`,o)]];case`duplicate`:return a?[[`create new published document from existing document (live-edit)`,c(`create`,{...i,_id:`dummy-id`})]]:[[`create new draft document from existing ${s} document`,c(`create`,{...o,_id:Ai(`dummy-id`)})]];default:throw Error(`Could not match permission: ${t}`)}}function XOe({client:e,grantsStore:t,schema:n,id:r,permission:i,type:a,version:o,pairListenerOptions:s}){if(a===`*`)return sn({granted:!1,reason:"Type specified was `*`"});let c=!!JOe(n,a).liveEdit;return pj(e,Li(r,{version:o}),a,void 0,s).pipe(yt(e=>ln([e.draft.snapshots$,e.published.snaps
Line truncated
|
||||
`)}`}})):sn({granted:!0,reason:``})}))}var ZOe=$M(cj(e=>XOe(e).pipe(qOe()),({client:e,schema:t,id:n,type:r,version:i,permission:a,userId:o})=>{let{dataset:s=``,projectId:c=``}=e.config(),l=r!==`*`&&!!t.get(r)?.liveEdit;return[s,c,Di(n),i??``,o??``,r,a,l].join(`-`)}));function sF(e){let t=(0,Z.c)(10),{id:n,type:r,version:i,permission:a,client:o,schema:s,grantsStore:c,pairListenerOptions:l}=e,u=ix(ax),d=nA(),f=NM(),p=tN(),m=o||u,h=s||d,g=c||f,_=p?.id,v;return t[0]!==m||t[1]!==g||t[2]!==n||t[3]!==l||t[4]!==a||t[5]!==h||t[6]!==r||t[7]!==_||t[8]!==i?(v={client:m,schema:h,grantsStore:g,id:n,permission:a,type:r,pairListenerOptions:l,version:i,userId:_},t[0]=m,t[1]=g,t[2]=n,t[3]=l,t[4]=a,t[5]=h,t[6]=r,t[7]=_,t[8]=i,t[9]=v):v=t[9],ZOe(v)}function cF(e){let t=[`projectId`in e&&"`projectId` not allowed in plugin configuration",`dataset`in e&&"`dataset` not allowed in plugin configuration"].filter(MN);if(t.length)throw Error(`Invalid plugin configuration:\n${t.map(e=>`\t${e}`).join(`
|
||||
`)}`)}function lF(e){if(typeof e==`function`){let t=e;return e=>{let n=t(e);return cF(n),n}}return cF(e),()=>e}function QOe(e){let t=(0,Z.c)(5),n=qx(),r,i;t[0]===n?(r=t[1],i=t[2]):(r=()=>{console.error(`Scheduled publishing plugin is added by default, please remove this plugin from your config.
|
||||
|
||||
If you have a custom date config, you can use the scheduledPublishing API to customize the date input.
|
||||
|
||||
See: https://www.sanity.io/docs/scheduled-publishing.
|
||||
`),n.push({id:`scheduled-publishing-deprecated`,closable:!0,duration:6e4,status:`error`,title:`Scheduled publishing plugin is deprecated`,description:`The scheduled publishing plugin is now deprecated, you should remove the plugin from your configuration. If you have a custom date config, you can use the scheduledPublishing API to customize the date input. See: https://www.sanity.io/docs/scheduled-publishing.`})},i=[n],t[0]=n,t[1]=r,t[2]=i),(0,X.useEffect)(r,i);let a;return t[3]===e?a=t[4]:(a=e.renderDefault(e),t[3]=e,t[4]=a),a}var $Oe=lF({name:`sanity/deprecated/scheduled-publishing`,studio:{components:{layout:QOe}}}),eke=[`scheduled-publishing`],uF=({plugins:e=[],...t},n)=>{let r={config:t,path:[...n,t.name]},i=e.flatMap(e=>uF(e,[...n,t.name])),a=i.find(e=>e.config.name===`scheduled-publishing`);return a&&i.push({path:a.path,config:$Oe()}),[...i.filter(e=>!eke.includes(e.config.name)),r]},tke=()=>(0,Q.jsx)(X.Fragment,{});function nke(e,t){function n(e){let n=(0,Z.c)(4),i;if(n[0]===Symbol.for(`react.memo_cache_sentinel`)){i=r;for(let e of t){let t=i;i=n=>(0,Q.jsx)(e,{...n,renderDefault:t})}n[0]=i}else i=n[0];let a;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Q.jsx)(Wr,{padding:3,radius:1,animated:!0}),n[1]=a):a=n[1];let o;return n[2]===e?o=n[3]:(o=(0,Q.jsx)(X.Suspense,{fallback:a,children:i({...e,renderDefault:tke})}),n[2]=e,n[3]=o),o}function r(t){return(0,Q.jsx)(e,{...t})}return n}function dF(e){let t=(0,Z.c)(4),{options:n}=rx().__internal,{defaultComponent:r,pick:i}=e,a;if(t[0]!==r||t[1]!==n||t[2]!==i){let e=[...uF(n,[])];e.reverse(),a=nke(r,e.map(e=>{let{config:t}=e;return i(t)}).filter(Boolean)),t[0]=r,t[1]=n,t[2]=i,t[3]=a}else a=t[3];return a}var fF={block:{icon:25,media:{width:33,height:33}},blockImage:{icon:25,media:{width:600,height:400}},compact:{icon:21,media:{width:25,height:25}},default:{icon:21,media:{width:33,height:33}},detail:{icon:25,media:{width:73,height:73}},inline:{icon:15,media:{width:15,height:15}},media:{icon:25,media:{width:160,height:160}}};function rke(e,t,n){return(0,UM.isValidElementType)(e)?(0,Q.jsx)(e,{layout:t,dimensions:n}):typeof e==`string`?(0,Q.jsx)(`div`,{children:e}):(0,X.isValidElement)(e)||e===null||typeof e==`number`||typeof e==`boolean`?e:null}function pF(e,t,n){return typeof e==`string`?e:(0,UM.isValidElementType)(e)?(0,Q.jsx)(e,{layout:t}):e||n}function ike(e){let t=ODe(e);if(t===void 0)return;let n=fF.blockImage.media,r=Math.min(n.width/t.width,1);return{width:Math.round(t.width*r),height:Math.round(t.height*r),fit:`max`,dpr:NN()}}function mF(e,t){let{apiHost:n,projectId:r}=e.config();if(!r)throw Error(`Cannot create Media Library client: missing projectId in client config`);let i=new URL(n);return i.hostname=`${r}.${i.hostname}`,e.withConfig({apiHost:i.origin,resource:{id:t,type:`media-library`}})}function hF(e,t){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,t)}function gF(e,t){return`media-library:${e}:${t}`}function ake(e){return!hF(e,`media`)||!hF(e.media,`_ref`)?!1:typeof e.media._ref==`string`}function oke(e){if(typeof e!=`string`)return!1;let[t,n,r]=e.split(`:`,3);return t===`media-library`&&!!n&&!!r}function ske(e){let t=ake(e)?e?.media?._ref:e;return oke(t)?t:void 0}var _F=new Map,vF=new sw({maxAge:3e5,maxSize:2e3});async function cke(e){let{assetIds:t,client:n,libraryId:r}=e;if(t.length===0)return[];try{let e=await n.fetch(`*[_id in $ids]{_id, cdnAccessPolicy}`,{ids:t}),i=Object.fromEntries(e.map(e=>[e._id,e.cdnAccessPolicy]));return t.map(e=>{let t=i[e],n=gF(r,e);return vF.set(n,t),t})}catch(e){return console.error(`Error fetching cdnAccessPolicy batch`,{libraryId:r,assetIds:t,error:e}),t.forEach(e=>{let t=gF(r,e);vF.set(t,void 0)}),t.map(()=>void 0)}}function lke(e,t){let n=_F.get(t);if(n)return n;let r=mF(e,t),i=new Vk.default(e=>cke({assetIds:e,client:r,libraryId:t}),{cache:!1});return _F.set(t,i),i}function uke(e,t){let[,n,r]=e.split(`:`,3);if(!n||!r||!t)return Promise.resolve(void 0);if(vF.has(e)){let t=vF.get(e)??void 0;return Promise.resolve(t)}return lke(t,n).load(r)}function yF(e){let t=(0,Z.c)(5),{client:n,source:r}=e,i;t[0]===r?i=t[1]:(i=ske(r),t[0]=r,t[1]=i);let a=i,o=!!(a&&n.config().token),s=o?a:null,c;t[2]===n?c=t[3]:(c=async e=>uke(e,n),t[2]=n,t[3]=c);let l=c,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u={dedupingInterval:0,revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1},t[4]=u):u=t[4];let{data:d,isLoading:f}=xP(s,l,u);return a?o?f?`checking`:d??`unknown`:`unknown`:`public`}var dke=`https://sanity-cdn.work`,fke=`https://api.sanity.work`,pke=`https://sanity-cdn.com`,mke=`https://api.sanity.io`;function bF(){let e=(0,Z.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={apiVersion:`vX`},e[0]=t):t=e[0];let n=ix(t),r;e[1]===n?r=e[2]:(r=n.config(),e[1]=n,e[2]=r);let{token:i}=r;return i}var xF=new Map,SF={error:null,isLoading:!1,objectUrl:void 0},CF={error:null,isLoading:!0,objectUrl:void 0};function hke(e,t){if(e&&t)return`${t}:${e}`}function wF(e){e.listeners.for
Line truncated
|
||||
`){let t=e.hardBreak;return t?t():`
|
||||
`}return e.escapeHTML(t.text)}function c(r,i,a){let o=e.types[r._type];return o||t(LPe(r._type),{nodeType:`block`,type:r._type}),(o||e.unknownType)({value:r,isInline:a,index:i,renderNode:n})}return n};function KPe(e){let{node:t,index:n,isInline:r,renderNode:i}=e,a=dT(t).map((e,t)=>i({node:e,isInline:!0,index:t,renderNode:i}));return{_key:t._key||`block-${n}`,children:a.join(``),index:n,isInline:r,node:t}}function qPe(){}function JPe(e,t,n){if(e<=0||t<=0)return[];let r=Array(e);for(let n=0;n<e;++n)r[n]=Array(t);{let i=0,a=0;for(;i<e&&n(i,0)===!1;)++i;for(;a<t&&n(0,a)===!1;)++a;r[0].fill(0,0,a),r[0].fill(1,a,t);for(let e=0;e<i;++e)r[e][0]=0;for(let t=i;t<e;++t)r[t][0]=1}for(let i=1;i<e;++i)for(let e=1;e<t;++e)if(n(i,e))r[i][e]=r[i-1][e-1]+1;else{let t=r[i][e-1],n=r[i-1][e];r[i][e]=t<n?n:t}let i=r[e-1][t-1],a=Array(i+1);for(let e=0,n=t-1,o=1;o<=i;++o){for(;r[e][n]<o;)++e;a[o]=e}let o=Array(i);for(let e=t-1,n=i;n>0;--n){let t=a[n];for(;r[t][e]<n;)++t;for(;e>=0&&r[t][e]===n;)--e;o[n-1]=[t,e+1]}return o}var YPe=Math.min;function XPe(e,t,n){for(var r=n?dw:uw,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=GC(u,iC(t))),c=YPe(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new NS(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d<i&&l.length<c;){var p=u[d],m=t?t(p):p;if(p=n||p!==0?p:0,!(f?PS(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?PS(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function ZPe(e){return Ew(e)?e:[]}var mz=Tw(function(e){var t=GC(e,ZPe);return t.length&&t[0]===e[0]?XPe(t):[]}),QPe=t(((e,t)=>{var n,r,i={'"':`"`,"\\":`\\`,"/":`/`,b:`\b`,f:`\f`,n:`
|
||||
`,r:`\r`,t:` `},a;function o(e){throw{name:`SyntaxError`,message:e,at:n,text:a}}function s(e){return e&&e!==r&&o(`Expected '`+e+`' instead of '`+r+`'`),r=a.charAt(n),n+=1,r}function c(){var e,t=``;for(r===`-`&&(t=`-`,s(`-`));r>=`0`&&r<=`9`;)t+=r,s();if(r===`.`)for(t+=`.`;s()&&r>=`0`&&r<=`9`;)t+=r;if(r===`e`||r===`E`)for(t+=r,s(),(r===`-`||r===`+`)&&(t+=r,s());r>=`0`&&r<=`9`;)t+=r,s();return e=Number(t),isFinite(e)||o(`Bad number`),e}function l(){var e,t,n=``,a;if(r===`"`)for(;s();)if(r===`"`)return s(),n;else if(r===`\\`){if(s(),r===`u`){for(a=0,t=0;t<4&&(e=parseInt(s(),16),isFinite(e));t+=1)a=a*16+e;n+=String.fromCharCode(a)}else if(typeof i[r]==`string`)n+=i[r];else break}else n+=r;o(`Bad string`)}function u(){for(;r&&r<=` `;)s()}function d(){switch(r){case`t`:return s(`t`),s(`r`),s(`u`),s(`e`),!0;case`f`:return s(`f`),s(`a`),s(`l`),s(`s`),s(`e`),!1;case`n`:return s(`n`),s(`u`),s(`l`),s(`l`),null;default:o(`Unexpected '`+r+`'`)}}function f(){var e=[];if(r===`[`){if(s(`[`),u(),r===`]`)return s(`]`),e;for(;r;){if(e.push(m()),u(),r===`]`)return s(`]`),e;s(`,`),u()}}o(`Bad array`)}function p(){var e,t={};if(r===`{`){if(s(`{`),u(),r===`}`)return s(`}`),t;for(;r;){if(e=l(),u(),s(`:`),Object.prototype.hasOwnProperty.call(t,e)&&o(`Duplicate key "`+e+`"`),t[e]=m(),u(),r===`}`)return s(`}`),t;s(`,`),u()}}o(`Bad object`)}function m(){switch(u(),r){case`{`:return p();case`[`:return f();case`"`:return l();case`-`:return c();default:return r>=`0`&&r<=`9`?c():d()}}t.exports=function(e,t){var i;return a=e,n=0,r=` `,i=m(),u(),r&&o(`Syntax error`),typeof t==`function`?function e(n,r){var i,a,o=n[r];if(o&&typeof o==`object`)for(i in m)Object.prototype.hasOwnProperty.call(o,i)&&(a=e(o,i),a===void 0?delete o[i]:o[i]=a);return t.call(n,r,o)}({"":i},``):i}})),$Pe=t(((e,t)=>{var n=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r,i,a={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,'"':`\\"`,"\\":`\\\\`},o;function s(e){return n.lastIndex=0,n.test(e)?`"`+e.replace(n,function(e){var t=a[e];return typeof t==`string`?t:`\\u`+(`0000`+e.charCodeAt(0).toString(16)).slice(-4)})+`"`:`"`+e+`"`}function c(e,t){var n,a,l,u,d=r,f,p=t[e];switch(p&&typeof p==`object`&&typeof p.toJSON==`function`&&(p=p.toJSON(e)),typeof o==`function`&&(p=o.call(t,e,p)),typeof p){case`string`:return s(p);case`number`:return isFinite(p)?String(p):`null`;case`boolean`:case`null`:return String(p);case`object`:if(!p)return`null`;if(r+=i,f=[],Object.prototype.toString.apply(p)===`[object Array]`){for(u=p.length,n=0;n<u;n+=1)f[n]=c(n,p)||`null`;return l=f.length===0?`[]`:r?`[
|
||||
`+r+f.join(`,
|
||||
`+r)+`
|
||||
`+d+`]`:`[`+f.join(`,`)+`]`,r=d,l}if(o&&typeof o==`object`)for(u=o.length,n=0;n<u;n+=1)a=o[n],typeof a==`string`&&(l=c(a,p),l&&f.push(s(a)+(r?`: `:`:`)+l));else for(a in p)Object.prototype.hasOwnProperty.call(p,a)&&(l=c(a,p),l&&f.push(s(a)+(r?`: `:`:`)+l));return l=f.length===0?`{}`:r?`{
|
||||
`+r+f.join(`,
|
||||
`+r)+`
|
||||
`+d+`}`:`{`+f.join(`,`)+`}`,r=d,l}}t.exports=function(e,t,n){var a;if(r=``,i=``,typeof n==`number`)for(a=0;a<n;a+=1)i+=` `;else typeof n==`string`&&(i=n);if(o=t,t&&typeof t!=`function`&&(typeof t!=`object`||typeof t.length!=`number`))throw Error(`JSON.stringify`);return c(``,{"":e})}})),eFe=t((e=>{e.parse=QPe(),e.stringify=$Pe()})),tFe=t(((e,t)=>{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),nFe=t(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){var t=n.call(e),r=t===`[object Arguments]`;return r||=t!==`[object Array]`&&typeof e==`object`&&!!e&&typeof e.length==`number`&&e.length>=0&&n.call(e.callee)===`[object Function]`,r}})),rFe=t(((e,t)=>{var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=nFe(),o=Object.prototype.propertyIsEnumerable,s=!o.call({toString:null},`toString`),c=o.call(function(){},`prototype`),l=[`toString`,`toLocaleString`,`valueOf`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`constructor`],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>`u`)return!1;for(var e in window)try{if(!d[`$`+e]&&r.call(window,e)&&window[e]!==null&&typeof window[e]==`object`)try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),p=function(e){if(typeof window>`u`||!f)return u(e);try{return u(e)}catch{return!1}};n=function(e){var t=typeof e==`object`&&!!e,n=i.call(e)===`[object Function]`,o=a(e),u=t&&i.call(e)===`[object String]`,d=[];if(!t&&!n&&!o)throw TypeError(`Object.keys called on a non-object`);var f=c&&n;if(u&&e.length>0&&!r.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(o&&e.length>0)for(var h=0;h<e.length;++h)d.push(String(h));else for(var g in e)!(f&&g===`prototype`)&&r.call(e,g)&&d.push(String(g));if(s)for(var _=p(e),v=0;v<l.length;++v)!(_&&l[v]===`constructor`)&&r.call(e,l[v])&&d.push(l[v]);return d}}t.exports=n})),iFe=t(((e,t)=>{var n=Array.prototype.slice,r=nFe(),i=Object.keys,a=i?function(e){return i(e)}:rFe(),o=Object.keys;a.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return r(e)?o(n.call(e)):o(e)}):Object.keys=a,Object.keys||a},t.exports=a})),aFe=t(((e,t)=>{t.exports=Object})),oFe=t(((e,t)=>{t.exports=Error})),sFe=t(((e,t)=>{t.exports=EvalError})),cFe=t(((e,t)=>{t.exports=RangeError})),lFe=t(((e,t)=>{t.exports=ReferenceError})),uFe=t(((e,t)=>{t.exports=SyntaxError})),hz=t(((e,t)=>{t.exports=TypeError})),dFe=t(((e,t)=>{t.exports=URIError})),fFe=t(((e,t)=>{t.exports=Math.abs})),pFe=t(((e,t)=>{t.exports=Math.floor})),mFe=t(((e,t)=>{t.exports=Math.max})),hFe=t(((e,t)=>{t.exports=Math.min})),gFe=t(((e,t)=>{t.exports=Math.pow})),_Fe=t(((e,t)=>{t.exports=Math.round})),vFe=t(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),yFe=t(((e,t)=>{var n=vFe();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),bFe=t(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),gz=t(((e,t)=>{var n=bFe();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),_z=t(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),xFe=t(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),SFe=t(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=xFe();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),CFe=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),wFe=t(((e,t)=>{t.exports=aFe().getPrototypeOf||null})),TFe=t(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,
Line truncated
|
||||
`+d(g,o):``,b=o?`: `:`:`;if(f&&f.toJSON&&typeof f.toJSON==`function`&&(f=f.toJSON()),f=m(t,a,f),f!==void 0){if(typeof f!=`object`||!f)return n(f);var x=function(e,t){return h&&e.length===0?t:(t===`[]`?`[`:`{`)+s(e,`,`)+y+(t===`[]`?`]`:`}`)};if(r(f)){for(var S=[],C=0;C<f.length;C++){var w=e(f,C,f[C],g+1)||n(null);S[S.length]=y+o+w}return x(S,`[]`)}if(c(v,f)!==-1){if(p)return n(`__cycle__`);throw TypeError(`Converting circular structure to JSON`)}v[v.length]=f;for(var T=u(i(f),_&&_(f)),S=[],C=0;C<T.length;C++){var a=T[C],E=e(f,a,f[a],g+1);if(E){var D=n(a)+b+E;S[S.length]=y+o+D}}return l(v,c(v,f),1),x(S,`{}`)}}({"":e},``,e,0)}}))(),1);function Sz(e,t,n,r){return e==null?[]:(HS(t)||(t=t==null?[]:[t]),n=r?void 0:n,HS(n)||(n=n==null?[]:[n]),kw(e,t,n))}function zFe({theme:e}){let{color:{syntax:t}}=xr(e);return{"&.atrule":{color:t.atrule},"&.attr-name":{color:t.attrName},"&.attr-value":{color:t.attrValue},"&.attribute":{color:t.attribute},"&.boolean":{color:t.boolean},"&.builtin":{color:t.builtin},"&.cdata":{color:t.cdata},"&.char":{color:t.char},"&.class":{color:t.class},"&.class-name":{color:t.className},"&.comment":{color:t.comment},"&.constant":{color:t.constant},"&.deleted":{color:t.deleted},"&.doctype":{color:t.doctype},"&.entity":{color:t.entity},"&.function":{color:t.function},"&.hexcode":{color:t.hexcode},"&.id":{color:t.id},"&.important":{color:t.important},"&.inserted":{color:t.inserted},"&.keyword":{color:t.keyword},"&.number":{color:t.number},"&.operator":{color:t.operator},"&.prolog":{color:t.prolog},"&.property":{color:t.property},"&.pseudo-class":{color:t.pseudoClass},"&.pseudo-element":{color:t.pseudoElement},"&.punctuation":{color:t.punctuation},"&.regex":{color:t.regex},"&.selector":{color:t.selector},"&.string":{color:t.string},"&.symbol":{color:t.symbol},"&.tag":{color:t.tag},"&.unit":{color:t.unit},"&.url":{color:t.url},"&.variable":{color:t.variable}}}function BFe(){return kr`color:var(--card-code-fg-color);& code{font-family:inherit;&.refractor .token{${zFe}}}& a{color:inherit;text-decoration:underline;border-radius:1px;}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}`}var VFe=(0,X.lazy)(()=>On(()=>import(`./refractor-CC48DwHi-B34huZKn.js`),__vite__mapDeps([15,16,9,17,18]))),HFe=J.pre.withConfig({displayName:`StyledCode`,componentId:`sc-8yzjqy-0`})(BFe,MEe);function UFe(e){let t=(0,Z.c)(23),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({children:n,language:r,ref:i,size:o,weight:s,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=o===void 0?2:o,l;t[7]===c?l=t[8]:(l=wi(c),t[7]=c,t[8]=l);let u=s,d;t[9]===n?d=t[10]:(d=(0,Q.jsx)(`code`,{children:n}),t[9]=n,t[10]=d);let f;t[11]!==n||t[12]!==r?(f=(0,Q.jsx)(VFe,{language:r,value:n}),t[11]=n,t[12]=r,t[13]=f):f=t[13];let p;t[14]!==d||t[15]!==f?(p=(0,Q.jsx)(X.Suspense,{fallback:d,children:f}),t[14]=d,t[15]=f,t[16]=p):p=t[16];let m;return t[17]!==i||t[18]!==a||t[19]!==l||t[20]!==u||t[21]!==p?(m=(0,Q.jsx)(HFe,{"data-ui":`Code`,...a,$size:l,$weight:u,ref:i,children:p}),t[17]=i,t[18]=a,t[19]=l,t[20]=u,t[21]=p,t[22]=m):m=t[22],m}var Cz=UFe,WFe=/^[A-Za-z_][A-Za-z0-9_]*$/;function GFe(e){return e.reduce((e,t,n)=>{if(Array.isArray(t))return`${e}[${t.join(`:`)}]`;if(KFe(t))return`${e}[_key=="${t._key}"]`;if(typeof t==`number`)return`${e}[${t}]`;if(typeof t==`string`&&!WFe.test(t))return`${e}['${t}']`;if(typeof t==`string`)return`${e}${n===0?``:`.`}${t}`;throw Error(`Unsupported path segment "${t}"`)},``)}function KFe(e){return typeof e==`object`&&typeof e._key==`string`}var wz=class extends Error{path;value;serializedPath;constructor(e,t,n){let r=GFe(t);super(`${e} (at '${r}')`),this.path=t,this.serializedPath=r,this.value=n}},qFe=/^[a-z0-9][a-z0-9_.-]+$/i,JFe=/^[a-zA-Z_][a-zA-Z0-9_-]*$/,YFe=/^[a-z_]/i;function XFe(e,t,n){if(!YFe.test(e))throw new wz(`Keys must start with a letter (a-z)`,n.concat(e),t);if(!JFe.test(e))throw new wz(`Keys can only contain letters, numbers and underscores`,n.concat(e),t);if(e===`_key`||e===`_ref`||e===`_type`){if(typeof t!=`string`)throw new wz(`Keys must be strings`,n.concat(e),t);if(!qFe.test(t))throw new wz(`Invalid key - use less exotic characters`,n.concat(e),t)}return e}var ZFe=[`_id`,`_type`,`_createdAt`,`_updatedAt`,`_rev`],Tz={hideWarnings:!1,diffMatchPatch:{enabled:!0,lengthThresholdAbsolute:30,lengthThresholdRelative:1.2}};function QFe(e){return{...Tz,...e,diffMatchPatch:{...Tz.diffMatchPatch,...e.diffMatchPatch||{}}}}function Ez(e,t,n=Tz,r=[],i=[]){if(e===t)return i;let a=Array.isArray(e)?`array`:typeof e,o=Array.isArray(t)?`array`:typeof t,s=a===`undefined`,c=o===`undefined`;if(s&&!c)return i.push({op:`set`,path:r,value:t}),i;if(!s&&c)return i.push({op:`unset`,path:r}),i;let l=QFe(n),u=s?o:a;return u===`object`||u===`array`?a===o?u===`array`?eIe(e,t,l,r,i):$Fe(e,t,l,r,i):(i.push({op:`set`,path:r,value:t}),i):iIe(e,t,l,r,i)}function $Fe(e,t,n,r,i){let a=r.length===0,o=Object.keys(e).filter(a?aIe:uIe).map(t=>XFe(t,e[t],r)),s=o.length,c=Object.keys(t
Line truncated
|
||||
`)>=0)return!1;return!0}function Se(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=C.call(Array(e.indent+1),` `);else return null;return{base:n,prev:C.call(Array(t+1),n)}}function Ce(e,t){if(e.length===0)return``;var n=`
|
||||
`+t.prev+t.base;return n+C.call(e,`,`+n)+`
|
||||
`+t.prev}function K(e,t){var n=H(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=se(e,i)?t(e[i],e):``}var a=typeof D==`function`?D(e):[],o;if(k){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e)se(e,c)&&(n&&String(Number(c))===c&&c<e.length||k&&o[`$`+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))));if(typeof D==`function`)for(var l=0;l<a.length;l++)j.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}}))(),1);function oRe(e,t){return e.name===t?!0:e.type?oRe(e.type,t):!1}var sRe=class{#e=[];#t;constructor(e){this.#t=performance.now(),this.#e=e}async map(e,t){let n=[];for(let r of e){let e=this._tryPause();e&&await e,n.push(t(r))}return n}async forEach(e,t){for(let n of e){let e=this._tryPause();e&&await e,t(n)}}async forEachIter(e,t){for(let n of e){let e=this._tryPause();e&&await e,t(n)}}end(){this.#e.push(performance.now()-this.#t)}_tryPause(){let e=performance.now()-this.#t;if(!(e<8.333333333333334))return this.#e.push(e),new Promise(e=>{let t=()=>{this.#t=performance.now(),e()};typeof requestIdleCallback==`function`?requestIdleCallback(t,{timeout:1}):typeof requestAnimationFrame==`function`?requestAnimationFrame(t):setTimeout(t,0)})}},cRe={async map(e,t){return e.map(t)},async forEach(e,t){return e.forEach(t)},async forEachIter(e,t){for(let n of e)t(n)}},lRe=class{cache=new WeakMap;async get(e,t){let n=this.cache.get(e);if(n)return n;let r,i=t?.scheduler||(t?.pauseDurations?r=new sRe(t.pauseDurations):cRe),a={fields:new Map,duplicateFields:new Map,arrayElements:new Map,duplicateArrayElements:new Map},o=await i.map(e.getLocalTypeNames(),t=>({name:t,typeDef:Xz(e.get(t),t,a)})),s=new Map;for(let[e,t]of a.duplicateFields.entries())s.set(e,{__type:`hoisted`,key:t});for(let[e,t]of a.duplicateArrayElements.entries())s.set(e,{__type:`hoisted`,key:t});let c=new eRe({rewriteMap:s});return await i.forEachIter(a.duplicateFields.entries(),([e,t])=>{c.addObject(`sanity.schema.hoisted`,{key:t,value:{...e}})}),await i.forEachIter(a.duplicateArrayElements.entries(),([e,t])=>{c.addObject(`sanity.schema.hoisted`,{key:t,value:{...e}})}),await i.forEach(o,e=>{c.addObject(`sanity.schema.namedType`,e)}),e.parent&&c.addSet(await this.get(e.parent,{scheduler:i})),n=c.build(`sanity.schema.registry`),this.cache.set(e,n),r&&r.end(),n}};function uRe(e){return`_internal_ownProps`in e?e[KE]:e}function dRe(e,t,n){let r=uRe(e),i;Array.isArray(r.fields)&&(i=r.fields.map(e=>{let r=`${t}.${e.name}`,i=n.fields.get(e);if(i){let e=n.duplicateFields.get(i);return(!e||PRe(r,e))&&n.duplicateFields.set(i,r),i}let{name:a,group:o,fieldset:s,type:c}=e,l={name:a,typeDef:Xz(c,r,n),groups:mRe(o),fieldset:s};return n.fields.set(e,l),l}));let a;Array.isArray(r.fieldsets)&&(a=eB(`name`,r.fieldsets.map(({name:e,title:t,description:n,group:r,hidden:i,readOnly:a,options:o})=>({name:e,title:Zz(t),description:Zz(n),group:Zz(r),hidden:$z(i),readOnly:$z(a),options:tB(o)}))));let o;Array.isArray(r.groups)&&(o=eB(`name`,r.groups.map(({name:e,title:t,hidden:n,default:r,i18n:i})=>({name:e,title:Zz(t),hidden:$z(n),default:Qz(r),i18n:ARe(i)}))));let s=dx(r.deprecated)&&`reason`in r.deprecated?r.deprecated.reason:void 0,c;return Array.isArray(r.orderings)&&(c=r.orderings.map(MRe).filter(e=>e!==void 0)),{title:Zz(r.title),description:bRe(r.description),readOnly:$z(r.readOnly),hidden:$z(r.hidden),liveEdit:Qz(r.liveEdit),options:tB(r.options),initialValue:tB(r.initialValue),deprecated:typeof s==`string`?{reason:s}:void 0,placeholder:Zz(r.placeholder),rows:pRe(r.rows),fields:i,fieldsets:a,groups:o,validation:xRe(r),orderings:c}}function Xz(e,t,n){let r=dRe(e,t,n);if(!e.type)return{extends:null,jsonType:e.jsonType,...r};switch(e.type.name){case`array`:return{extends:`array`,of:e.of.map((e,r)=>{let i=`${t}.${e.name}`,a=n.arrayElements.get(e);if(a){let e=n.duplicateArrayElements.get(a);return(!e||PRe(i,e))&&n.duplicateArrayElements.set(a,i),a}let o={name:e.name,typeDef:Xz(e,`${t}.${e.name}`,n)};return n.arrayElements.set(e,o),o}),...r};case`reference`:case`globalDocumentReference`:case`crossDatasetReference`:{let t=uRe(e);return{extends:e.type.name,to:eB(`name`,e.to.map(e=>({name:e.name||e.type?.name||e.type}))),weak:Qz(t.weak),...r}}default:return{extends:e.type.name,...r,marks:fRe(e)}}}function fRe(e){if(e.jsonType!==`object`||!oRe(e,`block`))return;let t=(e.fields?.find(e=>e.name===`children`)?.type?.of)?.find(e=>e.name===`span`);if(!t||!zn(t))return;let n=tB(t.decorators);return n===void 0?void 0:{decorators:n}}function Zz(e){return typeof e==`string`?e:void 0}function pRe(e){return typeof e==`number`?e.toString():void 0}function Qz(e){return e===!0||void 0}function $z(e){return typeof e==`function`?hRe:Qz(e)}function eB(e,t){return t.filter(t=>typeof t[e]==`string`)}function mRe(e){if(typeof e==`string`)return[e];if(Array.isArray(e))return e.filter(e=>typeof e==`string`)}var hRe={__type:`function`},gRe={__type:`unknown`},_Re={__type:`undefined`},vRe={__type:`cyclic`},yRe={__type:
Line truncated
|
||||
`));let a=`${DB}.${r}`;return{safeBaseId:a,safeTaggedId:`${a}${n?`.tag.${n}`:``}`,idWarning:i}}function AB(e){return e.type===`block`}function iBe(e){return e.type===`object`}function aBe(e,t){return AB(e)?oBe(e,t):iBe(e)?sBe(e,t):e}function jB(e,t){return{styles:e.styles?e.styles.map(e=>({...e,value:e.name})):t.styles,decorators:e.decorators?e.decorators.map(e=>({...e,value:e.name})):t.decorators,annotations:e.annotations?e.annotations.map(e=>({...e,fields:e.fields?.map(e=>MB(e,t))??[]})):t.annotations,lists:e.lists?e.lists.map(e=>({...e,value:e.name})):t.lists,inlineObjects:e.inlineObjects?e.inlineObjects.map(e=>({...e,fields:e.fields?.map(e=>MB(e,t))??[]})):t.inlineObjects}}function oBe(e,t){return{...e,...jB(e,t)}}function sBe(e,t){return{...e,fields:e.fields.map(e=>MB(e,t))}}function MB(e,t){if(e.type===`array`&&e.of){let n=e.of.find(AB),r=n?jB(n,t):t;return{...e,of:e.of.map(e=>e===n?{...e,...r}:aBe(e,r))}}return e}function NB(e){return{...e,value:e.name}}function PB(e){let t=(e.styles??[]).map(NB),n=t.some(e=>e.value===`normal`)?t:[{value:`normal`,name:`normal`,title:`Normal`},...t],r=(e.lists??[]).map(NB),i=(e.decorators??[]).map(NB),a={styles:n,decorators:i,annotations:(e.annotations??[]).map(e=>({...e,fields:e.fields??[]})),lists:r,inlineObjects:(e.inlineObjects??[]).map(e=>({...e,fields:e.fields??[]}))},o=[];if(e.block?.fields)for(let t of e.block.fields){if(t.name===`_type`||t.name===`_key`||t.name===`children`||t.name===`markDefs`||t.name===`style`||t.name===`listItem`||t.name===`level`){console.warn(`"${t.name}" is a reserved field name on Portable Text blocks`);continue}o.push(MB(t,a))}return{block:{name:e.block?.name??`block`,...o.length>0?{fields:o}:{}},span:{name:`span`},styles:n,lists:r,decorators:i,annotations:(e.annotations??[]).map(e=>({...e,fields:e.fields?.map(e=>MB(e,a))??[]})),blockObjects:(e.blockObjects??[]).map(e=>({...e,fields:e.fields?.map(e=>MB(e,a))??[]})),inlineObjects:(e.inlineObjects??[]).map(e=>({...e,fields:e.fields?.map(e=>MB(e,a))??[]}))}}function FB(e){if(e)return e.map(e=>({...e,value:e.name}))}function IB(e){if(e)return e.map(e=>({...e,fields:e.fields??[]}))}function LB(e,t){let n=t.find(e=>e.type===`block`),r=t.filter(e=>e.type!==`block`).map(t=>{let n=t,r=n.name??n.type;if(n.fields===void 0&&n.type!==`object`){let t=e.blockObjects.find(e=>e.name===r);if(t)return t}return{name:r,title:n.title,fields:n.fields??[]}});return n?{block:{name:n.name??e.block.name,fields:e.block.fields},span:{name:e.span.name},styles:FB(n.styles)??e.styles,decorators:FB(n.decorators)??e.decorators,annotations:IB(n.annotations)??e.annotations,lists:FB(n.lists)??e.lists,inlineObjects:IB(n.inlineObjects)??e.inlineObjects,blockObjects:r}:{block:{name:e.block.name,fields:e.block.fields},span:{name:e.span.name},styles:[],decorators:[],annotations:[],lists:[],inlineObjects:[],blockObjects:r}}function RB(e){return e}function zB(e){return cBe(e)&&typeof e._type==`string`}function cBe(e){return!!e&&(typeof e==`object`||typeof e==`function`)}function BB(e,t){return!(!zB(t)||t._type!==e.schema.block.name||!Array.isArray(t.children))}function VB(e,t){return!(!zB(t)||t._type!==e.schema.span.name||typeof t.text!=`string`)}function HB(e){return typeof e==`object`&&!!e&&`_key`in e}function UB(e){return e.reduce((e,t,n)=>HB(t)?`${e}[_key=="${t._key}"]`:`${e}${n===0?``:`.`}${t}`,``)}function WB(e){return GB(e)&&typeof e._type==`string`}function GB(e){return!!e&&(typeof e==`object`||typeof e==`function`)}function KB(e,t,n){let r=lBe(e,n,t);if(!r)return;let i=t[r.field.name];if(Array.isArray(i))return{children:i,container:r}}function lBe(e,t,n){if(t?.of){for(let e of t.of)if(e.type===n._type)return`field`in e?e:void 0}return e.get(n._type)}function qB(e,t){let n=e.context.value,r=`value`,i=[],a=!0,o;for(let s of t){if(typeof s==`string`)continue;let t;if(HB(s)){let o=a?[{_key:s._key}]:[...i,r,{_key:s._key}],c=e.blockIndexMap.get(UB(o));t=c!==void 0&&n[c]?._key===s._key?n[c]:n.find(e=>e._key===s._key)}else typeof s==`number`&&(t=n.at(s));if(!t)return[];i=a?[{_key:t._key}]:[...i,r,{_key:t._key}],a=!1;let c=JB(e.context,t,o);if(!c)return[];n=c.children,r=c.fieldName,o=c.parent}return n.map(e=>({node:e,path:a?[{_key:e._key}]:[...i,r,{_key:e._key}]}))}function JB(e,t,n){if(BB(e,t))return{children:t.children,fieldName:`children`,parent:void 0};if(WB(t)){let r=KB(e.containers,t,n);if(r)return{children:r.children,fieldName:r.container.field.name,parent:r.container}}if(`value`in t&&Array.isArray(t.value)&&!(`_key`in t)&&!(`_type`in t))return{children:t.value,fieldName:`value`,parent:void 0}}function YB(e,t){let n=XB(e,t);return n.status===`found`?n.entry:void 0}function XB(e,t){if(t.length===0)return{status:`missing`};let{context:n,blockIndexMap:r}=e,i=n.value,a,o,s,c=[];for(let e=0;e<t.length;e++){let l=t[e];if(typeof l==`string`){if(a!==void 0&&l===a){c.push(l);continue}for(let n=e+1;n<t.length;n++){let e=t[n];if(HB(e)||typeof e==`number`)return{status:`unreachable`}}break}if(HB(l)){c.push(l);let e=r.get(UB(c));e!=
Line truncated
|
||||
`)}});if(l!==void 0)return a(l)}},{deserialize(e){if(LU(e)&&nW(e)&&rW(e)&&aW(e)&&i)return oW(e,`previous`)&&oW(e,`next`)?[]:void 0}},{deserialize(t,n){if(LU(t)&&jU(t)===`span`&&nW(t)){if(!t.textContent)return!t.previousSibling&&!t.nextSibling&&t.setAttribute(`data-lonely-child`,`true`),n(t.childNodes);let r={...EU,marks:[],text:t.textContent};return hHe(t)&&r.marks.push(`strong`),gHe(t)&&r.marks.push(`underline`),_He(t)&&r.marks.push(`strike-through`),mHe(t)&&r.marks.push(`em`),IU(t)&&e.decorators.some(e=>e.name===`code`)&&r.marks.push(`code`),r}}},{deserialize(t,n){if(jU(t)===`li`&&nW(t))return{...TU,listItem:vHe(t),level:yHe(t),style:xHe(e,t),children:n(t.firstChild?.childNodes||[])}}},{deserialize(e){if(jU(e)===`br`&&nW(e)&&LU(e)&&Array.from(e.classList).some(e=>e.toLowerCase()===`apple-interchange-newline`))return[];if(jU(e)===`br`&&nW(e)&&LU(e)&&e?.parentNode?.textContent===``||jU(e)===`br`&&nW(e)&&LU(e)&&rW(e))return{...EU,text:``}}}]}var CHe={deserialize(e){return e.nodeName===`#text`&&wHe(e)?{...EU,marks:[],text:(e.textContent??``).replace(/\s\s+/g,` `)}:void 0}};function wHe(e){let t=e.nodeType===3&&(e.textContent||``).replace(/[\r\n]/g,` `).replace(/\s\s+/g,` `)===` `,n=e.nextSibling&&e.nextSibling.nodeType!==3&&e.previousSibling&&e.previousSibling.nodeType!==3,r=e.parentNode&&jU(e.parentNode)===`span`&&!e.nextSibling&&!e.previousSibling&&e.parentNode.previousSibling&&e.parentNode.previousSibling.nodeType!==3&&e.parentNode.nextSibling&&e.parentNode.nextSibling.nodeType!==3;return(t&&(n||r)||e.textContent!==` `)&&jU(e.parentNode)!==`body`}function THe(e,t){if(t===`ul`&&e.lists.some(e=>e.name===`bullet`))return`bullet`;if(t===`ol`&&e.lists.some(e=>e.name===`number`))return`number`}function EHe(e,t){return[CHe,{deserialize(n,r,i){if(jU(n)!==`pre`)return;let a=n.textContent||``,o=t.matchers?.code?.({context:{schema:e,keyGenerator:t.keyGenerator??RU},props:{language:void 0,code:a.trim()}});if(o!==void 0)return i(o);let s=e.decorators.some(e=>e.name===`code`);return{_type:`block`,style:`normal`,markDefs:[],children:[{...EU,marks:s?[`code`]:[],text:a}]}}},{deserialize(e,t){if(jU(e)!==`blockquote`)return;let n={...DU,...kU};delete n.blockquote;let r=Object.keys(n),i=[];return e.childNodes.forEach((t,n)=>{if(e.ownerDocument){if(t.nodeType===1&&r.includes(t.localName.toLowerCase())){let r=e.ownerDocument.createElement(`span`),a=i[i.length-1];a&&a.nodeType===3&&a.textContent?.trim()&&r.appendChild(e.ownerDocument.createTextNode(`\r`)),t.childNodes.forEach(e=>{r.appendChild(e.cloneNode(!0))}),n!==e.childNodes.length&&r.appendChild(e.ownerDocument.createTextNode(`\r`)),i.push(r)}else i.push(t)}}),{_type:`block`,style:`blockquote`,markDefs:[],children:t(i)}}},{deserialize(t,n){let r={...DU,...kU},i=jU(t),a=i?r[i]:void 0;if(!a)return;if(t.parentNode&&jU(t.parentNode)===`li`)return n(t.childNodes);let o=a.style;return e.styles.some(e=>e.name===o)||(a=TU),{...a,children:n(t.childNodes)}}},{deserialize(e,t){let n=jU(e);if(n&&n in hVe)return t(e.childNodes)}},{deserialize(e,t){if(jU(e)===`div`)return t(e.childNodes)}},{deserialize(e,t){let n=jU(e);if(n&&n in OU)return t(e.childNodes)}},{deserialize(e){if(jU(e)===`br`)return{...EU,text:`
|
||||
`}}},{deserialize(t,n,r){let i=jU(t),a=i?_Ve[i]:void 0;if(!a)return;let o=jU(t.parentNode)||``,s=THe(e,OU[o]?o:`ul`);return s?(a.listItem=s,{...a,children:n(t.childNodes)}):r({_type:`block`,children:n(t.childNodes)})}},{deserialize(t,n){let r=gVe[jU(t)||``];if(r&&e.decorators.some(e=>e.name===r))return{_type:`__decorator`,name:r,children:n(t.childNodes)}}},{deserialize(n,r){if(jU(n)!==`a`)return;let i=e.annotations.some(e=>e.name===`link`),a=LU(n)&&n.getAttribute(`href`);return a?i?{_type:`__annotation`,markDef:{_key:t.keyGenerator?t.keyGenerator():RU(),_type:`link`,href:a},children:r(n.childNodes)}:n.appendChild(n.ownerDocument.createTextNode(` (${a})`))&&r(n.childNodes):r(n.childNodes)}},{deserialize(e,t){if(LU(e)&&(jU(e)===`td`||jU(e)===`th`))return{...TU,children:t(e.childNodes)}}},{deserialize(n){if(LU(n)&&jU(n)===`img`){let r=n.getAttribute(`src`)??void 0,i=n.getAttribute(`alt`)??void 0,a=Object.fromEntries(Array.from(n.attributes).map(e=>[e.name,e.value])),o=n?.parentElement?.parentElement?.getAttribute(`data-lonely-child`),s=n.closest(`li`)!==null;if(o&&!s){let n=t.matchers?.image?.({context:{schema:e,keyGenerator:t.keyGenerator??RU},props:{...a,...r?{src:r}:{},...i?{alt:i}:{}}});if(n)return{_type:`__block`,block:n}}let c=t.matchers?.inlineImage?.({context:{schema:e,keyGenerator:t.keyGenerator??RU},props:{...a,...r?{src:r}:{},...i?{alt:i}:{}}});if(c)return c;let l=t.matchers?.image?.({context:{schema:e,keyGenerator:t.keyGenerator??RU},props:{...a,...r?{src:r}:{},...i?{alt:i}:{}}});if(l)return{_type:`__block`,block:l}}}}]}function DHe(e){let t=LU(e)&&e.getAttribute(`style`);return/font-style:italic/.test(t||``)}function OHe(e){let t=LU(e)&&e.getAttribute(`style`);return/font-weight:700/.test(t||``)||/font-weight:600/.test(t||``)}function kHe(e){let t=LU(e)&&e.getAttribute(`style`);return/text-decoration:underline/.test(t||``)}function AHe(e){return LU(e)&&!!e.getAttribute(`data-is-notion`)}function jHe(){return[{deserialize(e){if(LU(e)&&jU(e)===`span`&&AHe(e)){let t={...EU,marks:[],text:e.textContent};return OHe(e)&&t.marks.push(`strong`),kHe(e)&&t.marks.push(`underline`),DHe(e)&&t.marks.push(`em`),t}}}]}function MHe(e){if(!LU(e))return{};let t=e.closest(`body`)||e.ownerDocument?.body;if(!t)return{};let n=t.getAttribute(`data-word-list-styles`);if(!n)return{};try{return JSON.parse(n)}catch{return{}}}function NHe(e){let t=LU(e)&&e.getAttribute(`style`);if(!t)return;let n=t.match(/mso-list:\s*(l\d+)\s+(level\d+)\s+lfo\d+/);if(!n)return;let r=`${n[1]}:${n[2]}`;return MHe(e)[r]||`bullet`}function PHe(e){let t=LU(e)&&e.getAttribute(`style`);if(!t)return;let n=t.match(/level\d+/);if(!n)return;let[r]=n[0].match(/\d/)||[];return(r?Number.parseInt(r,10):1)||1}function FHe(e){if(!LU(e))return!1;if(e.className&&(e.className===`MsoListParagraphCxSpFirst`||e.className===`MsoListParagraphCxSpMiddle`||e.className===`MsoListParagraphCxSpLast`))return!0;let t=e.getAttribute(`style`);return!!(t&&/mso-list:\s*l\d+\s+level\d+\s+lfo\d+/.test(t))}function IHe(e){let t=jU(e);if(t&&kU[t])return kU[t]?.style}function LHe(){return[{deserialize(e,t){let n=jU(e);if((n===`p`||kU[n||``])&&FHe(e)){let n=IHe(e);return{...TU,listItem:NHe(e),level:PHe(e),style:n||`normal`,children:t(e.childNodes)}}}}]}function RHe(e,t){return[...LHe(),...pHe(e,t),...jHe(),...SHe(e,t),...EHe(e,t)]}function zHe(e,t,n){let r=[],i=0;for(let a of n){let n=BB(e,a)?BHe(a):a;if(t===`preserve`){r.push(n);continue}if(t===`remove`){if(sW(e,n))continue;r.push(n);continue}if(t===`normalize`){if(sW(e,n)){i++,i===1&&r.push(n);continue}r.push(n),i=0}}return r}function sW(e,t){return!(!BB(e,t)||t.children.some(t=>!VB(e,t)||t.text.trim()!==``))}function BHe(e){let t=0;for(let n of e.children){if(!MU(n)){t++;continue}let r=VHe(e,t),i=HHe(e,t);t===0&&(n.text=n.text.replace(/^[^\S\n]+/g,``)),t===e.children.length-1&&(n.text=n.text.replace(/[^\S\n]+$/g,``)),/\s/.test(n.text.slice(Math.max(0,n.text.length-1)))&&r&&MU(r)&&/\s/.test(r.text.slice(0,1))&&(n.text=n.text.replace(/[^\S\n]+$/g,``)),/\s/.test(n.text.slice(0,1))&&i&&MU(i)&&/\s/.test(i.text.slice(Math.max(0,i.text.length-1)))&&(n.text=n.text.replace(/^[^\S\n]+/g,``)),n.text||e.children.splice(t,1),i&&Array.isArray(i.marks)&&xU(i.marks,n.marks)&&cW(n.text)?(i.text+=` `,e.children.splice(t,1)):r&&Array.isArray(r.marks)&&xU(r.marks,n.marks)&&cW(n.text)&&(r.text=` ${r.text}`,e.children.splice(t,1)),t++}return e}function VHe(e,t){let n=e.children[t+1];return n&&n._type===`span`?n:null}function HHe(e,t){let n=e.children[t-1];return n&&n._type===`span`?n:null}function cW(e){return[`\xA0`,` `].includes(e)}function lW(e){"@babel/helpers - typeof";return lW=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},lW(e)}function UHe(e,t){if(lW(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(lW(r)!=`object`)return r;throw TypeError(`Line truncated
|
||||
`,(t===0||t===o.children.length-1)&&o.children.splice(t,1))});break}}return r||t(e.childNodes)||[]}),uW(this,`deserializeDecorator`,e=>{let{name:t}=e,n=e=>{if(PU(e))return this.deserializeDecorator(e);if(MU(e))e.marks=e.marks||[],e.text.trim()&&e.marks.unshift(t);else if(`children`in e&&Array.isArray(e.children)){let t=e;t.children=t.children.map(n)}return e};return e.children.reduce((e,t)=>{let r=n(t);return Array.isArray(r)?e.concat(r):(e.push(r),e)},[])}),uW(this,`deserializeAnnotation`,e=>{let{markDef:t}=e;this._markDefs.push(t);let n=e=>{if(FU(e))return this.deserializeAnnotation(e);if(MU(e))e.marks=e.marks||[],e.text.trim()&&e.marks.unshift(t._key);else if(`children`in e&&Array.isArray(e.children)){let t=e;t.children=t.children.map(n)}return e};return e.children.reduce((e,t)=>{let r=n(t);return Array.isArray(r)?e.concat(r):(e.push(r),e)},[])});let{rules:n=[],whitespaceMode:r=`preserve`}=t,i=RHe(e,{keyGenerator:t.keyGenerator,matchers:t.matchers});this.schema=e,this.keyGenerator=t.keyGenerator??RU,this.rules=[...n,...i],this.whitespaceMode=r;let a=t.parseHtml||yVe();this.parseHtml=e=>{let t=AVe(e),n=a(t);for(let e of fHe)e(t,n);return n.body}}};function KHe(e){return({context:t,value:n,isInline:r})=>{let i=(r?t.schema.inlineObjects:t.schema.blockObjects).find(t=>t.name===e.name);if(!i)return;let a=i.fields.reduce((e,t)=>{let r=n[t.name];return r!==void 0&&(e[t.name]=r),e},{});return{_key:t.keyGenerator(),_type:i.name,...a}}}var qHe=({context:e,value:t,isInline:n})=>{let r=KHe(UU)({context:e,value:t,isInline:n});if(r&&`code`in r)return r};function dW(e,t={}){let n=t.schema??KVe,r=t.keyGenerator,i=JHe(t.types);return new GHe(n,{keyGenerator:r,rules:t.rules,parseHtml:t.parseHtml,whitespaceMode:t.whitespaceMode,matchers:i}).deserialize(e).map(e=>EVe(e,{keyGenerator:r}))}function JHe(e){let t=e?.image,n=e?.code??qHe;if(!t&&!n)return;let r={};if(t){let e=e=>({context:n,props:r})=>{let i=t({context:n,value:r,isInline:e});if(i)return i};r.image=e(!1),r.inlineImage=e(!0)}return n&&(r.code=({context:e,props:t})=>{let r=n({context:e,value:t,isInline:!1});if(r)return r}),r}var fW=`before`,pW=`after`;function YHe(e,t,n,...r){if(t!==fW&&t!==pW)throw Error(`Invalid position "${t}", must be either ${fW} or ${pW}`);let i=mW(...r);if(e.length===0)return i;let a=e.length,o=Math.abs((a+n)%a)%a,s=t===`after`?o+1:o,c=e.slice();return c.splice(s,0,...mW(i)),c}function mW(...e){return e.reduce((e,t)=>e.concat(t),[])}function XHe(e){return typeof e==`object`&&!!e&&`_key`in e}function ZHe(e,t){if(typeof t==`number`)return t;if(XHe(t)){let n=e.findIndex(e=>e._key===t._key);return n!==-1&&n}return!1}function QHe(e,t){let n=e.slice();if(t.path.length===0){if(t.type===`setIfMissing`){if(!Array.isArray(t.value))throw Error(`Cannot set value of an array to a non-array`);return e===void 0?t.value:e}if(t.type===`set`){if(!Array.isArray(t.value))throw Error(`Cannot set value of an array to a non-array`);return t.value}if(t.type===`unset`)return;throw Error(`Invalid array operation: ${t.type}`)}let[r,...i]=t.path,a=ZHe(e,r);if(a===!1)return n;if(i.length===0){if(t.type===`insert`){let{position:n,items:r}=t;return YHe(e,n,a,r)}if(t.type===`unset`){if(typeof a!=`number`)throw Error(`Expected array index to be a number, instead got "${a}"`);return n.splice(a,1),n}}return n[a]=gW(n[a],{...t,path:i}),n}function $He(e,t){if(t.path.length>0)throw Error(`Cannot apply deep operations on primitive values. Received patch with type "${t.type}" and path "${t.path.map(e=>JSON.stringify(e)).join(`.`)} that targeted the value "${JSON.stringify(e)}"`);if(t.type===`set`)return t.value;if(t.type===`setIfMissing`)return e===void 0?t.value:e;if(t.type!==`unset`){if(t.type===`inc`){if(typeof t.value!=`number`)throw Error(`Cannot increment with a non-number`);return e+t.value}if(t.type===`dec`){if(typeof t.value!=`number`)throw Error(`Cannot decrement with a non-number`);return e-t.value}throw Error(`Received patch of unsupported type: "${JSON.stringify(t.type)}" for number. This is most likely a bug.`)}}function eUe(e,t){let n={...e};if(t.path.length===0){if(t.type===`set`){if(typeof t.value==`object`&&t.value!==null&&!Array.isArray(t.value))return t.value;throw Error(`Cannot set value of an object to a non-object`)}if(t.type===`setIfMissing`){if(typeof t.value==`object`&&t.value!==null&&!Array.isArray(t.value))return e;throw Error(`Cannot setIfMissing value of an object to a non-object`)}if(t.type===`unset`)return;throw Error(`Invalid object operation: ${t.type}`)}let[r,...i]=t.path;if(typeof r!=`string`)throw Error(`Expected field name to be a string, instead got: ${r}`);if(i.length===0&&t.type===`unset`){let{[r]:e,...t}=n;return t}return!(r in n)&&i.length>0||(n[r]=gW(n[r],{...t,path:i})),n}function tUe(e,t){if(t.path.length>0)throw Error(`Cannot apply deep operations on primitive values. Received patch with type "${t.type}" and path "${t.path.map(e=>JSON.stringify(e)).join(`.`)} that targeted the value "${JSON.stringify(e)}"`);if(t.type===`set`)return t.
Line truncated
|
||||
|
||||
`))&&u--}if(GW&&!l&&!r){let n=c.hasAttribute(`data-pt-block`)||c.getAttribute(`data-pt-inline`)===`span`?c:c.closest(`[data-pt-block], [data-pt-inline="span"]`);if(n&&QW.hasDOMNode(e,n,{editable:!0})){let r=NW(n);if(!r){if(i)return null;throw Error(`Cannot map DOM position to an editor location: ${t}`)}let a=VW(e,r),{path:o}=a,{offset:c}=a;return n.querySelector(`[data-pt-marks]`)||(c=s),{path:o,offset:c}}}if(!l&&c){if(o instanceof HTMLElement&&o.getAttribute(`data-pt-block`)===`container`){let t=o.childNodes[s];if(t instanceof HTMLElement&&QW.hasDOMNode(e,t)){let e=t.closest(`[data-pt-block="object"], [data-pt-inline="object"]`);if(e){let t=NW(e);if(t)return{path:t,offset:0}}}}let t=c.closest(`[data-pt-block]`)??(c.hasAttribute(`data-pt-block`)?c:null);if(t&&QW.hasDOMNode(e,t)){let e=t.closest(`[data-pt-block="object"], [data-pt-inline="object"]`);if(e){let t=NW(e);if(t)return{path:t,offset:0}}}}if(!l){if(i)return null;throw Error(`Cannot map DOM position to an editor location: ${t}`)}let d=NW(l);if(!d){if(i)return null;throw Error(`Cannot map DOM position to an editor location: ${t}`)}if(d.length>1){let t=d.slice(0,-1),n=YB(e.snapshot,t);if(n&&OV(e.snapshot,n.node,t))return{path:t,offset:0}}return{path:d,offset:u}},toEditorSelection:(e,t,n)=>{let{exactMatch:r,suppressThrow:i}=n,a=TW(t)?t.anchorNode:t.startContainer,o=null,s=0,c=null,l=0,u=!1;if(a){if(TW(t)){if(KW&&t.rangeCount>1){c=t.focusNode;let e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);if(c instanceof HTMLTableRowElement&&e.startContainer instanceof HTMLTableRowElement&&n.startContainer instanceof HTMLTableRowElement){let t=e=>e.childElementCount>0?t(e.children[0]):e,r=e.startContainer,i=n.startContainer,a=t(r.children[e.startOffset]),u=t(i.children[n.startOffset]);l=0,o=u.childNodes.length>0?u.childNodes[0]??null:u,c=a.childNodes.length>0?a.childNodes[0]??null:a,s=u instanceof HTMLElement?u.innerHTML.length:0}else e.startContainer===c?(o=n.endContainer,s=n.endOffset,l=e.startOffset):(o=e.startContainer,s=e.endOffset,l=n.startOffset)}else o=t.anchorNode,s=t.anchorOffset,c=t.focusNode,l=t.focusOffset;u=JW&&cUe(o)||KW?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed}else o=t.startContainer,s=t.startOffset,c=t.endContainer,l=t.endOffset,u=t.collapsed}if(o==null||c==null||s==null||l==null){if(i)return null;throw Error(`Cannot map DOM range to an editor selection: ${t}`)}KW&&c.textContent?.endsWith(`
|
||||
|
||||
`)&&l===c.textContent.length&&l--;let d=QW.toSelectionPoint(e,[o,s],{exactMatch:r,suppressThrow:i});if(!d)return null;let f=kW(o,c)||o===c&&l<s,p=u?d:QW.toSelectionPoint(e,[c,l],{exactMatch:r,suppressThrow:i,searchDirection:f?`forward`:`backward`});return p?{anchor:d,focus:p}:null}};function $W(e,t={}){let{edge:n=`anchor`}=t,r=e.snapshot.context.selection;if(r){if(n===`anchor`)e.select(r.anchor);else if(n===`focus`)e.select(r.focus);else if(n===`start`){let[t]=cV(r,e.snapshot.context);e.select(t)}else if(n===`end`){let[,t]=cV(r,e.snapshot.context);e.select(t)}}}function eG(e){let t=e.snapshot.context.selection;t&&e.apply({type:`set.selection`,properties:t,newProperties:null})}function tG(e,t){return BW(e,t,{edge:`end`})}var nG=(e,t=!1)=>{let n=!t,r=t?DUe(e):e,i=aG.None,a=aG.None,o=0,s=null,c=null,l=null;for(let t of r){let r=t.codePointAt(0);if(!r)break;let u=HUe(t,r);if([i,a]=n?[a,u]:[u,i],lG(i,aG.ZWJ)&&lG(a,aG.ExtPict)&&(s=KUe(n?e.substring(0,o):e.substring(0,e.length-o)),!s)||lG(i,aG.RI)&&lG(a,aG.RI)&&(c=c===null?n?!0:XUe(e.substring(0,e.length-o)):!c,!c)||lG(i,aG.InCBLinker|aG.InCBExtend)&&lG(a,aG.InCBConsonant)&&(l=JUe(n?e.substring(0,o):e.substring(0,e.length-o)),!l)||i!==aG.None&&a!==aG.None&&WUe(i,a))break;o+=t.length}return o||1},CUe=/\s/,wUe=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,TUe=/['\u2018\u2019]/,EUe=(e,t=!1)=>{let n=0,r=!1;for(;e.length>0;){let i=nG(e,t),[a,o]=rG(e,i,t);if(iG(a,o,t))r=!0,n+=i;else if(!r)n+=i;else break;e=o}return n},rG=(e,t,n)=>{if(n){let n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},iG=(e,t,n=!1)=>{if(CUe.test(e))return!1;if(TUe.test(e)){let[e,r]=rG(t,nG(t,n),n);if(iG(e,r,n))return!0}return!wUe.test(e)},DUe=function*(e){let t=e.length-1;for(let n=0;n<e.length;n++){let r=e.charAt(t-n);if(kUe(r.charCodeAt(0))){let i=e.charAt(t-n-1);if(OUe(i.charCodeAt(0))){yield i+r,n++;continue}}yield r}},OUe=e=>e>=55296&&e<=56319,kUe=e=>e>=56320&&e<=57343,aG={None:0,Extend:1,ZWJ:2,RI:4,Prepend:8,SpacingMark:16,L:32,V:64,T:128,LV:256,LVT:512,ExtPict:1024,Any:2048,InCBConsonant:4096,InCBExtend:8192,InCBLinker:16384},AUe=/^[\p{Gr_Ext}\p{EMod}]$/u,jUe=/^[\u0600-\u0605\u06DD\u070F\u0890-\u0891\u08E2\u0D4E\u{110BD}\u{110CD}\u{111C2}-\u{111C3}\u{1193F}\u{11941}\u{11A3A}\u{11A84}-\u{11A89}\u{11D46}]$/u,MUe=/^[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E-\u094F\u0982-\u0983\u09BF-\u09C0\u09C7-\u09C8\u09CB-\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB-\u0ACC\u0B02-\u0B03\u0B40\u0B47-\u0B48\u0B4B-\u0B4C\u0BBF\u0BC1-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82-\u0C83\u0CBE\u0CC0-\u0CC1\u0CC3-\u0CC4\u0CC7-\u0CC8\u0CCA-\u0CCB\u0D02-\u0D03\u0D3F-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82-\u0D83\u0DD0-\u0DD1\u0DD8-\u0DDE\u0DF2-\u0DF3\u0E33\u0EB3\u0F3E-\u0F3F\u0F7F\u1031\u103B-\u103C\u1056-\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7-\u17C8\u1923-\u1926\u1929-\u192B\u1930-\u1931\u1933-\u1938\u1A19-\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43-\u1B44\u1B82\u1BA1\u1BA6-\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2-\u1BF3\u1C24-\u1C2B\u1C34-\u1C35\u1CE1\u1CF7\uA823-\uA824\uA827\uA880-\uA881\uA8B4-\uA8C3\uA952-\uA953\uA983\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BE-\uA9C0\uAA2F-\uAA30\uAA33-\uAA34\uAA4D\uAAEB\uAAEE-\uAAEF\uAAF5\uABE3-\uABE4\uABE6-\uABE7\uABE9-\uABEA\uABEC\u{11000}\u{11002}\u{11082}\u{110B0}-\u{110B2}\u{110B7}-\u{110B8}\u{1112C}\u{11145}-\u{11146}\u{11182}\u{111B3}-\u{111B5}\u{111BF}-\u{111C0}\u{111CE}\u{1122C}-\u{1122E}\u{11232}-\u{11233}\u{11235}\u{112E0}-\u{112E2}\u{11302}-\u{11303}\u{1133F}\u{11341}-\u{11344}\u{11347}-\u{11348}\u{1134B}-\u{1134D}\u{11362}-\u{11363}\u{11435}-\u{11437}\u{11440}-\u{11441}\u{11445}\u{114B1}-\u{114B2}\u{114B9}\u{114BB}-\u{114BC
Line truncated
|
||||
`))return g(()=>{let r=n.split(`
|
||||
`);r.forEach((n,i)=>{n&&t.send({type:`behavior event`,behaviorEvent:{type:`insert.text`,text:n},editor:e}),i!==r.length-1&&t.send({type:`behavior event`,behaviorEvent:{type:`insert.soft break`},editor:e})})},{at:i});if(HW(i.anchor.path,i.focus.path)){let[t,a]=cV(i,e.snapshot.context),o={start:t.offset,end:a.offset,text:n};if(n&&l&&r===`insertCompositionText`){let e=l.start+l.text.search(/\S|$/);o.start+o.text.search(/\S|$/)===e+1&&o.end===l.start+l.text.length?(--o.start,l=null,T()):l=!1}else l=r===`insertText`?l===null?o:l&&WW(i)&&l.end+l.text.length===t.offset?{...l,text:l.text+n}:!1:!1;if(u){let r=e.snapshot.context.selection;if(h(t.path,o),r){let r={path:t.path,offset:t.offset+n.length};g(()=>{e.select({anchor:r,focus:r})},{at:r})}return}}return g(()=>t.send({type:`behavior event`,behaviorEvent:{type:`insert.text`,text:n},editor:e}),{at:i})}}},v=()=>!!e.pendingAction,y=()=>!!e.pendingDiffs?.length,b=()=>v()||y(),x=()=>i,S=t=>{e.pendingSelection=t,o&&=(clearTimeout(o),null);let{selection:n}=e.snapshot.context;if(!t)return;let r=!n||!HW(n.anchor.path,t.anchor.path),i=!n||!HW(n.anchor.path.slice(0,-1),t.anchor.path.slice(0,-1));(r&&l||i)&&(l=!1),(r||y())&&(o=setTimeout(f,200))},C=()=>{(v()||!y())&&f()},w=e=>{},T=()=>{v()||(s=setTimeout(f))};return{flush:f,scheduleFlush:T,hasPendingDiffs:y,hasPendingAction:v,hasPendingChanges:b,isFlushing:x,handleUserSelect:S,handleCompositionEnd:p,handleCompositionStart:m,handleDOMBeforeInput:_,handleKeyDown:w,handleDomMutations:t=>{y()||v()||t.some(n=>OW(e,n,t))&&e.forceRender?.()},handleInput:C}}var NWe={subtree:!0,childList:!0,characterData:!0},PWe=GW?({editorActor:e,node:t,...n})=>{if(!GW)return null;let r=SG(),i=_We(),[a]=(0,X.useState)(()=>MWe({editor:r,editorActor:e,...n}));return vWe(t,a.handleDomMutations,NWe),r.scheduleFlush=a.scheduleFlush,i&&a.flush(),a}:()=>null,PG=(0,X.createContext)(!1),FG=(0,X.createContext)(void 0);function FWe(){return(0,X.useContext)(FG)}function IG(e,t,n){if(!mH(e,t,n))return null;let{anchor:r,focus:i,...a}=e,[o,s]=cV(e,n),[c,l]=cV(t,n);return{anchor:LV(o,c,n)?c:o,focus:LV(s,l,n)?s:l,...a}}var IWe=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),LG=(e,t)=>{let{anchor:n,focus:r,...i}=e,{anchor:a,focus:o,...s}=t;return IWe(i,s)},RG=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(!bG(r,i)||!LG(r,i))return!1}return!0},zG=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!LG(r,i))return!1}return!0},LWe=(e,t,n,r)=>{let i=zW(t)?e.snapshot.context.value:BB({schema:e.snapshot.context.schema},t)?t.children:[],a=Array.from(i,()=>[]);if(r.length===0)return a;let o=n.length,s=uG(e,n),c=Array(i.length),l=t=>{let r=c[t];if(r)return r;let a=i[t];if(!a)return;let o=uG(e,n.length===0?[{_key:a._key}]:[...n,`children`,{_key:a._key}]);return c[t]=o,o},u=new Map;for(let e=0;e<i.length;e++){let t=i[e];t&&u.set(t._key,e)}let d=e=>{let t=o===0?0:o+1,n=e.path[t];if(n&&typeof n==`object`&&`_key`in n)return u.get(n._key)};for(let t of r){let n=IG(s,t,e.snapshot.context);if(!n)continue;let[r,o]=cV(n,e.snapshot.context),c=d(r)??0,u=d(o)??i.length-1;for(let n=c;n<=u;n++){let r=a[n];if(!r)continue;let i=l(n);if(!i)continue;let o=IG(i,t,e.snapshot.context);o&&r.push({...t,...o})}}return a};function BG(e,t){let[,n]=(0,X.useReducer)(e=>e+1,0),r=(0,X.useRef)(void 0),i=(0,X.useRef)(()=>null),a=(0,X.useRef)(null),o;try{if(e!==i.current||r.current){let n=e();o=t(a.current,n)?a.current:n}else o=a.current}catch(e){throw r.current&&RWe(e)&&(e.message+=`\nThe error may be correlated with this previous error:\n${r.current.stack}\n\n`),e}i.current=e,a.current=o,r.current=void 0;let s=(0,X.useCallback)(()=>{try{let e=i.current();if(t(a.current,e))return;a.current=e}catch(e){e instanceof Error?r.current=e:r.current=Error(String(e))}n()},[]);return[o,s]}function RWe(e){return e instanceof Error}var VG=(0,X.createContext)({}),HG=(e,t,n)=>{let r=(0,Z.c)(11),i=SG(),{decorate:a,addEventListener:o}=(0,X.useContext)(VG),s;r[0]!==a||r[1]!==e||r[2]!==t?(s=()=>a([e,t]),r[0]=a,r[1]=e,r[2]=t,r[3]=s):s=r[3];let[c,l]=BG(s,VB({schema:i.snapshot.context.schema},e)?zG:RG),u,d;r[4]!==o||r[5]!==l?(u=()=>{let e=o(l);return l(),e},d=[o,l],r[4]=o,r[5]=l,r[6]=u,r[7]=d):(u=r[6],d=r[7]),CG(u,d);let f;return r[8]!==c||r[9]!==n?(f=[...c,...n],r[8]=c,r[9]=n,r[10]=f):f=r[10],f},zWe=e=>{let t=(0,Z.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=new Set,t[0]=n):n=t[0];let r=(0,X.useRef)(n),i=(0,X.useRef)(e),a,o;t[1]===e?(a=t[2],o=t[3]):(a=()=>{i.current=e,r.current.forEach(BWe)},o=[e],t[1]=e,t[2]=a,t[3]=o),CG(a,o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=e=>i.current(e),t[4]=s):s=t[4];let c=s,l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>(r.current.add(e),()=>{r.current.delete(e)}),t[5]=l):l=t[5];let u=l,d;return t[6]===
Line truncated
|
||||
`?(0,Q.jsx)(rK,{isTrailing:!0,text:c}):(0,Q.jsx)(rK,{text:c})},rK=e=>{"use no memo";let{text:t,isTrailing:n=!1}=e,r=(0,X.useRef)(null),i=()=>`${t??``}${n?`
|
||||
`:``}`,[a]=(0,X.useState)(i);return CG(()=>{let e=i();r.current&&r.current.textContent!==e&&(r.current.textContent=e)}),(0,Q.jsx)(nGe,{ref:r,children:a})},nGe=(0,X.memo)((0,X.forwardRef)((e,t)=>{let n=(0,Z.c)(3),r;return n[0]!==e.children||n[1]!==t?(r=(0,Q.jsx)(`span`,{"data-pt-text":!0,ref:t,children:e.children}),n[0]=e.children,n[1]=t,n[2]=r):r=n[2],r})),iK=e=>{let t=(0,Z.c)(8),{isLineBreak:n}=e,r=n!==void 0&&n,i;t[0]===r?i=t[1]:(i={"data-pt-zero-width":!0,...r?{"data-pt-line-break":!0}:{}},t[0]=r,t[1]=i);let a=i,o=!GW||!r?``:null,s;t[2]===r?s=t[3]:(s=r?(0,Q.jsx)(`br`,{}):null,t[2]=r,t[3]=s);let c;return t[4]!==a||t[5]!==o||t[6]!==s?(c=(0,Q.jsxs)(`span`,{...a,children:[o,s]}),t[4]=a,t[5]=o,t[6]=s,t[7]=c):c=t[7],c},rGe=e=>(0,Q.jsx)(aGe,{...e}),iGe=X.memo(e=>{let t=(0,Z.c)(13),{leaf:n,isLast:r,text:i,path:a,parent:o,renderLeaf:s,leafPosition:c}=e,l=s===void 0?rGe:s,u;t[0]!==r||t[1]!==n||t[2]!==o||t[3]!==a||t[4]!==i?(u=(0,Q.jsx)(tGe,{isLast:r,leaf:n,parent:o,path:a,text:i}),t[0]=r,t[1]=n,t[2]=o,t[3]=a,t[4]=i,t[5]=u):u=t[5];let d=u,f;return t[6]!==d||t[7]!==n||t[8]!==c||t[9]!==a||t[10]!==l||t[11]!==i?(f=l({attributes:{"data-pt-marks":!0},children:d,leaf:n,text:i,path:a,leafPosition:c}),t[6]=d,t[7]=n,t[8]=c,t[9]=a,t[10]=l,t[11]=i,t[12]=f):f=t[12],f},(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.text===e.text&&nK(t.leaf,e.leaf)),aGe=e=>{let t=(0,Z.c)(3),{attributes:n,children:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(`span`,{...n,children:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},oGe=e=>(0,Q.jsx)(cGe,{...e}),sGe=X.memo(e=>{let t=(0,Z.c)(11),{decorations:n,isLast:r,parent:i,path:a,renderLeaf:o,renderText:s,text:c}=e,l=s===void 0?oGe:s,u=HG(c,a,n),d;t[0]!==u||t[1]!==c?(d=KWe(c,u),t[0]=u,t[1]=c,t[2]=d):d=t[2];let f=d,p;if(t[3]!==f||t[4]!==r||t[5]!==i||t[6]!==a||t[7]!==o||t[8]!==l||t[9]!==c){let e=[];for(let t=0;t<f.length;t++){let{leaf:n,position:s}=f[t];e.push((0,Q.jsx)(iGe,{isLast:r&&t===f.length-1,leaf:n,leafPosition:s,text:c,path:a,parent:i,renderLeaf:o},`${c._key}-${t}`))}p=l({text:c,children:e,attributes:{"data-pt-path":UB(a)}}),t[3]=f,t[4]=r,t[5]=i,t[6]=a,t[7]=o,t[8]=l,t[9]=c,t[10]=p}else p=t[10];return p},(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&HW(t.path,e.path)&&t.renderText===e.renderText&&t.renderLeaf===e.renderLeaf&&t.text===e.text&&zG(t.decorations,e.decorations)),cGe=e=>{let t=(0,Z.c)(3),{attributes:n,children:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(`span`,{...n,children:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},lGe=(e,t)=>{if(e.length!==t.length)return t;let n=!1,r=Array(t.length);for(let i=0;i<t.length;i++){let a=e[i],o=t[i];a&&RG(a,o)?r[i]=a:(r[i]=o,n=!0)}return n?r:e},uGe=(e,t,n,r)=>{let i=(0,Z.c)(8),a;i[0]!==r||i[1]!==e||i[2]!==t||i[3]!==n?(a=LWe(e,t,n,r),i[0]=r,i[1]=e,i[2]=t,i[3]=n,i[4]=a):a=i[4];let o=a,[s,c]=(0,X.useState)(o),l;i[5]!==o||i[6]!==s?(l=lGe(s,o),i[5]=o,i[6]=s,i[7]=l):l=i[7];let u=l;return u!==s&&c(u),u};function aK(e,t,n){if(t?.of){for(let e of t.of)if(`container`in e&&e.container.type===n._type)return e}return e.containers.get(n._type)}var oK=e=>{let{decorations:t,node:n,path:r,renderElement:i,renderText:a,renderLeaf:o}=e,s=SG();s.isNodeMapDirty=!1;let c=FWe(),l=(0,X.useContext)(PG),u=uGe(s,n,r,t),d=[],f=`children`,p=c;if(zW(n))d=n.snapshot.context.value;else if(BB({schema:s.snapshot.context.schema},n))d=n.children;else if(rV(s.snapshot,n)){let e=aK(s,c,n);if(e){let t=n[e.field.name];Array.isArray(t)&&(d=t,f=e.field.name),p=e}}let m=(0,X.useCallback)((e,t,n)=>{let s=r.length===0?[{_key:e._key}]:[...r,f,{_key:e._key}];return(0,Q.jsx)(UWe,{decorations:u[t]??[],element:e,isContainer:n,path:s,renderElement:i,renderLeaf:o,renderText:a},e._key)},[f,u,r,i,o,a]),h=BB({schema:s.snapshot.context.schema},n)?n:void 0,g=(e,t,n)=>l||!t?e:(0,Q.jsx)(PG.Provider,{value:!0,children:e},n),_=(e,t)=>{if(!h)throw Error(`Cannot render text component without a text block parent`);let n=r.length===0?[{_key:e._key}]:[...r,`children`,{_key:e._key}];return(0,Q.jsx)(sGe,{decorations:u[t]??[],isLast:t===d.length-1,parent:h,path:n,renderLeaf:o,renderText:a,text:e},e._key)},v=(e,t)=>{let n=r.length===0?[{_key:e._key}]:[...r,f,{_key:e._key}];return(0,Q.jsx)(GWe,{decorations:u[t]??[],isInline:h!==void 0,objectNode:e,path:n,renderElement:i},e._key)},y=(e,t)=>{if(t)return!0;if(BB({schema:s.snapshot.context.schema},e)){if(s.textBlocks.has(e._type)||s.textBlocks.has(`*`))return!0;if(c?.of){for(let t of c.of)if(`textBlock`in t&&t.textBlock.type===e._type)return!0}return!1}if(rV(s.snapshot,e)){if(h!==void 0)return!1;if(s.blockObjects.has(e._type)||s.blockObjects.has(`*`))return!0;if(c?.of){for(let t of c.of)if(`blockObject`in t&&t.blockObject.type===e._type)return!0}return!1}return VB({schema:s.snapshot.context.schema},e),!1},b=d.map((e,t)=>{if(BB({schema:s.snapshot.context.schema},e))return g(m(e,t,!1),y(e,!1),e._key);if(lV({schema:s.snapshot.context.schema},e))return null;if(rV(s.snapshot,e))return aK(s,p,e)?g(m(e,t,!0),!0,e._key):g(v(e,t),y(e,!1),e._key);if(VB({schema:s.Line truncated
|
||||
|
||||
`),mimeType:`text/plain`,originEvent:t.originEvent}:{type:`serialization.failure`,mimeType:`text/plain`,originEvent:t.originEvent,reason:`No selection`},deserialize:({snapshot:e,event:t})=>{let n=dW(`<html><body>${TKe(t.data).split(/\n{2,}/).map(e=>e?`<p>${e.replace(/(?:\r\n|\r|\n)/g,`<br/>`)}</p>`:`<p></p>`).join(``)}</body></html>`,{schema:e.context.schema,keyGenerator:e.context.keyGenerator}).flatMap(t=>{let n=oH({keyGenerator:e.context.keyGenerator,block:t,options:{normalize:!1,removeUnusedMarkDefs:!0,validateFields:!1},schema:e.context.schema});return n?[n]:[]});return n.length===0?{type:`deserialization.failure`,mimeType:`text/plain`,reason:`No blocks deserialized`}:{type:`deserialization.success`,data:n,mimeType:`text/plain`}}}),wKe={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`,"`":```,"=":`=`};function TKe(e){return String(e).replace(/[&<>"'`=/]/g,e=>wKe[e]??e)}var EKe=[bKe,xKe,SKe,CKe];function hq(e){return{id:aH(),name:e?.name,reference:e?.reference}}var gq=hq({name:`core`});function DKe({editor:e,listItem:t}){if(!e.snapshot.context.selection)return!1;let[n,r]=cV(e.snapshot.context.selection,e.snapshot.context),i=[...fV(e.snapshot,{from:n.path,to:r.path,match:t=>BB({schema:e.snapshot.context.schema},t)})];return i.length>0&&i.every(n=>cH({schema:e.snapshot.context.schema},n.node)&&n.node.listItem===t)}function OKe({editor:e,style:t}){if(!e.snapshot.context.selection)return!1;let[n,r]=cV(e.snapshot.context.selection,e.snapshot.context),i=[...fV(e.snapshot,{from:n.path,to:r.path,match:t=>BB({schema:e.snapshot.context.schema},t)})];return i.length>0&&i.every(n=>BB({schema:e.snapshot.context.schema},n.node)&&n.node.style===t)}function kKe(e,t){return{focus:()=>{t.send({type:`focus`,editor:e})},blur:()=>{t.send({type:`blur`,editor:e})},toggleMark:n=>{t.send({type:`behavior event`,behaviorEvent:{type:`decorator.toggle`,decorator:n},editor:e})},toggleList:n=>{t.send({type:`behavior event`,behaviorEvent:{type:`list item.toggle`,listItem:n},editor:e})},toggleBlockStyle:n=>{t.send({type:`behavior event`,behaviorEvent:{type:`style.toggle`,style:n},editor:e})},isMarkActive:t=>{let n=e.snapshot;return BH(n).includes(t)},marks:()=>{let t=e.snapshot,n=RH(t),r=BH(t);return[...n,...r]},undo:()=>{t.send({type:`behavior event`,behaviorEvent:{type:`history.undo`},editor:e})},redo:()=>{t.send({type:`behavior event`,behaviorEvent:{type:`history.redo`},editor:e})},select:n=>{t.send({type:`behavior event`,behaviorEvent:{type:`select`,at:n},editor:e})},focusBlock:()=>{if(!e.snapshot.context.selection)return;let t=e.snapshot.context.selection.focus.path;return xV(e.snapshot,t)?.node??xV(e.snapshot,ZB(t))?.node},focusChild:()=>{if(!e.snapshot.context.selection)return;let t=kV(e.snapshot,e.snapshot.context.selection.focus.path,{edge:`start`});if(t&&!bV(e.snapshot,t.path))return t.node},insertChild:(n,r)=>(t.send({type:`behavior event`,behaviorEvent:{type:`insert.child`,child:{_type:n.name,...r||{}}},editor:e}),e.snapshot.context.selection?.focus.path??[]),insertBlock:(n,r)=>(t.send({type:`behavior event`,behaviorEvent:{type:`insert.block`,block:{_type:n.name,...r||{}},placement:`auto`},editor:e}),e.snapshot.context.selection?.focus.path??[]),hasBlockStyle:t=>{try{return OKe({editor:e,style:t})}catch{return!1}},hasListStyle:t=>{try{return DKe({editor:e,listItem:t})}catch{return!1}},isVoid:t=>{let n=e.snapshot.context.schema;return![n.block.name,n.span.name].includes(t._type)},findByPath:t=>{let n=YB(e.snapshot,t);return n?[n.node,t]:[void 0,void 0]},findDOMNode:t=>{let n;try{let r=Array.from(fV(e.snapshot,{match:e=>e._key===t._key}))[0];if(r){let t=r.path;n=xW(e,t)}}catch{}return n},activeAnnotations:()=>{if(!e.snapshot.context.selection||e.snapshot.context.selection.focus.path.length<2)return[];try{let t=[],n=fV(e.snapshot,{from:LW(e.snapshot.context.selection,e.snapshot.context).path,to:IW(e.snapshot.context.selection,e.snapshot.context).path,match:t=>VB({schema:e.snapshot.context.schema},t)&&t.marks!==void 0&&Array.isArray(t.marks)&&t.marks.length>0});for(let{node:r,path:i}of n){let n=zV(e.snapshot,ZB(i));n&&n.node.markDefs?.forEach(n=>{VB({schema:e.snapshot.context.schema},r)&&r.marks&&Array.isArray(r.marks)&&r.marks.includes(n._key)&&t.push(n)})}return t}catch{return[]}},isAnnotationActive:t=>{let n=e.snapshot;return VH(t)(n)},addAnnotation:(n,r)=>{let i=e.snapshot,a=xH(i),o=_H(i),s=a.flatMap(e=>BB(i.context,e)?e.markDefs??[]:[]);t.send({type:`behavior event`,behaviorEvent:{type:`annotation.add`,annotation:{name:n.name,value:r??{}}},editor:e});let c=e.snapshot,l=xH(c),u=vH(c),d=_H(c),f=d?EV(c,d.path).decorators.map(e=>e.name):c.context.schema.decorators.map(e=>e.name),p=d?.node.marks?.filter(e=>!o?.node.marks?.includes(e)&&!f.includes(e)),m=l.flatMap(e=>BB(c.context,e)?e.markDefs?.map(t=>({markDef:t,path:[{_key:e._key},`markDefs`,{_key:t._key}]}))??[]:[]).filter(e=>!s.some(t=>t._key===e.markDef._key)),h=d?.path,g=m.find(e=>p?.some(t=>t===e.markDef._key));if(u&&h&&g)return{markDefPathLine truncated
|
||||
`,i),o===-1&&(o=e.length-1);let c=e.slice(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s===a&&(c=e.slice(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}let a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}}function hqe(e,t,n){let r=e,i=t,a=mqe(r,i);r=a.chars1,i=a.chars2;let o=a.lineArray,s=_J(r,i,{checkLines:!1,deadline:n.deadline});pqe(s,o),s=Tqe(s),s.push([0,``]);let c=0,l=0,u=0,d=``,f=``;for(;c<s.length;){switch(s[c][0]){case 1:u++,f+=s[c][1];break;case-1:l++,d+=s[c][1];break;case 0:if(l>=1&&u>=1){s.splice(c-l-u,l+u),c=c-l-u;let e=_J(d,f,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)s.splice(c,0,e[t]);c+=e.length}u=0,l=0,d=``,f=``;break;default:throw Error(`Unknown diff operation.`)}c++}return s.pop(),s}function gqe(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,a=e.length>t.length?t:e,o=i.indexOf(a);if(o!==-1)return r=[[1,i.substring(0,o)],[0,a],[1,i.substring(o+a.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(a.length===1)return[[-1,e],[1,t]];let s=fqe(e,t);if(s){let e=s[0],t=s[1],r=s[2],i=s[3],a=s[4],o=_J(e,r,n),c=_J(t,i,n);return o.concat([[0,a]],c)}return n.checkLines&&e.length>100&&t.length>100?hqe(e,t,n):dqe(e,t,n.deadline)}var _qe=Object.defineProperty,mJ=Object.getOwnPropertySymbols,vqe=Object.prototype.hasOwnProperty,yqe=Object.prototype.propertyIsEnumerable,hJ=(e,t,n)=>t in e?_qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bqe=(e,t)=>{for(var n in t||={})vqe.call(t,n)&&hJ(e,n,t[n]);if(mJ)for(var n of mJ(t))yqe.call(t,n)&&hJ(e,n,t[n]);return e};function gJ(e,t,n){if(e===null||t===null)throw Error(`Null input. (diff)`);let r=_J(e,t,Sqe(n||{}));return wqe(r),r}function _J(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let a=uJ(r,i),o=r.substring(0,a);r=r.substring(a),i=i.substring(a),a=dJ(r,i);let s=r.substring(r.length-a);r=r.substring(0,r.length-a),i=i.substring(0,i.length-a);let c=gqe(r,i,n);return o&&c.unshift([0,o]),s&&c.push([0,s]),c=TJ(c),c}function xqe(e){let t=1;return typeof e<`u`&&(t=e<=0?Number.MAX_VALUE:e),Date.now()+t*1e3}function Sqe(e){return bqe({checkLines:!0,deadline:xqe(e.timeout||1)},e)}function vJ(e,t,n){return n===1?e+t:t+e}function yJ(e,t){return t===1?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function Cqe(e,t,n,r){return r===1?e[t][1][e[t][1].length-1]===e[n][1][e[n][1].length-1]:e[t][1][0]===e[n][1][0]}function bJ(e,t,n){let r=n===1?-1:1,i=null,a=null,o=t+n;for(;o>=0&&o<e.length&&(i===null||a===null);o+=n){let[s,c]=e[o];if(c.length!==0){if(s===1){i===null&&(i=o);continue}if(s===-1){a===null&&(a=o);continue}if(s===0){if(i===null&&a===null){let[i,a]=yJ(e[t][1],n);e[t][1]=i,e[o][1]=vJ(e[o][1],a,r);return}break}}}if(i!==null&&a!==null&&Cqe(e,i,a,n)){let[o,s]=yJ(e[i][1],r),[c]=yJ(e[a][1],r);e[i][1]=o,e[a][1]=c,e[t][1]=vJ(e[t][1],s,n);return}let[s,c]=yJ(e[t][1],n);e[t][1]=s,i===null?(e.splice(o,0,[1,c]),a!==null&&a>=o&&a++):e[i][1]=vJ(e[i][1],c,r),a===null?e.splice(o,0,[-1,c]):e[a][1]=vJ(e[a][1],c,r)}function wqe(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(r.length===0)continue;let i=r[0],a=r[r.length-1];lqe(a)&&n===0&&bJ(e,t,1),uqe(i)&&n===0&&bJ(e,t,-1)}for(let t=0;t<e.length;t++)e[t][1].length===0&&e.splice(t,1)}function Tqe(e){let t=e.map(e=>cJ(e)),n=!1,r=[],i=0,a=null,o=0,s=0,c=0,l=0,u=0;for(;o<t.length;)t[o][0]===0?(r[i++]=o,s=l,c=u,l=0,u=0,a=t[o][1]):(t[o][0]===1?l+=t[o][1].length:u+=t[o][1].length,a&&a.length<=Math.max(s,c)&&a.length<=Math.max(l,u)&&(t.splice(r[i-1],0,[-1,a]),t[r[i-1]+1][0]=1,i--,i--,o=i>0?r[i-1]:-1,s=0,c=0,l=0,u=0,a=null,n=!0)),o++;for(n&&(t=TJ(t)),t=wJ(t),o=1;o<t.length;){if(t[o-1][0]===-1&&t[o][0]===1){let e=t[o-1][1],n=t[o][1],r=lJ(e,n),i=lJ(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(o,0,[0,n.substring(0,r)]),t[o-1][1]=e.substring(0,e.length-r),t[o+1][1]=n.substring(r),o++):(i>=e.length/2||i>=n.length/2)&&(t.splice(o,0,[0,e.substring(0,i)]),t[o-1][0]=1,t[o-1][1]=n.substring(0,n.length-i),t[o+1][0]=-1,t[o+1][1]=e.substring(i),o++),o++}o++}return t}var xJ=/[^a-zA-Z0-9]/,SJ=/\s/,CJ=/[\r\n]/,Eqe=/\n\r?\n$/,Dqe=/^\r?\n\r?\n/;function wJ(e){let t=e.map(e=>cJ(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(xJ),a=r.match(xJ),o=i&&n.match(SJ),s=a&&r.match(SJ),c=o&&n.match(CJ),l=s&&r.match(CJ),u=c&&e.match(Eqe),d=l&&t.match(Dqe);return u||d?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}let r=1;for(;r<t.length-1;){if(t[r-1][0]===0&&t[r+1][0]===0){let e=t[r-1][1],i=t[r][1],a=t[r+1][1],o=dJ(e,i);if(o){let t=i.substring(i.length-o);e=e.substring(0,e.length-o),i=t+i.substring(0,i.length-o),a=t+a}let s=e,c=i,l=a,u=n(e,i)+n(i,a);for(;i.charAt(0)===a.charAt(0);){e+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);let t=n(e,i)+n(i,a);t>=u&&(u=t,s=e,c=i,l=a)}t[r-1][1]!==s&&(s?t[r-1][1]=s:(t.splice(r-1,1),r--),t[r][1]=c,l?t[r+1][1]=l:(t.splice(r+1,1),r--))}r++}return t}function TJ(e){let t=e.map(e=>cJ(e));t.push([0,``]);let n
Line truncated
|
||||
`),r=0;for(;r<n.length;){let e=n[r].match(Vqe);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=FJ(RJ(e[1]),RJ(e[3]));for(t.push(i),e[2]===``?(i.start1--,i.utf8Start1--,i.length1=1,i.utf8Length1=1):e[2]===`0`?(i.length1=0,i.utf8Length1=0):(i.start1--,i.utf8Start1--,i.utf8Length1=RJ(e[2]),i.length1=i.utf8Length1),e[4]===``?(i.start2--,i.utf8Start2--,i.length2=1,i.utf8Length2=1):e[4]===`0`?(i.length2=0,i.utf8Length2=0):(i.start2--,i.utf8Start2--,i.utf8Length2=RJ(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e=n[r],t=e.charAt(0);if(t===`@`)break;if(t===``){r++;continue}let a;try{a=decodeURI(e.slice(1))}catch{throw Error(`Illegal escape in parse: ${e}`)}let o=NJ(a)-a.length;if(t===`-`)i.diffs.push([-1,a]),i.length1-=o;else if(t===`+`)i.diffs.push([1,a]),i.length2-=o;else if(t===` `)i.diffs.push([0,a]),i.length1-=o,i.length2-=o;else throw Error(`Invalid patch mode "${t}" in: ${a}`);r++}}return t}function RJ(e){return parseInt(e,10)}function zJ(e,{schemaTypes:t}){let{_type:n,_key:r,...i}=e;if(e&&e._type===t.block.name){let a=e,o=!1,s=a.markDefs===void 0,c=a.children===void 0,l=(a.children||[]).map(e=>{let{_type:n,_key:r,...i}=e,a=Object.keys(i);return n===void 0&&a.length===1&&a.at(0)===`text`?{_key:r,_type:t.span.name,text:i.text}:n===t.span.name?e:(o=!0,{_type:n,_key:r,...i})});return!s&&!c&&!o&&BB({schema:t},e)?e:{_type:n,_key:r,...i,children:l}}let{children:a,...o}=i;return{_type:n,_key:r,...o}}function BJ(e,t,n){if(!t||t.length!==1)return!1;let r=t.at(0);if(!r)return!0;if(!BB({schema:n},r)||r._type!==n.block.name||`listItem`in r||!(`style`in r)||r.style!==n.styles.at(0)?.name||!Array.isArray(r.children)||r.children.length!==1)return!1;let i=r.children.at(0);return!(!i||!VB({schema:n},i)||!(`_type`in i)||i._type!==n.span.name||i.text!==``||i.marks?.join(``)||`markDefs`in r&&Array.isArray(r.markDefs)&&r.markDefs.length>0||Object.keys(r).some(e=>e!==`_type`&&e!==`_key`&&e!==`children`&&e!==`markDefs`&&e!==`style`)||qG({schema:n},e,[r]))}function Hqe(e){return(t,n)=>{let r=!1;try{switch(n.type){case`insert`:r=Wqe(e,t,n);break;case`unset`:r=Gqe(t,n);break;case`set`:r=VJ(t,n);break;case`setIfMissing`:r=VJ(t,n);break;case`diffMatchPatch`:r=Uqe(t,n)}}catch(e){console.error(e)}return r}}function Uqe(e,t){if(t.path.at(-1)!==`text`){let n=Dq(e.snapshot.context.value,t.path);if(typeof n!=`string`)return!1;let[r]=IJ(LJ(t.value),n,{allowExceedingIndices:!0});return e.apply({type:`set`,path:t.path,value:r}),!0}let n=t.path.slice(0,-1),r=YB(e.snapshot,n);if(!r||!VB({schema:e.snapshot.context.schema},r.node))return!1;let[i]=IJ(LJ(t.value),r.node.text,{allowExceedingIndices:!0}),a=kqe(gJ(r.node.text,i),5),o=0;for(let[t,n]of a)t===1?(e.apply({type:`insert.text`,path:r.path,offset:o,text:n}),o+=n.length):t===-1?e.apply({type:`remove.text`,path:r.path,offset:o,text:n}):t===0&&(o+=n.length);return!0}function Wqe(e,t,n){let{items:r,position:i}=n,a=n.path.length===1&&BJ(e.initialValue,t.snapshot.context.value,e.schema)&&!qG({schema:e.schema},t.lastSyncedValue,t.snapshot.context.value),o=n.path.slice(0,-1);for(let e=0;e<r.length;e++)if(e===0)t.apply({type:`insert`,path:n.path,node:r[e],position:i===`after`?`after`:`before`});else{let a=r[e-1],s=typeof a._key==`string`?a._key:void 0;if(s!==void 0)t.apply({type:`insert`,path:[...o,{_key:s}],node:r[e],position:`after`});else{let a=n.path.at(-1),s=(typeof a==`number`?a:0)+ +(i===`after`)+e;t.apply({type:`insert`,path:[...o,s],node:r[e],position:`before`})}}if(a&&typeof n.path[0]==`number`){let e=i===`before`?r.length:0,n=t.snapshot.context.value[e];n&&t.apply({type:`unset`,path:[{_key:n._key}]})}return!0}function VJ(e,t){return t.type===`setIfMissing`&&(t.path.length===0?e.snapshot.context.value.length>0:Dq(e.snapshot.context.value,t.path)!==void 0)?!1:(e.apply({type:`set`,path:t.path,value:t.value}),!0)}function Gqe(e,t){return t.path.length===0&&yK(e),e.apply({type:`unset`,path:t.path}),!0}function Kqe({editorActor:e,subscriptions:t,editor:n}){let r=Hqe(e.getSnapshot().context),i=[],a=()=>{if(i.length===0)return;let e=i;i=[];let t=!1;oJ(n,()=>{Sq(n,()=>{Bq(n,()=>{sJ(n,()=>{for(let i of e)try{t=r(n,i),SK.syncPatch.enabled&&(t?SK.syncPatch(`(applied) ${PW(i,2)}`):SK.syncPatch(`(ignored) ${PW(i,2)}`))}catch(e){console.error(`Applying patch ${PW(i)} failed due to: ${e instanceof Error?e.message:e}`)}})})}),t&&(Cq(n),n.onChange())})},o=({patches:e})=>{let t=e.filter(e=>e.origin!==`local`);t.length!==0&&(i=i.concat(t),a())};t.push(()=>{SK.syncPatch(`subscribing to remote patches`);let t=e.on(`patches`,o);return()=>{SK.syncPatch(`unsubscribing to remote patches`),t.unsubscribe()}})}function qqe({steps:e,op:t,currentUndoStepId:n,previousUndoStepId:r,operationsInProgress:i,isNormalizingNode:a,selectionBeforeApply:o}){let s=e.at(-1);if(!s)return HJ(e,t,o);if(i)return n===r||a?UJ(e,s,t):HJ(e,t,o);if(t.type===`set.selection`&&n===void 0&&r!==void 0||t.type===`set.selection`&&n!==void 0&&r!==void 0&&r!==n)return UJ(e,s,t);if(n===void 0&&r===void 0){if(t.type===`set.selection`)return
Line truncated
|
||||
`)?!1:r.length===1?{text:t}:r.length>2?!1:n&&t===n?{text:t}:!1},actions:[(e,{text:t})=>[$({type:`insert.text`,text:t})]]}),aU({on:`input.*`,actions:[({event:e})=>[$({type:`deserialize`,originEvent:e})]]})];function tX(e){return t=>!e||t.blockIndexMap.has(UB([{_key:e}]))?t.context.keyGenerator():e}function nX(e){return{anchor:{path:e,offset:0},focus:{path:e,offset:0}}}function rX(e,t){return e.length===0?[{_key:t}]:EY(e,t)}var jYe=[aU({on:`insert.blocks`,guard:({event:e})=>{let t=e.blocks.length===1?e.blocks.at(0):void 0;return t?{onlyBlock:t}:!1},actions:[({event:e},{onlyBlock:t})=>[$({type:`insert.block`,block:t,placement:e.placement,select:e.select??`end`,...e.at?{at:e.at}:{}})]]}),aU({on:`insert.blocks`,guard:({snapshot:e,event:t})=>{if(t.placement!==`before`&&t.placement!==`after`)return!1;let n=t.at??e.context.selection,r=n?vH({...e,context:{...e.context,selection:n}}):void 0;return{referenceBlockPath:r?r.path:[]}},actions:[({snapshot:e,event:t},{referenceBlockPath:n})=>{let r,i,a,o=[],s=-1;for(let c of t.blocks){s++;let l=tX(c._key)(e),u=rX(n,l);s===0&&(r=u),s===t.blocks.length-1&&(i=u),o.push($({type:`insert.block`,block:l===c._key?c:{...c,_key:l},placement:t.placement===`after`?`after`:s===0?`before`:`after`,select:`none`,...a?{at:nX(a)}:t.at?{at:t.at}:{}})),a=u}let c=t.select??`end`;return c===`start`&&r&&o.push($({type:`select.block`,at:r,select:`start`})),c===`end`&&i&&o.push($({type:`select.block`,at:i,select:`end`})),o}]}),aU({on:`insert.blocks`,guard:({snapshot:e,event:t})=>{if(t.placement!==`auto`)return!1;let n=t.at??e.context.selection;if(!n)return!1;let r=yH({...e,context:{...e.context,selection:n}});if(!r||tU(e.context,r.node))return!1;let i=tH({context:e.context,block:r}),a=eH({context:e.context,block:r}),o=bY({context:e.context,block:r.node,startPoint:n.focus,endPoint:a}),s=lV(e.context,t.blocks.at(0));return{focusTextBlock:r,focusBlockStartPoint:i,focusBlockEndPoint:a,focusTextBlockAfter:o,at:n,originalSelection:e.context.selection,isFirstBlockTextBlock:s}},actions:[({snapshot:e,event:t},{focusTextBlock:n,focusBlockEndPoint:r,focusTextBlockAfter:i,at:a,focusBlockStartPoint:o,isFirstBlockTextBlock:s,originalSelection:c})=>{let l=n.path,u,d,f=[],p=-1;for(let i of t.blocks){if(p++,p===0){ZV(a.focus,r)||f.push($({type:`delete`,at:{anchor:a.focus,focus:r}}));let s=tX(i._key)(e),c=ZV(a.focus,o);lV(e.context,i)&&!c?(d=n.path,u=n.path):(d=rX(l,s),u=d),f.push($({type:`insert.block`,block:s===i._key?i:{...i,_key:s},placement:`auto`,select:`end`,...t.at?{at:t.at}:{}}));continue}if(p===t.blocks.length-1){let t=tX(i._key)(e);f.push($({type:`insert.block`,block:t===i._key?i:{...i,_key:t},placement:`after`,select:`end`,at:u?nX(u):void 0})),u=rX(l,t);continue}let s=tX(i._key)(e);f.push($({type:`insert.block`,block:s===i._key?i:{...i,_key:s},placement:`after`,select:u?`none`:`end`,at:u?nX(u):void 0})),u=rX(l,s)}return tU(e.context,i)||f.push($({type:`insert.block`,block:i,placement:`auto`,select:t.select===`end`?`none`:`end`})),t.select===`none`&&f.push($({type:`select`,at:c})),t.select===`start`&&((ZV(a.focus,o)||!s)&&d?f.push($({type:`select.block`,at:d,select:`start`})):f.push($({type:`select`,at:{anchor:a.focus,focus:a.focus}}))),f}]}),aU({on:`insert.blocks`,guard:({snapshot:e,event:t})=>{if(t.placement!==`auto`)return!1;let n=t.at??e.context.selection,r=n?vH({...e,context:{...e.context,selection:n}}):void 0;return{referenceBlockPath:r?r.path:[],originalSelection:e.context.selection}},actions:[({snapshot:e,event:t},{referenceBlockPath:n,originalSelection:r})=>{let i,a,o,s=[],c=-1;for(let r of t.blocks){c++;let l=tX(r._key)(e),u=rX(n,l);c===0&&(i=u),c===t.blocks.length-1&&(a=u),s.push($({type:`insert.block`,block:l===r._key?r:{...r,_key:l},placement:c===0?`auto`:`after`,select:`none`,...o?{at:nX(o)}:t.at?{at:t.at}:{}})),o=u}let l=t.select??`end`;return l===`none`?s.push($({type:`select`,at:r})):l===`start`&&i?s.push($({type:`select.block`,at:i,select:`start`})):a&&s.push($({type:`select.block`,at:a,select:`end`})),s}]}),aU({on:`insert.break`,actions:[()=>[$({type:`split`})]]}),aU({on:`insert.child`,guard:({snapshot:e})=>{let t=qH(e);return!t||e.context.selection?!1:{lastBlockEndPoint:eH({context:e.context,block:t})}},actions:[({event:e},{lastBlockEndPoint:t})=>[$({type:`select`,at:{anchor:t,focus:t}}),$(e)]]}),aU({on:`insert.child`,guard:({snapshot:e})=>{let t=yH(e);return e.context.selection&&!t},actions:[({snapshot:e,event:t})=>[$({type:`insert.block`,block:{_type:e.context.schema.block.name,children:[{_type:e.context.schema.span.name,text:``,marks:[]}]},placement:`auto`,select:`end`}),$(t)]]}),aU({on:`insert.inline object`,actions:[({event:e})=>[$({type:`insert.child`,child:{_type:e.inlineObject.name,...e.inlineObject.value}})]]}),aU({on:`insert.soft break`,actions:[()=>[$({type:`insert.text`,text:`
|
||||
`})]]}),aU({on:`insert.span`,guard:({snapshot:e})=>!yH(e),actions:[({snapshot:e,event:t})=>[$({type:`insert.block`,block:{_type:e.context.schema.block.name,children:[{_type:e.context.schema.span.name,text:``,marks:[]}]},placement:`auto`,select:`end`}),$(t)]]}),aU({on:`insert.span`,guard:({snapshot:e,event:t})=>{let n=yH(e);return{markDefs:t.annotations?.map(t=>({_type:t.name,_key:e.context.keyGenerator(),...t.value}))??[],focusTextBlock:n}},actions:[({snapshot:e,event:t},{markDefs:n,focusTextBlock:r})=>[...r?[$({type:`block.set`,at:r.path,props:{markDefs:[...r.node.markDefs??[],...n]}})]:[],$({type:`insert.child`,child:{_type:e.context.schema.span.name,text:t.text,marks:[...t.decorators??[],...n.map(e=>e._key)]}})]]}),aU({on:`insert.text`,guard:({snapshot:e})=>AH(e)&&gH(e),actions:[({event:e})=>[$({type:`move.forward`,distance:1}),$(e)]]}),aU({on:`insert.text`,guard:({snapshot:e})=>jH(e),actions:[({event:e})=>[$({type:`delete`}),$(e)]]}),aU({on:`insert.text`,guard:({snapshot:e})=>{if(e.context.selection)return!1;let t=qH(e);return t?{endPoint:eH({context:e.context,block:t})}:!1},actions:[({event:e},{endPoint:t})=>[$({type:`select`,at:{anchor:t,focus:t}}),$(e)]]})],MYe=bU({default:[{key:`ArrowLeft`,shift:!0,meta:!1,ctrl:!1,alt:!1}]}),NYe=[aU({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>iY.backspace.guard(t.originEvent)&&AH(e)&&gH(e),actions:[()=>[$({type:`delete.backward`,unit:`character`})]]}),aU({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>iY.delete.guard(t.originEvent)&&AH(e)&&gH(e),actions:[()=>[$({type:`delete.forward`,unit:`character`})]]}),aU({on:`keyboard.keydown`,guard:({event:e})=>iY.deleteWord.backward.guard(e.originEvent),actions:[()=>[$({type:`delete.backward`,unit:`word`})]]}),aU({on:`keyboard.keydown`,guard:({event:e})=>iY.deleteWord.forward.guard(e.originEvent),actions:[()=>[$({type:`delete.forward`,unit:`word`})]]}),aU({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>iY.break.guard(t.originEvent)&&AH(e)&&gH(e),actions:[()=>[$({type:`insert.break`})]]}),aU({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>iY.break.guard(t.originEvent)&&jH(e),actions:[()=>[$({type:`insert.break`})]]}),aU({on:`keyboard.keydown`,guard:({event:e})=>iY.lineBreak.guard(e.originEvent),actions:[()=>[$({type:`insert.soft break`})]]}),aU({on:`keyboard.keydown`,guard:({event:e})=>iY.history.undo.guard(e.originEvent),actions:[()=>[$({type:`history.undo`})]]}),aU({on:`keyboard.keydown`,guard:({event:e})=>iY.history.redo.guard(e.originEvent),actions:[()=>[$({type:`history.redo`})]]}),aU({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>{if(!iY.selectAll.guard(t.originEvent))return!1;let n=kV(e,[],{edge:`start`}),r=kV(e,[],{edge:`end`}),i=n?CV(e,n.path):void 0,a=r?CV(e,r.path):void 0;return!i||!a?!1:{anchor:tH({context:e.context,block:i}),focus:eH({context:e.context,block:a})}},actions:[(e,{anchor:t,focus:n})=>[$({type:`select`,at:{anchor:t,focus:n}})]]}),aU({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>{if(!e.context.selection||!MYe.guard(t.originEvent))return!1;let n=yH(e);if(!n)return!1;let r=vV(e,n.path,{direction:`previous`});if(!r)return!1;let i=xV(e,r.path);return i&&e.context.selection.focus.offset===0&&tU(e.context,n.node)?{previousBlock:i,selection:e.context.selection}:!1},actions:[({snapshot:e},{previousBlock:t,selection:n})=>[$({type:`select`,at:{anchor:n.anchor,focus:eH({context:e.context,block:t})}})]]})],PYe=[aU({on:`list item.add`,guard:({snapshot:e,event:t})=>{let n=zH(e).filter(n=>EV(e,n.path).lists.some(e=>e.name===t.listItem));return n.length!==0&&{selectedTextBlocks:n}},actions:[({event:e},{selectedTextBlocks:t})=>t.map(t=>$({type:`block.set`,at:t.path,props:{level:t.node.level??1,listItem:e.listItem}}))]}),aU({on:`list item.remove`,guard:({snapshot:e})=>({selectedTextBlocks:zH(e)}),actions:[(e,{selectedTextBlocks:t})=>t.map(e=>$({type:`block.unset`,at:e.path,props:[`level`,`listItem`]}))]}),aU({on:`list item.toggle`,guard:({snapshot:e,event:t})=>YH(t.listItem)(e),actions:[({event:e})=>[$({type:`list item.remove`,listItem:e.listItem})]]}),aU({on:`list item.toggle`,guard:({snapshot:e,event:t})=>!YH(t.listItem)(e),actions:[({event:e})=>[$({type:`list item.add`,listItem:e.listItem})]]})],FYe=[aU({on:`move.block`,guard:({snapshot:e,event:t})=>{let n=YB(e,t.at),r=YB(e,t.to);if(!n||!r||HW(n.path,r.path))return!1;let i=qB(e,ZB(n.path)),a=i.findIndex(e=>e.node._key===n.node._key),o=i.findIndex(e=>e.node._key===r.node._key);return{originEntry:n,destinationEntry:r,movingDown:a!==-1&&o!==-1&&a<o}},actions:[(e,{originEntry:t,destinationEntry:n,movingDown:r})=>[$({type:`unset`,at:t.path}),$({type:`insert`,at:n.path,value:t.node,position:r?`after`:`before`})]]}),aU({on:`move.block up`,guard:({snapshot:e,event:t})=>{let n=vV(e,t.at,{direction:`previous`});return n?{previousSibling:n,savedSelection:e.context.selection}:!1},actions:[({event:e},{previousSibling:t,savedSelection:n})=>{let r=[$({type:`move.block`,at:e.at,to:t.path})];return n&&r.push($({type:`select`,at:n})),r}]}),aU({on:`Line truncated
|
||||
To pick up a draggable item, press the space bar.
|
||||
While dragging, use the arrow keys to move the item.
|
||||
Press space again to drop the item in its new position, or press escape to cancel.
|
||||
`},hZe={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function gZe(e){let{announcements:t=hZe,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=mZe}=e,{announce:a,announcement:o}=dZe(),s=yZ(`DndLiveRegion`),[c,l]=(0,X.useState)(!1);if((0,X.useEffect)(()=>{l(!0)},[]),fZe((0,X.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=X.createElement(X.Fragment,null,X.createElement(lZe,{id:r,value:i.draggable}),X.createElement(uZe,{id:s,announcement:o}));return n?(0,rZ.createPortal)(u,n):u}var OZ;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(OZ||={});function kZ(){}function AZ(e,t){return(0,X.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function _Ze(){var e=[...arguments];return(0,X.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var jZ=Object.freeze({x:0,y:0});function MZ(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function NZ(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function vZe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function PZ(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function FZ(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function IZ(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var yZe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=IZ(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=MZ(IZ(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(NZ)},bZe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=PZ(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=PZ(r),o=i.reduce((e,t,r)=>e+MZ(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(NZ)};function xZe(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var SZe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=xZe(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(vZe)};function CZe(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function LZ(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:jZ}function wZe(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var TZe=wZe(1);function EZe(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function DZe(e,t,n){let r=EZe(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var OZe={ignoreTransform:!1};function RZ(e,t){t===void 0&&(t=OZe);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=sZ(e).getComputedStyle(e);t&&(n=DZe(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function zZ(e){return RZ(e,{ignoreTransform:!0})}function kZe(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function AZe(e,t){return t===void 0&&(t=sZ(e).getComputedStyle(e)),t.position===`fixed`}function jZe(e,t){t===void 0&&(t=sZ(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function BZ(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(cZ(i)
Line truncated
|
||||
`)}function B1e(e,t){return j$(e,t).map(e=>`children`in e&&Array.isArray(e.children)?e.children.map(e=>typeof e.text==`string`?e.text:``).join(``):``).join(` `).replace(/[\t\n]/g,` `)}function r1(e,t,n,r){return[{_key:t._key},e.rowsField,{_key:n._key},e.cellsField,{_key:r._key}]}function i1(e,t){return e?t.some(t=>IV(t,e.anchor.path)||IV(t,e.focus.path)):!1}function V1e(e){let{isCell:t,isRow:n,isTable:r}=O$(e);return[aU({on:`custom.unset.row`,guard:({snapshot:i,event:a})=>{let o=CV(i,a.at,{match:n});if(!o)return!1;let s=QB(i,o.path,{match:r});if(!s)return!1;let c=k$(e,s.node),l=c.findIndex(e=>e._key===o.node._key);if(l===-1)return!1;let u=c[l+1]??c[l-1];if(!u)return!1;let d=CV(i,a.at,{match:t}),f=d?A$(e,o.node).findIndex(e=>e._key===d.node._key):0,p=Math.min(Math.max(f,0),A$(e,u).length-1),m=A$(e,u).at(p);if(!m)return!1;let h=[...s.path,e.rowsField,{_key:u._key},e.cellsField,{_key:m._key}];return{rowPath:o.path,columnIndex:p,neighborCellPath:h}},actions:[({snapshot:e},{rowPath:t,neighborCellPath:n})=>{let r=[$({type:`unset`,at:t})];if(i1(e.context.selection,[t])){let t=kV(e,n,{edge:`start`});if(t){let e={path:t.path,offset:0};r.push($({type:`select`,at:{anchor:e,focus:e}}))}}return r}]}),aU({on:`custom.unset.column`,guard:({snapshot:i,event:a})=>{let o=CV(i,a.at,{match:t});if(!o)return!1;let s=QB(i,o.path,{match:n});if(!s)return!1;let c=A$(e,s.node).findIndex(e=>e._key===o.node._key);if(c===-1)return!1;let l=QB(i,s.path,{match:r});if(!l||A$(e,s.node).length<=1)return!1;let u=c+1<A$(e,s.node).length?c+1:c-1,d=A$(e,s.node).at(u);if(!d)return!1;let f=[...s.path,e.cellsField,{_key:d._key}];return{cellPaths:k$(e,l.node).flatMap(t=>{let n=A$(e,t).at(c);return n?[[...l.path,e.rowsField,{_key:t._key},e.cellsField,{_key:n._key}]]:[]}),neighborCellPath:f}},actions:[({snapshot:e},{cellPaths:t,neighborCellPath:n})=>{let r=t.map(e=>$({type:`unset`,at:e}));if(i1(e.context.selection,t)){let t=kV(e,n,{edge:`start`});if(t){let e={path:t.path,offset:0};r.push($({type:`select`,at:{anchor:e,focus:e}}))}}return r}]}),aU({on:`custom.unset.table`,guard:({snapshot:e,event:t})=>{let n=CV(e,t.at,{match:r});if(!n)return!1;let i=vV(e,n.path,{direction:`next`}),a=vV(e,n.path,{direction:`previous`});return{tablePath:n.path,neighborBlockPath:i?.path??a?.path}},actions:[({snapshot:e},{tablePath:t,neighborBlockPath:n})=>{let r=[$({type:`unset`,at:t})];if(n&&i1(e.context.selection,[t])){let t=kV(e,n,{edge:`start`});if(t){let e={path:t.path,offset:0};r.push($({type:`select`,at:{anchor:e,focus:e}}))}}return r}]})]}function H1e(e={}){let t=e.containers??{},n=a1(t.table??q1e,W1e),r=a1(t.row??J1e,G1e),i=a1(t.cell??Y1e,K1e);for(let[e,t]of[[`table`,n],[`row`,r]])t.of&&console.warn(`[@portabletext/plugin-table] The ${e} definition ('${t.type}') declares an \`of\`, which \`defineTable\` owns: the nesting is grafted as table.of → row.of → cell. The declared \`of\` is ignored. Cell-scoped node definitions belong on the cell definition's \`of\`.`);let a={tableType:n.type,rowsField:n.arrayField,rowType:r.type,cellsField:r.arrayField,cellType:i.type,valueField:i.arrayField};v1e(a);let o={...n,of:[{...r,of:[i]}]},s=U1e(a);function c(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(t$,{nodes:[o]}),(0,Q.jsx)(e$,{behaviors:s})]}),e[0]=t):t=e[0],t}return{Plugin:c,behaviors:s,createBlock:({rows:e=3,columns:t=3,headerRows:n}={})=>({_type:a.tableType,...n===void 0?{}:{headerRows:n},[a.rowsField]:Array.from({length:e},()=>({_type:a.rowType,[a.cellsField]:Array.from({length:t},()=>({_type:a.cellType,[a.valueField]:[{_type:`block`,style:`normal`,markDefs:[],children:[{_type:`span`,text:``,marks:[]}]}]}))}))}),getTableSelection:e=>P$(e,a),...O$(a)}}function U1e(e){return[...x1e(e),...V1e(e),...S1e(e),...y1e(e),...D1e(e),...I1e(e),...b1e(e),...L1e(e),...A1e(e)]}var W1e=({attributes:e,children:t})=>(0,Q.jsx)(`table`,{...e,children:(0,Q.jsx)(`tbody`,{children:t})}),G1e=({attributes:e,children:t})=>(0,Q.jsx)(`tr`,{...e,children:t}),K1e=({attributes:e,children:t})=>(0,Q.jsx)(`td`,{...e,children:t}),q1e=OX({type:`table`,arrayField:`rows`}),J1e=OX({type:`row`,arrayField:`cells`}),Y1e=OX({type:`cell`,arrayField:`value`});function a1(e,t){return e.render?e:{...e,render:t}}var o1=`var(--pt-plugin-table-accent)`,s1=`var(--pt-plugin-table-border)`,c1=`var(--pt-plugin-table-header-bg)`,l1=`var(--pt-plugin-table-header-weight, 600)`,u1=`var(--pt-plugin-table-selected-bg)`,d1=`var(--pt-plugin-table-radius)`;function X1e(e,t,n){return!n||e<n.r0||e>n.r1||t<n.c0||t>n.c1?{top:!1,bottom:!1,left:!1,right:!1,inside:!1}:{top:e===n.r0,bottom:e===n.r1,left:t===n.c0,right:t===n.c1,inside:!0}}function Z1e(e,t,n,r){let i={};return e===0&&t===0&&(i.borderTopLeftRadius=d1),e===0&&t===r-1&&(i.borderTopRightRadius=d1),e===n-1&&t===0&&(i.borderBottomLeftRadius=d1),e===n-1&&t===r-1&&(i.borderBottomRightRadius=d1),i}function Q1e(e,t,n){return!!n&&t+1===n.c0&&e>=n.r0&&e<=n.r1}function $1e(e,t,n){return!!n&&e+1===n.r0&&t>=n.c0Line truncated
|
||||
`){let t=e.hardBreak;return t?(0,Q.jsx)(t,{},n):`
|
||||
`}return t.text}function l(r,i,a,o){let s={value:r,isInline:o,index:i,renderNode:n};t(P1(r._type),{nodeType:`block`,type:r._type});let c=e.unknownType;return(0,Q.jsx)(c,{...s},a)}function u(t,r,i,a){let o={value:t,isInline:a,index:r,renderNode:n},s=e.types[t._type];return s?(0,Q.jsx)(s,{...o},i):null}return n};function R1(e){let{node:t,index:n,isInline:r,renderNode:i}=e,a=dT(t).map((e,t)=>i({node:e,isInline:!0,index:t,renderNode:i}));return{_key:t._key||`block-${n}`,children:a,index:n,isInline:r,node:t}}function w2e(){}var T2e={"access-denied":(0,X.lazy)(()=>On(()=>import(`./AccessDenied-PrzSvkgv.js`).then(e=>e.n),__vite__mapDeps([19,9,16]))),activity:(0,X.lazy)(()=>On(()=>import(`./Activity-BzZJr7I2.js`),__vite__mapDeps([20,9,16]))),"add-circle":(0,X.lazy)(()=>On(()=>import(`./AddCircle-BZjvWs4R.js`).then(e=>e.n),__vite__mapDeps([21,9,16]))),"add-comment":(0,X.lazy)(()=>On(()=>import(`./AddComment-DzLuhpXr.js`),__vite__mapDeps([22,9,16]))),"add-document":(0,X.lazy)(()=>On(()=>import(`./AddDocument-Ca_v8JdZ.js`).then(e=>e.n),__vite__mapDeps([23,9,16]))),add:(0,X.lazy)(()=>On(()=>import(`./Add-CwQ5TpM8.js`).then(e=>e.n),__vite__mapDeps([24,9,16]))),"add-user":(0,X.lazy)(()=>On(()=>import(`./AddUser-CTyeR_e2.js`).then(e=>e.n),__vite__mapDeps([25,9,16]))),api:(0,X.lazy)(()=>On(()=>import(`./Api-BBIspMzg.js`),__vite__mapDeps([26,9,16]))),archive:(0,X.lazy)(()=>On(()=>import(`./Archive-CNM-Azpz.js`),__vite__mapDeps([27,9,16]))),"arrow-down":(0,X.lazy)(()=>On(()=>import(`./ArrowDown-CM5h1Tfl.js`).then(e=>e.n),__vite__mapDeps([28,9,16]))),"arrow-left":(0,X.lazy)(()=>On(()=>import(`./ArrowLeft-x2OZCZTu.js`).then(e=>e.n),__vite__mapDeps([29,9,16]))),"arrow-right":(0,X.lazy)(()=>On(()=>import(`./ArrowRight-D293IkFJ.js`).then(e=>e.n),__vite__mapDeps([30,9,16]))),"arrow-top-right":(0,X.lazy)(()=>On(()=>import(`./ArrowTopRight-YjzSsA0g.js`),__vite__mapDeps([31,9,16]))),"arrow-up":(0,X.lazy)(()=>On(()=>import(`./sanity-CoxvCVZ8.js`).then(e=>e.a),__vite__mapDeps([32,9,33,34,16,17,35,2,7,36,13,37,38,39,40,41,42,43,44,45,3,10,1,4,5,11,12,46,6,47,48,49,50,51,52,53,54,29,55,56,24,57,58,59,60,61,62,63,64,65,66,67,30,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,25,136,137,138,139,140,141,142,28,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165]))),asterisk:(0,X.lazy)(()=>On(()=>import(`./Asterisk-bl1DbUNA.js`),__vite__mapDeps([166,9,16]))),"bar-chart":(0,X.lazy)(()=>On(()=>import(`./BarChart-wkgYStw6.js`),__vite__mapDeps([167,9,16]))),basket:(0,X.lazy)(()=>On(()=>import(`./Basket-C_gPtep4.js`),__vite__mapDeps([168,9,16]))),bell:(0,X.lazy)(()=>On(()=>import(`./Bell-m62q1mbw.js`),__vite__mapDeps([169,9,16]))),bill:(0,X.lazy)(()=>On(()=>import(`./Bill-D-gubcZG.js`),__vite__mapDeps([170,9,16]))),"binary-document":(0,X.lazy)(()=>On(()=>import(`./BinaryDocument-D1GQsa0h.js`).then(e=>e.n),__vite__mapDeps([73,9,16]))),"block-content":(0,X.lazy)(()=>On(()=>import(`./BlockContent-Bw8BGwBw.js`).then(e=>e.n),__vite__mapDeps([96,9,16]))),"block-element":(0,X.lazy)(()=>On(()=>import(`./BlockElement-CQIVGSb1.js`).then(e=>e.n),__vite__mapDeps([171,9,16]))),blockquote:(0,X.lazy)(()=>On(()=>import(`./Blockquote-CSHCZcSy.js`),__vite__mapDeps([172,9,16]))),bold:(0,X.lazy)(()=>On(()=>import(`./Bold-CGtaOUDj.js`).then(e=>e.n),__vite__mapDeps([173,9,16]))),bolt:(0,X.lazy)(()=>On(()=>import(`./Bolt-CkliNuRS.js`).then(e=>e.n),__vite__mapDeps([102,9,16]))),book:(0,X.lazy)(()=>On(()=>import(`./Book-CpEqfE8C.js`),__vite__mapDeps([174,9,16]))),"bookmark-filled":(0,X.lazy)(()=>On(()=>import(`./BookmarkFilled-BiNAlCM9.js`),__vite__mapDeps([175,9,16]))),bookmark:(0,X.lazy)(()=>On(()=>import(`./Bookmark-BxXcEarc.js`),__vite__mapDeps([176,9,16]))),bottle:(0,X.lazy)(()=>On(()=>import(`./Bottle-UZXqUr_W.js`),__vite__mapDeps([177,9,16]))),bug:(0,X.lazy)(()=>On(()=>import(`./Bug-CFB9Jubh.js`).then(e=>e.n),__vite__mapDeps([138,9,16]))),"bulb-filled":(0,X.lazy)(()=>On(()=>import(`./BulbFilled-DF8TxkBW.js`),__vite__mapDeps([178,9,16]))),"bulb-outline":(0,X.lazy)(()=>On(()=>import(`./BulbOutline-BN--Ec2H.js`).then(e=>e.n),__vite__mapDeps([179,9,16]))),calendar:(0,X.lazy)(()=>On(()=>import(`./Calendar-DCYqUUNo.js`).then(e=>e.n),__vite__mapDeps([61,9,16]))),case:(0,X.lazy)(()=>On(()=>import(`./Case-DLvh8XKv.js`),__vite__mapDeps([180,9,16]))),"chart-upward":(0,X.lazy)(()=>On(()=>import(`./ChartUpward-Bfx-_SAI.js`),__vite__mapDeps([181,9,16]))),"checkmark-circle":(0,X.lazy)(()=>On(()=>import(`./CheckmarkCircle-B6SBY4QE.js`).then(e=>e.n),__vite__mapDeps([85,9,16]))),checkmark:(0,X.lazy)(()=>On(()=>import(`./Checkmark-OT7tsNpL.js`).then(e=>e.n),__vite__mapDeps([42,9,16]))),"chevron-down":(0,X.lazy)(()=>On(()=>import(`./ChevronDown-BpYUc-AP.js`).then(e=>e.n),__vite__mapDeps([40,9,16]))),"chevron-left":(0,X.lazy)(()=>On(()=>import(`./ChevronLeLine truncated
|
||||
`)}var _6e=e=>{let t=(0,Z.c)(3),{value:n,schemaType:r}=e,i=n,a;return t[0]!==r||t[1]!==i?(a=(0,Q.jsx)(K,{padding:2,children:(0,Q.jsx)(BF,{schemaType:r,value:i,layout:`default`})}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a},v6e=e=>{let t=(0,Z.c)(3),{diff:n,schemaType:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(T2,{diff:n,schemaType:r,previewComponent:_6e,layout:`grid`}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},y6e=J.div.withConfig({displayName:`FieldChangeContainer`,componentId:`sc-osbku8-0`})`--field-change-error:${({theme:e})=>e.sanity.color.solid.critical.enabled.bg};&[data-revert-all-changes-hover] [data-revert-all-hover]::before{border-left:2px solid var(--field-change-error);}`,b6e=J.div.withConfig({displayName:`DiffBorder`,componentId:`sc-osbku8-1`})`--field-change-error:${({theme:e})=>e.sanity.color.solid.critical.enabled.bg};--diff-inspect-padding-xsmall:${({theme:e})=>zr(e.sanity.space[1])};--diff-inspect-padding-small:${({theme:e})=>zr(e.sanity.space[2])};position:relative;padding:var(--diff-inspect-padding-xsmall) 0 var(--diff-inspect-padding-xsmall) var(--diff-inspect-padding-small);&::before{content:'';display:block;position:absolute;top:0;left:0;bottom:0;border-left:1px solid var(--card-border-color);}&[data-error]:hover::before,&[data-revert-field-hover]:hover::before{border-left:2px solid var(--field-change-error);}`,x6e=J(Le).withConfig({displayName:`Root`,componentId:`sc-4bm9j2-0`})`[data-ui='Text']{font-weight:normal;}div[data-ui='Box']{display:none;}&:not([data-disabled='true']):hover,&:not([data-disabled='true']):focus{--card-fg-color:${({theme:e})=>e.sanity.color.solid.critical.enabled.bg};--card-bg-color:transparent;--card-border-color:transparent;div[data-ui='Box']{display:block;}}`;function v4(e){let t=(0,Z.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({ref:r,selected:a,changeCount:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{t:o}=G(),s;t[5]!==n||t[6]!==o?(s=o(`changes.action.revert-changes-confirm-change`,{count:n}),t[5]=n,t[6]=o,t[7]=s):s=t[7];let c;return t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==s?(c=(0,Q.jsx)(x6e,{icon:ya,selected:a,text:s,mode:`bleed`,ref:r,tooltipProps:null,...i}),t[8]=r,t[9]=i,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function y4(e){let t=(0,Z.c)(17),{open:n,onConfirm:r,onCancel:i,changeCount:a,referenceElement:o}=e,{t:s}=G(),c;t[0]===s?c=t[1]:(c=s(`changes.action.revert-all-cancel`),t[0]=s,t[1]=c);let l;t[2]!==a||t[3]!==s?(l=a>1?s(`changes.action.revert-all-confirm`):s(`changes.action.revert-changes-confirm-change`,{count:1}),t[2]=a,t[3]=s,t[4]=l):l=t[4];let u;t[5]!==a||t[6]!==s?(u=s(a>1?`changes.action.revert-all-description`:`changes.action.revert-changes-description`,{count:a}),t[5]=a,t[6]=s,t[7]=u):u=t[7];let d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=[`bottom-start`,`bottom-end`,`top`,`top-start`,`top-end`],t[8]=d):d=t[8];let f;return t[9]!==i||t[10]!==r||t[11]!==n||t[12]!==o||t[13]!==c||t[14]!==l||t[15]!==u?(f=(0,Q.jsx)(iI,{cancelButtonText:c,confirmButtonText:l,message:u,onCancel:i,onConfirm:r,open:n,referenceElement:o,tone:`critical`,placement:`bottom`,fallbackPlacements:d}),t[9]=i,t[10]=r,t[11]=n,t[12]=o,t[13]=c,t[14]=l,t[15]=u,t[16]=f):f=t[16],f}function S6e(e){let t=(0,Z.c)(8),{error:n}=e,{t:r}=G(),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(K,{children:(0,Q.jsx)(Y,{children:(0,Q.jsx)(aa,{})})}),t[0]=i):i=t[0];let a;t[1]!==n.actualType||t[2]!==n.expectedType||t[3]!==n.messageKey||t[4]!==r?(a=r(n.messageKey,{expectedType:n.expectedType,actualType:n.actualType}),t[1]=n.actualType,t[2]=n.expectedType,t[3]=n.messageKey,t[4]=r,t[5]=a):a=t[5];let o;return t[6]===a?o=t[7]:(o=(0,Q.jsx)(ei,{tone:`critical`,padding:3,children:(0,Q.jsxs)(Be,{alignItems:`flex-start`,children:[i,(0,Q.jsx)(K,{flexBasis:`0%`,flexGrow:1,paddingLeft:3,children:(0,Q.jsx)(Y,{size:1,as:`p`,children:a})})]})}),t[6]=a,t[7]=o),o}var C6e=e=>{let t=(0,Z.c)(8),{children:n,path:r,hasRevertHover:i,wrap:a}=e,{FieldWrapper:o}=v2(),s=o===void 0?X.Fragment:o;if(a){let e=0;for(let t=0;t<r.length;t++)typeof r[t]!=`string`&&(e=t);let a;t[0]!==e||t[1]!==r?(a=r.slice(0,e+1),t[0]=e,t[1]=r,t[2]=a):a=t[2];let o;return t[3]!==s||t[4]!==n||t[5]!==i||t[6]!==a?(o=(0,Q.jsx)(s,{path:a,hasRevertHover:i,children:n}),t[3]=s,t[4]=n,t[5]=i,t[6]=a,t[7]=o):o=t[7],o}return n};function w6e(e){let t=(0,Z.c)(74),n,i,a,o,s;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4],s=t[5]):({change:i,hidden:a,readOnly:o,addParentWrapper:n,...s}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s);let c=i.diffComponent||v6e,{documentId:l,schemaType:u,rootDiff:d,isComparingCurrent:f,FieldWrapper:p}=v2(),m=p===void 0?X.Fragment:p,h=oF(l),g=h.status===`ready`,_;t[6]===h?_=t[7]:(_=iF(h),t[6]=h,t[7]=_);let v=_,y=u.name,b;t[8]===h?b=t[9]:(b=aF(h),t[8]=h,t[9]=b);let x=AP(l,y,b),[S,C]=(0,X.useState)(!1),[w,T]=(0,X.useState)(!1),[E,D]=(0,X.useState)(null),O;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{(0,X.startTransition)(()=>D(e))},t[10]=O):O=t[10];let k=O,{t:A}=G(),j;t[11]!==l||t[12]!==u.name||t[13]!==v?(j={id:l,type:u.name,version:
Line truncated
|
||||
--size-diff-positive: ${e.sanity.color.solid.positive.enabled.bg};
|
||||
--size-diff-negative: ${e.sanity.color.solid.critical.enabled.bg};
|
||||
`} &:not([hidden]){display:inline-block;}[data-number='positive']{color:var(--size-diff-positive);}[data-number='negative']{color:var(--size-diff-negative);}`,F6e=e=>{let t=(0,Z.c)(53),{diff:n,schemaType:r}=e,{fromValue:i,toValue:a,fields:o}=n,s=i?.asset,c=a?.asset,{t:l}=G(),u=T4(s?._ref),d=T4(c?._ref),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f={unitDisplay:`short`,maximumFractionDigits:2},t[0]=f):f=t[0];let p=D2(f),m;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(m=[`_type`,`media`],t[1]=m):m=t[1];let h=m,g;t[2]===o?g=t[3]:(g=Object.entries(o).filter(e=>{let[t,n]=e;return n.isChanged&&!h.includes(t)}).map(I6e),t[2]=o,t[3]=g);let _=g,v=_.includes(`asset`),y;if(t[4]!==_||t[5]!==r.fields){let e;t[7]===_?e=t[8]:(e=e=>e.name!==`asset`&&_.includes(e.name),t[7]=_,t[8]=e),y=r.fields.filter(e).map(L6e),t[4]=_,t[5]=r.fields,t[6]=y}else y=t[6];let b=y,x=N6e(u?.size,d?.size),S;t[9]!==p||t[10]!==u?(S=u?.size&&E4(u.size,p),t[9]=p,t[10]=u,t[11]=S):S=t[11];let C=S,w;t[12]!==p||t[13]!==d?(w=d?.size&&E4(d.size,p),t[12]=p,t[13]=d,t[14]=w):w=t[14];let T=w,E;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E={display:`block`,flex:1},t[15]=E):E=t[15];let D=E,O;t[16]!==n||t[17]!==u||t[18]!==C||t[19]!==l?(O=u&&(0,Q.jsx)(x2,{as:`del`,diff:n,path:`asset._ref`,style:D,children:(0,Q.jsx)(w4,{title:u.originalFilename||l(`changes.file.meta-info-fallback-title`),icon:Zi,children:(0,Q.jsx)(Y,{size:0,style:{color:`inherit`},children:C})})}),t[16]=n,t[17]=u,t[18]=C,t[19]=l,t[20]=O):O=t[20];let k=O,A;t[21]!==n||t[22]!==d||t[23]!==T||t[24]!==x||t[25]!==l?(A=d&&(0,Q.jsx)(x2,{as:`ins`,diff:n,path:`asset._ref`,style:D,children:(0,Q.jsx)(w4,{title:d.originalFilename||l(`changes.file.meta-info-fallback-title`),icon:Zi,children:(0,Q.jsxs)(Be,{alignItems:`center`,children:[(0,Q.jsx)(Y,{size:0,style:{color:`inherit`},children:T}),x!==0&&(0,Q.jsx)(ei,{radius:2,padding:1,as:P6e,marginLeft:2,children:(0,Q.jsxs)(Y,{size:0,"data-number":x>0?`positive`:`negative`,children:[x>0?`+`:`-`,x,`%`]})})]})})}),t[21]=n,t[22]=d,t[23]=T,t[24]=x,t[25]=l,t[26]=A):A=t[26];let j=A,M;t[27]!==n||t[28]!==k||t[29]!==l||t[30]!==j?(M=k&&!j&&(0,Q.jsx)(h2,{diff:n,path:`asset._ref`,description:l(`changes.removed-label`),children:k}),t[27]=n,t[28]=k,t[29]=l,t[30]=j,t[31]=M):M=t[31];let N;t[32]!==n||t[33]!==k||t[34]!==j?(N=k&&j&&(0,Q.jsx)(h2,{diff:n,path:`asset._ref`,children:(0,Q.jsx)(C2,{from:k,layout:`grid`,to:j})}),t[32]=n,t[33]=k,t[34]=j,t[35]=N):N=t[35];let P;t[36]!==n||t[37]!==k||t[38]!==l||t[39]!==j?(P=!k&&j&&(0,Q.jsx)(h2,{diff:n,path:`asset._ref`,description:l(`changes.added-label`),children:j}),t[36]=n,t[37]=k,t[38]=l,t[39]=j,t[40]=P):P=t[40];let F;t[41]!==M||t[42]!==N||t[43]!==P?(F=(0,Q.jsxs)(Q.Fragment,{children:[M,N,P]}),t[41]=M,t[42]=N,t[43]=P,t[44]=F):F=t[44];let I=v&&F,L;t[45]!==v||t[46]!==n||t[47]!==b||t[48]!==r?(L=b.length>0&&(0,Q.jsx)(K,{marginTop:v?4:3,children:(0,Q.jsx)(S4,{diff:n,schemaType:r,fields:b})}),t[45]=v,t[46]=n,t[47]=b,t[48]=r,t[49]=L):L=t[49];let R;return t[50]!==I||t[51]!==L?(R=(0,Q.jsxs)(Q.Fragment,{children:[I,L]}),t[50]=I,t[51]=L,t[52]=R):R=t[52],R};function I6e(e){let[t]=e;return t}function L6e(e){return e.name}var R6e={isLoading:!0,value:void 0,error:null};function D4(e,t){let n=(0,Z.c)(4),r;n[0]===t?r=n[1]:(r=t===void 0?R6e:{isLoading:!1,value:t,error:null},n[0]=t,n[1]=r);let i=r,a;return n[2]===e?a=n[3]:(a=e.pipe(z6e()),n[2]=e,n[3]=a),lS(a,i)}function z6e(){return e=>e.pipe(q(e=>({isLoading:!1,value:e,error:null})),dn(e=>sn({isLoading:!1,value:void 0,error:e})))}function B6e(e){let[t,n]=(0,X.useState)(e);return(0,ow.default)(t,e)?t:(n(e),e)}function V6e(e,t){let n=(0,Z.c)(4),r=FM(),i=B6e(t),a;return n[0]!==e||n[1]!==r||n[2]!==i?(a=e?r.observePaths({_type:`reference`,_ref:e},i):sn(void 0),n[0]=e,n[1]=r,n[2]=i,n[3]=a):a=n[3],D4(a)}function O4(e,t){return`rgba(${(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e)||[]).slice(1).map(e=>parseInt(e,16)).concat(t).join(`, `)})`}function H6e(e){let t=0;if(e.length==0)return t.toString();for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString()}function U6e(){let e=Math.ceil(window.devicePixelRatio||1);return Math.min(3,Math.max(1,e))}function W6e(e){let t=(0,Z.c)(40),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({crop:n,diff:r,hash:i,hotspot:a,width:s,height:c,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=s===void 0?100:s,u=c===void 0?100:c,{t:d}=G(),f=o2(r,`crop`),p=o2(r,`hotspot`),m=`0 0 ${l} ${u}`,h;t[8]!==n||t[9]!==i||t[10]!==u||t[11]!==a||t[12]!==l?(h=n&&a&&(0,Q.jsxs)(`mask`,{id:`mask-hotspot-${i}`,children:[(0,Q.jsx)(`rect`,{x:0,y:0,width:l,height:u,fill:`#fff`}),(0,Q.jsx)(k4,{hotspot:a,fill:`#000`,offset:1,width:l,height:u,stroke:`#000`,strokeWidth:3})]}),t[8]=n,t[9]=i,t[10]=u,t[11]=a,t[12]=l,t[13]=h):h=t[13];let g;t[14]===h?g=t[15]:(g=(0,Q.jsx)(`defs`,{children:h}),t[14]=h,t[15]=g);let _;t[16]!==n||t[17]!==f||t[18]!==r||t[19]!==i||t[20]!==u||t[21]!==a||t[22]!==d||t[23]!==l?(_=n&&(0,Q.jsx)(h2,{diLine truncated
|
||||
font-family: ${e.sanity.fonts.code.family};
|
||||
background: ${e.sanity.color.muted.default.enabled.bg};
|
||||
`;default:return``}}}`;function h8e(e){let t=(0,Z.c)(3),{mark:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,Q.jsx)(m8e,{decoration:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}var R4=J(ei).withConfig({displayName:`InlineObjectWrapper`,componentId:`sc-b1v4cy-0`})`&:not([hidden]){display:inline;cursor:pointer;white-space:nowrap;align-items:center;&[data-removed]{text-decoration:line-through;}${N4}{display:inline-flex;}}`;function g8e(e){let t=(0,Z.c)(19),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({diff:n,object:r,schemaType:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{t:o}=G();if(!a){let e;t[5]!==r._type||t[6]!==o?(e=o(`changes.portable-text.unknown-inline-object-schema-type`,{schemaType:r._type}),t[5]=r._type,t[6]=o,t[7]=e):e=t[7];let n;return t[8]!==i||t[9]!==e?(n=(0,Q.jsx)(R4,{...i,border:!0,radius:1,children:e}),t[8]=i,t[9]=e,t[10]=n):n=t[10],n}if(n){let e;return t[11]!==n||t[12]!==r||t[13]!==i||t[14]!==a?(e=(0,Q.jsx)(_8e,{...i,diff:n,object:r,schemaType:a}),t[11]=n,t[12]=r,t[13]=i,t[14]=a,t[15]=e):e=t[15],e}let s;return t[16]!==r||t[17]!==a?(s=(0,Q.jsx)(R4,{children:(0,Q.jsx)(BF,{schemaType:a,value:r,layout:`inline`})}),t[16]=r,t[17]=a,t[18]=s):s=t[18],s}function _8e(e){let t=(0,Z.c)(70),n,i,a,o,s;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4],s=t[5]):({diff:n,object:i,path:a,schemaType:s,...o}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s);let{path:c}=(0,X.useContext)(r),{onSetFocus:l}=(0,X.useContext)(j),{t:u}=G(),d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=[],t[6]=d):d=t[6];let f=o2(n,d),p;t[7]===f?p=t[8]:(p=f?{background:f.background,color:f.text}:{},t[7]=f,t[8]=p);let m=p,[h,g]=(0,X.useState)(!1),_;t[9]===i?_=t[10]:(_=i&&U2(i),t[9]=i,t[10]=_);let v=_,y=n.action===`removed`,b,x;if(t[11]!==c||t[12]!==i||t[13]!==a){let e;t[16]===i?e=t[17]:(e=e=>Gn(e)&&e._key===i._key,t[16]=i,t[17]=e),b=c.slice(0,c.findIndex(e)).concat(a),x=Fx(b),t[11]=c,t[12]=i,t[13]=a,t[14]=b,t[15]=x}else b=t[14],x=t[15];let S=`field-${x}`,C=bR(),w;if(t[18]!==S||t[19]!==C){let e;t[21]===S?e=t[22]:(e=e=>{let[t]=e;return t.startsWith(S)},t[21]=S,t[22]=e),w=C.filter(e),t[18]=S,t[19]=C,t[20]=w}else w=t[20];let T=w.length>0,E;t[23]!==c||t[24]!==a?(E=c.slice(0,-1).concat(a).concat([`$`]),t[23]=c,t[24]=a,t[25]=E):E=t[25];let D=E,O,k;t[26]!==D||t[27]!==T||t[28]!==l?(O=()=>{T&&(g(!0),l(D))},k=[D,T,l],t[26]=D,t[27]=T,t[28]=l,t[29]=O,t[30]=k):(O=t[29],k=t[30]),(0,X.useEffect)(O,k);let A;t[31]!==D||t[32]!==y||t[33]!==l?(A=e=>{if(e.stopPropagation(),g(!0),!y){l(D);return}e.preventDefault()},t[31]=D,t[32]=y,t[33]=l,t[34]=A):A=t[34];let M=A,N;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>{g(!1)},t[35]=N):N=t[35];let P=N,F;t[36]===b?F=t[37]:(F={path:b},t[36]=b,t[37]=F);let I=F,L;t[38]!==n||t[39]!==v||t[40]!==s?(L=(0,Q.jsx)(v8e,{diff:n,emptyObject:v,onClose:P,schemaType:s}),t[38]=n,t[39]=v,t[40]=s,t[41]=L):L=t[41];let R;t[42]!==L||t[43]!==I?(R=(0,Q.jsx)(r.Provider,{value:I,children:L}),t[42]=L,t[43]=I,t[44]=R):R=t[44];let z=R,B=n.action!==`unchanged`&&n.annotation||null,V;t[45]===B?V=t[46]:(V=B?[B]:[],t[45]=B,t[46]=V);let H=V,U=n.action===`removed`?``:void 0,W;t[47]!==n.action||t[48]!==u?(W=u(`changes.portable-text.inline-object`,{context:n.action}),t[47]=n.action,t[48]=u,t[49]=W):W=t[49];let ee;t[50]!==i||t[51]!==s?(ee=(0,Q.jsx)(BF,{schemaType:s,value:i,layout:`inline`}),t[50]=i,t[51]=s,t[52]=ee):ee=t[52];let te;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Q.jsx)(Be,{alignItems:`center`,paddingX:1,children:(0,Q.jsx)(P4,{size:0,children:(0,Q.jsx)(qi,{})})}),t[53]=te):te=t[53];let ne;t[54]===ee?ne=t[55]:(ne=(0,Q.jsxs)(N4,{children:[ee,te]}),t[54]=ee,t[55]=ne);let re;t[56]!==H||t[57]!==W||t[58]!==ne?(re=(0,Q.jsx)(F4,{children:(0,Q.jsx)(h2,{annotations:H,description:W,children:ne})}),t[56]=H,t[57]=W,t[58]=ne,t[59]=re):re=t[59];let ie;t[60]!==h||t[61]!==z||t[62]!==re?(ie=(0,Q.jsx)(aI,{content:z,open:h,portal:!0,children:re}),t[60]=h,t[61]=z,t[62]=re,t[63]=ie):ie=t[63];let ae;return t[64]!==M||t[65]!==o||t[66]!==m||t[67]!==U||t[68]!==ie?(ae=(0,Q.jsx)(R4,{...o,onClick:M,style:m,"data-removed":U,border:!0,radius:2,children:ie}),t[64]=M,t[65]=o,t[66]=m,t[67]=U,t[68]=ie,t[69]=ae):ae=t[69],ae}function v8e(e){let t=(0,Z.c)(12),{diff:n,emptyObject:r,onClose:i,schemaType:a}=e,{t:o}=G(),s=(0,X.useRef)(null),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>[s.current],t[0]=c):c=t[0],wr(i,c);let l;t[1]!==r||t[2]!==a||t[3]!==o?(l=r&&(0,Q.jsx)(Y,{muted:!0,size:1,weight:`medium`,children:o(`changes.portable-text.empty-inline-object`,{inlineObjectType:a.title||a.name})}),t[1]=r,t[2]=a,t[3]=o,t[4]=l):l=t[4];let u;t[5]!==n||t[6]!==r||t[7]!==a?(u=!r&&(0,Q.jsx)(S4,{diff:n,schemaType:a}),t[5]=n,t[6]=r,t[7]=a,t[8]=u):u=t[8];let d;return t[9]!==l||t[10]!==u?(d=(0,Q.jsxs)(I4,{ref:s,padding:3,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function y8e(e){let t=(0,Z.c)(16),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({diff:i,childDiff:n,children:r,path:a,segment:s,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5Line truncated
|
||||
`)return(0,Q.jsx)(`br`,{});let s=(0,Q.jsx)(`span`,{children:r.text.replace(/ /g,` `)},`text-${i}`),c=t&&H2(e.origin,t),l=tr(t)&&t.marks||[];return c&&(s=E8e({activeMarks:l,decoratorTypes:n,diff:e,children:s,seg:r,segIndex:i,spanDiff:c,spanSchemaType:a,t:o})),l&&l.length>0&&l.forEach(e=>{z2(e,a)&&(s=(0,Q.jsx)(h8e,{mark:e,children:s},`decorator-${e}-${t._key}-${i}`))}),s}function E8e({activeMarks:e,decoratorTypes:t,diff:n,children:r,seg:i,segIndex:a,spanDiff:o,spanSchemaType:s,t:c}){let l=(0,Q.jsx)(`span`,{children:r},`text-segment-${a}`),u=n.origin.fromValue&&n.fromValue&&n.fromValue.children[0].text||``,d=o&&o.action!==`unchanged`&&o.annotation||void 0,f=o?.fields?.marks,p=f&&f.action!==`unchanged`&&f.annotation||d,m=[],h=u.split(``).filter(e=>!!e).join(``),g=h.slice(0,Math.max(0,h.indexOf(i.text)+i.text.length)),_=g.slice(0,Math.max(0,g.indexOf(i.text))),v=[];return[..._.matchAll(C8e)].forEach(e=>{let n=e[0],r=j2.concat(A2).find(e=>e.indexOf(n)>-1);if(r){let e=t[n===r[0]?z4.indexOf(n):B4.indexOf(n)]?.value||n;_.lastIndexOf(n)>_.lastIndexOf(r[1])&&v.push(e)}}),m=gIe(e,mw(v)),p&&m.length>0&&m.some(e=>z2(e,s))&&(l=(0,Q.jsx)(x2,{annotation:p,as:`ins`,tooltip:{description:c(`changes.portable-text.changed-formatting`)},children:l},`diffcard-annotation-${a}-${m.join(`-`)}`)),l}function D8e(e,t){return e.children.length===1&&e.children[0]._type===`span`&&typeof e.children[0].text==`string`&&e.children[0].text===``&&t.origin.action!==`unchanged`}function O8e({block:e,diff:t,inlineObjects:n,schemaType:r,t:i}){return a=>{let o=L2(r.fields,a),s=[];if(o){s=R2(o);let a=t.fields.children,c=a.items[0].diff&&a.items[0].diff.type===`object`&&a.items[0].diff.fields.text.type===`string`&&a.items[0].diff.fields.text.segments||[],l=[],u={};if(D8e(e,t)&&(t.origin.action===`added`||t.origin.action===`removed`)){let n=I2(t.origin,e.children[0])||t.origin;if(n&&n.action!==`unchanged`)return(0,Q.jsx)(x2,{annotation:n.annotation,as:n.action===`removed`?`del`:`ins`,tooltip:{description:i(`changes.portable-text.empty-text`,{context:n.action})},children:(0,Q.jsx)(`span`,{children:`↲`})},`empty-block-${e._key}`)}let d=-1,f=-1,p=[],m,h=W2(t.origin);return c.forEach(a=>{f++;let c=M2.includes(a.text),g=x8e.includes(a.text),_=U4.includes(a.text),v=a.text===``,y=a.action===`removed`;if(v)y||d++;else if(g||_){if(g&&V4.includes(a.text)){let e=h[V4.indexOf(a.text)];e&&p.push({mark:e._key,symbols:[a.text,H4[V4.indexOf(a.text)]],object:e})}_&&H4.includes(a.text)&&(m=p.pop())}else if(c){let i=M2.findIndex(e=>e===a.text),o=n[i]?._key,s=n[i];if(o){let n=L2(r.fields,s),i=I2(t.origin,s);l.push((0,Q.jsx)(g8e,{object:s,path:[{_key:e._key},`children`,{_key:s._key}],diff:i,schemaType:n},`inline-object-${s._key}`))}}else if(a.text){let n=e.children[d]||t.origin.fromValue?.children.find(e=>e.text&&e.text.match(V3e(a.text))),r=n&&H2(t.origin,n);if(!n)throw Error(`Could not find child`);let c=r?.fields?.text?r?.fields?.text:void 0,h=(0,Q.jsx)(y8e,{diff:c,path:[{_key:e._key},`children`,{_key:n._key}],childDiff:r,segment:a,children:T8e({diff:t,child:n,decoratorTypes:s,seg:a,segIndex:f,spanSchemaType:o,t:i})},`text-${n._key}-${f}`);if(p.length>0&&p.forEach(e=>{u[e.mark]=u[e.mark]||[],u[e.mark].push(h)}),m){let r=`annotation-${m.object._key}`,i=l[l.length-1];if(i&&i.key!==r){let i=B3e(t.origin,m.mark),a=m&&o.annotations&&o.annotations.find(e=>m&&m.object&&e.name===m.object._type);l.push((0,Q.jsx)(r8e,{object:m.object,diff:i,path:[{_key:e._key},`children`,{_key:n._key}],schemaType:a,children:(0,Q.jsx)(Q.Fragment,{children:u[m.mark]})},r))}m=void 0}p.length===0&&l.push(h)}}),(0,Q.jsx)(`div`,{children:l},e._key)}throw Error(`'span' schemaType not found`)}}var k8e=e=>{let t=(0,Z.c)(9),{diff:n,schemaType:r}=e,i;t[0]!==n||t[1]!==r?(i=R3e(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i,o;t[3]!==a||t[4]!==r?(o=(0,Q.jsx)(w8e,{diff:a,schemaType:r}),t[3]=a,t[4]=r,t[5]=o):o=t[5];let s;return t[6]!==n.action||t[7]!==o?(s=(0,Q.jsx)(`div`,{"data-diff-action":n.action,children:o}),t[6]=n.action,t[7]=o,t[8]=s):s=t[8],s},A8e=J.div.withConfig({displayName:`ReferenceWrapper`,componentId:`sc-ok14o9-0`})`word-wrap:break-word;`,j8e=e=>{let t=(0,Z.c)(3),{value:n,schemaType:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,Q.jsx)(K,{as:A8e,padding:2,children:(0,Q.jsx)(BF,{schemaType:r,value:n,layout:`default`})}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},W4=e=>{let t=(0,Z.c)(3),{diff:n,schemaType:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(T2,{align:`center`,diff:n,layout:`grid`,path:`_ref`,previewComponent:j8e,schemaType:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},M8e=J.div.withConfig({displayName:`SlugWrapper`,componentId:`sc-whmdlw-0`})`word-break:break-all;white-space:pre-wrap;`,N8e=e=>{let t=(0,Z.c)(2),{value:n}=e,r;return t[0]===n.current?r=t[1]:(r=(0,Q.jsx)(K,{as:M8e,paddingX:2,paddingY:1,children:n.current}),t[0]=n.current,t[1]=r),r},P8e=e=>{let t=(0,Z.c)(3),{diff:n,schemaType:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(T2,{layout:`inline`,diff:n,schemaType:r,previewComponent:N8e}),t[0]=n,t[1]=r,t[2]
Line truncated
|
||||
`)||void 0,t[44]=N,t[45]=P);let F=P,I=n.field.value,L=n.field.schemaType,R=n.field.displayInlineChanges??!1,z;t[46]!==j||t[47]!==b||t[48]!==n.field.__unstable_computeDiff||t[49]!==n.field.baseVariantValue||t[50]!==n.field.changed||t[51]!==n.field.changedFromBaseVariant||t[52]!==n.field.compareValue||t[53]!==n.field.focused||t[54]!==n.field.hasBaseVariant||t[55]!==n.field.hasUpstreamVersion||t[56]!==n.field.id||t[57]!==n.field.level||t[58]!==n.field.path||t[59]!==n.field.presence||t[60]!==n.field.readOnly||t[61]!==I||t[62]!==L||t[63]!==R||t[64]!==N||t[65]!==F?(z={value:I,compareValue:n.field.compareValue,__unstable_computeDiff:n.field.__unstable_computeDiff,readOnly:n.field.readOnly,schemaType:L,changed:n.field.changed,hasUpstreamVersion:n.field.hasUpstreamVersion,changedFromBaseVariant:n.field.changedFromBaseVariant,baseVariantValue:n.field.baseVariantValue,hasBaseVariant:n.field.hasBaseVariant,id:n.field.id,path:n.field.path,focused:n.field.focused,level:n.field.level,onChange:b,validation:N,presence:n.field.presence,validationError:F,elementProps:j,displayInlineChanges:R},t[46]=j,t[47]=b,t[48]=n.field.__unstable_computeDiff,t[49]=n.field.baseVariantValue,t[50]=n.field.changed,t[51]=n.field.changedFromBaseVariant,t[52]=n.field.compareValue,t[53]=n.field.focused,t[54]=n.field.hasBaseVariant,t[55]=n.field.hasUpstreamVersion,t[56]=n.field.id,t[57]=n.field.level,t[58]=n.field.path,t[59]=n.field.presence,t[60]=n.field.readOnly,t[61]=I,t[62]=L,t[63]=R,t[64]=N,t[65]=F,t[66]=z):z=t[66];let B=z,V=B,H=n.field.schemaType,U=n.field.value,W;t[67]!==B||t[68]!==r?(W=(0,Q.jsx)(N9e,{...B,render:r}),t[67]=B,t[68]=r,t[69]=W):W=t[69];let ee;return t[70]!==a||t[71]!==n.field.changed||t[72]!==n.field.changedFromBaseVariant||t[73]!==n.field.id||t[74]!==n.field.level||t[75]!==n.field.path||t[76]!==n.field.presence||t[77]!==n.field.schemaType.description||t[78]!==n.field.schemaType.title||t[79]!==n.index||t[80]!==n.name||t[81]!==i||t[82]!==V||t[83]!==H||t[84]!==U||t[85]!==W||t[86]!==N?(ee=(0,Q.jsx)(P9e,{actions:a,changed:n.field.changed,changedFromBaseVariant:n.field.changedFromBaseVariant,description:n.field.schemaType.description,index:n.index,inputId:n.field.id,inputProps:V,level:n.field.level,name:n.name,path:n.field.path,presence:n.field.presence,schemaType:H,title:n.field.schemaType.title,validation:N,value:U,render:i,children:W}),t[70]=a,t[71]=n.field.changed,t[72]=n.field.changedFromBaseVariant,t[73]=n.field.id,t[74]=n.field.level,t[75]=n.field.path,t[76]=n.field.presence,t[77]=n.field.schemaType.description,t[78]=n.field.schemaType.title,t[79]=n.index,t[80]=n.name,t[81]=i,t[82]=V,t[83]=H,t[84]=U,t[85]=W,t[86]=N,t[87]=ee):ee=t[87],ee}function A9e(e){return e.message}function j9e(e){return e.level===`error`}function M9e(e){return e.level!==`error`}function N9e({render:e,...t}){return e(t)}function P9e({render:e,...t}){return e(t)}var k6=(0,X.memo)(function(e){let t=(0,Z.c)(31),{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInlineBlock:o,renderInput:s,renderItem:c,renderPreview:l}=e;if(w6(n)){let e;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==o||t[5]!==s||t[6]!==c||t[7]!==l?(e=(0,Q.jsx)(b9e,{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInlineBlock:o,renderInput:s,renderItem:c,renderPreview:l}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=e):e=t[8],e}if(v9e(n)){let e=c,u;return t[9]!==n||t[10]!==r||t[11]!==i||t[12]!==a||t[13]!==o||t[14]!==s||t[15]!==l||t[16]!==e?(u=(0,Q.jsx)(p9e,{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInput:s,renderInlineBlock:o,renderItem:e,renderPreview:l}),t[9]=n,t[10]=r,t[11]=i,t[12]=a,t[13]=o,t[14]=s,t[15]=l,t[16]=e,t[17]=u):u=t[17],u}if(T6(n)){let e;return t[18]!==n||t[19]!==r||t[20]!==i||t[21]!==a||t[22]!==o||t[23]!==s||t[24]!==c||t[25]!==l?(e=(0,Q.jsx)(t9e,{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInlineBlock:o,renderInput:s,renderItem:c,renderPreview:l}),t[18]=n,t[19]=r,t[20]=i,t[21]=a,t[22]=o,t[23]=s,t[24]=c,t[25]=l,t[26]=e):e=t[26],e}if(y9e(n)){let e;return t[27]!==n||t[28]!==a||t[29]!==s?(e=(0,Q.jsx)(k9e,{member:n,renderField:a,renderInput:s}),t[27]=n,t[28]=a,t[29]=s,t[30]=e):e=t[30],e}return null});function A6(e){return Hn(e.schemaType)}function j6(e){return Jn(e.schemaType)}var M6=({children:e})=>e;function F9e(e){return`absolutePath`in e}var N6=(0,X.memo)(function(e){let t=(0,Z.c)(8),n;t[0]===e?n=t[1]:(n=F9e(e)?e.absolutePath:e.path.concat(e.relativePath),t[0]=e,t[1]=n);let r=n,i=e.renderAnnotation||F6,a=e.renderBlock||F6,o=e.renderInlineBlock||F6,s;return t[2]!==r||t[3]!==e||t[4]!==i||t[5]!==a||t[6]!==o?(s=(0,Q.jsx)(P6,{...e,absolutePath:r,destinationRenderAnnotation:i,destinationRenderBlock:a,destinationRenderField:e.renderField,destinationRenderInlineBlock:o,destinationRenderInput:e.renderInput,destinationRenderItem:e.renderItem,destinationRenderPreview:e.renderPreview}),t[2]=r,t[3]=e,t[4]=i,t[5]=a,t[6]=o,t[7]=s):s=t[7],s});function P6(e){let t=(0,Z.c)(73),{absolutePath:n,destinationRenderA
Line truncated
|
||||
/* Hide the backdrop (the semi-transparent overlay) */
|
||||
background: transparent !important;
|
||||
|
||||
/* Hide the dialog card */
|
||||
[data-ui='DialogCard'] {
|
||||
opacity: 0 !important;
|
||||
pointer-events: none !important;
|
||||
transform: scale(0.95) !important;
|
||||
}
|
||||
`}`,Htt=[0,0,1,0];function Utt(e){return e.stopPropagation()}function Wtt(e){return e.stopPropagation()}function B8(e){let t=(0,Z.c)(62),{children:n,header:r,type:i,width:a}=e,[o,s]=(0,X.useState)(null),c=(0,X.useRef)(null),l=Bx(),{__internal:u}=C6(),d=!!u.inspectOpen,{absolutePath:f,path:p}=n?.props,m=f||p,h;t[0]===m?h=t[1]:(h={path:m},t[0]=m,t[1]=h);let{dialogId:g,isTop:_,stack:v,close:y,navigateTo:b}=ett(h),x;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>{e&&(e.style.scrollbarGutter=`stable`),s(e)},t[2]=x):x=t[2];let S=x,C;t[3]!==v.length||t[4]!==l?(C=()=>{v.length===0&&l.log(O5e,{path:BR([])})},t[3]=v.length,t[4]=l,t[5]=C):C=t[5];let w;t[6]!==v||t[7]!==l?(w=[v,l],t[6]=v,t[7]=l,t[8]=w):w=t[8],(0,X.useEffect)(C,w);let T;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(T={minHeight:`min(calc(100vh - 200px), 500px)`},t[9]=T):T=t[9];let E;t[10]===n?E=t[11]:(E=(0,Q.jsx)(P8,{margins:Htt,children:(0,Q.jsx)(K,{ref:c,style:T,children:n})}),t[10]=n,t[11]=E);let D=E,[O,k]=(0,X.useState)(!1),A,j;t[12]!==O||t[13]!==v.length?(A=()=>{v.length>1&&!O&&k(!0)},j=[v.length,O],t[12]=O,t[13]=v.length,t[14]=A,t[15]=j):(A=t[14],j=t[15]),(0,X.useEffect)(A,j);let M=v.length>1||O,N;t[16]!==y||t[17]!==_||t[18]!==b||t[19]!==v||t[20]!==l?(N=e=>{if(!(e.target&&p0(e.target))&&_&&(e.metaKey||e.ctrlKey)&&e.key===`ArrowUp`){e.preventDefault();let t=v[v.length-1]?.path;if(t&&t.length>1){let e=t.slice(0,-1);e.length>1?(l.log(C3,{path:`keyboard_shortcut`}),b(e)):(l.log(S3),y())}}},t[16]=y,t[17]=_,t[18]=b,t[19]=v,t[20]=l,t[21]=N):N=t[21];let P=N,F;t[22]!==y||t[23]!==v.length||t[24]!==l?(F=e=>{!e&&v.length>=2?(l.log(C3,{path:`close_button`}),y({toParent:!0})):(l.log(S3),y())},t[22]=y,t[23]=v.length,t[24]=l,t[25]=F):F=t[25];let I=F,L;t[26]!==y||t[27]!==d||t[28]!==l?(L=()=>{d||(l.log(S3),y())},t[26]=y,t[27]=d,t[28]=l,t[29]=L):L=t[29];let R=L;if(Or(P),i===`dialog`){let n=!_,r=_?e.autofocus:!1,i;t[30]!==m||t[31]!==I||t[32]!==b?(i=(0,Q.jsx)(Btt,{currentPath:m,onNavigate:b,onClose:I}),t[30]=m,t[31]=I,t[32]=b,t[33]=i):i=t[33];let s=!M,l;t[34]!==D||t[35]!==o?(l=(0,Q.jsx)(z8,{children:(0,Q.jsx)(Kr,{element:o,children:D})}),t[34]=D,t[35]=o,t[36]=l):l=t[36];let u;t[37]!==g||t[38]!==R||t[39]!==I||t[40]!==n||t[41]!==r||t[42]!==i||t[43]!==s||t[44]!==l||t[45]!==a?(u=(0,Q.jsx)(Vtt,{$isHidden:n,__unstable_autoFocus:r,contentRef:S,"data-testid":`nested-object-dialog`,header:i,id:g,onClose:I,onDragEnter:Utt,onDrop:Wtt,width:a,animate:s,onClickOutside:R,children:l}),t[37]=g,t[38]=R,t[39]=I,t[40]=n,t[41]=r,t[42]=i,t[43]=s,t[44]=l,t[45]=a,t[46]=u):u=t[46];let d;return t[47]!==o||t[48]!==u?(d=(0,Q.jsx)(I6,{scrollElement:o,containerElement:c,children:u}),t[47]=o,t[48]=u,t[49]=d):d=t[49],d}let z;t[50]!==D||t[51]!==o?(z=(0,Q.jsx)(z8,{children:(0,Q.jsx)(Kr,{element:o,children:D})}),t[50]=D,t[51]=o,t[52]=z):z=t[52];let B;t[53]!==I||t[54]!==r||t[55]!==e.legacy_referenceElement||t[56]!==z||t[57]!==a?(B=(0,Q.jsx)(w8,{header:r,onClose:I,width:a,containerRef:s,referenceElement:e.legacy_referenceElement,children:z}),t[53]=I,t[54]=r,t[55]=e.legacy_referenceElement,t[56]=z,t[57]=a,t[58]=B):B=t[58];let V;return t[59]!==o||t[60]!==B?(V=(0,Q.jsx)(I6,{scrollElement:o,containerElement:c,children:B}),t[59]=o,t[60]=B,t[61]=V):V=t[61],V}var V8=e=>Array.isArray(e)?e.flatMap(V8):typeof e==`number`?[e]:e===`auto`?[`auto`]:[1],Gtt=e=>e===`dialog`||e===`popover`?e:void 0;function Ktt(e){let t=e.options?.modal;if(typeof t!=`object`||!t)return;let n=V8(t.width);return{type:Gtt(t.type),width:n.length>0?n:void 0}}function qtt(e){let t=(0,Z.c)(16),{onClose:n,children:r,title:i,width:a,autoFocus:o}=e,s=a===void 0?1:a,c=(0,X.useId)(),[l,u]=(0,X.useState)(null),d=(0,X.useRef)(null),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=[0,0,1,0],t[0]=f):f=t[0];let p;t[1]===r?p=t[2]:(p=(0,Q.jsx)(K,{ref:d,children:r}),t[1]=r,t[2]=p);let m;t[3]!==l||t[4]!==p?(m=(0,Q.jsx)(z8,{children:(0,Q.jsx)(Kr,{element:l,children:p})}),t[3]=l,t[4]=p,t[5]=m):m=t[5];let h;t[6]!==l||t[7]!==m?(h=(0,Q.jsx)(P8,{margins:f,children:(0,Q.jsx)(I6,{scrollElement:l,containerElement:d,children:m})}),t[6]=l,t[7]=m,t[8]=h):h=t[8];let g;return t[9]!==o||t[10]!==c||t[11]!==n||t[12]!==h||t[13]!==i||t[14]!==s?(g=(0,Q.jsx)(oI,{header:i,id:c,onClickOutside:n,onClose:n,portal:`default`,width:s,contentRef:u,"data-testid":`default-edit-object-dialog`,__unstable_autoFocus:o,children:h}),t[9]=o,t[10]=c,t[11]=n,t[12]=h,t[13]=i,t[14]=s,t[15]=g):g=t[15],g}var Jtt=J(aI).withConfig({displayName:`RootPopover`,componentId:`sc-twntgv-0`})`[data-ui='Popover__wrapper']{overflow:auto;max-height:60vh;}`,Ytt=J(K).withConfig({displayName:`ContentScrollerBox`,componentId:`sc-twntgv-1`})`overflow-x:hidden;`,Xtt=J(K).withConfig({displayName:`ContentHeaderBox`,componentId:`sc-twntgv-2`})`box-shadow:0 1px 0 var(--card-shadow-outline-color);position:relative;z-index:10;min-height:auto;`,Ztt=e=>{let t=(0,Z.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,Q.jsx)(`div`,{...r,tabIndex:-1,childLine truncated
|
||||
box-shadow: inset 1px 0 0 var(--card-focus-ring-color);`} ${t&&!n&&`
|
||||
box-shadow: inset 0 0 0 transparent;
|
||||
`} &:focus{box-shadow:${g5({base:a,focusRing:{...i,offset:2}})};}&:focus:not(:focus-visible){box-shadow:none;}`}),v5=[];function y5(e){let t=(0,Z.c)(101),n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16],v=t[17],y=t[18],b=t[19],x=t[20],S=t[21],C=t[22],w=t[23],T=t[24]):({ref:l,__internal_comments:o,__internal_slot:v,__unstable_headerActions:y,__unstable_presence:b,changedFromBaseVariant:x,children:n,collapsed:r,collapsible:i,columns:a,description:c,level:S,onCollapse:d,onExpand:f,onFocus:p,schemaType:_,tabIndex:w,title:T,validation:C,inputId:u,path:m,deprecated:s,readOnly:h,...g}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_,t[17]=v,t[18]=y,t[19]=b,t[20]=x,t[21]=S,t[22]=C,t[23]=w,t[24]=T);let E=v===void 0?null:v,D=y===void 0?v5:y,O=b===void 0?v5:b,k=x!==void 0&&x,A=S===void 0?0:S,j=C===void 0?v5:C,{focused:M,hovered:N,onMouseEnter:P,onMouseLeave:F}=KR(),I=j.length>0,L=(0,X.useRef)(null),{t:R}=G(),z;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>L.current,t[25]=z):z=t[25],(0,X.useImperativeHandle)(l,z);let B;t[26]===p?B=t[27]:(B=e=>{L.current===e.target&&p&&p(e)},t[26]=p,t[27]=B);let V=B,H;t[28]!==r||t[29]!==d||t[30]!==f?(H=()=>r?f?.():d?.(),t[28]=r,t[29]=d,t[30]=f,t[31]=H):H=t[31];let U=H,W;bb0:{if(r){W=null;break bb0}let e;t[32]===n?e=t[33]:(e=Jnt(n),t[32]=n,t[33]=e);let i;t[34]!==a||t[35]!==e?(i=(0,Q.jsx)(Wnt,{gridTemplateColumns:a,gapX:4,gapY:5,children:e}),t[34]=a,t[35]=e,t[36]=i):i=t[36],W=i}let ee=W,te;t[37]!==k||t[38]!==m?(te=(0,Q.jsx)(c5,{path:m,changedFromBaseVariant:k}),t[37]=k,t[38]=m,t[39]=te):te=t[39];let ne=!!M,re;t[40]!==r||t[41]!==i||t[42]!==U||t[43]!==T?(re=T&&(0,Q.jsx)(qnt,{collapsed:!!r,collapsible:i,onClick:i?U:void 0,title:T}),t[40]=r,t[41]=i,t[42]=U,t[43]=T,t[44]=re):re=t[44];let ie;t[45]!==s||t[46]!==R||t[47]!==T?(ie=s&&(0,Q.jsx)(K,{marginLeft:2,children:(0,Q.jsx)(ri,{"data-testid":`deprecated-badge-${T}`,tone:`caution`,children:R(`form.field.deprecated-label`)})}),t[45]=s,t[46]=R,t[47]=T,t[48]=ie):ie=t[48];let ae;t[49]!==m||t[50]!==_?(ae=Jn(_)&&(0,Q.jsx)(K,{marginLeft:2,children:(0,Q.jsx)(Hnt,{path:m})}),t[49]=m,t[50]=_,t[51]=ae):ae=t[51];let oe;t[52]!==I||t[53]!==j?(oe=I&&(0,Q.jsx)(K,{marginLeft:2,children:(0,Q.jsx)(wR,{fontSize:1,placement:`top`,validation:j})}),t[52]=I,t[53]=j,t[54]=oe):oe=t[54];let se;t[55]!==re||t[56]!==ie||t[57]!==ae||t[58]!==oe?(se=(0,Q.jsxs)(ci,{align:`center`,children:[re,ie,ae,oe]}),t[55]=re,t[56]=ie,t[57]=ae,t[58]=oe,t[59]=se):se=t[59];let ce;t[60]!==s||t[61]!==T?(ce=s&&(0,Q.jsx)(WM,{"data-testid":`deprecated-message-${T}`,tone:`caution`,size:1,children:s.reason}),t[60]=s,t[61]=T,t[62]=ce):ce=t[62];let le;t[63]!==c||t[64]!==u?(le=c&&(0,Q.jsx)(Y,{muted:!0,size:1,id:SR(u,c),children:c}),t[63]=c,t[64]=u,t[65]=le):le=t[65];let ue;t[66]!==se||t[67]!==ce||t[68]!==le?(ue=(0,Q.jsxs)(Xr,{gap:3,children:[se,ce,le]}),t[66]=se,t[67]=ce,t[68]=le,t[69]=ue):ue=t[69];let de;t[70]!==D||t[71]!==o||t[72]!==N||t[73]!==u||t[74]!==O||t[75]!==E||t[76]!==ne||t[77]!==ue?(de=(0,Q.jsx)(FR,{__internal_comments:o,__internal_slot:E,actions:D,fieldFocused:ne,fieldHovered:N,presence:O,inputId:u,content:ue}),t[70]=D,t[71]=o,t[72]=N,t[73]=u,t[74]=O,t[75]=E,t[76]=ne,t[77]=ue,t[78]=de):de=t[78];let fe=A>0,pe=!!M,me=A===0?0:3,he=typeof w==`number`&&w>-1?V:void 0,ge=!r&&ee,_e;t[79]!==r||t[80]!==fe||t[81]!==pe||t[82]!==me||t[83]!==he||t[84]!==ge||t[85]!==w?(_e=(0,Q.jsx)(Xnt,{$borderLeft:fe,$focused:pe,hidden:r,paddingLeft:me,onFocus:he,ref:L,tabIndex:w,children:ge}),t[79]=r,t[80]=fe,t[81]=pe,t[82]=me,t[83]=he,t[84]=ge,t[85]=w,t[86]=_e):_e=t[86];let ve;t[87]!==A||t[88]!==P||t[89]!==F||t[90]!==g||t[91]!==de||t[92]!==_e?(ve=(0,Q.jsxs)(Ynt,{"data-level":A,...g,onMouseEnter:P,onMouseLeave:F,gap:2,children:[de,_e]}),t[87]=A,t[88]=P,t[89]=F,t[90]=g,t[91]=de,t[92]=_e,t[93]=ve):ve=t[93];let ye;t[94]!==m||t[95]!==h||t[96]!==ve?(ye=(0,Q.jsx)(h3,{path:m,readOnly:h,children:ve}),t[94]=m,t[95]=h,t[96]=ve,t[97]=ye):ye=t[97];let be;return t[98]!==te||t[99]!==ye?(be=(0,Q.jsx)(f5,{gutterStartCell:te,children:ye}),t[98]=te,t[99]=ye,t[100]=be):be=t[100],be}function Znt(e){let t=(0,Z.c)(5),n;t[0]===e.id?n=t[1]:(n={id:e.id},t[0]=e.id,t[1]=n);let r=n,i;return t[2]!==e.children||t[3]!==r?(i=(0,Q.jsx)(z.Provider,{value:r,children:e.children}),t[2]=e.children,t[3]=r,t[4]=i):i=t[4],i}function Qnt(){let e=(0,X.useContext)(z);if(!e)throw Error(`useDocumentId must be used within a DocumentIdProvider`);return e.id}function b5(){let e=(0,Z.c)(2),t=Qnt(),n;return e[0]===t?n=e[1]:(n=Di(t),e[0]=t,e[1]=n),n}var x5=$nt();function $nt(){return typeof window>`u`?!1:`ontouchstart`in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function ert(){return(0,X.useContext)(s)}var S5=(0,X.memo)(function(e){let t=(0,Z.c)(20),{actions:n,children:r,path:i,focused:a,__internal_comments:o,__internal_slot:s}=e,{oLine truncated
|
||||
`),E].join(`
|
||||
`),options:{tag:o,perspective:n,variant:r},params:O,sortOrder:C,compiledSortEntries:S}}function Wrt({lastResult:e,sortOrder:t,compiledSortEntries:n}){if(!e)return;let r=t.some(({field:e})=>e===`_id`)?t:t.concat({field:`_id`,direction:`asc`});return r.reduce((t,i,a)=>[t,`(${r.slice(0,a).map((t,r)=>Krt(t,e,`==`,n?.[r])).concat(Krt(i,e,void 0,n?.[a])).filter(e=>e!==void 0).join(` && `)})`].filter(e=>e!==void 0).join(` || `),void 0)}var Grt={asc:`>`,desc:`<`};function Krt(e,t,n=Grt[e.direction],r){if(e.field===`_id`&&n===`==`)return;if(r){let e=qrt(t,r.projectionIndex);return[r.expression,n,JSON.stringify(e)].join(` `)}let i=t[e.field];return[e.field,n,JSON.stringify(i)].join(` `)}function qrt(e,t){let n=e[q5];if(Array.isArray(n))return n[t]}function Jrt(e,t){return typeof e==`string`?{query:e,types:t}:e.types.length?e:{...e,types:t}}var Yrt=(e,t,n)=>function(r,i={}){let a=Jrt(r,e),o={...n,...i},s=typeof r==`string`?r:r.query,c=a.types.flatMap(e=>hrt({schemaType:e,maxDepth:o.maxDepth||5})),l=c.reduce((e,t)=>Math.max(e,t.weight),0),u=e=>{let{query:n,params:s,options:c,sortOrder:u,compiledSortEntries:d}=Urt(a,r,o,{referenceIds:e,referenceWeight:l});return t.observable.fetch(n,s,c).pipe(q(e=>{let t=i.limit!==void 0&&e.length>i.limit,n=t?e.at(-2):e.at(-1);return{type:`groq2024`,hits:e.map(e=>({hit:e})).slice(0,i.limit??s.__limit-1),nextCursor:t?Wrt({lastResult:n,sortOrder:u,compiledSortEntries:d}):void 0}}))},d=s?brt(c,s):void 0;return d===void 0?u():t.observable.fetch(d.query,d.params,{tag:o.tag,perspective:o.perspective,variant:o.variant}).pipe(dn(()=>sn([])),fn(e=>{let t=Array.from(new Set((e??[]).filter(e=>typeof e==`string`).map(e=>Di(e))));return u(t.length>0?t:void 0)}))},Xrt=(e,t)=>{let{phrases:n,words:r}=tit(e),[i,a]=$rt(n,t),[o,s]=eit(r,t);return[i+o,[s,a].join(`, `)]},Zrt=e=>typeof e==`string`?e:JSON.stringify(e);function Qrt(e,t,n=[]){let r=iw(e,e=>e.typeName);return t.map((e,i)=>{let a=(r[e._type].paths||[])?.map((t,r)=>{let i=Zrt(e[`w${r}`]);if(!i)return{path:t.path,score:0,why:`No match`};let[a,o]=Xrt(n,i);return{path:t.path,score:a*t.weight,why:`${o} (*${t.weight})`}}),o=a.reduce((e,t)=>e+t.score,0);return{hit:e,resultIndex:t.length-i,score:o,stories:a}})}function $rt(e,t){let n=t.toLowerCase().trim(),r=0,i=0;return e.forEach(e=>{n.includes(e)&&(r+=e.length/n.length,i+=e.length)}),r===1?[1,`[Phrase] Exact match`]:[r/2,`[Phrase] Matched ${i} of ${n.length} characters`]}function eit(e,t){let n=mw(ST(xE(GX(t)))),r=mz(e,n),i=KX(n,e),a=r.length/i.length;return a===1?[1,`[Word] Exact match`]:[a/2,`[Word] Matched ${r.length} of ${i.length} terms: [${r.join(`, `)}]`]}function tit(e){let[t,n]=eE(mw(e.map(GX)),e=>/^".*"$/.test(e));return{phrases:mw(t).map(GX).map(nit),words:mw(n.map(GX))}}function nit(e){return e.replace(/^"(.*)"$/,`$1`)}var rit=new WeakMap,iit={title:10,subtitle:5,description:1.5},ait={_id:{weight:1,type:`string`},_type:{weight:1,type:`string`}},oit=[`reference`,`crossDatasetReference`,`slug`],J5=e=>e?[e,...J5(e.type)]:[],Y5=e=>e?.jsonType===`array`&&e.of.some(e=>J5(e).some(({name:e})=>e===`block`)),sit=e=>e?e?.jsonType===`string`:!1,cit=e=>J5(e).some(({jsonType:e,name:t})=>e===`object`&&t===`slug`),lit=e=>Gk(e)&&`search`in e&&Gk(e.search);function uit(e){return e!==void 0&&`name`in e}function dit(e,t){return cit(e)?[t,`current`].join(`.`):t}function X5(e,t,n){function r(e,i,a,o=[]){if(!e||a>t)return o;let s=J5(e);if(sit(e)||Y5(e)){let t=n(e,i);return typeof t==`number`&&o.push({path:i,weight:t,type:Y5(e)?`pt`:`string`}),o}if(cit(e)){let t=n(e,i);return typeof t==`number`&&o.push({path:dit(e,i),weight:t,type:Y5(e)?`pt`:`string`}),o}let c=o;for(let e of s)if(e.jsonType===`object`&&e.fields?.length&&!oit.includes(e.name))for(let t of e.fields)c=r(t.type,Fx([i,t.name].filter(Boolean)),a+1,c);else if(e.jsonType===`array`&&e.of?.length)for(let t of e.of)c=r(t,`${i}[]`,a+1,c);return c}return uit(e)?r(e,``,0).reduce((e,{path:t,weight:n,type:r})=>(e[t]={weight:n,type:r,path:t},e),{}):{}}var fit=e=>{let t=J5(e).map(e=>e.options).find(lit);return typeof t?.search?.weight==`number`?t.search.weight:null},pit=e=>J5(e).some(e=>e.hidden)?0:null,mit=e=>typeof(fit(e)??pit(e))==`number`?null:1,hit=(e,t,n)=>{let r=e?.preview?.select;if(!r)return null;let i=Object.fromEntries(Object.entries(r).map(([e,t])=>[t.replace(/\.\d+/g,`[]`),e])),a=X5(e,t,mit),o=Object.fromEntries(Object.entries(a).map(([e,{type:t}])=>({path:e,type:t})).filter(({path:e})=>i[e]).map(({path:e,type:t})=>[e,{type:t,weight:iit[i[e]]}]));return n?Object.fromEntries(Object.entries(i).map(([e,t])=>[e,{path:e,type:`string`,weight:iit[t]}])):X5(e,t,(e,t)=>{let n=o[dit(e,t)];return n?n.weight:null})};function git({schemaType:e,maxDepth:t,isCrossDataset:n,processPaths:r=e=>e}){let i=rit.get(e);if(i)return i;let a=X5(e,t,fit),o=X5(e,t,pit),s=X5(e,t,mit),c=hit(e,t,n),l={...ait,...s,...o,...c,...a},u={typeName:uit(e)?e.name:e.type,paths:r(Object.entries(l).map(([e,{type:t,weight:n}])=>({path:e,weight:n,...t===`pt`&&{mapWith:`pt::text`}})))};return rit
Line truncated
|
||||
`)})`:``,S=[...b,y,x].filter(Boolean).join(`, `),C=[`*[${m.join(` && `)}]`,`{${S}}`,`| order(${Vrt(v)})`,`[0...$__limit]`].join(` `),w=[`findability-mvi:4`].concat(d||[]).map(e=>`// ${e}`).join(`
|
||||
`);return{query:w?`${w}\n${C}`:C,params:{...Tit(p),__types:f.map(e=>e.typeName),__limit:u??1e3,...r},options:{tag:i,perspective:s,variant:c},searchSpec:f,terms:p}}var Tit=e=>e.reduce((e,t,n)=>(e[`t${n}`]=`${t}*`,e),{});function Eit(e,t){return typeof e==`string`?{query:e,types:t}:e.types.length?e:{...e,types:t}}var Dit={groqLegacy:(e,t,n)=>function(r,i={}){let{query:a,params:o,options:s,searchSpec:c,terms:l}=wit(Eit(r,e),{...n,...i});return sx(t,FA(s?.variant,PA(s?.perspective)?NA.apiVersion:void 0)).observable.fetch(a,o,s).pipe(n.unique?q(Ni):cn(),q(e=>Qrt(c,e,l)),i?.skipSortByScore?cn():q(e=>jw(e,e=>-e.score)),q(e=>({type:`weighted`,hits:e})))},groq2024:Yrt},Z5=(e,t,n)=>{let r=Dit[n.strategy??`groqLegacy`];return r(e,sx(t,FA(n?.variant,PA(n?.perspective)?NA.apiVersion:void 0)),n)},Q5={isLoading:!0,settings:{partialIndexSettings:{maxFieldDepth:0}}};function Oit({client:e}){let{projectId:t,dataset:n}=e.config();return e.observable.request({url:`/projects/${t}/datasets/${n}/settings/indexing`,tag:`search.getPartialIndexSettings`})}var $5=new Map;function e7(e){let t=(0,Z.c)(4),n=nx().search?.unstable_partialIndexing?.enabled,r=ix(ax),i=e||r,a;t[0]===i?a=t[1]:(a=i.config(),t[0]=i,t[1]=a);let o=a.dataset;n||$5.set(o,sn(Q5.settings)),$5.has(o)||$5.set(o,Oit({client:i}).pipe(St()));let s;t[2]===o?s=t[3]:(s=$5.get(o).pipe(q(Ait),lc(Q5),dn(kit)),t[2]=o,t[3]=s);let c=lS(s,Q5)?.settings?.partialIndexSettings?.maxFieldDepth;return tE(c)?Math.min(c,5):5}function kit(e){return console.error(e),sn({isLoading:!1,enabled:!0,settings:{partialIndexSettings:{maxFieldDepth:0}}})}function Ait(e){return{isLoading:!1,settings:e}}var jit=J(ei).withConfig({displayName:`StyledCard`,componentId:`sc-7imsgo-0`})(()=>kr`&[data-selected],&[data-pressed],&:active{[data-ui='TextWithTone']{color:inherit;}}`);function t7(e){let t=(0,Z.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({ref:i,children:r,selected:o,as:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===o?s=t[7]:(s={selected:o},t[6]=o,t[7]=s);let c=s,l;t[8]!==r||t[9]!==c?(l=(0,Q.jsx)(I.Provider,{value:c,children:r}),t[8]=r,t[9]=c,t[10]=l):l=t[10];let u;return t[11]!==n||t[12]!==i||t[13]!==a||t[14]!==o||t[15]!==l?(u=(0,Q.jsx)(jit,{"data-ui":`PreviewCard`,...a,forwardedAs:n,ref:i,selected:o,children:l}),t[11]=n,t[12]=i,t[13]=a,t[14]=o,t[15]=l,t[16]=u):u=t[16],u}var Mit=J(t7).withConfig({displayName:`ReferenceInputPreviewCard`,componentId:`sc-7imsgo-1`})`min-height:36px;`;function Nit(){return Gh({types:{},actors:{search:kh(()=>Mt(()=>Error(`The 'search' actor is not implemented. Add it to searchMachine.provide({actors: {search: fromObservable(({input}) => ...)}})`)))},guards:{"is same query":()=>!1,"should search":()=>!0},delays:{debounce:({context:e})=>e.debounceMs}}).createMachine({context:({input:e})=>({debounceMs:e.debounceMs??0,error:null,query:null,result:null,searchInterrupted:!1,settledQuery:null}),initial:`idle`,on:{search:[{guard:`is same query`},{target:`.debouncing`,actions:Ph({query:({event:e})=>e.query,searchInterrupted:!1})}]},states:{idle:{},debouncing:{on:{search:[{guard:`is same query`},{target:`debouncing`,reenter:!0,actions:Ph({query:({event:e})=>e.query})}]},after:{debounce:[{guard:`should search`,target:`searching`,actions:zh({type:`search started`})},{target:`skipped`,actions:zh({type:`search started`})}]}},searching:{on:{search:[{guard:`is same query`},{target:`debouncing`,actions:Ph({query:({event:e})=>e.query,searchInterrupted:!0})}]},entry:Ph({error:null}),invoke:{src:`search`,input:({context:e})=>({query:e.query}),onSnapshot:{guard:({event:e})=>e.snapshot.context!==void 0,target:`.streaming`,actions:[Ph({result:({event:e})=>e.snapshot.context,settledQuery:({context:e})=>e.query}),zh(({event:e})=>({type:`search completed`,result:e.snapshot.context}))]},onDone:{target:`success`},onError:{target:`failure`,actions:Ph({error:({event:e})=>e.error instanceof Error?e.error:Error(String(e.error)),result:null})}},initial:`pending`,states:{pending:{},streaming:{}}},success:{entry:Ph({settledQuery:({context:e})=>e.query})},failure:{entry:[Ph({settledQuery:({context:e})=>e.query}),zh(({context:e})=>({type:`search failed`,error:e.error}))]},skipped:{entry:[Ph({settledQuery:({context:e})=>e.query,result:null}),zh({type:`search skipped`})]}}})}var Pit=[];function n7(e){let t=(0,Z.c)(22),{search:n,distinct:r,debounceMs:i,onSearchFailed:a}=e,o=r!==void 0&&r,s=i===void 0?0:i,[c]=(0,X.useState)(Iit),l;if(t[0]!==o||t[1]!==c||t[2]!==n){let e;t[4]===n?e=t[5]:(e=e=>{let{input:t}=e;return n(t.query)},t[4]=n,t[5]=e);let r;t[6]===o?r=t[7]:(r=e=>{let{context:t,event:n}=e;return o&&t.query===n.query},t[6]=o,t[7]=r),l=c.provide({actors:{search:kh(e)},guards:{"is same query":r}}),t[0]=o,t[1]=c,t[2]=n,t[3]=l}else l=t[3];let u;t[8]===s?u=t[9]:(u={input:{debounceMs:s}},t[8]=s,t[9]=u);let d=uU(l,u),f;t[10]===a?f=t[11]:(f=e=>a?.(e),t[10]=a,t[11]=f);let p=(0,X.useEffectEvent)(f),m;t[12]!==d||t[13]!==p?(m=()=>{let e=d.on(`search failed`,e=>p(e.error));return()=
Line truncated
|
||||
(
|
||||
${n.wildcards}
|
||||
extension in [${n.extensions}] ||
|
||||
mimeType in [${n.mimes}]
|
||||
)`},Fst=(e=0,t=200,n=Nst,r)=>`
|
||||
*[_type == "${n}" ${r.length>0?Pst(r):``}] | order(_updatedAt desc) [${e}...${t}] {
|
||||
_id,
|
||||
_updatedAt,
|
||||
_createdAt,
|
||||
url,
|
||||
originalFilename,
|
||||
mimeType,
|
||||
extension,
|
||||
size,
|
||||
metadata {dimensions}
|
||||
}
|
||||
`,Ist=J(ei).withConfig({displayName:`CardLoadMore`,componentId:`sc-i13h8s-0`})`border-top:1px solid var(--card-border-color);position:sticky;bottom:0;z-index:200;`;function Lst(e){let t=(0,Z.c)(68),{ref:n,selectedAssets:r,assetType:i,dialogHeaderTitle:a,onClose:o,onSelect:s,accept:c}=e,l=i===void 0?`image`:i,u=ix(ax),[d]=(0,X.useState)(zst),f=(0,X.useRef)(0),{t:p}=G(),m=qx(),h=(0,X.useRef)(void 0),g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=[],t[0]=g):g=t[0];let[_,v]=(0,X.useState)(g),[y,b]=(0,X.useState)(!1),[x,S]=(0,X.useState)(!1),[C,w]=(0,X.useState)(!0),T=c&&c===`image/*`&&l===`image`,E;t[1]!==c||t[2]!==l||t[3]!==u||t[4]!==p||t[5]!==m?(E=e=>{let t=e*200,n=t+200,r=l===`image`,i=r?`asset.image-list`:`asset.file-list`,a=r?Nst:`sanity.fileAsset`;w(!0),c!==void 0&&(h.current=u.observable.fetch(Fst(t,n,a,c),{},{tag:i}).subscribe({next:e=>{b(e.length<200),v(t=>t.concat(e)),w(!1)},error:t=>{console.error(t),w(!1),f.current=e>0?e-1:0,m.push({status:`error`,title:p(`asset-source.dialog.load-error`)})}}))},t[1]=c,t[2]=l,t[3]=u,t[4]=p,t[5]=m,t[6]=E):E=t[6];let D=E,O;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{v(t=>t.filter(t=>t._id!==e))},t[7]=O):O=t[7];let k=O,A;t[8]!==_||t[9]!==s?(A=e=>{_.find(t=>t._id===e)&&s([{kind:`assetDocumentId`,value:e}])},t[8]=_,t[9]=s,t[10]=A):A=t[10];let j=A,M;t[11]===j?M=t[12]:(M=e=>{e.preventDefault();let t=e.currentTarget.getAttribute(`data-id`);if(!t)throw Error(`Missing data-id attribute on item`);j(t)},t[11]=j,t[12]=M);let N=M,P;t[13]===j?P=t[14]:(P=e=>{if(e.key===`Enter`){e.preventDefault();let t=e.currentTarget.getAttribute(`data-id`);if(!t)throw Error(`Missing data-id attribute on item`);j(t)}},t[13]=j,t[14]=P);let F=P,I;t[15]===o?I=t[16]:(I=()=>{o&&o()},t[15]=o,t[16]=I);let L=I,R;t[17]===D?R=t[18]:(R=e=>{e.preventDefault(),D(f.current+=1)},t[17]=D,t[18]=R);let z=R,B,V;t[19]===D?(B=t[20],V=t[21]):(V=()=>(D(f.current),()=>{h.current&&h.current.unsubscribe()}),B=[D],t[19]=D,t[20]=B,t[21]=V),(0,X.useEffect)(V,B);let H,U;t[22]===C?(H=t[23],U=t[24]):(H=()=>{!C&&(!f.current||f.current===0)&&S(!0)},U=[C],t[22]=C,t[23]=H,t[24]=U),(0,X.useEffect)(H,U);let W;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(W={style:`narrow`},t[25]=W):W=t[25];let ee=JM(W),te;t[26]!==l||t[27]!==a||t[28]!==p?(te=a||p(`asset-source.dialog.default-title`,{context:l===`sanity.video`?`video`:l}),t[26]=l,t[27]=a,t[28]=p,t[29]=te):te=t[29];let ne;t[30]!==c||t[31]!==T||t[32]!==C||t[33]!==ee||t[34]!==p?(ne=!T&&!C&&c?.length>0&&(0,Q.jsx)(ei,{tone:`primary`,padding:3,border:!0,radius:2,children:(0,Q.jsxs)(ci,{gap:3,align:`center`,children:[(0,Q.jsx)(Y,{size:1,children:(0,Q.jsx)(oa,{})}),(0,Q.jsx)(Y,{size:1,children:(0,Q.jsx)(XM,{t:p,i18nKey:`asset-source.dialog.accept-message`,values:{acceptTypes:ee.format(c.split(`,`).map(Rst))}})})]})}),t[30]=c,t[31]=T,t[32]=C,t[33]=ee,t[34]=p,t[35]=ne):ne=t[35];let re;t[36]!==l||t[37]!==_||t[38]!==N||t[39]!==F||t[40]!==C||t[41]!==r?(re=l===`file`&&(0,Q.jsx)(Tst,{assets:_,onDeleteFinished:k,onClick:N,onKeyPress:F,isLoading:C,selectedAssets:r}),t[36]=l,t[37]=_,t[38]=N,t[39]=F,t[40]=C,t[41]=r,t[42]=re):re=t[42];let ie;t[43]!==l||t[44]!==_||t[45]!==N||t[46]!==F||t[47]!==C||t[48]!==r?(ie=l===`image`&&(0,Q.jsx)(Mst,{assets:_,onDeleteFinished:k,onItemClick:N,onItemKeyPress:F,isLoading:C,selectedAssets:r}),t[43]=l,t[44]=_,t[45]=N,t[46]=F,t[47]=C,t[48]=r,t[49]=ie):ie=t[49];let ae;t[50]!==_.length||t[51]!==z||t[52]!==y||t[53]!==C||t[54]!==p?(ae=_.length>0&&!y&&(0,Q.jsx)(Ist,{tone:`default`,padding:4,children:(0,Q.jsx)(ci,{direction:`column`,children:(0,Q.jsx)(Le,{type:`button`,icon:ja,loading:C,onClick:z,size:`large`,text:p(`asset-source.dialog.load-more`),tone:`primary`})})}),t[50]=_.length,t[51]=z,t[52]=y,t[53]=C,t[54]=p,t[55]=ae):ae=t[55];let oe;t[56]!==ne||t[57]!==re||t[58]!==ie||t[59]!==ae?(oe=(0,Q.jsxs)(Xr,{gap:5,children:[ne,re,ie,ae]}),t[56]=ne,t[57]=re,t[58]=ie,t[59]=ae,t[60]=oe):oe=t[60];let se;return t[61]!==d||t[62]!==L||t[63]!==x||t[64]!==n||t[65]!==te||t[66]!==oe?(se=(0,Q.jsx)(oI,{__unstable_autoFocus:x,header:te,id:d,onClickOutside:L,onClose:L,ref:n,width:2,children:oe}),t[61]=d,t[62]=L,t[63]=x,t[64]=n,t[65]=te,t[66]=oe,t[67]=se):se=t[67],se}function Rst(e){return e.trim()}function zst(){return`default-asset-source-${nZ()}`}var Bst=(0,X.memo)(Lst);function Vst(e){let t=(0,Z.c)(3),{ref:n,action:r}=e;if((r===void 0?`select`:r)===`select`){let r;return t[0]!==e||t[1]!==n?(r=(0,Q.jsx)(Bst,{...e,ref:n}),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}return null}var Hst=(0,X.memo)(Vst),Ust=class{files=[];subscribers=new Set;client;subscriptions=new Map;constructor(e){this.client=e.client}checkAllComplete(){this.files.length>0&&this.files.every(e=>[`complete`,`error`,`aborted`].includes(e.status))&&(this.emit({type:`all-complete`,files:this.files}),this.reset())}emit(e){this.subscribers.forEach(t=>t(e))}teardownFileSubscription(e){this.subscriptions.get(e)?.unsubscribe(),this.subscriptions.delete(e)}upload(e,t){let{schemaType:n,onChange:r}=t||{};for(let t of e){if(!n)throw Error
Line truncated
|
||||
--card-icon-color: var(--card-accent-fg-color);
|
||||
`:``),b_t=J.span.withConfig({displayName:`AccentSpan`,componentId:`sc-8dk95x-3`})`color:var(--card-accent-fg-color);--card-icon-color:var(--card-accent-fg-color);`,x_t=J.span.withConfig({displayName:`SemiboldSpan`,componentId:`sc-8dk95x-4`})(({theme:e})=>{let{weights:t}=e.sanity.fonts.text;return kr`font-weight:${t.semibold};`}),S_t=J(z1).withConfig({displayName:`InlineIcon`,componentId:`sc-8dk95x-5`})`&[data-sanity-icon]{margin-left:${e=>e.$hasTextLeft?`0`:``};margin-right:${e=>e.$hasTextRight?`0`:``};}`,C_t=J.a.withConfig({displayName:`Link`,componentId:`sc-8dk95x-6`})`font-weight:600;color:${e=>e.$useTextColor?`var(--card-muted-fg-color) !important`:``};`,w_t=J.span.withConfig({displayName:`DynamicIconContainer`,componentId:`sc-8dk95x-7`})`display:${({$inline:e})=>e?`inline-block`:`inline`};font-size:calc(21 / 16 * 1rem) !important;min-width:calc(21 / 16 * 1rem - 0.375rem);line-height:0;> svg{height:1em;width:1em;display:inline;font-size:1em !important;margin:-0.375rem !important;*[stroke]{stroke:currentColor;}}`,T_t=e=>{let t=(0,Z.c)(8),[n,r]=(0,X.useState)(``),i,a;t[0]===e.icon.url?(i=t[1],a=t[2]):(i=()=>{let t=new AbortController,n=t.signal;return fetch(e.icon.url,{signal:n}).then(P_t).then(e=>r(e)).catch(F_t),()=>{t.abort()}},a=[e.icon.url],t[0]=e.icon.url,t[1]=i,t[2]=a),(0,X.useEffect)(i,a);let o=!!e.inline,s;t[3]===n?s=t[4]:(s={__html:n},t[3]=n,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,Q.jsx)(w_t,{$inline:o,dangerouslySetInnerHTML:s}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c};function E_t(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(K,{paddingX:2,marginBottom:4,children:(0,Q.jsx)(Y,{size:1,muted:!0,children:n})}),t[0]=n,t[1]=r),r}function D_t(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(K,{paddingX:2,marginY:4,children:(0,Q.jsx)(Qr,{size:2,as:`h2`,children:n})}),t[0]=n,t[1]=r),r}function O_t(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(K,{paddingX:2,marginY:4,children:(0,Q.jsx)(Qr,{size:1,as:`h3`,children:n})}),t[0]=n,t[1]=r),r}var k_t=J.img.withConfig({displayName:`Image`,componentId:`sc-8dk95x-8`})(e=>{let t=xr(e.theme);return kr`object-fit:cover;width:100%;border-radius:${t.radius[3]}px;`});function A_t(e){let t=(0,Z.c)(2),n=e.value.image?.url,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(K,{paddingX:2,marginY:4,children:(0,Q.jsx)(k_t,{src:n})}),t[0]=n,t[1]=r),r}var j_t=e=>t=>!t||!e?t:(Array.isArray(t)?t:[t]).map(t=>typeof t==`string`?C9(t,e):t),M_t=({onLinkClick:e,interpolation:t})=>{let n=j_t(t);return{block:{normal:({children:e})=>(0,Q.jsx)(E_t,{children:n(e)}),h2:({children:e})=>(0,Q.jsx)(D_t,{children:n(e)}),h3:({children:e})=>(0,Q.jsx)(O_t,{children:n(e)})},list:{bullet:({children:e})=>(0,Q.jsx)(`ul`,{children:n(e)}),number:({children:e})=>(0,Q.jsx)(`ol`,{children:n(e)}),checkmarks:({children:e})=>(0,Q.jsx)(Q.Fragment,{children:n(e)})},listItem:{bullet:({children:e})=>(0,Q.jsx)(Y,{as:`li`,size:1,muted:!0,style:{display:`list-item`,padding:`0.5rem 0`},children:n(e)}),number:({children:e})=>(0,Q.jsx)(Y,{as:`li`,size:1,muted:!0,style:{display:`list-item`,padding:`0.5rem 0`},children:n(e)}),checkmarks:({children:e})=>(0,Q.jsx)(Y,{children:e})},marks:{strong:({children:e})=>(0,Q.jsx)(`strong`,{children:n(e)}),semibold:({children:e})=>(0,Q.jsx)(x_t,{children:n(e)}),link:t=>(0,Q.jsxs)(C_t,{href:t.value.href,rel:`noopener noreferrer`,target:`_blank`,$useTextColor:t.value.useTextColor,onClick:e?()=>e({url:t.value.href,linkTitle:t.text}):void 0,children:[t.children,t.value.showIcon&&(0,Q.jsx)(wa,{style:{marginLeft:`2px`}})]}),accent:({children:e})=>(0,Q.jsx)(b_t,{children:n(e)})},types:{inlineIcon:e=>{let t=e.value.sanityIcon?(0,Q.jsx)(S_t,{symbol:e.value.sanityIcon,$hasTextLeft:e.value.hasTextLeft,$hasTextRight:e.value.hasTextRight}):(0,Q.jsx)(Q.Fragment,{children:e.value.icon?.url&&(0,Q.jsx)(T_t,{icon:e.value.icon,inline:!0})});return e.value.accent?(0,Q.jsx)(b_t,{children:t}):t},divider:()=>(0,Q.jsx)(K,{marginY:3,children:(0,Q.jsx)(K,{paddingY:3,children:(0,Q.jsx)(__t,{})})}),iconAndText:e=>(0,Q.jsxs)(Be,{alignItems:`flex-start`,paddingX:2,paddingTop:1,paddingBottom:2,marginTop:2,gap:2,children:[(0,Q.jsxs)(Be,{gap:2,style:{flexShrink:0},children:[(0,Q.jsx)(y_t,{size:1,accent:e.value.accent,children:e.value.sanityIcon?(0,Q.jsx)(z1,{symbol:e.value.sanityIcon}):(0,Q.jsxs)(Q.Fragment,{children:[e.value.icon?.url&&(0,Q.jsx)(T_t,{icon:e.value.icon}),` `]})}),(0,Q.jsx)(Y,{size:1,weight:`semibold`,accent:e.value.accent,children:n(e.value.title)})]}),(0,Q.jsx)(Y,{size:1,muted:!0,accent:e.value.accent,children:n(e.value.text)})]}),imageBlock:e=>(0,Q.jsx)(A_t,{...e})}}};function N_t(e){let t=(0,Z.c)(8),{blocks:n,onLinkClick:r,interpolation:i}=e,a;t[0]===n?a=t[1]:(a=g_t(n),t[0]=n,t[1]=a);let o=a,s;t[2]!==i||t[3]!==r?(s=M_t({onLinkClick:r,interpolation:i}),t[2]=i,t[3]=r,t[4]=s):s=t[4];let c=s,l;return t[5]!==c||t[6]!==o?(l=(0,Q.jsx)(ei,{tone:`default`,children:(0,Q.jsx)(v_t,{children:(0,Q.jsx)(L1,{value:o,components:c,onMissingComponen
Line truncated
|
||||
position: absolute;
|
||||
top: ${t[3]}px;
|
||||
right: ${t[3]}px;
|
||||
z-index: 20;
|
||||
background: transparent;
|
||||
border-radius: 9999px;
|
||||
box-shadow: none;
|
||||
color: ${Br.hex};
|
||||
--card-fg-color: ${Br.hex};
|
||||
:hover {
|
||||
--card-fg-color: ${Br.hex};
|
||||
}
|
||||
`}),L_t=J.img.withConfig({displayName:`Image`,componentId:`sc-jpziwp-1`})`object-fit:cover;width:100%;height:100%;height:200px;`;function R_t(e){let t=(0,Z.c)(25),{data:n,open:r,onClose:i,onPrimaryClick:a,onSecondaryClick:o,interpolation:s}=e;if(!n||!(r===void 0||r))return null;let c;t[0]!==n.secondaryButton||t[1]!==o?(c=n.secondaryButton?.text?{text:n.secondaryButton.text,mode:`bleed`,tone:`default`,iconRight:Da,...n.secondaryButton.url&&{target:`_blank`,rel:`noopener noreferrer`,as:`a`,href:n.secondaryButton.url},onClick:o}:void 0,t[0]=n.secondaryButton,t[1]=o,t[2]=c):c=t[2];let l=n.ctaButton?.text,u;t[3]===n.ctaButton.url?u=t[4]:(u=n.ctaButton.url&&{target:`_blank`,rel:`noopener noreferrer`,as:`a`,href:n.ctaButton.url},t[3]=n.ctaButton.url,t[4]=u);let d;t[5]!==a||t[6]!==l||t[7]!==u?(d={text:l,mode:`default`,tone:`default`,...u,onClick:a},t[5]=a,t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;t[9]!==c||t[10]!==d?(f={cancelButton:c,confirmButton:d},t[9]=c,t[10]=d,t[11]=f):f=t[11];let p;t[12]===i?p=t[13]:(p=(0,Q.jsx)(I_t,{icon:Hi,mode:`bleed`,tone:`default`,onClick:i,tabIndex:-1,tooltipProps:null}),t[12]=i,t[13]=p);let m;t[14]===n.image?m=t[15]:(m=n.image&&(0,Q.jsx)(L_t,{src:n.image.asset.url,alt:n.image.asset.altText??``}),t[14]=n.image,t[15]=m);let h;t[16]!==n.descriptionText||t[17]!==s?(h=(0,Q.jsx)(K,{padding:3,marginTop:2,children:(0,Q.jsx)(Xr,{gap:4,paddingBottom:2,children:(0,Q.jsx)(N_t,{blocks:n.descriptionText,interpolation:s})})}),t[16]=n.descriptionText,t[17]=s,t[18]=h):h=t[18];let g;return t[19]!==i||t[20]!==f||t[21]!==p||t[22]!==m||t[23]!==h?(g=(0,Q.jsxs)(oI,{id:`upsell-dialog`,onClose:i,onClickOutside:i,__unstable_hideCloseButton:!0,bodyHeight:`100%`,padding:!1,zOffset:800,footer:f,children:[p,m,h]}),t[19]=i,t[20]=f,t[21]=p,t[22]=m,t[23]=h,t[24]=g):g=t[24],g}function z_t(e){let t=(0,Z.c)(9),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={dataUri:`/journey/asset-limit`,feature:`asset-limits`},t[0]=r):r=t[0];let i=m_t(r),a;t[1]===i?a=t[2]:(a=p_t(i),t[1]=i,t[2]=a);let o;t[3]===a?o=t[4]:(o=(0,Q.jsx)(R_t,{...a}),t[3]=a,t[4]=o);let s;return t[5]!==n||t[6]!==i||t[7]!==o?(s=(0,Q.jsxs)(U.Provider,{value:i,children:[n,o]}),t[5]=n,t[6]=i,t[7]=o,t[8]=s):s=t[8],s}var B_t=()=>{let e=(0,X.useContext)(U);if(!e)throw Error(`useAssetLimitsUpsellContext must be used within a AssetLimitUpsellProvider`);return e};function V_t(e){let t=(0,Z.c)(6),n=(0,X.use)(e.promise),r;t[0]!==n||t[1]!==e.children||t[2]!==e.waitPlaceholder?(r=n?e.children(n):e.waitPlaceholder,t[0]=n,t[1]=e.children,t[2]=e.waitPlaceholder,t[3]=r):r=t[3];let i;return t[4]===r?i=t[5]:(i=(0,Q.jsx)(Q.Fragment,{children:r}),t[4]=r,t[5]=i),i}function w9(e){let t=(0,Z.c)(14),{reference:n,children:r,observeAsset:i,waitPlaceholder:a}=e,o=n?._ref,s;t[0]!==o||t[1]!==i?(s=o?i(o):bs,t[0]=o,t[1]=i,t[2]=s):s=t[2];let c=s,l=!o,u;t[3]===l?u=t[4]:(u={disabled:l},t[3]=l,t[4]=u);let d=gS(c,u);if(!o){let e;return t[5]===a?e=t[6]:(e=(0,Q.jsx)(Q.Fragment,{children:a}),t[5]=a,t[6]=e),e}let f;t[7]!==r||t[8]!==d||t[9]!==a?(f=(0,Q.jsx)(V_t,{promise:d,waitPlaceholder:a,children:r}),t[7]=r,t[8]=d,t[9]=a,t[10]=f):f=t[10];let p;return t[11]!==f||t[12]!==a?(p=(0,Q.jsx)(X.Suspense,{fallback:a,children:f}),t[11]=f,t[12]=a,t[13]=p):p=t[13],p}var H_t={file:`inputs.files.select-dialog.title`,image:`inputs.image.select-dialog.title`,"sanity.video":`inputs.video.select-dialog.title`},U_t={file:``,image:`image/*`,"sanity.video":`video/*`};function T9(e){let t=(0,Z.c)(35),{action:n,assetType:r,observeAsset:i,onClose:a,onChangeAction:o,onSelect:s,openInSourceAsset:c,schemaType:l,selectedAssetSource:u,value:d,uploader:f}=e,{t:p}=G(),m;t[0]!==r||t[1]!==e.accept||t[2]!==l?(m=e.accept??$C(l,`options.accept`,U_t[r]),t[0]=r,t[1]=e.accept,t[2]=l,t[3]=m):m=t[3];let h=m,g;t[4]!==r||t[5]!==l?.title||t[6]!==p?(g=()=>p(H_t[r],{targetTitle:l?.title}),t[4]=r,t[5]=l?.title,t[6]=p,t[7]=g):g=t[7],l?.title;let _;t[8]===g?_=t[9]:(_=g(),t[8]=g,t[9]=_);let v=_,{waitPlaceholder:y}=e,b=u.component,x=c||void 0,S;t[10]!==h||t[11]!==n||t[12]!==r||t[13]!==v||t[14]!==o||t[15]!==a||t[16]!==s||t[17]!==l||t[18]!==u||t[19]!==x||t[20]!==f?(S={accept:h,action:n,assetSource:u,assetToOpen:x,assetType:r,dialogHeaderTitle:v,onChangeAction:o,onClose:a,onSelect:s,schemaType:l,selectionType:`single`,uploader:f},t[10]=h,t[11]=n,t[12]=r,t[13]=v,t[14]=o,t[15]=a,t[16]=s,t[17]=l,t[18]=u,t[19]=x,t[20]=f,t[21]=S):S=t[21];let C=S,w;t[22]!==b||t[23]!==C?(w=e=>(0,Q.jsx)(b,{...C,selectedAssets:[e]}),t[22]=b,t[23]=C,t[24]=w):w=t[24];let T=w,E;t[25]!==b||t[26]!==C?(E=()=>(0,Q.jsx)(b,{...C,selectedAssets:[]}),t[25]=b,t[26]=C,t[27]=E):E=t[27];let D=E;if(d?.asset&&i){let e;return t[28]!==i||t[29]!==T||t[30]!==d.asset||t[31]!==y?(e=(0,Q.jsx)(w9,{observeAsset:i,reference:d.asset,waitPlaceholder:y,children:T}),t[28]=i,t[29]=T,t[30]=d.asset,t[31]=y,t[32]=e):e=t[32],e}let O;return t[33]===D?O=t[34]:(O=D(),t[33]=D,t[34]=O),O}function W_t(){let e=(0,Z.c)(13),[t,n]=(0,X.useState)(),[r,i]=(0,X.useState)(null),[a,o]=(0,X.useState)(null),[s,c]=(
Line truncated
|
||||
L ${-t} ${-t}
|
||||
L ${e*1.5} ${-t}
|
||||
L ${e*1.5} ${t}
|
||||
L ${t} ${t}
|
||||
L ${t} ${e*1.5}
|
||||
Z`},EDGE_DIMENSIONS:{top:e=>({width:e*2,height:e}),right:e=>({width:e,height:e*2}),bottom:e=>({width:e*2,height:e}),left:e=>({width:e,height:e*2})}},pyt={cornerPath:X9.CORNER_PATH(8),edgeDimensions:{top:X9.EDGE_DIMENSIONS.top(8),right:X9.EDGE_DIMENSIONS.right(8),bottom:X9.EDGE_DIMENSIONS.bottom(8),left:X9.EDGE_DIMENSIONS.left(8)}},myt=e=>{let t={top:{x:e.left+e.width/2,y:e.top},right:{x:W9(e),y:e.top+e.height/2},bottom:{x:e.left+e.width/2,y:G9(e)},left:{x:e.left,y:e.top+e.height/2},topLeft:{x:e.left,y:e.top},topRight:{x:W9(e),y:e.top},bottomLeft:{x:e.left,y:G9(e)},bottomRight:{x:W9(e),y:G9(e)}},n={topLeft:0,topRight:90,bottomRight:180,bottomLeft:270},r={};for(let e of[`top`,`right`,`bottom`,`left`]){let n=pyt.edgeDimensions[e],i=t[e];r[e]={visual:{left:i.x-n.width/2,top:i.y-n.height/2,width:n.width,height:n.height},hit:{left:i.x-12,top:i.y-12,width:24,height:24}}}for(let e of[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`]){let i=t[e];r[e]={visual:{left:i.x-24,top:i.y-24,width:48,height:48},hit:{left:i.x-12,top:i.y-12,width:24,height:24},path:pyt.cornerPath,position:i,rotation:n[e]}}return r};function hyt(){let e=(0,Z.c)(8),[t,n]=(0,X.useState)(null),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{n(e)},e[0]=r):r=e[0];let i=r,a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{n(null)},e[1]=a):a=e[1];let o=a,s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>i(`hotspot`),e[2]=s):s=e[2];let c=s,l;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>i(`hotspotHandle`),e[3]=l):l=e[3];let u=l,d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>i(`crop`),e[4]=d):d=e[4];let f=d,p;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>()=>i(`crop-${e}`),e[5]=p):p=e[5];let m=p,h;return e[6]===t?h=e[7]:(h={hoverTarget:t,handleMouseEnter:i,handleMouseLeave:o,handleHotspotMouseEnter:c,handleHotspotHandleMouseEnter:u,handleCropMouseEnter:f,getCropHandleMouseEnter:m},e[6]=t,e[7]=h),h}function gyt(e){let t=(0,Z.c)(20),{value:n,onChange:r,onChangeEnd:i,innerRect:a,focusTarget:o,readOnly:s}=e,c=(0,X.useRef)(null),l=(0,X.useRef)(null),u=(0,X.useRef)(null),d=(0,X.useRef)(null),f;t[0]!==i||t[1]!==n?(f=()=>{(c.current||l.current)&&(i({crop:n.crop||z9,hotspot:n.hotspot||R9}),c.current=null,l.current=null,u.current=null)},t[0]=i,t[1]=n,t[2]=f):f=t[2];let p=f,m;t[3]===a?m=t[4]:(m=e=>{let{e:t,crop:n,hotspot:r,isCtrlOrCmdPressed:i,step:o,resizeStep:s}=e,c;if(i){let e={x:u.current.x,y:u.current.y};bb19:switch(t.key){case`ArrowUp`:e.y-=a.height*s;break bb19;case`ArrowDown`:e.y+=a.height*s;break bb19;case`ArrowLeft`:e.x-=a.width*s;break bb19;case`ArrowRight`:e.x+=a.width*s;break bb19;default:return null}c=cyt({initialHotspot:r,crop:n,initialCursor:u.current,pointerPos:e,innerRect:a})}else{let e={x:0,y:0};bb31:switch(t.key){case`ArrowUp`:e.y=-o;break bb31;case`ArrowDown`:e.y=o;break bb31;case`ArrowLeft`:e.x=-o;break bb31;case`ArrowRight`:e.x=o;break bb31;default:return null}c={hotspot:oyt({hotspot:r,crop:n},e),crop:n}}return c},t[3]=a,t[4]=m);let h=m,g;t[5]===a?g=t[6]:(g=e=>{let{e:t,crop:n,hotspot:r,isCtrlOrCmdPressed:i,step:o,resizeStep:s}=e;if(i){let e,i={x:u.current.x,y:u.current.y};bb46:switch(t.key){case`ArrowUp`:e=`crop-bottom`,i.y-=a.height*s;break bb46;case`ArrowDown`:e=`crop-bottom`,i.y+=a.height*s;break bb46;case`ArrowLeft`:e=`crop-right`,i.x-=a.width*s;break bb46;case`ArrowRight`:e=`crop-right`,i.x+=a.width*s;break bb46;default:return null}if(e)return uyt({initialCrop:n,initialHotspot:r,initialCursor:u.current,pointerPos:i,innerRect:a,activeHandle:e})}else{let e={x:u.current.x,y:u.current.y};bb61:switch(t.key){case`ArrowUp`:e.y-=a.height*o;break bb61;case`ArrowDown`:e.y+=a.height*o;break bb61;case`ArrowLeft`:e.x-=a.width*o;break bb61;case`ArrowRight`:e.x+=a.width*o;break bb61;default:return null}return lyt({initialCrop:n,initialHotspot:r,initialCursor:u.current,pointerPos:e,innerRect:a})}return null},t[5]=a,t[6]=g);let _=g,v;t[7]!==o||t[8]!==_||t[9]!==h||t[10]!==a||t[11]!==r||t[12]!==s||t[13]!==n?(v=e=>{if(d.current!==null&&window.clearTimeout(d.current),s||!o||![`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(e.key))return;let t=n.crop||z9,i=n.hotspot||R9;c.current={...t},l.current={...i},u.current={x:a.width/2,y:a.height/2};let f=e.shiftKey,p=e.ctrlKey||e.metaKey,m=f?Gvt*5:Gvt,g=f?Kvt*5:Kvt,v=null;o===`hotspot`||o===`hotspotHandle`?v=h({e,crop:t,hotspot:i,isCtrlOrCmdPressed:p,step:m,resizeStep:g}):(o===`crop`||o===`cropHandle`)&&(v=_({e,crop:t,hotspot:i,isCtrlOrCmdPressed:p,step:m,resizeStep:g})),v&&(r(v),e.preventDefault())},t[7]=o,t[8]=_,t[9]=h,t[10]=a,t[11]=r,t[12]=s,t[13]=n,t[14]=v):v=t[14];let y=v,b;t[15]===p?b=t[16]:(b=e=>{d.current!==null&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{p(),d.current=null},300)},t[15]=p,t[16]=b);let x=b,S;return t[17]!==y||t[18]!==x?(S={handleKeyDown:y,handleKeyUp:x},t[17]=y,t[18]=x,t[19]=S):S=t[19],S}function _yt(e){let t=(0,Z.c)(25),{value:n,onChange:r,innerRect:i,svgRef:a,size:o,readOnly:s,hotspotRef:c,cropRef:l}=e,u=(0,
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
:where(:root){--pt-plugin-table-accent:#556bfc;--pt-plugin-table-radius:6px;--pt-plugin-table-cell-padding:8px 12px;--pt-plugin-table-font-family:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--pt-plugin-table-accent-fg:#fff;--pt-plugin-table-bg:var(--lightningcss-light,#fff)var(--lightningcss-dark,#1f2937);--pt-plugin-table-fg:var(--lightningcss-light,#1c1f24)var(--lightningcss-dark,#e5e7eb);--pt-plugin-table-border:var(--lightningcss-light,#e3e4e8)var(--lightningcss-dark,#374151);--pt-plugin-table-header-bg:var(--lightningcss-light,#f6f6f8)var(--lightningcss-dark,#283345);--pt-plugin-table-header-weight:600;--pt-plugin-table-selected-bg:var(--lightningcss-light,#556bfc0f)var(--lightningcss-dark,#697dff29);--pt-plugin-table-lane-bg:var(--lightningcss-light,#fafafb)var(--lightningcss-dark,#242e3d);--pt-plugin-table-lane-bg-hover:var(--lightningcss-light,#f0f1f3)var(--lightningcss-dark,#2b3748);--pt-plugin-table-lane-icon:var(--lightningcss-light,#6e7484)var(--lightningcss-dark,#9ca3af);--pt-plugin-table-lane-icon-hover:var(--lightningcss-light,#5c5f69)var(--lightningcss-dark,#d1d5db);--pt-plugin-table-handle-rest:var(--lightningcss-light,#bbbdc9)var(--lightningcss-dark,#4b5563);--pt-plugin-table-handle-bg:var(--lightningcss-light,#fff)var(--lightningcss-dark,#374151);--pt-plugin-table-handle-dots:var(--lightningcss-light,#8a8f99)var(--lightningcss-dark,#aab2bf);--pt-plugin-table-handle-ring:var(--lightningcss-light,#ffffffe6)var(--lightningcss-dark,#0006);--pt-plugin-table-boundary-dot:var(--lightningcss-light,#c1c4ca)var(--lightningcss-dark,#525c6b);--pt-plugin-table-trash-bg:var(--lightningcss-light,#1c1f24)var(--lightningcss-dark,#0d1117);--pt-plugin-table-trash-fg:#fff;--pt-plugin-table-danger:var(--lightningcss-light,#c0303a)var(--lightningcss-dark,#e05561);--pt-plugin-table-menu-bg:var(--lightningcss-light,#fff)var(--lightningcss-dark,#232d3d);--pt-plugin-table-menu-border:var(--lightningcss-light,#e4e6ea)var(--lightningcss-dark,#3a4557);--pt-plugin-table-menu-hover:var(--lightningcss-light,#f4f4f6)var(--lightningcss-dark,#2c384a);--pt-plugin-table-toggle-track:var(--lightningcss-light,#d3d4d8)var(--lightningcss-dark,#4b5563);--pt-plugin-table-toggle-track-on:var(--lightningcss-light,#1c1f24)var(--lightningcss-dark,#e5e7eb);--pt-plugin-table-toggle-knob:var(--lightningcss-light,#fff)var(--lightningcss-dark,#1f2937);--pt-plugin-table-scrollbar:var(--lightningcss-light,#1c1f2438)var(--lightningcss-dark,#e5e7eb40);--pt-plugin-table-scrollbar-hover:var(--lightningcss-light,#1c1f2459)var(--lightningcss-dark,#e5e7eb66)}.pt-plugin-table-chrome{margin:0 0 20px;padding-top:20px;position:relative}.pt-plugin-table-scroll{scrollbar-width:thin;scrollbar-color:var(--pt-plugin-table-scrollbar) transparent}.pt-plugin-table-scroll::-webkit-scrollbar{height:6px}.pt-plugin-table-scroll::-webkit-scrollbar-track{background:0 0;margin-top:8px}.pt-plugin-table-scroll::-webkit-scrollbar-thumb{background:var(--pt-plugin-table-scrollbar);border-radius:3px}.pt-plugin-table-scroll::-webkit-scrollbar-thumb:hover{background:var(--pt-plugin-table-scrollbar-hover)}.pt-plugin-table{border-collapse:separate;border-spacing:0;table-layout:fixed;cursor:text;width:100%}.pt-plugin-table-portal{font-family:var(--pt-plugin-table-font-family)}.pt-plugin-table-chrome button,.pt-plugin-table-portal button{font-family:inherit}.pt-plugin-table-chrome button:focus-visible,.pt-plugin-table-portal button:focus-visible{outline:2px solid var(--pt-plugin-table-accent);outline-offset:1px}table.pt-plugin-table[data-pt-plugin-table-cell-range] ::selection{background-color:#0000!important}
|
||||
@@ -0,0 +1 @@
|
||||
:where(:root){--pt-plugin-table-accent:#556bfc;--pt-plugin-table-radius:6px;--pt-plugin-table-cell-padding:8px 12px;--pt-plugin-table-font-family:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--pt-plugin-table-accent-fg:#fff;--pt-plugin-table-bg:light-dark(#fff,#1f2937);--pt-plugin-table-fg:light-dark(#1c1f24,#e5e7eb);--pt-plugin-table-border:light-dark(#e3e4e8,#374151);--pt-plugin-table-header-bg:light-dark(#f6f6f8,#283345);--pt-plugin-table-header-weight:600;--pt-plugin-table-selected-bg:light-dark(#556bfc0f,#697dff29);--pt-plugin-table-lane-bg:light-dark(#fafafb,#242e3d);--pt-plugin-table-lane-bg-hover:light-dark(#f0f1f3,#2b3748);--pt-plugin-table-lane-icon:light-dark(#6e7484,#9ca3af);--pt-plugin-table-lane-icon-hover:light-dark(#5c5f69,#d1d5db);--pt-plugin-table-handle-rest:light-dark(#bbbdc9,#4b5563);--pt-plugin-table-handle-bg:light-dark(#fff,#374151);--pt-plugin-table-handle-dots:light-dark(#8a8f99,#aab2bf);--pt-plugin-table-handle-ring:light-dark(#ffffffe6,#0006);--pt-plugin-table-boundary-dot:light-dark(#c1c4ca,#525c6b);--pt-plugin-table-trash-bg:light-dark(#1c1f24,#0d1117);--pt-plugin-table-trash-fg:#fff;--pt-plugin-table-danger:light-dark(#c0303a,#e05561);--pt-plugin-table-menu-bg:light-dark(#fff,#232d3d);--pt-plugin-table-menu-border:light-dark(#e4e6ea,#3a4557);--pt-plugin-table-menu-hover:light-dark(#f4f4f6,#2c384a);--pt-plugin-table-toggle-track:light-dark(#d3d4d8,#4b5563);--pt-plugin-table-toggle-track-on:light-dark(#1c1f24,#e5e7eb);--pt-plugin-table-toggle-knob:light-dark(#fff,#1f2937);--pt-plugin-table-scrollbar:light-dark(#1c1f2438,#e5e7eb40);--pt-plugin-table-scrollbar-hover:light-dark(#1c1f2459,#e5e7eb66)}.pt-plugin-table-chrome{margin:0 0 20px;padding-top:20px;position:relative}.pt-plugin-table-scroll{scrollbar-width:thin;scrollbar-color:var(--pt-plugin-table-scrollbar) transparent}.pt-plugin-table-scroll::-webkit-scrollbar{height:6px}.pt-plugin-table-scroll::-webkit-scrollbar-track{background:0 0;margin-top:8px}.pt-plugin-table-scroll::-webkit-scrollbar-thumb{background:var(--pt-plugin-table-scrollbar);border-radius:3px}.pt-plugin-table-scroll::-webkit-scrollbar-thumb:hover{background:var(--pt-plugin-table-scrollbar-hover)}.pt-plugin-table{border-collapse:separate;border-spacing:0;table-layout:fixed;cursor:text;width:100%}.pt-plugin-table-portal{font-family:var(--pt-plugin-table-font-family)}.pt-plugin-table-chrome button,.pt-plugin-table-portal button{font-family:inherit}.pt-plugin-table-chrome button:focus-visible,.pt-plugin-table-portal button:focus-visible{outline:2px solid var(--pt-plugin-table-accent);outline-offset:1px}table.pt-plugin-table[data-pt-plugin-table-cell-range] ::selection{background-color:#0000!important}
|
||||
@@ -0,0 +1,200 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/clientStore-Cq3vrK4Q-X8Ukd-3S.js","static/rolldown-runtime-Dd_uD5pT.js","static/from-B8yXq1Hf.js","static/preload-helper-DjzSQ1t3.js","static/isRecord-Kfmt-nk--BGze3w87.js","static/request-CYLhJzOA-R7VqCP01.js","static/resolveEditInfo-Cz-smq3a-BkgfIKD_.js","static/browser-Cic9HASE.js","static/refractor-CC48DwHi-B34huZKn.js","static/jsx-runtime-BpzPEenQ.js","static/compiler-runtime-sKsOXjDo.js","static/dist-BnDij-KK.js","static/AccessDenied-PrzSvkgv.js","static/Activity-BzZJr7I2.js","static/AddCircle-BZjvWs4R.js","static/AddComment-DzLuhpXr.js","static/AddDocument-Ca_v8JdZ.js","static/Add-CwQ5TpM8.js","static/AddUser-CTyeR_e2.js","static/Api-BBIspMzg.js","static/Archive-CNM-Azpz.js","static/ArrowDown-CM5h1Tfl.js","static/ArrowLeft-x2OZCZTu.js","static/ArrowRight-D293IkFJ.js","static/ArrowTopRight-YjzSsA0g.js","static/sanity-GsYh3wpj.js","static/lib-D7dq6hfV.js","static/CommentsProvider-DHVaZIPI-DonUdARw.js","static/types--2f-avvL-DfAXA8nG.js","static/dist-LVcARZxB.js","static/Spinner-Dk8hTAm3.js","static/Close-B_ZEgT1V.js","static/ChevronDown-BpYUc-AP.js","static/ToggleArrowRight-Ds3XaLpQ.js","static/Checkmark-OT7tsNpL.js","static/Remove-B96Rrnq-.js","static/isRecord-Kfmt-nk--BbRXhYkF.js","static/stegaClean-YZRATV86-BdUaXCkw.js","static/WarningOutline-DOBjmorn.js","static/request-CYLhJzOA-4VlvBNTk.js","static/ChevronRight-Cf6GkXSa.js","static/Document-0Zpczu4q.js","static/Bolt-CkliNuRS.js","static/Clock-ClG7Ty9T.js","static/Calendar-DCYqUUNo.js","static/Search-QbUIQb6W.js","static/ChevronLeft-BzE8YX6u.js","static/EarthGlobe-Dqu4Dt_R.js","static/InfoOutline-BLtnjxbN.js","static/ErrorOutline-Cl-3_nRG.js","static/Image-BrMFkN0j.js","static/Trash-BxG6GrjH.js","static/Edit-CAHlBqGT.js","static/Publish-BYF7r5nk.js","static/Unpublish-B0p_ZGt2.js","static/Revert-BmEXeO7H.js","static/Copy-BTQgeMVP.js","static/Sync-B1MBhh7o.js","static/Documents-C8KrBFzU.js","static/Link-Cl1VSeDJ.js","static/Ulist-CYD_2mDY.js","static/BinaryDocument-D1GQsa0h.js","static/Upload-ChJKE2jO.js","static/Reset-CgCZnejz.js","static/Launch-DuEs-KHJ.js","static/Unknown-CEYtdaCK.js","static/Lock-Ui2f2sVi.js","static/EyeOpen-DOBSuUsK.js","static/HelpCircle-8HZ3whUD.js","static/Controls-Dx7QJOxz.js","static/Sort-CFTgH29c.js","static/validationUtils-Dwef0BLR-DSZmlLZW.js","static/SingleDocReleaseUpsellProvider-eSYyzLjC-DBu0--ZA.js","static/Clipboard-BeSdPeHT.js","static/BlockContent-Bw8BGwBw.js","static/CheckmarkCircle-B6SBY4QE.js","static/Number-CjvU0EcK.js","static/String-DHDsSmJ_.js","static/Undo-qtvfkxbn.js","static/ComposeSparkles-Dn7kooau.js","static/Unlink-MiIozO9s.js","static/Comment-CPMW8FMx.js","static/Task-DGtH1mzn.js","static/Feedback-CkbzKydh.js","static/FaceHappy-1ocsUhoA.js","static/FaceIndifferent-CIPzkDxf.js","static/FaceSad-lhl7n__s.js","static/Sparkle-CUquRU1h.js","static/EyeClosed-BnY-JoVE.js","static/Unlock-B4_-ahLp.js","static/DoubleChevronRight-PxmJHA0v.js","static/Menu-BoI111KG.js","static/Leave-_nWak6QB.js","static/Cog-0goaM-Or.js","static/Users-BDbacX-A.js","static/Bug-CFB9Jubh.js","static/Github-BTBOp21P.js","static/Refresh-C_m5vs8N.js","static/useAddonDataset-BvCgByG6-PgDcQUJg.js","static/helpers-D_aQC6Do-BbFlOJg3.js","static/buildRangeDecorationSelectionsFromComments-B6nJH-Wx-DkTEGwwW.js","static/CommentsListItem-B4CoDHda-B92j42qR.js","static/LinkRemoved-LZtddC2J.js","static/CommentsList-CmhU6-yt-CzUxgKBX.js","static/CommentsEnabledProvider-CEeES47b-BEr5KMWm.js","static/useComments-Bi1m7AzT-CGyuZP86.js","static/CommentsEnabledProvider-By3TCGFl-gLI34tgD.js","static/AddonDatasetProvider-CF_RtUZo-BoMlopck.js","static/lib-BFHl89nf.css","static/Select-D4xIAUnY.js","static/Download-DeIn0VAL.js","static/ChevronUp-3VMiyA07.js","static/ThLarge-CjFCbJnr.js","static/DragHandle-CKP6vPDQ.js","static/BackLink-BBYTIbKc-C51ip22n.js","static/EarthAmericas-DLWVWv9X.js","static/ReadOnly-BkEx9qPu.js","static/Collapse-B22lXxln.js","static/Expand-CQC9Ec3E.js","static/Stack-DWymSM37.js","static/StackCompact-appU5vbP.js","static/Transfer-CJnKiHxh.js","static/DocumentRemove-CzwTDkkJ.js","static/Pause-ibSxMIa3.js","static/Star-_p_HG-Ts.js","static/StarFilled-CSrmmOKn.js","static/SplitVertical-uh7MyVDf.js","static/Share-D41CqXzI.js","static/Target-6sSmw-4o.js","static/Json-C_MCH-ZM.js","static/Restore-DhBjjWCd.js","static/Folder-1uErXl57.js","static/MasterDetail-DYBJvEeG.js","static/Asterisk-bl1DbUNA.js","static/BarChart-wkgYStw6.js","static/Basket-C_gPtep4.js","static/Bell-m62q1mbw.js","static/Bill-D-gubcZG.js","static/BlockElement-CQIVGSb1.js","static/Blockquote-CSHCZcSy.js","static/Bold-CGtaOUDj.js","static/Book-CpEqfE8C.js","static/BookmarkFilled-BiNAlCM9.js","static/Bookmark-BxXcEarc.js","static/Bottle-UZXqUr_W.js","static/BulbFilled-DF8TxkBW.js","static/BulbOutline-BN--Ec2H.js","static/Case-DLvh8XKv.js","static/ChartUpward-Bfx-_SAI.js","static/Circle-DkcW-8WT.js","static/ClipboardImage-DgF2YKLM.js","static/CloseCircle-COYZpajm.js","static/CodeBlock-PuZ4yflW.js","static/Code-COLine truncated
|
||||
import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{A as a,C as o,D as s,S as c,T as l,_ as u,a as d,b as f,c as p,d as m,f as h,h as g,k as _,l as v,m as y,n as b,o as x,p as S,t as C,u as w,x as T,y as E}from"./from-B8yXq1Hf.js";import{$ as D,A as O,At as k,B as A,C as j,Ct as M,D as N,Dt as P,E as F,Et as I,F as L,G as R,H as z,I as B,J as V,L as H,M as U,N as W,O as ee,Ot as te,P as ne,Q as re,R as ie,S as ae,St as oe,T as se,Tt as ce,U as le,V as ue,W as de,X as G,Y as fe,Z as pe,_ as me,_t as he,a as ge,at as _e,b as ve,bt as ye,c as be,ct as xe,d as Se,dt as Ce,et as we,f as Te,ft as Ee,g as De,gt as Oe,h as ke,ht as K,i as Ae,it as je,j as Me,k as Ne,l as Pe,lt as Fe,m as Ie,mt as Le,n as Re,nt as ze,o as Be,ot as Ve,p as He,q as Ue,r as We,rt as Ge,st as Ke,t as qe,tt as Je,u as Ye,ut as Xe,v as Ze,vt as Qe,w as $e,wt as et,x as tt,xt as nt,y as rt,yt as it,z as at}from"./clientStore-Cq3vrK4Q-X8Ukd-3S.js";import{t as q}from"./preload-helper-DjzSQ1t3.js";import{n as ot,r as st,t as ct}from"./request-CYLhJzOA-R7VqCP01.js";import{$t as lt,A as ut,At as dt,B as ft,Bt as pt,C as mt,Ct as ht,D as gt,Dt as _t,E as vt,Et as yt,F as bt,Ft as xt,Gt as J,Ht as St,I as Ct,It as wt,Jt as Tt,Kt as Et,L as Dt,Lt as Ot,Mt as kt,Nt as At,O as jt,Pt as Mt,Q as Nt,Qt as Pt,R as Ft,Rt as It,S as Lt,St as Y,T as Rt,Tt as zt,U as Bt,Ut as Vt,V as Ht,Wt as Ut,Xt as Wt,Y as Gt,Yt as Kt,Zt as qt,_t as Jt,at as Yt,b as Xt,bt as Zt,c as Qt,ct as $t,d as en,et as tn,f as nn,ft as rn,g as an,gt as on,ht as sn,i as cn,it as ln,j as un,jt as dn,kt as fn,l as pn,lt as mn,m as hn,mt as gn,n as eee,nt as _n,ot as tee,p as vn,qt as yn,r as bn,rt as xn,s as Sn,st as Cn,t as X,tt as wn,u as Tn,ut as nee,v as En,vt as Dn,w as On,wt as kn,xt as An,y as jn,yt as Mn,z as Nn,zt as Pn}from"./dist-LVcARZxB.js";import{a as Fn,c as In,d as Ln,l as Rn,o as zn,r as Bn,s as Vn,t as Hn,u as Un}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as Wn}from"./Spinner-Dk8hTAm3.js";import{t as Gn}from"./Close-B_ZEgT1V.js";import{t as Kn}from"./WarningOutline-DOBjmorn.js";import{c as qn,d as Jn,r as Yn,t as Xn}from"./request-CYLhJzOA-4VlvBNTk.js";import{t as Zn}from"./ChevronDown-BpYUc-AP.js";import{t as Qn}from"./ToggleArrowRight-Ds3XaLpQ.js";import{t as $n}from"./Checkmark-OT7tsNpL.js";import{t as er}from"./ChevronRight-Cf6GkXSa.js";import{t as tr}from"./Document-0Zpczu4q.js";import{t as nr}from"./Bolt-CkliNuRS.js";import{t as rr}from"./Clock-ClG7Ty9T.js";import{t as ir}from"./Dot-D4h2WemU.js";import{t as ar}from"./Calendar-DCYqUUNo.js";import{t as or}from"./Search-QbUIQb6W.js";import{t as sr}from"./ChevronLeft-BzE8YX6u.js";import{t as cr}from"./EarthGlobe-Dqu4Dt_R.js";import{t as lr}from"./EllipsisHorizontal-BuWLk1Hy.js";import{t as ur}from"./InfoOutline-BLtnjxbN.js";import{t as dr}from"./ErrorOutline-Cl-3_nRG.js";import{t as fr}from"./EarthAmericas-DLWVWv9X.js";import{t as pr}from"./Image-BrMFkN0j.js";import{t as mr}from"./Trash-BxG6GrjH.js";import{t as hr}from"./ArrowLeft-x2OZCZTu.js";import{t as gr}from"./Edit-CAHlBqGT.js";import{t as _r}from"./AddCircle-BZjvWs4R.js";import{t as vr}from"./Circle-DkcW-8WT.js";import{t as yr}from"./Publish-BYF7r5nk.js";import{t as br}from"./Timeline-X-VaErdm.js";import{t as xr}from"./Unpublish-B0p_ZGt2.js";import{t as Sr}from"./ArrowDown-CM5h1Tfl.js";import{t as Cr}from"./ArrowRight-D293IkFJ.js";import{t as wr}from"./Revert-BmEXeO7H.js";import{t as Tr}from"./Copy-BTQgeMVP.js";import{t as Er}from"./Sync-B1MBhh7o.js";import{t as Dr}from"./AccessDenied-PrzSvkgv.js";import{t as Or}from"./Documents-C8KrBFzU.js";import{t as kr}from"./Download-DeIn0VAL.js";import{t as Ar}from"./ChevronUp-3VMiyA07.js";import{t as jr}from"./Link-Cl1VSeDJ.js";import{t as Mr}from"./Ulist-CYD_2mDY.js";import{t as Nr}from"./BinaryDocument-D1GQsa0h.js";import{t as Pr}from"./Upload-ChJKE2jO.js";import{t as Fr}from"./ReadOnly-BkEx9qPu.js";import{t as Ir}from"./Reset-CgCZnejz.js";import{t as Lr}from"./Launch-DuEs-KHJ.js";import{t as Rr}from"./Unknown-CEYtdaCK.js";import{t as zr}from"./Add-CwQ5TpM8.js";import{t as Br}from"./Lock-Ui2f2sVi.js";import{t as Vr}from"./EyeOpen-DOBSuUsK.js";import{t as Hr}from"./BulbOutline-BN--Ec2H.js";import{t as Ur}from"./HelpCircle-8HZ3whUD.js";import{t as Wr}from"./Collapse-B22lXxln.js";import{t as ree}from"./Expand-CQC9Ec3E.js";import{t as Gr}from"./BlockElement-CQIVGSb1.js";import{t as Kr}from"./Bold-CGtaOUDj.js";import{t as qr}from"./Code-COts8HnY.js";import{t as Jr}from"./InlineElement-BWl55c6a.js";import{t as Yr}from"./Italic-BmVn7uuk.js";import{t as Xr}from"./Olist-BBuinWyR.js";import{t as Zr}from"./Strikethrough-BszDIkmY.js";import{t as Qr}from"./Underline-BdG8-Er-.js";import{t as $r}from"./ThLarge-CjFCbJnr.js";import{t as ei}from"./Desktop-msdzf3th.js";import{t as ti}from"./Moon-NrRkSdh3.js";import{t as ni}from"./Sun-OgXegq7_.js";import{t as ri}from"./DragHandle-CKP6vPDQ.js";import{t as ii}from"./AddDocumenLine truncated
|
||||
- ${n.map(e=>e.error.message).join(`
|
||||
- `)}`);return e}),Qf=(0,Bf.make)(e=>{tp(e),np(e)}),$f=(0,Bf.make)(e=>{tp(e),ap(e)}),ep=(0,Bf.make)(e=>{tp(e),rp(e)});(0,Bf.make)(e=>{tp(e),ip(e)});function tp(e){if(e.length===0)throw Error(`Must be a non-empty string`);if(!Vf.test(e))throw Error(`Not a valid document ID: "${e}" \u2013 Must match the ${Vf} RegExp`);return e}function np(e){if(!e.startsWith(Wf))throw Error(`Not a valid draft ID: "${e}" \u2013 must start with "${Wf}"`);if(e.length===Wf.length)throw Error(`Not a valid draft ID: "${e}" \u2013 must have at least one character followed by "${Wf}"`);return e}function rp(e){if(!e.startsWith(Gf))throw Error(`Not a valid version ID: "${e}" \u2013 must start with "${Gf}"`);if(e.length===Gf.length)throw Error(`Not a valid version ID: "${e}" \u2013 must have at least one character followed by "${Gf}"`);let[,t,...n]=e.split(`.`);if(!t||!Vf.test(t))throw Error(`Not a valid version ID: "${e}" \u2013 VERSION must match the ${Vf} RegExp in versions.[VERSION].id`);if(n.length===0)throw Error(`Not a valid version ID: "${e}" \u2013 missing document ID in versions.bundle.[ID]`);if(t===`drafts`||t===`versions`)throw Error(`Not a valid version ID: "${e}" \u2013 invalid VERSION "${t}" in versions.[VERSION].id`);return e}function ip(e){if(!e.startsWith(Kf))throw Error(`Not a valid variant definition ID: "${e}" \u2013 must start with "${Kf}"`);if(e.length===Kf.length)throw Error(`Not a valid variant definition ID: "${e}" \u2013 must have at least one character followed by "${Kf}"`);return e}function ap(e){if(e.startsWith(Wf)||e.startsWith(Gf))throw Error(`Not a valid published ID: "${e}" \u2013 cannot start with "${Wf}" or "${Gf}"`);return e}function op(e,t){return up(e)===up(t)}function sp(e){return e.startsWith(Wf)}function cp(e){return!sp(e)&&!lp(e)}function lp(e){return e.startsWith(Gf)}function up(e){if(sp(e))return $f(e.slice(Wf.length));if(lp(e)){let[,,...t]=e.split(Uf);return $f(t.join(Uf))}return e}function dp(e){if(lp(e)){let[,,...t]=e.split(Uf);return Qf(Wf+t.join(Uf))}return cp(e)?Qf(Wf+e):e}function fp(e,t){return lp(e)||sp(e)?fp(up(e),t):ep(Gf+t+Uf+e)}function pp(e){let[,t]=e.split(Uf);return t}function mp({values:e,fallback:t,validator:n}){let r=0;function i(n=0){return e[r+n]??t}function a(e){let t=i();return typeof e<`u`&&n(e,t,r),r++,t}function o(){return r<e.length}return Object.defineProperty(i,"position",{get:()=>r}),Object.assign(i,{hasNext:o,consume:a})}function hp(e){return gp(mp({values:e,fallback:``,validator:(e,t,n)=>{if(typeof e==`string`&&e!==t)throw SyntaxError(`Expected \`${e}\` at position ${n}${t?` but got \`${t}\` instead`:``}`);if(e instanceof RegExp&&!e.test(t))throw SyntaxError(`Expected character \`${t}\` at position ${n} to match ${e}`)}}))}function gp(e){let t=[];for(;e.hasNext();){let n=e(),r=e.position;if(/\s/.test(n)){e.consume();continue}switch(n){case`"`:t.push(_p(e));continue;case`'`:t.push(xee(e));continue;case`[`:case`]`:case`,`:case`:`:case`?`:case`*`:e.consume(),t.push({type:n,position:r});continue;case`$`:case`@`:if(/[a-zA-Z_$]/.test(e(1))){t.push(See(e));continue}e.consume(),t.push({type:`This`,position:r});continue;case`.`:if(e.consume(),e()===`.`){e.consume(),t.push({type:`..`,position:r});continue}t.push({type:`.`,position:r});continue;case`=`:case`!`:case`>`:case`<`:t.push(wee(e));continue;default:if(/[0-9]/.test(n)||n===`-`&&/[0-9]/.test(e(1))){t.push(Tee(e));continue}if(/[a-zA-Z_$]/.test(n)){t.push(Cee(e));continue}throw Error(`Unexpected character '${n}' at position ${r}`)}}return t.push({type:`EOF`,position:e.position}),t}function _p(e){let t=e.position,n=``;for(e.consume(`"`);e.hasNext()&&e()!==`"`;)e()===`\\`?n+=vp(e):n+=e.consume();return e.consume(`"`),{type:`String`,value:n,position:t}}function xee(e){let t=e.position,n=``;for(e.consume(`'`);e.hasNext()&&e()!==`'`;)e()===`\\`?n+=vp(e):n+=e.consume();return e.consume(`'`),{type:`Identifier`,value:n,position:t}}function See(e){let t=e.position,n=``;for(n+=e.consume(/[a-zA-Z_$]/);/[a-zA-Z0-9_$]/.test(e());)n+=e.consume();return{type:`Identifier`,value:n,position:t}}function Cee(e){let t=e.position,n=``;for(n+=e.consume(/[a-zA-Z_$]/);/[a-zA-Z0-9_$]/.test(e());)n+=e.consume();return n===`null`?{type:`Null`,position:t}:n===`true`?{type:`Boolean`,value:!0,position:t}:n===`false`?{type:`Boolean`,value:!1,position:t}:{type:`Identifier`,value:n,position:t}}function vp(e){e.consume(`\\`);let t=e.consume();switch(t){case`"`:case`'`:case`\\`:case`/`:return t;case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
|
||||
`;case`r`:return`\r`;case`t`:return` `;case`u`:{let t=``;for(let n=0;n<4;n++)t+=e.consume(/[0-9a-fA-F]/);return String.fromCharCode(parseInt(t,16))}default:throw Error(`Invalid escape sequence \\${t} at position ${e.position-1}`)}}function wee(e){let t=e.position,n=e(),r=e(1);if(n===`=`&&r===`=`)return e.consume(),e.consume(),{type:`Operator`,value:`==`,position:t};if(n===`!`&&r===`=`)return e.consume(),e.consume(),{type:`Operator`,value:`!=`,position:t};if(n===`>`&&r===`=`)return e.consume(),e.consume(),{type:`Operator`,value:`>=`,position:t};if(n===`<`&&r===`=`)return e.consume(),e.consume(),{type:`Operator`,value:`<=`,position:t};if(n===`>`)return e.consume(),{type:`Operator`,value:`>`,position:t};if(n===`<`)return e.consume(),{type:`Operator`,value:`<`,position:t};throw SyntaxError(`Invalid operator at position ${t}`)}function Tee(e){let t=e.position,n=``;for(e()===`-`&&(n+=e.consume());/[0-9]/.test(e());)n+=e.consume();if(e()===`.`&&/[0-9]/.test(e(1)))for(n+=e.consume();/[0-9]/.test(e());)n+=e.consume();return{type:`Number`,value:parseFloat(n),position:t}}var yp=class extends SyntaxError{constructor(e,t){super(t?`Expected ${t} at position ${e.position} but got ${e.type} instead`:`Unexpected token ${e.type} at position ${e.position}`)}};function Eee(e){let t=hp(e);if(t.length<=1)throw SyntaxError(`Empty expression`);let n=t.at(-1);if(n.type!==`EOF`)throw new yp(n);let r=mp({values:t,fallback:n,validator:(e,t)=>{if(t.type!==e)throw new yp(t,e)}}),i=bp(r);return r.consume(`EOF`),i}function bp(e){switch(e().type){case`This`:case`Identifier`:case`*`:case`[`:case`.`:case`..`:return Dee(e);case`String`:{let{value:t}=e.consume(`String`);return{type:`String`,value:t}}case`Number`:{let{value:t}=e.consume(`Number`);return{type:`Number`,value:t}}case`Boolean`:{let{value:t}=e.consume(`Boolean`);return{type:`Boolean`,value:t}}case`Null`:return e.consume(`Null`),{type:`Null`};default:throw new yp(e())}}function Dee(e){let t;if(e().type===`.`||e().type===`..`){let n=e().type===`..`;if(e.consume(),e().type===`EOF`||e().type===`]`||e().type===`,`){if(n)t={type:`Path`,base:{type:`Path`,segment:{type:`This`}},recursive:n,segment:{type:`Wildcard`}};else throw new yp(e(),`Path Segment`)}else t={type:`Path`,base:{type:`Path`,segment:{type:`This`}},recursive:n,segment:xp(e)}}else t={type:`Path`,segment:xp(e)};for(;;){if(e().type===`[`){let n=Sp(e);t={type:`Path`,base:t,recursive:!1,segment:n};continue}if(e().type===`.`||e().type===`..`){let n=e().type===`..`;e.consume();let r=xp(e);t={type:`Path`,base:t,recursive:n,segment:r};continue}break}return t}function xp(e){let t=e();if(t.type===`This`)return e.consume(),{type:`This`};if(t.type===`Identifier`)return e.consume(),{type:`Identifier`,name:t.value};if(t.type===`*`)return e.consume(),{type:`Wildcard`};if(t.type===`[`)return Sp(e);throw new yp(t,`Path Segment`)}function Sp(e){let t=[];for(e.consume(`[`),t.push(Cp(e));e().type===`,`;)e.consume(),t.push(Cp(e));return e.consume(`]`),{type:`Subscript`,elements:t}}function Cp(e){if(e().type===`:`||e().type===`Number`)return Oee(e);let t=bp(e);if(e().type===`Operator`){let{value:n}=e.consume(`Operator`);return{type:`Comparison`,left:t,operator:n,right:bp(e)}}return e().type===`?`&&t.type===`Path`?(e.consume(),{type:`Existence`,base:t}):t}function Oee(e){if(e().type===`Number`){let{value:t}=e.consume(`Number`);if(e().type===`:`){if(e.consume(),e().type===`Number`){let{value:n}=e.consume(`Number`);return{type:`Slice`,start:t,end:n}}return{type:`Slice`,start:t}}return{type:`Number`,value:t}}if(e().type===`:`){if(e.consume(),e().type===`Number`){let{value:t}=e.consume(`Number`);return{type:`Slice`,end:t}}return{type:`Path`,segment:{type:`Wildcard`}}}throw new yp(e(),`Number or Slice`)}function wp(e){switch(e.type){case`String`:case`Number`:case`Boolean`:return JSON.stringify(e.value);case`Path`:return Tp(e);case`Null`:return`null`;default:throw Error(`Unknown node type: ${e.type}`)}}function Tp(e){if(!e)return``;let t=Tp(e.base),n=kee(e.segment);return e.recursive?`${t}..${n}`:t?n.startsWith(`[`)?`${t}${n}`:`${t}.${n}`:n}function kee(e){switch(e.type){case`This`:return`@`;case`Wildcard`:return`*`;case`Subscript`:return`[${e.elements.map(jee).join(`,`)}]`;case`Identifier`:return/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(e.name)?e.name:Aee(e.name);default:throw Error(`Unknown segment type: ${e.type}`)}}function Aee(e){return`'${JSON.stringify(e).slice(1,-1).replace(/'/g,`\\'`).replace(/\\"/g,`"`)}'`}function jee(e){switch(e.type){case`Slice`:return`${e.start??``}:${e.end??``}`;case`Comparison`:return`${wp(e.left)}${e.operator}${wp(e.right)}`;case`Existence`:return`${Tp(e.base)}?`;case`String`:case`Number`:case`Boolean`:case`Null`:case`Path`:return wp(e);default:throw Error(`Unknown subscript element type: ${e.type}`)}}var Mee=`key:`,Nee=`field:`,Pee=`index:`;function Fee(){let e=new Map;function t(e){return Dp(e)?`${Mee}${e._key}`:typeof e==`string`?`${Nee}${e}`:`${Pee}${e}`}function n(e,[r,...i]){if(typeof r>`u`)return;let a=t(r);if(!i.length){
Line truncated
|
||||
_createdAt,
|
||||
_id,
|
||||
_rev,
|
||||
authorId,
|
||||
contentSnapshot,
|
||||
context,
|
||||
lastEditedAt,
|
||||
message,
|
||||
parentCommentId,
|
||||
reactions,
|
||||
status,
|
||||
target,
|
||||
threadId
|
||||
} | order(_createdAt desc)`}function ote(e){return`*[${im(e)}]`}function am(e){if(!at(e))throw Error(`Comments are only supported for dataset resources, received: ${JSON.stringify(e)}`);return e}function om(e){if(typeof e!=`object`||!e||!(`statusCode`in e))return!1;let{statusCode:t}=e;return t===403||t===404}function sm(e,{projectId:t,dataset:n}){return e.observable.request({url:`/projects/${t}/datasets?datasetProfile=comments&addonFor=${n}`,tag:`comments.addon-dataset.list`}).pipe(K(e=>e?.[0]?.name))}function ste(e,t){return De(e,{apiVersion:nm,projectId:t.projectId,useProjectHostname:!0}).observable.pipe(G(e=>sm(e,t).pipe(Ge(e=>om(e)?nt(void 0):et))))}async function cte(e,t){let n=await Ci(De(e,{apiVersion:nm,projectId:t.projectId,useProjectHostname:!0}).observable.pipe(da(1)));try{return await Ci(sm(n,t))}catch(e){if(om(e))return;throw e}}var cm=B({name:`CommentsAddonDataset`,getInitialState:()=>({status:`unknown`}),initialize:({instance:e,state:t,key:n})=>{let r=ste(e,am(n.resource)).subscribe(e=>t.set(`setAddonDataset`,e?{status:`resolved`,datasetName:e}:{status:`missing`}));return()=>r.unsubscribe()}}),lm=O(cm,L(({state:e})=>{if(e.status!==`unknown`)return e.datasetName??null})),lte=O(cm,({instance:e,state:t,key:n})=>{let r=t.get();if(r.datasetName)return Promise.resolve(r.datasetName);if(r.provisioning)return r.provisioning;let i=am(n.resource),a=(async()=>{let t=await cte(e,i);if(t)return t;let n=await ke(e,{apiVersion:nm,projectId:i.projectId,useProjectHostname:!0}).request({url:`/comments/${i.dataset}/setup`,method:`POST`,tag:`comments.addon-dataset.setup`});if(!n?.datasetName)throw Error(`Creating the comments addon dataset returned no dataset name.`);return n.datasetName})().then(e=>(t.set(`setAddonDataset`,{status:`resolved`,datasetName:e,provisioning:void 0}),e)).catch(e=>{throw t.set(`clearProvisioning`,{provisioning:void 0}),e});return t.set(`startProvisioning`,{provisioning:a}),a}),ute=O(cm,({instance:e,key:t})=>{let{projectId:n}=am(t.resource);return lm(e,{resource:t.resource}).observable.pipe(ze(),je(e=>e!==void 0),G(t=>typeof t==`string`?De(e,{apiVersion:tm,projectId:n,dataset:t}).observable:nt(null)))}),dte=/\.(true|false|null)(?=$|[.[])/g,fte=/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^"']+/g;function pte(e){return e.replace(fte,e=>e.startsWith(`"`)||e.startsWith(`'`)?e:e.replace(dte,`["$1"]`))}function um(e){return pte(Op(e))}function mte(e){let t=new Map;for(let n of e){if(!n.parentCommentId)continue;let e=t.get(n.parentCommentId);e?e.push(n):t.set(n.parentCommentId,[n])}let n=[];for(let r of e){if(r.parentCommentId)continue;let e=(t.get(r.id)??[]).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)),i=e[e.length-1];n.push({threadId:r.threadId,fieldPath:r.fieldPath,parentComment:r,replies:e,commentsCount:e.length+1,status:r.status,lastActivityAt:i?i.createdAt:r.createdAt})}return n}function dm(e){let{target:t}=e;return{id:e._id,createdAt:e._createdAt,...e.authorId?{authorId:e.authorId}:{},message:e.message,threadId:e.threadId,...e.parentCommentId?{parentCommentId:e.parentCommentId}:{},status:e.status,...e.lastEditedAt?{lastEditedAt:e.lastEditedAt}:{},documentId:t.document._ref,documentType:t.documentType,fieldPath:t.path?.field??``,...t.path?.selection?{selection:t.path.selection}:{},...e.contentSnapshot===void 0?{}:{contentSnapshot:e.contentSnapshot},reactions:(e.reactions??[]).map(({shortName:e,userId:t,addedAt:n})=>({shortName:e,userId:t,addedAt:n})),...e._state?{state:e._state}:{}}}function hte(e){if(e.type===`mutation`){if(e.transition===`disappear`)return{type:`disappear`,commentId:e.documentId};if(e.result)return e.transition===`appear`?{type:`appear`,comment:e.result}:{type:`update`,comment:e.result,transactionId:e.transactionId}}}function gte(e){let{client:t,documentId:n,documentVersionId:r}=e,i={documentId:n,...r?{documentVersionId:r}:{}},a=t.observable.listen(ote(r),i,rte).pipe(D()),o=a.pipe(K(hte),je(e=>e!==void 0));return a.pipe(je(e=>e.type===`welcome`),G(()=>new h(e=>{let n=[],a=!1,s=o.subscribe({next:t=>{a?e.next(t):n.push(t)},error:t=>e.error(t)}),c=t.observable.fetch(ate(r),i,{tag:`comments.list`}).pipe(da(1)).subscribe({next:t=>{e.next({type:`snapshot`,comments:t}),a=!0;for(let t of n)e.next(t);n.length=0},error:t=>{e.next({type:`error`,error:t}),e.complete()}});return()=>{s.unsubscribe(),c.unsubscribe(),n.length=0}})))}function fm({documentId:e,documentVersionId:t}){return JSON.stringify([e,t??null])}function _te(e){let[t,n]=JSON.parse(e);return{documentId:t,...n?{documentVersionId:n}:{}}}var pm=(e,t)=>n=>{let r=n.entries[e],i=[...r?.subscribers??[],t];return{...n,entries:{...n.entries,[e]:{...r,subscribers:i}}}},mm=(e,t)=>n=>{let r=n.entries[e];if(!r)return n;let i=r.subscribers.filter(e=>e!==t);if(!i.length){let t={...n.pendingCreates},i={...n.pendingTransactions};for(let e of Object.keys(r.comments??{}))delete t[e],delete i[e];return{...n,entries:ee(n.entries,e),pendingCreates:t,pendingTransactions:i}}return{...n,entries:{...n.entries,[e]:{...r,subscribers:i}}}},hm=
Line truncated
|
||||
`,i),o===-1&&(o=e.length-1);let c=e.slice(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s===a&&(c=e.slice(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}let a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}}function Wie(e,t,n){let r=e,i=t,a=Uie(r,i);r=a.chars1,i=a.chars2;let o=a.lineArray,s=Yh(r,i,{checkLines:!1,deadline:n.deadline});Hie(s,o),s=Qh(s),s.push([0,``]);let c=0,l=0,u=0,d=``,f=``;for(;c<s.length;){switch(s[c][0]){case 1:u++,f+=s[c][1];break;case-1:l++,d+=s[c][1];break;case 0:if(l>=1&&u>=1){s.splice(c-l-u,l+u),c=c-l-u;let e=Yh(d,f,{checkLines:!1,deadline:n.deadline});for(let t=e.length-1;t>=0;t--)s.splice(c,0,e[t]);c+=e.length}u=0,l=0,d=``,f=``;break;default:throw Error(`Unknown diff operation.`)}c++}return s.pop(),s}function Gie(e,t,n){let r;if(!e)return[[1,t]];if(!t)return[[-1,e]];let i=e.length>t.length?e:t,a=e.length>t.length?t:e,o=i.indexOf(a);if(o!==-1)return r=[[1,i.substring(0,o)],[0,a],[1,i.substring(o+a.length)]],e.length>t.length&&(r[0][0]=-1,r[2][0]=-1),r;if(a.length===1)return[[-1,e],[1,t]];let s=Bie(e,t);if(s){let e=s[0],t=s[1],r=s[2],i=s[3],a=s[4],o=Yh(e,r,n),c=Yh(t,i,n);return o.concat([[0,a]],c)}return n.checkLines&&e.length>100&&t.length>100?Wie(e,t,n):Rie(e,t,n.deadline)}var Kie=Object.defineProperty,qie=Object.getOwnPropertySymbols,Jie=Object.prototype.hasOwnProperty,Yie=Object.prototype.propertyIsEnumerable,Xie=(e,t,n)=>t in e?Kie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zie=(e,t)=>{for(var n in t||={})Jie.call(t,n)&&Xie(e,n,t[n]);if(qie)for(var n of qie(t))Yie.call(t,n)&&Xie(e,n,t[n]);return e};function Jh(e,t,n){if(e===null||t===null)throw Error(`Null input. (diff)`);let r=Yh(e,t,$ie(n||{}));return nae(r),r}function Yh(e,t,n){let r=e,i=t;if(r===i)return r?[[0,r]]:[];let a=Gh(r,i),o=r.substring(0,a);r=r.substring(a),i=i.substring(a),a=Kh(r,i);let s=r.substring(r.length-a);r=r.substring(0,r.length-a),i=i.substring(0,i.length-a);let c=Gie(r,i,n);return o&&c.unshift([0,o]),s&&c.push([0,s]),c=$h(c),c}function Qie(e){let t=1;return typeof e<`u`&&(t=e<=0?Number.MAX_VALUE:e),Date.now()+t*1e3}function $ie(e){return Zie({checkLines:!0,deadline:Qie(e.timeout||1)},e)}function Xh(e,t,n){return n===1?e+t:t+e}function Zh(e,t){return t===1?[e.substring(0,e.length-1),e[e.length-1]]:[e.substring(1),e[0]]}function eae(e,t,n,r){return r===1?e[t][1][e[t][1].length-1]===e[n][1][e[n][1].length-1]:e[t][1][0]===e[n][1][0]}function tae(e,t,n){let r=n===1?-1:1,i=null,a=null,o=t+n;for(;o>=0&&o<e.length&&(i===null||a===null);o+=n){let[s,c]=e[o];if(c.length!==0){if(s===1){i===null&&(i=o);continue}if(s===-1){a===null&&(a=o);continue}if(s===0){if(i===null&&a===null){let[i,a]=Zh(e[t][1],n);e[t][1]=i,e[o][1]=Xh(e[o][1],a,r);return}break}}}if(i!==null&&a!==null&&eae(e,i,a,n)){let[o,s]=Zh(e[i][1],r),[c]=Zh(e[a][1],r);e[i][1]=o,e[a][1]=c,e[t][1]=Xh(e[t][1],s,n);return}let[s,c]=Zh(e[t][1],n);e[t][1]=s,i===null?(e.splice(o,0,[1,c]),a!==null&&a>=o&&a++):e[i][1]=Xh(e[i][1],c,r),a===null?e.splice(o,0,[-1,c]):e[a][1]=Xh(e[a][1],c,r)}function nae(e){for(let t=0;t<e.length;t++){let[n,r]=e[t];if(r.length===0)continue;let i=r[0],a=r[r.length-1];Lie(a)&&n===0&&tae(e,t,1),qh(i)&&n===0&&tae(e,t,-1)}for(let t=0;t<e.length;t++)e[t][1].length===0&&e.splice(t,1)}function Qh(e){let t=e.map(e=>Wh(e)),n=!1,r=[],i=0,a=null,o=0,s=0,c=0,l=0,u=0;for(;o<t.length;)t[o][0]===0?(r[i++]=o,s=l,c=u,l=0,u=0,a=t[o][1]):(t[o][0]===1?l+=t[o][1].length:u+=t[o][1].length,a&&a.length<=Math.max(s,c)&&a.length<=Math.max(l,u)&&(t.splice(r[i-1],0,[-1,a]),t[r[i-1]+1][0]=1,i--,i--,o=i>0?r[i-1]:-1,s=0,c=0,l=0,u=0,a=null,n=!0)),o++;for(n&&(t=$h(t)),t=cae(t),o=1;o<t.length;){if(t[o-1][0]===-1&&t[o][0]===1){let e=t[o-1][1],n=t[o][1],r=Iie(e,n),i=Iie(n,e);r>=i?(r>=e.length/2||r>=n.length/2)&&(t.splice(o,0,[0,n.substring(0,r)]),t[o-1][1]=e.substring(0,e.length-r),t[o+1][1]=n.substring(r),o++):(i>=e.length/2||i>=n.length/2)&&(t.splice(o,0,[0,e.substring(0,i)]),t[o-1][0]=1,t[o-1][1]=n.substring(0,n.length-i),t[o+1][0]=-1,t[o+1][1]=e.substring(i),o++),o++}o++}return t}var rae=/[^a-zA-Z0-9]/,iae=/\s/,aae=/[\r\n]/,oae=/\n\r?\n$/,sae=/^\r?\n\r?\n/;function cae(e){let t=e.map(e=>Wh(e));function n(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(rae),a=r.match(rae),o=i&&n.match(iae),s=a&&r.match(iae),c=o&&n.match(aae),l=s&&r.match(aae),u=c&&e.match(oae),d=l&&t.match(sae);return u||d?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}let r=1;for(;r<t.length-1;){if(t[r-1][0]===0&&t[r+1][0]===0){let e=t[r-1][1],i=t[r][1],a=t[r+1][1],o=Kh(e,i);if(o){let t=i.substring(i.length-o);e=e.substring(0,e.length-o),i=t+i.substring(0,i.length-o),a=t+a}let s=e,c=i,l=a,u=n(e,i)+n(i,a);for(;i.charAt(0)===a.charAt(0);){e+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);let t=n(e,i)+n(i,a);t>=u&&(u=t,s=e,c=i,l=a)}t[r-1][1]!==s&&(s?t[r-1][1]=s:(t.splice(r-1,1),r--),t[r][1]=c,l?t[r+1][1]=l:(t.splice(r+1,1),r--))}r++}return t}function $h(e){let t=e.map(e=>Wh(e));t
Line truncated
|
||||
`),r=0;for(;r<n.length;){let e=n[r].match(Iae);if(!e)throw Error(`Invalid patch string: ${n[r]}`);let i=og(fg(e[1]),fg(e[3]));for(t.push(i),e[2]===``?(i.start1--,i.utf8Start1--,i.length1=1,i.utf8Length1=1):e[2]===`0`?(i.length1=0,i.utf8Length1=0):(i.start1--,i.utf8Start1--,i.utf8Length1=fg(e[2]),i.length1=i.utf8Length1),e[4]===``?(i.start2--,i.utf8Start2--,i.length2=1,i.utf8Length2=1):e[4]===`0`?(i.length2=0,i.utf8Length2=0):(i.start2--,i.utf8Start2--,i.utf8Length2=fg(e[4]),i.length2=i.utf8Length2),r++;r<n.length;){let e=n[r],t=e.charAt(0);if(t===`@`)break;if(t===``){r++;continue}let a;try{a=decodeURI(e.slice(1))}catch{throw Error(`Illegal escape in parse: ${e}`)}let o=rg(a)-a.length;if(t===`-`)i.diffs.push([-1,a]),i.length1-=o;else if(t===`+`)i.diffs.push([1,a]),i.length2-=o;else if(t===` `)i.diffs.push([0,a]),i.length1-=o,i.length2-=o;else throw Error(`Invalid patch mode "${t}" in: ${a}`);r++}}return t}function fg(e){return parseInt(e,10)}function pg(e){return e.map(Lae).join(``)}function Lae(e){let{utf8Length1:t,utf8Length2:n,utf8Start1:r,utf8Start2:i,diffs:a}=e,o;o=t===0?`${r},0`:t===1?`${r+1}`:`${r+1},${t}`;let s;s=n===0?`${i},0`:n===1?`${i+1}`:`${i+1},${n}`;let c=[`@@ -${o} +${s} @@
|
||||
`],l;for(let e=0;e<a.length;e++){switch(a[e][0]){case 1:l=`+`;break;case-1:l=`-`;break;case 0:l=` `;break;default:throw Error(`Unknown patch operation.`)}c[e+1]=`${l+encodeURI(a[e][1])}
|
||||
`}return c.join(``).replace(/%20/g,` `)}var Rae=[`Value`,`Copy`,`Blank`,`ReturnIntoArray`,`ReturnIntoObject`,`ReturnIntoObjectSameKey`,`PushField`,`PushElement`,`PushParent`,`Pop`,`PushFieldCopy`,`PushFieldBlank`,`PushElementCopy`,`PushElementBlank`,`ReturnIntoObjectPop`,`ReturnIntoObjectSameKeyPop`,`ReturnIntoArrayPop`,`ObjectSetFieldValue`,`ObjectCopyField`,`ObjectDeleteField`,`ArrayAppendValue`,`ArrayAppendSlice`,`StringAppendString`,`StringAppendSlice`],zae=class{model;root;patch;i;inputStack;outputStack;constructor(e,t,n){this.model=e,this.root=t,this.patch=n,this.i=0,this.inputStack=[],this.outputStack=[]}read(){return this.patch[this.i++]}process(){for(this.inputStack.push({value:this.root}),this.outputStack.push({value:this.root});this.i<this.patch.length;){let e=this.read(),t=Rae[e];if(!t)throw Error(`Unknown opcode: ${e}`);let n=`process${t}`;this[n].apply(this)}let e=this.outputStack.pop();return this.finalizeOutput(e)}inputEntry(){return this.inputStack[this.inputStack.length-1]}inputKey(e,t){return e.keys||=this.model.objectGetKeys(e.value).sort(),e.keys[t]}outputEntry(){return this.outputStack[this.outputStack.length-1]}outputArray(){let e=this.outputEntry();return e.writeValue||=this.model.copyArray(e.value),e.writeValue}outputObject(){let e=this.outputEntry();return e.writeValue||=this.model.copyObject(e.value),e.writeValue}outputString(){let e=this.outputEntry();return e.writeValue||=this.model.copyString(e.value),e.writeValue}finalizeOutput(e){return e.writeValue?this.model.finalize(e.writeValue):e.value}processValue(){let e=this.model.wrap(this.read());this.outputStack.push({value:e})}processCopy(){let e=this.inputEntry();this.outputStack.push({value:e.value})}processBlank(){this.outputStack.push({value:null})}processReturnIntoArray(){let e=this.outputStack.pop(),t=this.finalizeOutput(e),n=this.outputArray();this.model.arrayAppendValue(n,t)}processReturnIntoObject(){let e=this.read(),t=this.outputStack.pop(),n=this.finalizeOutput(t);n=this.model.markChanged(n);let r=this.outputObject();this.model.objectSetField(r,e,n)}processReturnIntoObjectSameKey(){let e=this.inputEntry(),t=this.outputStack.pop(),n=this.finalizeOutput(t),r=this.outputObject();this.model.objectSetField(r,e.key,n)}processPushField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.model.objectGetField(t.value,n);this.inputStack.push({value:r,key:n})}processPushElement(){let e=this.read(),t=this.inputEntry(),n=this.model.arrayGetElement(t.value,e);this.inputStack.push({value:n})}processPop(){this.inputStack.pop()}processPushFieldCopy(){this.processPushField(),this.processCopy()}processPushFieldBlank(){this.processPushField(),this.processBlank()}processPushElementCopy(){this.processPushElement(),this.processCopy()}processPushElementBlank(){this.processPushElement(),this.processBlank()}processReturnIntoObjectPop(){this.processReturnIntoObject(),this.processPop()}processReturnIntoObjectSameKeyPop(){this.processReturnIntoObjectSameKey(),this.processPop()}processReturnIntoArrayPop(){this.processReturnIntoArray(),this.processPop()}processObjectSetFieldValue(){this.processValue(),this.processReturnIntoObject()}processObjectCopyField(){this.processPushField(),this.processCopy(),this.processReturnIntoObjectSameKey(),this.processPop()}processObjectDeleteField(){let e=this.read(),t=this.inputEntry(),n=this.inputKey(t,e),r=this.outputObject();this.model.objectDeleteField(r,n)}processArrayAppendValue(){let e=this.model.wrap(this.read()),t=this.outputArray();this.model.arrayAppendValue(t,e)}processArrayAppendSlice(){let e=this.read(),t=this.read(),n=this.outputArray(),r=this.inputEntry().value;this.model.arrayAppendSlice(n,r,e,t)}processStringAppendString(){let e=this.model.wrap(this.read()),t=this.outputString();this.model.stringAppendValue(t,e)}processStringAppendSlice(){let e=this.read(),t=this.read(),n=this.outputString(),r=this.inputEntry().value;this.model.stringAppendSlice(n,r,e,t)}};function mg(e){return e>>16?4:e>>11?3:e>>7?2:1}function hg(e){let t=0;for(let n=0;n<e.length;n++){let r=mg(e.codePointAt(n));r==4&&n++,t+=r}return t}function Bae(e,t,n=0){let r=n,i=0;for(i=n;r<t;i++){let t=mg(e.codePointAt(i));t===4&&i++,r+=t}return i}function Vae(e,t){let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;){let n=e.codePointAt(i);if(n!==t.codePointAt(i))return r;let a=mg(n);r+=a,i+=a===4?2:1}return r}function Hae(e,t,n=0){let r=Math.min(e.length,t.length)-n,i=0;for(let n=0;n<r;){let r=e.codePointAt(e.length-1-n);if(r!==t.codePointAt(t.length-1-n))return i;let a=mg(r);i+=a,n+=a===4?2:1}return i}var gg=class{meta;constructor(e){this.meta=e}wrap(e){return this.wrapWithMeta(e,this.meta,this.meta)}wrapWithMeta(e,t,n=this.meta){return{data:e,startMeta:t,endMeta:n}}asObject(e){if(!e.content){let t={};for(let[n,r]of Object.entries(e.data))t[n]=this.wrapWithMeta(r,e.startMeta);e.content={type:`object`,fields:t}}return e.content}asArray(e){if(!e.content){let t=e.data.map(t=>this.wrapWithMeta(t,e.startMeta));e.content={type:`aLine truncated
|
||||
|
||||
`)}return null}function n_(e,t=[]){for(let n of e)if(Array.isArray(n))n_(n,t);else if(typeof n==`object`&&n){let e=r_(n);e!==null&&t.push(e)}return t}function r_(e){if(typeof e._type!=`string`)return null;let t=e.children;if(!Array.isArray(t))return null;let n=``;for(let e of t)e&&typeof e==`object`&&typeof e._type==`string`&&e._type===`span`&&typeof e.text==`string`&&(n+=e.text);return n}var i_={};i_.text=C_(e=>e,(e,t)=>{let n=Eoe(t);return n===null?wg:kg(n)});var a_={};a_.all=E_(()=>({array:{type:`Everything`}}),function*(e,t){typeof t==`object`&&t&&`_type`in t&&t._type===`system.release`&&(yield t)});var o_={};o_.projectId=S_((e,t)=>t.context.sanity?kg(t.context.sanity.projectId):wg),o_.dataset=S_((e,t)=>t.context.sanity?kg(t.context.sanity.dataset):wg),o_.versionOf=C_(([e])=>[e,{type:`This`}],(e,t,n)=>{if(t.type!==`string`)return wg;let r=t.data;if(n.type!==`object`||typeof n.data._id!=`string`)return wg;if(n.data._id===r)return Tg;let i=n.data._id.split(`.`);return i.length>=2&&i[0]===`drafts`&&i.slice(1).join(`.`)===r||i.length>=3&&i[0]===`versions`&&i.slice(2).join(`.`)===r?Tg:Eg}),o_.partOfRelease=C_(e=>[e[0],{type:`This`}],(e,t,n)=>{if(t.type!==`string`)return wg;let r=t.data;if(n.type!==`object`||typeof n.data._id!=`string`)return wg;let i=n.data._id.split(`.`);return i.length>=3&&i[0]===`versions`&&i[1]===r?Tg:Eg});var s_={};s_.query=S_(()=>{throw Error(`not implemented`)}),s_.semanticSimilarity=S_(()=>{throw Error(`not implemented`)});var c_={};c_.attributes=S_(()=>{throw Error(`not implemented`)});var l_={datetime:1,number:2,string:3,boolean:4};function u_(e,t){let n=Ng(e);if(n!==Ng(t))return null;switch(n){case`number`:case`boolean`:return e-t;case`string`:return e<t?-1:+(e>t);case`datetime`:return e.compareTo(t);default:return null}}function Doe(e,t){let n=Ng(e),r=Ng(t),i=l_[n]||100,a=l_[r]||100;if(i!==a)return i-a;let o=u_(e,t);return o===null&&(o=0),o}var Ooe=class e{params;source;value;parent;context;isHidden=!1;constructor(e,t,n,r,i){this.params=e,this.source=t,this.value=n,this.context=r,this.parent=i}createNested(t){return this.isHidden?new e(this.params,this.source,t,this.context,this.parent):new e(this.params,this.source,t,this.context,this)}createHidden(e){let t=this.createNested(e);return t.isHidden=!0,t}};async function d_(e,t){if(e.type===`OpCall`&&e.op===`match`)return Aoe(e.left,e.right,t);if(e.type===`FuncCall`&&e.name===`boost`){let n=await d_(e.args[0],t),r=await b_(e.args[1],t);return r.type===`number`&&n>0?n+r.data:0}switch(e.type){case`Or`:return await d_(e.left,t)+await d_(e.right,t);case`And`:{let n=await d_(e.left,t),r=await d_(e.right,t);return n===0||r===0?0:n+r}default:{let n=await b_(e,t);return+(n.type===`boolean`&&n.data===!0)}}}function f_(e,t){if(e.type===`OpCall`&&e.op===`match`)return koe(e.left,e.right,t);if(e.type===`FuncCall`&&e.name===`boost`){let n=f_(e.args[0],t),r=y_(e.args[1],t);return r.type===`number`&&n>0?n+r.data:0}switch(e.type){case`Or`:return f_(e.left,t)+f_(e.right,t);case`And`:{let n=f_(e.left,t),r=f_(e.right,t);return n===0||r===0?0:n+r}default:{let n=y_(e,t);return+(n.type===`boolean`&&n.data===!0)}}}function koe(e,t,n){let r=p_(y_(e,n),y_(t,n));if(typeof r==`number`)return r;throw Error(`Found synchronous value in match()`)}async function Aoe(e,t,n){return p_(await b_(e,n),await b_(t,n))}function p_(e,t){let n=Ig(e,e=>moe(e)),r=Ig(t,e=>goe(e)),i=(e,t)=>{if(!t.success||e.parts.length===0||t.parts.length===0)return 0;let n=0;for(let r of t.parts){let t=e.parts.reduce((e,t)=>e+ +!!r.test(t),0);n+=t*2.2/(t+1.2)}return n};return`then`in n||`then`in r?(async()=>i(await n,await r))():i(n,r)}function m_(e){let t=[],n=[];for(let r of e){let e=`asc`;r.type===`Desc`?(e=`desc`,r=r.base):r.type===`Asc`&&(r=r.base),t.push(r),n.push(e)}return{mappers:t,directions:n}}function h_(e,t){return e.sort((e,n)=>{for(let r=0;r<t.length;r++){let i=Doe(e[r+2],n[r+2]);if(t[r]===`desc`&&(i=-i),i!==0)return i}return e[1]-n[1]}),e.map(e=>e[0])}var g_={};g_.order={executeSync({base:e,args:t},n){let{mappers:r,directions:i}=m_(t),a=[],o=0,s=i.length;for(let t of e.data){let e=n.createNested(Mg(t)),i=[t,o];for(let t=0;t<s;t++){let n=y_(r[t],e);i.push(n.data)}a.push(i),o++}return jg(h_(a,i))},async executeAsync({base:e,args:t},n){let{mappers:r,directions:i}=m_(t),a=[],o=0,s=i.length;for await(let t of e){let e=n.createNested(t),i=[await t.get(),o];for(let t=0;t<s;t++){let n=await b_(r[t],e);i.push(await n.get())}a.push(i),o++}return jg(h_(a,i))}},g_.score={async executeAsync({base:e,args:t},n){let r=[],i=[];for await(let a of e){if(a.type!==`object`){r.push(await a.get());continue}let e=n.createNested(a),o=typeof a.data._score==`number`?a.data._score:0;for(let n of t)o+=await d_(n,e);let s=Object.assign({},a.data,{_score:o});i.push(s)}return i.sort((e,t)=>t._score-e._score),Mg(i)},executeSync({base:e,args:t},n){let r=[],i=[];for(let a of e.data){if(Ng(a)!==`object`){r.push(a);continue}let e=a,o=n.createNested(Mg(a)),s=typeof e._score==`number`?e._score:0;for(let e of t)s+=f
Line truncated
|
||||
`,r:`\r`,t:` `};function cse(e){let t=parseInt(e,16);return String.fromCharCode(t)}var W_=class extends Error{name=`GroqQueryError`};function lse(e,t=new Set){let n={group(e){return{type:`Group`,base:e.process(n)}},everything(){return{type:`Everything`}},this(){return{type:`This`}},parent(){return{type:`Parent`,n:1}},dblparent(e){return{type:`Parent`,n:e.process(n).n+1}},traverse(e){let t=e.process(n),r=[];for(;e.getMark().name!==`traversal_end`;)r.push(e.process(i));e.shift();let a=null;for(let e=r.length-1;e>=0;e--)a=r[e](a);if((t.type===`Everything`||t.type===`Array`||t.type===`PipeFuncCall`)&&(a=V_(e=>e,a)),a===null)throw Error(`BUG: unexpected empty traversal`);return a.build(t)},this_attr(e){let t=e.processString();return t===`null`?{type:`Value`,value:null}:t===`true`?{type:`Value`,value:!0}:t===`false`?{type:`Value`,value:!1}:{type:`AccessAttribute`,name:t}},neg(e){return{type:`Neg`,base:e.process(n)}},pos(e){return{type:`Pos`,base:e.process(n)}},add(e){return{type:`OpCall`,op:`+`,left:e.process(n),right:e.process(n)}},sub(e){return{type:`OpCall`,op:`-`,left:e.process(n),right:e.process(n)}},mul(e){return{type:`OpCall`,op:`*`,left:e.process(n),right:e.process(n)}},div(e){return{type:`OpCall`,op:`/`,left:e.process(n),right:e.process(n)}},mod(e){return{type:`OpCall`,op:`%`,left:e.process(n),right:e.process(n)}},pow(e){return{type:`OpCall`,op:`**`,left:e.process(n),right:e.process(n)}},comp(e){let t=e.process(n);return{type:`OpCall`,op:e.processString(),left:t,right:e.process(n)}},in_range(e){let t=e.process(n),r=e.getMark().name===`inc_range`;return e.shift(),{type:`InRange`,base:t,left:e.process(n),right:e.process(n),isInclusive:r}},str(e){let t=``;loop:for(;e.hasMark();){let n=e.getMark();switch(n.name){case`str_end`:t+=e.processStringEnd();break loop;case`str_pause`:t+=e.processStringEnd();break;case`str_start`:e.shift();break;case`single_escape`:{let n=e.slice(1);e.shift(),t+=sse[n];break}case`unicode_hex`:e.shift(),t+=cse(e.processStringEnd());break;default:throw Error(`unexpected mark: ${n.name}`)}}return{type:`Value`,value:t}},integer(e){let t=e.processStringEnd();return{type:`Value`,value:Number(t)}},float(e){let t=e.processStringEnd();return{type:`Value`,value:Number(t)}},sci(e){let t=e.processStringEnd();return{type:`Value`,value:Number(t)}},object(e){let t=[];for(;e.getMark().name!==`object_end`;)t.push(e.process(r));return e.shift(),{type:`Object`,attributes:t}},array(e){let t=[];for(;e.getMark().name!==`array_end`;){let r=!1;e.getMark().name===`array_splat`&&(r=!0,e.shift());let i=e.process(n);t.push({type:`ArrayElement`,value:i,isSplat:r})}return e.shift(),{type:`Array`,elements:t}},tuple(e){let t=[];for(;e.getMark().name!==`tuple_end`;)t.push(e.process(n));return e.shift(),{type:`Tuple`,members:t}},func_call(r){let i=`global`;r.getMark().name===`namespace`&&(r.shift(),i=r.processString());let o=r.processString();if(i===`global`&&o===`select`){let e={type:`Select`,alternatives:[]};for(;r.getMark().name!==`func_args_end`;)if(r.getMark().name===`pair`){if(e.fallback)throw new W_(`unexpected argument to select()`);r.shift();let t=r.process(n),i=r.process(n);e.alternatives.push({type:`SelectAlternative`,condition:t,value:i})}else{if(e.fallback)throw new W_(`unexpected argument to select()`);e.fallback=r.process(n)}return r.shift(),e}let s=[];for(;r.getMark().name!==`func_args_end`;)pse(i,o,s.length)?s.push(r.process(a)):s.push(r.process(n));if(r.shift(),i===`global`&&(o===`before`||o===`after`)&&r.parseOptions.mode===`delta`)return{type:`Context`,key:o};if(i===`global`&&o===`boost`&&!r.allowBoost)throw new W_(`unexpected boost`);let c=r.customFunctions[`${i}::${o}`];if(c!==void 0){let n=q_(e,t),i=new j_(r.string,c.marks,r.customFunctions,e).process(n);return G_(o,i.params.length,s.length),fse(i.body,e=>U_(e,i.params),e=>dse(e,i.params,s))}let l=yoe[i];if(!l)throw new W_(`Undefined namespace: ${i}`);let u=l[o];if(!u||(u.arity!==void 0&&G_(o,u.arity,s.length),u.mode!==void 0&&u.mode!==r.parseOptions.mode))throw new W_(`Undefined function: ${o}`);return{type:`FuncCall`,namespace:i,name:o,args:s}},pipecall(e){let t=e.process(n);e.shift();let r=`global`;if(e.getMark().name===`namespace`&&(e.shift(),r=e.processString()),r!==`global`)throw new W_(`Undefined namespace: ${r}`);let i=e.processString(),a=[],o=e.allowBoost;for(i===`score`&&(e.allowBoost=!0);;){let t=e.getMark().name;if(t===`func_args_end`)break;if(i===`order`){if(t===`asc`){e.shift(),a.push({type:`Asc`,base:e.process(n)});continue}if(t===`desc`){e.shift(),a.push({type:`Desc`,base:e.process(n)});continue}}a.push(e.process(n))}e.shift(),e.allowBoost=o;let s=boe[i];if(!s)throw new W_(`Undefined pipe function: ${i}`);return s.arity&&G_(i,s.arity,a.length),{type:`PipeFuncCall`,base:t,name:i,args:a}},pair(){throw new W_(`unexpected =>`)},and(e){return{type:`And`,left:e.process(n),right:e.process(n)}},or(e){return{type:`Or`,left:e.process(n),right:e.process(n)}},not(e){return{type:`Not`,base:e.process(n)}},asc(){throw new W_(`unexpected asc`)
Line truncated
|
||||
`&&(r++,i=n+1);this.line=r,this.column=e-i+1}};function K_(e,t={}){let n=Qoe(e);if(n.type===`error`)throw new mse(n.position,e,n.message);hse(e,n.customFunctions,t);let r=new j_(e,n.marks,n.customFunctions,t),i=lse(t);return r.process(i)}function q_(e,t=new Set){return{func_decl(n){let r=n.processString(),i=n.processString(),a=`${r}::${i}`;if(t.has(a))throw new W_(`Recursive function definition detected for ${a}`);let o=lse(e,new Set([...t,a])),s=[];for(;n.getMark().name!==`func_params_end`;){let e=n.process(o);if(e.type!==`Parameter`)throw Error(`expected parameter`);s.push(e)}if(s.length!==1)throw new W_(`Custom functions can only have one parameter`);return n.shift(),{type:`FuncDeclaration`,namespace:r,name:i,params:s,body:n.process(o)}}}}function hse(e,t,n){for(let r in t){if(!t.hasOwnProperty(r))continue;let i=t[r],a=new j_(e,i.marks,t,n),o=q_(n),s=a.process(o);fse(s.body,e=>U_(e,s.params))}}var{compare:gse}=new Intl.Collator(`en`);A_(`typeEvaluator:evaluate:trace`,{log:console.log.bind(console)}),A_(`typeEvaluator:evaluate:debug`,{log:console.log.bind(console)}),A_(`typeEvaluator:evaluate:warn`);var _se=/^[A-Za-z_][A-Za-z0-9_]*$/;function J_(e){return e.reduce((e,t,n)=>{if(Array.isArray(t))return`${e}[${t.join(`:`)}]`;if(Y_(t))return`${e}[_key=="${t._key}"]`;if(typeof t==`number`)return`${e}[${t}]`;if(typeof t==`string`&&!_se.test(t))return`${e}['${t}']`;if(typeof t==`string`)return`${e}${n===0?``:`.`}${t}`;throw Error(`Unsupported path segment "${t}"`)},``)}function Y_(e){return typeof e==`object`&&!!e&&`_key`in e&&typeof e._key==`string`}var X_=class extends Error{path;value;serializedPath;constructor(e,t,n){let r=J_(t);super(`${e} (at '${r}')`),this.path=t,this.serializedPath=r,this.value=n}},vse=/^[a-z0-9][a-z0-9_.-]+$/i,yse=/^[a-zA-Z_][a-zA-Z0-9_-]*$/,bse=/^[a-z_]/i;function Z_(e,t,n){if(!bse.test(e))throw new X_(`Keys must start with a letter (a-z)`,n.concat(e),t);if(!yse.test(e))throw new X_(`Keys can only contain letters, numbers and underscores`,n.concat(e),t);if(e===`_key`||e===`_ref`||e===`_type`){if(typeof t!=`string`)throw new X_(`Keys must be strings`,n.concat(e),t);if(!vse.test(t))throw new X_(`Invalid key - use less exotic characters`,n.concat(e),t)}return e}function Q_(e,t){if(`difference`in Set.prototype)return e.difference(t);let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function xse(e,t){if(`intersection`in Set.prototype)return e.intersection(t);let n=new Set;for(let r of e)t.has(r)&&n.add(r);return n}var Sse=[`_id`,`_type`,`_createdAt`,`_updatedAt`,`_rev`],Cse=1e6,wse=.4,Tse=1e4;function $_(e,t,n=[]){return nv(ev(e,t,n))}function ev(e,t,n=[],r=[]){return e===t?r:typeof e==`string`&&typeof t==`string`?(Mse(e,t,n,r),r):Array.isArray(e)&&Array.isArray(t)?(Dse(e,t,n,r),r):av(e)&&av(t)?(Ese(e,t,n,r),r):t===void 0?(r.push({op:`unset`,path:n}),r):(r.push({op:`set`,path:n,value:t}),r)}function Ese(e,t,n,r){let i=n.length===0,a=Object.keys(e).filter(i?tv:sv).map(t=>Z_(t,e[t],n)),o=a.length,s=Object.keys(t).filter(i?tv:sv).map(e=>Z_(e,t[e],n)),c=s.length;for(let e=0;e<o;e++){let i=a[e];i in t||r.push({op:`unset`,path:n.concat(i)})}for(let i=0;i<c;i++){let a=s[i];ev(e[a],t[a],n.concat([a]),r)}return r}function Dse(e,t,n,r){return rv(e)&&rv(t)?kse(e,t,n,r):Ose(e,t,n,r)}function Ose(e,t,n,r){if(t.length>e.length&&r.push({op:`insert`,position:`after`,path:n.concat([-1]),items:t.slice(e.length).map(ov)}),t.length<e.length){let i=e.length-t.length===1,a=e.slice(t.length);rv(a)?r.push(...a.map(e=>({op:`unset`,path:n.concat({_key:e._key})}))):r.push({op:`unset`,path:n.concat([i?t.length:[t.length,``]])})}for(let e=0;e<t.length;e++)if(Array.isArray(t[e]))throw new X_(`Multi-dimensional arrays not supported`,n.concat(e),t[e]);let i=Math.min(e.length,t.length),a=e.slice(0,i),o=t.slice(0,i);for(let e=0;e<a.length;e++)ev(a[e],ov(o[e]),n.concat(e),r);return r}function kse(e,t,n,r){let i=new Map(e.map(e=>[e._key,e])),a=new Map(t.map(e=>[e._key,e])),o=new Set(i.keys()),s=new Set(a.keys()),c=Q_(o,s),l=Q_(s,o),u=xse(o,s),d=Array.from(Q_(o,c)),f=Array.from(Q_(s,l)),p=[];for(let e=0;e<u.size;e++){let t=d[e],n=f[e];t!==n&&p.push({sourceKey:t,targetKey:n})}p.length&&r.push({op:`reorder`,path:n,snapshot:e,reorders:p});for(let e of u)ev(i.get(e),a.get(e),[...n,{_key:e}],r);for(let e of c)r.push({op:`unset`,path:[...n,{_key:e}]});if(l.size){let e,t=[],i=()=>{t.length&&r.push({op:`insert`,...e?{position:`after`,path:[...n,{_key:e}]}:{position:`before`,path:[...n,0]},items:t})};for(let n of s)l.has(n)?t.push(a.get(n)):u.has(n)&&(i(),e=n,t=[]);i()}return r}function Ase(e,t){let n=Math.max(e.length,t.length);return n>Cse?!1:n<Tse||!(Math.abs(t.length-e.length)/n>wse)}function jse(e,t,n){let r=n.at(-1);if(!(typeof r==`string`&&r.startsWith(`_`))&&Ase(e,t))try{return{op:`diffMatchPatch`,path:n,value:pg(lg(e,t))}}catch{return}}function Mse(e,t,n,r){let i=jse(e,t,n);return r.push(i??{op:`set`,path:n,value:t}),r}function tv(e){return Sse.indexOf(e)===-1}function nv(e,t){let[n,...r]=e;if(!n)return t?[t]:[];switch
Line truncated
|
||||
`),[n,r]=ffe(e,t===-1?pfe:Math.min(t,pfe));return n+(r?`… (+${r.length})`:``)}function hfe(e){let t=new k,n=new WeakMap;function r(n,r,i,a){t.next({sessionId:e,type:`trace.error`,traceId:n,name:r.name,version:r.version,data:{message:mfe(i.message)},context:a,createdAt:new Date().toISOString()})}function i(n,r,i,a,o){t.next({sessionId:e,type:n,traceId:r,name:i.name,version:i.version,data:a,context:o,createdAt:new Date().toISOString()})}function a(n,r,i){t.next({sessionId:e,type:n,version:r.version,name:r.name,data:i,createdAt:new Date().toISOString()})}function o(n){n.forEach(n=>{t.next({sessionId:e,type:n.event.type,version:n.event.version,name:n.event.name,data:n.data,createdAt:n.createdAt})})}function s(n){t.next({sessionId:e,type:`userProperties`,properties:n,createdAt:new Date().toISOString()})}function c(e,t,n){return{start(){i(`trace.start`,e,t,void 0,n)},newContext(t){return{trace(r){return c(`${e}.${t}`,r,n)},resume:o,updateUserProperties(){},log:l}},log(r){i(`trace.log`,e,t,r,n)},complete(){i(`trace.complete`,e,t,void 0,n)},error(i){r(e,t,i,n)},await(e,t){return this.start(),e.then(e=>(this.log(t||e),this.complete(),e),e=>{throw this.error(e),e}),e}}}function l(e,t){if(typeof e.maxSampleRate==`number`&&e.maxSampleRate>0){let r=n.get(e),i=new Date;(!r||i.getTime()-r.getTime()>e.maxSampleRate)&&(n.set(e,i),a(`log`,e,t))}else a(`log`,e,t)}return{events$:t.asObservable(),logger:{updateUserProperties(e){s(e)},resume:o,trace:(e,t)=>c(dfe(),e,t),log:l}}}var gfe=e=>new h(t=>{let n=setTimeout(()=>{t.next(void 0),t.complete()},e);return typeof n.unref==`function`&&n.unref(),()=>clearTimeout(n)});function _fe(e,t){let n=hfe(e);function r(){return t.resolveConsent().catch(e=>({status:`undetermined`}))}let i=[];function a(){let e=i.slice();return i.length=0,e}function o(){let e=a();return e.length===0?et:Pi([nt(e),r()]).pipe(Ee(e=>{let[n,r]=e;return n.length===0||r.status!==`granted`?et:C(t.sendEvents(n)).pipe(Ge(e=>(i.unshift(...n),et)))}))}let s=t.flushInterval??3e4,c=n.events$.pipe(Ue(e=>i.push(e)),K(()=>{}),Fa(()=>gfe(s),{leading:!1,trailing:!0}),na(()=>o()));function l(){return he(o(),{defaultValue:void 0}).then(()=>{})}let u=c.subscribe();function d(){if(!t.sendBeacon)return f(),!0;let e=a();return u.unsubscribe(),e.length>0?t.sendBeacon(e):!0}function f(){return l().then(()=>{},()=>{}).finally(()=>{u.unsubscribe()})}return{end:f,endWithBeacon:d,flush:l,logger:n.logger}}function ib(e){return{type:`log`,name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}function vfe(e){let t=Am(e),n=e.resourceType===`studio`?`dataset`:e.resourceType;return{...t,resource:{...t.resource,type:n}}}var yfe=(e,t)=>e.type===t.type&&e.resource.id===t.resource.id&&e.resource.type===t.resource.type&&e.resource.schemaName===t.resource.schemaName&&op(Zf(e.id),Zf(t.id));function bfe(e,t){let n=Yy(e,`applications.capabilities`),r=Yy(e,`favorites.documents`),i=vfe(t),a=()=>{let e=n.getCurrent();if(e!==void 0){if(e.favorites!==!0)return!1;try{return r.getCurrent()?.some(e=>yfe(e,i))}catch{return!1}}};return{getCurrent:a,subscribe:e=>{let t=[n.subscribe(e),r.subscribe(e)];return()=>t.forEach(e=>e())},observable:_e(n.observable,r.observable.pipe(Ge(()=>et))).pipe(K(a),ze())}}function xfe(e){return xde(e,Yy(e,`applications.capabilities`).getCurrent()===void 0?`applications.capabilities`:`favorites.documents`)}var Sfe=[`title`,`name`,`label`,`heading`,`header`,`caption`],Cfe=[`description`,`subtitle`,...Sfe];`${Sfe.map(e=>`"${e}": ${e}`).join(`,
|
||||
`)}${Cfe.map(e=>`"${e}": ${e}`).join(`,
|
||||
`)}`;var wfe=[`.sanity.studio`,`.sanity.io`];function Tfe(e){let t=e.location?.hostname;return typeof t==`string`&&t.length>0?t.toLowerCase():null}function Efe(e){return e===`localhost`||e===`127.0.0.1`}function Dfe(e){return wfe.some(t=>e.endsWith(t))}function Ofe(){if(typeof window<`u`){let e=Tfe(window);return e?Efe(e)?`development`:Dfe(e)?`production`:null:null}return null}var kfe=ib({name:`SDK Session Started`,version:1,description:`SDK instance created (environment is recorded in the event context)`}),Afe=ib({name:`SDK Hook Mounted`,version:1,description:`An SDK hook was mounted for the first time in this session`}),jfe=ib({name:`SDK Session Ended`,version:1,description:`SDK instance disposed (environment is recorded in the event context)`}),Mfe=ib({name:`SDK Error`,version:1,description:`Runtime error caught in the SDK`}),Nfe=Ae({createTelemetryManager:()=>Pfe}),ab=Pe(`telemetry`);function Pfe(e){let{sessionId:t,getClient:n,projectId:r,environment:i,authMethod:a,runtimeContext:o}=e,s=Date.now(),c=new Set,l=null,u=async()=>{if(l)return l;try{l=await n().request({url:`/intake/telemetry-status`,tag:`telemetry-consent.sdk`})}catch{l={status:`undetermined`}}return l},d=e=>e.map(e=>{let t=`context`in e?e.context:void 0;return{...e,context:{...t,version:$m,environment:i,origin:typeof window<`u`?window.location.origin:`node`}}}),f=_fe(t,{flushInterval:3e4,resolveConsent:u,sendEvents:async e=>{let t=n();return ab.debug(`sending event batch`,{batchSize:e.length,environment:i}),t.request({url:`/intake/batch`,method:`POST`,body:{projectId:r,batch:d(e)},tag:`telemetry.batch`})}}),p=f.logger;return{async checkConsent(){let{status:e}=await u();return e===`granted`},logSessionStarted(e){ab.debug(`event: SDK Session Started`,{projectId:e.projectId,perspective:e.perspective,authMethod:a,runtimeContext:o,version:$m,environment:i}),p.log(kfe,{version:$m,...e,authMethod:a,runtimeContext:o})},logHookFirstUsed(e){c.has(e)||(c.add(e),ab.debug(`event: SDK Hook Mounted`,{hookName:e,authMethod:a,runtimeContext:o}),p.log(Afe,{hookName:e,authMethod:a,runtimeContext:o}))},logError(e,t){ab.debug(`event: SDK Error`,{errorType:e,hookName:t}),p.log(Mfe,{errorType:e,hookName:t})},endSession(){let e=Math.round((Date.now()-s)/1e3);ab.debug(`event: SDK Session Ended`,{durationSeconds:e,hooksUsed:[...c],authMethod:a,runtimeContext:o,environment:i}),p.log(jfe,{durationSeconds:e,hooksUsed:[...c],authMethod:a,runtimeContext:o}),f.flush().catch(()=>{}),f.end()},dispose(){f.end()},get hooksUsed(){return c}}}var ob=Pe(`telemetry`),sb=new WeakMap,Ffe=new WeakMap,cb=new WeakSet;function Ife(e,t){let n=Ofe();if(!n){ob.trace(`initTelemetry skipped: environment not eligible`,{internal:!0});return}if(!t){ob.trace(`initTelemetry skipped: no projectId`,{internal:!0});return}sb.has(e)||cb.has(e)||(cb.add(e),ob.debug(`initializing telemetry`,{projectId:t,environment:n}),Promise.all([Promise.resolve().then(()=>Nfe),q(()=>import(`./clientStore-Cq3vrK4Q-X8Ukd-3S.js`).then(e=>e.s).then(e=>e.t),__vite__mapDeps([0,1,2,3,4,5,6])),q(()=>import(`./clientStore-Cq3vrK4Q-X8Ukd-3S.js`).then(e=>e.s).then(e=>e.a),__vite__mapDeps([0,1,2,3,4,5,6])),q(()=>import(`./clientStore-Cq3vrK4Q-X8Ukd-3S.js`).then(e=>e.s).then(e=>e.A),__vite__mapDeps([0,1,2,3,4,5,6]))]).then(async([{createTelemetryManager:r},{getClient:i},{getTokenState:a},{isStudioConfig:o}])=>{if(e.isDisposed()){cb.delete(e),ob.debug(`telemetry skipped: instance disposed before imports resolved`);return}let s=a(e).getCurrent();if(ob.trace(`auth token check`,{tokenPresent:!!s,internal:!0}),!s&&(ob.debug(`waiting for auth token`),!await new Promise(t=>{if(e.isDisposed())return t(!1);let n={unsubscribe:()=>{}},r=e.onDispose(()=>{n.unsubscribe(),t(!1)}),i=!1,o=a(e).observable.subscribe(e=>{!i&&e&&(i=!0,ob.debug(`auth token received`),r(),t(!0),n.unsubscribe())});n.unsubscribe=()=>o.unsubscribe(),i&&n.unsubscribe()})||e.isDisposed())){cb.delete(e),ob.debug(`telemetry skipped: no token resolved or instance disposed`);return}let c=e.config,l=typeof c.perspective==`string`?c.perspective:`published`,u=o(c)?`studio`:`app`,d=c.auth?.token?`token`:c.studio?.auth?.token?`studio`:`default`,f=r({sessionId:e.instanceId,getClient:()=>i(e,{apiVersion:`2024-11-12`}),projectId:t,environment:n,authMethod:d,runtimeContext:u}),p=await f.checkConsent();if(ob.debug(`consent check complete`,{consented:p}),!p||e.isDisposed()){cb.delete(e),f.dispose();return}cb.delete(e),sb.set(e,f);let m=Ffe.get(e);if(m){ob.debug(`flushing buffered hooks`,{hooks:Array.from(m)});for(let e of m)f.logHookFirstUsed(e);Ffe.delete(e)}ob.info(`telemetry session started`,{projectId:t,perspective:l,authMethod:d,runtimeContext:u,environment:n}),f.logSessionStarted({projectId:t,perspective:l}),e.onDispose(()=>{f.endSession(),sb.delete(e),ob.debug(`telemetry session ended`)})}).catch(t=>{cb.delete(e),ob.warn(`telemetry init failed`,{error:t})}))}var lb=(0,$.createContext)(null),Lfe=()=>{let e=(0,$.useContext)(lb);if(!e)throw Error(`SanityInstance context not fo
Line truncated
|
||||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||||
`+ae+e+oe}var ce=!1;function le(e,t){if(!e||ce)return``;ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||||
`),l=s.split(`
|
||||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?se(n):``}function ue(e,t){switch(e.tag){case 26:case 27:case 5:return se(e.type);case 16:return se(`Lazy`);case 13:return e.child!==t&&t!==null?se(`Suspense Fallback`):se(`Suspense`);case 19:return se(`SuspenseList`);case 0:case 15:return le(e.type,!1);case 11:return le(e.type.render,!1);case 1:return le(e.type,!0);case 31:return se(`Activity`);default:return``}}function de(e){try{var t=``,n=null;do t+=ue(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||||
Error generating stack: `+e.message+`
|
||||
`+e.stack}}var G=Object.prototype.hasOwnProperty,fe=t.unstable_scheduleCallback,pe=t.unstable_cancelCallback,me=t.unstable_shouldYield,he=t.unstable_requestPaint,ge=t.unstable_now,_e=t.unstable_getCurrentPriorityLevel,ve=t.unstable_ImmediatePriority,ye=t.unstable_UserBlockingPriority,be=t.unstable_NormalPriority,xe=t.unstable_LowPriority,Se=t.unstable_IdlePriority,Ce=t.log,we=t.unstable_setDisableYieldValue,Te=null,Ee=null;function De(e){if(typeof Ce==`function`&&we(e),Ee&&typeof Ee.setStrictMode==`function`)try{Ee.setStrictMode(Te,e)}catch{}}var Oe=Math.clz32?Math.clz32:Ae,ke=Math.log,K=Math.LN2;function Ae(e){return e>>>=0,e===0?32:31-(ke(e)/K|0)|0}var je=256,Me=262144,Ne=4194304;function Pe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Pe(n))):i=Pe(o):i=Pe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Pe(n))):i=Pe(o)):i=Pe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ie(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Le(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Re(){var e=Ne;return Ne<<=1,!(Ne&62914560)&&(Ne=4194304),e}function ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Be(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ve(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Oe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&He(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function He(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Oe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ue(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Oe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function We(e,t){var n=t&-t;return n=n&42?1:Ge(n),(n&(e.suspendedLanes|t))===0?n:0}function Ge(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ke(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function qe(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Kf(e.type)):e}function Je(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Ye=Math.random().toString(36).slice(2),Xe=`__reactFiber$`+Ye,Ze=`__reactProps$`+Ye,Qe=`__reactContainer$`+Ye,$e=`__reactEvents$`+Ye,et=`__reactListeners$`+Ye,tt=`__reactHandles$`+Ye,nt=`__reactResources$`+Ye,rt=`__reactMarker$`+Ye;function it(e){delete e[Xe],delete e[Ze],delete e[$e],delete e[et],delete e[tt]}function at(e){var t=e[Xe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qe]||n[Xe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Zd(e);e!==null;){if(n=e[Xe])return n;e=Zd(e)}return t}e=n,n=e.parentNode}return null}function q(e){if(e=e[Xe]||e[Qe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function st(e){var t=e[nt];return t||=e[nt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ct(e){e[rt]=!0}var ut=new Set,dt={};function ft(e,t){pt(e,t),pt(e+`Capture`,t)}function pt(e,t){for(dt[e]=t,e=0;e<t.length;e++)ut.add(t[e])}var mt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uLine truncated
|
||||
`).replace(_d,``)}function yd(e,t){return t=vd(t),vd(e)===t}function bd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Pt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Pt(e,``+r);break;case`className`:yt(e,`class`,r);break;case`tabIndex`:yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:yt(e,n,r);break;case`style`:Lt(e,r,o);break;case`data`:if(t!==`object`){yt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Bt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&bd(e,t,`name`,i.name,i,null),bd(e,t,`formEncType`,i.formEncType,i,null),bd(e,t,`formMethod`,i.formMethod,i,null),bd(e,t,`formTarget`,i.formTarget,i,null)):(bd(e,t,`encType`,i.encType,i,null),bd(e,t,`method`,i.method,i,null),bd(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Bt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`onScroll`:r!=null&&od(`scroll`,e);break;case`onScrollEnd`:r!=null&&od(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Bt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:od(`beforetoggle`,e),od(`toggle`,e),vt(e,`popover`,r);break;case`xlinkActuate`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Rt.get(n)||n,vt(e,n,r))}}function xd(e,t,n,r,i,o){switch(n){case`style`:Lt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Pt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Pt(e,``+r);break;case`onScroll`:r!=null&&od(`scroll`,e);break;case`onScrollEnd`:r!=null&&od(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML
Line truncated
|
||||
[data-motion-pop-id="${o}"] {
|
||||
position: absolute !important;
|
||||
width: ${e}px !important;
|
||||
height: ${u}px !important;
|
||||
${_}px !important;
|
||||
${v}px !important;
|
||||
}
|
||||
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,Q.jsx)(q_e,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:$.cloneElement(e,{ref:u})})}var TE=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=vx(Y_e),d=(0,$.useId)(),f=(0,$.useRef)(n),p=(0,$.useRef)(r);yx(()=>{f.current=n,p.current=r});let m=!0,h=(0,$.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,$.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),$.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,Q.jsx)(J_e,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,Q.jsx)(bx.Provider,{value:h,children:e})};function Y_e(){return new Map}function X_e(e=!0){let t=(0,$.useContext)(bx);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,$.useId)();(0,$.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,$.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var EE=e=>e.key||``;function Z_e(e){let t=[];return $.Children.forEach(e,e=>{(0,$.isValidElement)(e)&&t.push(e)}),t}var DE=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=X_e(o),f=(0,$.useMemo)(()=>Z_e(e),[e]),p=o&&!u?[]:f.map(EE),m=(0,$.useRef)(!0),h=vx(()=>new Map),g=(0,$.useRef)(new Set),[_,v]=(0,$.useState)(f),[y,b]=(0,$.useState)(f);yx(()=>{o&&!u&&!y.length&&d?.()},[u,o,y.length,d]),yx(()=>{m.current=!1;for(let e=0;e<y.length;e++){let t=EE(y[e]);p.includes(t)?(h.delete(t),g.current.delete(t)):h.get(t)!==!0&&h.set(t,!1)}},[y,p.length,p.join(`-`)]);let x=[];if(f!==_){let e=[...f],t=0;for(let n of y){let r=p.indexOf(EE(n));r===-1?(e.splice(t++,0,n),x.push(n)):t=r+x.length+1}return x.every(e=>h.get(EE(e)))?e=f:a===`wait`&&(e=x),b(Z_e(e)),v(f),null}let{forceRender:S}=(0,$.useContext)(_x);return(0,Q.jsx)(Q.Fragment,{children:y.map(e=>{let _=EE(e),b=o&&!u?!1:f===y||p.includes(_);return(0,Q.jsx)(TE,{isPresent:b,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(g.current.has(_))return;if(h.has(_))g.current.add(_),h.set(_,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(S?.(),v([]),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},_)})})},Q_e=(0,$.createContext)({strict:!1}),$_e={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},eve=!1;function tve(){if(eve)return;let e={};for(let t in $_e)e[t]={isEnabled:e=>$_e[t].some(t=>!!e[t])};xT(e),eve=!0}function nve(){return tve(),qge()}function rve(e){let t=nve();for(let n in e)t[n]={...t[n],...e[n]};xT(t)}var OE=(0,$.createContext)({});function ive(e,t){if(hT(e)){let{initial:t,animate:n}=e;return{initial:t===!1||fT(t)?t:void 0,animate:fT(n)?n:void 0}}return e.inherit===!1?{}:t}function ave(e){let{initial:t,animate:n}=ive(e,(0,$.useContext)(OE));return(0,$.useMemo)(()=>({initial:t,animate:n}),[ove(t),ove(n)])}function ove(e){return Array.isArray(e)?e.join(` `):e}var kE=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sve(e,t,n){for(let r in t)!lw(t[r])&&!ET(r,n)&&(e[r]=t[r])}function cve({transformTemplate:e},t){return(0,$.useMemo)(()=>{let n=kE();return Sw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function lve(e,t){let n=e.style||{},r={};return sve(r,n,e),Object.assign(r,cve(e,t)),r}function uve(e,t){let n={},r=lve(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var dve=()=>({...kE(),attrs:{}});function fve(e,t,n,r){let i=(0,$.useMemo)(()=>{let n=dve();return ww(n,t,kT(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};sve(t,e.style,e),i.style={...t,...i.style}}return i}var pve=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function AE(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWit
Line truncated
|
||||
`);for(let t=e.length;t-->1;)e.splice(t,0,`
|
||||
`);c.children=c.children.concat(e.map(e=>({_type:`@text`,text:e})))}else c.children=c.children.concat(i)}}return i.children}function IEe(e,t){let n=[],r;for(let i=0;i<e.length;i++){let a=e[i];if(a){if(!YO(a)){n.push(a),r=void 0;continue}if(!r){let e=$O(a,i,t,0);r=e.current,n.push(e.root);continue}if(LEe(a,r)){r.children.push(a);continue}if((a.level||1)>r.level){let e=$O(a,i,t,r.level);ek(r,e.root),r=e.current;continue}if((a.level||1)<r.level){let e=n[n.length-1],o=e&&tk(e,a);if(o){r=o,r.children.push(a);continue}let s=$O(a,i,t,0);r=s.current,n.push(s.root);continue}if(a.listItem!==r.listItem){let e=n[n.length-1],o=e&&tk(e,{level:a.level||1});if(o&&o.listItem===a.listItem){r=o,r.children.push(a);continue}{let e=$O(a,i,t,0);r=e.current,n.push(e.root);continue}}console.warn(`Unknown state encountered for block`,a),n.push(a)}}return n}function LEe(e,t){return(e.level||1)===t.level&&e.listItem===t.listItem}function REe(e,t,n,r,i){let a=r===(e.level||1)?``:`-${r}`;return{_type:`@list`,_key:`${e._key||`${t}`}-parent${a}`,mode:n,level:r,listItem:e.listItem,children:i}}function $O(e,t,n,r){let i=e.level||1,a=r+1,o=REe(e,t,n,a,zEe(e,t,n,a,i)),s=o;for(let r=a+1;r<=i;r++){let a=REe(e,t,n,r,zEe(e,t,n,r,i));ek(s,a),s=a}return{root:o,current:s}}function zEe(e,t,n,r,i){return r===i?[e]:n===`html`?[BEe(e,t,r)]:[]}function BEe(e,t,n){return{...e,_key:`${e._key||`${t}`}-placeholder-${n}`,children:[],level:n}}function ek(e,t){if(e.mode===`html`&&t.mode===`html`){let n=e.children.length-1,r=e.children[n];if(!r)return;e.children[n]={...r,children:[...r.children,t]};return}e.mode===`direct`&&t.mode===`direct`&&e.children.push(t)}function tk(e,t){let n=t.level||1,r=t.listItem||`normal`,i=typeof t.listItem==`string`;if(XO(e)&&(e.level||1)===n&&i&&(e.listItem||`normal`)===r)return e;if(!(`children`in e))return;let a=e.children[e.children.length-1];return a&&!qO(a)?tk(a,t):void 0}function nk(e){let t=``;return e.children.forEach(e=>{QO(e)?t+=e.text:ZO(e)&&(t+=nk(e))}),t}var VEe=/^\s/,HEe=/\s$/;function rk(e){let t=Array.isArray(e)?e:[e],n=``;return t.forEach((e,r)=>{if(!JO(e))return;let i=!1;e.children.forEach(e=>{qO(e)?(n+=i&&n&&!HEe.test(n)&&!VEe.test(e.text)?` `:``,n+=e.text,i=!1):i=!0}),r!==t.length-1&&(n+=`
|
||||
|
||||
`)}),n}function UEe(e){return e instanceof Error?e.stack||e.message:e}function WEe(e,t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return e[Math.abs(n)%e.length]}function ik(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function GEe(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}var ak=``;function ok(e,t){let n,r,i,a,o=((...e)=>{if(!o.enabled)return;let r=Date.now(),i=r-(n||r);n=r,e[0]=UEe(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-z%])/gi,(n,r)=>{if(n===`%%`)return`%`;a++;let i=t.formatters[r];if(typeof i==`function`){let t=e[a];n=i.call(o,t),e.splice(a,1),a--}return n}),t.formatArgs.call(o,i,e),o.log(...e)});return o.extend=function(e,t=`:`){return ok(this.namespace+t+e,{useColors:this.useColors,color:this.color,formatArgs:this.formatArgs,formatters:this.formatters,inspectOpts:this.inspectOpts,log:this.log,humanize:this.humanize})},Object.assign(o,t),o.namespace=e,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>r??(i!==ak&&(i=ak,a=qEe(e)),a),set:e=>{r=e}}),o}var sk=[],ck=[];function KEe(e){ak=e,sk=[],ck=[];let t=ak.trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?ck.push(e.slice(1)):sk.push(e)}function qEe(e){for(let t of ck)if(ik(e,t))return!1;for(let t of sk)if(ik(e,t))return!0;return!1}function JEe(e,t){t[0]=`${this.namespace} ${t[0]} +${this.humanize(e)}`}var YEe={useColors:!1,color:``,formatArgs:JEe,formatters:{j(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: ${e.message}`}}},inspectOpts:{},humanize:GEe,log:console.debug||console.log||(()=>{})};function XEe(e,t){return ok(e,Object.assign({},YEe,t))}function ZEe(){let e;try{e=localStorage.getItem(`debug`)||localStorage.getItem(`DEBUG`)}catch{}return!e&&typeof process<`u`&&`env`in process&&(e={}.DEBUG),e||``}KEe(ZEe());var QEe=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function $Ee(e,t){let{useColors:n}=this;if(t[0]=`${(n?`%c`:``)+this.namespace+(n?` %c`:` `)+t[0]+(n?`%c `:` `)}+${this.humanize(e)}`,!n)return;let r=`color: ${this.color}`;t.splice(1,0,r,`color: inherit`);let i=0,a=0;t[0].replace(/%[a-z%]/gi,e=>{e!==`%%`&&(i++,e===`%c`&&(a=i))}),t.splice(a,0,r)}function eDe(e,t){let n=(t&&t.color)??WEe(QEe,e);return XEe(e,Object.assign({useColors:!0,color:n,formatArgs:$Ee},t))}var lk=eDe(`mutator-document`);function uk(e){return typeof e==`object`&&!!e}var tDe=/^[a-z_$]+/;function dk(e){let t=``;return e.forEach((e,n)=>{t+=nDe(e,n===0)}),t}function nDe(e,t){if(typeof e==`number`)return`[${e}]`;if(uk(e)){let t=e;return Object.keys(e).map(e=>rDe(t[e])?`[${e}=="${t[e]}"]`:``).join(``)}return typeof e==`string`&&tDe.test(e)?t?e:`.${e}`:`['${e}']`}function rDe(e){switch(typeof e){case`number`:case`string`:case`boolean`:return!0;default:return!1}}function iDe(e){let[t,n]=fk(e);if(!t)throw Error(`Head cannot be null`);return oDe(t,n)}function fk(e){if(e.type!==`path`)return[e,null];let t=e.nodes;return t.length===0?[null,null]:t.length===1?[t[0],null]:[t[0],{type:`path`,nodes:t.slice(1)}]}function aDe(e,t){if(!e&&!t)return null;let n=e?e.nodes:[],r=t?t.nodes:[];return{type:`path`,nodes:n.concat(r)}}function oDe(e,t){return e.type===`union`?e.nodes.map(e=>{if(e.type===`path`){let[n,r]=fk(e);return[n,aDe(r,t)]}return[e,t]}):[[e,t]]}var sDe=/[0-9]/,pk=/^[a-zA-Z0-9_]$/,cDe=/^[a-zA-Z_]$/,mk={operator:[`..`,`.`,`,`,`:`,`?`],comparator:[`>=`,`<=`,`<`,`>`,`==`,`!=`],keyword:[`$`,`@`],boolean:[`true`,`false`],paren:[`[`,`]`]},lDe=Object.keys(mk),uDe=class{source;i;length;tokenizers;constructor(e){this.source=e,this.length=e.length,this.i=0,this.tokenizers=[this.tokenizeSymbol,this.tokenizeIdentifier,this.tokenizeNumber,this.tokenizeQuoted].map(e=>e.bind(this))}tokenize(){let e=[];for(;!this.EOF();){this.chompWhitespace();let t=null;if(!this.tokenizers.some(e=>(t=e(),!!t))||!t)throw Error(`Invalid tokens in jsonpath '${this.source}' @ ${this.i}`);e.push(t)}return e}takeWhile(e){let t=this.i,n=``;for(;!this.EOF();){let t=e(this.source[this.i]);if(t===null)break;n+=t,this.i++}return this.i===t?null:n}EOF(){return this.i>=this.length}peek(){return this.EOF()?null:this.source[this.i]}consume(e){if(this.i+e.length>this.length)throw Error(`Expected ${e} at end of jsonpath`);if(e===this.source.slice(
Line truncated
|
||||
Please move {options: {preview: ...}} to {..., preview: ...} on the type/field definition of "${e.name}".
|
||||
`)}function Lke(e){let t=e.preview||(e.options||{}).preview;t&&`fields`in t&&console.warn(`Heads up! "preview.fields" should be renamed to "preview.select". Please update the preview config for "${e.name}".
|
||||
`)}function Rke(e){for(let t in e)if(e.hasOwnProperty(t))return!1;return!0}function _A(e,t,n){if(n>t.maxDepth)return`...`;if(Array.isArray(e)){if(e.length===0)return`[empty]`;let r=Math.max(e.length-t.maxBreadth),i=e.slice(0,t.maxBreadth).map((e,r)=>_A(e,t,n+1)).concat(r>0?`…+${r}`:[]).join(`, `);return n===0?i:`[${i}]`}if(typeof e==`object`&&e){let r=Object.keys(e).filter(n=>!t.ignoreKeys.includes(n)&&e[n]!==void 0);if(Rke(OO(e,r)))return`{empty}`;let i=r.slice(0,t.maxBreadth).map(r=>`${r}: ${_A(e[r],t,n+1)}`).join(`, `);return n===0?i:`{${i}}`}let r=String(e);return r===``?`""`:r}function zke(e,t={}){return _A(e,{maxDepth:`maxDepth`in t?t.maxDepth:2,maxBreadth:`maxBreadth`in t?t.maxBreadth:2,ignoreKeys:`ignoreKeys`in t?t.ignoreKeys:[]},0)}var Bke={maxEntries:2,maxDepth:2,maxBreadth:2,ignoreKeys:[`_id`,`_type`,`_key`,`_ref`]};function Vke(e){return t=>({title:zke(OO(t,e),Bke)})}function Hke(e){return e.type===`array`&&e.of&&e.of.some(e=>e.type===`block`)||!1}var vA=[`title`,`name`,`label`,`heading`,`header`,`caption`],Uke=[`description`,...vA];function yA(e,t){return eA(e.to||[]).some(e=>e.type===t)}function bA(e){return yA(e,`sanity.imageAsset`)}function Wke(e){let t=e.fields||[],n=t.find(bA);if(n)return n.name;let r=t.find(e=>(e.fields||[]).some(bA));return r?`${r.name}.asset`:void 0}function xA(e){return yA(e,`sanity.fileAsset`)}function Gke(e){let t=e.fields||[],n=t.find(xA);if(n)return n.name;let r=t.find(e=>(e.fields||[]).some(xA));return r?`${r.name}.asset`:void 0}function Kke(e){let t={fields:[],...e},n=t.fields.filter(e=>e.type===`string`).map(e=>e.name),r=t.fields.filter(Hke).map(e=>e.name),i=vA.find(e=>n.includes(e)||r.includes(e)),a=Uke.find(e=>e!==i&&(n.includes(e)||r.includes(e)));i||(i=n[0]||r[0],a=n[1]||r[1]);let o=t.fields.find(e=>e.type===`image`),s=Wke(t);if(!i){let e=Gke(t);e&&(i=`${e}.originalFilename`),s&&(i=`${s}.originalFilename`)}if(!i&&!s){let e=t.fields.map(e=>e.name);return{select:e.reduce((e,t)=>(e[t]=t,e),{}),prepare:Vke(e)}}return{select:lke({title:i,description:a,media:o?o.name:s},ake)}}function qke(e){return e.reduce((e,t)=>(e[t]=t,e),{})}function Jke(e){if(!e)return e;let t=e.select||e.fields||{};return Array.isArray(t)?{...OO(e,[`prepare`,`component`]),select:qke(t)}:{...OO(e,[`prepare`,`component`]),select:t}}function SA(e){return function(){return Ike(e),Lke(e),Jke(e.preview||(e.options||{}).preview)||Kke(e)}}var Yke={type:`object`,name:`link`,title:`Link`,i18nTitleKey:`inputs.portable-text.annotation.link`,options:{modal:{type:`popover`}},fields:[{name:`href`,type:`url`,title:`Link`,description:`A valid web, email, phone, or relative link.`,validation:e=>e.uri({scheme:[`http`,`https`,`tel`,`mailto`],allowRelative:!0})}]},Xke={type:`text`,name:`text`,title:`Text`},Zke={name:`marks`,type:`array`,of:[{type:`string`}],title:`Marks`},CA={bullet:{title:`Bulleted list`,value:`bullet`,i18nTitleKey:`inputs.portable-text.list-type.bullet`},numbered:{title:`Numbered list`,value:`number`,i18nTitleKey:`inputs.portable-text.list-type.number`}},Qke=[CA.bullet,CA.numbered],wA={normal:{title:`Normal`,value:`normal`,i18nTitleKey:`inputs.portable-text.style.normal`},h1:{title:`Heading 1`,value:`h1`,i18nTitleKey:`inputs.portable-text.style.h1`},h2:{title:`Heading 2`,value:`h2`,i18nTitleKey:`inputs.portable-text.style.h2`},h3:{title:`Heading 3`,value:`h3`,i18nTitleKey:`inputs.portable-text.style.h3`},h4:{title:`Heading 4`,value:`h4`,i18nTitleKey:`inputs.portable-text.style.h4`},h5:{title:`Heading 5`,value:`h5`,i18nTitleKey:`inputs.portable-text.style.h5`},h6:{title:`Heading 6`,value:`h6`,i18nTitleKey:`inputs.portable-text.style.h6`},blockquote:{title:`Quote`,value:`blockquote`,i18nTitleKey:`inputs.portable-text.style.quote`}},$ke=[wA.normal,wA.h1,wA.h2,wA.h3,wA.h4,wA.h5,wA.h6,wA.blockquote],TA={strong:{title:`Strong`,value:`strong`,i18nTitleKey:`inputs.portable-text.decorator.strong`},em:{title:`Italic`,value:`em`,i18nTitleKey:`inputs.portable-text.decorator.emphasis`},code:{title:`Code`,value:`code`,i18nTitleKey:`inputs.portable-text.decorator.code`},underline:{title:`Underline`,value:`underline`,i18nTitleKey:`inputs.portable-text.decorator.underline`},strikeThrough:{title:`Strike`,value:`strike-through`,i18nTitleKey:`inputs.portable-text.decorator.strike-through`}},eAe=[TA.strong,TA.em,TA.code,TA.underline,TA.strikeThrough],EA=[Yke],DA=[`type`,`name`,`title`,`jsonType`,`description`,`options`,`fieldsets`,`icon`],OA={name:`block`,title:`Block`,type:null,jsonType:`object`},tAe={},nAe={get(){return OA},extend(e,t){let n={...e.options||tAe},{marks:r,styles:i,lists:a,of:o,...s}=e,c=[oAe(r,o),iAe(i),aAe(a),{name:`markDefs`,title:`Mark definitions`,type:`array`,of:r?.annotations||EA},{name:`level`,title:`Indentation`,type:`number`}].concat(e.fields||[]),l={...s,options:n},u=Object.assign(OO(OA,DA),l,{type:OA});return dA(u,`fields`,()=>c.map(e=>t.cachedField(e))),dA(u,`preview`,SA(e)),dA(u,iA,()=>({...l,fields:u.fields,preview:u.preview}),{enumerable:!1,writable:!1}),d(u);function d(e){return
Line truncated
|
||||
`))}var INe=(e,t)=>{if(!e)return!0;let{i18n:n}=t;return typeof e!=`object`||Array.isArray(e)?{code:EM.slugInvalidType,details:{actualType:PM(e)},message:n.t(`validation:slug.not-object`)}:!Wc(e)||e.current.trim().length===0?{code:EM.slugMissingCurrent,message:n.t(`validation:slug.missing-current`)}:!0};async function LNe(e,t,n){if(!Wc(e)||e.current.trim().length===0)return!0;let{i18n:r}=t,i={...t,parent:t.parent,type:t.type,defaultIsUnique:PNe};return await n(e.current,i)?!0:{code:EM.slugNotUnique,details:{slug:e.current},message:r.t(`validation:slug.not-unique`,{slug:e.current})}}var RNe=(e,t)=>{let n=t.type?.options;return LNe(e,t,MNe(n)?n.isUnique:PNe)},zM=`http://sanity`,zNe=e=>/^\.*\//.test(e),BNe=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,VNe={Boolean:SNe,Number:ONe,String:{...IM,min:(e,t,n,{i18n:r})=>!t||t.length>=e||{code:EM.stringMinimumLength,details:{actualLength:t.length,minimumLength:e},message:n||r.t(`validation:string.minimum-length`,{minLength:e})},max:(e,t,n,{i18n:r})=>!t||t.length<=e||{code:EM.stringMaximumLength,details:{actualLength:t.length,maximumLength:e},message:n||r.t(`validation:string.maximum-length`,{maxLength:e})},length:(e,t,n,{i18n:r})=>{let i=t||``;return i.length===e||{code:EM.stringExactLength,details:{actualLength:i.length,expectedLength:e},message:n||r.t(`validation:string.exact-length`,{wantedLength:e})}},uri:(e,t,n,{i18n:r})=>{let i=t||``;if(!i)return!0;let{options:a}=e,{allowCredentials:o,relativeOnly:s}=a,c=a.allowRelative||s,l;try{l=c?new URL(i,zM):new URL(i)}catch{return{code:EM.stringUrlInvalid,message:n||r.t(`validation:string.url.invalid`)}}if(s&&l.origin!==zM)return{code:EM.stringUrlNotRelative,message:n||r.t(`validation:string.url.not-relative`)};if(!c&&l.origin===zM&&zNe(i))return{code:EM.stringUrlNotAbsolute,message:n||r.t(`validation:string.url.not-absolute`)};if(!o&&(l.username||l.password))return{code:EM.stringUrlCredentialsNotAllowed,message:n||r.t(`validation:string.url.includes-credentials`)};let u=l.protocol.replace(/:$/,``);return zNe(i)||a.scheme.some(e=>e.test(u))?!0:{code:EM.stringUrlSchemeNotAllowed,details:{scheme:u},message:n||r.t(`validation:string.url.disallowed-scheme`,{scheme:u})}},stringCasing:(e,t,n,{i18n:r})=>{let i=t||``;return e===`uppercase`&&i!==i.toLocaleUpperCase()?{code:EM.stringUppercase,message:n||r.t(`validation:string.uppercase`)}:e===`lowercase`&&i!==i.toLocaleLowerCase()?{code:EM.stringLowercase,message:n||r.t(`validation:string.lowercase`)}:!0},presence:(e,t,n,{i18n:r})=>e===`required`&&!t?{code:EM.valueRequired,message:n||r.t(`validation:generic.required`,{context:`string`})}:!0,regex:(e,t,n,{i18n:r})=>{let{pattern:i,name:a,invert:o}=e,s=a||`${i.toString()}`,c=t||``;i.lastIndex=0;let l=i.test(c);return!o&&!l||o&&l?{code:o?EM.stringRegexMatch:EM.stringRegexMismatch,details:{invert:o,name:s,pattern:i.source},message:n||(o?r.t(`validation:string.regex-match`,{name:s}):r.t(`validation:string.regex-does-not-match`,{name:s}))}:!0},email:(e,t,n,{i18n:r})=>{let i=`${t||``}`.trim();return!i||BNe.test(i)?!0:{code:EM.stringEmail,message:n||r.t(`validation:string.email`)}}},Array:xNe,Object:ANe,Date:ENe},HNe=e=>typeof e!=`object`||!e?!1:e.type===BM.FIELD_REF,UNe=[],WNe=e=>e===`custom`?EM.custom:e===`media`?EM.mediaCustom:e===`all`?EM.ruleAllFailed:e===`either`?EM.ruleEitherFailed:EM.validationFailed,BM=class e extends _ke{static array=t=>new e(t).type(`Array`);static object=t=>new e(t).type(`Object`);static string=t=>new e(t).type(`String`);static number=t=>new e(t).type(`Number`);static boolean=t=>new e(t).type(`Boolean`);static dateTime=t=>new e(t).type(`Date`);clone(){let t=new e;return t._type=this._type,t._message=this._message,t._required=this._required,t._rules=[...this._rules],t._level=this._level,t._fieldRules=this._fieldRules,t._typeDef=this._typeDef,t}async validate(e,t){let{__internal:n={},...r}=t,{customValidation:i=!0,customValidationConcurrencyLimiter:a,markIncomplete:o}=n,s=e==null;if(s&&this._required===`optional`)return UNe;let c=this._required===void 0&&s?this._rules.filter(e=>e.flag===`custom`):this._rules,l=this._type&&VNe[this._type]||IM;return(await Promise.all(c.map(async t=>{if(t.flag===void 0)throw Error(`Invalid rule, did not contain "flag"-property`);let n=l[t.flag];if(!n){let e=this._type?`type "${this._type}"`:`rule without declared type`;throw Error(`Validator for flag "${t.flag}" not found for ${e}`)}let s=`constraint`in t?t.constraint:null;if(HNe(s)&&(s=lO(r.parent,s.path)),t.flag===`custom`||t.flag===`media`){let e=s===RNe&&MNe(r.type?.options);if((!hNe(s)||e)&&!i)return o?.(),[]}if(t.flag===`custom`&&a&&!s?.bypassConcurrencyLimit){let e=s;s=(...t)=>a.run(()=>e(...t),r.signal)}let c=MM(this._message)?jM(this._message,r.i18n):this._message;try{return AM(await n(s,e,c,r),this._level,r,{code:WNe(t.flag)})}catch(e){if(r.signal?.throwIfAborted(),e instanceof dNe)return o?.(),[];let t=`${kM(r.path)}:
Line truncated
|
||||
|
||||
Keys:
|
||||
`+String(t.keys))+(`
|
||||
|
||||
Values:
|
||||
`+String(e)));c(t);for(var n=0;n<t.callbacks.length;n++){var r=e[n];r instanceof Error?t.callbacks[n].reject(r):t.callbacks[n].resolve(r)}}).catch(function(n){s(e,t,n)})}function s(e,t,n){c(t);for(var r=0;r<t.keys.length;r++)e.clear(t.keys[r]),t.callbacks[r].reject(n)}function c(e){if(e.cacheHits)for(var t=0;t<e.cacheHits.length;t++)e.cacheHits[t]()}function l(e){if(e&&e.batch===!1)return 1;var t=e&&e.maxBatchSize;if(t===void 0)return 1/0;if(typeof t!=`number`||t<1)throw TypeError(`maxBatchSize must be a positive number: `+t);return t}function u(e){var t=e&&e.batchScheduleFn;if(t===void 0)return r;if(typeof t!=`function`)throw TypeError(`batchScheduleFn must be a function: `+t);return t}function d(e){var t=e&&e.cacheKeyFn;if(t===void 0)return function(e){return e};if(typeof t!=`function`)throw TypeError(`cacheKeyFn must be a function: `+t);return t}function f(e){if(e&&e.cache===!1)return null;var t=e&&e.cacheMap;if(t===void 0)return new Map;if(t!==null){var n=[`get`,`set`,`delete`,`clear`].filter(function(e){return t&&typeof t[e]!=`function`});if(n.length!==0)throw TypeError(`Custom cacheMap missing methods: `+n.join(`, `))}return t}function p(e){return e&&e.name?e.name:null}function m(e){return typeof e==`object`&&!!e&&typeof e.length==`number`&&(e.length===0||e.length>0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}t.exports=n}))(),1),$Pe=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,eFe=e=>crypto.getRandomValues(new Uint8Array(e)),tFe=(e,t,n)=>{let r=256-256%e.length;if(r===256){let r=e.length-1;return(i=t)=>{if(!i)return``;let a=``;for(;;){let t=n(i),o=i;for(;o--;)if(a+=e[t[o]&r],a.length>=i)return a}}}let i=Math.ceil(409.6*t/r);return(a=t)=>{if(!a)return``;let o=``;for(;;){let t=n(i),s=i;for(;s--;)if(t[s]<r&&(o+=e[t[s]%e.length],o.length>=a))return o}}},DN=(e,t=21)=>tFe(e,t|0,eFe),ON=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=$Pe[n[e]&63];return t},nFe=Math.floor,rFe=Math.random;function iFe(e,t){return e+nFe(rFe()*(t-e+1))}function kN(e){var t=e.length;return t?e[iFe(0,t-1)]:void 0}function aFe(e){return kN(Wwe(e))}function oFe(e){return(lD(e)?kN:aFe)(e)}var sFe=t(((e,t)=>{(function(){var e,n,r,i,a,o;typeof performance<`u`&&performance!==null&&performance.now?t.exports=function(){return performance.now()}:typeof process<`u`&&process!==null&&process.hrtime?(t.exports=function(){return(e()-a)/1e6},n=process.hrtime,e=function(){var e=n();return e[0]*1e9+e[1]},i=e(),o=process.uptime()*1e9,a=i-o):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(e)})),cFe=e(t(((e,t)=>{for(var n=sFe(),r=typeof window>`u`?global:window,i=[`moz`,`webkit`],a=`AnimationFrame`,o=r[`request`+a],s=r[`cancel`+a]||r[`cancelRequest`+a],c=0;!o&&c<i.length;c++)o=r[i[c]+`Request`+a],s=r[i[c]+`Cancel`+a]||r[i[c]+`CancelRequest`+a];if(!o||!s){var l=0,u=0,d=[],f=1e3/60;o=function(e){if(d.length===0){var t=n(),r=Math.max(0,f-(t-l));l=r+t,setTimeout(function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(l)}catch(e){setTimeout(function(){throw e},0)}},Math.round(r))}return d.push({handle:++u,callback:e,cancelled:!1}),u},s=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}t.exports=function(e){return o.call(r,e)},t.exports.cancel=function(){s.apply(r,arguments)},t.exports.polyfill=function(e){e||=r,e.requestAnimationFrame=o,e.cancelAnimationFrame=s}}))(),1);function AN(){return fb().schema}function jN(){return fb().templates}function MN(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}var NN=11164,lFe=uFe;function PN(e){let t=lFe(e);return function(e){return n=>Fe(xe(()=>t.has(e)?nt({fromCache:!0,value:t.get(e)}):et),n.pipe(Ue(n=>t.set(e,n)),K(e=>({fromCache:!1,value:e}))))}}function uFe(e){let t=new mO(e);return{get(e){let n=t.get(e);if(!n)throw Error(`Key not found in LRU cache: ${e}`);return n.value},set(e,n){t.set(e,{value:n})},delete(e){t.delete(e)},has(e){return t.has(e)}}}function FN(e,t){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;if(n){let n=e,r=t;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0}let r=e,i=t,a=0,o=0;for(let e in r)if(Object.prototype.hasOwnProperty.call(r,e)){if(r[e]!==i[e])return!1;a++}for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&o++;return a===o}var IN=[`_id`,`_rev`,`_type`],dFe=[...IN,`_key`],LN={available:!0,reason:`READABLE`},fFe={available:!1,reason:`PERMISSION_DENIED`},pFe={available:!1,reason:`NOT_FOUND`},mFe={available:!1,reason:`VERSION_DELETED`},hFe={title:`Invalid preview config`,subtitle:`Check the error log in the console`,media:(0,Q.jsx)(Kn,{})},RN=`_system`;function zN(e,t){let n,r={},i=0;return function(...e){return new h(o=>{clearTimeout(n),n=setTimeout(a,t);let s={args:e,observer:o,completed:!1},c=i++;return r[c]=s,()=>{
Line truncated
|
||||
`);for(let t=0;t<s.length-1;++t){let i=s[t].trim();if(i.length!==0)try{e.enqueue(JSON.parse(i))}catch(t){e.error(t),r=!0,n.cancel();return}}return a=s[s.length-1],n.read().then(t).catch(t=>e.error(t))}).catch(t=>e.error(t))},cancel(){r=!0,n.cancel()}})}function dI(e){return{id:e,hasAttrs:!1,attrs:null,rev:null,events:[],aligned:!1}}function IRe(e,t){let n=t.events.findIndex(t=>e.id===t.transactionId);return n>=0?n+1:t.rev?t.rev===e.id?0:-1:0}function fI(e,t){if(e.hasAttrs=!0,t){if(e.attrs={...t},typeof e.attrs._rev!=`string`)throw Error(`snapshot has no _rev`);e.rev=e.attrs._rev,delete e.attrs._rev}else e.attrs=null,e.rev=null;e.events=[]}var LRe=class{timeline;earliestTransactionId=null;constructor(e){this.timeline=e,this._states={draft:dI(e.draftId),published:dI(e.publishedId)}}_states;appendRemoteSnapshotEvent(e){if(e.version===`version`)return;let t=this._states[e.version];if(e.type===`snapshot`){this._maybeInvalidateHistory(),fI(t,e.document);return}e.type===`remoteMutation`&&(t.aligned?(this._apply(t,e),this.timeline.addRemoteMutation(e)):t.hasAttrs?t.events.push(e):fI(t,e.head))}prependHistoryEvent(e){if(!this.acceptsHistory)throw Error(`cannot prepend history at this point`);for(let t of Object.values(this._states))if(!t.aligned){let n=IRe(e,t);n>=0&&this._alignAtIndex(t,n)}this.timeline.addTranslogEntry(e),this.earliestTransactionId=e.id}didReachEarliestEntry(){for(let e of Object.values(this._states))if(!e.aligned){if(e.attrs!==null)throw Error(`unable to find translog entry to align to`);this._alignAtIndex(e,0)}this.timeline.didReachEarliestEntry()}get isAligned(){return Object.values(this._states).every(e=>e.aligned)}get acceptsHistory(){return this._isComplete}get currentDocument(){return{draft:this._states.draft.attrs,published:this._states.published.attrs}}_alignAtIndex(e,t){for(let n of e.events.slice(0,t))this._apply(e,n);for(let n of e.events.slice(t))this._apply(e,n),this.timeline.addRemoteMutation(n);e.events=[],e.aligned=!0}get _isComplete(){return Object.values(this._states).every(e=>e.hasAttrs)}_apply(e,t){e.attrs=xg(e.attrs,t.effects.apply),e.rev=t.transactionId}_maybeInvalidateHistory(){if(this._isComplete){for(let e of Object.values(this._states))e.aligned=!1;this.earliestTransactionId=null,this.timeline.reset()}}},RRe=class{timeline;start;end;doc;constructor(e,t,n,r){this.timeline=e,this.start=n,this.end=r,this.doc=t}same(e,t){return this.start===e&&this.end===t}_startDocument;_endDocument;_diff;endAttributes(){return pI(this.endDocument())}endDocument(){return this._endDocument||=this.timeline.replayBackwardsUntil(this.end.end,this.doc),this._endDocument}startAttributes(){return pI(this.startDocument())}startDocument(){if(!this.start)throw Error(`start required`);return this._startDocument||=this.timeline.replayBackwardsBetween(this.start.end,this.end.end-1,this.endDocument()),this._startDocument}diff(){if(!this._diff){if(!this.start)throw Error(`start required`);this._diff=this.timeline.calculateDiff(this.startDocument(),this.endDocument(),this.start.index+1,this.end.index)}return this._diff}};function pI(e){return e.draft||e.published}var zRe=class{timeline;client;handler;version=0;selectionState=`inactive`;constructor(e){this.timeline=e.timeline,this.client=e.client,this.handler=e.handler,this._aligner=new LRe(this.timeline),this.markChange()}_aligner;_fetchMore=!1;_fetchAtLeast=0;_isRunning=!1;_isSuspended=!1;_didErr=!1;_since=null;_sinceTime=null;_rev=null;_revTime=null;_reconstruction;setHandler(e){this.handler=e}clearRange(){this.setRange(null,null)}setRange(e,t){t!==this._rev&&this.setRevTime(t),e!==this._since&&this.setSinceTime(e);let n=10;if(this._sinceTime===`loading`||this._revTime===`loading`||!this._aligner.isAligned)this.selectionState=`loading`;else if(this._sinceTime===`invalid`||this._revTime===`invalid`)this.selectionState=`invalid`;else if(this._sinceTime){this.selectionState=`range`;let e=this._revTime||this.timeline.lastChunk();this._sinceTime.index>e.index?(this._revTime=`invalid`,this.selectionState=`invalid`):this.setReconstruction(this._sinceTime,e)}else this._revTime?(this.selectionState=`rev`,this.setReconstruction(null,this._revTime)):(this.selectionState=`inactive`,n=0);this._fetchAtLeast=n,this.start()}setLoadMore(e){this._fetchMore=e,this.start()}get sinceTime(){return this._sinceTime&&typeof this._sinceTime==`object`?this._sinceTime:null}get revTime(){return this._revTime&&typeof this._revTime==`object`?this._revTime:null}get isLoading(){return this._isRunning}get realRevChunk(){return this.revTime||this.timeline.lastChunk()}onOlderRevision(){return!!this._rev&&(this.selectionState===`range`||this.selectionState===`rev`)}findRangeForNewRev(e){let t=this.timeline.isLatestChunk(e)?null:this.timeline.createTimeId(e);if(!this._since)return[null,t];let n=this.sinceTime;return n&&n.index<e.index?[this._since,t]:[`@lastPublished`,t]}findRangeForNewSince(e){let t=this.revTime;return t&&e.index<t.index?[this.timeline.createTimeId(e),this._rev]:[this.time
Line truncated
|
||||
`).filter(Boolean).map(e=>JSON.parse(e))},URe=e=>(0,ZM.reduce)(e,(e,t)=>Ys(t)&&!e.includes(t._ref)?[...e,t._ref]:e,[]);function gI(e,t){return Array.isArray(e)?t(e.map(e=>gI(e,t)).filter(e=>e!==void 0)):MN(e)?t(Object.keys(e).reduce((n,r)=>{let i=gI(e[r],t);return i!==void 0&&(n[r]=i),n},{})):t(e)}var WRe=(e,t)=>gI(e,e=>Ys(e)?t(e):e),GRe=(e,t)=>WRe(e,e=>t[e._ref]?e:void 0);function KRe(e,t,n,r,i){return C(hI(e,n,r)).pipe(Ee(n=>{if(!n)throw Error(`Unable to find document with ID ${t} at revision ${r}`);if(r!==`lastRevision`&&n?._rev!==r)throw Error(`Restored revision ${n?._rev} does not match expected revision ${r}`);let i=URe(n).map(e=>`"${e}": defined(*[_id=="${e}"]._id)`).join(`,`);return e.observable.fetch(`{${i}}`).pipe(K(e=>GRe(n,e)))}),K(e=>{let{_updatedAt:t,...r}=e;return{...r,_id:n}}),Ee(r=>{let a=sp(n)||lp(n);if(i?.useServerDocumentActions&&a){let a=LP(e,cx(t,{version:Vn(n)}));if(lp(n)&&!i.variant){let e=i.fromDeleted?{actionType:`sanity.action.document.version.create`,publishedId:t,document:r}:{actionType:`sanity.action.document.version.replace`,document:r};return a.observable.action(e)}let o={actionType:`sanity.action.document.replaceDraft`,publishedId:t,attributes:r};return a.observable.action(i.fromDeleted?[{actionType:`sanity.action.document.create`,publishedId:t,attributes:r,ifExists:`fail`},o]:o)}return e.observable.createOrReplace(r,{visibility:`async`})}),K(()=>void 0))}function qRe({client:e}){return{getDocumentAtRevision:(t,n)=>hI(e,t,n),getHistory:(t,n)=>BRe(e,t,n),getTransactions:t=>HRe(e,t),restore:(t,n,r,i)=>KRe(e,t,n,r,i),getTimelineController:VRe}}var _I=(()=>{if(typeof process<`u`&&process.versions!==void 0&&process.versions.node!==void 0)return!1;let e=`__tmp_supports_local_storage`;try{return typeof localStorage>`u`?!1:(localStorage.setItem(e,`---`),localStorage.removeItem(e),!0)}catch{return!1}})();function JRe(){let e=Object.create(null);return{getKey(t){return e[t]||null},setKey(t,n){e[t]=n}}}function YRe(e){try{return JSON.parse(e)}catch(e){return console.warn(`Failed to parse settings: ${e.message}`),null}}function XRe(){if(!_I)return JRe();function e(e){let t=localStorage.getItem(e);return t===null?null:YRe(t)}return{getKey:e,setKey:function(e,t){t==null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}}}var vI=XRe();function ZRe(e){function t(t){return _e(nt(vI.getKey(t)),e.getKey(t).pipe(Ue(e=>{vI.setKey(t,e)}))).pipe(ze(AO))}function n(t,n){return vI.setKey(t,n),e.setKey(t,n)}return{getKey:t,setKey:n}}function QRe({client:e}){let t=e.withConfig(mb),n=new EN.default(async e=>{let n=(await t.request({url:`/users/me/keyvalue/${e.join(`,`)}`}).catch(t=>(console.error(`Error fetching data:`,t),Array(e.length).fill(null)))||[]).reduce((e,t)=>(t?.key&&(e[t.key]=t.value),e),{});return e.map(e=>n[e]||null)});return{getKey:e=>n.load(e),setKey:(e,r)=>t.request({method:`PUT`,url:`/users/me/keyvalue`,body:[{key:e,value:r}]}).then(e=>{let t=e[0];return n.clear(t.key),n.prime(t.key,t.value),t.value},e=>(console.error(`Error setting data:`,e),null))}}function $Re({client:e}){let t=QRe({client:e}),n=new k;function r(e){return t.getKey(e)}function i(e,r){return n.next({type:`optimistic`,key:e,value:r}),t.setKey(e,r).then(t=>(n.next({type:`commit`,key:e,value:t}),t))}return{getKey(e){return Fe(r(e),n.pipe(je(t=>t.key===e),K(e=>e.value),ze(AO)))},setKey:i}}function eze(e){return ZRe($Re(e))}var tze=e=>{if(e.type===`rollCall`)return{type:`rollCall`,userId:e.i,sessionId:e.session};if(e.type===`state`){let{sessionId:t,locations:n}=e.m;return{type:`state`,userId:e.i,sessionId:t,timestamp:new Date().toISOString(),locations:n}}if(e.type===`disconnect`)return{type:`disconnect`,userId:e.i,sessionId:e.m.session,timestamp:new Date().toISOString()};throw Error(`Got unknown presence event: ${JSON.stringify(e)}`)},nze=(e,t)=>[e.listen(`presence`).pipe(K(tze)).pipe(D()),n=>n.type===`rollCall`?e.request(`presence_rollcall`,{session:t}):n.type===`state`?e.request(`presence_announce`,{data:{locations:n.locations,sessionId:t}}):n.type===`disconnect`?e.request(`presence_disconnect`,{session:t}):et],rze=[`pqSMwf6hH`,`pnLYqNfv5`,`priDVVmy8`,`p0NFOU0j8`,`pTDl2jw8d`,`pHMeQnTse`,`pDQYzJbyS`,`pZyoPHKUs`,`p4Tyi2Be5`,`pb9vii060`,`pE8yhOisw`,`p7Fd2C6Cj`,`p3exSgYCx`,`pbIQRYViC`,`p8GJaTEhN`,`p27ewL8aM`,`pYg97z75S`,`pdLr4quHv`,`pkJXiDgg6`,`pkl4UAKcA`,`pNoExists`],ize=[[`nested`,`first`],[`nested`,`second`],[`nestedArray`,{_key:`565c867c8dac`},`arrayNo1`,{_key:`a645548a8f01`},`arrayNo1`,{_key:`1685e372c40f`},`fieldNo0`],[`nestedArray`,{_key:`565c867c8dac`},`fieldNo0`],[`nestedArray`,{_key:`565c867c8dac`},`arrayNo19`,{_key:`a02e7a93e2a2`},`fieldNo0`],[`nestedArray`,{_key:`565c867c8dac`},`arrayNo19`,{_key:`a02e7a93e2a2`},`fieldNo19`],[`address`,`country`],[`address`,`street`],[`customInputWithDefaultPresence`,`row3`,`cell3`]],aze=xe(()=>Ve(0,1e4)).pipe(Ta(rze),K((e,t)=>({type:`state`,userId:e,sessionId:e+t,timestamp:new Date().toISOString(),locations:[{type:`document`,documentId:`presence-debug`,lastAc
Line truncated
|
||||
"updatedAt": ${a}[0]._updatedAt,
|
||||
"documentIds": ${a}[].docId,
|
||||
},`}},{subquery:``,projection:``})},WUe=e=>{let t=(t,n=!1)=>{if(!t?.length||!e)return nt({data:null,error:null,loading:!1});let{subquery:r,projection:i}=UUe(t),a=e.observable.fetch(`{${r}}{${i}}`,{},{tag:`release-docs.fetch`}).pipe(G(e=>nt({data:Object.entries(e).reduce((e,t)=>{let[n,r]=t;return{...e,[n]:{...r,documentCount:r.documentIds?.length||0}}},{}),error:null,loading:!1})),Ge(e=>(console.error(`Failed to fetch release metadata`,e),nt({data:null,error:e,loading:!1}))));return Li(()=>n,a.pipe(Ma({loading:!0,data:null,error:null})),a)},n=n=>!n?.length||!e?et:e.observable.listen(`*[(${n.reduce((e,t,n)=>`${e}${n===0?``:` ||`} sanity::partOfRelease("${t}")`,``)})]`,{},{includeResult:!0,includeAllVersions:!0,visibility:`query`,events:[`mutation`],tag:`release-docs.listen`}).pipe(Ge(e=>(console.error(`Failed to listen for release metadata`,e),et)),Xi(1e3),je(e=>e.length>0),G(e=>{let n=e.reduce((e,t)=>{if(`type`in t&&t.type===`mutation`){let n=t.documentId.split(`.`)[1];return e.includes(n)?e:[...e,n]}return e},[]);return n.length?t(n):et}));return e=>_e(t(e,!0),n(e))};function GUe(e){return(e??[]).reduce((e,t)=>(e.set(t._id,t),e),new Map)}function KUe(e,t){switch(t.type){case`LOADING_STATE_CHANGED`:return{...e,state:t.payload.loading?`loading`:`loaded`,error:t.payload.error};case`RELEASES_SET`:{let n=GUe(t.payload);return{...e,releases:n}}default:return e}}var qUe=`*[${`_type=="${BLe}" && _id in path("${xF}.*")`}] {
|
||||
_id,
|
||||
_type,
|
||||
_rev,
|
||||
_createdAt,
|
||||
_updatedAt,
|
||||
state,
|
||||
finalDocumentStates,
|
||||
publishAt,
|
||||
publishedAt,
|
||||
"metadata": coalesce(metadata, {
|
||||
"title": "",
|
||||
"releaseType": "undecided",
|
||||
}),
|
||||
// Content Lake initially encoded non-error states as {error: {message: ""}}. This projection
|
||||
// ensures the error field only appears if the document has a non-empty error message.
|
||||
...select(
|
||||
length(error.message) > 0 => { error },
|
||||
{}
|
||||
),
|
||||
} | order(_createdAt desc)`,Tz={releases:new Map,state:`initialising`};function JUe(e){let{client:t}=e,n=new k,r=new fi(!1);function i(e){n.next(e)}let a=nt({action:{type:`LOADING_STATE_CHANGED`,payload:{loading:!0,error:void 0}}}).pipe(je(()=>!r.value),Ue(()=>r.next(!0)),ia(VF(t,qUe,{},{tag:`releases.listen`}).pipe(Ue(()=>r.next(!1)),K(e=>({response:e})))),Ge(e=>nt({action:{type:`LOADING_STATE_CHANGED`,payload:{loading:!1,error:e}}})),G(e=>`action`in e?nt(e.action):nt({type:`RELEASES_SET`,payload:e.response},{type:`LOADING_STATE_CHANGED`,payload:{loading:!1,error:void 0}}))),o=Fe(_e(a,n)).pipe(je(e=>e!==void 0),ja((e,t)=>KUe(e,t),Tz),Ma(Tz),re(1));return{state$:o,errorCount$:o.pipe(YUe(),re(1)),getMetadataStateForSlugs$:WUe(t),dispatch:i}}function YUe(){return S(G(({releases:e})=>C(e.values()).pipe(je(e=>e.state===`active`),je(e=>e.error!==void 0),ca())),ze())}function Ez(){let e=(0,Z.c)(5),t=wI(),n=db(),r=kI(),i=pb(nP),a;return e[0]!==r||e[1]!==t||e[2]!==i||e[3]!==n?(a=t.get({dependencies:[n,r],namespace:`ReleasesStore`})||JUe({client:i,previewStore:r}),t.set({dependencies:[n,r],namespace:`ReleasesStore`,value:a}),e[0]=r,e[1]=t,e[2]=i,e[3]=n,e[4]=a):a=e[4],a}function Dz(){let e=(0,Z.c)(11),{state$:t,dispatch:n}=Ez(),r=tD(t,Tz),i;e[0]===r.releases?i=e[1]:(i=wz(Array.from(r.releases.values()).filter(ZUe)).reverse(),e[0]=r.releases,e[1]=i);let a=i,o;e[2]===a?o=e[3]:(o=new Map(a.map(XUe)),e[2]=a,e[3]=o);let s=o,c=r.error,l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=[`loading`,`initialising`],e[4]=l):l=e[4];let u=l.includes(r.state),d;return e[5]!==s||e[6]!==n||e[7]!==a||e[8]!==r.error||e[9]!==u?(d={data:a,dispatch:n,error:c,byId:s,loading:u},e[5]=s,e[6]=n,e[7]=a,e[8]=r.error,e[9]=u,e[10]=d):d=e[10],d}function XUe(e){return[e._id,e]}function ZUe(e){return!yz.includes(e.state)}function QUe(e){return(e??[]).reduce((e,t)=>(e.set(t._id,t),e),new Map)}function $Ue(e,t){switch(t.type){case`LOADING_STATE_CHANGED`:return{...e,state:t.payload.error?`error`:t.payload.loading?`loading`:`loaded`,error:t.payload.error};case`VARIANTS_SET`:{let n=QUe(t.payload);return{...e,variants:n}}case`FETCH_SUCCEEDED`:{let n=QUe(t.payload);return{...e,variants:n,state:`loaded`,error:void 0}}case`VARIANT_DELETED`:{let{id:n}=t.payload,r=new Map(e.variants);return r.delete(n),{...e,variants:r}}default:return e}}var eWe=`*[${`_type=="${Wpe}" && _id in path("${px}.*")`}] {
|
||||
_id,
|
||||
_type,
|
||||
_rev,
|
||||
_createdAt,
|
||||
_updatedAt,
|
||||
name,
|
||||
conditions,
|
||||
"priority": coalesce(priority, 0),
|
||||
metadata,
|
||||
} | order(_createdAt desc)`,Oz={variants:new Map,state:`initialising`};function tWe(e){let{client:t,enabled:n}=e;if(!n){let e={variants:new Map,state:`loaded`};return{state$:nt(e),initialState:e,dispatch:()=>{}}}let r=new k;function i(e){r.next(e)}let a=nt({type:`LOADING_STATE_CHANGED`,payload:{loading:!0,error:void 0}}).pipe(ia(VF(t,eWe,{},{tag:`variants.listen`}).pipe(K(e=>({type:`FETCH_SUCCEEDED`,payload:e})))),Ge(e=>nt({type:`LOADING_STATE_CHANGED`,payload:{loading:!1,error:e}})));return{state$:_e(a,r).pipe(ja((e,t)=>$Ue(e,t),Oz),Ma(Oz),re(1)),initialState:Oz,dispatch:i}}function nWe(){let e=(0,Z.c)(5),t=db(),n=!!t.beta?.variants?.enabled,r=wI(),i=pb(mx),a;return e[0]!==r||e[1]!==i||e[2]!==n||e[3]!==t?(a=r.get({dependencies:[t],namespace:`VariantsStore`})||tWe({client:i,enabled:n}),r.set({dependencies:[t],namespace:`VariantsStore`,value:a}),e[0]=r,e[1]=i,e[2]=n,e[3]=t,e[4]=a):a=e[4],a}function kz(){let e=(0,Z.c)(8),{state$:t,initialState:n}=nWe(),{variants:r,error:i,state:a}=tD(t,n),o;e[0]===r?o=e[1]:(o=Array.from(r.values()),e[0]=r,e[1]=o);let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=[`loading`,`initialising`],e[2]=s):s=e[2];let c=s.includes(a),l;return e[3]!==i||e[4]!==o||e[5]!==c||e[6]!==r?(l={data:o,byId:r,error:i,loading:c},e[3]=i,e[4]=o,e[5]=c,e[6]=r,e[7]=l):l=e[7],l}function rWe(e=16){let t=new Uint8Array(e);return crypto.getRandomValues(t),t}var iWe=(()=>{let e;return()=>{if(e)return e;e=[];for(let t=0;t<256;++t)e[t]=(t+256).toString(16).slice(1);return e}})();function Az(e){let t=iWe();return rWe(e).reduce((e,n)=>e+t[n],``).slice(0,e)}function jz(){return fb().dataset}var aWe={data:[],versions:[],error:null,loading:!0},oWe=new Map,sWe=new Map,cWe=PN({maxSize:100});function Mz(e){return tD(lWe(e),aWe)}function lWe(e){let t=(0,Z.c)(10),{documentId:n}=e,r;t[0]===n?r=t[1]:(r=zn(n),t[0]=n,t[1]=r);let i=r,a=jz(),o=ER(),s=kI(),{state$:c}=Ez(),l;t[2]===c?l=t[3]:(l=c.pipe(K(uWe)),t[2]=c,t[3]=l);let u=l,d;return t[4]!==a||t[5]!==s||t[6]!==o||t[7]!==i||t[8]!==u?(d=_We({documentPreviewStore:s,publishedId:i,projectId:o,dataset:a,releases$:u}),t[4]=a,t[5]=s,t[6]=o,t[7]=i,t[8]=u,t[9]=d):d=t[9],d}function uWe(e){return Array.from(e.releases.values()).filter(dWe)}function dWe(e){return!yz.includes(e.state)}var fWe=(e,t)=>{let n=Vn(e);if(n){let r=t.find(e=>CF(e._id)===n);return{bundleId:n,release:r?{_ref:r._id,_weak:!0}:void 0,group:{_ref:zn(e),_weak:!0},scopeId:n}}return{bundleId:Rn(e)?`drafts`:void 0,group:{_ref:zn(e),_weak:!0}}},pWe=e=>{let{variant:t,...n}=e;return e.variants?.[0]?n:t?{...n,variants:[{_ref:t._ref,_key:Az()}]}:n},mWe=(e,t)=>e._system?.group?pWe(e._system):pWe({...e._system,...fWe(e._id,t)}),hWe=[`_id`,`_type`,`_rev`,`_createdAt`,`_updatedAt`,`_system`];function gWe(e,t,n){let r=e.get(t);if(r)return r;let i=n().pipe(we(()=>e.delete(t)),D({connector:()=>new te(1),resetOnRefCountZero:()=>Ve(1e3)}));return e.set(t,i),i}function _We(e){let{documentPreviewStore:t,projectId:n,dataset:r,publishedId:i,releases$:a}=e;return gWe(sWe,`${n}-${r}-${i}`,()=>Pi([vWe({documentPreviewStore:t,publishedId:i,projectId:n,dataset:r}),a]).pipe(K(([e,t])=>({...e,versions:e.versions.map(e=>({...e,[RN]:mWe(e,t)}))}))))}function vWe(e){let{documentPreviewStore:t,projectId:n,dataset:r,publishedId:i}=e,a=`${n}-${r}-${i}`;return gWe(oWe,a,()=>t.unstable_observeVersionDocumentIds(i).pipe(cWe(a),K(({value:e})=>e),G((e,n)=>{if(e.length===0)return nt({data:[],versions:[],error:null,loading:!1});let r=Pi(e.map(e=>t.observePaths({_id:e},hWe).pipe(K(e=>MN(e)?e:void 0),K(t=>({_id:e,_rev:t?._rev??``,_type:t?._type??``,_createdAt:t?._createdAt??``,_updatedAt:t?._updatedAt??``,[RN]:t?.[RN]}))))).pipe(K(t=>({data:e,versions:t,error:null,loading:!1})));if(n>0)return r;let i={data:e,versions:[],error:null,loading:!0};return r.pipe(Ma(i))}),Ge(e=>nt({error:e,data:[],versions:[],loading:!1}))))}function Nz(e){return e[0]}function Pz(){let e=(0,$.useContext)(rs);if(!e)throw Error(`usePerspective must be used within a PerspectiveProvider`);return e}function Fz({bundle:e,documentVersions:t,variant:n}){return t.find(t=>{let r=e===`published`?!t._system.bundleId:t._system.bundleId===e,i=SP(t);return r&&(n?i===n:!i)})}function yWe({documentVersions:e,variant:t}){return Fz({bundle:`published`,variant:t,documentVersions:e})}function bWe(e){let t=[`projectId`in e&&"`projectId` not allowed in plugin configuration",`dataset`in e&&"`dataset` not allowed in plugin configuration"].filter(QVe);if(t.length)throw Error(`Invalid plugin configuration:\n${t.map(e=>`\t${e}`).join(`
|
||||
`)}`)}function xWe(e){if(typeof e==`function`){let t=e;return e=>{let n=t(e);return bWe(n),n}}return bWe(e),()=>e}function SWe(e){let t=(0,Z.c)(5),n=KE(),r,i;t[0]===n?(r=t[1],i=t[2]):(r=()=>{console.error(`Scheduled publishing plugin is added by default, please remove this plugin from your config.
|
||||
|
||||
If you have a custom date config, you can use the scheduledPublishing API to customize the date input.
|
||||
|
||||
See: https://www.sanity.io/docs/scheduled-publishing.
|
||||
`),n.push({id:`scheduled-publishing-deprecated`,closable:!0,duration:6e4,status:`error`,title:`Scheduled publishing plugin is deprecated`,description:`The scheduled publishing plugin is now deprecated, you should remove the plugin from your configuration. If you have a custom date config, you can use the scheduledPublishing API to customize the date input. See: https://www.sanity.io/docs/scheduled-publishing.`})},i=[n],t[0]=n,t[1]=r,t[2]=i),(0,$.useEffect)(r,i);let a;return t[3]===e?a=t[4]:(a=e.renderDefault(e),t[3]=e,t[4]=a),a}var CWe=xWe({name:`sanity/deprecated/scheduled-publishing`,studio:{components:{layout:SWe}}}),wWe=[`scheduled-publishing`],Iz=({plugins:e=[],...t},n)=>{let r={config:t,path:[...n,t.name]},i=e.flatMap(e=>Iz(e,[...n,t.name])),a=i.find(e=>e.config.name===`scheduled-publishing`);return a&&i.push({path:a.path,config:CWe()}),[...i.filter(e=>!wWe.includes(e.config.name)),r]},TWe=()=>(0,Q.jsx)($.Fragment,{});function EWe(e,t){function n(n){let r=t=>(0,Q.jsx)(e,{...t});for(let e of t){let t=r;r=n=>(0,Q.jsx)(e,{...n,renderDefault:t})}return r({...n,renderDefault:TWe})}return n}function Lz(e){let t=(0,Z.c)(4),{options:n}=fb().__internal,{defaultComponent:r,pick:i}=e,a;if(t[0]!==r||t[1]!==n||t[2]!==i){let e=[...Iz(n,[])];e.reverse(),a=EWe(r,e.map(e=>{let{config:t}=e;return i(t)}).filter(Boolean)),t[0]=r,t[1]=n,t[2]=i,t[3]=a}else a=t[3];return a}function Rz(e){return typeof e==`string`}var zz={block:{icon:25,media:{width:33,height:33}},blockImage:{icon:25,media:{width:600,height:400}},compact:{icon:21,media:{width:25,height:25}},default:{icon:21,media:{width:33,height:33}},detail:{icon:25,media:{width:73,height:73}},inline:{icon:15,media:{width:15,height:15}},media:{icon:25,media:{width:160,height:160}}};function DWe(e,t,n){return(0,GI.isValidElementType)(e)?(0,Q.jsx)(e,{layout:t,dimensions:n}):typeof e==`string`?(0,Q.jsx)(`div`,{children:e}):(0,$.isValidElement)(e)||e===null||typeof e==`number`||typeof e==`boolean`?e:null}function Bz(e,t,n){return typeof e==`string`?e:(0,GI.isValidElementType)(e)?(0,Q.jsx)(e,{layout:t}):e||n}function OWe(e){let t=jHe(e);if(t===void 0)return;let n=zz.blockImage.media,r=Math.min(n.width/t.width,1);return{width:Math.round(t.width*r),height:Math.round(t.height*r),fit:`max`,dpr:zR()}}function kWe(e,t){let{apiHost:n,projectId:r}=e.config();if(!r)throw Error(`Cannot create Media Library client: missing projectId in client config`);let i=new URL(n);return i.hostname=`${r}.${i.hostname}`,e.withConfig({apiHost:i.origin,resource:{id:t,type:`media-library`}})}function AWe(e,t){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,t)}function jWe(e,t){return`media-library:${e}:${t}`}function MWe(e){return!AWe(e,`media`)||!AWe(e.media,`_ref`)?!1:typeof e.media._ref==`string`}function NWe(e){if(typeof e!=`string`)return!1;let[t,n,r]=e.split(`:`,3);return t===`media-library`&&!!n&&!!r}function PWe(e){let t=MWe(e)?e?.media?._ref:e;return NWe(t)?t:void 0}var FWe=new Map,Vz=new mO({maxAge:3e5,maxSize:2e3});async function IWe(e){let{assetIds:t,client:n,libraryId:r}=e;if(t.length===0)return[];try{let e=await n.fetch(`*[_id in $ids]{_id, cdnAccessPolicy}`,{ids:t}),i=Object.fromEntries(e.map(e=>[e._id,e.cdnAccessPolicy]));return t.map(e=>{let t=i[e],n=jWe(r,e);return Vz.set(n,t),t})}catch(e){return console.error(`Error fetching cdnAccessPolicy batch`,{libraryId:r,assetIds:t,error:e}),t.forEach(e=>{let t=jWe(r,e);Vz.set(t,void 0)}),t.map(()=>void 0)}}function LWe(e,t){let n=FWe.get(t);if(n)return n;let r=kWe(e,t),i=new EN.default(e=>IWe({assetIds:e,client:r,libraryId:t}),{cache:!1});return FWe.set(t,i),i}function RWe(e,t){let[,n,r]=e.split(`:`,3);if(!n||!r||!t)return Promise.resolve(void 0);if(Vz.has(e)){let t=Vz.get(e)??void 0;return Promise.resolve(t)}return LWe(t,n).load(r)}function Hz(e){let t=(0,Z.c)(5),{client:n,source:r}=e,i;t[0]===r?i=t[1]:(i=PWe(r),t[0]=r,t[1]=i);let a=i,o=!!(a&&n.config().token),s=o?a:null,c;t[2]===n?c=t[3]:(c=async e=>RWe(e,n),t[2]=n,t[3]=c);let l=c,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u={dedupingInterval:0,revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1},t[4]=u):u=t[4];let{data:d,isLoading:f}=CUe(s,l,u);return a?o?f?`checking`:d??`unknown`:`unknown`:`public`}var zWe=`https://sanity-cdn.work`,BWe=`https://api.sanity.work`,VWe=`https://sanity-cdn.com`,HWe=`https://api.sanity.io`;function Uz(){let e=(0,Z.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={apiVersion:`vX`},e[0]=t):t=e[0];let n=pb(t),r;e[1]===n?r=e[2]:(r=n.config(),e[1]=n,e[2]=r);let{token:i}=r;return i}var Wz=new Map,Gz={error:null,isLoading:!1,objectUrl:void 0},UWe={error:null,isLoading:!0,objectUrl:void 0};function WWe(e,t){if(e&&t)return`${t}:${e}`}function GWe(e){e.listeners.forEach(e=>e())}function KWe(e){switch(e.status){case`pending`:return e.objectUrl?{objectUrl:e.objectUrl,isLoading:!0,error:null}:UWe;case`success`:return{objectUrl:e.objectUrl,isLoading:!1,error:null};case`error`:return{objectUrl:void 0,isLoading:!1,erro
Line truncated
|
||||
`)}`}})):nt({granted:!0,reason:``})}))}var VKe=vR(HP(e=>BKe(e).pipe(ze(FN),LKe()),({client:e,schema:t,id:n,type:r,version:i,permission:a,userId:o})=>{let s=r!==`*`&&!!t.get(r)?.liveEdit;return WP([...UP(e),zn(n),i,o,r,a,String(s)])}));function sB(e){let t=(0,Z.c)(10),{id:n,type:r,version:i,permission:a,client:o,schema:s,grantsStore:c,pairListenerOptions:l}=e,u=pb(mb),d=AN(),f=DI(),p=bR(),m=o||u,h=s||d,g=c||f,_=p?.id,v;return t[0]!==m||t[1]!==g||t[2]!==n||t[3]!==l||t[4]!==a||t[5]!==h||t[6]!==r||t[7]!==_||t[8]!==i?(v={client:m,schema:h,grantsStore:g,id:n,permission:a,type:r,pairListenerOptions:l,version:i,userId:_},t[0]=m,t[1]=g,t[2]=n,t[3]=l,t[4]=a,t[5]=h,t[6]=r,t[7]=_,t[8]=i,t[9]=v):v=t[9],VKe(v)}function HKe(e){let t=(0,Z.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14.2496 6.64408C14.4167 6.52722 14.642 6.51898 14.818 6.63334C15.0184 6.76424 15.0999 7.01941 15.0143 7.24271L13.5797 10.9722H16.9283L16.9889 10.9771H16.9957C17.0202 10.9808 17.0448 10.9873 17.069 10.9947C17.2111 11.0383 17.3312 11.1433 17.3903 11.2857C17.4686 11.4754 17.4242 11.6935 17.2799 11.8384L10.8199 18.2984C10.7565 18.3618 10.6785 18.4063 10.5963 18.4292C10.5688 18.4369 10.5408 18.4419 10.5133 18.4449C10.457 18.4508 10.3992 18.4472 10.3434 18.4341C10.2873 18.4209 10.2329 18.398 10.1832 18.3658C10.0324 18.2676 9.94891 18.1 9.95275 17.9283C9.95408 17.8711 9.96557 17.813 9.98693 17.7574L11.4215 14.0269H8.08068C7.87549 14.0269 7.68973 13.9041 7.61095 13.7144C7.53245 13.5245 7.5764 13.3057 7.72131 13.1607L14.1813 6.70072L14.2496 6.64408ZM9.30529 13.0122H12.1676L12.2174 13.0152L12.2223 13.0162C12.3651 13.0338 12.4957 13.1114 12.5787 13.232C12.6615 13.3526 12.6878 13.5029 12.6529 13.6431L12.6344 13.7027L11.7926 15.8882L15.6949 11.9878H12.8404C12.8215 11.9878 12.7999 11.9866 12.7779 11.9839C12.7366 11.9788 12.6968 11.9687 12.6598 11.9546C12.6222 11.9403 12.5859 11.9211 12.5524 11.898C12.5181 11.8744 12.4875 11.8464 12.4606 11.816C12.4468 11.8004 12.4341 11.784 12.4225 11.7671C12.3278 11.6293 12.3069 11.4535 12.3668 11.2974L13.2076 9.10892L9.30529 13.0122Z`,fill:`currentColor`}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,Q.jsx)(`svg`,{"data-sanity-icon":`bolt-small`,width:`1em`,height:`1em`,viewBox:`0 0 25 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:n,...r,children:i}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function UKe(e){let t=(0,Z.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(`circle`,{cx:12.5,cy:12.5,r:2.5,fill:`currentColor`}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,Q.jsx)(`svg`,{"data-sanity-icon":`circle-xs`,width:`1em`,height:`1em`,viewBox:`0 0 25 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:n,...r,children:i}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function WKe(e){let t=(0,Z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i,a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M13.1074 12.248L15.1113 14.252L14.252 15.1113L12.0703 12.9297C11.9565 12.8158 11.8926 12.6614 11.8926 12.5V9.24023H13.1074V12.248Z`,fill:`currentColor`}),a=(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.5 6.79199C15.6524 6.79203 18.208 9.34762 18.208 12.5C18.208 15.6524 15.6524 18.208 12.5 18.208C9.34762 18.208 6.79203 15.6524 6.79199 12.5C6.79203 9.34762 9.34762 6.79203 12.5 6.79199ZM12.5 8.00781C10.0192 8.00785 8.00785 10.0192 8.00781 12.5C8.00785 14.9808 10.0192 16.9921 12.5 16.9922C14.9808 16.9921 16.9921 14.9808 16.9922 12.5C16.9921 10.0192 14.9808 8.00785 12.5 8.00781Z`,fill:`currentColor`}),t[3]=i,t[4]=a):(i=t[3],a=t[4]);let o;return t[5]!==n||t[6]!==r?(o=(0,Q.jsxs)(`svg`,{"data-sanity-icon":`clock-small`,width:`1em`,height:`1em`,viewBox:`0 0 25 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:n,...r,children:[i,a]}),t[5]=n,t[6]=r,t[7]=o):o=t[7],o}function GKe(e){let t=(0,Z.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i,a,o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M13.1074 15.0801H11.8916V13.6602H13.1074V15.0801Z`,fill:`currentColor`}),a=(0,Q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.5 9.17188C13.6047 9.17201 14.1278 10.1145 14.1279 10.7998C14.1279 11.1692 14.0317 11.4666 13.8545 11.7129C13.7017 11.925 13.4919 12.0813 13.3984 12.1592C13.2853 12.2535 13.2311 12.3108 13.1924 12.3818C13.1555 12.4495 13.1075 12.5788 13.1074 12.8398V13.04H11.8916C11.8916 13.04 11.8916 13.2582 11.8916 12.8398C11.8916 12.4215 11.9716 12.0828 12.126 11.7998C12.2782 11.5208 12.4788 11.3442 12.6211 11.2256C12.785 11.089 12.829 11.0549 12.8672 11.002C12.8775 10.9875 12.8866 10.9709 12.8945 10.9453C12.903 10.9177 12.9121 10.8727 12.9121 10.7998C12.912 10.6017 12.7625 10.3878 12.5 10.3877C12.284 10.3877 1
Line truncated
|
||||
`)}function hB(e){let t=(0,Z.c)(5),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let r=n,i=(0,$.useContext)(Wo)?.currentLocale.id,a;return t[2]!==i||t[3]!==r?(a=i?fB.listFormat(i,r):fB.listFormat(`en-US`,{...r,style:`narrow`}),t[2]=i,t[3]=r,t[4]=a):a=t[4],a}var cqe=/^<(?<tag>[^\s\d<][^/?><]+)\/?>/,lqe=/<\/(?<tag>[^>]+)>/,uqe=/<[^>]+\/>/,dqe=/^[A-Z][A-Za-z0-9]+$/,fqe=/^[a-z]+$/,pqe=/{{\s*?([^}]+)\s*?}}/g;function mqe(e){let t=[],n=``,r=``,i=e;for(;i.length>0;)if(!r&&i[0]===`<`){let e=_qe(i);if(e){let a=e.groups.tag;yqe(a),n&&=(t.push(...gB(n)),``),gqe(e[0])?t.push({type:`tagOpen`,selfClosing:!0,name:a}):(t.push({type:`tagOpen`,name:a}),r=a),i=i.slice(e[0].length)}else n+=i[0],i=i.slice(1)}else if(r&&i[0]===`<`&&i[1]!==`<`){let e=vqe(i);if(e){let a=e.groups.tag;if(i[1]!==`/`)throw Error(`Expected closing tag for <${r}>, but found new opening tag <${a}>. Nested tags is not supported.`);if(a!==r)throw Error(`Expected closing tag for <${r}>, but found closing tag </${a}> instead. Make sure each opening tag has a matching closing tag.`);n&&=(t.push(...gB(n)),``),t.push({type:`tagClose`,name:a}),r=``,i=i.slice(e[0].length)}else n+=i[0],i=i.slice(1)}else n+=i[0],i=i.slice(1);if(r)throw Error(`No matching closing tag for <${r}> found. Either make it self closing (e.g. "<${r}/>") or close it (e.g "<${r}>...</${r}>").`);return n&&t.push(...gB(n)),t}function gB(e){let t=[],n=e.matchAll(pqe),r=0;for(let i of n){if(i.index===void 0)continue;let n=e.slice(r,i.index);n.length>0&&t.push({type:`text`,text:n}),t.push(hqe(i[0])),r+=n.length+i[0].length}return r<e.length&&t.push({type:`text`,text:e.slice(r)}),t}function hqe(e){let[t,...n]=e.replace(/^\{\{|\}\}$/g,``).trim().split(/\s*,\s*/);if(n.length===1&&n[0]===`list`)return{type:`interpolation`,variable:t,formatters:n};if(n.length>0)throw Error(`Interpolations with formatters are not supported when using <Translate>. Found "${e}". Utilize "useTranslation" instead, or format the values passed to <Translate> ahead of time.`);return{type:`interpolation`,variable:t}}function gqe(e){return uqe.test(e)}function _qe(e){return e.match(cqe)}function vqe(e){return e.match(lqe)}function yqe(e){if(!dqe.test(e)&&!fqe.test(e))throw Error(e.trim()===e?`Invalid tag "<${e}>". Tag names must be lowercase HTML tags or start with an uppercase letter and can only include letters and numbers.`:`Invalid tag "<${e}>". No whitespace allowed in tags.`)}var bqe=/^[A-Z]/,xqe=new Set([`abbr`,`address`,`cite`,`code`,`del`,`em`,`ins`,`kbd`,`q`,`samp`,`strong`,`sub`,`sup`]);function _B(e){let t=(0,Z.c)(27),n=e.values&&`count`in e.values&&typeof e.values.count==`number`?e.values.count:void 0,r;t[0]!==e.context||t[1]!==e.i18nKey||t[2]!==e.t||t[3]!==n?(r=e.t(e.i18nKey,{context:e.context,skipInterpolation:!0,count:n}),t[0]=e.context,t[1]=e.i18nKey,t[2]=e.t,t[3]=n,t[4]=r):r=t[4];let i=r,a;t[5]===i?a=t[6]:(a=mqe(i),t[5]=i,t[6]=a);let o=a,s=hB(),c;t[7]===s?c=t[8]:(c=e=>s.format(e),t[7]=s,t[8]=c);let l;if(t[9]!==e.componentProps||t[10]!==e.components||t[11]!==e.context||t[12]!==e.i18nKey||t[13]!==e.t||t[14]!==e.values||t[15]!==c||t[16]!==o){let n={list:c},r;t[18]===e.components?r=t[19]:(r=e.components||{},t[18]=e.components,t[19]=r);let i=r;try{l=vB(o,e.values,i,e.componentProps,n)}catch(n){let r=n,i=r instanceof Error?r.message:String(r);console.warn(`Translate: Failed to render translation for key "${e.i18nKey}": ${i}`);let a;t[20]!==e.context||t[21]!==e.i18nKey||t[22]!==e.t||t[23]!==e.values?(a=e.t(e.i18nKey,{context:e.context,replace:e.values}),t[20]=e.context,t[21]=e.i18nKey,t[22]=e.t,t[23]=e.values,t[24]=a):a=t[24],l=a}t[9]=e.componentProps,t[10]=e.components,t[11]=e.context,t[12]=e.i18nKey,t[13]=e.t,t[14]=e.values,t[15]=c,t[16]=o,t[17]=l}else l=t[17];let u;return t[25]===l?u=t[26]:(u=(0,Q.jsx)(Q.Fragment,{children:l}),t[25]=l,t[26]=u),u}function vB(e,t,n,r,i){let[a,...o]=e;if(!a)return null;if(a.type===`interpolation`){let e=t?t[a.variable]:void 0;if(e===void 0)return`{{${a.variable}}}`;let s=Sqe(e,a.formatters||[],i);return(0,Q.jsxs)(Q.Fragment,{children:[s,vB(o,t,n,r,i)]})}if(a.type===`text`)return(0,Q.jsxs)(Q.Fragment,{children:[a.text,vB(o,t,n,r,i)]});if(a.type===`tagOpen`&&a.selfClosing){let e=n[a.name];if(!e)throw Error(`Component not found: ${a.name}`);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(e,{...typeof e==`string`?void 0:r}),vB(o,t,n,r,i)]})}if(a.type===`tagOpen`&&!a.selfClosing){let e=o.findIndex(e=>e.type===`tagClose`),s=o[e];if(s&&a.name!==s.name)throw Error(`Nested tags is not allowed`);let c=n[a.name];if(!c&&bqe.test(a.name))throw Error(`Component not defined: ${a.name}`);if(!c&&!xqe.has(a.name))throw Error(`HTML tag "${a.name}" is not allowed`);let l=o.slice(0,e),u=o.slice(e+1),d=c||a.name;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{...typeof d==`string`?void 0:r,children:vB(l,t,n,r,i)}),vB(u,t,n,r,i)]})}return null}function Sqe(e,t,n){let r=e;for(let i of t)if(i===`list`){if(Array.isArray(e))r=n.list(e);else throw Error(`List formatter used on non-array value`)}returLine truncated
|
||||
`,r:`\r`,t:` `},a;function o(e){throw{name:`SyntaxError`,message:e,at:n,text:a}}function s(e){return e&&e!==r&&o(`Expected '`+e+`' instead of '`+r+`'`),r=a.charAt(n),n+=1,r}function c(){var e,t=``;for(r===`-`&&(t=`-`,s(`-`));r>=`0`&&r<=`9`;)t+=r,s();if(r===`.`)for(t+=`.`;s()&&r>=`0`&&r<=`9`;)t+=r;if(r===`e`||r===`E`)for(t+=r,s(),(r===`-`||r===`+`)&&(t+=r,s());r>=`0`&&r<=`9`;)t+=r,s();return e=Number(t),isFinite(e)||o(`Bad number`),e}function l(){var e,t,n=``,a;if(r===`"`)for(;s();)if(r===`"`)return s(),n;else if(r===`\\`){if(s(),r===`u`){for(a=0,t=0;t<4&&(e=parseInt(s(),16),isFinite(e));t+=1)a=a*16+e;n+=String.fromCharCode(a)}else if(typeof i[r]==`string`)n+=i[r];else break}else n+=r;o(`Bad string`)}function u(){for(;r&&r<=` `;)s()}function d(){switch(r){case`t`:return s(`t`),s(`r`),s(`u`),s(`e`),!0;case`f`:return s(`f`),s(`a`),s(`l`),s(`s`),s(`e`),!1;case`n`:return s(`n`),s(`u`),s(`l`),s(`l`),null;default:o(`Unexpected '`+r+`'`)}}function f(){var e=[];if(r===`[`){if(s(`[`),u(),r===`]`)return s(`]`),e;for(;r;){if(e.push(m()),u(),r===`]`)return s(`]`),e;s(`,`),u()}}o(`Bad array`)}function p(){var e,t={};if(r===`{`){if(s(`{`),u(),r===`}`)return s(`}`),t;for(;r;){if(e=l(),u(),s(`:`),Object.prototype.hasOwnProperty.call(t,e)&&o(`Duplicate key "`+e+`"`),t[e]=m(),u(),r===`}`)return s(`}`),t;s(`,`),u()}}o(`Bad object`)}function m(){switch(u(),r){case`{`:return p();case`[`:return f();case`"`:return l();case`-`:return c();default:return r>=`0`&&r<=`9`?c():d()}}t.exports=function(e,t){var i;return a=e,n=0,r=` `,i=m(),u(),r&&o(`Syntax error`),typeof t==`function`?function e(n,r){var i,a,o=n[r];if(o&&typeof o==`object`)for(i in m)Object.prototype.hasOwnProperty.call(o,i)&&(a=e(o,i),a===void 0?delete o[i]:o[i]=a);return t.call(n,r,o)}({"":i},``):i}})),aQe=t(((e,t)=>{var n=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r,i,a={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,'"':`\\"`,"\\":`\\\\`},o;function s(e){return n.lastIndex=0,n.test(e)?`"`+e.replace(n,function(e){var t=a[e];return typeof t==`string`?t:`\\u`+(`0000`+e.charCodeAt(0).toString(16)).slice(-4)})+`"`:`"`+e+`"`}function c(e,t){var n,a,l,u,d=r,f,p=t[e];switch(p&&typeof p==`object`&&typeof p.toJSON==`function`&&(p=p.toJSON(e)),typeof o==`function`&&(p=o.call(t,e,p)),typeof p){case`string`:return s(p);case`number`:return isFinite(p)?String(p):`null`;case`boolean`:case`null`:return String(p);case`object`:if(!p)return`null`;if(r+=i,f=[],Object.prototype.toString.apply(p)===`[object Array]`){for(u=p.length,n=0;n<u;n+=1)f[n]=c(n,p)||`null`;return l=f.length===0?`[]`:r?`[
|
||||
`+r+f.join(`,
|
||||
`+r)+`
|
||||
`+d+`]`:`[`+f.join(`,`)+`]`,r=d,l}if(o&&typeof o==`object`)for(u=o.length,n=0;n<u;n+=1)a=o[n],typeof a==`string`&&(l=c(a,p),l&&f.push(s(a)+(r?`: `:`:`)+l));else for(a in p)Object.prototype.hasOwnProperty.call(p,a)&&(l=c(a,p),l&&f.push(s(a)+(r?`: `:`:`)+l));return l=f.length===0?`{}`:r?`{
|
||||
`+r+f.join(`,
|
||||
`+r)+`
|
||||
`+d+`}`:`{`+f.join(`,`)+`}`,r=d,l}}t.exports=function(e,t,n){var a;if(r=``,i=``,typeof n==`number`)for(a=0;a<n;a+=1)i+=` `;else typeof n==`string`&&(i=n);if(o=t,t&&typeof t!=`function`&&(typeof t!=`object`||typeof t.length!=`number`))throw Error(`JSON.stringify`);return c(``,{"":e})}})),oQe=t((e=>{e.parse=iQe(),e.stringify=aQe()})),sQe=t(((e,t)=>{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),FU=t(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){var t=n.call(e),r=t===`[object Arguments]`;return r||=t!==`[object Array]`&&typeof e==`object`&&!!e&&typeof e.length==`number`&&e.length>=0&&n.call(e.callee)===`[object Function]`,r}})),cQe=t(((e,t)=>{var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=FU(),o=Object.prototype.propertyIsEnumerable,s=!o.call({toString:null},`toString`),c=o.call(function(){},`prototype`),l=[`toString`,`toLocaleString`,`valueOf`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`constructor`],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>`u`)return!1;for(var e in window)try{if(!d[`$`+e]&&r.call(window,e)&&window[e]!==null&&typeof window[e]==`object`)try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),p=function(e){if(typeof window>`u`||!f)return u(e);try{return u(e)}catch{return!1}};n=function(e){var t=typeof e==`object`&&!!e,n=i.call(e)===`[object Function]`,o=a(e),u=t&&i.call(e)===`[object String]`,d=[];if(!t&&!n&&!o)throw TypeError(`Object.keys called on a non-object`);var f=c&&n;if(u&&e.length>0&&!r.call(e,0))for(var m=0;m<e.length;++m)d.push(String(m));if(o&&e.length>0)for(var h=0;h<e.length;++h)d.push(String(h));else for(var g in e)!(f&&g===`prototype`)&&r.call(e,g)&&d.push(String(g));if(s)for(var _=p(e),v=0;v<l.length;++v)!(_&&l[v]===`constructor`)&&r.call(e,l[v])&&d.push(l[v]);return d}}t.exports=n})),lQe=t(((e,t)=>{var n=Array.prototype.slice,r=FU(),i=Object.keys,a=i?function(e){return i(e)}:cQe(),o=Object.keys;a.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return r(e)?o(n.call(e)):o(e)}):Object.keys=a,Object.keys||a},t.exports=a})),IU=t(((e,t)=>{t.exports=Object})),uQe=t(((e,t)=>{t.exports=Error})),dQe=t(((e,t)=>{t.exports=EvalError})),fQe=t(((e,t)=>{t.exports=RangeError})),pQe=t(((e,t)=>{t.exports=ReferenceError})),LU=t(((e,t)=>{t.exports=SyntaxError})),RU=t(((e,t)=>{t.exports=TypeError})),mQe=t(((e,t)=>{t.exports=URIError})),hQe=t(((e,t)=>{t.exports=Math.abs})),gQe=t(((e,t)=>{t.exports=Math.floor})),_Qe=t(((e,t)=>{t.exports=Math.max})),vQe=t(((e,t)=>{t.exports=Math.min})),yQe=t(((e,t)=>{t.exports=Math.pow})),bQe=t(((e,t)=>{t.exports=Math.round})),xQe=t(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),SQe=t(((e,t)=>{var n=xQe();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),CQe=t(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),zU=t(((e,t)=>{var n=CQe();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),BU=t(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),wQe=t(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),TQe=t(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=wQe();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),VU=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),HU=t(((e,t)=>{t.exports=IU().getPrototypeOf||null})),EQe=t(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.
Line truncated
|
||||
`+d(g,o):``,b=o?`: `:`:`;if(f&&f.toJSON&&typeof f.toJSON==`function`&&(f=f.toJSON()),f=m(t,a,f),f!==void 0){if(typeof f!=`object`||!f)return n(f);var x=function(e,t){return h&&e.length===0?t:(t===`[]`?`[`:`{`)+s(e,`,`)+y+(t===`[]`?`]`:`}`)};if(r(f)){for(var S=[],C=0;C<f.length;C++){var w=e(f,C,f[C],g+1)||n(null);S[S.length]=y+o+w}return x(S,`[]`)}if(c(v,f)!==-1){if(p)return n(`__cycle__`);throw TypeError(`Converting circular structure to JSON`)}v[v.length]=f;for(var T=u(i(f),_&&_(f)),S=[],C=0;C<T.length;C++){var a=T[C],E=e(f,a,f[a],g+1);if(E){var D=n(a)+b+E;S[S.length]=y+o+D}}return l(v,c(v,f),1),x(S,`{}`)}}({"":e},``,e,0)}}))(),1);function YU(){return(0,$.useContext)(Ks)}function XU(e){let t=(0,Z.c)(3),{children:n,zOffset:r}=e,i=YU()[r],a;return t[0]!==n||t[1]!==i?(a=(0,Q.jsx)(_t,{zOffset:i,children:n}),t[0]=n,t[1]=i,t[2]=a):a=t[2],a}function RQe(e,t){if(!e||!t)return 0;let n=t-e;return Math.round(n/e*100)}function ZU(e,t){return e<1e3?t(e,`byte`):e<1e6?t(e/1e3,`kilobyte`):e<1e9?t(e/1e6,`megabyte`):e<1e9*1e3?t(e/1e9,`gigabyte`):t(e/(1e9*1e3),`terabyte`)}function QU(e){let t=(0,Z.c)(7),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let r=n,i=wB().id,a;t[2]===r?a=t[3]:(a={unitDisplay:`long`,...r,style:`unit`},t[2]=r,t[3]=a);let o=a,s;return t[4]!==i||t[5]!==o?(s=function(e,t){return fB.numberFormat(i,{...o,unit:t}).format(e)},t[4]=i,t[5]=o,t[6]=s):s=t[6],s}function $U(e){let[t,n]=(0,$.useState)(e);return(0,XVe.default)(t,e)?t:(n(e),e)}function eW(e,t){return[`--${e}`,fN(t).replaceAll(/[^a-z|0-9]+/gi,`_`).toLocaleLowerCase()].join(`_`)}var zQe=e=>{let t=(0,Z.c)(5),{changedFromBaseVariant:n}=e,{t:r}=ox(),i;t[0]!==n||t[1]!==r?(i=n&&(0,Q.jsx)(WE.div,{"data-testid":`base-variant-diff-indicator`,initial:{opacity:0},exit:{opacity:0},animate:{opacity:1},children:(0,Q.jsx)(uR,{content:r(`changes.from-base-variant.label`),placement:`left`,children:(0,Q.jsx)(Y,{size:3,style:{"--card-icon-color":`var(--card-badge-suggest-icon-color)`},children:(0,Q.jsx)(xH,{})})})}),t[0]=n,t[1]=r,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,Q.jsx)(DE,{children:i}),t[3]=i,t[4]=a),a},BQe=e=>{let t=(0,Z.c)(20),{divergence:n,divergenceNavigator:r,upstreamBundle:i}=e,{t:a}=ox(),o,s,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={opacity:0},s={opacity:0},c={opacity:1},t[0]=o,t[1]=s,t[2]=c):(o=t[0],s=t[1],c=t[2]);let l=typeof i==`string`?i:i?.metadata.title,u;t[3]!==a||t[4]!==l?(u=a(`divergence.unresolved-divergence`,{count:1,versionName:l}),t[3]=a,t[4]=l,t[5]=u):u=t[5];let d;t[6]!==n.path||t[7]!==r?(d=()=>r.state.focusedDivergence===n.path?r.blurFocusedDivergence():r.focusDivergence(n.path),t[6]=n.path,t[7]=r,t[8]=d):d=t[8];let f=r.state.focusedDivergence===n.path,p=typeof i==`string`?i:i?.metadata.title,m;t[9]!==a||t[10]!==p?(m=a(`divergence.unresolved-divergence`,{count:1,versionName:p}),t[9]=a,t[10]=p,t[11]=m):m=t[11];let h;t[12]===m?h=t[13]:(h={content:m,placement:`left`},t[12]=m,t[13]=h);let g=i===`published`?`positive`:`suggest`,_;return t[14]!==h||t[15]!==g||t[16]!==u||t[17]!==d||t[18]!==f?(_=(0,Q.jsx)(WE.div,{initial:o,exit:s,animate:c,children:(0,Q.jsx)(dR,{"aria-label":u,onClick:d,selected:f,mode:`bleed`,icon:gr,tooltipProps:h,radius:`full`,tone:g})}),t[14]=h,t[15]=g,t[16]=u,t[17]=d,t[18]=f,t[19]=_):_=t[19],_},VQe=[];function tW(e,t){return e.get(t?.author||null)}function nW(e,t){return HQe(e,Array.isArray(t)?t:zI(t))}function HQe(e,t){let n=rW(e,t);if(n&&n.action!==`unchanged`)return n.annotation||void 0}function rW(e,t,n=[]){if(t.length===0)return e;let r=t[0],i=t.slice(1);if(fc(r))throw Error(`Index tuples are not supported in diff paths`);if(uc(r)||dc(r)){let t=uc(r)?`at index ${r}`:`with key ${r._key}`;if(e.type!==`array`){`${t}${LI(n)}`;return}let a=e.items.find(uc(r)?e=>e.toIndex===r:e=>UQe(e,r));if(!a){`${t}${LI(n)}`;return}return rW(a.diff,i,n.concat(r))}if(e.type!==`object`){`${r}${LI(n)}`;return}let a=e.fields[r];if(a===void 0){`${r}${LI(n)}`;return}return rW(a,i,n.concat(r))}function UQe(e,t){let n=e.diff;return n.type!==`object`||!n.toValue?!1:n.toValue._key===t}function iW(e){let t=(0,Z.c)(3),n=lB(),r;return t[0]!==e||t[1]!==n?(r=tW(n,e),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function aW(e,t){let n=(0,Z.c)(8),r;n[0]===t?r=n[1]:(r=t===void 0?[]:t,n[0]=t,n[1]=r);let i=r,a=lB(),o;n[2]!==e||n[3]!==i?(o=nW(e,i),n[2]=e,n[3]=i,n[4]=o):o=n[4];let s=o,c;return n[5]!==s||n[6]!==a?(c=tW(a,s),n[5]=s,n[6]=a,n[7]=c):c=n[7],c}var WQe={default:`jls3qa1 jls3qa0`,neutral:`jls3qa2 jls3qa0`,primary:`jls3qa3 jls3qa0`,suggest:`jls3qa4 jls3qa0`,positive:`jls3qa5 jls3qa0`,caution:`jls3qa6 jls3qa0`,critical:`jls3qa7 jls3qa0`};function oW(e){let t=(0,Z.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({$tone:n,className:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=WQe[n??`default`],o;t[4]!==r||t[5]!==a?(o=Qt(a,r),t[4]=r,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==i||t[8]!==o?(s=(0,Q.jsx)(`span`,{...i,className:o}),t[7]=i,t[8]=o,t[9]=s):s=t[9],s}var sW=e=>e.type===`createDocumentVersion`,cW=e=>e.type===`deleteDocumentVersion`,lW=e=>e.type===`pLine truncated
|
||||
`)}var i1e=e=>{let t=(0,Z.c)(3),{value:n,schemaType:r}=e,i=n,a;return t[0]!==r||t[1]!==i?(a=(0,Q.jsx)(X,{padding:2,children:(0,Q.jsx)($z,{schemaType:r,value:i,layout:`default`})}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a},a1e=e=>{let t=(0,Z.c)(3),{diff:n,schemaType:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(jW,{diff:n,schemaType:r,previewComponent:i1e,layout:`grid`}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},o1e=J.div.withConfig({displayName:`FieldChangeContainer`,componentId:`sc-osbku8-0`})`--field-change-error:${({theme:e})=>e.sanity.color.solid.critical.enabled.bg};&[data-revert-all-changes-hover] [data-revert-all-hover]::before{border-left:2px solid var(--field-change-error);}`,s1e=J.div.withConfig({displayName:`DiffBorder`,componentId:`sc-osbku8-1`})`--field-change-error:${({theme:e})=>e.sanity.color.solid.critical.enabled.bg};--diff-inspect-padding-xsmall:${({theme:e})=>qt(e.sanity.space[1])};--diff-inspect-padding-small:${({theme:e})=>qt(e.sanity.space[2])};position:relative;padding:var(--diff-inspect-padding-xsmall) 0 var(--diff-inspect-padding-xsmall) var(--diff-inspect-padding-small);&::before{content:'';display:block;position:absolute;top:0;left:0;bottom:0;border-left:1px solid var(--card-border-color);}&[data-error]:hover::before,&[data-revert-field-hover]:hover::before{border-left:2px solid var(--field-change-error);}`,c1e=J(dR).withConfig({displayName:`Root`,componentId:`sc-4bm9j2-0`})`[data-ui='Text']{font-weight:normal;}div[data-ui='Box']{display:none;}&:not([data-disabled='true']):hover,&:not([data-disabled='true']):focus{--card-fg-color:${({theme:e})=>e.sanity.color.solid.critical.enabled.bg};--card-bg-color:transparent;--card-border-color:transparent;div[data-ui='Box']{display:block;}}`;function xG(e){let t=(0,Z.c)(13),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({ref:r,selected:a,changeCount:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{t:o}=ox(),s;t[5]!==n||t[6]!==o?(s=o(`changes.action.revert-changes-confirm-change`,{count:n}),t[5]=n,t[6]=o,t[7]=s):s=t[7];let c;return t[8]!==r||t[9]!==i||t[10]!==a||t[11]!==s?(c=(0,Q.jsx)(c1e,{icon:wr,selected:a,text:s,mode:`bleed`,ref:r,tooltipProps:null,...i}),t[8]=r,t[9]=i,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function SG(e){let t=(0,Z.c)(17),{open:n,onConfirm:r,onCancel:i,changeCount:a,referenceElement:o}=e,{t:s}=ox(),c;t[0]===s?c=t[1]:(c=s(`changes.action.revert-all-cancel`),t[0]=s,t[1]=c);let l;t[2]!==a||t[3]!==s?(l=a>1?s(`changes.action.revert-all-confirm`):s(`changes.action.revert-changes-confirm-change`,{count:1}),t[2]=a,t[3]=s,t[4]=l):l=t[4];let u;t[5]!==a||t[6]!==s?(u=s(a>1?`changes.action.revert-all-description`:`changes.action.revert-changes-description`,{count:a}),t[5]=a,t[6]=s,t[7]=u):u=t[7];let d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=[`bottom-start`,`bottom-end`,`top`,`top-start`,`top-end`],t[8]=d):d=t[8];let f;return t[9]!==i||t[10]!==r||t[11]!==n||t[12]!==o||t[13]!==c||t[14]!==l||t[15]!==u?(f=(0,Q.jsx)(IVe,{cancelButtonText:c,confirmButtonText:l,message:u,onCancel:i,onConfirm:r,open:n,referenceElement:o,tone:`critical`,placement:`bottom`,fallbackPlacements:d}),t[9]=i,t[10]=r,t[11]=n,t[12]=o,t[13]=c,t[14]=l,t[15]=u,t[16]=f):f=t[16],f}function l1e(e){let t=(0,Z.c)(8),{error:n}=e,{t:r}=ox(),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Q.jsx)(X,{children:(0,Q.jsx)(Y,{children:(0,Q.jsx)(dr,{})})}),t[0]=i):i=t[0];let a;t[1]!==n.actualType||t[2]!==n.expectedType||t[3]!==n.messageKey||t[4]!==r?(a=r(n.messageKey,{expectedType:n.expectedType,actualType:n.actualType}),t[1]=n.actualType,t[2]=n.expectedType,t[3]=n.messageKey,t[4]=r,t[5]=a):a=t[5];let o;return t[6]===a?o=t[7]:(o=(0,Q.jsx)(yt,{tone:`critical`,padding:3,children:(0,Q.jsxs)(bn,{alignItems:`flex-start`,children:[i,(0,Q.jsx)(X,{flexBasis:`0%`,flexGrow:1,paddingLeft:3,children:(0,Q.jsx)(Y,{size:1,as:`p`,children:a})})]})}),t[6]=a,t[7]=o),o}var u1e=e=>{let t=(0,Z.c)(8),{children:n,path:r,hasRevertHover:i,wrap:a}=e,{FieldWrapper:o}=wW(),s=o===void 0?$.Fragment:o;if(a){let e=0;for(let t=0;t<r.length;t++)typeof r[t]!=`string`&&(e=t);let a;t[0]!==e||t[1]!==r?(a=r.slice(0,e+1),t[0]=e,t[1]=r,t[2]=a):a=t[2];let o;return t[3]!==s||t[4]!==n||t[5]!==i||t[6]!==a?(o=(0,Q.jsx)(s,{path:a,hasRevertHover:i,children:n}),t[3]=s,t[4]=n,t[5]=i,t[6]=a,t[7]=o):o=t[7],o}return n};function d1e(e){let t=(0,Z.c)(74),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({change:r,hidden:i,readOnly:a,addParentWrapper:n,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=r.diffComponent||a1e,{documentId:c,schemaType:l,rootDiff:u,isComparingCurrent:d,FieldWrapper:f}=wW(),p=f===void 0?$.Fragment:f,m=oB(c),h=m.status===`ready`,g;t[6]===m?g=t[7]:(g=iB(m),t[6]=m,t[7]=g);let _=g,v=l.name,y;t[8]===m?y=t[9]:(y=aB(m),t[8]=m,t[9]=y);let b=nB(c,v,y),[x,S]=(0,$.useState)(!1),[C,w]=(0,$.useState)(!1),[T,E]=(0,$.useState)(null),D;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>{(0,$.startTransition)(()=>E(e))},t[10]=D):D=t[10];let O=D,{t:k}=ox(),A;t[11]!==c||t[12]!==l.name||t[13]!==_?(A={id:c,type:l.name,ver
Line truncated
|
||||
--size-diff-positive: ${e.sanity.color.solid.positive.enabled.bg};
|
||||
--size-diff-negative: ${e.sanity.color.solid.critical.enabled.bg};
|
||||
`} &:not([hidden]){display:inline-block;}[data-number='positive']{color:var(--size-diff-positive);}[data-number='negative']{color:var(--size-diff-negative);}`,x1e=e=>{let t=(0,Z.c)(53),{diff:n,schemaType:r}=e,{fromValue:i,toValue:a,fields:o}=n,s=i?.asset,c=a?.asset,{t:l}=ox(),u=OG(s?._ref),d=OG(c?._ref),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f={unitDisplay:`short`,maximumFractionDigits:2},t[0]=f):f=t[0];let p=QU(f),m;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(m=[`_type`,`media`],t[1]=m):m=t[1];let h=m,g;t[2]===o?g=t[3]:(g=Object.entries(o).filter(e=>{let[t,n]=e;return n.isChanged&&!h.includes(t)}).map(S1e),t[2]=o,t[3]=g);let _=g,v=_.includes(`asset`),y;if(t[4]!==_||t[5]!==r.fields){let e;t[7]===_?e=t[8]:(e=e=>e.name!==`asset`&&_.includes(e.name),t[7]=_,t[8]=e),y=r.fields.filter(e).map(C1e),t[4]=_,t[5]=r.fields,t[6]=y}else y=t[6];let b=y,x=RQe(u?.size,d?.size),S;t[9]!==p||t[10]!==u?(S=u?.size&&ZU(u.size,p),t[9]=p,t[10]=u,t[11]=S):S=t[11];let C=S,w;t[12]!==p||t[13]!==d?(w=d?.size&&ZU(d.size,p),t[12]=p,t[13]=d,t[14]=w):w=t[14];let T=w,E;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E={display:`block`,flex:1},t[15]=E):E=t[15];let D=E,O;t[16]!==n||t[17]!==u||t[18]!==C||t[19]!==l?(O=u&&(0,Q.jsx)(DW,{as:`del`,diff:n,path:`asset._ref`,style:D,children:(0,Q.jsx)(DG,{title:u.originalFilename||l(`changes.file.meta-info-fallback-title`),icon:tr,children:(0,Q.jsx)(Y,{size:0,style:{color:`inherit`},children:C})})}),t[16]=n,t[17]=u,t[18]=C,t[19]=l,t[20]=O):O=t[20];let k=O,A;t[21]!==n||t[22]!==d||t[23]!==T||t[24]!==x||t[25]!==l?(A=d&&(0,Q.jsx)(DW,{as:`ins`,diff:n,path:`asset._ref`,style:D,children:(0,Q.jsx)(DG,{title:d.originalFilename||l(`changes.file.meta-info-fallback-title`),icon:tr,children:(0,Q.jsxs)(bn,{alignItems:`center`,children:[(0,Q.jsx)(Y,{size:0,style:{color:`inherit`},children:T}),x!==0&&(0,Q.jsx)(yt,{radius:2,padding:1,as:b1e,marginLeft:2,children:(0,Q.jsxs)(Y,{size:0,"data-number":x>0?`positive`:`negative`,children:[x>0?`+`:`-`,x,`%`]})})]})})}),t[21]=n,t[22]=d,t[23]=T,t[24]=x,t[25]=l,t[26]=A):A=t[26];let j=A,M;t[27]!==n||t[28]!==k||t[29]!==l||t[30]!==j?(M=k&&!j&&(0,Q.jsx)(xW,{diff:n,path:`asset._ref`,description:l(`changes.removed-label`),children:k}),t[27]=n,t[28]=k,t[29]=l,t[30]=j,t[31]=M):M=t[31];let N;t[32]!==n||t[33]!==k||t[34]!==j?(N=k&&j&&(0,Q.jsx)(xW,{diff:n,path:`asset._ref`,children:(0,Q.jsx)(kW,{from:k,layout:`grid`,to:j})}),t[32]=n,t[33]=k,t[34]=j,t[35]=N):N=t[35];let P;t[36]!==n||t[37]!==k||t[38]!==l||t[39]!==j?(P=!k&&j&&(0,Q.jsx)(xW,{diff:n,path:`asset._ref`,description:l(`changes.added-label`),children:j}),t[36]=n,t[37]=k,t[38]=l,t[39]=j,t[40]=P):P=t[40];let F;t[41]!==M||t[42]!==N||t[43]!==P?(F=(0,Q.jsxs)(Q.Fragment,{children:[M,N,P]}),t[41]=M,t[42]=N,t[43]=P,t[44]=F):F=t[44];let I=v&&F,L;t[45]!==v||t[46]!==n||t[47]!==b||t[48]!==r?(L=b.length>0&&(0,Q.jsx)(X,{marginTop:v?4:3,children:(0,Q.jsx)(TG,{diff:n,schemaType:r,fields:b})}),t[45]=v,t[46]=n,t[47]=b,t[48]=r,t[49]=L):L=t[49];let R;return t[50]!==I||t[51]!==L?(R=(0,Q.jsxs)(Q.Fragment,{children:[I,L]}),t[50]=I,t[51]=L,t[52]=R):R=t[52],R};function S1e(e){let[t]=e;return t}function C1e(e){return e.name}var w1e={isLoading:!0,value:void 0,error:null};function kG(e,t){let n=(0,Z.c)(4),r;n[0]===t?r=n[1]:(r=t===void 0?w1e:{isLoading:!1,value:t,error:null},n[0]=t,n[1]=r);let i=r,a;return n[2]===e?a=n[3]:(a=e.pipe(T1e()),n[2]=e,n[3]=a),ZE(a,i)}function T1e(){return e=>e.pipe(K(e=>({isLoading:!1,value:e,error:null})),Ge(e=>nt({isLoading:!1,value:void 0,error:e})))}function AG(e){let[t,n]=(0,$.useState)(e);return FN(t,e)?t:(n(e),e)}function E1e(e,t){let n=(0,Z.c)(4),r=kI(),i=AG(t),a;return n[0]!==e||n[1]!==r||n[2]!==i?(a=e?r.observePaths({_type:`reference`,_ref:e},i):nt(void 0),n[0]=e,n[1]=r,n[2]=i,n[3]=a):a=n[3],kG(a)}function jG(e,t){return`rgba(${(/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e)||[]).slice(1).map(e=>parseInt(e,16)).concat(t).join(`, `)})`}function D1e(e){let t=0;if(e.length==0)return t.toString();for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString()}function O1e(){let e=Math.ceil(window.devicePixelRatio||1);return Math.min(3,Math.max(1,e))}function k1e(e){let t=(0,Z.c)(40),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({crop:n,diff:r,hash:i,hotspot:a,width:s,height:c,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=s===void 0?100:s,u=c===void 0?100:c,{t:d}=ox(),f=aW(r,`crop`),p=aW(r,`hotspot`),m=`0 0 ${l} ${u}`,h;t[8]!==n||t[9]!==i||t[10]!==u||t[11]!==a||t[12]!==l?(h=n&&a&&(0,Q.jsxs)(`mask`,{id:`mask-hotspot-${i}`,children:[(0,Q.jsx)(`rect`,{x:0,y:0,width:l,height:u,fill:`#fff`}),(0,Q.jsx)(MG,{hotspot:a,fill:`#000`,offset:1,width:l,height:u,stroke:`#000`,strokeWidth:3})]}),t[8]=n,t[9]=i,t[10]=u,t[11]=a,t[12]=l,t[13]=h):h=t[13];let g;t[14]===h?g=t[15]:(g=(0,Q.jsx)(`defs`,{children:h}),t[14]=h,t[15]=g);let _;t[16]!==n||t[17]!==f||t[18]!==r||t[19]!==i||t[20]!==u||t[21]!==a||t[22]!==d||t[23]!==l?(_=n&&(0,Q.jsx)(xW,{diff:r,path:`Line truncated
|
||||
font-family: ${e.sanity.fonts.code.family};
|
||||
background: ${e.sanity.color.muted.default.enabled.bg};
|
||||
`;default:return``}}}`;function e0e(e){let t=(0,Z.c)(3),{mark:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,Q.jsx)($1e,{decoration:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}var VG=J(yt).withConfig({displayName:`InlineObjectWrapper`,componentId:`sc-b1v4cy-0`})`&:not([hidden]){display:inline;cursor:pointer;white-space:nowrap;align-items:center;&[data-removed]{text-decoration:line-through;}${IG}{display:inline-flex;}}`;function t0e(e){let t=(0,Z.c)(19),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({diff:n,object:r,schemaType:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{t:o}=ox();if(!a){let e;t[5]!==r._type||t[6]!==o?(e=o(`changes.portable-text.unknown-inline-object-schema-type`,{schemaType:r._type}),t[5]=r._type,t[6]=o,t[7]=e):e=t[7];let n;return t[8]!==i||t[9]!==e?(n=(0,Q.jsx)(VG,{...i,border:!0,radius:1,children:e}),t[8]=i,t[9]=e,t[10]=n):n=t[10],n}if(n){let e;return t[11]!==n||t[12]!==r||t[13]!==i||t[14]!==a?(e=(0,Q.jsx)(n0e,{...i,diff:n,object:r,schemaType:a}),t[11]=n,t[12]=r,t[13]=i,t[14]=a,t[15]=e):e=t[15],e}let s;return t[16]!==r||t[17]!==a?(s=(0,Q.jsx)(VG,{children:(0,Q.jsx)($z,{schemaType:a,value:r,layout:`inline`})}),t[16]=r,t[17]=a,t[18]=s):s=t[18],s}function n0e(e){let t=(0,Z.c)(70),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({diff:n,object:r,path:i,schemaType:o,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let{path:s}=(0,$.useContext)(bo),{onSetFocus:c}=(0,$.useContext)(vs),{t:l}=ox(),u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=[],t[6]=u):u=t[6];let d=aW(n,u),f;t[7]===d?f=t[8]:(f=d?{background:d.background,color:d.text}:{},t[7]=d,t[8]=f);let p=f,[m,h]=(0,$.useState)(!1),g;t[9]===r?g=t[10]:(g=r&&JW(r),t[9]=r,t[10]=g);let _=g,v=n.action===`removed`,y,b;if(t[11]!==s||t[12]!==r||t[13]!==i){let e;t[16]===r?e=t[17]:(e=e=>dc(e)&&e._key===r._key,t[16]=r,t[17]=e),y=s.slice(0,s.findIndex(e)).concat(i),b=fN(y),t[11]=s,t[12]=r,t[13]=i,t[14]=y,t[15]=b}else y=t[14],b=t[15];let x=`field-${b}`,S=yH(),C;if(t[18]!==x||t[19]!==S){let e;t[21]===x?e=t[22]:(e=e=>{let[t]=e;return t.startsWith(x)},t[21]=x,t[22]=e),C=S.filter(e),t[18]=x,t[19]=S,t[20]=C}else C=t[20];let w=C.length>0,T;t[23]!==s||t[24]!==i?(T=s.slice(0,-1).concat(i).concat([`$`]),t[23]=s,t[24]=i,t[25]=T):T=t[25];let E=T,D,O;t[26]!==E||t[27]!==w||t[28]!==c?(D=()=>{w&&(h(!0),c(E))},O=[E,w,c],t[26]=E,t[27]=w,t[28]=c,t[29]=D,t[30]=O):(D=t[29],O=t[30]),(0,$.useEffect)(D,O);let k;t[31]!==E||t[32]!==v||t[33]!==c?(k=e=>{if(e.stopPropagation(),h(!0),!v){c(E);return}e.preventDefault()},t[31]=E,t[32]=v,t[33]=c,t[34]=k):k=t[34];let A=k,j;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>{h(!1)},t[35]=j):j=t[35];let M=j,N;t[36]===y?N=t[37]:(N={path:y},t[36]=y,t[37]=N);let P=N,F;t[38]!==n||t[39]!==_||t[40]!==o?(F=(0,Q.jsx)(r0e,{diff:n,emptyObject:_,onClose:M,schemaType:o}),t[38]=n,t[39]=_,t[40]=o,t[41]=F):F=t[41];let I;t[42]!==F||t[43]!==P?(I=(0,Q.jsx)(bo.Provider,{value:P,children:F}),t[42]=F,t[43]=P,t[44]=I):I=t[44];let L=I,R=n.action!==`unchanged`&&n.annotation||null,z;t[45]===R?z=t[46]:(z=R?[R]:[],t[45]=R,t[46]=z);let B=z,V=n.action===`removed`?``:void 0,H;t[47]!==n.action||t[48]!==l?(H=l(`changes.portable-text.inline-object`,{context:n.action}),t[47]=n.action,t[48]=l,t[49]=H):H=t[49];let U;t[50]!==r||t[51]!==o?(U=(0,Q.jsx)($z,{schemaType:o,value:r,layout:`inline`}),t[50]=r,t[51]=o,t[52]=U):U=t[52];let W;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(bn,{alignItems:`center`,paddingX:1,children:(0,Q.jsx)(LG,{size:0,children:(0,Q.jsx)(Zn,{})})}),t[53]=W):W=t[53];let ee;t[54]===U?ee=t[55]:(ee=(0,Q.jsxs)(IG,{children:[U,W]}),t[54]=U,t[55]=ee);let te;t[56]!==B||t[57]!==H||t[58]!==ee?(te=(0,Q.jsx)(RG,{children:(0,Q.jsx)(xW,{annotations:B,description:H,children:ee})}),t[56]=B,t[57]=H,t[58]=ee,t[59]=te):te=t[59];let ne;t[60]!==m||t[61]!==L||t[62]!==te?(ne=(0,Q.jsx)(gR,{content:L,open:m,portal:!0,children:te}),t[60]=m,t[61]=L,t[62]=te,t[63]=ne):ne=t[63];let re;return t[64]!==A||t[65]!==a||t[66]!==p||t[67]!==V||t[68]!==ne?(re=(0,Q.jsx)(VG,{...a,onClick:A,style:p,"data-removed":V,border:!0,radius:2,children:ne}),t[64]=A,t[65]=a,t[66]=p,t[67]=V,t[68]=ne,t[69]=re):re=t[69],re}function r0e(e){let t=(0,Z.c)(12),{diff:n,emptyObject:r,onClose:i,schemaType:a}=e,{t:o}=ox(),s=(0,$.useRef)(null),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>[s.current],t[0]=c):c=t[0],tn(i,c);let l;t[1]!==r||t[2]!==a||t[3]!==o?(l=r&&(0,Q.jsx)(Y,{muted:!0,size:1,weight:`medium`,children:o(`changes.portable-text.empty-inline-object`,{inlineObjectType:a.title||a.name})}),t[1]=r,t[2]=a,t[3]=o,t[4]=l):l=t[4];let u;t[5]!==n||t[6]!==r||t[7]!==a?(u=!r&&(0,Q.jsx)(TG,{diff:n,schemaType:a}),t[5]=n,t[6]=r,t[7]=a,t[8]=u):u=t[8];let d;return t[9]!==l||t[10]!==u?(d=(0,Q.jsxs)(zG,{ref:s,padding:3,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function i0e(e){let t=(0,Z.c)(16),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({diff:i,childDiff:n,children:r,path:a,segment:s,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[Line truncated
|
||||
`)return(0,Q.jsx)(`br`,{});let s=(0,Q.jsx)(`span`,{children:r.text.replace(/ /g,` `)},`text-${i}`),c=t&&qW(e.origin,t),l=hc(t)&&t.marks||[];return c&&(s=d0e({activeMarks:l,decoratorTypes:n,diff:e,children:s,seg:r,segIndex:i,spanDiff:c,spanSchemaType:a,t:o})),l&&l.length>0&&l.forEach(e=>{WW(e,a)&&(s=(0,Q.jsx)(e0e,{mark:e,children:s},`decorator-${e}-${t._key}-${i}`))}),s}function d0e({activeMarks:e,decoratorTypes:t,diff:n,children:r,seg:i,segIndex:a,spanDiff:o,spanSchemaType:s,t:c}){let l=(0,Q.jsx)(`span`,{children:r},`text-segment-${a}`),u=n.origin.fromValue&&n.fromValue&&n.fromValue.children[0].text||``,d=o&&o.action!==`unchanged`&&o.annotation||void 0,f=o?.fields?.marks,p=f&&f.action!==`unchanged`&&f.annotation||d,m=[],h=u.split(``).filter(e=>!!e).join(``),g=h.slice(0,Math.max(0,h.indexOf(i.text)+i.text.length)),_=g.slice(0,Math.max(0,g.indexOf(i.text))),v=[];return[..._.matchAll(c0e)].forEach(e=>{let n=e[0],r=IW.concat(FW).find(e=>e.indexOf(n)>-1);if(r){let e=t[n===r[0]?HG.indexOf(n):UG.indexOf(n)]?.value||n;_.lastIndexOf(n)>_.lastIndexOf(r[1])&&v.push(e)}}),m=nQe(e,bO(v)),p&&m.length>0&&m.some(e=>WW(e,s))&&(l=(0,Q.jsx)(DW,{annotation:p,as:`ins`,tooltip:{description:c(`changes.portable-text.changed-formatting`)},children:l},`diffcard-annotation-${a}-${m.join(`-`)}`)),l}function f0e(e,t){return e.children.length===1&&e.children[0]._type===`span`&&typeof e.children[0].text==`string`&&e.children[0].text===``&&t.origin.action!==`unchanged`}function p0e({block:e,diff:t,inlineObjects:n,schemaType:r,t:i}){return a=>{let o=HW(r.fields,a),s=[];if(o){s=UW(o);let a=t.fields.children,c=a.items[0].diff&&a.items[0].diff.type===`object`&&a.items[0].diff.fields.text.type===`string`&&a.items[0].diff.fields.text.segments||[],l=[],u={};if(f0e(e,t)&&(t.origin.action===`added`||t.origin.action===`removed`)){let n=VW(t.origin,e.children[0])||t.origin;if(n&&n.action!==`unchanged`)return(0,Q.jsx)(DW,{annotation:n.annotation,as:n.action===`removed`?`del`:`ins`,tooltip:{description:i(`changes.portable-text.empty-text`,{context:n.action})},children:(0,Q.jsx)(`span`,{children:`↲`})},`empty-block-${e._key}`)}let d=-1,f=-1,p=[],m,h=YW(t.origin);return c.forEach(a=>{f++;let c=LW.includes(a.text),g=o0e.includes(a.text),_=KG.includes(a.text),v=a.text===``,y=a.action===`removed`;if(v)y||d++;else if(g||_){if(g&&WG.includes(a.text)){let e=h[WG.indexOf(a.text)];e&&p.push({mark:e._key,symbols:[a.text,GG[WG.indexOf(a.text)]],object:e})}_&&GG.includes(a.text)&&(m=p.pop())}else if(c){let i=LW.findIndex(e=>e===a.text),o=n[i]?._key,s=n[i];if(o){let n=HW(r.fields,s),i=VW(t.origin,s);l.push((0,Q.jsx)(t0e,{object:s,path:[{_key:e._key},`children`,{_key:s._key}],diff:i,schemaType:n},`inline-object-${s._key}`))}}else if(a.text){let n=e.children[d]||t.origin.fromValue?.children.find(e=>e.text&&e.text.match(D$e(a.text))),r=n&&qW(t.origin,n);if(!n)throw Error(`Could not find child`);let c=r?.fields?.text?r?.fields?.text:void 0,h=(0,Q.jsx)(i0e,{diff:c,path:[{_key:e._key},`children`,{_key:n._key}],childDiff:r,segment:a,children:u0e({diff:t,child:n,decoratorTypes:s,seg:a,segIndex:f,spanSchemaType:o,t:i})},`text-${n._key}-${f}`);if(p.length>0&&p.forEach(e=>{u[e.mark]=u[e.mark]||[],u[e.mark].push(h)}),m){let r=`annotation-${m.object._key}`,i=l[l.length-1];if(i&&i.key!==r){let i=E$e(t.origin,m.mark),a=m&&o.annotations&&o.annotations.find(e=>m&&m.object&&e.name===m.object._type);l.push((0,Q.jsx)(H1e,{object:m.object,diff:i,path:[{_key:e._key},`children`,{_key:n._key}],schemaType:a,children:(0,Q.jsx)(Q.Fragment,{children:u[m.mark]})},r))}m=void 0}p.length===0&&l.push(h)}}),(0,Q.jsx)(`div`,{children:l},e._key)}throw Error(`'span' schemaType not found`)}}var m0e=e=>{let t=(0,Z.c)(9),{diff:n,schemaType:r}=e,i;t[0]!==n||t[1]!==r?(i=w$e(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i,o;t[3]!==a||t[4]!==r?(o=(0,Q.jsx)(l0e,{diff:a,schemaType:r}),t[3]=a,t[4]=r,t[5]=o):o=t[5];let s;return t[6]!==n.action||t[7]!==o?(s=(0,Q.jsx)(`div`,{"data-diff-action":n.action,children:o}),t[6]=n.action,t[7]=o,t[8]=s):s=t[8],s},h0e=`_7mdu8n0`,g0e=e=>{let t=(0,Z.c)(3),{value:n,schemaType:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,Q.jsx)(X,{className:h0e,padding:2,children:(0,Q.jsx)($z,{schemaType:r,value:n,layout:`default`})}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},qG=e=>{let t=(0,Z.c)(3),{diff:n,schemaType:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(jW,{align:`center`,diff:n,layout:`grid`,path:`_ref`,previewComponent:g0e,schemaType:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},_0e=`_1qiqcip0`,v0e=e=>{let t=(0,Z.c)(2),{value:n}=e,r;return t[0]===n.current?r=t[1]:(r=(0,Q.jsx)(X,{className:_0e,paddingX:2,paddingY:1,children:n.current}),t[0]=n.current,t[1]=r),r},y0e=e=>{let t=(0,Z.c)(3),{diff:n,schemaType:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(jW,{layout:`inline`,diff:n,schemaType:r,previewComponent:v0e}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},JG=J.span.withConfig({displayName:`RoundedCard`,componentId:`sc-00k5if-0`})`border-radius:${({theme:e})=>qt(e.sanity.radius[1])};`,YG=J(Y).withConfig({displayName:`CLine truncated
|
||||
`)}});if(l!==void 0)return a(l)}},{deserialize(e){if(pX(e)&&MX(e)&&NX(e)&&FX(e)&&i)return IX(e,`previous`)&&IX(e,`next`)?[]:void 0}},{deserialize(t,n){if(pX(t)&&sX(t)===`span`&&MX(t)){if(!t.textContent)return!t.previousSibling&&!t.nextSibling&&t.setAttribute(`data-lonely-child`,`true`),n(t.childNodes);let r={...nX,marks:[],text:t.textContent};return L6e(t)&&r.marks.push(`strong`),R6e(t)&&r.marks.push(`underline`),z6e(t)&&r.marks.push(`strike-through`),I6e(t)&&r.marks.push(`em`),fX(t)&&e.decorators.some(e=>e.name===`code`)&&r.marks.push(`code`),r}}},{deserialize(t,n){if(sX(t)===`li`&&MX(t))return{...tX,listItem:B6e(t),level:V6e(t),style:U6e(e,t),children:n(t.firstChild?.childNodes||[])}}},{deserialize(e){if(sX(e)===`br`&&MX(e)&&pX(e)&&Array.from(e.classList).some(e=>e.toLowerCase()===`apple-interchange-newline`))return[];if(sX(e)===`br`&&MX(e)&&pX(e)&&e?.parentNode?.textContent===``||sX(e)===`br`&&MX(e)&&pX(e)&&NX(e))return{...nX,text:``}}}]}var G6e={deserialize(e){return e.nodeName===`#text`&&K6e(e)?{...nX,marks:[],text:(e.textContent??``).replace(/\s\s+/g,` `)}:void 0}};function K6e(e){let t=e.nodeType===3&&(e.textContent||``).replace(/[\r\n]/g,` `).replace(/\s\s+/g,` `)===` `,n=e.nextSibling&&e.nextSibling.nodeType!==3&&e.previousSibling&&e.previousSibling.nodeType!==3,r=e.parentNode&&sX(e.parentNode)===`span`&&!e.nextSibling&&!e.previousSibling&&e.parentNode.previousSibling&&e.parentNode.previousSibling.nodeType!==3&&e.parentNode.nextSibling&&e.parentNode.nextSibling.nodeType!==3;return(t&&(n||r)||e.textContent!==` `)&&sX(e.parentNode)!==`body`}function q6e(e,t){if(t===`ul`&&e.lists.some(e=>e.name===`bullet`))return`bullet`;if(t===`ol`&&e.lists.some(e=>e.name===`number`))return`number`}function J6e(e,t){return[G6e,{deserialize(n,r,i){if(sX(n)!==`pre`)return;let a=n.textContent||``,o=t.matchers?.code?.({context:{schema:e,keyGenerator:t.keyGenerator??mX},props:{language:void 0,code:a.trim()}});if(o!==void 0)return i(o);let s=e.decorators.some(e=>e.name===`code`);return{_type:`block`,style:`normal`,markDefs:[],children:[{...nX,marks:s?[`code`]:[],text:a}]}}},{deserialize(e,t){if(sX(e)!==`blockquote`)return;let n={...rX,...aX};delete n.blockquote;let r=Object.keys(n),i=[];return e.childNodes.forEach((t,n)=>{if(e.ownerDocument){if(t.nodeType===1&&r.includes(t.localName.toLowerCase())){let r=e.ownerDocument.createElement(`span`),a=i[i.length-1];a&&a.nodeType===3&&a.textContent?.trim()&&r.appendChild(e.ownerDocument.createTextNode(`\r`)),t.childNodes.forEach(e=>{r.appendChild(e.cloneNode(!0))}),n!==e.childNodes.length&&r.appendChild(e.ownerDocument.createTextNode(`\r`)),i.push(r)}else i.push(t)}}),{_type:`block`,style:`blockquote`,markDefs:[],children:t(i)}}},{deserialize(t,n){let r={...rX,...aX},i=sX(t),a=i?r[i]:void 0;if(!a)return;if(t.parentNode&&sX(t.parentNode)===`li`)return n(t.childNodes);let o=a.style;return e.styles.some(e=>e.name===o)||(a=tX),{...a,children:n(t.childNodes)}}},{deserialize(e,t){let n=sX(e);if(n&&n in L3e)return t(e.childNodes)}},{deserialize(e,t){if(sX(e)===`div`)return t(e.childNodes)}},{deserialize(e,t){let n=sX(e);if(n&&n in iX)return t(e.childNodes)}},{deserialize(e){if(sX(e)===`br`)return{...nX,text:`
|
||||
`}}},{deserialize(t,n,r){let i=sX(t),a=i?z3e[i]:void 0;if(!a)return;let o=sX(t.parentNode)||``,s=q6e(e,iX[o]?o:`ul`);return s?(a.listItem=s,{...a,children:n(t.childNodes)}):r({_type:`block`,children:n(t.childNodes)})}},{deserialize(t,n){let r=R3e[sX(t)||``];if(r&&e.decorators.some(e=>e.name===r))return{_type:`__decorator`,name:r,children:n(t.childNodes)}}},{deserialize(n,r){if(sX(n)!==`a`)return;let i=e.annotations.some(e=>e.name===`link`),a=pX(n)&&n.getAttribute(`href`);return a?i?{_type:`__annotation`,markDef:{_key:t.keyGenerator?t.keyGenerator():mX(),_type:`link`,href:a},children:r(n.childNodes)}:n.appendChild(n.ownerDocument.createTextNode(` (${a})`))&&r(n.childNodes):r(n.childNodes)}},{deserialize(e,t){if(pX(e)&&(sX(e)===`td`||sX(e)===`th`))return{...tX,children:t(e.childNodes)}}},{deserialize(n){if(pX(n)&&sX(n)===`img`){let r=n.getAttribute(`src`)??void 0,i=n.getAttribute(`alt`)??void 0,a=Object.fromEntries(Array.from(n.attributes).map(e=>[e.name,e.value])),o=n?.parentElement?.parentElement?.getAttribute(`data-lonely-child`),s=n.closest(`li`)!==null;if(o&&!s){let n=t.matchers?.image?.({context:{schema:e,keyGenerator:t.keyGenerator??mX},props:{...a,...r?{src:r}:{},...i?{alt:i}:{}}});if(n)return{_type:`__block`,block:n}}let c=t.matchers?.inlineImage?.({context:{schema:e,keyGenerator:t.keyGenerator??mX},props:{...a,...r?{src:r}:{},...i?{alt:i}:{}}});if(c)return c;let l=t.matchers?.image?.({context:{schema:e,keyGenerator:t.keyGenerator??mX},props:{...a,...r?{src:r}:{},...i?{alt:i}:{}}});if(l)return{_type:`__block`,block:l}}}}]}function Y6e(e){let t=pX(e)&&e.getAttribute(`style`);return/font-style:italic/.test(t||``)}function X6e(e){let t=pX(e)&&e.getAttribute(`style`);return/font-weight:700/.test(t||``)||/font-weight:600/.test(t||``)}function Z6e(e){let t=pX(e)&&e.getAttribute(`style`);return/text-decoration:underline/.test(t||``)}function Q6e(e){return pX(e)&&!!e.getAttribute(`data-is-notion`)}function $6e(){return[{deserialize(e){if(pX(e)&&sX(e)===`span`&&Q6e(e)){let t={...nX,marks:[],text:e.textContent};return X6e(e)&&t.marks.push(`strong`),Z6e(e)&&t.marks.push(`underline`),Y6e(e)&&t.marks.push(`em`),t}}}]}function e8e(e){if(!pX(e))return{};let t=e.closest(`body`)||e.ownerDocument?.body;if(!t)return{};let n=t.getAttribute(`data-word-list-styles`);if(!n)return{};try{return JSON.parse(n)}catch{return{}}}function t8e(e){let t=pX(e)&&e.getAttribute(`style`);if(!t)return;let n=t.match(/mso-list:\s*(l\d+)\s+(level\d+)\s+lfo\d+/);if(!n)return;let r=`${n[1]}:${n[2]}`;return e8e(e)[r]||`bullet`}function n8e(e){let t=pX(e)&&e.getAttribute(`style`);if(!t)return;let n=t.match(/level\d+/);if(!n)return;let[r]=n[0].match(/\d/)||[];return(r?Number.parseInt(r,10):1)||1}function r8e(e){if(!pX(e))return!1;if(e.className&&(e.className===`MsoListParagraphCxSpFirst`||e.className===`MsoListParagraphCxSpMiddle`||e.className===`MsoListParagraphCxSpLast`))return!0;let t=e.getAttribute(`style`);return!!(t&&/mso-list:\s*l\d+\s+level\d+\s+lfo\d+/.test(t))}function i8e(e){let t=sX(e);if(t&&aX[t])return aX[t]?.style}function a8e(){return[{deserialize(e,t){let n=sX(e);if((n===`p`||aX[n||``])&&r8e(e)){let n=i8e(e);return{...tX,listItem:t8e(e),level:n8e(e),style:n||`normal`,children:t(e.childNodes)}}}}]}function o8e(e,t){return[...a8e(),...F6e(e,t),...$6e(),...W6e(e,t),...J6e(e,t)]}function s8e(e,t,n){let r=[],i=0;for(let a of n){let n=oq(e,a)?c8e(a):a;if(t===`preserve`){r.push(n);continue}if(t===`remove`){if(LX(e,n))continue;r.push(n);continue}if(t===`normalize`){if(LX(e,n)){i++,i===1&&r.push(n);continue}r.push(n),i=0}}return r}function LX(e,t){return!(!oq(e,t)||t.children.some(t=>!sq(e,t)||t.text.trim()!==``))}function c8e(e){let t=0;for(let n of e.children){if(!cX(n)){t++;continue}let r=l8e(e,t),i=u8e(e,t);t===0&&(n.text=n.text.replace(/^[^\S\n]+/g,``)),t===e.children.length-1&&(n.text=n.text.replace(/[^\S\n]+$/g,``)),/\s/.test(n.text.slice(Math.max(0,n.text.length-1)))&&r&&cX(r)&&/\s/.test(r.text.slice(0,1))&&(n.text=n.text.replace(/[^\S\n]+$/g,``)),/\s/.test(n.text.slice(0,1))&&i&&cX(i)&&/\s/.test(i.text.slice(Math.max(0,i.text.length-1)))&&(n.text=n.text.replace(/^[^\S\n]+/g,``)),n.text||e.children.splice(t,1),i&&Array.isArray(i.marks)&&ZY(i.marks,n.marks)&&RX(n.text)?(i.text+=` `,e.children.splice(t,1)):r&&Array.isArray(r.marks)&&ZY(r.marks,n.marks)&&RX(n.text)&&(r.text=` ${r.text}`,e.children.splice(t,1)),t++}return e}function l8e(e,t){let n=e.children[t+1];return n&&n._type===`span`?n:null}function u8e(e,t){let n=e.children[t-1];return n&&n._type===`span`?n:null}function RX(e){return[`\xA0`,` `].includes(e)}function zX(e){"@babel/helpers - typeof";return zX=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zX(e)}function d8e(e,t){if(zX(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(zX(r)!=`object`)return r;throw TypeError(`Line truncated
|
||||
`,(t===0||t===o.children.length-1)&&o.children.splice(t,1))});break}}return r||t(e.childNodes)||[]}),BX(this,`deserializeDecorator`,e=>{let{name:t}=e,n=e=>{if(uX(e))return this.deserializeDecorator(e);if(cX(e))e.marks=e.marks||[],e.text.trim()&&e.marks.unshift(t);else if(`children`in e&&Array.isArray(e.children)){let t=e;t.children=t.children.map(n)}return e};return e.children.reduce((e,t)=>{let r=n(t);return Array.isArray(r)?e.concat(r):(e.push(r),e)},[])}),BX(this,`deserializeAnnotation`,e=>{let{markDef:t}=e;this._markDefs.push(t);let n=e=>{if(dX(e))return this.deserializeAnnotation(e);if(cX(e))e.marks=e.marks||[],e.text.trim()&&e.marks.unshift(t._key);else if(`children`in e&&Array.isArray(e.children)){let t=e;t.children=t.children.map(n)}return e};return e.children.reduce((e,t)=>{let r=n(t);return Array.isArray(r)?e.concat(r):(e.push(r),e)},[])});let{rules:n=[],whitespaceMode:r=`preserve`}=t,i=o8e(e,{keyGenerator:t.keyGenerator,matchers:t.matchers});this.schema=e,this.keyGenerator=t.keyGenerator??mX,this.rules=[...n,...i],this.whitespaceMode=r;let a=t.parseHtml||V3e();this.parseHtml=e=>{let t=Q3e(e),n=a(t);for(let e of P6e)e(t,n);return n.body}}};function m8e(e){return({context:t,value:n,isInline:r})=>{let i=(r?t.schema.inlineObjects:t.schema.blockObjects).find(t=>t.name===e.name);if(!i)return;let a=i.fields.reduce((e,t)=>{let r=n[t.name];return r!==void 0&&(e[t.name]=r),e},{});return{_key:t.keyGenerator(),_type:i.name,...a}}}var h8e=({context:e,value:t,isInline:n})=>{let r=m8e(yX)({context:e,value:t,isInline:n});if(r&&`code`in r)return r};function VX(e,t={}){let n=t.schema??m6e,r=t.keyGenerator,i=g8e(t.types);return new p8e(n,{keyGenerator:r,rules:t.rules,parseHtml:t.parseHtml,whitespaceMode:t.whitespaceMode,matchers:i}).deserialize(e).map(e=>J3e(e,{keyGenerator:r}))}function g8e(e){let t=e?.image,n=e?.code??h8e;if(!t&&!n)return;let r={};if(t){let e=e=>({context:n,props:r})=>{let i=t({context:n,value:r,isInline:e});if(i)return i};r.image=e(!1),r.inlineImage=e(!0)}return n&&(r.code=({context:e,props:t})=>{let r=n({context:e,value:t,isInline:!1});if(r)return r}),r}var _8e=[`http`,`https`,`mailto`,`tel`],v8e={"&":`amp`,"<":`lt`,">":`gt`,'"':`quot`,"'":`#x27`};function HX(e){return y8e(UX(e))}function UX(e){return e.replace(/[&<>"']/g,e=>`&${v8e[e]};`)}function y8e(e){return e.replace(/ {2,}/g,e=>`${` `.repeat(e.length-1)} `)}function b8e(e){let t=(e||``).trim(),n=t.charAt(0);if(n===`#`||n===`/`)return!0;let r=t.indexOf(`:`);if(r===-1)return!0;let i=t.slice(0,r).toLowerCase();if(_8e.indexOf(i)!==-1)return!0;let a=t.indexOf(`?`);if(a!==-1&&r>a)return!0;let o=t.indexOf(`#`);return o!==-1&&r>o}var x8e={number:({children:e})=>`<ol>${e}</ol>`,bullet:({children:e})=>`<ul>${e}</ul>`},S8e=({children:e})=>`<li>${e}</li>`,C8e={em:({children:e})=>`<em>${e}</em>`,strong:({children:e})=>`<strong>${e}</strong>`,code:({children:e})=>`<code>${e}</code>`,underline:({children:e})=>`<span style="text-decoration:underline">${e}</span>`,"strike-through":({children:e})=>`<del>${e}</del>`,link:({children:e,value:t})=>{let n=t?.href||``;return b8e(n)?`<a href="${HX(n)}">${e}</a>`:e}},WX=(e,t)=>`Unknown ${e}, specify a component for it in the \`components.${t}\` option`,GX=e=>WX(`block type "${e}"`,`types`),w8e=e=>WX(`mark type "${e}"`,`marks`),T8e=e=>WX(`block style "${e}"`,`block`),E8e=e=>WX(`list style "${e}"`,`list`),D8e=e=>WX(`list item style "${e}"`,`listItem`);function O8e(e){console.warn(e)}var KX={types:{},block:{normal:({children:e})=>`<p>${e}</p>`,blockquote:({children:e})=>`<blockquote>${e}</blockquote>`,h1:({children:e})=>`<h1>${e}</h1>`,h2:({children:e})=>`<h2>${e}</h2>`,h3:({children:e})=>`<h3>${e}</h3>`,h4:({children:e})=>`<h4>${e}</h4>`,h5:({children:e})=>`<h5>${e}</h5>`,h6:({children:e})=>`<h6>${e}</h6>`},marks:C8e,list:x8e,listItem:S8e,hardBreak:()=>`<br/>`,escapeHTML:HX,unknownType:({value:e,isInline:t})=>{let n=UX(GX(e._type));return t?`<span style="display:none">${n}</span>`:`<div style="display:none">${n}</div>`},unknownMark:({markType:e,children:t})=>`<span class="unknown__pt__mark__${UX(e)}">${t}</span>`,unknownList:({children:e})=>`<ul>${e}</ul>`,unknownListItem:({children:e})=>`<li>${e}</li>`,unknownBlockStyle:({children:e})=>`<p>${e}</p>`};function k8e(e,t){let{block:n,list:r,listItem:i,marks:a,types:o,...s}=t;return{...e,block:qX(e,t,`block`),list:qX(e,t,`list`),listItem:qX(e,t,`listItem`),marks:qX(e,t,`marks`),types:qX(e,t,`types`),...s}}function qX(e,t,n){let r=t[n],i=e[n];return typeof r==`function`?r:r?typeof i==`function`?r:{...i,...r}:i}function JX(e,t={}){let{components:n,onMissingComponent:r=O8e}=t,i=r||j8e,a=IEe(Array.isArray(e)?e:[e],`html`),o=A8e(n?k8e(KX,n):KX,i);return a.map((e,t)=>o({node:e,index:t,isInline:!1,renderNode:o})).join(``)}var A8e=(e,t)=>{function n(e){let{node:t,index:n,isInline:l}=e;return XO(t)?i(t,n):YO(t)?r(t,n):ZO(t)?a(t):JO(t)?o(t,n,l):QO(t)?s(t):c(t,n,l)}function r(r,i){let a=YX({node:r,index:i,isInline:!1,renderNode:n}),o=e.listItem,s=(typeof o==`function`?o:o[r.Line truncated
|
||||
`){let t=e.hardBreak;return t?t():`
|
||||
`}return e.escapeHTML(t.text)}function c(r,i,a){let o=e.types[r._type];return o||t(GX(r._type),{nodeType:`block`,type:r._type}),(o||e.unknownType)({value:r,isInline:a,index:i,renderNode:n})}return n};function YX(e){let{node:t,index:n,isInline:r,renderNode:i}=e,a=FEe(t).map((e,t)=>i({node:e,isInline:!0,index:t,renderNode:i}));return{_key:t._key||`block-${n}`,children:a.join(``),index:n,isInline:r,node:t}}function j8e(){}var XX=`before`,ZX=`after`;function M8e(e,t,n,...r){if(t!==XX&&t!==ZX)throw Error(`Invalid position "${t}", must be either ${XX} or ${ZX}`);let i=QX(...r);if(e.length===0)return i;let a=e.length,o=Math.abs((a+n)%a)%a,s=t===`after`?o+1:o,c=e.slice();return c.splice(s,0,...QX(i)),c}function QX(...e){return e.reduce((e,t)=>e.concat(t),[])}function N8e(e){return typeof e==`object`&&!!e&&`_key`in e}function P8e(e,t){if(typeof t==`number`)return t;if(N8e(t)){let n=e.findIndex(e=>e._key===t._key);return n!==-1&&n}return!1}function F8e(e,t){let n=e.slice();if(t.path.length===0){if(t.type===`setIfMissing`){if(!Array.isArray(t.value))throw Error(`Cannot set value of an array to a non-array`);return e===void 0?t.value:e}if(t.type===`set`){if(!Array.isArray(t.value))throw Error(`Cannot set value of an array to a non-array`);return t.value}if(t.type===`unset`)return;throw Error(`Invalid array operation: ${t.type}`)}let[r,...i]=t.path,a=P8e(e,r);if(a===!1)return n;if(i.length===0){if(t.type===`insert`){let{position:n,items:r}=t;return M8e(e,n,a,r)}if(t.type===`unset`){if(typeof a!=`number`)throw Error(`Expected array index to be a number, instead got "${a}"`);return n.splice(a,1),n}}return n[a]=eZ(n[a],{...t,path:i}),n}function I8e(e,t){if(t.path.length>0)throw Error(`Cannot apply deep operations on primitive values. Received patch with type "${t.type}" and path "${t.path.map(e=>JSON.stringify(e)).join(`.`)} that targeted the value "${JSON.stringify(e)}"`);if(t.type===`set`)return t.value;if(t.type===`setIfMissing`)return e===void 0?t.value:e;if(t.type!==`unset`){if(t.type===`inc`){if(typeof t.value!=`number`)throw Error(`Cannot increment with a non-number`);return e+t.value}if(t.type===`dec`){if(typeof t.value!=`number`)throw Error(`Cannot decrement with a non-number`);return e-t.value}throw Error(`Received patch of unsupported type: "${JSON.stringify(t.type)}" for number. This is most likely a bug.`)}}function L8e(e,t){let n={...e};if(t.path.length===0){if(t.type===`set`){if(typeof t.value==`object`&&t.value!==null&&!Array.isArray(t.value))return t.value;throw Error(`Cannot set value of an object to a non-object`)}if(t.type===`setIfMissing`){if(typeof t.value==`object`&&t.value!==null&&!Array.isArray(t.value))return e;throw Error(`Cannot setIfMissing value of an object to a non-object`)}if(t.type===`unset`)return;throw Error(`Invalid object operation: ${t.type}`)}let[r,...i]=t.path;if(typeof r!=`string`)throw Error(`Expected field name to be a string, instead got: ${r}`);if(i.length===0&&t.type===`unset`){let{[r]:e,...t}=n;return t}return!(r in n)&&i.length>0||(n[r]=eZ(n[r],{...t,path:i})),n}function R8e(e,t){if(t.path.length>0)throw Error(`Cannot apply deep operations on primitive values. Received patch with type "${t.type}" and path "${t.path.map(e=>JSON.stringify(e)).join(`.`)} that targeted the value "${JSON.stringify(e)}"`);if(t.type===`set`)return t.value;if(t.type===`setIfMissing`)return e===void 0?t.value:e;if(t.type!==`unset`)throw Error(`Received patch of unsupported type: "${JSON.stringify(t.type)}" for primitives. This is most likely a bug.`)}function z8e(e,t){if(t.path.length>0)throw Error(`Cannot apply deep operations on string values. Received patch with type "${t.type}" and path "${t.path.join(`.`)} that targeted the value "${JSON.stringify(e)}"`);if(t.type===`diffMatchPatch`){let[n]=sg(dg(t.value),e,{allowExceedingIndices:!0});return n}if(t.type===`setIfMissing`)return e===void 0?t.value:e;if(t.type===`set`)return t.value;if(t.type!==`unset`)throw Error(`Received patch of unsupported type: "${JSON.stringify(t.type)}" for string. This is most likely a bug.`)}function $X(e,t){return t.reduce(eZ,e)}function eZ(e,t){return Array.isArray(e)?F8e(e,t):typeof e==`string`?z8e(e,t):B8e(e)?L8e(e,t):typeof e==`number`?I8e(e,t):R8e(e,t)}function B8e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function tZ(e,t=[]){return{type:`setIfMissing`,path:t,value:e}}function V8e(e,t,n=[]){return{type:`diffMatchPatch`,path:n,value:pg(lg(e,t))}}function nZ(e,t,n=[]){return{type:`insert`,path:n,position:t,items:e}}function rZ(e,t=[]){return{type:`set`,path:t,value:e}}function iZ(e=[]){return{type:`unset`,path:e}}function aZ(e,t){let n=e.domElement;if(!n)return;if(t.length===0)return n;let r=lq(t),i=`[data-pt-path="${CSS.escape(r)}"]`,a=t[0];if(cq(a)){let t=e.blockIndexMap.get(lq([a]));if(t!==void 0){let e=n.children[t];if(e instanceof HTMLElement){if(e.matches(i))return e.closest(`[data-pt-editor]`)===n?e:void 0;let t=e.querySelector(i);if(t instanceof HTMLElement)return t.closest(`[data-pt-editor]`)===n?
Line truncated
|
||||
|
||||
`))&&u--}if(kZ&&!l&&!r){let n=c.hasAttribute(`data-pt-block`)||c.getAttribute(`data-pt-inline`)===`span`?c:c.closest(`[data-pt-block], [data-pt-inline="span"]`);if(n&&IZ.hasDOMNode(e,n,{editable:!0})){let r=_Z(n);if(!r){if(i)return null;throw Error(`Cannot map DOM position to an editor location: ${t}`)}let a=TZ(e,r),{path:o}=a,{offset:c}=a;return n.querySelector(`[data-pt-marks]`)||(c=s),{path:o,offset:c}}}if(!l&&c){if(o instanceof HTMLElement&&o.getAttribute(`data-pt-block`)===`container`){let t=o.childNodes[s];if(t instanceof HTMLElement&&IZ.hasDOMNode(e,t)){let e=t.closest(`[data-pt-block="object"], [data-pt-inline="object"]`);if(e){let t=_Z(e);if(t)return{path:t,offset:0}}}}let t=c.closest(`[data-pt-block]`)??(c.hasAttribute(`data-pt-block`)?c:null);if(t&&IZ.hasDOMNode(e,t)){let e=t.closest(`[data-pt-block="object"], [data-pt-inline="object"]`);if(e){let t=_Z(e);if(t)return{path:t,offset:0}}}}if(!l){if(i)return null;throw Error(`Cannot map DOM position to an editor location: ${t}`)}let d=_Z(l);if(!d){if(i)return null;throw Error(`Cannot map DOM position to an editor location: ${t}`)}if(d.length>1){let t=d.slice(0,-1),n=_q(e.snapshot,t);if(n&&Xq(e.snapshot,n.node,t))return{path:t,offset:0}}return{path:d,offset:u}},toEditorSelection:(e,t,n)=>{let{exactMatch:r,suppressThrow:i}=n,a=lZ(t)?t.anchorNode:t.startContainer,o=null,s=0,c=null,l=0,u=!1;if(a){if(lZ(t)){if(AZ&&t.rangeCount>1){c=t.focusNode;let e=t.getRangeAt(0),n=t.getRangeAt(t.rangeCount-1);if(c instanceof HTMLTableRowElement&&e.startContainer instanceof HTMLTableRowElement&&n.startContainer instanceof HTMLTableRowElement){let t=e=>e.childElementCount>0?t(e.children[0]):e,r=e.startContainer,i=n.startContainer,a=t(r.children[e.startOffset]),u=t(i.children[n.startOffset]);l=0,o=u.childNodes.length>0?u.childNodes[0]??null:u,c=a.childNodes.length>0?a.childNodes[0]??null:a,s=u instanceof HTMLElement?u.innerHTML.length:0}else e.startContainer===c?(o=n.endContainer,s=n.endOffset,l=e.startOffset):(o=e.startContainer,s=e.endOffset,l=n.startOffset)}else o=t.anchorNode,s=t.anchorOffset,c=t.focusNode,l=t.focusOffset;u=MZ&&G8e(o)||AZ?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed}else o=t.startContainer,s=t.startOffset,c=t.endContainer,l=t.endOffset,u=t.collapsed}if(o==null||c==null||s==null||l==null){if(i)return null;throw Error(`Cannot map DOM range to an editor selection: ${t}`)}AZ&&c.textContent?.endsWith(`
|
||||
|
||||
`)&&l===c.textContent.length&&l--;let d=IZ.toSelectionPoint(e,[o,s],{exactMatch:r,suppressThrow:i});if(!d)return null;let f=pZ(o,c)||o===c&&l<s,p=u?d:IZ.toSelectionPoint(e,[c,l],{exactMatch:r,suppressThrow:i,searchDirection:f?`forward`:`backward`});return p?{anchor:d,focus:p}:null}};function LZ(e,t={}){let{edge:n=`anchor`}=t,r=e.snapshot.context.selection;if(r){if(n===`anchor`)e.select(r.anchor);else if(n===`focus`)e.select(r.focus);else if(n===`start`){let[t]=Aq(r,e.snapshot.context);e.select(t)}else if(n===`end`){let[,t]=Aq(r,e.snapshot.context);e.select(t)}}}function RZ(e){let t=e.snapshot.context.selection;t&&e.apply({type:`set.selection`,properties:t,newProperties:null})}function zZ(e,t){return wZ(e,t,{edge:`end`})}var BZ=(e,t=!1)=>{let n=!t,r=t?u5e(e):e,i=UZ.None,a=UZ.None,o=0,s=null,c=null,l=null;for(let t of r){let r=t.codePointAt(0);if(!r)break;let u=T5e(t,r);if([i,a]=n?[a,u]:[u,i],qZ(i,UZ.ZWJ)&&qZ(a,UZ.ExtPict)&&(s=k5e(n?e.substring(0,o):e.substring(0,e.length-o)),!s)||qZ(i,UZ.RI)&&qZ(a,UZ.RI)&&(c=c===null?n?!0:N5e(e.substring(0,e.length-o)):!c,!c)||qZ(i,UZ.InCBLinker|UZ.InCBExtend)&&qZ(a,UZ.InCBConsonant)&&(l=j5e(n?e.substring(0,o):e.substring(0,e.length-o)),!l)||i!==UZ.None&&a!==UZ.None&&D5e(i,a))break;o+=t.length}return o||1},o5e=/\s/,s5e=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,c5e=/['\u2018\u2019]/,l5e=(e,t=!1)=>{let n=0,r=!1;for(;e.length>0;){let i=BZ(e,t),[a,o]=VZ(e,i,t);if(HZ(a,o,t))r=!0,n+=i;else if(!r)n+=i;else break;e=o}return n},VZ=(e,t,n)=>{if(n){let n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},HZ=(e,t,n=!1)=>{if(o5e.test(e))return!1;if(c5e.test(e)){let[e,r]=VZ(t,BZ(t,n),n);if(HZ(e,r,n))return!0}return!s5e.test(e)},u5e=function*(e){let t=e.length-1;for(let n=0;n<e.length;n++){let r=e.charAt(t-n);if(f5e(r.charCodeAt(0))){let i=e.charAt(t-n-1);if(d5e(i.charCodeAt(0))){yield i+r,n++;continue}}yield r}},d5e=e=>e>=55296&&e<=56319,f5e=e=>e>=56320&&e<=57343,UZ={None:0,Extend:1,ZWJ:2,RI:4,Prepend:8,SpacingMark:16,L:32,V:64,T:128,LV:256,LVT:512,ExtPict:1024,Any:2048,InCBConsonant:4096,InCBExtend:8192,InCBLinker:16384},p5e=/^[\p{Gr_Ext}\p{EMod}]$/u,m5e=/^[\u0600-\u0605\u06DD\u070F\u0890-\u0891\u08E2\u0D4E\u{110BD}\u{110CD}\u{111C2}-\u{111C3}\u{1193F}\u{11941}\u{11A3A}\u{11A84}-\u{11A89}\u{11D46}]$/u,h5e=/^[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E-\u094F\u0982-\u0983\u09BF-\u09C0\u09C7-\u09C8\u09CB-\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB-\u0ACC\u0B02-\u0B03\u0B40\u0B47-\u0B48\u0B4B-\u0B4C\u0BBF\u0BC1-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82-\u0C83\u0CBE\u0CC0-\u0CC1\u0CC3-\u0CC4\u0CC7-\u0CC8\u0CCA-\u0CCB\u0D02-\u0D03\u0D3F-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82-\u0D83\u0DD0-\u0DD1\u0DD8-\u0DDE\u0DF2-\u0DF3\u0E33\u0EB3\u0F3E-\u0F3F\u0F7F\u1031\u103B-\u103C\u1056-\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7-\u17C8\u1923-\u1926\u1929-\u192B\u1930-\u1931\u1933-\u1938\u1A19-\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43-\u1B44\u1B82\u1BA1\u1BA6-\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2-\u1BF3\u1C24-\u1C2B\u1C34-\u1C35\u1CE1\u1CF7\uA823-\uA824\uA827\uA880-\uA881\uA8B4-\uA8C3\uA952-\uA953\uA983\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BE-\uA9C0\uAA2F-\uAA30\uAA33-\uAA34\uAA4D\uAAEB\uAAEE-\uAAEF\uAAF5\uABE3-\uABE4\uABE6-\uABE7\uABE9-\uABEA\uABEC\u{11000}\u{11002}\u{11082}\u{110B0}-\u{110B2}\u{110B7}-\u{110B8}\u{1112C}\u{11145}-\u{11146}\u{11182}\u{111B3}-\u{111B5}\u{111BF}-\u{111C0}\u{111CE}\u{1122C}-\u{1122E}\u{11232}-\u{11233}\u{11235}\u{112E0}-\u{112E2}\u{11302}-\u{11303}\u{1133F}\u{11341}-\u{11344}\u{11347}-\u{11348}\u{1134B}-\u{1134D}\u{11362}-\u{11363}\u{11435}-\u{11437}\u{11440}-\u{11441}\u{11445}\u{114B1}-\u{114B2}\u{114B9}\u{114BB}-\u{114BC
Line truncated
|
||||
`))return g(()=>{let r=n.split(`
|
||||
`);r.forEach((n,i)=>{n&&t.send({type:`behavior event`,behaviorEvent:{type:`insert.text`,text:n},editor:e}),i!==r.length-1&&t.send({type:`behavior event`,behaviorEvent:{type:`insert.soft break`},editor:e})})},{at:i});if(EZ(i.anchor.path,i.focus.path)){let[t,a]=Aq(i,e.snapshot.context),o={start:t.offset,end:a.offset,text:n};if(n&&l&&r===`insertCompositionText`){let e=l.start+l.text.search(/\S|$/);o.start+o.text.search(/\S|$/)===e+1&&o.end===l.start+l.text.length?(--o.start,l=null,T()):l=!1}else l=r===`insertText`?l===null?o:l&&OZ(i)&&l.end+l.text.length===t.offset?{...l,text:l.text+n}:!1:!1;if(u){let r=e.snapshot.context.selection;if(h(t.path,o),r){let r={path:t.path,offset:t.offset+n.length};g(()=>{e.select({anchor:r,focus:r})},{at:r})}return}}return g(()=>t.send({type:`behavior event`,behaviorEvent:{type:`insert.text`,text:n},editor:e}),{at:i})}}},v=()=>!!e.pendingAction,y=()=>!!e.pendingDiffs?.length,b=()=>v()||y(),x=()=>i,S=t=>{e.pendingSelection=t,o&&=(clearTimeout(o),null);let{selection:n}=e.snapshot.context;if(!t)return;let r=!n||!EZ(n.anchor.path,t.anchor.path),i=!n||!EZ(n.anchor.path.slice(0,-1),t.anchor.path.slice(0,-1));(r&&l||i)&&(l=!1),(r||y())&&(o=setTimeout(f,200))},C=()=>{(v()||!y())&&f()},w=e=>{},T=()=>{v()||(s=setTimeout(f))};return{flush:f,scheduleFlush:T,hasPendingDiffs:y,hasPendingAction:v,hasPendingChanges:b,isFlushing:x,handleUserSelect:S,handleCompositionEnd:p,handleCompositionStart:m,handleDOMBeforeInput:_,handleKeyDown:w,handleDomMutations:t=>{y()||v()||t.some(n=>fZ(e,n,t))&&e.forceRender?.()},handleInput:C}}var _7e={subtree:!0,childList:!0,characterData:!0},v7e=kZ?({editorActor:e,node:t,...n})=>{if(!kZ)return null;let r=cQ(),i=t7e(),[a]=(0,$.useState)(()=>g7e({editor:r,editorActor:e,...n}));return n7e(t,a.handleDomMutations,_7e),r.scheduleFlush=a.scheduleFlush,i&&a.flush(),a}:()=>null,bQ=(0,$.createContext)(!1),xQ=(0,$.createContext)(void 0);function y7e(){return(0,$.useContext)(xQ)}function SQ(e,t,n){if(!FJ(e,t,n))return null;let{anchor:r,focus:i,...a}=e,[o,s]=Aq(e,n),[c,l]=Aq(t,n);return{anchor:aJ(o,c,n)?c:o,focus:aJ(s,l,n)?s:l,...a}}var b7e=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>t.hasOwnProperty(n)&&e[n]===t[n]),CQ=(e,t)=>{let{anchor:n,focus:r,...i}=e,{anchor:a,focus:o,...s}=t;return b7e(i,s)},wQ=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(!oQ(r,i)||!CQ(r,i))return!1}return!0},TQ=(e,t)=>{if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!CQ(r,i))return!1}return!0},x7e=(e,t,n,r)=>{let i=CZ(t)?e.snapshot.context.value:oq({schema:e.snapshot.context.schema},t)?t.children:[],a=Array.from(i,()=>[]);if(r.length===0)return a;let o=n.length,s=JZ(e,n),c=Array(i.length),l=t=>{let r=c[t];if(r)return r;let a=i[t];if(!a)return;let o=JZ(e,n.length===0?[{_key:a._key}]:[...n,`children`,{_key:a._key}]);return c[t]=o,o},u=new Map;for(let e=0;e<i.length;e++){let t=i[e];t&&u.set(t._key,e)}let d=e=>{let t=o===0?0:o+1,n=e.path[t];if(n&&typeof n==`object`&&`_key`in n)return u.get(n._key)};for(let t of r){let n=SQ(s,t,e.snapshot.context);if(!n)continue;let[r,o]=Aq(n,e.snapshot.context),c=d(r)??0,u=d(o)??i.length-1,f=t.kind===`registered`?Aq(t,e.snapshot.context):void 0;for(let n=c;n<=u;n++){let r=a[n];if(!r)continue;let i=l(n);if(!i)continue;let o=SQ(i,t,e.snapshot.context);o&&r.push({...t,...o,isRangeStart:f?DZ(o.anchor,f[0]):!1,isRangeEnd:f?DZ(o.focus,f[1]):!1})}}return a};function EQ(e,t){let[,n]=(0,$.useReducer)(e=>e+1,0),r=(0,$.useRef)(void 0),i=(0,$.useRef)(()=>null),a=(0,$.useRef)(null),o;try{if(e!==i.current||r.current){let n=e();o=t(a.current,n)?a.current:n}else o=a.current}catch(e){throw r.current&&S7e(e)&&(e.message+=`\nThe error may be correlated with this previous error:\n${r.current.stack}\n\n`),e}i.current=e,a.current=o,r.current=void 0;let s=(0,$.useCallback)(()=>{try{let e=i.current();if(t(a.current,e))return;a.current=e}catch(e){e instanceof Error?r.current=e:r.current=Error(String(e))}n()},[]);return[o,s]}function S7e(e){return e instanceof Error}var DQ=(0,$.createContext)({}),OQ=(e,t,n)=>{let r=(0,Z.c)(11),i=cQ(),{decorate:a,addEventListener:o}=(0,$.useContext)(DQ),s;r[0]!==a||r[1]!==e||r[2]!==t?(s=()=>a([e,t]),r[0]=a,r[1]=e,r[2]=t,r[3]=s):s=r[3];let[c,l]=EQ(s,sq({schema:i.snapshot.context.schema},e)?TQ:wQ),u,d;r[4]!==o||r[5]!==l?(u=()=>{let e=o(l);return l(),e},d=[o,l],r[4]=o,r[5]=l,r[6]=u,r[7]=d):(u=r[6],d=r[7]),lQ(u,d);let f;return r[8]!==c||r[9]!==n?(f=[...c,...n],r[8]=c,r[9]=n,r[10]=f):f=r[10],f},C7e=e=>{let t=(0,Z.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=new Set,t[0]=n):n=t[0];let r=(0,$.useRef)(n),i=(0,$.useRef)(e),a,o;t[1]===e?(a=t[2],o=t[3]):(a=()=>{i.current=e,r.current.forEach(w7e)},o=[e],t[1]=e,t[2]=a,t[3]=o),lQ(a,o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=e=>i.current(e),t[4]=s):s=t[4];let c=s,l;t[5]===Symbo
Line truncated
|
||||
`?(0,Q.jsx)(UQ,{isTrailing:!0,text:c}):(0,Q.jsx)(UQ,{text:c})},UQ=e=>{"use no memo";let{text:t,isTrailing:n=!1}=e,r=(0,$.useRef)(null),i=()=>`${t??``}${n?`
|
||||
`:``}`,[a]=(0,$.useState)(i);return lQ(()=>{let e=i();r.current&&r.current.textContent!==e&&(r.current.textContent=e)}),(0,Q.jsx)(B7e,{ref:r,children:a})},B7e=(0,$.memo)((0,$.forwardRef)((e,t)=>{let n=(0,Z.c)(3),r;return n[0]!==e.children||n[1]!==t?(r=(0,Q.jsx)(`span`,{"data-pt-text":!0,ref:t,children:e.children}),n[0]=e.children,n[1]=t,n[2]=r):r=n[2],r})),WQ=e=>{let t=(0,Z.c)(8),{isLineBreak:n}=e,r=n!==void 0&&n,i;t[0]===r?i=t[1]:(i={"data-pt-zero-width":!0,...r?{"data-pt-line-break":!0}:{}},t[0]=r,t[1]=i);let a=i,o=!kZ||!r?``:null,s;t[2]===r?s=t[3]:(s=r?(0,Q.jsx)(`br`,{}):null,t[2]=r,t[3]=s);let c;return t[4]!==a||t[5]!==o||t[6]!==s?(c=(0,Q.jsxs)(`span`,{...a,children:[o,s]}),t[4]=a,t[5]=o,t[6]=s,t[7]=c):c=t[7],c},V7e=e=>(0,Q.jsx)(U7e,{...e}),H7e=$.memo(e=>{let t=(0,Z.c)(13),{leaf:n,isLast:r,text:i,path:a,parent:o,renderLeaf:s,leafPosition:c}=e,l=s===void 0?V7e:s,u;t[0]!==r||t[1]!==n||t[2]!==o||t[3]!==a||t[4]!==i?(u=(0,Q.jsx)(z7e,{isLast:r,leaf:n,parent:o,path:a,text:i}),t[0]=r,t[1]=n,t[2]=o,t[3]=a,t[4]=i,t[5]=u):u=t[5];let d=u,f;return t[6]!==d||t[7]!==n||t[8]!==c||t[9]!==a||t[10]!==l||t[11]!==i?(f=l({attributes:{"data-pt-marks":!0},children:d,leaf:n,text:i,path:a,leafPosition:c}),t[6]=d,t[7]=n,t[8]=c,t[9]=a,t[10]=l,t[11]=i,t[12]=f):f=t[12],f},(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.text===e.text&&HQ(t.leaf,e.leaf)),U7e=e=>{let t=(0,Z.c)(3),{attributes:n,children:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(`span`,{...n,children:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},W7e=e=>(0,Q.jsx)(K7e,{...e}),G7e=$.memo(e=>{let t=(0,Z.c)(11),{decorations:n,isLast:r,parent:i,path:a,renderLeaf:o,renderText:s,text:c}=e,l=s===void 0?W7e:s,u=OQ(c,a,n),d;t[0]!==u||t[1]!==c?(d=A7e(c,u),t[0]=u,t[1]=c,t[2]=d):d=t[2];let f=d,p;if(t[3]!==f||t[4]!==r||t[5]!==i||t[6]!==a||t[7]!==o||t[8]!==l||t[9]!==c){let e=[];for(let t=0;t<f.length;t++){let{leaf:n,position:s}=f[t];e.push((0,Q.jsx)(H7e,{isLast:r&&t===f.length-1,leaf:n,leafPosition:s,text:c,path:a,parent:i,renderLeaf:o},`${c._key}-${t}`))}p=l({text:c,children:e,attributes:{"data-pt-path":lq(a)}}),t[3]=f,t[4]=r,t[5]=i,t[6]=a,t[7]=o,t[8]=l,t[9]=c,t[10]=p}else p=t[10];return p},(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&EZ(t.path,e.path)&&t.renderText===e.renderText&&t.renderLeaf===e.renderLeaf&&t.text===e.text&&TQ(t.decorations,e.decorations)),K7e=e=>{let t=(0,Z.c)(3),{attributes:n,children:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,Q.jsx)(`span`,{...n,children:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},q7e=(e,t)=>{if(e.length!==t.length)return t;let n=!1,r=Array(t.length);for(let i=0;i<t.length;i++){let a=e[i],o=t[i];a&&wQ(a,o)?r[i]=a:(r[i]=o,n=!0)}return n?r:e},J7e=(e,t,n,r)=>{let i=(0,Z.c)(8),a;i[0]!==r||i[1]!==e||i[2]!==t||i[3]!==n?(a=x7e(e,t,n,r),i[0]=r,i[1]=e,i[2]=t,i[3]=n,i[4]=a):a=i[4];let o=a,[s,c]=(0,$.useState)(o),l;i[5]!==o||i[6]!==s?(l=q7e(s,o),i[5]=o,i[6]=s,i[7]=l):l=i[7];let u=l;return u!==s&&c(u),u};function GQ(e,t,n){if(t?.of){for(let e of t.of)if(`container`in e&&e.container.type===n._type)return e}return e.containers.get(n._type)}var KQ=e=>{let{decorations:t,node:n,path:r,renderElement:i,renderText:a,renderLeaf:o}=e,s=cQ();s.isNodeMapDirty=!1;let c=y7e(),l=(0,$.useContext)(bQ),u=J7e(s,n,r,t),d=[],f=`children`,p=c;if(CZ(n))d=n.snapshot.context.value;else if(oq({schema:s.snapshot.context.schema},n))d=n.children;else if(Tq(s.snapshot,n)){let e=GQ(s,c,n);if(e){let t=n[e.field.name];Array.isArray(t)&&(d=t,f=e.field.name),p=e}}let m=(0,$.useCallback)((e,t,n)=>{let s=r.length===0?[{_key:e._key}]:[...r,f,{_key:e._key}];return(0,Q.jsx)(D7e,{decorations:u[t]??[],element:e,isContainer:n,path:s,renderElement:i,renderLeaf:o,renderText:a},e._key)},[f,u,r,i,o,a]),h=oq({schema:s.snapshot.context.schema},n)?n:void 0,g=(e,t,n)=>l||!t?e:(0,Q.jsx)(bQ.Provider,{value:!0,children:e},n),_=(e,t)=>{if(!h)throw Error(`Cannot render text component without a text block parent`);let n=r.length===0?[{_key:e._key}]:[...r,`children`,{_key:e._key}];return(0,Q.jsx)(G7e,{decorations:u[t]??[],isLast:t===d.length-1,parent:h,path:n,renderLeaf:o,renderText:a,text:e},e._key)},v=(e,t)=>{let n=r.length===0?[{_key:e._key}]:[...r,f,{_key:e._key}];return(0,Q.jsx)(k7e,{decorations:u[t]??[],isInline:h!==void 0,objectNode:e,path:n,renderElement:i},e._key)},y=(e,t)=>{if(t)return!0;if(oq({schema:s.snapshot.context.schema},e)){if(s.textBlocks.has(e._type)||s.textBlocks.has(`*`))return!0;if(c?.of){for(let t of c.of)if(`textBlock`in t&&t.textBlock.type===e._type)return!0}return!1}if(Tq(s.snapshot,e)){if(h!==void 0)return!1;if(s.blockObjects.has(e._type)||s.blockObjects.has(`*`))return!0;if(c?.of){for(let t of c.of)if(`blockObject`in t&&t.blockObject.type===e._type)return!0}return!1}return sq({schema:s.snapshot.context.schema},e),!1},b=d.map((e,t)=>{if(oq({schema:s.snapshot.context.schema},e))return g(m(e,t,!1),y(e,!1),e._key);if(jq({schema:s.snapshot.context.schema},e))return null;if(Tq(s.snapshot,e))return GQ(s,p,e)?g(m(e,t,!0),!0,e._key):g(v(e,t),y(e,!1),e._key);if(sq({schema:s.Line truncated
|
||||
|
||||
`),mimeType:`text/plain`,originEvent:t.originEvent}:{type:`serialization.failure`,mimeType:`text/plain`,originEvent:t.originEvent,reason:`No selection`},deserialize:({snapshot:e,event:t})=>{let n=VX(`<html><body>${set(t.data).split(/\n{2,}/).map(e=>e?`<p>${e.replace(/(?:\r\n|\r|\n)/g,`<br/>`)}</p>`:`<p></p>`).join(``)}</body></html>`,{schema:e.context.schema,keyGenerator:e.context.keyGenerator}).flatMap(t=>{let n=kJ({keyGenerator:e.context.keyGenerator,block:t,profile:`lenient`,schema:e.context.schema});return n?[n]:[]});return n.length===0?{type:`deserialization.failure`,mimeType:`text/plain`,reason:`No blocks deserialized`}:{type:`deserialization.success`,data:n,mimeType:`text/plain`}}}),oet={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`,"`":```,"=":`=`};function set(e){return String(e).replace(/[&<>"'`=/]/g,e=>oet[e]??e)}var cet=[net,ret,iet,aet];function Z$(e){return{id:DJ(),name:e?.name,reference:e?.reference}}var Q$=Z$({name:`core`});function uet({editor:e,listItem:t}){if(!e.snapshot.context.selection)return!1;let[n,r]=Aq(e.snapshot.context.selection,e.snapshot.context),i=[...Pq(e.snapshot,{from:n.path,to:r.path,match:t=>oq({schema:e.snapshot.context.schema},t)})];return i.length>0&&i.every(n=>$J({schema:e.snapshot.context.schema},n.node)&&n.node.listItem===t)}function det({editor:e,style:t}){if(!e.snapshot.context.selection)return!1;let[n,r]=Aq(e.snapshot.context.selection,e.snapshot.context),i=[...Pq(e.snapshot,{from:n.path,to:r.path,match:t=>oq({schema:e.snapshot.context.schema},t)})];return i.length>0&&i.every(n=>oq({schema:e.snapshot.context.schema},n.node)&&n.node.style===t)}function fet(e,t){return{focus:()=>{t.send({type:`focus`,editor:e})},blur:()=>{t.send({type:`blur`,editor:e})},toggleMark:n=>{t.send({type:`behavior event`,behaviorEvent:{type:`decorator.toggle`,decorator:n},editor:e})},toggleList:n=>{t.send({type:`behavior event`,behaviorEvent:{type:`list item.toggle`,listItem:n},editor:e})},toggleBlockStyle:n=>{t.send({type:`behavior event`,behaviorEvent:{type:`style.toggle`,style:n},editor:e})},isMarkActive:t=>{let n=e.snapshot;return cY(n).includes(t)},marks:()=>{let t=e.snapshot,n=oY(t),r=cY(t);return[...n,...r]},undo:()=>{t.send({type:`behavior event`,behaviorEvent:{type:`history.undo`},editor:e})},redo:()=>{t.send({type:`behavior event`,behaviorEvent:{type:`history.redo`},editor:e})},select:n=>{t.send({type:`behavior event`,behaviorEvent:{type:`select`,at:n},editor:e})},focusBlock:()=>{if(!e.snapshot.context.selection)return;let t=e.snapshot.context.selection.focus.path;return Uq(e.snapshot,t)?.node??Uq(e.snapshot,yq(t))?.node},focusChild:()=>{if(!e.snapshot.context.selection)return;let t=Zq(e.snapshot,e.snapshot.context.selection.focus.path,{edge:`start`});if(t&&!Hq(e.snapshot,t.path))return t.node},insertChild:(n,r)=>(t.send({type:`behavior event`,behaviorEvent:{type:`insert.child`,child:{_type:n.name,...r||{}}},editor:e}),e.snapshot.context.selection?.focus.path??[]),insertBlock:(n,r)=>(t.send({type:`behavior event`,behaviorEvent:{type:`insert.block`,block:{_type:n.name,...r||{}},placement:`auto`},editor:e}),e.snapshot.context.selection?.focus.path??[]),hasBlockStyle:t=>{try{return det({editor:e,style:t})}catch{return!1}},hasListStyle:t=>{try{return uet({editor:e,listItem:t})}catch{return!1}},isVoid:t=>{let n=e.snapshot.context.schema;return![n.block.name,n.span.name].includes(t._type)},findByPath:t=>{let n=_q(e.snapshot,t);return n?[n.node,t]:[void 0,void 0]},findDOMNode:t=>{let n;try{let r=Array.from(Pq(e.snapshot,{match:e=>e._key===t._key}))[0];if(r){let t=r.path;n=aZ(e,t)}}catch{}return n},activeAnnotations:()=>{if(!e.snapshot.context.selection||e.snapshot.context.selection.focus.path.length<2)return[];try{let t=[],n=Pq(e.snapshot,{from:xZ(e.snapshot.context.selection,e.snapshot.context).path,to:bZ(e.snapshot.context.selection,e.snapshot.context).path,match:t=>sq({schema:e.snapshot.context.schema},t)&&t.marks!==void 0&&Array.isArray(t.marks)&&t.marks.length>0});for(let{node:r,path:i}of n){let n=oJ(e.snapshot,yq(i));n&&n.node.markDefs?.forEach(n=>{sq({schema:e.snapshot.context.schema},r)&&r.marks&&Array.isArray(r.marks)&&r.marks.includes(n._key)&&t.push(n)})}return t}catch{return[]}},isAnnotationActive:t=>{let n=e.snapshot;return lY(t)(n)},addAnnotation:(n,r)=>{let i=e.snapshot,a=HJ(i),o=RJ(i),s=a.flatMap(e=>oq(i.context,e)?e.markDefs??[]:[]);t.send({type:`behavior event`,behaviorEvent:{type:`annotation.add`,annotation:{name:n.name,value:r??{}}},editor:e});let c=e.snapshot,l=HJ(c),u=zJ(c),d=RJ(c),f=d?qq(c,d.path).decorators.map(e=>e.name):c.context.schema.decorators.map(e=>e.name),p=d?.node.marks?.filter(e=>!o?.node.marks?.includes(e)&&!f.includes(e)),m=l.flatMap(e=>oq(c.context,e)?e.markDefs?.map(t=>({markDef:t,path:[{_key:e._key},`markDefs`,{_key:t._key}]}))??[]:[]).filter(e=>!s.some(t=>t._key===e.markDef._key)),h=d?.path,g=m.find(e=>p?.some(t=>t===e.markDef._key));if(u&&h&&g)return{markDefPath:g.path,markDefPaths:m.map(e=>e.path),spanPath:Line truncated
|
||||
`)?!1:r.length===1?{text:t}:r.length>2?!1:n&&t===n?{text:t}:!1},actions:[(e,{text:t})=>[EY({type:`insert.text`,text:t})]]}),OY({on:`input.*`,actions:[({event:e})=>[EY({type:`deserialize`,originEvent:e})]]})];function s2(e){return t=>!e||t.blockIndexMap.has(lq([{_key:e}]))?t.context.keyGenerator():e}function c2(e){return{anchor:{path:e,offset:0},focus:{path:e,offset:0}}}function l2(e,t){return e.length===0?[{_key:t}]:M0(e,t)}var Rnt=[OY({on:`insert.blocks`,guard:({event:e})=>{let t=e.blocks.length===1?e.blocks.at(0):void 0;return t?{onlyBlock:t}:!1},actions:[({event:e},{onlyBlock:t})=>[EY({type:`insert.block`,block:t,placement:e.placement,select:e.select??`end`,...e.at?{at:e.at}:{}})]]}),OY({on:`insert.blocks`,guard:({snapshot:e,event:t})=>{if(t.placement!==`before`&&t.placement!==`after`)return!1;let n=t.at??e.context.selection,r=n?zJ({...e,context:{...e.context,selection:n}}):void 0;return{referenceBlockPath:r?r.path:[]}},actions:[({snapshot:e,event:t},{referenceBlockPath:n})=>{let r,i,a,o=[],s=-1;for(let c of t.blocks){s++;let l=s2(c._key)(e),u=l2(n,l);s===0&&(r=u),s===t.blocks.length-1&&(i=u),o.push(EY({type:`insert.block`,block:l===c._key?c:{...c,_key:l},placement:t.placement===`after`?`after`:s===0?`before`:`after`,select:`none`,...a?{at:c2(a)}:t.at?{at:t.at}:{}})),a=u}let c=t.select??`end`;return c===`start`&&r&&o.push(EY({type:`select.block`,at:r,select:`start`})),c===`end`&&i&&o.push(EY({type:`select.block`,at:i,select:`end`})),o}]}),OY({on:`insert.blocks`,guard:({snapshot:e,event:t})=>{if(t.placement!==`auto`)return!1;let n=t.at??e.context.selection;if(!n)return!1;let r=BJ({...e,context:{...e.context,selection:n}});if(!r||CY(e.context,r.node))return!1;let i=CJ({context:e.context,block:r}),a=SJ({context:e.context,block:r}),o=E0({context:e.context,block:r.node,startPoint:n.focus,endPoint:a}),s=jq(e.context,t.blocks.at(0));return{focusTextBlock:r,focusBlockStartPoint:i,focusBlockEndPoint:a,focusTextBlockAfter:o,at:n,originalSelection:e.context.selection,isFirstBlockTextBlock:s}},actions:[({snapshot:e,event:t},{focusTextBlock:n,focusBlockEndPoint:r,focusTextBlockAfter:i,at:a,focusBlockStartPoint:o,isFirstBlockTextBlock:s,originalSelection:c})=>{let l=n.path,u,d,f=[],p=-1;for(let i of t.blocks){if(p++,p===0){yJ(a.focus,r)||f.push(EY({type:`delete`,at:{anchor:a.focus,focus:r}}));let s=s2(i._key)(e),c=yJ(a.focus,o);jq(e.context,i)&&!c?(d=n.path,u=n.path):(d=l2(l,s),u=d),f.push(EY({type:`insert.block`,block:s===i._key?i:{...i,_key:s},placement:`auto`,select:`end`,...t.at?{at:t.at}:{}}));continue}if(p===t.blocks.length-1){let t=s2(i._key)(e);f.push(EY({type:`insert.block`,block:t===i._key?i:{...i,_key:t},placement:`after`,select:`end`,at:u?c2(u):void 0})),u=l2(l,t);continue}let s=s2(i._key)(e);f.push(EY({type:`insert.block`,block:s===i._key?i:{...i,_key:s},placement:`after`,select:u?`none`:`end`,at:u?c2(u):void 0})),u=l2(l,s)}return CY(e.context,i)||f.push(EY({type:`insert.block`,block:i,placement:`auto`,select:t.select===`end`?`none`:`end`})),t.select===`none`&&f.push(EY({type:`select`,at:c})),t.select===`start`&&((yJ(a.focus,o)||!s)&&d?f.push(EY({type:`select.block`,at:d,select:`start`})):f.push(EY({type:`select`,at:{anchor:a.focus,focus:a.focus}}))),f}]}),OY({on:`insert.blocks`,guard:({snapshot:e,event:t})=>{if(t.placement!==`auto`)return!1;let n=t.at??e.context.selection,r=n?zJ({...e,context:{...e.context,selection:n}}):void 0;return{referenceBlockPath:r?r.path:[],originalSelection:e.context.selection}},actions:[({snapshot:e,event:t},{referenceBlockPath:n,originalSelection:r})=>{let i,a,o,s=[],c=-1;for(let r of t.blocks){c++;let l=s2(r._key)(e),u=l2(n,l);c===0&&(i=u),c===t.blocks.length-1&&(a=u),s.push(EY({type:`insert.block`,block:l===r._key?r:{...r,_key:l},placement:c===0?`auto`:`after`,select:`none`,...o?{at:c2(o)}:t.at?{at:t.at}:{}})),o=u}let l=t.select??`end`;return l===`none`?s.push(EY({type:`select`,at:r})):l===`start`&&i?s.push(EY({type:`select.block`,at:i,select:`start`})):a&&s.push(EY({type:`select.block`,at:a,select:`end`})),s}]}),OY({on:`insert.break`,actions:[()=>[EY({type:`split`})]]}),OY({on:`insert.child`,guard:({snapshot:e})=>{let t=hY(e);return!t||e.context.selection?!1:{lastBlockEndPoint:SJ({context:e.context,block:t})}},actions:[({event:e},{lastBlockEndPoint:t})=>[EY({type:`select`,at:{anchor:t,focus:t}}),EY(e)]]}),OY({on:`insert.child`,guard:({snapshot:e})=>{let t=BJ(e);return e.context.selection&&!t},actions:[({snapshot:e,event:t})=>[EY({type:`insert.block`,block:{_type:e.context.schema.block.name,children:[{_type:e.context.schema.span.name,text:``,marks:[]}]},placement:`auto`,select:`end`}),EY(t)]]}),OY({on:`insert.inline object`,actions:[({event:e})=>[EY({type:`insert.child`,child:{_type:e.inlineObject.name,...e.inlineObject.value}})]]}),OY({on:`insert.soft break`,actions:[()=>[EY({type:`insert.text`,text:`
|
||||
`})]]}),OY({on:`insert.span`,guard:({snapshot:e})=>!BJ(e),actions:[({snapshot:e,event:t})=>[EY({type:`insert.block`,block:{_type:e.context.schema.block.name,children:[{_type:e.context.schema.span.name,text:``,marks:[]}]},placement:`auto`,select:`end`}),EY(t)]]}),OY({on:`insert.span`,guard:({snapshot:e,event:t})=>{let n=BJ(e);return{markDefs:t.annotations?.map(t=>({_type:t.name,_key:e.context.keyGenerator(),...t.value}))??[],focusTextBlock:n}},actions:[({snapshot:e,event:t},{markDefs:n,focusTextBlock:r})=>[...r?[EY({type:`block.set`,at:r.path,props:{markDefs:[...r.node.markDefs??[],...n]}})]:[],EY({type:`insert.child`,child:{_type:e.context.schema.span.name,text:t.text,marks:[...t.decorators??[],...n.map(e=>e._key)]}})]]}),OY({on:`insert.text`,guard:({snapshot:e})=>ZJ(e)&&LJ(e),actions:[({event:e})=>[EY({type:`move.forward`,distance:1}),EY(e)]]}),OY({on:`insert.text`,guard:({snapshot:e})=>QJ(e),actions:[({event:e})=>[EY({type:`delete`}),EY(e)]]}),OY({on:`insert.text`,guard:({snapshot:e})=>{if(e.context.selection)return!1;let t=hY(e);return t?{endPoint:SJ({context:e.context,block:t})}:!1},actions:[({event:e},{endPoint:t})=>[EY({type:`select`,at:{anchor:t,focus:t}}),EY(e)]]})],znt=UY({default:[{key:`ArrowLeft`,shift:!0,meta:!1,ctrl:!1,alt:!1}]}),Bnt=[OY({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>u0.backspace.guard(t.originEvent)&&ZJ(e)&&LJ(e),actions:[()=>[EY({type:`delete.backward`,unit:`character`})]]}),OY({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>u0.delete.guard(t.originEvent)&&ZJ(e)&&LJ(e),actions:[()=>[EY({type:`delete.forward`,unit:`character`})]]}),OY({on:`keyboard.keydown`,guard:({event:e})=>u0.deleteWord.backward.guard(e.originEvent),actions:[()=>[EY({type:`delete.backward`,unit:`word`})]]}),OY({on:`keyboard.keydown`,guard:({event:e})=>u0.deleteWord.forward.guard(e.originEvent),actions:[()=>[EY({type:`delete.forward`,unit:`word`})]]}),OY({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>u0.break.guard(t.originEvent)&&ZJ(e)&&LJ(e),actions:[()=>[EY({type:`insert.break`})]]}),OY({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>u0.break.guard(t.originEvent)&&QJ(e),actions:[()=>[EY({type:`insert.break`})]]}),OY({on:`keyboard.keydown`,guard:({event:e})=>u0.lineBreak.guard(e.originEvent),actions:[()=>[EY({type:`insert.soft break`})]]}),OY({on:`keyboard.keydown`,guard:({event:e})=>u0.history.undo.guard(e.originEvent),actions:[()=>[EY({type:`history.undo`})]]}),OY({on:`keyboard.keydown`,guard:({event:e})=>u0.history.redo.guard(e.originEvent),actions:[()=>[EY({type:`history.redo`})]]}),OY({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>{if(!u0.selectAll.guard(t.originEvent))return!1;let n=Zq(e,[],{edge:`start`}),r=Zq(e,[],{edge:`end`}),i=n?Gq(e,n.path):void 0,a=r?Gq(e,r.path):void 0;return!i||!a?!1:{anchor:CJ({context:e.context,block:i}),focus:SJ({context:e.context,block:a})}},actions:[(e,{anchor:t,focus:n})=>[EY({type:`select`,at:{anchor:t,focus:n}})]]}),OY({on:`keyboard.keydown`,guard:({snapshot:e,event:t})=>{if(!e.context.selection||!znt.guard(t.originEvent))return!1;let n=BJ(e);if(!n)return!1;let r=Bq(e,n.path,{direction:`previous`});if(!r)return!1;let i=Uq(e,r.path);return i&&e.context.selection.focus.offset===0&&CY(e.context,n.node)?{previousBlock:i,selection:e.context.selection}:!1},actions:[({snapshot:e},{previousBlock:t,selection:n})=>[EY({type:`select`,at:{anchor:n.anchor,focus:SJ({context:e.context,block:t})}})]]})],Vnt=[OY({on:`list item.add`,guard:({snapshot:e,event:t})=>{let n=sY(e).filter(n=>qq(e,n.path).lists.some(e=>e.name===t.listItem));return n.length!==0&&{selectedTextBlocks:n}},actions:[({event:e},{selectedTextBlocks:t})=>t.map(t=>EY({type:`block.set`,at:t.path,props:{level:t.node.level??1,listItem:e.listItem}}))]}),OY({on:`list item.remove`,guard:({snapshot:e})=>({selectedTextBlocks:sY(e)}),actions:[(e,{selectedTextBlocks:t})=>t.map(e=>EY({type:`block.unset`,at:e.path,props:[`level`,`listItem`]}))]}),OY({on:`list item.toggle`,guard:({snapshot:e,event:t})=>_Y(t.listItem)(e),actions:[({event:e})=>[EY({type:`list item.remove`,listItem:e.listItem})]]}),OY({on:`list item.toggle`,guard:({snapshot:e,event:t})=>!_Y(t.listItem)(e),actions:[({event:e})=>[EY({type:`list item.add`,listItem:e.listItem})]]})],Hnt=[OY({on:`move.block`,guard:({snapshot:e,event:t})=>{let n=_q(e,t.at),r=_q(e,t.to);if(!n||!r||EZ(n.path,r.path))return!1;let i=hq(e,yq(n.path)),a=i.findIndex(e=>e.node._key===n.node._key),o=i.findIndex(e=>e.node._key===r.node._key);return{originEntry:n,destinationEntry:r,movingDown:a!==-1&&o!==-1&&a<o}},actions:[(e,{originEntry:t,destinationEntry:n,movingDown:r})=>[EY({type:`unset`,at:t.path}),EY({type:`insert`,at:n.path,value:t.node,position:r?`after`:`before`})]]}),OY({on:`move.block up`,guard:({snapshot:e,event:t})=>{let n=Bq(e,t.at,{direction:`previous`});return n?{previousSibling:n,savedSelection:e.context.selection}:!1},actions:[({event:e},{previousSibling:t,savedSelection:n})=>{let r=[EY({type:`move.block`,at:e.at,to:t.path})];return n&&r.push(EY({type:`sLine truncated
|
||||
`));let a=`${zot}.${r}`;return{safeBaseId:a,safeTaggedId:`${a}${n?`.tag.${n}`:``}`,idWarning:i}}function Uot(e){if(!e)throw Error(`Parameter 'portabletextType' missing (required)`);return Wot(e,e.of??[])}function Wot(e,t){let n=t.find(Jot);if(!n)throw Error(`Block type is not defined in this schema (required)`);let r=n.fields?.find(e=>e.name===`children`);if(!r)throw Error(`Children field for block type found in schema (required)`);let i=r.type.of;if(!i)throw Error(`Valid types for block children not found in schema (required)`);let a=i.find(e=>e.name===`span`);if(!a)throw Error(`Span type not found in schema (required)`);let o=i.filter(e=>e.name!==`span`)||[],s=t.filter(e=>e.name!==n.name)||[];return{styles:Got(n),decorators:Kot(a),lists:qot(n),block:n,span:a,portableText:e,inlineObjects:o,blockObjects:s,annotations:a.annotations}}function Got(e){let t=e.fields?.find(e=>e.name===`style`);if(!t)throw Error(`A field with name 'style' is not defined in the block type (required).`);let n=t.type.options?.list&&t.type.options.list?.filter(e=>e.value);if(!n||n.length===0)throw Error(`The style fields need at least one style defined. I.e: {title: 'Normal', value: 'normal'}.`);return n}function Kot(e){return e.decorators}function qot(e){let t=e.fields?.find(e=>e.name===`listItem`);if(!t)throw Error(`A field with name 'listItem' is not defined in the block type (required).`);let n=t.type.options?.list&&t.type.options.list.filter(e=>e.value);if(!n)throw Error(`The list field need at least to be an empty array`);return n}function Jot(e){return e.type?Jot(e.type):e.name===`block`?e:null}function E4(e,t,n){return Wot(e,Yot(e,t,n)??e.of??[])}function Yot(e,t,n){let r=Qot(n);if(r<0)return;let i=e.of??[],a=t,o;for(let e=0;e<=r;e++){let t=n[e];if(typeof t==`string`)continue;let r;if(dc(t))r=a.find(e=>e._key===t._key);else if(typeof t==`number`)r=a.at(t);else return o;if(!r)return o;let s=i.find(e=>e.name===r._type);if(!s)return o;let c=$ot(s);if(!c)return o;let l=est(c.type)??[];Xot(l)&&(o=l),i=l;let u=r[c.name];a=Array.isArray(u)?u:[]}return o}function Xot(e){return e.some(e=>Zot(e).name===`block`)}function Zot(e){return e.type?Zot(e.type):e}function Qot(e){let t=-1,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i!==void 0&&dc(i)&&(n=t,t=r)}return n}function $ot(e){let t=e.fields;if(t){for(let e of t)if(yc(e.type))return{name:e.name,type:e.type}}}function est(e){try{if(e.jsonType===`array`){let t=e.of;return Array.isArray(t)?t:void 0}}catch{}}function tst(e){let t=e.hasOwnProperty(`jsonType`),n=t?e:vst(e);return t&&n.jsonType!==`array`&&_st(n),nst(n)}function nst(e){if(!e)throw Error(`Parameter 'portableTextType' missing (required)`);let t=e.of?.find(O4);if(!t)throw Error(`Block type is not defined in this schema (required)`);let n=t.fields?.find(e=>e.name===`children`);if(!n)throw Error(`Children field for block type found in schema (required)`);let r=n.type.of;if(!r)throw Error(`Valid types for block children not found in schema (required)`);let i=r.find(e=>e.name===`span`);if(!i)throw Error(`Span type not found in schema (required)`);let a=r.filter(e=>e.name!==`span`)||[],o=e.of?.filter(e=>e.name!==t.name)||[],s=pst(t),c=mst(i),l=hst(t),u=i.annotations,d={work:[],ancestors:new Map,distinctAncestorCount:0,memo:new Map,activeAnonymousObjects:new Set,inFlight:new Map,rootBlockObjects:new Set(o)},f=[],p={block:{name:t.name},span:{name:i.name},styles:s.map(e=>({name:e.value,title:e.title,value:e.value})),lists:l.map(e=>({name:e.value,title:e.title,value:e.value})),decorators:c.map(e=>({name:e.value,title:e.title,value:e.value})),annotations:u.map(e=>{let t=D4(d,e.fields,void 0,e);return f.push(t.work),{name:e.name,title:e.title,fields:t.holes}}),blockObjects:o.map(e=>{let t=D4(d,e.fields,e.name);return f.push(t.work),{name:e.name,title:e.title,fields:t.holes}}),inlineObjects:a.map(e=>{let t=D4(d,e.fields,e.name,e);return f.push(t.work),{name:e.name,title:e.title,fields:t.holes}})};return cst(d,f),sst(d),p}function rst(e,t){let n=e.ancestors.get(t)??0;n===0&&e.distinctAncestorCount++,e.ancestors.set(t,n+1)}function ist(e,t){let n=e.ancestors.get(t)??0;if(n<=1){e.ancestors.delete(t),n===1&&e.distinctAncestorCount--;return}e.ancestors.set(t,n-1)}function ast(e,t){return(e.ancestors.get(t)??0)>0}function ost(e){return e.distinctAncestorCount+e.activeAnonymousObjects.size}function sst(e){let t=0;for(;e.work.length>0;)if(e.work.pop()(),++t>1e8)throw Error(`Portable Text schema conversion exceeded ${t} work items; the schema type graph likely contains a cycle the conversion cannot cut (in-flight ancestors: [${[...e.ancestors.keys()].join(`, `)}])`)}function D4(e,t,n,r){let i=[];return{holes:i,work:()=>{if(r!==void 0){let t=e.inFlight.get(r),n=ost(e);if(t!==void 0&&t.length>0&&n<=t[t.length-1])return;t===void 0?e.inFlight.set(r,[n]):t.push(n),e.work.push(()=>{let t=e.inFlight.get(r);t?.pop(),t!==void 0&&t.length===0&&e.inFlight.delete(r)})}n!==void 0&&(rst(e,n),e.work.push(()=>ist(e,n))),i.length=t.length;for(let n=t.length-1;n>=0;n--
Line truncated
|
||||
`){let t=e.hardBreak;return t?(0,Q.jsx)(t,{},n):`
|
||||
`}return t.text}function l(r,i,a,o){let s={value:r,isInline:o,index:i,renderNode:n};t(Qst(r._type),{nodeType:`block`,type:r._type});let c=e.unknownType;return(0,Q.jsx)(c,{...s},a)}function u(t,r,i,a){let o={value:t,isInline:a,index:r,renderNode:n},s=e.types[t._type];return s?(0,Q.jsx)(s,{...o},i):null}return n};function Cct(e){let{node:t,index:n,isInline:r,renderNode:i}=e,a=FEe(t).map((e,t)=>i({node:e,isInline:!0,index:t,renderNode:i}));return{_key:t._key||`block-${n}`,children:a,index:n,isInline:r,node:t}}function wct(){}var Tct=0;function L4(e){var t=++Tct;return aO(e)+t}var Ect=/^[a-zA-Z0-9_-]+$/;function Dct(e){if(!e)return null;if(e.startsWith(`:`)){let t=e.slice(1);if(!Ect.test(t)){let t=e.includes(`*`)?` Splats are not supported. Consider using child routes instead`:``;console.error(Error(`Warning: Param segments "${e}" includes invalid characters.${t}`))}return{type:`param`,name:t}}return{type:`dir`,name:e}}function Oct(e){let[t]=e.split(`?`);return{raw:e,segments:t.split(`/`).map(Dct).filter(Boolean)}}function kct(e){return Array.isArray(e)?e:e?[e]:[]}function Act(e){return SO(e)}function R4(e,t,n){return{type:`error`,node:e,missingKeys:t,unmappableStateKeys:n}}function z4(e,t,n,r){return{type:`ok`,node:e,matchedState:t,searchParams:n,child:r}}function jct(e,t){if(!t)return z4(e,{},[]);let{_searchParams:n=[],...r}=(e.scope?t[e.scope]:t)||{},i=e.route.segments.filter(e=>e.type===`param`).map(e=>e.name),a=Act(r)?Object.keys(r):[],o=bU(a,i),s=NO(i,o),c=NO(a,o);if(s.length>0)return R4(e,s,[]);let l=n.map(([e,t])=>[[e],t]),u=OO(r,o);if(c.length===0)return z4(e,u,l);let d=kct((typeof e.children==`function`?e.children(Act(r)?r:{}):e.children)||[]);if(c.length>0&&d.length===0)return R4(e,[],c);let f=OO(r,c),p=d.map(e=>jct(e,f)).find(e=>e.type===`ok`);return p?z4(e,u,l,p):R4(e,[],c)}function Mct(e,t){let n=[...String(e)],r=``;for(let e=0;e<n.length;e++){let i=n[e];t.includes(i)?r+=i:r+=encodeURIComponent(i)}return r}var B4=Ik(`state-router`);function Nct(e,t){B4(`Resolving path from state %o`,t);let n=jct(e,t);if(n.type===`error`){let e=n.unmappableStateKeys;if(e.length>0)throw Error(`Unable to find matching route for state. Could not map the following state key${e.length==1?``:`s`} to a valid url: ${e.map(Vct).join(`, `)}`);let t=n.missingKeys;throw Error(`Unable to find matching route for state. State object is missing the following key${t.length==1?``:`s`} defined in route: ${t.map(Vct).join(`, `)}`)}let{path:r,searchParams:i}=zct(n),a=i.length>0?Fct(i):``;return`/${r.join(`/`)}${a?`?${a}`:``}`}function Pct(e){return`[${e}]`}function Fct(e){return e.flatMap(([e,t])=>t===void 0?[]:[Rct(Ict(e)),Lct(t)].join(`=`)).join(`&`)}function Ict(e){let[t,...n]=e;return n.length>0?[t,...n.map(Pct)].join(``):t}function Lct(e){return Mct(e,`/`)}function Rct(e){return Mct(e,`[]`)}function zct(e){let t=e.matchedState,n=e.node.route.segments.map(n=>{if(n.type===`dir`)return n.name;let r=e.node.transform&&e.node.transform[n.name];return r?r.toPath(t[n.name]):t[n.name]}),r=e.child?zct(e.child):void 0,i=r?.searchParams?[...e.searchParams,...r.searchParams]:e.searchParams;return{searchParams:Bct(e.node,i),path:[...n||[],...r?.path||[]]}}function Bct(e,t){let n=e.scope;return n&&!e.__unsafe_disableScopedSearchParams?t.map(([e,t])=>[[n,...e],t]):t}function Vct(e){return`"${e}"`}function Hct(e){return e.map(([e,t])=>[Uct(e),t])}function Uct(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e.indexOf(`[`,n);if(i===-1){t.push(e.slice(n,e.length));break}if(r===1)throw Error(`Nested brackets not supported`);r=1,i>n&&(t.push(e.slice(n,i)),n=i);let a=e.indexOf(`]`,i);if(a===-1){if(r===1)throw Error(`Unclosed bracket`);break}r=0,t.push(e.slice(n+1,a)),n=a+1}return t}function Wct(e,t,n){let r=t.split(`/`).filter(Boolean),i=e.route.segments.length;if(r.length<i)return null;let a={};if(!e.route.segments.every((t,n)=>{if(t.type===`dir`)return t.name===r[n];let i=e.transform&&e.transform[t.name];return a[t.name]=i?i.toState(r[n]):r[n],!0}))return null;let o=r.slice(i),s=null,c=typeof e.children==`function`?kct(e.children(a)):e.children,l=Kct(e.scope,n);if(c.some(e=>{if(e){let t=e.scope?l.filter(([t])=>e.scope===t[0]):l;return s=Wct(e,o.join(`/`),t),s}}),o.length>0&&!s)return null;let u=l.flatMap(([e,t])=>e.length===1?[[e[0],t]]:[]),d={...a,...s===null?{}:s,...u.length>0?{_searchParams:u}:{}};return e.scope?{[e.scope]:d}:d}function Gct(e,t){B4(`resolving state from path %s`,t);let[n,r]=t.split(`?`),i=Wct(e,n,Hct(Array.from(new URLSearchParams(r).entries())));return B4(`resolved: %o`,i||null),i||null}function Kct(e,t){return e?t.map(([t,n])=>[t[0]===e?t.slice(1):t,n]):t}function qct(e){return Xct(e).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/[=]+$/,``)}function Jct(e){return Qct(e.replace(/-/g,`+`).replace(/_/g,`/`))}function Yct(e){return String.fromCharCode(parseInt(e.slice(1),16))}function Xct(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,Yct))}function Zct(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}function
Line truncated
|
||||
`)}function Jdt(e,t){return m3(e,t).map(e=>`children`in e&&Array.isArray(e.children)?e.children.map(e=>typeof e.text==`string`?e.text:``).join(``):``).join(` `).replace(/[\t\n]/g,` `)}function Ydt(e,t,n,r){return[{_key:t._key},e.rowsField,{_key:n._key},e.cellsField,{_key:r._key}]}function A3(e,t){return e?t.some(t=>iJ(t,e.anchor.path)||iJ(t,e.focus.path)):!1}function Xdt(e){let{isCell:t,isRow:n,isTable:r}=d3(e);return[OY({on:`custom.unset.row`,guard:({snapshot:i,event:a})=>{let o=Gq(i,a.at,{match:n});if(!o)return!1;let s=bq(i,o.path,{match:r});if(!s)return!1;let c=f3(e,s.node),l=c.findIndex(e=>e._key===o.node._key);if(l===-1)return!1;let u=c[l+1]??c[l-1];if(!u)return!1;let d=Gq(i,a.at,{match:t}),f=d?p3(e,o.node).findIndex(e=>e._key===d.node._key):0,p=Math.min(Math.max(f,0),p3(e,u).length-1),m=p3(e,u).at(p);if(!m)return!1;let h=[...s.path,e.rowsField,{_key:u._key},e.cellsField,{_key:m._key}];return{rowPath:o.path,columnIndex:p,neighborCellPath:h}},actions:[({snapshot:e},{rowPath:t,neighborCellPath:n})=>{let r=[EY({type:`unset`,at:t})];if(A3(e.context.selection,[t])){let t=Zq(e,n,{edge:`start`});if(t){let e={path:t.path,offset:0};r.push(EY({type:`select`,at:{anchor:e,focus:e}}))}}return r}]}),OY({on:`custom.unset.column`,guard:({snapshot:i,event:a})=>{let o=Gq(i,a.at,{match:t});if(!o)return!1;let s=bq(i,o.path,{match:n});if(!s)return!1;let c=p3(e,s.node).findIndex(e=>e._key===o.node._key);if(c===-1)return!1;let l=bq(i,s.path,{match:r});if(!l||p3(e,s.node).length<=1)return!1;let u=c+1<p3(e,s.node).length?c+1:c-1,d=p3(e,s.node).at(u);if(!d)return!1;let f=[...s.path,e.cellsField,{_key:d._key}];return{cellPaths:f3(e,l.node).flatMap(t=>{let n=p3(e,t).at(c);return n?[[...l.path,e.rowsField,{_key:t._key},e.cellsField,{_key:n._key}]]:[]}),neighborCellPath:f}},actions:[({snapshot:e},{cellPaths:t,neighborCellPath:n})=>{let r=t.map(e=>EY({type:`unset`,at:e}));if(A3(e.context.selection,t)){let t=Zq(e,n,{edge:`start`});if(t){let e={path:t.path,offset:0};r.push(EY({type:`select`,at:{anchor:e,focus:e}}))}}return r}]}),OY({on:`custom.unset.table`,guard:({snapshot:e,event:t})=>{let n=Gq(e,t.at,{match:r});if(!n)return!1;let i=Bq(e,n.path,{direction:`next`}),a=Bq(e,n.path,{direction:`previous`});return{tablePath:n.path,neighborBlockPath:i?.path??a?.path}},actions:[({snapshot:e},{tablePath:t,neighborBlockPath:n})=>{let r=[EY({type:`unset`,at:t})];if(n&&A3(e.context.selection,[t])){let t=Zq(e,n,{edge:`start`});if(t){let e={path:t.path,offset:0};r.push(EY({type:`select`,at:{anchor:e,focus:e}}))}}return r}]})]}function Zdt(e={}){let t=e.containers??{},n=j3(t.table??nft,$dt),r=j3(t.row??rft,eft),i=j3(t.cell??ift,tft);for(let[e,t]of[[`table`,n],[`row`,r]])t.of&&console.warn(`[@portabletext/plugin-table] The ${e} definition ('${t.type}') declares an \`of\`, which \`defineTable\` owns: the nesting is grafted as table.of → row.of → cell. The declared \`of\` is ignored. Cell-scoped node definitions belong on the cell definition's \`of\`.`);let a={tableType:n.type,rowsField:n.arrayField,rowType:r.type,cellsField:r.arrayField,cellType:i.type,valueField:i.arrayField};hdt(a);let o={...n,of:[{...r,of:[i]}]},s=Qdt(a);function c(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(I2,{nodes:[o]}),(0,Q.jsx)(F2,{behaviors:s})]}),e[0]=t):t=e[0],t}return{Plugin:c,behaviors:s,createBlock:({rows:e=3,columns:t=3,headerRows:n}={})=>({_type:a.tableType,...n===void 0?{}:{headerRows:n},[a.rowsField]:Array.from({length:e},()=>({_type:a.rowType,[a.cellsField]:Array.from({length:t},()=>({_type:a.cellType,[a.valueField]:[{_type:`block`,style:`normal`,markDefs:[],children:[{_type:`span`,text:``,marks:[]}]}]}))}))}),getTableSelection:e=>_3(e,a),...d3(a)}}function Qdt(e){return[...xdt(e),...Xdt(e),...Sdt(e),...vdt(e),...Ddt(e),...Wdt(e),...bdt(e),...Gdt(e),...Ldt(e)]}var $dt=({attributes:e,children:t})=>(0,Q.jsx)(`table`,{...e,children:(0,Q.jsx)(`tbody`,{children:t})}),eft=({attributes:e,children:t})=>(0,Q.jsx)(`tr`,{...e,children:t}),tft=({attributes:e,children:t})=>(0,Q.jsx)(`td`,{...e,children:t}),nft=P2({type:`table`,arrayField:`rows`}),rft=P2({type:`row`,arrayField:`cells`}),ift=P2({type:`cell`,arrayField:`value`});function j3(e,t){return e.render?e:{...e,render:t}}var M3=`var(--pt-plugin-table-accent)`,N3=`var(--pt-plugin-table-border)`,aft=`var(--pt-plugin-table-header-bg)`,P3=`var(--pt-plugin-table-header-weight, 600)`,F3=`var(--pt-plugin-table-selected-bg)`,I3=`var(--pt-plugin-table-radius)`;function oft(e,t,n){return!n||e<n.r0||e>n.r1||t<n.c0||t>n.c1?{top:!1,bottom:!1,left:!1,right:!1,inside:!1}:{top:e===n.r0,bottom:e===n.r1,left:t===n.c0,right:t===n.c1,inside:!0}}function sft(e,t,n,r){let i={};return e===0&&t===0&&(i.borderTopLeftRadius=I3),e===0&&t===r-1&&(i.borderTopRightRadius=I3),e===n-1&&t===0&&(i.borderBottomLeftRadius=I3),e===n-1&&t===r-1&&(i.borderBottomRightRadius=I3),i}function cft(e,t,n){return!!n&&t+1===n.c0&&e>=n.r0&&e<=n.r1}function lft(e,t,n){return!!n&&e+1===n.r0&Line truncated
|
||||
To pick up a draggable item, press the space bar.
|
||||
While dragging, use the arrow keys to move the item.
|
||||
Press space again to drop the item in its new position, or press escape to cancel.
|
||||
`},Opt={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function kpt(e){let{announcements:t=Opt,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Dpt}=e,{announce:a,announcement:o}=Cpt(),s=o6(`DndLiveRegion`),[c,l]=(0,$.useState)(!1);if((0,$.useEffect)(()=>{l(!0)},[]),Tpt((0,$.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=$.createElement($.Fragment,null,$.createElement(xpt,{id:r,value:i.draggable}),$.createElement(Spt,{id:s,announcement:o}));return n?(0,WI.createPortal)(u,n):u}var f6;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(f6||={});function p6(){}function Apt(e,t){return(0,$.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function jpt(){var e=[...arguments];return(0,$.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var m6=Object.freeze({x:0,y:0});function Mpt(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Npt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Ppt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Fpt(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Ipt(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function Lpt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Rpt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Lpt(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Mpt(Lpt(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(Npt)},zpt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Fpt(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=Fpt(r),o=i.reduce((e,t,r)=>e+Mpt(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(Npt)};function Bpt(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var Vpt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=Bpt(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(Ppt)};function Hpt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Upt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:m6}function Wpt(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var Gpt=Wpt(1);function Kpt(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function qpt(e,t,n){let r=Kpt(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Jpt={ignoreTransform:!1};function h6(e,t){t===void 0&&(t=Jpt);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Y3(e).getComputedStyle(e);t&&(n=qpt(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function Ypt(e){return h6(e,{ignoreTransform:!0})}function Xpt(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Zpt(e,t){return t===void 0&&(t=Y3(e).getComputedStyle(e)),t.position===`fixed`}function Qpt(e,t){t===void 0&&(t=Y3(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function g6(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)r
Line truncated
|
||||
(
|
||||
${n.wildcards}
|
||||
extension in [${n.extensions}] ||
|
||||
mimeType in [${n.mimes}]
|
||||
)`},kvt=(e=0,t=200,n=Dvt,r)=>`
|
||||
*[_type == "${n}" ${r.length>0?Ovt(r):``}] | order(_updatedAt desc) [${e}...${t}] {
|
||||
_id,
|
||||
_updatedAt,
|
||||
_createdAt,
|
||||
url,
|
||||
originalFilename,
|
||||
mimeType,
|
||||
extension,
|
||||
size,
|
||||
metadata {dimensions}
|
||||
}
|
||||
`;function Avt(e){let t=(0,Z.c)(68),{ref:n,selectedAssets:r,assetType:i,dialogHeaderTitle:a,onClose:o,onSelect:s,accept:c}=e,l=i===void 0?`image`:i,u=pb(mb),[d]=(0,$.useState)(Mvt),f=(0,$.useRef)(0),{t:p}=ox(),m=KE(),h=(0,$.useRef)(void 0),g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=[],t[0]=g):g=t[0];let[_,v]=(0,$.useState)(g),[y,b]=(0,$.useState)(!1),[x,S]=(0,$.useState)(!1),[C,w]=(0,$.useState)(!0),T=c&&c===`image/*`&&l===`image`,E;t[1]!==c||t[2]!==l||t[3]!==u||t[4]!==p||t[5]!==m?(E=e=>{let t=e*200,n=t+200,r=l===`image`,i=r?`asset.image-list`:`asset.file-list`,a=r?Dvt:`sanity.fileAsset`;w(!0),c!==void 0&&(h.current=u.observable.fetch(kvt(t,n,a,c),{},{tag:i}).subscribe({next:e=>{b(e.length<200),v(t=>t.concat(e)),w(!1)},error:t=>{console.error(t),w(!1),f.current=e>0?e-1:0,m.push({status:`error`,title:p(`asset-source.dialog.load-error`)})}}))},t[1]=c,t[2]=l,t[3]=u,t[4]=p,t[5]=m,t[6]=E):E=t[6];let D=E,O;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{v(t=>t.filter(t=>t._id!==e))},t[7]=O):O=t[7];let k=O,A;t[8]!==_||t[9]!==s?(A=e=>{_.find(t=>t._id===e)&&s([{kind:`assetDocumentId`,value:e}])},t[8]=_,t[9]=s,t[10]=A):A=t[10];let j=A,M;t[11]===j?M=t[12]:(M=e=>{e.preventDefault();let t=e.currentTarget.getAttribute(`data-id`);if(!t)throw Error(`Missing data-id attribute on item`);j(t)},t[11]=j,t[12]=M);let N=M,P;t[13]===j?P=t[14]:(P=e=>{if(e.key===`Enter`){e.preventDefault();let t=e.currentTarget.getAttribute(`data-id`);if(!t)throw Error(`Missing data-id attribute on item`);j(t)}},t[13]=j,t[14]=P);let F=P,I;t[15]===o?I=t[16]:(I=()=>{o&&o()},t[15]=o,t[16]=I);let L=I,R;t[17]===D?R=t[18]:(R=e=>{e.preventDefault(),D(f.current+=1)},t[17]=D,t[18]=R);let z=R,B,V;t[19]===D?(B=t[20],V=t[21]):(V=()=>(D(f.current),()=>{h.current&&h.current.unsubscribe()}),B=[D],t[19]=D,t[20]=B,t[21]=V),(0,$.useEffect)(V,B);let H,U;t[22]===C?(H=t[23],U=t[24]):(H=()=>{!C&&(!f.current||f.current===0)&&S(!0)},U=[C],t[22]=C,t[23]=H,t[24]=U),(0,$.useEffect)(H,U);let W;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(W={style:`narrow`},t[25]=W):W=t[25];let ee=hB(W),te;t[26]!==l||t[27]!==a||t[28]!==p?(te=a||p(`asset-source.dialog.default-title`,{context:l===`sanity.video`?`video`:l}),t[26]=l,t[27]=a,t[28]=p,t[29]=te):te=t[29];let ne;t[30]!==c||t[31]!==T||t[32]!==C||t[33]!==ee||t[34]!==p?(ne=!T&&!C&&c?.length>0&&(0,Q.jsx)(yt,{tone:`primary`,padding:3,border:!0,radius:2,children:(0,Q.jsxs)(bn,{gap:3,alignItems:`center`,children:[(0,Q.jsx)(Y,{size:1,children:(0,Q.jsx)(ur,{})}),(0,Q.jsx)(Y,{size:1,children:(0,Q.jsx)(_B,{t:p,i18nKey:`asset-source.dialog.accept-message`,values:{acceptTypes:ee.format(c.split(`,`).map(jvt))}})})]})}),t[30]=c,t[31]=T,t[32]=C,t[33]=ee,t[34]=p,t[35]=ne):ne=t[35];let re;t[36]!==l||t[37]!==_||t[38]!==N||t[39]!==F||t[40]!==C||t[41]!==r?(re=l===`file`&&(0,Q.jsx)(yvt,{assets:_,onDeleteFinished:k,onClick:N,onKeyPress:F,isLoading:C,selectedAssets:r}),t[36]=l,t[37]=_,t[38]=N,t[39]=F,t[40]=C,t[41]=r,t[42]=re):re=t[42];let ie;t[43]!==l||t[44]!==_||t[45]!==N||t[46]!==F||t[47]!==C||t[48]!==r?(ie=l===`image`&&(0,Q.jsx)(Evt,{assets:_,onDeleteFinished:k,onItemClick:N,onItemKeyPress:F,isLoading:C,selectedAssets:r}),t[43]=l,t[44]=_,t[45]=N,t[46]=F,t[47]=C,t[48]=r,t[49]=ie):ie=t[49];let ae;t[50]!==_.length||t[51]!==z||t[52]!==y||t[53]!==C||t[54]!==p?(ae=_.length>0&&!y&&(0,Q.jsx)(yt,{className:`_5hlm4s0`,tone:`default`,padding:4,children:(0,Q.jsx)(bn,{flexDirection:`column`,children:(0,Q.jsx)(dR,{type:`button`,icon:kr,loading:C,onClick:z,size:`large`,text:p(`asset-source.dialog.load-more`),tone:`primary`})})}),t[50]=_.length,t[51]=z,t[52]=y,t[53]=C,t[54]=p,t[55]=ae):ae=t[55];let oe;t[56]!==ne||t[57]!==re||t[58]!==ie||t[59]!==ae?(oe=(0,Q.jsxs)(Sn,{gap:5,children:[ne,re,ie,ae]}),t[56]=ne,t[57]=re,t[58]=ie,t[59]=ae,t[60]=oe):oe=t[60];let se;return t[61]!==d||t[62]!==L||t[63]!==x||t[64]!==n||t[65]!==te||t[66]!==oe?(se=(0,Q.jsx)(hR,{__unstable_autoFocus:x,header:te,id:d,onClickOutside:L,onClose:L,ref:n,width:2,children:oe}),t[61]=d,t[62]=L,t[63]=x,t[64]=n,t[65]=te,t[66]=oe,t[67]=se):se=t[67],se}function jvt(e){return e.trim()}function Mvt(){return`default-asset-source-${L4()}`}var Nvt=(0,$.memo)(Avt);function Pvt(e){let t=(0,Z.c)(3),{ref:n,action:r}=e;if((r===void 0?`select`:r)===`select`){let r;return t[0]!==e||t[1]!==n?(r=(0,Q.jsx)(Nvt,{...e,ref:n}),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}return null}var Fvt=(0,$.memo)(Pvt);function y8(e,t){return t.name===e||!!(t.type&&y8(e,t.type))}var b8=class extends Error{message;error;code;constructor(e,t,n){super(e),this.message=e,this.error=t,this.code=n}};function Ivt(e,t){return e.request({url:`/media-libraries?organizationId=${t}`,method:`GET`}).pipe(G(e=>Array.isArray(e.data)?C(e.data):et))}function Lvt(e,t){return e.request({url:`/media-libraries/${t}`,method:`GET`}).pipe(na(async e=>{if(e.organizationId)return e.organizationId;throw new b8(`Library ID not found`,`Library ID not found`,`ERROR_NO_LIBRARY_FOUND`)}))}function Rvt(e,t){return e.request({url:`/projects/${t}`,method:`GET`}).pipe(na(async
Line truncated
|
||||
`),E].join(`
|
||||
`),options:{tag:o,perspective:n,variant:r},params:O,sortOrder:C,compiledSortEntries:S}}function nSt({lastResult:e,sortOrder:t,compiledSortEntries:n}){if(!e)return;let r=t.some(({field:e})=>e===`_id`)?t:t.concat({field:`_id`,direction:`asc`});return r.reduce((t,i,a)=>[t,`(${r.slice(0,a).map((t,r)=>iSt(t,e,`==`,n?.[r])).concat(iSt(i,e,void 0,n?.[a])).filter(e=>e!==void 0).join(` && `)})`].filter(e=>e!==void 0).join(` || `),void 0)}var rSt={asc:`>`,desc:`<`};function iSt(e,t,n=rSt[e.direction],r){if(e.field===`_id`&&n===`==`)return;if(r){let e=aSt(t,r.projectionIndex);return[r.expression,n,JSON.stringify(e)].join(` `)}let i=t[e.field];return[e.field,n,JSON.stringify(i)].join(` `)}function aSt(e,t){let n=e[J8];if(Array.isArray(n))return n[t]}function oSt(e,t){return typeof e==`string`?{query:e,types:t}:e.types.length?e:{...e,types:t}}var sSt=(e,t,n)=>function(r,i={}){let a=oSt(r,e),o={...n,...i},s=typeof r==`string`?r:r.query,c=a.types.flatMap(e=>Sxt({schemaType:e,maxDepth:o.maxDepth||5})),l=c.reduce((e,t)=>Math.max(e,t.weight),0),u=e=>{let{query:n,params:s,options:c,sortOrder:u,compiledSortEntries:d}=tSt(a,r,o,{referenceIds:e,referenceWeight:l});return t.observable.fetch(n,s,c).pipe(K(e=>{let t=i.limit!==void 0&&e.length>i.limit,n=t?e.at(-2):e.at(-1);return{type:`groq2024`,hits:e.map(e=>({hit:e})).slice(0,i.limit??s.__limit-1),nextCursor:t?nSt({lastResult:n,sortOrder:u,compiledSortEntries:d}):void 0}}))},d=s?Oxt(c,s):void 0;return d===void 0?u():t.observable.fetch(d.query,d.params,{tag:o.tag,perspective:o.perspective,variant:o.variant}).pipe(Ge(()=>nt([])),Ee(e=>{let t=Array.from(new Set((e??[]).filter(e=>typeof e==`string`).map(e=>zn(e))));return u(t.length>0?t:void 0)}))},cSt=(e,t)=>{let{phrases:n,words:r}=pSt(e),[i,a]=dSt(n,t),[o,s]=fSt(r,t);return[i+o,[s,a].join(`, `)]},lSt=e=>typeof e==`string`?e:JSON.stringify(e);function uSt(e,t,n=[]){let r=pO(e,e=>e.typeName);return t.map((e,i)=>{let a=(r[e._type].paths||[])?.map((t,r)=>{let i=lSt(e[`w${r}`]);if(!i)return{path:t.path,score:0,why:`No match`};let[a,o]=cSt(n,i);return{path:t.path,score:a*t.weight,why:`${o} (*${t.weight})`}}),o=a.reduce((e,t)=>e+t.score,0);return{hit:e,resultIndex:t.length-i,score:o,stories:a}})}function dSt(e,t){let n=t.toLowerCase().trim(),r=0,i=0;return e.forEach(e=>{n.includes(e)&&(r+=e.length/n.length,i+=e.length)}),r===1?[1,`[Phrase] Exact match`]:[r/2,`[Phrase] Matched ${i} of ${n.length} characters`]}function fSt(e,t){let n=bO(Y4(Jk(X4(t)))),r=bU(e,n),i=Ilt(n,e),a=r.length/i.length;return a===1?[1,`[Word] Exact match`]:[a/2,`[Word] Matched ${r.length} of ${i.length} terms: [${r.join(`, `)}]`]}function pSt(e){let[t,n]=Lk(bO(e.map(X4)),e=>/^".*"$/.test(e));return{phrases:bO(t).map(X4).map(mSt),words:bO(n.map(X4))}}function mSt(e){return e.replace(/^"(.*)"$/,`$1`)}var hSt=new WeakMap,gSt={title:10,subtitle:5,description:1.5},_St={_id:{weight:1,type:`string`},_type:{weight:1,type:`string`}},vSt=[`reference`,`crossDatasetReference`,`slug`],Y8=e=>e?[e,...Y8(e.type)]:[],X8=e=>e?.jsonType===`array`&&e.of.some(e=>Y8(e).some(({name:e})=>e===`block`)),ySt=e=>e?e?.jsonType===`string`:!1,bSt=e=>Y8(e).some(({jsonType:e,name:t})=>e===`object`&&t===`slug`),xSt=e=>MN(e)&&`search`in e&&MN(e.search);function SSt(e){return e!==void 0&&`name`in e}function CSt(e,t){return bSt(e)?[t,`current`].join(`.`):t}function Z8(e,t,n){function r(e,i,a,o=[]){if(!e||a>t)return o;let s=Y8(e);if(ySt(e)||X8(e)){let t=n(e,i);return typeof t==`number`&&o.push({path:i,weight:t,type:X8(e)?`pt`:`string`}),o}if(bSt(e)){let t=n(e,i);return typeof t==`number`&&o.push({path:CSt(e,i),weight:t,type:X8(e)?`pt`:`string`}),o}let c=o;for(let e of s)if(e.jsonType===`object`&&e.fields?.length&&!vSt.includes(e.name))for(let t of e.fields)c=r(t.type,fN([i,t.name].filter(Boolean)),a+1,c);else if(e.jsonType===`array`&&e.of?.length)for(let t of e.of)c=r(t,`${i}[]`,a+1,c);return c}return SSt(e)?r(e,``,0).reduce((e,{path:t,weight:n,type:r})=>(e[t]={weight:n,type:r,path:t},e),{}):{}}var wSt=e=>{let t=Y8(e).map(e=>e.options).find(xSt);return typeof t?.search?.weight==`number`?t.search.weight:null},TSt=e=>Y8(e).some(e=>e.hidden)?0:null,ESt=e=>typeof(wSt(e)??TSt(e))==`number`?null:1,DSt=(e,t,n)=>{let r=e?.preview?.select;if(!r)return null;let i=Object.fromEntries(Object.entries(r).map(([e,t])=>[t.replace(/\.\d+/g,`[]`),e])),a=Z8(e,t,ESt),o=Object.fromEntries(Object.entries(a).map(([e,{type:t}])=>({path:e,type:t})).filter(({path:e})=>i[e]).map(({path:e,type:t})=>[e,{type:t,weight:gSt[i[e]]}]));return n?Object.fromEntries(Object.entries(i).map(([e,t])=>[e,{path:e,type:`string`,weight:gSt[t]}])):Z8(e,t,(e,t)=>{let n=o[CSt(e,t)];return n?n.weight:null})};function OSt({schemaType:e,maxDepth:t,isCrossDataset:n,processPaths:r=e=>e}){let i=hSt.get(e);if(i)return i;let a=Z8(e,t,wSt),o=Z8(e,t,TSt),s=Z8(e,t,ESt),c=DSt(e,t,n),l={..._St,...s,...o,...c,...a},u={typeName:SSt(e)?e.name:e.type,paths:r(Object.entries(l).map(([e,{type:t,weight:n}])=>({path:e,weight:n,...t===`pt`&&{mapWith:`pt::text`}})))};return hS
Line truncated
|
||||
`)})`:``,S=[...b,y,x].filter(Boolean).join(`, `),C=[`*[${m.join(` && `)}]`,`{${S}}`,`| order(${$xt(v)})`,`[0...$__limit]`].join(` `),w=[`findability-mvi:4`].concat(d||[]).map(e=>`// ${e}`).join(`
|
||||
`);return{query:w?`${w}\n${C}`:C,params:{...LSt(p),__types:f.map(e=>e.typeName),__limit:u??1e3,...r},options:{tag:i,perspective:s,variant:c},searchSpec:f,terms:p}}var LSt=e=>e.reduce((e,t,n)=>(e[`t${n}`]=`${t}*`,e),{});function RSt(e,t){return typeof e==`string`?{query:e,types:t}:e.types.length?e:{...e,types:t}}var zSt={groqLegacy:(e,t,n)=>function(r,i={}){let{query:a,params:o,options:s,searchSpec:c,terms:l}=ISt(RSt(r,e),{...n,...i});return gb(t,iP(s?.variant,rP(s?.perspective)?nP.apiVersion:void 0)).observable.fetch(a,o,s).pipe(n.unique?K(fx):Ue(),K(e=>uSt(c,e,l)),i?.skipSortByScore?Ue():K(e=>FO(e,e=>-e.score)),K(e=>({type:`weighted`,hits:e})))},groq2024:sSt},Q8=(e,t,n)=>{let r=zSt[n.strategy??`groqLegacy`];return r(e,gb(t,iP(n?.variant,rP(n?.perspective)?nP.apiVersion:void 0)),n)};function BSt(){return lf({types:{},actors:{search:Pd(()=>ye(()=>Error(`The 'search' actor is not implemented. Add it to searchMachine.provide({actors: {search: fromObservable(({input}) => ...)}})`)))},guards:{"is same query":()=>!1,"should search":()=>!0},delays:{debounce:({context:e})=>e.debounceMs}}).createMachine({context:({input:e})=>({debounceMs:e.debounceMs??0,error:null,query:null,result:null,searchInterrupted:!1,settledQuery:null}),initial:`idle`,on:{search:[{guard:`is same query`},{target:`.debouncing`,actions:Hd({query:({event:e})=>e.query,searchInterrupted:!1})}]},states:{idle:{},debouncing:{on:{search:[{guard:`is same query`},{target:`debouncing`,reenter:!0,actions:Hd({query:({event:e})=>e.query})}]},after:{debounce:[{guard:`should search`,target:`searching`,actions:Xd({type:`search started`})},{target:`skipped`,actions:Xd({type:`search started`})}]}},searching:{on:{search:[{guard:`is same query`},{target:`debouncing`,actions:Hd({query:({event:e})=>e.query,searchInterrupted:!0})}]},entry:Hd({error:null}),invoke:{src:`search`,input:({context:e})=>({query:e.query}),onSnapshot:{guard:({event:e})=>e.snapshot.context!==void 0,target:`.streaming`,actions:[Hd({result:({event:e})=>e.snapshot.context,settledQuery:({context:e})=>e.query}),Xd(({event:e})=>({type:`search completed`,result:e.snapshot.context}))]},onDone:{target:`success`},onError:{target:`failure`,actions:Hd({error:({event:e})=>e.error instanceof Error?e.error:Error(String(e.error)),result:null})}},initial:`pending`,states:{pending:{},streaming:{}}},success:{entry:Hd({settledQuery:({context:e})=>e.query})},failure:{entry:[Hd({settledQuery:({context:e})=>e.query}),Xd(({context:e})=>({type:`search failed`,error:e.error}))]},skipped:{entry:[Hd({settledQuery:({context:e})=>e.query,result:null}),Xd({type:`search skipped`})]}}})}var $8={isLoading:!0,settings:{partialIndexSettings:{maxFieldDepth:0}}};function VSt({client:e}){let{projectId:t,dataset:n}=e.config();return e.observable.request({url:`/projects/${t}/datasets/${n}/settings/indexing`,tag:`search.getPartialIndexSettings`})}var e5=new Map;function t5(e){let t=(0,Z.c)(4),n=db().search?.unstable_partialIndexing?.enabled,r=pb(mb),i=e||r,a;t[0]===i?a=t[1]:(a=i.config(),t[0]=i,t[1]=a);let o=a.dataset;n||e5.set(o,nt($8.settings)),e5.has(o)||e5.set(o,VSt({client:i}).pipe(re()));let s;t[2]===o?s=t[3]:(s=e5.get(o).pipe(K(USt),Ma($8),Ge(HSt)),t[2]=o,t[3]=s);let c=ZE(s,$8)?.settings?.partialIndexSettings?.maxFieldDepth;return Rk(c)?Math.min(c,5):5}function HSt(e){return console.error(e),nt({isLoading:!1,enabled:!0,settings:{partialIndexSettings:{maxFieldDepth:0}}})}function USt(e){return{isLoading:!1,settings:e}}function WSt(e){return!!e.Uploader||e.uploadMode===`component`}function n5(e){return e.uploadMode===`component`}function r5(e){return e.filter(WSt)}function i5(e,t,n){return(e.i18nKey?t(e.i18nKey):e.title)||(n?.useStartCaseForName?$k(e.name):e.name)}function GSt(e,t=2){if(e===0)return`0 Bytes`;let n=1024,r=t<0?0:t,i=[`Bytes`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],a=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/n**a).toFixed(r))} ${i[a]}`}function KSt(e){let t=(0,Z.c)(6),n=(0,$.use)(e.promise),r;t[0]!==n||t[1]!==e.children||t[2]!==e.waitPlaceholder?(r=n?e.children(n):e.waitPlaceholder,t[0]=n,t[1]=e.children,t[2]=e.waitPlaceholder,t[3]=r):r=t[3];let i;return t[4]===r?i=t[5]:(i=(0,Q.jsx)(Q.Fragment,{children:r}),t[4]=r,t[5]=i),i}function a5(e){let t=(0,Z.c)(14),{reference:n,children:r,observeAsset:i,waitPlaceholder:a}=e,o=n?._ref,s;t[0]!==o||t[1]!==i?(s=o?i(o):Ri,t[0]=o,t[1]=i,t[2]=s):s=t[2];let c=s,l=!o,u;t[3]===l?u=t[4]:(u={disabled:l},t[3]=l,t[4]=u);let d=_be(c,u);if(!o){let e;return t[5]===a?e=t[6]:(e=(0,Q.jsx)(Q.Fragment,{children:a}),t[5]=a,t[6]=e),e}let f;t[7]!==r||t[8]!==d||t[9]!==a?(f=(0,Q.jsx)(KSt,{promise:d,waitPlaceholder:a,children:r}),t[7]=r,t[8]=d,t[9]=a,t[10]=f):f=t[10];let p;return t[11]!==f||t[12]!==a?(p=(0,Q.jsx)($.Suspense,{fallback:a,children:f}),t[11]=f,t[12]=a,t[13]=p):p=t[13],p}function o5(){let e=(0,$.useContext)(Po);if(!e)throw Error(`FormBuilder: missing context value`);return e}function qSt(e,t){return new Promise((n,r)=>{let i=new XMLHttpRequest;i.onload=()=>{let e=new FileR
Line truncated
|
||||
`)||void 0,t[44]=N,t[45]=P);let F=P,I=n.field.value,L=n.field.schemaType,R=n.field.displayInlineChanges??!1,z;t[46]!==j||t[47]!==b||t[48]!==n.field.__unstable_computeDiff||t[49]!==n.field.baseVariantValue||t[50]!==n.field.changed||t[51]!==n.field.changedFromBaseVariant||t[52]!==n.field.compareValue||t[53]!==n.field.focused||t[54]!==n.field.hasBaseVariant||t[55]!==n.field.hasUpstreamVersion||t[56]!==n.field.id||t[57]!==n.field.level||t[58]!==n.field.path||t[59]!==n.field.presence||t[60]!==n.field.readOnly||t[61]!==I||t[62]!==L||t[63]!==R||t[64]!==N||t[65]!==F?(z={value:I,compareValue:n.field.compareValue,__unstable_computeDiff:n.field.__unstable_computeDiff,readOnly:n.field.readOnly,schemaType:L,changed:n.field.changed,hasUpstreamVersion:n.field.hasUpstreamVersion,changedFromBaseVariant:n.field.changedFromBaseVariant,baseVariantValue:n.field.baseVariantValue,hasBaseVariant:n.field.hasBaseVariant,id:n.field.id,path:n.field.path,focused:n.field.focused,level:n.field.level,onChange:b,validation:N,presence:n.field.presence,validationError:F,elementProps:j,displayInlineChanges:R},t[46]=j,t[47]=b,t[48]=n.field.__unstable_computeDiff,t[49]=n.field.baseVariantValue,t[50]=n.field.changed,t[51]=n.field.changedFromBaseVariant,t[52]=n.field.compareValue,t[53]=n.field.focused,t[54]=n.field.hasBaseVariant,t[55]=n.field.hasUpstreamVersion,t[56]=n.field.id,t[57]=n.field.level,t[58]=n.field.path,t[59]=n.field.presence,t[60]=n.field.readOnly,t[61]=I,t[62]=L,t[63]=R,t[64]=N,t[65]=F,t[66]=z):z=t[66];let B=z,V=B,H=n.field.schemaType,U=n.field.value,W;t[67]!==B||t[68]!==r?(W=(0,Q.jsx)(awt,{...B,render:r}),t[67]=B,t[68]=r,t[69]=W):W=t[69];let ee;return t[70]!==a||t[71]!==n.field.changed||t[72]!==n.field.changedFromBaseVariant||t[73]!==n.field.id||t[74]!==n.field.level||t[75]!==n.field.path||t[76]!==n.field.presence||t[77]!==n.field.schemaType.description||t[78]!==n.field.schemaType.title||t[79]!==n.index||t[80]!==n.name||t[81]!==i||t[82]!==V||t[83]!==H||t[84]!==U||t[85]!==W||t[86]!==N?(ee=(0,Q.jsx)(owt,{actions:a,changed:n.field.changed,changedFromBaseVariant:n.field.changedFromBaseVariant,description:n.field.schemaType.description,index:n.index,inputId:n.field.id,inputProps:V,level:n.field.level,name:n.name,path:n.field.path,presence:n.field.presence,schemaType:H,title:n.field.schemaType.title,validation:N,value:U,render:i,children:W}),t[70]=a,t[71]=n.field.changed,t[72]=n.field.changedFromBaseVariant,t[73]=n.field.id,t[74]=n.field.level,t[75]=n.field.path,t[76]=n.field.presence,t[77]=n.field.schemaType.description,t[78]=n.field.schemaType.title,t[79]=n.index,t[80]=n.name,t[81]=i,t[82]=V,t[83]=H,t[84]=U,t[85]=W,t[86]=N,t[87]=ee):ee=t[87],ee}function nwt(e){return e.message}function rwt(e){return e.level===`error`}function iwt(e){return e.level!==`error`}function awt({render:e,...t}){return e(t)}function owt({render:e,...t}){return e(t)}var C5=(0,$.memo)(function(e){let t=(0,Z.c)(31),{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInlineBlock:o,renderInput:s,renderItem:c,renderPreview:l}=e;if(GCt(n)){let e;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==o||t[5]!==s||t[6]!==c||t[7]!==l?(e=(0,Q.jsx)(JCt,{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInlineBlock:o,renderInput:s,renderItem:c,renderPreview:l}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=e):e=t[8],e}if(KCt(n)){let e=c,u;return t[9]!==n||t[10]!==r||t[11]!==i||t[12]!==a||t[13]!==o||t[14]!==s||t[15]!==l||t[16]!==e?(u=(0,Q.jsx)(BCt,{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInput:s,renderInlineBlock:o,renderItem:e,renderPreview:l}),t[9]=n,t[10]=r,t[11]=i,t[12]=a,t[13]=o,t[14]=s,t[15]=l,t[16]=e,t[17]=u):u=t[17],u}if(x5(n)){let e;return t[18]!==n||t[19]!==r||t[20]!==i||t[21]!==a||t[22]!==o||t[23]!==s||t[24]!==c||t[25]!==l?(e=(0,Q.jsx)(OCt,{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInlineBlock:o,renderInput:s,renderItem:c,renderPreview:l}),t[18]=n,t[19]=r,t[20]=i,t[21]=a,t[22]=o,t[23]=s,t[24]=c,t[25]=l,t[26]=e):e=t[26],e}if(qCt(n)){let e;return t[27]!==n||t[28]!==a||t[29]!==s?(e=(0,Q.jsx)(twt,{member:n,renderField:a,renderInput:s}),t[27]=n,t[28]=a,t[29]=s,t[30]=e):e=t[30],e}return null}),swt={warning:`caution`,error:`critical`};function w5(e){let t=(0,Z.c)(31),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({children:n,status:a,suffix:i,title:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`warning`:a,c=swt[s],l=`alert-${s}`,u;t[6]===s?u=t[7]:(u=s===`warning`&&(0,Q.jsx)(Kn,{}),t[6]=s,t[7]=u);let d;t[8]===s?d=t[9]:(d=s===`error`&&(0,Q.jsx)(dr,{}),t[8]=s,t[9]=d);let f;t[10]!==u||t[11]!==d?(f=(0,Q.jsx)(X,{children:(0,Q.jsxs)(Y,{size:1,children:[u,d]})}),t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;t[13]===o?p=t[14]:(p=(0,Q.jsx)(Y,{size:1,weight:`medium`,children:o}),t[13]=o,t[14]=p);let m;t[15]===n?m=t[16]:(m=n&&(0,Q.jsx)(X,{marginTop:3,children:n}),t[15]=n,t[16]=m);let h;t[17]!==p||t[18]!==m?(h=(0,Q.jsxs)(X,{flexBasis:`0%`,flexGrow:1,marginLeft:3,children:[p,m]
Line truncated
|
||||
box-shadow: inset 1px 0 0 var(--card-focus-ring-color);`} ${t&&!n&&`
|
||||
box-shadow: inset 0 0 0 transparent;
|
||||
`} &:focus{box-shadow:${H6({base:a,focusRing:{...i,offset:2}})};}&:focus:not(:focus-visible){box-shadow:none;}`}),k5=[];function A5(e){let t=(0,Z.c)(103),n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16],v=t[17],y=t[18],b=t[19],x=t[20],S=t[21],C=t[22],w=t[23],T=t[24]):({ref:l,__internal_comments:o,__internal_slot:v,__unstable_headerActions:y,__unstable_presence:b,changedFromBaseVariant:x,children:n,collapsed:r,collapsible:i,columns:a,description:c,level:S,onCollapse:d,onExpand:f,onFocus:p,schemaType:_,tabIndex:w,title:T,validation:C,inputId:u,path:m,deprecated:s,readOnly:h,...g}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_,t[17]=v,t[18]=y,t[19]=b,t[20]=x,t[21]=S,t[22]=C,t[23]=w,t[24]=T);let E=v===void 0?null:v,D=y===void 0?k5:y,O=b===void 0?k5:b,k=x!==void 0&&x,A=S===void 0?0:S,j=C===void 0?k5:C,{focused:M,hovered:N,onMouseEnter:P,onMouseLeave:F}=UI(),I=j.length>0,L=(0,$.useRef)(null),{t:R}=ox(),z;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>L.current,t[25]=z):z=t[25],(0,$.useImperativeHandle)(l,z);let B;t[26]===p?B=t[27]:(B=e=>{L.current===e.target&&p&&p(e)},t[26]=p,t[27]=B);let V=B,H;t[28]!==r||t[29]!==d||t[30]!==f?(H=()=>r?f?.():d?.(),t[28]=r,t[29]=d,t[30]=f,t[31]=H):H=t[31];let U=H,W;bb0:{if(r){W=null;break bb0}let e;t[32]===a?e=t[33]:(e=a?Bwt(a):void 0,t[32]=a,t[33]=e);let i;t[34]===n?i=t[35]:(i=Gwt(n),t[34]=n,t[35]=i);let o;t[36]!==e||t[37]!==i?(o=(0,Q.jsx)(Yht,{gridTemplateColumns:e,columnGap:4,rowGap:5,children:i}),t[36]=e,t[37]=i,t[38]=o):o=t[38],W=o}let ee=W,te;t[39]!==k||t[40]!==m?(te=(0,Q.jsx)(BK,{path:m,changedFromBaseVariant:k}),t[39]=k,t[40]=m,t[41]=te):te=t[41];let ne=!!M,re;t[42]!==r||t[43]!==i||t[44]!==U||t[45]!==T?(re=T&&(0,Q.jsx)(Wwt,{collapsed:!!r,collapsible:i,onClick:i?U:void 0,title:T}),t[42]=r,t[43]=i,t[44]=U,t[45]=T,t[46]=re):re=t[46];let ie;t[47]!==s||t[48]!==R||t[49]!==T?(ie=s&&(0,Q.jsx)(X,{marginLeft:2,children:(0,Q.jsx)(nn,{"data-testid":`deprecated-badge-${T}`,tone:`caution`,children:R(`form.field.deprecated-label`)})}),t[47]=s,t[48]=R,t[49]=T,t[50]=ie):ie=t[50];let ae;t[51]!==m||t[52]!==_?(ae=yc(_)&&Array.isArray(m)&&(0,Q.jsx)(X,{marginLeft:2,children:(0,Q.jsx)(Rwt,{path:m})}),t[51]=m,t[52]=_,t[53]=ae):ae=t[53];let oe;t[54]!==I||t[55]!==j?(oe=I&&(0,Q.jsx)(X,{marginLeft:2,children:(0,Q.jsx)(DH,{fontSize:1,placement:`top`,validation:j})}),t[54]=I,t[55]=j,t[56]=oe):oe=t[56];let se;t[57]!==re||t[58]!==ie||t[59]!==ae||t[60]!==oe?(se=(0,Q.jsxs)(bn,{alignItems:`center`,children:[re,ie,ae,oe]}),t[57]=re,t[58]=ie,t[59]=ae,t[60]=oe,t[61]=se):se=t[61];let ce;t[62]!==s||t[63]!==T?(ce=s&&(0,Q.jsx)(yB,{"data-testid":`deprecated-message-${T}`,tone:`caution`,size:1,children:s.reason}),t[62]=s,t[63]=T,t[64]=ce):ce=t[64];let le;t[65]!==c||t[66]!==u?(le=c&&(0,Q.jsx)(Y,{muted:!0,size:1,id:OH(u,c),children:c}),t[65]=c,t[66]=u,t[67]=le):le=t[67];let ue;t[68]!==se||t[69]!==ce||t[70]!==le?(ue=(0,Q.jsxs)(Sn,{gap:3,children:[se,ce,le]}),t[68]=se,t[69]=ce,t[70]=le,t[71]=ue):ue=t[71];let de;t[72]!==D||t[73]!==o||t[74]!==N||t[75]!==u||t[76]!==O||t[77]!==E||t[78]!==ne||t[79]!==ue?(de=(0,Q.jsx)(LH,{__internal_comments:o,__internal_slot:E,actions:D,fieldFocused:ne,fieldHovered:N,presence:O,inputId:u,content:ue}),t[72]=D,t[73]=o,t[74]=N,t[75]=u,t[76]=O,t[77]=E,t[78]=ne,t[79]=ue,t[80]=de):de=t[80];let G=A>0,fe=!!M,pe=A===0?0:3,me=typeof w==`number`&&w>-1?V:void 0,he=!r&&ee,ge;t[81]!==r||t[82]!==G||t[83]!==fe||t[84]!==pe||t[85]!==me||t[86]!==he||t[87]!==w?(ge=(0,Q.jsx)(qwt,{$borderLeft:G,$focused:fe,hidden:r,paddingLeft:pe,onFocus:me,ref:L,tabIndex:w,children:he}),t[81]=r,t[82]=G,t[83]=fe,t[84]=pe,t[85]=me,t[86]=he,t[87]=w,t[88]=ge):ge=t[88];let _e;t[89]!==A||t[90]!==P||t[91]!==F||t[92]!==g||t[93]!==de||t[94]!==ge?(_e=(0,Q.jsxs)(Kwt,{"data-level":A,...g,onMouseEnter:P,onMouseLeave:F,gap:2,children:[de,ge]}),t[89]=A,t[90]=P,t[91]=F,t[92]=g,t[93]=de,t[94]=ge,t[95]=_e):_e=t[95];let ve;t[96]!==m||t[97]!==h||t[98]!==_e?(ve=(0,Q.jsx)(UK,{path:m,readOnly:h,children:_e}),t[96]=m,t[97]=h,t[98]=_e,t[99]=ve):ve=t[99];let ye;return t[100]!==te||t[101]!==ve?(ye=(0,Q.jsx)(qK,{gutterStartCell:te,children:ve}),t[100]=te,t[101]=ve,t[102]=ye):ye=t[102],ye}var j5=(0,$.memo)(function(e){let t=(0,Z.c)(44),{member:n,renderAnnotation:r,renderBlock:i,renderField:a,renderInlineBlock:o,renderInput:s,renderItem:c,renderPreview:l,schemaType:u}=e,{onSetFieldSetCollapsed:d}=y5(),f;t[0]!==n.fieldSet.path||t[1]!==d?(f=()=>{d(n.fieldSet.path,!0)},t[0]=n.fieldSet.path,t[1]=d,t[2]=f):f=t[2];let p=f,m;t[3]!==n.fieldSet.path||t[4]!==d?(m=()=>{d(n.fieldSet.path,!1)},t[3]=n.fieldSet.path,t[4]=d,t[5]=m):m=t[5];let h=m,g;bb0:{if(n.renderMembers){let e;t[6]===n?e=t[7]:(e=n.renderMembers(n.fieldSet.members),t[6]=n,t[7]=e),g=e;break bb0}g=n.fieldSet.members}let _=g,v;t[8]!==n.fieldSet.name||t[9]!==n.fieldSet.title?(v=n.fieldSet.titlLine truncated
|
||||
--card-icon-color: var(--card-accent-fg-color);
|
||||
`:``),lEt=J.span.withConfig({displayName:`AccentSpan`,componentId:`sc-8dk95x-3`})`color:var(--card-accent-fg-color);--card-icon-color:var(--card-accent-fg-color);`,uEt=J.span.withConfig({displayName:`SemiboldSpan`,componentId:`sc-8dk95x-4`})(({theme:e})=>{let{weights:t}=e.sanity.fonts.text;return Vt`font-weight:${t.semibold};`}),dEt=J(lut).withConfig({displayName:`InlineIcon`,componentId:`sc-8dk95x-5`})`&[data-sanity-icon]{margin-left:${e=>e.$hasTextLeft?`0`:``};margin-right:${e=>e.$hasTextRight?`0`:``};}`,fEt=J.a.withConfig({displayName:`Link`,componentId:`sc-8dk95x-6`})`font-weight:600;color:${e=>e.$useTextColor?`var(--card-muted-fg-color) !important`:``};`,pEt=J.span.withConfig({displayName:`DynamicIconContainer`,componentId:`sc-8dk95x-7`})`display:${({$inline:e})=>e?`inline-block`:`inline`};font-size:calc(21 / 16 * 1rem) !important;min-width:calc(21 / 16 * 1rem - 0.375rem);line-height:0;> svg{height:1em;width:1em;display:inline;font-size:1em !important;margin:-0.375rem !important;*[stroke]{stroke:currentColor;}}`,mEt=e=>{let t=(0,Z.c)(8),[n,r]=(0,$.useState)(``),i,a;t[0]===e.icon.url?(i=t[1],a=t[2]):(i=()=>{let t=new AbortController,n=t.signal;return fetch(e.icon.url,{signal:n}).then(CEt).then(e=>r(e)).catch(wEt),()=>{t.abort()}},a=[e.icon.url],t[0]=e.icon.url,t[1]=i,t[2]=a),(0,$.useEffect)(i,a);let o=!!e.inline,s;t[3]===n?s=t[4]:(s={__html:n},t[3]=n,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,Q.jsx)(pEt,{$inline:o,dangerouslySetInnerHTML:s}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c};function hEt(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(X,{paddingX:2,marginBottom:4,children:(0,Q.jsx)(Y,{size:1,muted:!0,children:n})}),t[0]=n,t[1]=r),r}function gEt(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(X,{paddingX:2,marginY:4,children:(0,Q.jsx)(Xt,{size:2,as:`h2`,children:n})}),t[0]=n,t[1]=r),r}function _Et(e){let t=(0,Z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(X,{paddingX:2,marginY:4,children:(0,Q.jsx)(Xt,{size:1,as:`h3`,children:n})}),t[0]=n,t[1]=r),r}var vEt=J.img.withConfig({displayName:`Image`,componentId:`sc-8dk95x-8`})(e=>{let t=Pt(e.theme);return Vt`object-fit:cover;width:100%;border-radius:${t.radius[3]}px;`});function yEt(e){let t=(0,Z.c)(2),n=e.value.image?.url,r;return t[0]===n?r=t[1]:(r=(0,Q.jsx)(X,{paddingX:2,marginY:4,children:(0,Q.jsx)(vEt,{src:n})}),t[0]=n,t[1]=r),r}var bEt=e=>t=>!t||!e?t:(Array.isArray(t)?t:[t]).map(t=>typeof t==`string`?n7(t,e):t),xEt=({onLinkClick:e,interpolation:t})=>{let n=bEt(t);return{block:{normal:({children:e})=>(0,Q.jsx)(hEt,{children:n(e)}),h2:({children:e})=>(0,Q.jsx)(gEt,{children:n(e)}),h3:({children:e})=>(0,Q.jsx)(_Et,{children:n(e)})},list:{bullet:({children:e})=>(0,Q.jsx)(`ul`,{children:n(e)}),number:({children:e})=>(0,Q.jsx)(`ol`,{children:n(e)}),checkmarks:({children:e})=>(0,Q.jsx)(Q.Fragment,{children:n(e)})},listItem:{bullet:({children:e})=>(0,Q.jsx)(Y,{as:`li`,size:1,muted:!0,style:{display:`list-item`,padding:`0.5rem 0`},children:n(e)}),number:({children:e})=>(0,Q.jsx)(Y,{as:`li`,size:1,muted:!0,style:{display:`list-item`,padding:`0.5rem 0`},children:n(e)}),checkmarks:({children:e})=>(0,Q.jsx)(Y,{children:e})},marks:{strong:({children:e})=>(0,Q.jsx)(`strong`,{children:n(e)}),semibold:({children:e})=>(0,Q.jsx)(uEt,{children:n(e)}),link:t=>(0,Q.jsxs)(fEt,{href:t.value.href,rel:`noopener noreferrer`,target:`_blank`,$useTextColor:t.value.useTextColor,onClick:e?()=>e({url:t.value.href,linkTitle:t.text}):void 0,children:[t.children,t.value.showIcon&&(0,Q.jsx)(jr,{style:{marginLeft:`2px`}})]}),accent:({children:e})=>(0,Q.jsx)(lEt,{children:n(e)})},types:{inlineIcon:e=>{let t=e.value.sanityIcon?(0,Q.jsx)(dEt,{symbol:e.value.sanityIcon,$hasTextLeft:e.value.hasTextLeft,$hasTextRight:e.value.hasTextRight}):(0,Q.jsx)(Q.Fragment,{children:e.value.icon?.url&&(0,Q.jsx)(mEt,{icon:e.value.icon,inline:!0})});return e.value.accent?(0,Q.jsx)(lEt,{children:t}):t},divider:()=>(0,Q.jsx)(X,{marginY:3,children:(0,Q.jsx)(X,{paddingY:3,children:(0,Q.jsx)(oEt,{})})}),iconAndText:e=>(0,Q.jsxs)(bn,{alignItems:`flex-start`,paddingX:2,paddingTop:1,paddingBottom:2,marginTop:2,gap:2,children:[(0,Q.jsxs)(bn,{gap:2,style:{flexShrink:0},children:[(0,Q.jsx)(cEt,{size:1,accent:e.value.accent,children:e.value.sanityIcon?(0,Q.jsx)(lut,{symbol:e.value.sanityIcon}):(0,Q.jsxs)(Q.Fragment,{children:[e.value.icon?.url&&(0,Q.jsx)(mEt,{icon:e.value.icon}),` `]})}),(0,Q.jsx)(Y,{size:1,weight:`semibold`,accent:e.value.accent,children:n(e.value.title)})]}),(0,Q.jsx)(Y,{size:1,muted:!0,accent:e.value.accent,children:n(e.value.text)})]}),imageBlock:e=>(0,Q.jsx)(yEt,{...e})}}};function SEt(e){let t=(0,Z.c)(8),{blocks:n,onLinkClick:r,interpolation:i}=e,a;t[0]===n?a=t[1]:(a=aEt(n),t[0]=n,t[1]=a);let o=a,s;t[2]!==i||t[3]!==r?(s=xEt({onLinkClick:r,interpolation:i}),t[2]=i,t[3]=r,t[4]=s):s=t[4];let c=s,l;return t[5]!==c||t[6]!==o?(l=(0,Q.jsx)(yt,{tone:`default`,children:(0,Q.jsx)(sEt,{children:(0,Q.jsx)(xct,{value:o,components:c,onMissingCompo
Line truncated
|
||||
position: absolute;
|
||||
top: ${t[3]}px;
|
||||
right: ${t[3]}px;
|
||||
z-index: 20;
|
||||
background: transparent;
|
||||
border-radius: 9999px;
|
||||
box-shadow: none;
|
||||
color: ${Nt.hex};
|
||||
--card-fg-color: ${Nt.hex};
|
||||
:hover {
|
||||
--card-fg-color: ${Nt.hex};
|
||||
}
|
||||
`}),EEt=J.img.withConfig({displayName:`Image`,componentId:`sc-oofaod-1`})`object-fit:cover;width:100%;height:100%;height:200px;`;function DEt(e){let t=(0,Z.c)(25),{data:n,open:r,onClose:i,onPrimaryClick:a,onSecondaryClick:o,interpolation:s}=e;if(!n||!(r===void 0||r))return null;let c;t[0]!==n.secondaryButton||t[1]!==o?(c=n.secondaryButton?.text?{text:n.secondaryButton.text,mode:`bleed`,tone:`default`,iconRight:Lr,...n.secondaryButton.url&&{target:`_blank`,rel:`noopener noreferrer`,as:`a`,href:n.secondaryButton.url},onClick:o}:void 0,t[0]=n.secondaryButton,t[1]=o,t[2]=c):c=t[2];let l=n.ctaButton?.text,u;t[3]===n.ctaButton.url?u=t[4]:(u=n.ctaButton.url&&{target:`_blank`,rel:`noopener noreferrer`,as:`a`,href:n.ctaButton.url},t[3]=n.ctaButton.url,t[4]=u);let d;t[5]!==a||t[6]!==l||t[7]!==u?(d={text:l,mode:`default`,tone:`default`,...u,onClick:a},t[5]=a,t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;t[9]!==c||t[10]!==d?(f={cancelButton:c,confirmButton:d},t[9]=c,t[10]=d,t[11]=f):f=t[11];let p;t[12]===i?p=t[13]:(p=(0,Q.jsx)(TEt,{icon:Gn,mode:`bleed`,tone:`default`,onClick:i,tabIndex:-1,tooltipProps:null}),t[12]=i,t[13]=p);let m;t[14]===n.image?m=t[15]:(m=n.image&&(0,Q.jsx)(EEt,{src:n.image.asset.url,alt:n.image.asset.altText??``}),t[14]=n.image,t[15]=m);let h;t[16]!==n.descriptionText||t[17]!==s?(h=(0,Q.jsx)(X,{padding:3,marginTop:2,children:(0,Q.jsx)(bn,{gap:4,paddingBottom:2,flexDirection:`column`,children:(0,Q.jsx)(SEt,{blocks:n.descriptionText,interpolation:s})})}),t[16]=n.descriptionText,t[17]=s,t[18]=h):h=t[18];let g;return t[19]!==i||t[20]!==f||t[21]!==p||t[22]!==m||t[23]!==h?(g=(0,Q.jsxs)(hR,{id:`upsell-dialog`,onClose:i,onClickOutside:i,__unstable_hideCloseButton:!0,bodyHeight:`100%`,padding:!1,zOffset:800,footer:f,children:[p,m,h]}),t[19]=i,t[20]=f,t[21]=p,t[22]=m,t[23]=h,t[24]=g):g=t[24],g}var OEt=class extends Error{schema;constructor(e){super(`SchemaError`),this.schema=e,this.name=`SchemaError`}};function kEt(e){if(!e)return[];let t=[];for(let n of e.split(`,`)){let e=n.trim();if(!e)continue;let r=e.indexOf(`:`);if(r===-1){t.push({type:L8,name:e});continue}let i=e.slice(0,r),a=e.slice(r+1);i&&a&&t.push({type:i,name:a})}return t}function AEt(e,t=L8){return`${t}:${TP(e)}`}function jEt(e){return e.length===0?null:e.map(e=>({type:e.type,id:TP(e.name)})).sort((e,t)=>e.type.localeCompare(t.type)).map(e=>`${e.type}:${e.id}`).join(`,`)}function MEt(e,t,n){let r=e.filter(e=>e.type!==t);return n?[...r,{type:t,name:TP(n)}]:r}function NEt(e){return xz(e)?`published`:Sz(e)?`drafts`:hz(e)?CF(e._id):typeof e==`string`?e:`drafts`}var PEt=ib({name:`Nested Dialog Opened`,version:1,description:`User opened a nested dialog`}),r7=ib({name:`Nested Dialog Closed`,version:2,description:`User closed a nested dialog`}),FEt=ib({name:`Object Edited`,version:1,description:`User opened an existing nested object in an array list for editing`}),i7=ib({name:`Nested Object Opened`,version:1,description:`User navigated to a nested object`}),IEt=ib({name:`Object Created`,version:1,description:`User created an object in an array list`}),LEt=ib({name:`Object Removed`,version:1,description:`User removed an object from an array list via actions`}),REt=ib({name:`Editor Opened`,version:1,description:`User opened a fullscreen Portable Text Editor inside a nested object dialog`}),zEt=ib({name:`Editor Closed`,version:1,description:`User closed a fullscreen Portable Text Editor inside a nested object dialog`});function a7(){return(0,$.useContext)(Ao)}function o7(e){let t=(0,Z.c)(184),n=(0,$.useRef)(void 0),{member:r,renderAnnotation:i,renderBlock:a,renderField:o,renderInlineBlock:s,renderInput:c,renderItem:l,renderPreview:u}=e,{t:d}=ox(),{onPathBlur:f,onPathFocus:p,onChange:m,onPathOpen:h,onSetPathCollapsed:g,onSetFieldSetCollapsed:_,onFieldGroupSelect:v}=y5(),y=f5(),b=m8(),{onCopy:x}=p8(),S=JE(),{enabled:C}=a7(),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w=(e,t)=>{!e&&t&&n.current?.focus()},t[0]=w):w=t[0],U6(r.item.focused,w);let T;t[1]!==C||t[2]!==r.item.path||t[3]!==r.key||t[4]!==m||t[5]!==S?(T=()=>{S.log(LEt,{location:`array_list`,path:LI(r.item.path),origin:C?`nested-object`:`default`}),m(Q6.from([XH([{_key:r.key}])]))},t[1]=C,t[2]=r.item.path,t[3]=r.key,t[4]=m,t[5]=S,t[6]=T):T=t[6];let E=T,D;t[7]!==h||t[8]!==g?(D=e=>{h(e),g(e,!1)},t[7]=h,t[8]=g,t[9]=D):D=t[9];let O=D,k=KE(),A;t[10]!==C||t[11]!==r.item.path||t[12]!==S?(A=e=>{S.log(IEt,{location:`array_list`,position:e.position===`before`?`prepended`:`appended`,path:LI(r.item.path),origin:C?`nested-object`:`default`})},t[10]=C,t[11]=r.item.path,t[12]=S,t[13]=A):A=t[13];let j=A,M;t[14]!==O||t[15]!==r.item.path||t[16]!==r.key||t[17]!==r.parentSchemaType||t[18]!==m||t[19]!==p||t[20]!==y||t[21]!==d||t[22]!==j||t[23]!==k?(M=e=>{if(e.items.length===0)throw Error(`Insert event should include at least one item`);let t=e.items.map(BEt);m(Q6.from([JH(t,e.position,[{_key:r.key}])]));let n=t[0]._key,i=[...r.item.path.slice(0,-1),{_key:n}];p(i);let a=e.open!==!1;e.skipInitialValue?a&&(O(i),j(e)):DCt(t,r.pa
Line truncated
|
||||
/* Hide the backdrop (the semi-transparent overlay) */
|
||||
background: transparent !important;
|
||||
|
||||
/* Hide the dialog card */
|
||||
[data-ui='DialogCard'] {
|
||||
opacity: 0 !important;
|
||||
pointer-events: none !important;
|
||||
transform: scale(0.95) !important;
|
||||
}
|
||||
`}`,JAt=[0,0,1,0];function YAt(e){return e.stopPropagation()}function XAt(e){return e.stopPropagation()}function B7(e){let t=(0,Z.c)(63),{children:n,header:r,type:i,width:a}=e,[o,s]=(0,$.useState)(null),c=(0,$.useRef)(null),l=JE(),{__internal:u}=o5(),d=!!u.inspectOpen,{absolutePath:f,path:p}=n?.props,m=f||p,h;t[0]===m?h=t[1]:(h={path:m},t[0]=m,t[1]=h);let{dialogId:g,isTop:_,stack:v,close:y,navigateTo:b}=kAt(h),x;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>{e&&(e.style.scrollbarGutter=`stable`),s(e)},t[2]=x):x=t[2];let S=x,C;t[3]!==v.length||t[4]!==l?(C=()=>{v.length===0&&l.log(PEt,{path:LI([])})},t[3]=v.length,t[4]=l,t[5]=C):C=t[5];let w;t[6]!==v||t[7]!==l?(w=[v,l],t[6]=v,t[7]=l,t[8]=w):w=t[8],(0,$.useEffect)(C,w);let T;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(T={minHeight:`min(calc(100vh - 200px), 500px)`},t[9]=T):T=t[9];let E;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(SR,{showText:!0}),t[10]=E):E=t[10];let D;t[11]===n?D=t[12]:(D=(0,Q.jsx)(x7,{margins:JAt,children:(0,Q.jsx)(X,{ref:c,style:T,children:(0,Q.jsx)($.Suspense,{fallback:E,children:n})})}),t[11]=n,t[12]=D);let O=D,[k,A]=(0,$.useState)(!1),j,M;t[13]!==k||t[14]!==v.length?(j=()=>{v.length>1&&!k&&A(!0)},M=[v.length,k],t[13]=k,t[14]=v.length,t[15]=j,t[16]=M):(j=t[15],M=t[16]),(0,$.useEffect)(j,M);let N=v.length>1||k,P;t[17]!==y||t[18]!==_||t[19]!==b||t[20]!==v||t[21]!==l?(P=e=>{if(!(e.target&&k_t(e.target))&&_&&(e.metaKey||e.ctrlKey)&&e.key===`ArrowUp`){e.preventDefault();let t=v[v.length-1]?.path;if(t&&t.length>1){let e=t.slice(0,-1);e.length>1?(l.log(i7,{path:`keyboard_shortcut`}),b(e)):(l.log(r7),y())}}},t[17]=y,t[18]=_,t[19]=b,t[20]=v,t[21]=l,t[22]=P):P=t[22];let F=P,I;t[23]!==y||t[24]!==v.length||t[25]!==l?(I=e=>{!e&&v.length>=2?(l.log(i7,{path:`close_button`}),y({toParent:!0})):(l.log(r7),y())},t[23]=y,t[24]=v.length,t[25]=l,t[26]=I):I=t[26];let L=I,R;t[27]!==y||t[28]!==d||t[29]!==l?(R=()=>{d||(l.log(r7),y())},t[27]=y,t[28]=d,t[29]=l,t[30]=R):R=t[30];let z=R;if(Ht(F),i===`dialog`){let n=!_,r=_?e.autofocus:!1,i;t[31]!==m||t[32]!==L||t[33]!==b?(i=(0,Q.jsx)(KAt,{currentPath:m,onNavigate:b,onClose:L}),t[31]=m,t[32]=L,t[33]=b,t[34]=i):i=t[34];let s=!N,l;t[35]!==O||t[36]!==o?(l=(0,Q.jsx)(vn,{element:o,children:O}),t[35]=O,t[36]=o,t[37]=l):l=t[37];let u;t[38]!==g||t[39]!==z||t[40]!==L||t[41]!==n||t[42]!==r||t[43]!==i||t[44]!==s||t[45]!==l||t[46]!==a?(u=(0,Q.jsx)(qAt,{$isHidden:n,__unstable_autoFocus:r,contentRef:S,"data-testid":`nested-object-dialog`,header:i,id:g,onClose:L,onDragEnter:YAt,onDrop:XAt,width:a,animate:s,onClickOutside:z,children:l}),t[38]=g,t[39]=z,t[40]=L,t[41]=n,t[42]=r,t[43]=i,t[44]=s,t[45]=l,t[46]=a,t[47]=u):u=t[47];let d;return t[48]!==o||t[49]!==u?(d=(0,Q.jsx)(d7,{scrollElement:o,containerElement:c,children:u}),t[48]=o,t[49]=u,t[50]=d):d=t[50],d}let B;t[51]!==O||t[52]!==o?(B=(0,Q.jsx)(vn,{element:o,children:O}),t[51]=O,t[52]=o,t[53]=B):B=t[53];let V;t[54]!==L||t[55]!==r||t[56]!==e.legacy_referenceElement||t[57]!==B||t[58]!==a?(V=(0,Q.jsx)(t_t,{header:r,onClose:L,width:a,containerRef:s,referenceElement:e.legacy_referenceElement,children:B}),t[54]=L,t[55]=r,t[56]=e.legacy_referenceElement,t[57]=B,t[58]=a,t[59]=V):V=t[59];let H;return t[60]!==o||t[61]!==V?(H=(0,Q.jsx)(d7,{scrollElement:o,containerElement:c,children:V}),t[60]=o,t[61]=V,t[62]=H):H=t[62],H}var ZAt=e=>Array.isArray(e)?e.flatMap(ZAt):typeof e==`number`?[e]:e===`auto`?[`auto`]:[1],QAt=e=>e===`dialog`||e===`popover`?e:void 0;function $At(e){let t=e.options?.modal;if(typeof t!=`object`||!t)return;let n=ZAt(t.width);return{type:QAt(t.type),width:n.length>0?n:void 0}}function ejt(e){let t=(0,Z.c)(17),{onClose:n,children:r,title:i,width:a,autoFocus:o}=e,s=a===void 0?1:a,c=(0,$.useId)(),[l,u]=(0,$.useState)(null),d=(0,$.useRef)(null),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=[0,0,1,0],t[0]=f):f=t[0];let p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Q.jsx)(SR,{showText:!0}),t[1]=p):p=t[1];let m;t[2]===r?m=t[3]:(m=(0,Q.jsx)(X,{ref:d,children:(0,Q.jsx)($.Suspense,{fallback:p,children:r})}),t[2]=r,t[3]=m);let h;t[4]!==l||t[5]!==m?(h=(0,Q.jsx)(vn,{element:l,children:m}),t[4]=l,t[5]=m,t[6]=h):h=t[6];let g;t[7]!==l||t[8]!==h?(g=(0,Q.jsx)(x7,{margins:f,children:(0,Q.jsx)(d7,{scrollElement:l,containerElement:d,children:h})}),t[7]=l,t[8]=h,t[9]=g):g=t[9];let _;return t[10]!==o||t[11]!==c||t[12]!==n||t[13]!==g||t[14]!==i||t[15]!==s?(_=(0,Q.jsx)(hR,{header:i,id:c,onClickOutside:n,onClose:n,portal:`default`,width:s,contentRef:u,"data-testid":`default-edit-object-dialog`,__unstable_autoFocus:o,children:g}),t[10]=o,t[11]=c,t[12]=n,t[13]=g,t[14]=i,t[15]=s,t[16]=_):_=t[16],_}var tjt=J(gR).withConfig({displayName:`RootPopover`,componentId:`sc-twntgv-0`})`[data-ui='Popover__wrapper']{overflow:auto;max-height:60vh;}`,njt=J(X).withConfig({displayName:`ContentScrollerBox`,componentId:`sc-twntgv-1`})`overflow-x:hidden;`,rjt=J(X).withConfig({displayName:`ContentHeaderBox`,componentId:`sc-twntgv-2`})`box-shadow:0 1px 0 var(--card-shadow-outline-colo
Line truncated
|
||||
L ${-t} ${-t}
|
||||
L ${e*1.5} ${-t}
|
||||
L ${e*1.5} ${t}
|
||||
L ${t} ${t}
|
||||
L ${t} ${e*1.5}
|
||||
Z`},EDGE_DIMENSIONS:{top:e=>({width:e*2,height:e}),right:e=>({width:e,height:e*2}),bottom:e=>({width:e*2,height:e}),left:e=>({width:e,height:e*2})}},sVt={cornerPath:Z9.CORNER_PATH(8),edgeDimensions:{top:Z9.EDGE_DIMENSIONS.top(8),right:Z9.EDGE_DIMENSIONS.right(8),bottom:Z9.EDGE_DIMENSIONS.bottom(8),left:Z9.EDGE_DIMENSIONS.left(8)}},cVt=e=>{let t={top:{x:e.left+e.width/2,y:e.top},right:{x:G9(e),y:e.top+e.height/2},bottom:{x:e.left+e.width/2,y:K9(e)},left:{x:e.left,y:e.top+e.height/2},topLeft:{x:e.left,y:e.top},topRight:{x:G9(e),y:e.top},bottomLeft:{x:e.left,y:K9(e)},bottomRight:{x:G9(e),y:K9(e)}},n={topLeft:0,topRight:90,bottomRight:180,bottomLeft:270},r={};for(let e of[`top`,`right`,`bottom`,`left`]){let n=sVt.edgeDimensions[e],i=t[e];r[e]={visual:{left:i.x-n.width/2,top:i.y-n.height/2,width:n.width,height:n.height},hit:{left:i.x-12,top:i.y-12,width:24,height:24}}}for(let e of[`topLeft`,`topRight`,`bottomLeft`,`bottomRight`]){let i=t[e];r[e]={visual:{left:i.x-24,top:i.y-24,width:48,height:48},hit:{left:i.x-12,top:i.y-12,width:24,height:24},path:sVt.cornerPath,position:i,rotation:n[e]}}return r};function lVt(){let e=(0,Z.c)(8),[t,n]=(0,$.useState)(null),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{n(e)},e[0]=r):r=e[0];let i=r,a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{n(null)},e[1]=a):a=e[1];let o=a,s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>i(`hotspot`),e[2]=s):s=e[2];let c=s,l;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>i(`hotspotHandle`),e[3]=l):l=e[3];let u=l,d;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>i(`crop`),e[4]=d):d=e[4];let f=d,p;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>()=>i(`crop-${e}`),e[5]=p):p=e[5];let m=p,h;return e[6]===t?h=e[7]:(h={hoverTarget:t,handleMouseEnter:i,handleMouseLeave:o,handleHotspotMouseEnter:c,handleHotspotHandleMouseEnter:u,handleCropMouseEnter:f,getCropHandleMouseEnter:m},e[6]=t,e[7]=h),h}function uVt(e){let t=(0,Z.c)(20),{value:n,onChange:r,onChangeEnd:i,innerRect:a,focusTarget:o,readOnly:s}=e,c=(0,$.useRef)(null),l=(0,$.useRef)(null),u=(0,$.useRef)(null),d=(0,$.useRef)(null),f;t[0]!==i||t[1]!==n?(f=()=>{(c.current||l.current)&&(i({crop:n.crop||B9,hotspot:n.hotspot||z9}),c.current=null,l.current=null,u.current=null)},t[0]=i,t[1]=n,t[2]=f):f=t[2];let p=f,m;t[3]===a?m=t[4]:(m=e=>{let{e:t,crop:n,hotspot:r,isCtrlOrCmdPressed:i,step:o,resizeStep:s}=e,c;if(i){let e={x:u.current.x,y:u.current.y};bb19:switch(t.key){case`ArrowUp`:e.y-=a.height*s;break bb19;case`ArrowDown`:e.y+=a.height*s;break bb19;case`ArrowLeft`:e.x-=a.width*s;break bb19;case`ArrowRight`:e.x+=a.width*s;break bb19;default:return null}c=nVt({initialHotspot:r,crop:n,initialCursor:u.current,pointerPos:e,innerRect:a})}else{let e={x:0,y:0};bb31:switch(t.key){case`ArrowUp`:e.y=-o;break bb31;case`ArrowDown`:e.y=o;break bb31;case`ArrowLeft`:e.x=-o;break bb31;case`ArrowRight`:e.x=o;break bb31;default:return null}c={hotspot:eVt({hotspot:r,crop:n},e),crop:n}}return c},t[3]=a,t[4]=m);let h=m,g;t[5]===a?g=t[6]:(g=e=>{let{e:t,crop:n,hotspot:r,isCtrlOrCmdPressed:i,step:o,resizeStep:s}=e;if(i){let e,i={x:u.current.x,y:u.current.y};bb46:switch(t.key){case`ArrowUp`:e=`crop-bottom`,i.y-=a.height*s;break bb46;case`ArrowDown`:e=`crop-bottom`,i.y+=a.height*s;break bb46;case`ArrowLeft`:e=`crop-right`,i.x-=a.width*s;break bb46;case`ArrowRight`:e=`crop-right`,i.x+=a.width*s;break bb46;default:return null}if(e)return iVt({initialCrop:n,initialHotspot:r,initialCursor:u.current,pointerPos:i,innerRect:a,activeHandle:e})}else{let e={x:u.current.x,y:u.current.y};bb61:switch(t.key){case`ArrowUp`:e.y-=a.height*o;break bb61;case`ArrowDown`:e.y+=a.height*o;break bb61;case`ArrowLeft`:e.x-=a.width*o;break bb61;case`ArrowRight`:e.x+=a.width*o;break bb61;default:return null}return rVt({initialCrop:n,initialHotspot:r,initialCursor:u.current,pointerPos:e,innerRect:a})}return null},t[5]=a,t[6]=g);let _=g,v;t[7]!==o||t[8]!==_||t[9]!==h||t[10]!==a||t[11]!==r||t[12]!==s||t[13]!==n?(v=e=>{if(d.current!==null&&window.clearTimeout(d.current),s||!o||![`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(e.key))return;let t=n.crop||B9,i=n.hotspot||z9;c.current={...t},l.current={...i},u.current={x:a.width/2,y:a.height/2};let f=e.shiftKey,p=e.ctrlKey||e.metaKey,m=f?zBt*5:zBt,g=f?BBt*5:BBt,v=null;o===`hotspot`||o===`hotspotHandle`?v=h({e,crop:t,hotspot:i,isCtrlOrCmdPressed:p,step:m,resizeStep:g}):(o===`crop`||o===`cropHandle`)&&(v=_({e,crop:t,hotspot:i,isCtrlOrCmdPressed:p,step:m,resizeStep:g})),v&&(r(v),e.preventDefault())},t[7]=o,t[8]=_,t[9]=h,t[10]=a,t[11]=r,t[12]=s,t[13]=n,t[14]=v):v=t[14];let y=v,b;t[15]===p?b=t[16]:(b=e=>{d.current!==null&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{p(),d.current=null},300)},t[15]=p,t[16]=b);let x=b,S;return t[17]!==y||t[18]!==x?(S={handleKeyDown:y,handleKeyUp:x},t[17]=y,t[18]=x,t[19]=S):S=t[19],S}function dVt(e){let t=(0,Z.c)(25),{value:n,onChange:r,innerRect:i,svgRef:a,size:o,readOnly:s,hotspotRef:c,cropRef:l}=e,u=(0,
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{ni as n}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";var r=t(),i=e();function a(e){let t=(0,r.c)(10),a,o;t[0]===e?(a=t[1],o=t[2]):({time:o,...a}=e,t[0]=e,t[1]=a,t[2]=o);let s;t[3]===o?s=t[4]:(s=o instanceof Date?o:new Date(o),t[3]=o,t[4]=s);let c=s,l=n(c,a),u;t[5]===c?u=t[6]:(u=c.toISOString(),t[5]=c,t[6]=u);let d;return t[7]!==u||t[8]!==l?(d=(0,i.jsx)(`time`,{dateTime:u,title:l,children:l}),t[7]=u,t[8]=l,t[9]=d):d=t[9],d}export{a as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Fs as t,Op as n,ed as r}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as i,t as a}from"./jsx-runtime-BpzPEenQ.js";import{t as o}from"./compiler-runtime-sKsOXjDo.js";var s=e(i(),1),c=o(),l=a(),u={data:null,error:null,loading:!1},d={data:null,error:null,loading:!0},f=e=>{let i=(0,c.c)(15),{children:a}=e,o;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],i[0]=o):o=i[0];let[f,p]=(0,s.useState)(o),{getMetadataStateForSlugs$:m}=t(),[_,v]=(0,s.useState)(null),y;i[1]!==m||i[2]!==f?(y=m(f.map(h)),i[1]=m,i[2]=f,i[3]=y):y=i[3];let b=r(y,void 0)??(f.length>0?d:u),x,S;i[4]===b.data?(x=i[5],S=i[6]):(x=()=>v(e=>b.data?{...e,...b.data}:e),S=[b.data],i[4]=b.data,i[5]=x,i[6]=S),(0,s.useEffect)(x,S);let C;i[7]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{p(t=>[...t,...e.filter(g)])},i[7]=C):C=i[7];let w=C,T;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>{p(t=>{let{nextSlugs:n}=t.reduce((t,n)=>{let{removedSlugs:r,nextSlugs:i}=t;return e.includes(n)&&!r.includes(n)?{removedSlugs:[...r,n],nextSlugs:i}:{removedSlugs:r,nextSlugs:[...i,n]}},{removedSlugs:[],nextSlugs:[]});return n})},i[8]=T):T=i[8];let E=T,D;i[9]!==b||i[10]!==_?(D={addReleaseIdsToListener:w,removeReleaseIdsFromListener:E,state:{...b,data:_}},i[9]=b,i[10]=_,i[11]=D):D=i[11];let O=D,k;return i[12]!==a||i[13]!==O?(k=(0,l.jsx)(n.Provider,{value:O,children:a}),i[12]=a,i[13]=O,i[14]=k):k=i[14],k},p=e=>{let t=(0,c.c)(2),{children:r}=e;if((0,s.useContext)(n))return r;let i;return t[0]===r?i=t[1]:(i=(0,l.jsx)(f,{children:r}),t[0]=r,t[1]=i),i},m=()=>{let e=(0,c.c)(2),t=(0,s.useContext)(n),r;return e[0]===t?r=e[1]:(r=t||{state:u,addReleaseIdsToListener:_,removeReleaseIdsFromListener:v},e[0]=t,e[1]=r),r};function h(e){return e}function g(e){return typeof e==`string`}function _(){return null}function v(){return null}export{m as n,p as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{ht as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{Uc as a,lo as o}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";var s=e(n(),1),c=i(),l=r(),u={data:null,error:null,loading:!1},d=e=>{let n=(0,c.c)(15),{children:r}=e,i;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],n[0]=i):i=n[0];let[d,f]=(0,s.useState)(i),{getMetadataStateForSlugs$:p}=o(),[g,_]=(0,s.useState)(null),v;n[1]!==p||n[2]!==d?(v=p(d.map(m)),n[1]=p,n[2]=d,n[3]=v):v=n[3];let y=a(v)||u,b,x;n[4]===y.data?(b=n[5],x=n[6]):(b=()=>_(e=>y.data?{...e,...y.data}:e),x=[y.data],n[4]=y.data,n[5]=b,n[6]=x),(0,s.useEffect)(b,x);let S;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{f(t=>[...t,...e.filter(h)])},n[7]=S):S=n[7];let C=S,w;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{f(t=>{let{nextSlugs:n}=t.reduce((t,n)=>{let{removedSlugs:r,nextSlugs:i}=t;return e.includes(n)&&!r.includes(n)?{removedSlugs:[...r,n],nextSlugs:i}:{removedSlugs:r,nextSlugs:[...i,n]}},{removedSlugs:[],nextSlugs:[]});return n})},n[8]=w):w=n[8];let T=w,E;n[9]!==y||n[10]!==g?(E={addReleaseIdsToListener:C,removeReleaseIdsFromListener:T,state:{...y,data:g}},n[9]=y,n[10]=g,n[11]=E):E=n[11];let D=E,O;return n[12]!==r||n[13]!==D?(O=(0,l.jsx)(t.Provider,{value:D,children:r}),n[12]=r,n[13]=D,n[14]=O):O=n[14],O},f=e=>{let n=(0,c.c)(2),{children:r}=e;if((0,s.useContext)(t))return r;let i;return n[0]===r?i=n[1]:(i=(0,l.jsx)(d,{children:r}),n[0]=r,n[1]=i),i},p=()=>{let e=(0,c.c)(2),n=(0,s.useContext)(t),r;return e[0]===n?r=e[1]:(r=n||{state:u,addReleaseIdsToListener:g,removeReleaseIdsFromListener:_},e[0]=n,e[1]=r),r};function m(e){return e}function h(e){return typeof e==`string`}function g(){return null}function _(){return null}export{p as n,f as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$ as t,Am as n,Cs as r,S as i,Sd as a,Sr as o,ec as s,jd as c,km as l,kp as u,or as d,os as f,sd as p,wl as m}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as h,t as g}from"./jsx-runtime-BpzPEenQ.js";import{t as _}from"./compiler-runtime-sKsOXjDo.js";import{Q as v,X as y,ht as b,ot as x,q as ee,rt as S,xt as C}from"./clientStore-Cq3vrK4Q-X8Ukd-3S.js";import{$t as w}from"./types--2f-avvL-DfAXA8nG.js";import{St as T,s as E}from"./dist-LVcARZxB.js";import{t as D}from"./ReleasesMetadataProvider-D91ckc8k-CobfrRVi.js";var O=e(h(),1),k=_(),A=g();function te(e){let t=(0,k.c)(18),{onClose:n}=e,{t:r}=a(),i;t[0]===n?i=t[1]:(i=()=>{window.open(`https://www.sanity.io/contact/support`,`_blank`,`noopener,noreferrer`),n()},t[0]=n,t[1]=i);let o=i,c;t[2]===r?c=t[3]:(c=r(`releases.upsell.misconfiguration.header`),t[2]=r,t[3]=c);let l;t[4]===r?l=t[5]:(l=r(`releases.upsell.misconfiguration.contact-support`),t[4]=r,t[5]=l);let u;t[6]!==o||t[7]!==l?(u={confirmButton:{text:l,onClick:o,tone:`primary`}},t[6]=o,t[7]=l,t[8]=u):u=t[8];let d;t[9]===r?d=t[10]:(d=r(`releases.upsell.misconfiguration.message`),t[9]=r,t[10]=d);let f;t[11]===d?f=t[12]:(f=(0,A.jsx)(E,{gap:4,children:(0,A.jsx)(T,{children:d})}),t[11]=d,t[12]=f);let p;return t[13]!==n||t[14]!==c||t[15]!==u||t[16]!==f?(p=(0,A.jsx)(s,{id:`releases-misconfiguration-dialog`,header:c,width:1,onClose:n,footer:u,children:f}),t[13]=n,t[14]=c,t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function j(e){return e.statusCode===403&&typeof e.response.body!=`string`&&`data`in e.response.body}function M(e,t){let{projectId:n}=e.config();return e.withConfig({apiVersion:`vX`}).observable.request({url:`projects/${n}/new-content-release-allowed`,tag:`new-content-release-allowed-${t}`}).pipe(S(e=>{if(console.error(e),j(e))return C(e.response.body);throw e}),b(({data:e})=>e))}var N=`orgActiveReleaseCount`;function P(e,t){let r=new n(null),i=new n(!1),a=new n(null);return{orgActiveReleaseCount$:r.pipe(y(n=>n===null||i.getValue()===!0||a.getValue()!==t?(i.next(!1),M(e,`orgActiveReleaseCount`).pipe(ee(()=>a.next(t)),b(e=>e.orgMeteredActiveReleaseCount),S(e=>{if(console.error(`Failed to fetch org release count`,e),!n)throw e;return C(n)}),y(e=>(r.next(e),x(6e4).subscribe(()=>{i.next(!0),a.next(null)}),C(e))))):C(n)))}}var ne=()=>{let e=(0,k.c)(7),t=m(),{data:n}=r(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={apiVersion:`v2025-02-19`},e[0]=i):i=e[0];let a=c(i),o=n?.length||0,s;e[1]===o?s=e[2]:(s={activeReleasesCount:o},e[1]=o,e[2]=s);let l=s,u;return e[3]!==a||e[4]!==l||e[5]!==t?(u=t.get({dependencies:[a,l],namespace:N})||P(a,l.activeReleasesCount),t.set({namespace:N,value:u,dependencies:[a,l]}),e[3]=a,e[4]=l,e[5]=t,e[6]=u):u=e[6],u},F=`ReleaseLimits`;function I(e){return{releaseLimits$:M(e,`releaseLimits`).pipe(b(e=>({datasetReleaseLimit:e.datasetReleaseLimit,orgActiveReleaseLimit:e.orgActiveReleaseLimit})),v(1),S(e=>(console.error(`Failed to fetch release limits`,e),C(null))))}}var re=()=>{let e=(0,k.c)(4),t=m(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={apiVersion:`v2025-02-19`},e[0]=n):n=e[0];let r=c(n),i;return e[1]!==r||e[2]!==t?(i=t.get({dependencies:[r],namespace:F})||I(r),t.set({namespace:F,value:i,dependencies:[r]}),e[1]=r,e[2]=t,e[3]=i):i=e[3],i},ie=class extends Error{details;constructor(){super(`StudioReleaseLimitExceeded`),this.name=`StudioReleaseLimitExceededError`,this.details={type:`releaseLimitExceededError`}}};function L(e){let n=(0,k.c)(47),[s,c]=(0,O.useState)(!1),{data:f}=r(),{enabled:m}=d(i.contentReleases),h;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(h={dataUri:`/journey/content-releases`,feature:`content-releases`},n[0]=h):h=n[0];let{upsellData:g,telemetryLogs:_,hasError:v}=o(h),y=p(),{t:b}=a(),x;n[1]===f?x=n[2]:(x=f.filter(ae),n[1]=f,n[2]=x);let S=x,C;bb0:{if(!m){C=`upsell`;break bb0}C=`default`}let w=C,T;n[3]===_?T=n[4]:(T=()=>{_.dialogPrimaryClicked()},n[3]=_,n[4]=T);let E=T,D;n[5]===_?D=n[6]:(D=()=>{_.dialogSecondaryClicked()},n[5]=_,n[6]=D);let j=D,M;n[7]===_?M=n[8]:(M=()=>{c(!1),_.dialogDismissed()},n[7]=_,n[8]=M);let N=M,[P,F]=(0,O.useState)(null),[I,L]=(0,O.useState)(!1),R;n[9]!==v||n[10]!==b||n[11]!==_||n[12]!==y?(R=e=>{let t=e===void 0?`navbar`:e;if(v){y.push({status:`error`,title:b(`errors.unable-to-perform-action`),closable:!0});return}c(!0),_.dialogViewed(t)},n[9]=v,n[10]=b,n[11]=_,n[12]=y,n[13]=R):R=n[13];let z=R,{releaseLimits$:B}=re(),{orgActiveReleaseCount$:V}=ne(),H;n[14]!==f.length||n[15]!==z||n[16]!==S.length||n[17]!==w||n[18]!==V||n[19]!==B?(H=async(e,t,n)=>{let r=t!==void 0&&t,i=()=>{if(z(),r)throw new ie;return!1};if(w===`upsell`)return n?.(!1),i();let a=await(async()=>{try{return await Promise.all([l(V),l(B.pipe(ee(e=>F(e?.orgActiveReleaseLimit||null))))])}catch(e){return console.error(`Error fetching release limits and org count for upsell:`,e),null}})();if(a===null)return n?.(!0),e();let[o,s]=a;if(s===null||o===null)return n?.(!0),e();let{orgActiveReleaseLimit:c,datasetReleLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{gt as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{Qa as a,Va as o,Xn as s,Yc as c,jn as l,la as u,nt as d,vl as f,ws as p,x as ee}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as te}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{t as m}from"./BehaviorSubject-CugQrNFr.js";import{M as h,P as g,U as _}from"./authStore-CtE9bLHW-D5dT_tdN.js";import{h as v,i as y,o as b}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{t as x}from"./map-UaEckSmz.js";import{n as S}from"./filter-C5fzbndz.js";import{dt as C,ft as w}from"./dist-BOMXfkZi.js";import{t as T}from"./useReleasesToolAvailable-CO-nywsk-CUFWvAZp.js";import{t as E}from"./ReleasesMetadataProvider-ph0rE6jm-CQPhf0Dm.js";var D=e(n(),1),O=i(),k=r();function ne(e){let t=(0,O.c)(18),{onClose:n}=e,{t:r}=te(),i;t[0]===n?i=t[1]:(i=()=>{window.open(`https://www.sanity.io/contact/support`,`_blank`,`noopener,noreferrer`),n()},t[0]=n,t[1]=i);let a=i,o;t[2]===r?o=t[3]:(o=r(`releases.upsell.misconfiguration.header`),t[2]=r,t[3]=o);let s;t[4]===r?s=t[5]:(s=r(`releases.upsell.misconfiguration.contact-support`),t[4]=r,t[5]=s);let c;t[6]!==a||t[7]!==s?(c={confirmButton:{text:s,onClick:a,tone:`primary`}},t[6]=a,t[7]=s,t[8]=c):c=t[8];let l;t[9]===r?l=t[10]:(l=r(`releases.upsell.misconfiguration.message`),t[9]=r,t[10]=l);let d;t[11]===l?d=t[12]:(d=(0,k.jsx)(C,{gap:4,children:(0,k.jsx)(w,{children:l})}),t[11]=l,t[12]=d);let f;return t[13]!==n||t[14]!==o||t[15]!==c||t[16]!==d?(f=(0,k.jsx)(u,{id:`releases-misconfiguration-dialog`,header:o,width:1,onClose:n,footer:c,children:d}),t[13]=n,t[14]=o,t[15]=c,t[16]=d,t[17]=f):f=t[17],f}function A(e){return e.statusCode===403&&typeof e.response.body!=`string`&&`data`in e.response.body}function j(e,t){let{projectId:n}=e.config();return e.withConfig({apiVersion:`vX`}).observable.request({url:`projects/${n}/new-content-release-allowed`,tag:`new-content-release-allowed-${t}`}).pipe(b(e=>{if(console.error(e),A(e))return v(e.response.body);throw e}),x(({data:e})=>e))}var M=`orgActiveReleaseCount`;function N(e,t){let n=new m(null),r=new m(!1),i=new m(null);return{orgActiveReleaseCount$:n.pipe(h(a=>a===null||r.getValue()===!0||i.getValue()!==t?(r.next(!1),j(e,`orgActiveReleaseCount`).pipe(y(()=>i.next(t)),x(e=>e.orgMeteredActiveReleaseCount),b(e=>{if(console.error(`Failed to fetch org release count`,e),!a)throw e;return v(a)}),h(e=>(n.next(e),_(6e4).subscribe(()=>{r.next(!0),i.next(null)}),v(e))))):v(a)))}}var re=()=>{let e=(0,O.c)(7),t=p(),{data:n}=a(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={apiVersion:`v2025-02-19`},e[0]=r):r=e[0];let i=f(r),o=n?.length||0,s;e[1]===o?s=e[2]:(s={activeReleasesCount:o},e[1]=o,e[2]=s);let c=s,l;return e[3]!==i||e[4]!==c||e[5]!==t?(l=t.get({dependencies:[i,c],namespace:M})||N(i,c.activeReleasesCount),t.set({namespace:M,value:l,dependencies:[i,c]}),e[3]=i,e[4]=c,e[5]=t,e[6]=l):l=e[6],l},P=`ReleaseLimits`;function F(e){return{releaseLimits$:j(e,`releaseLimits`).pipe(x(e=>({datasetReleaseLimit:e.datasetReleaseLimit,orgActiveReleaseLimit:e.orgActiveReleaseLimit})),g(1),b(e=>(console.error(`Failed to fetch release limits`,e),v(null))))}}var ie=()=>{let e=(0,O.c)(4),t=p(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={apiVersion:`v2025-02-19`},e[0]=n):n=e[0];let r=f(n),i;return e[1]!==r||e[2]!==t?(i=t.get({dependencies:[r],namespace:P})||F(r),t.set({namespace:P,value:i,dependencies:[r]}),e[1]=r,e[2]=t,e[3]=i):i=e[3],i},I=class extends Error{details;constructor(){super(`StudioReleaseLimitExceeded`),this.name=`StudioReleaseLimitExceededError`,this.details={type:`releaseLimitExceededError`}}};function L(e){let n=(0,O.c)(47),[r,i]=(0,D.useState)(!1),{data:o}=a(),{enabled:u}=l(ee.contentReleases),f;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(f={dataUri:`/journey/content-releases`,feature:`content-releases`},n[0]=f):f=n[0];let{upsellData:p,telemetryLogs:m,hasError:h}=s(f),g=c(),{t:_}=te(),v;n[1]===o?v=n[2]:(v=o.filter(ae),n[1]=o,n[2]=v);let b=v,x;bb0:{if(!u){x=`upsell`;break bb0}x=`default`}let C=x,w;n[3]===m?w=n[4]:(w=()=>{m.dialogPrimaryClicked()},n[3]=m,n[4]=w);let T=w,E;n[5]===m?E=n[6]:(E=()=>{m.dialogSecondaryClicked()},n[5]=m,n[6]=E);let A=E,j;n[7]===m?j=n[8]:(j=()=>{i(!1),m.dialogDismissed()},n[7]=m,n[8]=j);let M=j,[N,P]=(0,D.useState)(null),[F,L]=(0,D.useState)(!1),R;n[9]!==h||n[10]!==_||n[11]!==m||n[12]!==g?(R=e=>{let t=e===void 0?`navbar`:e;if(h){g.push({status:`error`,title:_(`errors.unable-to-perform-action`),closable:!0});return}i(!0),m.dialogViewed(t)},n[9]=h,n[10]=_,n[11]=m,n[12]=g,n[13]=R):R=n[13];let z=R,{releaseLimits$:B}=ie(),{orgActiveReleaseCount$:V}=re(),H;n[14]!==o.length||n[15]!==z||n[16]!==b.length||n[17]!==C||n[18]!==V||n[19]!==B?(H=async(e,t,n)=>{let r=t!==void 0&&t,i=()=>{if(z(),r)throw new I;return!1};if(C===`upsell`)return n?.(!1),i();let a=await(async()=>{try{return await Promise.all([S(V),S(B.pipe(y(e=>P(e?.orgActiveReleaseLimitLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{xt as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{$r as a,Ao as o,Bo as s,Bs as c,Co as l,Da as u,Di as d,Do as f,Ea as p,Ei as m,En as h,Fa as g,Gc as _,Gs as v,Hr as y,Hs as b,Ia as x,Ji as S,Jo as C,Ka as w,La as T,Mr as E,Nc as D,Oi as O,Pi as k,Qa as A,Ra as j,Ta as M,Ti as N,To as P,Ts as F,Ua as I,Uc as L,Uo as R,Ut as z,Va as B,Vi as V,Vs as H,Wa as U,Wo as W,Xa as ee,Xc as G,Xi as K,Y as te,Yc as ne,Zo as re,aa as ie,ai as ae,bl as oe,cl as se,da as ce,el as le,f as ue,fa as de,ga as fe,gs as pe,ha as me,ka as he,kn as ge,la as _e,lo as ve,m as ye,mi as be,ni as xe,nu as Se,pa as Ce,pi as we,qa as Te,qo as Ee,qs as De,ro as Oe,so as ke,sr as Ae,ti as je,to as Me,tu as Ne,va as Pe,vl as Fe,vo as Ie,wi as Le,xa as Re,yl as ze}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as q,a as Be,b as J,d as Ve,i as He,l as Ue,o as We,s as Ge,t as Ke,w as qe,x as Y}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{t as Je}from"./BehaviorSubject-CugQrNFr.js";import{H as Ye,M as Xe,N as Ze,P as Qe,R as $e,z as et}from"./authStore-CtE9bLHW-D5dT_tdN.js";import{h as tt,i as nt,l as rt,o as it}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{t as at}from"./from-D9LOdazm.js";import{t as ot}from"./map-UaEckSmz.js";import{t as st}from"./filter-C5fzbndz.js";import{A as ct,c as lt,s as ut}from"./SearchProvider-BoC91Z5A-C4CoG1BJ.js";import{c as dt,d as ft,f as pt,m as mt,o as ht,p as gt,t as _t,u as vt}from"./useScheduledDraftMenuActions-Cn0nU-oE-CETpe1XB.js";import{A as yt,Ft as bt,K as xt,M as St,Q as Ct,S as wt,Tt,_ as Et,_t as Dt,b as Ot,dt as kt,ft as X,gt as At,i as jt,lt as Mt,m as Nt,o as Pt,p as Ft,s as It,ut as Lt,wt as Rt}from"./dist-BOMXfkZi.js";import{a as zt,i as Bt,o as Vt}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import{a as Ht}from"./draftUtils-D3HJGQaW-BnJ8Os95.js";import{t as Ut}from"./WarningOutline-DOBjmorn.js";import{t as Wt}from"./Close-B_ZEgT1V.js";import{t as Gt}from"./ChevronDown-BpYUc-AP.js";import{t as Kt}from"./ChevronRight-Cf6GkXSa.js";import{t as qt}from"./Clock-ClG7Ty9T.js";import{t as Jt}from"./Calendar-DCYqUUNo.js";import{t as Yt}from"./EarthGlobe-Dqu4Dt_R.js";import{t as Xt}from"./ErrorOutline-Cl-3_nRG.js";import{t as Zt}from"./InfoOutline-BLtnjxbN.js";import{t as Qt}from"./EllipsisHorizontal-BuWLk1Hy.js";import{t as $t}from"./Edit-CAHlBqGT.js";import{t as en}from"./Publish-BYF7r5nk.js";import{t as tn}from"./Trash-BxG6GrjH.js";import{t as nn}from"./Unpublish-B0p_ZGt2.js";import{t as rn}from"./Link-Cl1VSeDJ.js";import{t as an}from"./Add-CwQ5TpM8.js";import{t as on}from"./Documents-C8KrBFzU.js";import{t as sn}from"./Copy-BTQgeMVP.js";import{t as cn}from"./Lock-Ui2f2sVi.js";import{a as ln,c as un,d as dn,f as fn,g as pn,h as mn,i as hn,l as gn,m as _n,n as vn,o as yn,p as bn,s as xn,t as Sn,u as Cn,v as wn,x as Tn}from"./releases.telemetry-B5f7B-by-Big6UBEW.js";import{a as En,o as Dn,r as On}from"./useBundleDocuments-COX6yIJF--Mmq8r9n.js";import{a as kn,i as An,r as jn}from"./SingleDocReleaseUpsellProvider-6B58QoVy-Cr1fZ6ra.js";import{t as Mn}from"./CheckmarkCircle-B6SBY4QE.js";import{a as Nn,i as Pn,l as Fn,n as In,o as Ln,s as Rn,t as zn,u as Bn}from"./useStudioUrl-DaWT6DFg-C41SEEvP.js";import{t as Vn}from"./RelativeTime-Dxz29E4j-CPrzVxaW.js";import{a as Hn,c as Un,f as Wn,n as Gn,r as Kn,s as qn,t as Jn}from"./navigation.telemetry-B8PhK1vB-BgS3_BQP.js";import{t as Yn}from"./ToneIcon-DgovBh2L-Cc0bZCsU.js";import{t as Xn}from"./UpsellPanel-BzCgrrZO-BKE9DmdX.js";import{t as Zn}from"./useDocumentPreviewValues-Df5XHGi_-HMtAXFMO.js";import{t as Qn}from"./Share-D41CqXzI.js";import{t as $n}from"./Target-6sSmw-4o.js";import{t as er}from"./Restore-DhBjjWCd.js";import{ArchiveIcon as tr}from"./Archive-CNM-Azpz.js";import{CloseCircleIcon as nr}from"./CloseCircle-COYZpajm.js";import{FilterIcon as rr}from"./Filter-DVm6AUFi.js";import{PinIcon as ir}from"./Pin-D-D-SwHN.js";import{PinFilledIcon as ar}from"./PinFilled-pZaJsWPB.js";import{TextIcon as or}from"./Text-CVWqn-j_.js";import{UnarchiveIcon as sr}from"./Unarchive-CobryITl.js";import{UserIcon as cr}from"./User-BbvVoXNB.js";import{n as lr}from"./ReleasesMetadataProvider-ph0rE6jm-CQPhf0Dm.js";import{a as ur,c as dr,i as fr,l as pr,n as mr,o as hr,r as gr,t as _r,u as vr}from"./searchDocumentRelease-CFFIh_uo-DtyZJpEI.js";import{n as yr,t as br}from"./CalendarFilter-D1ZVw1JR-BGfexj9w.js";var Z=e(n(),1),Q=i(),$=r(),xr=`group`,Sr=`releaseNotFound`,Cr=`date`,wr=`view`;function Tr(e){return new URLSearchParams(e.state._searchParams).get(Sr)===`true`}var Er=e=>()=>{let t=new URLSearchParams(e.state._searchParams).get(Cr);return t?new Date(t):void 0},Dr=e=>()=>{let t=new URLSearchParams(e.state._searchParams).get(xr);return t===`archived`?`archived`:t===`paused`?`paused`:`active`},Or=({router:e,isScheduledDraftsEnabled:t,isReleasesEnabled:n})=>()=>t?n?new URLSearchParams(e.state._searchParams).get(wr)===`drafts`Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$o as t,Am as n,Ar as r,Bc as i,Co as a,Cs as o,Dc as s,El as c,Es as l,Fs as u,Ft as d,Ga as f,Gc as p,Hl as m,Ho as h,Ja as g,Jc as _,Ka as v,Ko as y,Lo as b,Md as x,Mo as S,Ms as C,Na as w,Nd as T,Np as E,Oo as D,Os as O,Pa as k,Pn as A,Po as j,Qa as M,Sa as N,Sd as P,Tl as F,To as I,Uo as L,Wa as R,Wc as z,Wo as ee,Wr as te,Xa as B,Xl as V,Yl as H,Ys as U,Zc as W,Zl as G,_ as K,_m as q,ad as ne,am as re,ca as ie,cc as ae,cd as J,cs as oe,da as se,dc as ce,ds as le,ec as ue,ed as de,es as fe,eu as pe,fa as me,fo as he,fs as ge,gd as _e,gl as ve,gm as ye,ha as be,im as xe,ir as Se,jd as Ce,jo as we,ju as Te,ko as Ee,la as De,lc as Oe,ld as ke,lo as Ae,ls as je,m as Me,nc as Ne,ns as Pe,nu as Fe,oc as Ie,os as Le,pc as Re,qa as ze,qc as Be,qr as Ve,rc as He,sc as Ue,sd as We,ts as Ge,wc as Ke,wm as qe,wo as Je,xs as Ye,zc as Xe}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as Ze,t as Qe}from"./jsx-runtime-BpzPEenQ.js";import{t as $e}from"./compiler-runtime-sKsOXjDo.js";import{t as et}from"./from-B8yXq1Hf.js";import{Q as tt,X as nt,Z as rt,at as it,ct as at,ft as ot,ht as st,it as ct,nt as lt,q as ut,rt as dt,xt as ft}from"./clientStore-Cq3vrK4Q-X8Ukd-3S.js";import{$n as pt,A as mt,An as ht,B as gt,Bn as _t,Cn as vt,Dn as yt,E as bt,F as xt,Fn as St,Gn as Ct,H as wt,Hn as Tt,Jn as Et,Kn as Dt,Ln as Ot,Lt as kt,Mt as At,N as jt,On as Mt,Qn as Nt,Qt as Pt,Rn as Ft,Tn as It,Un as Lt,V as Rt,Vn as zt,Wn as Bt,Xn as Vt,Xt as Ht,Yn as Ut,Zn as Wt,_r as Gt,ar as Kt,ct as qt,er as Jt,ir as Yt,j as Xt,jn as Zt,kn as Qt,lt as $t,or as en,ot as tn,qn as nn,rn,st as an,tr as on,ut as sn,y as cn}from"./types--2f-avvL-DfAXA8nG.js";import{A as ln,B as un,Dt as dn,Et as fn,Ft as pn,Gt as mn,O as hn,Pt as gn,R as _n,S as vn,St as Y,T as yn,bt as bn,c as xn,ct as Sn,et as Cn,f as wn,m as Tn,n as En,r as X,s as Dn,t as On,x as kn,yt as An}from"./dist-LVcARZxB.js";import{c as jn,o as Mn,s as Nn}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as Pn}from"./Close-B_ZEgT1V.js";import{t as Fn}from"./WarningOutline-DOBjmorn.js";import{t as In}from"./ChevronDown-BpYUc-AP.js";import{t as Ln}from"./ChevronRight-Cf6GkXSa.js";import{t as Rn}from"./Clock-ClG7Ty9T.js";import{t as zn}from"./Calendar-DCYqUUNo.js";import{t as Bn}from"./EarthGlobe-Dqu4Dt_R.js";import{t as Vn}from"./EllipsisHorizontal-BuWLk1Hy.js";import{t as Hn}from"./InfoOutline-BLtnjxbN.js";import{t as Un}from"./ErrorOutline-Cl-3_nRG.js";import{t as Wn}from"./Trash-BxG6GrjH.js";import{t as Gn}from"./Edit-CAHlBqGT.js";import{t as Kn}from"./Publish-BYF7r5nk.js";import{t as qn}from"./Unpublish-B0p_ZGt2.js";import{t as Jn}from"./Copy-BTQgeMVP.js";import{t as Yn}from"./Documents-C8KrBFzU.js";import{t as Xn}from"./Link-Cl1VSeDJ.js";import{t as Zn}from"./Add-CwQ5TpM8.js";import{t as Qn}from"./Lock-Ui2f2sVi.js";import{a as $n,i as er,r as tr}from"./SingleDocReleaseUpsellProvider-eSYyzLjC-DBu0--ZA.js";import{t as nr}from"./CheckmarkCircle-B6SBY4QE.js";import{t as rr}from"./Share-D41CqXzI.js";import{t as ir}from"./Target-6sSmw-4o.js";import{t as ar}from"./Restore-DhBjjWCd.js";import{ArchiveIcon as or}from"./Archive-CNM-Azpz.js";import{CloseCircleIcon as sr}from"./CloseCircle-COYZpajm.js";import{FilterIcon as cr}from"./Filter-DVm6AUFi.js";import{PinIcon as lr}from"./Pin-D-D-SwHN.js";import{PinFilledIcon as ur}from"./PinFilled-pZaJsWPB.js";import{TextIcon as dr}from"./Text-CVWqn-j_.js";import{UnarchiveIcon as fr}from"./Unarchive-CobryITl.js";import{UserIcon as pr}from"./User-BbvVoXNB.js";import{n as mr}from"./ReleasesMetadataProvider-D91ckc8k-CobfrRVi.js";import{a as hr,c as gr,i as _r,l as vr,n as yr,o as br,r as xr,t as Sr,u as Cr}from"./searchDocumentRelease-CGTwubjG-BxLZ0LzN.js";import{n as wr,t as Tr}from"./CalendarFilter-Xl97nJYN-VpCCR-Os.js";var Z=e(Ze(),1),Q=$e(),$=Qe(),Er=`group`,Dr=`releaseNotFound`,Or=`date`,kr=`view`;function Ar(e){return new URLSearchParams(e.state._searchParams).get(Dr)===`true`}var jr=e=>()=>{let t=new URLSearchParams(e.state._searchParams).get(Or);return t?new Date(t):void 0},Mr=e=>()=>{let t=new URLSearchParams(e.state._searchParams).get(Er);return t===`archived`?`archived`:t===`paused`?`paused`:`active`},Nr=({router:e,isScheduledDraftsEnabled:t,isReleasesEnabled:n})=>()=>t?n?new URLSearchParams(e.state._searchParams).get(kr)===`drafts`?`drafts`:`releases`:`drafts`:`releases`,Pr=(e,t,n)=>{let r=[];return e?r.push([Or,H(e,`yyyy-MM-dd`)]):t!==`active`&&r.push([Er,t]),n===`drafts`&&r.push([kr,`drafts`]),r},Fr={events:[],nextCursor:``,loading:!0,error:null};function Ir(e,t){let n=[...e,...t].reduce((e,t)=>e.has(t.id)?e:e.set(t.id,t),new Map);return Array.from(n.values())}function Lr(e){return{...e,id:`${e.timestamp}-${e.type}`,origin:`events`}}function Rr({client:e,releaseId:t}){let r=new n({cursor:null,origin:`initial`}),i=({limit:n,nextCursor:r})=>{let i=new URLSearchParams({limit:n.toString()});return r&&i.append(`nextCursor`,r),e.observable.request({url:`/data/history/${e.config().dLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{n,t as r}from"./ScheduledPublishingEnabledProvider-Bsqi_oGE-ifxCN0BN.js";import{t as i}from"./SchedulePublishingUpsellProvider-DEWq56BP-Cs5120Xl.js";var a=t(),o=e();function s(e){let t=(0,a.c)(6),{enabled:r,mode:s}=n();if(!r){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let c;t[2]===e?c=t[3]:(c=e.renderDefault(e),t[2]=e,t[3]=c);let l=c;if(s===`upsell`){let e;return t[4]===l?e=t[5]:(e=(0,o.jsx)(i,{children:l}),t[4]=l,t[5]=e),e}return l}function c(e){let t=(0,a.c)(2),n;return t[0]===e?n=t[1]:(n=(0,o.jsx)(r,{children:(0,o.jsx)(s,{...e})}),t[0]=e,t[1]=n),n}export{c as SchedulePublishingStudioLayout};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{L as n}from"./types--2f-avvL-DfAXA8nG.js";import{_ as r,v as i}from"./validationUtils-Dwef0BLR-DSZmlLZW.js";var a=t(),o=e();function s(e){let t=(0,a.c)(6),{enabled:r,mode:s}=i();if(!r){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let c;t[2]===e?c=t[3]:(c=e.renderDefault(e),t[2]=e,t[3]=c);let l=c;if(s===`upsell`){let e;return t[4]===l?e=t[5]:(e=(0,o.jsx)(n,{children:l}),t[4]=l,t[5]=e),e}return l}function c(e){let t=(0,a.c)(2),n;return t[0]===e?n=t[1]:(n=(0,o.jsx)(r,{children:(0,o.jsx)(s,{...e})}),t[0]=e,t[1]=n),n}export{c as SchedulePublishingStudioLayout};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Ct as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{At as a,Yn as o,nt as s}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";var c=e(n(),1),l=i(),u=r();function d(e){let n=(0,l.c)(9),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={dataUri:`/journey/scheduled-publishing`,feature:`scheduled_publishing`},n[0]=r):r=n[0];let i=o(r),c=e.children,d;n[1]===i?d=n[2]:(d=a(i),n[1]=i,n[2]=d);let f;n[3]===d?f=n[4]:(f=(0,u.jsx)(s,{...d}),n[3]=d,n[4]=f);let p;return n[5]!==i||n[6]!==e.children||n[7]!==f?(p=(0,u.jsxs)(t.Provider,{value:i,children:[c,f]}),n[5]=i,n[6]=e.children,n[7]=f,n[8]=p):p=n[8],p}function f(){return(0,c.useContext)(t)}export{f as n,d as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{wt as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{Uc as a,bl as o,hl as s,jn as c,vl as l,x as u}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{P as d}from"./authStore-CtE9bLHW-D5dT_tdN.js";import{h as f,o as p}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{t as m}from"./map-UaEckSmz.js";var h=e(n(),1),g=i(),_=r(),v={used:!1,loading:!0},y=new Map;function b(e){let{dataset:t,projectId:n}=e.config();return e.observable.request({url:`/schedules/${n}/${t}?limit=1`,tag:`scheduled-publishing-used`}).pipe(m(e=>({used:e.schedules?.length>0,loading:!1})),p(()=>f({used:!1,loading:!1})))}function x(e){let t=(0,g.c)(4),{explicitEnabled:n,isWorkspaceEnabled:r}=e,i=l(s),{projectId:c,dataset:u}=o(),p=`${c}-${u}`;if(!y.get(p)){let e=b(i).pipe(d());y.set(p,e)}let m;bb0:{if(n){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=f({used:!0,loading:!1}),t[0]=e):e=t[0],m=e;break bb0}if(!r){let e;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=f({used:!1,loading:!1}),t[1]=e):e=t[1],m=e;break bb0}let e;t[2]===p?e=t[3]:(e=y.get(p)||f(v),t[2]=p,t[3]=e),m=e}return a(m,v)}function S(e){let n=(0,g.c)(16),{children:r}=e,{enabled:i,isLoading:a,error:s}=c(u.scheduledPublishing),{scheduledPublishing:l}=o(),d=l.enabled,f=l.__internal__workspaceEnabled,p;n[0]!==f||n[1]!==d?(p={explicitEnabled:f,isWorkspaceEnabled:d},n[0]=f,n[1]=d,n[2]=p):p=n[2];let m=x(p),h;bb0:{if(!d||a||s){let e;n[3]===m?e=n[4]:(e={enabled:!1,mode:null,hasUsedScheduledPublishing:m},n[3]=m,n[4]=e),h=e;break bb0}if(f){let e=i?`default`:`upsell`,t;n[5]!==m||n[6]!==e?(t={enabled:!0,mode:e,hasUsedScheduledPublishing:m},n[5]=m,n[6]=e,n[7]=t):t=n[7],h=t;break bb0}if(!m.used){let e;n[8]===m?e=n[9]:(e={enabled:!1,mode:null,hasUsedScheduledPublishing:m},n[8]=m,n[9]=e),h=e;break bb0}let e=i?`default`:`upsell`,t;n[10]!==m||n[11]!==e?(t={enabled:!0,mode:e,hasUsedScheduledPublishing:m},n[10]=m,n[11]=e,n[12]=t):t=n[12],h=t}let v=h,y;return n[13]!==r||n[14]!==v?(y=(0,_.jsx)(t.Provider,{value:v,children:r}),n[13]=r,n[14]=v,n[15]=y):y=n[15],y}function C(){return(0,h.useContext)(t)}export{C as n,S as t};
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{Dt as n,r}from"./_singletons-C3kYIdI9.js";import{n as i,t as a}from"./jsx-runtime-BpzPEenQ.js";import{t as o}from"./compiler-runtime-sKsOXjDo.js";import{Bc as s,Co as c,Cs as l,Fc as u,Gc as d,Gn as f,Ic as p,Lc as m,Nc as h,Pc as g,Qa as _,Qr as v,Rc as y,Ss as b,Ta as x,To as S,Ts as C,U as w,Uc as T,Ul as E,Vc as D,Vr as O,Xc as k,Xi as A,Xr as j,_ as M,_a as N,_c as P,bl as F,bo as I,br as L,bs as R,da as z,dc as B,do as V,el as ee,g as H,gs as te,hl as ne,io as re,kn as ie,m as ae,mc as U,mt as oe,sc as W,ts as se,tu as ce,v as le,vl as ue,vn as de,vs as fe,vt as pe,wc as me,xc as he,xr as ge,yl as _e,zc as G,zt as ve}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as ye,a as be,b as K,d as xe,i as Se,l as Ce,n as we,s as Te,t as Ee,w as De,x as q}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{t as Oe}from"./Observable-BrARBsae.js";import{n as ke}from"./OperatorSubscriber-BASvuWFQ.js";import{t as Ae}from"./Subject-UgBXjL8-.js";import{H as je}from"./authStore-CtE9bLHW-D5dT_tdN.js";import{_ as Me,d as Ne,f as Pe,h as Fe,i as Ie,p as Le}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{o as Re}from"./from-D9LOdazm.js";import{t as ze}from"./map-UaEckSmz.js";import{r as Be}from"./dist-CXbg9KOR.js";import{O as Ve}from"./lib-BUPHIzf9.js";import{Ft as J,J as He,K as Ue,M as We,N as Ge,Nt as Ke,O as qe,Q as Je,Tt as Ye,Ut as Xe,Vt as Ze,dt as Qe,ft as $e,gt as et,i as tt,jt as nt,lt as rt,s as it,wt as at}from"./dist-BOMXfkZi.js";import{i as ot}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import{a as st,c as ct}from"./draftUtils-D3HJGQaW-BnJ8Os95.js";import{t as lt}from"./WarningOutline-DOBjmorn.js";import{t as ut}from"./Spinner-Dk8hTAm3.js";import{t as dt}from"./Close-B_ZEgT1V.js";import{t as ft}from"./ChevronDown-BpYUc-AP.js";import{t as pt}from"./Checkmark-OT7tsNpL.js";import{t as mt}from"./ChevronRight-Cf6GkXSa.js";import{t as ht}from"./Clock-ClG7Ty9T.js";import{t as gt}from"./Search-QbUIQb6W.js";import{t as _t}from"./ErrorOutline-Cl-3_nRG.js";import{t as vt}from"./ArrowLeft-x2OZCZTu.js";import{t as yt}from"./Trash-BxG6GrjH.js";import{t as bt}from"./Unknown-CEYtdaCK.js";import{t as xt}from"./Add-CwQ5TpM8.js";import{t as St}from"./CommandList-DJKGk0Iq-Dt5aZzT5.js";import{t as Ct}from"./Sort-CFTgH29c.js";import{t as wt}from"./Controls-Dx7QJOxz.js";function Tt(){var e=[...arguments],t=Me(e),n=Pe(e),r=n.args,i=n.keys,a=new Oe(function(e){var t=r.length;if(!t){e.complete();return}for(var n=Array(t),a=t,o=t,s=function(t){var s=!1;Re(r[t]).subscribe(ke(e,function(e){s||(s=!0,o--),n[t]=e},function(){return a--},void 0,function(){(!a||!s)&&(o||e.next(i?Ne(i,n):n),e.complete())}))},c=0;c<t;c++)s(c)});return t?a.pipe(Le(t)):a}for(var Y=e(i(),1),X=o(),Z=a(),Et=e(U(),1),Dt=typeof window<`u`&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Ot={alt:`altKey`,control:`ctrlKey`,meta:`metaKey`,shift:`shiftKey`},kt={add:`+`,break:`pause`,cmd:`meta`,command:`meta`,ctl:`control`,ctrl:`control`,del:`delete`,down:`arrowdown`,esc:`escape`,ins:`insert`,left:`arrowleft`,mod:Dt?`meta`:`control`,opt:`alt`,option:`alt`,return:`enter`,right:`arrowright`,space:` `,spacebar:` `,up:`arrowup`,win:`meta`,windows:`meta`},At={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},jt=1;jt<20;jt++)At[`f`+jt]=111+jt;function Mt(e,t,n){t&&!(`byKey`in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);let r=e.map(e=>Nt(e,t)),i=e=>r.some(t=>Pt(t,e));return n==null?i:i(n)}function Nt(e,t){let n=t&&t.byKey,r={};e=e.replace(`++`,`+add`);let i=e.split(`+`),{length:a}=i;for(let e in Ot)r[Ot[e]]=!1;for(let e of i){let t=e.endsWith(`?`)&&e.length>1;t&&(e=e.slice(0,-1));let i=It(e),o=Ot[i];if(e.length>1&&!o&&!kt[e]&&!At[i])throw TypeError(`Unknown modifier: "${e}"`);(a===1||!o)&&(n?r.key=i:r.which=Ft(e)),o&&(r[o]=!t||null)}return r}function Pt(e,t){for(let n in e){let r=e[n],i;if(r!=null&&(i=n===`key`&&t.key!=null?t.key.toLowerCase():n===`which`?r===91&&t.which===93?91:t.which:t[n],(i!=null||r!==!1)&&i!==r))return!1}return!0}function Ft(e){return e=It(e),At[e]||e.toUpperCase().charCodeAt(0)}function It(e){return e=e.toLowerCase(),e=kt[e]||e,e}var Lt=`[object Map]`,Rt=`[object Set]`,zt=Object.prototype.hasOwnProperty;function Bt(e){if(e==null)return!0;if(u(e)&&(D(e)||typeof e==`string`||typeof e.splice==`function`||G(e)||y(e)||s(e)))return!e.length;var t=g(e);if(t==Lt||t==Rt)return!e.size;if(m(e))return!p(e).length;for(var n in e)if(zt.call(e,n))return!1;return!0}var Vt=t((e=>{var t=i(),n=Xe();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+`
Line truncated
|
||||
`&&e.push(`
|
||||
`),M!==null&&e.push(F(``+M)),null;case`input`:e.push(ke(`input`));var R=null,B=null,V=null,ee=null,H=null,ne=null,re=null,ie=null,ae=null,U;for(U in n)if(D.call(n,U)){var oe=n[U];if(oe!=null)switch(U){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,`input`));case`name`:R=oe;break;case`formAction`:B=oe;break;case`formEncType`:V=oe;break;case`formMethod`:ee=oe;break;case`formTarget`:H=oe;break;case`defaultChecked`:ae=oe;break;case`defaultValue`:re=oe;break;case`checked`:ie=oe;break;case`value`:ne=oe;break;default:G(e,U,oe)}}var W=_e(e,i,a,B,V,ee,H,R);return ie===null?ae!==null&&de(e,`checked`,ae):de(e,`checked`,ie),ne===null?re!==null&&G(e,`value`,re):G(e,`value`,ne),e.push(`/>`),W?.forEach(me,e),null;case`button`:e.push(ke(`button`));var se=null,ce=null,le=null,he=null,q=null,Oe=null,Ae=null,je;for(je in n)if(D.call(n,je)){var Ne=n[je];if(Ne!=null)switch(je){case`children`:se=Ne;break;case`dangerouslySetInnerHTML`:ce=Ne;break;case`name`:le=Ne;break;case`formAction`:he=Ne;break;case`formEncType`:q=Ne;break;case`formMethod`:Oe=Ne;break;case`formTarget`:Ae=Ne;break;default:G(e,je,Ne)}}var Pe=_e(e,i,a,he,q,Oe,Ae,le);if(e.push(`>`),Pe?.forEach(me,e),ve(e,ce,se),typeof se==`string`){e.push(F(se));var Fe=null}else Fe=se;return Fe;case`form`:e.push(ke(`form`));var Ie=null,Le=null,Re=null,ze=null,Be=null,Ve=null,J;for(J in n)if(D.call(n,J)){var He=n[J];if(He!=null)switch(J){case`children`:Ie=He;break;case`dangerouslySetInnerHTML`:Le=He;break;case`action`:Re=He;break;case`encType`:ze=He;break;case`method`:Be=He;break;case`target`:Ve=He;break;default:G(e,J,He)}}var Ue=null,We=null;if(typeof Re==`function`){var Ge=ge(i,Re);Ge===null?(e.push(` `,`action`,`="`,pe,`"`),Ve=Be=ze=Re=null,be(i,a)):(Re=Ge.action||``,ze=Ge.encType,Be=Ge.method,Ve=Ge.target,Ue=Ge.data,We=Ge.name)}if(Re!=null&&G(e,`action`,Re),ze!=null&&G(e,`encType`,ze),Be!=null&&G(e,`method`,Be),Ve!=null&&G(e,`target`,Ve),e.push(`>`),We!==null&&(e.push(`<input type="hidden"`),fe(e,`name`,We),e.push(`/>`),Ue?.forEach(me,e)),ve(e,Le,Ie),typeof Ie==`string`){e.push(F(Ie));var Ke=null}else Ke=Ie;return Ke;case`menuitem`:for(var qe in e.push(ke(`menuitem`)),n)if(D.call(n,qe)){var Je=n[qe];if(Je!=null)switch(qe){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(400));default:G(e,qe,Je)}}return e.push(`>`),null;case`object`:e.push(ke(`object`));var Ye=null,Xe=null,Ze;for(Ze in n)if(D.call(n,Ze)){var Qe=n[Ze];if(Qe!=null)switch(Ze){case`children`:Ye=Qe;break;case`dangerouslySetInnerHTML`:Xe=Qe;break;case`data`:var $e=z(``+Qe);if($e===``)break;e.push(` `,`data`,`="`,F($e),`"`);break;default:G(e,Ze,Qe)}}if(e.push(`>`),ve(e,Xe,Ye),typeof Ye==`string`){e.push(F(Ye));var et=null}else et=Ye;return et;case`title`:var tt=c.tagScope&1,nt=c.tagScope&4;if(c.insertionMode===4||tt||n.itemProp!=null)var rt=we(e,n);else nt?rt=null:(we(a.hoistableChunks,n),rt=void 0);return rt;case`link`:var it=c.tagScope&1,at=c.tagScope&4,ot=n.rel,st=n.href,ct=n.precedence;if(c.insertionMode===4||it||n.itemProp!=null||typeof ot!=`string`||typeof st!=`string`||st===``){K(e,n);var lt=null}else if(n.rel===`stylesheet`){if(typeof ct!=`string`||n.disabled!=null||n.onLoad||n.onError)lt=K(e,n);else{var ft=a.styles.get(ct),pt=i.styleResources.hasOwnProperty(st)?i.styleResources[st]:void 0;if(pt!==null){i.styleResources[st]=null,ft||(ft={precedence:F(ct),rules:[],hrefs:[],sheets:new Map},a.styles.set(ct,ft));var mt={state:0,props:E({},n,{"data-precedence":n.precedence,precedence:null})};if(pt){pt.length===2&&ut(mt.props,pt);var ht=a.preloads.stylesheets.get(st);ht&&0<ht.length?ht.length=0:mt.state=1}ft.sheets.set(st,mt),s&&s.stylesheets.add(mt)}else if(ft){var gt=ft.sheets.get(st);gt&&s&&s.stylesheets.add(gt)}l&&e.push(`<!-- -->`),lt=null}}else n.onLoad||n.onError?lt=K(e,n):(l&&e.push(`<!-- -->`),lt=at?null:K(a.hoistableChunks,n));return lt;case`script`:var _t=c.tagScope&1,vt=n.async;if(typeof n.src!=`string`||!n.src||!vt||typeof vt==`function`||typeof vt==`symbol`||n.onLoad||n.onError||c.insertionMode===4||_t||n.itemProp!=null)var yt=Te(e,n);else{var bt=n.src;if(n.type===`module`)var xt=i.moduleScriptResources,St=a.preloads.moduleScripts;else xt=i.scriptResources,St=a.preloads.scripts;var Ct=xt.hasOwnProperty(bt)?xt[bt]:void 0;if(Ct!==null){xt[bt]=null;var wt=n;if(Ct){Ct.length===2&&(wt=E({},n),ut(wt,Ct));var Tt=St.get(bt);Tt&&(Tt.length=0)}var Y=[];a.scripts.add(Y),Te(Y,wt)}l&&e.push(`<!-- -->`),yt=null}return yt;case`style`:var X=c.tagScope&1,Z=n.precedence,Et=n.href,Dt=n.nonce;if(c.insertionMode===4||X||n.itemProp!=null||typeof Z!=`string`||typeof Et!=`string`||Et===``){e.push(ke(`style`));var Ot=null,kt=null,At;for(At in n)if(D.call(n,At)){var jt=n[At];if(jt!=null)switch(At){case`children`:Ot=jt;break;case`dangerouslySetInnerHTML`:kt=jt;break;default:G(e,At,jt)}}e.push(`>`);var Mt=Array.isArray(Ot)?2>Ot.length?Ot[0]:null:Ot;typeof Mt!=`function`&&typeof Mt!=`symbol`&&Mt!=null&&e.push((``+Mt).replace(xe,Se)),ve(e,kt,Ot),e.push(Me(`style`));var Nt=null}else{var Pt=a.styles.get(Z);i
Line truncated
|
||||
`?e.push(`
|
||||
`,Q):e.push(``+Q))}return typeof Gt==`string`&&Gt[0]===`
|
||||
`&&e.push(`
|
||||
`),Gt;case`img`:var Yt=c.tagScope&3,Xt=n.src,Zt=n.srcSet;if(!(n.loading===`lazy`||!Xt&&!Zt||typeof Xt!=`string`&&Xt!=null||typeof Zt!=`string`&&Zt!=null||n.fetchPriority===`low`||Yt)&&(typeof Xt!=`string`||Xt[4]!==`:`||Xt[0]!==`d`&&Xt[0]!==`D`||Xt[1]!==`a`&&Xt[1]!==`A`||Xt[2]!==`t`&&Xt[2]!==`T`||Xt[3]!==`a`&&Xt[3]!==`A`)&&(typeof Zt!=`string`||Zt[4]!==`:`||Zt[0]!==`d`&&Zt[0]!==`D`||Zt[1]!==`a`&&Zt[1]!==`A`||Zt[2]!==`t`&&Zt[2]!==`T`||Zt[3]!==`a`&&Zt[3]!==`A`)){s!==null&&c.tagScope&64&&(s.suspenseyImages=!0);var Qt=typeof n.sizes==`string`?n.sizes:void 0,$t=Zt?Zt+`
|
||||
`+(Qt||``):Xt,en=a.preloads.images,tn=en.get($t);if(tn)(n.fetchPriority===`high`||10>a.highImagePreloads.size)&&(en.delete($t),a.highImagePreloads.add(tn));else if(!i.imageResources.hasOwnProperty($t)){i.imageResources[$t]=te;var nn=n.crossOrigin,rn=typeof nn==`string`?nn===`use-credentials`?nn:``:void 0,an=a.headers,$;an&&0<an.remainingCapacity&&typeof n.srcSet!=`string`&&(n.fetchPriority===`high`||500>an.highImagePreloads.length)&&($=dt(Xt,`image`,{imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:rn,integrity:n.integrity,nonce:n.nonce,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.refererPolicy}),0<=(an.remainingCapacity-=$.length+2))?(a.resets.image[$t]=te,an.highImagePreloads&&(an.highImagePreloads+=`, `),an.highImagePreloads+=$):(tn=[],K(tn,{rel:`preload`,as:`image`,href:Zt?void 0:Xt,imageSrcSet:Zt,imageSizes:Qt,crossOrigin:rn,integrity:n.integrity,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy}),n.fetchPriority===`high`||10>a.highImagePreloads.size?a.highImagePreloads.add(tn):(a.bulkPreloads.add(tn),en.set($t,tn)))}}return Ce(e,n,`img`);case`base`:case`area`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`param`:case`source`:case`track`:case`wbr`:return Ce(e,n,t);case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:break;case`head`:if(2>c.insertionMode){var on=o||a.preamble;if(on.headChunks)throw Error(r(545,"`<head>`"));o!==null&&e.push(`<!--head-->`),on.headChunks=[];var sn=Ee(on.headChunks,n,`head`)}else sn=De(e,n,`head`);return sn;case`body`:if(2>c.insertionMode){var cn=o||a.preamble;if(cn.bodyChunks)throw Error(r(545,"`<body>`"));o!==null&&e.push(`<!--body-->`),cn.bodyChunks=[];var ln=Ee(cn.bodyChunks,n,`body`)}else ln=De(e,n,`body`);return ln;case`html`:if(c.insertionMode===0){var un=o||a.preamble;if(un.htmlChunks)throw Error(r(545,"`<html>`"));o!==null&&e.push(`<!--html-->`),un.htmlChunks=[``];var dn=Ee(un.htmlChunks,n,`html`)}else dn=De(e,n,`html`);return dn;default:if(t.indexOf(`-`)!==-1){e.push(ke(t));var fn=null,pn=null,mn;for(mn in n)if(D.call(n,mn)){var hn=n[mn];if(hn!=null){var gn=mn;switch(mn){case`children`:fn=hn;break;case`dangerouslySetInnerHTML`:pn=hn;break;case`style`:ue(e,hn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`ref`:break;case`className`:gn=`class`;default:if(j(mn)&&typeof hn!=`function`&&typeof hn!=`symbol`&&!1!==hn){if(!0===hn)hn=``;else if(typeof hn==`object`)continue;e.push(` `,gn,`="`,F(hn),`"`)}}}}return e.push(`>`),ve(e,pn,fn),fn}}return De(e,n,t)}var je=new Map;function Me(e){var t=je.get(e);return t===void 0&&(t=`</`+e+`>`,je.set(e,t)),t}function Ne(e,t){e=e.preamble,e.htmlChunks===null&&t.htmlChunks&&(e.htmlChunks=t.htmlChunks),e.headChunks===null&&t.headChunks&&(e.headChunks=t.headChunks),e.bodyChunks===null&&t.bodyChunks&&(e.bodyChunks=t.bodyChunks)}function Pe(e,t){t=t.bootstrapChunks;for(var n=0;n<t.length-1;n++)e.push(t[n]);return n<t.length?(n=t[n],t.length=0,e.push(n)):!0}function Fe(e,t,n){if(e.push(`<!--$?--><template id="`),n===null)throw Error(r(395));return e.push(t.boundaryPrefix),t=n.toString(16),e.push(t),e.push(`"></template>`)}function Ie(e,t,n,i){switch(n.insertionMode){case 0:case 1:case 3:case 2:return e.push(`<div hidden id="`),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push(`">`);case 4:return e.push(`<svg aria-hidden="true" style="display:none" id="`),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push(`">`);case 5:return e.push(`<math aria-hidden="true" style="display:none" id="`),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push(`">`);case 6:return e.push(`<table hidden id="`),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push(`">`);case 7:return e.push(`<table hidden><tbody id="`),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push(`">`);case 8:return e.push(`<table hidden><tr id="`),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push(`">`);case 9:return e.push(`<table hidden><colgroup id="`),e.push(t.segmentPrefix),t=i.toString(16),e.push(t),e.push(`">`);default:throw Error(r(397))}}function Le(e,t){switch(t.insertionMode){case 0:case 1:case 3:case 2:return e.push(`</div>`);case 4:return e.push(`</svg>`);case 5:return e.push(`</math>`);case 6:return e.push(`</table>`);case 7:return e.push(`</tbody></table>`);case 8:return e.push(`</tr></table>`);case 9:return e.push(`</colgroup></table>`);default:throw Error(r(397))}}var Re=/[<\u2028\u2029]/g;function ze(e){return JSON.stringify(e).replace(Re,function(e){switch(e){case`<`:return`\\u003c`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:throw Error(`escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React`)}})}var Be=/[&><\u2028\u2029]/g;function Ve(e){return JSON.stringify(e).replace(Be,function(e){swLine truncated
|
||||
`+(s||``):e;if(i.imageResources.hasOwnProperty(l))return;i.imageResources[l]=te,i=a.headers;var u;i&&0<i.remainingCapacity&&typeof o!=`string`&&c===`high`&&(u=dt(e,t,n),0<=(i.remainingCapacity-=u.length+2))?(a.resets.image[l]=te,i.highImagePreloads&&(i.highImagePreloads+=`, `),i.highImagePreloads+=u):(i=[],K(i,E({rel:`preload`,href:o?void 0:e,as:t},n)),c===`high`?a.highImagePreloads.add(i):(a.bulkPreloads.add(i),a.preloads.images.set(l,i)));break;case`style`:if(i.styleResources.hasOwnProperty(e))return;o=[],K(o,E({rel:`preload`,href:e,as:t},n)),i.styleResources[e]=!n||typeof n.crossOrigin!=`string`&&typeof n.integrity!=`string`?te:[n.crossOrigin,n.integrity],a.preloads.stylesheets.set(e,o),a.bulkPreloads.add(o);break;case`script`:if(i.scriptResources.hasOwnProperty(e))return;o=[],a.preloads.scripts.set(e,o),a.bulkPreloads.add(o),K(o,E({rel:`preload`,href:e,as:t},n)),i.scriptResources[e]=!n||typeof n.crossOrigin!=`string`&&typeof n.integrity!=`string`?te:[n.crossOrigin,n.integrity];break;default:if(i.unknownResources.hasOwnProperty(t)){if(o=i.unknownResources[t],o.hasOwnProperty(e))return}else o={},i.unknownResources[t]=o;if(o[e]=te,(i=a.headers)&&0<i.remainingCapacity&&t===`font`&&(l=dt(e,t,n),0<=(i.remainingCapacity-=l.length+2)))a.resets.font[e]=te,i.fontPreloads&&(i.fontPreloads+=`, `),i.fontPreloads+=l;else switch(i=[],e=E({rel:`preload`,href:e,as:t},n),K(i,e),t){case`font`:a.fontPreloads.add(i);break;default:a.bulkPreloads.add(i)}}Dr(r)}}else H.L(e,t,n)}function ot(e,t){var n=Mn||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=t&&typeof t.as==`string`?t.as:`script`;switch(a){case`script`:if(r.moduleScriptResources.hasOwnProperty(e))return;a=[],r.moduleScriptResources[e]=!t||typeof t.crossOrigin!=`string`&&typeof t.integrity!=`string`?te:[t.crossOrigin,t.integrity],i.preloads.moduleScripts.set(e,a);break;default:if(r.moduleUnknownResources.hasOwnProperty(a)){var o=r.unknownResources[a];if(o.hasOwnProperty(e))return}else o={},r.moduleUnknownResources[a]=o;a=[],o[e]=te}K(a,E({rel:`modulepreload`,href:e},t)),i.bulkPreloads.add(a),Dr(n)}}else H.m(e,t)}function st(e,t,n){var r=Mn||null;if(r){var i=r.resumableState,a=r.renderState;if(e){t||=`default`;var o=a.styles.get(t),s=i.styleResources.hasOwnProperty(e)?i.styleResources[e]:void 0;s!==null&&(i.styleResources[e]=null,o||(o={precedence:F(t),rules:[],hrefs:[],sheets:new Map},a.styles.set(t,o)),t={state:0,props:E({rel:`stylesheet`,href:e,"data-precedence":t},n)},s&&(s.length===2&&ut(t.props,s),(a=a.preloads.stylesheets.get(e))&&0<a.length?a.length=0:t.state=1),o.sheets.set(e,t),Dr(r))}}else H.S(e,t,n)}function ct(e,t){var n=Mn||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=r.scriptResources.hasOwnProperty(e)?r.scriptResources[e]:void 0;a!==null&&(r.scriptResources[e]=null,t=E({src:e,async:!0},t),a&&(a.length===2&&ut(t,a),e=i.preloads.scripts.get(e))&&(e.length=0),e=[],i.scripts.add(e),Te(e,t),Dr(n))}}else H.X(e,t)}function lt(e,t){var n=Mn||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=r.moduleScriptResources.hasOwnProperty(e)?r.moduleScriptResources[e]:void 0;a!==null&&(r.moduleScriptResources[e]=null,t=E({src:e,type:`module`,async:!0},t),a&&(a.length===2&&ut(t,a),e=i.preloads.moduleScripts.get(e))&&(e.length=0),e=[],i.scripts.add(e),Te(e,t),Dr(n))}}else H.M(e,t)}function ut(e,t){e.crossOrigin??=t[0],e.integrity??=t[1]}function dt(e,t,n){for(var r in e=(``+e).replace(ft,pt),t=(``+t).replace(mt,ht),t=`<`+e+`>; rel=preload; as="`+t+`"`,n)D.call(n,r)&&(e=n[r],typeof e==`string`&&(t+=`; `+r.toLowerCase()+`="`+(``+e).replace(mt,ht)+`"`));return t}var ft=/[<>\r\n]/g;function pt(e){switch(e){case`<`:return`%3C`;case`>`:return`%3E`;case`
|
||||
`:return`%0A`;case`\r`:return`%0D`;default:throw Error(`escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React`)}}var mt=/["';,\r\n]/g;function ht(e){switch(e){case`"`:return`%22`;case`'`:return`%27`;case`;`:return`%3B`;case`,`:return`%2C`;case`
|
||||
`:return`%0A`;case`\r`:return`%0D`;default:throw Error(`escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React`)}}function gt(e){this.styles.add(e)}function _t(e){this.stylesheets.add(e)}function vt(e,t){t.styles.forEach(gt,e),t.stylesheets.forEach(_t,e),t.suspenseyImages&&(e.suspenseyImages=!0)}function yt(e,t){var n=e.idPrefix,r=[],i=e.bootstrapScriptContent,a=e.bootstrapScripts,o=e.bootstrapModules;i!==void 0&&(r.push(`<script`),$e(r,e),r.push(`>`,(``+i).replace(re,ie),`<\/script>`)),i=n+`P:`;var s=n+`S:`;n+=`B:`;var c=new Set,l=new Set,u=new Set,d=new Map,f=new Set,p=new Set,m=new Set,h={images:new Map,stylesheets:new Map,scripts:new Map,moduleScripts:new Map};if(a!==void 0)for(var g=0;g<a.length;g++){var _=a[g],v,y=void 0,b=void 0,x={rel:`preload`,as:`script`,fetchPriority:`low`,nonce:void 0};typeof _==`string`?x.href=v=_:(x.href=v=_.src,x.integrity=b=typeof _.integrity==`string`?_.integrity:void 0,x.crossOrigin=y=typeof _==`string`||_.crossOrigin==null?void 0:_.crossOrigin===`use-credentials`?`use-credentials`:``),_=e;var S=v;_.scriptResources[S]=null,_.moduleScriptResources[S]=null,_=[],K(_,x),f.add(_),r.push(`<script src="`,F(v),`"`),typeof b==`string`&&r.push(` integrity="`,F(b),`"`),typeof y==`string`&&r.push(` crossorigin="`,F(y),`"`),$e(r,e),r.push(` async=""><\/script>`)}if(o!==void 0)for(a=0;a<o.length;a++)x=o[a],y=v=void 0,b={rel:`modulepreload`,fetchPriority:`low`,nonce:void 0},typeof x==`string`?b.href=g=x:(b.href=g=x.src,b.integrity=y=typeof x.integrity==`string`?x.integrity:void 0,b.crossOrigin=v=typeof x==`string`||x.crossOrigin==null?void 0:x.crossOrigin===`use-credentials`?`use-credentials`:``),x=e,_=g,x.scriptResources[_]=null,x.moduleScriptResources[_]=null,x=[],K(x,b),f.add(x),r.push(`<script type="module" src="`,F(g),`"`),typeof y==`string`&&r.push(` integrity="`,F(y),`"`),typeof v==`string`&&r.push(` crossorigin="`,F(v),`"`),$e(r,e),r.push(` async=""><\/script>`);return{placeholderPrefix:i,segmentPrefix:s,boundaryPrefix:n,startInlineScript:`<script`,startInlineStyle:`<style`,preamble:{htmlChunks:null,headChunks:null,bodyChunks:null},externalRuntimeScript:null,bootstrapChunks:r,importMapChunks:[],onHeaders:void 0,headers:null,resets:{font:{},dns:{},connect:{default:{},anonymous:{},credentials:{}},image:{},style:{}},charsetChunks:[],viewportChunks:[],hoistableChunks:[],preconnects:c,fontPreloads:l,highImagePreloads:u,styles:d,bootstrapScripts:f,scripts:p,bulkPreloads:m,preloads:h,nonce:{script:void 0,style:void 0},stylesToHoist:!1,generateStaticMarkup:t}}function bt(e,t,n,r){return n.generateStaticMarkup?(e.push(F(t)),!1):(t===``?e=r:(r&&e.push(`<!-- -->`),e.push(F(t)),e=!0),e)}function xt(e,t,n,r){t.generateStaticMarkup||n&&r&&e.push(`<!-- -->`)}var St=Function.prototype.bind,Ct=Symbol.for(`react.client.reference`);function wt(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===Ct?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case s:return`Fragment`;case l:return`Profiler`;case c:return`StrictMode`;case p:return`Suspense`;case m:return`SuspenseList`;case v:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case o:return`Portal`;case d:return e.displayName||`Context`;case u:return(e._context.displayName||`Context`)+`.Consumer`;case f:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case h:return t=e.displayName||null,t===null?wt(e.type)||`Memo`:t;case g:t=e._payload,e=e._init;try{return wt(e(t))}catch{}}return null}var Tt={},Y=null;function X(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var n=t.parent;if(e===null){if(n!==null)throw Error(r(401))}else{if(n===null)throw Error(r(401));X(e,n)}t.context._currentValue2=t.value}}function Z(e){e.context._currentValue2=e.parentValue,e=e.parent,e!==null&&Z(e)}function Et(e){var t=e.parent;t!==null&&Et(t),e.context._currentValue2=e.value}function Dt(e,t){if(e.context._currentValue2=e.parentValue,e=e.parent,e===null)throw Error(r(402));e.depth===t.depth?X(e,t):Dt(e,t)}function Ot(e,t){var n=t.parent;if(n===null)throw Error(r(402));e.depth===n.depth?X(e,n):Ot(e,n),t.context._currentValue2=t.value}function kt(e){var t=Y;t!==e&&(t===null?Et(e):e===null?Z(t):t.depth===e.depth?X(t,e):t.depth>e.depth?Dt(t,e):Ot(t,e),Y=e)}var At={enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}},jt={id:1,overflow:``};function Mt(e,t,n){var r=e.id;e=e.overflow;var i=32-Nt(r)-1;r&=~(1<<i),n+=1;var a=32-Nt(t)+i;if(30<a){var o=i-i%5;return a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-Nt(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var Nt=Math.clz32?Math.clz32:It,Pt=Math.log,Ft=Math.LN2;function It(e){return e>>>=0,e==
Line truncated
|
||||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||||
`+Sn+e+Cn}var Tn=!1;function En(e,t){if(!e||Tn)return``;Tn=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||||
`),l=s.split(`
|
||||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Tn=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?wn(n):``}function Dn(e){if(typeof e==`string`)return wn(e);if(typeof e==`function`)return e.prototype&&e.prototype.isReactComponent?En(e,!0):En(e,!1);if(typeof e==`object`&&e){switch(e.$$typeof){case f:return En(e.render,!1);case h:return En(e.type,!1);case g:var t=e,n=t._payload;t=t._init;try{e=t(n)}catch{return wn(`Lazy`)}return Dn(e)}if(typeof e.name==`string`){a:{n=e.name,t=e.env;var r=e.debugLocation;if(r!=null&&(e=Error.prepareStackTrace,Error.prepareStackTrace=void 0,r=r.stack,Error.prepareStackTrace=e,r.startsWith(`Error: react-stack-top-frame
|
||||
`)&&(r=r.slice(29)),e=r.indexOf(`
|
||||
`),e!==-1&&(r=r.slice(e+1)),e=r.indexOf(`react_stack_bottom_frame`),e!==-1&&(e=r.lastIndexOf(`
|
||||
`,e)),e=e===-1?``:r=r.slice(0,e),r=e.lastIndexOf(`
|
||||
`),e=r===-1?e:e.slice(r+1),e.indexOf(n)!==-1)){n=`
|
||||
`+e;break a}n=wn(n+(t?` [`+t+`]`:``))}return n}}switch(e){case m:return wn(`SuspenseList`);case p:return wn(`Suspense`)}return``}function On(e,t){return(500<t.byteSize||!1)&&t.contentPreamble===null}function kn(e){if(typeof e==`object`&&e&&typeof e.environmentName==`string`){var t=e.environmentName;e=[e].slice(0),typeof e[0]==`string`?e.splice(0,1,`[%s] `+e[0],` `+t+` `):e.splice(0,0,`[%s]`,` `+t+` `),e.unshift(console),t=St.apply(console.error,e),t()}else console.error(e);return null}function An(e,t,n,r,i,a,o,s,c,l,u){var d=new Set;this.destination=null,this.flushScheduled=!1,this.resumableState=e,this.renderState=t,this.rootFormatContext=n,this.progressiveChunkSize=r===void 0?12800:r,this.status=10,this.fatalError=null,this.pendingRootTasks=this.allPendingTasks=this.nextSegmentId=0,this.completedPreambleSegments=this.completedRootSegment=null,this.byteSize=0,this.abortableTasks=d,this.pingedTasks=[],this.clientRenderedBoundaries=[],this.completedBoundaries=[],this.partialBoundaries=[],this.trackedPostpones=null,this.onError=i===void 0?kn:i,this.onPostpone=l===void 0?Lt:l,this.onAllReady=a===void 0?Lt:a,this.onShellReady=o===void 0?Lt:o,this.onShellError=s===void 0?Lt:s,this.onFatalError=c===void 0?Lt:c,this.formState=u===void 0?null:u}function jn(e,t,n,r,i,a,o,s,c,l,u,d){return t=new An(t,n,r,i,a,o,s,c,l,u,d),n=Ln(t,0,null,r,!1,!1),n.parentFlushed=!0,e=Fn(t,null,e,-1,null,n,null,null,t.abortableTasks,null,r,null,jt,null,null),Rn(e),t.pingedTasks.push(e),t}var Mn=null;function Nn(e,t){e.pingedTasks.push(t),e.pingedTasks.length===1&&(e.flushScheduled=e.destination!==null,hr(e))}function Pn(e,t,n,r,i){return n={status:0,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,row:t,completedSegments:[],byteSize:0,fallbackAbortableTasks:n,errorDigest:null,contentState:nt(),fallbackState:nt(),contentPreamble:r,fallbackPreamble:i,trackedContentKeyPath:null,trackedFallbackNode:null},t!==null&&(t.pendingTasks++,r=t.boundaries,r!==null&&(e.allPendingTasks++,n.pendingTasks++,r.push(n)),e=t.inheritedHoistables,e!==null&&vt(n.contentState,e)),n}function Fn(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++,p!==null&&p.pendingTasks++;var h={replay:null,node:n,childIndex:r,ping:function(){return Nn(e,h)},blockedBoundary:i,blockedSegment:a,blockedPreamble:o,hoistableState:s,abortSet:c,keyPath:l,formatContext:u,context:d,treeContext:f,row:p,componentStack:m,thenableState:t};return c.add(h),h}function In(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.allPendingTasks++,a===null?e.pendingRootTasks++:a.pendingTasks++,f!==null&&f.pendingTasks++,n.pendingTasks++;var m={replay:n,node:r,childIndex:i,ping:function(){return Nn(e,m)},blockedBoundary:a,blockedSegment:null,blockedPreamble:null,hoistableState:o,abortSet:s,keyPath:c,formatContext:l,context:u,treeContext:d,row:f,componentStack:p,thenableState:t};return s.add(m),m}function Ln(e,t,n,r,i,a){return{status:0,parentFlushed:!1,id:-1,index:t,chunks:[],children:[],preambleChildren:[],parentFormatContext:r,boundary:n,lastPushedText:i,textEmbedded:a}}function Rn(e){var t=e.node;if(typeof t==`object`&&t)switch(t.$$typeof){case a:e.componentStack={parent:e.componentStack,type:t.type}}}function zn(e){return e===null?null:{parent:e.parent,type:`Suspense Fallback`}}function Bn(e){var t={};return e&&Object.defineProperty(t,"componentStack",{configurable:!0,enumerable:!0,get:function(){try{var n=``,r=e;do n+=Dn(r.type),r=r.parent;while(r);var i=n}catch(e){i=`
|
||||
Error generating stack: `+e.message+`
|
||||
`+e.stack}return Object.defineProperty(t,"componentStack",{value:i}),i}}),t}function Vn(e,t,n){if(e=e.onError,t=e(t,n),t==null||typeof t==`string`)return t}function Hn(e,t){var n=e.onShellError,r=e.onFatalError;n(t),r(t),e.destination===null?(e.status=13,e.fatalError=t):(e.status=14,e.destination.destroy(t))}function Un(e,t){Wn(e,t.next,t.hoistables)}function Wn(e,t,n){for(;t!==null;){n!==null&&(vt(t.hoistables,n),t.inheritedHoistables=n);var r=t.boundaries;if(r!==null){t.boundaries=null;for(var i=0;i<r.length;i++){var a=r[i];n!==null&&vt(a.contentState,n),mr(e,a,null,null)}}if(t.pendingTasks--,0<t.pendingTasks)break;n=t.hoistables,t=t.next}}function Gn(e,t){var n=t.boundaries;if(n!==null&&t.pendingTasks===n.length){for(var r=!0,i=0;i<n.length;i++){var a=n[i];if(a.pendingTasks!==1||a.parentFlushed||On(e,a)){r=!1;break}}r&&Wn(e,t,t.hoistables)}}function Kn(e){var t={pendingTasks:1,boundaries:null,hoistables:nt(),inheritedHoistables:null,together:!1,next:null};return e!==null&&0<e.pendingTasks&&(t.pendingTasks++,t.boundaries=[],e.next=t),t}function qn(e,t,n,r,i){var a=t.keyPath,o=t.treeContext,s=t.row;t.keyPath=n,n=r.length;var c=null;if(t.replay!==null){var l=t.replay.slots;if(typeof l==`object`&&l)for(var u=0;u<n;u++){var d=i!==`backwards`&&i!==`unstable_legacy-backwards`?u:n-1-u,f=r[d];t.row=c=Kn(c),t.treeContext=Mt(o,n,d);var p=l[d];typeof p==`number`?(Zn(e,t,p,f,d),delete l[d]):or(e,t,f,d),--c.pendingTasks===0&&Un(e,c)}else for(l=0;l<n;l++)u=i!==`backwards`&&i!==`unstable_legacy-backwards`?l:n-1-l,d=r[u],t.row=c=Kn(c),t.treeContext=Mt(o,n,u),or(e,t,d,u),--c.pendingTasks===0&&Un(e,c)}else if(i!==`backwards`&&i!==`unstable_legacy-backwards`)for(i=0;i<n;i++)l=r[i],t.row=c=Kn(c),t.treeContext=Mt(o,n,i),or(e,t,l,i),--c.pendingTasks===0&&Un(e,c);else{for(i=t.blockedSegment,l=i.children.length,u=i.chunks.length,d=n-1;0<=d;d--){f=r[d],t.row=c=Kn(c),t.treeContext=Mt(o,n,d),p=Ln(e,u,null,t.formatContext,d!==0||i.lastPushedText,!0),i.children.splice(l,0,p),t.blockedSegment=p;try{or(e,t,f,d),xt(p.chunks,e.renderState,p.lastPushedText,p.textEmbedded),p.status=1,--c.pendingTasks===0&&Un(e,c)}catch(t){throw p.status=e.status===12?3:4,t}}t.blockedSegment=i,i.lastPushedText=!1}s!==null&&c!==null&&0<c.pendingTasks&&(s.pendingTasks++,c.next=s),t.treeContext=o,t.row=s,t.keyPath=a}function Jn(e,t,n,r,i,a){var o=t.thenableState;for(t.thenableState=null,Wt={},Gt=t,Kt=e,qt=n,Qt=Zt=0,$t=-1,en=0,tn=o,e=r(i,a);Xt;)Xt=!1,Qt=Zt=0,$t=-1,en=0,rn+=1,Q=null,e=r(i,a);return cn(),e}function Yn(e,t,n,r,i,a,o){var s=!1;if(a!==0&&e.formState!==null){var c=t.blockedSegment;if(c!==null){s=!0,c=c.chunks;for(var l=0;l<a;l++)l===o?c.push(`<!--F!-->`):c.push(`<!--F-->`)}}a=t.keyPath,t.keyPath=n,i?(n=t.treeContext,t.treeContext=Mt(n,1,0),or(e,t,r,-1),t.treeContext=n):s?or(e,t,r,-1):Qn(e,t,r,-1),t.keyPath=a}function Xn(e,t,n,i,a,o){if(typeof i==`function`){if(i.prototype&&i.prototype.isReactComponent){var b=a;if(`ref`in a)for(var S in b={},a)S!==`ref`&&(b[S]=a[S]);var T=i.defaultProps;if(T)for(var D in b===a&&(b=E({},b,a)),T)b[D]===void 0&&(b[D]=T[D]);a=b,b=Tt,T=i.contextType,typeof T==`object`&&T&&(b=T._currentValue2),b=new i(a,b);var O=b.state===void 0?null:b.state;if(b.updater=At,b.props=a,b.state=O,T={queue:[],replace:!1},b._reactInternals=T,o=i.contextType,b.context=typeof o==`object`&&o?o._currentValue2:Tt,o=i.getDerivedStateFromProps,typeof o==`function`&&(o=o(a,O),O=o==null?O:E({},O,o),b.state=O),typeof i.getDerivedStateFromProps!=`function`&&typeof b.getSnapshotBeforeUpdate!=`function`&&(typeof b.UNSAFE_componentWillMount==`function`||typeof b.componentWillMount==`function`)){if(i=b.state,typeof b.componentWillMount==`function`&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount==`function`&&b.UNSAFE_componentWillMount(),i!==b.state&&At.enqueueReplaceState(b,b.state,null),T.queue!==null&&0<T.queue.length){if(i=T.queue,o=T.replace,T.queue=null,T.replace=!1,o&&i.length===1)b.state=i[0];else{for(T=o?i[0]:b.state,O=!0,o=+!!o;o<i.length;o++)D=i[o],D=typeof D==`function`?D.call(b,T,a,void 0):D,D!=null&&(O?(O=!1,T=E({},T,D)):E(T,D));b.state=T}}else T.queue=null}if(i=b.render(),e.status===12)throw null;a=t.keyPath,t.keyPath=n,Qn(e,t,i,-1),t.keyPath=a}else{if(i=Jn(e,t,n,i,a,void 0),e.status===12)throw null;Yn(e,t,n,i,Zt!==0,Qt,$t)}}else if(typeof i==`string`){if(b=t.blockedSegment,b===null)b=a.children,T=t.formatContext,O=t.keyPath,t.formatContext=oe(T,i,a),t.keyPath=n,or(e,t,b,-1),t.formatContext=T,t.keyPath=O;else{if(O=Ae(b.chunks,i,a,e.resumableState,e.renderState,t.blockedPreamble,t.hoistableState,t.formatContext,b.lastPushedText),b.lastPushedText=!1,T=t.formatContext,o=t.keyPath,t.keyPath=n,(t.formatContext=oe(T,i,a)).insertionMode===3){n=Ln(e,0,null,t.formatContext,!1,!1),b.preambleChildren.push(n),t.blockedSegment=n;try{n.status=6,or(e,t,O,-1),xt(n.chunks,e.renderState,n.lastPushedText,n.textEmbedded),n.status=1}finally{t.blockedSegment=b}}else or(e,t,O,-1);t.formatContext=T,t.keyPath=o;a:{switch(t=b.chunks,e=e.resumableState,i){case`Line truncated
|
||||
$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};`)),r.instructions&8?t.push(`$RR("`):(r.instructions|=8,t.push(`$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=
|
||||
"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=
|
||||
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`))):(!(r.instructions&2)&&(r.instructions|=2,t.push(`$RB=[];$RV=function(a){$RT=performance.now();for(var b=0;b<a.length;b+=2){var c=a[b],e=a[b+1];null!==e.parentNode&&e.parentNode.removeChild(e);var f=c.parentNode;if(f){var g=c.previousSibling,h=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===h)break;else h--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||h++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;e.firstChild;)f.insertBefore(e.firstChild,c);g.data="$";g._reactRetry&&requestAnimationFrame(g._reactRetry)}}a.length=0};
|
||||
$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};`)),t.push(`$RC("`)),r=i.toString(16),t.push(e.boundaryPrefix),t.push(r),t.push(`","`),t.push(e.segmentPrefix),t.push(r),a?(t.push(`",`),et(t,n)):t.push(`"`),n=t.push(`)<\/script>`),Pe(t,e)&&n}function wr(e,t,n,i){if(i.status===2)return!0;var a=n.contentState,o=i.id;if(o===-1){if((i.id=n.rootSegmentID)===-1)throw Error(r(392));return Sr(e,t,i,a)}return o===n.rootSegmentID?Sr(e,t,i,a):(Sr(e,t,i,a),n=e.resumableState,e=e.renderState,t.push(e.startInlineScript),t.push(`>`),n.instructions&1?t.push(`$RS("`):(n.instructions|=1,t.push(`$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("`)),t.push(e.segmentPrefix),o=o.toString(16),t.push(o),t.push(`","`),t.push(e.placeholderPrefix),t.push(o),t=t.push(`")<\/script>`),t)}var Tr=!1;function Er(e,t){try{if(!(0<e.pendingRootTasks)){var n,r=e.completedRootSegment;if(r!==null){if(r.status===5)return;var i=e.completedPreambleSegments;if(i===null)return;br=e.byteSize;var a=e.resumableState,o=e.renderState,s=o.preamble,c=s.htmlChunks,l=s.headChunks,u;if(c){for(u=0;u<c.length;u++)t.push(c[u]);if(l)for(u=0;u<l.length;u++)t.push(l[u]);else{var d=ke(`head`);t.push(d),t.push(`>`)}}else if(l)for(u=0;u<l.length;u++)t.push(l[u]);var f=o.charsetChunks;for(u=0;u<f.length;u++)t.push(f[u]);f.length=0,o.preconnects.forEach(Ke,t),o.preconnects.clear();var p=o.viewportChunks;for(u=0;u<p.length;u++)t.push(p[u]);p.length=0,o.fontPreloads.forEach(Ke,t),o.fontPreloads.clear(),o.highImagePreloads.forEach(Ke,t),o.highImagePreloads.clear(),ne=o,o.styles.forEach(Ye,t),ne=null;var m=o.importMapChunks;for(u=0;u<m.length;u++)t.push(m[u]);m.length=0,o.bootstrapScripts.forEach(Ke,t),o.scripts.forEach(Ke,t),o.scripts.clear(),o.bulkPreloads.forEach(Ke,t),o.bulkPreloads.clear(),a.instructions|=32;var h=o.hoistableChunks;for(u=0;u<h.length;u++)t.push(h[u]);for(a=h.length=0;a<i.length;a++){var g=i[a];for(o=0;o<g.length;o++)xr(e,t,g[o],null)}var _=e.renderState.preamble,v=_.headChunks;if(_.htmlChunks||v){var y=Me(`head`);t.push(y)}var b=_.bodyChunks;if(b)for(i=0;i<b.length;i++)t.push(b[i]);xr(e,t,r,null),e.completedRootSegment=null;var x=e.renderState;if(e.allPendingTasks!==0||e.clientRenderedBoundaries.length!==0||e.completedBoundaries.length!==0||e.trackedPostpones!==null&&(e.trackedPostpones.rootNodes.length!==0||e.trackedPostpones.rootSlots!==null)){var S=e.resumableState;if(!(S.instructions&64)){if(S.instructions|=64,t.push(x.startInlineScript),!(S.instructions&32)){S.instructions|=32;var C=`_`+S.idPrefix+`R_`;t.push(` id="`);var w=F(C);t.push(w),t.push(`"`)}t.push(`>`),t.push(`requestAnimationFrame(function(){$RT=performance.now()});`),t.push(`<\/script>`)}}Pe(t,x)}var T=e.renderState;r=0;var E=T.viewportChunks;for(r=0;r<E.length;r++)t.push(E[r]);E.length=0,T.preconnects.forEach(Ke,t),T.preconnects.clear(),T.fontPreloads.forEach(Ke,t),T.fontPreloads.clear(),T.highImagePreloads.forEach(Ke,t),T.highImagePreloads.clear(),T.styles.forEach(Qe,t),T.scripts.forEach(Ke,t),T.scripts.clear(),T.bulkPreloads.forEach(Ke,t),T.bulkPreloads.clear();var D=T.hoistableChunks;for(r=0;r<D.length;r++)t.push(D[r]);D.length=0;var O=e.clientRenderedBoundaries;for(n=0;n<O.length;n++){var k=O[n];T=t;var A=e.resumableState,j=e.renderState,M=k.rootSegmentID,N=k.errorDigest;T.push(j.startInlineScript),T.push(`>`),A.instructions&4?T.push(`$RX("`):(A.instructions|=4,T.push(`$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("`)),T.push(j.boundaryPrefix);var P=M.toString(16);if(T.push(P),T.push(`"`),N){T.push(`,`);var I=ze(N||``);T.push(I)}var L=T.push(`)<\/script>`);if(!L){e.destination=null,n++,O.splice(0,n);return}}O.splice(0,n);var R=e.completedBoundaries;for(n=0;n<R.length;n++)if(!Cr(e,t,R[n])){e.destination=null,n++,R.splice(0,n);return}R.splice(0,n),Tr=!0;var z=e.partialBoundaries;for(n=0;n<z.length;n++){var B=z[n];a:{O=e,k=t,br=B.byteSize;var V=B.completedSegments;for(L=0;L<V.length;L++)if(!wr(O,k,B,V[L])){L++,V.splice(0,L);var ee=!1;break a}V.splice(0,L);var H=B.row;H!==null&&H.together&&B.pendingTasks===1&&(H.pendingTasks===1?Wn(O,H,H.hoistables):H.pendingTasks--),ee=Ge(k,B.contentState,O.renderState)}if(!ee){e.destination=null,n++,z.splice(0,n);return}}z.splice(0,n),Tr=!1;var te=e.completedBoundaries;for(n=0;n<te.length;n++)if(!Cr(e,t,te[n])){e.destination=null,n++,te.splice(0,n);return}te.splice(0,n)}}finally{Tr=!1,e.allPendingTasks===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&(e.flushS
Line truncated
|
||||
`),Ct=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,wt=new Map;function Tt(e){var t=wt.get(e);if(t===void 0){if(!Ct.test(e))throw Error(r(65,e));t=z(`<`+e),wt.set(e,t)}return t}var Y=z(`<!DOCTYPE html>`);function X(e,t,n,i,a,o,s,c,l){switch(t){case`div`:case`span`:case`svg`:case`path`:break;case`a`:e.push(Tt(`a`));var u=null,d=null,f;for(f in n)if(H.call(n,f)){var p=n[f];if(p!=null)switch(f){case`children`:u=p;break;case`dangerouslySetInnerHTML`:d=p;break;case`href`:p===``?qe(e,`href`,``):tt(e,f,p);break;default:tt(e,f,p)}}if(e.push(nt),it(e,d,u),typeof u==`string`){e.push(R(W(u)));var m=null}else m=u;return m;case`g`:case`p`:case`li`:break;case`select`:e.push(Tt(`select`));var h=null,g=null,_;for(_ in n)if(H.call(n,_)){var v=n[_];if(v!=null)switch(_){case`children`:h=v;break;case`dangerouslySetInnerHTML`:g=v;break;case`defaultValue`:case`value`:break;default:tt(e,_,v)}}return e.push(nt),it(e,g,h),h;case`option`:var y=c.selectedValue;e.push(Tt(`option`));var b=null,x=null,S=null,C=null,T;for(T in n)if(H.call(n,T)){var E=n[T];if(E!=null)switch(T){case`children`:b=E;break;case`selected`:S=E;break;case`dangerouslySetInnerHTML`:C=E;break;case`value`:x=E;default:tt(e,T,E)}}if(y!=null){var D=x===null?at(b):``+x;if(w(y)){for(var O=0;O<y.length;O++)if(``+y[O]===D){e.push(ot);break}}else``+y===D&&e.push(ot)}else S&&e.push(ot);return e.push(nt),it(e,C,b),b;case`textarea`:e.push(Tt(`textarea`));var k=null,A=null,j=null,M;for(M in n)if(H.call(n,M)){var N=n[M];if(N!=null)switch(M){case`children`:j=N;break;case`value`:k=N;break;case`defaultValue`:A=N;break;case`dangerouslySetInnerHTML`:throw Error(r(91));default:tt(e,M,N)}}if(k===null&&A!==null&&(k=A),e.push(nt),j!=null){if(k!=null)throw Error(r(92));if(w(j)){if(1<j.length)throw Error(r(93));k=``+j[0]}k=``+j}return typeof k==`string`&&k[0]===`
|
||||
`&&e.push(St),k!==null&&e.push(R(W(``+k))),null;case`input`:e.push(Tt(`input`));var P=null,F=null,I=null,L=null,z=null,B=null,V=null,te=null,ne=null,re;for(re in n)if(H.call(n,re)){var ae=n[re];if(ae!=null)switch(re){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,`input`));case`name`:P=ae;break;case`formAction`:F=ae;break;case`formEncType`:I=ae;break;case`formMethod`:L=ae;break;case`formTarget`:z=ae;break;case`defaultChecked`:ne=ae;break;case`defaultValue`:V=ae;break;case`checked`:te=ae;break;case`value`:B=ae;break;default:tt(e,re,ae)}}var U=et(e,i,a,F,I,L,z,P);return te===null?ne!==null&&Ke(e,`checked`,ne):Ke(e,`checked`,te),B===null?V!==null&&tt(e,`value`,V):tt(e,`value`,B),e.push(rt),U?.forEach(Ze,e),null;case`button`:e.push(Tt(`button`));var oe=null,se=null,ce=null,le=null,de=null,fe=null,pe=null,me;for(me in n)if(H.call(n,me)){var ge=n[me];if(ge!=null)switch(me){case`children`:oe=ge;break;case`dangerouslySetInnerHTML`:se=ge;break;case`name`:ce=ge;break;case`formAction`:le=ge;break;case`formEncType`:de=ge;break;case`formMethod`:fe=ge;break;case`formTarget`:pe=ge;break;default:tt(e,me,ge)}}var _e=et(e,i,a,le,de,fe,pe,ce);if(e.push(nt),_e?.forEach(Ze,e),it(e,se,oe),typeof oe==`string`){e.push(R(W(oe)));var G=null}else G=oe;return G;case`form`:e.push(Tt(`form`));var ve=null,ye=null,be=null,K=null,xe=null,Se=null,Ce;for(Ce in n)if(H.call(n,Ce)){var we=n[Ce];if(we!=null)switch(Ce){case`children`:ve=we;break;case`dangerouslySetInnerHTML`:ye=we;break;case`action`:be=we;break;case`encType`:K=we;break;case`method`:xe=we;break;case`target`:Se=we;break;default:tt(e,Ce,we)}}var Te=null,Ee=null;if(typeof be==`function`){var De=$e(i,be);De===null?(e.push(He,R(`action`),Ue,Je,We),Se=xe=K=be=null,ct(i,a)):(be=De.action||``,K=De.encType,xe=De.method,Se=De.target,Te=De.data,Ee=De.name)}if(be!=null&&tt(e,`action`,be),K!=null&&tt(e,`encType`,K),xe!=null&&tt(e,`method`,xe),Se!=null&&tt(e,`target`,Se),e.push(nt),Ee!==null&&(e.push(Ye),qe(e,`name`,Ee),e.push(rt),Te?.forEach(Ze,e)),it(e,ye,ve),typeof ve==`string`){e.push(R(W(ve)));var q=null}else q=ve;return q;case`menuitem`:for(var Oe in e.push(Tt(`menuitem`)),n)if(H.call(n,Oe)){var ke=n[Oe];if(ke!=null)switch(Oe){case`children`:case`dangerouslySetInnerHTML`:throw Error(r(400));default:tt(e,Oe,ke)}}return e.push(nt),null;case`object`:e.push(Tt(`object`));var Ae=null,je=null,Me;for(Me in n)if(H.call(n,Me)){var Ne=n[Me];if(Ne!=null)switch(Me){case`children`:Ae=Ne;break;case`dangerouslySetInnerHTML`:je=Ne;break;case`data`:var Pe=ue(``+Ne);if(Pe===``)break;e.push(He,R(`data`),Ue,R(W(Pe)),We);break;default:tt(e,Me,Ne)}}if(e.push(nt),it(e,je,Ae),typeof Ae==`string`){e.push(R(W(Ae)));var Fe=null}else Fe=Ae;return Fe;case`title`:var Le=c.tagScope&1,Re=c.tagScope&4;if(c.insertionMode===4||Le||n.itemProp!=null)var ze=ht(e,n);else Re?ze=null:(ht(a.hoistableChunks,n),ze=void 0);return ze;case`link`:var Be=c.tagScope&1,Ve=c.tagScope&4,Ge=n.rel,Xe=n.href,Qe=n.precedence;if(c.insertionMode===4||Be||n.itemProp!=null||typeof Ge!=`string`||typeof Xe!=`string`||Xe===``){dt(e,n);var st=null}else if(n.rel===`stylesheet`){if(typeof Qe!=`string`||n.disabled!=null||n.onLoad||n.onError)st=dt(e,n);else{var lt=a.styles.get(Qe),ut=i.styleResources.hasOwnProperty(Xe)?i.styleResources[Xe]:void 0;if(ut!==null){i.styleResources[Xe]=null,lt||(lt={precedence:R(W(Qe)),rules:[],hrefs:[],sheets:new Map},a.styles.set(Qe,lt));var Ct={state:0,props:ee({},n,{"data-precedence":n.precedence,precedence:null})};if(ut){ut.length===2&&gr(Ct.props,ut);var wt=a.preloads.stylesheets.get(Xe);wt&&0<wt.length?wt.length=0:Ct.state=1}lt.sheets.set(Xe,Ct),s&&s.stylesheets.add(Ct)}else if(lt){var X=lt.sheets.get(Xe);X&&s&&s.stylesheets.add(X)}l&&e.push(Ie),st=null}}else n.onLoad||n.onError?st=dt(e,n):(l&&e.push(Ie),st=Ve?null:dt(a.hoistableChunks,n));return st;case`script`:var Z=c.tagScope&1,Dt=n.async;if(typeof n.src!=`string`||!n.src||!Dt||typeof Dt==`function`||typeof Dt==`symbol`||n.onLoad||n.onError||c.insertionMode===4||Z||n.itemProp!=null)var Ot=yt(e,n);else{var kt=n.src;if(n.type===`module`)var At=i.moduleScriptResources,jt=a.preloads.moduleScripts;else At=i.scriptResources,jt=a.preloads.scripts;var Mt=At.hasOwnProperty(kt)?At[kt]:void 0;if(Mt!==null){At[kt]=null;var Nt=n;if(Mt){Mt.length===2&&(Nt=ee({},n),gr(Nt,Mt));var Pt=jt.get(kt);Pt&&(Pt.length=0)}var Ft=[];a.scripts.add(Ft),yt(Ft,Nt)}l&&e.push(Ie),Ot=null}return Ot;case`style`:var It=c.tagScope&1,Lt=n.precedence,Rt=n.href,zt=n.nonce;if(c.insertionMode===4||It||n.itemProp!=null||typeof Lt!=`string`||typeof Rt!=`string`||Rt===``){e.push(Tt(`style`));var Bt=null,Vt=null,Ht;for(Ht in n)if(H.call(n,Ht)){var Ut=n[Ht];if(Ut!=null)switch(Ht){case`children`:Bt=Ut;break;case`dangerouslySetInnerHTML`:Vt=Ut;break;default:tt(e,Ht,Ut)}}e.push(nt);var Wt=Array.isArray(Bt)?2>Bt.length?Bt[0]:null:Bt;typeof Wt!=`function`&&typeof Wt!=`symbol`&&Wt!=null&&e.push(R((``+Wt).replace(ft,pt))),it(e,Vt,Bt),e.push(Et(`style`));var Gt=null}else{var Kt=a.styles.get(Lt);if((i.styl
Line truncated
|
||||
`?e.push(St,R(on)):e.push(R(``+on)))}return typeof nn==`string`&&nn[0]===`
|
||||
`&&e.push(St),nn;case`img`:var sn=c.tagScope&3,cn=n.src,ln=n.srcSet;if(!(n.loading===`lazy`||!cn&&!ln||typeof cn!=`string`&&cn!=null||typeof ln!=`string`&&ln!=null||n.fetchPriority===`low`||sn)&&(typeof cn!=`string`||cn[4]!==`:`||cn[0]!==`d`&&cn[0]!==`D`||cn[1]!==`a`&&cn[1]!==`A`||cn[2]!==`t`&&cn[2]!==`T`||cn[3]!==`a`&&cn[3]!==`A`)&&(typeof ln!=`string`||ln[4]!==`:`||ln[0]!==`d`&&ln[0]!==`D`||ln[1]!==`a`&&ln[1]!==`A`||ln[2]!==`t`&&ln[2]!==`T`||ln[3]!==`a`&&ln[3]!==`A`)){s!==null&&c.tagScope&64&&(s.suspenseyImages=!0);var un=typeof n.sizes==`string`?n.sizes:void 0,dn=ln?ln+`
|
||||
`+(un||``):cn,fn=a.preloads.images,pn=fn.get(dn);if(pn)(n.fetchPriority===`high`||10>a.highImagePreloads.size)&&(fn.delete(dn),a.highImagePreloads.add(pn));else if(!i.imageResources.hasOwnProperty(dn)){i.imageResources[dn]=he;var mn=n.crossOrigin,hn=typeof mn==`string`?mn===`use-credentials`?mn:``:void 0,gn=a.headers,_n;gn&&0<gn.remainingCapacity&&typeof n.srcSet!=`string`&&(n.fetchPriority===`high`||500>gn.highImagePreloads.length)&&(_n=_r(cn,`image`,{imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:hn,integrity:n.integrity,nonce:n.nonce,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.refererPolicy}),0<=(gn.remainingCapacity-=_n.length+2))?(a.resets.image[dn]=he,gn.highImagePreloads&&(gn.highImagePreloads+=`, `),gn.highImagePreloads+=_n):(pn=[],dt(pn,{rel:`preload`,as:`image`,href:ln?void 0:cn,imageSrcSet:ln,imageSizes:un,crossOrigin:hn,integrity:n.integrity,type:n.type,fetchPriority:n.fetchPriority,referrerPolicy:n.referrerPolicy}),n.fetchPriority===`high`||10>a.highImagePreloads.size?a.highImagePreloads.add(pn):(a.bulkPreloads.add(pn),fn.set(dn,pn)))}}return mt(e,n,`img`);case`base`:case`area`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`param`:case`source`:case`track`:case`wbr`:return mt(e,n,t);case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:break;case`head`:if(2>c.insertionMode){var vn=o||a.preamble;if(vn.headChunks)throw Error(r(545,"`<head>`"));o!==null&&e.push(gt),vn.headChunks=[];var yn=bt(vn.headChunks,n,`head`)}else yn=xt(e,n,`head`);return yn;case`body`:if(2>c.insertionMode){var bn=o||a.preamble;if(bn.bodyChunks)throw Error(r(545,"`<body>`"));o!==null&&e.push(_t),bn.bodyChunks=[];var xn=bt(bn.bodyChunks,n,`body`)}else xn=xt(e,n,`body`);return xn;case`html`:if(c.insertionMode===0){var Sn=o||a.preamble;if(Sn.htmlChunks)throw Error(r(545,"`<html>`"));o!==null&&e.push(vt),Sn.htmlChunks=[Y];var Cn=bt(Sn.htmlChunks,n,`html`)}else Cn=xt(e,n,`html`);return Cn;default:if(t.indexOf(`-`)!==-1){e.push(Tt(t));var wn=null,Tn=null,En;for(En in n)if(H.call(n,En)){var Dn=n[En];if(Dn!=null){var On=En;switch(En){case`children`:wn=Dn;break;case`dangerouslySetInnerHTML`:Tn=Dn;break;case`style`:J(e,Dn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`ref`:break;case`className`:On=`class`;default:if(ie(En)&&typeof Dn!=`function`&&typeof Dn!=`symbol`&&!1!==Dn){if(!0===Dn)Dn=``;else if(typeof Dn==`object`)continue;e.push(He,R(On),Ue,R(W(Dn)),We)}}}}return e.push(nt),it(e,Tn,wn),wn}}return xt(e,n,t)}var Z=new Map;function Et(e){var t=Z.get(e);return t===void 0&&(t=z(`</`+e+`>`),Z.set(e,t)),t}function Dt(e,t){e=e.preamble,e.htmlChunks===null&&t.htmlChunks&&(e.htmlChunks=t.htmlChunks),e.headChunks===null&&t.headChunks&&(e.headChunks=t.headChunks),e.bodyChunks===null&&t.bodyChunks&&(e.bodyChunks=t.bodyChunks)}function Ot(e,t){t=t.bootstrapChunks;for(var n=0;n<t.length-1;n++)P(e,t[n]);return n<t.length?(n=t[n],t.length=0,F(e,n)):!0}var kt=z(`requestAnimationFrame(function(){$RT=performance.now()});`),At=z(`<template id="`),jt=z(`"></template>`),Mt=z(`<!--&-->`),Nt=z(`<!--/&-->`),Pt=z(`<!--$-->`),Ft=z(`<!--$?--><template id="`),It=z(`"></template>`),Lt=z(`<!--$!-->`),Rt=z(`<!--/$-->`),zt=z(`<template`),Bt=z(`"`),Vt=z(` data-dgst="`);z(` data-msg="`),z(` data-stck="`),z(` data-cstck="`);var Ht=z(`></template>`);function Ut(e,t,n){if(P(e,Ft),n===null)throw Error(r(395));return P(e,t.boundaryPrefix),P(e,R(n.toString(16))),F(e,It)}var Wt=z(`<div hidden id="`),Gt=z(`">`),Kt=z(`</div>`),qt=z(`<svg aria-hidden="true" style="display:none" id="`),Jt=z(`">`),Q=z(`</svg>`),Yt=z(`<math aria-hidden="true" style="display:none" id="`),Xt=z(`">`),Zt=z(`</math>`),Qt=z(`<table hidden id="`),$t=z(`">`),en=z(`</table>`),tn=z(`<table hidden><tbody id="`),nn=z(`">`),rn=z(`</tbody></table>`),an=z(`<table hidden><tr id="`),$=z(`">`),on=z(`</tr></table>`),sn=z(`<table hidden><colgroup id="`),cn=z(`">`),ln=z(`</colgroup></table>`);function un(e,t,n,i){switch(n.insertionMode){case 0:case 1:case 3:case 2:return P(e,Wt),P(e,t.segmentPrefix),P(e,R(i.toString(16))),F(e,Gt);case 4:return P(e,qt),P(e,t.segmentPrefix),P(e,R(i.toString(16))),F(e,Jt);case 5:return P(e,Yt),P(e,t.segmentPrefix),P(e,R(i.toString(16))),F(e,Xt);case 6:return P(e,Qt),P(e,t.segmentPrefix),P(e,R(i.toString(16))),F(e,$t);case 7:return P(e,tn),P(e,t.segmentPrefix),P(e,R(i.toString(16))),F(e,nn);case 8:return P(e,an),P(e,t.segmentPrefix),P(e,R(i.toString(16))),F(e,$);case 9:return P(e,sn),P(e,t.segmentPrefix),P(e,R(i.toString(16))),F(e,cn);default:throw Error(r(397))}}function dn(e,t){switch(t.insertionMode){case 0:case 1:case 3:case 2:return F(e,Kt);case 4:return F(e,Q);case 5:return F(e,Zt);case 6:return F(e,en);case 7:return F(e,rn);case 8:return F(e,on);case 9:return F(e,ln);default:throw Error(r(397))}}var fn=z(`$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(Line truncated
|
||||
$RC=function(a,b){if(b=document.getElementById(b))(a=document.getElementById(a))?(a.previousSibling.data="$~",$RB.push(a,b),2===$RB.length&&("number"!==typeof $RT?requestAnimationFrame($RV.bind(null,$RB)):(a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:$RT+300-a)))):b.parentNode.removeChild(b)};`);R(`$RV=function(A,g){function k(a,b){var e=a.getAttribute(b);e&&(b=a.style,l.push(a,b.viewTransitionName,b.viewTransitionClass),"auto"!==e&&(b.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+K++ +"_"),b.viewTransitionName=a,B=!0)}var B=!1,K=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var h=g[f].querySelectorAll("[vt-share]"),d=0;d<h.length;d++){var c=h[d];m.set(c.getAttribute("vt-name"),c)}var u=[];for(h=0;h<g.length;h+=2){var C=g[h],x=C.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){c=C;for(f=0;c;){if(8===c.nodeType){var r=c.data;if("/$"===r)if(0===f)break;else f--;else"$"!==r&&"$?"!==r&&"$~"!==r&&"$!"!==r||f++}else if(1===c.nodeType){d=c;var D=d.getAttribute("vt-name"),y=m.get(D);k(d,y?"vt-share":"vt-exit");y&&(k(y,"vt-share"),m.set(D,null));var E=d.querySelectorAll("[vt-share]");for(d=0;d<E.length;d++){var F=E[d],G=F.getAttribute("vt-name"),
|
||||
H=m.get(G);H&&(k(F,"vt-share"),k(H,"vt-share"),m.set(G,null))}}c=c.nextSibling}for(var I=g[h+1],t=I.firstElementChild;t;)null!==m.get(t.getAttribute("vt-name"))&&k(t,"vt-enter"),t=t.nextElementSibling;c=x;do for(var n=c.firstElementChild;n;){var J=n.getAttribute("vt-update");J&&"none"!==J&&!l.includes(n)&&k(n,"vt-update");n=n.nextElementSibling}while((c=c.parentNode)&&1===c.nodeType&&"none"!==c.getAttribute("vt-update"));u.push.apply(u,I.querySelectorAll('img[src]:not([loading="lazy"])'))}}}if(B){var z=
|
||||
document.__reactViewTransition=document.startViewTransition({update:function(){A(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<u.length;b={g:b.g},e++)if(b.g=u[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(w){return function(q){w.g.addEventListener("load",q);w.g.addEventListener("error",q)}}(b)),a.push(p))}return Promise.race([Promise.all(a),new Promise(function(w){var q=
|
||||
performance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===b.getAttribute("style")&&b.removeAttribute("style")}});z.finished.finally(function(){document.__reactViewTransition===z&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}A(g)}.bind(null,$RV);`);var _n=z(`$RC("`),vn=z(`$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=
|
||||
"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=
|
||||
"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("`),yn=z(`$RR("`),bn=z(`","`),xn=z(`",`),Sn=z(`"`),Cn=z(`)<\/script>`);z(`<template data-rci="" data-bid="`),z(`<template data-rri="" data-bid="`),z(`" data-sid="`),z(`" data-sty="`);var wn=z(`$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};`),Tn=z(`$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("`),En=z(`$RX("`),Dn=z(`"`),On=z(`,`),kn=z(`)<\/script>`);z(`<template data-rxi="" data-bid="`),z(`" data-dgst="`),z(`" data-msg="`),z(`" data-stck="`),z(`" data-cstck="`);var An=/[<\u2028\u2029]/g;function jn(e){return JSON.stringify(e).replace(An,function(e){switch(e){case`<`:return`\\u003c`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:throw Error(`escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React`)}})}var Mn=/[&><\u2028\u2029]/g;function Nn(e){return JSON.stringify(e).replace(Mn,function(e){switch(e){case`&`:return`\\u0026`;case`>`:return`\\u003e`;case`<`:return`\\u003c`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:throw Error(`escapeJSObjectForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React`)}})}var Pn=z(` media="not all" data-precedence="`),Fn=z(`" data-href="`),In=z(`">`),Ln=z(`</style>`),Rn=!1,zn=!0;function Bn(e){var t=e.rules,n=e.hrefs,r=0;if(n.length){for(P(this,ge.startInlineStyle),P(this,Pn),P(this,e.precedence),P(this,Fn);r<n.length-1;r++)P(this,n[r]),P(this,Jn);for(P(this,n[r]),P(this,In),r=0;r<t.length;r++)P(this,t[r]);zn=F(this,Ln),Rn=!0,t.length=0,n.length=0}}function Vn(e){return e.state===2?!1:Rn=!0}function Hn(e,t,n){return Rn=!1,zn=!0,ge=n,t.styles.forEach(Bn,e),ge=null,t.stylesheets.forEach(Vn),Rn&&(n.stylesToHoist=!0),zn}function Un(e){for(var t=0;t<e.length;t++)P(this,e[t]);e.length=0}var Wn=[];function Gn(e){dt(Wn,e.props);for(var t=0;t<Wn.length;t++)P(this,Wn[t]);Wn.length=0,e.state=2}var Kn=z(` data-precedence="`),qn=z(`" data-href="`),Jn=z(` `),Yn=z(`">`),Xn=z(`</style>`);function Zn(e){var t=0<e.sheets.size;e.sheets.forEach(Gn,this),e.sheets.clear();var n=e.rules,r=e.hrefs;if(!t||r.length){if(P(this,ge.startInlineStyle),P(this,Kn),P(this,e.precedence),e=0,r.length){for(P(this,qn);e<r.length-1;e++)P(this,r[e]),P(this,Jn);P(this,r[e])}for(P(this,Yn),e=0;e<n.length;e++)P(this,n[e]);P(this,Xn),n.length=0,r.length=0}}function Qn(e){if(e.state===0){e.state=1;var t=e.props;for(dt(Wn,{rel:`preload`,as:`style`,href:e.props.href,crossOrigin:t.crossOrigin,fetchPriority:t.fetchPriority,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy}),e=0;e<Wn.length;e++)P(this,Wn[e]);Wn.length=0}}function $n(e){e.sheets.forEach(Qn,this),e.sheets.clear()}z(`<link rel="expect" href="#`),z(`" blocking="render"/>`);var er=z(` id="`);function tr(e,t){!(t.instructions&32)&&(t.instructions|=32,e.push(er,R(W(`_`+t.idPrefix+`R_`)),We))}var nr=z(`[`),rr=z(`,[`),ir=z(`,`),ar=z(`]`);function or(e,t){P(e,nr);var n=nr;t.stylesheets.forEach(function(t){if(t.state!==2){if(t.state===3)P(e,n),P(e,R(Nn(``+t.props.href))),P(e,ar),n=rr;else{P(e,n);var i=t.props[`data-precedence`],a=t.props;for(var o in P(e,R(Nn(ue(``+t.props.href)))),i=``+i,P(e,ir),P(e,R(Nn(i))),a)if(H.call(a,o)&&(i=a[o],i!=null))switch(o){case`href`:case`rel`:case`precedence`:case`data-precedence`:break;case`children`:case`dangerouslySetInnerHTML`:throw Error(r(399,`link`));default:sr(e,o,i)}P(e,ar),n=rr,t.state=3}}}),P(e,ar)}function sr(e,t,n){var r=t.toLowerCase();switch(typeof n){case`function`:case`symbol`:return}switch(t){case`innerHTML`:case`dangerouslySetInnerHTML`:case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`style`:case`ref`:return;case`className`:r=`class`,t=``+n;break;case`hidden`:if(!1===n)return;t=``;break;case`src`:case`href`:n=ue(n),t=``+n;break;default:if(2<t.length&&(t[0]===`o`||t[0]===`O`)&&(t[1]===`n`||t[1]===`N`)||!ie(t))return;t=``+n}P(e,ir),P(e,R(Nn(r))),P(e,ir),P(e,R(Nn(t)))}function cr(){return{styles:new Set,stylesheets:new Set,suspenseyImages:!1}}function lr(e){var t=Ui||null;if(t){var n=t.resumableState,r=t.renderState;if(typeof e==`string`&&e){if(!n.dnsResources.hasOwnProperty(e)){n.dnsResources[e]=null,n=r.headers;var i,a;(a=n&&0<n.remainingCapacity)&&(a=(i=`<`+(``+e).replace(vr,yr)+`>; rel=dns-prefetch`,0<=(n.remainingCapacity-=i.length+2))),a?(r.resets.dns[e]=null,n.preconnects&&(n.preconnects+=`, `),n.preconnects+=i):(i=[],dt(i,{href:e,rel:`dns-prefetch`}),r.preconnects.add(i))}Ba(t)Line truncated
|
||||
`+(s||``):e;if(i.imageResources.hasOwnProperty(l))return;i.imageResources[l]=he,i=a.headers;var u;i&&0<i.remainingCapacity&&typeof o!=`string`&&c===`high`&&(u=_r(e,t,n),0<=(i.remainingCapacity-=u.length+2))?(a.resets.image[l]=he,i.highImagePreloads&&(i.highImagePreloads+=`, `),i.highImagePreloads+=u):(i=[],dt(i,ee({rel:`preload`,href:o?void 0:e,as:t},n)),c===`high`?a.highImagePreloads.add(i):(a.bulkPreloads.add(i),a.preloads.images.set(l,i)));break;case`style`:if(i.styleResources.hasOwnProperty(e))return;o=[],dt(o,ee({rel:`preload`,href:e,as:t},n)),i.styleResources[e]=!n||typeof n.crossOrigin!=`string`&&typeof n.integrity!=`string`?he:[n.crossOrigin,n.integrity],a.preloads.stylesheets.set(e,o),a.bulkPreloads.add(o);break;case`script`:if(i.scriptResources.hasOwnProperty(e))return;o=[],a.preloads.scripts.set(e,o),a.bulkPreloads.add(o),dt(o,ee({rel:`preload`,href:e,as:t},n)),i.scriptResources[e]=!n||typeof n.crossOrigin!=`string`&&typeof n.integrity!=`string`?he:[n.crossOrigin,n.integrity];break;default:if(i.unknownResources.hasOwnProperty(t)){if(o=i.unknownResources[t],o.hasOwnProperty(e))return}else o={},i.unknownResources[t]=o;if(o[e]=he,(i=a.headers)&&0<i.remainingCapacity&&t===`font`&&(l=_r(e,t,n),0<=(i.remainingCapacity-=l.length+2)))a.resets.font[e]=he,i.fontPreloads&&(i.fontPreloads+=`, `),i.fontPreloads+=l;else switch(i=[],e=ee({rel:`preload`,href:e,as:t},n),dt(i,e),t){case`font`:a.fontPreloads.add(i);break;default:a.bulkPreloads.add(i)}}Ba(r)}}else me.L(e,t,n)}function fr(e,t){var n=Ui||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=t&&typeof t.as==`string`?t.as:`script`;switch(a){case`script`:if(r.moduleScriptResources.hasOwnProperty(e))return;a=[],r.moduleScriptResources[e]=!t||typeof t.crossOrigin!=`string`&&typeof t.integrity!=`string`?he:[t.crossOrigin,t.integrity],i.preloads.moduleScripts.set(e,a);break;default:if(r.moduleUnknownResources.hasOwnProperty(a)){var o=r.unknownResources[a];if(o.hasOwnProperty(e))return}else o={},r.moduleUnknownResources[a]=o;a=[],o[e]=he}dt(a,ee({rel:`modulepreload`,href:e},t)),i.bulkPreloads.add(a),Ba(n)}}else me.m(e,t)}function pr(e,t,n){var r=Ui||null;if(r){var i=r.resumableState,a=r.renderState;if(e){t||=`default`;var o=a.styles.get(t),s=i.styleResources.hasOwnProperty(e)?i.styleResources[e]:void 0;s!==null&&(i.styleResources[e]=null,o||(o={precedence:R(W(t)),rules:[],hrefs:[],sheets:new Map},a.styles.set(t,o)),t={state:0,props:ee({rel:`stylesheet`,href:e,"data-precedence":t},n)},s&&(s.length===2&&gr(t.props,s),(a=a.preloads.stylesheets.get(e))&&0<a.length?a.length=0:t.state=1),o.sheets.set(e,t),Ba(r))}}else me.S(e,t,n)}function mr(e,t){var n=Ui||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=r.scriptResources.hasOwnProperty(e)?r.scriptResources[e]:void 0;a!==null&&(r.scriptResources[e]=null,t=ee({src:e,async:!0},t),a&&(a.length===2&&gr(t,a),e=i.preloads.scripts.get(e))&&(e.length=0),e=[],i.scripts.add(e),yt(e,t),Ba(n))}}else me.X(e,t)}function hr(e,t){var n=Ui||null;if(n){var r=n.resumableState,i=n.renderState;if(e){var a=r.moduleScriptResources.hasOwnProperty(e)?r.moduleScriptResources[e]:void 0;a!==null&&(r.moduleScriptResources[e]=null,t=ee({src:e,type:`module`,async:!0},t),a&&(a.length===2&&gr(t,a),e=i.preloads.moduleScripts.get(e))&&(e.length=0),e=[],i.scripts.add(e),yt(e,t),Ba(n))}}else me.M(e,t)}function gr(e,t){e.crossOrigin??=t[0],e.integrity??=t[1]}function _r(e,t,n){for(var r in e=(``+e).replace(vr,yr),t=(``+t).replace(br,xr),t=`<`+e+`>; rel=preload; as="`+t+`"`,n)H.call(n,r)&&(e=n[r],typeof e==`string`&&(t+=`; `+r.toLowerCase()+`="`+(``+e).replace(br,xr)+`"`));return t}var vr=/[<>\r\n]/g;function yr(e){switch(e){case`<`:return`%3C`;case`>`:return`%3E`;case`
|
||||
`:return`%0A`;case`\r`:return`%0D`;default:throw Error(`escapeLinkHrefForHeaderContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React`)}}var br=/["';,\r\n]/g;function xr(e){switch(e){case`"`:return`%22`;case`'`:return`%27`;case`;`:return`%3B`;case`,`:return`%2C`;case`
|
||||
`:return`%0A`;case`\r`:return`%0D`;default:throw Error(`escapeStringForLinkHeaderQuotedParamValueContextReplacer encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React`)}}function Sr(e){this.styles.add(e)}function Cr(e){this.stylesheets.add(e)}function wr(e,t){t.styles.forEach(Sr,e),t.stylesheets.forEach(Cr,e),t.suspenseyImages&&(e.suspenseyImages=!0)}function Tr(e){return 0<e.stylesheets.size||e.suspenseyImages}var Er=Function.prototype.bind,Dr=Symbol.for(`react.client.reference`);function Or(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===Dr?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case s:return`Fragment`;case l:return`Profiler`;case c:return`StrictMode`;case p:return`Suspense`;case m:return`SuspenseList`;case v:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case o:return`Portal`;case d:return e.displayName||`Context`;case u:return(e._context.displayName||`Context`)+`.Consumer`;case f:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case h:return t=e.displayName||null,t===null?Or(e.type)||`Memo`:t;case g:t=e._payload,e=e._init;try{return Or(e(t))}catch{}}return null}var kr={},Ar=null;function jr(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(e===null){if(n!==null)throw Error(r(401))}else{if(n===null)throw Error(r(401));jr(e,n)}t.context._currentValue=t.value}}function Mr(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&Mr(e)}function Nr(e){var t=e.parent;t!==null&&Nr(t),e.context._currentValue=e.value}function Pr(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(r(402));e.depth===t.depth?jr(e,t):Pr(e,t)}function Fr(e,t){var n=t.parent;if(n===null)throw Error(r(402));e.depth===n.depth?jr(e,n):Fr(e,n),t.context._currentValue=t.value}function Ir(e){var t=Ar;t!==e&&(t===null?Nr(e):e===null?Mr(t):t.depth===e.depth?jr(t,e):t.depth>e.depth?Pr(t,e):Fr(t,e),Ar=e)}var Lr={enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}},Rr={id:1,overflow:``};function zr(e,t,n){var r=e.id;e=e.overflow;var i=32-Br(r)-1;r&=~(1<<i),n+=1;var a=32-Br(t)+i;if(30<a){var o=i-i%5;return a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-Br(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var Br=Math.clz32?Math.clz32:Ur,Vr=Math.log,Hr=Math.LN2;function Ur(e){return e>>>=0,e===0?32:31-(Vr(e)/Hr|0)|0}function Wr(){}var Gr=Error(r(460));function Kr(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Wr,Wr),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw t.reason;default:switch(typeof t.status==`string`?t.then(Wr,Wr):(e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})),t.status){case`fulfilled`:return t.value;case`rejected`:throw t.reason}throw qr=t,Gr}}var qr=null;function Jr(){if(qr===null)throw Error(r(459));var e=qr;return qr=null,e}function Yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Xr=typeof Object.is==`function`?Object.is:Yr,Zr=null,Qr=null,$r=null,ei=null,ti=null,ni=null,ri=!1,ii=!1,ai=0,oi=0,si=-1,ci=0,li=null,ui=null,di=0;function fi(){if(Zr===null)throw Error(r(321));return Zr}function pi(){if(0<di)throw Error(r(312));return{memoizedState:null,queue:null,next:null}}function mi(){return ni===null?ti===null?(ri=!1,ti=ni=pi()):(ri=!0,ni=ti):ni.next===null?(ri=!1,ni=ni.next=pi()):(ri=!0,ni=ni.next),ni}function hi(){var e=li;return li=null,e}function gi(){ei=$r=Qr=Zr=null,ii=!1,ti=null,di=0,ni=ui=null}function _i(e,t){return typeof t==`function`?t(e):t}function vi(e,t,n){if(Zr=fi(),ni=mi(),ri){var r=ni.queue;if(t=r.dispatch,ui!==null&&(n=ui.get(r),n!==void 0)){ui.delete(r),r=ni.memoizedState;do r=e(r,n.action),n=n.next;while(n!==null);return ni.memoizedState=r,[r,t]}return[ni.memoizedState,t]}return e=e===_i?typeof t==`function`?t():t:n===void 0?t:n(t),ni.memoizedState=e,e=ni.queue={last:null,dispatch:null},e=e.dispatch=bi.bind(null,Zr,e),[ni.memoizedState,e]}function yi(e,t){if(Zr=fi(),ni=mi(),t=t===void 0?null:t,ni!==null){var n=ni.memoizedState;if(n!==null&&t!==null){var r=n[1];a:if(r===null)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!Xr(t[i],r[i])){r=!1;break a}r=!0}if(r)return n[0]}}return e=e(),ni.memoizedState=[e,t],e}function bi(e,t,n){if(25<=di)throw Error(r(301));if(e===Zr){if(ii=!0,e={action:n,next:null},ui===null&&(ui=new Map),n=ui.get(t),n===void 0)ui.set(t,e);else{for(t=n;t.next!==null;)t=t.next;t.next=e}}}function xi(){throw Error(r(440))}function Si(){throw Error(r(394))}function Ci(){throw Error(r(479))}function wi(e,t,n){fi();var r=oi++,i=$r;if(typeof e.$$FORM_ACTION==`function`){var a
Line truncated
|
||||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||||
`+Ai+e+ji}var Ni=!1;function Pi(e,t){if(!e||Ni)return``;Ni=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||||
`),l=s.split(`
|
||||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ni=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Mi(n):``}function Fi(e){if(typeof e==`string`)return Mi(e);if(typeof e==`function`)return e.prototype&&e.prototype.isReactComponent?Pi(e,!0):Pi(e,!1);if(typeof e==`object`&&e){switch(e.$$typeof){case f:return Pi(e.render,!1);case h:return Pi(e.type,!1);case g:var t=e,n=t._payload;t=t._init;try{e=t(n)}catch{return Mi(`Lazy`)}return Fi(e)}if(typeof e.name==`string`){a:{n=e.name,t=e.env;var r=e.debugLocation;if(r!=null&&(e=Error.prepareStackTrace,Error.prepareStackTrace=void 0,r=r.stack,Error.prepareStackTrace=e,r.startsWith(`Error: react-stack-top-frame
|
||||
`)&&(r=r.slice(29)),e=r.indexOf(`
|
||||
`),e!==-1&&(r=r.slice(e+1)),e=r.indexOf(`react_stack_bottom_frame`),e!==-1&&(e=r.lastIndexOf(`
|
||||
`,e)),e=e===-1?``:r=r.slice(0,e),r=e.lastIndexOf(`
|
||||
`),e=r===-1?e:e.slice(r+1),e.indexOf(n)!==-1)){n=`
|
||||
`+e;break a}n=Mi(n+(t?` [`+t+`]`:``))}return n}}switch(e){case m:return Mi(`SuspenseList`);case p:return Mi(`Suspense`)}return``}function Ii(e,t){return(500<t.byteSize||Tr(t.contentState))&&t.contentPreamble===null}function Li(e){if(typeof e==`object`&&e&&typeof e.environmentName==`string`){var t=e.environmentName;e=[e].slice(0),typeof e[0]==`string`?e.splice(0,1,`%c%s%c `+e[0],`background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px`,` `+t+` `,``):e.splice(0,0,`%c%s%c`,`background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px`,` `+t+` `,``),e.unshift(console),t=Er.apply(console.error,e),t()}else console.error(e);return null}function Ri(e,t,n,r,i,a,o,s,c,l,u){var d=new Set;this.destination=null,this.flushScheduled=!1,this.resumableState=e,this.renderState=t,this.rootFormatContext=n,this.progressiveChunkSize=r===void 0?12800:r,this.status=10,this.fatalError=null,this.pendingRootTasks=this.allPendingTasks=this.nextSegmentId=0,this.completedPreambleSegments=this.completedRootSegment=null,this.byteSize=0,this.abortableTasks=d,this.pingedTasks=[],this.clientRenderedBoundaries=[],this.completedBoundaries=[],this.partialBoundaries=[],this.trackedPostpones=null,this.onError=i===void 0?Li:i,this.onPostpone=l===void 0?Wr:l,this.onAllReady=a===void 0?Wr:a,this.onShellReady=o===void 0?Wr:o,this.onShellError=s===void 0?Wr:s,this.onFatalError=c===void 0?Wr:c,this.formState=u===void 0?null:u}function zi(e,t,n,r,i,a,o,s,c,l,u,d){return t=new Ri(t,n,r,i,a,o,s,c,l,u,d),n=Ji(t,0,null,r,!1,!1),n.parentFlushed=!0,e=Ki(t,null,e,-1,null,n,null,null,t.abortableTasks,null,r,null,Rr,null,null),Yi(e),t.pingedTasks.push(e),t}function Bi(e,t,n,r,i,a,o,s,c,l,u){return e=zi(e,t,n,r,i,a,o,s,c,l,u,void 0),e.trackedPostpones={workingMap:new Map,rootNodes:[],rootSlots:null},e}function Vi(e,t,n,r,i,a,o,s,c){return n=new Ri(t.resumableState,n,t.rootFormatContext,t.progressiveChunkSize,r,i,a,o,s,c,null),n.nextSegmentId=t.nextSegmentId,typeof t.replaySlots==`number`?(r=Ji(n,0,null,t.rootFormatContext,!1,!1),r.parentFlushed=!0,e=Ki(n,null,e,-1,null,r,null,null,n.abortableTasks,null,t.rootFormatContext,null,Rr,null,null),Yi(e),n.pingedTasks.push(e),n):(e=qi(n,null,{nodes:t.replayNodes,slots:t.replaySlots,pendingTasks:0},e,-1,null,null,n.abortableTasks,null,t.rootFormatContext,null,Rr,null,null),Yi(e),n.pingedTasks.push(e),n)}function Hi(e,t,n,r,i,a,o,s,c){return e=Vi(e,t,n,r,i,a,o,s,c),e.trackedPostpones={workingMap:new Map,rootNodes:[],rootSlots:null},e}var Ui=null;function Wi(e,t){e.pingedTasks.push(t),e.pingedTasks.length===1&&(e.flushScheduled=e.destination!==null,e.trackedPostpones!==null||e.status===10?j(function(){return Da(e)}):O(function(){return Da(e)}))}function Gi(e,t,n,r,i){return n={status:0,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,row:t,completedSegments:[],byteSize:0,fallbackAbortableTasks:n,errorDigest:null,contentState:cr(),fallbackState:cr(),contentPreamble:r,fallbackPreamble:i,trackedContentKeyPath:null,trackedFallbackNode:null},t!==null&&(t.pendingTasks++,r=t.boundaries,r!==null&&(e.allPendingTasks++,n.pendingTasks++,r.push(n)),e=t.inheritedHoistables,e!==null&&wr(n.contentState,e)),n}function Ki(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){e.allPendingTasks++,i===null?e.pendingRootTasks++:i.pendingTasks++,p!==null&&p.pendingTasks++;var h={replay:null,node:n,childIndex:r,ping:function(){return Wi(e,h)},blockedBoundary:i,blockedSegment:a,blockedPreamble:o,hoistableState:s,abortSet:c,keyPath:l,formatContext:u,context:d,treeContext:f,row:p,componentStack:m,thenableState:t};return c.add(h),h}function qi(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.allPendingTasks++,a===null?e.pendingRootTasks++:a.pendingTasks++,f!==null&&f.pendingTasks++,n.pendingTasks++;var m={replay:n,node:r,childIndex:i,ping:function(){return Wi(e,m)},blockedBoundary:a,blockedSegment:null,blockedPreamble:null,hoistableState:o,abortSet:s,keyPath:c,formatContext:l,context:u,treeContext:d,row:f,componentStack:p,thenableState:t};return s.add(m),m}function Ji(e,t,n,r,i,a){return{status:0,parentFlushed:!1,id:-1,index:t,chunks:[],children:[],preambleChildren:[],parentFormatContext:r,boundary:n,lastPushedText:i,textEmbedded:a}}function Yi(e){var t=e.node;if(typeof t==`object`&&t)switch(t.$$typeof){case a:e.componentStack={parent:e.componentStack,type:t.type}}}function Xi(e){return e===null?null:{parent:e.parent,type:`Suspense Fallback`}}function Zi(e){var t={};return e&&Object.defineProperty(t,"componentStack",{configurable:!0,enumerable:!0,get:function(){try{var n=``,r=e;do n+=Fi(r.type),r=r.parent;while(r);var i=n}catch(e){i=`
|
||||
Error generating stack: `+e.message+`
|
||||
`+e.stack}return Object.defineProperty(t,"componentStack",{value:i}),i}}),t}function Qi(e,t,n){if(e=e.onError,t=e(t,n),t==null||typeof t==`string`)return t}function $i(e,t){var n=e.onShellError,r=e.onFatalError;n(t),r(t),e.destination===null?(e.status=13,e.fatalError=t):(e.status=14,V(e.destination,t))}function ea(e,t){ta(e,t.next,t.hoistables)}function ta(e,t,n){for(;t!==null;){n!==null&&(wr(t.hoistables,n),t.inheritedHoistables=n);var r=t.boundaries;if(r!==null){t.boundaries=null;for(var i=0;i<r.length;i++){var a=r[i];n!==null&&wr(a.contentState,n),Ea(e,a,null,null)}}if(t.pendingTasks--,0<t.pendingTasks)break;n=t.hoistables,t=t.next}}function na(e,t){var n=t.boundaries;if(n!==null&&t.pendingTasks===n.length){for(var r=!0,i=0;i<n.length;i++){var a=n[i];if(a.pendingTasks!==1||a.parentFlushed||Ii(e,a)){r=!1;break}}r&&ta(e,t,t.hoistables)}}function ra(e){var t={pendingTasks:1,boundaries:null,hoistables:cr(),inheritedHoistables:null,together:!1,next:null};return e!==null&&0<e.pendingTasks&&(t.pendingTasks++,t.boundaries=[],e.next=t),t}function ia(e,t,n,r,i){var a=t.keyPath,o=t.treeContext,s=t.row;t.keyPath=n,n=r.length;var c=null;if(t.replay!==null){var l=t.replay.slots;if(typeof l==`object`&&l)for(var u=0;u<n;u++){var d=i!==`backwards`&&i!==`unstable_legacy-backwards`?u:n-1-u,f=r[d];t.row=c=ra(c),t.treeContext=zr(o,n,d);var p=l[d];typeof p==`number`?(ca(e,t,p,f,d),delete l[d]):_a(e,t,f,d),--c.pendingTasks===0&&ea(e,c)}else for(l=0;l<n;l++)u=i!==`backwards`&&i!==`unstable_legacy-backwards`?l:n-1-l,d=r[u],t.row=c=ra(c),t.treeContext=zr(o,n,u),_a(e,t,d,u),--c.pendingTasks===0&&ea(e,c)}else if(i!==`backwards`&&i!==`unstable_legacy-backwards`)for(i=0;i<n;i++)l=r[i],t.row=c=ra(c),t.treeContext=zr(o,n,i),_a(e,t,l,i),--c.pendingTasks===0&&ea(e,c);else{for(i=t.blockedSegment,l=i.children.length,u=i.chunks.length,d=n-1;0<=d;d--){f=r[d],t.row=c=ra(c),t.treeContext=zr(o,n,d),p=Ji(e,u,null,t.formatContext,d!==0||i.lastPushedText,!0),i.children.splice(l,0,p),t.blockedSegment=p;try{_a(e,t,f,d),p.lastPushedText&&p.textEmbedded&&p.chunks.push(Ie),p.status=1,Ta(e,t.blockedBoundary,p),--c.pendingTasks===0&&ea(e,c)}catch(t){throw p.status=e.status===12?3:4,t}}t.blockedSegment=i,i.lastPushedText=!1}s!==null&&c!==null&&0<c.pendingTasks&&(s.pendingTasks++,c.next=s),t.treeContext=o,t.row=s,t.keyPath=a}function aa(e,t,n,r,i,a){var o=t.thenableState;for(t.thenableState=null,Zr={},Qr=t,$r=e,ei=n,oi=ai=0,si=-1,ci=0,li=o,e=r(i,a);ii;)ii=!1,oi=ai=0,si=-1,ci=0,di+=1,ni=null,e=r(i,a);return gi(),e}function oa(e,t,n,r,i,a,o){var s=!1;if(a!==0&&e.formState!==null){var c=t.blockedSegment;if(c!==null){s=!0,c=c.chunks;for(var l=0;l<a;l++)l===o?c.push(lt):c.push(ut)}}a=t.keyPath,t.keyPath=n,i?(n=t.treeContext,t.treeContext=zr(n,1,0),_a(e,t,r,-1),t.treeContext=n):s?_a(e,t,r,-1):la(e,t,r,-1),t.keyPath=a}function sa(e,t,n,i,a,o){if(typeof i==`function`){if(i.prototype&&i.prototype.isReactComponent){var b=a;if(`ref`in a)for(var S in b={},a)S!==`ref`&&(b[S]=a[S]);var T=i.defaultProps;if(T)for(var E in b===a&&(b=ee({},b,a)),T)b[E]===void 0&&(b[E]=T[E]);a=b,b=kr,T=i.contextType,typeof T==`object`&&T&&(b=T._currentValue),b=new i(a,b);var D=b.state===void 0?null:b.state;if(b.updater=Lr,b.props=a,b.state=D,T={queue:[],replace:!1},b._reactInternals=T,o=i.contextType,b.context=typeof o==`object`&&o?o._currentValue:kr,o=i.getDerivedStateFromProps,typeof o==`function`&&(o=o(a,D),D=o==null?D:ee({},D,o),b.state=D),typeof i.getDerivedStateFromProps!=`function`&&typeof b.getSnapshotBeforeUpdate!=`function`&&(typeof b.UNSAFE_componentWillMount==`function`||typeof b.componentWillMount==`function`)){if(i=b.state,typeof b.componentWillMount==`function`&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount==`function`&&b.UNSAFE_componentWillMount(),i!==b.state&&Lr.enqueueReplaceState(b,b.state,null),T.queue!==null&&0<T.queue.length){if(i=T.queue,o=T.replace,T.queue=null,T.replace=!1,o&&i.length===1)b.state=i[0];else{for(T=o?i[0]:b.state,D=!0,o=+!!o;o<i.length;o++)E=i[o],E=typeof E==`function`?E.call(b,T,a,void 0):E,E!=null&&(D?(D=!1,T=ee({},T,E)):ee(T,E));b.state=T}}else T.queue=null}if(i=b.render(),e.status===12)throw null;a=t.keyPath,t.keyPath=n,la(e,t,i,-1),t.keyPath=a}else{if(i=aa(e,t,n,i,a,void 0),e.status===12)throw null;oa(e,t,n,i,ai!==0,oi,si)}}else if(typeof i==`string`){if(b=t.blockedSegment,b===null)b=a.children,T=t.formatContext,D=t.keyPath,t.formatContext=Me(T,i,a),t.keyPath=n,_a(e,t,b,-1),t.formatContext=T,t.keyPath=D;else{if(D=X(b.chunks,i,a,e.resumableState,e.renderState,t.blockedPreamble,t.hoistableState,t.formatContext,b.lastPushedText),b.lastPushedText=!1,T=t.formatContext,o=t.keyPath,t.keyPath=n,(t.formatContext=Me(T,i,a)).insertionMode===3){n=Ji(e,0,null,t.formatContext,!1,!1),b.preambleChildren.push(n),t.blockedSegment=n;try{n.status=6,_a(e,t,D,-1),n.lastPushedText&&n.textEmbedded&&n.chunks.push(Ie),n.status=1,Ta(e,t.blockedBoundary,n)}finally{t.blockedSegment=b}}else _a(e,t,D,-1);t.formatContext=T,t.keyPath=o;a:{switch(t=b.chunks,e=e.resuma
Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";var i=t({SelectIcon:()=>s,default:()=>s}),a=e(n(),1),o=r(),s=(0,a.forwardRef)(function(e,t){return(0,o.jsx)(`svg`,{"data-sanity-icon":`select`,width:`1em`,height:`1em`,viewBox:`0 0 25 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:t,children:(0,o.jsx)(`path`,{d:`M16 15L12.5 18.5L9 15M9 10L12.5 6.5L16 10`,stroke:`currentColor`,strokeWidth:1.2,strokeLinejoin:`round`})})});export{i as n,s as t};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{n,t as r}from"./SingleDocReleaseUpsellProvider-6B58QoVy-Cr1fZ6ra.js";var i=t(),a=e();function o(e){let t=(0,i.c)(4),o;t[0]===e?o=t[1]:(o=e.renderDefault(e),t[0]=e,t[1]=o);let s;return t[2]===o?s=t[3]:(s=(0,a.jsx)(r,{children:(0,a.jsx)(n,{children:o})}),t[2]=o,t[3]=s),s}export{o as SingleDocReleaseLayout};
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{n,t as r}from"./SingleDocReleaseUpsellProvider-eSYyzLjC-DBu0--ZA.js";var i=t(),a=e();function o(e){let t=(0,i.c)(4),o;t[0]===e?o=t[1]:(o=e.renderDefault(e),t[0]=e,t[1]=o);let s;return t[2]===o?s=t[3]:(s=(0,a.jsx)(r,{children:(0,a.jsx)(n,{children:o})}),t[2]=o,t[3]=s),s}export{o as SingleDocReleaseLayout};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{At as t,jt as n}from"./_singletons-C3kYIdI9.js";import{n as r,t as i}from"./jsx-runtime-BpzPEenQ.js";import{t as a}from"./compiler-runtime-sKsOXjDo.js";import{At as o,Yn as s,jn as c,nt as l,x as u,yl as d}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";var f=e(r(),1),p=a(),m=i();function h(){return!!d().scheduledDrafts?.enabled}function g(e){let n=(0,p.c)(6),{children:r}=e,{enabled:i,isLoading:a,error:o}=c(u.singleDocRelease),s=h(),l;bb0:{if(!s||a||o){let e;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={enabled:!1,mode:null},n[0]=e):e=n[0],l=e;break bb0}let e=i?`default`:`upsell`,t;n[1]===e?t=n[2]:(t={enabled:!0,mode:e},n[1]=e,n[2]=t),l=t}let d=l,f;return n[3]!==r||n[4]!==d?(f=(0,m.jsx)(t.Provider,{value:d,children:r}),n[3]=r,n[4]=d,n[5]=f):f=n[5],f}function _(){return(0,f.useContext)(t)}function v(e){let t=(0,p.c)(9),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={dataUri:`/journey/scheduled-drafts`,feature:`single_doc_release`},t[0]=r):r=t[0];let i=s(r),a=e.children,c;t[1]===i?c=t[2]:(c=o(i),t[1]=i,t[2]=c);let u;t[3]===c?u=t[4]:(u=(0,m.jsx)(l,{...c}),t[3]=c,t[4]=u);let d;return t[5]!==i||t[6]!==e.children||t[7]!==u?(d=(0,m.jsxs)(n.Provider,{value:i,children:[a,u]}),t[5]=i,t[6]=e.children,t[7]=u,t[8]=d):d=t[8],d}function y(){return(0,f.useContext)(n)}export{y as a,_ as i,v as n,h as r,g as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$ as t,Hp as n,Jt as r,Md as i,S as a,Vp as o,or as s,xr as c}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as l,t as u}from"./jsx-runtime-BpzPEenQ.js";import{t as d}from"./compiler-runtime-sKsOXjDo.js";var f=e(l(),1),p=d(),m=u();function h(){return!!i().scheduledDrafts?.enabled}function g(e){let t=(0,p.c)(6),{children:n}=e,{enabled:r,isLoading:i,error:c}=s(a.singleDocRelease),l=h(),u;bb0:{if(!l||i||c){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={enabled:!1,mode:null},t[0]=e):e=t[0],u=e;break bb0}let e=r?`default`:`upsell`,n;t[1]===e?n=t[2]:(n={enabled:!0,mode:e},t[1]=e,t[2]=n),u=n}let d=u,f;return t[3]!==n||t[4]!==d?(f=(0,m.jsx)(o.Provider,{value:d,children:n}),t[3]=n,t[4]=d,t[5]=f):f=t[5],f}function _(){return(0,f.useContext)(o)}function v(e){let i=(0,p.c)(9),a;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={dataUri:`/journey/scheduled-drafts`,feature:`single_doc_release`},i[0]=a):a=i[0];let o=c(a),s=e.children,l;i[1]===o?l=i[2]:(l=r(o),i[1]=o,i[2]=l);let u;i[3]===l?u=i[4]:(u=(0,m.jsx)(t,{...l}),i[3]=l,i[4]=u);let d;return i[5]!==o||i[6]!==e.children||i[7]!==u?(d=(0,m.jsxs)(n.Provider,{value:o,children:[s,u]}),i[5]=o,i[6]=e.children,i[7]=u,i[8]=d):d=i[8],d}function y(){return(0,f.useContext)(n)}export{y as a,_ as i,v as n,h as r,g as t};
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
import{T as e,b as t,d as n,f as r,p as i,s as a,t as o,u as s}from"./Observable-BrARBsae.js";var c=i(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),l=function(i){t(l,i);function l(){var e=i.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return l.prototype.lift=function(e){var t=new u(this,this);return t.operator=e,t},l.prototype._throwIfClosed=function(){if(this.closed)throw new c},l.prototype.next=function(t){var n=this;a(function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var a=e(n.currentObservers),o=a.next();!o.done;o=a.next())o.value.next(t)}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}})},l.prototype.error=function(e){var t=this;a(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},l.prototype.complete=function(){var e=this;a(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},l.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(l.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),l.prototype._trySubscribe=function(e){return this._throwIfClosed(),i.prototype._trySubscribe.call(this,e)},l.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},l.prototype._innerSubscribe=function(e){var t=this,i=this,a=i.hasError,o=i.isStopped,c=i.observers;return a||o?s:(this.currentObservers=null,c.push(e),new n(function(){t.currentObservers=null,r(c,e)}))},l.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},l.prototype.asObservable=function(){var e=new o;return e.source=this,e},l.create=function(e,t){return new u(e,t)},l}(o),u=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return n.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},n.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},n.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},n.prototype._subscribe=function(e){return this.source?.subscribe(e)??s},n}(l);export{l as t};
|
||||
Vendored
-10
@@ -1,10 +0,0 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/LazyRefractor-RPbJN7Kr.js","static/jsx-runtime-BpzPEenQ.js","static/rolldown-runtime-Dd_uD5pT.js","static/compiler-runtime-sKsOXjDo.js","static/dist-BnDij-KK.js"])))=>i.map(i=>d[i]);
|
||||
import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{Nt as n}from"./_singletons-C3kYIdI9.js";import{n as r,t as i}from"./jsx-runtime-BpzPEenQ.js";import{t as a}from"./compiler-runtime-sKsOXjDo.js";import{t as o}from"./preload-helper-Czpn1I53.js";import{A as s,At as c,Ct as l,Dt as u,Et as d,Ft as f,Ht as p,J as m,K as h,N as g,Nt as _,Rt as v,St as y,Tt as b,Ut as x,X as S,Y as C,Z as w,_t as T,at as E,bt as D,ct as O,d as k,dt as A,ft as j,gt as M,ht as N,i as P,j as F,kt as I,lt as L,mt as ee,ot as R,q as z,wt as te,xt as ne,y as B,zt as re}from"./dist-BOMXfkZi.js";import"./Spinner-Dk8hTAm3.js";import"./Close-B_ZEgT1V.js";import{t as ie}from"./ChevronRight-Cf6GkXSa.js";var V=e(r()),ae=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);W(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},H={},oe=(e,t,n,r)=>{W(n)&&H[n]||(W(n)&&(H[n]=new Date),ae(e,t,n,r))},se=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},U=(e,t,n)=>{e.loadNamespaces(t,se(e,n))},ce=(e,t,n,r)=>{if(W(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return U(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,se(e,r))},le=(e,t,n={})=>!t.languages||!t.languages.length?(oe(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),W=e=>typeof e==`string`,ue=e=>typeof e==`object`&&!!e,de=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,fe={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},pe=e=>fe[e],me={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(de,pe),transDefaultProps:void 0},he=(e={})=>{me={...me,...e}},ge=()=>me,_e,ve=e=>{_e=e},ye=()=>_e,be=(0,V.createContext)(),xe=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Se=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Ce=t(((e,t)=>{t.exports=Se()})),G=Ce(),we={t:(e,t)=>{if(W(t))return t;if(ue(t)&&W(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Te=()=>()=>{},Ee=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,V.useContext)(be)||{},a=n||r||ye();a&&!a.reportNamespaces&&(a.reportNamespaces=new xe),a||oe(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,V.useMemo)(()=>({...ge(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=W(l)?[l]:l||[`translation`],d=(0,V.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,V.useRef)(0),p=(0,V.useCallback)(e=>{if(!a)return Te;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,V.useRef)(),h=(0,V.useCallback)(()=>{if(!a)return we;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>le(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,V.useState)(0),{t:v,ready:y}=(0,G.useSyncELine truncated
|
||||
[data-motion-pop-id="${o}"] {
|
||||
position: absolute !important;
|
||||
width: ${e}px !important;
|
||||
height: ${u}px !important;
|
||||
${_}px !important;
|
||||
${v}px !important;
|
||||
}
|
||||
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,J.jsx)(gl,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:V.cloneElement(e,{ref:u})})}var vl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Ne(yl),d=(0,V.useId)(),f=(0,V.useRef)(n),p=(0,V.useRef)(r);Pe(()=>{f.current=n,p.current=r});let m=!0,h=(0,V.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,V.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),V.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,J.jsx)(_l,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,J.jsx)(Fe.Provider,{value:h,children:e})};function yl(){return new Map}function bl(e=!0){let t=(0,V.useContext)(Fe);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,V.useId)();(0,V.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,V.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var xl=(0,V.createContext)({strict:!1}),Sl={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Cl=!1;function wl(){if(Cl)return;let e={};for(let t in Sl)e[t]={isEnabled:e=>Sl[t].some(t=>!!e[t])};Mo(e),Cl=!0}function Tl(){return wl(),No()}function El(e){let t=Tl();for(let n in e)t[n]={...t[n],...e[n]};Mo(t)}var Dl=(0,V.createContext)({});function Ol(e,t){if(Co(e)){let{initial:t,animate:n}=e;return{initial:t===!1||bo(t)?t:void 0,animate:bo(n)?n:void 0}}return e.inherit===!1?{}:t}function kl(e){let{initial:t,animate:n}=Ol(e,(0,V.useContext)(Dl));return(0,V.useMemo)(()=>({initial:t,animate:n}),[Al(t),Al(n)])}function Al(e){return Array.isArray(e)?e.join(` `):e}var jl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ml(e,t,n){for(let r in t)!Ki(t[r])&&!ps(r,n)&&(e[r]=t[r])}function Nl({transformTemplate:e},t){return(0,V.useMemo)(()=>{let n=jl();return ss(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Pl(e,t){let n=e.style||{},r={};return Ml(r,n,e),Object.assign(r,Nl(e,t)),r}function Fl(e,t){let n={},r=Pl(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Il=()=>({...jl(),attrs:{}});function Ll(e,t,n,r){let i=(0,V.useMemo)(()=>{let n=Il();return xs(n,t,Cs(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ml(t,e.style,e),i.style={...t,...i.style}}return i}var Rl=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function zl(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Rl.has(e)}function Bl(e,t){return e.startsWith(`on`)?!zl(e):t?.(e)??!zl(e)}function Vl(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(Ki(e[a])||(Bl(a,r)||n===!0&&zl(a)||!t&&!zl(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Hl=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Ul(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Hl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Wl(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Ul(e)?Ll:Fl)(t,r,i,e),l=Vl(t,typeof e==`string`,a,s),u=e===V.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,V.useMemo)(()=>Ki(d)?d.get():d,[d]);return(0,V.createElement)(e,{...u,children:f})}function Gl({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Kl(n,r,i,e),renderState:t()}}function Kl(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Dc(a[e]);let{initial:o,animate:s}=e,c=Co(e),l=wo(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!yo(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=zi
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{K as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{i as a,l as o}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import"./draftUtils-D3HJGQaW-BnJ8Os95.js";import{t as s}from"./useTasksEnabled-DBNZp6wF-C6IkIDac.js";import{t as c}from"./useTasks-I977dBmi-CnDHElcf.js";var l=e(n(),1),u=i(),d=r();function f(){return(0,l.useContext)(t)}function p(e){let t=(0,u.c)(6),{documentId:n,documentType:r}=e,i=f(),{setActiveDocument:s}=c(),d,p;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==s?(d=()=>(n&&i&&r&&s?.({documentId:o(n)?n:a(n),documentType:r}),()=>{i&&s?.(null)}),p=[n,r,i,s],t[0]=n,t[1]=r,t[2]=i,t[3]=s,t[4]=d,t[5]=p):(d=t[4],p=t[5]),(0,l.useEffect)(d,p),null}function m(e){let t=(0,u.c)(2),{enabled:n}=s();if(!n)return null;let r;return t[0]===e?r=t[1]:(r=(0,d.jsx)(p,{...e}),t[0]=e,t[1]=r),r}function h(e){let t=(0,u.c)(8),n=e.value?._id,r=e.value?._type,i;t[0]!==n||t[1]!==r?(i=(0,d.jsx)(m,{documentId:n,documentType:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2];let a;t[3]===e?a=t[4]:(a=e.renderDefault(e),t[3]=e,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,d.jsxs)(d.Fragment,{children:[i,a]}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}export{h as TasksDocumentInputLayout};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{_p as t}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{on as a}from"./types--2f-avvL-DfAXA8nG.js";import{d as o,o as s}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as c}from"./useTasks-I977dBmi-R3bfJHOa.js";var l=e(n(),1),u=i(),d=r();function f(){return(0,l.useContext)(t)}function p(e){let t=(0,u.c)(6),{documentId:n,documentType:r}=e,i=f(),{setActiveDocument:a}=c(),d,p;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a?(d=()=>(n&&i&&r&&a?.({documentId:o(n)?n:s(n),documentType:r}),()=>{i&&a?.(null)}),p=[n,r,i,a],t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=d,t[5]=p):(d=t[4],p=t[5]),(0,l.useEffect)(d,p),null}function m(e){let t=(0,u.c)(2),{enabled:n}=a();if(!n)return null;let r;return t[0]===e?r=t[1]:(r=(0,d.jsx)(p,{...e}),t[0]=e,t[1]=r),r}function h(e){let t=(0,u.c)(8),n=e.value?._id,r=e.value?._type,i;t[0]!==n||t[1]!==r?(i=(0,d.jsx)(m,{documentId:n,documentType:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2];let a;t[3]===e?a=t[4]:(a=e.renderDefault(e),t[3]=e,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,d.jsxs)(d.Fragment,{children:[i,a]}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}export{h as TasksDocumentInputLayout};
|
||||
@@ -0,0 +1 @@
|
||||
import{Sd as e,rc as t}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{sn as i,xt as a}from"./types--2f-avvL-DfAXA8nG.js";import{Ft as o,Gt as s,f as c}from"./dist-LVcARZxB.js";import{t as l}from"./Task-DGtH1mzn.js";import{t as u}from"./useTasks-I977dBmi-R3bfJHOa.js";import{n as d}from"./utils-1iCQse9Y-DVUANiML.js";var f=r(),p=n(),m=s.div.withConfig({displayName:`ButtonContainer`,componentId:`sc-528cae-0`})`position:relative;[data-ui='Badge']{position:absolute;top:-2px;right:-2px;}`;function h(){let n=(0,f.c)(31),{data:r,activeDocument:s}=u(),{handleOpenTasks:h,setActiveTab:g}=i(),_=o(),v;n[0]!==s||n[1]!==r?(v=s?.documentId?r.filter(e=>d(e.target)===s.documentId&&e.status===`open`&&e.createdByUser):[],n[0]=s,n[1]=r,n[2]=v):v=n[2];let y=v,b;n[3]!==h||n[4]!==g?(b=()=>{h(),g(`document`)},n[3]=h,n[4]=g,n[5]=b):b=n[5];let x=b,{t:S}=e(a);if(y.length===0)return null;if(_<3){let e;n[6]!==y.length||n[7]!==S?(e=S(`document.footer.open-tasks.placeholder`,{count:y.length}),n[6]=y.length,n[7]=S,n[8]=e):e=n[8];let r;n[9]===e?r=n[10]:(r={content:e},n[9]=e,n[10]=r);let i;n[11]!==x||n[12]!==r?(i=(0,p.jsx)(t,{mode:`bleed`,icon:l,size:`large`,onClick:x,tooltipProps:r}),n[11]=x,n[12]=r,n[13]=i):i=n[13];let a;n[14]===y.length?a=n[15]:(a=(0,p.jsx)(c,{"data-testid":`tasks-badge`,tone:`primary`,fontSize:0,children:y.length}),n[14]=y.length,n[15]=a);let o;return n[16]!==i||n[17]!==a?(o=(0,p.jsxs)(m,{children:[i,a]}),n[16]=i,n[17]=a,n[18]=o):o=n[18],o}let C;n[19]!==y.length||n[20]!==S?(C=S(`document.footer.open-tasks.placeholder`,{count:y.length}),n[19]=y.length,n[20]=S,n[21]=C):C=n[21];let w;n[22]===C?w=n[23]:(w={content:C},n[22]=C,n[23]=w);let T;n[24]!==y.length||n[25]!==S?(T=S(`document.footer.open-tasks.text`,{count:y.length}),n[24]=y.length,n[25]=S,n[26]=T):T=n[26];let E;return n[27]!==x||n[28]!==w||n[29]!==T?(E=(0,p.jsx)(t,{mode:`bleed`,tooltipProps:w,text:T,onClick:x}),n[27]=x,n[28]=w,n[29]=T,n[30]=E):E=n[30],E}export{h as TasksFooterOpenTasks};
|
||||
@@ -1 +0,0 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{N as n,t as r}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{Ft as i,Tt as a,i as o}from"./dist-BOMXfkZi.js";import{r as s,t as c}from"./useTasksNavigation-CMv6pzvb-DUNxXR3l.js";import{t as l}from"./Task-DGtH1mzn.js";import{t as u}from"./useTasks-I977dBmi-CnDHElcf.js";import{n as d}from"./utils-1iCQse9Y-Dr_fJmYg.js";var f=t(),p=e(),m=i.div.withConfig({displayName:`ButtonContainer`,componentId:`sc-528cae-0`})`position:relative;[data-ui='Badge']{position:absolute;top:-2px;right:-2px;}`;function h(){let e=(0,f.c)(31),{data:t,activeDocument:i}=u(),{handleOpenTasks:h,setActiveTab:g}=s(),_=a(),v;e[0]!==i||e[1]!==t?(v=i?.documentId?t.filter(e=>d(e.target)===i.documentId&&e.status===`open`&&e.createdByUser):[],e[0]=i,e[1]=t,e[2]=v):v=e[2];let y=v,b;e[3]!==h||e[4]!==g?(b=()=>{h(),g(`document`)},e[3]=h,e[4]=g,e[5]=b):b=e[5];let x=b,{t:S}=n(c);if(y.length===0)return null;if(_<3){let t;e[6]!==y.length||e[7]!==S?(t=S(`document.footer.open-tasks.placeholder`,{count:y.length}),e[6]=y.length,e[7]=S,e[8]=t):t=e[8];let n;e[9]===t?n=e[10]:(n={content:t},e[9]=t,e[10]=n);let i;e[11]!==x||e[12]!==n?(i=(0,p.jsx)(r,{mode:`bleed`,icon:l,size:`large`,onClick:x,tooltipProps:n}),e[11]=x,e[12]=n,e[13]=i):i=e[13];let a;e[14]===y.length?a=e[15]:(a=(0,p.jsx)(o,{"data-testid":`tasks-badge`,tone:`primary`,fontSize:0,children:y.length}),e[14]=y.length,e[15]=a);let s;return e[16]!==i||e[17]!==a?(s=(0,p.jsxs)(m,{children:[i,a]}),e[16]=i,e[17]=a,e[18]=s):s=e[18],s}let C;e[19]!==y.length||e[20]!==S?(C=S(`document.footer.open-tasks.placeholder`,{count:y.length}),e[19]=y.length,e[20]=S,e[21]=C):C=e[21];let w;e[22]===C?w=e[23]:(w={content:C},e[22]=C,e[23]=w);let T;e[24]!==y.length||e[25]!==S?(T=S(`document.footer.open-tasks.text`,{count:y.length}),e[24]=y.length,e[25]=S,e[26]=T):T=e[26];let E;return e[27]!==x||e[28]!==w||e[29]!==T?(E=(0,p.jsx)(r,{mode:`bleed`,tooltipProps:w,text:T,onClick:x}),e[27]=x,e[28]=w,e[29]=T,e[30]=E):E=e[30],E}export{h as TasksFooterOpenTasks};
|
||||
@@ -1,21 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Z as t}from"./_singletons-C3kYIdI9.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{Cl as a,En as o,Fn as s,Ls as c,Mr as l,Oi as u,Qs as d,Rs as f,T as p,Tl as m,Ts as h,Ur as g,Us as _,Ut as v,V as y,Vi as b,X as x,Xc as S,Xi as C,Yc as w,Ys as T,Zl as E,_l as D,bl as O,bo as k,da as A,dn as j,dt as M,el as N,fa as P,fi as F,ga as I,gl as L,go as R,hl as z,kn as B,ko as V,la as H,ni as ee,so as te,ti as ne,uc as re,ur as ie,v as ae,vl as oe,vo as se,wi as ce,xo as le,yl as ue,yn as de,zs as fe}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as U,a as pe,b as W,c as me,d as he,i as ge,l as _e,o as ve,p as ye,s as be,t as G,w as xe,x as K}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{I as Se,L as Ce,O as we,R as Te,S as Ee,r as De,s as Oe}from"./WorkspaceLoader-DppHZGrz-4nw6yzeL.js";import{c as ke,s as Ae,u as je}from"./SearchProvider-BoC91Z5A-C4CoG1BJ.js";import{n as Me}from"./useScheduledDraftMenuActions-Cn0nU-oE-CETpe1XB.js";import{n as Ne,r as Pe}from"./lib-BUPHIzf9.js";import{A as Fe,C as Ie,E as Le,Ft as q,Ht as J,K as Re,Nt as ze,Q as Be,Tt as Ve,Vt as He,_t as Ue,b as We,ct as Ge,dt as Ke,ft as Y,gt as qe,i as Je,lt as Ye,o as Xe,r as Ze,s as Qe,ut as $e,v as et}from"./dist-BOMXfkZi.js";import{a as tt,i as nt}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import"./draftUtils-D3HJGQaW-BnJ8Os95.js";import{t as rt}from"./Close-B_ZEgT1V.js";import{t as it}from"./ChevronDown-BpYUc-AP.js";import{t as at}from"./Checkmark-OT7tsNpL.js";import{t as ot}from"./ChevronRight-Cf6GkXSa.js";import{t as st}from"./Document-0Zpczu4q.js";import{t as ct}from"./Calendar-DCYqUUNo.js";import{t as lt}from"./ChevronLeft-BzE8YX6u.js";import{t as ut}from"./Circle-DkcW-8WT.js";import{t as dt}from"./Edit-CAHlBqGT.js";import{t as ft}from"./Trash-BxG6GrjH.js";import{t as pt}from"./Link-Cl1VSeDJ.js";import{t as mt}from"./Add-CwQ5TpM8.js";import{t as ht}from"./Copy-BTQgeMVP.js";import{a as gt,b as _t,g as vt}from"./useComments-CVvkxQg3-CVUv-UC3.js";import{t as yt}from"./useAddonDataset-BvCgByG6-fdH-dSqr.js";import{t as bt}from"./CheckmarkCircle-B6SBY4QE.js";import{r as xt,t as X}from"./useTasksNavigation-CMv6pzvb-DUNxXR3l.js";import{t as St}from"./useTasksEnabled-DBNZp6wF-C6IkIDac.js";import{n as Ct,t as wt}from"./CommentsListItem-DwZqY9F--7eLKoeE7.js";import{t as Tt}from"./UpsellPanel-BzCgrrZO-BKE9DmdX.js";import{t as Et}from"./useDocumentPreviewValues-Df5XHGi_-HMtAXFMO.js";import{UserIcon as Dt}from"./User-BbvVoXNB.js";import{t as Ot}from"./useTasks-I977dBmi-CnDHElcf.js";import{n as kt,r as At,t as jt}from"./utils-1iCQse9Y-Dr_fJmYg.js";import{a as Mt,c as Nt,i as Pt,l as Ft,n as It,r as Lt,t as Rt}from"./types-B8Ny1dM--BQTDvKQs.js";var Z=e(n(),1),Q=i(),$=r(),zt=e(ie(),1);function Bt(e){return d(e,Date.now())}function Vt(e,t,n){let[r,i]=_(n?.in,e,t);return+T(r,n)==+T(i,n)}function Ht(e,t,n){return Vt(e,t,{...n,weekStartsOn:1})}function Ut(e,t){return Ht(d(t?.in||e,e),Bt(t?.in||e))}function Wt(e,t){return b(d(t?.in||e,e),Bt(t?.in||e))}function Gt(e){let n=(0,Q.c)(8),[r,i]=(0,Z.useState)(null),a;n[0]===r?a=n[1]:(a={documentValue:r,permission:`read`},n[0]=r,n[1]=a);let o=Ce(a),s;n[2]!==o||n[3]!==r?(s={mentionOptions:o,selectedDocument:r,setSelectedDocument:i},n[2]=o,n[3]=r,n[4]=s):s=n[4];let c=s,l;return n[5]!==e.children||n[6]!==c?(l=(0,$.jsx)(t.Provider,{value:c,children:e.children}),n[5]=e.children,n[6]=c,n[7]=l):l=n[7],l}function Kt(){let e=(0,Z.useContext)(t);if(!e)throw Error(`useMentionUser must be used within a MentionUserProvider`);return e}var qt=z.apiVersion,Jt=[{value:`open`,title:`To Do`,icon:(0,$.jsx)(ut,{})},{value:`closed`,title:`Done`,icon:(0,$.jsx)(bt,{})}],Yt=q.div.withConfig({displayName:`AvatarRoot`,componentId:`sc-ztexr-0`})(e=>{let t=J(e.theme);return ze`min-height:${t.avatar.sizes[e.$size]?.size}px;min-width:${t.avatar.sizes[e.$size]?.size}px;display:flex;align-items:center;justify-content:center;border-radius:50%;${e.$border?`box-shadow: inset 0 0 0 1px var(--card-border-color);`:``};${e.$removeBg?`--card-avatar-gray-bg-color: transparent;`:``}`});function Xt(e){let t=(0,Q.c)(27),{user:n,size:r,border:i}=e,a=r===void 0?0:r,o=i===void 0||i,[s,c]=le(n?.id||``);if(c){let e;return t[0]===a?e=t[1]:(e=(0,$.jsx)(P,{$size:a,animated:!0}),t[0]=a,t[1]=e),e}if(!n||!s){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Dt,{}),t[2]=e):e=t[2];let n;t[3]===a?n=t[4]:(n=(0,$.jsx)(Y,{size:a,children:e}),t[3]=a,t[4]=n);let r;return t[5]!==o||t[6]!==a||t[7]!==n?(r=(0,$.jsx)(Yt,{$size:a,$border:o,children:n}),t[5]=o,t[6]=a,t[7]=n,t[8]=r):r=t[8],r}let l=!e.withTooltip,u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`top`,`top-start`],t[9]=u):u=t[9];let d=!!s?.imageUrl,f;t[10]===s.imageUrl?f=t[11]:(f=s?.imageUrl?{color:void 0}:{},t[10]=s.imageUrl,t[11]=f);let p;t[12]===e.withTooltip?p=t[13]:(p=e.withTooltip?{title:null}:{},t[12]=e.withTooltip,t[13]=p);let m;t[14]!==s||t[15]!==a||t[16]!==f||t[17Line truncated
|
||||
color: ${J(e.theme).color.input.default.enabled.placeholder};
|
||||
margin-left: 3px;
|
||||
`),yn=q(qe).withConfig({displayName:`TargetRoot`,componentId:`sc-abs3ri-2`})`position:relative;[data-ui='show-on-hover']{opacity:0;position:absolute;right:6px;top:4px;display:flex;}&:focus-within,&:hover{padding-right:36px;[data-testid='compact-preview__status']{opacity:0;}[data-ui='show-on-hover']{transition:opacity 200ms;opacity:1;}}`,bn=q(l).withConfig({displayName:`StyledIntentLink`,componentId:`sc-abs3ri-3`})(()=>ze`text-decoration:none;width:100%;overflow:hidden;cursor:pointer;&:focus{box-shadow:0 0 0 1px var(--card-focus-ring-color);}&:focus-visible{outline:none;box-shadow:0 0 0 1px var(--card-focus-ring-color);}`);function xn(e){let t=(0,Q.c)(28),{value:n,handleRemove:r}=e,i=n.document._ref,a=n.documentType,o=h(),s;t[0]!==o||t[1]!==n.documentType?(s=o.get(n.documentType),t[0]=o,t[1]=n.documentType,t[2]=s):s=t[2];let c=s,l=B(i),{t:u}=U(X),d;t[3]!==i||t[4]!==a?(d=function(e){let{ref:t,...n}=e,r=tt(i);return(0,$.jsx)(bn,{...n,intent:`edit`,params:{id:nt(i),type:a},ref:t,searchParams:r?[[`perspective`,r]]:void 0})},t[3]=i,t[4]=a,t[5]=d):d=t[5];let f=d;if(!c){let e;t[6]===u?e=t[7]:(e=u(`form.input.target.error.schema-not-found`),t[6]=u,t[7]=e);let n;return t[8]===e?n=t[9]:(n=(0,$.jsx)(Y,{children:e}),t[8]=e,t[9]=n),n}let p;t[10]!==l||t[11]!==a||t[12]!==c||t[13]!==n.document._ref?(p=(0,$.jsx)(je,{documentType:a,documentId:n.document._ref,layout:`compact`,presence:l,schemaType:c,showBadge:!1}),t[10]=l,t[11]=a,t[12]=c,t[13]=n.document._ref,t[14]=p):p=t[14];let m;t[15]!==f||t[16]!==p?(m=(0,$.jsx)(qe,{as:f,radius:2,"data-as":`button`,children:p}),t[15]=f,t[16]=p,t[17]=m):m=t[17];let g;t[18]===u?g=t[19]:(g=u(`form.input.target.buttons.remove.text`),t[18]=u,t[19]=g);let _;t[20]===g?_=t[21]:(_={content:g},t[20]=g,t[21]=_);let v;t[22]!==r||t[23]!==_?(v=(0,$.jsx)(`div`,{"data-ui":`show-on-hover`,children:(0,$.jsx)(G,{icon:rt,mode:`bleed`,onClick:r,tooltipProps:_})}),t[22]=r,t[23]=_,t[24]=v):v=t[24];let y;return t[25]!==m||t[26]!==v?(y=(0,$.jsx)(yn,{border:!0,radius:2,"data-testid":`task-target-field-preview`,children:(0,$.jsxs)(K,{gap:1,alignItems:`center`,justifyContent:`space-between`,children:[m,v]})}),t[25]=m,t[26]=v,t[27]=y):y=t[27],y}function Sn(e){let t=(0,Q.c)(32),[n,r]=(0,Z.useState)(!1),{dataset:i,projectId:a}=O(),{mode:o,inputProps:s,value:c}=e,{onChange:l}=s,u=c,d;t[0]!==i||t[1]!==l||t[2]!==a?(d=e=>{l(j(At({documentId:e._id,documentType:e._type,dataset:i,projectId:a})))},t[0]=i,t[1]=l,t[2]=a,t[3]=d):d=t[3];let f=d,p;t[4]===l?p=t[5]:(p=()=>{l(de())},t[4]=l,t[5]=p);let m=p,h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{r(!0)},t[6]=h):h=t[6];let g=h,_;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{r(!1)},t[7]=_):_=t[7];let v=_,y;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{(e.key===`Enter`||e.key===` `)&&r(!0)},t[8]=y):y=t[8];let b=y,{t:x}=U(X),S=o===`edit`,C=o===`edit`?4:0,w;t[9]!==o||t[10]!==e.description||t[11]!==e.inputId||t[12]!==e.title||t[13]!==e.validation?(w=o===`create`&&(0,$.jsx)(W,{"data-ui":`fieldHeaderContentBox`,children:(0,$.jsx)(F,{description:e.description,inputId:e.inputId,title:e.title,validation:e.validation,deprecated:void 0})}),t[9]=o,t[10]=e.description,t[11]=e.inputId,t[12]=e.title,t[13]=e.validation,t[14]=w):w=t[14];let T;t[15]!==m||t[16]!==x||t[17]!==u?(T=u?(0,$.jsx)(xn,{value:u,handleRemove:m}):(0,$.jsx)(_n,{border:!0,radius:2,paddingX:2,paddingY:3,onClick:g,onKeyDown:b,tabIndex:0,children:(0,$.jsxs)(K,{gap:1,justifyContent:`flex-start`,alignItems:`center`,children:[(0,$.jsx)(W,{paddingX:1,children:(0,$.jsx)(Y,{size:1,children:(0,$.jsx)(st,{})})}),(0,$.jsx)(vn,{size:1,children:x(`form.input.target.search.placeholder`)})]})}),t[15]=m,t[16]=x,t[17]=u,t[18]=T):T=t[18];let E;t[19]!==w||t[20]!==T?(E=(0,$.jsxs)(Ke,{gap:2,children:[w,T]}),t[19]=w,t[20]=T,t[21]=E):E=t[21];let D;t[22]!==f||t[23]!==n?(D=(0,$.jsx)(Ae,{open:n,onClose:v,onItemSelect:f,disableIntentLink:!0}),t[22]=f,t[23]=n,t[24]=D):D=t[24];let k;t[25]!==E||t[26]!==D?(k=(0,$.jsx)(pn,{children:(0,$.jsx)(Ue,{zOffset:100,children:(0,$.jsx)(gn,{children:(0,$.jsxs)(ke,{children:[E,D]})})})}),t[25]=E,t[26]=D,t[27]=k):k=t[27];let A;return t[28]!==k||t[29]!==S||t[30]!==C?(A=(0,$.jsx)(qe,{borderBottom:S,paddingBottom:C,children:k}),t[28]=k,t[29]=S,t[30]=C,t[31]=A):A=t[31],A}var Cn=q.div.withConfig({displayName:`Root`,componentId:`sc-e1xmtd-0`})(e=>`
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
padding-top: ${J(e.theme).space[3]}px;
|
||||
`),wn=q.textarea.withConfig({displayName:`TitleInput`,componentId:`sc-e1xmtd-1`})(e=>{let{color:t,font:n}=J(e.theme);return ze`resize:none;overflow:hidden;appearance:none;background:none;border:0;padding:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;font-family:${n.text.family};font-weight:${n.text.weights.semibold};font-size:${n.text.sizes[3].fontSize}px;line-height:${n.text.sizes[3].lineHeight}px;margin:0;position:relative;z-index:1;display:block;transition:height 500ms;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}color:${t.input.default.enabled.fg};&::placeholder{color:${t.input.default.enabled.placeholder};}`});function Tn(e){let t=(0,Q.c)(11),{value:n,onChange:r,placeholder:i,path:a}=e,o=(0,Z.useRef)(null),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o.current&&(o.current.style.height=`auto`,o.current.style.height=`${o.current.scrollHeight}px`)},t[0]=s):s=t[0];let c;t[1]===n?c=t[2]:(c=[n],t[1]=n,t[2]=c),(0,Z.useEffect)(s,c);let l;t[3]!==r||t[4]!==a?(l=e=>{let t=e.currentTarget.value;return t||r(de(a)),r(j(t.replace(/\n/g,``),a))},t[3]=r,t[4]=a,t[5]=l):l=t[5];let u=l,d=!n,f;return t[6]!==u||t[7]!==i||t[8]!==d||t[9]!==n?(f=(0,$.jsx)(Cn,{children:(0,$.jsx)(wn,{ref:o,autoFocus:d,value:n,placeholder:i,onChange:u,rows:1})}),t[6]=u,t[7]=i,t[8]=d,t[9]=n,t[10]=f):f=t[10],f}function En(e){let t=(0,Q.c)(4),{value:n,inputProps:r}=e,{onChange:i,schemaType:a}=r,o;return t[0]!==i||t[1]!==a.placeholder||t[2]!==n?(o=(0,$.jsx)(Tn,{value:n,onChange:i,placeholder:a.placeholder}),t[0]=i,t[1]=a.placeholder,t[2]=n,t[3]=o):o=t[3],o}function Dn(){let e=(0,Q.c)(12),{client:t,createAddonDataset:n}=yt(),r=k(),i;e[0]!==t||e[1]!==n||e[2]!==r?(i=async e=>{if(!r)throw Error(`No current user found. Unable to create task.`);let i={...e,authorId:r.id,_type:`tasks.task`};if(!t){let e=await n();if(!e)throw Error(`No addon client found. Unable to create task.`);return await e.create(i)}return await t.create(i)},e[0]=t,e[1]=n,e[2]=r,e[3]=i):i=e[3];let a=i,o;e[4]===t?o=e[5]:(o=async(e,n)=>{if(!t)throw Error(`No client. Unable to create task.`);return await t.patch(e).set(n).commit()},e[4]=t,e[5]=o);let s=o,c;e[6]===t?c=e[7]:(c=async e=>{if(!t)throw Error(`No client. Unable to create task.`);await t.delete(e)},e[6]=t,e[7]=c);let l=c,u;return e[8]!==a||e[9]!==s||e[10]!==l?(u={create:a,edit:s,remove:l},e[8]=a,e[9]=s,e[10]=l,e[11]=u):u=e[11],u}function On(e){let t=(0,Q.c)(12),{id:n,onError:r,onRemoved:i}=e,[a,o]=(0,Z.useState)(`idle`),[s,c]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(null),d=Dn(),f;t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==d?(f=async()=>{let e=async()=>{o(`loading`),await d.remove(n),i?.(),o(`idle`),await new Promise(kn),c(!1)};try{await e()}catch(e){let t=e;r?.(t.message),u(t.message),o(`error`)}o(`idle`)},t[0]=n,t[1]=r,t[2]=i,t[3]=d,t[4]=f):f=t[4];let p=f,m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>{c(!0)},t[5]=m):m=t[5];let h=m,g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{c(!1)},t[6]=g):g=t[6];let _=g,v;return t[7]!==l||t[8]!==p||t[9]!==a||t[10]!==s?(v={removeStatus:a,showDialog:s,error:l,handleRemove:p,handleOpenDialog:h,handleCloseDialog:_},t[7]=l,t[8]=p,t[9]=a,t[10]=s,t[11]=v):v=t[11],v}function kn(e){return setTimeout(e,300)}var An=e=>{let t=e.subscribers||[];return jt(e.description).forEach(e=>{t.includes(e)||t.push(e)}),e.assignedTo&&(t.includes(e.assignedTo)||t.push(e.assignedTo)),t};function jn(e){let t=(0,Q.c)(67),[n,r]=(0,Z.useState)(!1),{onChange:i}=e,{setViewMode:a,setActiveTab:o}=xt(),s=w(),c=N(),[l,u]=(0,Z.useState)(!1),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>u(Mn),t[0]=d):d=t[0];let f=d,p=e.value,m;t[1]===a?m=t[2]:(m=()=>{a({type:`list`})},t[1]=a,t[2]=m);let h=m,g;t[3]!==h||t[4]!==p._id?(g={id:p._id,onRemoved:h},t[3]=h,t[4]=p._id,t[5]=g):g=t[5];let{handleRemove:_,removeStatus:v}=On(g),{t:y}=U(X),{data:b}=Ot(),x;if(t[6]!==b||t[7]!==p._id){let e;t[9]===p._id?e=t[10]:(e=e=>e._id===p._id,t[9]=p._id,t[10]=e),x=b.find(e),t[6]=b,t[7]=p._id,t[8]=x}else x=t[8];let S=x,C;t[11]!==l||t[12]!==o||t[13]!==a||t[14]!==y||t[15]!==c||t[16]!==s?(C=()=>{c.log(Pt),s.push({closable:!0,status:`success`,title:y(`form.status.success`)}),r(!1),l?a({type:`create`}):o(`subscribed`)},t[11]=l,t[12]=o,t[13]=a,t[14]=y,t[15]=c,t[16]=s,t[17]=C):C=t[17];let T=Ge(C),E;t[18]!==n||t[19]!==T||t[20]!==S?.createdByUser?(E=()=>{n&&S?.createdByUser&&T()},t[18]=n,t[19]=T,t[20]=S?.createdByUser,t[21]=E):E=t[21];let D=S?.createdByUser,O;t[22]!==n||t[23]!==D?(O=[n,D],t[22]=n,t[23]=D,t[24]=O):O=t[24],(0,Z.useEffect)(E,O);let k;t[25]!==y||t[26]!==s?(k=()=>{r(!1),s.push({closable:!0,status:`error`,title:y(`form.status.error.creation-failed`)})},t[25]=y,t[26]=s,t[27]=k):k=t[27];let A=Ge(k),M;t[28]!==n||t[29]!==A?(M=()=>{let e=null;return n&&(e=setTimeout(()=>A(),1e4)),()=>{e&&clearTimeout(e)}},t[28]=n,t[29]=A,t[30]=M):M=t[30];let P;t[
Line truncated
|
||||
// Update spacing for the form builder
|
||||
& > [data-ui='Stack'] {
|
||||
grid-gap: ${He(t.space[4])};
|
||||
}
|
||||
`}),qr=e=>{let t=(0,Q.c)(25),{documentId:n,initialValue:r}=e,[i]=(0,Z.useState)(Yr),a;t[0]===r?a=t[1]:(a=r?{loading:!1,value:r,error:null}:void 0,t[0]=r,t[1]=a);let o;t[2]!==n||t[3]!==a?(o={documentId:n,documentType:`tasks.task`,initialValue:a},t[2]=n,t[3]=a,t[4]=o):o=t[4];let{formState:s,onChange:c,onPathOpen:l,onFocus:u,onBlur:d,onSetActiveFieldGroup:f,onSetCollapsedFieldSet:m,onSetCollapsedPath:h,collapsedFieldSets:g,ready:_,collapsedPaths:v,schemaType:y,value:b}=we(o),x=s===null||!_,{setSelectedDocument:S}=Kt(),C=x?void 0:b?.target,w=C?.document?._ref,T=C?.documentType,E,D;t[5]!==S||t[6]!==w||t[7]!==T?(E=()=>{S(w&&T?{_id:w,_type:T}:null)},D=[w,T,S],t[5]=S,t[6]=w,t[7]=T,t[8]=E,t[9]=D):(E=t[8],D=t[9]),(0,Z.useEffect)(E,D);let O;return t[10]!==g||t[11]!==v||t[12]!==s||t[13]!==x||t[14]!==d||t[15]!==c||t[16]!==u||t[17]!==l||t[18]!==f||t[19]!==m||t[20]!==h||t[21]!==i||t[22]!==y||t[23]!==b?(O=(0,$.jsx)(W,{children:x?(0,$.jsx)(se,{showText:!0}):(0,$.jsx)(Kr,{id:`wrapper`,initial:`hidden`,animate:`visible`,variants:Gr,children:(0,$.jsx)(p,{__internal_patchChannel:i,id:`root`,onChange:c,onPathFocus:u,onPathOpen:l,onPathBlur:d,onFieldGroupSelect:f,onSetFieldSetCollapsed:m,onSetPathCollapsed:h,collapsedPaths:v,collapsedFieldSets:g,focusPath:s.focusPath,changed:s.changed,focused:s.focused,groups:s.groups,validation:s.validation,members:s.members,presence:s.presence,schemaType:y,value:b,hasUpstreamVersion:!1,hasBaseVariant:!1})})}),t[10]=g,t[11]=v,t[12]=s,t[13]=x,t[14]=d,t[15]=c,t[16]=u,t[17]=l,t[18]=f,t[19]=m,t[20]=h,t[21]=i,t[22]=y,t[23]=b,t[24]=O):O=t[24],O};function Jr(){let e=(0,Q.c)(23),t=k(),{activeDocument:n}=Ot(),{dataset:r,projectId:i}=O(),{state:a}=xt(),{selectedTask:o,viewMode:s,duplicateTaskValues:c}=a,l;bb0:{if(!t){l=void 0;break bb0}if(!o){l=void 0;break bb0}if(s===`duplicate`){let n=`${c?.title} (copy)`,r;e[0]!==t.id||e[1]!==c||e[2]!==o||e[3]!==n?(r={...c,title:n,createdByUser:void 0,_id:o,_type:`tasks.task`,authorId:t.id,status:`open`},e[0]=t.id,e[1]=c,e[2]=o,e[3]=n,e[4]=r):r=e[4],l=r;break bb0}if(s===`create`){let a;e[5]===t.id?a=e[6]:(a=[t.id],e[5]=t.id,e[6]=a);let s;e[7]!==n||e[8]!==r||e[9]!==i?(s=n?At({documentId:n.documentId,documentType:n.documentType,dataset:r,projectId:i}):void 0,e[7]=n,e[8]=r,e[9]=i,e[10]=s):s=e[10];let c;e[11]!==t.id||e[12]!==o||e[13]!==a||e[14]!==s?(c={_id:o,_type:`tasks.task`,authorId:t.id,status:`open`,subscribers:a,target:s},e[11]=t.id,e[12]=o,e[13]=a,e[14]=s,e[15]=c):c=e[15],l=c;break bb0}l=void 0}let u=l;if(!t){let t;return e[16]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(se,{showText:!0,title:`Loading current user`}),e[16]=t):t=e[16],t}if(!o)return null;let d=s===`edit`?`edit`:`create`,f;e[17]!==u||e[18]!==o?(f=(0,$.jsx)(qr,{documentId:o,initialValue:u}),e[17]=u,e[18]=o,e[19]=f):f=e[19];let p;return e[20]!==d||e[21]!==f?(p=(0,$.jsx)(Gt,{children:(0,$.jsx)(y,{selectedPerspectiveName:void 0,children:(0,$.jsx)(Wr,{mode:d,children:f})})}),e[20]=d,e[21]=f,e[22]=p):p=e[22],p}function Yr(){return M()}var Xr={open:{assigned:{heading:`empty-state.status.list.open.assigned.heading`,text:`empty-state.status.list.open.assigned.text`},document:{heading:`empty-state.status.list.open.document.heading`,text:``},subscribed:{heading:`empty-state.status.list.open.subscribed.heading`,text:`empty-state.status.list.open.subscribed.text`}},closed:{assigned:{heading:`empty-state.status.list.closed.assigned.heading`,text:`empty-state.status.list.closed.assigned.text`},document:{heading:`empty-state.status.list.closed.document.heading`,text:``},subscribed:{heading:`empty-state.status.list.closed.subscribed.heading`,text:`empty-state.status.list.closed.subscribed.text`}}};function Zr(e){let t=(0,Q.c)(13),{status:n}=e,{state:r}=xt(),{activeTabId:i}=r,{t:a}=U(X),{heading:o,text:s}=Xr[n][i],c;t[0]!==o||t[1]!==a?(c=a(o),t[0]=o,t[1]=a,t[2]=c):c=t[2];let l;t[3]===c?l=t[4]:(l=(0,$.jsx)(Y,{size:1,weight:`semibold`,children:c}),t[3]=c,t[4]=l);let u;t[5]!==a||t[6]!==s?(u=a(s),t[5]=a,t[6]=s,t[7]=u):u=t[7];let d;t[8]===u?d=t[9]:(d=(0,$.jsx)(Y,{size:1,children:u}),t[8]=u,t[9]=d);let f;return t[10]!==l||t[11]!==d?(f=(0,$.jsxs)(Ke,{gap:3,children:[l,d]}),t[10]=l,t[11]=d,t[12]=f):f=t[12],f}var Qr={assigned:{heading:`empty-state.list.assigned.heading`,text:`empty-state.list.assigned.text`},subscribed:{heading:`empty-state.list.subscribed.heading`,text:`empty-state.list.subscribed.text`},document:{heading:`empty-state.list.document.heading`,text:`empty-state.list.document.text`},noActiveDocument:{heading:`empty-state.list.no-active-document.heading`,text:`empty-state.list.no-active-document.text`}},$r=q.div.withConfig({displayName:`Root`,componentId:`sc-5ai503-0`})`max-width:268px;margin:0 auto;height:100%;margin-top:40%;`,ei=q(Y).withConfig({displayName:`AnimatedText`,componentId:`sc-5ai503-1`})`@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}animation:fadeIn 0.2s ease-in-out;`;function ti(){let e=(0,Q.c)(22),{activeDocument:t}=Ot(),{mode:n}=St(),{state:r,setViewMode:i}=xt(),{activeTabId:a}=r,o=!
Line truncated
|
||||
text-decoration: underline;
|
||||
text-decoration-color: ${J(e.theme).color.input.default.enabled.border};
|
||||
text-underline-offset: 2px;
|
||||
`);function ri(e){let t=(0,Q.c)(13),{documentId:n,documentType:r}=e,i=h().get(r),{perspectiveStack:a,selectedVariantName:o}=te(),s;t[0]!==n||t[1]!==r||t[2]!==a||t[3]!==o?(s={documentId:n,documentType:r,perspectiveStack:a,variant:o},t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s):s=t[4];let{isLoading:c,value:l}=Et(s),u;t[5]!==n||t[6]!==r?(u=function(e){let{ref:t,...i}=e;return(0,$.jsx)(ni,{...i,intent:`edit`,params:{id:n,type:r},ref:t})},t[5]=n,t[6]=r,t[7]=u):u=t[7];let d=u;if(!i)return null;let f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(Y,{size:1,children:(0,$.jsx)(st,{})}),t[8]=f):f=t[8];let p;return t[9]!==d||t[10]!==c||t[11]!==l?.title?(p=(0,$.jsxs)(K,{alignItems:`center`,gap:2,children:[f,c?(0,$.jsx)(Ie,{size:1,muted:!0}):(0,$.jsx)(Y,{size:1,as:d,weight:`medium`,style:{maxWidth:`20ch`},textOverflow:`ellipsis`,children:l?.title||`Untitled`})]}),t[9]=d,t[10]=c,t[11]=l?.title,t[12]=p):p=t[12],p}function ii(e){let t=(0,Q.c)(7),n=Dn(),{documentId:r,status:i}=e,[a,o]=(0,Z.useState)(i===`closed`),[s,c]=(0,Z.useState)(!1),l;t[0]!==r||t[1]!==n?(l=async e=>{let t=e.target.checked;o(t),c(!0);try{t?await n.edit(r,{status:`closed`}):t||await n.edit(r,{status:`open`})}catch(e){console.error(`An error occurred while updating the task status`,e)}c(!1)},t[0]=r,t[1]=n,t[2]=l):l=t[2];let u=l,d;return t[3]!==a||t[4]!==u||t[5]!==s?(d=(0,$.jsx)(K,{children:s?(0,$.jsx)(`div`,{style:{height:`17px`,width:`17px`},children:(0,$.jsx)($e,{style:{marginLeft:`3.5px`,marginRight:`3.5px`,marginTop:`3.5px`}})}):(0,$.jsx)(Xe,{onChange:u,checked:a,disabled:s})}),t[3]=a,t[4]=u,t[5]=s,t[6]=d):d=t[6],d}var ai=q(Ye).withConfig({displayName:`TitleButton`,componentId:`sc-r4h1w5-0`})`width:100%;max-width:100%;`,oi=q(K).withConfig({displayName:`TaskDetailsRoot`,componentId:`sc-r4h1w5-1`})`margin-left:29px;`;function si(e){if(e?.document?._ref)return{_ref:e?.document._ref,_type:e?.documentType}}var ci={dateStyle:`medium`,timeZone:`UTC`},li={month:`short`,day:`numeric`,timeZone:`UTC`},ui={weekday:`long`,timeZone:`UTC`};function di(e){let t=(0,Q.c)(24),{dueBy:n}=e,r=o(ci),i=o(li),a=o(ui),s,c,l,u,d;if(t[0]!==a||t[1]!==n||t[2]!==r||t[3]!==i){let e=new Date(n);s=r.format(e),c=i.format(e),l=a.format(e),u=Wt(e),d=Ut(e),t[0]=a,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d}else s=t[4],c=t[5],l=t[6],u=t[7],d=t[8];let f;t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==u||t[13]!==d?(f={fullDate:s,monthAndDay:c,day:l,isDueByToday:u,isDueThisWeek:d},t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=d,t[14]=f):f=t[14];let{fullDate:p,monthAndDay:m,day:h,isDueByToday:g,isDueThisWeek:_}=f,v=g?`critical`:`transparent`,y=g?`Today`:_?h:m,b;t[15]!==n||t[16]!==y?(b=(0,$.jsx)(K,{alignItems:`center`,gap:2,children:(0,$.jsx)(Y,{as:`time`,size:1,dateTime:n,muted:!0,children:y})}),t[15]=n,t[16]=y,t[17]=b):b=t[17];let x;t[18]!==v||t[19]!==b?(x=(0,$.jsx)(qe,{tone:v,padding:1,radius:2,children:b}),t[18]=v,t[19]=b,t[20]=x):x=t[20];let S;return t[21]!==p||t[22]!==x?(S=(0,$.jsx)(be,{content:p,children:x}),t[21]=p,t[22]=x,t[23]=S):S=t[23],S}function fi(e){let t=(0,Q.c)(24),{assignedTo:n,title:r,dueBy:i,target:a,onSelect:o,documentId:s,status:c}=e,l;t[0]===a?l=t[1]:(l=si(a),t[0]=a,t[1]=l);let u=l,d;t[2]!==s||t[3]!==c?(d=(0,$.jsx)(W,{children:(0,$.jsx)(ii,{documentId:s,status:c})}),t[2]=s,t[3]=c,t[4]=d):d=t[4];let f=r||`Untitled`,p;t[5]===f?p=t[6]:(p=(0,$.jsx)(Y,{size:1,textOverflow:`ellipsis`,weight:`semibold`,children:f}),t[5]=f,t[6]=p);let m;t[7]!==o||t[8]!==p?(m=(0,$.jsx)(K,{flexBasis:`0%`,flexGrow:1,children:(0,$.jsx)(ai,{onClick:o,mode:`bleed`,padding:2,children:p})}),t[7]=o,t[8]=p,t[9]=m):m=t[9];let h;t[10]===n?h=t[11]:(h=n?{id:n}:void 0,t[10]=n,t[11]=h);let g;t[12]===h?g=t[13]:(g=(0,$.jsx)(Xt,{user:h,withTooltip:!0}),t[12]=h,t[13]=g);let _;t[14]!==d||t[15]!==m||t[16]!==g?(_=(0,$.jsxs)(K,{alignItems:`center`,gap:1,children:[d,m,g]}),t[14]=d,t[15]=m,t[16]=g,t[17]=_):_=t[17];let v;t[18]!==i||t[19]!==u?(v=(i||u)&&(0,$.jsxs)(oi,{alignItems:`center`,gap:2,paddingX:0,children:[i&&(0,$.jsx)(di,{dueBy:i}),u&&(0,$.jsx)(W,{marginLeft:1,children:(0,$.jsx)(ri,{documentId:u._ref,documentType:u._type})})]}),t[18]=i,t[19]=u,t[20]=v):v=t[20];let y;return t[21]!==_||t[22]!==v?(y=(0,$.jsxs)(Ke,{gap:3,"data-testid":`tasks-list-item`,children:[_,v]}),t[21]=_,t[22]=v,t[23]=y):y=t[23],y}var pi=[],mi=e=>Jt.find(t=>t.value===e)?.title,hi=q(K).withConfig({displayName:`DetailsFlex`,componentId:`sc-sodwgc-0`})`[data-ui='summary-icon']{transition:transform 0.2s;transform:rotate(-90deg);}&[open] [data-ui='summary-icon']{transform:rotate(0);}> summary::-webkit-details-marker{display:none;}`,gi=q(W).withConfig({displayName:`SummaryBox`,componentId:`sc-sodwgc-1`})`list-style:none;`;function _i(e){let t=(0,Q.c)(17),{status:n,tasks:r,onTaskSelect:i}=e,a=n===`open`,o;t[0]===n?o=t[1]:(o=mi(n),t[0]=n,t[1]=o);let s;t[2]===o?s=t[3]:(s=(0,$.jsx)(Y,{size:1,weight:`medium`,muted:!0,children:o}),t[2]=o,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(Y,{muted:!0,size:1,children:(0,$.jsx)(it,{"data-
Line truncated
|
||||
height: 25px;
|
||||
width: 1px;
|
||||
background-color: ${J(e.theme).color.input.default.enabled.border};
|
||||
`);function wi(e){let t=(0,Q.c)(41),{items:n}=e,{state:r,setViewMode:i}=xt(),{selectedTask:a}=r,o,s;if(t[0]!==n||t[1]!==a){o=n.filter(Ti);let e;t[4]===a?e=t[5]:(e=e=>e._id===a,t[4]=a,t[5]=e),s=o.findIndex(e),t[0]=n,t[1]=a,t[2]=o,t[3]=s}else o=t[2],s=t[3];let c=s,l;t[6]!==c||t[7]!==o||t[8]!==i?(l=()=>{let e=c>0?o[c-1]._id:o[o.length-1]._id;i({type:`edit`,id:e})},t[6]=c,t[7]=o,t[8]=i,t[9]=l):l=t[9];let u=l,d;t[10]!==c||t[11]!==o||t[12]!==i?(d=()=>{let e=c<o.length-1?o[c+1]._id:o[0]._id;i({type:`edit`,id:e})},t[10]=c,t[11]=o,t[12]=i,t[13]=d):d=t[13];let f=d,{t:p}=U(X);if(!o.length)return null;let m;t[14]===p?m=t[15]:(m=p(`buttons.previous.tooltip`),t[14]=p,t[15]=m);let h;t[16]===m?h=t[17]:(h={content:m},t[16]=m,t[17]=h);let g;t[18]!==u||t[19]!==h?(g=(0,$.jsx)(G,{tooltipProps:h,mode:`bleed`,icon:lt,onClick:u}),t[18]=u,t[19]=h,t[20]=g):g=t[20];let _;t[21]===p?_=t[22]:(_=p(`panel.navigation.tooltip`),t[21]=p,t[22]=_);let v=c+1,y;t[23]!==o.length||t[24]!==v?(y=(0,$.jsx)(W,{paddingY:2,children:(0,$.jsxs)(Y,{size:1,children:[v,` / `,o.length]})}),t[23]=o.length,t[24]=v,t[25]=y):y=t[25];let b;t[26]!==_||t[27]!==y?(b=(0,$.jsx)(be,{content:_,children:y}),t[26]=_,t[27]=y,t[28]=b):b=t[28];let x;t[29]===p?x=t[30]:(x=p(`buttons.next.tooltip`),t[29]=p,t[30]=x);let S;t[31]===x?S=t[32]:(S={content:x},t[31]=x,t[32]=S);let C;t[33]!==f||t[34]!==S?(C=(0,$.jsx)(G,{tooltipProps:S,mode:`bleed`,icon:ot,onClick:f}),t[33]=f,t[34]=S,t[35]=C):C=t[35];let w;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(Ci,{}),t[36]=w):w=t[36];let T;return t[37]!==C||t[38]!==g||t[39]!==b?(T=(0,$.jsx)(me,{children:(0,$.jsxs)(K,{gap:1,alignItems:`center`,children:[g,b,C,w]})}),t[37]=C,t[38]=g,t[39]=b,t[40]=T):T=t[40],T}function Ti(e){return e.status===`open`}var Ei={constrainSize:!0,fallbackPlacements:[`bottom-end`],placement:`bottom-end`,portal:!0},Di=q(_e).withConfig({displayName:`StyledMenu`,componentId:`sc-w1zuan-0`})`width:220px;`;function Oi(e){let t=(0,Q.c)(8),{isSelected:n,item:r,onSelect:i}=e,a;t[0]!==r._id||t[1]!==i?(a=()=>{i(r._id)},t[0]=r._id,t[1]=i,t[2]=a):a=t[2];let o=a,s=n?at:void 0,c=r.title||`Untitled`,l;return t[3]!==o||t[4]!==s||t[5]!==n||t[6]!==c?(l=(0,$.jsx)(pe,{iconRight:s,onClick:o,pressed:n,selected:n,text:c}),t[3]=o,t[4]=s,t[5]=n,t[6]=c,t[7]=l):l=t[7],l}function ki(){let e=(0,Q.c)(20),{data:t}=Ot(),{state:n,setViewMode:r}=xt(),{viewMode:i,selectedTask:a}=n,o=k(),s=o?.id?t.filter(e=>{let t=e.authorId===o.id,n=!e.createdByUser,r=e._updatedAt!==e._createdAt,s=i!==`create`||e._id!==a;return t&&n&&s&&r}):ae,c;e[0]===r?c=e[1]:(c=e=>{r({type:`draft`,id:e})},e[0]=r,e[1]=c);let l=c,{t:u}=U(X);if(!s.length)return null;let d=ge,f;e[2]===u?f=e[3]:(f=u(`buttons.draft.text`),e[2]=u,e[3]=f);let p;e[4]===f?p=e[5]:(p=(0,$.jsx)(G,{text:f,mode:`ghost`,iconRight:it}),e[4]=f,e[5]=p);let m=Di,h;e[6]===u?h=e[7]:(h=u(`panel.drafts.title`),e[6]=u,e[7]=h);let g;e[8]===h?g=e[9]:(g=(0,$.jsx)(W,{padding:3,children:(0,$.jsx)(Y,{size:1,weight:`semibold`,children:h})}),e[8]=h,e[9]=g);let _;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(he,{}),e[10]=_):_=e[10];let v=s?.map(e=>(0,$.jsx)(Oi,{isSelected:a===e._id,item:e,onSelect:l},e._id)),y;e[11]!==m||e[12]!==g||e[13]!==_||e[14]!==v?(y=(0,$.jsxs)(m,{children:[g,_,v]}),e[11]=m,e[12]=g,e[13]=_,e[14]=v,e[15]=y):y=e[15];let b;return e[16]!==d||e[17]!==p||e[18]!==y?(b=(0,$.jsx)(d,{button:p,id:`edit-task-menu`,menu:y,popover:Ei}),e[16]=d,e[17]=p,e[18]=y,e[19]=b):b=e[19],b}function Ai(e){let t=(0,Q.c)(34),{items:n}=e,{mode:r}=St(),{state:i,setViewMode:a,handleCloseTasks:o}=xt(),{viewMode:s,activeTabId:c}=i,l;t[0]===a?l=t[1]:(l=()=>{a({type:`create`})},t[0]=a,t[1]=l);let u=l,d;t[2]===a?d=t[3]:(d=()=>{a({type:`list`})},t[2]=a,t[3]=d);let f=d,{t:p}=U(X),m;t[4]!==c||t[5]!==f||t[6]!==p||t[7]!==s?(m=(0,$.jsx)(K,{alignItems:`center`,flexBasis:`0%`,flexGrow:1,children:s===`list`?(0,$.jsx)(W,{padding:2,children:(0,$.jsx)(Y,{size:2,weight:`semibold`,children:p(`panel.title`)})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Ye,{mode:`bleed`,gap:2,padding:2,onClick:f,children:(0,$.jsx)(Y,{size:1,children:p(`panel.title`)})}),(0,$.jsx)(ot,{}),(0,$.jsx)(W,{paddingX:2,children:(0,$.jsx)(Y,{size:1,weight:`semibold`,style:{textTransform:`capitalize`},children:s===`create`||s===`draft`?p(`panel.create.title`):c})})]})}),t[4]=c,t[5]=f,t[6]=p,t[7]=s,t[8]=m):m=t[8];let h;t[9]===s?h=t[10]:(h=(s===`create`||s===`draft`)&&(0,$.jsx)(ki,{}),t[9]=s,t[10]=h);let g;t[11]!==n||t[12]!==s?(g=s===`edit`&&(0,$.jsx)(wi,{items:n}),t[11]=n,t[12]=s,t[13]=g):g=t[13];let _;t[14]!==u||t[15]!==r||t[16]!==p||t[17]!==s?(_=s===`list`&&(0,$.jsx)(G,{icon:mt,onClick:u,mode:`bleed`,text:p(`buttons.new.text`),disabled:r===`upsell`,tooltipProps:r===`upsell`?{content:p(`buttons.new.upsell-tooltip`)}:void 0}),t[14]=u,t[15]=r,t[16]=p,t[17]=s,t[18]=_):_=t[18];let v;t[19]===p?v=t[20]:(v=p(`panel.close.tooltip`),t[19]=p,t[20]=v);let y;t[21]===v?y=t[22]:(y={content:v},t[21]=v,t[22]=y);let b;t[23]!==o||t[24]!==y?(b=(0,$.jsx)(G,{tooltipProps:y,iconRight:
Line truncated
|
||||
@@ -0,0 +1,21 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Ad as t,Ar as n,B as r,Ec as i,Hd as a,Hs as o,Ir as s,Ja as c,Jl as l,Kl as u,Ma as d,Md as f,Mo as p,Ms as m,Nd as h,Od as g,Oo as _,Ql as v,Qs as y,Sd as b,Ta as x,Tl as S,Wa as C,Xo as w,Ys as T,Zs as E,_f as D,ad as O,bp as k,ca as A,cc as j,cd as M,da as N,dc as P,ec as F,fa as I,fo as L,ft as R,gf as z,hc as B,ir as V,iu as H,jd as ee,ju as te,ka as ne,kd as re,la as ie,lc as ae,ld as oe,lo as se,nc as ce,nf as le,oc as ue,pc as de,ql as fe,rc as U,sc as pe,sd as me,su as he,uc as ge,va as _e,wa as W,yu as ve,zd as ye}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as be,t as xe}from"./jsx-runtime-BpzPEenQ.js";import{t as Se}from"./compiler-runtime-sKsOXjDo.js";import{a as Ce,i as we,n as Te,r as Ee,t as De}from"./CommentsProvider-DHVaZIPI-DonUdARw.js";import{H as Oe,K as ke,Lt as Ae,Pt as je,ar as Me,cn as Ne,dt as Pe,g as Fe,on as Ie,or as Le,pn as Re,sn as ze,sr as Be,wn as Ve,xt as G,yt as He}from"./types--2f-avvL-DfAXA8nG.js";import{Dt as Ue,E as We,Et as Ge,Ft as Ke,Gt as K,O as qe,P as Je,Qt as q,R as Ye,St as J,Ut as Xe,Zt as Ze,bt as Qe,ct as $e,d as et,et as tt,f as nt,j as rt,m as it,n as at,r as Y,s as ot,t as X,tt as st,yt as ct}from"./dist-LVcARZxB.js";import{o as lt,s as ut}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as dt}from"./Close-B_ZEgT1V.js";import{t as ft}from"./ChevronDown-BpYUc-AP.js";import{t as pt}from"./Checkmark-OT7tsNpL.js";import{t as mt}from"./ChevronRight-Cf6GkXSa.js";import{t as ht}from"./Document-0Zpczu4q.js";import{t as gt}from"./Calendar-DCYqUUNo.js";import{t as _t}from"./ChevronLeft-BzE8YX6u.js";import{t as vt}from"./Trash-BxG6GrjH.js";import{t as yt}from"./Edit-CAHlBqGT.js";import{t as bt}from"./Circle-DkcW-8WT.js";import{t as xt}from"./Copy-BTQgeMVP.js";import{t as St}from"./Link-Cl1VSeDJ.js";import{t as Ct}from"./Add-CwQ5TpM8.js";import{t as wt}from"./CheckmarkCircle-B6SBY4QE.js";import{n as Tt,t as Et}from"./CommentsListItem-B4CoDHda-B92j42qR.js";import{t as Dt}from"./useAddonDataset-BvCgByG6-PgDcQUJg.js";import{n as Ot}from"./helpers-D_aQC6Do-BbFlOJg3.js";import{t as kt}from"./useComments-Bi1m7AzT-CGyuZP86.js";import{UserIcon as At}from"./User-BbvVoXNB.js";import{l as jt,t as Mt}from"./CommentInput-C1kF5k49-kVUiwefG.js";import{n as Nt,t as Pt}from"./CommentsListItem-Dyi91Dx1-CJKLG-KR.js";import{t as Ft}from"./useTasks-I977dBmi-R3bfJHOa.js";import{n as It,r as Lt,t as Rt}from"./utils-1iCQse9Y-DVUANiML.js";import{a as zt,c as Bt,i as Vt,l as Ht,n as Ut,r as Wt,t as Gt}from"./types-B8Ny1dM--Dcnenz2x.js";var Z=e(be(),1),Q=Se(),$=xe();function Kt(e){return he(e,Date.now())}function qt(e,t,n){let[r,i]=v(n?.in,e,t);return+H(r,n)==+H(i,n)}function Jt(e,t,n){return qt(e,t,{...n,weekStartsOn:1})}function Yt(e,t){return Jt(he(t?.in||e,e),Kt(t?.in||e))}function Xt(e,t){return se(he(t?.in||e,e),Kt(t?.in||e))}function Zt(e){let t=(0,Q.c)(8),[n,r]=(0,Z.useState)(null),i;t[0]===n?i=t[1]:(i={documentValue:n,permission:`read`},t[0]=n,t[1]=i);let a=Ee(i),o;t[2]!==a||t[3]!==n?(o={mentionOptions:a,selectedDocument:n,setSelectedDocument:r},t[2]=a,t[3]=n,t[4]=o):o=t[4];let s=o,c;return t[5]!==e.children||t[6]!==s?(c=(0,$.jsx)(k.Provider,{value:s,children:e.children}),t[5]=e.children,t[6]=s,t[7]=c):c=t[7],c}function Qt(){let e=(0,Z.useContext)(k);if(!e)throw Error(`useMentionUser must be used within a MentionUserProvider`);return e}var $t=g.apiVersion,en=[{value:`open`,title:`To Do`,icon:(0,$.jsx)(bt,{})},{value:`closed`,title:`Done`,icon:(0,$.jsx)(wt,{})}],tn=K.div.withConfig({displayName:`AvatarRoot`,componentId:`sc-ztexr-0`})(e=>{let t=q(e.theme);return Xe`min-height:${t.avatar.sizes[e.$size]?.size}px;min-width:${t.avatar.sizes[e.$size]?.size}px;display:flex;align-items:center;justify-content:center;border-radius:50%;${e.$border?`box-shadow: inset 0 0 0 1px var(--card-border-color);`:``};${e.$removeBg?`--card-avatar-gray-bg-color: transparent;`:``}`});function nn(e){let t=(0,Q.c)(27),{user:n,size:r,border:i}=e,a=r===void 0?0:r,o=i===void 0||i,[s,c]=y(n?.id||``);if(c){let e;return t[0]===a?e=t[1]:(e=(0,$.jsx)(_,{$size:a,animated:!0}),t[0]=a,t[1]=e),e}if(!n||!s){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(At,{}),t[2]=e):e=t[2];let n;t[3]===a?n=t[4]:(n=(0,$.jsx)(J,{size:a,children:e}),t[3]=a,t[4]=n);let r;return t[5]!==o||t[6]!==a||t[7]!==n?(r=(0,$.jsx)(tn,{$size:a,$border:o,children:n}),t[5]=o,t[6]=a,t[7]=n,t[8]=r):r=t[8],r}let l=!e.withTooltip,u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`top`,`top-start`],t[9]=u):u=t[9];let d=!!s?.imageUrl,f;t[10]===s.imageUrl?f=t[11]:(f=s?.imageUrl?{color:void 0}:{},t[10]=s.imageUrl,t[11]=f);let m;t[12]===e.withTooltip?m=t[13]:(m=e.withTooltip?{title:null}:{},t[12]=e.withTooltip,t[13]=m);let h;t[14]!==s||t[15]!==a||t[16]!==f||t[17]!==m?(h=(0,$.jsx)(p,{user:s,size:a,...f,...m}),t[14]=s,t[15]=a,t[16]=f,t[17]=m,t[18]=h):h=t[18];let g;t[19]!==a||t[20]!==d||t[21]!==h?(g=(0,$.jsx)(tn,{$size:a,$removeBg:d,children:h}),t[19]=a,t[20]=d,t[21]=h,t[22]=gLine truncated
|
||||
color: ${q(e.theme).color.input.default.enabled.placeholder};
|
||||
margin-left: 3px;
|
||||
`),Tn=K(Ge).withConfig({displayName:`TargetRoot`,componentId:`sc-sitbkz-2`})`position:relative;[data-ui='show-on-hover']{opacity:0;position:absolute;right:6px;top:4px;display:flex;}&:focus-within,&:hover{padding-right:36px;[data-testid='compact-preview__status']{opacity:0;}[data-ui='show-on-hover']{transition:opacity 200ms;opacity:1;}}`,En=K(n).withConfig({displayName:`StyledIntentLink`,componentId:`sc-sitbkz-3`})(()=>Xe`text-decoration:none;width:100%;overflow:hidden;cursor:pointer;&:focus{box-shadow:0 0 0 1px var(--card-focus-ring-color);}&:focus-visible{outline:none;box-shadow:0 0 0 1px var(--card-focus-ring-color);}`);function Dn(e){let t=(0,Q.c)(28),{value:n,handleRemove:r}=e,i=n.document._ref,a=n.documentType,o=S(),s;t[0]!==o||t[1]!==n.documentType?(s=o.get(n.documentType),t[0]=o,t[1]=n.documentType,t[2]=s):s=t[2];let c=s,l=V(i),{t:u}=b(G),d;t[3]!==i||t[4]!==a?(d=function(e){let{ref:t,...n}=e,r=ut(i);return(0,$.jsx)(En,{...n,intent:`edit`,params:{id:lt(i),type:a},ref:t,searchParams:r?[[`perspective`,r]]:void 0})},t[3]=i,t[4]=a,t[5]=d):d=t[5];let f=d;if(!c){let e;t[6]===u?e=t[7]:(e=u(`form.input.target.error.schema-not-found`),t[6]=u,t[7]=e);let n;return t[8]===e?n=t[9]:(n=(0,$.jsx)(J,{children:e}),t[8]=e,t[9]=n),n}let p;t[10]!==l||t[11]!==a||t[12]!==c||t[13]!==n.document._ref?(p=(0,$.jsx)(Be,{documentType:a,documentId:n.document._ref,layout:`compact`,presence:l,schemaType:c,showBadge:!1}),t[10]=l,t[11]=a,t[12]=c,t[13]=n.document._ref,t[14]=p):p=t[14];let m;t[15]!==f||t[16]!==p?(m=(0,$.jsx)(Ge,{as:f,radius:2,"data-as":`button`,children:p}),t[15]=f,t[16]=p,t[17]=m):m=t[17];let h;t[18]===u?h=t[19]:(h=u(`form.input.target.buttons.remove.text`),t[18]=u,t[19]=h);let g;t[20]===h?g=t[21]:(g={content:h},t[20]=h,t[21]=g);let _;t[22]!==r||t[23]!==g?(_=(0,$.jsx)(`div`,{"data-ui":`show-on-hover`,children:(0,$.jsx)(U,{icon:dt,mode:`bleed`,onClick:r,tooltipProps:g})}),t[22]=r,t[23]=g,t[24]=_):_=t[24];let v;return t[25]!==m||t[26]!==_?(v=(0,$.jsx)(Tn,{border:!0,radius:2,"data-testid":`task-target-field-preview`,children:(0,$.jsxs)(Y,{gap:1,alignItems:`center`,justifyContent:`space-between`,children:[m,_]})}),t[25]=m,t[26]=_,t[27]=v):v=t[27],v}function On(e){let t=(0,Q.c)(32),[n,r]=(0,Z.useState)(!1),{dataset:i,projectId:a}=h(),{mode:o,inputProps:s,value:c}=e,{onChange:l}=s,u=c,f;t[0]!==i||t[1]!==l||t[2]!==a?(f=e=>{l(W(Lt({documentId:e._id,documentType:e._type,dataset:i,projectId:a})))},t[0]=i,t[1]=l,t[2]=a,t[3]=f):f=t[3];let p=f,m;t[4]===l?m=t[5]:(m=()=>{l(x())},t[4]=l,t[5]=m);let g=m,_;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{r(!0)},t[6]=_):_=t[6];let v=_,y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{r(!1)},t[7]=y):y=t[7];let S=y,C;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{(e.key===`Enter`||e.key===` `)&&r(!0)},t[8]=C):C=t[8];let w=C,{t:T}=b(G),E=o===`edit`,D=o===`edit`?4:0,O;t[9]!==o||t[10]!==e.description||t[11]!==e.inputId||t[12]!==e.title||t[13]!==e.validation?(O=o===`create`&&(0,$.jsx)(X,{"data-ui":`fieldHeaderContentBox`,children:(0,$.jsx)(d,{description:e.description,inputId:e.inputId,title:e.title,validation:e.validation,deprecated:void 0})}),t[9]=o,t[10]=e.description,t[11]=e.inputId,t[12]=e.title,t[13]=e.validation,t[14]=O):O=t[14];let k;t[15]!==g||t[16]!==T||t[17]!==u?(k=u?(0,$.jsx)(Dn,{value:u,handleRemove:g}):(0,$.jsx)(Cn,{border:!0,radius:2,paddingX:2,paddingY:3,onClick:v,onKeyDown:w,tabIndex:0,children:(0,$.jsxs)(Y,{gap:1,justifyContent:`flex-start`,alignItems:`center`,children:[(0,$.jsx)(X,{paddingX:1,children:(0,$.jsx)(J,{size:1,children:(0,$.jsx)(ht,{})})}),(0,$.jsx)(wn,{size:1,children:T(`form.input.target.search.placeholder`)})]})}),t[15]=g,t[16]=T,t[17]=u,t[18]=k):k=t[18];let A;t[19]!==O||t[20]!==k?(A=(0,$.jsxs)(ot,{gap:2,children:[O,k]}),t[19]=O,t[20]=k,t[21]=A):A=t[21];let j;t[22]!==p||t[23]!==n?(j=(0,$.jsx)(Me,{open:n,onClose:S,onItemSelect:p,disableIntentLink:!0}),t[22]=p,t[23]=n,t[24]=j):j=t[24];let M;t[25]!==A||t[26]!==j?(M=(0,$.jsx)(yn,{children:(0,$.jsx)(Ue,{zOffset:100,children:(0,$.jsx)(Sn,{children:(0,$.jsxs)(Le,{children:[A,j]})})})}),t[25]=A,t[26]=j,t[27]=M):M=t[27];let N;return t[28]!==M||t[29]!==E||t[30]!==D?(N=(0,$.jsx)(Ge,{borderBottom:E,paddingBottom:D,children:M}),t[28]=M,t[29]=E,t[30]=D,t[31]=N):N=t[31],N}var kn=K.div.withConfig({displayName:`Root`,componentId:`sc-e1xmtd-0`})(e=>`
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
padding-top: ${q(e.theme).space[3]}px;
|
||||
`),An=K.textarea.withConfig({displayName:`TitleInput`,componentId:`sc-e1xmtd-1`})(e=>{let{color:t,font:n}=q(e.theme);return Xe`resize:none;overflow:hidden;appearance:none;background:none;border:0;padding:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;font-family:${n.text.family};font-weight:${n.text.weights.semibold};font-size:${n.text.sizes[3].fontSize}px;line-height:${n.text.sizes[3].lineHeight}px;margin:0;position:relative;z-index:1;display:block;transition:height 500ms;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}color:${t.input.default.enabled.fg};&::placeholder{color:${t.input.default.enabled.placeholder};}`});function jn(e){let t=(0,Q.c)(11),{value:n,onChange:r,placeholder:i,path:a}=e,o=(0,Z.useRef)(null),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o.current&&(o.current.style.height=`auto`,o.current.style.height=`${o.current.scrollHeight}px`)},t[0]=s):s=t[0];let c;t[1]===n?c=t[2]:(c=[n],t[1]=n,t[2]=c),(0,Z.useEffect)(s,c);let l;t[3]!==r||t[4]!==a?(l=e=>{let t=e.currentTarget.value;return t||r(x(a)),r(W(t.replace(/\n/g,``),a))},t[3]=r,t[4]=a,t[5]=l):l=t[5];let u=l,d=!n,f;return t[6]!==u||t[7]!==i||t[8]!==d||t[9]!==n?(f=(0,$.jsx)(kn,{children:(0,$.jsx)(An,{ref:o,autoFocus:d,value:n,placeholder:i,onChange:u,rows:1})}),t[6]=u,t[7]=i,t[8]=d,t[9]=n,t[10]=f):f=t[10],f}function Mn(e){let t=(0,Q.c)(4),{value:n,inputProps:r}=e,{onChange:i,schemaType:a}=r,o;return t[0]!==i||t[1]!==a.placeholder||t[2]!==n?(o=(0,$.jsx)(jn,{value:n,onChange:i,placeholder:a.placeholder}),t[0]=i,t[1]=a.placeholder,t[2]=n,t[3]=o):o=t[3],o}function Nn(){let e=(0,Q.c)(12),{client:t,createAddonDataset:n}=Dt(),r=E(),i;e[0]!==t||e[1]!==n||e[2]!==r?(i=async e=>{if(!r)throw Error(`No current user found. Unable to create task.`);let i={...e,authorId:r.id,_type:`tasks.task`};if(!t){let e=await n();if(!e)throw Error(`No addon client found. Unable to create task.`);return await e.create(i)}return await t.create(i)},e[0]=t,e[1]=n,e[2]=r,e[3]=i):i=e[3];let a=i,o;e[4]===t?o=e[5]:(o=async(e,n)=>{if(!t)throw Error(`No client. Unable to create task.`);return await t.patch(e).set(n).commit()},e[4]=t,e[5]=o);let s=o,c;e[6]===t?c=e[7]:(c=async e=>{if(!t)throw Error(`No client. Unable to create task.`);await t.delete(e)},e[6]=t,e[7]=c);let l=c,u;return e[8]!==a||e[9]!==s||e[10]!==l?(u={create:a,edit:s,remove:l},e[8]=a,e[9]=s,e[10]=l,e[11]=u):u=e[11],u}function Pn(e){let t=(0,Q.c)(12),{id:n,onError:r,onRemoved:i}=e,[a,o]=(0,Z.useState)(`idle`),[s,c]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(null),d=Nn(),f;t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==d?(f=async()=>{let e=async()=>{o(`loading`),await d.remove(n),i?.(),o(`idle`),await new Promise(Fn),c(!1)};try{await e()}catch(e){let t=e;r?.(t.message),u(t.message),o(`error`)}o(`idle`)},t[0]=n,t[1]=r,t[2]=i,t[3]=d,t[4]=f):f=t[4];let p=f,m;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>{c(!0)},t[5]=m):m=t[5];let h=m,g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{c(!1)},t[6]=g):g=t[6];let _=g,v;return t[7]!==l||t[8]!==p||t[9]!==a||t[10]!==s?(v={removeStatus:a,showDialog:s,error:l,handleRemove:p,handleOpenDialog:h,handleCloseDialog:_},t[7]=l,t[8]=p,t[9]=a,t[10]=s,t[11]=v):v=t[11],v}function Fn(e){return setTimeout(e,300)}var In=e=>{let t=e.subscribers||[];return Rt(e.description).forEach(e=>{t.includes(e)||t.push(e)}),e.assignedTo&&(t.includes(e.assignedTo)||t.push(e.assignedTo)),t};function Ln(e){let t=(0,Q.c)(67),[n,r]=(0,Z.useState)(!1),{onChange:i}=e,{setViewMode:a,setActiveTab:o}=ze(),s=me(),c=O(),[l,u]=(0,Z.useState)(!1),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>u(Rn),t[0]=d):d=t[0];let f=d,p=e.value,m;t[1]===a?m=t[2]:(m=()=>{a({type:`list`})},t[1]=a,t[2]=m);let h=m,g;t[3]!==h||t[4]!==p._id?(g={id:p._id,onRemoved:h},t[3]=h,t[4]=p._id,t[5]=g):g=t[5];let{handleRemove:_,removeStatus:v}=Pn(g),{t:y}=b(G),{data:x}=Ft(),S;if(t[6]!==x||t[7]!==p._id){let e;t[9]===p._id?e=t[10]:(e=e=>e._id===p._id,t[9]=p._id,t[10]=e),S=x.find(e),t[6]=x,t[7]=p._id,t[8]=S}else S=t[8];let C=S,w;t[11]!==l||t[12]!==o||t[13]!==a||t[14]!==y||t[15]!==c||t[16]!==s?(w=()=>{c.log(Vt),s.push({closable:!0,status:`success`,title:y(`form.status.success`)}),r(!1),l?a({type:`create`}):o(`subscribed`)},t[11]=l,t[12]=o,t[13]=a,t[14]=y,t[15]=c,t[16]=s,t[17]=w):w=t[17];let T=st(w),E;t[18]!==n||t[19]!==T||t[20]!==C?.createdByUser?(E=()=>{n&&C?.createdByUser&&T()},t[18]=n,t[19]=T,t[20]=C?.createdByUser,t[21]=E):E=t[21];let D=C?.createdByUser,k;t[22]!==n||t[23]!==D?(k=[n,D],t[22]=n,t[23]=D,t[24]=k):k=t[24],(0,Z.useEffect)(E,k);let A;t[25]!==y||t[26]!==s?(A=()=>{r(!1),s.push({closable:!0,status:`error`,title:y(`form.status.error.creation-failed`)})},t[25]=y,t[26]=s,t[27]=A):A=t[27];let j=st(A),M;t[28]!==n||t[29]!==j?(M=()=>{let e=null;return n&&(e=setTimeout(()=>j(),1e4)),()=>{e&&clearTimeout(e)}},t[28]=n,t[29]=j,t[30]=M):M=t[30];let N;t[
Line truncated
|
||||
// Update spacing for the form builder
|
||||
& > [data-ui='VStack'] {
|
||||
grid-gap: ${Ze(t.space[4])};
|
||||
}
|
||||
`}),ui=e=>{let t=(0,Q.c)(25),{documentId:n,initialValue:r}=e,[i]=(0,Z.useState)(fi),a;t[0]===r?a=t[1]:(a=r?{loading:!1,value:r,error:null}:void 0,t[0]=r,t[1]=a);let o;t[2]!==n||t[3]!==a?(o={documentId:n,documentType:`tasks.task`,initialValue:a},t[2]=n,t[3]=a,t[4]=o):o=t[4];let{formState:s,onChange:c,onPathOpen:l,onFocus:u,onBlur:d,onSetActiveFieldGroup:f,onSetCollapsedFieldSet:p,onSetCollapsedPath:m,collapsedFieldSets:h,ready:g,collapsedPaths:_,schemaType:v,value:y}=je(o),b=s===null||!g,{setSelectedDocument:x}=Qt(),S=b?void 0:y?.target,C=S?.document?._ref,w=S?.documentType,E,D;t[5]!==x||t[6]!==C||t[7]!==w?(E=()=>{x(C&&w?{_id:C,_type:w}:null)},D=[C,w,x],t[5]=x,t[6]=C,t[7]=w,t[8]=E,t[9]=D):(E=t[8],D=t[9]),(0,Z.useEffect)(E,D);let O;return t[10]!==h||t[11]!==_||t[12]!==s||t[13]!==b||t[14]!==d||t[15]!==c||t[16]!==u||t[17]!==l||t[18]!==f||t[19]!==p||t[20]!==m||t[21]!==i||t[22]!==v||t[23]!==y?(O=(0,$.jsx)(X,{children:b?(0,$.jsx)(T,{showText:!0}):(0,$.jsx)(li,{id:`wrapper`,initial:`hidden`,animate:`visible`,variants:ci,children:(0,$.jsx)(we,{__internal_patchChannel:i,id:`root`,onChange:c,onPathFocus:u,onPathOpen:l,onPathBlur:d,onFieldGroupSelect:f,onSetFieldSetCollapsed:p,onSetPathCollapsed:m,collapsedPaths:_,collapsedFieldSets:h,focusPath:s.focusPath,changed:s.changed,focused:s.focused,groups:s.groups,validation:s.validation,members:s.members,presence:s.presence,schemaType:v,value:y,hasUpstreamVersion:!1,hasBaseVariant:!1})})}),t[10]=h,t[11]=_,t[12]=s,t[13]=b,t[14]=d,t[15]=c,t[16]=u,t[17]=l,t[18]=f,t[19]=p,t[20]=m,t[21]=i,t[22]=v,t[23]=y,t[24]=O):O=t[24],O};function di(){let e=(0,Q.c)(23),t=E(),{activeDocument:n}=Ft(),{dataset:i,projectId:a}=h(),{state:o}=ze(),{selectedTask:s,viewMode:c,duplicateTaskValues:l}=o,u;bb0:{if(!t){u=void 0;break bb0}if(!s){u=void 0;break bb0}if(c===`duplicate`){let n=`${l?.title} (copy)`,r;e[0]!==t.id||e[1]!==l||e[2]!==s||e[3]!==n?(r={...l,title:n,createdByUser:void 0,_id:s,_type:`tasks.task`,authorId:t.id,status:`open`},e[0]=t.id,e[1]=l,e[2]=s,e[3]=n,e[4]=r):r=e[4],u=r;break bb0}if(c===`create`){let r;e[5]===t.id?r=e[6]:(r=[t.id],e[5]=t.id,e[6]=r);let o;e[7]!==n||e[8]!==i||e[9]!==a?(o=n?Lt({documentId:n.documentId,documentType:n.documentType,dataset:i,projectId:a}):void 0,e[7]=n,e[8]=i,e[9]=a,e[10]=o):o=e[10];let c;e[11]!==t.id||e[12]!==s||e[13]!==r||e[14]!==o?(c={_id:s,_type:`tasks.task`,authorId:t.id,status:`open`,subscribers:r,target:o},e[11]=t.id,e[12]=s,e[13]=r,e[14]=o,e[15]=c):c=e[15],u=c;break bb0}u=void 0}let d=u;if(!t){let t;return e[16]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(T,{showText:!0,title:`Loading current user`}),e[16]=t):t=e[16],t}if(!s)return null;let f=c===`edit`?`edit`:`create`,p;e[17]!==d||e[18]!==s?(p=(0,$.jsx)(ui,{documentId:s,initialValue:d}),e[17]=d,e[18]=s,e[19]=p):p=e[19];let m;return e[20]!==f||e[21]!==p?(m=(0,$.jsx)(Zt,{children:(0,$.jsx)(r,{selectedPerspectiveName:void 0,children:(0,$.jsx)(si,{mode:f,children:p})})}),e[20]=f,e[21]=p,e[22]=m):m=e[22],m}function fi(){return R()}var pi=`_176rzww2`,mi=`_176rzww0`,hi={open:{assigned:{heading:`empty-state.status.list.open.assigned.heading`,text:`empty-state.status.list.open.assigned.text`},document:{heading:`empty-state.status.list.open.document.heading`,text:``},subscribed:{heading:`empty-state.status.list.open.subscribed.heading`,text:`empty-state.status.list.open.subscribed.text`}},closed:{assigned:{heading:`empty-state.status.list.closed.assigned.heading`,text:`empty-state.status.list.closed.assigned.text`},document:{heading:`empty-state.status.list.closed.document.heading`,text:``},subscribed:{heading:`empty-state.status.list.closed.subscribed.heading`,text:`empty-state.status.list.closed.subscribed.text`}}};function gi(e){let t=(0,Q.c)(13),{status:n}=e,{state:r}=ze(),{activeTabId:i}=r,{t:a}=b(G),{heading:o,text:s}=hi[n][i],c;t[0]!==o||t[1]!==a?(c=a(o),t[0]=o,t[1]=a,t[2]=c):c=t[2];let l;t[3]===c?l=t[4]:(l=(0,$.jsx)(J,{size:1,weight:`semibold`,children:c}),t[3]=c,t[4]=l);let u;t[5]!==a||t[6]!==s?(u=a(s),t[5]=a,t[6]=s,t[7]=u):u=t[7];let d;t[8]===u?d=t[9]:(d=(0,$.jsx)(J,{size:1,children:u}),t[8]=u,t[9]=d);let f;return t[10]!==l||t[11]!==d?(f=(0,$.jsxs)(ot,{gap:3,children:[l,d]}),t[10]=l,t[11]=d,t[12]=f):f=t[12],f}var _i={assigned:{heading:`empty-state.list.assigned.heading`,text:`empty-state.list.assigned.text`},subscribed:{heading:`empty-state.list.subscribed.heading`,text:`empty-state.list.subscribed.text`},document:{heading:`empty-state.list.document.heading`,text:`empty-state.list.document.text`},noActiveDocument:{heading:`empty-state.list.no-active-document.heading`,text:`empty-state.list.no-active-document.text`}};function vi(){let e=(0,Q.c)(22),{activeDocument:t}=Ft(),{mode:n}=Ie(),{state:r,setViewMode:i}=ze(),{activeTabId:a}=r,o=!t&&a===`document`?`noActiveDocument`:a,{heading:s,text:c}=_i[o],{t:l}=b(G),u;e[0]===i?u=e[1]:(u=()=>{i({type:`create`})},e[0]=i,e[1]=u);let d=u,f;e[2]!==s||e[3]!==l?(f=l(s),e[2]=s,e[3]=l,e[4]=f):f=e[4];let p;e[5]!==o||e[6]!==f?(p=(0,$.jsx)(J,{className:pi,si
Line truncated
|
||||
text-decoration: underline;
|
||||
text-decoration-color: ${q(e.theme).color.input.default.enabled.border};
|
||||
text-underline-offset: 2px;
|
||||
`);function bi(e){let t=(0,Q.c)(15),{documentId:n,documentType:r}=e,i=S().get(r),{perspectiveStack:a,selectedVariantNames:o}=m(),s;t[0]===o?s=t[1]:(s=w(o),t[0]=o,t[1]=s);let c=s,l;t[2]!==n||t[3]!==r||t[4]!==a||t[5]!==c?(l={documentId:n,documentType:r,perspectiveStack:a,variant:c},t[2]=n,t[3]=r,t[4]=a,t[5]=c,t[6]=l):l=t[6];let{isLoading:u,value:d}=Ae(l),f;t[7]!==n||t[8]!==r?(f=function(e){let{ref:t,...i}=e;return(0,$.jsx)(yi,{...i,intent:`edit`,params:{id:n,type:r},ref:t})},t[7]=n,t[8]=r,t[9]=f):f=t[9];let p=f;if(!i)return null;let h;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(J,{size:1,children:(0,$.jsx)(ht,{})}),t[10]=h):h=t[10];let g;return t[11]!==p||t[12]!==u||t[13]!==d?.title?(g=(0,$.jsxs)(Y,{alignItems:`center`,gap:2,children:[h,u?(0,$.jsx)(rt,{size:1,muted:!0}):(0,$.jsx)(J,{size:1,as:p,weight:`medium`,style:{maxWidth:`20ch`},textOverflow:`ellipsis`,children:d?.title||`Untitled`})]}),t[11]=p,t[12]=u,t[13]=d?.title,t[14]=g):g=t[14],g}var xi=`_1h4zclm0`;function Si(e){let t=(0,Q.c)(7),n=Nn(),{documentId:r,status:i}=e,[a,o]=(0,Z.useState)(i===`closed`),[s,c]=(0,Z.useState)(!1),l;t[0]!==r||t[1]!==n?(l=async e=>{let t=e.target.checked;o(t),c(!0);try{t?await n.edit(r,{status:`closed`}):t||await n.edit(r,{status:`open`})}catch(e){console.error(`An error occurred while updating the task status`,e)}c(!1)},t[0]=r,t[1]=n,t[2]=l):l=t[2];let u=l,d;return t[3]!==a||t[4]!==u||t[5]!==s?(d=(0,$.jsx)(Y,{children:s?(0,$.jsx)(`div`,{style:{height:`17px`,width:`17px`},children:(0,$.jsx)(Qe,{style:{marginLeft:`3.5px`,marginRight:`3.5px`,marginTop:`3.5px`}})}):(0,$.jsx)(it,{onChange:u,checked:a,disabled:s})}),t[3]=a,t[4]=u,t[5]=s,t[6]=d):d=t[6],d}function Ci(e){if(e?.document?._ref)return{_ref:e?.document._ref,_type:e?.documentType}}var wi={dateStyle:`medium`,timeZone:`UTC`},Ti={month:`short`,day:`numeric`,timeZone:`UTC`},Ei={weekday:`long`,timeZone:`UTC`};function Di(e){let t=(0,Q.c)(24),{dueBy:n}=e,r=ie(wi),i=ie(Ti),a=ie(Ei),o,s,c,l,u;if(t[0]!==a||t[1]!==n||t[2]!==r||t[3]!==i){let e=new Date(n);o=r.format(e),s=i.format(e),c=a.format(e),l=Xt(e),u=Yt(e),t[0]=a,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u}else o=t[4],s=t[5],c=t[6],l=t[7],u=t[8];let d;t[9]!==o||t[10]!==s||t[11]!==c||t[12]!==l||t[13]!==u?(d={fullDate:o,monthAndDay:s,day:c,isDueByToday:l,isDueThisWeek:u},t[9]=o,t[10]=s,t[11]=c,t[12]=l,t[13]=u,t[14]=d):d=t[14];let{fullDate:f,monthAndDay:p,day:m,isDueByToday:h,isDueThisWeek:g}=d,_=h?`critical`:`transparent`,v=h?`Today`:g?m:p,y;t[15]!==n||t[16]!==v?(y=(0,$.jsx)(Y,{alignItems:`center`,gap:2,children:(0,$.jsx)(J,{as:`time`,size:1,dateTime:n,muted:!0,children:v})}),t[15]=n,t[16]=v,t[17]=y):y=t[17];let b;t[18]!==_||t[19]!==y?(b=(0,$.jsx)(Ge,{tone:_,padding:1,radius:2,children:y}),t[18]=_,t[19]=y,t[20]=b):b=t[20];let x;return t[21]!==f||t[22]!==b?(x=(0,$.jsx)(ae,{content:f,children:b}),t[21]=f,t[22]=b,t[23]=x):x=t[23],x}function Oi(e){let t=(0,Q.c)(24),{assignedTo:n,title:r,dueBy:i,target:a,onSelect:o,documentId:s,status:c}=e,l;t[0]===a?l=t[1]:(l=Ci(a),t[0]=a,t[1]=l);let u=l,d;t[2]!==s||t[3]!==c?(d=(0,$.jsx)(X,{children:(0,$.jsx)(Si,{documentId:s,status:c})}),t[2]=s,t[3]=c,t[4]=d):d=t[4];let f=r||`Untitled`,p;t[5]===f?p=t[6]:(p=(0,$.jsx)(J,{size:1,textOverflow:`ellipsis`,weight:`semibold`,children:f}),t[5]=f,t[6]=p);let m;t[7]!==o||t[8]!==p?(m=(0,$.jsx)(Y,{flexBasis:`0%`,flexGrow:1,children:(0,$.jsx)(ct,{className:xi,onClick:o,mode:`bleed`,padding:2,children:p})}),t[7]=o,t[8]=p,t[9]=m):m=t[9];let h;t[10]===n?h=t[11]:(h=n?{id:n}:void 0,t[10]=n,t[11]=h);let g;t[12]===h?g=t[13]:(g=(0,$.jsx)(nn,{user:h,withTooltip:!0}),t[12]=h,t[13]=g);let _;t[14]!==d||t[15]!==m||t[16]!==g?(_=(0,$.jsxs)(Y,{alignItems:`center`,gap:1,children:[d,m,g]}),t[14]=d,t[15]=m,t[16]=g,t[17]=_):_=t[17];let v;t[18]!==i||t[19]!==u?(v=(i||u)&&(0,$.jsxs)(Y,{className:`_1h4zclm1`,alignItems:`center`,gap:2,paddingX:0,children:[i&&(0,$.jsx)(Di,{dueBy:i}),u&&(0,$.jsx)(X,{marginLeft:1,children:(0,$.jsx)(bi,{documentId:u._ref,documentType:u._type})})]}),t[18]=i,t[19]=u,t[20]=v):v=t[20];let y;return t[21]!==_||t[22]!==v?(y=(0,$.jsxs)(ot,{gap:3,"data-testid":`tasks-list-item`,children:[_,v]}),t[21]=_,t[22]=v,t[23]=y):y=t[23],y}var ki=[],Ai=e=>en.find(t=>t.value===e)?.title,ji=K(Y).withConfig({displayName:`DetailsFlex`,componentId:`sc-rx27fh-0`})`[data-ui='summary-icon']{transition:transform 0.2s;transform:rotate(-90deg);}&[open] [data-ui='summary-icon']{transform:rotate(0);}> summary::-webkit-details-marker{display:none;}`,Mi=K(X).withConfig({displayName:`SummaryBox`,componentId:`sc-rx27fh-1`})`list-style:none;`;function Ni(e){let t=(0,Q.c)(17),{status:n,tasks:r,onTaskSelect:i}=e,a=n===`open`,o;t[0]===n?o=t[1]:(o=Ai(n),t[0]=n,t[1]=o);let s;t[2]===o?s=t[3]:(s=(0,$.jsx)(J,{size:1,weight:`medium`,muted:!0,children:o}),t[2]=o,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(J,{muted:!0,size:1,children:(0,$.jsx)(ft,{"data-ui":`summary-icon`})}),t[4]=c):c=t[4];let l;t[5]===s?l=t[6]:(l=(0,$.jsx)(Mi,{forwardedAs:`summLine truncated
|
||||
height: 25px;
|
||||
width: 1px;
|
||||
background-color: ${q(e.theme).color.input.default.enabled.border};
|
||||
`);function Ui(e){let t=(0,Q.c)(41),{items:n}=e,{state:r,setViewMode:i}=ze(),{selectedTask:a}=r,o,s;if(t[0]!==n||t[1]!==a){o=n.filter(Wi);let e;t[4]===a?e=t[5]:(e=e=>e._id===a,t[4]=a,t[5]=e),s=o.findIndex(e),t[0]=n,t[1]=a,t[2]=o,t[3]=s}else o=t[2],s=t[3];let c=s,l;t[6]!==c||t[7]!==o||t[8]!==i?(l=()=>{let e=c>0?o[c-1]._id:o[o.length-1]._id;i({type:`edit`,id:e})},t[6]=c,t[7]=o,t[8]=i,t[9]=l):l=t[9];let u=l,d;t[10]!==c||t[11]!==o||t[12]!==i?(d=()=>{let e=c<o.length-1?o[c+1]._id:o[0]._id;i({type:`edit`,id:e})},t[10]=c,t[11]=o,t[12]=i,t[13]=d):d=t[13];let f=d,{t:p}=b(G);if(!o.length)return null;let m;t[14]===p?m=t[15]:(m=p(`buttons.previous.tooltip`),t[14]=p,t[15]=m);let h;t[16]===m?h=t[17]:(h={content:m},t[16]=m,t[17]=h);let g;t[18]!==u||t[19]!==h?(g=(0,$.jsx)(U,{tooltipProps:h,mode:`bleed`,icon:_t,onClick:u}),t[18]=u,t[19]=h,t[20]=g):g=t[20];let _;t[21]===p?_=t[22]:(_=p(`panel.navigation.tooltip`),t[21]=p,t[22]=_);let v=c+1,y;t[23]!==o.length||t[24]!==v?(y=(0,$.jsx)(X,{paddingY:2,children:(0,$.jsxs)(J,{size:1,children:[v,` / `,o.length]})}),t[23]=o.length,t[24]=v,t[25]=y):y=t[25];let x;t[26]!==_||t[27]!==y?(x=(0,$.jsx)(ae,{content:_,children:y}),t[26]=_,t[27]=y,t[28]=x):x=t[28];let S;t[29]===p?S=t[30]:(S=p(`buttons.next.tooltip`),t[29]=p,t[30]=S);let C;t[31]===S?C=t[32]:(C={content:S},t[31]=S,t[32]=C);let w;t[33]!==f||t[34]!==C?(w=(0,$.jsx)(U,{tooltipProps:C,mode:`bleed`,icon:mt,onClick:f}),t[33]=f,t[34]=C,t[35]=w):w=t[35];let T;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(Hi,{}),t[36]=T):T=t[36];let E;return t[37]!==w||t[38]!==g||t[39]!==x?(E=(0,$.jsx)(ge,{children:(0,$.jsxs)(Y,{gap:1,alignItems:`center`,children:[g,x,w,T]})}),t[37]=w,t[38]=g,t[39]=x,t[40]=E):E=t[40],E}function Wi(e){return e.status===`open`}var Gi=`ll6g790`,Ki={constrainSize:!0,fallbackPlacements:[`bottom-end`],placement:`bottom-end`,portal:!0};function qi(e){let t=(0,Q.c)(8),{isSelected:n,item:r,onSelect:i}=e,a;t[0]!==r._id||t[1]!==i?(a=()=>{i(r._id)},t[0]=r._id,t[1]=i,t[2]=a):a=t[2];let o=a,s=n?pt:void 0,c=r.title||`Untitled`,l;return t[3]!==o||t[4]!==s||t[5]!==n||t[6]!==c?(l=(0,$.jsx)(pe,{iconRight:s,onClick:o,pressed:n,selected:n,text:c}),t[3]=o,t[4]=s,t[5]=n,t[6]=c,t[7]=l):l=t[7],l}function Ji(){let e=(0,Q.c)(21),{data:t}=Ft(),{state:n,setViewMode:r}=ze(),{viewMode:i,selectedTask:a}=n,o=E(),s=o?.id?t.filter(e=>{let t=e.authorId===o.id,n=!e.createdByUser,r=e._updatedAt!==e._createdAt,s=i!==`create`||e._id!==a;return t&&n&&s&&r}):_e,c;e[0]===r?c=e[1]:(c=e=>{r({type:`draft`,id:e})},e[0]=r,e[1]=c);let l=c,{t:u}=b(G);if(!s.length)return null;let d=ue,f;e[2]===u?f=e[3]:(f=u(`buttons.draft.text`),e[2]=u,e[3]=f);let p;e[4]===f?p=e[5]:(p=(0,$.jsx)(U,{text:f,mode:`ghost`,iconRight:ft}),e[4]=f,e[5]=p);let m=P,h=Gi,g;e[6]===u?g=e[7]:(g=u(`panel.drafts.title`),e[6]=u,e[7]=g);let _;e[8]===g?_=e[9]:(_=(0,$.jsx)(X,{padding:3,children:(0,$.jsx)(J,{size:1,weight:`semibold`,children:g})}),e[8]=g,e[9]=_);let v;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(de,{}),e[10]=v):v=e[10];let y=s?.map(e=>(0,$.jsx)(qi,{isSelected:a===e._id,item:e,onSelect:l},e._id)),x;e[11]!==m||e[12]!==h||e[13]!==_||e[14]!==v||e[15]!==y?(x=(0,$.jsxs)(m,{className:h,children:[_,v,y]}),e[11]=m,e[12]=h,e[13]=_,e[14]=v,e[15]=y,e[16]=x):x=e[16];let S;return e[17]!==d||e[18]!==p||e[19]!==x?(S=(0,$.jsx)(d,{button:p,id:`edit-task-menu`,menu:x,popover:Ki}),e[17]=d,e[18]=p,e[19]=x,e[20]=S):S=e[20],S}function Yi(e){let t=(0,Q.c)(34),{items:n}=e,{mode:r}=Ie(),{state:i,setViewMode:a,handleCloseTasks:o}=ze(),{viewMode:s,activeTabId:c}=i,l;t[0]===a?l=t[1]:(l=()=>{a({type:`create`})},t[0]=a,t[1]=l);let u=l,d;t[2]===a?d=t[3]:(d=()=>{a({type:`list`})},t[2]=a,t[3]=d);let f=d,{t:p}=b(G),m;t[4]!==c||t[5]!==f||t[6]!==p||t[7]!==s?(m=(0,$.jsx)(Y,{alignItems:`center`,flexBasis:`0%`,flexGrow:1,children:s===`list`?(0,$.jsx)(X,{padding:2,children:(0,$.jsx)(J,{size:2,weight:`semibold`,children:p(`panel.title`)})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(ct,{mode:`bleed`,gap:2,padding:2,onClick:f,children:(0,$.jsx)(J,{size:1,children:p(`panel.title`)})}),(0,$.jsx)(mt,{}),(0,$.jsx)(X,{paddingX:2,children:(0,$.jsx)(J,{size:1,weight:`semibold`,style:{textTransform:`capitalize`},children:s===`create`||s===`draft`?p(`panel.create.title`):c})})]})}),t[4]=c,t[5]=f,t[6]=p,t[7]=s,t[8]=m):m=t[8];let h;t[9]===s?h=t[10]:(h=(s===`create`||s===`draft`)&&(0,$.jsx)(Ji,{}),t[9]=s,t[10]=h);let g;t[11]!==n||t[12]!==s?(g=s===`edit`&&(0,$.jsx)(Ui,{items:n}),t[11]=n,t[12]=s,t[13]=g):g=t[13];let _;t[14]!==u||t[15]!==r||t[16]!==p||t[17]!==s?(_=s===`list`&&(0,$.jsx)(U,{icon:Ct,onClick:u,mode:`bleed`,text:p(`buttons.new.text`),disabled:r===`upsell`,tooltipProps:r===`upsell`?{content:p(`buttons.new.upsell-tooltip`)}:void 0}),t[14]=u,t[15]=r,t[16]=p,t[17]=s,t[18]=_):_=t[18];let v;t[19]===p?v=t[20]:(v=p(`panel.close.tooltip`),t[19]=p,t[20]=v);let y;t[21]===v?y=t[22]:(y={content:v},t[21]=v,t[22]=y);let x;t[23]!==o||t[24]!==y?(x=(0,$.jsx)(U,{tooltipProps:y,iconRight:dt,mode:`bleed`,onClick:o}),t[23]=o,t[24
Line truncated
|
||||
@@ -0,0 +1,3 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$ as t,Jp as n,Jt as r,Nd as i,Pu as a,S as o,Wr as s,Xp as c,Yp as l,ad as u,nf as d,or as f,qp as p,sd as m,xr as h}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as g,t as _}from"./jsx-runtime-BpzPEenQ.js";import{t as v}from"./compiler-runtime-sKsOXjDo.js";import{rt as y,xt as b}from"./clientStore-Cq3vrK4Q-X8Ukd-3S.js";import{on as x}from"./types--2f-avvL-DfAXA8nG.js";import{o as S}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as C}from"./useAddonDataset-BvCgByG6-PgDcQUJg.js";import{t as w}from"./AddonDatasetProvider-CF_RtUZo-BoMlopck.js";import{n as T,o as E,r as D,s as O,t as k}from"./types-B8Ny1dM--Dcnenz2x.js";var A=e(g(),1),j=v(),M=_();function N(e){let t=(0,j.c)(6),{children:r}=e,{enabled:a,isLoading:s,error:c}=f(o.sanityTasks),l=i().tasks?.enabled,u;bb0:{if(!l||s||c){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={enabled:!1,mode:null},t[0]=e):e=t[0],u=e;break bb0}let e=a?`default`:`upsell`,n;t[1]===e?n=t[2]:(n={enabled:!0,mode:e},t[1]=e,t[2]=n),u=n}let d=u,p;return t[3]!==r||t[4]!==d?(p=(0,M.jsx)(n.Provider,{value:d,children:r}),t[3]=r,t[4]=d,t[5]=p):p=t[5],p}var P={viewMode:`list`,selectedTask:null,activeTabId:`assigned`,duplicateTaskValues:null,isOpen:!1};function F(e,t){switch(t.type){case`TOGGLE_TASKS_VIEW`:return t.payload?{...e,isOpen:t.payload}:{...P,isOpen:t.payload};case`CREATE_TASK`:return{...e,viewMode:`create`,selectedTask:d()};case`EDIT_TASK`:return{...e,viewMode:`edit`,selectedTask:t.payload.id};case`EDIT_DRAFT`:return{...e,viewMode:`draft`,selectedTask:t.payload.id};case`DUPLICATE_TASK`:return{...e,viewMode:`duplicate`,selectedTask:d(),duplicateTaskValues:t.payload.duplicateTaskValues};case`SET_ACTIVE_TAB`:return{...e,viewMode:`list`,activeTabId:t.payload};case`NAVIGATE_TO_LIST`:return{...e,viewMode:`list`};default:return e}}var I=e=>{let t=(0,j.c)(23),{children:n}=e,[r,i]=(0,A.useReducer)(F,P),a=s(),o=m(),c=u(),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{bb2:switch(e.type){case`list`:i({type:`NAVIGATE_TO_LIST`});break bb2;case`create`:i({type:`CREATE_TASK`});break bb2;case`edit`:i({type:`EDIT_TASK`,payload:{id:e.id}});break bb2;case`duplicate`:i({type:`DUPLICATE_TASK`,payload:{duplicateTaskValues:e.duplicateTaskValues}});break bb2;case`draft`:i({type:`EDIT_DRAFT`,payload:{id:e.id}});break bb2}},t[0]=d):d=t[0];let f=d,p;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{i({type:`SET_ACTIVE_TAB`,payload:e})},t[1]=p):p=t[1];let h=p,g;t[2]===a?g=t[3]:(g=()=>{i({type:`TOGGLE_TASKS_VIEW`,payload:!1}),a.navigate({stickyParams:{...a.stickyParams,[T]:null,[D]:null,[k]:null}})},t[2]=a,t[3]=g);let _=g,v;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{i({type:`TOGGLE_TASKS_VIEW`,payload:!0})},t[4]=v):v=t[4];let y=v,b;t[5]!==r.selectedTask||t[6]!==r.viewMode||t[7]!==c||t[8]!==o?(b=()=>{let e=new URL(window.location.href);e.searchParams.set(T,`tasks`),e.searchParams.set(D,r.viewMode),r.selectedTask&&e.searchParams.set(`selectedTask`,r.selectedTask),navigator.clipboard.writeText(e.toString()).then(()=>{c.log(E)}).catch(()=>{o.push({closable:!0,status:`error`,title:`Failed to copy link to clipboard`})})},t[5]=r.selectedTask,t[6]=r.viewMode,t[7]=c,t[8]=o,t[9]=b):b=t[9];let x=b,S=a.stickyParams[T],C=a.stickyParams[D],w=a.stickyParams[k],N,I;t[10]!==w||t[11]!==S||t[12]!==c||t[13]!==C?(N=()=>{S===`tasks`&&(i({type:`TOGGLE_TASKS_VIEW`,payload:!0}),C===`edit`&&w&&(i({type:`EDIT_TASK`,payload:{id:w}}),c.log(O)))},I=[w,S,c,C],t[10]=w,t[11]=S,t[12]=c,t[13]=C,t[14]=N,t[15]=I):(N=t[14],I=t[15]),(0,A.useEffect)(N,I);let L;t[16]!==_||t[17]!==x||t[18]!==r?(L={state:r,setViewMode:f,setActiveTab:h,handleCloseTasks:_,handleOpenTasks:y,handleCopyLinkToTask:x},t[16]=_,t[17]=x,t[18]=r,t[19]=L):L=t[19];let R=L,z;return t[20]!==n||t[21]!==R?(z=(0,M.jsx)(l.Provider,{value:R,children:n}),t[20]=n,t[21]=R,t[22]=z):z=t[22],z};function L(e){return e.reduce((e,t)=>({...e,[t._id]:t}),{})}function R(e,t){switch(t.type){case`TASKS_SET`:{let n=L(t.tasks);return{...e,tasks:n}}case`TASK_ADDED`:{let n=t.payload,r=n,i={[n._id]:{...e.tasks[n._id],...r,_state:n._state||void 0,_createdAt:n._createdAt||new Date().toISOString()}};return{...e,tasks:{...e.tasks,...i}}}case`TASK_RECEIVED`:{let n=t.payload;return{...e,tasks:{...e.tasks,[n._id]:n}}}case`TASK_DELETED`:{let{[t.id]:n,...r}=e.tasks;return{...e,tasks:r}}case`TASK_UPDATED`:{let n=t.payload,r=n._id,i={...e.tasks[r],...n};return{...e,tasks:{...e.tasks,[r]:i}}}default:return e}}var z={tasks:{}},B={events:[`welcome`,`mutation`,`reconnect`],includeResult:!0,visibility:`query`,includeAllVersions:!0,tag:`tasks-store`},V=`*[${[`_type == "tasks.task"`].join(` && `)}] {
|
||||
...,
|
||||
} | order(_createdAt desc)`;function H(e){let t=(0,j.c)(24),{client:n}=C(),{documentId:r}=e,[i,a]=(0,A.useReducer)(R,z),[o,s]=(0,A.useState)(n!==null),[c,l]=(0,A.useState)(null),u;t[0]===r?u=t[1]:(u=r?S(r):null,t[0]=r,t[1]=u);let d;t[2]===u?d=t[3]:(d={documentId:u},t[2]=u,t[3]=d);let f=d,p;t[4]!==n||t[5]!==f?(p=async()=>{if(!n){s(!1);return}try{let e=await n.fetch(V,f);a({type:`TASKS_SET`,tasks:e}),s(!1)}catch(e){l(e)}},t[4]=n,t[5]=f,t[6]=p):p=t[6];let m=p,h;t[7]===m?h=t[8]:(h=async e=>{if(e.type===`welcome`&&(s(!0),await m(),s(!1)),e.type===`reconnect`&&s(!0),e.type===`mutation`){if(e.transition===`appear`){let t=e.result;t&&a({type:`TASK_RECEIVED`,payload:t})}if(e.transition===`disappear`&&a({type:`TASK_DELETED`,id:e.documentId}),e.transition===`update`){let t=e.result;t&&a({type:`TASK_UPDATED`,payload:t})}}},t[7]=m,t[8]=h);let g=h,_;bb0:{if(!n){let e;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=b(),t[9]=e):e=t[9],_=e;break bb0}let e;if(t[10]!==n.observable||t[11]!==f){let r;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>(l(e),b(e)),t[13]=r):r=t[13],e=n.observable.listen(V,f,B).pipe(y(r)),t[10]=n.observable,t[11]=f,t[12]=e}else e=t[12];_=e}let v=_,x,w;t[14]!==g||t[15]!==v?(x=()=>{let e=v.subscribe(g);return()=>{e?.unsubscribe()}},w=[g,v],t[14]=g,t[15]=v,t[16]=x,t[17]=w):(x=t[16],w=t[17]),(0,A.useEffect)(x,w);let T;t[18]===i.tasks?T=t[19]:(T=Object.values(i.tasks),t[18]=i.tasks,t[19]=T);let E=T,D;return t[20]!==c||t[21]!==o||t[22]!==E?(D={data:E,dispatch:a,error:c,isLoading:o},t[20]=c,t[21]=o,t[22]=E,t[23]=D):D=t[23],D}var U=[];function W(e){let t=(0,j.c)(11),{children:n}=e,[r,i]=(0,A.useState)(null),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={},t[0]=o):o=t[0];let{data:s,isLoading:c}=H(o),l=s===void 0?U:s,u;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=a(i,1e3),t[1]=u):u=t[1];let d=u,f;t[2]===l?f=t[3]:(f=l??[],t[2]=l,t[3]=f);let m;t[4]!==r||t[5]!==c||t[6]!==f?(m={activeDocument:r,setActiveDocument:d,isLoading:c,data:f},t[4]=r,t[5]=c,t[6]=f,t[7]=m):m=t[7];let h=m,g;return t[8]!==n||t[9]!==h?(g=(0,M.jsx)(p.Provider,{value:h,children:n}),t[8]=n,t[9]=h,t[10]=g):g=t[10],g}function G(e){let n=(0,j.c)(9),i;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={dataUri:`/journey/tasks`,feature:`tasks`},n[0]=i):i=n[0];let a=h(i),o=e.children,s;n[1]===a?s=n[2]:(s=r(a),n[1]=a,n[2]=s);let l;n[3]===s?l=n[4]:(l=(0,M.jsx)(t,{...s}),n[3]=s,n[4]=l);let u;return n[5]!==a||n[6]!==e.children||n[7]!==l?(u=(0,M.jsxs)(c.Provider,{value:a,children:[o,l]}),n[5]=a,n[6]=e.children,n[7]=l,n[8]=u):u=n[8],u}var K=e=>{let t=(0,j.c)(10),{enabled:n,mode:r}=x();if(!n){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let i;t[2]===e?i=t[3]:(i=e.renderDefault(e),t[2]=e,t[3]=i);let a;t[4]===i?a=t[5]:(a=(0,M.jsx)(W,{children:(0,M.jsx)(I,{children:i})}),t[4]=i,t[5]=a);let o=a;if(r===`upsell`){let e;return t[6]===o?e=t[7]:(e=(0,M.jsx)(w,{children:(0,M.jsx)(G,{children:o})}),t[6]=o,t[7]=e),e}let s;return t[8]===o?s=t[9]:(s=(0,M.jsx)(w,{children:o}),t[8]=o,t[9]=s),s};function q(e){let t=(0,j.c)(2),n;return t[0]===e?n=t[1]:(n=(0,M.jsx)(N,{children:(0,M.jsx)(K,{...e})}),t[0]=e,t[1]=n),n}export{q as TasksStudioLayout};
|
||||
@@ -1,3 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Bt as t,Rt as n,Vt as r,zt as i}from"./_singletons-C3kYIdI9.js";import{n as a,t as o}from"./jsx-runtime-BpzPEenQ.js";import{t as s}from"./compiler-runtime-sKsOXjDo.js";import{At as c,Hr as l,Yc as u,Yn as d,Zl as f,bl as p,el as m,jn as h,ll as g,nt as _,x as v}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{h as y,o as b}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{i as x}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import"./draftUtils-D3HJGQaW-BnJ8Os95.js";import{t as S}from"./useAddonDataset-BvCgByG6-fdH-dSqr.js";import{t as C}from"./useTasksEnabled-DBNZp6wF-C6IkIDac.js";import{t as w}from"./AddonDatasetProvider-C26Rc0B9-BQLPb_HX.js";import{n as T,o as E,r as D,s as O,t as k}from"./types-B8Ny1dM--BQTDvKQs.js";var A=e(a(),1),j=s(),M=o();function N(e){let t=(0,j.c)(6),{children:n}=e,{enabled:r,isLoading:a,error:o}=h(v.sanityTasks),s=p().tasks?.enabled,c;bb0:{if(!s||a||o){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={enabled:!1,mode:null},t[0]=e):e=t[0],c=e;break bb0}let e=r?`default`:`upsell`,n;t[1]===e?n=t[2]:(n={enabled:!0,mode:e},t[1]=e,t[2]=n),c=n}let l=c,u;return t[3]!==n||t[4]!==l?(u=(0,M.jsx)(i.Provider,{value:l,children:n}),t[3]=n,t[4]=l,t[5]=u):u=t[5],u}var P={viewMode:`list`,selectedTask:null,activeTabId:`assigned`,duplicateTaskValues:null,isOpen:!1};function F(e,t){switch(t.type){case`TOGGLE_TASKS_VIEW`:return t.payload?{...e,isOpen:t.payload}:{...P,isOpen:t.payload};case`CREATE_TASK`:return{...e,viewMode:`create`,selectedTask:f()};case`EDIT_TASK`:return{...e,viewMode:`edit`,selectedTask:t.payload.id};case`EDIT_DRAFT`:return{...e,viewMode:`draft`,selectedTask:t.payload.id};case`DUPLICATE_TASK`:return{...e,viewMode:`duplicate`,selectedTask:f(),duplicateTaskValues:t.payload.duplicateTaskValues};case`SET_ACTIVE_TAB`:return{...e,viewMode:`list`,activeTabId:t.payload};case`NAVIGATE_TO_LIST`:return{...e,viewMode:`list`};default:return e}}var I=e=>{let n=(0,j.c)(23),{children:r}=e,[i,a]=(0,A.useReducer)(F,P),o=l(),s=u(),c=m(),d;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>{bb2:switch(e.type){case`list`:a({type:`NAVIGATE_TO_LIST`});break bb2;case`create`:a({type:`CREATE_TASK`});break bb2;case`edit`:a({type:`EDIT_TASK`,payload:{id:e.id}});break bb2;case`duplicate`:a({type:`DUPLICATE_TASK`,payload:{duplicateTaskValues:e.duplicateTaskValues}});break bb2;case`draft`:a({type:`EDIT_DRAFT`,payload:{id:e.id}});break bb2}},n[0]=d):d=n[0];let f=d,p;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{a({type:`SET_ACTIVE_TAB`,payload:e})},n[1]=p):p=n[1];let h=p,g;n[2]===o?g=n[3]:(g=()=>{a({type:`TOGGLE_TASKS_VIEW`,payload:!1}),o.navigate({stickyParams:{...o.stickyParams,[T]:null,[D]:null,[k]:null}})},n[2]=o,n[3]=g);let _=g,v;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{a({type:`TOGGLE_TASKS_VIEW`,payload:!0})},n[4]=v):v=n[4];let y=v,b;n[5]!==i.selectedTask||n[6]!==i.viewMode||n[7]!==c||n[8]!==s?(b=()=>{let e=new URL(window.location.href);e.searchParams.set(T,`tasks`),e.searchParams.set(D,i.viewMode),i.selectedTask&&e.searchParams.set(`selectedTask`,i.selectedTask),navigator.clipboard.writeText(e.toString()).then(()=>{c.log(E)}).catch(()=>{s.push({closable:!0,status:`error`,title:`Failed to copy link to clipboard`})})},n[5]=i.selectedTask,n[6]=i.viewMode,n[7]=c,n[8]=s,n[9]=b):b=n[9];let x=b,S=o.stickyParams[T],C=o.stickyParams[D],w=o.stickyParams[k],N,I;n[10]!==w||n[11]!==S||n[12]!==c||n[13]!==C?(N=()=>{S===`tasks`&&(a({type:`TOGGLE_TASKS_VIEW`,payload:!0}),C===`edit`&&w&&(a({type:`EDIT_TASK`,payload:{id:w}}),c.log(O)))},I=[w,S,c,C],n[10]=w,n[11]=S,n[12]=c,n[13]=C,n[14]=N,n[15]=I):(N=n[14],I=n[15]),(0,A.useEffect)(N,I);let L;n[16]!==_||n[17]!==x||n[18]!==i?(L={state:i,setViewMode:f,setActiveTab:h,handleCloseTasks:_,handleOpenTasks:y,handleCopyLinkToTask:x},n[16]=_,n[17]=x,n[18]=i,n[19]=L):L=n[19];let R=L,z;return n[20]!==r||n[21]!==R?(z=(0,M.jsx)(t.Provider,{value:R,children:r}),n[20]=r,n[21]=R,n[22]=z):z=n[22],z};function L(e){return e.reduce((e,t)=>({...e,[t._id]:t}),{})}function R(e,t){switch(t.type){case`TASKS_SET`:{let n=L(t.tasks);return{...e,tasks:n}}case`TASK_ADDED`:{let n=t.payload,r=n,i={[n._id]:{...e.tasks[n._id],...r,_state:n._state||void 0,_createdAt:n._createdAt||new Date().toISOString()}};return{...e,tasks:{...e.tasks,...i}}}case`TASK_RECEIVED`:{let n=t.payload;return{...e,tasks:{...e.tasks,[n._id]:n}}}case`TASK_DELETED`:{let{[t.id]:n,...r}=e.tasks;return{...e,tasks:r}}case`TASK_UPDATED`:{let n=t.payload,r=n._id,i={...e.tasks[r],...n};return{...e,tasks:{...e.tasks,[r]:i}}}default:return e}}var z={tasks:{}},B={events:[`welcome`,`mutation`,`reconnect`],includeResult:!0,visibility:`query`,includeAllVersions:!0,tag:`tasks-store`},V=`*[${[`_type == "tasks.task"`].join(` && `)}] {
|
||||
...,
|
||||
} | order(_createdAt desc)`;function H(e){let t=(0,j.c)(24),{client:n}=S(),{documentId:r}=e,[i,a]=(0,A.useReducer)(R,z),[o,s]=(0,A.useState)(n!==null),[c,l]=(0,A.useState)(null),u;t[0]===r?u=t[1]:(u=r?x(r):null,t[0]=r,t[1]=u);let d;t[2]===u?d=t[3]:(d={documentId:u},t[2]=u,t[3]=d);let f=d,p;t[4]!==n||t[5]!==f?(p=async()=>{if(!n){s(!1);return}try{let e=await n.fetch(V,f);a({type:`TASKS_SET`,tasks:e}),s(!1)}catch(e){l(e)}},t[4]=n,t[5]=f,t[6]=p):p=t[6];let m=p,h;t[7]===m?h=t[8]:(h=async e=>{if(e.type===`welcome`&&(s(!0),await m(),s(!1)),e.type===`reconnect`&&s(!0),e.type===`mutation`){if(e.transition===`appear`){let t=e.result;t&&a({type:`TASK_RECEIVED`,payload:t})}if(e.transition===`disappear`&&a({type:`TASK_DELETED`,id:e.documentId}),e.transition===`update`){let t=e.result;t&&a({type:`TASK_UPDATED`,payload:t})}}},t[7]=m,t[8]=h);let g=h,_;bb0:{if(!n){let e;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=y(),t[9]=e):e=t[9],_=e;break bb0}let e;if(t[10]!==n.observable||t[11]!==f){let r;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>(l(e),y(e)),t[13]=r):r=t[13],e=n.observable.listen(V,f,B).pipe(b(r)),t[10]=n.observable,t[11]=f,t[12]=e}else e=t[12];_=e}let v=_,C,w;t[14]!==g||t[15]!==v?(C=()=>{let e=v.subscribe(g);return()=>{e?.unsubscribe()}},w=[g,v],t[14]=g,t[15]=v,t[16]=C,t[17]=w):(C=t[16],w=t[17]),(0,A.useEffect)(C,w);let T;t[18]===i.tasks?T=t[19]:(T=Object.values(i.tasks),t[18]=i.tasks,t[19]=T);let E=T,D;return t[20]!==c||t[21]!==o||t[22]!==E?(D={data:E,dispatch:a,error:c,isLoading:o},t[20]=c,t[21]=o,t[22]=E,t[23]=D):D=t[23],D}var U=[];function W(e){let t=(0,j.c)(11),{children:r}=e,[i,a]=(0,A.useState)(null),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={},t[0]=o):o=t[0];let{data:s,isLoading:c}=H(o),l=s===void 0?U:s,u;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=g(a,1e3),t[1]=u):u=t[1];let d=u,f;t[2]===l?f=t[3]:(f=l??[],t[2]=l,t[3]=f);let p;t[4]!==i||t[5]!==c||t[6]!==f?(p={activeDocument:i,setActiveDocument:d,isLoading:c,data:f},t[4]=i,t[5]=c,t[6]=f,t[7]=p):p=t[7];let m=p,h;return t[8]!==r||t[9]!==m?(h=(0,M.jsx)(n.Provider,{value:m,children:r}),t[8]=r,t[9]=m,t[10]=h):h=t[10],h}function G(e){let t=(0,j.c)(9),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={dataUri:`/journey/tasks`,feature:`tasks`},t[0]=n):n=t[0];let i=d(n),a=e.children,o;t[1]===i?o=t[2]:(o=c(i),t[1]=i,t[2]=o);let s;t[3]===o?s=t[4]:(s=(0,M.jsx)(_,{...o}),t[3]=o,t[4]=s);let l;return t[5]!==i||t[6]!==e.children||t[7]!==s?(l=(0,M.jsxs)(r.Provider,{value:i,children:[a,s]}),t[5]=i,t[6]=e.children,t[7]=s,t[8]=l):l=t[8],l}var K=e=>{let t=(0,j.c)(10),{enabled:n,mode:r}=C();if(!n){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let i;t[2]===e?i=t[3]:(i=e.renderDefault(e),t[2]=e,t[3]=i);let a;t[4]===i?a=t[5]:(a=(0,M.jsx)(W,{children:(0,M.jsx)(I,{children:i})}),t[4]=i,t[5]=a);let o=a;if(r===`upsell`){let e;return t[6]===o?e=t[7]:(e=(0,M.jsx)(w,{children:(0,M.jsx)(G,{children:o})}),t[6]=o,t[7]=e),e}let s;return t[8]===o?s=t[9]:(s=(0,M.jsx)(w,{children:o}),t[8]=o,t[9]=s),s};function q(e){let t=(0,j.c)(2),n;return t[0]===e?n=t[1]:(n=(0,M.jsx)(N,{children:(0,M.jsx)(K,{...e})}),t[0]=e,t[1]=n),n}export{q as TasksStudioLayout};
|
||||
@@ -1 +0,0 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{N as n,t as r}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{t as i}from"./CheckmarkCircle-B6SBY4QE.js";import{r as a,t as o}from"./useTasksNavigation-CMv6pzvb-DUNxXR3l.js";import{t as s}from"./useTasksEnabled-DBNZp6wF-C6IkIDac.js";var c=t(),l=e(),u=[],d=e=>{let t=(0,c.c)(8),{onClick:a,isOpen:s}=e,{t:u}=n(o),d;t[0]===u?d=t[1]:(d=u(`toolbar.tooltip`),t[0]=u,t[1]=d);let f;t[2]===d?f=t[3]:(f={content:d},t[2]=d,t[3]=f);let p;return t[4]!==s||t[5]!==a||t[6]!==f?(p=(0,l.jsx)(r,{tooltipProps:f,icon:i,mode:`bleed`,onClick:a,selected:s,"data-testid":`tasks-toolbar`}),t[4]=s,t[5]=a,t[6]=f,t[7]=p):p=t[7],p};function f(e){let t=(0,c.c)(22),{handleOpenTasks:r,handleCloseTasks:s,state:f}=a(),{isOpen:p}=f,{t:m}=n(o),h;t[0]!==s||t[1]!==r||t[2]!==p?(h=()=>{p?s():r()},t[0]=s,t[1]=r,t[2]=p,t[3]=h):h=t[3];let g=h,_;t[4]!==g||t[5]!==p?(_=()=>(0,l.jsx)(d,{onClick:g,isOpen:p}),t[4]=g,t[5]=p,t[6]=_):_=t[6];let v=_;e?.__internal_actions;let y=e?.__internal_actions||u,b;t[7]===v?b=t[8]:(b={location:`topbar`,name:`tasks-topbar`,render:v},t[7]=v,t[8]=b);let x;t[9]===m?x=t[10]:(x=m(`actions.open.text`),t[9]=m,t[10]=x);let S;t[11]!==g||t[12]!==p||t[13]!==x?(S={icon:i,location:`sidebar`,name:`tasks-sidebar`,onAction:g,selected:p,title:x},t[11]=g,t[12]=p,t[13]=x,t[14]=S):S=t[14];let C;t[15]!==y||t[16]!==b||t[17]!==S?(C=[...y,b,S],t[15]=y,t[16]=b,t[17]=S,t[18]=C):C=t[18];let w=C,T;return t[19]!==w||t[20]!==e?(T=e.renderDefault({...e,__internal_actions:w}),t[19]=w,t[20]=e,t[21]=T):T=t[21],T}function p(e){let t=(0,c.c)(4),{enabled:n}=s();if(!n){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let r;return t[2]===e?r=t[3]:(r=(0,l.jsx)(f,{...e}),t[2]=e,t[3]=r),r}export{p as TasksStudioNavbar};
|
||||
@@ -0,0 +1 @@
|
||||
import{Sd as e,rc as t}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{on as i,sn as a,xt as o}from"./types--2f-avvL-DfAXA8nG.js";import{t as s}from"./CheckmarkCircle-B6SBY4QE.js";var c=r(),l=n(),u=[],d=n=>{let r=(0,c.c)(8),{onClick:i,isOpen:a}=n,{t:u}=e(o),d;r[0]===u?d=r[1]:(d=u(`toolbar.tooltip`),r[0]=u,r[1]=d);let f;r[2]===d?f=r[3]:(f={content:d},r[2]=d,r[3]=f);let p;return r[4]!==a||r[5]!==i||r[6]!==f?(p=(0,l.jsx)(t,{tooltipProps:f,icon:s,mode:`bleed`,onClick:i,selected:a,"data-testid":`tasks-toolbar`}),r[4]=a,r[5]=i,r[6]=f,r[7]=p):p=r[7],p};function f(t){let n=(0,c.c)(22),{handleOpenTasks:r,handleCloseTasks:i,state:f}=a(),{isOpen:p}=f,{t:m}=e(o),h;n[0]!==i||n[1]!==r||n[2]!==p?(h=()=>{p?i():r()},n[0]=i,n[1]=r,n[2]=p,n[3]=h):h=n[3];let g=h,_;n[4]!==g||n[5]!==p?(_=()=>(0,l.jsx)(d,{onClick:g,isOpen:p}),n[4]=g,n[5]=p,n[6]=_):_=n[6];let v=_;t?.__internal_actions;let y=t?.__internal_actions||u,b;n[7]===v?b=n[8]:(b={location:`topbar`,name:`tasks-topbar`,render:v},n[7]=v,n[8]=b);let x;n[9]===m?x=n[10]:(x=m(`actions.open.text`),n[9]=m,n[10]=x);let S;n[11]!==g||n[12]!==p||n[13]!==x?(S={icon:s,location:`sidebar`,name:`tasks-sidebar`,onAction:g,selected:p,title:x},n[11]=g,n[12]=p,n[13]=x,n[14]=S):S=n[14];let C;n[15]!==y||n[16]!==b||n[17]!==S?(C=[...y,b,S],n[15]=y,n[16]=b,n[17]=S,n[18]=C):C=n[18];let w=C,T;return n[19]!==w||n[20]!==t?(T=t.renderDefault({...t,__internal_actions:w}),n[19]=w,n[20]=t,n[21]=T):T=n[21],T}function p(e){let t=(0,c.c)(4),{enabled:n}=i();if(!n){let n;return t[0]===e?n=t[1]:(n=e.renderDefault(e),t[0]=e,t[1]=n),n}let r;return t[2]===e?r=t[3]:(r=(0,l.jsx)(f,{...e}),t[2]=e,t[3]=r),r}export{p as TasksStudioNavbar};
|
||||
-1
@@ -1 +0,0 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";var n=t(),r=e(),i=e=>{let t=(0,n.c)(5),{tone:i,icon:a}=e,o=`var(--card-badge-${i}-icon-color)`,s;t[0]===o?s=t[1]:(s={"--card-icon-color":o},t[0]=o,t[1]=s);let c=s,l;return t[2]!==a||t[3]!==c?(l=(0,r.jsx)(a,{style:c}),t[2]=a,t[3]=c,t[4]=l):l=t[4],l};export{i as t};
|
||||
-1
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{Bs as i,Gs as a,Hr as o,Nr as s,Ta as c,Wr as l,aa as u,bl as d,mi as f,sr as p,ti as m,vo as h}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as g,a as _,b as v,i as y,l as b,s as x,t as S,x as C}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{Ft as w,M as T,Ot as E,U as D,dt as O,f as k,ft as A,gt as j,i as M,lt as N,p as P,s as F,z as I}from"./dist-BOMXfkZi.js";import{t as L}from"./WarningOutline-DOBjmorn.js";import{t as ee}from"./Close-B_ZEgT1V.js";import{t as R}from"./Checkmark-OT7tsNpL.js";import{t as z}from"./InfoOutline-BLtnjxbN.js";import{t as B}from"./Sort-CFTgH29c.js";import{n as V}from"./ScheduledPublishingEnabledProvider-Bsqi_oGE-ifxCN0BN.js";import{c as H,d as U,h as te,i as ne,l as W,o as G,p as re,r as ie}from"./validationUtils-BmZy4eyG-CdX1fJfy.js";import{r as K}from"./SingleDocReleaseUpsellProvider-6B58QoVy-Cr1fZ6ra.js";import{t as q}from"./plugin-CfnAN8IH-BsbRbVsz.js";import{t as J}from"./CheckmarkCircle-B6SBY4QE.js";import{a as Y,i as ae,o as oe}from"./scheduleItem-DlZ2dANV-5erJqKQi.js";import{n as se}from"./SchedulePublishingUpsellProvider-DEWq56BP-Cs5120Xl.js";import{n as X,t as ce}from"./schedules-6ZvpdVC8-DDoGp6dg.js";import{t as le}from"./UpsellPanel-BzCgrrZO-BKE9DmdX.js";import{o as ue}from"./sanity-CoxvCVZ8.js";import{n as de,r as fe}from"./CalendarFilter-D1ZVw1JR-BGfexj9w.js";var Z=e(t(),1),Q=r(),$=n(),pe=()=>{let e=(0,Q.c)(5),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(A,{size:2,children:(0,$.jsx)(z,{})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(A,{size:1,weight:`semibold`,children:`Schedule Publishing is not enabled`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(A,{size:1,children:[`We recommend using`,` `,(0,$.jsx)(`a`,{target:`_blank`,href:ie,rel:`noreferrer`,children:`Releases`}),`.`]}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(A,{size:1,children:[`Scheduled Publishing is not enabled by default. It can be enabled in the config by setting `,(0,$.jsx)(`code`,{children:`scheduledPublishing.enabled = true`})]}),e[3]=i):i=e[3];let a;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(j,{overflow:`hidden`,padding:4,radius:2,shadow:1,tone:`suggest`,children:(0,$.jsxs)(C,{alignItems:`center`,gap:4,children:[t,(0,$.jsxs)(T,{gap:3,children:[n,(0,$.jsxs)(O,{gap:3,marginTop:2,children:[r,i,(0,$.jsx)(A,{size:1,children:(0,$.jsx)(`a`,{target:`_blank`,href:`https://www.sanity.io/docs/scheduled-publishing`,rel:`noreferrer`,children:`Read the docs`})})]})]})]})}),e[4]=a):a=e[4],a};function me(e,t){let n=(0,Q.c)(5),r;if(n[0]!==t||n[1]!==e){let i;n[3]===t?i=n[4]:(i=e=>e.state===t,n[3]=t,n[4]=i),r=e.filter(i),n[0]=t,n[1]=e,n[2]=r}else r=n[2];return r}var he=e=>{let t=(0,Q.c)(16),{selected:n,schedules:r,state:i}=e,a=me(r,i).length,o=a>0,s=i===`cancelled`,c;t[0]===i?c=t[1]:(c={state:{state:i}},t[0]=i,t[1]=c);let{href:u,onClick:d}=l(c),f=s?`critical`:`default`,p=W[i],m;t[2]===p.title?m=t[3]:(m=(0,$.jsx)(A,{size:1,weight:`medium`,children:p.title}),t[2]=p.title,t[3]=m);let h;t[4]!==a||t[5]!==o?(h=o&&(0,$.jsx)(A,{size:0,children:a}),t[4]=a,t[5]=o,t[6]=h):h=t[6];let g;t[7]!==m||t[8]!==h?(g=(0,$.jsxs)(C,{gap:2,alignItems:`center`,children:[m,h]}),t[7]=m,t[8]=h,t[9]=g):g=t[9];let _;return t[10]!==u||t[11]!==d||t[12]!==n||t[13]!==f||t[14]!==g?(_=(0,$.jsx)(N,{as:`a`,href:u,mode:`bleed`,onClick:d,selected:n,tone:f,padding:2,children:g}),t[10]=u,t[11]=d,t[12]=n,t[13]=f,t[14]=g,t[15]=_):_=t[15],_},ge=e=>{let t=(0,Q.c)(26),{onClearDate:n,selectedDate:r}=e,{navigate:a}=o(),{schedules:s,scheduleState:c}=X(),l;t[0]===a?l=t[1]:(l=e=>{a(e)},t[0]=a,t[1]=l);let u=l,d=me(s,c),f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=[`block`,`block`,`none`],t[2]=f):f=t[2];let p;t[3]!==n||t[4]!==r?(p=r&&(0,$.jsx)(S,{iconRight:ee,onClick:n,text:i(r,`d MMMM yyyy`),tone:`primary`}),t[3]=n,t[4]=r,t[5]=p):p=t[5];let m;t[6]!==d?.length||t[7]!==u||t[8]!==c?(m=c&&(0,$.jsx)(y,{button:(0,$.jsx)(S,{iconRight:ue,mode:`ghost`,text:`${W[c].title} (${d?.length||0})`,tone:`default`}),id:`state`,menu:(0,$.jsx)(b,{style:{minWidth:`175px`},children:H.map(e=>(0,$.jsx)(_,{iconRight:e===c?R:void 0,onClick:u.bind(void 0,{state:e}),text:W[e].title},e))}),popover:{placement:`bottom`}}),t[6]=d?.length,t[7]=u,t[8]=c,t[9]=m):m=t[9];let h;t[10]!==p||t[11]!==m?(h=(0,$.jsxs)(v,{display:f,children:[p,m]}),t[10]=p,t[11]=m,t[12]=h):h=t[12];let g;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(g=[`none`,`none`,`block`],t[13]=g):g=t[13];let x;t[14]!==n||t[15]!==r?(x=r&&(0,$.jsx)(S,{iconRight:ee,onClick:n,text:i(r,`d MMMM yyyy`),tone:`primary`}),t[14]=n,t[15]=r,t[16]=x):x=t[16];let w;t[17]!==c||t[18]!==s?(w=c&&(0,$.jsx)(C,{gap:2,children:H.map(e=>(0,$.jsx)(he,{schedules:s,selected:c===e,state:e},e))}),t[17]=c,t[18]=s,t[19]=w):w=t[19];let T;t[20]!=Line truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Co as t,Ho as n,Lr as r,Nd as i,Pa as a,Sd as o,Wr as s,Yl as c,Ys as l,da as u,dc as d,eu as f,jr as p,lc as m,oc as h,qr as g,rc as _,sc as v}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as y,t as b}from"./jsx-runtime-BpzPEenQ.js";import{t as x}from"./compiler-runtime-sKsOXjDo.js";import{C as S,H as C,I as w,R as T,en as E,tn as D,yn as O,z as ee}from"./types--2f-avvL-DfAXA8nG.js";import{B as k,Et as A,Gt as j,Rt as te,St as M,Z as N,b as P,f as F,n as I,q as L,r as R,s as z,t as B,x as V,yt as H}from"./dist-LVcARZxB.js";import{t as U}from"./Close-B_ZEgT1V.js";import{t as W}from"./WarningOutline-DOBjmorn.js";import{t as G}from"./Checkmark-OT7tsNpL.js";import{t as K}from"./Select-D4xIAUnY.js";import{t as ne}from"./InfoOutline-BLtnjxbN.js";import{t as q}from"./Sort-CFTgH29c.js";import{c as re,d as J,h as Y,i as ie,l as X,o as ae,p as oe,r as se,v as ce}from"./validationUtils-Dwef0BLR-DSZmlLZW.js";import{r as le}from"./SingleDocReleaseUpsellProvider-eSYyzLjC-DBu0--ZA.js";import{t as ue}from"./CheckmarkCircle-B6SBY4QE.js";import{n as de,r as fe}from"./CalendarFilter-Xl97nJYN-VpCCR-Os.js";var Z=e(y(),1),Q=x(),$=b(),pe=()=>{let e=(0,Q.c)(5),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(M,{size:2,children:(0,$.jsx)(ne,{})}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(M,{size:1,weight:`semibold`,children:`Schedule Publishing is not enabled`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(M,{size:1,children:[`We recommend using`,` `,(0,$.jsx)(`a`,{target:`_blank`,href:se,rel:`noreferrer`,children:`Releases`}),`.`]}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(M,{size:1,children:[`Scheduled Publishing is not enabled by default. It can be enabled in the config by setting `,(0,$.jsx)(`code`,{children:`scheduledPublishing.enabled = true`})]}),e[3]=i):i=e[3];let a;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(A,{overflow:`hidden`,padding:4,radius:2,shadow:1,tone:`suggest`,children:(0,$.jsxs)(R,{alignItems:`center`,gap:4,children:[t,(0,$.jsxs)(z,{gap:4,children:[n,(0,$.jsxs)(z,{gap:3,children:[r,i,(0,$.jsx)(M,{size:1,children:(0,$.jsx)(`a`,{target:`_blank`,href:`https://www.sanity.io/docs/scheduled-publishing`,rel:`noreferrer`,children:`Read the docs`})})]})]})]})}),e[4]=a):a=e[4],a};function me(e,t){let n=(0,Q.c)(5),r;if(n[0]!==t||n[1]!==e){let i;n[3]===t?i=n[4]:(i=e=>e.state===t,n[3]=t,n[4]=i),r=e.filter(i),n[0]=t,n[1]=e,n[2]=r}else r=n[2];return r}var he=e=>{let t=(0,Q.c)(16),{selected:n,schedules:i,state:a}=e,o=me(i,a).length,s=o>0,c=a===`cancelled`,l;t[0]===a?l=t[1]:(l={state:{state:a}},t[0]=a,t[1]=l);let{href:u,onClick:d}=r(l),f=c?`critical`:`default`,p=X[a],m;t[2]===p.title?m=t[3]:(m=(0,$.jsx)(M,{size:1,weight:`medium`,children:p.title}),t[2]=p.title,t[3]=m);let h;t[4]!==o||t[5]!==s?(h=s&&(0,$.jsx)(M,{size:0,children:o}),t[4]=o,t[5]=s,t[6]=h):h=t[6];let g;t[7]!==m||t[8]!==h?(g=(0,$.jsxs)(R,{gap:2,alignItems:`center`,children:[m,h]}),t[7]=m,t[8]=h,t[9]=g):g=t[9];let _;return t[10]!==u||t[11]!==d||t[12]!==n||t[13]!==f||t[14]!==g?(_=(0,$.jsx)(H,{as:`a`,href:u,mode:`bleed`,onClick:d,selected:n,tone:f,padding:2,children:g}),t[10]=u,t[11]=d,t[12]=n,t[13]=f,t[14]=g,t[15]=_):_=t[15],_},ge=e=>{let t=(0,Q.c)(26),{onClearDate:n,selectedDate:r}=e,{navigate:i}=s(),{schedules:a,scheduleState:o}=D(),l;t[0]===i?l=t[1]:(l=e=>{i(e)},t[0]=i,t[1]=l);let u=l,f=me(a,o),p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=[`block`,`block`,`none`],t[2]=p):p=t[2];let m;t[3]!==n||t[4]!==r?(m=r&&(0,$.jsx)(_,{iconRight:U,onClick:n,text:c(r,`d MMMM yyyy`),tone:`primary`}),t[3]=n,t[4]=r,t[5]=m):m=t[5];let g;t[6]!==f?.length||t[7]!==u||t[8]!==o?(g=o&&(0,$.jsx)(h,{button:(0,$.jsx)(_,{iconRight:K,mode:`ghost`,text:`${X[o].title} (${f?.length||0})`,tone:`default`}),id:`state`,menu:(0,$.jsx)(d,{style:{minWidth:`175px`},children:re.map(e=>(0,$.jsx)(v,{iconRight:e===o?G:void 0,onClick:u.bind(void 0,{state:e}),text:X[e].title},e))}),popover:{placement:`bottom`}}),t[6]=f?.length,t[7]=u,t[8]=o,t[9]=g):g=t[9];let y;t[10]!==m||t[11]!==g?(y=(0,$.jsxs)(B,{display:p,children:[m,g]}),t[10]=m,t[11]=g,t[12]=y):y=t[12];let b;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=[`none`,`none`,`block`],t[13]=b):b=t[13];let x;t[14]!==n||t[15]!==r?(x=r&&(0,$.jsx)(_,{iconRight:U,onClick:n,text:c(r,`d MMMM yyyy`),tone:`primary`}),t[14]=n,t[15]=r,t[16]=x):x=t[16];let S;t[17]!==o||t[18]!==a?(S=o&&(0,$.jsx)(R,{gap:2,children:re.map(e=>(0,$.jsx)(he,{schedules:a,selected:o===e,state:e},e))}),t[17]=o,t[18]=a,t[19]=S):S=t[19];let C;t[20]!==x||t[21]!==S?(C=(0,$.jsxs)(B,{display:b,children:[x,S]}),t[20]=x,t[21]=S,t[22]=C):C=t[22];let w;return t[23]!==y||t[24]!==C?(w=(0,$.jsxs)($.Fragment,{children:[y,C]}),t[23]=y,t[24]=C,t[25]=w):w=t[25],w},_e=e=>{let t=(0,Q.c)(15),n,r,i,a,o,s,c,l,u,d,f,p,m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`path`,{d:`M5
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{t as e}from"./jsx-runtime-BpzPEenQ.js";import{t}from"./compiler-runtime-sKsOXjDo.js";import{tt as n}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{b as r,t as i,x as a}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{Bt as o,Ft as s,Ht as c,Nt as l,gt as u}from"./dist-BOMXfkZi.js";import{t as d}from"./Launch-DuEs-KHJ.js";var f=t(),p=e(),m=s.img.withConfig({displayName:`Image`,componentId:`sc-p2v9ao-0`})(e=>{let{media:t}=c(e.theme),n=o(t,Array.isArray(e.$direction)?e.$direction:[e.$direction],e=>({width:e===`row`?`50%`:`100%`,height:e===`row`?`auto`:`180px`}));return l`object-fit:cover;${n}`}),h=s(r).withConfig({displayName:`DescriptionRoot`,componentId:`sc-p2v9ao-1`})`margin:auto 0;`,g=[3,3,5];function _(e){let t=(0,f.c)(35),{data:r,onPrimaryClick:o,onSecondaryClick:s,layout:c,border:l,align:_}=e,v=c===void 0?`vertical`:c,y=l===void 0||l,b=_===void 0?`flex-start`:_,x=v===`horizontal`?`row`:`column`,S;t[0]===x?S=t[1]:(S=[`column`,`column`,x],t[0]=x,t[1]=S);let C=S,w;t[2]!==r.image||t[3]!==C?(w=r.image&&(0,p.jsx)(m,{src:r.image.asset.url,alt:r.image.asset.altText??``,$direction:C}),t[2]=r.image,t[3]=C,t[4]=w):w=t[4];let T=v===`horizontal`?g:3,E;t[5]===r.descriptionText?E=t[6]:(E=(0,p.jsx)(n,{blocks:r.descriptionText}),t[5]=r.descriptionText,t[6]=E);let D;t[7]!==b||t[8]!==E?(D=(0,p.jsx)(a,{gap:4,flexDirection:`column`,alignItems:b,children:E}),t[7]=b,t[8]=E,t[9]=D):D=t[9];let O=b===`center`?`center`:`flex-end`,k;t[10]!==r.secondaryButton.text||t[11]!==r.secondaryButton.url||t[12]!==s?(k=r.secondaryButton.text&&(0,p.jsx)(i,{mode:`bleed`,text:r.secondaryButton.text,tone:`default`,iconRight:d,...r.secondaryButton.url&&{target:`_blank`,rel:`noopener noreferrer`,as:`a`,href:r.secondaryButton.url},onClick:s}),t[10]=r.secondaryButton.text,t[11]=r.secondaryButton.url,t[12]=s,t[13]=k):k=t[13];let A;t[14]===r.ctaButton.url?A=t[15]:(A=r.ctaButton.url&&{target:`_blank`,rel:`noopener noreferrer`,as:`a`,href:r.ctaButton.url},t[14]=r.ctaButton.url,t[15]=A);let j;t[16]!==r.ctaButton.text||t[17]!==o||t[18]!==A?(j=(0,p.jsx)(i,{text:r.ctaButton.text,tone:`default`,...A,onClick:o}),t[16]=r.ctaButton.text,t[17]=o,t[18]=A,t[19]=j):j=t[19];let M;t[20]!==k||t[21]!==j||t[22]!==O?(M=(0,p.jsxs)(a,{gap:2,justifyContent:O,marginTop:5,children:[k,j]}),t[20]=k,t[21]=j,t[22]=O,t[23]=M):M=t[23];let N;t[24]!==M||t[25]!==T||t[26]!==D?(N=(0,p.jsxs)(h,{paddingX:3,paddingY:T,children:[D,M]}),t[24]=M,t[25]=T,t[26]=D,t[27]=N):N=t[27];let P;t[28]!==C||t[29]!==N||t[30]!==w?(P=(0,p.jsxs)(a,{flexDirection:C,gap:2,children:[w,N]}),t[28]=C,t[29]=N,t[30]=w,t[31]=P):P=t[31];let F;return t[32]!==y||t[33]!==P?(F=(0,p.jsx)(u,{radius:3,overflow:`hidden`,border:y,children:P}),t[32]=y,t[33]=P,t[34]=F):F=t[34],F}export{_ as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Ao as t,Es as n,Ia as r,Ic as i,Jc as a,La as o,Ms as s,Na as c,Nd as l,On as u,Sd as d,Wr as f,dc as p,f as m,ns as h,oc as g,pc as _,qc as v,rc as y,sc as b,tn as x}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as S,t as C}from"./jsx-runtime-BpzPEenQ.js";import{t as w}from"./compiler-runtime-sKsOXjDo.js";import{$t as ee,D as T,V as E,ir as te,nn as D,rr as ne,t as O,vn as re}from"./types--2f-avvL-DfAXA8nG.js";import{Et as ie,Gt as k,St as A,ct as j,r as ae,t as M}from"./dist-LVcARZxB.js";import{t as oe}from"./ChevronDown-BpYUc-AP.js";import{t as N}from"./Remove-B96Rrnq-.js";import{t as P}from"./ErrorOutline-Cl-3_nRG.js";import{a as F,r as I,s as L}from"./ConditionMismatchIndicator-_CvVlfbg-C52eZmJT.js";var se=e(S(),1),R=w(),z=C(),B=`y8t4tj0`;function V(e){let t=(0,R.c)(17),{prefix:n,tone:r,children:i,onRemove:a,removeLabel:o,label:s}=e,c;t[0]===n?c=t[1]:(c=(0,z.jsx)(M,{paddingX:2,children:(0,z.jsx)(A,{size:1,children:n})}),t[0]=n,t[1]=c);let l;t[2]!==i||t[3]!==s?(l=s?(0,z.jsx)(O,{text:s,children:i}):i,t[2]=i,t[3]=s,t[4]=l):l=t[4];let u;t[5]!==a||t[6]!==o?(u=a&&o?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:B}),(0,z.jsx)(y,{"aria-label":o,"data-testid":`perspective-filter-remove`,icon:N,mode:`bleed`,onClick:a,tooltipProps:{content:o}})]}):null,t[5]=a,t[6]=o,t[7]=u):u=t[7];let d;t[8]!==l||t[9]!==u?(d=(0,z.jsxs)(ae,{alignItems:`center`,children:[l,u]}),t[8]=l,t[9]=u,t[10]=d):d=t[10];let f;t[11]!==d||t[12]!==r?(f=(0,z.jsx)(ie,{tone:r,radius:2,border:!0,children:d}),t[11]=d,t[12]=r,t[13]=f):f=t[13];let p;return t[14]!==c||t[15]!==f?(p=(0,z.jsxs)(ae,{alignItems:`center`,"data-ui":`PerspectiveFilter`,children:[c,f]}),t[14]=c,t[15]=f,t[16]=p):p=t[16],p}function ce(e){let t=(0,R.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,z.jsx)(`path`,{d:`M12.6093 7.89167C12.6342 7.89773 12.6593 7.90569 12.6835 7.91609L12.7538 7.95417L12.7607 7.95906L12.7665 7.96394L12.8154 8.00398L12.8212 8.00788L12.8261 8.01374L16.9863 12.1739C17.0078 12.1955 17.0284 12.2189 17.0458 12.2452C17.08 12.2968 17.102 12.3542 17.1132 12.4122C17.1244 12.4702 17.1244 12.53 17.1132 12.588C17.102 12.6459 17.0797 12.7026 17.0458 12.754C17.0283 12.7805 17.0079 12.8046 16.9863 12.8262L12.8261 16.9864C12.6457 17.1666 12.3541 17.1667 12.1738 16.9864L8.0136 12.8262C7.83335 12.6459 7.83335 12.3543 8.0136 12.1739L12.1738 8.01374C12.2923 7.89524 12.4585 7.85506 12.6093 7.89167ZM8.99211 12.4991L12.4999 16.0069L16.0068 12.4991L12.4999 8.99226L8.99211 12.4991Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:.3}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,z.jsx)(`svg`,{"data-sanity-icon":`rhombus-outlined`,width:`1em`,height:`1em`,viewBox:`0 0 25 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:n,...r,children:i}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}var H=`_1w1auht0`,U=k(p).withConfig({displayName:`StyledMenu`,componentId:`sc-l5zka1-0`})`min-width:240px;max-width:320px;> [data-ui='Stack']{gap:0;}`,le=k(A).withConfig({displayName:`SectionHeader`,componentId:`sc-l5zka1-1`})`text-transform:uppercase;letter-spacing:0.04em;`;function W(e){let t=(0,R.c)(24),{isSelected:n,onSelect:r,variant:i}=e,{t:o}=d(re),s=i.conditions,l;t[0]===i?l=t[1]:(l=x(i),t[0]=i,t[1]=l);let u=F(s,l),f;t[2]!==u||t[3]!==o?(f=u.length>0?I(o,u):void 0,t[2]=u,t[3]=o,t[4]=f):f=t[4];let p=f,m;t[5]===i._id?m=t[6]:(m=v(i._id),t[5]=i._id,t[6]=m);let h=`variant-${m}`,g;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,z.jsx)(A,{size:2,className:H,children:(0,z.jsx)(c,{})}),t[7]=g):g=t[7];let _;t[8]===u.length?_=t[9]:(_=u.length>0?(0,z.jsx)(`span`,{"data-testid":`variant-condition-mismatch`,children:(0,z.jsx)(E,{icon:P,tone:`critical`})}):void 0,t[8]=u.length,t[9]=_);let y;t[10]!==r||t[11]!==i?(y=()=>r(i),t[10]=r,t[11]=i,t[12]=y):y=t[12];let S;t[13]===i?S=t[14]:(S=a(i),t[13]=i,t[14]=S);let C;t[15]===p?C=t[16]:(C=p?{content:(0,z.jsx)(A,{muted:!0,size:1,children:p})}:void 0,t[15]=p,t[16]=C);let w;return t[17]!==n||t[18]!==h||t[19]!==_||t[20]!==y||t[21]!==S||t[22]!==C?(w=(0,z.jsx)(b,{"data-testid":h,icon:g,iconRight:_,onClick:y,pressed:n,selected:n,text:S,tooltipProps:C}),t[17]=n,t[18]=h,t[19]=_,t[20]=y,t[21]=S,t[22]=C,t[23]=w):w=t[23],w}function G(e){let t=(0,R.c)(52),{trigger:r,typeKey:a}=e,o=a===void 0?m:a,{t:c}=d(re),l=D(),{data:u}=n(),[f,p]=(0,se.useState)(``),{selectedVariants:h}=s(),v;if(t[0]!==o||t[1]!==u){let e;t[3]===o?e=t[4]:(e=e=>x(e)===o,t[3]=o,t[4]=e),v=u.filter(e),t[0]=o,t[1]=u,t[2]=v}else v=t[2];let y=v,S;if(t[5]!==h||t[6]!==y){let e;t[8]===h?e=t[9]:(e=e=>h.some(t=>t?._id===e._id),t[8]=h,t[9]=e),S=y.find(e),t[5]=h,t[6]=y,t[7]=S}else S=t[7];let C=S,w;t[10]!==f||t[11]!==y?(w=i(y,f),t[10]=f,t[11]=y,t[12]=w):w=t[12];let ee=w,T;t[13]!==l||t[14]!==o?(T=()=>{l({type:o,variantId:void 0}),p(``)},t[13]=l,t[14]=o,t[15]=T):T=t[15];let E=T,te;t[16]!==l||t[17]!==o?(te=e=>{l({type:o,variantId:e._id}),p(``)},t[16]=l,t[17]=Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{Hr as i,Io as a,Jo as o,Ko as s,Ra as c,Ro as l,_i as u,bl as d,gi as f,ma as p,pi as ee,so as te,to as ne}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as re,a as ie,b as m,d as h,i as ae,l as g,t as _,x as v}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{Ft as y,Q as oe,ft as b,gt as x}from"./dist-BOMXfkZi.js";import{t as S}from"./ChevronDown-BpYUc-AP.js";import{t as C}from"./Remove-B96Rrnq-.js";import{b as w,x as T}from"./releases.telemetry-B5f7B-by-Big6UBEW.js";import{t as se}from"./i18n-wE_ar7lY-CIg8gZHf.js";import{o as ce,r as E,t as D}from"./GlobalPerspectiveMenu-pECu-cdV-DxuNOpED.js";import{t as O}from"./useReleasesToolAvailable-CO-nywsk-CUFWvAZp.js";var k=e(t(),1),le=r(),A=n(),j=`y8t4tj0`;function M(e){let t=(0,le.c)(17),{prefix:n,tone:r,children:i,onRemove:a,removeLabel:o,label:s}=e,c;t[0]===n?c=t[1]:(c=(0,A.jsx)(m,{paddingX:2,children:(0,A.jsx)(b,{size:1,children:n})}),t[0]=n,t[1]=c);let l;t[2]!==i||t[3]!==s?(l=s?(0,A.jsx)(D,{text:s,children:i}):i,t[2]=i,t[3]=s,t[4]=l):l=t[4];let u;t[5]!==a||t[6]!==o?(u=a&&o?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:j}),(0,A.jsx)(_,{"aria-label":o,"data-testid":`perspective-filter-remove`,icon:C,mode:`bleed`,onClick:a,tooltipProps:{content:o}})]}):null,t[5]=a,t[6]=o,t[7]=u):u=t[7];let d;t[8]!==l||t[9]!==u?(d=(0,A.jsxs)(v,{alignItems:`center`,children:[l,u]}),t[8]=l,t[9]=u,t[10]=d):d=t[10];let f;t[11]!==d||t[12]!==r?(f=(0,A.jsx)(x,{tone:r,radius:2,border:!0,children:d}),t[11]=d,t[12]=r,t[13]=f):f=t[13];let p;return t[14]!==c||t[15]!==f?(p=(0,A.jsxs)(v,{alignItems:`center`,"data-ui":`PerspectiveFilter`,children:[c,f]}),t[14]=c,t[15]=f,t[16]=p):p=t[16],p}function ue(e){let t=(0,le.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,A.jsx)(`path`,{d:`M12.6093 7.89167C12.6342 7.89773 12.6593 7.90569 12.6835 7.91609L12.7538 7.95417L12.7607 7.95906L12.7665 7.96394L12.8154 8.00398L12.8212 8.00788L12.8261 8.01374L16.9863 12.1739C17.0078 12.1955 17.0284 12.2189 17.0458 12.2452C17.08 12.2968 17.102 12.3542 17.1132 12.4122C17.1244 12.4702 17.1244 12.53 17.1132 12.588C17.102 12.6459 17.0797 12.7026 17.0458 12.754C17.0283 12.7805 17.0079 12.8046 16.9863 12.8262L12.8261 16.9864C12.6457 17.1666 12.3541 17.1667 12.1738 16.9864L8.0136 12.8262C7.83335 12.6459 7.83335 12.3543 8.0136 12.1739L12.1738 8.01374C12.2923 7.89524 12.4585 7.85506 12.6093 7.89167ZM8.99211 12.4991L12.4999 16.0069L16.0068 12.4991L12.4999 8.99226L8.99211 12.4991Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:.3}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,A.jsx)(`svg`,{"data-sanity-icon":`rhombus-outlined`,width:`1em`,height:`1em`,viewBox:`0 0 25 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:n,...r,children:i}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}var N=`_1w1auht0`,de=y(g).withConfig({displayName:`StyledMenu`,componentId:`sc-scbwyh-0`})`min-width:240px;max-width:320px;> [data-ui='Stack']{gap:0;}`,P=y(b).withConfig({displayName:`SectionHeader`,componentId:`sc-scbwyh-1`})`text-transform:uppercase;letter-spacing:0.04em;`;function fe(e){let t=(0,le.c)(43),{trigger:n}=e,{t:r}=re(se),c=i(),u=ce(),{data:d}=ne(),[f,p]=(0,k.useState)(``),te=c.stickyParams.variant??void 0,g;t[0]===te?g=t[1]:(g=a(te),t[0]=te,t[1]=g);let _=g,y;t[2]!==_||t[3]!==d?(y=_?d.find(e=>e._id===_):void 0,t[2]=_,t[3]=d,t[4]=y):y=t[4];let x=y,S;t[5]!==f||t[6]!==d?(S=l(d,f),t[5]=f,t[6]=d,t[7]=S):S=t[7];let C=S,w;t[8]===u?w=t[9]:(w=()=>{u({variantId:void 0}),p(``)},t[8]=u,t[9]=w);let T=w,E;t[10]===u?E=t[11]:(E=e=>{u({variantId:e._id}),p(``)},t[10]=u,t[11]=E);let D=E,O;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{p(e.currentTarget.value)},t[12]=O):O=t[12];let j=O,M;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>{p(``)},t[13]=M):M=t[13];let fe=M,F=!x,I;t[14]===r?I=t[15]:(I=r(`navbar.variant.filter-placeholder`),t[14]=r,t[15]=I);let L;t[16]!==f||t[17]!==I?(L=(0,A.jsx)(m,{padding:2,children:(0,A.jsx)(oe,{fontSize:1,onChange:j,placeholder:I,radius:2,value:f})}),t[16]=f,t[17]=I,t[18]=L):L=t[18];let R;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,A.jsx)(b,{size:2,className:N,children:(0,A.jsx)(ue,{})}),t[19]=R):R=t[19];let z;t[20]===r?z=t[21]:(z=r(`navbar.variant.default`),t[20]=r,t[21]=z);let B;t[22]!==T||t[23]!==F||t[24]!==z?(B=(0,A.jsx)(m,{paddingX:2,paddingY:1,children:(0,A.jsx)(ie,{"data-testid":`variant-default`,icon:R,onClick:T,pressed:F,selected:F,text:z})}),t[22]=T,t[23]=F,t[24]=z,t[25]=B):B=t[25];let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,A.jsx)(h,{}),t[26]=V):V=t[26];let H;t[27]!==C||t[28]!==D||t[29]!==x?._id||t[30]!==r?(H=C.length>0&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(m,{paddingX:2,children:(0,A.jsxs)(v,{paddingTop:3,paddingBottom:2,gap:2,paddingLeft:3,children:[(0,A.jsx)(m,{className:`_1w1auht1`}),(0,A.jsx)(m,{childLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{As as i,Dl as a,Eo as o,Fl as s,Go as c,Hr as l,Il as u,Io as d,Jo as f,Ko as p,La as m,Ll as h,Lr as g,Ml as _,Mr as v,Nl as y,Pl as b,Qa as x,Ro as S,Ta as C,To as w,Ts as T,Uc as E,Uo as D,Wo as O,Yc as k,Yi as A,da as j,dl as M,es as N,fl as P,fo as F,gc as I,ha as L,hc as R,jl as z,jo as ee,js as B,kn as V,la as H,m as te,ma as U,ns as ne,nu as W,os as re,pl as ie,qc as ae,ti as oe,to as se,tu as ce,vl as le,vo as ue}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{N as G,a as de,b as K,d as fe,i as pe,l as me,o as he,s as ge,t as _e,x as q}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{M as ve,R as ye}from"./authStore-CtE9bLHW-D5dT_tdN.js";import{h as be,o as xe}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{t as Se}from"./map-UaEckSmz.js";import{K as Ce,M as we,Q as Te,S as Ee,Vt as De,_ as Oe,b as ke,dt as J,ft as Y,gt as Ae,i as je,s as Me}from"./dist-BOMXfkZi.js";import{i as Ne}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import"./draftUtils-D3HJGQaW-BnJ8Os95.js";import{t as Pe}from"./Close-B_ZEgT1V.js";import{t as Fe}from"./Checkmark-OT7tsNpL.js";import{t as Ie}from"./Clock-ClG7Ty9T.js";import{t as Le}from"./Calendar-DCYqUUNo.js";import{t as Re}from"./Search-QbUIQb6W.js";import{t as ze}from"./EarthGlobe-Dqu4Dt_R.js";import{t as Be}from"./ErrorOutline-Cl-3_nRG.js";import{t as Ve}from"./EllipsisHorizontal-BuWLk1Hy.js";import{t as He}from"./EarthAmericas-DLWVWv9X.js";import{t as Ue}from"./Edit-CAHlBqGT.js";import{t as We}from"./Trash-BxG6GrjH.js";import{t as Ge}from"./Add-CwQ5TpM8.js";import{t as Ke}from"./HelpCircle-8HZ3whUD.js";import{t as qe}from"./Documents-C8KrBFzU.js";import{t as Je}from"./Desktop-msdzf3th.js";import{t as Ye}from"./Sort-CFTgH29c.js";import{i as Xe}from"./useBundleDocuments-COX6yIJF--Mmq8r9n.js";import{t as Ze}from"./plugin-Cc1O7Ixm-Dk-6-U3N.js";import{t as Qe}from"./CheckmarkCircle-B6SBY4QE.js";import{t as X}from"./i18n-wE_ar7lY-CIg8gZHf.js";import{t as $e}from"./RelativeTime-Dxz29E4j-CPrzVxaW.js";import{t as et}from"./ToneIcon-DgovBh2L-Cc0bZCsU.js";import{t as tt}from"./useDocumentPreviewValues-Df5XHGi_-HMtAXFMO.js";import{t as nt}from"./Users-BDbacX-A.js";import{t as rt}from"./Star-_p_HG-Ts.js";import{t as it}from"./SplitVertical-uh7MyVDf.js";import{t as at}from"./Target-6sSmw-4o.js";import{CaseIcon as ot}from"./Case-DLvh8XKv.js";import{FilterIcon as st}from"./Filter-DVm6AUFi.js";import{MobileDeviceIcon as ct}from"./MobileDevice-Clwl1mh3.js";import{PackageIcon as lt}from"./Package-Cu1J_18S.js";import{RocketIcon as ut}from"./Rocket-Bz8xe-Ev.js";import{TagIcon as dt}from"./Tag-B92Ks4XI.js";import{TranslateIcon as ft}from"./Translate-BQn_K-lK.js";import{UserIcon as pt}from"./User-BbvVoXNB.js";import{a as mt,c as ht,i as gt,n as _t,r as vt,s as yt,t as bt,u as xt}from"./searchDocumentRelease-CFFIh_uo-DtyZJpEI.js";function St(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ct(e){return typeof e==`object`&&!!e&&typeof e._key==`string`&&e._key||null}function wt(e,t){if(typeof t==`number`)return Et(e.length,t);if(s(t)){let n=e.findIndex(e=>Ct(e)===t._key);return n===-1?null:n}throw Error(`Expected path segment to be addressing a single array item either by numeric index or by '_key'. Instead saw ${JSON.stringify(t)}`)}function Tt(e,t){return e===`before`?t:t+1}function Et(e,t){if(e===0&&(t===-1||t===0))return 0;let n=t<0?e+t:t;return n>=e||n<0?null:n}function Dt(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function Ot(e,t){let n={...e};for(let e of t)delete n[e];return n}function kt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "insert()" on non-array value`);let n=wt(t,e.referenceItem);if(n===null)throw Error(`Found no matching array element to insert ${e.position}`);return t.length===0?e.items:Dt(t,Tt(e.position,n),0,e.items)}function At(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "upsert()" on non-array value`);if(e.items.length===0)return t;let n={},r=[];e.items.forEach((e,i)=>{let a=t.findIndex(t=>t?._key===e._key);a>=0?n[a]=i:r.push(e)});let i=Object.keys(n);if(i.length===0&&r.length==0)return t;let a=[...t];for(let t of i){let r=Number(t);a[r]=e.items[n[r]]}return kt({items:r,referenceItem:e.referenceItem,position:e.position},a)}function jt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "insertIfMissing()" on non-array value`);if(e.items.length===0)return t;let n=e.items.filter(e=>!t.find(t=>e._key===t?._key));return n.length===0?t:kt({items:n,referenceItem:e.referenceItem,position:e.position},t)}function Mt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "replace()" on non-array value`);let n=wt(t,e.referenceItem);if(n===null)throw Error(`Found no matching array element to replace`);return Dt(t,n,e.items.length,e.items)}function Nt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "remove()" on non-array value`);let n=wt(t,e.referenceItem);if(n===nuLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{$d as t,Al as n,Ao as r,Ar as i,Cc as a,Cs as o,Es as s,Ft as c,Gc as l,Ho as u,Ic as d,Jc as f,Jd as p,Kc as m,Nd as h,Oc as g,Pc as _,Pr as v,Qd as y,Sd as b,Tl as x,To as S,Tu as C,Ul as w,Wc as T,Wd as E,Wr as D,Xd as O,Yd as k,Ys as A,Zd as j,_ as M,am as N,cc as P,da as F,dc as I,dd as L,do as R,ec as z,ed as B,ef as V,el as ee,f as H,fd as U,im as te,ir as W,jd as G,jl as K,jo as ne,lc as re,nc as ie,nl as ae,oc as oe,ol as se,pc as ce,pd as le,qc as ue,rc as q,sc as de,sd as fe,tn as pe,ts as me,wl as he,wo as ge,wu as _e,zs as ve}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{n as ye,t as be}from"./jsx-runtime-BpzPEenQ.js";import{t as xe}from"./compiler-runtime-sKsOXjDo.js";import{X as Se,ct as Ce,ht as we,nt as Te,rt as Ee,xt as De}from"./clientStore-Cq3vrK4Q-X8Ukd-3S.js";import{In as Oe,Lt as ke,Mn as Ae,N as je,Pn as Me,U as Ne,V as Pe,vn as Fe}from"./types--2f-avvL-DfAXA8nG.js";import{A as Ie,B as Le,Et as Re,O as ze,St as J,T as Be,Zt as Ve,bt as He,ct as Ue,et as We,f as Ge,n as Ke,r as Y,s as qe,t as X,xt as Je,yt as Ye}from"./dist-LVcARZxB.js";import{o as Xe}from"./stegaClean-YZRATV86-BdUaXCkw.js";import{t as Ze}from"./Close-B_ZEgT1V.js";import{t as Qe}from"./ChevronDown-BpYUc-AP.js";import{t as $e}from"./Checkmark-OT7tsNpL.js";import{t as et}from"./Clock-ClG7Ty9T.js";import{t as tt}from"./Calendar-DCYqUUNo.js";import{t as nt}from"./Search-QbUIQb6W.js";import{t as rt}from"./EarthGlobe-Dqu4Dt_R.js";import{t as it}from"./EllipsisHorizontal-BuWLk1Hy.js";import{t as at}from"./ErrorOutline-Cl-3_nRG.js";import{t as ot}from"./EarthAmericas-DLWVWv9X.js";import{t as st}from"./Trash-BxG6GrjH.js";import{t as ct}from"./Edit-CAHlBqGT.js";import{t as lt}from"./Documents-C8KrBFzU.js";import{t as ut}from"./Add-CwQ5TpM8.js";import{t as dt}from"./HelpCircle-8HZ3whUD.js";import{t as ft}from"./Desktop-msdzf3th.js";import{t as pt}from"./Sort-CFTgH29c.js";import{t as mt}from"./CheckmarkCircle-B6SBY4QE.js";import{t as ht}from"./Users-BDbacX-A.js";import{t as gt}from"./Star-_p_HG-Ts.js";import{t as _t}from"./SplitVertical-uh7MyVDf.js";import{t as vt}from"./Target-6sSmw-4o.js";import{CaseIcon as yt}from"./Case-DLvh8XKv.js";import{FilterIcon as bt}from"./Filter-DVm6AUFi.js";import{MobileDeviceIcon as xt}from"./MobileDevice-Clwl1mh3.js";import{PackageIcon as St}from"./Package-Cu1J_18S.js";import{RocketIcon as Ct}from"./Rocket-Bz8xe-Ev.js";import{TagIcon as wt}from"./Tag-B92Ks4XI.js";import{TranslateIcon as Tt}from"./Translate-BQn_K-lK.js";import{UserIcon as Et}from"./User-BbvVoXNB.js";import{a as Dt,c as Ot,i as kt,n as At,r as jt,s as Mt,t as Nt,u as Pt}from"./searchDocumentRelease-CGTwubjG-BxLZ0LzN.js";import{a as Ft,i as It,n as Lt,o as Rt,s as zt,t as Bt}from"./ConditionMismatchIndicator-_CvVlfbg-C52eZmJT.js";function Vt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ht(e){return typeof e==`object`&&!!e&&typeof e._key==`string`&&e._key||null}function Ut(e,t){if(typeof t==`number`)return Gt(e.length,t);if(y(t)){let n=e.findIndex(e=>Ht(e)===t._key);return n===-1?null:n}throw Error(`Expected path segment to be addressing a single array item either by numeric index or by '_key'. Instead saw ${JSON.stringify(t)}`)}function Wt(e,t){return e===`before`?t:t+1}function Gt(e,t){if(e===0&&(t===-1||t===0))return 0;let n=t<0?e+t:t;return n>=e||n<0?null:n}function Kt(e,t,n,r){let i=e.slice();return i.splice(t,n,...r||[]),i}function qt(e,t){let n={...e};for(let e of t)delete n[e];return n}function Jt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "insert()" on non-array value`);let n=Ut(t,e.referenceItem);if(n===null)throw Error(`Found no matching array element to insert ${e.position}`);return t.length===0?e.items:Kt(t,Wt(e.position,n),0,e.items)}function Yt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "upsert()" on non-array value`);if(e.items.length===0)return t;let n={},r=[];e.items.forEach((e,i)=>{let a=t.findIndex(t=>t?._key===e._key);a>=0?n[a]=i:r.push(e)});let i=Object.keys(n);if(i.length===0&&r.length==0)return t;let a=[...t];for(let t of i){let r=Number(t);a[r]=e.items[n[r]]}return Jt({items:r,referenceItem:e.referenceItem,position:e.position},a)}function Xt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "insertIfMissing()" on non-array value`);if(e.items.length===0)return t;let n=e.items.filter(e=>!t.find(t=>e._key===t?._key));return n.length===0?t:Jt({items:n,referenceItem:e.referenceItem,position:e.position},t)}function Zt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "replace()" on non-array value`);let n=Ut(t,e.referenceItem);if(n===null)throw Error(`Found no matching array element to replace`);return Kt(t,n,e.items.length,e.items)}function Qt(e,t){if(!Array.isArray(t))throw TypeError(`Cannot apply "remove()" on non-array value`);let n=Ut(t,e.referenceItem);if(n===null)throw Error(`Found no matching array element to replace`);return Kt(t,n,1,[])}function $t(e,t){if(!Array.isArray(t))throw TypeELine truncated
|
||||
+4199
File diff suppressed because it is too large.
Load diff
-4197
File diff suppressed because it is too large.
Load diff
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{dt as i,f as a,ft as o,gt as s,s as c}from"./dist-BOMXfkZi.js";var l=e(t(),1),u=r(),d=n(),f=`Dev server stopped`,p=class extends Error{ViteDevServerStoppedError;constructor(){super(f),this.name=`ViteDevServerStoppedError`,this.ViteDevServerStoppedError=!0}},m=void 0,h=e=>!!e,g=()=>{let e=(0,u.c)(5),[t,n]=(0,l.useState)(!1),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>n(!0),e[0]=r):r=e[0];let i=r,a,o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{h(m)&&m.on(`vite:ws:disconnect`,i)},o=[i],e[1]=a,e[2]=o):(a=e[1],o=e[2]),(0,l.useEffect)(a,o);let s;return e[3]===t?s=e[4]:(s={devServerStopped:t},e[3]=t,e[4]=s),s},_=()=>{let{devServerStopped:e}=g();if(e)throw new p;return null},v=()=>{let e=(0,u.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=h(m)?(0,d.jsx)(_,{}):null,e[0]=t):t=e[0],t},y=()=>{let e=(0,u.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[4,5,6,7],e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,d.jsx)(a,{children:f}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,d.jsx)(s,{"data-testid":`studio-error-screen`,"data-error":`Dev server stopped`,height:`fill`,overflow:`auto`,paddingY:t,paddingX:4,sizing:`border`,tone:`critical`,children:(0,d.jsx)(c,{width:3,children:(0,d.jsxs)(i,{gap:4,children:[n,(0,d.jsx)(s,{border:!0,radius:2,overflow:`auto`,padding:4,tone:`inherit`,children:(0,d.jsx)(i,{gap:4,children:(0,d.jsx)(o,{size:2,children:`The development server has stopped. You may need to restart it to continue working.`})})})]})})}),e[2]=r):r=e[2],r};export{v as DetectViteDevServerStopped,y as DevServerStoppedErrorScreen};
|
||||
@@ -0,0 +1 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{Et as i,St as a,b as o,n as s,s as c}from"./dist-LVcARZxB.js";var l=e(t(),1),u=r(),d=n(),f=`Dev server stopped`,p=class extends Error{ViteDevServerStoppedError;constructor(){super(f),this.name=`ViteDevServerStoppedError`,this.ViteDevServerStoppedError=!0}},m=void 0,h=e=>!!e,g=()=>{let e=(0,u.c)(5),[t,n]=(0,l.useState)(!1),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>n(!0),e[0]=r):r=e[0];let i=r,a,o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{h(m)&&m.on(`vite:ws:disconnect`,i)},o=[i],e[1]=a,e[2]=o):(a=e[1],o=e[2]),(0,l.useEffect)(a,o);let s;return e[3]===t?s=e[4]:(s={devServerStopped:t},e[3]=t,e[4]=s),s},_=()=>{let{devServerStopped:e}=g();if(e)throw new p;return null},v=()=>{let e=(0,u.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=h(m)?(0,d.jsx)(_,{}):null,e[0]=t):t=e[0],t},y=()=>{let e=(0,u.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[4,5,6,7],e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,d.jsx)(o,{children:f}),e[1]=n):n=e[1];let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,d.jsx)(i,{"data-testid":`studio-error-screen`,"data-error":`Dev server stopped`,height:`fill`,overflow:`auto`,paddingY:t,paddingX:4,sizing:`border`,tone:`critical`,children:(0,d.jsx)(s,{size:3,children:(0,d.jsxs)(c,{gap:4,children:[n,(0,d.jsx)(i,{border:!0,radius:2,overflow:`auto`,padding:4,tone:`inherit`,children:(0,d.jsx)(c,{gap:4,children:(0,d.jsx)(a,{size:2,children:`The development server has stopped. You may need to restart it to continue working.`})})})]})})}),e[2]=r):r=e[2],r};export{v as DetectViteDevServerStopped,y as DevServerStoppedErrorScreen};
|
||||
@@ -1,26 +0,0 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/stegaEncodeSourceMap-YR3NQ3iz-fgsj4OMe.js","static/resolveEditInfo-Cz-smq3a-CfSS_zkA.js","static/isRecord-Kfmt-nk--BGze3w87.js","static/dist-Z8cIRxoB-BxEClkut.js","static/browserUpload-D-2Rmfjo-OMjnAB4f.js","static/Observable-BrARBsae.js","static/request-BhMuKj0D-CchCio66.js","static/from-D9LOdazm.js","static/OperatorSubscriber-BASvuWFQ.js","static/resources-E6dPOk9B-iUsVGO6q.js","static/PerspectiveProvider-CVaQBlks-DQrwCBtA.js","static/rolldown-runtime-Dd_uD5pT.js","static/_singletons-C3kYIdI9.js","static/jsx-runtime-BpzPEenQ.js","static/compiler-runtime-sKsOXjDo.js","static/BehaviorSubject-CugQrNFr.js","static/Subject-UgBXjL8-.js","static/Tab-Dx6d0Ug4-B1PSmv4K.js","static/preload-helper-Czpn1I53.js","static/dist-BOMXfkZi.js","static/Spinner-Dk8hTAm3.js","static/Close-B_ZEgT1V.js","static/ChevronDown-BpYUc-AP.js","static/ToggleArrowRight-Ds3XaLpQ.js","static/Checkmark-OT7tsNpL.js","static/Remove-B96Rrnq-.js","static/ChevronRight-Cf6GkXSa.js","static/authStore-CtE9bLHW-D5dT_tdN.js","static/logger-DAtJb5RQ-Y7uUAH66.js","static/map-UaEckSmz.js","static/filter-C5fzbndz.js","static/stegaClean-BU_A08x3.js","static/dist-CXbg9KOR.js","static/clientStore-BtE2-q2i-B38VED9C.js","static/lib-BUPHIzf9.js","static/draftUtils-D3HJGQaW-BnJ8Os95.js","static/WarningOutline-DOBjmorn.js","static/Document-0Zpczu4q.js","static/Bolt-CkliNuRS.js","static/Clock-ClG7Ty9T.js","static/Dot-D4h2WemU.js","static/Calendar-DCYqUUNo.js","static/Search-QbUIQb6W.js","static/ChevronLeft-BzE8YX6u.js","static/EarthGlobe-Dqu4Dt_R.js","static/ErrorOutline-Cl-3_nRG.js","static/InfoOutline-BLtnjxbN.js","static/EllipsisHorizontal-BuWLk1Hy.js","static/EarthAmericas-DLWVWv9X.js","static/ArrowLeft-x2OZCZTu.js","static/ArrowRight-D293IkFJ.js","static/AddCircle-BZjvWs4R.js","static/Circle-DkcW-8WT.js","static/Edit-CAHlBqGT.js","static/Publish-BYF7r5nk.js","static/Timeline-X-VaErdm.js","static/Trash-BxG6GrjH.js","static/Unpublish-B0p_ZGt2.js","static/ArrowDown-CM5h1Tfl.js","static/Revert-BmEXeO7H.js","static/Image-BrMFkN0j.js","static/BulbOutline-BN--Ec2H.js","static/Unknown-CEYtdaCK.js","static/EyeOpen-DOBSuUsK.js","static/Link-Cl1VSeDJ.js","static/Add-CwQ5TpM8.js","static/AccessDenied-PrzSvkgv.js","static/Launch-DuEs-KHJ.js","static/Sync-B1MBhh7o.js","static/HelpCircle-8HZ3whUD.js","static/Documents-C8KrBFzU.js","static/Download-DeIn0VAL.js","static/ChevronUp-3VMiyA07.js","static/Upload-ChJKE2jO.js","static/ThLarge-CjFCbJnr.js","static/Ulist-CYD_2mDY.js","static/DragHandle-CKP6vPDQ.js","static/AddDocument-Ca_v8JdZ.js","static/Copy-BTQgeMVP.js","static/InsertAbove-C8i6y-4D.js","static/InsertBelow-BILWhc2X.js","static/Collapse-B22lXxln.js","static/Expand-CQC9Ec3E.js","static/BlockElement-CQIVGSb1.js","static/Bold-CGtaOUDj.js","static/Code-COts8HnY.js","static/InlineElement-BWl55c6a.js","static/Italic-BmVn7uuk.js","static/Olist-BBuinWyR.js","static/Strikethrough-BszDIkmY.js","static/Underline-BdG8-Er-.js","static/Desktop-msdzf3th.js","static/Moon-NrRkSdh3.js","static/Sun-OgXegq7_.js","static/Reset-CgCZnejz.js","static/BinaryDocument-D1GQsa0h.js","static/ReadOnly-BkEx9qPu.js","static/Lock-Ui2f2sVi.js","static/Crop-DW3NFLyK.js","static/PerspectiveProvider-CVaQBlks-VQ0ZgwGb.css","static/dist-CnLE7b4i.js","static/resources-BIyyU-1w-B0Jhq69A.js","static/VideoPlayer-lnSLx45L-PLDZXfks.js","static/CommentsInspector-DCXO30El-ChwAG44S.js","static/useComments-CVvkxQg3-CVUv-UC3.js","static/CommandList-DJKGk0Iq-Dt5aZzT5.js","static/useAddonDataset-BvCgByG6-fdH-dSqr.js","static/useCommentsEnabled-BPc3788v-CjDVtXqh.js","static/CommentsListItem-DwZqY9F--7eLKoeE7.js","static/CheckmarkCircle-B6SBY4QE.js","static/Undo-qtvfkxbn.js","static/LinkRemoved-LZtddC2J.js","static/useCommentsTelemetry-PyPsqrBr-DCqrQPLx.js","static/useCommentsSelectedPath-D5HXM3NF-DGscP8oF.js","static/UpsellPanel-BzCgrrZO-BKE9DmdX.js","static/useCommentsUpsell-a8ecO894-C8eFiI7z.js","static/CommentsDocumentLayout-ktZlUHl--05-Y95Wu.js","static/CommentsSelectedPathProvider-BpUQa6SK-BUkvAe53.js","static/CommentsField-DSfLu0_J-BRvehNVM.js","static/Comment-CPMW8FMx.js","static/AddComment-DzLuhpXr.js","static/CommentsInput-BwVg7yVG-CHiaP6o9.js","static/buildTextSelectionFromFragment-DGgSjC7F-DWdaMBxz.js","static/CommentsStudioLayout-BMmoJh1t-avYJaAab.js","static/AddonDatasetProvider-C26Rc0B9-BQLPb_HX.js","static/Tool-Cu6ngX53-C5ZqioyC.js","static/Sort-CFTgH29c.js","static/ScheduledPublishingEnabledProvider-Bsqi_oGE-ifxCN0BN.js","static/validationUtils-BmZy4eyG-CdX1fJfy.js","static/SingleDocReleaseUpsellProvider-6B58QoVy-Cr1fZ6ra.js","static/plugin-CfnAN8IH-BsbRbVsz.js","static/useScheduledDraftMenuActions-Cn0nU-oE-CETpe1XB.js","static/useBundleDocuments-COX6yIJF--Mmq8r9n.js","static/scheduleItem-DlZ2dANV-5erJqKQi.js","static/SchedulePublishingUpsellProvider-DEWq56BP-Cs5120Xl.js","static/schedules-6ZvpdVC8-DDoGp6dg.js","static/sanity-CoxvCVZ8.js","static/lib-fMxT732z.js","static/SearchProvider-BoC91Z5A-C4CoG1BJ.js","static/Controls-Dx7QJOxz.js","Line truncated
|
||||
import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{E as n,St as r,Vt as i,g as a,m as o,s}from"./_singletons-C3kYIdI9.js";import{n as c,t as l}from"./jsx-runtime-BpzPEenQ.js";import{t as u}from"./compiler-runtime-sKsOXjDo.js";import{$ as d,$a as f,$o as p,Aa as m,Ac as h,Ar as g,Ba as _,Bi as v,Bo as y,Br as b,Bs as x,Bt as S,Co as C,Cs as w,Dr as T,Dt as E,Ec as D,En as O,Er as k,Et as A,F as j,Fr as M,Ft as N,G as P,Ga as F,Gc as I,Gs as L,Hc as R,Ho as ee,Hs as z,Ht as te,I as ne,Ii as re,In as ie,Ir as ae,Is as oe,Jn as B,Js as se,K as ce,Ka as le,Kc as ue,Kn as de,Li as fe,Lt as pe,M as V,Ma as me,Mc as he,Mn as ge,N as _e,Na as ve,Nc as ye,Ns as be,Oa as xe,Oc as Se,Or as Ce,Os as we,P as Te,Pa as Ee,Pn as De,Ps as Oe,Q as ke,Qa as Ae,Qs as je,Ri as Me,Rt as Ne,Ss as Pe,Su as Fe,Tn as Ie,To as Le,Tr as Re,Ts as ze,Tt as Be,Uc as Ve,Ui as He,Un as Ue,Uo as We,Ur as Ge,Vi as Ke,Vs as qe,Vt as Je,Wt as Ye,Xc as Xe,Xs as Ze,Yc as Qe,Yi as $e,Yo as et,Z as tt,Zc as nt,Zl as rt,Zo as it,Zr as at,_l as ot,_n as st,_s as ct,_u as lt,a as ut,ac as dt,ai as ft,al as pt,an as mt,as as ht,at as gt,bl as _t,bo as vt,bu as yt,cc as bt,cl as xt,cn as St,co as Ct,cs as wt,cu as Tt,da as Et,do as Dt,el as Ot,et as kt,eu as At,fc as jt,fn as Mt,ft as Nt,gl as Pt,gs as Ft,gu as It,hl as Lt,hn as Rt,hs as zt,ht as Bt,hu as Vt,i as Ht,ia as Ut,ic as Wt,in as Gt,io as Kt,jc as qt,jr as Jt,k as Yt,kc as Xt,kr as Zt,kt as Qt,la as $t,ln as en,lt as tn,lu as nn,ma as rn,mc as an,ml as on,mn as sn,ms as cn,no as ln,o as un,oa as dn,ol as fn,on as pn,pc as mn,pt as hn,qa as gn,qi as _n,qn as vn,qr as yn,qs as bn,r as xn,ra as Sn,rl as Cn,ro as wn,ru as Tn,sc as En,si as Dn,so as On,t as kn,tl as An,ts as jn,tu as Mn,u as Nn,un as Pn,uo as Fn,ur as In,ut as Ln,v as Rn,vl as zn,vo as Bn,vs as Vn,wc as Hn,ws as Un,xl as Wn,xn as Gn,xs as Kn,xt as qn,yc as Jn,yl as Yn,yn as Xn,z as Zn,za as Qn,zt as $n}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{L as er,M as tr,N as H,R as nr,a as rr,b as ir,i as ar,j as or,l as sr,n as cr,s as lr,t as ur,w as dr,x as fr}from"./Tab-Dx6d0Ug4-B1PSmv4K.js";import{c as pr,t as mr}from"./Observable-BrARBsae.js";import{i as hr,n as gr}from"./OperatorSubscriber-BASvuWFQ.js";import{t as _r}from"./Subject-UgBXjL8-.js";import{t as vr}from"./BehaviorSubject-CugQrNFr.js";import{F as yr,G as br,H as xr,I as Sr,J as Cr,K as wr,M as Tr,N as Er,P as Dr,R as Or,U as kr,W as Ar,X as jr,Z as Mr,tt as Nr}from"./authStore-CtE9bLHW-D5dT_tdN.js";import{b as Pr,h as Fr,i as Ir,l as Lr,m as Rr,o as zr,s as Br}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{o as Vr,t as Hr}from"./from-D9LOdazm.js";import{t as U}from"./map-UaEckSmz.js";import{n as Ur,t as Wr}from"./filter-C5fzbndz.js";import{A as Gr,C as Kr,D as qr,E as Jr,S as Yr,T as Xr,h as Zr,l as Qr,m as $r,n as ei,v as ti,w as ni}from"./SearchProvider-BoC91Z5A-C4CoG1BJ.js";import{f as ri,p as ii}from"./useScheduledDraftMenuActions-Cn0nU-oE-CETpe1XB.js";import{r as ai}from"./dist-CXbg9KOR.js";import{t as oi}from"./preload-helper-Czpn1I53.js";import{F as si,K as ci,N as li,O as ui,c as di,r as fi,z as pi}from"./lib-BUPHIzf9.js";import{At as mi,C as hi,Ft as gi,Ht as _i,I as vi,J as yi,M as bi,Mt as xi,Nt as Si,O as Ci,Q as wi,V as Ti,_ as Ei,ct as Di,dt as Oi,f as ki,ft as Ai,g as ji,gt as Mi,i as Ni,mt as Pi,v as Fi}from"./dist-BOMXfkZi.js";import{t as Ii}from"./isRecord-Kfmt-nk--BGze3w87.js";import{a as Li,i as Ri,l as zi,o as Bi,r as Vi,s as Hi}from"./resolveEditInfo-Cz-smq3a-CfSS_zkA.js";import{a as Ui,o as Wi}from"./draftUtils-D3HJGQaW-BnJ8Os95.js";import{t as Gi}from"./WarningOutline-DOBjmorn.js";import{a as Ki,i as W,l as qi,n as Ji,o as Yi,t as Xi}from"./request-BhMuKj0D-CchCio66.js";import{t as Zi}from"./ChevronDown-BpYUc-AP.js";import{t as Qi}from"./ChevronRight-Cf6GkXSa.js";import{t as $i}from"./Document-0Zpczu4q.js";import{t as ea}from"./Clock-ClG7Ty9T.js";import{t as ta}from"./Calendar-DCYqUUNo.js";import{t as na}from"./Search-QbUIQb6W.js";import{t as ra}from"./ChevronLeft-BzE8YX6u.js";import{t as ia}from"./ArrowLeft-x2OZCZTu.js";import{t as aa}from"./ArrowRight-D293IkFJ.js";import{t as oa}from"./Image-BrMFkN0j.js";import{t as sa}from"./Link-Cl1VSeDJ.js";import{t as ca}from"./Ulist-CYD_2mDY.js";import{t as la}from"./Copy-BTQgeMVP.js";import{t as ua}from"./Reset-CgCZnejz.js";import{t as da}from"./BinaryDocument-D1GQsa0h.js";import{n as fa}from"./CommandList-DJKGk0Iq-Dt5aZzT5.js";import{_ as pa,h as ma,m as ha,n as ga}from"./useComments-CVvkxQg3-CVUv-UC3.js";import{t as _a}from"./useAddonDataset-BvCgByG6-fdH-dSqr.js";import{t as va}from"./useCommentsEnabled-BPc3788v-CjDVtXqh.js";import{v as ya}from"./releases.telemetry-B5f7B-by-Big6UBEW.js";import{s as ba}from"./useBundleDocuments-COX6yIJF--Mmq8r9n.js";import{n as xa}from"./plugin-Cc1O7Ixm-Dk-6-U3N.js";import{n as Sa}from"./ScheduledPublishingEnabledProvider-Bsqi_oGE-ifxCN0BN.js";import{a as Ca,g as wa,h as Ta,i as Ea,o as Da,p as Oa,t as ka,u as Aa}from"./validationUtils-BmZy4eyG-CdX1fJfy.js"Line truncated
|
||||
`)===-1&&e.indexOf(`\r`)===-1){if(c<Xo&&!b(s.join(``)+e.slice(0,Xo-c))){s.length=0,c=0,h=!0;return}s.push(e),c+=e.length,x();return}s.push(e);let t=s.join(``);s.length=0,c=0,y(S(t)),x()}function v(e){if(e.length===0)return e;if(g)return g=!1,e.charCodeAt(0)===qo?e.slice(1):e;let t=e.indexOf(`\r`),n=e.indexOf(`
|
||||
`),r=t===-1?n:n===-1||t<n?t:n;return r===-1?``:r===e.length-1&&e.charCodeAt(r)===Jo?(h=!1,g=!0,``):(h=!1,e.slice(r+(e.charCodeAt(r)===Jo&&e.charCodeAt(r+1)===qo?2:1)))}function y(e){if(e){if(e.charCodeAt(e.length-1)===Jo){C(e,0,e.length-1),g=!0;return}if(b(e)){s.push(e),c=e.length;return}h=!0}}function b(e){let t=e.charCodeAt(0);return t===58&&!!n||t===100&&es(e,`data`)||t===101&&es(e,`event`)||t===105&&es(e,`id`)||t===114&&es(e,`retry`)}function x(){t!==void 0&&(c+d.length<=t||(m=!0,s.length=0,c=0,u=void 0,d=``,f=0,p=void 0,h=!1,g=!1,r?.(new Ko(`Buffered data exceeded max buffer size of ${t} characters`,{type:`max-buffer-size-exceeded`}))))}function S(e){let t=0;if(e.indexOf(`\r`)===-1){let n=e.indexOf(`
|
||||
`,t);for(;n!==-1;){if(t===n){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0,t=n+1,n=e.indexOf(`
|
||||
`,t);continue}let r=e.charCodeAt(t);if(Qo(e,t,r)){let r=e.charCodeAt(t+5)===Yo?t+6:t+5,o=e.slice(r,n);if(f===0&&e.charCodeAt(n+1)===qo){u!==void 0&&a?.(u),i?.({id:u,event:p,data:o}),u=void 0,d=``,p=void 0,t=n+2,n=e.indexOf(`
|
||||
`,t);continue}d=f===0?o:`${d}\n${o}`,f++}else $o(e,t,r)?p=e.slice(e.charCodeAt(t+6)===Yo?t+7:t+6,n)||void 0:C(e,t,n);t=n+1,n=e.indexOf(`
|
||||
`,t)}return e.slice(t)}for(;t<e.length;){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
||||
`,t),i=-1;if(n!==-1&&r!==-1?i=n<r?n:r:n===-1?r!==-1&&(i=r):i=n===e.length-1?-1:n,i===-1)break;C(e,t,i),t=i+1,e.charCodeAt(t-1)===Jo&&e.charCodeAt(t)===qo&&t++}return e.slice(t)}function C(e,t,r){if(t===r){T();return}let i=e.charCodeAt(t);if(Qo(e,t,i)){let n=e.charCodeAt(t+5)===Yo?t+6:t+5,i=e.slice(n,r);d=f===0?i:`${d}\n${i}`,f++;return}if($o(e,t,i)){p=e.slice(e.charCodeAt(t+6)===Yo?t+7:t+6,r)||void 0;return}if(i===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let n=e.slice(e.charCodeAt(t+3)===Yo?t+4:t+3,r);n.includes(`\0`)||(u=n);return}if(i===58){if(n){let i=e.slice(t,r);n(i.slice(e.charCodeAt(t+1)===Yo?2:1))}return}let a=e.slice(t,r),o=a.indexOf(`:`);if(o===-1){w(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===Yo?2:1;w(s,a.slice(o+c),a)}function w(e,t,n){switch(e){case`event`:p=t||void 0;break;case`data`:d=f===0?t:`${d}\n${t}`,f++;break;case`id`:t.includes(`\0`)||(u=t);break;case`retry`:/^\d+$/.test(t)?o?.(parseInt(t,10)):r?.(new Ko(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:n}));break;default:r?.(new Ko(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:`unknown-field`,field:e,value:t,line:n}))}}function T(){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0}function E(e={}){if(e.consume&&s.length>0){let e=s.join(``);C(e,0,e.length)}l=!0,u=void 0,d=``,f=0,p=void 0,s.length=0,c=0,m=!1,h=!1,g=!1}return{feed:_,reset:E}}function Qo(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function $o(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}function es(e,t){let n=1;for(;n<e.length&&n<t.length;){if(e.charCodeAt(n)!==t.charCodeAt(n))return!1;n++}return e.length<=t.length||e.charCodeAt(t.length)===58}var ts=104857600,ns=class extends EventTarget{static CONNECTING=0;static OPEN=1;static CLOSED=2;CONNECTING=0;OPEN=1;CLOSED=2;get readyState(){return this.#e}get url(){return this.#t.href}get withCredentials(){return this.#r}get onerror(){return this.#u}set onerror(e){this.#u&&this.removeEventListener(`error`,this.#u),this.#u=e,e&&this.addEventListener(`error`,e)}get onmessage(){return this.#d}set onmessage(e){this.#d&&this.removeEventListener(`message`,this.#d),this.#d=e,e&&this.addEventListener(`message`,e)}get onopen(){return this.#f}set onopen(e){this.#f&&this.removeEventListener(`open`,this.#f),this.#f=e,e&&this.addEventListener(`open`,e)}addEventListener(e,t,n){let r=t;super.addEventListener(e,r,n)}removeEventListener(e,t,n){let r=t;super.removeEventListener(e,r,n)}constructor(e,t){super();try{if(e instanceof URL)this.#t=e;else if(typeof e==`string`)this.#t=new URL(e,is());else throw Error(`Invalid URL`)}catch{throw Uo(`An invalid or illegal string was specified`)}this.#l=Zo({maxBufferSize:t?.maxBufferSize??ts,onEvent:this.#v,onError:this.#b,onId:this.#_,onRetry:this.#y}),this.#e=this.CONNECTING,this.#a=3e3,this.#i=t?.fetch??globalThis.fetch,this.#r=t?.withCredentials??!1,this.#p()}close(){this.#o&&clearTimeout(this.#o),this.#e!==this.CLOSED&&(this.#c&&this.#c.abort(),this.#e=this.CLOSED,this.#c=void 0)}#e;#t;#n;#r;#i;#a;#o;#s=null;#c;#l;#u=null;#d=null;#f=null;#p(){this.#e=this.CONNECTING,this.#c=new AbortController;let e=this.#i;e(this.#t,this.#g()).then(this.#m).catch(this.#h)}#m=async e=>{this.#l.reset();let{body:t,redirected:n,status:r,headers:i}=e;if(r===204){this.#x(`Server sent HTTP 204, not reconnecting`,204),this.close();return}if(this.#n=n?new URL(e.url):void 0,r!==200){this.#x(`Non-200 status code (${r})`,r);return}if(!(i.get(`content-type`)||``).startsWith(`text/event-stream`)){this.#x(`Invalid content type, expected "text/event-stream"`,r);return}if(this.#e===this.CLOSED)return;this.#e=this.OPEN;let a=new Event(`open`);if(this.dispatchEvent(a),typeof t!=`object`||!t||!(`getReader`in t)){this.#x(`Invalid response body, expected a web ReadableStream`,r),this.close();return}let o=new TextDecoder,s=t.getReader(),c=!0;do{let{done:e,value:t}=await s.read();if(this.#e===this.CLOSED){c=!1;break}t&&this.#l.feed(o.decode(t,{stream:!e})),e&&(c=!1,this.#l.reset(),this.#S())}while(c)};#h=e=>{this.#c=void 0,e.name!==`AbortError`&&e.type!==`aborted`&&this.#S(Wo(e))};#g(){let e={mode:`cors`,redirect:`follow`,headers:{Accept:`text/event-stream`,...this.#s?{"Last-Event-ID":this.#s}:void 0},cache:`no-store`,signal:this.#c?.signal};return`window`in globalThis&&(e.credentials=this.withCredentials?`include`:`same-origin`),e}#_=e=>{this.#s=e};#v=e=>{let t=this.#n?this.#n.origin:this.#t.origin,n=this.#s??``,r=new MessageEvent(e.event||`message`,{data:e.data,origin:t,lastEventId:n});r.origin!==t&&as(r,`origin`,t),r.lastEventId!==n&&as(r,`lastEventId`,n),this.dispatchEvent(r)};#y=e=>{this.#a=e};#b=e=>{e.type===`max-buffer-size-exceeded`&&(this.close(),this.#x(e.message))};#x(e,t){this.#e!==this.CLOSED&&(this.#e=this.CLOSED);let n=new Ho(`error`,{code:t,message:e});this.dispatchELine truncated
|
||||
`);throw Error(`Unknown selection - must be one of:\n\n${t}`)}function vs(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function J(e,t,n){vs(e,t),t.set(e,n)}function ys(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function Y(e,t,n){return e.set(ys(e,t),n),n}function X(e,t){return e.get(ys(e,t))}var bs=class{constructor(e,t={}){W(this,`selection`,void 0),W(this,`operations`,void 0),this.selection=e,this.operations=t}set(e){return this._assign(`set`,e)}setIfMissing(e){return this._assign(`setIfMissing`,e)}diffMatchPatch(e){return po(`diffMatchPatch`,e),this._assign(`diffMatchPatch`,e)}unset(e){if(!Array.isArray(e))throw Error(`unset(attrs) takes an array of attributes to unset, non-array given`);return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign(`inc`,e)}dec(e){return this._assign(`dec`,e)}insert(e,t,n){return yo(e,t,n),this._assign(`insert`,{[e]:t,items:n})}append(e,t){return this.insert(`after`,`${e}[-1]`,t)}prepend(e,t){return this.insert(`before`,`${e}[0]`,t)}splice(e,t,n,r){let i=n===void 0||n===-1,a=t<0?t-1:t,o=i?-1:Math.max(0,t+n),s=`${e}[${a}:${a<0&&o>=0?``:o}]`;return this.insert(`replace`,s,r||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{..._s(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,n=!0){return po(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},n&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}},xs=new WeakMap,Ss=class e extends bs{constructor(e,t,n){super(e,t),J(this,xs,void 0),Y(xs,this,n)}clone(){return new e(this.selection,{...this.operations},X(xs,this))}commit(e){if(!X(xs,this))throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=typeof this.selection==`string`,n=Object.assign({returnFirst:t,returnDocuments:!0},e);return X(xs,this).mutate({patch:this.serialize()},n)}},Cs=new WeakMap,ws=class e extends bs{constructor(e,t,n){super(e,t),J(this,Cs,void 0),Y(Cs,this,n)}clone(){return new e(this.selection,{...this.operations},X(Cs,this))}commit(e){if(!X(Cs,this))throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=typeof this.selection==`string`,n=Object.assign({returnFirst:t,returnDocuments:!0},e);return X(Cs,this).mutate({patch:this.serialize()},n)}},Ts={returnDocuments:!1},Es=class{constructor(e=[],t){W(this,`operations`,void 0),W(this,`trxId`,void 0),this.operations=e,this.trxId=t}create(e){return po(`create`,e),this._add({create:e})}createIfNotExists(e){let t=`createIfNotExists`;return po(t,e),ho(t,e),this._add({[t]:e})}createOrReplace(e){let t=`createOrReplace`;return po(t,e),ho(t,e),this._add({[t]:e})}delete(e){return mo(`delete`,e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}},Ds=new WeakMap,Os=class e extends Es{constructor(e,t,n){super(e,n),J(this,Ds,void 0),Y(Ds,this,t)}clone(){return new e([...this.operations],X(Ds,this),this.trxId)}commit(e){if(!X(Ds,this))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return X(Ds,this).mutate(this.serialize(),Object.assign({transactionId:this.trxId},Ts,e||{}))}patch(e,t){let n=typeof t==`function`,r=typeof e!=`string`&&e instanceof ws,i=typeof e==`object`&&(`query`in e||`id`in e);if(r)return this._add({patch:e.serialize()});if(n){let n=t(new ws(e,{},X(Ds,this)));if(!(n instanceof ws))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}if(i){let n=new ws(e,t||{},X(Ds,this));return this._add({patch:n.serialize()})}return this._add({patch:{id:e,...t}})}},ks=new WeakMap,As=class e extends Es{constructor(e,t,n){super(e,n),J(this,ks,void 0),Y(ks,this,t)}clone(){return new e([...this.operations],X(ks,this),this.trxId)}commit(e){if(!X(ks,this))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return X(ks,this).mutate(this.serialize(),Object.assign({transactionId:this.trxId},Ts,e||{}))}patch(e,t){let n=typeof t==`function`;if(typeof e!=`string`&&e instanceof Ss)return this._add({patch:e.serialize()});if(n){let n=t(new Ss(e,{},X(ks,this)));if(!(n instanceof Ss))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:{id:e,...t}})}},js=[`headers`,`signal`,`tag`,`timeout`,`token`];function Ms(e,t={}){let n={};e.headers&&Object.assign(n,e.headers);let r=t.token||e.token;r&&(n.Authorization=`Bearer ${r}`),!t.useG
Line truncated
|
||||
_createdAt,
|
||||
_id,
|
||||
authorId,
|
||||
contentSnapshot,
|
||||
context,
|
||||
lastEditedAt,
|
||||
message,
|
||||
parentCommentId,
|
||||
reactions,
|
||||
status,
|
||||
target,
|
||||
threadId
|
||||
} | order(_createdAt desc)`,[d,f]=(0,G.useReducer)(Zp,Qp),[p,m]=(0,G.useState)(n!==null),[h,g]=(0,G.useState)(null),_=(0,G.useRef)(!1),v;t[2]===r?v=t[3]:(v=Ri(r),t[2]=r,t[3]=v);let y;t[4]===o?y=t[5]:(y=o?{documentVersionId:o}:{},t[4]=o,t[5]=y);let b;t[6]!==v||t[7]!==y?(b={documentId:v,...y},t[6]=v,t[7]=y,t[8]=b):b=t[8];let x=b,S;t[9]!==n||t[10]!==x||t[11]!==u?(S=async()=>{if(!n){m(!1);return}try{let e=await n.fetch(u,x);f({type:`COMMENTS_SET`,comments:e}),m(!1)}catch(e){g(e)}},t[9]=n,t[10]=x,t[11]=u,t[12]=S):S=t[12];let C=S,w;t[13]!==C||t[14]!==i||t[15]!==a?(w=async e=>{if(e.type===`welcome`&&!_.current&&(m(!0),await C(),m(!1),_.current=!0),e.type===`reconnect`&&(m(!0),_.current=!1),e.type===`mutation`){if(e.transition===`appear`){let t=e.result;t&&f({type:`COMMENT_RECEIVED`,payload:t})}if(e.transition===`disappear`&&f({type:`COMMENT_DELETED`,id:e.documentId}),e.transition===`update`){let t=e.result,n=e.result?._id||``,r=e.transactionId,o=a.get(n),s=r===o;if(!s&&o)return;t&&(f({type:`COMMENT_UPDATED`,payload:t}),s&&i(n))}}},t[13]=C,t[14]=i,t[15]=a,t[16]=w):w=t[16];let T=w,E;bb0:{if(!n){let e;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=Fr(),t[17]=e):e=t[17],E=e;break bb0}let e;if(t[18]!==n.observable||t[19]!==l||t[20]!==x){let r;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>(g(e),Fr(e)),t[22]=r):r=t[22],e=n.observable.listen(`*[${l}]`,x,$p).pipe(zr(r)),t[18]=n.observable,t[19]=l,t[20]=x,t[21]=e}else e=t[21];E=e}let D=E,O,k;t[23]!==T||t[24]!==D?(O=()=>{let e=D.subscribe(T);return()=>{e?.unsubscribe()}},k=[T,D],t[23]=T,t[24]=D,t[25]=O,t[26]=k):(O=t[25],k=t[26]),(0,G.useEffect)(O,k);let A;t[27]===d.comments?A=t[28]:(A=Object.values(d.comments),t[27]=d.comments,t[28]=A);let j=A,M;return t[29]!==j||t[30]!==h||t[31]!==p?(M={data:j,dispatch:f,error:h,loading:p},t[29]=j,t[30]=h,t[31]=p,t[32]=M):M=t[32],M}function nm(e,t){let n=An(t),r=n[0];if(r&&ui(e)){let t=e?.fields?.find(e=>e.name===r);if(t){let e=xt(n.slice(1));return e?nm(t.type,e):t}}}function rm(e,t){if(typeof t==`number`)return t;let n=yn(e,t);return n!==-1&&n}function im(e){let{currentUser:t,schemaType:n,fieldPath:r,documentValue:i}=e,a=An(r),o=[],s=n;return a.forEach((e,n)=>{let r=a.slice(0,n+1),c=a.slice(0,n),l=nm(s,xt([e])),u=e.hasOwnProperty(`_key`),d=Dn(i,c),f=Dn(i,r),p={document:i,currentUser:t,parent:d,value:f,path:r};if(u&&Array.isArray(d)){let t=rm(d,e),n=typeof t==`number`;o.push({invalid:t===!1,isArrayItem:!0,title:n?`#${Number(t)+1}`:`Unknown array item`});return}if(l?.type){let e=St(l.type.hidden,p);o.push({invalid:e,isArrayItem:!1,title:Je(l.type)}),s=l.type;return}if(di(s)){let t=Dn(i,c)?._type,n=s?.of?.find(e=>e.name===t),r=n?.fields?.find(t=>t.name===e);if(!t&&f){let t=(s?.of?.map(e=>e?.fields).filter(Boolean).flat())?.find(t=>t?.name===e),n=St(t?.type?.hidden,p);t&&(o.push({invalid:n,isArrayItem:!1,title:Je(t?.type)}),s=t?.type);return}if(!r){o.push({invalid:!0,isArrayItem:!1,title:`Unknown field`});return}let a=Je(r?.type),l=St(n?.type?.hidden,p),u=St(r?.type.hidden,p),d=l||u;o.push({invalid:d,isArrayItem:!1,title:a}),s=r?.type;return}o.push({invalid:!0,isArrayItem:!1,title:`Unknown field`})}),o}var am=[];function om(e){let{comments:t,currentUser:n,documentValue:r,schemaType:i,type:a}=e,o=t?.filter(e=>!e.parentCommentId);return a===`task`?o.map(e=>{let n=t?.filter(t=>t.parentCommentId===e._id);return{commentsCount:[e,...n].length,parentComment:e,replies:n,threadId:e.threadId,hasReferencedValue:!1,breadcrumbs:am,fieldPath:``}}):a===`field`?o.map(e=>{let a=im({currentUser:n,documentValue:r,fieldPath:e.target.path?.field||``,schemaType:i}),o=!1;if(pa(e)&&(o=!!(e.target.path?.selection&&e.target.path.selection.value.some(e=>e.text))),a.some(e=>e.invalid))return;let s=t?.filter(t=>t.parentCommentId===e._id),c=[e,...s].length,l=o;return{breadcrumbs:a,commentsCount:c,fieldPath:e.target.path?.field||``,parentComment:e,replies:s,threadId:e.threadId,hasReferencedValue:l}}).filter(Boolean):am}var sm=[],cm={open:sm,resolved:sm},lm=(0,G.memo)(function(e){let t=(0,K.c)(88),{children:n,documentId:r,documentType:i,isCommentsOpen:a,onCommentsOpen:s,sortOrder:c,type:l,getCommentLink:u,onClearSelectedComment:d,selectedCommentId:f,isConnecting:p,onPathOpen:m,releaseId:h,mentionsDisabled:g}=e,_=va(),[v,y]=(0,G.useState)(`open`),{client:b,createAddonDataset:x,isCreatingDataset:S}=_a(),C;t[0]===r?C=t[1]:(C=Ri(r),t[0]=r,t[1]=C);let w=C,T=vp(w,i,`low`,h),E=ze(),D;t[2]!==i||t[3]!==E?(D=E.get(i),t[2]=i,t[3]=E,t[4]=D):D=t[4];let O=D,k=vt(),{name:A,dataset:j,projectId:M}=_t(),N;bb0:{if(h){N=T.version;break bb0}N=T.draft||T.published}let P=N,F=P?._rev,[I]=(0,G.useState)(um),L;t[5]===I?L=t[6]:(L=e=>{I.delete(e)},t[5]=I,t[6]=L);let R=L,ee;t[7]!==b||t[8]!==r||t[9]!==R||t[10]!==h||t[11]!==I?(ee={documentId:r,releaseId:h,client:b,transactionsIdMap:I,onLatestTransactionIdReceived:R},t[7]=b,t[8]=r,t[9]=R,t[10]=h,t[11]=I,t[12]=ee):ee=t[12];let{dispatch:z,data:te,error:ne,loading:re}=tm(ee),ie=te===void 0?sm:te,ae;t[13]===I?ae=t[14]:(ae=(e,t)=>{I.set(e,t)},t[13
Line truncated
|
||||
`)}\n\n`),this.name=t,this.causes=e,this.type=n}};function hm(e){let t=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0);return Math.abs(t*16807%2147483647)/2147483647}var gm=[`300`,`400`,`500`,`600`,`700`];function _m(e){let t=(0,K.c)(22),{title:n,subtitle:r}=e,i=xi(),a=i.sanity.fonts.text.family,o=i.sanity.fonts.text.weights.medium,s=`${i.sanity.fonts.text.sizes[1].fontSize}px`,c;t[0]!==r||t[1]!==n?(c=()=>hm(`${n} ${r}`),t[0]=r,t[1]=n,t[2]=c):c=t[2];let[l]=(0,G.useState)(c),u=vi.filter(bm),d=u[Math.floor(l*u.length)],f;t[3]===l?f=t[4]:(f=()=>hm(l.toString()),t[3]=l,t[4]=f);let[p]=(0,G.useState)(f),m=gm[Math.floor(p*gm.length)],h=Ti[d][m].hex,g;t[5]===n?g=t[6]:(g=n.split(/\s/g).map(ym).filter(Boolean).slice(0,2).map(vm),t[5]=n,t[6]=g);let _=g,v;if(t[7]!==h){let e=mf(h,.4),n=yf(h,.4);v=vf(h,`readable`,e)?vf(h,`readable`,n)?xf(h):n:e,t[7]=h,t[8]=v}else v=t[8];let y=v,b;t[9]===h?b=t[10]:(b=(0,q.jsx)(`rect`,{width:32,height:32,rx:2,fill:h}),t[9]=h,t[10]=b);let x;t[11]!==a||t[12]!==s||t[13]!==o?(x={fontFamily:a,fontWeight:o,fontSize:s,transform:`translateY(1px)`},t[11]=a,t[12]=s,t[13]=o,t[14]=x):x=t[14];let S;t[15]!==_||t[16]!==x||t[17]!==y?(S=(0,q.jsx)(`text`,{x:`50%`,y:`50%`,textAnchor:`middle`,alignmentBaseline:`middle`,dominantBaseline:`middle`,fill:y,style:x,children:_}),t[15]=_,t[16]=x,t[17]=y,t[18]=S):S=t[18];let C;return t[19]!==b||t[20]!==S?(C=(0,q.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:[b,S]}),t[19]=b,t[20]=S,t[21]=C):C=t[21],C}function vm(e){return[...e][0]?.toUpperCase()??``}function ym(e){return e.replace(/[^\p{L}\p{N}]/gu,``)}function bm(e){return e!==`gray`}function xm(e,t){return(0,q.jsx)(_m,{title:e,subtitle:t})}function Sm(e){return e}function Cm(e){return e}var wm=[Sm({name:`copyField`,useAction({path:e}){let t=ie(),{onCopy:n}=Ie(),{t:r}=H(`copy-paste`),i=e.length===0,a=r(`copy-paste.field-action-copy-button.document.title`),o=r(`copy-paste.field-action-copy-button.field.title`),s=i?a:o,c=(0,G.useCallback)(()=>{let r=t([]);n(e,r,{context:{source:i?`documentFieldAction`:`fieldAction`}})},[e,i,n,t]);return Cm({type:`action`,icon:la,onAction:c,title:s})}}),Sm({name:`pasteField`,useAction({path:e}){let{t}=H(`copy-paste`),n=ie(),r=e.length===0,i=t(`copy-paste.field-action-paste-button.document.title`),a=t(`copy-paste.field-action-paste-button.field.title`),o=r?i:a,{onPaste:s}=Ie(),c=(0,G.useCallback)(()=>{let t=n([]);s(e,t,{context:{source:r?`documentFieldAction`:`fieldAction`}})},[n,s,e,r]);return Cm({type:`action`,icon:Za,onAction:c,title:o})}})],Tm=(e,{document:t},n)=>{let r=t?.unstable_fieldActions;if(!r)return e;if(typeof r==`function`)return r(e,n);if(Array.isArray(r))return[...e,...r];throw Error(`Expected \`document.unstable_fieldActions\` to be an array or a function, but received ${typeof r}`)};function Em(e){return e}var Dm=[],Om=[],km=[],Am=(e,{schema:t},n)=>{let r=t?.types;if(!r)return e;if(typeof r==`function`)return r(e,n);if(Array.isArray(r))return[...e,...r];throw Error(`Expected \`schema.types\` to be an array or a function, but received ${S(r)}`)},jm=async(e,{document:t},n)=>{let r=t?.productionUrl;return r?await r(e,n):e},Mm=(e,{tools:t},n)=>{if(!t)return e;if(typeof t==`function`)return t(e,n);if(Array.isArray(t))return[...e,...t];throw Error(`Expected \`tools\` to be an array or a function, but received ${S(t)}`)},Nm=(e,{schema:t},n)=>{let r=t?.templates;if(!r)return e;if(typeof r==`function`)return r(e,n);if(Array.isArray(r))return[...e,...r];throw Error(`Expected \`schema.templates\` to be an array or a function, but received ${S(r)}`)},Pm=(e,{i18n:t},n)=>{let r=t?.locales;if(!r)return e;if(typeof r==`function`)return r(e,n);if(Array.isArray(r))return[...e,...r];throw Error(`Expected \`i18n.locales\` to be an array or a function, but received ${S(r)}`)},Fm=(e,{i18n:t},n)=>{let r=t?.bundles;if(!r)return e;if(Array.isArray(r))return[...e,...r];if(typeof r==`function`)return r(e,n);throw Error(`Expected \`i18n.bundles\` to be an array or a function, but received ${typeof r}`)},Im=(e,{document:t},n)=>{let r=t?.badges;if(!r)return e;if(typeof r==`function`)return r(e,n);if(Array.isArray(r))return[...e,...r];throw Error(`Expected \`document.badges\` to be an array or a function, but received ${S(r)}`)},Lm=(e,{document:t},n)=>{let r=t?.actions;if(!r)return e;if(typeof r==`function`)return r(e,n);if(Array.isArray(r))return[...e,...r];throw Error(`Expected \`document.actions\` to be an array or a function, but received ${S(r)}`)},Rm=(e,{releases:t},n)=>{let r=t?.actions;if(!r)return e;if(typeof r==`function`)return r(e,n);if(Array.isArray(r))return[...e,...r];throw Error(`Expected \`releases.actions\` to be an array or a function, but received ${S(r)}`)},zm=(e,{document:t},n)=>{let r=t?.newDocumentOptions;if(!r)return e;if(typeof r!=`function`)throw Error(`Expected \`document.resolveNewDocumentOptions\` to be a function, but received ${S(r)}`);return r(e,n)},Bm=(e,{form:t},n)=>{let r=t?.file?.assetSources;if(!r)return e;if(typeof r==`func
Line truncated
|
||||
`)}`;console.warn(`[sanity] ${a}`),kv({type:`project-auth-divergence`,projectId:e,groups:i,message:a})}}function Ab(e){if(typeof e!=`object`||!e)return String(e);if(pg(e))return`AuthStore@${Nb(e)}`;try{return`AuthConfig:${wh(e)}`}catch{return`unserializable@${Nb(e)}`}}var jb=new WeakMap,Mb=1;function Nb(e){let t=jb.get(e);return t===void 0&&(t=Mb++,jb.set(e,t)),t}var Pb=e=>{let t=$m({config:e,initialValue:void 0});return Qm({config:e,initialValue:!1})?{fileSource:Nt({libraryId:t||null}),imageSource:hn({libraryId:t||null})}:{fileSource:null,imageSource:null}},Fb=(e,t)=>({fileSource:tn({client:t,title:e.title||e.name}),imageSource:Ln({client:t,title:e.title||e.name})});function Ib(e,t){if(!Array.isArray(e)&&`missingConfigFile`in e)throw new mm({name:``,type:`configuration file`,causes:["No `sanity.config.ts` file found","No `sanity.config.js` file found"]});let n=Bb(t?.basePath),r=Array.isArray(e)?e:[{...e,name:e.name??`default`}];try{Cv({workspaces:r})}catch(e){throw new mm({name:``,type:`workspace`,causes:[e.message]})}return kb(r),{type:`prepared-config`,workspaces:r.map(e=>{if(Tb.has(e))return Tb.get(e);let r=bb(e),{unstable_sources:i=[],...a}=e,o=[a,...i].map(({plugins:e,...t})=>({...t,plugins:[...e??[],...yb(r,e)].filter(e=>{let t=e.name!==`@sanity/assist`||e.handlesGDR;return t||console.warn(`Found an incompatible version of @sanity/assist plugin. It has been disabled.
|
||||
To re-enable the plugin, please upgrade to https://github.com/sanity-io/assist/releases/tag/v3.2.2 or later.`),t})})).map(e=>{let{projectId:n,dataset:r}=e,i;try{i=xb({config:e,context:{projectId:n,dataset:r}})}catch(t){throw new mm({name:e.name,type:`source`,causes:[t]})}let a=Ch({name:e.name,types:i}),o=a._validation,s=o?.filter(e=>e.problems.some(Cb));if(o&&s?.length)throw new ce(a);let c=Lb(e,{createStudioRequestHandler:t?.createStudioRequestHandler,requestErrorChannel:t?.requestErrorChannel,requestFailureDiagnostics:t?.requestFailureDiagnostics}),l=hh(e),u=c.state.pipe(U(({client:t,authenticated:n,currentUser:r})=>zb({config:e,client:t,currentUser:r,schema:a,authenticated:n,auth:c,i18n:l})),Dr(1));return{name:e.name,projectId:e.projectId,dataset:e.dataset,title:e.title||En(e.name),auth:c,schema:a,i18n:l.source,source:u}}),s=a.title||En(a.name),c={type:`workspace-summary`,auth:o[0].auth,basePath:Vb(n,a.basePath),dataset:a.dataset,apiHost:a.apiHost,schema:o[0].schema,i18n:o[0].i18n,customIcon:!!a.icon,icon:wb(a.icon,s,`${a.projectId} ${a.dataset}`),name:a.name||`default`,projectId:a.projectId,theme:a.theme||Ci,title:s,subtitle:a.subtitle,hidden:a.hidden,__internal:{sources:o},...r};return Tb.set(e,c),c})}}function Lb(e,{createStudioRequestHandler:t,requestErrorChannel:n,requestFailureDiagnostics:r}){if(pg(e.auth))return e.auth;let i=e.unstable_clientFactory??Vd,{projectId:a,dataset:o,apiHost:s}=e;return wg({apiHost:s,...e.auth,clientFactory:e=>{let n;return n=i({...e,...t?{requestHandler:t(()=>n)}:{}}),n},getRequestErrorHandler:()=>n,getRequestFailureDiagnostics:()=>r,dataset:o,projectId:a})}function Rb(e,t){let{dataset:n,url:r,requestTagPrefix:i=`sanity.studio`}=e.withConfig({apiVersion:`2022-06-30`}).config();return Lf(`${`${r.replace(/\/+$/,``)}/socket/${n}`.replace(/^http/,`ws`)}?tag=${i}`,t.token?{token$:t.token}:{})}function zb({config:e,client:t,currentUser:n,schema:r,authenticated:i,auth:a,i18n:o}){let{dataset:s,projectId:c}=e,l=Rb(t,a),u=[],d={},f=e=>{if(!e||!e.apiVersion)throw Error("Missing required `apiVersion` option");return d[e.apiVersion]||(d[e.apiVersion]=t.withConfig(e)),d[e.apiVersion]},p={client:t,getClient:f,currentUser:n,dataset:s,projectId:c,schema:r,i18n:o.source},m=t;p.client=[...Object.keys(t),...Object.keys(m.__proto__)].reduce((e,n)=>{let r=Object.hasOwnProperty.call(t,n)?m[n]:m.__proto__[n];return Object.defineProperty(e,n,{get(){return Db(),r}})},{});let h=Fb(e,t),g=Pb(e),_;try{_=sh({config:e,context:p,propertyName:`schema.templates`,reducer:Nm,initialValue:r.getTypeNames().filter(e=>!e.startsWith(`sanity.`)).map(e=>r.get(e)).filter(Ui).filter(e=>e.type?.name===`document`).map(e=>({id:e.name,schemaType:e.name,title:e.title||e.name,icon:e.icon,value:e.initialValue||{_type:e.name}}))})}catch(t){throw new mm({name:e.name,type:`source`,causes:[t]})}let v;try{v=sh({config:e,context:p,initialValue:[],propertyName:`tools`,reducer:Mm})}catch(t){throw new mm({name:e.name,type:`source`,causes:[t]})}if(v.some(({name:e})=>e===`tool`))throw Error(`A tool cannot have the name "tool". Please enter a different name.`);let y=_.filter(e=>!e.parameters?.length).map(e=>({templateId:e.id,description:e.description,icon:e.icon,title:e.title})),b=_.reduce((e,t)=>(e.set(t.id,t),e),new Map),x=t=>{let{schemaType:n}=t,i=sh({config:e,context:{...p,creationContext:t},initialValue:y,propertyName:`document.resolveNewDocumentOptions`,reducer:zm}),a=[];if(a.length)throw new mm({name:e.name,type:`source`,causes:a});return i.map((e,t)=>{let n=b.get(e.templateId);if(!n)throw Error(`Could not find template with ID \`${e.templateId}\``);let i=r.get(n.schemaType);if(!i)throw Error(`Could not find matching schema type \`${n.schemaType}\` for template \`${n.id}\``);let a=e.title||n.title,o=i?.title===a?void 0:i?.title;return{id:`${e.templateId}-${t}`,templateId:e.templateId,type:`initialValueTemplateItem`,title:a,i18n:e.i18n||n.i18n,subtitle:e.subtitle||o,description:e.description||n.description,icon:e.icon||n.icon||i?.icon,initialDocumentId:e.initialDocumentId,parameters:e.parameters,schemaType:n.schemaType}}).filter(e=>!n||t.type===`document`||n===b.get(e.templateId)?.schemaType)},S;try{S=x({type:`global`})}catch(e){u.push(e)}if(u.length)throw new mm({name:e.name,type:`source`,causes:u});let C=Xm({config:e,initialValue:!1}),w=i?(async()=>{let e=f(Lt);if(!await hv(e)){Sb(`Skipping schema upload: user lacks the deployStudio grant`);return}return yv(r,e)})().catch(e=>{Sb(`Uploading schema failed`,{err:e})}):Promise.resolve(void 0);return{type:`source`,name:e.name,title:e.title||En(e.name),schema:r,getClient:f,dataset:s,projectId:c,tools:v,currentUser:n,authenticated:i,templates:_,auth:a,i18n:o.source,__internal_tasks:Jm({config:e}),document:{actions:t=>sh({config:e,context:{...p,...t},initialValue:Om,propertyName:`document.actions`,reducer:Lm}),badges:t=>sh({config:e,context:{...p,...t},initialValue:Dm,propertyName:`document.badges`,reducer:Im}),drafts:{enabled:sh({config:e,context:p,reducer:rh,propertyName:`document
Line truncated
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{t as i}from"./BehaviorSubject-CugQrNFr.js";var a;try{a=void 0}catch{}var o=a||`6.12.0`,s=e(t(),1),c=`https://www.sanity.io/help/missing-context-error`;function l(e,t){let n=Symbol.for(e);if(typeof document>`u`||typeof window<`u`&&window.navigator!==void 0&&window.navigator.userAgent.includes(`jsdom`))return(0,s.createContext)(t);if(!d[n])d[n]={context:(0,s.createContext)(t),version:o};else if(d[n].version!==o)throw TypeError(`Duplicate instances of context "${e}" with incompatible versions detected: Expected ${o} but got ${d[n].version}.\n\nFor more information, please visit ${c}`);else u.has(o)||(console.warn(`Duplicate instances of context "${e}" detected. This is likely a mistake and may cause unexpected behavior.\n\nFor more information, please visit ${c}`),u.add(o));return d[n].context}var u=new Set;function ee(){if(typeof globalThis<`u`)return globalThis;if(typeof window<`u`)return window;if(typeof self<`u`)return self;if(typeof global<`u`)return global;throw Error(`sanity: could not locate global scope`)}var d=ee(),te=r(),ne=n(),re=l(`sanity/_singletons/context/active-workspace-matcher`,null),f=l(`sanity/_singletons/context/addon-dataset`,null),p=l(`sanity/_singletons/context/app-id-cache`,null),m=l(`sanity/_singletons/context/array-item-root-element`,null),h=l(`sanity/_singletons/context/array-validation`,null),g=l(`sanity/_singletons/context/asset-limit-upsell`,null),_=l(`sanity/_singletons/context/calendar`,void 0),v=l(`sanity/_singletons/context/change-indicator-tracker-store`,null),y=l(`sanity/_singletons/context/change-indicator-tracker-get-snapshot`,null),b=l(`sanity/_singletons/context/color-scheme-set-value`,null),x=l(`sanity/_singletons/context/color-scheme-value`,null),S=l(`sanity/_singletons/context/comment-input`,null);l(`sanity/_singletons/context/comments-v2-comment-input`,null);var C=l(`sanity/_singletons/context/comments-authoring-path`,null);l(`sanity/_singletons/context/comments-v2-authoring-path`,null);var w=l(`sanity/_singletons/context/comments`,null);l(`sanity/_singletons/context/comments-v2`,null);var T=l(`sanity/_singletons/context/comments-enabled`,{enabled:!1,mode:null});l(`sanity/_singletons/context/comments-v2-enabled`,{enabled:!1,mode:null});var E=l(`sanity/_singletons/context/comments-intent`,void 0),D=l(`sanity/_singletons/context/comments-onboarding`,null);l(`sanity/_singletons/context/comments-v2-onboarding`,null);var O=l(`sanity/_singletons/context/comments-selected-path`,null);l(`sanity/_singletons/context/comments-v2-selected-path`,null);var k=l(`sanity/_singletons/context/comments-upsell`,null);l(`sanity/_singletons/context/comments-v2-upsell`,null);var A=l(`sanity/_singletons/context/config-error`,null),j=l(`sanity/_singletons/context/copy-paste`,null),M=l(`sanity/_singletons/context/dialog-stack`,null),N=l(`sanity/_singletons/context/diff`,{path:[]}),P=l(`sanity/_singletons/context/document-action-props`,void 0),F=l(`sanity/_singletons/context/actions-state`,null),I=l(`sanity/_singletons/context/document-change`,null),L=l(`sanity/_singletons/context/document-divergences`,{enabled:!1,sessionId:null}),R=l(`sanity/_singletons/context/document-field-actions`,null),z=l(`sanity/_singletons/context/document-id`,null),B=l(`sanity/_singletons/context/document-limit-upsell`,null),V=l(`sanity/_singletons/context/document-pane`,null),H=l(`sanity/_singletons/context/document-pane-info`,null),U=l(`sanity/_singletons/context/edit-dialog-outer-boundary`,null),W=l(`sanity/_singletons/context/enhanced-object-dialog-enabled`,{enabled:!1,legacyEditing:!1}),G=l(`sanity/_singletons/context/events`,null),K=l(`sanity/_singletons/context/feedback`,{telemetryConsent:`denied`,userName:void 0,userEmail:void 0,tags:{}}),q=l(`sanity/_singletons/context/field-actions`,{actions:[],focused:!1,hovered:!1,__internal_slot:void 0,__internal_comments:void 0,onMouseEnter:()=>void 0,onMouseLeave:()=>void 0}),J=l(`sanity/_singletons/context/form-builder`,null),Y=l(`sanity/_singletons/context/form-callbacks`,null),X=l(`sanity/_singletons/context/form-field-presence`,[]),ie=l(`sanity/_singletons/context/form-value`,null),ae=l(`sanity/_singletons/context/free-trial`,void 0),oe=l(`sanity/_singletons/context/fullscreen-pte`,{getFullscreenPath:()=>void 0,setFullscreenPath:()=>{},hasAnyFullscreen:()=>!1,allFullscreenPaths:[]}),se=l(`sanity/_singletons/context/get-form-value`,null),ce=l(`sanity/_singletons/context/hovered-field`,{store:{subscribe:()=>()=>void 0,getSnapshot:()=>[]},onMouseEnter:()=>void 0,onMouseLeave:()=>void 0}),le=l(`sanity/_singletons/context/is-last-pane`,!1),ue=l(`sanity/_singletons/context/live-user-application`,{userApplication:void 0,isLoading:!0}),de=l(`sanity/_singletons/context/locale`,void 0),fe=l(`sanity/_singletons/context/logged-out-reason`,void 0),pe=l(`sanity/_singletons/context/media-library`,null),me=l(`sanity/_si
Line truncated
|
||||
+503
@@ -0,0 +1,503 @@
|
||||
[
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "custom"
|
||||
},
|
||||
{
|
||||
"flag": "custom"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "name",
|
||||
"type": "slug"
|
||||
}
|
||||
],
|
||||
"name": "media.tag",
|
||||
"type": "document"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"weak": true,
|
||||
"to": [
|
||||
{
|
||||
"type": "media.folder"
|
||||
}
|
||||
],
|
||||
"name": "parent",
|
||||
"type": "reference"
|
||||
}
|
||||
],
|
||||
"name": "media.folder",
|
||||
"type": "document"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
},
|
||||
{
|
||||
"flag": "max",
|
||||
"constraint": 50
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"title": "Tittel"
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"source": "title",
|
||||
"maxLength": 96
|
||||
},
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "custom"
|
||||
},
|
||||
{
|
||||
"flag": "custom"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"description": "Lenke til innlegget. Sørg for at tittelen er unik og trykk på generate. Hvis ikke, endre denne til noe unikt",
|
||||
"name": "slug",
|
||||
"type": "slug"
|
||||
},
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"to": [
|
||||
{
|
||||
"type": "author"
|
||||
}
|
||||
],
|
||||
"name": "author",
|
||||
"type": "reference",
|
||||
"title": "Person"
|
||||
},
|
||||
{
|
||||
"name": "mainImage",
|
||||
"type": "image",
|
||||
"title": "Forsidebilde"
|
||||
},
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "body",
|
||||
"type": "blockContent",
|
||||
"title": "Brødtekst"
|
||||
},
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
},
|
||||
{
|
||||
"flag": "max",
|
||||
"constraint": 150
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"description": "Dette er teksten som vil vises på forsiden som forhåndsvisning",
|
||||
"name": "excerpt",
|
||||
"type": "string",
|
||||
"title": "Sammendrag"
|
||||
}
|
||||
],
|
||||
"name": "post",
|
||||
"type": "document",
|
||||
"title": "Blogginnlegg"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
},
|
||||
{
|
||||
"flag": "max",
|
||||
"constraint": 50
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"title": "Navn"
|
||||
},
|
||||
{
|
||||
"name": "boardMember",
|
||||
"type": "boolean",
|
||||
"title": "Styremedlem?"
|
||||
},
|
||||
{
|
||||
"name": "image",
|
||||
"type": "image",
|
||||
"title": "Bilde"
|
||||
},
|
||||
{
|
||||
"fieldsets": [
|
||||
{
|
||||
"name": "translations",
|
||||
"options": {
|
||||
"collapsible": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "role",
|
||||
"type": "localeString",
|
||||
"title": "Stilling"
|
||||
},
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "max",
|
||||
"constraint": 50
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "contactInfo",
|
||||
"type": "string",
|
||||
"title": "Kontaktinfo (f. eks: Discordbrukernavn eller E-post)"
|
||||
},
|
||||
{
|
||||
"fieldsets": [
|
||||
{
|
||||
"name": "translations",
|
||||
"options": {
|
||||
"collapsible": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "bio",
|
||||
"type": "localeString"
|
||||
},
|
||||
{
|
||||
"readOnly": true,
|
||||
"hidden": true,
|
||||
"name": "orderRank",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"name": "author",
|
||||
"type": "document",
|
||||
"title": "Person"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
},
|
||||
{
|
||||
"flag": "max",
|
||||
"constraint": 50
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"title": "Navn"
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"source": "title",
|
||||
"maxLength": 96
|
||||
},
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "custom"
|
||||
},
|
||||
{
|
||||
"flag": "custom"
|
||||
},
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"description": "Lenke til arrangementet. Sørg for at navnet er unikt og trykk på generate. Hvis ikke, endre denne til noe unikt",
|
||||
"name": "slug",
|
||||
"type": "slug"
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"dateFormat": "YYYY-MM-DD",
|
||||
"timeFormat": "HH:mm",
|
||||
"timeStep": 15,
|
||||
"calendarTodayLabel": "I dag"
|
||||
},
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "date",
|
||||
"type": "datetime",
|
||||
"title": "Tidspunkt"
|
||||
},
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
},
|
||||
{
|
||||
"flag": "max",
|
||||
"constraint": 50
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "location",
|
||||
"type": "string",
|
||||
"title": "Sted"
|
||||
},
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "description",
|
||||
"type": "text",
|
||||
"title": "Beskrivelse"
|
||||
}
|
||||
],
|
||||
"name": "event",
|
||||
"type": "document",
|
||||
"title": "Arrangement"
|
||||
},
|
||||
{
|
||||
"of": [
|
||||
{
|
||||
"lists": [
|
||||
{
|
||||
"value": "bullet",
|
||||
"title": "Bullet"
|
||||
}
|
||||
],
|
||||
"marks": {
|
||||
"annotations": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "uri",
|
||||
"constraint": {
|
||||
"options": {
|
||||
"scheme": [
|
||||
"/^http$/",
|
||||
"/^https$/"
|
||||
],
|
||||
"allowRelative": false,
|
||||
"relativeOnly": false,
|
||||
"allowCredentials": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "href",
|
||||
"type": "url",
|
||||
"title": "URL"
|
||||
}
|
||||
],
|
||||
"name": "link",
|
||||
"type": "object",
|
||||
"title": "URL"
|
||||
}
|
||||
],
|
||||
"decorators": [
|
||||
{
|
||||
"value": "strong",
|
||||
"title": "Strong"
|
||||
},
|
||||
{
|
||||
"value": "em",
|
||||
"title": "Emphasis"
|
||||
}
|
||||
]
|
||||
},
|
||||
"of": [],
|
||||
"styles": [
|
||||
{
|
||||
"value": "normal",
|
||||
"title": "Normal"
|
||||
},
|
||||
{
|
||||
"value": "h1",
|
||||
"title": "H1"
|
||||
},
|
||||
{
|
||||
"value": "h2",
|
||||
"title": "H2"
|
||||
},
|
||||
{
|
||||
"value": "h3",
|
||||
"title": "H3"
|
||||
},
|
||||
{
|
||||
"value": "h4",
|
||||
"title": "H4"
|
||||
},
|
||||
{
|
||||
"value": "blockquote",
|
||||
"title": "Quote"
|
||||
}
|
||||
],
|
||||
"type": "block"
|
||||
},
|
||||
{
|
||||
"options": {
|
||||
"hotspot": true
|
||||
},
|
||||
"type": "image"
|
||||
}
|
||||
],
|
||||
"name": "blockContent",
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
},
|
||||
{
|
||||
"flag": "max",
|
||||
"constraint": 200
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "no",
|
||||
"type": "string",
|
||||
"title": "Norsk"
|
||||
},
|
||||
{
|
||||
"validation": [
|
||||
{
|
||||
"level": "error",
|
||||
"rules": [
|
||||
{
|
||||
"flag": "presence",
|
||||
"constraint": "required"
|
||||
},
|
||||
{
|
||||
"flag": "max",
|
||||
"constraint": 200
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "en",
|
||||
"type": "string",
|
||||
"title": "English",
|
||||
"fieldset": "translations"
|
||||
}
|
||||
],
|
||||
"fieldsets": [
|
||||
{
|
||||
"name": "translations",
|
||||
"options": {
|
||||
"collapsible": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "localeString",
|
||||
"type": "object",
|
||||
"title": "Localized string"
|
||||
}
|
||||
]
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/stegaEncodeSourceMap-aiPOci-U.js","static/stegaClean-BU_A08x3.js","static/browser-Cic9HASE.js","static/rolldown-runtime-Dd_uD5pT.js"])))=>i.map(i=>d[i]);
|
||||
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{S as t,a as n,b as r,d as i,f as a,m as o,n as s,r as c,t as l,w as u}from"./Observable-BrARBsae.js";import{i as d,n as f}from"./OperatorSubscriber-BASvuWFQ.js";import{t as p}from"./Subject-UgBXjL8-.js";import{_ as m,a as h,b as g,g as _,h as v,i as ee,m as y,n as te,o as ne,p as re,r as ie,s as b,t as ae,u as oe,v as se,y as ce}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{o as x,s as le,t as ue}from"./from-D9LOdazm.js";import{t as S}from"./map-UaEckSmz.js";import{n as de,t as C}from"./filter-C5fzbndz.js";import{n as fe,t as pe}from"./stegaClean-BU_A08x3.js";import{t as me}from"./preload-helper-Czpn1I53.js";var he={now:function(){return(he.delegate||Date).now()},delegate:void 0},ge=function(e){r(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=he);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},t}(p),_e=function(e){r(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(i),ve={setInterval:function(e,n){var r=[...arguments].slice(2),i=ve.delegate;return i?.setInterval?i.setInterval.apply(i,u([e,n],t(r))):setInterval.apply(void 0,u([e,n],t(r)))},clearInterval:function(e){return(ve.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},ye=function(e){r(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),ve.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&ve.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(_e),be=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=he.now,e}(),xe=function(e){r(t,e);function t(t,n){n===void 0&&(n=be.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(be),Se=new xe(ye),Ce=Se;function we(e,t){var n=o(e)?e:function(){return e},r=function(e){return e.error(n())};return new l(t?function(e){return t.schedule(r,0,e)}:r)}function Te(e){return!!e&&(e instanceof l||o(e.lift)&&o(e.subscribe))}function Ee(e){return e instanceof Date&&!isNaN(e)}function De(e){return e===void 0&&(e=1/0),b(c,e)}function Oe(){return De(1)}function ke(){var e=[...arguments];return Oe()(ue(e,se(e)))}function w(e){return new l(function(t){x(e()).subscribe(t)})}var Ae=[`addListener`,`removeListener`],je=[`addEventListener`,`removeEventListener`],Me=[`on`,`off`];function Ne(e,n,r,i){if(o(r)&&(i=r,r=void 0),i)return Ne(e,n,r).pipe(re(i));var a=t(Le(e)?je.map(function(t){return function(i){return e[t](n,i,r)}}):Fe(e)?Ae.map(Pe(e,n)):Ie(e)?Me.map(Pe(e,n)):[],2),s=a[0],c=a[1];if(!s&&le(e))return b(function(e){return Ne(e,n,r)})(x(e));if(!s)throw TypeError(`Inva
Line truncated
|
||||
`).slice(n?1:2);t.length>0&&(s.stack+=`
|
||||
`+t.join(`
|
||||
`))}}a.error.publish(s)}else c&&a.response.publish(c)})(t,r,e))});a.abort.subscribe(()=>{u(),l&&l.abort()});let d=o(`onReturn`,a,c);return d===a&&a.request.publish(c),d}return i.use=function(e){if(!e)throw Error(`Tried to add middleware that resolved to falsey value`);if(typeof e==`function`)throw Error(`Tried to add middleware that was a function. It probably expects you to pass options to it.`);if(e.onReturn&&r.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return ut.forEach(t=>{e[t]&&r[t].push(e[t])}),n.push(e),i},i.clone=()=>dt(n,t),e.forEach(i.use),i}var ft,pt,mt=ct(function(){if(pt)return ft;pt=1;var e=function(e){return e.replace(/^\s+|\s+$/g,``)},t=function(e){return Object.prototype.toString.call(e)===`[object Array]`};return ft=function(n){if(!n)return{};for(var r=Object.create(null),i=e(n).split(`
|
||||
`),a=0;a<i.length;a++){var o=i[a],s=o.indexOf(`:`),c=e(o.slice(0,s)).toLowerCase(),l=e(o.slice(s+1));typeof r[c]>`u`?r[c]=l:t(r[c])?r[c].push(l):r[c]=[r[c],l]}return r}}()),ht=class{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText=``;responseType=``;status;statusText;withCredentials;#e;#t;#n;#r={};#i;#a={};#o;open(e,t,n){this.#e=e,this.#t=t,this.#n=``,this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#n}setRequestHeader(e,t){this.#r[e]=t}setInit(e,t=!0){this.#a=e,this.#o=t}send(e){let t=this.responseType!==`arraybuffer`,n={...this.#a,method:this.#e,headers:this.#r,body:e};typeof AbortController==`function`&&this.#o&&(this.#i=new AbortController,typeof EventTarget<`u`&&this.#i.signal instanceof EventTarget&&(n.signal=this.#i.signal)),typeof document<`u`&&(n.credentials=this.withCredentials?`include`:`omit`),fetch(this.#t,n).then(e=>(e.headers.forEach((e,t)=>{this.#n+=`${t}: ${e}\r\n`}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,this.onreadystatechange?.(),t?e.text():e.arrayBuffer())).then(e=>{typeof e==`string`?this.responseText=e:this.response=e,this.readyState=4,this.onreadystatechange?.()}).catch(e=>{e.name===`AbortError`?this.onabort?.():this.onerror?.(e)})}},gt=typeof XMLHttpRequest==`function`?`xhr`:`fetch`,_t=gt===`xhr`?XMLHttpRequest:ht,vt=(e,t)=>{let n=e.options,r=e.applyMiddleware(`finalizeOptions`,n),i={},a=e.applyMiddleware(`interceptRequest`,void 0,{adapter:gt,context:e});if(a){let e=setTimeout(t,0,null,a);return{abort:()=>clearTimeout(e)}}let o=new _t;o instanceof ht&&typeof r.fetch==`object`&&o.setInit(r.fetch,r.useAbortSignal??!0);let s=r.headers,c=r.timeout,l=!1,u=!1,d=!1;if(o.onerror=e=>{m(o instanceof ht?e instanceof Error?e:Error(`Request error while attempting to reach ${r.url}`,{cause:e}):Error(`Request error while attempting to reach is ${r.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:``}`))},o.ontimeout=e=>{m(Error(`Request timeout while attempting to reach ${r.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:``}`))},o.onabort=()=>{p(!0),l=!0},o.onreadystatechange=function(){c&&(p(),i.socket=setTimeout(()=>f(`ESOCKETTIMEDOUT`),c.socket)),!l&&o&&o.readyState===4&&o.status!==0&&function(){if(!(l||u||d)){if(o.status===0)return void m(Error(`Unknown XHR error`));p(),u=!0,t(null,{body:o.response||(o.responseType===``||o.responseType===`text`?o.responseText:``),url:r.url,method:r.method,headers:mt(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(r.method,r.url,!0),o.withCredentials=!!r.withCredentials,s&&o.setRequestHeader)for(let e in s)s.hasOwnProperty(e)&&o.setRequestHeader(e,s[e]);return r.rawBody&&(o.responseType=`arraybuffer`),e.applyMiddleware(`onRequest`,{options:r,adapter:gt,request:o,context:e}),o.send(r.body||null),c&&(i.connect=setTimeout(()=>f(`ETIMEDOUT`),c.connect)),{abort:function(){l=!0,o&&o.abort()}};function f(t){d=!0,o.abort();let n=Error(t===`ESOCKETTIMEDOUT`?`Socket timed out on request to ${r.url}`:`Connection timed out on request to ${r.url}`);n.code=t,e.channels.error.publish(n)}function p(e){(e||l||o&&o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function m(e){if(u)return;p(!0),u=!0,o=null;let n=e||Error(`Network error while attempting to reach ${r.url}`);n.isNetworkError=!0,n.request=r,t(n)}},yt=(e=[],t=vt)=>dt(e,t);function bt(e){return{}}var xt,St,Ct,wt,Tt,Et={exports:{}};Tt||(Tt=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+t[0]+(this.useColors?`%c `:` `)+`+`+e.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;t.splice(1,0,n,`color: inherit`);let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem(`debug`,e):t.storage.removeItem(`debug`)}catch{}},t.load=function(){let e;try{e=t.storage.getItem(`debug`)||t.storage.getItem(`DEBUG`)}catch{}return!e&&typeof process<`u`&&`env`in process&&(e={}.DEBUG),e},t.useColors=function(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch{}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,consol
Line truncated
|
||||
`,a.replace(/\d/g,` `),` `,t,`^`.repeat(r)].join(``),l&&n&&(u+=` `+n)}return[`>`,a,e.length>0?` ${e}`:``,u].join(``)}).join(`
|
||||
`)}function en(e,t){let n={...e.start},r={...n,...e.end},i=n.line??-1,a=n.column??0,o=r.line,s=r.column,c=Math.max(i-3,0),l=Math.min(t.length,o+3);i===-1&&(c=0),o===-1&&(l=t.length);let u=o-i,d={};if(u)for(let e=0;e<=u;e++){let n=e+i;d[n]=a?e===0?[a,t[n-1].length-a+1]:e===u?[0,s]:[0,t[n-e].length]:!0}else d[i]=a===s?!a||[a,0]:[a,s-a];return{start:c,end:l,markerLines:d}}function tn(e,t){let n=0;for(let r=0;r<t.length;r++){let i=t[r].length+1;if(n+i>e)return{line:r+1,column:e-n};n+=i}return{line:t.length,column:t[t.length-1]?.length??0}}var nn=5,rn=class extends Error{response;statusCode=400;responseBody;traceId;details;constructor(e,t){let n=on(e,t);super(n.message),Object.assign(this,n)}},an=class extends Error{response;statusCode=500;responseBody;traceId;details;constructor(e){let t=on(e);super(t.message),Object.assign(this,t)}};function on(e,t){let n=e.body,r={response:e,statusCode:e.statusCode,responseBody:pn(n,e),traceId:fn(e),message:``,details:void 0};if(!pe(n))return r.message=`${dn(e,n)}${O(r.traceId)}`,r;let i=n.error;if(typeof i==`string`&&typeof n.message==`string`)return r.message=`${i} - ${n.message}${O(r.traceId)}`,r;if(typeof i!=`object`||!i)return r.message=typeof i==`string`?`${i}${O(r.traceId)}`:typeof n.message==`string`?`${n.message}${O(r.traceId)}`:`${dn(e,n)}${O(r.traceId)}`,r;if(sn(i)||cn(i)){let e=i.items||[],t=e.slice(0,nn).map(e=>e.error?.description).filter(Boolean),a=t.length?`:
|
||||
- ${t.join(`
|
||||
- `)}`:``;return e.length>nn&&(a+=`
|
||||
...and ${e.length-nn} more`),r.message=`${i.description}${O(r.traceId)}${a}`,r.details=n.error,r}if(ln(i)){let e=t?.options?.query?.tag;return r.message=un(i,e,r.traceId),r.details=n.error,r}return`description`in i&&typeof i.description==`string`?(r.message=`${i.description}${O(r.traceId)}`,r.details=i,r):(r.message=`${dn(e,n)}${O(r.traceId)}`,r)}function sn(e){return`type`in e&&e.type===`mutationError`&&`description`in e&&typeof e.description==`string`}function cn(e){return`type`in e&&e.type===`actionError`&&`description`in e&&typeof e.description==`string`}function ln(e){return pe(e)&&e.type===`queryParseError`&&typeof e.query==`string`&&typeof e.start==`number`&&typeof e.end==`number`}function un(e,t,n){let{query:r,start:i,end:a,description:o}=e,s=n?`
|
||||
(traceId: ${n})`:``;if(!r||typeof i>`u`)return`GROQ query parse error: ${o}${s}`;let c=t?`
|
||||
|
||||
Tag: ${t}`:``;return`GROQ query parse error:
|
||||
${$t(r,{start:i,end:a},o)}${c}${s}`}function dn(e,t){let n=typeof t==`string`?` (${mn(t,100)})`:``,r=e.statusMessage?` ${e.statusMessage}`:``;return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${r}${n}`}function fn(e){let t=e?.headers?.traceparent;if(t)return t.split(`-`)[1]}function pn(e,t){return(t.headers[`content-type`]||``).toLowerCase().indexOf(`application/json`)===-1?e:JSON.stringify(e,null,2)}function O(e){return e?` (traceId: ${e})`:``}function mn(e,t){return e.length>t?`${e.slice(0,t)}\u2026`:e}var hn=class extends Error{projectId;addOriginUrl;constructor({projectId:e,credentials:t}={}){if(super(`CorsOriginError`),this.name=`CorsOriginError`,this.projectId=e,e&&typeof location<`u`){let n=new URL(`https://sanity.io/manage/project/${e}/api`),{origin:r}=location;n.searchParams.set(`cors`,`add`),n.searchParams.set(`origin`,r),t&&n.searchParams.set(`credentials`,``),this.addOriginUrl=n,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${n}`}else e?this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: https://sanity.io/manage/project/${e}/api`:this.message=`The current origin is not allowed to connect to the Live Content API.`}},gn={onResponse:(e,t)=>{if(e.statusCode>=500)throw new an(e);if(e.statusCode>=400)throw new rn(e,t);return e}};function _n(e={}){let t={},n=t=>e.ignoreWarnings!==void 0&&(Array.isArray(e.ignoreWarnings)?e.ignoreWarnings:[e.ignoreWarnings]).some(e=>typeof e==`string`?t.includes(e):e instanceof RegExp&&e.test(t));return{onResponse:e=>{let r=e.headers[`x-sanity-warning`],i=Array.isArray(r)?r:[r];for(let e of i)!e||t[e]||n(e)||(t[e]=!0,console.warn(e));return e}}}function vn(e,t={}){return yt([Rt({shouldRetry:yn}),...e,_n(t),jt(),Mt(),Ft(),gn,Pt({implementation:l})])}function yn(e,t,n){if(n.maxRetries===0)return!1;let r=n.method===`GET`||n.method===`HEAD`,i=(n.uri||n.url).startsWith(`/data/query`),a=e.response&&(e.response.statusCode===429||e.response.statusCode===502||e.response.statusCode===503);return(r||i)&&a?!0:Rt.shouldRetry(e,t,n)}var bn=`https://www.sanity.io/help/`;function xn(e){return bn+e}var Sn=[`image`,`file`],Cn=[`before`,`after`,`replace`],k=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error(`Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters`)},wn=e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},Tn=e=>{if(Sn.indexOf(e)===-1)throw Error(`Invalid asset type: ${e}. Must be one of ${Sn.join(`, `)}`)},A=(e,t)=>{if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},En=(e,t)=>{if(typeof t!=`string`||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(`..`))throw Error(`${e}(): "${t}" is not a valid document ID`)},j=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);En(e,t._id)},Dn=(e,t)=>{if(typeof t!=`string`)throw Error(`\`${e}()\`: \`${t}\` is not a valid document type`)},On=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);Dn(e,t._type)},kn=(e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)},An=(e,t,n)=>{let r=`insert(at, selector, items)`;if(Cn.indexOf(e)===-1){let e=Cn.map(e=>`"${e}"`).join(`, `);throw Error(`${r} takes an "at"-argument which is one of: ${e}`)}if(typeof t!=`string`)throw Error(`${r} takes a "selector"-argument which must be a string`);if(!Array.isArray(n))throw Error(`${r} takes an "items"-argument which must be an array`)},M=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&t.type===`dataset`){let e=t.id.split(`.`);if(e.length!==2)throw Error(`Dataset resource ID must be in the format "project.dataset"`);return e[1]}throw Error("`dataset` must be provided to perform queries")},jn=e=>{if(typeof e!=`string`||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error(`Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.`);return e},Mn=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:n,id:r}=t;switch(n){case`dataset`:if(r.split(`.`).length!==2)throw Error(`Dataset resource ID must be in the format "project.dataset"`);return;case`dashboard`:case`media-library`:case`canvas`:return;default:throw Error(`Unsupported resource type: ${n.toString()}`)}},N=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)};function Nn(e){let t=!1,n;return(...r)=>(t||=(n=e(...r),!0),n)}var P=e=>Nn((...t)=>console.warn(e.join(` `),...t)),Pn=P(["Because you set `withCredentials` to true, we will override your `useCdn`",`setting to be false since (cookie-based) credentials are never set on the CDN`]),Fn=P(["Sin
Line truncated
|
||||
`);throw Error(`Unknown selection - must be one of:
|
||||
|
||||
${t}`)}var sr=class{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign(`set`,e)}setIfMissing(e){return this._assign(`setIfMissing`,e)}diffMatchPatch(e){return A(`diffMatchPatch`,e),this._assign(`diffMatchPatch`,e)}unset(e){if(!Array.isArray(e))throw Error(`unset(attrs) takes an array of attributes to unset, non-array given`);return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign(`inc`,e)}dec(e){return this._assign(`dec`,e)}insert(e,t,n){return An(e,t,n),this._assign(`insert`,{[e]:t,items:n})}append(e,t){return this.insert(`after`,`${e}[-1]`,t)}prepend(e,t){return this.insert(`before`,`${e}[0]`,t)}splice(e,t,n,r){let i=typeof n>`u`||n===-1,a=t<0?t-1:t,o=i?-1:Math.max(0,t+n),s=`${e}[${a}:${a<0&&o>=0?``:o}]`;return this.insert(`replace`,s,r||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...or(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,n=!0){return A(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},n&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}},I=class e extends sr{#e;constructor(e,t,n){super(e,t),this.#e=n}clone(){return new e(this.selection,{...this.operations},this.#e)}commit(e){if(!this.#e)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=typeof this.selection==`string`,n=Object.assign({returnFirst:t,returnDocuments:!0},e);return this.#e.mutate({patch:this.serialize()},n)}},L=class e extends sr{#e;constructor(e,t,n){super(e,t),this.#e=n}clone(){return new e(this.selection,{...this.operations},this.#e)}commit(e){if(!this.#e)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=typeof this.selection==`string`,n=Object.assign({returnFirst:t,returnDocuments:!0},e);return this.#e.mutate({patch:this.serialize()},n)}},cr={returnDocuments:!1},lr=class{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return A(`create`,e),this._add({create:e})}createIfNotExists(e){let t=`createIfNotExists`;return A(t,e),j(t,e),this._add({[t]:e})}createOrReplace(e){let t=`createOrReplace`;return A(t,e),j(t,e),this._add({[t]:e})}delete(e){return En(`delete`,e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}},ur=class e extends lr{#e;constructor(e,t,n){super(e,n),this.#e=t}clone(){return new e([...this.operations],this.#e,this.trxId)}commit(e){if(!this.#e)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#e.mutate(this.serialize(),Object.assign({transactionId:this.trxId},cr,e||{}))}patch(e,t){let n=typeof t==`function`,r=typeof e!=`string`&&e instanceof L,i=typeof e==`object`&&(`query`in e||`id`in e);if(r)return this._add({patch:e.serialize()});if(n){let n=t(new L(e,{},this.#e));if(!(n instanceof L))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}if(i){let n=new L(e,t||{},this.#e);return this._add({patch:n.serialize()})}return this._add({patch:{id:e,...t}})}},dr=class e extends lr{#e;constructor(e,t,n){super(e,n),this.#e=t}clone(){return new e([...this.operations],this.#e,this.trxId)}commit(e){if(!this.#e)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#e.mutate(this.serialize(),Object.assign({transactionId:this.trxId},cr,e||{}))}patch(e,t){let n=typeof t==`function`;if(typeof e!=`string`&&e instanceof I)return this._add({patch:e.serialize()});if(n){let n=t(new I(e,{},this.#e));if(!(n instanceof I))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:{id:e,...t}})}},fr=`X-Sanity-Project-ID`;function pr(e,t={}){let n={};e.headers&&Object.assign(n,e.headers);let r=t.token||e.token;r&&(n.Authorization=`Bearer ${r}`),!t.useGlobalApi&&!e.useProjectHostname&&e.projectId&&(n[fr]=e.projectId);let i=!!(typeof t.withCredentials>`u`?e.withCredentials:t.withCredentials),a=typeof t.timeout>`u`?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},n,t.headers||{}),timeout:typeof a>`u`?3e5:a,proxy:t.proxy||e.proxy,json:!0,withCredentials:i,fetch:typeof t.fetch==`object`&&typeof e.fetch==`object`?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}var mr=({query:e,params:t={},options:n={}})=>{let r=new URLSearchParams,{tag:i,includeMutations:a,returnQuery:o,...s}=n;i&&r.append(`tag`,i),r.append(`query`,e);for(let[e,n]of Object.entries(t))n!==void 0&&r.append(`$${e}`,JSON.stringify(n));for(let[e,t]of Object.entries(s))t&&r.append(e,`$Line truncated
|
||||
`),n=t.findIndex(e=>e.includes(`api.setState`));if(n<0)return;let r=t[n+1]?.trim()||``;return Zi.exec(r)?.[1]||Qi.exec(r)?.[1]}var ea=(e,t={})=>(n,r,i)=>{let{enabled:a,anonymousActionType:o,store:s,...c}=t,l;try{l=(a??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return e(n,r,i);let{connection:u,...d}=Yi(s,l,c),f=!0;i.setState=((e,t,a)=>{let l=n(e,t);if(!f)return l;let d=a===void 0?{type:o||$i(Error().stack)||`anonymous`}:typeof a==`string`?{type:a}:a;return s===void 0?(u?.send(d,r()),l):(u?.send({...d,type:`${s}/${d.type}`},{...Ji(c.name),[s]:i.getState()}),l)}),i.devtools={cleanup:()=>{u&&typeof u.unsubscribe==`function`&&u.unsubscribe(),Xi(c.name,s)}};let p=(...e)=>{let t=f;f=!1,n(...e),f=t},m=e(i.setState,r,i);if(d.type===`untracked`?u?.init(m):(d.stores[d.store]=i,u?.init(Object.fromEntries(Object.entries(d.stores).map(([e,t])=>[e,e===d.store?m:t.getState()])))),qi(i)){let e=i.dispatch;i.dispatch=(...t)=>{e(...t)}}return u.subscribe(e=>{switch(e.type){case`ACTION`:if(typeof e.payload!=`string`){console.error(`[zustand devtools middleware] Unsupported action format`);return}return ta(e.payload,e=>{if(e.type===`__setState`){if(s===void 0){p(e.state);return}Object.keys(e.state).length!==1&&console.error(`
|
||||
[zustand devtools middleware] Unsupported __setState action format.
|
||||
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
||||
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
||||
`);let t=e.state[s];if(t==null)return;JSON.stringify(i.getState())!==JSON.stringify(t)&&p(t);return}qi(i)&&i.dispatch(e)});case`DISPATCH`:switch(e.payload.type){case`RESET`:return p(m),s===void 0?u?.init(i.getState()):u?.init(Ji(c.name));case`COMMIT`:if(s===void 0){u?.init(i.getState());return}return u?.init(Ji(c.name));case`ROLLBACK`:return ta(e.state,e=>{if(s===void 0){p(e),u?.init(i.getState());return}p(e[s]),u?.init(Ji(c.name))});case`JUMP_TO_STATE`:case`JUMP_TO_ACTION`:return ta(e.state,e=>{if(s===void 0){p(e);return}JSON.stringify(i.getState())!==JSON.stringify(e[s])&&p(e[s])});case`IMPORT_STATE`:{let{nextLiftedState:t}=e.payload,n=t.computedStates.slice(-1)[0]?.state;if(!n)return;p(s===void 0?n:n[s]),u?.send(null,t);return}case`PAUSE_RECORDING`:return f=!f}return}}),m},ta=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error(`[zustand devtools middleware] Could not parse the received json`,e)}n!==void 0&&t(n)},na=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},ra=(e=>e?na(e):na);function ia(e){return`projectId`in e&&`dataset`in e}function aa(e){return`mediaLibraryId`in e}function oa(e){return`canvasId`in e}var sa=e=>typeof e==`object`&&!!e&&`releaseName`in e;function ca(e,t){let n=ra()(ea(()=>e,t));return{get:n.getState,set:(e,t)=>{let r=n.getState(),i=typeof t==`function`?t(r):t;r!==i&&n.setState(i,!1,e)},observable:new l(e=>{let t=()=>e.next(n.getState());t();let r=n.subscribe(t);return()=>r()})}}function la(e){return e}function ua(e,t,{name:n,getInitialState:r,initialize:i}){let a=ca(r(e,t),{enabled:!!ie(`DEV`),name:`${n}-${t.name}`}),o=i?.({state:a,instance:e,key:t}),s={current:!1};return{state:a,dispose:()=>{s.current||(s.current=!0,o?.())},isDisposed:()=>s.current}}function da(e){let t=new Map,n=new Map;return function(r,i){return function(a,...o){let s=e(a,...o),c=r.name+(s.name?`:${s.name}`:``),l=t.get(c);l||(l=new Set,t.set(c,l)),l.has(a.instanceId)||(l.add(a.instanceId),a.onDispose(()=>{l.delete(a.instanceId),l.size===0&&(n.get(c)?.dispose(),n.delete(c),t.delete(c))}));let u=n.get(c);return u||(u=ua(a,s,r),n.set(c,u)),i({instance:a,state:u.state,key:s},...o)}}}var fa=(e,t)=>{let n,r,i=t??e.config.resource;if(i){if(r=i,ia(i))n=`${i.projectId}.${i.dataset}`;else if(aa(i))n=`media-library:${i.mediaLibraryId}`;else if(oa(i))n=`canvas:${i.canvasId}`;else throw Error(`Received invalid resource: ${JSON.stringify(i)}`);return{name:n,resource:r}}let{projectId:a,dataset:o}=e.config;if(!a||!o)throw Error(`This API requires a project ID and dataset configured.`);return{name:`${a}.${o}`,resource:{projectId:a,dataset:o}}},pa=da((e,{resource:t})=>fa(e,t)),ma=da((e,t)=>{let{resource:n,perspective:r}=t,i=r??e.config.perspective??`drafts`,a;a=sa(i)?i.releaseName:typeof i==`string`?i:JSON.stringify(i);let o=fa(e,n);return{name:`${o.name}:${a}`,resource:o.resource,perspective:i}}),q=da((...e)=>({name:`global`}));function J(e){let t=typeof e==`function`?e:e.selector,n=e&&`onSubscribe`in e?e.onSubscribe:void 0,r=e&&`isEqual`in e?e.isEqual??Object.is:Object.is,i=new WeakMap;function a(e,...a){let{state:o,instance:s}=e,c=e=>{if(typeof e!=`object`||!e)throw Error(`Expected store state to be an object but got "${typeof e}" instead`);let n=i.get(e);n||(n=new WeakMap,i.set(e,n));let r=n.get(s);return r||(r={state:e,instance:s},n.set(s,r)),t(r,...a)},l=o.observable.pipe(S(c),T(r));n&&(l=ha(l,()=>n(e,...a)));let u=l.pipe(Ze({bufferSize:1,refCount:!0}));return{getCurrent:()=>c(o.get()),subscribe:e=>{let t=u.pipe(Qe(1)).subscribe({next:()=>e?.(),error:()=>e?.()});return()=>{t.unsubscribe()}},observable:u}}return a}function ha(e,t){return w(()=>{let n=t();return n?e.pipe(Je(()=>n())):e})}var ga=e({C:()=>Z,S:()=>ya,T:()=>_a,_:()=>Na,a:()=>Ya,c:()=>Qa,d:()=>Q,f:()=>Oa,i:()=>$a,l:()=>Xa,n:()=>qa,o:()=>eo,p:()=>Pa,r:()=>Za,s:()=>to,t:()=>$,u:()=>no,v:()=>ka,w:()=>Y,x:()=>xa});function _a(){}var va=new WeakMap;function Y(e){let t=va.get(e);return t||(t=ae(`auth`,{instanceContext:{instanceId:e.instanceId,projectId:e.config.projectId,dataset:e.config.dataset}}),va.set(e,t)),t}var X=`http://localhost`,ya=`2021-06-07`,Z=`sanity.sdk.auth`;function ba(e,t){return xa(e)?`studio`:Sa(t)?`dashboard`:`standalone`}function xa(e){return!!e.studio}function Sa(e){try{let t=new URL(e,X).searchParams.get(`_context`);if(!t)return!1;let n=JSON.parse(t);return typeof n==`object`&&!!n&&!Array.isArray(n)&&Object.keys(n).length>0}catch(e){return console.error(`Failed to parse dashboard context from initial location:`,e),!1}}var Ca=432e5;function wa(e,t,n){return new l(r=>{let i=t({apiVersion:ya,requestTagPrefix:Z,useProjectHostname:!1,useCdn:!1,token:e,ignoreBrowserTokenWarning:!0,...n&&{apiHost:n}}).observable.request({uri:`auth/refresh-token`,method:`POST`,tag:`refresh-token`,body:{token:e
Line truncated
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"icon": "<svg data-sanity-icon=\"master-detail\" width=\"1em\" height=\"1em\" viewBox=\"0 0 25 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5 6.5V10.5M9.5 10.5V14.5M9.5 10.5H5.5M9.5 14.5V18.5M9.5 14.5H5.5M5.5 6.5H19.5V18.5H5.5V6.5Z\" stroke=\"currentColor\" stroke-width=\"1.2\" stroke-linejoin=\"round\"></path></svg>",
|
||||
"name": "structure",
|
||||
"title": "Structure",
|
||||
"type": "sanity/structure"
|
||||
},
|
||||
{
|
||||
"icon": "<svg data-sanity-icon=\"image\" width=\"1em\" height=\"1em\" viewBox=\"0 0 25 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.5 15.5L8.79289 12.2071C9.18342 11.8166 9.81658 11.8166 10.2071 12.2071L12.8867 14.8867C13.2386 15.2386 13.7957 15.2782 14.1938 14.9796L15.1192 14.2856C15.3601 14.1049 15.6696 14.0424 15.9618 14.1154L19.5 15M5.5 6.5H19.5V18.5H5.5V6.5ZM15.5 10.5C15.5 11.0523 15.0523 11.5 14.5 11.5C13.9477 11.5 13.5 11.0523 13.5 10.5C13.5 9.94772 13.9477 9.5 14.5 9.5C15.0523 9.5 15.5 9.94772 15.5 10.5Z\" stroke=\"currentColor\" stroke-width=\"1.2\" stroke-linejoin=\"round\"></path></svg>",
|
||||
"name": "media",
|
||||
"title": "Media",
|
||||
"type": "sanity/media"
|
||||
},
|
||||
{
|
||||
"icon": "<svg data-sanity-icon=\"calendar\" width=\"1em\" height=\"1em\" viewBox=\"0 0 25 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.5 18.5H19.5V6.5H5.5V18.5Z\" stroke=\"currentColor\" stroke-width=\"1.2\" stroke-linejoin=\"round\"></path><path d=\"M16.5 8V4M8.5 8V4M8 12.5H10M8 15.5H10M11.5 12.5H13.5M11.5 15.5H13.5M15 12.5H17M15 15.5H17M12.5 8V4M5.5 9.5H19.5\" stroke=\"currentColor\" stroke-width=\"1.2\" stroke-linejoin=\"round\"></path></svg>",
|
||||
"name": "schedules",
|
||||
"title": "Schedules",
|
||||
"type": "sanity/scheduled-publishing"
|
||||
},
|
||||
{
|
||||
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"><rect width=\"32\" height=\"32\" rx=\"2\" fill=\"#a8bfff\"></rect><text x=\"50%\" y=\"50%\" text-anchor=\"middle\" alignment-baseline=\"middle\" fill=\"hsla(224, 100%, 43%, 1)\" style=\"font-family:Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif;font-weight:500;font-size:13px;transform:translateY(1px)\">R</text></svg>",
|
||||
"name": "releases",
|
||||
"title": "Releases",
|
||||
"type": "sanity/schedules"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,2 @@
|
||||
import{f as e}from"./from-B8yXq1Hf.js";import{l as t,r as n,s as r,t as i}from"./request-CYLhJzOA-R7VqCP01.js";function a(a){return new e(e=>{let s=new XMLHttpRequest,{url:c,method:l,headers:u,body:d,withCredentials:f,timeout:p,signal:m}=a;s.open(l,c),s.withCredentials=f,typeof p==`number`&&p>0&&(s.timeout=p);for(let[e,t]of Object.entries(u))s.setRequestHeader(e,t);s.upload.onprogress=t=>{e.next({type:`progress`,stage:`upload`,percent:t.lengthComputable?Math.round(t.loaded/t.total*100):0,total:t.total||void 0,loaded:t.loaded,lengthComputable:t.lengthComputable})},s.onload=()=>{if(s.status>=400){let a=o(s.getAllResponseHeaders()),u=r({status:s.status,statusText:s.statusText,headers:a,body:t(s.responseText,a),url:s.responseURL},c,l);e.error(s.status>=500?new n(u):new i(u));return}let a;try{a=JSON.parse(s.responseText)}catch{e.error(Error(`Failed to parse upload response as JSON`));return}e.next({type:`response`,body:a}),e.complete()},s.onerror=()=>{e.error(Error(`XHR upload network error`))},s.ontimeout=()=>{e.error(new DOMException(`The operation timed out after ${p}ms while attempting to reach ${c}`,`TimeoutError`))},s.onabort=()=>{e.error(new DOMException(`Upload aborted`,`AbortError`))};let h=()=>s.abort();if(m){if(m.aborted){e.error(new DOMException(`Upload aborted`,`AbortError`));return}m.addEventListener(`abort`,h,{once:!0})}return s.send(d),()=>{m?.removeEventListener(`abort`,h),s.abort()}})}function o(e){let t=new Headers;for(let n of e.split(`\r
|
||||
`)){let e=n.indexOf(`:`);if(!(e<=0))try{t.append(n.slice(0,e).trim(),n.slice(e+1).trim())}catch{}}return t}export{a as uploadWithProgress};
|
||||
@@ -0,0 +1,2 @@
|
||||
import{f as e}from"./from-B8yXq1Hf.js";import{r as t,s as n,t as r,u as i}from"./request-CYLhJzOA-4VlvBNTk.js";function a(a){return new e(e=>{let s=new XMLHttpRequest,{url:c,method:l,headers:u,body:d,withCredentials:f,timeout:p,signal:m}=a;s.open(l,c),s.withCredentials=f,typeof p==`number`&&p>0&&(s.timeout=p);for(let[e,t]of Object.entries(u))s.setRequestHeader(e,t);s.upload.onprogress=t=>{e.next({type:`progress`,stage:`upload`,percent:t.lengthComputable?Math.round(t.loaded/t.total*100):0,total:t.total||void 0,loaded:t.loaded,lengthComputable:t.lengthComputable})},s.onload=()=>{if(s.status>=400){let a=o(s.getAllResponseHeaders()),u=n({status:s.status,statusText:s.statusText,headers:a,body:i(s.responseText,a),url:s.responseURL},c,l);e.error(s.status>=500?new t(u):new r(u));return}let a;try{a=JSON.parse(s.responseText)}catch{e.error(Error(`Failed to parse upload response as JSON`));return}e.next({type:`response`,body:a}),e.complete()},s.onerror=()=>{e.error(Error(`XHR upload network error`))},s.ontimeout=()=>{e.error(new DOMException(`The operation timed out after ${p}ms while attempting to reach ${c}`,`TimeoutError`))},s.onabort=()=>{e.error(new DOMException(`Upload aborted`,`AbortError`))};let h=()=>s.abort();if(m){if(m.aborted){e.error(new DOMException(`Upload aborted`,`AbortError`));return}m.addEventListener(`abort`,h,{once:!0})}return s.send(d),()=>{m?.removeEventListener(`abort`,h),s.abort()}})}function o(e){let t=new Headers;for(let n of e.split(`\r
|
||||
`)){let e=n.indexOf(`:`);if(!(e<=0))try{t.append(n.slice(0,e).trim(),n.slice(e+1).trim())}catch{}}return t}export{a as uploadWithProgress};
|
||||
@@ -1,2 +0,0 @@
|
||||
import{t as e}from"./Observable-BrARBsae.js";import{r as t,s as n,t as r,u as i}from"./request-BhMuKj0D-CchCio66.js";function a(a){return new e(e=>{let s=new XMLHttpRequest,{url:c,method:l,headers:u,body:d,withCredentials:f,timeout:p,signal:m}=a;s.open(l,c),s.withCredentials=f,typeof p==`number`&&p>0&&(s.timeout=p);for(let[e,t]of Object.entries(u))s.setRequestHeader(e,t);s.upload.onprogress=t=>{e.next({type:`progress`,stage:`upload`,percent:t.lengthComputable?Math.round(t.loaded/t.total*100):0,total:t.total||void 0,loaded:t.loaded,lengthComputable:t.lengthComputable})},s.onload=()=>{if(s.status>=400){let a=o(s.getAllResponseHeaders()),u=n({status:s.status,statusText:s.statusText,headers:a,body:i(s.responseText,a),url:s.responseURL},c,l);e.error(s.status>=500?new t(u):new r(u));return}let a;try{a=JSON.parse(s.responseText)}catch{e.error(Error(`Failed to parse upload response as JSON`));return}e.next({type:`response`,body:a}),e.complete()},s.onerror=()=>{e.error(Error(`XHR upload network error`))},s.ontimeout=()=>{e.error(new DOMException(`The operation timed out after ${p}ms while attempting to reach ${c}`,`TimeoutError`))},s.onabort=()=>{e.error(new DOMException(`Upload aborted`,`AbortError`))};let h=()=>s.abort();if(m){if(m.aborted){e.error(new DOMException(`Upload aborted`,`AbortError`));return}m.addEventListener(`abort`,h,{once:!0})}return s.send(d),()=>{m?.removeEventListener(`abort`,h),s.abort()}})}function o(e){let t=new Headers;for(let n of e.split(`\r
|
||||
`)){let e=n.indexOf(`:`);if(!(e<=0))try{t.append(n.slice(0,e).trim(),n.slice(e+1).trim())}catch{}}return t}export{a as uploadWithProgress};
|
||||
@@ -0,0 +1 @@
|
||||
import{Df as e,Ef as t,Gd as n,Kd as r,Vl as i,Wd as a,qd as o,yc as s}from"./PerspectiveProvider-qJFIbsuW-Dt3-zfHa.js";import{i as c,r as l}from"./helpers-D_aQC6Do-BbFlOJg3.js";function u(e,t){let i=r(e,t),a=n(i),s=_(a);return{patches:o(e,a,{margin:15}),levenshtein:s}}function d(e,t){return a(t,e,{allowExceedingIndices:!0,margin:15})[0]}function f(e){return e.children.map(e=>t(e)?e.text.replaceAll(``,` `):``).join(``)}var p=[``,``],m=RegExp(`[${p.join(``)}]`,`g`),h=[];function g(t){let{value:n,comments:r,documentValue:a,basePath:o}=t;if(!n||n.length===0)return h;let g=r.filter(l),_=[];return g.forEach(t=>{let r=[];if(a!==void 0&&o){let e=c(t.target.path?.field);if(!e||!i(o,e))return;r=e.slice(o.length)}t.target.path?.selection?.value.forEach(i=>{let a=r.length>0?s(n,[...r,{_key:i._key}]):n.find(e=>e._key===i._key);if(!e(a))return;let o=i.text.replaceAll(m,``),c=f(a),{patches:l}=u(o,i.text),h=d(c,l),g=h.indexOf(p[0]),v=h.replaceAll(p[0],``).indexOf(p[1]),y=h.replaceAll(m,``),b=i.text.slice(i.text.indexOf(p[0])+1,i.text.indexOf(p[1])),x=y.slice(g,v),{levenshtein:S}=u(x,b),C=Math.round(x.length+b.length/2),w=!1;if(x.length===0&&(w=!0),S>C&&(w=!0),g+1===v&&(w=!0),g!==-1&&v!==-1){let e=0,n=0,i=0,o=0;for(let t=0;t<y.length&&(y[t]===``&&(t<=g&&(n=-1,e++),o=-1,i++),t<g&&n++,t<g+x.length&&o++,t!==g+x.length);t++);_.push({selection:{anchor:{path:[...r,{_key:a._key},`children`,{_key:a.children[e]._key}],offset:n},focus:{path:[...r,{_key:a._key},`children`,{_key:a.children[i]._key}],offset:o}},comment:t,range:{_key:a._key,text:w?``:h}})}})}),_.length===0?h:_}function _(e){let t=0,n=0,r=0;for(let i=0;i<e.length;i++){let a=e[i][0],o=e[i][1];switch(a){case 1:n+=o.length;break;case-1:r+=o.length;break;case 0:t+=Math.max(n,r),n=0,r=0}}return t+=Math.max(n,r),t}export{g as n,p as t};
|
||||
@@ -1 +0,0 @@
|
||||
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,t as n}from"./jsx-runtime-BpzPEenQ.js";import{t as r}from"./compiler-runtime-sKsOXjDo.js";import{Al as i,Dl as a,Ol as o,cl as s,gc as c,kl as l,si as u,sl as d}from"./PerspectiveProvider-CVaQBlks-DQrwCBtA.js";import{A as f,k as p}from"./lib-BUPHIzf9.js";import{Ft as m,Nt as h,V as g}from"./dist-BOMXfkZi.js";import{_,f as v,t as y,v as b}from"./useComments-CVvkxQg3-CVUv-UC3.js";var x=e(t(),1),S=r(),C=n();function w(e){let t=(0,S.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({ref:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i,a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,C.jsx)(`path`,{d:`M5.92627 14.5381H7.92627V18.5381L11.9263 14.5381H15.9263C17.0308 14.5381 17.9263 13.6427 17.9263 12.5381V6.53809C17.9263 5.43352 17.0308 4.53809 15.9263 4.53809H5.92627C4.8217 4.53809 3.92627 5.43352 3.92627 6.53809V12.5381C3.92627 13.6427 4.8217 14.5381 5.92627 14.5381Z`,stroke:`currentColor`,strokeWidth:`1.2`,strokeLinejoin:`round`}),a=(0,C.jsx)(`path`,{d:`M2.77256 2.66835C2.54413 2.51319 2.23317 2.57259 2.07802 2.80103L1.40378 3.7937C1.32927 3.9034 1.30139 4.0382 1.32627 4.16845C1.35115 4.29871 1.42676 4.41374 1.53646 4.48825L19.5861 16.7479C19.8146 16.903 20.1255 16.8436 20.2807 16.6152L20.9549 15.6225C21.0294 15.5128 21.0573 15.378 21.0324 15.2478C21.0076 15.1175 20.9319 15.0025 20.8222 14.928L2.77256 2.66835Z`,fill:`currentColor`,strokeLinejoin:`round`}),t[3]=i,t[4]=a):(i=t[3],a=t[4]);let o;return t[5]!==n||t[6]!==r?(o=(0,C.jsxs)(`svg`,{"data-sanity-icon":`comment-disabled`,width:`1em`,height:`1em`,ref:n,viewBox:`0 0 25 25`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...r,children:[i,a]}),t[5]=n,t[6]=r,t[7]=o):o=t[7],o}var T=m.span.withConfig({displayName:`HighlightSpan`,componentId:`sc-8rkq2u-0`})(({theme:e})=>{let t=e.sanity.v2?.color._dark,n=g[y][t?800:100].hex,r=g[y][t?700:300].hex,i=g[y][t?700:200].hex,a=g[y][t?600:400].hex,o=g[y][t?700:200].hex,s=g[y][t?600:400].hex;return h`box-sizing:border-box;transition:background-color 100ms ease,border-color 100ms ease;*{mix-blend-mode:${t?`screen`:`multiply`};}&[data-inline-comment-state='added'][data-inline-comment-nested='false']{background-color:${n};border-bottom:2px solid ${r};}&[data-inline-comment-state='added'][data-inline-comment-nested='true']{background-color:${o};border-bottom:2px solid ${s};}&[data-inline-comment-state='added'][data-inline-comment-nested='false'][data-hovered='true']{background-color:${i};border-bottom:2px solid ${a};}&[data-inline-comment-state='authoring']{background-color:${n};border-bottom:2px solid ${r};}`});function E(e){let t=(0,S.c)(15),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({ref:s,children:n,isAdded:r,isAuthoring:i,isHovered:a,isNested:o,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=r?`added`:i?`authoring`:void 0,u=a?`true`:`false`,d=o?`true`:`false`,f;return t[8]!==n||t[9]!==s||t[10]!==c||t[11]!==l||t[12]!==u||t[13]!==d?(f=(0,C.jsx)(T,{...c,"data-hovered":u,"data-inline-comment-nested":d,"data-inline-comment-state":l,ref:s,children:n}),t[8]=n,t[9]=s,t[10]=c,t[11]=l,t[12]=u,t[13]=d,t[14]=f):f=t[14],f}function D(e,t){let n=l(e,t),r=o(n),a=P(r);return{patches:i(e,r,{margin:15}),levenshtein:a}}function O(e,t){return a(t,e,{allowExceedingIndices:!0,margin:15})[0]}function k(e){return e.children.map(e=>p(e)?e.text.replaceAll(``,` `):``).join(``)}var A=[``,``],j=RegExp(`[${A.join(``)}]`,`g`),M=[];function N(e){let{value:t,comments:n,documentValue:r,basePath:i}=e;if(!t||t.length===0)return M;let a=n.filter(_),o=[];return a.forEach(e=>{let n=[];if(r!==void 0&&i){let t=b(e.target.path?.field);if(!t||!d(i,t))return;n=t.slice(i.length)}e.target.path?.selection?.value.forEach(a=>{let s=r!==void 0&&i?u(r,[...i,...n,{_key:a._key}]):t.find(e=>e._key===a._key);if(!s||!f(s))return;let c=a.text.replaceAll(j,``),l=k(s),{patches:d}=D(c,a.text),p=O(l,d),m=p.indexOf(A[0]),h=p.replaceAll(A[0],``).indexOf(A[1]),g=p.replaceAll(j,``),_=a.text.slice(a.text.indexOf(A[0])+1,a.text.indexOf(A[1])),v=g.slice(m,h),{levenshtein:y}=D(v,_),b=Math.round(v.length+_.length/2),x=!1;if(v.length===0&&(x=!0),y>b&&(x=!0),m+1===h&&(x=!0),m!==-1&&h!==-1){let t=0,r=0,i=0,a=0;for(let e=0;e<g.length&&(g[e]===``&&(e<=m&&(r=-1,t++),a=-1,i++),e<m&&r++,e<m+v.length&&a++,e!==m+v.length);e++);o.push({selection:{anchor:{path:[...n,{_key:s._key},`children`,{_key:s.children[t]._key}],offset:r},focus:{path:[...n,{_key:s._key},`children`,{_key:s.children[i]._key}],offset:a}},comment:e,range:{_key:s._key,text:x?``:p}})}})}),o.length===0?M:o}function P(e){let t=0,n=0,r=0;for(let i=0;i<e.length;i++){let a=e[i][0],o=e[i][1];switch(a){case 1:n+=o.length;break;case-1:r+=o.length;break;case 0:t+=Math.max(n,r),n=0,r=0}}return t+=Math.max(n,r),t}var F=(0,x.memo)(function(e){let t=(0,S.c)(20),{children:n,commentId:r,currentHoveredCommentId:i,onClick:a,onHoverEnd:o,onHoverStart:s,selectedThreadId:c,threadId:l}=e,u=(0,x.useRef)(null),[d,f]=(0,x.useState)(!1),[p,m]=(0,x.usLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{A as t,C as n,S as r,b as i,c as a,g as o,m as s,w as c,x as l,y as u}from"./authStore-CtE9bLHW-D5dT_tdN.js";import{n as d}from"./logger-DAtJb5RQ-Y7uUAH66.js";function f(e){return typeof e==`object`&&!!e}var p=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),m=e=>{if(!f(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null};function h(e,t){if(!e)return{};let{[t]:n,...r}=e;return r}function g(e,t){let n={};for(let r of t)p(e,r)&&(n[r]=e[r]);return n}var _=(e,t)=>{if(e.size!==t.size)return!1;let n=[...t];outer:for(let t of e){for(let e=0;e<n.length;e++)if(y(t,n[e])){n.splice(e,1);continue outer}return!1}return n.length===0},v=(e,t)=>{if(e.size!==t.size)return!1;let n=[...t.entries()];outer:for(let[t,r]of e){for(let e=0;e<n.length;e++){let[i,a]=n[e];if(y(t,i)&&y(r,a)){n.splice(e,1);continue outer}}return!1}return n.length===0};function y(e,t){if(Object.is(e,t))return!0;if(!f(e)||!f(t))return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set)return _(e,t);if(e instanceof Map&&t instanceof Map)return v(e,t);if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>y(e,t[n]));if(!m(e)||!m(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!p(t,r)||!y(e[r],t[r]))return!1;return!0}var b=e({n:()=>O,r:()=>k,t:()=>x}),x=d({getClient:()=>O,getClientState:()=>k}),S=Object.keys({apiHost:null,useCdn:null,token:null,perspective:null,proxy:null,withCredentials:null,timeout:null,maxRetries:null,dataset:null,projectId:null,scope:null,apiVersion:null,requestTagPrefix:null,useProjectHostname:null,resource:null}),C={apiVersion:`2024-11-12`,useCdn:!1,ignoreBrowserTokenWarning:!0,allowReconfigure:!1,requestTagPrefix:`sanity.sdk`},w=l({name:`clientStore`,getInitialState:e=>({clients:{},token:o(e).getCurrent()}),initialize(e){let t=T(e),n=E(e);return()=>{t.unsubscribe(),n.unsubscribe()}}}),T=({instance:e,state:t})=>o(e).observable.subscribe(e=>{t.set(`setTokenAndResetClients`,{token:e,clients:{}})}),E=({instance:e,state:t})=>a(e).observable.subscribe(e=>{t.set(`setAuthMethod`,{authMethod:e})}),D=e=>JSON.stringify(g(e,S)),O=u(w,({state:e,instance:i},a)=>{if(!a||typeof a!=`object`)throw Error(`getClient() requires a configuration object with at least an "apiVersion" property. Example: getClient(instance, { apiVersion: "2024-11-12" })`);let o=Object.keys(a).filter(e=>!S.includes(e));if(o.length>0){let e=new Intl.ListFormat(`en`,{style:`long`,type:`conjunction`});throw Error(`The client options provided contains unsupported properties: ${e.format(o)}. Allowed keys are: ${e.format(S)}.`)}let l=e.get().token,{clients:u,authMethod:d}=e.get(),f=a.projectId??i.config.projectId,p=a.dataset??i.config.dataset,m;a.resource&&(c(a.resource)?m={type:`media-library`,id:a.resource.mediaLibraryId}:r(a.resource)?m={type:`canvas`,id:a.resource.canvasId}:n(a.resource)&&(f=a.resource.projectId,p=a.resource.dataset));let h=a.apiHost??i.config.auth?.apiHost??s(),g={...C,...(a.scope===`global`||!f||m)&&{useProjectHostname:!1},token:d===`cookie`?void 0:l??void 0,...a,...f&&{projectId:f},...p&&{dataset:p},...m?{resource:m}:{resource:void 0},...h&&{apiHost:h}};m&&(delete g.projectId,delete g.dataset),g.token===null||g.token===void 0?(delete g.token,d===`cookie`&&(g.withCredentials=!0)):delete g.withCredentials;let _=D(g);if(u[_])return u[_];let v=t(g);return e.set(`addClient`,e=>({clients:{...e.clients,[_]:v}})),v}),k=u(w,i(({instance:e},t)=>O(e,t)));export{h as a,y as i,O as n,k as r,b as t};
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/stegaEncodeSourceMap-Dj29aWKG-IWMoIZhH.js","static/resolveEditInfo-Cz-smq3a-BkgfIKD_.js","static/isRecord-Kfmt-nk--BGze3w87.js","static/browserUpload-BTQyjHMj-BmKeaq0T.js","static/from-B8yXq1Hf.js","static/request-CYLhJzOA-R7VqCP01.js"])))=>i.map(i=>d[i]);
|
||||
import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{A as t,D as n,S as r,T as i,_ as a,a as o,b as s,d as c,f as l,g as u,h as d,k as f,l as p,m,o as h,s as g,t as _,v as ee,x as te,y as ne}from"./from-B8yXq1Hf.js";import{t as re}from"./preload-helper-DjzSQ1t3.js";import{t as ie}from"./isRecord-Kfmt-nk--BGze3w87.js";import{a as ae,c as oe,i as v,n as se,o as ce,t as le,u as ue}from"./request-CYLhJzOA-R7VqCP01.js";import{a as de,h as fe,i as pe,n as me,o as he,r as ge,s as _e}from"./resolveEditInfo-Cz-smq3a-BkgfIKD_.js";var ve=te(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),ye=function(e){i(n,e);function n(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return n.prototype.lift=function(e){var t=new be(this,this);return t.operator=e,t},n.prototype._throwIfClosed=function(){if(this.closed)throw new ve},n.prototype.next=function(e){var n=this;u(function(){var r,i;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var a=t(n.currentObservers),o=a.next();!o.done;o=a.next())o.value.next(e)}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}})},n.prototype.error=function(e){var t=this;u(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},n.prototype.complete=function(){var e=this;u(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},n.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?ee:(this.currentObservers=null,a.push(e),new ne(function(){t.currentObservers=null,s(a,e)}))},n.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},n.prototype.asObservable=function(){var e=new l;return e.source=this,e},n.create=function(e,t){return new be(e,t)},n}(l),be=function(e){i(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??ee},t}(ye),xe={now:function(){return(xe.delegate||Date).now()},delegate:void 0},Se=function(e){i(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=xe);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},t}(ye),Ce=function(e){i(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(ne),we={setInterval:function(e,t){var r=[...arguments].slice(2),i=we.delegate;return i?.setInterval?i.setInterval.apply(i,f([e,t],n(r))):setInterval.apply(void 0,f([e,t],n(r)))},clearInterval:function(e){return(we.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},Te=function(e){i(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===voidLine truncated
|
||||
`)===-1&&e.indexOf(`\r`)===-1){if(c<St&&!ne(s.join(``)+e.slice(0,St-c))){s.length=0,c=0,h=!0;return}s.push(e),c+=e.length,re();return}s.push(e);let t=s.join(``);s.length=0,c=0,te(ie(t)),re()}function ee(e){if(e.length===0)return e;if(g)return g=!1,e.charCodeAt(0)===yt?e.slice(1):e;let t=e.indexOf(`\r`),n=e.indexOf(`
|
||||
`),r=t===-1?n:n===-1||t<n?t:n;return r===-1?``:r===e.length-1&&e.charCodeAt(r)===bt?(h=!1,g=!0,``):(h=!1,e.slice(r+(e.charCodeAt(r)===bt&&e.charCodeAt(r+1)===yt?2:1)))}function te(e){if(e){if(e.charCodeAt(e.length-1)===bt){ae(e,0,e.length-1),g=!0;return}if(ne(e)){s.push(e),c=e.length;return}h=!0}}function ne(e){let t=e.charCodeAt(0);return t===58&&!!n||t===100&&Et(e,`data`)||t===101&&Et(e,`event`)||t===105&&Et(e,`id`)||t===114&&Et(e,`retry`)}function re(){t!==void 0&&(c+d.length<=t||(m=!0,s.length=0,c=0,u=void 0,d=``,f=0,p=void 0,h=!1,g=!1,r?.(new vt(`Buffered data exceeded max buffer size of ${t} characters`,{type:`max-buffer-size-exceeded`}))))}function ie(e){let t=0;if(e.indexOf(`\r`)===-1){let n=e.indexOf(`
|
||||
`,t);for(;n!==-1;){if(t===n){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0,t=n+1,n=e.indexOf(`
|
||||
`,t);continue}let r=e.charCodeAt(t);if(wt(e,t,r)){let r=e.charCodeAt(t+5)===xt?t+6:t+5,o=e.slice(r,n);if(f===0&&e.charCodeAt(n+1)===yt){u!==void 0&&a?.(u),i?.({id:u,event:p,data:o}),u=void 0,d=``,p=void 0,t=n+2,n=e.indexOf(`
|
||||
`,t);continue}d=f===0?o:`${d}\n${o}`,f++}else Tt(e,t,r)?p=e.slice(e.charCodeAt(t+6)===xt?t+7:t+6,n)||void 0:ae(e,t,n);t=n+1,n=e.indexOf(`
|
||||
`,t)}return e.slice(t)}for(;t<e.length;){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
||||
`,t),i=-1;if(n!==-1&&r!==-1?i=n<r?n:r:n===-1?r!==-1&&(i=r):i=n===e.length-1?-1:n,i===-1)break;ae(e,t,i),t=i+1,e.charCodeAt(t-1)===bt&&e.charCodeAt(t)===yt&&t++}return e.slice(t)}function ae(e,t,r){if(t===r){v();return}let i=e.charCodeAt(t);if(wt(e,t,i)){let n=e.charCodeAt(t+5)===xt?t+6:t+5,i=e.slice(n,r);d=f===0?i:`${d}\n${i}`,f++;return}if(Tt(e,t,i)){p=e.slice(e.charCodeAt(t+6)===xt?t+7:t+6,r)||void 0;return}if(i===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let n=e.slice(e.charCodeAt(t+3)===xt?t+4:t+3,r);n.includes(`\0`)||(u=n);return}if(i===58){if(n){let i=e.slice(t,r);n(i.slice(e.charCodeAt(t+1)===xt?2:1))}return}let a=e.slice(t,r),o=a.indexOf(`:`);if(o===-1){oe(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===xt?2:1;oe(s,a.slice(o+c),a)}function oe(e,t,n){switch(e){case`event`:p=t||void 0;break;case`data`:d=f===0?t:`${d}\n${t}`,f++;break;case`id`:t.includes(`\0`)||(u=t);break;case`retry`:/^\d+$/.test(t)?o?.(parseInt(t,10)):r?.(new vt(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:n}));break;default:r?.(new vt(`Unknown field "${e.length>20?`${e.slice(0,20)}…`:e}"`,{type:`unknown-field`,field:e,value:t,line:n}))}}function v(){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0}function se(e={}){if(e.consume&&s.length>0){let e=s.join(``);ae(e,0,e.length)}l=``,u=void 0,d=``,f=0,p=void 0,s.length=0,c=0,m=!1,h=!1,g=!1}return{feed:_,reset:se}}function wt(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function Tt(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}function Et(e,t){let n=1;for(;n<e.length&&n<t.length;){if(e.charCodeAt(n)!==t.charCodeAt(n))return!1;n++}return e.length<=t.length||e.charCodeAt(t.length)===58}function Dt(e){return`https://www.sanity.io/help/`+e}var Ot=[`image`,`file`],kt=[`before`,`after`,`replace`],At=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error(`Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters`)},jt=e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},Mt=e=>{if(Ot.indexOf(e)===-1)throw Error(`Invalid asset type: ${e}. Must be one of ${Ot.join(`, `)}`)},Nt=(e,t)=>{if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},Pt=(e,t)=>{if(typeof t!=`string`||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(`..`))throw Error(`${e}(): "${t}" is not a valid document ID`)},Ft=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);Pt(e,t._id)},It=(e,t)=>{if(typeof t!=`string`)throw Error(`\`${e}()\`: \`${t}\` is not a valid document type`)},Lt=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);It(e,t._type)},Rt=(e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)},zt=(e,t,n)=>{let r=`insert(at, selector, items)`;if(kt.indexOf(e)===-1){let e=kt.map(e=>`"${e}"`).join(`, `);throw Error(`${r} takes an "at"-argument which is one of: ${e}`)}if(typeof t!=`string`)throw Error(`${r} takes a "selector"-argument which must be a string`);if(!Array.isArray(n))throw Error(`${r} takes an "items"-argument which must be an array`)},Bt=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&t.type===`dataset`){let e=t.id.split(`.`);if(e.length!==2)throw Error(`Dataset resource ID must be in the format "project.dataset"`);return e[1]}throw Error("`dataset` must be provided to perform queries")},Vt=e=>{if(typeof e!=`string`||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error(`Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.`);return e},Ht=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:n,id:r}=t;switch(n){case`dataset`:if(r.split(`.`).length!==2)throw Error(`Dataset resource ID must be in the format "project.dataset"`);return;case`dashboard`:case`knowledge-base`:case`media-library`:case`canvas`:return;default:throw Error(`Unsupported resource type: ${n.toString()}`)}},C=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)};function Ut(e){let t=!1,n;return(...r)=>t?n:(n=e(...r),t=!0,n)}var w=e=>Ut((...t)=>console.warn(e.join(` `),...t)),Wt=w(["Because you set `withCredentials` to true, we will override your `useCdn`",`setting to be false since (cookie-based) credentials are never set on the CDN`]),Gt=w(["Since you haven't set a value for `useCdn`, we will deliver content using our",`global, edge-cached API-CDN. If you wish to have content delivered faster, set`,"`useCdn: false` to use the Live API. Note: You may incur higher costs usingLine truncated
|
||||
`);throw Error(`Unknown selection - must be one of:\n\n${t}`)}function kn(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function T(e,t,n){kn(e,t),t.set(e,n)}function E(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function D(e,t,n){return e.set(E(e,t),n),n}function O(e,t){return e.get(E(e,t))}var An=class{constructor(e,t={}){v(this,`selection`,void 0),v(this,`operations`,void 0),this.selection=e,this.operations=t}set(e){return this._assign(`set`,e)}setIfMissing(e){return this._assign(`setIfMissing`,e)}diffMatchPatch(e){return Nt(`diffMatchPatch`,e),this._assign(`diffMatchPatch`,e)}unset(e){if(!Array.isArray(e))throw Error(`unset(attrs) takes an array of attributes to unset, non-array given`);return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign(`inc`,e)}dec(e){return this._assign(`dec`,e)}insert(e,t,n){return zt(e,t,n),this._assign(`insert`,{[e]:t,items:n})}append(e,t){return this.insert(`after`,`${e}[-1]`,t)}prepend(e,t){return this.insert(`before`,`${e}[0]`,t)}splice(e,t,n,r){let i=n===void 0||n===-1,a=t<0?t-1:t,o=i?-1:Math.max(0,t+n),s=`${e}[${a}:${a<0&&o>=0?``:o}]`;return this.insert(`replace`,s,r||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...On(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,n=!0){return Nt(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},n&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}},jn=new WeakMap,Mn=class e extends An{constructor(e,t,n){super(e,t),T(this,jn,void 0),D(jn,this,n)}clone(){return new e(this.selection,{...this.operations},O(jn,this))}commit(e){if(!O(jn,this))throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=typeof this.selection==`string`,n=Object.assign({returnFirst:t,returnDocuments:!0},e);return O(jn,this).mutate({patch:this.serialize()},n)}},Nn=new WeakMap,Pn=class e extends An{constructor(e,t,n){super(e,t),T(this,Nn,void 0),D(Nn,this,n)}clone(){return new e(this.selection,{...this.operations},O(Nn,this))}commit(e){if(!O(Nn,this))throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=typeof this.selection==`string`,n=Object.assign({returnFirst:t,returnDocuments:!0},e);return O(Nn,this).mutate({patch:this.serialize()},n)}},Fn={returnDocuments:!1},In=class{constructor(e=[],t){v(this,`operations`,void 0),v(this,`trxId`,void 0),this.operations=e,this.trxId=t}create(e){return Nt(`create`,e),this._add({create:e})}createIfNotExists(e){let t=`createIfNotExists`;return Nt(t,e),Ft(t,e),this._add({[t]:e})}createOrReplace(e){let t=`createOrReplace`;return Nt(t,e),Ft(t,e),this._add({[t]:e})}delete(e){return Pt(`delete`,e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}},Ln=new WeakMap,Rn=class e extends In{constructor(e,t,n){super(e,n),T(this,Ln,void 0),D(Ln,this,t)}clone(){return new e([...this.operations],O(Ln,this),this.trxId)}commit(e){if(!O(Ln,this))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return O(Ln,this).mutate(this.serialize(),Object.assign({transactionId:this.trxId},Fn,e||{}))}patch(e,t){let n=typeof t==`function`,r=typeof e!=`string`&&e instanceof Pn,i=typeof e==`object`&&(`query`in e||`id`in e);if(r)return this._add({patch:e.serialize()});if(n){let n=t(new Pn(e,{},O(Ln,this)));if(!(n instanceof Pn))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}if(i){let n=new Pn(e,t||{},O(Ln,this));return this._add({patch:n.serialize()})}return this._add({patch:{id:e,...t}})}},zn=new WeakMap,Bn=class e extends In{constructor(e,t,n){super(e,n),T(this,zn,void 0),D(zn,this,t)}clone(){return new e([...this.operations],O(zn,this),this.trxId)}commit(e){if(!O(zn,this))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return O(zn,this).mutate(this.serialize(),Object.assign({transactionId:this.trxId},Fn,e||{}))}patch(e,t){let n=typeof t==`function`;if(typeof e!=`string`&&e instanceof Mn)return this._add({patch:e.serialize()});if(n){let n=t(new Mn(e,{},O(zn,this)));if(!(n instanceof Mn))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:{id:e,...t}})}},Vn=[`headers`,`signal`,`tag`,`timeout`,`token`];function Hn(e,t={}){let n={};e.headers&&Object.assign(n,e.headers);let r=t.token||e.token;r&&(n.Authorization=`Bearer ${r}`),!t.useGlob
Line truncated
|
||||
`),n=t.findIndex(e=>e.includes(`api.setState`));if(n<0)return;let r=t[n+1]?.trim()||``;return Vo.exec(r)?.[1]||Ho.exec(r)?.[1]}var Wo=(e,t={})=>(n,r,i)=>{let{enabled:a,anonymousActionType:o,store:s,...c}=t,l;try{l=(a??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return e(n,r,i);let{connection:u,...d}=zo(s,l,c),f=!0;i.setState=((e,t,a)=>{let l=n(e,t);if(!f)return l;let d=a===void 0?{type:o||Uo(Error().stack)||`anonymous`}:typeof a==`string`?{type:a}:a;return s===void 0?(u?.send(d,r()),l):(u?.send({...d,type:`${s}/${d.type}`},{...Ro(c.name),[s]:i.getState()}),l)}),i.devtools={cleanup:()=>{u&&typeof u.unsubscribe==`function`&&u.unsubscribe(),Bo(c.name,s)}};let p=(...e)=>{let t=f;f=!1,n(...e),f=t},m=e(i.setState,r,i);if(d.type===`untracked`?u?.init(m):(d.stores[d.store]=i,u?.init(Object.fromEntries(Object.entries(d.stores).map(([e,t])=>[e,e===d.store?m:t.getState()])))),Io(i)){let e=i.dispatch;i.dispatch=(...t)=>{e(...t)}}return u.subscribe(e=>{switch(e.type){case`ACTION`:if(typeof e.payload!=`string`){console.error(`[zustand devtools middleware] Unsupported action format`);return}return Go(e.payload,e=>{if(e.type===`__setState`){if(s===void 0){p(e.state);return}Object.keys(e.state).length!==1&&console.error(`
|
||||
[zustand devtools middleware] Unsupported __setState action format.
|
||||
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
||||
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
||||
`);let t=e.state[s];if(t==null)return;JSON.stringify(i.getState())!==JSON.stringify(t)&&p(t);return}Io(i)&&i.dispatch(e)});case`DISPATCH`:switch(e.payload.type){case`RESET`:return p(m),s===void 0?u?.init(i.getState()):u?.init(Ro(c.name));case`COMMIT`:if(s===void 0){u?.init(i.getState());return}return u?.init(Ro(c.name));case`ROLLBACK`:return Go(e.state,e=>{if(s===void 0){p(e),u?.init(i.getState());return}p(e[s]),u?.init(Ro(c.name))});case`JUMP_TO_STATE`:case`JUMP_TO_ACTION`:return Go(e.state,e=>{if(s===void 0){p(e);return}JSON.stringify(i.getState())!==JSON.stringify(e[s])&&p(e[s])});case`IMPORT_STATE`:{let{nextLiftedState:t}=e.payload,n=t.computedStates.slice(-1)[0]?.state;if(!n)return;p(s===void 0?n:n[s]),u?.send(null,t);return}case`PAUSE_RECORDING`:return f=!f}return}}),m},Go=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error(`[zustand devtools middleware] Could not parse the received json`,e)}n!==void 0&&t(n)},Ko=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},qo=(e=>e?Ko(e):Ko);function Jo(e){return`projectId`in e&&`dataset`in e}function Yo(e){return`mediaLibraryId`in e}function Xo(e){return`canvasId`in e}var Zo=e=>typeof e==`object`&&!!e&&`releaseName`in e;function Qo(e){return{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}[e]}function $o(e){let t=e;typeof t==`object`&&t&&`unref`in t&&typeof t.unref==`function`&&t.unref()}function es(e,t){let n=setTimeout(e,t);return $o(n),n}function ts(e,t){let n=setInterval(e,t);return $o(n),n}function ns(e){return new l(t=>{let n=es(()=>t.next(),e);return()=>clearTimeout(n)})}function rs(e,t){let n=qo()(Wo(()=>e,t));return{get:n.getState,set:(e,t)=>{let r=n.getState(),i=typeof t==`function`?t(r):t;r!==i&&n.setState(i,!1,e)},observable:new l(e=>{let t=()=>e.next(n.getState());t();let r=n.subscribe(t);return()=>r()})}}function is(e){return e}var as=1e3;function os(e,t,{name:n,getInitialState:r,initialize:i,upstream:a}){let o=rs(r(e,t),{enabled:!!Qo(`DEV`),name:`${n}-${t.name}`}),s=i?.({state:o,instance:e,key:t}),c={current:!1},u=new ye,d,f;return{state:o,upstream$:a?new l(n=>{if(c.current)return n.complete();clearTimeout(f);try{let n=a({state:o,instance:e,key:t});return d=void 0,n}catch(e){throw d={error:e},f=es(()=>{d=void 0},as),e}}).pipe(ht(u),ut({resetOnComplete:!1,resetOnRefCountZero:()=>ns(as)})):Ae,upstreamError:()=>d,dispose:()=>{c.current||(c.current=!0,u.next(),s?.())},isDisposed:()=>c.current}}function ss(e){let t=new Map,n=new Map;return function(r,i){return function(a,...o){let s=e(a,...o),c=r.name+(s.name?`:${s.name}`:``),l=t.get(c);l||(l=new Set,t.set(c,l)),l.has(a.instanceId)||(l.add(a.instanceId),a.onDispose(()=>{l.delete(a.instanceId),l.size===0&&(n.get(c)?.dispose(),n.delete(c),t.delete(c))}));let u=n.get(c);return u||(u=os(a,s,r),n.set(c,u)),i({instance:a,state:u.state,key:s,upstream$:u.upstream$,upstreamError:u.upstreamError},...o)}}}var cs=(e,t)=>{let n,r,i=t??e.config.resource;if(i){if(r=i,Jo(i))n=`${i.projectId}.${i.dataset}`;else if(Yo(i))n=`media-library:${i.mediaLibraryId}`;else if(Xo(i))n=`canvas:${i.canvasId}`;else throw Error(`Received invalid resource: ${JSON.stringify(i)}`);return{name:n,resource:r}}let{projectId:a,dataset:o}=e.config;if(!a||!o)throw Error(`This API requires a project ID and dataset configured.`);return{name:`${a}.${o}`,resource:{projectId:a,dataset:o}}},ls=ss((e,{resource:t})=>cs(e,t)),us=ss((e,t)=>{let{resource:n,perspective:r}=t,i=r??e.config.perspective??`drafts`,a;a=Zo(i)?i.releaseName:typeof i==`string`?i:JSON.stringify(i);let o=cs(e,n);return{name:`${o.name}:${a}`,resource:o.resource,perspective:i}}),Y=ss((...e)=>({name:`global`}));function ds(e){let t=typeof e==`function`?e:e.selector,n=e&&`onSubscribe`in e?e.onSubscribe:void 0,r=e&&`isEqual`in e?e.isEqual??Object.is:Object.is,i=new WeakMap;function a(e,...a){let{state:o,instance:s}=e,c=e=>{if(typeof e!=`object`||!e)throw Error(`Expected store state to be an object but got "${typeof e}" instead`);let n=i.get(e);n||(n=new WeakMap,i.set(e,n));let r=n.get(s);return r||(r={state:e,instance:s},n.set(s,r)),t(r,...a)},l=o.observable.pipe(b(c),ot(r));n&&(l=fs(l,()=>n(e,...a))),e.upstream$&&(l=it(l,e.upstream$));let u=l.pipe(ft({bufferSize:1,refCount:!0}));return{getCurrent:()=>{let t=e.upstreamError?.();if(t)throw t.error;return c(o.get())},subscribe:e=>{let t=u.pipe(pt(1)).subscribe({next:()=>e?.(),error:()=>e?.()});return()=>{t.unsubscribe()}},observable:u}}return a}function fs(e,t){return Je(()=>{let n=t();return n?e.pipe(lt(()=>n())):e})}function ps(e){return typeof e==`object`&&!!e}var ms=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),hs=e=>{if(!ps(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null};function gs(e,t){if(!e)return{};let{[t]:n,...r}=e;return r}functi
Line truncated
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"createdAt": "2026-10-02T17:51:01.306Z",
|
||||
"studioVersion": "6.17.0",
|
||||
"version": 3,
|
||||
"workspaces": [
|
||||
{
|
||||
"basePath": "/",
|
||||
"dataset": "production",
|
||||
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"><rect width=\"32\" height=\"32\" rx=\"2\" fill=\"#721fe5\"></rect><text x=\"50%\" y=\"50%\" text-anchor=\"middle\" alignment-baseline=\"middle\" fill=\"hsla(265, 79%, 91%, 1)\" style=\"font-family:Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif;font-weight:500;font-size:13px;transform:translateY(1px)\">UB</text></svg>",
|
||||
"mediaLibrary": {
|
||||
"enabled": false,
|
||||
"__internal": {}
|
||||
},
|
||||
"name": "uiogaming_dot_no-backend",
|
||||
"projectId": "mmqlu667",
|
||||
"schema": "a5aada72.create-schema.json",
|
||||
"title": "uiogaming.no backend",
|
||||
"tools": "b5bec055.create-tools.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{t as a}from"./Spinner-Dk8hTAm3.js";import{t as o}from"./Close-B_ZEgT1V.js";import{t as s}from"./ChevronDown-BpYUc-AP.js";import{t as c}from"./ToggleArrowRight-Ds3XaLpQ.js";import{t as l}from"./Checkmark-OT7tsNpL.js";import{t as u}from"./Remove-B96Rrnq-.js";var d=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),f=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=d()})),p={_version:2,avatar:{sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},button:{textWeight:`medium`,border:{width:1},focusRing:{offset:-1,width:1}},card:{border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},container:[320,640,960,1280,1600,1920],media:[360,600,900,1200,1800,2400],layer:{dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},radius:[0,1,3,6,9,12,21],shadow:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}},radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:`ease-out`,focusRing:{offset:1,width:1}},select:{focusRing:{offset:-1Line truncated
|
||||
`,ft=typeof window<`u`&&typeof document<`u`;function pt(e){if(typeof process<`u`){let t={}[e];if(t!==void 0&&t!==``)return t!==`false`}}var mt=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:pt(`REACT_APP_SC_DISABLE_SPEEDY`)??pt(`SC_DISABLE_SPEEDY`)??(typeof process>`u`||!1)),ht=`sc-keyframes-`,gt={};function _t(e,...t){return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(`, `)}`:``}`)}var vt=new Map,yt=new Map,bt=1,xt=e=>{if(vt.has(e))return vt.get(e);for(;yt.has(bt);)bt++;let t=bt++;return vt.set(e,t),yt.set(t,e),t},St=e=>yt.get(e),Ct=(e,t)=>{bt=t+1,vt.set(e,t),yt.set(t,e)},wt=Object.freeze([]),Tt=Object.freeze({});function Et(e,t,n=Tt){return e.theme!==n.theme&&e.theme||t||n.theme}var Dt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ot=/(^-|-$)/g;function kt(e){return e.replace(Dt,`-`).replace(Ot,``)}var At=/(a)(d)/gi,jt=e=>String.fromCharCode(e+(e>25?39:97));function Mt(e){let t,n=``;for(t=Math.abs(e);t>52;t=t/52|0)n=jt(t%52)+n;return(jt(t%52)+n).replace(At,`$1-$2`)}var Nt=5381,Pt=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},Ft=e=>Pt(Nt,e);function It(e){return Mt(Ft(e)>>>0)}function Lt(e){return e.displayName||e.name||`Component`}function Rt(e){return typeof e==`string`&&!0}function zt(e){return Rt(e)?`styled.${e}`:`Styled(${Lt(e)})`}var Bt=Symbol.for(`react.memo`),Vt=Symbol.for(`react.forward_ref`),Ht={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Ut={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Wt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Gt={[Vt]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Bt]:Wt};function Kt(e){return(`type`in(t=e)&&t.type.$$typeof)===Bt?Wt:`$$typeof`in e?Gt[e.$$typeof]:Ht;var t}var qt=Object.defineProperty,Jt=Object.getOwnPropertyNames,Yt=Object.getOwnPropertySymbols,Xt=Object.getOwnPropertyDescriptor,Zt=Object.getPrototypeOf,Qt=Object.prototype;function $t(e,t,n){if(typeof t!=`string`){let r=Zt(t);r&&r!==Qt&&$t(e,r,n);let i=Jt(t).concat(Yt(t)),a=Kt(e),o=Kt(t);for(let r=0;r<i.length;++r){let s=i[r];if(!(s in Ut||n&&n[s]||o&&s in o||a&&s in a)){let n=Xt(t,s);try{qt(e,s,n)}catch{}}}}return e}function en(e){return typeof e==`function`}function tn(e){return typeof e==`object`&&`styledComponentId`in e}function nn(e,t){return e&&t?e+` `+t:e||t||``}function rn(e,t){return e.join(t||``)}function an(e){return typeof e==`object`&&!!e&&e.constructor.name===Object.name&&!(`props`in e&&e.$$typeof)}function on(e,t,n=!1){if(!n&&!an(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=on(e[n],t[n]);else if(an(t))for(let n in t)e[n]=on(e[n],t[n]);return e}function sn(e,t){Object.defineProperty(e,"toString",{value:t})}var cn=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){let t=this.groupSizes,n=t.length,r=n;for(;e>=r;)if(r<<=1,r<0)throw _t(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,a=t.length;i<a;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){let t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t=``;if(e>=this.length||this.groupSizes[e]===0)return t;let n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+dt;return t}},ln=`style[${st}][${lt}="${ut}"]`,un=RegExp(`^${st}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),dn=e=>typeof ShadowRoot<`u`&&e instanceof ShadowRoot||`host`in e&&e.nodeType===11,fn=e=>{if(!e)return document;if(dn(e))return e;if(`getRootNode`in e){let t=e.getRootNode();if(dn(t))return t}return document},pn=(e,t,n)=>{let r=n.split(`,`),i;for(let n=0,a=r.length;n<a;n++)(i=r[n])&&e.registerName(t,i)},mn=(e,t)=>{let n=(t.textContent??``).split(dt),r=[];for(let t=0,i=n.length;t<i;t++){let i=n[t].trim();if(!i)continue;let a=i.match(un);if(a){let t=0|parseInt(a[1],10),n=a[2];t!==0&&(Ct(n,t),pn(e,n,a[3]),e.getTag().insertRules(t,r)),r.length=0}else r.push(i)}},hn=e=>{let t=fn(e.options.target).querySelectorAll(ln);for(let n=0,r=t.length;n<r;n++){let r=t[n];r&&r.getAttribute(st)!==ct&&(mn(e,r),r.parentNode&&r.parentNode.removeChild(r))}},gn=!1;function _n(){if(!1!==gn)return gn;if(typeof document<`u`){le
Line truncated
|
||||
`}return r})(this))}rehydrate(){!this.server&&ft&&hn(this)}reconstructWithOptions(t,n=!0){let r=new e(Object.assign(Object.assign({},this.options),t),this.gs,n&&this.names||void 0);return r.keyframeIds=new Set(this.keyframeIds),!this.server&&ft&&t.target!==this.options.target&&fn(this.options.target)!==fn(t.target)&&hn(r),r}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new yn(t,n):new bn(t,n))(this.options),new cn(e));var e}hasNameForId(e,t){var n;return(n=this.names.get(e)?.has(t))!=null&&n}registerName(e,t){xt(e),e.startsWith(ht)&&this.keyframeIds.add(e);let n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(xt(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(xt(e)),this.clearNames(e)}clearTag(){this.tag=void 0}},wn=new WeakSet,Tn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function En(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t!=`number`||t===0||e in Tn||e.startsWith(`--`)?String(t).trim():t+`px`}var Dn=47;function On(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?`-`+String.fromCharCode(r+32):e[n]}return t.startsWith(`ms-`)?`-`+t:t}var kn=Symbol.for(`sc-keyframes`);function An(e){return typeof e==`object`&&!!e&&kn in e}function jn(e){return en(e)&&!(e.prototype&&e.prototype.isReactComponent)}var Mn=e=>e==null||!1===e||e===``,Nn=Symbol.for(`react.client.reference`);function Pn(e){return e.$$typeof===Nn}function Fn(e,t){for(let n in e){let r=e[n];e.hasOwnProperty(n)&&!Mn(r)&&(Array.isArray(r)&&wn.has(r)||en(r)?t.push(On(n)+`:`,r,`;`):an(r)?(t.push(n+` {`),Fn(r,t),t.push(`}`)):t.push(On(n)+`: `+En(n,r)+`;`))}}function In(e,t,n,r,i=[]){if(Mn(e))return i;let a=typeof e;if(a===`string`)return i.push(e),i;if(a===`function`)return Pn(e)?i:jn(e)&&t?In(e(t),t,n,r,i):(i.push(e),i);if(Array.isArray(e)){for(let a=0;a<e.length;a++)In(e[a],t,n,r,i);return i}return tn(e)?(i.push(`.${e.styledComponentId}`),i):An(e)?(n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i):Pn(e)?i:an(e)?(Fn(e,i),i):(i.push(e.toString()),i)}var Ln=Ft(ut),Rn=class{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=Pt(Ln,t),this.baseStyle=n,Cn.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):``;{let i=``;for(let r=0;r<this.rules.length;r++){let a=this.rules[r];if(typeof a==`string`)i+=a;else if(a){if(jn(a)){let r=a(e);typeof r==`string`?i+=r:r!=null&&!1!==r&&(i+=rn(In(r,e,t,n)))}else i+=rn(In(a,e,t,n))}}if(i){this.dynamicNameCache||=new Map;let e=n.hash?n.hash+i:i,a=this.dynamicNameCache.get(e);if(!a){if(a=Mt(Pt(Pt(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){let e=this.dynamicNameCache.keys().next().value;e!==void 0&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,a)}if(!t.hasNameForId(this.componentId,a)){let e=n(i,`.`+a,void 0,this.componentId);t.insertRules(this.componentId,a,e)}r=nn(r,a)}}return r}},zn=/&/g;function Bn(e,t){let n=0;for(;--t>=0&&e.charCodeAt(t)===92;)n++;return!(1&~n)}function Vn(e){let t=e.length,n=``,r=0,i=0,a=0,o=!1,s=!1;for(let c=0;c<t;c++){let l=e.charCodeAt(c);if(a!==0||o||l!==Dn||e.charCodeAt(c+1)!==42){if(o)l===42&&e.charCodeAt(c+1)===Dn&&(o=!1,c++);else if(l!==34&&l!==39||Bn(e,c)){if(a===0){if(l===123)i++;else if(l===125){if(i--,i<0){s=!0;let n=c+1;for(;n<t;){let t=e.charCodeAt(n);if(t===59||t===10)break;n++}n<t&&e.charCodeAt(n)===59&&n++,i=0,c=n-1,r=n;continue}i===0&&(n+=e.substring(r,c+1),r=c+1)}else l===59&&i===0&&(n+=e.substring(r,c+1),r=c+1)}}else a===0?a=l:a===l&&(a=0)}else o=!0,c++}return s||i!==0||a!==0?(r<t&&i===0&&a===0&&(n+=e.substring(r)),n):e}function Hn(e,t){let n=t+` `,r=`,`+n;for(let i=0;i<e.length;i++){let a=e[i];if(a.type===`rule`){a.value=(n+a.value).replaceAll(`,`,r);let e=a.props,t=[];for(let r=0;r<e.length;r++)t[r]=n+e[r];a.props=t}Array.isArray(a.children)&&a.type!==`@keyframes`&&Hn(a.children,t)}return e}function Un({options:e=Tt,plugins:t=wt}=Tt){let n,r,i,a=(e,t,i)=>i.startsWith(r)&&i.endsWith(r)&&i.replaceAll(r,``).length>0?`.${n}`:e,o=t.slice();o.push(e=>{e.type===`rule`&&e.value.includes(`&`)&&(i||=RegExp(`\\${r}\\b`,`g`),e.props[0]=e.props[0].replace(zn,r).replace(i,a))}),e.prefix&&o.push(ot),o.push(rt);let s=[],c=it(o.concat(at(e=>s.push(e)))),l=(t,a=``,o=``,l=`&`)=>{n=l,r=a,i=void 0;let u=function(e
Line truncated
|
||||
Vendored
-2
@@ -1,2 +0,0 @@
|
||||
import{t as e}from"./Observable-BrARBsae.js";import{i as t,n}from"./OperatorSubscriber-BASvuWFQ.js";import{t as r}from"./Subject-UgBXjL8-.js";import{a as i,b as a,h as o,i as s,l as c,m as l,o as u,s as d}from"./logger-DAtJb5RQ-Y7uUAH66.js";import{o as f,t as p}from"./from-D9LOdazm.js";import{t as m}from"./map-UaEckSmz.js";function h(e,r){return t(function(t,i){var a=r??{},o=a.leading,s=o===void 0||o,c=a.trailing,l=c!==void 0&&c,u=!1,d=null,p=null,m=!1,h=function(){p?.unsubscribe(),p=null,l&&(v(),m&&i.complete())},g=function(){p=null,m&&i.complete()},_=function(t){return p=f(e(t)).subscribe(n(i,h,g))},v=function(){if(u){u=!1;var e=d;d=null,i.next(e),!m&&_(e)}};t.subscribe(n(i,function(e){u=!0,d=e,(!p||p.closed)&&(s?v():_(e))},function(){m=!0,!(l&&u&&p&&!p.closed)&&i.complete()}))})}var g={capture:!0};function _(e,t,n){return e.addEventListener(t,n,g),()=>e.removeEventListener(t,n,g)}function v(e){if(`onpagehide`in window)return _(window,`pagehide`,e);let t=_(window,`unload`,e),n=_(window,`unload`,e);return()=>{t(),n()}}function y(e){return _(document,`visibilitychange`,()=>{document.visibilityState===`hidden`&&e()})}function b(){let e={updateUserProperties(){},trace:t,resume:r,log:n};function t(t){return{start(){},log(e){},complete(){},newContext(t){return e},error(e){},await:e=>e}}function n(e,t){}function r(e){}return e}var x=b();function S(){let e=[],t={log(t,n){e.push({createdAt:new Date().toISOString(),event:t,data:n})},trace(e){return{start(){},log(){},complete(){},error(){},newContext(){return t},await:e=>e}},updateUserProperties(){},resume(t){e.push(...t)}};function n(){let t=e;return e=[],t}return{logger:t,consumeEvents:n}}var C=`0123456789abcdefghjkmnpqrstvwxyz`,w=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,255,18,19,255,20,21,255,22,23,24,25,26,255,27,28,29,30,31,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]);function T(e){let t=Array(26).fill(``);if(e.length!==16)throw Error(`Invalid length`);return t[0]=C[(e[0]&224)>>5],t[1]=C[e[0]&31],t[2]=C[(e[1]&248)>>3],t[3]=C[(e[1]&7)<<2|(e[2]&192)>>6],t[4]=C[(e[2]&62)>>1],t[5]=C[(e[2]&1)<<4|(e[3]&240)>>4],t[6]=C[(e[3]&15)<<1|(e[4]&128)>>7],t[7]=C[(e[4]&124)>>2],t[8]=C[(e[4]&3)<<3|(e[5]&224)>>5],t[9]=C[e[5]&31],t[10]=C[(e[6]&248)>>3],t[11]=C[(e[6]&7)<<2|(e[7]&192)>>6],t[12]=C[(e[7]&62)>>1],t[13]=C[(e[7]&1)<<4|(e[8]&240)>>4],t[14]=C[(e[8]&15)<<1|(e[9]&128)>>7],t[15]=C[(e[9]&124)>>2],t[16]=C[(e[9]&3)<<3|(e[10]&224)>>5],t[17]=C[e[10]&31],t[18]=C[(e[11]&248)>>3],t[19]=C[(e[11]&7)<<2|(e[12]&192)>>6],t[20]=C[(e[12]&62)>>1],t[21]=C[(e[12]&1)<<4|(e[13]&240)>>4],t[22]=C[(e[13]&15)<<1|(e[14]&128)>>7],t[23]=C[(e[14]&124)>>2],t[24]=C[(e[14]&3)<<3|(e[15]&224)>>5],t[25]=C[e[15]&31],t.join(``)}function E(e){if(e.length!==26)throw Error(`Invalid length`);let t=new TextEncoder().encode(e);if(w[t[0]]===255||w[t[1]]===255||w[t[2]]===255||w[t[3]]===255||w[t[4]]===255||w[t[5]]===255||w[t[6]]===255||w[t[7]]===255||w[t[8]]===255||w[t[9]]===255||w[t[10]]===255||w[t[11]]===255||w[t[12]]===255||w[t[13]]===255||w[t[14]]===255||w[t[15]]===255||w[t[16]]===255||w[t[17]]===255||w[t[18]]===255||w[t[19]]===255||w[t[20]]===255||w[t[21]]===255||w[t[22]]===255||w[t[23]]===255||w[t[24]]===255||w[t[25]]===255)throw Error(`Invalid base32 character`);let n=new Uint8Array(16);return n[0]=w[t[0]]<<5|w[t[1]],n[1]=w[t[2]]<<3|w[t[3]]>>2,n[2]=(w[t[3]]&3)<<6|w[t[4]]<<1|w[t[5]]>>4,n[3]=(w[t[5]]&15)<<4|w[t[6]]>>1,n[4]=(w[t[6]]&1)<<7|w[t[7]]<<2|w[t[8]]>>3,n[5]=(w[t[8]]&7)<<5|w[t[9]],n[6]=w[t[10]]<<3|w[t[11]]>>2,n[7]=(w[t[11]]&3)<<6|w[t[12]]<<1|w[t[13]]>>4,n[8]=(w[t[13]]&15)<<4|w[t[14]]>>1,n[9]=(w[t[14]]&1)<<7|w[t[15]]<<2|w[t[16]]>>3,n[10]=(w[t[16]]&7)<<5|w[t[17]],n[11]=w[t[18]]<<3|w[t[19]]>>2,n[12]=(w[t[19]]&3)<<6|w[t[20]]<<1|w[t[21]]>>4,n[13]=(w[t[21]]&15)<<4|w[t[22]]>>1,n[14]=(w[t[22]]&1)<<7|w[t[23]]<<2|w[t[24]]>>3,n[15]=(w[t[24]]&7)<<5|w[t[25]],n}function D(e){let t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/109Line truncated
|
||||
`),[n,r]=V(e,t===-1?H:Math.min(t,H));return n+(r?`… (+${r.length})`:``)}function W(e){let t=new r,n=new WeakMap;function i(n,r,i,a){t.next({sessionId:e,type:`trace.error`,traceId:n,name:r.name,version:r.version,data:{message:U(i.message)},context:a,createdAt:new Date().toISOString()})}function a(n,r,i,a,o){t.next({sessionId:e,type:n,traceId:r,name:i.name,version:i.version,data:a,context:o,createdAt:new Date().toISOString()})}function o(n,r,i){t.next({sessionId:e,type:n,version:r.version,name:r.name,data:i,createdAt:new Date().toISOString()})}function s(n){n.forEach(n=>{t.next({sessionId:e,type:n.event.type,version:n.event.version,name:n.event.name,data:n.data,createdAt:n.createdAt})})}function c(n){t.next({sessionId:e,type:`userProperties`,properties:n,createdAt:new Date().toISOString()})}function l(e,t,n){return{start(){a(`trace.start`,e,t,void 0,n)},newContext(t){return{trace(r){return l(`${e}.${t}`,r,n)},resume:s,updateUserProperties(){},log:u}},log(r){a(`trace.log`,e,t,r,n)},complete(){a(`trace.complete`,e,t,void 0,n)},error(r){i(e,t,r,n)},await(e,t){return this.start(),e.then(e=>(this.log(t||e),this.complete(),e),e=>{throw this.error(e),e}),e}}}function u(e,t){if(typeof e.maxSampleRate==`number`&&e.maxSampleRate>0){let r=n.get(e),i=new Date;(!r||i.getTime()-r.getTime()>e.maxSampleRate)&&(n.set(e,i),o(`log`,e,t))}else o(`log`,e,t)}return{events$:t.asObservable(),logger:{updateUserProperties(e){c(e)},resume:s,trace:(e,t)=>l(B(),e,t),log:u}}}var G=t=>new e(e=>{let n=setTimeout(()=>{e.next(void 0),e.complete()},t);return typeof n.unref==`function`&&n.unref(),()=>clearTimeout(n)});function K(e,t){let n=W(e);function r(){return t.resolveConsent().catch(e=>({status:`undetermined`}))}let f=[];function g(){let e=f.slice();return f.length=0,e}function _(){let e=g();return e.length===0?a:c([o(e),r()]).pipe(d(e=>{let[n,r]=e;return n.length===0||r.status!==`granted`?a:p(t.sendEvents(n)).pipe(u(e=>(f.unshift(...n),a)))}))}let v=t.flushInterval??3e4,y=n.events$.pipe(s(e=>f.push(e)),m(()=>{}),h(()=>G(v),{leading:!1,trailing:!0}),i(()=>_()));function b(){return l(_(),{defaultValue:void 0}).then(()=>{})}let x=y.subscribe();function S(){if(!t.sendBeacon)return C(),!0;let e=g();return x.unsubscribe(),e.length>0?t.sendBeacon(e):!0}function C(){return b().then(()=>{},()=>{}).finally(()=>{x.unsubscribe()})}return{end:C,endWithBeacon:S,flush:b,logger:n.logger}}function q(e){return{type:`log`,name:e.name,version:e.version,description:e.description,maxSampleRate:e.maxSampleRate,schema:void 0}}export{x as a,h as c,S as i,z as n,v as o,q as r,y as s,K as t};
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
import{t as e}from"./Subject-UgBXjL8-.js";import{t}from"./BehaviorSubject-CugQrNFr.js";import{t as n}from"./map-UaEckSmz.js";import{n as r,t as i}from"./filter-C5fzbndz.js";function a(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function o(e,t,n){a(e,t),t.set(e,n)}function s(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function c(e,t,n){return e.set(s(e,t),n),n}function l(e,t){return e.get(s(e,t))}var u=[`none`,`error`,`warn`,`info`,`debug`];function d({namespace:e,context:t,logLevel:n=`info`}={}){function r(e){return u.indexOf(e)<=u.indexOf(n)}function i(n,i,a){if(!r(n))return;let o=t??a?{...t,...a}:void 0,s=[...e?[`[${e}]`]:[],i,...o?[o]:[]];n===`error`?console.error(...s):n===`warn`?console.warn(...s):n===`info`?console.info(...s):console.debug(...s)}return{error:(e,t)=>i(`error`,e,t),warn:(e,t)=>i(`warn`,e,t),info:(e,t)=>i(`info`,e,t),debug:(e,t)=>i(`debug`,e,t),child:(r,i)=>d({logLevel:n,namespace:e?`${e}:${r}`:r,context:t||i?{...t,...i}:void 0})}}var f=d({namespace:`sanity-workbench`,logLevel:`debug`});function p(e){"@babel/helpers - typeof";return p=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},p(e)}function ee(e,t){if(p(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(p(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function te(e){var t=ee(e,`string`);return p(t)==`symbol`?t:t+``}function m(e,t,n){return(t=te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=class extends Error{constructor(e,t,n){super(t??e,n),m(this,`code`,void 0),this.name=`MessageBusError`,this.code=e}};function ne(e){return{appId:e,timestamp:Date.now()}}var g={"applications.foreground":{kind:`state`,seed:null},"applications.list":{kind:`state`,seed:void 0},"auth.token":{kind:`state`,seed:void 0},"auth.token.refresh":{kind:`event`},"media-libraries.config":{kind:`state`,seed:void 0},"navigation.location":{kind:`state`,seed:void 0},"navigation.location.update":{kind:`event`},"organizations.current":{kind:`state`,seed:void 0},"panels.mode":{kind:`state`,seed:{ok:!0,value:null}},"panels.mode.set":{kind:`event`},"preferences.color-scheme":{kind:`state`,seed:void 0},"preferences.dock-locked":{kind:`state`,seed:void 0},"users.current":{kind:`state`,seed:void 0}},re={},_=Symbol.for(`sanity.os.bus`),v=Symbol.for(`sanity.os.protocol`),y=Symbol.for(`sanity.os.registry`),b=Symbol.for(`sanity.os.request`),x=f.child(`os`),S=`workbench`,C=5e3,w=Symbol.for(`sanity.os.no-value`);function T(e,n){let r=e.stateSubjects.get(n);return r||(x.warn(`state topic "${n}" read before any value was published`),r=new t(w),e.stateSubjects.set(n,r)),r}function E(e,t){let n=e;return n.getCurrent=t,n.firstValue=r(e),n}function D(e,t){let n=e.stateSources.get(t);if(!n){let r=T(e,t);n=E(r.pipe(i(e=>e!==w)),()=>{let e=r.getValue();return e===w?void 0:e}),e.stateSources.set(t,n)}return n}function O(e,n){for(let[t,r]of Object.entries(n)){let n=e.topics.get(t);if(n&&n!==r.kind)throw new h(`PROTOCOL_MISMATCH`,`topic "${t}" is declared "${r.kind}" but the installed bus knows it as "${n}"`)}for(let[r,i]of Object.entries(n))e.topics.set(r,i.kind),i.kind===`state`&&!e.stateSubjects.has(r)&&e.stateSubjects.set(r,new t(i.seed===void 0?w:i.seed))}function k(t,n){let r=t.eventSubjects.get(n);return r||(r=new e,t.eventSubjects.set(n,r)),r}function A(e,t){e.settled||(e.settled=!0,e.deliver?e.deliver(t):e.capturedOutcome=t)}function ie(e,t,n,r){let i={type:t,payload:n,meta:ne(e),reply:e=>{if(r.settled){x.warn(`reply ignored for "${t}": no waiting caller or already replied`);return}A(r,{ok:!0,value:e})},get signal(){return r.responderAbort.signal}};return i[b]=r,i}function ae(e,t){return new Promise((n,r)=>{let i=e=>e.ok?n(e.value):r(e.error);if(e.capturedOutcome){e.responderAbort.abort(),i(e.capturedOutcome);return}if(!t.hadResponder){r(new h(`NO_RESPONDER`));return}let a=t.timeout===void 0?C:t.timeout,o,s=()=>A(e,{ok:!1,error:new h(`ABORTED`)});e.deliver=n=>{o!==void 0&&clearTimeout(o),t.signal?.removeEventListener(`abort`,s),e.responderAbort.abort(),i(n)},a!==null&&(o=setTimeout(()=>A(e,{ok:!1,error:new h(`TIMEOUT`)}),a)),t.signal&&(t.signal.aborted?s():t.signal.addEventListener(`abort`,s,{once:!0}))})}function oe(e,t,n,r,i){let a=(e.responderCounts.get(t)??0)>0,o={responderAbort:new AbortController,settled:!1};k(e,t).next(ie(i,t,n,o));let s=()=>o.replyPromise??=ae(o,{...r,hadResponder:a});return{then:(e,t)=>s().then(e,t),catch:e=>s().then(void 0,e),finally:e=>s().finally(e)}}var j=(e,t)=>e.topics.get(t)===`state`;function M(e,t,n,r,i){if(j(e,t)){let r=T(e,t);Object.is(r.getValue(),n)||r.next(n);retuLine truncated
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/LazyRefractor-CQ22IeXB-leA-EtGI.js","static/jsx-runtime-BpzPEenQ.js","static/rolldown-runtime-Dd_uD5pT.js","static/compiler-runtime-sKsOXjDo.js","static/dist-BnDij-KK.js"])))=>i.map(i=>d[i]);
|
||||
import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{n,t as r}from"./jsx-runtime-BpzPEenQ.js";import{t as i}from"./compiler-runtime-sKsOXjDo.js";import{t as a}from"./preload-helper-DjzSQ1t3.js";import{t as o}from"./Spinner-Dk8hTAm3.js";import{t as s}from"./Close-B_ZEgT1V.js";import{t as c}from"./ChevronDown-BpYUc-AP.js";import{t as l}from"./ToggleArrowRight-Ds3XaLpQ.js";import{t as u}from"./Checkmark-OT7tsNpL.js";import{t as d}from"./Remove-B96Rrnq-.js";var f=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),p=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=f()})),m={_version:2,avatar:{sizes:[{distance:-4,size:19},{distance:-4,size:25},{distance:-8,size:33},{distance:-12,size:49}],focusRing:{offset:1,width:1}},button:{textWeight:`medium`,border:{width:1},focusRing:{offset:-1,width:1}},card:{border:{width:1},focusRing:{offset:-1,width:1},shadow:{outline:.5}},container:[320,640,960,1280,1600,1920],media:[360,600,900,1200,1800,2400],layer:{dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},radius:[0,1,3,6,9,12,21],shadow:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-2],penumbra:[0,6,10,0],ambient:[0,1,18,1]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{border:{width:1},checkbox:{size:17,focusRing:{offset:-1,width:1}},radio:{size:17,markSize:9,focusRing:{offset:-1,width:1}},switch:{width:25,height:17,padding:5,transitionDurationMs:150,transitionTimingFunction:`ease-out`,focusRing:{oLine truncated
|
||||
`,pt=typeof window<`u`&&typeof document<`u`;function mt(e){if(typeof process<`u`){let t={}[e];if(t!==void 0&&t!==``)return t!==`false`}}var ht=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:mt(`REACT_APP_SC_DISABLE_SPEEDY`)??mt(`SC_DISABLE_SPEEDY`)??(typeof process>`u`||!1)),gt=`sc-keyframes-`,_t={};function vt(e,...t){return Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(`, `)}`:``}`)}var yt=new Map,bt=new Map,xt=1,St=e=>{if(yt.has(e))return yt.get(e);for(;bt.has(xt);)xt++;let t=xt++;return yt.set(e,t),bt.set(t,e),t},Ct=e=>bt.get(e),wt=(e,t)=>{xt=t+1,yt.set(e,t),bt.set(t,e)},Tt=Object.freeze([]),Et=Object.freeze({});function Dt(e,t,n=Et){return e.theme!==n.theme&&e.theme||t||n.theme}var Ot=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,kt=/(^-|-$)/g;function At(e){return e.replace(Ot,`-`).replace(kt,``)}var jt=/(a)(d)/gi,Mt=e=>String.fromCharCode(e+(e>25?39:97));function Nt(e){let t,n=``;for(t=Math.abs(e);t>52;t=t/52|0)n=Mt(t%52)+n;return(Mt(t%52)+n).replace(jt,`$1-$2`)}var Pt=5381,Ft=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},It=e=>Ft(Pt,e);function Lt(e){return Nt(It(e)>>>0)}function Rt(e){return e.displayName||e.name||`Component`}function zt(e){return typeof e==`string`&&!0}function Bt(e){return zt(e)?`styled.${e}`:`Styled(${Rt(e)})`}var Vt=Symbol.for(`react.memo`),Ht=Symbol.for(`react.forward_ref`),Ut={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Wt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Gt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Kt={[Ht]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Vt]:Gt};function qt(e){return(`type`in(t=e)&&t.type.$$typeof)===Vt?Gt:`$$typeof`in e?Kt[e.$$typeof]:Ut;var t}var Jt=Object.defineProperty,Yt=Object.getOwnPropertyNames,Xt=Object.getOwnPropertySymbols,Zt=Object.getOwnPropertyDescriptor,Qt=Object.getPrototypeOf,$t=Object.prototype;function en(e,t,n){if(typeof t!=`string`){let r=Qt(t);r&&r!==$t&&en(e,r,n);let i=Yt(t).concat(Xt(t)),a=qt(e),o=qt(t);for(let r=0;r<i.length;++r){let s=i[r];if(!(s in Wt||n&&n[s]||o&&s in o||a&&s in a)){let n=Zt(t,s);try{Jt(e,s,n)}catch{}}}}return e}function tn(e){return typeof e==`function`}function nn(e){return typeof e==`object`&&`styledComponentId`in e}function rn(e,t){return e&&t?e+` `+t:e||t||``}function an(e,t){return e.join(t||``)}function on(e){return typeof e==`object`&&!!e&&e.constructor.name===Object.name&&!(`props`in e&&e.$$typeof)}function sn(e,t,n=!1){if(!n&&!on(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=sn(e[n],t[n]);else if(on(t))for(let n in t)e[n]=sn(e[n],t[n]);return e}function cn(e,t){Object.defineProperty(e,"toString",{value:t})}var ln=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){let t=this.groupSizes,n=t.length,r=n;for(;e>=r;)if(r<<=1,r<0)throw vt(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,a=t.length;i<a;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){let t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t=``;if(e>=this.length||this.groupSizes[e]===0)return t;let n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+ft;return t}},un=`style[${ct}][${ut}="${dt}"]`,dn=RegExp(`^${ct}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),fn=e=>typeof ShadowRoot<`u`&&e instanceof ShadowRoot||`host`in e&&e.nodeType===11,pn=e=>{if(!e)return document;if(fn(e))return e;if(`getRootNode`in e){let t=e.getRootNode();if(fn(t))return t}return document},mn=(e,t,n)=>{let r=n.split(`,`),i;for(let n=0,a=r.length;n<a;n++)(i=r[n])&&e.registerName(t,i)},hn=(e,t)=>{let n=(t.textContent??``).split(ft),r=[];for(let t=0,i=n.length;t<i;t++){let i=n[t].trim();if(!i)continue;let a=i.match(dn);if(a){let t=0|parseInt(a[1],10),n=a[2];t!==0&&(wt(n,t),mn(e,n,a[3]),e.getTag().insertRules(t,r)),r.length=0}else r.push(i)}},gn=e=>{let t=pn(e.options.target).querySelectorAll(un);for(let n=0,r=t.length;n<r;n++){let r=t[n];r&&r.getAttribute(ct)!==lt&&(hn(e,r),r.parentNode&&r.parentNode.removeChild(r))}},_n=!1;function vn(){if(!1!==_n)return _n;if(typeof document<`u`){le
Line truncated
|
||||
`}return r})(this))}rehydrate(){!this.server&&pt&&gn(this)}reconstructWithOptions(t,n=!0){let r=new e(Object.assign(Object.assign({},this.options),t),this.gs,n&&this.names||void 0);return r.keyframeIds=new Set(this.keyframeIds),!this.server&&pt&&t.target!==this.options.target&&pn(this.options.target)!==pn(t.target)&&gn(r),r}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new bn(t,n):new xn(t,n))(this.options),new ln(e));var e}hasNameForId(e,t){var n;return(n=this.names.get(e)?.has(t))!=null&&n}registerName(e,t){St(e),e.startsWith(gt)&&this.keyframeIds.add(e);let n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(St(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(St(e)),this.clearNames(e)}clearTag(){this.tag=void 0}},Tn=new WeakSet,En={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Dn(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t!=`number`||t===0||e in En||e.startsWith(`--`)?String(t).trim():t+`px`}var On=47;function kn(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t+=r>=65&&r<=90?`-`+String.fromCharCode(r+32):e[n]}return t.startsWith(`ms-`)?`-`+t:t}var An=Symbol.for(`sc-keyframes`);function jn(e){return typeof e==`object`&&!!e&&An in e}function Mn(e){return tn(e)&&!(e.prototype&&e.prototype.isReactComponent)}var Nn=e=>e==null||!1===e||e===``,Pn=Symbol.for(`react.client.reference`);function Fn(e){return e.$$typeof===Pn}function In(e,t){for(let n in e){let r=e[n];e.hasOwnProperty(n)&&!Nn(r)&&(Array.isArray(r)&&Tn.has(r)||tn(r)?t.push(kn(n)+`:`,r,`;`):on(r)?(t.push(n+` {`),In(r,t),t.push(`}`)):t.push(kn(n)+`: `+Dn(n,r)+`;`))}}function Ln(e,t,n,r,i=[]){if(Nn(e))return i;let a=typeof e;if(a===`string`)return i.push(e),i;if(a===`function`)return Fn(e)?i:Mn(e)&&t?Ln(e(t),t,n,r,i):(i.push(e),i);if(Array.isArray(e)){for(let a=0;a<e.length;a++)Ln(e[a],t,n,r,i);return i}return nn(e)?(i.push(`.${e.styledComponentId}`),i):jn(e)?(n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i):Fn(e)?i:on(e)?(In(e,i),i):(i.push(e.toString()),i)}var Rn=It(dt),zn=class{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=Ft(Rn,t),this.baseStyle=n,wn.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):``;{let i=``;for(let r=0;r<this.rules.length;r++){let a=this.rules[r];if(typeof a==`string`)i+=a;else if(a){if(Mn(a)){let r=a(e);typeof r==`string`?i+=r:r!=null&&!1!==r&&(i+=an(Ln(r,e,t,n)))}else i+=an(Ln(a,e,t,n))}}if(i){this.dynamicNameCache||=new Map;let e=n.hash?n.hash+i:i,a=this.dynamicNameCache.get(e);if(!a){if(a=Nt(Ft(Ft(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){let e=this.dynamicNameCache.keys().next().value;e!==void 0&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,a)}if(!t.hasNameForId(this.componentId,a)){let e=n(i,`.`+a,void 0,this.componentId);t.insertRules(this.componentId,a,e)}r=rn(r,a)}}return r}},Bn=/&/g;function Vn(e,t){let n=0;for(;--t>=0&&e.charCodeAt(t)===92;)n++;return!(1&~n)}function Hn(e){let t=e.length,n=``,r=0,i=0,a=0,o=!1,s=!1;for(let c=0;c<t;c++){let l=e.charCodeAt(c);if(a!==0||o||l!==On||e.charCodeAt(c+1)!==42){if(o)l===42&&e.charCodeAt(c+1)===On&&(o=!1,c++);else if(l!==34&&l!==39||Vn(e,c)){if(a===0){if(l===123)i++;else if(l===125){if(i--,i<0){s=!0;let n=c+1;for(;n<t;){let t=e.charCodeAt(n);if(t===59||t===10)break;n++}n<t&&e.charCodeAt(n)===59&&n++,i=0,c=n-1,r=n;continue}i===0&&(n+=e.substring(r,c+1),r=c+1)}else l===59&&i===0&&(n+=e.substring(r,c+1),r=c+1)}}else a===0?a=l:a===l&&(a=0)}else o=!0,c++}return s||i!==0||a!==0?(r<t&&i===0&&a===0&&(n+=e.substring(r)),n):e}function Un(e,t){let n=t+` `,r=`,`+n;for(let i=0;i<e.length;i++){let a=e[i];if(a.type===`rule`){a.value=(n+a.value).replaceAll(`,`,r);let e=a.props,t=[];for(let r=0;r<e.length;r++)t[r]=n+e[r];a.props=t}Array.isArray(a.children)&&a.type!==`@keyframes`&&Un(a.children,t)}return e}function Wn({options:e=Et,plugins:t=Tt}=Et){let n,r,i,a=(e,t,i)=>i.startsWith(r)&&i.endsWith(r)&&i.replaceAll(r,``).length>0?`.${n}`:e,o=t.slice();o.push(e=>{e.type===`rule`&&e.value.includes(`&`)&&(i||=RegExp(`\\${r}\\b`,`g`),e.props[0]=e.props[0].replace(Bn,r).replace(i,a))}),e.prefix&&o.push(st),o.push(it);let s=[],c=at(o.concat(ot(e=>s.push(e)))),l=(t,a=``,o=``,l=`&`)=>{n=l,r=a,i=void 0;let u=function(e
Line truncated
|
||||
-1
@@ -1 +0,0 @@
|
||||
var e={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},t={0:8203,1:8204,2:8205,3:65279},n={0:String.fromCodePoint(t[0]),1:String.fromCodePoint(t[1]),2:String.fromCodePoint(t[2]),3:String.fromCodePoint(t[3])},r=[,,,,].fill(String.fromCodePoint(t[0])).join(``);function i(e){let t=JSON.stringify(e),i=new TextEncoder().encode(t),a=``;for(let e=0;e<i.length;e++){let t=i[e];a+=n[t>>6&3]+n[t>>4&3]+n[t>>2&3]+n[t&3]}return r+a}function a(e){return!Number.isNaN(Number(e))||/[a-z]/i.test(e)&&!/\d+(?:[-:\/]\d+){2}(?:T\d+(?:[-:\/]\d+){1,2}(\.\d+)?Z?)?/.test(e)?!1:!!Date.parse(e)}function o(e){try{new URL(e,e.startsWith(`/`)?`https://acme.com`:void 0)}catch{return!1}return!0}function s(e,t,n=`auto`){return n===!0||n===`auto`&&(a(e)||o(e))?e:`${e}${i(t)}`}Object.fromEntries(Object.entries(n).map(e=>[e[1],+e[0]])),Object.fromEntries(Object.entries(e).map(e=>e.reverse()));var c=`${Object.values(e).map(e=>`\\u{${e.toString(16)}}`).join(``)}`,l=RegExp(`[${c}]{4,}`,`gu`);function u(e){return{cleaned:e.replace(l,``),encoded:e.match(l)?.[0]||``}}function d(e){return e&&JSON.parse(u(JSON.stringify(e)).cleaned)}export{s as n,d as t};
|
||||
Loaded 100 of 188 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user