PageSourceSearch

https://timelines.ai/_next/static/chunks/00ded58d.912369249fd55f27.js

js timelines.ai collected 2026-09-24 11:44:52 UTC 325,757 bytes, 601 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9155],{51790:(e,t,n)=>{let i;n.d(t,{Cw:()=>au,Dg:()=>nC,EG:()=>lP,GG:()=>sb,GU:()=>oy,Gp:()=>n2,Gt:()=>lO,Ih:()=>e8,KN:()=>tr,Oh:()=>sf,QM:()=>tw,RG:()=>tY,Ru:()=>ou,YI:()=>lE,Zv:()=>tn,bV:()=>n0,bt:()=>tP,c0:()=>ls,pl:()=>tN,y6:()=>tl});var r=n(54398),l=n(81220),o=n(95155),s=n(11748),a=n(64509),d=n(59452),c=n(12115),u=n(43734),p=n(96241),m=n(3408),h=n(81323),f=n(97753),x=n(79020),g=n(60308),b=n(34113),y=n(77056),j=n(26497),v=n(60452),_=n(83896),w=n(78411),S=n(35138),I=n(62057),k=n(40073),E=n(64711),C=n(63704),z=n(77133),T=n(9618),P=n(25828),A=n(29279),R=n(18362),D=n(91436),$=n(34098),B=n(98203),Y=n(65333),M=n(42764),L=n(16433),O=n(60732),H=n(77241),V=n(43279),Z=n(31536),N=n(85755),K=n(32466),F=n(61270),W=n(28775),J=n(43198),U=n(86238),G=n(34438),Q=n(25259),q=n(47211),X=n(78242),ee=n(40712),et=n(27887),en=n(28303),ei=n(12718),er=n(43756),el=n(54145),eo=n(43526),es=n(63270),ea=n(27768),ed=n(34062),ec=n(27754),eu=n(34875),ep=n(55520),em=n(29894),eh=n(66265),ef=n(8186),ex=n(86697),eg=n(97341),eb=n(84264),ey=n(55060),ej=n(14187),ev=n(20851),e_=n(58576),ew=n(92564),eS=n(88106),eI=n(56555),ek=n(22991),eE=n(76096),eC=n(43475),ez=n(58626),eT=n(30563),eP=n(92273);let eA="diffView",eR="previousDocument",eD="nextDocument";function e$(){let e,t,n,i=(0,s.c)(9),{navigate:r,state:l}=(0,_.rd)();i[0]!==r||i[1]!==l?(e=e=>{let{mode:t,previousDocument:n,nextDocument:i}=e,o={...eu(l._searchParams),...t?{[eA]:t}:{},...n?{[eR]:[n.type,n.id].join(",")}:{},...i?{[eD]:[i.type,i.id].join(",")}:{}};r({...l,_searchParams:ep(o)})},i[0]=r,i[1]=l,i[2]=e):e=i[2];let o=e;i[3]!==r||i[4]!==l?(t=()=>{r({...l,_searchParams:(l._searchParams??[]).filter(eB)})},i[3]=r,i[4]=l,i[5]=t):t=i[5];let a=t;return i[6]!==a||i[7]!==o?(n={navigateDiffView:o,exitDiffView:a},i[6]=a,i[7]=o,i[8]=n):n=i[8],n}function eB(e){let[t]=e;return![eA,eR,eD].includes(t)}let eY=["version"];function eM(e){let t,n,i,r,l,o,a,d,u=(0,s.c)(22);u[0]!==e?(t=void 0===e?{}:e,u[0]=e,u[1]=t):t=u[1];let{onParamsError:p}=t,{state:m}=(0,_.rd)();if(u[2]!==m._searchParams){let e=new URLSearchParams(m._searchParams);i=e.get(eR),n=e.get(eD),r=e.get(eA),u[2]=m._searchParams,u[3]=n,u[4]=i,u[5]=r}else n=u[3],i=u[4],r=u[5];let h=r,f=[i,n,h].some(eL),x=i??"",g=n??"",b=h??"";u[6]!==x||u[7]!==g||u[8]!==b?(l=function({previousDocument:e,nextDocument:t,mode:n}){let i=[],[r,l]=e.split(",").filter(Boolean),[o,s]=t.split(",").filter(Boolean);return eY.includes(n)||i.push(["invalidModeParam",n]),(typeof r>"u"||typeof l>"u")&&i.push(["invalidPreviousDocumentParam",e]),(typeof o>"u"||typeof s>"u")&&i.push(["invalidNextDocumentParam",t]),0!==i.length?{result:"error",errors:i}:{result:"success",params:{mode:n,documents:{previous:{type:r,id:l},next:{type:o,id:s}}}}}({previousDocument:x,nextDocument:g,mode:b}),u[6]=x,u[7]=g,u[8]=b,u[9]=l):l=u[9];let y=l;if(u[10]!==f||u[11]!==p||u[12]!==y.errors||u[13]!==y.result?(o=()=>{"error"===y.result&&f&&p?.(y.errors)},u[10]=f,u[11]=p,u[12]=y.errors,u[13]=y.result,u[14]=o):o=u[14],u[15]!==f||u[16]!==p||u[17]!==y?(a=[f,p,y],u[15]=f,u[16]=p,u[17]=y,u[18]=a):a=u[18],(0,c.useEffect)(o,a),"error"===y.result){let e;return u[19]===Symbol.for("react.memo_cache_sentinel")?(e={isActive:!1},u[19]=e):e=u[19],e}return u[20]!==y.params?(d={state:"ready",isActive:!0,...y.params},u[20]=y.params,u[21]=d):d=u[21],d}function eL(e){return null!==e}function eO(e){return null!==e}function eH(e,t){return(0,m._4)(e)?"published":(0,m.R8)(e)?"draft":t.find(({_id:t})=>(0,h._hI)(t)===(0,m._S)(e))}let eV=g.I4.header`
2  display: grid;
3  grid-area: header;
4  grid-template-columns: 1fr min-content 1fr;
5  border-block-end: 1px solid var(--card-border-color);
6`,eZ=g.I4.div`
7  display: flex;
8  justify-content: space-between;
9  align-items: center;
10`,eN=e=>{let t,n,i,l,d,c,u,m,f,x,g,b,y,j,v,_=(0,s.c)(44),{documentId:w,state:S}=e,{t:I}=(0,h.Bdt)(r.Z7);_[0]!==w?(t={documentId:w},_[0]=w,_[1]=t):t=_[1];let{data:k}=(0,h.gn8)(t),{exitDiffView:E,navigateDiffView:C}=e$(),{documents:z}=eM(),T=(0,h.K0D)();_[2]!==k?(n=k.flatMap(eW),_[2]=k,_[3]=n):n=_[3];let P=n;if(_[4]!==T.data||_[5]!==P){let e;_[7]!==P?(e=e=>{let t=(0,h._hI)(e._id);return"u">typeof t&&P.includes(t)},_[7]=P,_[8]=e):e=_[8],i=T.data.filter(e),_[4]=T.data,_[5]=P,_[6]=i}else i=_[6];let A=i;_[9]!==z||_[10]!==C?(l=e=>{"u">typeof z?.previous&&C({previousDocument:{...z.previous,id:e}})},_[9]=z,_[10]=C,_[11]=l):l=_[11];let R=l;_[12]!==z||_[13]!==C?(d=e=>{"u">typeof z?.next&&C({nextDocument:{...z.next,id:e}})},_[12]=z,_[13]=C,_[14]=d):d=_[14];let D=d;return _[15]!==I?(c=I("compare-versions.title"),_[15]=I,_[16]=c):c=_[16],_[17]!==c?(u=(0,o.jsx)(a.az,{padding:4,children:(0,o.jsx)(a.EY,{as:"h1",size:1,muted:!0,children:c})}),_[17]=c,_[18]=u):u=_[18],_[19]!==w||_[20]!==z||_[21]!==R||_[22]!==A||_[23]!==S?(m="u">typeof z?.previous&&(0,o.jsx)(eK,{releases:A,onSelectRelease:R,role:"previous",documentId:w,state:S,document:z.previous}),_[19]=w,_[20]=z,_[21]=R,_[22]=A,_[23]=S,_[24]=m):m=_[24],_[25]!==u||_[26]!==m?(f=(0,o.jsxs)(eZ,{children:[u,m]}),_[25]=u,_[26]=m,_[27]=f):f=_[27],_[28]===Symbol.for("react.memo_cache_sentinel")?(x=(0,o.jsx)(a.so,{align:"center",paddingX:3,children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(p.ppF,{})})}),_[28]=x):x=_[28],_[29]!==w||_[30]!==z||_[31]!==D||_[32]!==A||_[33]!==S?(g="u">typeof z?.next&&(0,o.jsx)(eK,{releases:A,onSelectRelease:D,role:"next",documentId:w,state:S,document:z.next}),_[29]=w,_[30]=z,_[31]=D,_[32]=A,_[33]=S,_[34]=g):g=_[34],_[35]===Symbol.for("react.memo_cache_sentinel")?(b={justifySelf:"end"},_[35]=b):b=_[35],_[36]!==E?(y=(0,o.jsx)(a.az,{padding:3,style:b,children:(0,o.jsx)(a.$n,{icon:p.USm,mode:"bleed",onClick:E,padding:2})}),_[36]=E,_[37]=y):y=_[37],_[38]!==g||_[39]!==y?(j=(0,o.jsxs)(eZ,{children:[g,y]}),_[38]=g,_[39]=y,_[40]=j):j=_[40],_[41]!==j||_[42]!==f?(v=(0,o.jsxs)(eV,{children:[f,x,j]}),_[41]=j,_[42]=f,_[43]=v):v=_[43],v},eK=e=>{let t,n,i,d,c,u,f,x,g,b,y=(0,s.c)(41),{releases:j,onSelectRelease:v,role:_,documentId:w,document:S}=e;y[0]!==j?(t=void 0===j?[]:j,y[0]=j,y[1]=t):t=y[1];let I=t;y[2]!==S.id?(n=(0,m.IM)(S.id),y[2]=S.id,y[3]=n):n=y[3];let{published:k,draft:E}=(0,h.zX2)(n,S.type);y[4]!==S.id||y[5]!==I?(i=eH(S.id,I),y[4]=S.id,y[5]=I,y[6]=i):i=y[6];let C=i,{t:z}=(0,h.Bdt)(r.Z7),{t:T}=(0,h.Bdt)(),{document:P}=(0,h.hA9)(),{drafts:A}=P,{enabled:R}=A;if(y[7]!==C||y[8]!==T||y[9]!==z?(d=function({selected:e,tCore:t,tStructure:n}){if(typeof e>"u")return{text:t("common.loading"),tone:"neutral",disabled:!0};if((0,h.Jrl)(e)){let n=e?(0,h.Y73)(e):"neutral";return{text:e?.metadata.title||t("release.placeholder-untitled-release"),icon:(0,o.jsx)(h.Rdi,{padding:1,tone:n}),iconRight:e&&(0,h.KJ$)(e)?(0,o.jsx)(p.XAi,{}):void 0,tone:n}}let i="published"===e?"positive":"caution";return{text:n(["compare-versions.status",e].join(".")),icon:(0,o.jsx)(h.Rdi,{padding:1,tone:i}),tone:i}}({selected:C,tCore:T,tStructure:z}),y[7]=C,y[8]=T,y[9]=z,y[10]=d):d=y[10],y[11]!==d?(c=(0,o.jsx)(a.$n,{type:"button",mode:"bleed",padding:2,paddingRight:3,radius:"full",selected:!0,...d}),y[11]=d,y[12]=c):c=y[12],y[13]!==w||y[14]!==v||y[15]!==k||y[16]!==C?(u=k&&(0,o.jsx)(eF,{type:"published",onSelect:v,isSelected:"published"===C,documentId:w}),y[13]=w,y[14]=v,y[15]=k,y[16]=C,y[17]=u):u=y[17],y[18]!==w||y[19]!==E||y[20]!==R||y[21]!==v||y[22]!==C?(f=R&&E&&(0,o.jsx)(eF,{type:"draft",onSelect:v,isSelected:"draft"===C,documentId:w}),y[18]=w,y[19]=E,y[20]=R,y[21]=v,y[22]=C,y[23]=f):f=y[23],y[24]!==w||y[25]!==v||y[26]!==I||y[27]!==C){let e;y[29]!==w||y[30]!==v||y[31]!==C?(e=e=>(0,o.jsx)(eF,{release:e,onSelect:v,isSelected:"string"!=typeof C&&C?._id===e._id,documentId:w},e._id),y[29]=w,y[30]=v,y[31]=C,y[32]=e):e=y[32],x=I.map(e),y[24]=w,y[25]=v,y[26]=I,y[27]=C,y[28]=x}else x=y[28];return y[33]!==f||y[34]!==x||y[35]!==u?(g=(0,o.jsxs)(a.W1,{children:[u,f,x]}),y[33]=f,y[34]=x,y[35]=u,y[36]=g):g=y[36],y[37]!==_||y[38]!==g||y[39]!==c?(b=(0,o.jsx)(l.IU,{id:_,button:c,menu:g}),y[37]=_,y[38]=g,y[39]=c,y[40]=b):b=y[40],b},eF=e=>{let t,n,i,l,d,c,u,f,x,g,b,y,j=(0,s.c)(51),{type:v,release:_,onSelect:w,isSelected:S,documentId:I}=e,{t:k}=(0,h.Bdt)(),{t:E}=(0,h.Bdt)(r.Z7);
10j[0]!==I||j[1]!==w||j[2]!==_||j[3]!==v?(t=()=>"draft"===v?void w((0,m.T4)(I)):"published"===v?void w((0,m.IM)(I)):void("u">typeof _?._id&&w((0,m.ct)(I,(0,h._hI)(_._id)))),j[0]=I,j[1]=w,j[2]=_,j[3]=v,j[4]=t):t=j[4];let C=t;if(v){let e,t,n,i,r,l,s="published"===v?"positive":"caution";j[5]!==s?(e=(0,o.jsx)(h.Rdi,{padding:2,tone:s}),j[5]=s,j[6]=e):e=j[6],j[7]!==v?(t=["compare-versions.status",v],j[7]=v,j[8]=t):t=j[8];let d=t.join(".");return j[9]!==d||j[10]!==E?(n=E(d),j[9]=d,j[10]=E,j[11]=n):n=j[11],j[12]!==n?(i=(0,o.jsx)(a.az,{paddingY:2,children:(0,o.jsx)(a.EY,{size:1,weight:"medium",children:n})}),j[12]=n,j[13]=i):i=j[13],j[14]!==e||j[15]!==i?(r=(0,o.jsxs)(a.so,{gap:1,children:[e,i]}),j[14]=e,j[15]=i,j[16]=r):r=j[16],j[17]!==S||j[18]!==C||j[19]!==r?(l=(0,o.jsx)(a.Dr,{padding:1,paddingRight:3,onClick:C,pressed:S,children:r}),j[17]=S,j[18]=C,j[19]=r,j[20]=l):l=j[20],l}j[21]!==_?(n=_?(0,h.Y73)(_):"neutral",j[21]=_,j[22]=n):n=j[22];let z=n;return j[23]!==z?(i=(0,o.jsx)(h.Rdi,{padding:2,tone:z}),j[23]=z,j[24]=i):i=j[24],j[25]!==_.metadata.title||j[26]!==k?(l=_.metadata.title||k("release.placeholder-untitled-release"),j[25]=_.metadata.title,j[26]=k,j[27]=l):l=j[27],j[28]!==l?(d=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:l}),j[28]=l,j[29]=d):d=j[29],j[30]!==_.metadata.releaseType||j[31]!==k?(c=["asap","undecided"].includes(_.metadata.releaseType)&&(0,o.jsx)(a.EY,{muted:!0,size:1,children:k(`release.type.${_.metadata.releaseType}`)}),j[30]=_.metadata.releaseType,j[31]=k,j[32]=c):c=j[32],j[33]!==_?(u="scheduled"===_.metadata.releaseType&&(0,o.jsx)(a.EY,{muted:!0,size:1,children:(0,h.drb)(_)}),j[33]=_,j[34]=u):u=j[34],j[35]!==d||j[36]!==c||j[37]!==u?(f=(0,o.jsxs)(a.BJ,{flex:1,paddingY:2,paddingRight:2,space:2,children:[d,c,u]}),j[35]=d,j[36]=c,j[37]=u,j[38]=f):f=j[38],j[39]!==_?(x=(0,h.KJ$)(_)&&(0,o.jsx)(a.az,{padding:2,children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(p.XAi,{})})}),j[39]=_,j[40]=x):x=j[40],j[41]!==x?(g=(0,o.jsx)(a.so,{flex:"none",children:x}),j[41]=x,j[42]=g):g=j[42],j[43]!==g||j[44]!==i||j[45]!==f?(b=(0,o.jsxs)(a.so,{gap:1,children:[i,f,g]}),j[43]=g,j[44]=i,j[45]=f,j[46]=b):b=j[46],j[47]!==S||j[48]!==C||j[49]!==b?(y=(0,o.jsx)(a.Dr,{padding:1,paddingRight:3,onClick:C,pressed:S,children:b}),j[47]=S,j[48]=C,j[49]=b,j[50]=y):y=j[50],y};function eW(e){return(0,m._S)(e)??[]}let eJ=g.I4.div`
11  --offset-block: 40px;
12  display: grid;
13  height: calc(100vh - var(--offset-block));
14  min-height: 0;
15  overflow: hidden;
16  grid-template-areas:
17    'header header'
18    'previous-document next-document';
19  grid-template-columns: 1fr 1fr;
20  grid-template-rows: min-content minmax(0, 1fr);
21`;function eU(e){return e.document?.components?.unstable_layout}function eG(e){return e.path}function eQ(e,t){return ex(e.path,t.path)}let eq=g.I4.div`
22  position: relative;
23  height: 100%;
24  overflow: auto;
25  scroll-behavior: smooth;
26  scrollbar-width: var(--scrollbar-width);
27  overscroll-behavior: contain;
28  will-change: scroll-position;
29`,eX=(0,g.I4)(a.Zp)`
30  position: relative;
31  grid-area: var(--grid-area);
32`,e0=(0,g.I4)(a.mc)`
33  width: auto;
34`,e1=(0,c.forwardRef)(function(e,t){let n,i,r,l,p,m,f,x,g,b,y,j,v=(0,s.c)(36),{role:_,documentType:w,documentId:S,scrollElement:I,syncChannel:k,compareDocument:E}=e,C=(0,c.useRef)(null),[z,T]=(0,c.useState)(null),[P,A]=(0,c.useState)(null);v[0]!==E||v[1]!==S||v[2]!==w||v[3]!==_||v[4]!==I||v[5]!==k?(n=()=>(0,o.jsx)(e2,{compareDocument:E,documentId:S,documentType:w,role:_,scrollElement:I,syncChannel:k}),v[0]=E,v[1]=S,v[2]=w,v[3]=_,v[4]=I,v[5]=k,v[6]=n):n=v[6];let R=n;v[7]!==R?(i={pick:eU,defaultComponent:R},v[7]=R,v[8]=i):i=v[8];let D=(0,h.A1m)(i);v[9]===Symbol.for("react.memo_cache_sentinel")?(r={isInteractive:!1,onOpenReviewChanges:ef,onSetFocus:ef,isReviewChangesOpen:!1},v[9]=r):r=v[9];let $=`${_}-document`;v[10]!==$?(l={"--grid-area":$},v[10]=$,v[11]=l):l=v[11];let B=l,Y="next"===_,M="next"!==_&&"none";v[12]!==M?(p={"--scrollbar-width":M},v[12]=M,v[13]=p):p=v[13];let L=p;return v[14]!==D||v[15]!==S||v[16]!==w?(m=(0,o.jsx)(d.Co,{position:"absolute",children:(0,o.jsx)(e0,{ref:C,padding:4,width:1,children:(0,o.jsx)(D,{documentId:S,documentType:w})})}),v[14]=D,v[15]=S,v[16]=w,v[17]=m):m=v[17],v[18]!==z||v[19]!==m?(f=(0,o.jsx)(a.GD,{element:z,children:m}),v[18]=z,v[19]=m,v[20]=f):f=v[20],v[21]!==t||v[22]!==L||v[23]!==f?(x=(0,o.jsx)(eq,{ref:t,style:L,children:f}),v[21]=t,v[22]=L,v[23]=f,v[24]=x):x=v[24],v[25]===Symbol.for("react.memo_cache_sentinel")?(g=(0,o.jsx)("div",{"data-testid":"diffView-document-panel-portal",ref:T}),v[25]=g):g=v[25],v[26]!==x||v[27]!==B||v[28]!==Y?(b=(0,o.jsxs)(eX,{ref:A,style:B,borderLeft:Y,children:[x,g]}),v[26]=x,v[27]=B,v[28]=Y,v[29]=b):b=v[29],v[30]!==P||v[31]!==b?(y=(0,o.jsx)(a.EZ,{element:P,children:b}),v[30]=P,v[31]=b,v[32]=y):y=v[32],v[33]!==I||v[34]!==y?(j=(0,o.jsx)(u.HJ.Provider,{value:r,children:(0,o.jsx)(h.tmD,{children:(0,o.jsx)(h.jsZ,{scrollElement:I,containerElement:C,children:y})})}),v[33]=I,v[34]=y,v[35]=j):j=v[35],j}),e2=e=>{var t;let n,i,r,l,a,d,p,f,x,g,b,y=(0,s.c)(52),{role:j,documentType:v,documentId:_,syncChannel:w,compareDocument:S}=e;y[0]!==S?(n={compareDocument:S},y[0]=S,y[1]=n):n=y[1];let I=function(e){let t,n,i,r=(0,s.c)(4),{compareDocument:l}=e;r[0]!==l.id?(t=(0,m.IM)(l.id),r[0]=l.id,r[1]=t):t=r[1];let o=l.type;r[2]!==l.id?(n=(0,m._S)(l.id),r[2]=l.id,r[3]=n):n=r[3];let a=(0,h.zX2)(t,o,"low",n);e:{if((0,m.A_)(l.id)){i=a.version??void 0;break e}if((0,m.R8)(l.id)){i=a.draft??void 0;break e}if((0,m._4)(l.id)){i=a.published??void 0;break e}i=void 0}return i}(n),{data:k}=(0,h.K0D)(),[E]=(0,c.useState)(e3);y[2]!==_||y[3]!==k?(i=eH(_,k),y[2]=_,y[3]=k,y[4]=i):i=y[4];let z=i;y[5]!==_?(r=(0,m.IM)(_),y[5]=_,y[6]=r):r=y[6],y[7]!==_?(l=function(e){return(0,m.A_)(e)?(0,m._S)(e):(0,m._4)(e)?"published":void 0}(_),y[7]=_,y[8]=l):l=y[8],y[9]!==_?(a=(0,m._S)(_),y[9]=_,y[10]=a):a=y[10],y[11]!==I||y[12]!==v||y[13]!==r||y[14]!==l||y[15]!==a?(d={documentId:r,documentType:v,selectedPerspectiveName:l,releaseId:a,comparisonValue:I,displayInlineChanges:!0},y[11]=I,y[12]=v,y[13]=r,y[14]=l,y[15]=a,y[16]=d):d=y[16];let{formState:T,onChange:P,onFocus:A,onBlur:D,onSetActiveFieldGroup:$,onSetCollapsedFieldSet:B,onSetCollapsedPath:Y,collapsedFieldSets:L,ready:O,collapsedPaths:H,schemaType:V,value:Z,onProgrammaticFocus:N,openPath:K,onPathOpen:F}=(0,h.Lay)(d),W=null===T||!O;y[17]!==j||y[18]!==w?(p={id:j,syncChannel:w},y[17]=j,y[18]=w,y[19]=p):p=y[19];let J=function(e){let t,n,i,r=(0,s.c)(11),{syncChannel:l,id:o}=e;r[0]!==o||r[1]!==l?(t=e=>l.next({...e,source:o}),r[0]=o,r[1]=l,r[2]=t):t=r[2];let a=t;if(r[3]!==o||r[4]!==l){let e;r[6]!==o?(e=e=>{let{source:t}=e;return t!==o}
34,r[6]=o,r[7]=e):e=r[7],n=l.pipe((0,R.F)(eQ),(0,M.p)(e),(0,C.T)(eG)),r[3]=o,r[4]=l,r[5]=n}else n=r[5];let d=n;return r[8]!==d||r[9]!==a?(i={path:d,push:a},r[8]=d,r[9]=a,r[10]=i):i=r[10],i}(p);y[20]!==F||y[21]!==J||y[22]!==j?(f=e=>{F(e),J.push({source:j,path:e})},y[20]=F,y[21]=J,y[22]=j,y[23]=f):f=y[23];let U=f;return y[24]!==F||y[25]!==N||y[26]!==J.path?(x=()=>{let e=J.path.subscribe(e=>{F(e),N(e)});return()=>e.unsubscribe()},y[24]=F,y[25]=N,y[26]=J.path,y[27]=x):x=y[27],y[28]!==F||y[29]!==N||y[30]!==J.path||y[31]!==j?(g=[F,N,J.path,j],y[28]=F,y[29]=N,y[30]=J.path,y[31]=j,y[32]=g):g=y[32],(0,c.useEffect)(x,g),y[33]!==L||y[34]!==H||y[35]!==I||y[36]!==T||y[37]!==W||y[38]!==D||y[39]!==P||y[40]!==A||y[41]!==U||y[42]!==$||y[43]!==B||y[44]!==Y||y[45]!==K||y[46]!==E||y[47]!==z||y[48]!==j||y[49]!==V||y[50]!==Z?(b=W?(0,o.jsx)(h.gd4,{showText:!0}):(0,o.jsx)(u.pn.Provider,{value:{enabled:!1,mode:null},children:(0,o.jsx)(h.okx,{__internal_patchChannel:E,id:`diffView-pane-${j}`,onChange:P,onPathFocus:A,onPathOpen:U,onPathBlur:D,onFieldGroupSelect:$,onSetFieldSetCollapsed:B,onSetPathCollapsed:Y,collapsedPaths:H,collapsedFieldSets:L,focusPath:T.focusPath,openPath:K,changed:T.changed,focused:T.focused,groups:T.groups,validation:T.validation,members:T.members,perspective:"draft"===(t=z)?"drafts":t,hasUpstreamVersion:T.hasUpstreamVersion,presence:T.presence,schemaType:V,value:Z,compareValue:I})}),y[33]=L,y[34]=H,y[35]=I,y[36]=T,y[37]=W,y[38]=D,y[39]=P,y[40]=A,y[41]=U,y[42]=$,y[43]=B,y[44]=Y,y[45]=K,y[46]=E,y[47]=z,y[48]=j,y[49]=V,y[50]=Z,y[51]=b):b=y[51],b};function e3(){return(0,h.Ijd)()}let e4=g.I4.a`
35  flex: 1;
36  text-decoration: none;
37  color: inherit;
38`,e5=e=>{let t,n,i=(0,s.c)(6),{children:r,documentId:l,documentType:a}=e;i[0]!==l||i[1]!==a?(t={intent:"edit",params:{id:l,type:a}},i[0]=l,i[1]=a,i[2]=t):t=i[2];let{href:d}=(0,_.cQ)(t);return i[3]!==r||i[4]!==d?(n=(0,o.jsx)(e4,{href:d,target:"_blank",rel:"noopener noreferrer",children:r}),i[3]=r,i[4]=d,i[5]=n):n=i[5],n},e6=e=>{let t,n,i,r,a,d,p,m=(0,s.c)(24),{documentId:h}=e,{documents:f,state:x,mode:g}=eM(),{exitDiffView:b}=e$(),y=function(){let e,t=(0,s.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=new Z.B,t[0]=e):e=t[0],e}(),[j,v]=(0,c.useState)(null),[_,w]=(0,c.useState)(null),S=(0,c.useContext)(u.DA);m[0]!==S?(t={...S,disableNew:!0,EditReferenceLinkComponent:e5},m[0]=S,m[1]=t):t=m[1];let I=t;return m[2]!==_||m[3]!==j?(n=[j,_],m[2]=_,m[3]=j,m[4]=n):n=m[4],function(e){let t,n,i=(0,s.c)(3);i[0]!==e?(t=()=>{let t=e.filter(eO);if(0===t.length)return;let n=new eh.Ay(t);return()=>n.destroy()},n=[e],i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),(0,c.useEffect)(t,n)}(n),m[5]!==h||m[6]!==g||m[7]!==x?(i="version"===g&&(0,o.jsx)(eN,{documentId:h,state:x}),m[5]=h,m[6]=g,m[7]=x,m[8]=i):i=m[8],m[9]!==f||m[10]!==_||m[11]!==j||m[12]!==x||m[13]!==y?(r="ready"===x&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e1,{documentType:f.previous.type,documentId:f.previous.id,role:"previous",ref:v,scrollElement:j,syncChannel:y,compareDocument:f.previous}),(0,o.jsx)(e1,{documentType:f.next.type,documentId:f.next.id,role:"next",ref:w,scrollElement:_,syncChannel:y,compareDocument:f.previous})]}),m[9]=f,m[10]=_,m[11]=j,m[12]=x,m[13]=y,m[14]=r):r=m[14],m[15]!==i||m[16]!==r?(a=(0,o.jsxs)(eJ,{children:[i,r]}),m[15]=i,m[16]=r,m[17]=a):a=m[17],m[18]!==b||m[19]!==a?(d=(0,o.jsx)(l.lG,{id:"diffView",width:"auto",onClose:b,padding:!1,__unstable_hideCloseButton:!0,children:a}),m[18]=b,m[19]=a,m[20]=d):d=m[20],m[21]!==I||m[22]!==d?(p=(0,o.jsx)(u.DA.Provider,{value:I,children:d}),m[21]=I,m[22]=d,m[23]=p):p=m[23],p},e7=e=>{let t,n,i,l=(0,s.c)(9),{children:a,documentId:c}=e,u=(0,d.dj)(),{t:p}=(0,h.Bdt)(r.Z7);l[0]!==p||l[1]!==u?(t={onParamsError:e=>{u.push({id:"diffViewParamsParsingError",status:"error",title:p("compare-version.error.invalidParams.title"),description:(0,o.jsx)("ul",{children:e.map(e=>{let[t,n]=e;return(0,o.jsx)("li",{children:p(`compare-version.error.${t}`,{input:n})},t)})})})}},l[0]=p,l[1]=u,l[2]=t):t=l[2];let{isActive:m}=eM(t);return l[3]!==c||l[4]!==m?(n=m&&(0,o.jsx)(e6,{documentId:c}),l[3]=c,l[4]=m,l[5]=n):n=l[5],l[6]!==a||l[7]!==n?(i=(0,o.jsxs)(o.Fragment,{children:[a,n]}),l[6]=a,l[7]=n,l[8]=i):i=l[8],i};function e8(){let e=(0,c.useContext)(u._U);if(!e)throw Error("PaneLayout: missing context value");return e}let e9=(0,g.I4)(a.Wd)`
39  position: relative;
40  width: 1px;
41  min-width: 1px;
42
43  &:before {
44    content: '';
45    display: block;
46    position: absolute;
47    top: 0;
48    left: 0;
49    bottom: 0;
50    width: 1px;
51    background-color: var(--card-border-color);
52  }
53
54  &:not([data-disabled]) {
55    cursor: ew-resize;
56    width: 9px;
57    min-width: 9px;
58    margin: 0 -4px;
59
60    &:before {
61      left: 4px;
62    }
63
64    &:after {
65      content: '';
66      display: block;
67      position: absolute;
68      top: 0;
69      left: 0;
70      width: 9px;
71      bottom: 0;
72      background-color: var(--card-border-color);
73      opacity: 0;
74      transition: opacity 150ms;
75    }
76
77    &[data-dragging]:after,
78    &:hover:after {
79      opacity: 0.2;
80    }
81  }
82`;function te(e){let t,n,i=(0,s.c)(7),{disabled:r,element:l}=e,{resize:a}=e8(),[d,u]=(0,c.useState)(!1);i[0]!==l||i[1]!==a?(t=e=>{if(!l)return;u(!0),e.preventDefault();let t=e.pageX;a("start",l,0);let n=e=>{e.preventDefault(),a("move",l,e.pageX-t)},i=e=>{e.preventDefault(),u(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",i),a("end",l,0)};window.addEventListener("mousemove",n),window.addEventListener("mouseup",i)},i[0]=l,i[1]=a,i[2]=t):t=i[2];let p=t,m=r?"":void 0,h=d?"":void 0;return i[3]!==p||i[4]!==m||i[5]!==h?(n=(0,o.jsx)(e9,{"data-disabled":m,"data-dragging":h,onMouseDown:p}
82),i[3]=p,i[4]=m,i[5]=h,i[6]=n):n=i[6],n}let tt=(0,g.I4)(a.Zp)`
83  outline: none;
84
85  // NOTE: This will render a border to the right side of each pane
86  // without taking up physical space.
87  box-shadow: 1px 0 0 var(--card-border-color);
88`,tn=(0,c.forwardRef)(function(e,t){let n,i,r,l,d,p,m,f,x,g,b,y,j,v,_,w,S,I,k,E,C,z,T,P,A,R,D,$,B,Y=(0,s.c)(86);Y[0]!==e?({children:n,currentMinWidth:r,currentMaxWidth:i,flex:f,id:l,minWidth:p,maxWidth:d,selected:x,...m}=e,Y[0]=e,Y[1]=n,Y[2]=i,Y[3]=r,Y[4]=l,Y[5]=d,Y[6]=p,Y[7]=m,Y[8]=f,Y[9]=x):(n=Y[1],i=Y[2],r=Y[3],l=Y[4],d=Y[5],p=Y[6],m=Y[7],f=Y[8],x=Y[9]);let M=void 0===f?1:f,L=void 0!==x&&x,[O,H]=(0,c.useState)(null),{collapse:V,collapsed:Z,expand:N,expandedElement:K,mount:F,panes:W}=e8();if(Y[10]!==W||Y[11]!==O){let e;Y[14]!==O?(e=e=>e.element===O,Y[14]=O,Y[15]=e):e=Y[15],b=(g=W.find(e))&&W.indexOf(g),Y[10]=W,Y[11]=O,Y[12]=g,Y[13]=b}else g=Y[12],b=Y[13];let J=b,U="number"==typeof J?W[J+1]:void 0,G=J===W.length-1,Q=K===O,q=!Z&&(g?.collapsed||!1),X=U?.collapsed||!1,ee=(0,c.useRef)(null),et=g?.flex??M,en=g?.currentMinWidth??r,ei=g?.currentMaxWidth??i;Y[16]===Symbol.for("react.memo_cache_sentinel")?(y=()=>ee.current,Y[16]=y):y=Y[16],(0,c.useImperativeHandle)(t,y),Y[17]===Symbol.for("react.memo_cache_sentinel")?(j=e=>{H(e),ee.current=e},Y[17]=j):j=Y[17];let er=j;Y[18]!==i||Y[19]!==r||Y[20]!==M||Y[21]!==l||Y[22]!==d||Y[23]!==p||Y[24]!==F||Y[25]!==O?(v=()=>{if(O)return F(O,{currentMinWidth:r,currentMaxWidth:i,flex:M,id:l,minWidth:p,maxWidth:d})},_=[r,i,M,l,p,d,F,O],Y[18]=i,Y[19]=r,Y[20]=M,Y[21]=l,Y[22]=d,Y[23]=p,Y[24]=F,Y[25]=O,Y[26]=v,Y[27]=_):(v=Y[26],_=Y[27]),(0,c.useLayoutEffect)(v,_),Y[28]!==V||Y[29]!==O?(w=()=>{O&&V(O)},Y[28]=V,Y[29]=O,Y[30]=w):w=Y[30];let el=w;Y[31]!==N||Y[32]!==O?(S=()=>{O&&N(O)},Y[31]=N,Y[32]=O,Y[33]=S):S=Y[33];let eo=S,es=!Z&&q;Y[34]!==el||Y[35]!==eo||Y[36]!==G||Y[37]!==J||Y[38]!==O||Y[39]!==es?(I={collapse:el,collapsed:es,expand:eo,index:J,isLast:G,rootElement:O},Y[34]=el,Y[35]=eo,Y[36]=G,Y[37]=J,Y[38]=O,Y[39]=es,Y[40]=I):I=Y[40];let ea=I;e:{if(Z){k=void 0;break e}if(q){k=51;break e}if(0===en||G){k=p||204;break e}k=en||p||204}let ed=k;t:{if(q){E=51;break t}if(Z&&G){E=void 0;break t}if(G){if(d){E=ei??d;break t}E=void 0;break t}E=ei??d}let ec=E,eu=Z&&!G;Y[41]!==q||Y[42]!==G||Y[43]!==Z||Y[44]!==X||Y[45]!==O?(C=!G&&!Z&&(0,o.jsx)(h.wG1,{zOffset:"paneResizer",children:(0,o.jsx)(te,{disabled:q||X,element:O})}),Y[41]=q,Y[42]=G,Y[43]=Z,Y[44]=X,Y[45]=O,Y[46]=C):C=Y[46];let ep=C,em=ec===1/0?void 0:ec;Y[47]!==et||Y[48]!==ed||Y[49]!==em?(z={flex:et,minWidth:ed,maxWidth:em},Y[47]=et,Y[48]=ed,Y[49]=em,Y[50]=z):z=Y[50];let eh=z,ef=Z?void 0:"hidden",ex=q?"":void 0,eg=L?"":void 0;return Y[51]!==q||Y[52]!==ei||Y[53]!==en||Y[54]!==Q||Y[55]!==et||Y[56]!==ec||Y[57]!==ed||Y[58]!==J?(T=!1,Y[51]=q,Y[52]=ei,Y[53]=en,Y[54]=Q,Y[55]=et,Y[56]=ec,Y[57]=ed,Y[58]=J,Y[59]=T):T=Y[59],Y[60]!==n||Y[61]!==eu?(P=!eu&&(0,o.jsx)(a.so,{direction:"column",height:"fill",children:n}),Y[60]=n,Y[61]=eu,Y[62]=P):P=Y[62],Y[63]!==O||Y[64]!==P?(A=(0,o.jsx)(a.EZ,{element:O,children:P}),Y[63]=O,Y[64]=P,Y[65]=A):A=Y[65],Y[66]!==eu||Y[67]!==l||Y[68]!==J||Y[69]!==m||Y[70]!==eh||Y[71]!==ef||Y[72]!==ex||Y[73]!==eg||Y[74]!==T||Y[75]!==A?(R=(0,o.jsxs)(tt,{"data-testid":"pane","data-ui":"Pane",tone
88:"inherit",hidden:eu,id:l,overflow:ef,...m,"data-pane-collapsed":ex,"data-pane-index":J,"data-pane-selected":eg,ref:er,style:eh,children:[T,A]}),Y[66]=eu,Y[67]=l,Y[68]=J,Y[69]=m,Y[70]=eh,Y[71]=ef,Y[72]=ex,Y[73]=eg,Y[74]=T,Y[75]=A,Y[76]=R):R=Y[76],Y[77]!==G||Y[78]!==R?(D=(0,o.jsx)(h.mLG,{isLastPane:G,children:R}),Y[77]=G,Y[78]=R,Y[79]=D):D=Y[79],Y[80]!==ea||Y[81]!==D?($=(0,o.jsx)(h.wG1,{zOffset:"pane",children:(0,o.jsx)(u.OD.Provider,{value:ea,children:D})}),Y[80]=ea,Y[81]=D,Y[82]=$):$=Y[82],Y[83]!==ep||Y[84]!==$?(B=(0,o.jsxs)(o.Fragment,{children:[$,ep]}),Y[83]=ep,Y[84]=$,Y[85]=B):B=Y[85],B}),ti=(0,g.I4)(a.Zp)`
89  position: relative;
90  outline: none;
91`;function tr(){let e=(0,c.useContext)(u.OD);if(!e)throw Error("Pane: missing context value");return e}ti.displayName="PaneContent__root";let tl=(0,c.forwardRef)(function(e,t){let n,i,r,l,a,d,c=(0,s.c)(14);c[0]!==e?({as:n,children:i,overflow:r,padding:l,...a}=e,c[0]=e,c[1]=n,c[2]=i,c[3]=r,c[4]=l,c[5]=a):(n=c[1],i=c[2],r=c[3],l=c[4],a=c[5]);let{collapsed:u}=tr(),{collapsed:p}=e8(),m=p?void 0:r;return c[6]!==n||c[7]!==i||c[8]!==u||c[9]!==l||c[10]!==t||c[11]!==a||c[12]!==m?(d=(0,o.jsx)(ti,{"data-testid":"pane-content",forwardedAs:n,...a,flex:1,hidden:u,overflow:m,padding:l,ref:t,tone:"inherit",children:i}),c[6]=n,c[7]=i,c[8]=u,c[9]=l,c[10]=t,c[11]=a,c[12]=m,c[13]=d):d=c[13],d});function to(e){return e?e.toLocaleLowerCase().replaceAll(" ",""):""}let ts={constrainSize:!0,placement:"left-start",portal:!0};function ta(e){let t,n,i,r,l=(0,s.c)(35),{disabled:d,isAfterGroup:c,node:u}=e,p=(0,h.Bvg)("i18n"in u?u:void 0);if("divider"===u.type){let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(a.Nj,{}),l[0]=e):e=l[0],e}l[1]!==p||l[2]!==u?(t=p(u),l[1]=p,l[2]=u,l[3]=t):t=l[3];let{title:m}=t;if("group"===u.type){let e,t,n,i;if(0===u.children.length)return null;if(u.expanded){let e,t,n;return l[4]!==c?(e=c&&(0,o.jsx)(a.Nj,{}),l[4]=c,l[5]=e):e=l[5],l[6]!==d||l[7]!==u.children||l[8]!==u.disabled?(t=u.children.map((e,t)=>(0,o.jsx)(ta,{disabled:d||!!u.disabled,isAfterGroup:u.children[t-1]?.type==="group",node:e},e.key)),l[6]=d,l[7]=u.children,l[8]=u.disabled,l[9]=t):t=l[9],l[10]!==e||l[11]!==t?(n=(0,o.jsxs)(o.Fragment,{children:[e,t]}),l[10]=e,l[11]=t,l[12]=n):n=l[12],n}l[13]!==c?(e=c&&(0,o.jsx)(a.Nj,{}),l[13]=c,l[14]=e):e=l[14];let r=u.icon;return l[15]!==d||l[16]!==u.children||l[17]!==u.disabled?(t=u.children.map((e,t)=>(0,o.jsx)(ta,{disabled:d||!!u.disabled,isAfterGroup:u.children[t-1]?.type==="group",node:e},e.key)),l[15]=d,l[16]=u.children,l[17]=u.disabled,l[18]=t):t=l[18],l[19]!==d||l[20]!==u.icon||l[21]!==t||l[22]!==m?(n=(0,o.jsx)(ed.r,{disabled:d,icon:r,popover:ts,text:m,children:t}),l[19]=d,l[20]=u.icon,l[21]=t,l[22]=m,l[23]=n):n=l[23],l[24]!==e||l[25]!==n?(i=(0,o.jsxs)(o.Fragment,{children:[e,n]}),l[24]=e,l[25]=n,l[26]=i):i=l[26],i}return l[27]!==c?(n=c&&(0,o.jsx)(a.Nj,{}),l[27]=c,l[28]=n):n=l[28],l[29]!==d||l[30]!==u?(i=(0,o.jsx)(td,{disabled:d,node:u}),l[29]=d,l[30]=u,l[31]=i):i=l[31],l[32]!==n||l[33]!==i?(r=(0,o.jsxs)(o.Fragment,{children:[n,i]}),l[32]=n,l[33]=i,l[34]=r):r=l[34],r}function td(e){let t,n=(0,s.c)(5),{node:i}=e;if(i.intent){let t;return n[0]!==i.intent||n[1]!==e?(t=(0,o.jsx)(tu,{...e,intent:i.intent}),n[0]=i.intent,n[1]=e,n[2]=t):t=n[2],t}return n[3]!==e?(t=(0,o.jsx)(tc,{...e}),n[3]=e,n[4]=t):t=n[4],t}function tc(e){let t,n,i,r,d,c=(0,s.c)(19),{disabled:u,node:m}=e;c[0]!==m.disabled?(t="object"==typeof m.disabled&&(0,o.jsx)(a.EY,{size:1,children:m.disabled.reason}),c[0]=m.disabled,c[1]=t):t=c[1];let f=t,{title:x}=(0,h.FP1)(m),g=u||!!m.disabled;c[2]!==m.hotkey?(n=m.hotkey?.split("+"),c[2]=m.hotkey,c[3]=n):n=c[3];let b=m.icon,y=m.iconRight||m.selected&&p.Nrt,j=m.onAction,v=m.selected,_=m.tone;c[4]!==m.title?(i=to(m.title),c[4]=m.title,c[5]=i):i=c[5];let w=`action-${i}`;return c[6]!==m.icon||c[7]!==m.onAction||c[8]!==m.selected||c[9]!==m.tone||c[10]!==g||c[11]!==n||c[12]!==y||c[13]!==w||c[14]!==x?(r=(0,o.jsx)(l.Dr,{disabled:g,hotkeys:n,icon:b,iconRight:y,onClick:j,pressed:v,text:x,tone:_,"data-testid":w}),c[6]=m.icon,c[7]=m.onAction,c[8]=m.selected,c[9]=m.tone,c[10]=g,c[11]=n,c[12]=y,c[13]=w,c[14]=x,c[15]=r):r=c[15],c[16]!==r||c[17]!==f?(d=(0,o.jsx)(h.FUn,{content:f,placement:"left",children:r}),c[16]=r,c[17]=f,c[18]=d):d=c[18],d}function tu(e){let t,n,i,r,d,c,u=(0,s.c)(23),{disabled:m,intent:f,node:x}=e;u[0]!==x.disabled?(t="object"==typeof x.disabled&&(0,o.jsx)(a.EY,{size:1,children:x.disabled.reason}),u[0]=x.disabled,u[1]=t):t=u[1];let g=t;u[2]!==f.params||u[3]!==f.type?(n={intent:f.type,params:f.params},u[2]=f.params,u[3]=f.type,u[4]=n):n=u[4];let b=(0,_.cQ)(n);u[5]!==b||u[6]!==x?(i=e=>{b.onClick(e),x.onAction()},u[5]=b,u[6]=x,u[7]=i):i=u[7];let y=i,{title:j}=(0,h.FP1)(x),v=m||!!x.disabled;
91u[8]!==x.hotkey?(r=x.hotkey?.split("+"),u[8]=x.hotkey,u[9]=r):r=u[9];let w=x.selected?p.Nrt:void 0;return u[10]!==y||u[11]!==b.href||u[12]!==x.icon||u[13]!==x.selected||u[14]!==x.tone||u[15]!==v||u[16]!==r||u[17]!==w||u[18]!==j?(d=(0,o.jsx)(l.Dr,{as:"a",disabled:v,hotkeys:r,href:b.href,icon:x.icon,iconRight:w,onClick:y,pressed:x.selected,text:j,tone:x.tone}),u[10]=y,u[11]=b.href,u[12]=x.icon,u[13]=x.selected,u[14]=x.tone,u[15]=v,u[16]=r,u[17]=w,u[18]=j,u[19]=d):d=u[19],u[20]!==d||u[21]!==g?(c=(0,o.jsx)(h.FUn,{content:g,placement:"left",children:d}),u[20]=d,u[21]=g,u[22]=c):c=u[22],c}let tp={constrainSize:!0,placement:"bottom",portal:!0};function tm(e,t){return e.some(e=>"item"===e.type&&e.tone===t||"group"===e.type&&tm(e.children,t))}function th(e){let t,n,i,r,d,u=(0,s.c)(13),{nodes:p,actionsNodes:m}=e,f=(0,c.useId)(),x=tm(p,"critical"),g=tm(p,"caution"),b=x?"critical":g?"caution":void 0;return u[0]!==b?(t=(0,o.jsx)(h.VJU,{tone:b,"data-testid":"pane-context-menu-button"}),u[0]=b,u[1]=t):t=u[1],u[2]!==m?(n=m&&(0,o.jsxs)(o.Fragment,{children:[m,(0,o.jsx)(a.Nj,{})]}),u[2]=m,u[3]=n):n=u[3],u[4]!==p?(i=p.map((e,t)=>{let n=p[t-1]?.type==="group";return(0,o.jsx)(ta,{isAfterGroup:n,node:e},e.key)}),u[4]=p,u[5]=i):i=u[5],u[6]!==n||u[7]!==i?(r=(0,o.jsxs)(a.W1,{children:[n,i]}),u[6]=n,u[7]=i,u[8]=r):r=u[8],u[9]!==f||u[10]!==t||u[11]!==r?(d=(0,o.jsx)(l.IU,{button:t,id:f,menu:r,popover:tp}),u[9]=f,u[10]=t,u[11]=r,u[12]=d):d=u[12],d}let tf=(0,g.I4)(a.Wd)`
92  position: sticky;
93  bottom: 0;
94`,tx=(0,g.I4)(a.Zp)`
95  padding-bottom: env(safe-area-inset-bottom);
96`,tg=(0,c.forwardRef)(function(e,t){let n,i,r=(0,s.c)(7),{children:l,padding:d}=e,{collapsed:c}=tr();return r[0]!==l||r[1]!==d?(n=(0,o.jsx)(tx,{tone:"inherit",children:(0,o.jsx)(a.az,{padding:d,children:l})}),r[0]=l,r[1]=d,r[2]=n):n=r[2],r[3]!==c||r[4]!==t||r[5]!==n?(i=(0,o.jsx)(h.wG1,{zOffset:"paneFooter",children:(0,o.jsx)(tf,{"data-testid":"pane-footer",hidden:c,ref:t,children:n})}),r[3]=c,r[4]=t,r[5]=n,r[6]=i):i=r[6],i}),tb=(0,g.I4)(a.Wd)(({$border:e})=>(0,g.AH)`
97    line-height: 0;
98    position: sticky;
99    top: 0;
100
101    &:not([data-collapsed]):after {
102      content: '';
103      display: block;
104      position: absolute;
105      left: 0;
106      right: 0;
107      bottom: -1px;
108      border-bottom: 1px solid ${e?"var(--card-border-color)":"transparent"};
109      opacity: 1;
110    }
111  `),ty=(0,g.I4)(a.so)`
112  transform-origin: calc(51px / 2);
113
114  [data-collapsed] > div > & {
115    transform: rotate(90deg);
116  }
117`,tj=(0,g.I4)(a.Zp)(({theme:e})=>{let{fg:t,bg:n}=e.sanity.color.card.enabled;return(0,g.AH)`
118    background-color: ${n};
119
120    [data-ui='Text'] {
121      color: ${t};
122    }
123  `}),tv=(0,g.I4)(d.r5)`
124  width: 66%;
125  max-width: 175px;
126`,t_=(0,g.I4)(a.EY)`
127  cursor: default;
128  outline: none;
129`,tw=(0,c.forwardRef)(function(e,t){let n,i,r,l,c,u,p,m,f,x,g,b,y,j=(0,s.c)(48),{actions:v,backButton:_,border:w,contentAfter:S,loading:I,subActions:k,tabs:E,tabIndex:C,title:z,appendTitle:T}=e,{collapse:P,collapsed:A,expand:R,rootElement:D}=tr(),$=(0,d.sQ)(D||null),B=A?$?.height||window.innerHeight:void 0;j[0]!==B?(n={width:B},j[0]=B,j[1]=n):n=j[1];let Y=n;j[2]!==P||j[3]!==A?(i=()=>{A||P()},j[2]=P,j[3]=A,j[4]=i):i=j[4];let M=i;j[5]!==A||j[6]!==R?(r=()=>{A&&R()},j[5]=A,j[6]=R,j[7]=r):r=j[7];let L=r,O=!!(!A&&(E||k)),H=A?"":void 0,V=A?"":void 0;j[8]!==_?(l=_&&(0,o.jsx)(a.az,{flex:"none",children:_}),j[8]=_,j[9]=l):l=j[9];let Z=_?1:2;j[10]!==I?(c=I&&(0,o.jsx)(a.az,{children:(0,o.jsx)(tv,{animated:!0,radius:1,size:1})}),j[10]=I,j[11]=c):c=j[11],j[12]!==T||j[13]!==I||j[14]!==z?(u=!I&&(0,o.jsxs)(a.so,{align:"center",gap:1,children:[(0,o.jsx)(t_,{size:1,textOverflow:"ellipsis",weight:"semibold",children:z}),T]}),j[12]=T,j[13]=I,j[14]=z,j[15]=u):u=j[15],j[16]!==M||j[17]!==Z||j[18]!==c||j[19]!==u||j[20]!==C?(p=(0,o.jsxs)(tj,{__unstable_focusRing:!0,flex:1,onClick:M,paddingLeft:Z,padding:2,tabIndex:C,children:[c,u]}),j[16]=M,j[17]=Z,j[18]=c,j[19]=u,j[20]=C,j[21]=p):p=j[21],j[22]!==v||j[23]!==A?(m=v&&(0,o.jsx)(a.az,{hidden:A,children:(0,o.jsx)(h.wG1,{zOffset:"paneHeader",children:v})}),j[22]=v,j[23]=A,j[24]=m):m=j[24],j[25]!==p||j[26]!==m||j[27]!==l?(f=(0,o.jsxs)(a.so,{align:"flex-start",ga
129p:3,children:[l,p,m]}),j[25]=p,j[26]=m,j[27]=l,j[28]=f):f=j[28],j[29]!==A||j[30]!==O||j[31]!==k||j[32]!==E?(x=O&&(0,o.jsxs)(a.so,{align:"center",hidden:A,overflow:"auto",children:[(0,o.jsx)(a.az,{flex:1,marginRight:3*!!k,children:E}),k]}),j[29]=A,j[30]=O,j[31]=k,j[32]=E,j[33]=x):x=j[33],j[34]!==L||j[35]!==Y||j[36]!==f||j[37]!==x?(g=(0,o.jsxs)(ty,{direction:"column",gap:3,onClick:L,padding:3,sizing:"border",style:Y,children:[f,x]}),j[34]=L,j[35]=Y,j[36]=f,j[37]=x,j[38]=g):g=j[38];let N=!A&&S;return j[39]!==g||j[40]!==N||j[41]!==V?(b=(0,o.jsx)(h.wG1,{zOffset:"paneHeader",children:(0,o.jsxs)(a.Zp,{"data-collapsed":V,tone:"inherit",children:[g,N]})}),j[39]=g,j[40]=N,j[41]=V,j[42]=b):b=j[42],j[43]!==w||j[44]!==t||j[45]!==b||j[46]!==H?(y=(0,o.jsx)(a.XS,{zOffset:100,children:(0,o.jsx)(tb,{$border:w,"data-collapsed":H,"data-testid":"pane-header",ref:t,children:b})}),j[43]=w,j[44]=t,j[45]=b,j[46]=H,j[47]=y):y=j[47],y});function tS(e){return e.disabled?{disabledReason:"object"==typeof e.disabled?e.disabled.reason:void 0,ariaLabel:"object"==typeof e.disabled&&"string"==typeof e.disabled?.reason?e.disabled.reason:"This is disabled",isDisabled:!!e.disabled}:{disabledReason:void 0,ariaLabel:void 0,isDisabled:!1}}function tI(e){let t=(0,s.c)(4),{node:n}=e;if("item"===n.type){let e;return t[0]!==n?(e=(0,o.jsx)(tk,{node:n}),t[0]=n,t[1]=e):e=t[1],e}if("group"===n.type){let e;return t[2]!==n?(e=(0,o.jsx)(tC,{node:n}),t[2]=n,t[3]=e):e=t[3],e}return console.warn('unknown menu node (expected `type: "item" | "group"`):',n),null}function tk(e){let t,n,i,r,l,a=(0,s.c)(23),{node:d}=e,{title:c}=(0,h.FP1)(d),{t:u}=(0,h.Bdt)();if(d.intent){let t;return a[0]!==d.intent||a[1]!==e?(t=(0,o.jsx)(tE,{...e,intent:d.intent}),a[0]=d.intent,a[1]=e,a[2]=t):t=a[2],t}a[3]!==d?(t=tS(d),a[3]=d,a[4]=t):t=a[4];let{disabledReason:p,ariaLabel:m,isDisabled:f}=t;a[5]!==m||a[6]!==u||a[7]!==c?(n=m||c||u("status-button.aria-label"),a[5]=m,a[6]=u,a[7]=c,a[8]=n):n=a[8],a[9]!==f||a[10]!==d.hotkey?(i=!f&&d.hotkey?d.hotkey.split("+"):void 0,a[9]=f,a[10]=d.hotkey,a[11]=i):i=a[11];let x=f?p:c;return a[12]!==i||a[13]!==x?(r={hotkeys:i,content:x},a[12]=i,a[13]=x,a[14]=r):r=a[14],a[15]!==f||a[16]!==d.icon||a[17]!==d.onAction||a[18]!==d.selected||a[19]!==d.tone||a[20]!==n||a[21]!==r?(l=(0,o.jsx)(h.pfD,{disabled:f,icon:d.icon,onClick:d.onAction,selected:d.selected,tone:d.tone,"aria-label":n,tooltipProps:r}),a[15]=f,a[16]=d.icon,a[17]=d.onAction,a[18]=d.selected,a[19]=d.tone,a[20]=n,a[21]=r,a[22]=l):l=a[22],l}function tE(e){let t,n,i,r,l,a,d,c=(0,s.c)(27),{intent:u,node:p}=e;c[0]!==u.params||c[1]!==u.type?(t={intent:u.type,params:u.params},c[0]=u.params,c[1]=u.type,c[2]=t):t=c[2];let m=(0,_.cQ)(t),{t:f}=(0,h.Bdt)();c[3]!==m||c[4]!==p?(n=e=>{m.onClick(e),p.onAction()},c[3]=m,c[4]=p,c[5]=n):n=c[5];let x=n;c[6]!==p?(i=tS(p),c[6]=p,c[7]=i):i=c[7];let{disabledReason:g,ariaLabel:b,isDisabled:y}=i;c[8]!==b||c[9]!==p.title||c[10]!==f?(r=b||p.title||f("status-button.aria-label"),c[8]=b,c[9]=p.title,c[10]=f,c[11]=r):r=c[11],c[12]!==y||c[13]!==p.hotkey?(l=!y&&p.hotkey?p.hotkey.split("+"):void 0,c[12]=y,c[13]=p.hotkey,c[14]=l):l=c[14];let j=y?g:p.title;return c[15]!==l||c[16]!==j?(a={hotkeys:l,content:j,placement:"bottom",portal:!0},c[15]=l,c[16]=j,c[17]=a):a=c[17],c[18]!==x||c[19]!==m.href||c[20]!==y||c[21]!==p.icon||c[22]!==p.selected||c[23]!==p.tone||c[24]!==r||c[25]!==a?(d=(0,o.jsx)(h.pfD,{forwardedAs:"a",disabled:y,href:m.href,icon:p.icon,onClick:x,selected:p.selected,tone:p.tone,"aria-label":r,tooltipProps:a}),c[18]=x,c[19]=m.href,c[20]=y,c[21]=p.icon,c[22]=p.selected,c[23]=p.tone,c[24]=r,c[25]=a,c[26]=d):d=c[26],d}function tC(e){let t,n,i,r,d,u=(0,s.c)(16),{node:m}=e,{title:f}=(0,h.FP1)(m),x=!!m.disabled,g=m.icon??p.KSC;u[0]!==m.title?(t={content:m.title,portal:!0},u[0]=m.title,u[1]=t):t=u[1],u[2]!==x||u[3]!==g||u[4]!==t||u[5]!==f?(n=(0,o.jsx)(l.$n,{disabled:x,icon:g,label:f,mode:"bleed",tooltipProps:t}),u[2]=x,u[3]=g,u[4]=t,u[5]=f,u[6]=n):n=u[6];let b=(0,c.useId)();return u[7]!==m.children||u[8]!==m.disabled?(i=m.children.map((e,t)=>(0,o.jsx)(ta,{disabled:!!m.disabled,isAfterGroup:m.children[t-1]?.type==="group",node:e},e.key)),u[7]=m.children,u[8]=m.disabled,u[9]=i):i=u[9],u[10]!==i?(r=(0,o.jsx)(a.W1,{children:i}
129),u[10]=i,u[11]=r):r=u[11],u[12]!==n||u[13]!==b||u[14]!==r?(d=(0,o.jsx)(l.IU,{button:n,id:b,menu:r}),u[12]=n,u[13]=b,u[14]=r,u[15]=d):d=u[15],d}let tz=(0,g.I4)(a.Zp)`
130  transition: opacity 200ms;
131  position: relative;
132  z-index: 1;
133  padding-left: env(safe-area-inset-left);
134  padding-right: env(safe-area-inset-right);
135  opacity: 0;
136
137  &:not([hidden]) {
138    display: flex;
139  }
140
141  &:not([data-collapsed]) {
142    overflow: auto;
143  }
144
145  &[data-mounted] {
146    opacity: 1;
147  }
148
149  &[data-resizing] {
150    pointer-events: none;
151  }
152`,tT=[];function tP(e){let t,n,i,r,l,a,p,m,h,f,x,g,b,y,j,v,_,w=(0,s.c)(41);w[0]!==e?({children:t,minWidth:n,onCollapse:i,onExpand:r,...l}=e,w[0]=e,w[1]=t,w[2]=n,w[3]=i,w[4]=r,w[5]=l):(t=w[1],n=w[2],i=w[3],r=w[4],l=w[5]);let[S]=(0,c.useState)(tA),[I,k]=(0,c.useState)(null),E=(0,d.sQ)(I)?.width||0,C=void 0!==E&&n?E<n:void 0;w[6]===Symbol.for("react.memo_cache_sentinel")?(a={expandedElement:null,panes:[],resizing:!1},w[6]=a):a=w[6];let[z,T]=(0,c.useState)(a);w[7]!==S||w[8]!==I?(p=()=>S.setRootElement(I),m=[S,I],w[7]=S,w[8]=I,w[9]=p,w[10]=m):(p=w[9],m=w[10]),(0,c.useEffect)(p,m),w[11]!==S||w[12]!==E?(h=()=>S.setRootWidth(E),f=[S,E],w[11]=S,w[12]=E,w[13]=h,w[14]=f):(h=w[13],f=w[14]),(0,c.useEffect)(h,f),w[15]!==S?(x=()=>S.subscribe(T),g=[S],w[15]=S,w[16]=x,w[17]=g):(x=w[16],g=w[17]),(0,c.useEffect)(x,g),w[18]!==C||w[19]!==i||w[20]!==r?(b=()=>{void 0!==C&&(C&&i&&i(),!C&&r&&r())},y=[C,i,r],w[18]=C,w[19]=i,w[20]=r,w[21]=b,w[22]=y):(b=w[21],y=w[22]),(0,c.useEffect)(b,y),w[23]!==C||w[24]!==S.collapse||w[25]!==S.expand||w[26]!==S.mount||w[27]!==S.resize||w[28]!==z.expandedElement||w[29]!==z.panes||w[30]!==z.resizing?(j={collapse:S.collapse,collapsed:C,expand:S.expand,expandedElement:z.expandedElement,mount:S.mount,panes:z.panes,resize:S.resize,resizing:z.resizing},w[23]=C,w[24]=S.collapse,w[25]=S.expand,w[26]=S.mount,w[27]=S.resize,w[28]=z.expandedElement,w[29]=z.panes,w[30]=z.resizing,w[31]=j):j=w[31];let P=j,A=C?"":void 0,R=z.resizing?"":void 0,D=E?"":void 0;return w[32]!==t||w[33]!==l||w[34]!==A||w[35]!==R||w[36]!==D?(v=(0,o.jsx)(tz,{"data-ui":"PaneLayout",...l,"data-collapsed":A,"data-resizing":R,"data-mounted":D,ref:k,children:t}),w[32]=t,w[33]=l,w[34]=A,w[35]=R,w[36]=D,w[37]=v):v=w[37],w[38]!==P||w[39]!==v?(_=(0,o.jsx)(u._U.Provider,{value:P,children:v}),w[38]=P,w[39]=v,w[40]=_):_=w[40],_}function tA(){return function(){let e=[],t=[],n=new WeakMap,i=new Set,r={},l=null,o=0,s=null,a=null,d=new Map,c=!1;function u(e){i.delete(e),s=e,p()}return{collapse:function(e){i.add(e),s===e&&(s=null),p()},expand:u,maximize:function(e){a=e,p()},mount:function(e,i){return n.set(e,{...i,original:i}),t.push(e),l&&function(e,t){let n=new WeakMap;for(let i of t)n.set(i,function(e,t){let n=[],i=t;for(;i!==e;){let t=i.parentElement;if(!t)break;let r=Array.from(t.childNodes).indexOf(i);if(n.unshift(r),t===e)break;i=t}return n}(e,i));t.sort((e,t)=>{let i=n.get(e)||tT,r=n.get(t)||tT,l=Math.max(i.length,r.length);for(let e=0;e<l;e+=1){let t=i[e]||-1,n=r[e]||-1;if(t!==n)return t-n}return 0})}(l,t),u(e),()=>{let i=t.indexOf(e);i>-1&&t.splice(i,1),n.delete(e),a===e&&(a=null),p()}},resize:function(e,i,l){let o=t.indexOf(i),s=n.get(i);if(!s)return;let a=t[o+1],u=n.get(a);if(u){if("start"===e&&(c=!0,r.left={element:i,flex:s.flex||1,width:i.offsetWidth},r.right={element:a,flex:u.flex||1,width:a.offsetWidth},p()),"move"===e&&r.left&&r.right){d=new Map;let{leftW:e,rightW:t,leftFlex:n,rightFlex:o}=function(e,t,n,i){let r={flex:e.left.flex+e.right.flex,width:e.left.width+e.right.width},l=t.minWidth??204,o=n.minWidth??204,s=Math.min(t.maxWidth||1/0,r.width-o),a=Math.min(n.maxWidth||1/0,r.width-l),d=l-e.left.width,c=e.right.width-a;d<c&&(d=c);let u=e.right.width-o,p=s-e.left.width;u>p&&(u=p);let m=Math.min(Math.max(i,d),u),h=e.left.width+m,f=e.right.width-m;return{leftFlex:h/r.width*r.flex,leftW:h,rightFlex:f/r.width*r.flex,rightW:f}}(r,s,u,l);d.set(i,{flex:n,width:e}),d.set(a,{flex:o,width:t}),p()}if("end"===e){c=!1;let e=d.get(i),t=d.get(a);n.set(i,{...s,currentMinWidth:0,currentMaxWidth:s.maxWidth??1/0,flex:e?.flex??s.flex}),n.set(a,{...u,currentMinWidth:0,currentMaxWidth:s.maxWidth??1/0,flex:t?.flex??u.flex}),d=new Map,delete r.left,delete r.right,p()}}},setRootElement:function(e){l=e},setRootWidth:function(e){o=e,p()},subscribe:function(t){return e.push(t),()=>{let n=e.push(t);n>-1&&e.splice(n,1)}}};function p(){if(!o)return;let r=[];for(let e of t)e!==s&&r.unshift(e);s&&r.unshift(s);let l=new WeakMap,u=r.length,p=r[0],m=o-(u-1)*51;for(let e of r){let t=n.get(e);if(!t)continue;let r=t.currentMinWidth||t.minWidth||204,o=e===p,s=i.has(e),c=r>m,u=!o&&(s||c),h=d.get(e);l.set(e,{element:e,collapsed:u,currentMinWidth:h?.width??t.currentMinWidth,currentMaxWidth:h?.width??t.currentMaxWidth,flex:h?.flex??t.flex??1,maximized:e===a}),u?m-=51:m-=r-51}let h=[];for(let e of t){let t=l.get(e);t&&h.push(t)}for(let n of e)n({expandedElement:s||t[t.length-1]||null,panes:h,resizing:c})}}()}function tR(e){let t,n,i,r=(0,s.c)(12),{children:l,currentMinWidth:d,flex:c,minWidth:u,paneKey:p,title:m,tone:h}=e,f=void 0===m?"Error":m,x=void 0===h?"critical":h;return r[0]!==f?(t=(0,o.jsx)(tw,{title:f}),r[0]=f,r[1]=t):t=r[1],r[2]!==l?(n=(0,o.jsx)(tl,{overflow:"auto",children:(0,o.jsx)(a.az,{paddingX:4,paddingY:5,children:l})}),r[2]=l,r[3]=n):n=r[3],r[4]!==d||r[5]!==c||r[6]!==u||r[7]!==p||r[8]!==t||r[9]!==n||r[10]!==x?(i=(0,o.jsxs)(tn,{currentMinWidth:d,flex:c,id:p,minWidth:u,tone:x,children:[t,n]}),r[4]=d,r[5]=c,r[6]=u,r[7]=p,r[8]=t,r[9]=n,r[10]=x,r[11]=i):i=r[11],i}function tD(e){let t,n,i,r=(0,s.c)(6),{children:l,ms:a}=e,d=void 0===a?0:a,[u,p]=(0,c.useState)(d<=0);if(r[0]!==d?(t=()=>{if(d<=0)return;let e=setTimeout(()=>p(!0),d);return()=>{clearTimeout(e)}},n=[d],r[0]=d,r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,c.useEffect)(t,n),!u||!l){let e;return r[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(o.Fragment,{}),r[3]=e):e=r[3],e}return r[4]!==l?(i="function"==typeof l?l():l,r[4]=l,r[5]=i):i=r[5],i}function t$(e){let t=[{ms:300,messageKey:"panes.resolving.default-message"},{ms:5e3,messageKey:"panes.resolving.slow-resolve-message"}];if(h.Cu5){let n=["Check console for errors?","Is your observable/promise resolving?",e.length>0?`Structure path: ${e.join(" ➝ ")}`:""];t.push({ms:1e4,message:n.join(`
153`)})}let n=(0,N.of)(null);return(0,K.h)(...t.map(e=>n.pipe((0,k.u)("messageKey"in e?{messageKey:e.messageKey}:{message:e.message}),(0,E.c)(e.ms))))}let tB=(0,g.I4)(a.so)`
154  opacity: 0;
155  transition: opacity 200ms;
156
157  &[data-mounted] {
158    opacity: 1;
159  }
160`,tY=(0,c.memo)(e=>{let t,n,i,l,a,u,p,m,f,x,g=(0,s.c)(28),{delay:b,flex:y,message:j,minWidth:v,paneKey:_,path:w,selected:S,title:I,tone:k}=e,E=void 0===b?300:b,C=void 0===j?t$:j,{t:z}=(0,h.Bdt)(r.Z7);e:{if("function"==typeof C){let e;g[0]!==C||g[1]!==w?(e=C(w?w.split(";"):[]),g[0]=C,g[1]=w,g[2]=e):e=g[2],t=e;break e}t=C}let T=t;g[3]!==T||g[4]!==z?(n=()=>"string"==typeof T?T:z("panes.resolving.default-message"),g[3]=T,g[4]=z,g[5]=n):n=g[5];let[P,A]=(0,c.useState)(n);g[6]!==T||g[7]!==z?(i=()=>
160{if("object"!=typeof T||"function"!=typeof T.subscribe)return;let e=T.subscribe(e=>{A("messageKey"in e?z(e.messageKey):e.message)});return()=>e.unsubscribe()},l=[T,z],g[6]=T,g[7]=z,g[8]=i,g[9]=l):(i=g[8],l=g[9]),(0,c.useEffect)(i,l);let[R,D]=(0,c.useState)(null),[$,B]=(0,c.useState)(!1);g[10]!==R?(a=()=>{if(R)return(0,d.X)(()=>B(!0))},u=[R],g[10]=R,g[11]=a,g[12]=u):(a=g[11],u=g[12]),(0,c.useEffect)(a,u);let Y=$?"":void 0,M=I||P;g[13]!==M?(p=(0,o.jsx)(h.gd4,{showText:!0,title:M}),g[13]=M,g[14]=p):p=g[14],g[15]!==p||g[16]!==Y?(m=(0,o.jsx)(tB,{align:"center","data-mounted":Y,direction:"column",height:"fill",justify:"center",ref:D,children:p}),g[15]=p,g[16]=Y,g[17]=m):m=g[17];let L=m;return g[18]!==L||g[19]!==E?(f=(0,o.jsx)(tl,{children:L}),g[18]=L,g[19]=E,g[20]=f):f=g[20],g[21]!==y||g[22]!==v||g[23]!==_||g[24]!==S||g[25]!==f||g[26]!==k?(x=(0,o.jsx)(tn,{flex:y,id:_,minWidth:v,selected:S,tone:k,children:f}),g[21]=y,g[22]=v,g[23]=_,g[24]=S,g[25]=f,g[26]=k,g[27]=x):x=g[27],x});function tM(){let e=(0,c.useContext)(u.Fi);if(!e)throw Error("DocumentPane: missing context value");return e}function tL(e){let t,n,i=(0,s.c)(8),{children:r,documentId:l,documentType:a}=e;return i[0]!==r||i[1]!==l||i[2]!==a?(t=(0,o.jsx)(tO,{documentId:l,documentType:a,children:r}),i[0]=r,i[1]=l,i[2]=a,i[3]=t):t=i[3],i[4]!==l||i[5]!==a||i[6]!==t?(n=(0,o.jsx)(h.ByQ,{documentId:l,documentType:a,children:t}),i[4]=l,i[5]=a,i[6]=t,i[7]=n):n=i[7],n}function tO(e){let t,n,i,r,l,a,d=(0,s.c)(26),{children:u,documentId:p,documentType:m}=e,{enabled:f}=(0,h.Dsj)(),{connectionState:x,onPathOpen:g,inspector:b,openInspector:y}=tM(),{selectedReleaseId:j}=(0,h.QO2)(),{params:v,setParams:w}=nC(),{resolveIntentLink:S}=(0,_.rd)(),I=v?.comment,k=(0,c.useRef)(v);d[0]!==v?(t=()=>{k.current=v},n=[v],d[0]=v,d[1]=t,d[2]=n):(t=d[1],n=d[2]),(0,c.useLayoutEffect)(t,n),d[3]!==p||d[4]!==m||d[5]!==S?(i=e=>{let t=S("edit",{id:p,type:m,inspect:h.nHq,comment:e});return`${window.location.origin}${t}`},d[3]=p,d[4]=m,d[5]=S,d[6]=i):i=d[6];let E=i;d[7]!==w?(r=()=>{w({...k.current,comment:void 0})},d[7]=w,d[8]=r):r=d[8];let C=r;d[9]!==b?.name||d[10]!==y?(l=()=>{b?.name!==h.nHq&&y(h.nHq)},d[9]=b?.name,d[10]=y,d[11]=l):l=d[11];let z=l;if(!f){let e;return d[12]!==u?(e=(0,o.jsx)(o.Fragment,{children:u}),d[12]=u,d[13]=e):e=d[13],e}let T=b?.name===h.nHq,P="connecting"===x;return d[14]!==u||d[15]!==p||d[16]!==m||d[17]!==E||d[18]!==C||d[19]!==z||d[20]!==g||d[21]!==I||d[22]!==j||d[23]!==T||d[24]!==P?(a=(0,o.jsx)(h.ixz,{documentId:p,documentType:m,getCommentLink:E,isCommentsOpen:T,isConnecting:P,onClearSelectedComment:C,onCommentsOpen:z,onPathOpen:g,selectedCommentId:I,sortOrder:"desc",type:"field",releaseId:j,children:u}),d[14]=u,d[15]=p,d[16]=m,d[17]=E,d[18]=C,d[19]=z,d[20]=g,d[21]=I,d[22]=j,d[23]=T,d[24]=P,d[25]=a):a=d[25],a}function tH(e){let t,n,i,r,l,a=(0,s.c)(14),{children:d}=e,{actions:u,editState:p,isInitialValueLoading:m,revisionId:f}=tM(),x=(0,c.useRef)(null);a[0]!==p||a[1]!==m||a[2]!==f?(t=p?{...p,revision:f||void 0,initialValueResolved:!m}:null,a[0]=p,a[1]=m,a[2]=f,a[3]=t):t=a[3];let g=t;if(!g)return null;a[4]===Symbol.for("react.memo_cache_sentinel")?(n=()=>x.current?.(),a[4]=n):n=a[4],a[5]!==g?(i={...g,onComplete:n},a[5]=g,a[6]=i):i=a[6];let b=u||h.Mlv;return a[7]!==g||a[8]!==d?(r=e=>{let{states:t}=e;return(0,o.jsx)(tZ,{states:t,actionProps:g,children:d})},a[7]=g,a[8]=d,a[9]=r):r=a[9],a[10]!==i||a[11]!==b||a[12]!==r?(l=(0,o.jsx)(h.N6R,{args:i,hooks:b,resetRef:x,children:r}),a[10]=i,a[11]=b,a[12]=r,a[13]=l):l=a[13],l}tY.displayName="Memo(LoadingPane)";let tV=["delete","duplicate","publish","unpublish","unlinkFromCanvas","editInCanvas","linkToCanvas","schedule","discardVersion","unpublishVersion"];function tZ(e){let t,n,i,l=(0,s.c)(9),{states:a,children:d,actionProps:c}=e,{t:p}=(0,h.Bdt)(r.Z7);l[0]!==c?(t=(0,h.aJr)(c),l[0]=c,l[1]=t):t=l[1];let{isLinked:m}=(0,h.G2c)(t);return l[2]!==m||l[3]!==a||l[4]!==p?(n=m?a.map(e=>e.action&&tV.includes(e.action)?e:{...e,disabled:!0,title:p("action.disabled-by-canvas.tooltip")}):a,l[2]=m,l[3]=a,l[4]=p,l[5]=n):n=l[5],l[6]!==d||l[7]!==n?(i=(0,o.jsx)(u.Pq.Provider,{value:n,children:d}),l[6]=d,l[7]=n,l[8]=i):i=l[8],i}function tN(){let e=(0,c.useContext)(u.DI);if(!e)throw Error("StructureTool: missing context value");return e}let tK={},tF="inspect:",tW=[{id:"inspectors"},{id:"links"}],tJ="sanity/structure/history";function tU(e){let t,n,i,r,l,a,d,u,p,m=(0,s.c)(22),{documentId:f,documentType:x,inspectors:g,onMenuItems:b}=e,y=g.length;m[0]!==y?(t=()=>Array.from(Array(y)),m[0]=y,m[1]=t):t=m[1];let[j,v]=(0,c.useState)(t);m[2]!==y||m[3]!==j?(n=()=>
160{if(j.length!==y){let e=Array.from(Array(y));for(let t=0;t<y;t++)e[t]=j[t];v(e)}},i=[y,j],m[2]=y,m[3]=j,m[4]=n,m[5]=i):(n=m[4],i=m[5]),(0,c.useEffect)(n,i),m[6]===Symbol.for("react.memo_cache_sentinel")?(r=(e,t)=>{v(n=>{let i=[...n];return i[e]=t,i})},m[6]=r):r=m[6];let _=r;if(m[7]!==j||m[8]!==b?(l=()=>{b(j.filter(Boolean))},a=[j,b],m[7]=j,m[8]=b,m[9]=l,m[10]=a):(l=m[9],a=m[10]),(0,c.useEffect)(l,a),m[11]!==f||m[12]!==x||m[13]!==g){let e;m[15]!==f||m[16]!==x?(e=(e,t)=>e.useMenuItem?[function({documentId:e,documentType:t,index:n,setMenuItem:i,useMenuItem:r}){return(0,c.memo)(function(){let l,o,a,d=(0,s.c)(4);d[0]===Symbol.for("react.memo_cache_sentinel")?(l={documentId:e,documentType:t},d[0]=l):l=d[0];let u=r(l),p=(0,h.$6H)(u);return d[1]!==p?(o=()=>{i(n,p)},a=[p],d[1]=p,d[2]=o,d[3]=a):(o=d[2],a=d[3]),(0,c.useEffect)(o,a),null})}({documentId:f,documentType:x,index:t,setMenuItem:_,useMenuItem:e.useMenuItem}),e.name]:[tQ,""],m[15]=f,m[16]=x,m[17]=e):e=m[17],d=g.map(e),m[11]=f,m[12]=x,m[13]=g,m[14]=d}else d=m[14];let w=d;return m[18]!==w?(u=w.map(tG),m[18]=w,m[19]=u):u=m[19],m[20]!==u?(p=(0,o.jsx)(o.Fragment,{children:u}),m[20]=u,m[21]=p):p=m[21],p}function tG(e){let[t,n]=e;return n&&(0,o.jsx)(t,{},n)}function tQ(){return null}function tq(){let e,t,n,i,l=(0,s.c)(22),{connectionState:o,schemaType:a,editState:d,isDeleted:c,lastRevisionDocument:u}=tM(),{selectedPerspectiveName:p}=(0,h.QO2)(),{t:m}=(0,h.Bdt)(r.Z7);e:{if(c){e=u;break e}if(p&&(0,h.xo4)(p)){e=d?.published;break e}e=d?.version||d?.draft||d?.published}let f=e,x=!!f;t:{if(c&&u&&a)try{let e;l[0]!==u||l[1]!==a?(e=(0,h.hCw)(u,a),l[0]=u,l[1]=a,l[2]=e):e=l[2],t=e;break t}catch(e){console.warn("Failed to prepare preview for deleted document:",e),t=null;break t}t=null}let g=t,b=x&&!c;l[3]!==f||l[4]!==a||l[5]!==b?(n={enabled:b,schemaType:a,value:f},l[3]=f,l[4]=a,l[5]=b,l[6]=n):n=l[6];let{error:y,value:j}=(0,h.MOl)(n);if("connecting"===o&&!x){let e;return l[7]===Symbol.for("react.memo_cache_sentinel")?(e={error:void 0,title:void 0},l[7]=e):e=l[7],e}if(c&&g){let e;return l[8]!==g.title?(e={error:void 0,title:g.title},l[8]=g.title,l[9]=e):e=l[9],e}if(!j&&!c){let e,t,n=a?.title||a?.name;return l[10]!==m||l[11]!==n?(e=m("panes.document-header-title.new.text",{schemaType:n}),l[10]=m,l[11]=n,l[12]=e):e=l[12],l[13]!==e?(t={error:void 0,title:e},l[13]=e,l[14]=t):t=l[14],t}if(y){let e,t;return l[15]!==y.message||l[16]!==m?(e=m("panes.document-list-pane.error.text",{error:y.message}),l[15]=y.message,l[16]=m,l[17]=e):e=l[17],l[18]!==e?(t={error:e,title:void 0},l[18]=e,l[19]=t):t=l[19],t}let v=j?.title;return l[20]!==v?(i={error:void 0,title:v},l[20]=v,l[21]=i):i=l[21],i}tU.displayName="DocumentInspectorMenuItemsResolver";let tX=["patch","commit"],t0=(0,c.memo)(function(){let e,t,n,i,l,a=(0,s.c)(13),{push:u}=(0,d.dj)(),{documentId:p,documentType:m,value:f}=tM(),x=tq(),g=x.error,b=(0,h.cUp)(p,m),y=(0,c.useRef)(b),j=nC(),{t:v}=(0,h.Bdt)(r.Z7),{handleOpenDialog:_}=(0,h.pDY)();e:{if(!x.title&&!g&&!tX.includes(b?.op)&&"string"==typeof f.title&&b?.type==="success"){e=f.title;break e}e=x.title}let w=e;a[0]!==v||a[1]!==w?(t=w||v("panes.document-operation-results.operation-undefined-title"),a[0]=v,a[1]=w,a[2]=t):t=a[2];let S=t;a[3]!==S?(n=S.length>25?`${S.slice(0,25)}...`:S,a[3]=S,a[4]=n):n=a[4];let I=n;return a[5]!==I||a[6]!==b||a[7]!==_||a[8]!==j||a[9]!==u||a[10]!==v?(i=()=>{let e;if(b&&b!==y.current){if("error"===b.type){if((0,h.rML)(b.error))return void _("document_action");u({closable:!0,duration:3e4,status:"error",title:v("panes.document-operation-results.operation-error",{context:b.op}),description:(0,o.jsxs)("details",{children:[(0,o.jsx)("summary",{children:v("panes.document-operation-results.error.summary.title")}),b.error.message]})})}return"success"!==b.type||tX.includes(b.op)||u({closable:!0,status:"success",title:(0,o.jsx)(h.HTc,{context:b.op,i18nKey:"panes.document-operation-results.operation-success",t:v,values:{op:b.op,title:I},components:{Strong:"strong"}})}),"success"===b.type&&"delete"===b.op&&(e=setTimeout(()=>j.closeCurrentAndAfter(),0)),y.current=b,()=>clearTimeout(e)}},l=[b,j,u,v,I,_],a[5]=I,a[6]=b,a[7]=_,a[8]=j,a[9]=u,a[10]=v,a[11]=i,a[12]=l):(i=a[11],l=a[
16012]),(0,c.useEffect)(i,l),null}),t1=(0,g.I4)(a.Zp)({position:"relative",zIndex:"1",lineHeight:"0"});function t2(e){let t,n,i,d,c,u,m,f,x,g,b,y,j=(0,s.c)(25);j[0]!==e?({as:i,children:t,closeButtonLabel:n,onClose:d,title:u,...c}=e,j[0]=e,j[1]=t,j[2]=n,j[3]=i,j[4]=d,j[5]=c,j[6]=u):(t=j[1],n=j[2],i=j[3],d=j[4],c=j[5],u=j[6]);let{t:v}=(0,h.Bdt)(r.Z7);return j[7]!==u?(m=(0,o.jsx)(a.az,{flex:1,padding:3,children:(0,o.jsx)(a.EY,{as:"h1",size:1,weight:"medium",children:u})}),j[7]=u,j[8]=m):m=j[8],j[9]!==v?(f=v("document-inspector.close-button.tooltip"),j[9]=v,j[10]=f):f=j[10],j[11]!==f?(x={content:f},j[11]=f,j[12]=x):x=j[12],j[13]!==n||j[14]!==d||j[15]!==x?(g=(0,o.jsx)(a.az,{flex:"none",padding:1,children:(0,o.jsx)(l.$n,{"aria-label":n,icon:p.USm,mode:"bleed",onClick:d,tooltipProps:x})}),j[13]=n,j[14]=d,j[15]=x,j[16]=g):g=j[16],j[17]!==m||j[18]!==g?(b=(0,o.jsxs)(a.so,{padding:2,children:[m,g]}),j[17]=m,j[18]=g,j[19]=b):b=j[19],j[20]!==t||j[21]!==i||j[22]!==c||j[23]!==b?(y=(0,o.jsxs)(t1,{...c,as:i,children:[b,t]}),j[20]=t,j[21]=i,j[22]=c,j[23]=b,j[24]=y):y=j[24],y}function t3(e){let t,n,i,r=(0,s.c)(14),{documentId:l,documentType:d,flex:c}=e,{collapsed:u}=tr(),{closeInspector:p,inspector:m}=tM(),{features:f}=tN();r[0]!==p||r[1]!==m?(t=()=>{m&&p(m.name)},r[0]=p,r[1]=m,r[2]=t):t=r[2];let x=t;if(u||!m)return null;let g=m.component;r[3]!==g||r[4]!==l||r[5]!==d||r[6]!==x?(n=(0,o.jsx)(g,{onClose:x,documentId:l,documentType:d}),r[3]=g,r[4]=l,r[5]=d,r[6]=x,r[7]=n):n=r[7];let b=n;if(f.resizablePanes){let e;return r[8]!==b||r[9]!==c?(e=(0,o.jsx)(h.cMO,{as:"aside","data-ui":"DocumentInspectorPanel",flex:c,resizerPosition:"left",maxWidth:540,minWidth:320,children:b}),r[8]=b,r[9]=c,r[10]=e):e=r[10],e}return r[11]!==b||r[12]!==c?(i=(0,o.jsx)(a.az,{as:"aside","data-ui":"DocumentInspectorPanel",flex:c,children:b}),r[11]=b,r[12]=c,r[13]=i):i=r[13],i}function t4(e,t,n){let i,r,l,o,a=(0,s.c)(16),d=(0,h.P$5)();a[0]!==t||a[1]!==e?(i=["studio.structure-tool",e,t].filter(Boolean),a[0]=t,a[1]=e,a[2]=i):i=a[2];let c=i.join(".");if(a[3]!==n||a[4]!==d||a[5]!==c){let e;a[7]!==n?(e=e=>null===e?n:e,a[7]=n,a[8]=e):e=a[8],r=d.getKey(c).pipe((0,C.T)(e)),a[3]=n,a[4]=d,a[5]=c,a[6]=r}else r=a[6];let u=(0,v.J)(r,n);a[9]!==d||a[10]!==c||a[11]!==u?(l=async e=>{e!==u&&await d.setKey(c,e)},a[9]=d,a[10]=c,a[11]=u,a[12]=l):l=a[12];let p=l;return a[13]!==p||a[14]!==u?(o=[u,p],a[13]=p,a[14]=u,a[15]=o):o=a[15],o}let t5={id:"parsed",title:"document-inspector.view-mode.parsed"},t6={id:"raw",title:"document-inspector.view-mode.raw-json"},t7=[t5,t6],t8=new ey.A({maxSize:1e3});function t9(e){let{path:t}=e,n=t8.get(t);void 0!==n&&t8.set(t,!n)}function ne(e){let t=window.getSelection();if(t){let n=document.createRange();t.removeAllRanges(),n.selectNodeContents(e),t.addRange(n)}}function nt(e){ne(e.target)}function nn(e){65===e.keyCode&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),ne(e.currentTarget))}let ni=g.I4.div(({theme:e})=>{let{color:t,fonts:n,space:i}=e.sanity;return(0,g.AH)`
161    & .json-inspector,
162    & .json-inspector .json-inspector__selection {
163      font-family: ${n.code.family};
164      font-size: ${n.code.sizes[1].fontSize}px;
165      line-height: ${n.code.sizes[1].lineHeight}px;
166      color: var(--card-code-fg-color);
167    }
168
169    & .json-inspector .json-inspector__leaf {
170      padding-left: ${(0,a.D0)(i[4])};
171    }
172
173    & .json-inspector .json-inspector__leaf.json-inspector__leaf_root {
174      padding-top: ${(0,a.D0)(i[3])};
175      padding-left: 0;
176    }
177
178    & .json-inspector > .json-inspector__leaf_root > .json-inspector__line > .json-inspector__key {
179      display: none;
180    }
181
182    & .json-inspector .json-inspector__line {
183      display: block;
184      position: relative;
185      cursor: default;
186    }
187
188    & .json-inspector .json-inspector__line::after {
189      content: '';
190      position: absolute;
191      top: 0;
192      left: -200px;
193      right: -50px;
194      bottom: 0;
195      z-index: -1;
196      pointer-events: none;
197    }
198
199    & .json-inspector .json-inspector__line:hover::after {
200      background: var(--card-code-bg-color);
201    }
202
203    & .json-inspector .json-inspector__leaf_composite > .json-inspector__line {
204      cursor: pointer;
205    }
206
207    & .json-inspector .json-inspector__leaf_composite > .json-inspector__line::before {
208      content: '▸ ';
209      margin-left: calc(0 - ${(0,a.D0)(i[4])} + 3px);
210      font-size: ${n.code.sizes[1].fontSize}px;
211      line-height: ${n.code.sizes[1].lineHeight}px;
212    }
213
214    &
215      .json-inspector
216      .json-inspector__leaf_expanded.json-inspector__leaf_composite
217      > .json-inspector__line::before {
218      content: '▾ ';
219      font-size: ${n.code.sizes[1].fontSize}px;
220      line-height: ${n.code.sizes[1].lineHeight}px;
221    }
222
223    & .json-inspector .json-inspector__radio,
224    & .json-inspector .json-inspector__flatpath {
225      display: none;
226    }
227
228    & .json-inspector .json-inspector__value {
229      margin-left: ${(0,a.D0)(i[4]/2)};
230    }
231
232    &
233      .json-inspector
234      > .json-inspector__leaf_root
235      > .json-inspector__line
236      > .json-inspector__key
237      + .json-inspector__value {
238      margin: 0;
239    }
240
241    & .json-inspector .json-inspector__key {
242      color: ${t.syntax.property};
243    }
244
245    & .json-inspector .json-inspector__value_helper,
246    & .json-inspector .json-inspector__value_null {
247      color: ${t.syntax.constant};
248    }
249
250    & .json-inspector .json-inspector__not-found {
251      padding-top: ${(0,a.D0)(i[3])};
252    }
253
254    & .json-inspector .json-inspector__value_string {
255      color: ${t.syntax.string};
256    }
257
258    & .json-inspector .json-inspector__value_boolean {
259      color: ${t.syntax.boolean};
260    }
261
262    & .json-inspector .json-inspector__value_number {
263      color: ${t.syntax.number};
264    }
265
266    & .json-inspector .json-inspector__show-original {
267      display: inline-block;
268      padding: 0 6px;
269      cursor: pointer;
270    }
271
272    & .json-inspector .json-inspector__show-original:hover {
273      color: inherit;
274    }
275
276    & .json-inspector .json-inspector__show-original::before {
277      content: '↔';
278    }
279
280    & .json-inspector .json-inspector__show-original:hover::after {
281      content: ' expand';
282    }
283  `});function nr(e){let t,n,i,l=(0,s.c)(8),{onChange:d,query:c}=e;l[0]!==d?(t=e=>d(e.target.value),l[0]=d,l[1]=t):t=l[1];let u=t,{t:m}=(0,h.Bdt)(r.Z7);l[2]!==m?(n=m("document-inspector.search.placeholder"),l[2]=m,l[3]=n):n=l[3];let f=c||"";return l[4]!==u||l[5]!==n||l[6]!==f?(i=(0,o.jsx)(a.ks,{icon:p.WIv,onChange:u,placeholder:n,radius:2,value:f}),l[4]=u,l[5]=n,l[6]=f,l[7]=i):i=l[7],i}function nl(e){let t,n,i,c,u,p,m,f,x,g,b,y,j,v,_,w,S=(0,s.c)(49),{value:
283I}=e,{onInspectClose:k,paneKey:E}=tM(),C=`${E}_inspect_`,[z,T]=t4("inspect-view-mode",null,"parsed");S[0]!==z?(t=t7.find(e=>e.id===z),S[0]=z,S[1]=t):t=S[1];let P=t;S[2]!==T?(n=async()=>{await T(t5.id)},S[2]=T,S[3]=n):n=S[3];let A=n;S[4]!==T?(i=async()=>{await T(t6.id)},S[4]=T,S[5]=i):i=S[5];let R=i,{t:D}=(0,h.Bdt)(r.Z7),$=`${C}dialog`;S[6]!==D||S[7]!==I?(c=(0,h.u4i)(I)&&(0,h.KgX)(I._id)&&(0,h.KgX)(I._type)?(0,o.jsx)(h.HTc,{t:D,i18nKey:"document-inspector.dialog.title",components:{DocumentTitle:()=>(0,o.jsx)("em",{children:(0,o.jsx)(lH,{document:I})})}}):(0,o.jsx)("em",{children:D("document-inspector.dialog.title-no-value")}),S[6]=D,S[7]=I,S[8]=c):c=S[8],S[9]===Symbol.for("react.memo_cache_sentinel")?(u={position:"sticky",bottom:0,zIndex:3},S[9]=u):u=S[9];let B=`${C}tabpanel`,Y=`${C}tab-${t5.id}`;S[10]!==D?(p=D(t5.title),S[10]=D,S[11]=p):p=S[11];let M=P===t5;S[12]!==A||S[13]!==B||S[14]!==Y||S[15]!==p||S[16]!==M?(m=(0,o.jsx)(l.oz,{"aria-controls":B,id:Y,label:p,onClick:A,selected:M}),S[12]=A,S[13]=B,S[14]=Y,S[15]=p,S[16]=M,S[17]=m):m=S[17];let L=`${C}tabpanel`,O=`${C}tab-${t6.id}`;S[18]!==D?(f=D(t6.title),S[18]=D,S[19]=f):f=S[19];let H=P===t6;S[20]!==R||S[21]!==L||S[22]!==O||S[23]!==f||S[24]!==H?(x=(0,o.jsx)(l.oz,{"aria-controls":L,id:O,label:f,onClick:R,selected:H}),S[20]=R,S[21]=L,S[22]=O,S[23]=f,S[24]=H,S[25]=x):x=S[25],S[26]!==m||S[27]!==x?(g=(0,o.jsx)(a.Zp,{padding:3,paddingTop:0,shadow:1,style:u,children:(0,o.jsxs)(a.wb,{space:1,children:[m,x]})}),S[26]=m,S[27]=x,S[28]=g):g=S[28];let V=`${C}tab-${z}`,Z=`${C}tabpanel`;return S[29]===Symbol.for("react.memo_cache_sentinel")?(b={outline:"none"},S[29]=b):b=S[29],S[30]!==I||S[31]!==P?(y=P===t5&&(0,o.jsx)(ni,{children:(0,o.jsx)(eb.A,{data:I,isExpanded:function e(t,n){let i=t8.get(t);return void 0===i?(t8.set(t,Array.isArray(n)||(0,h.u4i)(n)),e(t,n)):i},onClick:t9,search:nr,filterOptions:{ignoreCase:!0}})}),S[30]=I,S[31]=P,S[32]=y):y=S[32],S[33]!==I||S[34]!==P?(j=P===t6&&(0,o.jsx)(a.Cy,{language:"json",tabIndex:0,onKeyDown:nn,onDoubleClick:nt,size:1,children:JSON.stringify(I,null,2)}),S[33]=I,S[34]=P,S[35]=j):j=S[35],S[36]!==V||S[37]!==Z||S[38]!==y||S[39]!==j?(v=(0,o.jsxs)(d.Kp,{"aria-labelledby":V,flex:1,id:Z,overflow:"auto",padding:4,style:b,children:[y,j]}),S[36]=V,S[37]=Z,S[38]=y,S[39]=j,S[40]=v):v=S[40],S[41]!==g||S[42]!==v?(_=(0,o.jsxs)(a.so,{direction:"column",height:"fill",children:[g,v]}),S[41]=g,S[42]=v,S[43]=_):_=S[43],S[44]!==k||S[45]!==_||S[46]!==$||S[47]!==c?(w=(0,o.jsx)(l.lG,{bodyHeight:"fill",id:$,header:c,onClose:k,onClickOutside:k,padding:!1,width:2,children:_}),S[44]=k,S[45]=_,S[46]=$,S[47]=c,S[48]=w):w=S[48],w}function no(e){let t,n,i,r,d,c,u,p,m,h,f,x=(0,s.c)(22);x[0]!==e?({action:n,content:i,icon:t,tone:d,paddingY:c,...r}=e,x[0]=e,x[1]=t,x[2]=n,x[3]=i,x[4]=r,x[5]=d,x[6]=c):(t=x[1],n=x[2],i=x[3],r=x[4],d=x[5],c=x[6]);let g=void 0===d?"transparent":d,b=void 0===c?2:c;return x[7]!==t?(u=t&&(0,o.jsx)(a.EY,{size:0,children:(0,o.jsx)(t,{})}),x[7]=t,x[8]=u):u=x[8],x[9]!==i?(p=(0,o.jsx)(a.so,{align:"center",flex:1,gap:2,paddingY:2,children:i}),x[9]=i,x[10]=p):p=x[10],x[11]!==n?(m=n&&(0,o.jsx)(l.$n,{...n,mode:n.mode||"ghost",tone:n.tone||"default"}),x[11]=n,x[12]=m):m=x[12],x[13]!==u||x[14]!==p||x[15]!==m?(h=(0,o.jsxs)(a.so,{align:"center",gap:3,paddingX:2,children:[u,p,m]}),x[13]=u,x[14]=p,x[15]=m,x[16]=h):h=x[16],x[17]!==b||x[18]!==r||x[19]!==h||x[20]!==g?(f=(0,o.jsx)(a.az,{padding:1,children:(0,o.jsx)(a.Zp,{radius:3,paddingX:2,paddingY:b,tone:g,...r,children:h})}),x[17]=b,x[18]=r,x[19]=h,x[20]=g,x[21]=f):f=x[21],f}function ns(){let e=(0,s.c)(3),{isDeleted:t,isDeleting:n,ready:i}=tM(),{selectedPerspective:r}=(0,h.QO2)();if(!i)return null;if(!(0,h.xo4)(r)&&!(0,h.o2j)(r)&&"archived"===r.state){let t;return e[0]!==r?(t=(0,o.jsx)(nd,{release:r}),e[0]=r,e[1]=t):t=e[1],t}if(t&&!n){let t;return e[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsx)(na,{}),e[2]=t):t=e[2],t}}function na(){let e,t,n,i,l,d,c=(0,s.c)(17),{documentId:u,documentType:m}=tM(),{restore:f}=(0,h.QSs)(u,m),{navigateIntent:x}=(0,_.rd)();c[0]!==u||c[1]!==m||c[2]!==x||c[3]!==f?(e=()=>{f.execute("lastRevision"),x("edit",{id:u,type:m})},c[0]=u,c[1]=m,c[2]=x,c[3]=f,c[4]=e):e=c[4];let g=e,{t:b}=(0,h.Bdt)(r.Z7);return c[5]!==b?(t=b("banners.deleted-document-banner.restore-button.text"),c[5]=b,c[6]=t):t=c[6],c[7]!==g||c[8]!==t?(n={onClick:g,text:t},c[7]=g,c[8]=t,c[9]=n):n=c[9],c[10]!==b?(i=b("banners.deleted-document-banner.text"),c[10]=b,c[11]=i):i=c[11],c[12]!==i?(l=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:i}),c[12]=i,c[13]=l):l=c[13],c[14]!==n||c[15]!==l?(d=(0,o.jsx)(no,{action:n,content:l,"data-testid":"deleted-document-banner",icon:p.Eoh}),c[14]=n,c[15]=l,c[16]=d):d=c[16],d}let nd=e=>{let t,n,i,r=(0,s.c)(8),{release:l}=e,{t:d}=(0,h.Bdt)();return r[0]!==l.metadata?.title||r[1]!==d?(t=l.metadata?.title||d("release.placeholder-untitled-release"),r[0]=l.metadata?.title,r[1]=d,r[2]=t):t=r[2],r[3]!==t?(n={title:t},r[3]=t,r[4]=n):n=r[4],r[5]!==d||r[6]!==n?(i=(0,o.jsx)(no,{tone:"caution",content:(0,o.jsx)(a.EY,{size:1,weight:"medium",children:(0,o.jsx)(h.HTc,{t:d,i18nKey:"banners.deleted-release-banner.text",values:n})}),"data-testid":"deleted-release-banner",icon:p.tkA}),r[5]=d,r[6]=n,r[7]=i):i=r[7],i};function nc(){let e,t,n=(0,s.c)(5),{schemaType:i}=tM(),{t:l}=(0,h.Bdt)(r.Z7);return(0,f.fq)(i)?(n[0]!==l?(e=(0,o.jsx)(h.HTc,{t:l,i18nKey:"banners.deprecated-document-type-banner.text"}),n[0]=l,n[1]=e):e=n[1],n[2]!==i.deprecated.reason||n[3]!==e?(t=(0,o.jsx)(no,{content:(0,o.jsxs)(a.EY,{size:1,weight:"medium",children:[e," ",i.deprecated.reason]}),"data-testid":"deprecated-document-type-banner",icon:p.YZv}),n[2]=i.deprecated.reason,n[3]=e,n[4]=t):t=n[4],t):null}let nu=(0,em.g_)({name:"Ask To Edit Dialog Opened",version:1,description:'User clicked the "Ask to edit" button in the document permissions banner'}),np=(0,em.g_)({name:"Ask To Edit Request Sent",version:1,description:"User sent a role change request from the dialog"}),nm=(0,g.I4)(a.az)`
284  box-sizing: border-box;
285`;function nh(e){let t,n,i,u,p,m,f,x,g,b,y,j,_,w,S,I=(0,s.c)(56),{onClose:k,onRequestSubmitted:E}=e,{t:P}=(0,h.Bdt)(r.Z7),A=(0,ec.Jr)(),R=`request-permissions-${(0,c.useId)()}`,D=(0,h.M91)();I[0]===Symbol.for("react.memo_cache_sentinel")?(t={apiVersion:"2024-09-26"},I[0]=t):t=I[0];let $=(0,h.tH7)(t),B=(0,d.dj)(),Y=(0,h.YKH)(),[M,L]=(0,c.useState)(!1),[O,H]=(0,c.useState)(""),[V,Z]=(0,c.useState)(),[
285K,F]=(0,c.useState)(!1),[W,J]=(0,c.useState)(!1);e:{let e,t="administrator";if(!D||!$){let e;I[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,N.of)(t),I[1]=e):e=I[1],n=e;break e}if(I[2]!==$.observable||I[3]!==D){let n,i;I[5]===Symbol.for("react.memo_cache_sentinel")?(n=e=>e.filter(nx).find(nf)?"editor":t,I[5]=n):n=I[5],I[6]===Symbol.for("react.memo_cache_sentinel")?(i=()=>(0,N.of)(t),I[6]=i):i=I[6],e=$.observable.request({url:`/projects/${D}/roles`}).pipe((0,C.T)(n),(0,T.Z)(t),(0,z.W)(i)),I[2]=$.observable,I[3]=D,I[4]=e}else e=I[4];n=e}let U=(0,v.J)(n);I[7]!==$||I[8]!==O||I[9]!==E||I[10]!==D||I[11]!==U||I[12]!==A||I[13]!==B?(i=()=>{L(!0),$.request({url:`/access/project/${D}/requests`,method:"post",body:{note:O,requestUrl:window?.location.href,requestedRole:U,type:"role"}}).then(e=>{e&&(E&&E(),A.log(np),B.push({title:"Edit access requested"}))}).catch(e=>{let t=e?.response?.statusCode,n=e?.response?.body?.message;429===t&&(F(!0),Z(n)),409===t?(J(!0),Z(n)):B.push({title:"There was a problem submitting your request.",status:"error"})}).finally(()=>{L(!1)})},I[7]=$,I[8]=O,I[9]=E,I[10]=D,I[11]=U,I[12]=A,I[13]=B,I[14]=i):i=I[14];let G=i,Q=Y.fullscreen;I[15]!==P?(u=P("request-permission-dialog.header.text"),I[15]=P,I[16]=u):u=I[16],I[17]!==P?(p=P("confirm-dialog.cancel-button.fallback-text"),I[17]=P,I[18]=p):p=I[18],I[19]!==k||I[20]!==p?(m={onClick:k,text:p},I[19]=k,I[20]=p,I[21]=m):m=I[21];let q=K||W;return I[22]!==P?(f=P("request-permission-dialog.confirm-button.text"),I[22]=P,I[23]=f):f=I[23],I[24]!==M||I[25]!==G||I[26]!==q||I[27]!==f?(x={onClick:G,loading:M,disabled:q,text:f,tone:"primary",type:"submit"},I[24]=M,I[25]=G,I[26]=q,I[27]=f,I[28]=x):x=I[28],I[29]!==x||I[30]!==m?(g={cancelButton:m,confirmButton:x},I[29]=x,I[30]=m,I[31]=g):g=I[31],I[32]!==P?(b=P("request-permission-dialog.description.text"),I[32]=P,I[33]=b):b=I[33],I[34]!==b?(y=(0,o.jsx)(a.EY,{children:b}),I[34]=b,I[35]=y):y=I[35],I[36]!==W||I[37]!==K||I[38]!==M||I[39]!==V||I[40]!==O||I[41]!==G||I[42]!==P?(j=K||W?(0,o.jsx)(a.Zp,{tone:"caution",padding:3,radius:2,shadow:1,children:(0,o.jsxs)(a.EY,{size:1,children:[K&&(0,o.jsx)(o.Fragment,{children:V??P("request-permission-dialog.warning.limit-reached.text")}),W&&(0,o.jsx)(o.Fragment,{children:V??P("request-permission-dialog.warning.denied.text")})]})}):(0,o.jsxs)(a.BJ,{space:3,paddingBottom:0,children:[(0,o.jsx)(a.ks,{placeholder:P("request-permission-dialog.note-input.placeholder.text"),disabled:M,onKeyDown:e=>{"Enter"===e.key&&G()},maxLength:150,value:O,onChange:e=>{H(e.currentTarget.value)}}),(0,o.jsx)(a.EY,{align:"right",muted:!0,size:1,children:`${O.length}/150`})]}),I[36]=W,I[37]=K,I[38]=M,I[39]=V,I[40]=O,I[41]=G,I[42]=P,I[43]=j):j=I[43],I[44]!==y||I[45]!==j?(_=(0,o.jsx)(nm,{children:(0,o.jsxs)(a.BJ,{space:4,children:[y,j]})}),I[44]=y,I[45]=j,I[46]=_):_=I[46],I[47]!==R||I[48]!==k||I[49]!==g||I[50]!==_||I[51]!==u?(w=(0,o.jsx)(l.lG,{width:1,id:R,header:u,footer:g,onClose:k,onClickOutside:k,children:_}),I[47]=R,I[48]=k,I[49]=g,I[50]=_,I[51]=u,I[52]=w):w=I[52],I[53]!==w||I[54]!==Y.fullscreen?(S=(0,o.jsx)(d.Co,{position:"fixed",zOffset:Q,children:w}),I[53]=w,I[54]=Y.fullscreen,I[55]=S):S=I[55],S}function nf(e){return"editor"===e.name}function nx(e){return e?.appliesToUsers}(0,g.I4)(a.so).attrs({align:"center",direction:"column",justify:"center"})`
286  height: 110px;
287`;let ng={loading:!0,error:!1,status:void 0},nb={loading:!1,error:!1,status:"none"},ny={loading:!1,error:!1,status:"declined"},nj={loading:!1,error:!1,status:"pending"},nv={loading:!1,error:!1,status:"expired"};function n_(e){let t,n,i,l,d,u,m,f,x=(0,s.c)(29),{requiredPermission:g}=e,b=(0,h.iZK)(),{data:y,loading:j,error:_}=(()=>{let e,t,n,i=(0,s.c)(9);i[0]===Symbol.for("react.memo_cache_sentinel")?(e={apiVersion:"2024-07-01"},i[0]=e):e=i[0];let r=(0,h.tH7)(e),l=(0,h.M91)();e:{var o,a;let e;if(!r||!l){let e;i[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,N.of)(nb),i[1]=e):e=i[1],t=e;break e}i[2]!==r||i[3]!==l?(o=r,a=l,e=o.observable.request({url:"/access/requests/me",tag:"use-role-requests-status"}).pipe((0,C.T)(e=>{if(!e||0===e.length)return nb;let t=e.filter(e=>e.resourceId===a&&"role"===e.type),n=t.find(e=>"declined"===e.status);return n&&(0,ej.d)((0,ev.J)(new Date(n.createdAt),2),new Date)?ny:t.find(e=>"pending"===e.status&&(0,ej.d)((0,ev.J)(new Date(e.createdAt),2),new Date))?nj:t.find(e=>"pending"===e.status&&(0,e_.Y)((0,ev.J)(new Date(e.createdAt),2),new Date))?nv:nb}),(0,z.W)(e=>(console.error("Failed to fetch access requests",e),(0,N.of)({loading:!1,error:!0,status:void 0}))),(0,T.Z)(ng)),i[2]=r,i[3]=l,i[4]=e):e=i[4],t=e}let d=t,{loading:c,error:u,status:p}=(0,v.J)(d,ng);
287return i[5]!==u||i[6]!==c||i[7]!==p?(n={data:p,loading:c,error:u},i[5]=u,i[6]=c,i[7]=p,i[8]=n):n=i[8],n})(),[w,S]=(0,c.useState)(!1),I="pending"===y||"declined"===y||w,k=b?.roles||[],E=1===k.length&&"viewer"===k[0].name,[P,A]=(0,c.useState)(!1);x[0]===Symbol.for("react.memo_cache_sentinel")?(t={style:"short"},x[0]=t):t=x[0];let R=(0,h.FfM)(t),{t:D}=(0,h.Bdt)(r.Z7),$=(0,ec.Jr)(),B=k.map(nS),Y=R.formatToParts(B).map(nw);return x[1]!==Y?(n={Roles:()=>(0,o.jsx)(o.Fragment,{children:Y})},x[1]=Y,x[2]=n):n=x[2],x[3]!==B||x[4]!==Y.length?(i={count:Y.length,roles:B},x[3]=B,x[4]=Y.length,x[5]=i):i=x[5],x[6]!==g||x[7]!==D||x[8]!==n||x[9]!==i?(l=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:(0,o.jsx)(h.HTc,{t:D,i18nKey:"banners.permission-check-banner.missing-permission",components:n,values:i,context:g})}),x[6]=g,x[7]=D,x[8]=n,x[9]=i,x[10]=l):l=x[10],x[11]!==E||x[12]!==I||x[13]!==_||x[14]!==j||x[15]!==y||x[16]!==A||x[17]!==D||x[18]!==$?(d=E&&y&&!_&&!j?{onClick:I?void 0:()=>{A(!0),$.log(nu)},text:D(I?"banners.permission-check-banner.request-permission-button.sent":"banners.permission-check-banner.request-permission-button.text"),tone:I?"default":"primary",disabled:I,mode:I?"bleed":void 0}:void 0,x[11]=E,x[12]=I,x[13]=_,x[14]=j,x[15]=y,x[16]=A,x[17]=D,x[18]=$,x[19]=d):d=x[19],x[20]!==l||x[21]!==d?(u=(0,o.jsx)(no,{content:l,action:d,"data-testid":"permission-check-banner",icon:p.Eoh}),x[20]=l,x[21]=d,x[22]=u):u=x[22],x[23]!==A||x[24]!==P?(m=P&&(0,o.jsx)(nh,{onClose:()=>A(!1),onRequestSubmitted:()=>{S(!0),A(!1)}}),x[23]=A,x[24]=P,x[25]=m):m=x[25],x[26]!==u||x[27]!==m?(f=(0,o.jsxs)(o.Fragment,{children:[u,m]}),x[26]=u,x[27]=m,x[28]=f):f=x[28],f}function nw(e){return"element"===e.type?(0,o.jsx)("code",{children:e.value},e.value):e.value}function nS(e){return e.title}let nI=(0,c.memo)(()=>{let e,t,n,i,l,d,c,u,f=(0,s.c)(30),x=(0,h.yKO)(),{selectedReleaseId:g}=(0,h.QO2)(),{params:b,groupIndex:y,routerPanesState:j,replaceCurrent:_,BackLink:w}=nC(),S=j[y]?.[0].id,I=j[y-1]?.[0],k=I?.id,E=!!I?.params?.rev;f[0]!==b?(e=b?.parentRefPath&&(0,eo.sH)(b.parentRefPath)||null,f[0]=b,f[1]=e):e=f[1];let z=e,{t:T}=(0,h.Bdt)(r.Z7);e:{let e,n=z?.[0];if(!k||!n||!z){let e;f[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,N.of)({loading:!1}),f[2]=e):e=f[2],t=e;break e}if(f[3]!==x||f[4]!==k||f[5]!==z||f[6]!==n||f[7]!==g){let t,i=(0,m.IM)(k),r=(0,eo.sH)(n),l=r.findIndex(nk);f[9]!==z?(t=e=>{let{draft:t,published:n,version:i}=e;return{loading:!1,result:{availability:{draft:t.availability,published:n.availability,...i?.availability?{version:i.availability}:{}},refValue:(0,eo.Jt)(i?.snapshot||t.snapshot||n.snapshot,z)?._ref}}},f[9]=z,f[10]=t):t=f[10],e=(0,F.x)((0,N.of)({loading:!0}),x.unstable_observePathsDocumentPair(i,-1===l?r:r.slice(0,l),{version:g}).pipe((0,P.B)(750),(0,C.T)(t))),f[3]=x,f[4]=k,f[5]=z,f[6]=n,f[7]=g,f[8]=e}else e=f[8];t=e}let A=t;f[11]===Symbol.for("react.memo_cache_sentinel")?(n={loading:!0},f[11]=n):n=f[11];let R=(0,v.J)(A,n);f[12]!==b||f[13]!==R.loading||f[14]!==R.result||f[15]!==_?(i=()=>{R.loading||R.result?.refValue&&_({id:R.result.refValue,params:b})},f[12]=b,f[13]=R.loading,f[14]=R.result,f[15]=_,f[16]=i):i=f[16];let D=i;return k&&z&&!E&&!R.loading&&(R.result?.availability.draft.available||R.result?.availability.published.available)&&R.result?.refValue!==S?(f[17]!==w||f[18]!==D||f[19]!==R.result?.refValue||f[20]!==T?(l=R.result?.refValue?{onClick:D,icon:p.Fjq,text:T("banners.reference-changed-banner.reason-changed.reload-button.text")}:{as:w,icon:p.USm,text:T("banners.reference-changed-banner.reason-removed.close-button.text")},f[17]=w,f[18]=D,f[19]=R.result?.refValue,f[20]=T,f[21]=l):l=f[21],f[22]!==R.result?.refValue||f[23]!==T?(d=T(R.result?.refValue?"banners.reference-changed-banner.reason-changed.text":"banners.reference-changed-banner.reason-removed.text"),f[22]=R.result?.refValue,f[23]=T,f[24]=d):d=f[24],f[25]!==d?(c=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:d}),f[25]=d,f[26]=c):c=f[26],f[27]!==l||f[28]!==c?(u=(0,o.jsx)(no,{action:l,"data-testid":"reference-changed-banner",content:c,icon:p.sAQ,tone:"caution"}),f[27]=l,f[28]=c,f[29]=u):u=f[29],u):null});function nk(e){return"object"==typeof e&&"_key"in e}function nE(){let e,t=(0,s.c)(2),{t:n}=(0,h.Bdt)(r.Z7);return t[0]!==n?(e=(0,o.jsx)(no,{tone:"caution",icon:p.sAQ,content:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{t:n,i18nKey:"banners.scheduled-draft-override-banner.text"})})}),t[0]=n,t[1]=e):e=t[1],e}function nC(){return(0,c.useContext)(u.l4)}
287function nz(){let e,t,n,i,l,d,c,u,p,m,f=(0,s.c)(28),{t:x}=(0,h.Bdt)(r.Z7),{t:g}=(0,h.Bdt)(),{data:b}=(0,h.gJZ)(),{params:y,setParams:j}=nC();f[0]!==y||f[1]!==j?(e=()=>{j({...y,rev:y?.historyEvent||void 0,since:void 0,historyVersion:void 0})},f[0]=y,f[1]=j,f[2]=e):e=f[2];let v=e;if(f[3]!==b||f[4]!==y?.historyVersion){let e;f[6]!==y?.historyVersion?(e=e=>(0,h._hI)(e._id)===y?.historyVersion,f[6]=y?.historyVersion,f[7]=e):e=f[7],t=b.find(e),f[3]=b,f[4]=y?.historyVersion,f[5]=t}else t=f[5];let _=t;e:{if(_?.state==="published"){n="banners.published-release.description";break e}if(_&&(0,h._9c)(_)){n="banners.archived-scheduled-draft.description";break e}n="banners.archived-release.description"}let w=n;f[8]!==_?.metadata.title||f[9]!==g?(i=_?.metadata.title||g("release.placeholder-untitled-release"),f[8]=_?.metadata.title,f[9]=g,f[10]=i):i=f[10];let S=i;return f[11]!==S?(l={title:S},f[11]=S,f[12]=l):l=f[12],f[13]!==_?(d=(0,h.bSq)(_),f[13]=_,f[14]=d):d=f[14],f[15]!==d?(c={VersionBadge:d},f[15]=d,f[16]=c):c=f[16],f[17]!==w||f[18]!==x||f[19]!==l||f[20]!==c?(u=(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{t:x,i18nKey:w,values:l,components:c})}),f[17]=w,f[18]=x,f[19]=l,f[20]=c,f[21]=u):u=f[21],f[22]!==v||f[23]!==y?.archivedRelease?(p=y?.archivedRelease?void 0:{text:"Go back to published version",onClick:v},f[22]=v,f[23]=y?.archivedRelease,f[24]=p):p=f[24],f[25]!==u||f[26]!==p?(m=(0,o.jsx)(no,{tone:"caution",content:u,action:p}),f[25]=u,f[26]=p,f[27]=m):m=f[27],m}nI.displayName="Memo(ReferenceChangedBanner)";let nT=g.I4.img`
288  object-fit: cover;
289  width: 100%;
290  height: 100%;
291  height: 180px;
292  display: flex;
293`,nP=e=>{let t,n,i,d,u,m,f,x,g,b,y,j,v=(0,s.c)(24),{onClose:_,isLockedByCanvas:w}=e,{t:S}=(0,h.Bdt)(r.Z7),I=(0,c.useRef)(null);v[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>[I.current],v[0]=t):t=v[0],(0,a.PR)(_,t),v[1]!==w||v[2]!==S?(n=S(w?"canvas.banner.popover-heading":"canvas.banner.editable.popover-heading"),v[1]=w,v[2]=S,v[3]=n):n=v[3];let k=n;v[4]!==w||v[5]!==S?(i=S(w?"canvas.banner.popover-description":"canvas.banner.editable.popover-description"),v[4]=w,v[5]=S,v[6]=i):i=v[6];let E=i;return v[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,o.jsx)(nT,{src:"https://cdn.sanity.io/images/pyrmmpch/production/b47224e2f3a7d1747e43b9da1ac31739250e628b-632x376.png",alt:"Canvas"}),v[7]=d):d=v[7],v[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)(a.EY,{size:1,weight:"semibold",children:"Canvas"}),v[8]=u):u=v[8],v[9]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsxs)(a.so,{paddingY:1,gap:2,children:[u,(0,o.jsx)(a.EY,{size:1,muted:!0,children:(0,o.jsx)(p.v5M,{})})]}),v[9]=m):m=v[9],v[10]!==k?(f=(0,o.jsx)(a.az,{paddingTop:3,children:(0,o.jsx)(a.DZ,{size:1,children:k})}),v[10]=k,v[11]=f):f=v[11],v[12]!==E?(x=(0,o.jsx)(a.az,{paddingTop:4,children:(0,o.jsx)(a.EY,{size:1,children:E})}),v[12]=E,v[13]=x):x=v[13],v[14]!==f||v[15]!==x?(g=(0,o.jsxs)(a.so,{paddingX:4,paddingBottom:4,paddingTop:3,direction:"column",children:[m,f,x]}),v[14]=f,v[15]=x,v[16]=g):g=v[16],v[17]!==S?(b=S("canvas.banner.popover-button-text"),v[17]=S,v[18]=b):b=v[18],v[19]!==b?(y=(0,o.jsx)(a.so,{width:"full",gap:3,justify:"flex-end",paddingX:4,paddingBottom:4,children:(0,o.jsx)(l.$n,{mode:"bleed",text:b,autoFocus:!0,tone:"primary",href:"https://snty.link/canvas-docs",target:"_blank",rel:"noopener noreferrer",as:"a",iconRight:p.ZPM})}),v[19]=b,v[20]=y):y=v[20],v[21]!==y||v[22]!==g?(j=(0,o.jsx)(a.Zp,{radius:3,overflow:"hidden",width:0,ref:I,children:(0,o.jsxs)(a.mc,{width:0,children:[d,g,y]})}),v[21]=y,v[22]=g,v[23]=j):j=v[23],j},nA=e=>{let t,n,i,d,u,m,f,x,g=(0,s.c)(21),{documentId:b}=e,{t:y}=(0,h.Bdt)(r.Z7),[j,v]=(0,c.useState)(!1),_=(0,h.tfA)(b),{isLockedByCanvas:w}=(0,h.G2c)(b);e:{let e;if(!w){let e;g[0]!==y?(e=y("canvas.banner.editable.linked-text"),g[0]=y,g[1]=e):e=g[1],t=e;break e}if("published"===_){let e;g[2]!==y?(e=y("canvas.banner.linked-text.published"),g[2]=y,g[3]=e):e=g[3],t=e;break e}if("draft"===_){let e;g[4]!==y?(e=y("canvas.banner.linked-text.draft"),g[4]=y,g[5]=e):e=g[5],t=e;break e}g[6]!==y?(e=y("canvas.banner.linked-text.version"),g[6]=y,g[7]=e):e
293=g[7],t=e}let S=t;g[8]===Symbol.for("react.memo_cache_sentinel")?(n=()=>v(nD),g[8]=n):n=g[8];let I=n;g[9]===Symbol.for("react.memo_cache_sentinel")?(i=()=>v(!1),g[9]=i):i=g[9];let k=i;return g[10]!==S?(d=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:S}),g[10]=S,g[11]=d):d=g[11],g[12]!==w?(u=(0,o.jsx)(nP,{onClose:k,isLockedByCanvas:w}),g[12]=w,g[13]=u):u=g[13],g[14]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsx)(l.$n,{tooltipProps:null,mode:"bleed",tone:"default",icon:p.YzR,onClick:I}),g[14]=m):m=g[14],g[15]!==j||g[16]!==u?(f=(0,o.jsx)(l.AM,{open:j,size:0,tone:"default",portal:!0,placement:"bottom-start",content:u,children:m}),g[15]=j,g[16]=u,g[17]=f):f=g[17],g[18]!==d||g[19]!==f?(x=(0,o.jsxs)(a.so,{align:"center",gap:2,children:[d,f]}),g[18]=d,g[19]=f,g[20]=x):x=g[20],x};function nR(){let e,t,n,i,l=(0,s.c)(10),{documentId:a,displayed:d}=tM(),{t:c}=(0,h.Bdt)(r.Z7),u=d?._id||a,{companionDoc:p}=(0,h.G2c)(u),m=(0,h.aqr)(p?.canvasDocumentId,"banner");return p?(l[0]!==u?(e=(0,o.jsx)(nA,{documentId:u}),l[0]=u,l[1]=e):e=l[1],l[2]!==c?(t=c("canvas.banner.edit-in-canvas-action"),l[2]=c,l[3]=t):t=l[3],l[4]!==m||l[5]!==t?(n={mode:"ghost",text:t,onClick:m},l[4]=m,l[5]=t,l[6]=n):n=l[6],l[7]!==e||l[8]!==n?(i=(0,o.jsx)(no,{tone:"neutral","data-test-id":"canvas-linked-banner",paddingY:0,content:e,action:n}),l[7]=e,l[8]=n,l[9]=i):i=l[9],i):null}function nD(e){return!e}let n$=e=>{let t,n,i,l,d,c,u,m,f,x=(0,s.c)(27),{schemaType:g,selectedPerspective:b,reason:y}=e,{t:j}=(0,h.Bdt)(r.Z7),{document:v}=(0,h.hA9)(),{drafts:_}=v,{enabled:w}=_;x[0]!==w||x[1]!==g?(t=e=>{let{perspective:t}=e;return{disabled:!(0,h.CW3)({selectedPerspective:t,isDraftModelEnabled:w,schemaType:g}).result}},x[0]=w,x[1]=g,x[2]=t):t=x[2];let S=t;return x[3]!==y||x[4]!==j?(n="PUBLISHED_NOT_WRITEABLE"===y&&j("banners.choose-new-document-destination.cannot-create-published-document"),x[3]=y,x[4]=j,x[5]=n):n=x[5],x[6]!==y||x[7]!==j?(i="DRAFTS_NOT_WRITEABLE"===y&&j("banners.choose-new-document-destination.cannot-create-draft-document"),x[6]=y,x[7]=j,x[8]=i):i=x[8],x[9]!==y||x[10]!==b||x[11]!==j?(l="RELEASE_NOT_ACTIVE"===y&&(0,h.Jrl)(b)&&(0,o.jsx)(h.HTc,{t:j,i18nKey:"banners.choose-new-document-destination.release-inactive",values:{title:b.metadata.title},components:{VersionBadge:(0,h.bSq)(b)}}),x[9]=y,x[10]=b,x[11]=j,x[12]=l):l=x[12],x[13]!==j?(d=j("banners.choose-new-document-destination.choose-destination"),x[13]=j,x[14]=d):d=x[14],x[15]!==d?(c=(0,o.jsxs)(o.Fragment,{children:[" ",d]}),x[15]=d,x[16]=c):c=x[16],x[17]!==n||x[18]!==i||x[19]!==l||x[20]!==c?(u=(0,o.jsxs)(a.EY,{size:1,children:[n,i,l,c]}),x[17]=n,x[18]=i,x[19]=l,x[20]=c,x[21]=u):u=x[21],x[22]!==S?(m=(0,o.jsx)(h.GCV,{menuItemProps:S}),x[22]=S,x[23]=m):m=x[23],x[24]!==m||x[25]!==u?(f=(0,o.jsx)(no,{tone:"caution",icon:p.sAQ,content:(0,o.jsxs)(a.so,{align:"center",gap:2,children:[u,m]})}),x[24]=m,x[25]=u,x[26]=f):f=x[26],f};function nB(){let e,t,n=(0,s.c)(5),{value:i}=tM(),{documentLinkedBannerContent:r}=(0,h.eaL)().components??{};n[0]!==i?(e=(0,h.G_3)(i),n[0]=i,n[1]=e):e=n[1];let l=e;return r&&l?(n[2]!==r||n[3]!==l?(t=(0,o.jsx)(no,{tone:"transparent","data-test-id":"sanity-create-read-only-banner",content:(0,o.jsx)(r,{metadata:l})}),n[2]=r,n[3]=l,n[4]=t):t=n[4],t):null}function nY(e){let t,n,i,l,u,p,m,f,x,g,b,y,j=(0,s.c)(39),{documentId:v,currentRelease:_,isScheduledRelease:w}=e,S=_??h.k0f;j[0]!==S?(t=(0,h.Y73)(S),j[0]=S,j[1]=t):t=j[1];let I=t,{t:k}=(0,h.Bdt)(r.Z7),{t:E}=(0,h.Bdt)(),{createVersion:C}=(0,h.wI4)(),[z,T]=(0,c.useState)(),P=(0,d.dj)();j[2]!==C||j[3]!==_._id||j[4]!==v||j[5]!==k||j[6]!==P?(n=async()=>
293{if(_._id){T({status:"creating",lastUpdate:new Date});try{await C((0,h._hI)(_._id),v),T({status:"created",lastUpdate:new Date})}catch(e){P.push({status:"error",closable:!0,title:k("banners.release.error.title"),description:k("banners.release.error.description",{message:e.message})}),T(void 0)}}},j[2]=C,j[3]=_._id,j[4]=v,j[5]=k,j[6]=P,j[7]=n):n=j[7];let A=n,R=function(e){let t,n,i,r=(0,s.c)(4);r[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Date,r[0]=t):t=r[0];let[l,o]=(0,c.useState)(t);return 200!==r[1]?(n=()=>{let t=setInterval(()=>{o(new Date)},e);return()=>clearInterval(t)},i=[e],r[1]=e,r[2]=n,r[3]=i):(n=r[2],i=r[3]),(0,c.useEffect)(n,i),l}(200),D=z?.status==="created"&&R.getTime()-z.lastUpdate.getTime()>1e3;return j[8]!==k?(i=k("banners.release.waiting.title"),j[8]=k,j[9]=i):i=j[9],j[10]!==k?(l=k("banners.release.waiting.description"),j[10]=k,j[11]=l):l=j[11],j[12]!==D||j[13]!==i||j[14]!==l?(u={status:"info",id:"add-document-to-release",enabled:D,closable:!0,title:i,description:l},j[12]=D,j[13]=i,j[14]=l,j[15]=u):u=j[15],(0,h.B1J)(u),j[16]!==_.metadata?.title||j[17]!==E?(p=_?.metadata?.title||E("release.placeholder-untitled-release"),j[16]=_.metadata?.title,j[17]=E,j[18]=p):p=j[18],j[19]!==p?(m={title:p},j[19]=p,j[20]=m):m=j[20],j[21]!==_?(f=(0,h.bSq)(_),j[21]=_,j[22]=f):f=j[22],j[23]!==f?(x={VersionBadge:f},j[23]=f,j[24]=x):x=j[24],j[25]!==k||j[26]!==x||j[27]!==m?(g=(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{i18nKey:"banners.release.not-in-release",t:k,values:m,components:x})}),j[25]=k,j[26]=x,j[27]=m,j[28]=g):g=j[28],j[29]!==A||j[30]!==w||j[31]!==k||j[32]!==I||j[33]!==z?(b=w?void 0:{text:k("banners.release.action.add-to-release"),tone:I,disabled:!!z,onClick:A,mode:"default"},j[29]=A,j[30]=w,j[31]=k,j[32]=I,j[33]=z,j[34]=b):b=j[34],j[35]!==g||j[36]!==b||j[37]!==I?(y=(0,o.jsx)(no,{tone:I,content:g,action:b}),j[35]=g,j[36]=b,j[37]=I,j[38]=y):y=j[38],y}let nM=(0,em.g_)({name:"LiveEdit Draft Resolved",version:1,description:"User resolved a draft of a live edit document to continue editing"}),nL=e=>{let t,n,i,d,u,f,x,g,b,y,j,v,_,w,S,I=(0,s.c)(47),{displayed:k,documentId:E,schemaType:C,i18nKey:z,isEditBlocking:T}=e,{t:P}=(0,h.Bdt)(r.Z7),[A,R]=(0,c.useState)(!1),[D,$]=(0,c.useState)(!1),B=(0,ec.Jr)(),{publish:Y,discardChanges:M}=(0,h.QSs)(E,k?._type||"");I[0]!==Y||I[1]!==B?(t=()=>{Y.execute(),R(!0),B.log(nM,{liveEditResolveType:"publish"})},I[0]=Y,I[1]=B,I[2]=t):t=I[2];let L=t;I[3]!==M||I[4]!==B?(n=()=>{M.execute(),$(!0),B.log(nM,{liveEditResolveType:"discard"})},I[3]=M,I[4]=B,I[5]=n):n=I[5];let O=n;I[6]===Symbol.for("react.memo_cache_sentinel")?(i=()=>()=>{R(!1),$(!1)},I[6]=i):i=I[6],(0,c.useEffect)(i);let H=e$();I[7]!==H||I[8]!==k?._id||I[9]!==C.name?(d=()=>{typeof k?._id>"u"||H.navigateDiffView({mode:"version",previousDocument:{type:C.name,id:(0,m.IM)(k?._id)},nextDocument:{type:C.name,id:(0,m.T4)(k?._id)}})},I[7]=H,I[8]=k?._id,I[9]=C.name,I[10]=d):d=I[10];let V=d;return I[11]!==C.title?(u={schemaType:C.title},I[11]=C.title,I[12]=u):u=I[12],I[13]!==z||I[14]!==P||I[15]!==u?(f=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:(0,o.jsx)(h.HTc,{t:P,i18nKey:z,values:u})}),I[13]=z,I[14]=P,I[15]=u,I[16]=f):f=I[16],I[17]!==P?(x=P("banners.obsolete-draft.actions.compare-draft.text"),I[17]=P,I[18]=x):x=I[18],I[19]!==V||I[20]!==x?(g=(0,o.jsx)(l.$n,{text:x,mode:"ghost",onClick:V}),I[19]=V,I[20]=x,I[21]=g):g=I[21],I[22]!==P?(b=P("banners.obsolete-draft.actions.publish-draft.text"),I[22]=P,I[23]=b):b=I[23],I[24]!==T||I[25]!==P?(y=T?{content:P("banners.live-edit-draft-banner.publish.tooltip")}:{},I[24]=T,I[25]=P,I[26]=y):y=I[26],I[27]!==L||I[28]!==A||I[29]!==y||I[30]!==b?(j=(0,o.jsx)(l.$n,{onClick:L,text:b,tooltipProps:y,loading:A,tone:"positive"}),I[27]=L,I[28]=A,I[29]=y,I[30]=b,I[31]=j):j=I[31],I[32]!==P?(v=P("banners.obsolete-draft.actions.discard-draft.text"),I[32]=P,I[33]=v):v=I[33],I[34]!==T||I[35]!==P?(_=T?{content:P("banners.live-edit-draft-banner.discard.tooltip")}:{},I[34]=T,I[35]=P,I[36]=_):_=I[36],I[37]!==O||I[38]!==D||I[39]!==v||I[40]!==_?(w=(0,o.jsx)(l.$n,{onClick:O,text:v,tooltipProps:_,loading:D,tone:"caution"}),I[37]=O,I[38]=D,I[39]=v,I[40]=_,I[41]=w):w=I[41],I[42]!==j||I[43]!==w||I[44]!==f||I[45]!==g?(S=(0,o.jsx)(no,{content:(0,o.jsxs)(a.so,{align:"center",justify:"space-between",gap:2,children:[f,g,j,w]}),"data-testid":"live-edit-type-banner",icon:p.YZv}),I[42]=j,I[43]=w,I[44]=f,I[45]=g,I[46]=S):S=I[46],S};function nO(e){let t,n,i=(0,s.c)(4),{documentId:r,isPinnedDraftOrPublished:l}=e;i[0]!==r?(t={documentId:r},i[0]=r,i[1]=t):t=i[1];let a=(0,h.Jr6)(t);return(0,m.A_)(r)&&a&&l?(i[2]!==r?(n=(0,o.jsx)(nH,{documentId:r}),i[2]=r,i[3]=n):n=i[3],n):null}function nH(e){let t,n,i,l,d,c,u,p,f,x=(0,s.c)(35),{documentId:g}=e,{data:b}=(0,h.K0D)(),y=(0,h._T7)();x[0]!==g?(t=(0,m._S)(g)??"",x[0]=g,x[1]=t):t=x[1];let j=t;if(x[2]!==b||x[3]!==j){let e;x[5]!==j?(e=e=>e._id.includes(j),x[5]=j,x[6]=e):e=x[6],n=b.find(e),x[2]=b,x[3]=j,x[4]=n}else n=x[4];let v=n,{t:_}=(0,h.Bdt)();x[7]!==g?(i={documentId:g},x[7]=g,x[8]=i):i=x[8];let{data:w}=(0,h.gn8)(i);if(x[9]!==b||x[10]!==w||x[11]!==_){let e,t;x[13]!==w?(e=e=>w.find(t=>{let n=(0,m._S)(t)??"";return(0,h._hI)(e._id)===n}
293)&&!(0,h._9c)(e),x[13]=w,x[14]=e):e=x[14],x[15]!==_?(t=e=>e.metadata.title||_("release.placeholder-untitled-release"),x[15]=_,x[16]=t):t=x[16],l=b.filter(e).map(t),x[9]=b,x[10]=w,x[11]=_,x[12]=l}else l=x[12];let S=l;x[17]!==v?(d=v&&(0,h.Y73)(v),x[17]=v,x[18]=d):d=x[18];let I=d,{t:k}=(0,h.Bdt)(r.Z7);x[19]!==j||x[20]!==y?(c=async()=>{y(j)},x[19]=j,x[20]=y,x[21]=c):c=x[21];let E=c;return 0===S.length?null:(x[22]!==S[0]||x[23]!==S.length||x[24]!==k?(u=(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(a.so,{direction:"row",gap:1,wrap:"wrap",children:S.length>1?(0,o.jsx)(h.HTc,{t:k,i18nKey:"banners.release.navigate-to-edit-description-multiple",components:{VersionBadge:()=>(0,o.jsxs)(h.RwK,{children:[" ",S[0]]})},values:{count:S.length-1}}):(0,o.jsx)(h.HTc,{t:k,i18nKey:"banners.release.navigate-to-edit-description-single",components:{VersionBadge:()=>(0,o.jsxs)(h.RwK,{children:[" ",S[0]]})}})})}),x[22]=S[0],x[23]=S.length,x[24]=k,x[25]=u):u=x[25],x[26]!==S.length||x[27]!==E||x[28]!==k||x[29]!==I?(p=S.length>0?{text:k("banners.release.action.open-to-edit"),tone:I,onClick:E,mode:"default"}:void 0,x[26]=S.length,x[27]=E,x[28]=k,x[29]=I,x[30]=p):p=x[30],x[31]!==u||x[32]!==p||x[33]!==I?(f=(0,o.jsx)(no,{tone:I,"data-testid":"open-release-to-edit-banner",content:u,action:p}),x[31]=u,x[32]=p,x[33]=I,x[34]=f):f=x[34],f)}function nV(){let e,t,n=(0,s.c)(4),{revisionNotFound:i}=tM(),{t:l}=(0,h.Bdt)(r.Z7);return i?(n[0]!==l?(e=l("banners.revision-not-found.description"),n[0]=l,n[1]=e):e=n[1],n[2]!==e?(t=(0,o.jsx)(no,{tone:"caution","data-test-id":"revision-not-found-banner",icon:p.sAQ,content:(0,o.jsx)(a.EY,{size:1,children:e})}),n[2]=e,n[3]=t):t=n[3],t):null}function nZ(e){let t,n,i,r,l,d=(0,s.c)(12),{currentRelease:c}=e,u=c??h.k0f;d[0]!==u?(t=(0,h.Y73)(u),d[0]=u,d[1]=t):t=d[1];let m=t,{t:f}=(0,h.Bdt)();return d[2]!==c?(n=(0,h.drb)(c),d[2]=c,d[3]=n):n=d[3],d[4]!==n?(i={date:n},d[4]=n,d[5]=i):i=d[5],d[6]!==i||d[7]!==f?(r=(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{t:f,i18nKey:"release.banner.scheduled-for-publishing-on",values:i})}),d[6]=i,d[7]=f,d[8]=r):r=d[8],d[9]!==r||d[10]!==m?(l=(0,o.jsx)(no,{tone:m,icon:p.XAi,content:r}),d[9]=r,d[10]=m,d[11]=l):l=d[11],l}function nN(){let e=(0,s.c)(18),{value:t,editState:n}=tM(),{selectedPerspective:i}=(0,h.QO2)(),l=(0,h.YW1)(t)||n?.version&&(0,h.YW1)(n?.version),{t:d}=(0,h.Bdt)(r.Z7),{t:c}=(0,h.Bdt)();if((0,h.Jrl)(i)&&l){let t,n,r,l,s,u,m;e[0]!==i.metadata?.title||e[1]!==c?(t=i.metadata?.title||c("release.placeholder-untitled-release"),e[0]=i.metadata?.title,e[1]=c,e[2]=t):t=e[2];let f=t;return e[3]!==f?(n={title:f},e[3]=f,e[4]=n):n=e[4],e[5]!==i?(r=(0,h.bSq)(i),e[5]=i,e[6]=r):r=e[6],e[7]!==r?(l={VersionBadge:r},e[7]=r,e[8]=l):l=e[8],e[9]!==d||e[10]!==n||e[11]!==l?(s=(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{t:d,i18nKey:"banners.unpublished-release-banner.text",values:n,components:l})}),e[9]=d,e[10]=n,e[11]=l,e[12]=s):s=e[12],e[13]!==d?(u=(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{t:d,i18nKey:"banners.unpublished-release-banner.text-with-published"})}),e[13]=d,e[14]=u):u=e[14],e[15]!==s||e[16]!==u?(m=(0,o.jsx)(no,{tone:"critical",content:(0,o.jsxs)(a.BJ,{space:2,children:[s,u]}),icon:p.wvk}),e[15]=s,e[16]=u,e[17]=m):m=e[17],m}return null}let nK=(0,g.I4)(a.BJ)`
294  ${({theme:e})=>(0,g.AH)`
295      @supports not (container-type: inline-size) {
296        display: none !important;
297      }
298
299      container-type: inline-size;
300
301      [data-heading] {
302        font-size: ${e.sanity.fonts.heading.sizes[4].fontSize}px;
303        line-height: ${e.sanity.fonts.heading.sizes[4].lineHeight}px;
304        overflow-wrap: break-word;
305        text-wrap: pretty;
306      }
307
308      @container (max-width: 560px) {
309        [data-heading] {
310          font-size: ${e.sanity.fonts.heading.sizes[3].fontSize}px;
311          line-height: ${e.sanity.fonts.heading.sizes[3].lineHeight}px;
312        }
313      }
314
315      @container (max-width: 420px) {
316        [data-heading] {
317          font-size: ${e.sanity.fonts.heading.sizes[2].fontSize}px;
318          line-height: ${e.sanity.fonts.heading.sizes[2].lineHeight}px;
319        }
320      }
321    `}
322`,nF=e=>{let t,n,i,d,c=(0,s.c)(14),{documentId:u,schemaType:m,title:f}=e,x=u===m.name,g=m.description,{t:b}=(0,h.Bdt)(r.Z7);if(!1===m.__experimental_formPreviewTitle)return null;c[0]!==g||c[1]!==x||c[2]!==m.name||c[3]!==m.title?(t=!x&&(0,o.jsxs)(a.cV,{space:1,children:[(0,o.jsx)(a.EY,{muted:!0,size:1,children:m.title??m.name}),g&&(0,o.jsx)(l.m_,{content:g,placement:"right",children:(0,o.jsx)(p.YzR,{"data-testid":"schema-description-icon"})})]}),c[0]=g,c[1]=x,c[2]=m.name,c[3]=m.title,c[4]=t):t=c[4];let y=!f;return c[5]!==b||c[6]!==f?(n=f??b("document-view.form-view.form-title-fallback"),
322c[5]=b,c[6]=f,c[7]=n):n=c[7],c[8]!==y||c[9]!==n?(i=(0,o.jsx)(a.DZ,{as:"h2","data-heading":!0,muted:y,"data-testid":"document-panel-document-title",children:n}),c[8]=y,c[9]=n,c[10]=i):i=c[10],c[11]!==t||c[12]!==i?(d=(0,o.jsxs)(nK,{marginBottom:6,space:4,children:[t,i]}),c[11]=t,c[12]=i,c[13]=d):d=c[13],d},nW=e=>e.preventDefault(),nJ=(0,c.forwardRef)(function(e,t){let n,i,l,u,p,m,f,x,g,b,y,j,v,_,w,S=(0,s.c)(77),{hidden:I,margins:k}=e,{collapsedFieldSets:E,collapsedPaths:C,displayed:z,editState:T,documentId:P,documentType:R,fieldActions:D,onChange:$,validation:B,ready:Y,formState:M,onFocus:L,connectionState:O,onBlur:H,onSetCollapsedPath:V,onPathOpen:Z,onSetCollapsedFieldSet:N,onSetActiveFieldGroup:K,openPath:F,compareValue:W,hasUpstreamVersion:J}=tM(),{selectedReleaseId:U,selectedPerspective:G}=(0,h.QO2)(),Q=(0,h.q3J)(),q=(0,h.cVB)(P),{title:X}=tq(),[ee]=(0,c.useState)(nU),et=T?.transactionSyncLock?.enabled,{t:en}=(0,h.Bdt)(r.Z7);S[0]!==en?(n=en("document-view.form-view.sync-lock-toast.title"),S[0]=en,S[1]=n):n=S[1],S[2]!==en?(i=en("document-view.form-view.sync-lock-toast.description"),S[2]=en,S[3]=i):i=S[3],S[4]!==et||S[5]!==n||S[6]!==i?(l={id:"sync-lock",status:"warning",enabled:et,title:n,description:i,closable:!0},S[4]=et,S[5]=n,S[6]=i,S[7]=l):l=S[7],(0,h.B1J)(l),S[8]!==P||S[9]!==Q.pair||S[10]!==R||S[11]!==ee||S[12]!==U?(u=()=>{let e=Q.pair.documentEvents(P,R,U).pipe((0,A.M)(e=>{"mutation"===e.type&&ee.publish(function(e){let t=e.mutations.map(e=>e.patch).filter(Boolean);return{type:"mutation",snapshot:e.document,patches:(0,h.i6N)(e.origin,t)}}(e)),"rebase"===e.type&&ee.publish(function(e){let t=e.remoteMutations.map(e=>e.patch).filter(Boolean),n=e.localMutations.map(e=>e.patch).filter(Boolean);return{type:"rebase",snapshot:e.document,patches:(0,h.i6N)("remote",t).concat((0,h.i6N)("local",n))}}(e))})).subscribe();return()=>{e.unsubscribe()}},S[8]=P,S[9]=Q.pair,S[10]=R,S[11]=ee,S[12]=U,S[13]=u):u=S[13],S[14]!==P||S[15]!==Q||S[16]!==R||S[17]!==ee||S[18]!==U?(p=[P,Q,R,ee,U],S[14]=P,S[15]=Q,S[16]=R,S[17]=ee,S[18]=U,S[19]=p):p=S[19],(0,c.useEffect)(u,p);let ei=!!z?._rev;S[20]!==ee||S[21]!==z?(m=()=>{ee.publish({type:"mutation",patches:[],snapshot:z})},S[20]=ee,S[21]=z,S[22]=m):m=S[22];let er=(0,eS.J)(m);S[23]!==er||S[24]!==ei?(f=()=>{ei&&er()},S[23]=er,S[24]=ei,S[25]=f):f=S[25],S[26]!==ei?(x=[ei],S[26]=ei,S[27]=x):x=S[27],(0,c.useEffect)(f,x);let[el,eo]=(0,c.useState)(null),[es,ea]=(0,c.useState)(!1);S[28]!==es||S[29]!==el||S[30]!==M?.focusPath.length||S[31]!==Y?(g=()=>{!es&&Y&&!M?.focusPath.length&&el&&(ea(!0),(0,d.s5)(el))}
322,S[28]=es,S[29]=el,S[30]=M?.focusPath.length,S[31]=Y,S[32]=g):g=S[32];let ed=M?.focusPath.length;S[33]!==es||S[34]!==el||S[35]!==Y||S[36]!==ed?(b=[es,el,ed,Y],S[33]=es,S[34]=el,S[35]=Y,S[36]=ed,S[37]=b):b=S[37],(0,c.useEffect)(g,b),S[38]!==t?(y=e=>{eo(e),"function"==typeof t?t(e):t&&(t.current=e)},S[38]=t,S[39]=y):y=S[39];let ec=y,eu="reconnecting"===O||M?.readOnly||!T?.ready,ep=eu?"true":void 0;return S[40]!==E||S[41]!==C||S[42]!==W||S[43]!==O||S[44]!==P||S[45]!==T?.draft||S[46]!==T?.published||S[47]!==D||S[48]!==M||S[49]!==J||S[50]!==I||S[51]!==eu||S[52]!==H||S[53]!==$||S[54]!==L||S[55]!==Z||S[56]!==K||S[57]!==N||S[58]!==V||S[59]!==F||S[60]!==ee||S[61]!==q||S[62]!==G||S[63]!==en||S[64]!==X||S[65]!==B?(j="connecting"!==O||T?.draft||T?.published?null===M||I?(0,o.jsx)(a.az,{padding:2,children:(0,o.jsx)(a.EY,{children:en("document-view.form-view.form-hidden")})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(nF,{documentId:P,schemaType:M.schemaType,title:X}),(0,o.jsx)(h.okx,{__internal_fieldActions:D,__internal_patchChannel:ee,changed:M.changed,collapsedFieldSets:E,collapsedPaths:C,compareValue:W??void 0,focused:M.focused,focusPath:M.focusPath,groups:M.groups,id:"root",members:M.members,onChange:$,onFieldGroupSelect:K,onPathBlur:H,onPathFocus:L,onPathOpen:Z,onSetFieldSetCollapsed:N,onSetPathCollapsed:V,openPath:F,perspective:G,hasUpstreamVersion:J,presence:q,readOnly:eu,schemaType:M.schemaType,validation:B,value:M.value})]}):(0,o.jsx)(tD,{ms:300,children:(0,o.jsxs)(a.so,{align:"center",direction:"column",height:"fill",justify:"center",children:[(0,o.jsx)(a.y$,{muted:!0}),(0,o.jsx)(a.az,{marginTop:3,children:(0,o.jsx)(a.EY,{align:"center",muted:!0,size:1,children:en("document-view.form-view.loading")})})]})}),S[40]=E,S[41]=C,S[42]=W,S[43]=O,S[44]=P,S[45]=T?.draft,S[46]=T?.published,S[47]=D,S[48]=M,S[49]=J,S[50]=I,S[51]=eu,S[52]=H,S[53]=$,S[54]=L,S[55]=Z,S[56]=K,S[57]=N,S[58]=V,S[59]=F,S[60]=ee,S[61]=q,S[62]=G,S[63]=en,S[64]=X,S[65]=B,S[66]=j):j=S[66],S[67]!==ec||S[68]!==ep||S[69]!==j?(v=(0,o.jsx)(a.az,{as:"form",onSubmit:nW,ref:ec,"data-testid":"form-view","data-read-only":ep,children:j}),S[67]=ec,S[68]=ep,S[69]=j,S[70]=v):v=S[70],S[71]!==k||S[72]!==v?(_=(0,o.jsx)(h.MLZ,{margins:k,children:v}),S[71]=k,S[72]=v,S[73]=_):_=S[73],S[74]!==I||S[75]!==_?(w=(0,o.jsx)(a.mc,{hidden:I,paddingX:4,paddingTop:5,paddingBottom:9,sizing:"border",width:1,children:_}),S[74]=I,S[75]=_,S[76]=w):w=S[76],w});function nU(){return(0,h.Ijd)()}function nG(){let e,t,n=(0,s.c)(11),{activeViewId:i,paneKey:r,views:l}=tM(),d=`${r}tabpanel`;if(n[0]!==i||n[1]!==r||n[2]!==d||n[3]!==l){let t;n[5]!==i||n[6]!==r||n[7]!==d?(t=(e,t)=>(0,o.jsx)(nQ,{icon:e.icon,id:`${r}tab-${e.id}`,isActive:i===e.id,label:e.title,tabPanelId:d,viewId:0===t?null:e.id??null},e.id),n[5]=i,n[6]=r,n[7]=d,n[8]=t):t=n[8],e=l.map(t),n[0]=i,n[1]=r,n[2]=d,n[3]=l,n[4]=e}else e=n[4];return n[9]!==e?(t=(0,o.jsx)(a.wb,{space:1,children:e}),n[9]=e,n[10]=t):t=n[10],t}function nQ(e){let t,n,i,r,a,d,c,u,p,m=(0,s.c)(20);m[0]!==e?({icon:t,id:n,isActive:i,label:r,tabPanelId:d,viewId:c,...a}=e,m[0]=e,m[1]=t,m[2]=n,m[3]=i,m[4]=r,m[5]=a,m[6]=d,m[7]=c):(t=m[1],n=m[2],i=m[3],r=m[4],a=m[5],d=m[6],c=m[7]);let{ready:h,editState:f}=tM(),{setView:x}=nC();m[8]!==x||m[9]!==c?(u=()=>x(c),m[8]=x,m[9]=c,m[10]=u):u=m[10];let g=u,b=!h&&!f?.draft&&!f?.published;return m[11]!==g||m[12]!==t||m[13]!==n||m[14]!==i||m[15]!==r||m[16]!==a||m[17]!==b||m[18]!==d?(p=(0,o.jsx)(l.oz,{...a,"aria-controls":d,disabled:b,icon:t,id:n,label:r,onClick:g,selected:i}),m[11]=g,m[12]=t,m[13]=n,m[14]=i,m[15]=r,m[16]=a,m[17]=b,m[18]=d,m[19]=p):p=m[19],p}let nq={paneDataItems:[],routerPanes:[],resolvedPanes:[],maximizedPane:null,setMaximizedPane:()=>{}};function nX(){return(0,c.useContext)(u.DU)??nq}let n0=!1,n1=Object.freeze({}),n2=Symbol("LOADING_PANE"),n3="documentPanelPortalElement",n4=(0,em.g_)({name:"Maximized Document Pane Clicked",version:1,description:"User pressed to maximize a document by click the focus pane button"}),n5=(0,em.g_)({name:"Maximized Document Pane Collapsed",version:1,description:"User disabled the maximization on a document pane by clicking the focus pane button"}),n6=(0,em.g_)({name:"Maximized Document Pane Navigated Via Breadcrumbs",ver
322sion:1,description:"User navigated to a different document pane via the breadcrumbs in the document header"});function n7(e){let t,n,i,a,d,c,u,p,m=(0,s.c)(27),{paneData:f,index:x}=e,{pane:g}=f,b=(0,_.rd)(),{t:y}=(0,h.Bdt)(r.Z7),j=(0,_.ks)(),v=(0,ec.Jr)();m[0]!==j?.panes?(t=j?.panes||[],m[0]=j?.panes,m[1]=t):t=m[1];let w=t,{perspectiveStack:S}=(0,h.QO2)(),I=g!==n2&&"title"in g?g.title:null,k=g!==n2&&"document"===g.type?g.options.id:null,E=g!==n2&&"document"===g.type?g.options.type:null,C=k??"",z=E??"";m[2]!==S||m[3]!==C||m[4]!==z?(n={documentId:C,documentType:z,perspectiveStack:S},m[2]=S,m[3]=C,m[4]=z,m[5]=n):n=m[5];let{value:T,isLoading:P}=(0,h.twe)(n);e:{if(k&&!P){let e;m[6]!==T?.title||m[7]!==y?(e=T?.title||y("panes.document-header-title.untitled.text"),m[6]=T?.title,m[7]=y,m[8]=e):e=m[8],i=e;break e}i=I}let A=i;m[9]!==f.groupIndex||m[10]!==b||m[11]!==w||m[12]!==v?(a=()=>{v.log(n6),b.navigate({panes:w.slice(0,f.groupIndex)})},m[9]=f.groupIndex,m[10]=b,m[11]=w,m[12]=v,m[13]=a):a=m[13];let R=a;if(!A&&!P)return null;m[14]!==A||m[15]!==y?(d=A||y("panes.document-header-title.untitled.text"),m[14]=A,m[15]=y,m[16]=d):d=m[16],m[17]!==A||m[18]!==y?(c=A||y("panes.document-header-title.untitled.text"),m[17]=A,m[18]=y,m[19]=c):c=m[19],m[20]!==c?(u={content:c},m[20]=c,m[21]=u):u=m[21];let D=+(0!==x);return m[22]!==R||m[23]!==D||m[24]!==d||m[25]!==u?(p=(0,o.jsx)(l.$n,{mode:"bleed",text:d,tooltipProps:u,onClick:R,paddingLeft:D}),m[22]=R,m[23]=D,m[24]=d,m[25]=u,m[26]=p):p=m[26],p}function n8(e){let t,n,i=(0,s.c)(7),{paneDataItems:r,currentPaneIndex:l}=e;if(i[0]!==l||i[1]!==r){let e;i[3]!==l?(e=(e,t)=>{if(t>l)return null;let n=e.pane!==n2&&"document"===e.pane.type;return(0,o.jsxs)(c.Fragment,{children:[(0,o.jsx)(n7,{paneData:e,index:t}),t<l&&(n?(0,o.jsx)(a.az,{padding:1,children:(0,o.jsx)(p.flY,{})}):(0,o.jsx)(a.EY,{children:"/"}))]},`breadcrumb-item-${e.key}-${t}`)},i[3]=l,i[4]=e):e=i[4],t=r.map(e),i[0]=l,i[1]=r,i[2]=t}else t=i[2];return i[5]!==t?(n=(0,o.jsx)(a.so,{direction:"row",align:"center","data-testid":"document-header-breadcrumb",children:t}),i[5]=t,i[6]=n):n=i[6],n}function n9(){let e,t,n,i=(0,s.c)(23),{connectionState:l,schemaType:a,title:d,value:c,index:u}=tM(),{paneDataItems:p}=nX(),{title:m,error:f}=tq(),{t:x}=(0,h.Bdt)(r.Z7);i[0]!==p?(e=p.some(ie),i[0]=p,i[1]=e):e=i[1];let g=e;if("connecting"===l&&!c){let e;return i[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(o.Fragment,{}),i[2]=e):e=i[2],e}if(d){let e;return i[3]!==d?(e=(0,o.jsx)(o.Fragment,{children:d}),i[3]=d,i[4]=e):e=i[4],e}if(!c){let e,t,n=a?.title||a?.name;return i[5]!==x||i[6]!==n?(e=x("panes.document-header-title.new.text",{schemaType:n}),i[5]=x,i[6]=n,i[7]=e):e=i[7],i[8]!==e?(t=(0,o.jsx)(o.Fragment,{children:e}),i[8]=e,i[9]=t):t=i[9],t}if(f){let e,t;return i[10]!==f||i[11]!==x?(e=x("panes.document-header-title.error.text",{error:f}),i[10]=f,i[11]=x,i[12]=e):e=i[12],i[13]!==e?(t=(0,o.jsx)(o.Fragment,{children:e}),i[13]=e,i[14]=t):t=i[14],t}return i[15]!==m||i[16]!==g||i[17]!==u||i[18]!==p||i[19]!==x?(t=g?(0,o.jsx)(n8,{paneDataItems:p,currentPaneIndex:u}):m||(0,o.jsx)("span",{style:{color:"var(--card-muted-fg-color)"},children:x("panes.document-header-title.untitled.text")}),i[15]=m,i[16]=g,i[17]=u,i[18]=p,i[19]=x,i[20]=t):t=i[20],i[21]!==t?(n=(0,o.jsx)(o.Fragment,{children:t}),i[21]=t,i[22]=n):n=i[22],n}function ie(e){return e.maximized}let it=e=>{let t,n,i,d,c,u,m=(0,s.c)(16);m[0]!==e?({documentExists:t,...n}=e,m[0]=e,m[1]=t,m[2]=n):(t=m[1],n=m[2]);let{isFavorited:f,isReady:x,favorite:g,unfavorite:b}=(0,h.$_6)(n),{t:y}=(0,h.Bdt)(r.Z7),j=f?"document.favorites.remove-from-favorites":"document.favorites.add-to-favorites";m[3]!==y||m[4]!==j?(i=y(j),m[3]=y,m[4]=j,m[5]=i):i=m[5];let v=i,_=f?b:g,w=!x||!t;return m[6]!==v?(d={content:(0,o.jsx)(a.EY,{size:1,children:v}),placement:"right"},m[6]=v,m[7]=d):d=m[7],m[8]!==f?(c=(0,o.jsx)(a.EY,{size:1,children:f?(0,o.jsx)(p.WmX,{}):(0,o.jsx)(p.Gg5,{})}),m[8]=f,m[9]=c):c=m[9],m[10]!==v||m[11]!==_||m[12]!==w||m[13]!==d||m[14]!==c?(u=(0,o.jsx)(l.$n,{mode:"bleed",onClick:_,disabled:w,"aria-label":v,"aria-live":"assertive",tooltipProps:d,children:c}),m[10]=v,m[11]=_,m[12]=w,m[13]=d,m[14]=c,m[15]=u):u=m[15],u},ii=(0,c.memo)(function(){let e,t,n,i,a,d,c=(0,s.c)(24),{editState:u,connectionState:m,views:f,documentId:x,displayed:g}=tM(),{features:b}=tN(),{index:y,BackLink:j}=nC(),{activeWorkspace:v}=(0,h.VrO)(),_=f.length>1,{collapsed:w,isLast:S}=tr(),I=S&&!w?-1:0,k=b.backButton&&y>0,{t:E}=(0,h.Bdt)(r.Z7);c[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(n9,{}),c[0]=e):e=c[0];let C=e;c[1]!==_?(t=_&&(0,o.jsx)(nG,{}),c[1]=_,c[2]=t):t=c[2];let z=t;c[3]!==j||c[4]!==k||c[5]!==E?(n=k&&(0,o.jsx)(l.$n,{as:j,"data-as":"a",icon:p.A60,mode:"bleed",tooltipProps:{content:E("pane-header.back-button.text")}}),c[3]=j,c[4]=k,c[5]=E,c[6]=n):n=c[6];let T=n,P=g?._id??x,A=g?._type??"";c[7]!==v.dataset||c[8]!==v.projectId?(i=[v.projectId,v.dataset],c[7]=v.dataset,c[8]=v.projectId,c[9]=i):i=c[9];let R=i.join("."),D=(u?.ready&&(u.version??u.draft??u.published)!==null)??!1;c[10]!==v.dataset||c[11]!==v.name||c[12]!==v.projectId||c[13]!==P||c[14]!==A||c[15]!==R||c[16]!==D?(a=(0,o.jsx)(h.m2r,{capability:"comlink",condition:"available",children:(0,o.jsx)(it,{resourceType:"studio",documentId:P,documentType:A,resourceId:R,schemaName:v.name,projectId:v.projectId,dataset:v.dataset,documentExists:D})}),c[10]=v.dataset,c[11]=v.name,c[12]=v.projectId,c[13]=P,c[14]=A,c[15]=R,c[
32216]=D,c[17]=a):a=c[17];let $=a,B="connecting"===m&&!u?.draft&&!u?.published;return c[18]!==T||c[19]!==$||c[20]!==B||c[21]!==I||c[22]!==z?(d=(0,o.jsx)(tw,{loading:B,title:C,tabs:z,tabIndex:I,backButton:T,appendTitle:$}),c[18]=T,c[19]=$,c[20]=B,c[21]=I,c[22]=z,c[23]=d):d=c[23],d}),ir=(0,g.I4)(a.az)({position:"relative"}),il=(0,g.I4)(h.PaW)(({$disabled:e})=>e?{height:"100%"}:(0,g.AH)`
323    height: 100%;
324    overflow: auto;
325    position: relative;
326    scroll-behavior: smooth;
327    outline: none;
328  `),io=function(e){let t,n,i,r,l,d,u,p,f,x,g,b,y,j,v,_,w=(0,s.c)(109),{footerHeight:S,headerHeight:I,isInspectOpen:k,rootElement:E,setDocumentPanelPortalElement:C,footer:z}=e,{activeViewId:T,displayed:P,documentId:A,editState:R,inspector:D,value:$,views:B,ready:Y,schemaType:M,permissions:L,isPermissionsLoading:O}=tM();if(w[0]!==$){let e=(0,h.G_3)($);t=(0,h.Y07)(e),w[0]=$,w[1]=t}else t=w[1];let H=t,{params:V}=nC(),{collapsed:Z}=e8(),{collapsed:N}=tr(),K=(0,a.WP)(),{features:F}=tN(),[W,J]=(0,c.useState)(null),[U,G]=(0,c.useState)(null),Q=(0,c.useRef)(null),q=(0,h.hA9)(),X=$._createdAt?"update":"create";w[2]!==T||w[3]!==B?(n=B.find(e=>e.id===T)||B[0]||{type:"form"},w[2]=T,w[3]=B,w[4]=n):n=w[4];let ee=n,et=F.splitPanes&&W||K.element;e:{let e;if(Z){let e,t=I||0,n=S?S+2:2;w[5]!==t||w[6]!==n?(e=[t,0,n,0],w[5]=t,w[6]=n,w[7]=e):e=w[7],i=e;break e}w[8]===Symbol.for("react.memo_cache_sentinel")?(e=[0,0,2,0],w[8]=e):e=w[8],i=e}let en=i,ei="form"!==ee.type;w[9]!==ee.component||w[10]!==ee.options||w[11]!==ee.type||w[12]!==P||w[13]!==A||w[14]!==R?.draft||w[15]!==R?.published||w[16]!==M||w[17]!==$?(r=()=>{if("component"===ee.type&&ee.component){let e=ee.component;return(0,o.jsx)(e,{document:{draft:R?.draft||null,displayed:P||$,historical:P,published:R?.published||null},documentId:A,options:ee.options,schemaType:M})}return!1},w[9]=ee.component,w[10]=ee.options,w[11]=ee.type,w[12]=P,w[13]=A,w[14]=R?.draft,w[15]=R?.published,w[16]=M,w[17]=$,w[18]=r):r=w[18],w[19]!==r?(l=r(),w[19]=r,w[20]=l):l=w[20];let er=l;w[21]!==U?(d=()=>{U?.scrollTo&&U.scrollTo(0,0)},w[21]=U,w[22]=d):d=w[22],w[23]!==A||w[24]!==U?(u=[A,U],w[23]=A,w[24]=U,w[25]=u):u=w[25],(0,c.useEffect)(d,u),w[26]!==et||w[27]!==C?(p=()=>{et&&C(et)},f=[et,C],w[26]=et,w[27]=C,w[28]=p,w[29]=f):(p=w[28],f=w[29]),(0,c.useEffect)(p,f),w[30]!==P||w[31]!==k||w[32]!==$?(x=k?(0,o.jsx)(nl,{value:P||$}):null,w[30]=P,w[31]=k,w[32]=$,w[33]=x):x=w[33];let el=x,eo=!!(!N&&D),{selectedPerspective:es,selectedReleaseId:ea}=(0,h.QO2)(),ed=V?.historyVersion;w[34]!==P||w[35]!==A||w[36]!==ed?(g={historyVersion:ed,displayed:P,documentId:A},w[34]=P,w[35]=A,w[36]=ed,w[37]=g):g=w[37];let ec=(0,h.LJ4)(g);t:{let e,t,n,i,r,l,s,a,d,c,u,p,f,x;if(V?.historyVersion){let e;w[38]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(nz,{}),w[38]=e):e=w[38],b=e;break t}w[39]!==es?(e=(0,h.Jrl)(es)&&(0,h.KJ$)(es),w[39]=es,w[40]=e):e=w[40];let g=e,y=!!(g&&P?._id&&(0,m._S)(P?._id)===ea);if(w[41]!==R||w[42]!==M||w[43]!==es||w[44]!==q.document.drafts.enabled?(n=function({isSelectedPerspectiveWriteable:e,editState:t}){return(0,h.cX9)(t)&&!e.result}({isSelectedPerspectiveWriteable:t=(0,h.CW3)({selectedPerspective:es,isDraftModelEnabled:q.document.drafts.enabled,schemaType:M}),editState:R}),w[41]=R,w[42]=M,w[43]=es,w[44]=q.document.drafts.enabled,w[45]=t,w[46]=n):(t=w[45],n=w[46]),n){let e;w[47]!==t.reason||w[48]!==t.result||w[49]!==M||w[50]!==es?(e=!t.result&&(0,o.jsx)(n$,{schemaType:M,selectedPerspective:es,reason:t.reason}),w[47]=t.reason,w[48]=t.result,w[49]=M,w[50]=es,w[51]=e):e=w[51],b=e;break t}if(y){let e;w[52]!==es?(e=(0,o.jsx)(nZ,{currentRelease:es}),w[52]=es,w[53]=e):e=w[53],b=e;break t}let j=ec.currentReleases.some(h._9c),v=P?._id&&(0,m.R8)(P._id);if("drafts"===es&&j&&v){let e;w[54]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(nE,{}),w[54]=e):e=w[54],b=e;break t}w[55]!==es?(i=(0,h.sBy)(es),w[55]=es,w[56]=i):i=w[56];let _=i,S=R?.version&&(0,h.YW1)(R?.version);if(P?._id&&(0,m._S)(P._id)!==ea&&Y&&!_&&!1===(0,h.cX9)(R)&&!S){let e;w[57]!==g||w[58]!==es||w[59]!==$._id?(e=(0,o.jsx)(nY,{documentId:$._id,currentRelease:es,isScheduledRelease:g}),w[57]=g,w[58]=es,w[59]=$._id,w[60]=e):e=w[60],b=e;break t}let I=function({editState:e,workspace:t,schemaType:n}){if(!e?.ready)return{result:void 0};let i=null!==e.draft,{document:{drafts:{enabled:r}}}=t;return!1===i?{result:!1}:r?!0===n.liveEdit?{result:!0,reason:"LIVE_EDIT_ACTIVE"}:{result:!1}:{result:!0,reason:"DRAFT_MODEL_INACTIVE"}}({editState:R,workspace:q,schemaType:M});if("form"===ee.type&&!ea&&I.result){if("DRAFT_MODEL_INACTIVE"===I.reason){let e;w[61]!==P||w[62]!==A||w[63]!==M?(e=(0,o.jsx)(nL,{displayed:P,documentId:A,schemaType:M,i18nKey:"banners.obsolete-draft.draft-model-inactive.text"}),w[61]=P,w[62]=A,w[63]=M,w[64]=e):e=w[64],b=e;break t}if("LIVE_EDIT_ACTIVE"===I.reason){let e;w[65]!==P||w[66]!==A||w[67]!==M?(e=(0,o.jsx)(nL,{displayed:P,documentId:A,schemaType:M,i18nKey:"banners.live-edit-draft-banner.text",isEditBlocking:!0}),w[65]=P,w[66]=A,w[67]=M,w[68]=e):e=w[68],b=e;break t}}if("form"!==ee.type||O){b=null;break t}w[69]!==H?(r=H&&(0,o.jsx)(nB,{}),w[69]=H,w[70]=r):r=w[70],w[71]!==L?.granted||w[72]!==X?(l=!L?.granted&&(0,o.jsx)(n_,{requiredPermission:X}),w[71]=L?.granted,w[72]=X,w[73]=l):l=w[73],w[74]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)(nV,{}),a=(0,o.jsx)(nI,{}),d=(0,o.jsx)(nc,{}),c=(0,o.jsx)(nR,{}),u=(0,o.jsx)(ns,{}),p=(0,o.jsx)(nN,{}),w[74]=s,w[75]=a,w[76]=d,w[77]=c,w[78]=u,w[79]=p):(s=w[74],a=w[75],d=w[76],c=w[77],u=w[78],p=w[79]);let k=P?._id??A;w[80]!==_||w[81]!==k?(f=(0,o.jsx)(nO,{documentId:k,isPinnedDraftOrPublished:_}),w[80]=_,w[81]=k,w[82]=f):f=w[82],w[83]!==r||w[84]!==l||w[85]!==f?(x=(0,o.jsxs)(o.Fragment,{children:[r,l,s,a,d,c,u,p,f]}),w[83]=r,w[84]=l,w[85]=f,w[86]=x):x=w[86],b=x}let eu=b;w[87]!==U?(y={documentScrollElement:U},w[87]=U,w[88]=y):y=w[88];let ep=y,em=F.resizablePanes||!eo;return w[89]!==er||w[90]!==eu||w[91]!==U||w[92]!==z||w[93]!==ei||w[94]!==el||w[95]!==Z||w[96]!==en||w[97]!==et||w[98]!==ep||w[99]!==em?(j=em&&(0,o.jsxs)(a.so,{height:"fill",direction:"column",width:"fill",flex:2,children:[(0,o.jsxs)(h.wG1,{zOffset:"paneHeader",children:[eu,(0,o.jsx)(ii,{})]}),(0,o.jsx)(ir,{flex:2,children:(0,o.jsx)(a.GD,{element:et,__unstable_elements:ep,children:(0,o.jsx)(a.EZ,{element:U,children:(0,o.jsxs)(h.jsZ,{scrollElement:U,containerElement:Q,children:[(0,o.jsxs)(il,{$disabled:Z||!1,"data-testid":"document-panel-scroller",ref:G,children:[(0,o.jsx)(nJ,{hidden:ei,margins:en,ref:Q}),er]}),el,(0,o.jsx)("div",{"data-testid":"document-panel-portal",ref:J})]})})})}),z]}
328),w[89]=er,w[90]=eu,w[91]=U,w[92]=z,w[93]=ei,w[94]=el,w[95]=Z,w[96]=en,w[97]=et,w[98]=ep,w[99]=em,w[100]=j):j=w[100],w[101]!==A||w[102]!==E||w[103]!==M||w[104]!==eo?(v=eo&&(0,o.jsx)(a.EZ,{element:E,children:(0,o.jsx)(t3,{documentId:A,documentType:M.name,flex:1})}),w[101]=A,w[102]=E,w[103]=M,w[104]=eo,w[105]=v):v=w[105],w[106]!==j||w[107]!==v?(_=(0,o.jsx)(tl,{children:(0,o.jsxs)(a.so,{height:"fill",children:[j,v]})}),w[106]=j,w[107]=v,w[108]=_):_=w[108],_};io.displayName="DocumentPanel";let is=e=>{let t,n,i,l,o,a,d,u=(0,s.c)(26),{id:m,type:f,revision:x,release:g}=e,{restore:b}=(0,h.QSs)(m,f,g),{revisionNotFound:y}=tM(),j=(0,h.cUp)(m,f),{navigateIntent:v}=(0,_.rd)(),w=(0,c.useRef)(j),[S,I]=(0,c.useState)(!1),{t:k}=(0,h.Bdt)(r.Z7);u[0]!==b||u[1]!==x?(t=()=>{b.execute(x),I(!1)},u[0]=b,u[1]=x,u[2]=t):t=u[2];let E=t;u[3]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{I(!1)},u[3]=n):n=u[3];let C=n;u[4]!==j||u[5]!==m||u[6]!==v||u[7]!==f?(i=()=>{j&&j!==w.current&&("success"===j.type&&"restore"===j.op&&v("edit",{id:m,type:f}),w.current=j)},l=[j,m,v,f],u[4]=j,u[5]=m,u[6]=v,u[7]=f,u[8]=i,u[9]=l):(i=u[8],l=u[9]),(0,c.useEffect)(i,l),u[10]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{I(!0)},u[10]=o):o=u[10];let z=o;e:{if(S){let e,t;u[11]!==k?(e=k("action.restore.confirm.message"),u[11]=k,u[12]=e):e=u[12],u[13]!==E||u[14]!==e?(t={type:"confirm",tone:"critical",onCancel:C,onConfirm:E,message:e},u[13]=E,u[14]=e,u[15]=t):t=u[15],a=t;break e}a=null}let T=a,P="@initial"===x,A=void 0===x;t:{let e,t,n;if(A||y){d=null;break t}u[16]!==k?(e=k("action.restore.label"),u[16]=k,u[17]=e):e=u[17];let i=P?"action.restore.disabled.cannot-restore-initial":"action.restore.tooltip";u[18]!==k||u[19]!==i?(t=k(i),u[18]=k,u[19]=i,u[20]=t):t=u[20],u[21]!==T||u[22]!==P||u[23]!==t||u[24]!==e?(n={label:e,tone:"caution",onHandle:z,title:t,icon:p.AAk,dialog:T,disabled:P},u[21]=T,u[22]=P,u[23]=t,u[24]=e,u[25]=n):n=u[25],d=n}return d};function ia(e){return("item"===e.type||"group"===e.type)&&e.renderAsButton}is.action="restore",is.displayName="HistoryRestoreAction";let id=ea(ia);function ic(e){let{fieldActions:t=[],menuItems:n,menuItemGroups:i}=e,r=[],l=0;for(let e=0;e<t.length;e+=1){let n=t[e];r.push(function e(t,n){return"divider"===t.type?{type:"divider",key:n}:"group"===t.type?{type:"group",key:n,children:t.children.map((t,i)=>e(t,`${n}-${i}-${t.type}`)),disabled:t.disabled,expanded:t.expanded??!0,icon:t.icon,title:t.title,i18n:t.i18n,renderAsButton:t.renderAsButton??!1}:{type:"item",key:n,intent:t.intent,disabled:t.disabled,icon:t.icon,iconRight:t.iconRight,onAction:t.onAction,renderAsButton:t.renderAsButton??!1,selected:t.selected,title:t.title,i18n:t.i18n,tone:t.tone}}(n,`${e}-${n.type}`))}l+=r.length;let o=[];for(let e of i)o.find(t=>t.key===e.id)||o.push({type:"group",key:e.id,children:[],expanded:!0,renderAsButton:!1,title:e.title,i18n:e.i18n});let s=[];for(let t=0;t<n.length;t+=1){let i=n[t],r=i.group&&o.find(e=>e.key===i.group),a="string"==typeof i.disabled?{reason:i.disabled}:i.disabled;i.group&&!r&&(r={type:"group",key:i.group,disabled:a,expanded:!0,icon:i.icon,title:i.group,children:[],renderAsButton:!1},o.push(r)),r?r.children.push({type:"item",key:`${l+t}-item`,hotkey:i.shortcut,icon:i.icon,intent:i.intent,disabled:a,onAction:()=>e.actionHandler(i),renderAsButton:i.showAsAction??!1,selected:i.selected,title:i.title,i18n:i.i18n,tone:i.tone}):s.push({type:"item",key:`${l+t}-item`,hotkey:i.shortcut,icon:i.icon,intent:i.intent,disabled:a,onAction:()=>e.actionHandler(i),renderAsButton:i.showAsAction??!1,selected:i.selected,title:i.title,i18n:i.i18n,tone:i.tone})}return[...s,...o,...r]}let iu=["left","bottom"],ip={small:0,medium:1,large:2,full:"auto"};function im(e){let t,n,i,l=(0,s.c)(16),{dialog:a,referenceElement:d}=e,{t:c}=(0,h.Bdt)(r.Z7),{cancelButtonIcon:u,cancelButtonText:p,confirmButtonIcon:m,confirmButtonText:f,message:x,onCancel:g,onConfirm:b,tone:y}=a;return l[0]!==p||l[1]!==c?(t=p||c("confirm-dialog.cancel-button.fallback-text"),l[0]=p,l[1]=c,l[2]=t):t=l[2],l[3]!==f||l[4]!==c?(n=f||c("confirm-dialog.confirm-button.fallback-text"),l[3]=f,l[4]=c,l[5]=n):n=l[5],l[6]!==u||l[7]!==m||l[8]!==x||l[9]!==g||l[10]!==b||l[11]!==d||l[12]!==t||l[13]!==n||l[14]!==y?(i=(0,o.jsx)(ed.e,{cancelButtonIcon:u,cancelButtonText:t,confirmButtonIcon:m,confirmButtonText:n,message:x,onCancel:g,onConfirm:b,open:!0,referenceElement:d,tone:y,placement:"top",fallbackPlacements:iu}),l[6]=u,l[7]=m,l[8]=x,l[9]=g,l[10]=b,l[11]=d,l[12]=t,l[13]=n,l[14]=y,l[15]=i):i=l[15],i}function ih(e){let t,n,i,r=(0,s.c)(12),{dialog:l}=e,u=(0,c.useId)();r[0]!==l.footer?(t=l.footer&&(0,o.jsx)(a.az,{paddingX:4,paddingY:3,children:l.footer}),r[0]=l.footer,r[1]=t):t=r[1];let p=t,m=!1===l.showCloseButton,f=void 0===l.width?1:ip[l.width];return r[2]!==l.content?(n=(0,o.jsx)(a.az,{padding:4,children:l.content}),r[2]=l.content,r[3]=n):n=r[3],r[4]!==l.header||r[5]!==l.onClose||r[6]!==u||r[7]!==p||r[8]!==m||r[9]!==f||r[10]!==n?(i=(0,o.jsx)(h.wG1,{zOffset:"fullscreen",children:(0,o.jsx)(d.lG,{animate:!0,__unstable_hideCloseButton:m,footer:p,header:l.header,id:u,onClose:l.onClose,onClickOutside:l.onClose,width:f,children:n})}),r[4]=l.header,r[5]=l.onClose,r[6]=u,r[7]=p,r[8]=m,r[9]=f,r[10]=n,r[11]=i):i=r[11],i}function ix(e){let t,n,i=(0,s.c)(5),{dialog:r,referenceElement:l}=e;return i[0]!==r?(t=(0,o.jsx)(ig,{dialog:r}),i[0]=r,i[1]=t):t=i[1],i[2]!==l||i[3]!==t?(n=(0,o.jsx)(a.AM,{content:t,fallbackPlacements:iu,open:!0,placement:"top",portal:!0,preventOverflow:!0,referenceElement:l}),i[2]=l,i[3]=t,i[4]=n):n=i[4],n}function ig(e){let t,n,i,r=(0,s.c)(6),{dialog:l}=e,{content:d,onClose:u}=l,{isTopLayer:p}=(0,a.Z4)(),m=(0,c.useRef)(null);return r[0]!==p||r[1]!==u?(t=e=>{"Escape"===e.key&&p&&u()},r[0]=p,r[1]=u,r[2]=t):t=r[2],(0,a.Pm)(t),r[3]===Symbol.for("react.memo_cache_sentinel")?(n=()=>[m.current],r[3]=n):n=r[3],(0,a.PR)(p&&u,n),r[4]!==d?(i=(0,o.jsx)("div",{ref:m,children:d}),r[4]=d,r[5]=i):i=r[5],i}function ib(e){let t,n=(0,s.c)(3),{children:i}=e,{element:r,elements:l}=(0,a.WP)(),d=l?.[n3]||r;return n[0]!==i||n[1]!==d?(t=(0,o.jsx)(a.GD,{element:d,children:i}),n[0]=i,n[1]=d,n[2]=t):t=n[2],t}function iy(e){let t,n,i=(0,s.c)(17),{dialog:r,referenceElement:d}=e,u=void 0===d?null:d,p=(0,c.useId)();if("confirm"===r.type){let e;return i[0]!==r||i[1]!==u?(e=(0,o.jsx)(im,{dialog:r,referenceElement:u}),i[0]=r,i[1]=u,i[2]=e):e=i[2],e}if("popover"===r.type){let e;return i[3]!==r||i[4]!==u?(e=(0,o.jsx)(ix,{dialog:r,referenceElement:u}),i[3]=r,i[4]=u,i[5]=e):e=i[5],e}if("dialog"===r.type||!r.type){let e;return i[6]!==r?(e=(0,o.jsx)(ib,{children:(0,o.jsx)(ih,{dialog:r})}),i[6]=r,i[7]=e):e=i[7],e}if("custom"===r.type){let e,t=r?.component;return i[8]!==t?(e=(0,o.jsx)(ib,{children:t}),i[8]=t,i[9]=e):e=i[9],e}return console.warn(`Unsupported modal type ${r.type}`),i[10]!==r.content||i[11]!==r.type?(t=r.content||(0,o.jsxs)(a.EY,{size:1,children:["Unexpected modal type (",(0,o.jsx)("code",{children:r.type}),")"]}),i[10]=r.content,i[11]=r.type,i[12]=t):t=i[12],i[13]!==p||i[14]!==t||i[15]!==r.onClose?
328(n=(0,o.jsx)(l.lG,{id:p,onClose:r.onClose,onClickOutside:r.onClose,width:1,children:t}),i[13]=p,i[14]=t,i[15]=r.onClose,i[16]=n):n=i[16],n}let ij=(0,c.memo)(function(e){let t,n,i,r,l=(0,s.c)(9),{actionStates:a,children:d,referenceElement:u}=e,[p,m]=(0,c.useState)(-1),f=a[p];l[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{m(e)},l[0]=t):t=l[0];let x=t;l[1]!==d?(n=d({handleAction:x}),l[1]=d,l[2]=n):n=l[2];let g=n;return l[3]!==f||l[4]!==u?(i=f&&f.dialog&&(0,o.jsx)(h.wG1,{zOffset:"paneFooter",children:(0,o.jsx)(iy,{dialog:f.dialog,referenceElement:u})}),l[3]=f,l[4]=u,l[5]=i):i=l[5],l[6]!==g||l[7]!==i?(r=(0,o.jsxs)(o.Fragment,{children:[i,g]}),l[6]=g,l[7]=i,l[8]=r):r=l[8],r});function iv(e){let t,n,i,d=(0,s.c)(10),{actionStates:u,disabled:p}=e,m=(0,c.useId)(),[f,x]=(0,c.useState)(null);d[0]===Symbol.for("react.memo_cache_sentinel")?(t={placement:"top-end",portal:!0,preventOverflow:!0},d[0]=t):t=d[0];let g=t,{t:b}=(0,h.Bdt)(r.Z7);d[1]!==u||d[2]!==p||d[3]!==m||d[4]!==b?(n=e=>{let{handleAction:t}=e;return(0,o.jsx)(l.IU,{id:`${m}-action-menu`,button:(0,o.jsx)(h.VJU,{"aria-label":b("buttons.action-menu-button.aria-label"),disabled:p,"data-testid":"action-menu-button",tooltipProps:{content:b("buttons.action-menu-button.tooltip")}}),menu:(0,o.jsx)(a.W1,{padding:1,children:u.map((e,n)=>(0,o.jsx)(i_,{actionState:e,disabled:p,index:n,onAction:t},n))}),popover:g,ref:x})},d[1]=u,d[2]=p,d[3]=m,d[4]=b,d[5]=n):n=d[5];let y=n;return d[6]!==u||d[7]!==f||d[8]!==y?(i=(0,o.jsx)(ij,{actionStates:u,referenceElement:f,children:y}),d[6]=u,d[7]=f,d[8]=y,d[9]=i):i=d[9],i}function i_(e){let t,n,i,r,a,d=(0,s.c)(20),{actionState:c,disabled:u,index:p,onAction:m}=e,{onHandle:h}=c;d[0]!==p||d[1]!==m||d[2]!==h?(t=()=>{m(p),h&&h()},d[0]=p,d[1]=m,d[2]=h,d[3]=t):t=d[3];let f=t;d[4]!==c.shortcut?(n=c.shortcut?String(c.shortcut).split("+").map(iw):void 0,d[4]=c.shortcut,d[5]=n):n=d[5];let x=n;d[6]!==c.label?(i=c.label.replace(" ",""),d[6]=c.label,d[7]=i):i=d[7];let g=`action-${i}`,b=u||!!c.disabled;return d[8]!==c.disabled||d[9]!==c.title?(r=c.disabled&&{tooltipProps:{content:c.title}},d[8]=c.disabled,d[9]=c.title,d[10]=r):r=d[10],d[11]!==c.icon||d[12]!==c.label||d[13]!==c.tone||d[14]!==f||d[15]!==x||d[16]!==g||d[17]!==b||d[18]!==r?(a=(0,o.jsx)(l.Dr,{"data-testid":g,disabled:b,hotkeys:x,icon:c.icon,onClick:f,text:c.label,tone:c.tone,...r}),d[11]=c.icon,d[12]=c.label,d[13]=c.tone,d[14]=f,d[15]=x,d[16]=g,d[17]=b,d[18]=r,d[19]=a):a=d[19],a}function iw(e){return e.slice(0,1).toUpperCase()+e.slice(1)}let iS=e=>{let t=(0,s.c)(16),{release:n}=e,{t:i}=(0,h.Bdt)();if("archived"===n.state){let e,n;return t[0]!==i?(e=i("release.chip.tooltip.archived"),t[0]=i,t[1]=e):e=t[1],t[2]!==e?(n=(0,o.jsx)(a.EY,{size:1,children:e}),t[2]=e,t[3]=n):n=t[3],n}if("asap"===n.metadata.releaseType){let e,n;return t[4]!==i?(e=i("release.type.asap"),t[4]=i,t[5]=e):e=t[5],t[6]!==e?(n=(0,o.jsx)(a.EY,{size:1,children:e}),t[6]=e,t[7]=n):n=t[7],n}if("scheduled"===n.metadata.releaseType){let e,r="active"===n.state;return t[8]!==r||t[9]!==n||t[10]!==i?(e=n.metadata.intendedPublishAt&&(0,o.jsx)(a.EY,{size:1,children:r?(0,o.jsx)(h.HTc,{t:i,i18nKey:"release.chip.tooltip.intended-for-date",values:{date:(0,h.drb)(n)}}):(0,o.jsx)(h.HTc,{t:i,i18nKey:"release.chip.tooltip.scheduled-for-date",values:{date:(0,h.drb)(n)}})}),t[8]=r,t[9]=n,t[10]=i,t[11]=e):e=t[11],e}if("undecided"===n.metadata.releaseType){let e,n;return t[12]!==i?(e=i("release.type.undecided"),t[12]=i,t[13]=e):e=t[13],t[14]!==e?(n=(0,o.jsx)(a.EY,{size:1,children:e}),t[14]=e,t[15]=n):n=t[15],n}return null},iI={dateStyle:"medium",timeStyle:"short"},ik=(0,c.memo)(function(){let e,t,n,i,r,l,d,c,u,p,f,x,g,b,y,j,v,_,w,S=(0,s.c)(97),{selectedReleaseId:I,selectedPerspectiveName:k}=(0,h.QO2)(),{t:E}=(0,h.Bdt)(),C=(0,h._T7)(),{params:z,setParams:T}=nC(),P=(0,h.ixk)(iI),{loading:A}=(0,h.K0D)(),R=(0,h.I07)(),{editState:D,displayed:$,documentType:B,documentId:Y}=tM(),M=$&&!$._createdAt,L=(0,h.Rcw)(),O=z?.historyVersion;S[0]!==$||S[1]!==Y||S[2]!==O?(e={historyVersion:O,displayed:$,documentId:Y},S[0]=$,S[1]=Y,S[2]=O,S[3]=e):e=S[3];let H=(0,h.LJ4)(e);S[4]!==Y?(t={documentId:Y},S[4]=Y,S[5]=t):t=S[5];let V=(0,h.Jr6)(t),Z=(0,h.hA9)(),{onSetScheduledDraftPerspective:N}=(0,h.B3H)();S[6]!==N||S[7]!==z?.scheduledDraft||S[8]!==C?(n=()=>{z?.scheduledDraft?N(""):C("drafts")},S[6]=N,S[7]=z?.scheduledDraft,S[8]=C,S[9]=n):n=S[9];let K=n;S[10]!==L||S[11]!==N||S[12]!==z||S[13]!==T||S[14]!==C?(i=e=>()=>{if((0,h.Jrl)(e)&&(0,h._9c)(e))return void N((0,h._hI)(e._id));"published"===e&&z?.historyVersion&&T({...z,rev:z?.historyEvent||void 0,since:void 0,historyVersion:void 0});let t=(0,h.Jrl)(e)?(0,h._hI)(e._id):e===L?"":e;z?.scheduledDraft?T({...z,scheduledDraft:void 0},{perspective:t}):C(t)},S[10]=L,S[11]=N,S[12]=z,S[13]=T,S[14]=C,S[15]=i):i=S[15];let F=i;if(S[16]!==B||S[17]!==R){let e=R.get(B);r=!!e&&!0===e.liveEdit,S[16]=B,S[17]=R,S[18]=r}else r=S[18];let W=r;e:{if(W&&!I){l=!1;break e}l=!D?.published}let J=l;S[19]!==$?._id||S[20]!==D?.version||S[21]!==z?(d=e=>{if(!z?.historyVersion){let t=D?.version&&(0,h.YW1)(D?.version)&&(0,h._hI)(e._id)===(0,m._S)(D?.version?._id);return{selected:!!((0,h._hI)(e._id)===(0,m._S)($?._id||"")||t)}}let t=(0,h._hI)(e._id)===z.historyVersion;return{selected:t,disabled:t}},S[19]=$?._id,S[20]=D?.version,S[21]=z,S[22]=d):d=S[22];let U=d;S[23]!==$?._id||S[24]!==D?.draft?._id||S[25]!==W||S[26]!==k||S[27]!==I?(c=()=>!!(W&&!D?.draft?._id&&!I||(0,m._4)($?._id||"")&&(0,h.xo4)(k||"")),S[23]=$?._id,S[24]=D?.draft?._id,S[25]=W,S[26]=k,S[27]=I,S[28]=c):c=S[28];let G=c();t:{let e=$?._id||"";if(G||z?.historyVersion||k||(0,m.A_)(e)){u=!1;break t}if((0,m.R8)(e)){u=!0;break t}if((0,m._4)(e)&&D?.published&&(0,h.xo4)(k||"")){u=!1;break t}u=!0}let Q=u;S[29]!==D?.draft||S[30]!==M||S[31]!==W||S[32]!==V||S[33]!==I?(p=()=>!!V||!!M&&!!I||(!!D?.draft||!!W)&&!!(M&&I||W),S[29]=D?.draft,S[30]=M,S[31]=W,S[32]=V,S[33]=I,S[34]=p):p=S[34];let q=p(),X=Z.document.drafts?.enabled;
328S[35]!==P||S[36]!==D?.published||S[37]!==E?(f=(0,o.jsx)(a.EY,{size:1,children:D?.published&&D?.published?._updatedAt?(0,o.jsx)(h.HTc,{t:E,i18nKey:"release.chip.tooltip.published-date",values:{date:P.format(new Date(D?.published._updatedAt))}}):(0,o.jsx)(o.Fragment,{children:E("release.chip.tooltip.not-published")})}),S[35]=P,S[36]=D?.published,S[37]=E,S[38]=f):f=S[38],S[39]!==F?(x=F("published"),S[39]=F,S[40]=x):x=S[40],S[41]!==E?(g=E("release.chip.published"),S[41]=E,S[42]=g):g=S[42];let ee=D?.published?._id||D?.id||"",et=D?.published?._id||D?.id||"",en=!D?.published;return S[43]!==B||S[44]!==H.notCurrentReleases||S[45]!==A||S[46]!==ee||S[47]!==et||S[48]!==en?(b={documentId:ee,menuReleaseId:et,releases:H.notCurrentReleases,releasesLoading:A,documentType:B,fromRelease:"published",isVersion:!1,disabled:en},S[43]=B,S[44]=H.notCurrentReleases,S[45]=A,S[46]=ee,S[47]=et,S[48]=en,S[49]=b):b=S[49],S[50]!==K||S[51]!==G||S[52]!==J||S[53]!==f||S[54]!==x||S[55]!==g||S[56]!==b?(y=(0,o.jsx)(h.FCT,{tooltipContent:f,disabled:J,onClick:x,selected:G,text:g,tone:"positive",onCopyToDraftsNavigate:K,contextValues:b}),S[50]=K,S[51]=G,S[52]=J,S[53]=f,S[54]=x,S[55]=g,S[56]=b,S[57]=y):y=S[57],S[58]!==P||S[59]!==B||S[60]!==D?.draft||S[61]!==D?.id||S[62]!==D?.published?._id||S[63]!==H.notCurrentReleases||S[64]!==K||S[65]!==F||S[66]!==q||S[67]!==X||S[68]!==Q||S[69]!==W||S[70]!==A||S[71]!==E?(j=X&&(0,o.jsx)(h.FCT,{tooltipContent:(0,o.jsx)(a.EY,{size:1,children:D?.draft?(0,o.jsx)(o.Fragment,{children:D?.draft._updatedAt?(0,o.jsx)(h.HTc,{t:E,i18nKey:"release.chip.tooltip.edited-date",values:{date:P.format(new Date(D?.draft._updatedAt))}}):(0,o.jsx)(h.HTc,{t:E,i18nKey:"release.chip.tooltip.created-date",values:{date:P.format(new Date(D?.draft._createdAt))}})}):(0,o.jsx)(o.Fragment,{children:E(W?"release.chip.tooltip.draft-disabled.live-edit":"release.chip.tooltip.no-edits")})}),selected:Q,disabled:q,text:E("release.chip.draft"),tone:D?.draft?"caution":"neutral",onClick:F("drafts"),onCopyToDraftsNavigate:K,contextValues:{documentId:D?.draft?._id||D?.published?._id||D?.id||"",menuReleaseId:D?.draft?._id||D?.published?._id||D?.id||"",releases:H.notCurrentReleases,releasesLoading:A,documentType:B,fromRelease:"draft",isVersion:!1}}),S[58]=P,S[59]=B,S[60]=D?.draft,S[61]=D?.id,S[62]=D?.published?._id,S[63]=H.notCurrentReleases,S[64]=K,S[65]=F,S[66]=q,S[67]=X,S[68]=Q,S[69]=W,S[70]=A,S[71]=E,S[72]=j):j=S[72],S[73]!==$?._id||S[74]!==B||S[75]!==H.inCreation||S[76]!==H.notCurrentReleases||S[77]!==K||S[78]!==A||S[79]!==E?(v=H.inCreation&&(0,o.jsx)(h.FCT,{tooltipContent:(0,o.jsx)(iS,{release:H.inCreation}),selected:!0,onClick:iE,locked:!1,tone:(0,h.Y73)(H.inCreation),text:H.inCreation.metadata.title||E("release.placeholder-untitled-release"),onCopyToDraftsNavigate:K,contextValues:{disabled:!0,documentId:$?._id||"",menuReleaseId:H.inCreation._id,releases:H.notCurrentReleases,releasesLoading:A,documentType:B,fromRelease:(0,h._hI)(H.inCreation._id),releaseState:H.inCreation.state,isVersion:!0,release:H.inCreation}}),S[73]=$?._id,S[74]=B,S[75]=H.inCreation,S[76]=H.notCurrentReleases,S[77]=K,S[78]=A,S[79]=E,S[80]=v):v=S[80],S[81]!==$||S[82]!==B||S[83]!==D?.version||S[84]!==H.currentReleases||S[85]!==H.notCurrentReleases||S[86]!==U||S[87]!==K||S[88]!==F||S[89]!==A||S[90]!==E?(_=$&&H.currentReleases?.map(e=>(0,o.jsx)(h.FCT,{tooltipContent:(0,o.jsx)(iS,{release:e}),...U(e),onClick:F(e),text:e.metadata.title||E("release.placeholder-untitled-release"),tone:(0,h.Y73)(e),locked:(0,h.KJ$)(e),onCopyToDraftsNavigate:K,contextValues:{documentId:$?._id||"",menuReleaseId:e._id,releases:H.notCurrentReleases,releasesLoading:A,documentType:B,fromRelease:(0,h._hI)(e._id),releaseState:e.state,isVersion:!0,isGoingToUnpublish:!!D?.version&&(0,h.YW1)(D?.version),release:e}},e._id)),S[81]=$,S[82]=B,S[83]=D?.version,S[84]=H.currentReleases,S[85]=H.notCurrentReleases,S[86]=U,S[87]=K,S[88]=F,S[89]=A,S[90]=E,S[91]=_):_=S[91],S[92]!==y||S[93]!==j||S[94]!==v||S[95]!==_?(w=(0,o.jsxs)(o.Fragment,{children:[y,j,v,_]}),S[92]=y,S[93]=j,S[94]=v,S[95]=_,S[96]=w):w=S[96],w});function iE(){}let iC=(0,g.I4)(a.Zp)(e=>{let t=(0,eI.JW)(e.theme);return(0,g.AH)`
329    scrollbar-width: none;
330    z-index: 1;
331    flex: 1;
332    position: relative;
333    > div {
334      &::-webkit-scrollbar {
335        width: 0;
336        height: 0;
337      }
338    }
339
340    ${e.$showGradient&&(0,g.AH)`
341      &::after {
342        content: '';
343        display: block;
344        position: absolute;
345        top: 0;
346        right: 0;
347        bottom: 0;
348        width: 150px;
349        background: linear-gradient(to right, ${(0,eI.B3)(t.color.bg,0)}, var(--card-bg-color));
350        transition: 'opacity 300ms ease-out';
351        pointer-events: none;
352      }
353    `}
354  `}),iz=(0,c.memo)((0,c.forwardRef)(function(e,t){let n,i,d,u,m,f,x,g=(0,s.c)(41),{menuItems:b}=e,{editState:y,onMenuAction:j,onPaneClose:v,onPaneSplit:_,onSetMaximizedPane:w,menuItemGroups:S,schemaType:I,connectionState:k,views:E,unstable_languageFilter:C,documentId:z}=tM(),{features:T}=tN(),{index:P,BackLink:A,hasGroupSiblings:R}=nC(),{maximizedPane:D}=nX(),{actions:$}=(0,h.vM8)(),[B,Y]=(0,c.useState)(null),M=(0,c.useRef)(null),L=function(e){let t,n,i=(0,s.c)(3),[r,l]=(0,c.useState)(!1);return i[0]!==e?(t=()=>{let t=()=>{let t=e.current;if(!t)return;let{scrollWidth:n,clientWidth:i}=t;if(!(n>i))return void l(!1);let{scrollLeft:r}=t;l(!(r+i>=n))},{intersectionObserver:n,mutationObserver:i}=function(){t();let n=e.current;if(!n)return{intersectionObserver:null,mutationObserver:null};let i=new IntersectionObserver(e=>{let t=e[0];t&&l(!t.isIntersecting)}),r=()=>{i.disconnect();let e=n.children[n.children.length-1];i.observe(e)};r();let o=new MutationObserver(()=>{r(),t()});return o.observe(n,{childList:!0,subtree:!1}),{intersectionObserver:i,mutationObserver:o}}();return()=>{n?.disconnect(),i?.disconnect()}},n=[e],i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),(0,c.useEffect)(t,n),r}(M),O=(0,ec.Jr)();g[0]!==$||g[1]!==S||g[2]!==b||g[3]!==j?(n=ic({actionHandler:j,fieldActions:$,menuItems:b,menuItemGroups:S}),g[0]=$,g[1]=S,g[2]=b,g[3]=j,g[4]=n):n=g[4];let H=n;g[5]!==H?(i=H.filter(ia),g[5]=H,g[6]=i):i=g[6];let V=i;g[7]!==H?(d=H.filter(id),g[7]=H,g[8]=d):d=g[8];let Z=d,{collapsed:N,isLast:K}=tr(),F=K&&!N?-1:0,W=T.splitViews&&_&&E.length>1,J=W&&R,U=T.backButton&&P>0,G=!J&&!U&&!!A,{t:Q}=(0,h.Bdt)(r.Z7),q=D?.pane&&"object"==typeof D.pane&&"document"===D.pane.type&&D.pane.options.id===z;g[9]!==q||g[10]!==w||g[11]!==O?(u=()=>{w?.(),q?O.log(n5):O.log(n4)},g[9]=q,g[10]=w,g[11]=O,g[12]=u):u=g[12];let X=u;g[13]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsx)(n9,{}),g[13]=m):m=g[13];let ee=m;g[14]!==A||g[15]!==U||g[16]!==Q?(f=U&&(0,o.jsx)(l.$n,{as:A,"data-as":"a",icon:p.A60,mode:"bleed",tooltipProps:{content:Q("pane-header.back-button.text")}}),g[14]=A,g[15]=U,g[16]=Q,g[17]=f):f=g[17];let et=f;return g[18]!==A||g[19]!==et||g[20]!==N||g[21]!==k||g[22]!==Z||g[23]!==y||g[24]!==X||g[25]!==q||g[26]!==V||g[27]!==v||g[28]!==_||g[29]!==w||g[30]!==t||g[31]!==B||g[32]!==I||g[33]!==L||g[34]!==G||g[35]!==W||g[36]!==J||g[37]!==Q||g[38]!==F||g[39]!==C?(x=(0,o.jsx)(l.vE,{children:N?(0,o.jsx)(tw,{border:!0,ref:t,loading:"connecting"===k&&!y?.draft&&!y?.published,title:ee,tabIndex:F,backButton:et}):(0,o.jsx)(a.Zp,{hidden:N,style:{lineHeight:0},borderBottom:!0,children:(0,o.jsxs)(a.so,{gap:3,paddingY:3,children:[(0,o.jsx)(iC,{$showGradient:L,children:(0,o.jsx)(a.so,{flex:1,gap:1,overflow:"auto",paddingX:3,"data-testid":"document-perspective-list",ref:M,children:(0,o.jsx)(ik,{})})}),(0,o.jsx)(a.az,{flex:"none",paddingRight:3,children:(0,o.jsxs)(a.so,{align:"center",gap:1,children:[C.length>0&&(0,o.jsx)(o.Fragment,{children:C.map((e,t)=>(0,o.jsx)(e,{schemaType:I},`language-filter-${t}`))}),V.map(iA),y&&(0,o.jsx)(ov,{group:"paneActions",children:e=>{let{states:t}=e;return(0,o.jsx)(iT,{contextMenuNodes:Z,setReferenceElement:Y,referenceElement:B,states:t})}}),W&&(0,o.jsx)(l.$n,{"aria-label":Q("buttons.split-pane-button.aria-label"),icon:p.CwM,mode:"bleed",onClick:_,tooltipProps:{content:Q("buttons.split-pane-button.tooltip")}},"split-pane-button"),J&&(0,o.jsx)(l.$n,{icon:p.USm,mode:"bleed",onClick:v,tooltipProps:{content:Q("buttons.split-pane-close-button.title")}},"close-view-button"),w&&(0,o.jsx)(l.$n,{"aria-label":Q(q?"buttons.focus-pane-button.aria-label.collapse":"buttons.focus-pane-button.aria-label.focus"),icon:q?p.dLE:p.mSu,mode:"bleed",onClick:X,tooltipProps:{content:Q(q?"buttons.focus-pane-button.tooltip.collapse":"buttons.focus-pane-button.tooltip.focus")},"data-testid":q?"focus-pane-button-collapse":"focus-pane-button-focus"},"focus-pane-button"),G&&(0,o.jsx)(l.$n,{icon:p.USm,mode:"bleed",tooltipProps:{content:Q("buttons.split-pane-close-group-button.title")},as:A},"close-view-button")]})})]})})}),g[18]=A,g[19]=et,g[20]=N,g[21]=k,g[22]=Z,g[23]=y,g[24]=X,g[25]=q,g[26]=V,g[27]=v,g[28]=_,g[29]=w,g[30]=t,g[31]=B,g[32]=I,g[33]=L,g[34]=G,g[35]=W,g[36]=J,g[37]=Q,g[38]=F,g[39]=C,g[40]=x):x=g[40],x})),iT=(0,c.memo)(function(e){let t,n,i=(0,s.c)(7),{setReferenceElement:r,referenceElement:l,contextMenuNodes:a}=e,d=(0,c.useDeferredValue)(e.states);return i[0]!==d?(t=d.filter(iR),i[0]=d,i[1]=t):t=i[1],i[2]!==a||i[3]!==l||i[4]!==r||i[5]!==t?(n=(0,o.jsx)(iP,{setReferenceElement:r,referenceElement:l,contextMenuNodes:a,states:t}),i[2]=a,i[3]=l,i[4]=r,i[5]=t,i[6]=n):n=i[6],n}),iP=(0,c.memo)(function(e){let t,n,i=(0,s.c)(8),{states:r,setReferenceElement:l,contextMenuNodes:a,referenceElement:d}=e;i[0]!==a||i[1]!==l||i[2]!==r?(t=e=>{let{handleAction:t}=e;return(0,o.jsx)("div",{ref:l,children:(0,o.jsx)(th,{nodes:a,actionsNodes:r.length>0?r.map((e,n)=>(0,o.jsx)(i_,{actionState:e,disabled:!!e.disabled,index:n,onAction:t},e.label)):void 0},"context-menu")})},i[0]=a,i[1]=l,i[2]=r,i[3]=t):t=i[3];let c=t;return i[4]!==d||i[5]!==c||i[6]!==r?(n=(0,o.jsx)(ij,{actionStates:r,referenceElement:d,children:c}),i[4]=d,i[5]=c,i[6]=r,i[7]=n):n=i[7],n});function iA(e){return(0,o.jsx)(tI,{node:e},e.key)}function iR(e){return!e.action||e.action!==is.action}function iD(e){let t,n,i=(0,s.c)(3),{size:r}=e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t={pointerEvents:"none",visibility:"hidden",
354width:0},i[0]=t):t=i[0],i[1]!==r?(n=(0,o.jsx)(l.$n,{"aria-hidden":!0,disabled:!0,size:r,style:t,text:"-"}),i[1]=r,i[2]=n):n=i[2],n}let i$={primary:"primary",success:"positive",warning:"caution",danger:"critical"},iB=(0,c.memo)(function(e){let t,n,i=(0,s.c)(4),{states:r}=e;return 0===r.length?null:(i[0]!==r?(t=r.map(iO),i[0]=r,i[1]=t):t=i[1],i[2]!==t?(n=(0,o.jsx)(a.cV,{space:1,children:t}),i[2]=t,i[3]=n):n=i[3],n)}),iY=(0,c.memo)(function(e){let t,n=(0,s.c)(2),i=(0,c.useDeferredValue)(e.states);return n[0]!==i?(t=(0,o.jsx)(iB,{states:i}),n[0]=i,n[1]=t):t=n[1],t});function iM(){let e,t=(0,s.c)(3),{badges:n,editState:i}=tM();return i&&n?(t[0]!==n||t[1]!==i?(e=(0,o.jsx)(o_,{badges:n,badgeProps:i,children:iL}),t[0]=n,t[1]=i,t[2]=e):e=t[2],e):null}function iL(e){let{states:t}=e;return(0,o.jsx)(iY,{states:t})}function iO(e,t){return(0,o.jsx)(l.m_,{content:e.title,disabled:!e.title,placement:"top",portal:!0,children:(0,o.jsx)(a.Ex,{fontSize:1,mode:"outline",paddingX:2,paddingY:1,radius:4,tone:e.color?i$[e.color]:void 0,style:{whiteSpace:"nowrap"},children:e.label})},`${e.label}-${t}`)}let iH={NOTHING_TO_DELETE:"action.delete.disabled.nothing-to-delete",NOT_READY:"action.delete.disabled.not-ready"},iV=e=>{let t,n,i,l,a,d=(0,s.c)(32),{id:u,type:m,draft:f,release:x}=e,{delete:g}=(0,h.QSs)(u,m,x),[b,y]=(0,c.useState)(!1),[j,v]=(0,c.useState)(!1),{t:_}=(0,h.Bdt)(r.Z7);d[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{v(!1)},d[0]=t):t=d[0];let w=t;d[1]!==g?(n=e=>{v(!1),y(!0),g.execute(e),y(!1)},d[1]=g,d[2]=n):n=d[2];let S=n;d[3]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{v(!0)},d[3]=i):i=d[3];let I=i;d[4]!==u||d[5]!==x||d[6]!==m?(l={id:u,type:m,version:x,permission:"delete"},d[4]=u,d[5]=x,d[6]=m,d[7]=l):l=d[7];let[k,E]=(0,h.LyQ)(l),C=(0,h.iZK)();e:{let e,t,n,i;if(!E&&!k?.granted){let e,t,n;d[8]!==_?(e=_("action.delete.label"),d[8]=_,d[9]=e):e=d[9],d[10]!==C?(t=(0,o.jsx)(h.TLO,{context:"delete-document",currentUser:C}),d[10]=C,d[11]=t):t=d[11],d[12]!==e||d[13]!==t?(n={tone:"critical",icon:p.ucK,disabled:!0,label:e,title:t},d[12]=e,d[13]=t,d[14]=n):n=d[14],a=n;break e}let r=b||!!g.disabled||E;d[15]!==g.disabled||d[16]!==_?(e=g.disabled&&_(iH[g.disabled])||"",d[15]=g.disabled,d[16]=_,d[17]=e):e=d[17],d[18]!==b||d[19]!==_?(t=_(b?"action.delete.running.label":"action.delete.label"),d[18]=b,d[19]=_,d[20]=t):t=d[20],d[21]!==f?._id||d[22]!==S||d[23]!==u||d[24]!==j||d[25]!==m?(n=j&&{type:"custom",component:(0,o.jsx)(on,{action:"delete",id:f?._id||u,type:m,onCancel:w,onConfirm:S})},d[21]=f?._id,d[22]=S,d[23]=u,d[24]=j,d[25]=m,d[26]=n):n=d[26],d[27]!==r||d[28]!==e||d[29]!==t||d[30]!==n?(i={tone:"critical",icon:p.ucK,disabled:r,title:e,label:t,shortcut:"Ctrl+Alt+D",onHandle:I,dialog:n},d[27]=r,d[28]=e,d[29]=t,d[30]=n,d[31]=i):i=d[31],a=i}return a};function iZ(e){let t,n,i,d,u,p,m=(0,s.c)(18),{publishedExists:f,onCancel:x,onConfirm:g}=e,{t:b}=(0,h.Bdt)(r.Z7),y=`deletion-confirmation-${(0,c.useId)()}`;return m[0]!==b?(t=b("action.discard-changes.confirm-dialog.header.text"),m[0]=b,m[1]=t):t=m[1],m[2]!==b?(n=b("action.discard-changes.label"),m[2]=b,m[3]=n):n=m[3],m[4]!==g||m[5]!==n?(i={confirmButton:{text:n,onClick:g}},m[4]=g,m[5]=n,m[6]=i):i=m[6],m[7]!==f||m[8]!==b?(d=b(f?"action.discard-changes.confirm-dialog.confirm-discard-changes":"action.discard-changes.confirm-dialog.confirm-discard-changes-draft"),m[7]=f,m[8]=b,m[9]=d):d=m[9],m[10]!==d?(u=(0,o.jsx)(a.EY,{size:1,children:d}),m[10]=d,m[11]=u):u=m[11],m[12]!==y||m[13]!==x||m[14]!==t||m[15]!==i||m[16]!==u?(p=(0,o.jsx)(l.lG,{width:1,id:y,header:t,footer:i,onClose:x,onClickOutside:x,children:u}),m[12]=y,m[13]=x,m[14]=t,m[15]=i,m[16]=u,m[17]=p):p=m[17],p}iV.action="delete",iV.displayName="DeleteAction";let iN={NO_CHANGES:"action.discard-changes.disabled.no-change",NOT_PUBLISHED:"action.discard-changes.disabled.not-published",NOT_READY:"action.discard-changes.disabled.not-ready"},iK=e=>{let t,n,i,l,a,d=(0,s.c)(29),{id:u,type:f,published:x,liveEdit:g,release:b}=e,{discardChanges:y}=(0,h.QSs)(u,f,b),[j,v]=(0,c.useState)(!1);d[0]!==u||d[1]!==b||d[2]!==f?(t={id:u,type:f,version:b,permission:"discardDraft"},d[0]=u,d[1]=b,d[2]=f,d[3]=t):t=d[3];let[_,w]=(0,h.LyQ)(t),S=(0,h.iZK)(),{displayed:I}=tM(),{t:k}=(0,h.Bdt)(r.Z7),E=I?._id&&(0,m._4)(I?._id);d[4]!==y?(n=()=>{y.execute(),v(!1)},d[4]=y,d[5]=n):n=d[5];let C=n;d[6]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{v(!1)},d[6]=i):i=d[6];let z=i;d[7]===Symbol.for("react.memo_cache_sentinel")?(l=()=>
354{v(!0)},d[7]=l):l=d[7];let T=l;e:{let e,t,n,i;if(g||E){a=null;break e}if(!w&&!_?.granted){let e,t,n;d[8]!==k?(e=k("action.discard-changes.label"),d[8]=k,d[9]=e):e=d[9],d[10]!==S?(t=(0,o.jsx)(h.TLO,{context:"discard-changes",currentUser:S}),d[10]=S,d[11]=t):t=d[11],d[12]!==e||d[13]!==t?(n={tone:"critical",icon:p.NAP,disabled:!0,label:e,title:t},d[12]=e,d[13]=t,d[14]=n):n=d[14],a=n;break e}let r=!!y.disabled||w,l=y.disabled&&iN[y.disabled]||"";d[15]!==k||d[16]!==l?(e=k(l),d[15]=k,d[16]=l,d[17]=e):e=d[17],d[18]!==k?(t=k("action.discard-changes.label"),d[18]=k,d[19]=t):t=d[19],d[20]!==C||d[21]!==j||d[22]!==x?(n=j&&{type:"custom",component:(0,o.jsx)(iZ,{onCancel:z,onConfirm:C,publishedExists:!!x})},d[20]=C,d[21]=j,d[22]=x,d[23]=n):n=d[23],d[24]!==n||d[25]!==r||d[26]!==e||d[27]!==t?(i={tone:"critical",icon:p.NAP,disabled:r,title:e,label:t,onHandle:T,dialog:n},d[24]=n,d[25]=r,d[26]=e,d[27]=t,d[28]=i):i=d[28],a=i}return a};iK.action="discardChanges",iK.displayName="DiscardChangesAction";let iF={NOTHING_TO_DUPLICATE:"action.duplicate.disabled.nothing-to-duplicate",NOT_READY:"action.duplicate.disabled.not-ready"},iW=e=>{let t,n,i,l=(0,s.c)(29),{id:a,type:d,release:u,mapDocument:m}=e,f=(0,h.q3J)(),{duplicate:g}=(0,h.QSs)(a,d,u),{navigateIntent:b}=(0,_.rd)(),[y,j]=(0,c.useState)(!1);l[0]!==a||l[1]!==u||l[2]!==d?(t={id:a,type:d,version:u,permission:"duplicate"},l[0]=a,l[1]=u,l[2]=d,l[3]=t):t=l[3];let[v,w]=(0,h.LyQ)(t),{t:S}=(0,h.Bdt)(r.Z7),I=(0,h.iZK)();l[4]!==f.pair||l[5]!==g||l[6]!==a||l[7]!==m||l[8]!==b||l[9]!==d?(n=async()=>{let e=(0,x.A)();j(!0);let t=(0,W._)(f.pair.operationEvents(a,d).pipe((0,M.p)(iJ)));g.execute(e,{mapDocument:m}),await t,b("edit",{id:e,type:d}),j(!1)},l[4]=f.pair,l[5]=g,l[6]=a,l[7]=m,l[8]=b,l[9]=d,l[10]=n):n=l[10];let k=n;e:{let e,t,n;if(!w&&!v?.granted){let e,t,n;l[11]!==S?(e=S("action.duplicate.label"),l[11]=S,l[12]=e):e=l[12],l[13]!==I?(t=(0,o.jsx)(h.TLO,{context:"duplicate-document",currentUser:I}),l[13]=I,l[14]=t):t=l[14],l[15]!==e||l[16]!==t?(n={icon:p.TdU,disabled:!0,label:e,title:t},l[15]=e,l[16]=t,l[17]=n):n=l[17],i=n;break e}let r=y||!!g.disabled||w;l[18]!==y||l[19]!==S?(e=S(y?"action.duplicate.running.label":"action.duplicate.label"),l[18]=y,l[19]=S,l[20]=e):e=l[20],l[21]!==g.disabled||l[22]!==S?(t=g.disabled?S(iF[g.disabled]):"",l[21]=g.disabled,l[22]=S,l[23]=t):t=l[23],l[24]!==k||l[25]!==r||l[26]!==e||l[27]!==t?(n={icon:p.TdU,disabled:r,label:e,title:t,onHandle:k},l[24]=k,l[25]=r,l[26]=e,l[27]=t,l[28]=n):n=l[28],i=n}return i};function iJ(e){return"duplicate"===e.op&&"success"===e.type}iW.action="duplicate",iW.displayName="DuplicateAction";let iU=(0,em.g_)({name:"Document Published",version:1,description:'User clicked the "Publish" button in the document pane'}),iG={LIVE_EDIT_ENABLED:"action.publish.live-edit.publish-disabled",ALREADY_PUBLISHED:"action.publish.already-published.no-time-ago.tooltip",NO_CHANGES:"action.publish.no-changes.tooltip",NOT_READY:"action.publish.disabled.not-ready"},iQ={status:"published"};function iq(e,t,n){return"ALREADY_PUBLISHED"===e&&t?(0,o.jsx)(iX,{publishedAt:t}):n(iG[e])}function iX(e){let t,n,i,l=(0,s.c)(6),{publishedAt:a}=e,{t:d}=(0,h.Bdt)(r.Z7);l[0]===Symbol.for("react.memo_cache_sentinel")?(t={useTemporalPhrase:!0},l[0]=t):t=l[0];let c=(0,h.Vq9)(a,t);return l[1]!==d||l[2]!==c?(n=d("action.publish.already-published.tooltip",{timeSincePublished:c}),l[1]=d,l[2]=c,l[3]=n):n=l[3],l[4]!==n?(i=(0,o.jsx)("span",{children:n}),l[4]=n,l[5]=i):i=l[5],i}let i0=e=>{let t,n,i,l,a,d,u,x,g,b,y,j=(0,s.c)(79),{id:v,type:_,liveEdit:w,draft:S,published:I,release:k}=e,[E,C]=(0,c.useState)(null),{publish:z}=(0,h.QSs)(v,_),{changesOpen:T,documentId:P,documentType:A,value:R}=tM(),D=(0,h.dWw)(R._id,_),$=(0,h.M7h)(v,_),B=(0,h.zX2)(P,A),{t:Y}=(0,h.Bdt)(r.Z7);j[0]!==B?.draft||j[1]!==B?.published?(t=B?.draft||B?.published||{},j[0]=B?.draft,j[1]=B?.published,j[2]=t):t=j[2];let M=t._rev;j[3]!==D.validation?(n=D.validation.some(f.Uw),j[3]=D.validation,j[4]=n):n=j[4];let L=n,[O,H]=(0,c.useState)(!1),V=$.isSyncing,Z=D.isValidating;j[5]!==v||j[6]!==_?(i={id:v,type:_,permission:"publish"},j[5]=v,j[6]=_,j[7]=i):i=j[7];let[N,K]=(0,h.LyQ)(i),F=(0,h.iZK)();j[8]!==L||j[9]!==z.disabled||j[10]!==I||j[11]!==Y?(l=z.disabled?
354iq(z.disabled,(I||{})._updatedAt,Y)||"":L?Y("action.publish.validation-issues.tooltip"):"",j[8]=L,j[9]=z.disabled,j[10]=I,j[11]=Y,j[12]=l):l=j[12];let W=l,J=I?._rev;j[13]!==J||j[14]!==z?(a=()=>{z.execute(),C({status:"publishing",publishRevision:J})},j[13]=J,j[14]=z,j[15]=a):a=j[15];let U=a;j[16]!==U||j[17]!==L||j[18]!==V||j[19]!==O||j[20]!==M||j[21]!==D.isValidating||j[22]!==D.revision?(d=()=>{let e=!1===D.isValidating&&D.revision!==M;O&&!V&&e&&(L||U(),H(!1))},j[16]=U,j[17]=L,j[18]=V,j[19]=O,j[20]=M,j[21]=D.isValidating,j[22]=D.revision,j[23]=d):d=j[23],j[24]!==U||j[25]!==L||j[26]!==V||j[27]!==Z||j[28]!==O||j[29]!==M||j[30]!==D.isValidating||j[31]!==D.revision?(u=[V,U,L,O,D.revision,M,Z,D.isValidating],j[24]=U,j[25]=L,j[26]=V,j[27]=Z,j[28]=O,j[29]=M,j[30]=D.isValidating,j[31]=D.revision,j[32]=u):u=j[32],(0,c.useEffect)(d,u),j[33]!==J||j[34]!==E?(x=()=>{let e=E?.status==="publishing"&&J!==E.publishRevision,t=e?iQ:null,n=setTimeout(()=>{C(t)},e?200:4e3);return()=>clearTimeout(n)},j[33]=J,j[34]=E,j[35]=x):x=j[35],j[36]!==T||j[37]!==J||j[38]!==E?(g=[T,E,J],j[36]=T,j[37]=J,j[38]=E,j[39]=g):g=j[39],(0,c.useEffect)(x,g);let G=(0,ec.Jr)();j[40]!==U||j[41]!==S?._createdAt||j[42]!==I||j[43]!==M||j[44]!==$.isSyncing||j[45]!==G||j[46]!==D.isValidating||j[47]!==D.revision?(b=()=>{G.log(iU,{publishedImmediately:!S?._createdAt,previouslyPublished:!!I}),$.isSyncing||D.isValidating||D.revision!==M?H(!0):U()},j[40]=U,j[41]=S?._createdAt,j[42]=I,j[43]=M,j[44]=$.isSyncing,j[45]=G,j[46]=D.isValidating,j[47]=D.revision,j[48]=b):b=j[48];let Q=b;e:{let e,t,n;if(k||w){y=null;break e}if((0,m._4)(R._id)&&null!==S){let e,t,n;j[49]!==Y?(e=Y("action.publish.label"),j[49]=Y,j[50]=e):e=j[50];let i=I?._updatedAt;j[51]!==Y||j[52]!==i?(t=iq("ALREADY_PUBLISHED",i,Y),j[51]=Y,j[52]=i,j[53]=t):t=j[53],j[54]!==e||j[55]!==t?(n={tone:"default",icon:p.VQ$,label:e,title:t,disabled:!0},j[54]=e,j[55]=t,j[56]=n):n=j[56],y=n;break e}if(!K&&!N?.granted){let e,t,n;j[57]!==Y?(e=Y("action.publish.label"),j[57]=Y,j[58]=e):e=j[58],j[59]!==F?(t=(0,o.jsx)(h.TLO,{context:"publish-document",currentUser:F}),j[59]=F,j[60]=t):t=j[60],j[61]!==e||j[62]!==t?(n={tone:"default",icon:p.VQ$,label:e,title:t,disabled:!0},j[61]=e,j[62]=t,j[63]=n):n=j[63],y=n;break e}let i=!!(O||B?.transactionSyncLock?.enabled||E?.status==="publishing"||E?.status==="published"||L||z.disabled),r=i||K;j[64]!==O||j[65]!==E?.status||j[66]!==Y?(e=Y(E?.status==="published"?"action.publish.published.label":O||E?.status==="publishing"?"action.publish.running.label":"action.publish.draft.label"),j[64]=O,j[65]=E?.status,j[66]=Y,j[67]=e):e=j[67],j[68]!==O||j[69]!==E?.status||j[70]!==Y||j[71]!==W?(t=O?Y("action.publish.waiting"):E?.status==="published"||E?.status==="publishing"?null:W,j[68]=O,j[69]=E?.status,j[70]=Y,j[71]=W,j[72]=t):t=j[72];let l=i||O?null:"Ctrl+Alt+P";j[73]!==Q||j[74]!==r||j[75]!==e||j[76]!==t||j[77]!==l?(n={disabled:r,tone:"default",label:e,icon:p.VQ$,title:t,shortcut:l,onHandle:Q},j[73]=Q,j[74]=r,j[75]=e,j[76]=t,j[77]=l,j[78]=n):n=j[78],y=n}return y};i0.action="publish",i0.displayName="PublishAction";let i1={NOT_PUBLISHED:"action.unpublish.disabled.not-published",NOT_READY:"action.unpublish.disabled.not-ready",LIVE_EDIT_ENABLED:"action.unpublish.disabled.live-edit-enabled"},i2=e=>{let t,n,i,l,a,d,u=(0,s.c)(22),{id:m,type:f,draft:x,liveEdit:g,release:b}=e,{unpublish:y}=(0,h.QSs)(m,f),[j,v]=(0,c.useState)(!1);u[0]!==m||u[1]!==f?(t={id:m,type:f,permission:"unpublish"},u[0]=m,u[1]=f,u[2]=t):t=u[2];let[_,w]=(0,h.LyQ)(t),S=(0,h.iZK)(),{t:I}=(0,h.Bdt)(r.Z7),{selectedPerspective:k}=(0,h.QO2)(),E="drafts"===k;u[3]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{v(!1)},u[3]=n):n=u[3];let C=n;u[4]!==y?(i=()=>{v(!1),y.execute()},u[4]=y,u[5]=i):i=u[5];let z=i;e:{if(j){let e,t=x?._id||m;u[6]!==z||u[7]!==t||u[8]!==f?(e={type:"dialog",onClose:C,content:(0,o.jsx)(on,{id:t,type:f,action:"unpublish",onCancel:C,onConfirm:z})},u[6]=z,u[7]=t,u[8]=f,u[9]=e):e=u[9],l=e;break e}l=null}let T=l;return u[10]!==S||u[11]!==T||u[12]!==E||u[13]!==w||u[14]!==g||u[15]!==_?.granted||u[16]!==b||u[17]!==I||u[18]!==y.disabled?(a=()=>b||E||g?null:w||_?.granted?{tone:"critical",icon:p.wvk,disabled:!!y.disabled||w,label:I("action.unpublish.label"),title:y.disabled?I(i1[y.disabled]):"",onHandle:()=>v(!0),dialog:T}
354:{tone:"critical",icon:p.wvk,label:"Unpublish",title:(0,o.jsx)(h.TLO,{context:"unpublish-document",currentUser:S}),disabled:!0},u[10]=S,u[11]=T,u[12]=E,u[13]=w,u[14]=g,u[15]=_?.granted,u[16]=b,u[17]=I,u[18]=y.disabled,u[19]=a):a=u[19],u[20]!==a?(d=a(),u[20]=a,u[21]=d):d=u[21],d};i2.action="unpublish",i2.displayName="UnpublishAction";let i3=(0,c.memo)(function(e){let t,n,i,r,d,u,p,m,f,x=(0,s.c)(37),{disabled:g,states:b}=e,{__internal_tasks:y}=(0,h.For)(),{editState:j}=tM(),{params:v}=nC(),_=!!v?.rev,{selectedReleaseId:w}=(0,h.QO2)();x[0]!==b?([t,...n]=b,x[0]=b,x[1]=t,x[2]=n):(t=x[1],n=x[2]);let[S,I]=(0,c.useState)(null);e:{let e,n,r,s;if(!t||!t.title&&!t.shortcut){i=null;break e}x[3]===Symbol.for("react.memo_cache_sentinel")?(e={maxWidth:300},x[3]=e):e=x[3],x[4]!==t.title?(n=t.title&&(0,o.jsx)(a.EY,{size:1,children:t.title}),x[4]=t.title,x[5]=n):n=x[5],x[6]!==t.shortcut?(r=t.shortcut&&(0,o.jsx)(l.qW,{"data-testid":"document-status-bar-hotkeys",fontSize:1,style:{marginTop:-4,marginBottom:-4},keys:String(t.shortcut).split("+").map(re)}),x[6]=t.shortcut,x[7]=r):r=x[7],x[8]!==n||x[9]!==r?(s=(0,o.jsxs)(a.so,{style:e,align:"center",gap:3,children:[n,r]}),x[8]=n,x[9]=r,x[10]=s):s=x[10],i=s}let k=i;x[11]!==j?.liveEdit||x[12]!==t||x[13]!==w||x[14]!==_?(r=_?!!t:w?t&&!(0,h.UYh)(t):t&&!j?.liveEdit,x[11]=j?.liveEdit,x[12]=t,x[13]=w,x[14]=_,x[15]=r):r=x[15];let E=r;x[16]!==t||x[17]!==n||x[18]!==E?(d=E?n:[t,...n].filter(Boolean),x[16]=t,x[17]=n,x[18]=E,x[19]=d):d=x[19];let C=d,z=y&&y.footerAction;return x[20]!==g||x[21]!==t||x[22]!==E||x[23]!==k?(u=E&&(0,o.jsx)(a.XS,{zOffset:200,children:(0,o.jsx)(l.m_,{disabled:!k,content:k,placement:"top",children:(0,o.jsx)(a.BJ,{children:(0,o.jsx)(l.$n,{"data-testid":`action-${to(t.label)}`,disabled:g||!!t.disabled,icon:t.icon,onClick:t.onHandle,ref:I,text:t.label,tone:t.tone||"primary"})})})}),x[20]=g,x[21]=t,x[22]=E,x[23]=k,x[24]=u):u=x[24],x[25]!==g||x[26]!==C?(p=C.length>0&&(0,o.jsx)(iv,{actionStates:C,disabled:g}),x[25]=g,x[26]=C,x[27]=p):p=x[27],x[28]!==S||x[29]!==t||x[30]!==E?(m=E&&t&&t.dialog&&(0,o.jsx)(iy,{dialog:t.dialog,referenceElement:S}),x[28]=S,x[29]=t,x[30]=E,x[31]=m):m=x[31],x[32]!==z||x[33]!==u||x[34]!==p||x[35]!==m?(f=(0,o.jsxs)(a.so,{align:"center",gap:1,children:[z,u,p,m]}),x[32]=z,x[33]=u,x[34]=p,x[35]=m,x[36]=f):f=x[36],f}),i4=(0,c.memo)(function(){let e,t=(0,s.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(ov,{group:"default",children:rt}),t[0]=e):e=t[0],e});function i5(e){let t,n,i=(0,s.c)(6),{connectionState:r,documentId:l}=tM();i[0]!==e.states?(t=e.states.filter(i6),i[0]=e.states,i[1]=t):t=i[1];let a=t;if(0===a.length)return null;let d="connected"!==r;return i[2]!==l||i[3]!==a||i[4]!==d?(n=(0,o.jsx)(i3,{disabled:d,states:a},l),i[2]=l,i[3]=a,i[4]=d,i[5]=n):n=i[5],n}function i6(e){return!e.action||e.action!==is.action}let i7=(0,c.memo)(function(){let e,t=(0,s.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(ov,{group:"default",children:rn}),t[0]=e):e=t[0],e});function i8(e){let t,n,i,r=(0,s.c)(8),{states:l}=e,{connectionState:a,editState:d,revisionId:c}=tM();r[0]!==d?.draft||r[1]!==d?.published?(t=d?.draft||d?.published||{},r[0]=d?.draft,r[1]=d?.published,r[2]=t):t=r[2];let u=t._rev===c,p="connected"!==a||!!u;return r[3]!==l?(n=l.filter(i9).slice(-1),r[3]=l,r[4]=n):n=r[4],r[5]!==p||r[6]!==n?(i=(0,o.jsx)(i3,{disabled:p,states:n}),r[5]=p,r[6]=n,r[7]=i):i=r[7],i}function i9(e){return!!e.action&&e.action===is.action}function re(e){return e.slice(0,1).toUpperCase()+e.slice(1).toLowerCase()}function rt(e){let{states:t}=e;return(0,o.jsx)(i5,{states:t})}function rn(e){let{states:t}=e;return(0,o.jsx)(i8,{states:t})}let ri={create:p.REV,delete:p.ucK,discardDraft:p.USm,initial:p.REV,editDraft:p.qUP,editLive:p.qUP,publish:p.VQ$,unpublish:p.wvk},rr=(0,g.I4)(p.YJP)`
355  transition: transform 200ms;
356  &[data-expanded='true'] {
357    transform: rotate(-90deg);
358  }
359`;function rl(e){let t,n,i,a,d,c=(0,s.c)(14),{isExpanded:u,onExpand:p}=e,{t:m}=(0,h.Bdt)(r.Z7);c[0]!==u||c[1]!==p?(t=e=>{e.stopPropagation(),function(e){if(e)return;let t=document.getElementById(rv);if(t){let e=t.children[0];if(!(e.scrollHeight>e.clientHeight)){let t=getComputedStyle(e).overflowY;e.style.overflowY="hidden",setTimeout(()=>{e.style.overflowY=t},0)}}}(u),p()},c[0]=u,c[1]=p,c[2]=t):t=c[2];let f=t;return c[3]!==u?(n=(0,o.jsx)(rr,{"data-expanded":u}),c[3]=u,c[4]=n):n=c[4],c[5]!==u||c[6]!==m?(i=m(u?"timeline-item.menu.action-collapse":"timeline-item.menu.action-expand"),c[5]=u,c[6]=m,c[7]=i):i=c[7],c[8]!==i?(a={content:i},c[8]=i,c[9]=a):a=c[9],c[10]!==f||c[11]!==n||c[12]!==a?(d=(0,o.jsx)(l.$n,{mode:"bleed",icon:n,tooltipProps:a,onClick:f}),c[10]=f,c[11]=n,c[12]=a,c[13]=d):d=c[13],d}let ro=(0,g.I4)(a.BJ)`
360  max-width: 200px;
361`,rs=(0,g.I4)(a.so)`
362  max-height: ${e=>e.$maxHeight};
363  min-width: 244px;
364`,ra=(0,g.I4)(a.az)(({$visible:e})=>(0,g.AH)`
365    opacity: 0;
366    pointer-events: none;
367    transition: opacity 0.2s;
368
369    ${e&&(0,g.AH)`
370      opacity: 1;
371      pointer-events: auto;
372    `}
373  `),rd={initial:"timeline.operation.created-initial",create:"timeline.operation.created",publish:"timeline.operation.published",editLive:"timeline.operation.edited-live",editDraft:"timeline.operation.edited-draft",unpublish:"timeline.operation.unpublished",discardDraft:"timeline.operation.draft-discarded",delete:"timeline.operation.deleted"};function rc(e){let t,n,i=(0,s.c)(9),{maxLength:r,userIds:l,size:d,withTooltip:c}=e,u=void 0===c||c;if(i[0]!==l||i[1]!==u){let e;i[3]!==u?(e=e=>(0,o.jsx)(h.H8m,{user:e,withTooltip:u},e),i[3]=u,i[4]=e):e=i[4],t=l.map(e),i[0]=l,i[1]=u,i[2]=t}else t=i[2];return i[5]!==r||i[6]!==d||i[7]!==t?(n=(0,o.jsx)(a.GE,{maxLength:r,size:d,children:t}),i[5]=r,i[6]=d,i[7]=t,i[8]=n):n=i[8],n}
373let ru=(0,g.I4)(a.so)(e=>{let t=(0,eI.JW)(e.theme),n=e.$color;return(0,g.AH)`
374    --card-icon-color: ${t.color.avatar[n].fg};
375    background-color: ${t.color.avatar[n].bg};
376    box-shadow: 0 0 0 1px var(--card-bg-color);
377
378    position: absolute;
379    width: ${t.avatar.sizes[0].size}px;
380    height: ${t.avatar.sizes[0].size}px;
381    right: -3px;
382    bottom: -3px;
383    border-radius: 50%;
384  `}),rp={initial:"blue",create:"blue",publish:"green",editLive:"green",editDraft:"yellow",unpublish:"orange",discardDraft:"orange",delete:"red",withinSelection:"magenta"},rm={minimal:!0,useTemporalPhrase:!0},rh=(0,g.I4)(d.EA)(e=>{let t=(0,eI.JW)(e.theme);return(0,g.AH)`
385    width: 6ch;
386    height: ${t.font.text.sizes[0].lineHeight}px;
387  `}),rf=e=>{let t,n,i,r=(0,s.c)(10),{userId:l}=e,[d,c]=(0,h.Jd3)(l);return r[0]!==c||r[1]!==d?(t=(0,o.jsx)(a.az,{children:c||!d?(0,o.jsx)(h.LIN,{animated:!0}):(0,o.jsx)(h.H8m,{user:d})}),r[0]=c,r[1]=d,r[2]=t):t=r[2],r[3]!==c||r[4]!==d?(n=(0,o.jsx)(a.az,{children:c||!d?.displayName?(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(rh,{animated:!0})}):(0,o.jsx)(a.EY,{muted:!0,size:1,children:d.displayName})}),r[3]=c,r[4]=d,r[5]=n):n=r[5],r[6]!==t||r[7]!==n||r[8]!==l?(i=(0,o.jsxs)(a.so,{align:"center",gap:2,padding:1,children:[t,n]},l),r[6]=t,r[7]=n,r[8]=l,r[9]=i):i=r[9],i},rx=e=>{let t,n,i,r,l=(0,s.c)(9),{collaborators:d}=e,{t:c}=(0,h.Bdt)("studio");return l[0]!==c?(t=c("timeline.changes.title"),l[0]=c,l[1]=t):t=l[1],l[2]!==t?(n=(0,o.jsx)(a.az,{padding:1,paddingBottom:2,children:(0,o.jsx)(a.EY,{size:1,weight:"medium",children:t})}),l[2]=t,l[3]=n):n=l[3],l[4]!==d?(i=d.map(rb),l[4]=d,l[5]=i):i=l[5],l[6]!==n||l[7]!==i?(r=(0,o.jsxs)(a.BJ,{paddingBottom:1,children:[n,i]}),l[6]=n,l[7]=i,l[8]=r):r=l[8],r};function rg(e){let t,n,i,r,d,c,u,p,m,f,x,g,b,y,j,v,_,w,S,I,k,E=(0,s.c)(55),{chunk:C,isSelected:z,onSelect:T,collaborators:P,optionsMenu:A}=e,{t:R}=(0,h.Bdt)("studio"),{type:D,endTimestamp:$}=C;E[0]!==D?(t=ri[D],E[0]=D,E[1]=t):t=E[1];let B=t;E[2]!==C.authors?(n=Array.from(C.authors),E[2]=C.authors,E[3]=n):n=E[3];let Y=n;E[4]!==P?(i=P?Array.from(P):[],E[4]=P,E[5]=i):i=E[5];let M=i,L="delete"!==D;E[6]===Symbol.for("react.memo_cache_sentinel")?(r={dateStyle:"medium",timeStyle:"short"},E[6]=r):r=E[6];let O=(0,h.ixk)(r);E[7]!==$?(d=new Date($),E[7]=$,E[8]=d):d=E[8];let H=(0,h.Vq9)(d||"",rm);if(E[9]!==O||E[10]!==$){let e=new Date($);c=O.format(e),E[9]=O,E[10]=$,E[11]=c}else c=E[11];let V=c;E[12]!==C||E[13]!==L||E[14]!==T?(u=e=>{e.preventDefault(),e.stopPropagation(),L&&T(C)},E[12]=C,E[13]=L,E[14]=T,E[15]=u):u=E[15];let Z=u;E[16]===Symbol.for("react.memo_cache_sentinel")?(p={position:"relative"},E[16]=p):p=E[16],E[17]!==Y?(m=(0,o.jsx)(rc,{maxLength:3,userIds:Y,size:2}),E[17]=Y,E[18]=m):m=E[18];let N=rp[D];return E[19]!==B?(f=B&&(0,o.jsx)(B,{}),E[19]=B,E[20]=f):f=E[20],E[21]!==f?(x=(0,o.jsx)(a.EY,{size:0,children:f}),E[21]=f,E[22]=x):x=E[22],E[23]!==N||E[24]!==x?(g=(0,o.jsx)(ru,{align:"center",justify:"center",$color:N,children:x}),E[23]=N,E[24]=x,E[25]=g):g=E[25],E[26]!==g||E[27]!==m?(b=(0,o.jsxs)("div",{style:p,children:[m,g]}),E[26]=g,E[27]=m,E[28]=b):b=E[28],E[29]!==R||E[30]!==D?(y=R(rd[D])||(0,o.jsx)("code",{children:D}),E[29]=R,E[30]=D,E[31]=y):y=E[31],E[32]!==y?(j=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:y}),E[32]=y,E[33]=j):j=E[33],E[34]!==V||E[35]!==$||E[36]!==H?(v=(0,o.jsx)(a.EY,{as:"time",size:1,muted:!0,dateTime:$,title:V,children:H}),E[34]=V,E[35]=$,E[36]=H,E[37]=v):v=E[37],E[38]!==j||E[39]!==v?(_=(0,o.jsxs)(a.BJ,{space:2,children:[j,v]}),E[38]=j,E[39]=v,E[40]=_):_=E[40],E[41]!==M?(w=M.length>0&&(0,o.jsx)(a.so,{flex:1,justify:"flex-end",align:"center",children:(0,o.jsx)(l.m_,{placement:"top",content:(0,o.jsx)(rx,{collaborators:M}),portal:!0,children:(0,o.jsx)(a.az,{paddingLeft:2,paddingY:2,children:(0,o.jsx)(rc,{maxLength:3,userIds:M,size:0,withTooltip:!1})})})}),E[41]=M,E[42]=w):w=E[42],E[43]!==b||E[44]!==_||E[45]!==w?(S=(0,o.jsxs)(a.so,{align:"center",gap:3,children:[b,_,w]}),E[43]=b,E[44]=_,E[45]=w,E[46]=S):S=E[46],E[47]!==C.id||E[48]!==Z||E[49]!==z||E[50]!==S?(I=(0,o.jsx)(a.Zp,{as:"button",onClick:Z,padding:2,pressed:z,radius:2,"data-ui":"timelineItem","data-testid":"timeline-item-button","data-chunk-id":C.id,children:S}),E[47]=C.id,E[48]=Z,E[49]=z,E[50]=S,E[51]=I):I=E[51],E[52]!==A||E[53]!==I?(k=(0,o.jsxs)(a.so,{align:"center",gap:1,children:[I,A]}),E[52]=A,E[53]=I,E[54]=k):k=E[54],k}function rb(e){return(0,o.jsx)(rf,{userId:e},e)}let ry=e=>"publish"!==e.type,rj=e=>"publish"===e.type,rv="timeline-list-wrapper",r_=e=>{let t,n,i,r,l,d,u,p,m,f,x,g,b,y,j,v,_=(0,s.c)(51),{chunks:w,hasMoreChunks:S,lastChunk:I,onLoadMore:k,onSelect:E,listMaxHeight:C}=e,z=void 0===C?"calc(100vh - 280px)":C,[T,P]=(0,c.useState)(!1),{t:A}=(0,h.Bdt)("studio"),R=I?.id;_[0]!==w?(t=function(e){let t=[];for(let n of e){if(rj(n)){t.push({...n,type:"publish",children:[],collaborators:new Set});continue}if(ry(n)){let e=function(e){let t=null;for(let n=e.length-1;n>=0;n--){let i=e[n];if(rj(i)){t=i;break}
387if("editDraft"!==i.type)break}return t}(t);if("editDraft"===n.type&&e?.type==="publish"){Array.from(n.authors).forEach(t=>{e.collaborators.add(t)}),e.children.push(n.id),t.push({...n,parentId:e.id});continue}}ry(n)&&t.push(n)}return t}(w),_[0]=w,_[1]=t):t=_[1];let D=t;_[2]!==D||_[3]!==R?(n=()=>{if(R){let e=D.find(e=>e.id===R);if(e&&ry(e)&&e.parentId)return new Set([e.parentId])}return new Set},_[2]=D,_[3]=R,_[4]=n):n=_[4];let[$,B]=(0,c.useState)(n);if(_[5]!==D||_[6]!==R?(i=()=>{if(R){let e=D.find(e=>e.id===R);if(e&&ry(e)&&e.parentId){let t=e.parentId;B(e=>{if(e.has(t))return e;let n=new Set(e);return n.add(t),n})}}},r=[D,R],_[5]=D,_[6]=R,_[7]=i,_[8]=r):(i=_[7],r=_[8]),(0,c.useEffect)(i,r),_[9]!==D||_[10]!==$){let e;_[12]!==$?(e=e=>!!rj(e)||!e.parentId||$.has(e.parentId),_[12]=$,_[13]=e):e=_[13],l=D.filter(e),_[9]=D,_[10]=$,_[11]=l}else l=_[11];let Y=l;_[14]!==Y.length||_[15]!==S||_[16]!==k?(d=()=>{Y.length<16&&S&&k()},_[14]=Y.length,_[15]=S,_[16]=k,_[17]=d):d=_[17],_[18]!==Y||_[19]!==S||_[20]!==k?(u=[Y,S,k],_[18]=Y,_[19]=S,_[20]=k,_[21]=u):u=_[21],(0,c.useEffect)(d,u),_[22]===Symbol.for("react.memo_cache_sentinel")?(p=e=>()=>B(t=>{let n=new Set(t);return t.has(e)?n.delete(e):n.add(e),n}),_[22]=p):p=_[22];let M=p;_[23]!==Y||_[24]!==R?(m=R?Y.findIndex(e=>e.id===R):-1,_[23]=Y,_[24]=R,_[25]=m):m=_[25];let L=m;_[26]!==w||_[27]!==E?(f=e=>{let t=w.find(t=>t.id===e.id);t?E(t):(console.error("TimelineItem: chunk not found"),E(e))},_[26]=w,_[27]=E,_[28]=f):f=_[28];let O=f;_[29]!==$||_[30]!==Y.length||_[31]!==O||_[32]!==S||_[33]!==R?(x=(e,t)=>{let{activeIndex:n}=t;return(0,o.jsxs)(a.az,{paddingBottom:1,paddingTop:+(0===n),paddingRight:1,paddingLeft:ry(e)&&e.parentId?4:1,children:[(0,o.jsx)(rg,{chunk:e,isSelected:R===e.id,onSelect:O,collaborators:rj(e)?e.collaborators:void 0,optionsMenu:rj(e)&&e.children.length>0?(0,o.jsx)(rl,{isExpanded:$.has(e.id),onExpand:M(e.id)}):null}),n===Y.length-1&&S&&(0,o.jsx)(h.gd4,{})]})},_[29]=$,_[30]=Y.length,_[31]=O,_[32]=S,_[33]=R,_[34]=x):x=_[34];let H=x;_[35]===Symbol.for("react.memo_cache_sentinel")?(g=()=>P(!0),b=[],_[35]=g,_[36]=b):(g=_[35],b=_[36]),(0,c.useEffect)(g,b);let V=!L||T;return _[37]!==Y.length||_[38]!==A?(y=0===Y.length&&(0,o.jsxs)(ro,{padding:3,space:3,children:[(0,o.jsx)(a.EY,{size:1,weight:"medium",children:A("timeline.error.no-document-history-title")}),(0,o.jsx)(a.EY,{muted:!0,size:1,children:A("timeline.error.no-document-history-description")})]}),_[37]=Y.length,_[38]=A,_[39]=y):y=_[39],_[40]!==Y||_[41]!==z||_[42]!==k||_[43]!==H||_[44]!==L||_[45]!==A?(j=Y.length>0&&(0,o.jsx)(rs,{direction:"column",$maxHeight:z,id:rv,children:(0,o.jsx)(h.oIj,{activeItemDataAttr:"data-hovered",ariaLabel:A("timeline.list.aria-label"),autoFocus:"list",initialIndex:L,initialScrollAlign:"center",itemHeight:57,items:Y,onEndReached:k,onEndReachedIndexOffset:20,overscan:5,renderItem:H,wrapAround:!1})}),_[40]=Y,_[41]=z,_[42]=k,_[43]=H,_[44]=L,_[45]=A,_[46]=j):j=_[46],_[47]!==V||_[48]!==y||_[49]!==j?(v=(0,o.jsxs)(ra,{$visible:V,"data-ui":"timeline",children:[y,j]}),_[47]=V,_[48]=y,_[49]=j,_[50]=v):v=_[50],v};function rw(e){let t,n,i,r,l,d,c=(0,s.c)(14),{versionError:u}=e,{t:m}=(0,h.Bdt)("studio");return c[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsx)(h.SxK,{tone:"critical",children:(0,o.jsx)(p.YZv,{})}),c[0]=t):t=c[0],c[1]!==m||c[2]!==u?(n=m(u?"timeline.error.load-document-changes-version-title":"timeline.error.load-document-changes-title"),c[1]=m,c[2]=u,c[3]=n):n=c[3],c[4]!==n?(i=(0,o.jsx)(h.SxK,{size:1,tone:"critical",weight:"medium",children:n}),c[4]=n,c[5]=i):i=c[5],c[6]!==m||c[7]!==u?(r=m(u?"timeline.error.load-document-changes-version-description":"timeline.error.load-document-changes-description"),c[6]=m,c[7]=u,c[8]=r):r=c[8],c[9]!==r?(l=(0,o.jsx)(h.SxK,{size:1,tone:"critical",children:r}),c[9]=r,c[10]=l):l=c[10],c[11]!==i||c[12]!==l?(d=(0,o.jsxs)(a.so,{align:"flex-start",gap:3,padding:4,children:[t,(0,o.jsxs)(a.BJ,{space:4,children:[i,l]})]}),c[11]=i,c[12]=l,c[13]=d):d=c[13],d}let rS=(0,g.I4)(l.AM)`
388  overflow: hidden;
389  overflow: clip;
390`,rI="timeline-menu";function rk(e){let t,n,i,r,u,m,f,x,g,b,y,j,v,_,w,S,I=(0,s.c)(62),{chunk:k,mode:E,placement:C}=e,{setTimelineRange:z,timelineError:T,ready:P,timelineStore:A}=tM(),[R,D]=(0,c.useState)(!1),[$,B]=(0,c.useState)(null),[Y,M]=(0,c.useState)(null),L=(0,d.dj)(),O=(0,h.SfM)(A,rP),H=(0,h.SfM)(A,rT),V=(0,h.SfM)(A,rz),Z=(0,h.SfM)(A,rC),N=(0,h.SfM)(A,rE),{t:K}=(0,h.Bdt)("studio");I[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{D(!0)},I[0]=t):t=I[0];let F=t;I[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{D(!1)},I[1]=n):n=I[1];let W=n;I[2]!==$||I[3]!==R?(i=e=>
390{R&&("Escape"===e.key||"Tab"===e.key)&&(W(),$?.focus())},I[2]=$,I[3]=R,I[4]=i):i=I[4],(0,a.Pm)(i),I[5]!==$||I[6]!==Y?(r=()=>[$,Y],I[5]=$,I[6]=Y,I[7]=r):r=I[7],(0,a.PR)(R&&W,r),I[8]!==z||I[9]!==K||I[10]!==A||I[11]!==L?(u=e=>{try{let[t,n]=A?.findRangeForRev(e)||[null,null];z(t,n)}catch(e){L.push({closable:!0,description:e.message,status:"error",title:K("timeline.error.unable-to-load-revision")})}},I[8]=z,I[9]=K,I[10]=A,I[11]=L,I[12]=u):u=I[12];let J=u;I[13]!==z||I[14]!==K||I[15]!==A||I[16]!==L?(m=e=>{try{let[t,n]=A?.findRangeForSince(e)||[null,null];z(t,n)}catch(e){L.push({closable:!0,description:e.message,status:"error",title:K("timeline.error.unable-to-load-revision")})}},I[13]=z,I[14]=K,I[15]=A,I[16]=L,I[17]=m):m=I[17];let U=m;I[18]!==H||I[19]!==A?(f=()=>{H||A?.loadMore()},I[18]=H,I[19]=A,I[20]=f):f=I[20];let G=f;e:{let e,t;if(T){let e;I[21]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(rw,{}),I[21]=e):e=I[21],x=e;break e}if("rev"===E){let e;I[22]!==O||I[23]!==G||I[24]!==V||I[25]!==Z||I[26]!==J?(e=(0,o.jsx)(r_,{chunks:O,hasMoreChunks:V,lastChunk:Z,onLoadMore:G,onSelect:J}),I[22]=O,I[23]=G,I[24]=V,I[25]=Z,I[26]=J,I[27]=e):e=I[27],x=e;break e}I[28]!==O||I[29]!==Z?(e=Z?O.filter(e=>e.index<Z.index):O,I[28]=O,I[29]=Z,I[30]=e):e=I[30];let n=e;I[31]!==n||I[32]!==G||I[33]!==V||I[34]!==U||I[35]!==N?(t=(0,o.jsx)(r_,{chunks:n,hasMoreChunks:V,lastChunk:N,onLoadMore:G,onSelect:U}),I[31]=n,I[32]=G,I[33]=V,I[34]=U,I[35]=N,I[36]=t):t=I[36],x=t}let Q=x;if(I[37]!==k||I[38]!==K){let e={timestamp:{dateStyle:"medium",timeStyle:"short"}};g=k?K(rd[k.type],{context:"timestamp",timestamp:new Date(k?.endTimestamp),formatParams:e}):K("timeline.latest-revision"),b=k?K("timeline.since",{timestamp:new Date(k?.endTimestamp),formatParams:e}):K("timeline.since-version-missing"),I[37]=k,I[38]=K,I[39]=g,I[40]=b}else g=I[39],b=I[40];let q="rev"===E?g:b;I[41]!==Y?(y={[rI]:Y},I[41]=Y,I[42]=y):y=I[42];let X=y,ee=R&&Q,et=R?"timeline-menu-close-button":"timeline-menu-open-button",en=!P,ei=R?W:F;return I[43]===Symbol.for("react.memo_cache_sentinel")?(j={maxWidth:"100%"},I[43]=j):j=I[43],I[44]!==q||I[45]!==P||I[46]!==K?(v=P?q:K("timeline.loading-history"),I[44]=q,I[45]=P,I[46]=K,I[47]=v):v=I[47],I[48]!==R||I[49]!==et||I[50]!==en||I[51]!==ei||I[52]!==v?(_=(0,o.jsx)(a.so,{width:"fill",children:(0,o.jsx)(l.$n,{"data-testid":et,disabled:en,mode:"ghost",onClick:ei,ref:B,selected:R,width:"fill",tooltipProps:null,justify:"space-between",style:j,iconRight:p.D3D,text:v})}),I[48]=R,I[49]=et,I[50]=en,I[51]=ei,I[52]=v,I[53]=_):_=I[53],I[54]!==R||I[55]!==C||I[56]!==ee||I[57]!==_?(w=(0,o.jsx)(rS,{"data-testid":"timeline-menu",constrainSize:!0,content:ee,"data-ui":"versionMenu",open:R,placement:C,matchReferenceWidth:!0,portal:!0,ref:M,children:_}),I[54]=R,I[55]=C,I[56]=ee,I[57]=_,I[58]=w):w=I[58],I[59]!==X||I[60]!==w?(S=(0,o.jsx)(a.GD,{__unstable_elements:X,children:w}),I[59]=X,I[60]=w,I[61]=S):S=I[61],S}function rE(e){return e.sinceTime}function rC(e){return e.realRevChunk}function rz(e){return e.hasMoreChunks}function rT(e){return e.isLoading}function rP(e){return e.chunks}let rA=(0,g.I4)(y.P.path)`
391  transform-origin: center;
392`,rR=e=>{let t,n=(0,s.c)(2);return n[0]!==e?(t=(0,o.jsx)(y.P.circle,{fill:"none",r:"8",cx:"12.5",cy:"12.5",strokeWidth:"1.2",...e}),n[0]=e,n[1]=t):t=n[1],t},rD=e=>{let t,n=(0,s.c)(2);return n[0]!==e?(t=(0,o.jsx)(rA,{fill:"none",d:"M14 17.5619L11.5 20.5L14.5 23.0619M11 7.43811L13.5 4.50001L10.5 1.93811",...e}),n[0]=e,n[1]=t):t=n[1],t},r$=e=>{let t,n=(0,s.c)(2);return n[0]!==e?(t=(0,o.jsx)(y.P.path,{d:"M9.5 12.1316L11.7414 14.5L16 10",...e}),n[0]=e,n[1]=t):t=n[1],t},rB=(0,g.i7)`
393  0% {
394    transform: rotate(0);
395  }
396  100% {
397    transform: rotate(360deg);
398  }
399`,rY=g.I4.g`
400  transform-origin: center;
401
402  &[data-rotate] {
403    animation: ${rB} 1s ease-in-out infinite;
404  }
405`,rM={syncing:{scale:1,transition:{duration:0}},saved:{scale:[1,.8,1.2,.9,1.1,.95,1.05,.99,1],transition:{duration:.5,delay:.2}},changes:{transition:{duration:0}}},rL={syncing:{strokeDasharray:"0, 0, 23, 3, 23, 3",strokeDashoffset:10,opacity:1,transition:{duration:0}},saved:{strokeDasharray:"0, 0, 23, 0, 23, 0",strokeDashoffset:10,opacity:1,transition:{duration:.2}},changes:{strokeDasharray:"0, 60, 23, 0, 23, 0",strokeDashoffset:0,opacity:0,transition:{duration:.5}}},rO={syncing:{opacity:1,transition:{duration:0}},saved:{opacity:0,transition:{duration:.2}},changes:{opacity:0}
405},rH={syncing:{pathLength:0,transition:{duration:0}},saved:{pathLength:1,transition:{delay:.4,duration:.3}},changes:{pathLength:0,transition:{duration:.2}}};function rV(e){let t,n,i,r,l,a=(0,s.c)(13),{status:d}=e;if(!d)return null;let c="changes"===d?void 0:"";return a[0]!==d?(t=(0,o.jsx)(rD,{variants:rO,initial:d,animate:d}),n=(0,o.jsx)(rR,{variants:rL,initial:d,animate:d}),a[0]=d,a[1]=t,a[2]=n):(t=a[1],n=a[2]),a[3]!==c||a[4]!==t||a[5]!==n?(i=(0,o.jsxs)(rY,{"data-rotate":c,children:[t,n]}),a[3]=c,a[4]=t,a[5]=n,a[6]=i):i=a[6],a[7]!==d?(r=(0,o.jsx)(r$,{variants:rH,initial:d,animate:d}),a[7]=d,a[8]=r):r=a[8],a[9]!==d||a[10]!==i||a[11]!==r?(l=(0,o.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 25 25",fill:"none",stroke:"currentColor",strokeWidth:"1.2","data-sanity-icon":"animated-status-icon",children:(0,o.jsxs)(y.P.g,{variants:rM,initial:d,animate:d,children:[i,r]})}),a[9]=d,a[10]=i,a[11]=r,a[12]=l):l=a[12],l}let rZ={saved:{i18nKey:"status-bar.document-status-pulse.status.saved.text",tone:"positive"},syncing:{i18nKey:"status-bar.document-status-pulse.status.syncing.text",tone:"default"}},rN=e=>{let t,n,i,l,d,c=(0,s.c)(13),{status:u}=e,{t:p}=(0,h.Bdt)(r.Z7);if("saved"!==u&&"syncing"!==u)return null;let m=rZ[u];return c[0]!==u?(t=(0,o.jsx)(rV,{status:u}),c[0]=u,c[1]=t):t=c[1],c[2]!==m.tone||c[3]!==t?(n=(0,o.jsx)(h.SxK,{size:1,tone:m.tone,children:t}),c[2]=m.tone,c[3]=t,c[4]=n):n=c[4],c[5]!==m.i18nKey||c[6]!==p?(i=p(m.i18nKey),c[5]=m.i18nKey,c[6]=p,c[7]=i):i=c[7],c[8]!==i?(l=(0,o.jsx)(a.EY,{muted:!0,size:1,children:i}),c[8]=i,c[9]=l):l=c[9],c[10]!==n||c[11]!==l?(d=(0,o.jsxs)(a.so,{align:"center",gap:2,"data-testid":"pane-footer-document-status-pulse",children:[n,l]}),c[10]=n,c[11]=l,c[12]=d):d=c[12],d},rK={minimal:!0,useTemporalPhrase:!0},rF=y.P.create(a.$n),rW=y.P.create(a.az);function rJ(e){return"timeline.operation.published"===e?"document-status.last-published":e}let rU=()=>{let e,t,n=(0,s.c)(2);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)("div",{style:{margin:-5},children:(0,o.jsx)(h.LIN,{$size:0,animated:!0})}),n[0]=e):e=n[0],n[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsxs)(a.so,{align:"center",gap:3,paddingLeft:1,paddingRight:2,paddingY:2,children:[e,(0,o.jsx)(d.EA,{animated:!0,style:{width:"80px",height:"15px"},radius:2})]}),n[1]=t):t=n[1],t},rG=e=>{let t,n,i,r,l,d,c,u,p=(0,s.c)(17),{author:m,translationKey:f,timestamp:x}=e,{onHistoryOpen:g,inspector:b,onHistoryClose:y}=tM(),{t:j}=(0,h.Bdt)(),v=(0,h.Vq9)(void 0===x?"":x,rK);p[0]===Symbol.for("react.memo_cache_sentinel")?(t={opacity:1},n={opacity:0},i={opacity:0},p[0]=t,p[1]=n,p[2]=i):(t=p[0],n=p[1],i=p[2]);let _=b?.name===tJ?y:g;return p[3]!==m?(r=m&&(0,o.jsx)("div",{style:{margin:-5},children:(0,o.jsx)(h.H8m,{user:m,size:0})}),p[3]=m,p[4]=r):r=p[4],p[5]!==j||p[6]!==f?(l=j(f),p[5]=j,p[6]=f,p[7]=l):l=p[7],p[8]!==v||p[9]!==l?(d=(0,o.jsxs)(a.EY,{muted:!0,size:1,children:[l," ",v]}),p[8]=v,p[9]=l,p[10]=d):d=p[10],p[11]!==r||p[12]!==d?(c=(0,o.jsxs)(a.so,{align:"center",flex:"none",gap:3,children:[r,d]}),p[11]=r,p[12]=d,p[13]=c):c=p[13],p[14]!==_||p[15]!==c?(u=(0,o.jsx)(rF,{"data-testid":"pane-footer-document-status",animate:t,initial:n,exit:i,mode:"bleed",onClick:_,padding:2,muted:!0,children:c}),p[14]=_,p[15]=c,p[16]=u):u=p[16],u},rQ=()=>{let e,t,n=(0,s.c)(6),{editState:i}=tM(),{selectedPerspective:r}=(0,h.QO2)();n[0]!==i||n[1]!==r?(e=(0,h.xo4)(r)&&i?.published?._updatedAt?{translationKey:h.uMx.published.createDocumentVersion,timestamp:i.published._updatedAt}:i?.version?._updatedAt?{translationKey:i.version._updatedAt===i.version._createdAt?h.uMx.version.createDocumentVersion:h.uMx.version.editDocumentVersion,timestamp:i.version._updatedAt}:i?.draft?._updatedAt?{translationKey:i.draft._updatedAt===i.draft._createdAt?h.uMx.draft.createDocumentVersion:h.uMx.draft.editDocumentVersion,timestamp:i.draft._updatedAt}:null,n[0]=i,n[1]=r,n[2]=e):e=n[2];let l=e;return l?(n[3]!==l.timestamp||n[4]!==l.translationKey?(t=(0,o.jsx)(rG,{author:"",translationKey:l.translationKey,timestamp:l.timestamp}),n[3]=l.timestamp,n[4]=l.translationKey,n[5]=t):t=n[5],t):null},rq=()=>{let e,t,n=(0,s.c)(8),{events:i,loading:r}=(0,h.LJN)(),l=i?.[0];if(!l&&r){let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(rU,{}),n[0]=e):e=n[0],e}if(!l){let e;return n[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(rQ,{}),n[1]=e):e=n[1],e}let a=l.author,d=h.uMx[l.documentVariantType][l.type];return n[2]!==d?(e=rJ(d),n[2]=d,n[3]=e):e=n[3],n[4]!==l.author||n[5]!==l.timestamp||n[6]!==e?(t=(0,o.jsx)(rG,{author:a,translationKey:e,timestamp:l.timestamp}),n[4]=l.author,n[5]=l.timestamp,n[6]=e,n[7]=t):t=n[7],t},rX=()=>{let e,t,n,i=(0,s.c)(10),{timelineStore:r}=tM(),l=(0,h.SfM)(r,r1),a=(0,h.SfM)(r,r2),d=l?.[0];if(!d&&a){let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(rU,{}),i[0]=e):e=i[0],e}if(!d){let e;return i[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(rQ,{}),i[1]=e):e=i[1],e}i[2]!==d.authors?(e=Array.from(d.authors),i[2]=d.authors,i[3]=e):e=i[3];let c=e[0],u=rd[d.type];return i[4]!==u?(t=rJ(u),i[4]=u,i[5]=t):t=i[5],i[6]!==c||i[7]!==d.endTimestamp||i[8]!==t?(n=(0,o.jsx)(rG,{author:c,translationKey:t,timestamp:d.endTimestamp}),i[6]=c,i[7]=d.endTimestamp,i[8]=t,i[9]=n):n=i[9],n};function r0(){let e,t,n,i,r,l,a,d=(0,s.c)(18),{documentId:u,documentType:p,editState:m,value:f}=tM(),[x,g]=(0,c.useState)(null),b=(0,h.For)().beta?.eventsAPI?.documents,y=(0,h.M7h)(u,p,m?.release),v=f?._updatedAt;return d[0]!==x||d[1]!==y.isSyncing?(e=()=>{if("syncing"===x&&!y.isSyncing){let e=setTimeout(()=>g("saved"),1e3);return()=>clearTimeout(e)}if("saved"===x){let e=setTimeout(()=>g(null),3e3);return()=>clearTimeout(e)}},d[0]=x,d[1]=y.isSyncing,d[2]=e):e=d[2],d[3]!==v||d[4]!==x||d[5]!==y.isSyncing?(t=[x,v,y.isSyncing],d[3]=v,d[4]=x,d[5]=y.isSyncing,d[6]=t):t=d[6],(0,c.useEffect)(e,t),d[7]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{g(null)}
405,d[7]=n):n=d[7],d[8]!==u?(i=[u],d[8]=u,d[9]=i):i=d[9],(0,c.useLayoutEffect)(n,i),d[10]!==y.isSyncing?(r=()=>{y.isSyncing&&g("syncing")},d[10]=y.isSyncing,d[11]=r):r=d[11],d[12]!==v||d[13]!==y.isSyncing?(l=[y.isSyncing,v],d[12]=v,d[13]=y.isSyncing,d[14]=l):l=d[14],(0,c.useLayoutEffect)(r,l),d[15]!==b||d[16]!==x?(a=(0,o.jsx)(j.N,{children:x?(0,o.jsx)(rW,{paddingLeft:2,animate:{opacity:1},initial:{opacity:0},exit:{opacity:0},children:(0,o.jsx)(rN,{status:x||void 0})}):(0,o.jsx)(o.Fragment,{children:b?(0,o.jsx)(rq,{}):(0,o.jsx)(rX,{})})}),d[15]=b,d[16]=x,d[17]=a):a=d[17],a}function r1(e){return e.chunks}function r2(e){return e.isLoading}let r3=(0,g.I4)(a.EY)`
406  color: var(--card-muted-fg-color);
407
408  em {
409    color: var(--card-fg-color);
410    font-weight: 500;
411    font-style: normal;
412  }
413`;function r4(){let e,t,n,i,r=(0,s.c)(9),{displayed:l,revisionNotFound:d}=tM(),m=(0,c.useContext)(u.Pc),f=m?.revision,x=m?.events.find(e=>e.id===f?.revisionId),{t:g}=(0,h.Bdt)(),b=x?.timestamp||l?._updatedAt||l?._createdAt,y=b?(0,o.jsx)(h.HTc,{t:g,i18nKey:"document-status.revision-from",values:{date:(0,ew.GP)(new Date(b),"MMM d, yyyy '@' pp")}}):null;r[0]!==y?(e={name:"revision",text:y,tone:"caution"},r[0]=y,r[1]=e):e=r[1];let j=e;return r[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsx)(a.az,{flex:"none",children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(p.G2W,{})})}),r[2]=t):t=r[2],r[3]!==j||r[4]!==d||r[5]!==g?(n=d?(0,o.jsx)(h.HTc,{t:g,i18nKey:"document-status.revision-not-found"}):j.text,r[3]=j,r[4]=d,r[5]=g,r[6]=n):n=r[6],r[7]!==n?(i=(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(a.so,{flex:1,gap:3,padding:2,children:[t,(0,o.jsx)(a.az,{flex:1,children:(0,o.jsx)(r3,{size:1,textOverflow:"ellipsis",children:n})})]})}),r[7]=n,r[8]=i):i=r[8],i}let r5=y.P.create(a.Zp);function r6(e){let t,n,i,r,l,d,u,p,m=(0,s.c)(22),{actionsBoxRef:f,createLinkMetadata:x}=e,{editState:g,onChange:b,revisionNotFound:y}=tM(),{params:j}=nC(),v=void 0===j?tK:j,{selectedPerspective:_}=(0,h.QO2)(),{title:w}=tq(),S=(0,h.eaL)().components?.documentLinkedActions,I=!!v.rev,[k,E]=(0,c.useState)(null),[C,z]=(0,c.useState)(null);m[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{E(e.contentRect.width<480)},m[0]=t):t=m[0];let T=t;m[1]!==C?(n={element:C,onResize:T},m[1]=C,m[2]=n):n=m[2],function(e){let t,n,i=(0,s.c)(4),{element:r,onResize:l}=e;i[0]!==r||i[1]!==l?(t=()=>(r&&h.bCC.observe(r,l),()=>{r&&h.bCC.unobserve(r)}),n=[r,l],i[0]=r,i[1]=l,i[2]=t,i[3]=n):(t=i[2],n=i[3]),(0,c.useLayoutEffect)(t,n)}(n);e:{let e=!!(g?.ready&&"boolean"==typeof k);
413if(_){if((0,h.xo4)(_)){i=e&&!!g?.published;break e}if((0,h.Jrl)(_)){i=e&&!!g?.version;break e}}i=e}let P=i;if(x&&(0,h.Y07)(x)&&S){let e;m[3]!==S||m[4]!==x||m[5]!==b||m[6]!==w?(e=(0,o.jsx)(S,{metadata:x,panelPortalElementId:n3,onDocumentChange:b,documentTitle:w}),m[3]=S,m[4]=x,m[5]=b,m[6]=w,m[7]=e):e=m[7],r=e}else if(I){let e;m[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(i7,{}),m[8]=e):e=m[8],r=e}else{let e;m[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(i4,{}),m[9]=e):e=m[9],r=e}if(I&&y)return null;let A=I?"revision":"published";m[10]===Symbol.for("react.memo_cache_sentinel")?(l={opacity:.2},m[10]=l):l=m[10],m[11]===Symbol.for("react.memo_cache_sentinel")?(d={opacity:1,transition:{duration:.3}},m[11]=d):d=m[11];let R=I?"caution":void 0;return m[12]!==r||m[13]!==f||m[14]!==k||m[15]!==P||m[16]!==I?(u=P&&(0,o.jsxs)(a.so,{align:"stretch",gap:1,justify:"space-between",paddingLeft:+!I,paddingRight:+!I,children:[(0,o.jsxs)(a.so,{align:"center",flex:1,gap:k?2:3,wrap:"wrap",paddingRight:3,children:[(0,o.jsxs)(a.so,{align:"center",children:[I?(0,o.jsx)(r4,{}):(0,o.jsx)(r0,{}),(0,o.jsx)(iD,{})]}),(0,o.jsx)(iM,{})]}),(0,o.jsxs)(a.so,{align:"flex-start",justify:"flex-end",ref:f,style:{flexShrink:0,marginLeft:"auto"},children:[(0,o.jsx)(iD,{}),r]})]}),m[12]=r,m[13]=f,m[14]=k,m[15]=P,m[16]=I,m[17]=u):u=m[17],m[18]!==A||m[19]!==R||m[20]!==u?(p=(0,o.jsx)(r5,{initial:l,animate:d,tone:R,radius:3,ref:z,sizing:"border",padding:2,children:u},A),m[18]=A,m[19]=R,m[20]=u,m[21]=p):p=m[21],p}let r7=(0,c.memo)(function(e){let t,n,i,r,l,a,d,c,u,p,m,f,x,g=(0,s.c)(26);g[0]!==e?({actionsBoxElement:t,activeIndex:n,as:p,children:i,id:r,onActionStart:l,onKeyDown:a,rootRef:c,states:u,...d}=e,g[0]=e,g[1]=t,g[2]=n,g[3]=i,g[4]=r,g[5]=l,g[6]=a,g[7]=d,g[8]=c,g[9]=u,g[10]=p):(t=g[1],n=g[2],i=g[3],r=g[4],l=g[5],a=g[6],d=g[7],c=g[8],u=g[9],p=g[10]);let b=void 0===p?"div":p,y=u[n];g[11]!==l||g[12]!==a||g[13]!==u?(m=e=>{let t=u.filter(t=>t.shortcut&&(0,eg.v_)(t.shortcut,e)),n=t[0];if(t.length>1&&console.warn(`Keyboard shortcut conflict: More than one document action matches the shortcut "${n.shortcut}"`),n&&!n.disabled&&n.onHandle){e.preventDefault(),n.onHandle(),l(u.indexOf(n));return}a&&a(e)},g[11]=l,g[12]=a,g[13]=u,g[14]=m):m=g[14];let j=m;return g[15]!==t||g[16]!==y?(f=y&&y.dialog&&(0,o.jsx)(h.wG1,{zOffset:"paneFooter",children:(0,o.jsx)(iy,{dialog:y.dialog,referenceElement:t})}),g[15]=t,g[16]=y,g[17]=f):f=g[17],g[18]!==b||g[19]!==i||g[20]!==j||g[21]!==r||g[22]!==d||g[23]!==c||g[24]!==f?(x=(0,o.jsxs)(b,{id:r,onKeyDown:j,tabIndex:-1,...d,ref:c,children:[i,f]}),g[18]=b,g[19]=i,g[20]=j,g[21]=r,g[22]=d,g[23]=c,g[24]=f,g[25]=x):x=g[25],x}),r8=(0,c.memo)(e=>{let t,n,i,r,l,a,d=(0,s.c)(12);d[0]!==e?({actionsBoxElement:t,as:r,children:n,...i}=e,d[0]=e,d[1]=t,d[2]=n,d[3]=i,d[4]=r):(t=d[1],n=d[2],i=d[3],r=d[4]);let u=void 0===r?"div":r,[p,m]=(0,c.useState)(-1);d[5]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{m(e)},d[5]=l):l=d[5];let h=l;return d[6]!==t||d[7]!==p||d[8]!==u||d[9]!==n||d[10]!==i?(a=(0,o.jsx)(ov,{children:e=>{let{states:r}=e;return(0,o.jsx)(r7,{...i,activeIndex:p,actionsBoxElement:t,as:u,onActionStart:h,states:r,children:n})}}),d[6]=t,d[7]=p,d[8]=u,d[9]=n,d[10]=i,d[11]=a):a=d[11],a});r8.displayName="Memo(DocumentActionShortcuts)";let r9=()=>{let e,t=(0,s.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(p.Nrt,{style:{visibility:"hidden"}}),t[0]=e):e=t[0],e};function le(e){let t,n,i,r,l,d,c,u=(0,s.c)(23),{documentType:p,value:m,currentMinWidth:f,paneKey:x,minWidth:g}=e,{t:b}=(0,h.Bdt)();return u[0]!==p?(t={documentType:p},u[0]=p,u[1]=t):t=u[1],u[2]!==b||u[3]!==t?(n=(0,o.jsx)(h.HTc,{t:b,i18nKey:"panes.document-pane.document-unknown-type.title",values:t}),u[2]=b,u[3]=t,u[4]=n):n=u[4],u[5]!==p||u[6]!==b?(i=p&&(0,o.jsx)(a.EY,{as:"p",children:(0,o.jsx)(h.HTc,{t:b,i18nKey:"panes.document-pane.document-unknown-type.text",values:{documentType:p}})}),u[5]=p,u[6]=b,u[7]=i):i=u[7],u[8]!==p||u[9]!==b?(r=!p&&(0,o.jsx)(a.EY,{as:"p",children:b("panes.document-pane.document-unknown-type.without-schema.text")}),u[8]=p,u[9]=b,u[10]=r):r=u[10],u[11]!==m?(l=h.Cu5&&m&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.EY,{as:"p",children:"Here is the JSON representation of the document:"}),(0,o.jsx)(a.Zp,{padding:3,overflow:"auto",radius:2,shadow:1,tone:"inherit",children:(0,o.jsx)(a.Cy,{language:"json",size:[1,1,2],children:JSON.stringify(m,null,2)})})]}),u[11]=m,u[12]=l):l=u[12],u[13]!==i||u[14]!==r||u[15]!==l?(d=(0,o.jsxs)(a.BJ,{space:4,children:[i,r,l]}),u[13]=i,u[14]=r,u[15]=l,u[16]=d):d=u[16],u[17]!==f||u[18]!==g||u[19]!==x||u[20]!==n||u[21]!==d?(c=(0,o.jsx)(tR,{currentMinWidth:f,flex:2.5,minWidth:g,paneKey:x,title:n,tone:"caution",children:d}),u[17]=f,u[18]=g,u[19]=x,u[20]=n,u[21]=d,u[22]=c):c=u[22],c}let lt=["fixed","fixed","absolute"];function ln(e){let t,n,i,r,c,u,p=(0,s.c)(16),{documentPanelPortalElement:m,setFooterElement:f,setActionsBoxElement:x}=e,g=(0,h.YKH)(),{value:b}=tM();p[0]!==m?(t={[n3]:m},p[0]=m,p[1]=t):t=p[1];let y=t;p[2]!==b?(n=(0,h.G_3)(b),p[2]=b,p[3]=n):n=p[3];let j=n;return p[4]!==j||p[5]!==x?(i=(0,o.jsx)(l.vE,{children:(0,o.jsx)(r6,{actionsBoxRef:x,createLinkMetadata:j})}),p[4]=j,p[5]=x,p[6]=i):i=p[6],p[7]!==f||p[8]!==i?(r=(0,o.jsx)(tg,{ref:f,padding:1,children:i}),p[7]=f,p[8]=i,p[9]=r):r=p[9],p[10]!==r||p[11]!==g.portal?(c=(0,o.jsx)(d.Co,{position:lt,zOffset:g.portal,children:r}),p[10]=r,p[11]=g.portal,p[12]=c):c=p[12],p[13]!==y||p[14]!==c?(u=(0,o.jsx)(a.GD,{__unstable_elements:y,children:c}),p[13]=y,p[14]=c,p[15]=u):u=p[15],u}let li=[],lr=["fixed","fixed","absolute"],ll=(0,g.I4)(h.olN)`
414  flex: 1;
415  display: flex;
416  flex-direction: column;
417  min-height: 0;
418  min-width: 0;
419`;function lo(){let e,t,n,i,l,u,m,f,x,g,b,y,j,v,w,S,I,k,E,C,z=(0,s.c)(82),{changesOpen:T,displayed:P,documentId:A,documentType:R,editState:D,fieldActions:$,focusPath:B,inspectOpen:Y,inspector:M,inspectors:L,onFocus:O,onHistoryOpen:H,onMenuAction:V,onPathOpen:Z,paneKey:N,schemaType:K,value:F,previewUrl:W}=tM(),{stickyParams:J}=(0,_.rd)(),{params:U}=nC(),{features:G}=tN(),{t:Q}=(0,h.Bdt)(r.Z7),{collapsed:q}=e8(),X=(0,h.YKH)(),[ee,et]=(0,c.useState)(null),[en,ei]=(0,c.useState)(null),[er,el]=(0,c.useState)(null),[eo,es]=(0,c.useState)(null),[ea,ed]=(0,c.useState)(null);z[0]!==B||z[1]!==ee||z[2]!==F?(e={element:ee,focusPath:B,value:F},z[0]=B,z[1]=ee,z[2]=F,z[3]=e):e=z[3],(0,h.ti5)(e),z[4]===Symbol.for("react.memo_cache_sentinel")?(t=[],z[4]=t):t=z[4];let[ec,eu]=(0,c.useState)(t);z[5]===Symbol.for("react.memo_cache_sentinel")?(n=[],z[5]=n):n=z[5];
419let[ep,em]=(0,c.useState)(n),eh=(0,d.sQ)(en),ef=(0,d.sQ)(er),ex=eh?.height,eb=ef?.height,ey=600+320*!!M,ej=320+320*!!M;z[6]!==M?.name||z[7]!==L?(i=L?.find(e=>e.name===M?.name),z[6]=M?.name,z[7]=L,z[8]=i):i=z[8];let ev=i;z[9]!==P||z[10]!==A||z[11]!==D?(l={displayed:P,documentId:A,editState:D},z[9]=P,z[10]=A,z[11]=D,z[12]=l):l=z[12];let e_=(0,h.aSp)(l),ew=!!F,eS="true"===J.displayInlineChanges;z[13]!==ev||z[14]!==e_||z[15]!==G||z[16]!==ew||z[17]!==ec||z[18]!==L||z[19]!==W||z[20]!==Q||z[21]!==eS?(u=function(e){let t=function({currentInspector:e,hasValue:t,inspectors:n,inspectorMenuItems:i}){return n.map((n,r)=>{let l=i[r];return!l||l.hidden?null:{action:`${tF}${n.name}`,group:l.showAsAction?void 0:"inspectors",icon:l.icon,disabled:!t,selected:e?.name===n.name,shortcut:l.hotkeys?.join("+"),showAsAction:l.showAsAction,title:l.title,tone:l.tone}}).filter(Boolean)}(e),n=[function({previewUrl:e,t}){return e?{action:"production-preview",group:"links",title:t("production-preview.menu-item.title"),icon:p.Pe7,shortcut:"Ctrl+Alt+O"}:null}(e),function({documentIdStack:e,t}){let n=typeof e?.previousId>"u"&&{reason:t("compare-versions.menu-item.disabled-reason")};return{action:"compareVersions",group:"inspectors",title:t("compare-versions.menu-item.title"),icon:p.ppF,disabled:n}}(e),function({displayInlineChanges:e,t}){return{action:"toggleInlineChanges",group:"inspectors",title:t("toggle-inline-changes.menu-item.title"),icon:e?p.Nrt:r9}}(e)].filter(Boolean);return[{action:"copy-document-url",showAsAction:!0,title:e.t("action.copy-document-url.label"),icon:p.qYV},...t,function({hasValue:e,t}){return{action:"inspect",group:"inspectors",title:t("document-inspector.menu-item.title"),icon:p.qzt,disabled:!e,shortcut:"Ctrl+Alt+I"}}(e),...n]}({currentInspector:ev,features:G,hasValue:ew,inspectorMenuItems:ec,inspectors:L,previewUrl:W,documentIdStack:e_,t:Q,displayInlineChanges:eS}),z[13]=ev,z[14]=e_,z[15]=G,z[16]=ew,z[17]=ec,z[18]=L,z[19]=W,z[20]=Q,z[21]=eS,z[22]=u):u=z[22];let eI=u;z[23]!==eI||z[24]!==V?(m=e=>{for(let t of eI)if(t.shortcut&&(0,eg.v_)(t.shortcut,e)){e.preventDefault(),e.stopPropagation(),V(t);return}},z[23]=eI,z[24]=V,z[25]=m):m=z[25];let ek=m;z[26]!==O||z[27]!==Z?(f=e=>{Z(e),O(e)},z[26]=O,z[27]=Z,z[28]=f):f=z[28];let eE=f;if(!K){let e;return z[29]!==ey||z[30]!==R||z[31]!==ej||z[32]!==N||z[33]!==F?(e=(0,o.jsx)(le,{currentMinWidth:ey,documentType:R,minWidth:ej,paneKey:N,value:F}),z[29]=ey,z[30]=R,z[31]=ej,z[32]=N,z[33]=F,z[34]=e):e=z[34],e}z[35]!==A||z[36]!==R||z[37]!==L?(x=L.length>0&&(0,o.jsx)(tU,{documentId:A,documentType:R,inspectors:L,onMenuItems:eu}),z[35]=A,z[36]=R,z[37]=L,z[38]=x):x=z[38],z[39]!==A||z[40]!==R||z[41]!==$||z[42]!==K?(g=$.length>0&&K&&(0,o.jsx)(h.yW8,{actions:$,documentId:A,documentType:R,onActions:em,path:li,schemaType:K}),z[39]=A,z[40]=R,z[41]=$,z[42]=K,z[43]=g):g=z[43],z[44]!==eI?(b=(0,o.jsx)(iz,{ref:el,menuItems:eI}),z[44]=eI,z[45]=b):b=z[45];let eC=q?void 0:"fill",ez=T&&U?.changesInspectorTab==="review",eT=ex||null,eP=eb||null;return z[46]!==ea?(y=(0,o.jsx)(ln,{documentPanelPortalElement:ea,setFooterElement:ei,setActionsBoxElement:es}),z[46]=ea,z[47]=y):y=z[47],z[48]!==Y||z[49]!==ee||z[50]!==eT||z[51]!==eP||z[52]!==y?(j=(0,o.jsx)(io,{footerHeight:eT,headerHeight:eP,isInspectOpen:Y,rootElement:ee,setDocumentPanelPortalElement:ed,footer:y}),z[48]=Y,z[49]=ee,z[50]=eT,z[51]=eP,z[52]=y,z[53]=j):j=z[53],z[54]!==eE||z[55]!==H||z[56]!==ez||z[57]!==j?(v=(0,o.jsx)(ll,{"data-testid":"change-connector-root",isReviewChangesOpen:ez,onOpenReviewChanges:H,onSetFocus:eE,children:j}),z[54]=eE,z[55]=H,z[56]=ez,z[57]=j,z[58]=v):v=z[58],z[59]!==eC||z[60]!==v?(w=(0,o.jsx)(a.so,{direction:"column",flex:1,height:eC,children:v}),z[59]=eC,z[60]=v,z[61]=w):w=z[61],z[62]!==w||z[63]!==X.paneDialog?(S=(0,o.jsx)(d.Co,{position:lr,zOffset:X.paneDialog,children:w}),z[62]=w,z[63]=X.paneDialog,z[64]=S):S=z[64],z[65]===Symbol.for("react.memo_cache_sentinel")?(I=(0,o.jsx)(t0,{}),z[65]=I):I=z[65],z[66]!==eo||z[67]!==ey||z[68]!==ek||z[69]!==ej||z[70]!==N||z[71]!==b||z[72]!==S?(k=(0,o.jsxs)(r8,{actionsBoxElement:eo,as:tn,currentMinWidth:ey,"data-testid":"document-pane",flex:2.5,id:N,minWidth:ej,onKeyUp:ek,rootRef:et,children:[b,S,I]}),z[66]=eo,z[67]=ey,z[68]=ek,z[69]=ej,z[70]=N,z[71]=b,z[72]=S,z[73]=k):k=z[73],z[74]!==ep||z[75]!==k?(E=(0,o.jsx)(tH,{children:(0,o.jsx)(h.tdH,{actions:ep,path:li,children:k})}),z[74]=ep,z[75]=k,z[76]=E):E=z[76],z[77]!==g||z[78]!==E||z[79]!==x||z[80]!==F?(C=(0,o.jsxs)(h.niW,{value:F,children:[x,g,E]}
419),z[77]=g,z[78]=E,z[79]=x,z[80]=F,z[81]=C):C=z[81],C}let ls=(e,t)=>{let n,i,r,l,o=(0,s.c)(11),a=(0,h.FyK)(),[d,u]=(0,c.useState)(null),[p,m]=(0,c.useState)(!1);o[0]!==e||o[1]!==t?(n={documentId:e,documentType:t},o[0]=e,o[1]=t,o[2]=n):n=o[2];let f=(0,h.Az$)(n),x=(0,h.SfM)(f,la);return o[3]!==e||o[4]!==a||o[5]!==x?(i=()=>{x&&e?(m(!0),a.getDocumentAtRevision(e,x).then(e=>{u(e||null),m(!1)}).catch(()=>{u(null),m(!1)})):(u(null),m(!1))},r=[e,x,a],o[3]=e,o[4]=a,o[5]=x,o[6]=i,o[7]=r):(i=o[6],r=o[7]),(0,c.useEffect)(i,r),o[8]!==d||o[9]!==p?(l={lastRevisionDocument:d,loading:p},o[8]=d,o[9]=p,o[10]=l):l=o[10],l};function la(e){return e.lastNonDeletedRevId}let ld=(0,em.g_)({name:"DocumentURLCopied",version:1,description:"User copied document URL to clipboard"}),lc=(0,em.g_)({name:"InlineChangesSwitchedOn",version:1,description:"User switched on display of inline changes"}),lu=(0,em.g_)({name:"InlineChangesSwitchedOff",version:1,description:"User switched off display of inline changes"});function lp(e){return e.name===tJ}function lm(e){let t=(0,h.u4i)(e)&&"string"==typeof e.message?e.message:"Unknown error";throw Error(`An error was thrown while trying to get your preview url: ${t}`)}function lh(e){let t,n,i,l,a,p,f,x,g,b,y,j,w,S,I,k,E,C,T,A,$,B,Y,M,L,O,H,V,Z,K,F,W,G,Q,q,X,ee=(0,s.c)(205),{children:et,index:en,pane:ei,paneKey:er,onFocusPath:el,onSetMaximizedPane:es,maximized:ea,forcedVersion:ed,historyStore:eu}=e,ep=void 0!==ea&&ea,{store:em,error:eh,ready:ef,revisionDocument:ex,onOlderRevision:eg,sinceDocument:eb,isPristine:ey,revisionId:ej,lastNonDeletedRevId:ev}=eu,e_=(0,h.I07)(),{setDocumentMeta:ew}=(0,h.e8q)(),{document:eS}=(0,h.For)(),{actions:eI,badges:ek,unstable_fieldActions:eE,unstable_languageFilter:eC,drafts:ez}=eS,{enabled:eT}=ez,eP=(0,ec.Jr)(),eA=(0,_.rd)(),eR=nC(),eD=eR.setParams,{push:eB}=(0,d.dj)(),{options:eY,menuItemGroups:eM,title:eL,views:eO}=ei,eH=void 0===eM?tW:eM,eV=void 0===eL?null:eL;ee[0]!==eO?(t=void 0===eO?[]:eO,ee[0]=eO,ee[1]=t):t=ee[1];let eZ=t,eN=(0,h.$6H)(eY),eK=eN.id;ee[2]!==eK?(n=(0,m.IM)(eK),ee[2]=eK,ee[3]=n):n=ee[3];let eF=n,eW=eY.type,eJ=(0,h.$6H)(eR.params)||tK,{buildStudioUrl:eU}=(0,h.HuN)(),eG=(0,h.QO2)(),{document:eQ,beta:eq}=(0,h.hA9)(),{drafts:eX}=eQ,{enabled:e0}=eX,e1=eq?.form?.enhancedObjectDialog?.enabled;e:{let e;if(ed){i=ed;break e}ee[4]!==eG.selectedPerspectiveName||ee[5]!==eG.selectedReleaseId?(e={selectedPerspectiveName:eG.selectedPerspectiveName,selectedReleaseId:eG.selectedReleaseId},ee[4]=eG.selectedPerspectiveName,ee[5]=eG.selectedReleaseId,ee[6]=e):e=ee[6],i=e}let{selectedReleaseId:e2,selectedPerspectiveName:e3}=i,e4=e$();ee[7]!==eF||ee[8]!==eW||ee[9]!==eN||ee[10]!==eJ?(l={paneOptions:eN,documentId:eF,documentType:eW,params:eJ},ee[7]=eF,ee[8]=eW,ee[9]=eN,ee[10]=eJ,ee[11]=l):l=ee[11];let e5=(e=>{let t,n,i=(0,s.c)(13),{paneOptions:r,documentType:l,documentId:o,params:a}=e,d=(0,h.bgA)(),c=nC(),u=(0,h.$6H)(c.payload);i[0]!==l||i[1]!==r.template||i[2]!==r.templateParameters||i[3]!==u||i[4]!==a.template||i[5]!==d?(t=function(e,t){let n=t.panePayload||{},i=t.templateName;t.urlTemplate&&i&&i!==t.urlTemplate&&console.warn(`Conflicting templates: URL says "${t.urlTemplate}", structure node says "${i}". Using "${i}".`);let r=i||t.urlTemplate,l=e.filter(e=>e.schemaType===t.documentType),o={...t.templateParams,..."object"==typeof n&&n||{}},s=r;return r||1!==l.length||(s=l[0].id),{templateName:s,templateParams:o}}(d,{documentType:l,templateName:r.template,templateParams:r.templateParameters,panePayload:u,urlTemplate:a.template}),i[0]=l,i[1]=r.template,i[2]=r.templateParameters,i[3]=u,i[4]=a.template,i[5]=d,i[6]=t):t=i[6];let{templateName:p,templateParams:m}=t;i[7]!==o||i[8]!==l||i[9]!==a.version||i[10]!==p||i[11]!==m?(n={documentId:o,documentType:l,templateName:p,templateParams:m,version:a.version},i[7]=o,i[8]=l,i[9]=a.version,i[10]=p,i[11]=m,i[12]=n):n=i[12];let f=(0,h.nfZ)(n);return(0,h.$6H)(f)})(l),e6=e5.loading;ee[12]!==eF||ee[13]!==eW||ee[14]!==eJ||ee[15]!==eD?(a={documentId:eF,documentType:eW,params:eJ,setParams:eD},ee[12]=eF,ee[13]=eW,ee[14]=eJ,ee[15]=eD,ee[16]=a):a=ee[16];let{changesOpen:e7,currentInspector:e8,inspectors:e9,closeInspector:te,openInspector:tt,handleHistoryClose
419:tn,handleHistoryOpen:ti,handleInspectorAction:tr,inspectOpen:tl,handleLegacyInspectClose:to}=function(e){let t,n,i,r,l,o,a,d,u,p,m,f,x,g,b=(0,s.c)(54),{documentId:y,documentType:j,params:v,setParams:_}=e,{features:w}=tN(),S=(0,h.For)().document.inspectors;b[0]!==y||b[1]!==j||b[2]!==S?(t=S({documentId:y,documentType:j}),b[0]=y,b[1]=j,b[2]=S,b[3]=t):t=b[3];let I=t;b[4]!==v.inspect?(n=()=>v.inspect||null,b[4]=v.inspect,b[5]=n):n=b[5];let[k,E]=(0,c.useState)(n),C=(0,c.useRef)(v.inspect);b[6]!==v.inspect?(i=()=>{C.current!==v.inspect&&(C.current=v.inspect,E(v.inspect||null))},r=[v.inspect],b[6]=v.inspect,b[7]=i,b[8]=r):(i=b[7],r=b[8]),(0,c.useEffect)(i,r),b[9]!==k||b[10]!==I?(l=I?.find(e=>e.name===k),b[9]=k,b[10]=I,b[11]=l):l=b[11];let z=l;b[12]!==I?(o=I.find(lp),b[12]=I,b[13]=o):o=b[13];let T=o,P=z?.name===tJ;b[14]!==z||b[15]!==I||b[16]!==v||b[17]!==_?(a=e=>{let t=e&&I.find(t=>t.name===e);if(e&&!t)return void console.warn(`No inspector named "${e}"`);if(z){if(t){let e=t.onClose?.({params:v})??{params:v};E(null),C.current=void 0,_({...e.params,inspect:void 0});return}if(z){let e=z.onClose?.({params:v})??{params:v};E(null),C.current=void 0,_({...e.params,inspect:void 0})}}},b[14]=z,b[15]=I,b[16]=v,b[17]=_,b[18]=a):a=b[18];let A=a;b[19]!==z||b[20]!==I||b[21]!==v||b[22]!==_?(d=(e,t)=>{let n=I.find(t=>t.name===e);if(!n)return void console.warn(`No inspector named "${e}"`);if(z?.name===n.name)return void _({...v,...t,inspect:n.name});let i=v;z&&(i=(n.onClose?.({params:i})??{params:i}).params);let r=n.onOpen?.({params:i})??{params:i};E(n.name),C.current=n.name,_({...r.params,...t,inspect:n.name})},b[19]=z,b[20]=I,b[21]=v,b[22]=_,b[23]=d):d=b[23];let R=d;b[24]!==A||b[25]!==T?(u=()=>{T&&A(T.name)},b[24]=A,b[25]=T,b[26]=u):u=b[26];let D=u;b[27]!==w.reviewChanges||b[28]!==T||b[29]!==R?(p=()=>{w.reviewChanges&&T&&R(T.name,{changesInspectorTab:"review"})},b[27]=w.reviewChanges,b[28]=T,b[29]=R,b[30]=p):p=b[30];let $=p,B="on"===v.inspect;b[31]!==B||b[32]!==v||b[33]!==_?(m=e=>{_((void 0===e?!B:e)?{...v,inspect:"on"}:{...v,inspect:void 0})},b[31]=B,b[32]=v,b[33]=_,b[34]=m):m=b[34];let Y=m;b[35]!==Y?(f=()=>Y(!1),b[35]=Y,b[36]=f):f=b[36];let M=f;b[37]!==A||b[38]!==k||b[39]!==I||b[40]!==R||b[41]!==Y?(x=e=>{if("inspect"===e.action)return Y(!0),!0;if("string"!=typeof e.action)return!1;let t=e.action.slice(tF.length),n=I.find(e=>e.name===t);return!!n&&(n.name===k?A(n.name):R(n.name),!0)},b[37]=A,b[38]=k,b[39]=I,b[40]=R,b[41]=Y,b[42]=x):x=b[42];let L=x;return b[43]!==P||b[44]!==A||b[45]!==z||b[46]!==D||b[47]!==$||b[48]!==L||b[49]!==M||b[50]!==B||b[51]!==I||b[52]!==R?(g={changesOpen:P,currentInspector:z,inspectors:I,closeInspector:A,openInspector:R,handleHistoryClose:D,handleHistoryOpen:$,handleInspectorAction:L,handleLegacyInspectClose:M,inspectOpen:B},b[43]=P,b[44]=A,b[45]=z,b[46]=D,b[47]=$,b[48]=L,b[49]=M,b[50]=B,b[51]=I,b[52]=R,b[53]=g):g=b[53],g}(a),[ts,ta]=(0,c.useState)(!1),{lastRevisionDocument:td}=ls(eF,eW);ee[17]!==ey||ee[18]!==ef?(p=e=>!!ef&&!e?.draft&&!e?.published&&!e?.version&&!ey,ee[17]=ey,ee[18]=ef,ee[19]=p):p=ee[19];let tc=p;ee[20]!==e7||ee[21]!==eb?(f=e=>{let t=(0,h.spc)(e);return e7?eb||t:t||null},ee[20]=e7,ee[21]=eb,ee[22]=f):f=ee[22];let tu=f;ee[23]!==eW||ee[24]!==e_?(x=e_.get(eW),ee[23]=eW,ee[24]=e_,ee[25]=x):x=ee[25];let tp=x;ee[26]!==tc||ee[27]!==ts||ee[28]!==e0||ee[29]!==eJ.rev||ee[30]!==eG.selectedPerspective||ee[31]!==tp?(g=e=>{let t=tc(e);return!!eJ.rev||ts||t||!(0,h.CW3)({selectedPerspective:eG.selectedPerspective,isDraftModelEnabled:e0,schemaType:tp}).result},ee[26]=tc,ee[27]=ts,ee[28]=e0,ee[29]=eJ.rev,ee[30]=eG.selectedPerspective,ee[31]=tp,ee[32]=g):g=ee[32];let tm=g;ee[33]!==ev||ee[34]!==td||ee[35]!==eg||ee[36]!==ex?(b=e=>eg?ex||{_id:e._id,_type:e._type}:!e._createdAt&&!e._updatedAt&&ev&&td?td:e,ee[33]=ev,ee[34]=td,ee[35]=eg,ee[36]=ex,ee[37]=b):b=ee[37];let th=b;ee[38]!==eJ.path?(y=eJ.path?(0,eo.sH)(eJ.path):h.Mlv,ee[38]=eJ.path,ee[39]=y):y=ee[39];let tf="true"===eA.stickyParams.displayInlineChanges;ee[40]!==e7||ee[41]!==eF||ee[42]!==eW||ee[43]!==tu||ee[44]!==th||ee[45]!==tm||ee[46]!==e5||ee[47]!==el||ee[48]!==e3||ee[49]!==e2||ee[50]!==y||ee[51]!==tf?(j={changesOpen:e7,documentType:eW,documentId:eF,initialValue:e5,comparisonValue:tu,releaseId:e2,selectedPerspectiveName:e3,initialFocusPath:y,readOnly:tm,onFocusPath:el,getFormDocumentValue:th,displayInlineChanges:tf},ee[40]=e7,ee[41]=eF,ee[42]=eW,ee[43]=tu,ee[44]=th,ee[45]=tm,ee[46]=e5,ee[47]=el,ee[48]=e3,ee[49]=e2,ee[50]=y,ee[51]=tf,ee[52]=j):j=ee[52];let{editState:tx,upstreamEditState:tg,hasUpstreamVersion:tb,connectionState:ty,focusPath:tj,onChange:tv,validation:t_,ready:tw,value:tS,formState:tI,permissions:tk,onPathOpen:tE,isPermissionsLoading:tC,formStateRef:tz,onProgrammaticFocus:tT,collapsedFieldSets:tP,collapsedPaths:tA,onBlur:tR,onFocus:tD,onSetActiveFieldGroup:t$,onSetCollapsedPath:tB,onSetCollapsedFieldSet:tY,openPath:tM}=(0,h.Lay)(j),{data:tL}=(0,h.K0D)();ee[53]!==tL?(w=void 0===tL?[]:tL,ee[53]=tL,ee[54]=w):w=ee[54];let tO=w;ee[55]!==eT||ee[56]!==eJ||ee[57]!==tO||ee[58]!==e3||ee[59]!==e2||ee[60]!==tS?(S=function(e,t,n,i,r,l){let o;switch(!0){case!!e?.rev:o="revision";break;case t&&(0,m.A_)(n._id):{let e=l.find(e=>(0,h._hI)(e._id)===t);o=e&&(0,h._9c)(e)?"scheduled-draft":"version";break}case"published"===i:o="published";break;case r:o="draft";break;default:o="published"}return o}(eJ,e2,tS,e3,eT,tO),ee[55]=eT,ee[56]=eJ,ee[57]=tO,ee[58]=e3,ee[59]=e2,ee[60]=tS,ee[61]=S):S=ee[61];let tH=S;ee[62]!==tH||ee[63]!==eF||ee[64]!==eW||ee[65]!==e2?(I={schemaType:eW,documentId:eF,versionType:tH,releaseId:e2},ee[62]=tH,ee[63]=eF,ee[64]=eW,ee[65]=e2,ee[66]=I):I=ee[66];let tV=I;ee[67]!==eI||ee[68]!==tV?(k=eI(tV),ee[67]=eI,ee[68]=tV,ee[69]=k):k=ee[69];let tZ=k;ee[70]!==e1||ee[71]!==tE||ee[72]!==eJ||ee[73]!==eD?(E=e=>{if(tE(e),e1){let t=(0,h.ujC)(e);eJ.path!==t&&eD({...eJ,path:t})}},ee[70]=e1,ee[71]=tE,ee[72]=eJ,ee[73]=eD,ee[74]=E):E=ee[74];let tU=E;ee[75]!==ek||ee[76]!==eF||ee[77]!==eW?(C=ek({schemaType:eW,documentId:eF}),ee[75]=ek,ee[76]=eF,ee[77]=eW,ee[78]=C):C=ee[78];let tG=C;
419ee[79]!==eF||ee[80]!==eW||ee[81]!==eC?(T=eC({schemaType:eW,documentId:eF}),ee[79]=eF,ee[80]=eW,ee[81]=eC,ee[82]=T):T=ee[82];let tQ=T,tq=(0,h.$6H)(eZ),tX=eJ.view||tq[0]&&tq[0].id||null,t0=function(e){let t,n,i,r,l=(0,s.c)(6),{resolveProductionUrl:o}=(0,h.For)().document;l[0]===Symbol.for("react.memo_cache_sentinel")?(t=new J.t(void 0),l[0]=t):t=l[0];let a=t;return l[1]!==e?(n=()=>{a.next(e)},i=[a,e],l[1]=e,l[2]=n,l[3]=i):(n=l[2],i=l[3]),(0,c.useEffect)(n,i),l[4]!==o?(r=a.asObservable().pipe((0,R.F)(),(0,P.B)(500),(0,D.n)(e=>(0,h.u4i)(e)&&"string"==typeof e._id&&"string"==typeof e._type?(0,U.H)(o({document:e})):(0,N.of)(void 0)),(0,R.F)(),(0,z.W)(lm)),l[4]=o,l[5]=r):r=l[5],(0,v.J)(r)}(tS),{t:t1}=(0,h.Bdt)(r.Z7);ee[83]!==eF||ee[84]!==eW||ee[85]!==eE||ee[86]!==tp?(A=tp?eE({documentId:eF,documentType:eW,schemaType:tp}):[],ee[83]=eF,ee[84]=eW,ee[85]=eE,ee[86]=tp,ee[87]=A):A=ee[87];let t2=A,t3=tw&&(!eJ.rev||ef||!!eh);ee[88]!==th||ee[89]!==tS?($=th(tS),ee[88]=th,ee[89]=tS,ee[90]=$):$=ee[90];let t4=$;ee[91]!==t4||ee[92]!==eF||ee[93]!==tx?(B={strict:!0,displayed:t4,documentId:eF,editState:tx},ee[91]=t4,ee[92]=eF,ee[93]=tx,ee[94]=B):B=ee[94];let{previousId:t5}=(0,h.aSp)(B);ee[95]!==eJ||ee[96]!==eD?(Y=(e,t)=>{eD({...eJ,since:e,rev:t||void 0})},ee[95]=eJ,ee[96]=eD,ee[97]=Y):Y=ee[97];let t6=Y;ee[98]!==eR?(M=()=>eR.closeCurrent(),ee[98]=eR,ee[99]=M):M=ee[99];let t7=M;ee[100]!==eR?(L=()=>eR.duplicateCurrent(),ee[100]=eR,ee[101]=L):L=ee[101];let t8=L;ee[102]!==eA||ee[103]!==eP?(O=()=>{let e="true"!==eA.stickyParams.displayInlineChanges;eP.log(e?lc:lu),eA.navigate({stickyParams:{displayInlineChanges:String(e)}})},ee[102]=eA,ee[103]=eP,ee[104]=O):O=ee[104];let t9=O;ee[105]!==eU||ee[106]!==e4||ee[107]!==eF||ee[108]!==eW||ee[109]!==ti||ee[110]!==tr||ee[111]!==t0||ee[112]!==t5||ee[113]!==eB||ee[114]!==t1||ee[115]!==eP||ee[116]!==t9||ee[117]!==tS._id?(H=async e=>{if("production-preview"===e.action&&t0)return window.open(t0),!0;if("copy-document-url"===e.action&&navigator){eP.log(ld);let e=eU({coreUi:e=>`${e}/intent/edit/id=${eF};type=${eW}`});return await navigator.clipboard.writeText(e),eB({id:"copy-document-url",status:"info",title:t1("panes.document-operation-results.operation-success_copy-url")}),!0}return"reviewChanges"===e.action?(ti(),!0):(("inspect"===e.action||"string"==typeof e.action&&e.action.startsWith(tF))&&tr(e),"compareVersions"===e.action&&"u">typeof t5?(e4.navigateDiffView({mode:"version",previousDocument:{type:eW,id:t5},nextDocument:{type:eW,id:tS._id}}),!0):"toggleInlineChanges"===e.action&&(t9(),!0))},ee[105]=eU,ee[106]=e4,ee[107]=eF,ee[108]=eW,ee[109]=ti,ee[110]=tr,ee[111]=t0,ee[112]=t5,ee[113]=eB,ee[114]=t1,ee[115]=eP,ee[116]=t9,ee[117]=tS._id,ee[118]=H):H=ee[118];let ne=H;ee[119]!==eF||ee[120]!==eW||ee[121]!==tv||ee[122]!==tp||ee[123]!==ew?(V=()=>{ew({documentId:eF,documentType:eW,schemaType:tp,onChange:tv})},Z=[eF,eW,tp,tv,ew],ee[119]=eF,ee[120]=eW,ee[121]=tv,ee[122]=tp,ee[123]=ew,ee[124]=V,ee[125]=Z):(V=ee[124],Z=ee[125]),(0,c.useEffect)(V,Z),ee[126]!==tu||ee[127]!==tg?(K=tu(tg),ee[126]=tu,ee[127]=tg,ee[128]=K):K=ee[128];let nt=K,nn=tc(tx),ni=eg&&!ex&&t3;t:{if(tx.version&&(0,h.YW1)(tx.version)){F=tx.published;break t}F=t4}let nr=F,nl=e8||null;ee[129]!==eH?(W=eH||[],ee[129]=eH,ee[130]=W):W=ee[130],ee[131]!==tZ||ee[132]!==tX||ee[133]!==tG||ee[134]!==e7||ee[135]!==te||ee[136]!==tP||ee[137]!==tA||ee[138]!==nt||ee[139]!==ty||ee[140]!==nr||ee[141]!==eF||ee[142]!==eK||ee[143]!==eW||ee[144]!==tx||ee[145
419]!==t2||ee[146]!==tj||ee[147]!==tI||ee[148]!==tn||ee[149]!==ti||ee[150]!==to||ee[151]!==ne||ee[152]!==t7||ee[153]!==t8||ee[154]!==tU||ee[155]!==tb||ee[156]!==en||ee[157]!==tl||ee[158]!==e9||ee[159]!==nn||ee[160]!==ts||ee[161]!==e6||ee[162]!==tC||ee[163]!==tQ||ee[164]!==ev||ee[165]!==td||ee[166]!==ep||ee[167]!==tR||ee[168]!==tv||ee[169]!==tD||ee[170]!==t$||ee[171]!==tY||ee[172]!==tB||ee[173]!==es||ee[174]!==tt||ee[175]!==tM||ee[176]!==er||ee[177]!==tk||ee[178]!==t0||ee[179]!==t3||ee[180]!==ej||ee[181]!==ni||ee[182]!==tp||ee[183]!==e2||ee[184]!==t6||ee[185]!==nl||ee[186]!==W||ee[187]!==eh||ee[188]!==em||ee[189]!==eV||ee[190]!==t_||ee[191]!==tS||ee[192]!==tq?(G={actions:tZ,activeViewId:tX,badges:tG,changesOpen:e7,closeInspector:te,collapsedFieldSets:tP,collapsedPaths:tA,compareValue:nt,connectionState:ty,displayed:nr,documentId:eF,documentIdRaw:eK,documentType:eW,editState:tx,fieldActions:t2,focusPath:tj,inspector:nl,inspectors:e9,onBlur:tR,onChange:tv,onFocus:tD,onPathOpen:tU,onHistoryClose:tn,onHistoryOpen:ti,onInspectClose:to,onMenuAction:ne,onPaneClose:t7,onPaneSplit:t8,onSetActiveFieldGroup:t$,onSetCollapsedPath:tB,onSetCollapsedFieldSet:tY,onSetMaximizedPane:es,maximized:ep,openInspector:tt,openPath:tM,index:en,inspectOpen:tl,validation:t_,menuItemGroups:W,paneKey:er,previewUrl:t0,ready:t3,schemaType:tp,hasUpstreamVersion:tb,isPermissionsLoading:tC,isInitialValueLoading:e6,permissions:tk,setTimelineRange:t6,setIsDeleting:ta,isDeleting:ts,isDeleted:nn,timelineError:eh,timelineStore:em,title:eV,value:tS,selectedReleaseId:e2,views:tq,formState:tI,unstable_languageFilter:tQ,revisionId:ej,revisionNotFound:ni,lastNonDeletedRevId:ev,lastRevisionDocument:td},ee[131]=tZ,ee[132]=tX,ee[133]=tG,ee[134]=e7,ee[135]=te,ee[136]=tP,ee[137]=tA,ee[138]=nt,ee[139]=ty,ee[140]=nr,ee[141]=eF,ee[142]=eK,ee[143]=eW,ee[144]=tx,ee[145]=t2,ee[146]=tj,ee[147]=tI,ee[148]=tn,ee[149]=ti,ee[150]=to,ee[151]=ne,ee[152]=t7,ee[153]=t8,ee[154]=tU,ee[155]=tb,ee[156]=en,ee[157]=tl,ee[158]=e9,ee[159]=nn,ee[160]=ts,ee[161]=e6,ee[162]=tC,ee[163]=tQ,ee[164]=ev,ee[165]=td,ee[166]=ep,ee[167]=tR,ee[168]=tv,ee[169]=tD,ee[170]=t$,ee[171]=tY,ee[172]=tB,ee[173]=es,ee[174]=tt,ee[175]=tM,ee[176]=er,ee[177]=tk,ee[178]=t0,ee[179]=t3,ee[180]=ej,ee[181]=ni,ee[182]=tp,ee[183]=e2,ee[184]=t6,ee[185]=nl,ee[186]=W,ee[187]=eh,ee[188]=em,ee[189]=eV,ee[190]=t_,ee[191]=tS,ee[192]=tq,ee[193]=G):G=ee[193];let no=G,ns=(0,c.useRef)(void 0);return ee[194]!==e1||ee[195]!==tz||ee[196]!==tT||ee[197]!==eR||ee[198]!==eJ||ee[199]!==t3?(Q=()=>{if(t3&&eJ.path){let{path:e,...t}=eJ;e!==ns.current&&tT((0,eo.Y7)(tz.current?.value,(0,eo.sH)(e))),e1||eR.setParams(t)}ns.current=eJ.path},q=[tz,tT,eR,eJ,t3,e1],ee[194]=e1,ee[195]=tz,ee[196]=tT,ee[197]=eR,ee[198]=eJ,ee[199]=t3,ee[200]=Q,ee[201]=q):(Q=ee[200],q=ee[201]),(0,c.useEffect)(Q,q),ee[202]!==et||ee[203]!==no?(X=(0,o.jsx)(u.Fi.Provider,{value:no,children:et}),ee[202]=et,ee[203]=no,ee[204]=X):X=ee[204],X}let lf=e=>{let t,n,i,r,l,a,d,c=(0,s.c)(37),{params:u}=nC(),p=void 0===u?tK:u,f=lT(e.pane.options,p),x=(0,h.I07)(),g=f.type,b=!!x.get(f.type)?.liveEdit,{selectedPerspectiveName:y,selectedReleaseId:j,selectedPerspective:v}=(0,h.QO2)(),{data:_}=(0,h.gJZ)();c[0]!==f.id?(t=(0,m.IM)(f.id),c[0]=f.id,c[1]=t):t=c[1];let w=(0,h.zX2)(t,g,"default",j),S=b&&"drafts"===v&&!w?.draft,{rev:I,since:k}=p,E=p.historyVersion;e:{if(S){let e;c[2]!==f.id?(e=(0,m.IM)(f.id),c[2]=f.id,c[3]=e):e=c[3],n=e;break e}if(E&&_.some(e=>(0,h._hI)(e._id)===E)){let e;c[4]!==E||c[5]!==f.id?(e=(0,m.ct)(f.id,E),c[4]=E,c[5]=f.id,c[6]=e):e=c[6],n=e;break e}if(typeof y>"u"){let e;c[7]!==f.id?(e=(0,m.T4)(f.id),c[7]=f.id,c[8]=e):e=c[8],n=e;break e}if("published"===y){let e;c[9]!==f.id?(e=(0,m.IM)(f.id),c[9]=f.id,c[10]=e):e=c[10],n=e;break e}if(j){let e;c[11]!==f.id||c[12]!==y?(e=(0,m.ct)(f.id,y),c[11]=f.id,c[12]=y,c[13]=e):e=c[13],n=e;break e}n=f.id}let C=n;c[14]!==C||c[15]!==f.type||c[16]!==I||c[17]!==k?(i={documentId:C,documentType:f.type,rev:I,since:k},c[14]=C,c[15]=f.type,c[16]=I,c[17]=k,c[18]=i):i=c[18];let z=(0,h.Sjd)(i),T=z.error,P=z.revision?.revisionId||null,A=!!(I&&!z.revision?.loading),R=z.revision?.document||null,D=z.sinceRevision?.document||null,$=!z.loading,B=0===z.events.length;c[19]!==z.events?(r=z.events.find(lx)?.id||null,c[19]=z.events,c[20]=r):r=c[20],c[21]!==z.error||c[22]!==B||c[23]!==r||c[24]!==P||c[25]!==A||c[26]!==R||c[27]!==D||c[28]!==$?(l={error:T,revisionId:P,onOlderRevision:A,revisionDocument:R,sinceDocument:D,ready:$,isPristine:B,lastNonDeletedRevId:r},c[21]=z.error,c[22]=B,c[23]=r,c[24]=P,c[25]=A,c[26]=R,c[27]=D,c[28]=$,c[29]=l):l=c[29];let Y=l;return c[30]!==Y||c[31]!==E||c[32]!==e?(a=E?(0,o.jsx)(h.g19,{selectedPerspectiveName:E,excludedPerspectives:h.Mlv,children:(0,o.jsx)(lh,{...e,historyStore:Y})}):(0,o.jsx)(lh,{...e,historyStore:Y}),c[30]=Y,c[31]=E,c[32]=e,c[33]=a):a=c[33],c[34]!==a||c[35]!==z?(d=(0,o.jsx)(h.tGd,{value:z,children:a}),c[34]=a,c[35]=z,c[36]=d):d=c[36],d};function lx(e){return!(0,h.GDb)(e)&&!(0,h.zOx)(e)}let lg=e=>{let t,n,i,r,l=(0,s.c)(20),{pane:a}=e,d=nC(),u=lT(a.options,d.params),p=d.params||tK,[f,x]=(0,c.useState)(null);l[0]!==u.id?(t=(0,m.IM)(u.id),l[0]=u.id,l[1]=t):t=l[1],l[2]!==u.type||l[3]!==p.rev||l[4]!==p.since||l[5]!==t?(n={documentId:t,documentType:u.type,onError:x,rev:p.rev,since:p.since},l[2]=u.type,l[3]=p.rev,l[4]=p.since,l[5]=t,l[6]=n):n=l[6];let g=(0,h.Az$)(n),b=(0,h.SfM)(g,lb),y=(0,h.SfM)(g,ly),j=(0,h.SfM)(g,lj),v=(0,h.SfM)(g,lv),_=(0,h.SfM)(g,l_),w=(0,h.SfM)(g,lw),S=(0,h.SfM)(g,lS),I=y?.id||null,k=!!w;l[7]!==S||l[8]!==b||l[9]!==g||l[10]!==I||l[11]!==v||l[12]!==j||l[13]!==k||l[14]!==f||l[15]!==_?
419(i={store:g,error:f,revisionId:I,onOlderRevision:b,revisionDocument:v,sinceDocument:j,ready:_,isPristine:k,lastNonDeletedRevId:S},l[7]=S,l[8]=b,l[9]=g,l[10]=I,l[11]=v,l[12]=j,l[13]=k,l[14]=f,l[15]=_,l[16]=i):i=l[16];let E=i;return l[17]!==E||l[18]!==e?(r=(0,o.jsx)(lh,{...e,historyStore:E}),l[17]=E,l[18]=e,l[19]=r):r=l[19],r};function lb(e){return e.onOlderRevision}function ly(e){return e.revTime}function lj(e){return e.sinceAttributes}function lv(e){return e.timelineDisplayed}function l_(e){return e.timelineReady}function lw(e){return e.isPristine}function lS(e){return e.lastNonDeletedRevId}function lI(e){let t=(0,s.c)(4),{children:n}=e,i=nC(),{excludedPerspectives:r}=(0,h.QO2)(),{scheduledDraft:l}=i.params;if(l){let e;return t[0]!==n||t[1]!==r||t[2]!==l?(e=(0,o.jsx)(h.g19,{selectedPerspectiveName:l,excludedPerspectives:r,children:n}),t[0]=n,t[1]=r,t[2]=l,t[3]=e):e=t[3],e}return n}let lk=(0,c.memo)(e=>{let t,n,i,r=(0,s.c)(9),l=(0,h.For)(),{setParams:a,params:d}=nC();r[0]!==d||r[1]!==a?(t=e=>{a({...d,scheduledDraft:e},{perspective:""})},r[0]=d,r[1]=a,r[2]=t):t=r[2];let c=t;return r[3]!==e||r[4]!==l.beta?.eventsAPI?.documents?(n=l.beta?.eventsAPI?.documents?(0,o.jsx)(lf,{...e}):(0,o.jsx)(lg,{...e}),r[3]=e,r[4]=l.beta?.eventsAPI?.documents,r[5]=n):n=r[5],r[6]!==c||r[7]!==n?(i=(0,o.jsx)(lI,{children:(0,o.jsx)(h.BRe,{onSetScheduledDraftPerspective:c,children:n})}),r[6]=c,r[7]=n,r[8]=i):i=r[8],i});lk.displayName="Memo(DocumentPaneProviderWrapper)";let lE=(0,c.memo)(function(e){let t,n,i=(0,s.c)(5),{name:r}=(0,h.For)(),l=e.pane.source||r;return i[0]!==e?(t=(0,o.jsx)(h.K1$,{children:(0,o.jsx)(lC,{...e})}),i[0]=e,i[1]=t):t=i[1],i[2]!==l||i[3]!==t?(n=(0,o.jsx)(h.NeO,{name:l,children:t}),i[2]=l,i[3]=t,i[4]=n):n=i[4],n});function lC(e){var t,n,i;let l,d,u,p,m,f,x,g,b,y,j=(0,s.c)(57),{pane:v,paneKey:_}=e,{resolveNewDocumentOptions:w}=(0,h.For)().document,{selectedPerspectiveName:S}=(0,h.QO2)(),I=nC(),k=lT(v.options,I.params),{documentType:E,isLoaded:C}=(0,h.fRg)(k.id,k.type);!function(){let e,t,n,i,r,l=(0,s.c)(10),{params:o,setParams:a}=nC(),d=void 0===o?tK:o,{selectedPerspectiveName:u}=(0,h.QO2)(),p=(0,c.useRef)(!1);l[0]!==d||l[1]!==a?(e=e=>{["since","historyVersion","rev","preserveRev"].some(e=>d[e])&&a({...d,rev:"true"===d.preserveRev?d.rev:void 0,preserveRev:void 0,since:void 0,historyVersion:void 0})},l[0]=d,l[1]=a,l[2]=e):e=l[2];let m=(0,eS.J)(e);l[3]!==u||l[4]!==m?(t=()=>{p.current&&m(u)},l[3]=u,l[4]=m,l[5]=t):t=l[5],l[6]!==u?(n=[u],l[6]=u,l[7]=n):n=l[7],(0,c.useEffect)(t,n),l[8]===Symbol.for("react.memo_cache_sentinel")?(i=()=>(p.current=!0,()=>{p.current=!1}),r=[],l[8]=i,l[9]=r):(i=l[8],r=l[9]),(0,c.useEffect)(i,r)}();let z=function(){let e,t=(0,s.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={pick:eU,defaultComponent:lo},t[0]=e):e=t[0],(0,h.A1m)(e)}();j[0]!==k.id||j[1]!==k.type||j[2]!==w?(l=w({type:"document",documentId:k.id,schemaType:k.type}),j[0]=k.id,j[1]=k.type,j[2]=w,j[3]=l):l=j[3];let T=l;j[4]!==T?(d={templateItems:T},j[4]=T,j[5]=d):d=j[5];let[P,A]=(0,h.CzS)(d),R=C&&!A;j[6]!==E||j[7]!==R||j[8]!==k||j[9]!==e?(u=R&&E&&k.type!==E?(t=e,n=k,i=E,{...t,pane:{...t.pane,options:{...n,type:i}}}):e,j[6]=E,j[7]=R,j[8]=k,j[9]=e,j[10]=u):u=j[10];let D=u,{ReferenceChildLink:$,handleEditReference:B,groupIndex:Y,routerPanesState:M}=I;j[11]!==Y||j[12]!==M?(p=M[Y+1]?.[0].params||{},j[11]=Y,j[12]=M,j[13]=p):p=j[13];let L=p,O=M.length,{parentRefPath:H}=L;j[14]!==Y||j[15]!==H||j[16]!==O?(m=H?{path:(0,eo.sH)(H),state:Y>=O-1?"none":Y>=O-2?"selected":"pressed"}:{path:[],state:"none"},j[14]=Y,j[15]=H,j[16]=O,j[17]=m):m=j[17];let V=m,{t:Z}=(0,h.Bdt)(r.Z7);if("*"===k.type&&!R){let e,t;return j[18]!==Z?(e=Z("panes.document-pane.document-not-found.loading"),j[18]=Z,j[19]=e):e=j[19],j[20]!==_||j[21]!==e?(t=(0,o.jsx)(tY,{flex:2.5,minWidth:320,paneKey:_,title:e}),j[20]=_,j[21]=e,j[22]=t):t=j[22],t}if(!E){let e,t,n,i,r;return j[23]!==Z?(e=Z("panes.document-pane.document-not-found.title"),j[23]=Z,j[24]=e):e=j[24],j[25]!==k.id?(t={id:k.id},j[25]=k.id,j[26]=t):t=j[26],j[27]===Symbol.for("react.memo_cache_sentinel")?(n={Code:lz},j[27]=n):n=j[27],j[28]!==Z||j[29]!==t?(i=(0,o.jsx)(a.BJ,{space:4,children:(0,o.jsx)(a.EY,{as:"p",children:(0,o.jsx)(h.HTc,{t:Z,i18nKey:"panes.document-pane.document-not-found.text",values:t,components:n}
419)})}),j[28]=Z,j[29]=t,j[30]=i):i=j[30],j[31]!==_||j[32]!==e||j[33]!==i?(r=(0,o.jsx)(tR,{flex:2.5,minWidth:320,paneKey:_,title:e,children:i}),j[31]=_,j[32]=e,j[33]=i,j[34]=r):r=j[34],r}let N=`${E}-${k.id}-${S||""}`;return j[35]!==z||j[36]!==k.id||j[37]!==k.type?(f=(0,o.jsx)(z,{documentId:k.id,documentType:k.type}),j[35]=z,j[36]=k.id,j[37]=k.type,j[38]=f):f=j[38],j[39]!==k.id||j[40]!==k.type||j[41]!==f?(x=(0,o.jsx)(tL,{documentId:k.id,documentType:k.type,children:f}),j[39]=k.id,j[40]=k.type,j[41]=f,j[42]=x):x=j[42],j[43]!==k.id||j[44]!==k.type||j[45]!==x?(g=(0,o.jsx)(e7,{documentId:k.id,documentType:k.type,children:x}),j[43]=k.id,j[44]=k.type,j[45]=x,j[46]=g):g=j[46],j[47]!==$||j[48]!==V||j[49]!==B||j[50]!==g||j[51]!==P?(b=(0,o.jsx)(h.NO5,{EditReferenceLinkComponent:$,onEditReference:B,initialValueTemplateItems:P,activePath:V,children:g}),j[47]=$,j[48]=V,j[49]=B,j[50]=g,j[51]=P,j[52]=b):b=j[52],j[53]!==D||j[54]!==N||j[55]!==b?(y=(0,o.jsx)(lk,{...D,children:b},N),j[53]=D,j[54]=N,j[55]=b,j[56]=y):y=j[56],y}function lz(e){let{children:t}=e;return(0,o.jsx)("code",{children:t})}function lT(e,t){let n,i,r=(0,s.c)(8);r[0]!==t?(n=void 0===t?{}:t,r[0]=t,r[1]=n):n=r[1];let l=n,o=(0,h.bgA)();e:{let t,n;if(e.type&&"*"!==e.type){i=e;break e}let s=e.template||l.template;r[2]!==s||r[3]!==o?(t=s?o.find(e=>e.id===s):void 0,r[2]=s,r[3]=o,r[4]=t):t=r[4];let a=t?.schemaType;if(!a){i=e;break e}r[5]!==a||r[6]!==e?(n={...e,type:a},r[5]=a,r[6]=e,r[7]=n):n=r[7],i=n}return i}let lP=(0,c.forwardRef)(function(e,t){let n,i,r,l=(0,s.c)(9),{routerPanesState:a,groupIndex:d}=(0,c.useContext)(u.l4);l[0]!==d||l[1]!==a?(n=a.slice(0,d),l[0]=d,l[1]=a,l[2]=n):n=l[2];let p=n;l[3]!==p?(i={panes:p},l[3]=p,l[4]=i):i=l[4];let m=i;return l[5]!==e||l[6]!==t||l[7]!==m?(r=(0,o.jsx)(_.s8,{...e,ref:t,state:m}),l[5]=e,l[6]=t,l[7]=m,l[8]=r):r=l[8],r}),lA=(0,c.forwardRef)(function(e,t){let n,i,r,l,a,d,p=(0,s.c)(19);p[0]!==e?({childId:n,childPayload:r,childParameters:i,...l}=e,p[0]=e,p[1]=n,p[2]=i,p[3]=r,p[4]=l):(n=p[1],i=p[2],r=p[3],l=p[4]);let{routerPanesState:m,groupIndex:h}=(0,c.useContext)(u.l4);if(p[5]!==n||p[6]!==i||p[7]!==r||p[8]!==h||p[9]!==m){let e;p[11]!==n||p[12]!==i||p[13]!==r?(e=[{id:n,params:i,payload:r}],p[11]=n,p[12]=i,p[13]=r,p[14]=e):e=p[14],a={panes:[...m.slice(0,h+1),e]},p[5]=n,p[6]=i,p[7]=r,p[8]=h,p[9]=m,p[10]=a}else a=p[10];return p[15]!==t||p[16]!==l||p[17]!==a?(d=(0,o.jsx)(_.s8,{...l,ref:t,state:a}),p[15]=t,p[16]=l,p[17]=a,p[18]=d):d=p[18],d}),lR=(0,c.forwardRef)(function(e,t){let n,i,r,l,a,d,p,m=(0,s.c)(20),{routerPanesState:f,groupIndex:x,siblingIndex:g}=(0,c.useContext)(u.l4);m[0]!==e?({params:n,payload:i,...r}=e,m[0]=e,m[1]=n,m[2]=i,m[3]=r):(n=m[1],i=m[2],r=m[3]);let b=(0,h.$6H)(n),y=(0,h.$6H)(i),j=f[x],v=j[g],w=b??v.params,S=y??v.payload;m[4]!==v||m[5]!==w||m[6]!==S?(l={...v,params:w,payload:S},m[4]=v,m[5]=w,m[6]=S,m[7]=l):l=m[7];let I=l;m[8]!==j||m[9]!==I||m[10]!==g?(a=[...j.slice(0,g),I,...j.slice(g+1)],m[8]=j,m[9]=I,m[10]=g,m[11]=a):a=m[11];let k=a;m[12]!==f||m[13]!==x||m[14]!==k?(d={panes:[...f.slice(0,x),k,...f.slice(x+1)]},m[12]=f,m[13]=x,m[14]=k,m[15]=d):d=m[15];let E=d;return m[16]!==E||m[17]!==t||m[18]!==r?(p=(0,o.jsx)(_.s8,{ref:t,...r,state:E}),m[16]=E,m[17]=t,m[18]=r,m[19]=p):p=m[19],p}),lD=(0,c.forwardRef)(function(e,t){let n,i,r,l,a,d,c,u,p,h,f,x=(0,s.c)(24);x[0]!==e?({documentId:i,documentType:r,parentRefPath:l,children:n,template:d,...a}=e,x[0]=e,x[1]=n,x[2]=i,x[3]=r,x[4]=l,x[5]=a,x[6]=d):(n=x[1],i=x[2],r=x[3],l=x[4],a=x[5],d=x[6]),x[7]!==i?(c=(0,m.IM)(i),x[7]=i,x[8]=c):c=x[8];let g=d?.params;return x[9]!==l?(u=(0,eo.dI)(l),x[9]=l,x[10]=u):u=x[10],x[11]!==d?(p=d&&{template:d?.id},x[11]=d,x[12]=p):p=x[12],x[13]!==r||x[14]!==u||x[15]!==p?(h={type:r,parentRefPath:u,...p},x[13]=r,x[14]=u,x[15]=p,x[16]=h):h=x[16],x[17]!==n||x[18]!==t||x[19]!==a||x[20]!==c||x[21]!==g||x[22]!==h?(f=(0,o.jsx)(lA,{...a,ref:t,childId:c,childPayload:g,childParameters:h,children:n}),x[17]=n,x[18]=t,x[19]=a,x[20]=c,x[21]=g,x[22]=h,x[23]=f):f=x[23],f}),l$=[];function lB(e){let t,n,i,r,l,a,d,c,p,m,h,f,x,g=(0,s.c)(60),{children:b,flatIndex:y,index:j,params:v,payload:S,siblingIndex:I}=e,{navigate:k,navigateIntent:E,resolvePathFromState:C}=(0,_.rd)(),z=(0,_.ks)(),{panes:T,expand:P}=e8(),A=z?.panes||l$,R=T?.[T.length-2],D=j-1;g[0]!==D||g[1]!==A||g[2]!==z||g[3]!==I?(t=e=>{let t=A[D]||[],n=t[I],i=e(t,n),r=[...A.slice(0,D),i,...A.slice(D+1)];return{...z,panes:r}},g[0]=D,g[1]=A,g[2]=z,g[3]=I,g[4]=t):t=g[4];let $=t;g[5]!==$||g[6]!==k?(n=(e,t)=>{let n=$(e);return setTimeout(()=>k(n,t?{stickyParams:t}:void 0),0),n},g[5]=$,g[6]=k,g[7]=n):n=g[7];let B=n;g[8]!==$||g[9]!==C||g[10]!==I?(i=e=>C($((t,n)=>[...t.slice(0,I),{...n,params:e}
419,...t.slice(I+1)])),g[8]=$,g[9]=C,g[10]=I,g[11]=i):i=g[11];let Y=i;g[12]!==B||g[13]!==I?(r=e=>{B((t,n)=>[...t.slice(0,I),{...n,payload:e},...t.slice(I+1)])},g[12]=B,g[13]=I,g[14]=r):r=g[14];let M=r;g[15]!==B||g[16]!==I?(l=(e,t)=>{B((t,n)=>[...t.slice(0,I),{...n,params:e},...t.slice(I+1)],t)},g[15]=B,g[16]=I,g[17]=l):l=g[17];let L=l;g[18]!==D||g[19]!==k||g[20]!==A?(a=e=>{let{id:t,parentRefPath:n,type:i,template:r,version:l}=e;k({panes:[...A.slice(0,D+1),[{id:t,params:{template:r.id,parentRefPath:(0,eo.dI)(n),type:i,version:l},payload:r.params}]]})},g[18]=D,g[19]=k,g[20]=A,g[21]=a):a=g[21];let O=a,H=!!A[D]&&A[D].length>1,V=A[D]?A[D].length:0,Z=y?lP:void 0;g[22]!==B?(c=e=>{let t=void 0===e?{}:e;B(()=>[{id:t.id||"",payload:t.payload,params:t.params||{}}])},d=()=>{B(lY)},g[22]=B,g[23]=d,g[24]=c):(d=g[23],c=g[24]),g[25]!==P||g[26]!==D||g[27]!==R||g[28]!==k||g[29]!==A?(p=e=>{(void 0===e||e)&&R&&P(R.element),k({panes:A.slice(0,D)})},g[25]=P,g[26]=D,g[27]=R,g[28]=k,g[29]=A,g[30]=p):p=g[30],g[31]!==B||g[32]!==I?(m=e=>{B((t,n)=>{let i={...n,payload:e?.payload||n.payload,params:e?.params||n.params};return[...t.slice(0,I),i,...t.slice(I)]})},g[31]=B,g[32]=I,g[33]=m):m=g[33],g[34]!==v||g[35]!==L?(h=e=>{let t=w(v,"view");return L(e?{...t,view:e}:t)},g[34]=v,g[35]=L,g[36]=h):h=g[36],g[37]!==Y||g[38]!==y||g[39]!==D||g[40]!==O||g[41]!==E||g[42]!==v||g[43]!==S||g[44]!==A||g[45]!==L||g[46]!==M||g[47]!==I||g[48]!==d||g[49]!==p||g[50]!==m||g[51]!==h||g[52]!==H||g[53]!==V||g[54]!==Z||g[55]!==c?(f={index:y,groupIndex:D,siblingIndex:I,payload:S,params:v,hasGroupSiblings:H,groupLength:V,routerPanesState:A,ChildLink:lA,BackLink:Z,ReferenceChildLink:lD,handleEditReference:O,ParameterizedLink:lR,replaceCurrent:c,closeCurrent:d,closeCurrentAndAfter:p,duplicateCurrent:m,setView:h,setParams:L,setPayload:M,createPathWithParams:Y,navigateIntent:E},g[37]=Y,g[38]=y,g[39]=D,g[40]=O,g[41]=E,g[42]=v,g[43]=S,g[44]=A,g[45]=L,g[46]=M,g[47]=I,g[48]=d,g[49]=p,g[50]=m,g[51]=h,g[52]=H,g[53]=V,g[54]=Z,g[55]=c,g[56]=f):f=g[56];let N=f;return g[57]!==b||g[58]!==N?(x=(0,o.jsx)(u.l4.Provider,{value:N,children:b}),g[57]=b,g[58]=N,g[59]=x):x=g[59],x}function lY(e,t){return e.length>1?e.filter(e=>e!==t):e}function lM(e){let t,n,i,l,d,c=(0,s.c)(14),{isSelected:u,pane:p,paneKey:m}=e;c[0]!==p?(t=(0,h.u4i)(p)&&p.type||null,c[0]=p,c[1]=t):t=c[1];let f=t,{t:x}=(0,h.Bdt)(r.Z7);return c[2]!==x?(n=x("panes.unknown-pane-type.title"),c[2]=x,c[3]=n):n=c[3],c[4]!==n?(i=(0,o.jsx)(tw,{title:n}),c[4]=n,c[5]=i):i=c[5],c[6]!==x||c[7]!==f?(l=(0,o.jsx)(tl,{children:(0,o.jsx)(a.az,{padding:4,children:"string"==typeof f?(0,o.jsx)(a.EY,{as:"p",muted:!0,children:(0,o.jsx)(h.HTc,{t:x,i18nKey:"panes.unknown-pane-type.unknown-type.text",values:{type:f}})}):(0,o.jsx)(a.EY,{as:"p",muted:!0,children:(0,o.jsx)(h.HTc,{t:x,i18nKey:"panes.unknown-pane-type.missing-type.text"})})})}),c[6]=x,c[7]=f,c[8]=l):l=c[8],c[9]!==u||c[10]!==m||c[11]!==i||c[12]!==l?(d=(0,o.jsxs)(tn,{id:m,selected:u,children:[i,l]}),c[9]=u,c[10]=m,c[11]=i,c[12]=l,c[13]=d):d=c[13],d}let lL={component:(0,c.lazy)(()=>n.e(1932).then(n.bind(n,51932))),document:(0,c.lazy)(()=>Promise.resolve().then(function(){return ap})),documentList:(0,c.lazy)(()=>Promise.resolve().then(function(){return am})),list:(0,c.lazy)(()=>n.e(7158).then(n.bind(n,77158)))},lO=(0,c.memo)(function(e){let t,n,i,r,l=(0,s.c)(25),{active:a,childItemId:d,groupIndex:u,index:p,itemId:m,pane:h,paneKey:f,params:x,payload:g,path:b,selected:y,siblingIndex:j,maximized:v,onSetMaximizedPane:_}=e,w=lL[h.type]||lM;l[0]!==f||l[1]!==b||l[2]!==y?(t=(0,o.jsx)(tY,{paneKey:f,path:b,selected:y}),l[0]=f,l[1]=b,l[2]=y,l[3]=t):t=l[3];let S=d||"";return l[4]!==w||l[5]!==a||l[6]!==p||l[7]!==m||l[8]!==v||l[9]!==_||l[10]!==h||l[11]!==f||l[12]!==y||l[13]!==S?(n=(0,o.jsx)(w,{childItemId:S,index:p,itemId:m,isActive:a,isSelected:y,paneKey:f,pane:h,maximized:v,onSetMaximizedPane:_}),l[4]=w,l[5]=a,l[6]=p,l[7]=m,l[8]=v,l[9]=_,l[10]=h,l[11]=f,l[12]=y,l[13]=S,l[14]=n):n=l[14],l[15]!==t||l[16]!==n?(i=(0,o.jsx)(c.Suspense,{fallback:t,children:n}),l[15]=t,l[16]=n,l[17]=i):i=l[17],l[18]!==u||l[19]!==p||l[20]!==x||l[21]!==g||l[22]!==j||l[23]!==i?(r=(0,o.jsx)(lB,{flatIndex:p,index:u,params:x,payload:g,siblingIndex:j,children:i}),l[18]=u,l[19]=p,l[20]=x,l[21]=g,l[22]=j,l[23]=i,l[24]=r):r=l[24],r},({params:e={},payload:t=null,...n},{params:i={},payload:r=null,...l})=>{if(!S(e,i)||!S(t,r))return!1;for(let e of new Set([...Object.keys(n),...Object.keys(l)]))if(n[e]!==l[e])return!1;return!0});function lH(e){let t,n,i=(0,s.c)(10),{document:l}=e,a=(0,h.I07)().get(l._type),{t:d}=(0,h.Bdt)(r.Z7),{title:c}=tq();if(!a){let e,t;return i[0]!==l._type||i[1]!==d?(e=d("doc-title.unknown-schema-type.text",{schemaType:l._type}),i[0]=l._type,i[1]=d,i[2]=e):e=i[2],i[3]!==e?(t=(0,o.jsx)("code",{children:e}),i[3]=e,i[4]=t):t=i[4],t}return i[5]!==d||i[6]!==c?(t=c||(0,o.jsx)("span",{style:{color:"var(--card-muted-fg-color)"},children:d("doc-title.fallback.text")}),i[5]=d,i[6]=c,i[7]=t):t=i[7],i[8]!==t?(n=(0,o.jsx)(o.Fragment,{children:t}),i[8]=t,i[9]=n):n=i[9],n}let lV=(0,g.I4)(a.az)`
420  margin-left: auto;
421`,lZ=g.I4.details`
422  flex: none;
423
424  &[open] ${lV} {
425    transform: rotate(180deg);
426  }
427`,lN=g.I4.summary`
428  list-style: none;
429
430  &::-webkit-details-marker {
431    display: none;
432  }
433`,lK=g.I4.table`
434  width: 100%;
435  text-align: left;
436  padding: 0 ${({theme:e})=>(0,a.D0)(e.sanity.space[2])};
437  border-collapse: collapse;
438
439  th {
440    padding: ${({theme:e})=>(0,a.D0)(e.sanity.space[1])};
441  }
442
443  td {
444    padding: 0 ${({theme:e})=>(0,a.D0)(e.sanity.space[1])};
445  }
446
447  tr > *:last-child {
448    text-align: right;
449  }
450`,lF=(0,g.I4)(a.so)`
451  min-height: 33px;
452`,lW=e=>{let t,n,i,d,c,u,m=(0,s.c)(13),{t:f}=(0,h.Bdt)(r.Z7),x=e.totalCount-e.references.length;return x?(m[0]!==x||m[1]!==f?(t=f("confirm-delete-dialog.other-reference-count.title",{count:x}),m[0]=x,m[1]=f,m[2]=t):t=m[2],m[3]!==t?(n=(0,o.jsx)(a.EY,{size:1,muted:!0,children:t}),m[3]=t,m[4]=n):n=m[4],m[5]!==f?(i=f("confirm-delete-dialog.other-reference-count.tooltip"),m[5]=f,m[6]=i):i=m[6],m[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,o.jsx)(a.EY,{size:1,muted:!0,children:(0,o.jsx)(p.YzR,{})}),m[7]=d):d=m[7],m[8]!==i?(c=(0,o.jsx)(l.m_,{portal:!0,placement:"top",content:i,
452children:d}),m[8]=i,m[9]=c):c=m[9],m[10]!==n||m[11]!==c?(u=(0,o.jsx)(a.az,{padding:2,children:(0,o.jsxs)(a.cV,{space:2,children:[n,c]})}),m[10]=n,m[11]=c,m[12]=u):u=m[12],u):null};function lJ(e){let t,n,i,r,d,c,u=(0,s.c)(27),{icon:p,layout:m,presence:f,schemaType:x,value:g}=e,b=(0,h.r0j)(g._id),{perspectiveStack:y}=(0,h.QO2)();u[0]!==y||u[1]!==e.documentPreviewStore||u[2]!==x||u[3]!==g._id?(t=(0,h.TU6)(e.documentPreviewStore,x,g._id,y),u[0]=y,u[1]=e.documentPreviewStore,u[2]=x,u[3]=g._id,u[4]=t):t=u[4];let j=t;u[5]===Symbol.for("react.memo_cache_sentinel")?(n={snapshot:null,isLoading:!0,original:null},u[5]=n):n=u[5];let{snapshot:_,original:w,isLoading:S}=(0,v.J)(j,n);u[6]!==S||u[7]!==f||u[8]!==b.draft||u[9]!==b.published||u[10]!==b.versions?(i=S?null:(0,o.jsx)(l.vE,{children:(0,o.jsxs)(a.so,{align:"center",gap:3,children:[f&&f.length>0&&(0,o.jsx)(h.JEU,{presence:f}),(0,o.jsx)(h.ZDR,{draft:b.draft,published:b.published,versions:b.versions})]})}),u[6]=S,u[7]=f,u[8]=b.draft,u[9]=b.published,u[10]=b.versions,u[11]=i):i=u[11];let I=i;u[12]!==b.draft||u[13]!==b.published||u[14]!==b.versions?(r=(0,o.jsx)(h.Aii,{draft:b.draft,published:b.published,versions:b.ver
452sions}),u[12]=b.draft,u[13]=b.published,u[14]=b.versions,u[15]=r):r=u[15];let k=r;return u[16]!==w||u[17]!==_||u[18]!==g?(d=(0,h.ADU)({snapshot:_,original:w,fallback:g}),u[16]=w,u[17]=_,u[18]=g,u[19]=d):d=u[19],u[20]!==p||u[21]!==S||u[22]!==m||u[23]!==I||u[24]!==d||u[25]!==k?(c=(0,o.jsx)(h.m6P,{...d,isPlaceholder:S,icon:p,layout:m,status:I,tooltip:k}),u[20]=p,u[21]=S,u[22]=m,u[23]=I,u[24]=d,u[25]=k,u[26]=c):c=u[26],c}let lU=[];function lG(e){let t,n,i,r,l=(0,s.c)(16),{onClick:a,type:d,value:c}=e,u=c?._id;l[0]!==u?(t=(0,m.IM)(u),l[0]=u,l[1]=t):t=l[1];let p=(0,h.cVB)(t),f=(0,h.yKO)(),{ReferenceChildLink:x}=nC();l[2]!==x||l[3]!==d?.name||l[4]!==c?._id?(n=function(e){return(0,o.jsx)(x,{documentId:c?._id,documentType:d?.name,parentRefPath:lU,...e})},l[2]=x,l[3]=d?.name,l[4]=c?._id,l[5]=n):n=l[5];let g=n,b=d?.icon,y=p?.length>0?p:lU;return l[6]!==f||l[7]!==b||l[8]!==y||l[9]!==d||l[10]!==c?(i=(0,o.jsx)(lJ,{documentPreviewStore:f,icon:b,layout:"default",presence:y,schemaType:d,value:c}),l[6]=f,l[7]=b,l[8]=y,l[9]=d,l[10]=c,l[11]=i):i=l[11],l[12]!==a||l[13]!==g||l[14]!==i?(r=(0,o.jsx)(h.Ns2,{__unstable_focusRing:!0,as:g,"data-as":"a",onClick:a,radius:2,children:i}),l[12]=a,l[13]=g,l[14]=i,l[15]=r):r=l[15],r}let lQ=(0,g.I4)(a.EY)`
453  /* text-overflow: ellipsis;
454  overflow: hidden;
455  white-space: nowrap; */
456  max-width: 120px;
457`,lq=e=>{let t,n,i,r,l,d,c,u,p,f,x,g,b,y,j=(0,s.c)(44),{versionId:_,schemaType:w}=e,{t:S}=(0,h.Bdt)(),I=(0,h.yKO)();j[0]!==_?(t=(0,h.tfA)(_),j[0]=_,j[1]=t):t=j[1];let k=t,{data:E}=(0,h.K0D)();if(j[2]!==I||j[3]!==k||j[4]!==w||j[5]!==_){let e=["version"===k?(0,m._S)(_):"published"===k?"published":"drafts"];n=(0,h.TU6)(I,w,(0,m.IM)(_),e),j[2]=I,j[3]=k,j[4]=w,j[5]=_,j[6]=n}else n=j[6];let C=n;j[7]===Symbol.for("react.memo_cache_sentinel")?(i={snapshot:null,isLoading:!0,original:null},j[7]=i):i=j[7];let{snapshot:z,original:T,isLoading:P}=(0,v.J)(C,i);e:{let e;if("version"!==k){r=void 0;break e}if(j[8]!==E||j[9]!==_){let t;j[11]!==_?(t=e=>(0,h._hI)(e._id)===(0,m._S)(_),j[11]=_,j[12]=t):t=j[12],e=E.find(t),j[8]=E,j[9]=_,j[10]=e}else e=j[10];r=e}let A=r;j[13]!==k||j[14]!==A?.metadata?.title||j[15]!==S||j[16]!==_?(l=()=>"version"===k?A?.metadata?.title||(0,m._S)(_):S("published"===k?"release.chip.published":"release.chip.draft"),j[13]=k,j[14]=A?.metadata?.title,j[15]=S,j[16]=_,j[17]=l):l=j[17];let R=l;j[18]!==k||j[19]!==A?(d=A?(0,h.Y73)(A):"published"===k?"positive":"caution",j[18]=k,j[19]=A,j[20]=d):d=j[20];let D=d;j[21]!==T||j[22]!==w.name||j[23]!==z||j[24]!==_?(c=(0,h.ADU)({snapshot:z,original:T,fallback:{_id:_,_type:w.name}}),j[21]=T,j[22]=w.name,j[23]=z,j[24]=_,j[25]=c):c=j[25];let $=w.icon;return j[26]===Symbol.for("react.memo_cache_sentinel")?(u={backgroundColor:"transparent"},j[26]=u):u=j[26],j[27]!==D?(p=(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.YeQ,{tone:D})}),j[27]=D,j[28]=p):p=j[28],j[29]!==R?(f=R(),j[29]=R,j[30]=f):f=j[30],j[31]!==f?(x=(0,o.jsx)(lQ,{size:1,weight:"medium",textOverflow:"ellipsis",children:f}),j[31]=f,j[32]=x):x=j[32],j[33]!==p||j[34]!==x?(g=(0,o.jsxs)(a.so,{align:"center",gap:2,paddingY:2,paddingRight:3,paddingLeft:2,children:[p,x]}),j[33]=p,j[34]=x,j[35]=g):g=j[35],j[36]!==g||j[37]!==D?(b=(0,o.jsx)(a.Zp,{border:!0,radius:"full",children:(0,o.jsx)(a.Zp,{radius:"full",tone:D,style:u,children:g})}),j[36]=g,j[37]=D,j[38]=b):b=j[38],j[39]!==P||j[40]!==w.icon||j[41]!==b||j[42]!==c?(y=(0,o.jsx)(h.m6P,{...c,isPlaceholder:P,icon:$,layout:"default",status:b}),j[39]=P,j[40]=w.icon,j[41]=b,j[42]=c,j[43]=y):y=j[43],y},lX=e=>{let t,n,i,r=(0,s.c)(8),{documentType:l,documentVersions:d}=e,c=(0,h.I07)();r[0]!==l||r[1]!==c?(t=c.get(l),r[0]=l,r[1]=c,r[2]=t):t=r[2];let u=t;if(!u)throw Error(`Schema type ${l} not found`);return r[3]!==d||r[4]!==u?(n=d?.map(e=>(0,o.jsx)(lq,{versionId:e,schemaType:u},e)),r[3]=d,r[4]=u,r[5]=n):n=r[5],r[6]!==n?(i=(0,o.jsx)(a.Zp,{border:!0,padding:1,radius:2,children:(0,o.jsx)(a.BJ,{children:n})}),r[6]=n,r[7]=i):i=r[7],i};function l0(e){let t,n,i,c,u,m,f,x,g,b,y,j,v,_,w,S,I,k,E,C=(0,s.c)(66),{crossDatasetReferences:z,internalReferences:T,documentTitle:P,totalCount:A,action:R,datasetNames:D,hasUnknownDatasetN
457ames:$,documentId:B,documentType:Y,onReferenceLinkClick:M,documentVersions:L}=e,O=(0,h.I07)(),H=(0,d.dj)(),{t:V}=(0,h.Bdt)(r.Z7);C[0]!==M||C[1]!==O||C[2]!==V?(t=e=>{let t=O.get(e._type);return t?(0,o.jsx)(lG,{type:t,value:e,onClick:M}):(0,o.jsx)(a.az,{padding:2,children:(0,o.jsx)(h.m6P,{icon:p.KSC,title:V("confirm-delete-dialog.preview-item.preview-unavailable.title"),subtitle:V("confirm-delete-dialog.preview-item.preview-unavailable.subtitle",{documentId:e._id}),layout:"default"})})},C[0]=M,C[1]=O,C[2]=V,C[3]=t):t=C[3];let Z=t;C[4]!==R||C[5]!==P||C[6]!==Y||C[7]!==L||C[8]!==V?(n=()=>(0,o.jsxs)(a.BJ,{space:4,children:[(0,o.jsx)(a.EY,{as:"p",size:1,children:(0,o.jsx)(h.HTc,{t:V,i18nKey:"confirm-delete-dialog.confirmation.text",context:R,components:{DocumentTitle:()=>(0,o.jsx)("strong",{children:P})}})}),"delete"===R&&(0,o.jsx)(lX,{documentType:Y,documentVersions:L})]}),C[4]=R,C[5]=P,C[6]=Y,C[7]=L,C[8]=V,C[9]=n):n=C[9];let N=n;if(T?.totalCount===0&&z?.totalCount===0){let e;return C[10]!==N?(e=N(),C[10]=N,C[11]=e):e=C[11],e}C[12]!==$?(i=$?["unavailable"]:[],C[12]=$,C[13]=i):i=C[13],C[14]!==D||C[15]!==i?(c=[...D,...i],C[14]=D,C[15]=i,C[16]=c):c=C[16];let K=c,F=K.length,W=K.join(", "),J=$&&K.length?"unavailable":"";C[17]!==K.length||C[18]!==V||C[19]!==W||C[20]!==J?(u=V("confirm-delete-dialog.cdr-summary.subtitle",{count:F,datasets:W,context:J}),C[17]=K.length,C[18]=V,C[19]=W,C[20]=J,C[21]=u):u=C[21];let U=u;return C[22]!==N?(m=N(),C[22]=N,C[23]=m):m=C[23],C[24]===Symbol.for("react.memo_cache_sentinel")?(f=(0,o.jsx)(a.Zp,{borderTop:!0,padding:1}),C[24]=f):f=C[24],C[25]===Symbol.for("react.memo_cache_sentinel")?(x=(0,o.jsx)(a.EY,{"aria-hidden":"true",size:1,children:(0,o.jsx)(p.sAQ,{})}),C[25]=x):x=C[25],C[26]!==P?(g={DocumentTitle:()=>P},C[26]=P,C[27]=g):g=C[27],C[28]!==A?(b={count:A},C[28]=A,C[29]=b):b=C[29],C[30]!==V||C[31]!==g||C[32]!==b?(y=(0,o.jsxs)("div",{children:[f,(0,o.jsx)(a.Zp,{padding:3,radius:2,tone:"caution",flex:"none",children:(0,o.jsxs)(a.so,{children:[x,(0,o.jsx)(a.az,{flex:1,marginLeft:3,children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{i18nKey:"confirm-delete-dialog.referring-document-count.text",components:g,t:V,values:b})})})]})})]}),C[30]=V,C[31]=g,C[32]=b,C[33]=y):y=C[33],C[34]!==P?(j={DocumentTitle:()=>P},C[34]=P,C[35]=j):j=C[35],C[36]!==R||C[37]!==V||C[38]!==j?(v=(0,o.jsx)(a.az,{flex:"none",children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{i18nKey:"confirm-delete-dialog.referring-documents-descriptor.text",t:V,context:R,components:j})})}),C[36]=R,C[37]=V,C[38]=j,C[39]=v):v=C[39],C[40]!==T||C[41]!==Z?(_=T.totalCount>0&&(0,o.jsxs)(a.BJ,{as:"ul",space:2,"data-testid":"internal-references",children:[T?.references.map(e=>(0,o.jsx)(a.az,{as:"li",children:Z(e)},e._id)),T.totalCount>T.references.length&&(0,o.jsx)(a.az,{as:"li",padding:3,children:(0,o.jsx)(lW,{...T})})]}),C[40]=T,C[41]=Z,C[42]=_):_=C[42],C[43]!==z||C[44]!==U||C[45]!==B||C[46]!==T.totalCount||C[47]!==K.length||C[48]!==V||C[49]!==H?(w=z.totalCount>0&&(0,o.jsxs)(lZ,{"data-testid":"cross-dataset-references",style:{borderTop:T.totalCount>0?"1px solid var(--card-shadow-outline-color)":void 0},children:[(0,o.jsx)(lN,{children:(0,o.jsx)(a.Zp,{as:"a",marginTop:2*(T.totalCount>0),radius:2,shadow:1,paddingY:1,children:(0,o.jsxs)(a.so,{align:"center",gap:3,paddingX:3,paddingY:1,children:[(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(p.So9,{})}),(0,o.jsxs)(a.BJ,{space:2,children:[(0,o.jsx)(a.EY,{textOverflow:"ellipsis",size:1,children:V("confirm-delete-dialog.cdr-summary.title",{count:K.length,documentCount:V("confirm-delete-dialog.cdr-summary.document-count",{count:z.totalCount})})}),(0,o.jsx)(a.EY,{title:U,textOverflow:"ellipsis",size:1,muted:!0,children:U})]}),(0,o.jsx)(lV,{children:(0,o.jsx)(a.EY,{muted:!0,size:1,children:(0,o.jsx)(p.D3D,{})})})]})})}),(0,o.jsxs)(a.az,{overflow:"auto",paddingTop:2,children:[(0,o.jsxs)(lK,{children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{children:(0,o.jsx)(a.EY,{muted:!0,size:1,style:{minWidth:"5rem"},weight:"medium",children:V("confirm-delete-dialog.cdr-table.project-id.label")})}),(0,o.jsx)("th",{children:(0,o.jsx)(a.EY,{muted:!0,size:1,weight:"medium",children:V("confirm-delete-dialog.cdr-table.dataset.label")})}),(0,o.jsx)("th",{children:(0,o.jsx)(a.EY,{muted:!0,size:1,weight:"medium",children:V("confirm-delete-dialog.cdr-table.document-id.label")})})]})}),(0,o.jsx)("tbody",{children:z.references.filter(l1).map((e,t)=>{let{projectId:n,datasetName:i,documentId:r}=e;return(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:(0,o.jsx)(a.EY,{size:1,children:n})}),(0,o.jsx)("td",{children:(0,o.jsx)(a.EY,{size:1,children:i||"unavailable"})}),(0,o.jsx)("td",{children:(0,o.jsxs)(lF,{align:"center",gap:2,justify:"flex-end",children:[(0,o.jsx)(a.EY,{textOverflow:"ellipsis",size:1,children:r||"unavailable"}),r&&(0,o.jsx)(l.$n,{mode:"bleed",icon:p.TdU,tooltipProps:{content:V("confirm-delete-dialog.cdr-table.copy-id-button.tooltip")},onClick:()=>
457{navigator.clipboard.writeText(r).catch(()=>{H.push({status:"error",title:V("confirm-delete-dialog.cdr-table.id-copied-toast.title-failed")})})}})]})})]},`${B}-${t}`)})})]}),(0,o.jsx)(lW,{...z})]})]}),C[43]=z,C[44]=U,C[45]=B,C[46]=T.totalCount,C[47]=K.length,C[48]=V,C[49]=H,C[50]=w):w=C[50],C[51]!==_||C[52]!==w?(S=(0,o.jsx)(a.Zp,{radius:2,shadow:1,flex:"auto",padding:1,children:(0,o.jsxs)(a.so,{direction:"column",children:[_,w]})}),C[51]=_,C[52]=w,C[53]=S):S=C[53],C[54]!==P?(I={DocumentTitle:()=>P},C[54]=P,C[55]=I):I=C[55],C[56]!==R||C[57]!==V||C[58]!==I?(k=(0,o.jsx)(a.az,{flex:"none",children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{i18nKey:"confirm-delete-dialog.referential-integrity-disclaimer.text",t:V,context:R,components:I})})}),C[56]=R,C[57]=V,C[58]=I,C[59]=k):k=C[59],C[60]!==y||C[61]!==v||C[62]!==S||C[63]!==k||C[64]!==m?(E=(0,o.jsxs)(a.so,{direction:"column",gap:4,children:[m,y,v,S,k]}),C[60]=y,C[61]=v,C[62]=S,C[63]=k,C[64]=m,C[65]=E):E=C[65],E}function l1(e){return"projectId"in e}let l2=()=>(i||(i=(0,G.R)(document,"visibilitychange").pipe((0,T.Z)(null),(0,C.T)(()=>"visible"===document.visibilityState),(0,R.F)(),(0,D.n)(e=>e?(0,Q.O)(0,5e3):q.w),(0,$.t)({refCount:!0,bufferSize:1}))),i),l3=(0,h.R11)(([e,t])=>t.listenQuery({fetch:'{"references":*[references($documentId)][0...100]{_id,_type},"totalCount":count(*[references($documentId)])}',listen:"*[references($documentId)]"},{documentId:e},{tag:"use-referring-documents",transitions:["appear","disappear"],throttleTime:5e3})),l4=(0,h.R11)(([e,t])=>l2().pipe((0,D.n)(()=>(function(e,t){let{versionedClient:n}=t;return l2().pipe((0,D.n)(()=>(function(e,{versionedClient:t}){let n=(0,m.T4)(e),i=(0,m.IM)(e),r={uri:t.getDataUrl("doc",`${n},${i}`),json:!0,query:{excludeContent:"true"},tag:"use-referring-documents.document-existence"};return t.observable.request(r).pipe((0,C.T)(({omitted:e})=>{let t=e.filter(e=>"existence"===e.reason);if(2!==t.length)return 0===t.length||t.some(e=>e.id===n)?i:n}))})(e,t)),(0,D.n)(e=>{if(!e)return(0,N.of)({totalCount:0,references:[]});let t=n.config().dataset;return n.observable.request({url:`/data/references/${t}/documents/${e}/to?excludeInternalReferences=true&excludePaths=true`,tag:"use-referring-documents.external"}).pipe((0,z.W)(e=>{if("object"==typeof e&&e&&"statusCode"in e&&"response"in e&&404===e.statusCode)return(0,N.of)({totalCount:0,references:[]});throw e}))}))})(e,{versionedClient:t}))));function l5(e){return"string"!=typeof e.datasetName}function l6(e){return!!e&&""!==e}function l7(e){return e?.datasetName||""}function l8(e){return e.projectId}let l9=(0,g.I4)(a.az)`
458  box-sizing: border-box;
459`,oe=(0,g.I4)(a.so).attrs({align:"center",direction:"column",justify:"center"})`
460  height: 110px;
461`;function ot(e){let t,n,i,a,d,u,p,f,x,g,b,y,j=(0,s.c)(51),{id:v,type:_,action:w,onCancel:S,onConfirm:I}=e,k=void 0===w?"delete":w,{t:E}=(0,h.Bdt)(r.Z7),C=`deletion-confirmation-${(0,c.useId)()}`,{internalReferences:z,crossDatasetReferences:T,isLoading:P,totalCount:A,projectIds:R,datasetNames:D,hasUnknownDatasetNames:$}=function(e){let t,n,i,r,l,o,a,d,c=(0,s.c)(24),u=(0,h.tH7)(h.miu),p=(0,h.q3J)();c[0]!==e?(t=(0,m.IM)(e),c[0]=e,c[1]=t):t=c[1];let f=t;c[2]!==p||c[3]!==f?(n=[f,p],c[2]=p,c[3]=f,c[4]=n):n=c[4];let[x,g]=l3(n);c[5]!==f||c[6]!==u?(i=[f,u],c[5]=f,c[6]=u,c[7]=i):i=c[7];let[b,y]=l4(i);c[8]!==b?.references?(r=()=>Array.from(new Set(b?.references.map(l8).filter(Boolean))).sort(),c[8]=b?.references,c[9]=r):r=c[9],c[10]!==r?(l=r(),c[10]=r,c[11]=l):l=c[11];let j=l;c[12]!==b?.references?(o=Array.from(new Set(b?.references.map(l7).filter(l6))).sort(),c[12]=b?.references,c[13]=o):o=c[13];let v=o;c[14]!==b?.references?(a=()=>!!b?.references.some(l5),c[14]=b?.references,c[15]=a):a=c[15];let _=a(),w=(x?.totalCount||0)+(b?.totalCount||0),S=g||y;return c[16]!==b||c[17]!==v||c[18]!==_||c[19]!==x||c[20]!==j||c[21]!==w||c[22]!==S?(d={totalCount:w,projectIds:j,datasetNames:v,hasUnknownDatasetNames:_,internalReferences:x,crossDatasetReferences:b,isLoading:S},c[16]=b,c[17]=v,c[18]=_,c[19]=x,c[20]=j,c[21]=w,c[22]=S,c[23]=d):d=c[23],d}(v);j[0]!==v||j[1]!==_?(t={_id:v,_type:_},j[0]=v,j[1]=_,j[2]=t):t=j[2];let B=t;j[3]!==B?(n=(0,o.jsx)(lH,{document:B}),j[3]=B,j[4]=n):n=j[4];let Y=n,M=!P;j[5]!==v?(i=(0,m.IM)(v),j[5]=v,j[6]=i):i=j[6],j[7]!==i?(a={documentId:i},j[7]=i,j[8]=a):a=j[8];let{data:L,loading:O}=(0,h.gn8)(a);j[9]!==L||j[10]!==I?(d=()=>{I(L)},j[9]=L,j[10]=I,j[11]=d):d=j[11];let H=d;return j[12]!==k||j[13]!==E?(u=E("confirm-delete-dialog.header.text",{context:k}),j[12]=k,j[13]=E,j[14]=u):u=j[14],j[15]!==E?(p=E("confirm-delete-dialog.cancel-button.text"),j[15]=E,j[16]=p):p=j[16],j[17]!==S||j[18]!==p?(f={onClick:S,text:p},j[17]=S,j[18]=p,j[19]=f):f=j[19],j[20]!==k||j[21]!==H||j[22]!==M||j[23]!==E||j[24]!==A?(x=M?{text:E(A>0?"confirm-delete-dialog.confirm-anyway-button.text":"confirm-delete-dialog.confirm-button.text",{context:k}),onClick:H}:void 0,j[20]=k,j[21]=H,j[22]=M,j[23]=E,j[24]=A,j[25]=x):x=j[25],j[26]!==f||j[27]!==x?(g={cancelButton:f,confirmButton:x},j[26]=f,j[27]=x,j[28]=g):g=j[28],j[29]!==k||j[30]!==T||j[31]!==D||j[32]!==Y||j[33]!==L||j[34]!==$||j[35]!==v||j[36]!==z||j[37]!==P||j[38]!==S||j[39]!==R||j[40]!==E||j[41]!==A||j[42]!==_||j[43]!==O?(b=(0,o.jsx)(l9,{children:T&&z&&!P&&!O?(0,o.jsx)(l0,{crossDatasetReferences:T,internalReferences:z,documentTitle:Y,isLoading:P,totalCount:A,action:k,projectIds:R,datasetNames:D,hasUnknownDatasetN
461ames:$,onReferenceLinkClick:S,documentId:v,documentType:_,documentVersions:L}):(0,o.jsx)(oe,{"data-testid":"loading-container",children:(0,o.jsx)(h.gd4,{showText:!0,title:E("confirm-delete-dialog.loading.text")})})}),j[29]=k,j[30]=T,j[31]=D,j[32]=Y,j[33]=L,j[34]=$,j[35]=v,j[36]=z,j[37]=P,j[38]=S,j[39]=R,j[40]=E,j[41]=A,j[42]=_,j[43]=O,j[44]=b):b=j[44],j[45]!==C||j[46]!==S||j[47]!==g||j[48]!==b||j[49]!==u?(y=(0,o.jsx)(l.lG,{width:1,id:C,header:u,footer:g,onClose:S,onClickOutside:S,children:b}),j[45]=C,j[46]=S,j[47]=g,j[48]=b,j[49]=u,j[50]=y):y=j[50],y}function on(e){let t,n,i=(0,s.c)(6),{t:d}=(0,h.Bdt)(r.Z7),u=(0,c.useId)(),[p,m]=(0,c.useState)(null);i[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>m(null),i[0]=t):t=i[0];let f=t;return i[1]!==p||i[2]!==u||i[3]!==e||i[4]!==d?(n=p?(0,o.jsx)(l.lG,{id:`dialog-error-${u}`,"data-testid":"confirm-delete-error-dialog",header:d("confirm-delete-dialog.error.title.text"),footer:{confirmButton:{text:d("confirm-delete-dialog.error.retry-button.text"),onClick:f,tone:"default"}},onClose:e.onCancel,children:(0,o.jsx)(a.az,{padding:4,children:(0,o.jsx)(a.EY,{size:1,children:d("confirm-delete-dialog.error.message.text")})})}):(0,o.jsx)(l.tH,{onCatch:m,children:(0,o.jsx)(ot,{...e})}),i[1]=p,i[2]=u,i[3]=e,i[4]=d,i[5]=n):n=i[5],n}let oi=(0,c.forwardRef)(function(e,t){let n,i,r,a,d=(0,s.c)(10);d[0]!==e?({intent:n,...i}=e,d[0]=e,d[1]=n,d[2]=i):(n=d[1],i=d[2]),d[3]!==n?(r=(0,c.forwardRef)(function(e,t){return(0,o.jsx)(_.RZ,{...e,intent:n.type,params:n.params,ref:t,searchParams:n.searchParams})}),d[3]=n,d[4]=r):r=d[4];let u=r;return d[5]!==u||d[6]!==e.disabled||d[7]!==t||d[8]!==i?(a=e.disabled?(0,o.jsx)(l.$n,{...i,as:"a",role:"link","aria-disabled":"true"}):(0,o.jsx)(l.$n,{...i,as:u,"data-as":"a",ref:t}),d[5]=u,d[6]=e.disabled,d[7]=t,d[8]=i,d[9]=a):a=d[9],a});function or(e){let t,n,i,a=(0,s.c)(12),{reveal:d,context:c,loading:u,children:p}=e,m=(0,h.iZK)(),{t:f}=(0,h.Bdt)(r.Z7);if(!d){let e;return a[0]!==p?(e=(0,o.jsx)(o.Fragment,{children:p}),a[0]=p,a[1]=e):e=a[1],e}return a[2]!==c||a[3]!==m||a[4]!==u||a[5]!==f?(t=u?f("insufficient-permissions-message-tooltip.loading-text"):(0,o.jsx)(h.TLO,{context:c,currentUser:m}),a[2]=c,a[3]=m,a[4]=u,a[5]=f,a[6]=t):t=a[6],a[7]!==p?(n=(0,o.jsx)("div",{children:p}),a[7]=p,a[8]=n):n=a[8],a[9]!==t||a[10]!==n?(i=(0,o.jsx)(l.m_,{content:t,portal:!0,children:n}),a[9]=t,a[10]=n,a[11]=i):i=a[11],i}let ol={constrainSize:!0,placement:"bottom",portal:!0},oo=(e,t,n)=>{let i=e.find(e=>e.id===t.templateId)?.schemaType;if(!i)return null;let r={template:t.templateId,type:i,version:n,id:t.initialDocumentId};return{type:"create",params:t.parameters?[r,t.parameters]:r,searchParams:n?[["perspective",n]]:void 0}};function os(e){let t,n,i,d,u,m,f,x,g=(0,s.c)(60),{templateItems:b}=e,y=(0,h.bgA)(),{selectedReleaseId:j}=(0,h.QO2)(),{t:v}=(0,h.Bdt)(r.Z7);g[0]!==b||g[1]!==y?(t=[...b,...y],g[0]=b,g[1]=y,g[2]=t):t=g[2];let w=(0,h.Bvg)(t);g[3]!==b?(n={templateItems:b},g[3]=b,g[4]=n):n=g[4];let[S,I]=(0,h.CzS)(n),k=!I&&S?.length!==0&&S?.every(od);e:{let e;if(!S){let e;g[5]===Symbol.for("react.memo_cache_sentinel")?(e={},g[5]=e):e=g[5],i=e;break e}g[6]!==S?(e=S.reduce(oa,{}),g[6]=S,g[7]=e):e=g[7],i=e}let E=i;if(0===b.length)return null;if(k){let e,t,n;return g[8]!==v?(e=v("pane-header.disabled-created-button.aria-label"),g[8]=v,g[9]=e):e=g[9],g[10]!==e?(t=(0,o.jsx)(l.$n,{"aria-label":e,icon:p.REV,"data-testid":"action-intent-button",disabled:!0,mode:"bleed",tooltipProps:null}),g[10]=e,g[11]=t):t=g[11],g[12]!==I||g[13]!==t?(n=(0,o.jsx)(or,{context:"create-document-type",reveal:!0,loading:I,children:t}),g[12]=I,g[13]=t,g[14]=n):n=g[14],n}if(1===b.length){let e,t,n,i,r,l,s=b[0],a=!E[s.id]?.granted;g[15]!==s||g[16]!==j||g[17]!==y?(e=oo(y,s,j),g[15]=s,g[16]=j,g[17]=y,g[18]=e):e=g[18];let d=e;if(!d)return null;g[19]!==s||g[20]!==w?(t=w(s),g[19]=s,g[20]=w,g[21]=t):t=g[21];let c=t.title,u=s.icon||p.REV;return g[22]!==v?(n=v("pane-header.create-new-button.tooltip"),g[22]=v,g[23]=n):n=g[23],g[24]!==n?(i={content:n},g[24]=n,g[25]=i):i=g[25],g[26]!==a||g[27]!==d||g[28]!==t.title||g[29]!==u||g[30]!==i?(r=(0,o.jsx)(oi,{"aria-label":c,icon:u,intent:d,mode:"bleed",disabled:a,"data-testid":"action-intent-button",tooltipProps:i}),g[26]=a,g[27]=d,g[28]=t.title,g[29]=u,g[30]=i,g[31]=r):r=g[31],g[32]!==a||g[33]!==I||g[34]!==r?(l=(0,o.jsx)(or,{reveal:a,loading:I,context:"create-document-type",children:r}),g[32]=a,g[33]=I,g[34]=r,g[35]=l):l=g[35],l}if(g[36]!==v?(d=v("pane-header.create-new-button.tooltip"),g[36]=v,g[37]=d):d=g[37],g[38]!==d?(u=(0,o.jsx)(l.$n,{icon:p.REV,mode:"bleed","data-testid":"multi-action-intent-button",tooltipProps:{content:d}}),g[38]=d,g[39]=u):u=g[39],g[40]!==w||g[41]!==I||g[42]!==E||g[43]!==j||g[44]!==v||g[45]!==b||g[46]!==y){let e;g[48]!==w||g[49]!==I||g[50]!==E||g[51]!==j||g[52]!==v||g[53]!==y?(e=(e,t)=>{let n=!E[e.id]?.granted,i=oo(y,e,j),r=y.find(t=>
461t.id===e.templateId);if(!r||!i)return null;let s=(0,c.forwardRef)((e,t)=>n?(0,o.jsx)("button",{type:"button",disabled:!0,...e,ref:t}):(0,o.jsx)(_.RZ,{...e,intent:i.type,params:i.params,searchParams:i.searchParams,ref:t}));s.displayName="Link";let{title:a}=w({...e,title:e.title||w(r).title});return(0,o.jsx)(or,{context:"create-document-type",reveal:n,loading:I,children:(0,o.jsx)(l.Dr,{as:s,"data-as":n?"button":"a",text:a,"aria-label":n?v("pane-header.disabled-created-button.aria-label"):a,disabled:n,"data-testid":`action-intent-button-${t}`})},e.id)},g[48]=w,g[49]=I,g[50]=E,g[51]=j,g[52]=v,g[53]=y,g[54]=e):e=g[54],m=b.map(e),g[40]=w,g[41]=I,g[42]=E,g[43]=j,g[44]=v,g[45]=b,g[46]=y,g[47]=m}else m=g[47];return g[55]!==m?(f=(0,o.jsx)(a.W1,{children:m}),g[55]=m,g[56]=f):f=g[56],g[57]!==u||g[58]!==f?(x=(0,o.jsx)(l.IU,{button:u,id:"create-menu",menu:f,popover:ol}),g[57]=u,g[58]=f,g[59]=x):x=g[59],x}function oa(e,t){return e[t.id]=t,e}function od(e){return!e.granted}function oc(e){return null!=e}let ou=(0,c.memo)(function(e){let t,n,i,r,l,d,c,u,p,m,f=(0,s.c)(28),{initialValueTemplateItems:x,menuItems:g,menuItemGroups:b,actionHandlers:y}=e,j=void 0===x?h.Mlv:x,v=void 0===g?h.Mlv:g,_=void 0===b?h.Mlv:b,w=void 0===y?h.MlF:y,S=(0,h.bgA)();f[0]!==w?(t=e=>{if("string"==typeof e.action&&!(e.action in w))return console.warn("No handler for action:",e.action),!1;let t="function"==typeof e.action?e.action:"string"==typeof e.action?w[e.action]:null;return!!t&&(t(e.params),!0)},f[0]=w,f[1]=t):t=f[1];let I=t;f[2]!==I||f[3]!==_||f[4]!==v?(n=ic({actionHandler:I,menuItemGroups:_,menuItems:v.filter(op)}),f[2]=I,f[3]=_,f[4]=v,f[5]=n):n=f[5];let k=n;f[6]!==k?(i=k.filter(ia),f[6]=k,f[7]=i):i=f[7];let E=i;f[8]!==k?(r=k.filter(id),f[8]=k,f[9]=r):r=f[9];let C=r;if(f[10]!==v||f[11]!==S){let e;f[13]!==S?(e=(e,t)=>{if(e.intent?.type!=="create")return null;let{params:n}=e.intent;if(!n)return null;let i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)?n[1]:void 0,l=i.template||i.type;if(!l)return null;let o=S.find(e=>e.id===l);return o?{item:e,template:o,templateParams:r,menuItemIndex:t,initialDocumentId:i.id}:null},f[13]=S,f[14]=e):e=f[14],l=v.map(e).filter(oc).map(om),f[10]=v,f[11]=S,f[12]=l}else l=f[12];let z=l;f[15]!==z||f[16]!==j?(d=es([...z,...j],oh),f[15]=z,f[16]=j,f[17]=d):d=f[17];let T=d;return f[18]!==T?(c=(0,o.jsx)(os,{templateItems:T}),f[18]=T,f[19]=c):c=f[19],f[20]!==E?(u=E.map(of),f[20]=E,f[21]=u):u=f[21],f[22]!==C?(p=C.length>0&&(0,o.jsx)(th,{nodes:C}),f[22]=C,f[23]=p):p=f[23],f[24]!==c||f[25]!==u||f[26]!==p?(m=(0,o.jsxs)(a.so,{gap:1,children:[c,u,p]}),f[24]=c,f[25]=u,f[26]=p,f[27]=m):m=f[27],m});function op(e){return e.intent?.type!=="create"}function om(e){let{initialDocumentId:t,item:n,template:i,menuItemIndex:r,templateParams:l}=e;return{id:`menuItem${r}`,initialDocumentId:t,templateId:i.id,type:"initialValueTemplateItem",title:n.title||i.title,i18n:n.i18n||i.i18n,icon:n.icon,description:i.description,parameters:l,schemaType:i.schemaType}}function oh(e){var t=[e.initialDocumentId,e.templateId,e.parameters];let n=e=>"object"==typeof e&&e?Array.isArray(e)?e.map(n):Object.entries(e).sort(([e],[t])=>e.localeCompare(t,"en")):e;return JSON.stringify(n(JSON.parse(JSON.stringify(t))))}function of(e){return(0,o.jsx)(tI,{node:e},e.key)}function ox(e){let t,n,i,l,a,d,c,u=(0,s.c)(16),{t:p}=(0,h.Bdt)(r.Z7),{layout:m,value:f}=e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(t={Code:"code"},u[0]=t):t=u[0],u[1]!==f._type?(n={documentType:f._type},u[1]=f._type,u[2]=n):n=u[2],u[3]!==p||u[4]!==n?(i=(0,o.jsx)("em",{children:(0,o.jsx)(h.HTc,{t:p,i18nKey:"pane-item.missing-schema-type.title",components:t,values:n})}),u[3]=p,u[4]=n,u[5]=i):i=u[5],u[6]===Symbol.for("react.memo_cache_sentinel")?(l={Code:"code"},u[6]=l):l=u[6],u[7]!==f._id?(a={documentId:f._id},u[7]=f._id,u[8]=a):a=u[8],u[9]!==p||u[10]!==a?(d=(0,o.jsx)(h.HTc,{t:p,i18nKey:"pane-item.missing-schema-type.subtitle",components:l,values:a}),u[9]=p,u[10]=a,u[11]=d):d=u[11],u[12]!==m||u[13]!==i||u[14]!==d?(c=(0,o.jsx)(h.m6P,{title:i,subtitle:d,media:og,layout:m}),u[12]=m,u[13]=i,u[14]=d,u[15]=c):c=u[15],c}function og(){return(0,o.jsx)(p.sAQ,{})}function ob(e,t,n){return!1!==e&&(e||t&&t.icon||n||!1)}function oy(e){let t,n,i,r,l,d,u,m,x=(0,s.c)(42),{icon:g,id:b,layout:y,pressed:j,schemaType:v,selected:_,title:w,value:S,margin:I,marginBottom:k,marginTop:E}=e,C=void 0===y?"default":y,z=(0,h.I07)(),T=(0,h.yKO)(),{ChildLink:P}=nC(),A=(0,h.cVB)(b),R=!!(v&&v.name&&z.get(v.name)),[D,$]=(0,c.useState)(!1);e:{let e,n,i,r;if(S&&(0,f.ME)(S)){let e,n;if(!v||!R){let e;x[0]!==S?(e=(0,o.jsx)(ox,{value:S}),x[0]=S,x[1]=e):e=x[1],t=e;break e}
461x[2]!==g||x[3]!==v?(e=ob(g,v,p.pyG),x[2]=g,x[3]=v,x[4]=e):e=x[4],x[5]!==A||x[6]!==T||x[7]!==C||x[8]!==v||x[9]!==e||x[10]!==S?(n=(0,o.jsx)(lJ,{documentPreviewStore:T,icon:e,layout:C,schemaType:v,value:S,presence:A}),x[5]=A,x[6]=T,x[7]=C,x[8]=v,x[9]=e,x[10]=S,x[11]=n):n=x[11],t=n;break e}x[12]===Symbol.for("react.memo_cache_sentinel")?(e={opacity:.5},x[12]=e):e=x[12],x[13]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(a.az,{style:e,children:(0,o.jsx)(a.EY,{muted:!0,size:1,children:(0,o.jsx)(p.vKP,{})})}),x[13]=n):n=x[13],x[14]!==g||x[15]!==v?(i=ob(g,v,p.sjq),x[14]=g,x[15]=v,x[16]=i):i=x[16],x[17]!==i||x[18]!==w?(r=(0,o.jsx)(h.m6P,{status:n,icon:i,layout:"compact",title:w}),x[17]=i,x[18]=w,x[19]=r):r=x[19],t=r}let B=t;x[20]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{if(e.metaKey)return void $(!1);$(!0)},x[20]=n):n=x[20];let Y=n;x[21]===Symbol.for("react.memo_cache_sentinel")?(i=()=>$(!1),x[21]=i):i=x[21],x[22]!==_?(r=[_],x[22]=_,x[23]=r):r=x[23],(0,c.useEffect)(i,r);let[M,L]=(0,c.useState)(!1),O=(0,c.useRef)(null);x[24]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{O.current=setTimeout(()=>(0,c.startTransition)(()=>L(!0)),400)},x[24]=l):l=x[24];let H=l;x[25]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{O.current&&clearTimeout(O.current),(0,c.startTransition)(()=>L(!1))},x[25]=d):d=x[25];let V=d,Z=`pane-item-${w}`,N=_||D;return x[26]!==b||x[27]!==M||x[28]!==v||x[29]!==S?(u=M&&v?.name&&S&&(0,f.ME)(S)&&(0,o.jsx)(oj,{documentId:b,documentType:v.name}),x[26]=b,x[27]=M,x[28]=v,x[29]=S,x[30]=u):u=x[30],x[31]!==b||x[32]!==I||x[33]!==k||x[34]!==E||x[35]!==j||x[36]!==B||x[37]!==u||x[38]!==Z||x[39]!==P||x[40]!==N?(m=(0,o.jsxs)(h.Ns2,{"data-testid":Z,__unstable_focusRing:!0,as:P,childId:b,"data-as":"a",margin:I,marginBottom:k,marginTop:E,onClick:Y,onMouseEnter:H,onMouseLeave:V,pressed:j,radius:2,selected:N,sizing:"border",tabIndex:-1,tone:"inherit",children:[B,u]}),x[31]=b,x[32]=I,x[33]=k,x[34]=E,x[35]=j,x[36]=B,x[37]=u,x[38]=Z,x[39]=P,x[40]=N,x[41]=m):m=x[41],m}function oj(e){let t,n=(0,s.c)(2),{documentId:i,documentType:r}=e;return n[0]!==i?(t=(0,m.IM)(i),n[0]=i,n[1]=t):t=n[1],(0,h.zX2)(t,r),null}oj.displayName="PreloadDocumentPane";let ov=(0,c.memo)(e=>{let t,n=(0,s.c)(4),{children:i,group:r}=e,l=(0,c.useContext)(u.Pq);if(null===l)throw Error("DocumentActionsStateContext is not set. This should not happen.");return n[0]!==i||n[1]!==r||n[2]!==l?(t=i({states:r?l.filter(e=>(e.group||["default"]).includes(r)):l}),n[0]=i,n[1]=r,n[2]=l,n[3]=t):t=n[3],t});ov.displayName="Memo(RenderActionCollectionState)";let o_=(0,c.memo)(e=>{let t,n=(0,s.c)(4),{badges:i,children:r,badgeProps:l}=e;return n[0]!==l||n[1]!==i||n[2]!==r?(t=(0,o.jsx)(h.N6R,{hooks:i,args:l,children:r}),n[0]=l,n[1]=i,n[2]=r,n[3]=t):t=n[3],t});o_.displayName="Memo(RenderBadgeCollectionState)";let ow={by:[{field:"_updatedAt",direction:"desc"}]},oS={},oI=(0,g.I4)(a.az)`
462  position: relative;
463  opacity: ${e=>e.$opacity||1};
464  transition: opacity 0.4s;
465`,ok=(0,g.I4)(a.az)`
466  position: absolute;
467  left: 0;
468  right: 0;
469  top: 0;
470  bottom: 0;
471`,oE=[...Array(30).keys()];function oC(e){let t,n,i=(0,s.c)(4),{layout:r}=e;return i[0]!==r?(t=oE.map(e=>(0,o.jsx)(h.m6P,{isPlaceholder:!0,layout:r},e)),i[0]=r,i[1]=t):t=i[1],i[2]!==t?(n=(0,o.jsx)(a.BJ,{paddingX:3,paddingY:2,paddingTop:0,space:1,children:t}),i[2]=t,i[3]=n):n=i[3],n}function oz(e){let t,n,i,l,d,u,p,f=(0,s.c)(66),{childItemId:x,error:g,isRetrying:b,autoRetry:y,filterIsSimpleTypeConstraint:j,hasMaxItems:v,hasSearchQuery:_,isActive:w,isLazyLoading:S,muted:I,isLoading:k,isConnected:E,retryCount:C,canRetry:z,items:T,layout:P,loadingVariant:A,onEndReached:R,onRetry:D,paneTitle:$,searchInputElement:B,showIcons:Y}=e,M=(0,h.I07)(),{collapsed:L}=e8(),{collapsed:O,index:H}=tr(),[V,Z]=(0,c.useState)(!O),{t:N}=(0,h.Bdt)(r.Z7);f[0]!==R||f[1]!==V?(t=()=>{V&&R()},f[0]=R,f[1]=V,f[2]=t):t=f[2];let K=t;f[3]!==O?(n=()=>{if(O)return;let e=setTimeout(()=>{Z(!0)},0);return()=>{clearTimeout(e)}},f[3]=O,f[4]=n):n=f[4],f[5]!==O||f[6]!==T?(i=[O,T],f[5]=O,f[6]=T,f[7]=i):i=f[7],(0,c.useEffect)(n,i),f[8]!==x||f[9]!==v||f[10]!==w||f[11]!==S||f[12]!==T.length||f[13]!==P||f[14]!==M||f[15]!==Y||f[16]!==N?(l=(e,t)=>{let{activeIndex:n}=t,i=(0,m.IM)(e._id),r=x===i,l=!w&&r,s=w&&r,d=n===T.length-1,c=d&&S,u=d&&v;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(oy,{icon:!1!==Y&&void 0,id:i,layout:P,marginBottom:1,pressed:l,schemaType:M.get(e._type),selected:s,value:e}),c&&(0,o.jsx)(h.gd4,{}),u&&(0,o.jsx)(a.az,{marginY:1,paddingX:3,paddingY:4,children:(0,o.jsx)(a.EY,{align:"center",muted:!0,size:1,children:N("panes.document-list-pane.max-items.text",{limit:2e3})})})]})},f[8]=x,f[9]=v,f[10]=w,f[11]=S,f[12]=T.length,f[13]=P,f[14]=M,f[15]=Y,f[16]=N,f[17]=l):l=f[17];let F=l;e:{let e,t;if(_){let e,t;f[18]!==N?(e=N("panes.document-list-pane.no-documents.text"),f[18]=N,f[19]=e):e=f[19],f[20]!==e?(t=(0,o.jsx)(a.so,{align:"center",direction:"column",height:"fill",justify:"center",children:(0,o.jsx)(a.mc,{width:1,children:(0,o.jsx)(a.az,{paddingX:4,paddingY:5,children:(0,o.jsx)(a.EY,{align:"center",muted:!0,children:e})})})}),f[20]=e,f[21]=t):t=f[21],d=t;break e}f[22]!==j||f[23]!==N?(e=N(j?"panes.document-list-pane.no-documents-of-type.text":"panes.document-list-pane.no-matching-documents.text"),f[22]=j,f[23]=N,f[24]=e):e=f[24],f[25]!==e?
471(t=(0,o.jsx)(a.so,{align:"center",direction:"column",height:"fill",justify:"center",children:(0,o.jsx)(a.mc,{width:1,children:(0,o.jsx)(a.az,{paddingX:4,paddingY:5,children:(0,o.jsx)(a.EY,{align:"center",muted:!0,children:e})})})}),f[25]=e,f[26]=t):t=f[26],d=t}let W=d;t:{let e,t;if(!V){u=null;break t}let n=window.navigator.onLine;if(g){let e,t,i,r,l,s,d;f[27]!==N?(e=N("panes.document-list-pane.error.title"),f[27]=N,f[28]=e):e=f[28],f[29]!==e?(t=(0,o.jsx)(a.DZ,{as:"h3",children:e}),f[29]=e,f[30]=t):t=f[30],f[31]!==g||f[32]!==N?(i=h.Cu5?(0,o.jsx)(h.HTc,{t:N,i18nKey:"panes.document-list-pane.error.text.dev",values:{error:g.message},components:{Code:oT}}):N(n?"panes.document-list-pane.error.text":"panes.document-list-pane.error.text.offline"),f[31]=g,f[32]=N,f[33]=i):i=f[33],f[34]!==i?(r=(0,o.jsx)(a.EY,{as:"p",children:i}),f[34]=i,f[35]=r):r=f[35];let c=n&&z?D:void 0;f[36]!==g||f[37]!==b||f[38]!==c?(l=(0,o.jsx)(h.kbS,{error:g,eventId:null,onRetry:c,isRetrying:b}),f[36]=g,f[37]=b,f[38]=c,f[39]=l):l=f[39],f[40]!==y||f[41]!==z||f[42]!==b||f[43]!==C||f[44]!==N?(s=z?(0,o.jsx)(a.EY,{as:"p",muted:!0,size:1,children:b?N("panes.document-list-pane.error.retrying",{count:C}):y?N("panes.document-list-pane.error.will-retry-automatically",{count:C}):N("panes.document-list-pane.error.max-retries-attempted",{count:C})}):null,f[40]=y,f[41]=z,f[42]=b,f[43]=C,f[44]=N,f[45]=s):s=f[45],f[46]!==l||f[47]!==s||f[48]!==t||f[49]!==r?(d=(0,o.jsx)(a.so,{align:"center",direction:"column",height:"fill",justify:"center",children:(0,o.jsx)(a.mc,{width:1,children:(0,o.jsxs)(a.BJ,{paddingX:4,paddingY:5,space:4,children:[t,r,l,s]})})}),f[46]=l,f[47]=s,f[48]=t,f[49]=r,f[50]=d):d=f[50],u=d;break t}if(E&&!k&&0===T.length){u=W;break t}if("initial"===A&&k){let e;f[51]!==P?(e=(0,o.jsx)(tD,{ms:300,children:(0,o.jsx)(oC,{layout:P})}),f[51]=P,f[52]=e):e=f[52],u=e;break t}if("spinner"===A&&k){u=null;break t}let i=`${H}-${O}`,r=I?.8:1;f[53]!==K||f[54]!==T||f[55]!==i||f[56]!==$||f[57]!==F||f[58]!==B?(e=(0,o.jsx)(ok,{children:(0,o.jsx)(h.oIj,{activeItemDataAttr:"data-hovered",ariaLabel:$,canReceiveFocus:!0,inputElement:B,itemHeight:51,items:T,onEndReached:K,onlyShowSelectionWhenActive:!0,overscan:10,paddingBottom:1,paddingX:3,renderItem:F,wrapAround:!1},i)}),f[53]=K,f[54]=T,f[55]=i,f[56]=$,f[57]=F,f[58]=B,f[59]=e):e=f[59],f[60]!==r||f[61]!==e?(t=(0,o.jsx)(oI,{overflow:"hidden",height:"fill",$opacity:r,children:e}),f[60]=r,f[61]=e,f[62]=t):t=f[62],u=t}let J=u,U=L||"initial"===A?"hidden":"auto";return f[63]!==J||f[64]!==U?(p=(0,o.jsx)(tl,{"data-testid":"document-list-pane",overflow:U,children:J}),f[63]=J,f[64]=U,f[65]=p):p=f[65],p}function oT(e){let{children:t}=e;return(0,o.jsx)("code",{children:t})}function oP(e,t={}){try{let n=function e(t){switch(t.type){case"OpCall":{let{left:e,right:n}=t;switch(t.op){case"==":return"AccessAttribute"!==e.type||"_type"!==e.name||e.base?"AccessAttribute"!==n.type||"_type"!==n.name||n.base||"Value"!==e.type||"string"!=typeof e.value?null:new Set([e.value]):"Value"!==n.type||"string"!=typeof n.value?null:new Set([n.value]);case"in":{if("AccessAttribute"!==e.type||"_type"!==e.name||e.base||"Array"!==n.type)return null;let t=new Set;for(let e of n.elements){if(e.isSplat||"Value"!==e.value.type||"string"!=typeof e.value.value)return null;t.add(e.value.value)}return t.size?t:null}default:return null}}case"Group":return e(t.base);case"Or":{let n=e(t.left);if(!n)return null;let i=e(t.right);return i?new Set([...n,...i]):null}case"And":{let n=e(t.left),i=e(t.right);return n||i?new Set([...n||[],...i||[]]):null}default:return null}}((0,ek.qg)(e,{params:t}));return n?Array.from(n).sort():null}catch{return null}}let oA=(0,h.pTS)({maxSize:100});function oR(e){let{client:t,schema:n,sort:i,perspective:l,limit:o,params:s,filter:a,searchQuery:d,staticTypeNames:c,maxFieldDepth:u,searchStrategy:p}=e,m=i.by,f=i?.extendedProjection,x=(0,X.v)(()=>t.listen(`*[${a}]`,s,{events:["welcome","mutation","reconnect"],includeAllVersions:!0,includeResult:!1,visibility:"query",tag:"listen-search-query"})).pipe((0,O.Z)((e,t)=>{let n=0===t;return n&&"reconnect"===e.type?(0,ee.$)(()=>Error("Failed to establish EventSource connection")):n&&"welcome"!==e.type?(0,ee.$)(()=>Error(`Received unexpected type of first event "${e.type}"`)):(0,N.of)(e)}),(0,H.u)()),[g,b]=(0,et.j)(x,e=>"welcome"===e.type),y=JSON.stringify({fiilter:a,limit:o,params:s,searchQuery:d,perspective:l,sort:i,staticTypeNames:c});return(0,K.h)(g,b.pipe((0,en.c)(1e3,ei.E,{leading:!0,trailing:!0}
471))).pipe((0,ez.L)(e=>(c?(0,N.of)(c):t.observable.fetch(`array::unique(*[${a}][]._type)`,s)).pipe((0,O.Z)(x=>{let g=(0,h._oG)(n,c||[]).filter(e=>!!x.includes(e.name)&&((0,r.Mq)(e,i.by,!0),!0)),b=(0,h.XZv)(g,t,{filter:a,params:s,strategy:p,maxDepth:u}),y=()=>b({query:d||"",types:g},{__unstable_extendedProjection:f,comments:[`findability-source: ${d?"list-query":"list"}`],limit:o,skipSortByScore:!0,sort:m,perspective:l}).pipe((0,C.T)(e=>e.hits.map(({hit:e})=>e)),(0,C.T)(e=>({type:"result",documents:e})));return"mutation"===e.type&&"query"!==e.visibility?(0,Q.O)(1200).pipe((0,O.Z)(y)):"reconnect"===e.type?(0,N.of)(e):y()}))),(0,B.S)((e,t)=>({connected:"reconnect"!==t.type,documents:"result"===t.type?t.documents:e?.documents||[]}),null),(0,M.p)(e=>null!==e),oA(y),(0,C.T)(({fromCache:e,value:t})=>({fromCache:e,...t})))}let oD={error:null,isRetrying:!1,retryCount:0,autoRetry:!1,canRetry:!1,isLoading:!0,isLoadingFullList:!1,fromCache:!1,items:[]};function o$(e,t){if("error"===t.type)return{...e,error:t.error,retryCount:t.retryCount,isRetrying:t.retrying,autoRetry:t.autoRetry,canRetry:t.canRetry};if("result"===t.type){var n;return{...e,error:null,isRetrying:!1,fromCache:t.result.fromCache,connected:t.result.connected,isLoading:!1,items:(n=t.result.documents,(0,h.Zck)(n).map(e=>{let t=e.draft||e.published||e.versions[0],n=!!e.draft;return{...t,hasPublished:!!e.published,hasDraft:n}})),isLoadingFullList:!1}}if("loadFullList"===t.type)return{...e,error:null,isLoadingFullList:!0};throw Error(`Unexpected event type: ${t.type}`)}function oB(e){return{type:"result",result:e}}function oY(e){return{type:"result",result:e}}function oM(e){let[,t]=e;return t?.documents.length===100}function oL(){return(0,eC.t)()}function oO(){return(0,eC.t)()}let oH="[WARNING: This was thrown as a non-error. Only Error instances should be thrown]",oV=(0,g.i7)`
472  from {
473    transform: rotate(0deg);
474  }
475  to {
476    transform: rotate(360deg);
477  }
478`,oZ=(0,g.i7)`
479  0% {
480    opacity: 0;
481  }
482  50% {
483    opacity: 0.1;
484  }
485  100% {
486    opacity: 0.4;
487  }
488`,oN=(0,g.I4)(p.Nl1)`
489  animation: ${oV} 500ms linear infinite;
490`,oK=(0,g.I4)(p.Nl1)`
491  animation: ${oV} 1500ms linear infinite;
492  opacity: 0.4;
493`,oF=(0,g.I4)(p.Nl1)`
494  animation:
495    ${oV} 1500ms linear infinite,
496    ${oZ} 1000ms linear;
497  opacity: 0.4;
498`,oW=(0,c.memo)(function(e){let t,n,i,l,d,u,m,x,g,b,y,j,_,w,S,I,k,E,z,T,P=(0,s.c)(69),{childItemId:R,isActive:Z,pane:W,paneKey:J,sortOrder:U,layout:q}=e,X=(0,h.I07)(),ee=(0,h.K0D)(),{perspectiveStack:et}=(0,h.QO2)(),{displayOptions:en,options:ei}=W,{apiVersion:es,filter:ea}=ei,ed=sh(ei.params||oS);e:{let e;P[0]!==ea||P[1]!==ed?(e=oP(ea,ed),P[0]=ea,P[1]=ed,P[2]=e):e=P[2];let n=e;if(n?.length===1){t=n[0];break e}t=null}let ec=t,eu=en?.showIcons!==!1,{t:ep}=(0,h.Bdt)(r.Z7),{title:em}=(0,h.FP1)(W),[eh,ef]=(0,c.useState)(""),[ex,eg]=(0,c.useState)(""),[eb,ey]=(0,c.useState)(null);P[3]!==X||P[4]!==U||P[5]!==ec?(n=ec&&U?function(e,t){let n=e.by.map(e=>{if(e.mapWith)return e;let n=function(e,t){let n=eo.sH(t),i=e;for(let e of n){if(!i)return;if("string"==typeof e){i=function(e,t){if(!("fields"in e))return;let n=e.fields.find(e=>e.name===t);return n?n.type:void 0}(i,e);continue}if(!((0,f.tA)(e)||(0,f.wr)(e))||"array"!==i.jsonType)return;let[t,n]=i.of||[];if(n||!t)return;if(!(0,f.do)(t)){i=t;continue}let[r,l]=t.to||[];if(l||!r)return;i=r}return i}(t,e.field);return n?!function(e,t){let n=e.type;for(;n;){if(n.name===t||!n.type&&n.jsonType===t)return!0;n=n.type}return!1}(n,"datetime")?"string"===n.jsonType?{...e,mapWith:"lower"}:e:{...e,mapWith:"dateTime"}:e});return n.every((t,n)=>t===e.by[n])?e:{...e,by:n}}(U,X.get(ec)):U,P[3]=X,P[4]=U,P[5]=ec,P[6]=n):n=P[6];let ej=(0,h.$6H)(n),ev=es||h.miu.apiVersion;P[7]!==ev?(i={...h.miu,apiVersion:ev},P[7]=ev,P[8]=i):i=P[8];let e_=(0,h.tH7)(i);P[9]!==eh?(l=eh?.trim(),P[9]=eh,P[10]=l):l=P[10],P[11]!==e_||P[12]!==ea||P[13]!==ed||P[14]!==et||P[15]!==ej||P[16]!==l?(d={client:e_,filter:ea,perspective:et,params:ed,searchQuery:l,sortOrder:ej},P[11]=e_,P[12]=ea,P[13]=ed,P[14]=et,P[15]=ej,P[16]=l,P[17]=d):d=P[17];let{error:ew,isLoadingFullList:eS,isLoading:eI,items:ek,fromCache:eC,isRetrying:ez,autoRetry:eT,canRetry:eP,retryCount:eA,connected:eR,onLoadFullList:eD,onRetry:e$}=function(e){let t,n,i,r=(0,s.c)(31),{client:l,filter:o,params:a,sortOrder:d,searchQuery:u,perspective:p}=e,{strategy:m}=(0,h.hA9)().search,f=(0,h.I07)(),x=(0,h.xx_)();r[0]!==a||r[1]!==o?(t=oP(o,a),r[0]=a,r[1]=o,r[2]=t):t=r[2];let g=t,[b]=(0,c.useState)(oO),[y,j]=b,[_]=(0,c.useState)(oL),[w,S]=_,I=u||"",k=d||ow;
498if(r[3]!==l||r[4]!==x||r[5]!==w||r[6]!==y||r[7]!==a||r[8]!==p||r[9]!==f||r[10]!==o||r[11]!==m||r[12]!==I||r[13]!==k||r[14]!==g){let e,t={client:l,filter:o,limit:100,params:a,schema:f,perspective:p,searchQuery:I,sort:k,staticTypeNames:g,maxFieldDepth:x,searchStrategy:m},i=oR(t).pipe((0,$.t)({refCount:!0,bufferSize:1})),s=w.pipe((0,Y.E)(i),(0,M.p)(oM),(0,L.s)(1),(0,O.Z)(()=>(0,F.x)((0,N.of)({type:"loadFullList"}),oR({...t,limit:2e3}).pipe((0,C.T)(oY)))),(0,H.u)());r[16]!==y?(e=(e,t,n)=>{var i,r;let l=(r=e)instanceof Error?r:"object"==typeof r&&null!==r&&"message"in r&&"string"==typeof r.message?Error(`${r.message} ${oH}`):Error(`${String(r)} ${oH}`),o=window.navigator.onLine,s=o&&!((i=e)instanceof eE.Q6)&&(i instanceof eE.gP||!(i instanceof eE.MZ)||403===i.statusCode),a=t<10,d=(0,K.h)(o?y:(0,G.R)(window,"online"),o&&a?(0,Q.O)(1e3*t):er.t).pipe((0,L.s)(1),(0,D.n)(()=>(0,K.h)((0,N.of)({type:"error",error:l,retrying:!0,autoRetry:a,canRetry:s,retryCount:t}),n)));return(0,F.x)((0,N.of)({type:"error",error:l,retrying:!1,autoRetry:a,canRetry:s,retryCount:t}),d)},r[16]=y,r[17]=e):e=r[17],n=(0,K.h)(i.pipe((0,C.T)(oB),(0,V.Q)(s)),s).pipe((0,h.TMz)(e),(0,B.S)(o$,oD)),r[3]=l,r[4]=x,r[5]=w,r[6]=y,r[7]=a,r[8]=p,r[9]=f,r[10]=o,r[11]=m,r[12]=I,r[13]=k,r[14]=g,r[15]=n}else n=r[15];let E=n,{error:z,items:T,isLoading:P,fromCache:A,connected:R,canRetry:Z,isLoadingFullList:W,isRetrying:J,autoRetry:U,retryCount:q}=(0,v.J)(E,oD);return r[18]!==U||r[19]!==Z||r[20]!==R||r[21]!==z||r[22]!==A||r[23]!==P||r[24]!==W||r[25]!==J||r[26]!==T||r[27]!==S||r[28]!==j||r[29]!==q?(i={error:z,onRetry:j,isLoading:P,items:T,isRetrying:J,canRetry:Z,retryCount:q,autoRetry:U,connected:R,fromCache:A,onLoadFullList:S,isLoadingFullList:W},r[18]=U,r[19]=Z,r[20]=R,r[21]=z,r[22]=A,r[23]=P,r[24]=W,r[25]=J,r[26]=T,r[27]=S,r[28]=j,r[29]=q,r[30]=i):i=r[30],i}(d),eB=eI||ee.loading;P[18]===Symbol.for("react.memo_cache_sentinel")?(u=e=>e.pipe((0,C.T)(oJ),(0,A.M)(eg),(0,el.s)(oU),(0,A.M)(ef)),P[18]=u):u=P[18];let eY=(0,v.N)(u);P[19]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{ef(""),eg("")},P[19]=m):m=P[19];let eM=m;P[20]===Symbol.for("react.memo_cache_sentinel")?(x=e=>{"Escape"===e.key&&eM()},P[20]=x):x=P[20];let eL=x,[eO,eH]=(0,c.useState)();P[21]!==eO||P[22]!==eB||P[23]!==J?(b=()=>{eO||eB||eH(J)},g=[eO,eB,J],P[21]=eO,P[22]=eB,P[23]=J,P[24]=g,P[25]=b):(g=P[24],b=P[25]),(0,c.useEffect)(b,g),P[26]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{eM(),eH()},P[26]=y):y=P[26],P[27]!==J?(j=[J,eM],P[27]=J,P[28]=j):j=P[28],(0,c.useEffect)(y,j);t:{if(eR&&eB&&eO===J){_="spinner";break t}if(eR&&eC){_="subtle";break t}_="initial"}let eV=_;n:{if("spinner"===eV){w=oN;break n}if(ex&&"subtle"===eV){w=oK;break n}w=p.WIv}let eZ=w;(0,h.mnZ)(!eR),P[29]!==ep?(S=ep("panes.document-list-pane.search-input.aria-label"),P[29]=ep,P[30]=S):S=P[30];let eN=!!eh;P[31]===Symbol.for("react.memo_cache_sentinel")?(I=[2,2,1],P[31]=I):I=P[31];let eK=eR&&("subtle"!==eV||ex)?null:oF;P[32]!==ep?(k=ep("panes.document-list-pane.search-input.placeholder"),P[32]=ep,P[33]=k):k=P[33],P[34]!==eY||P[35]!==ex||P[36]!==S||P[37]!==eN||P[38]!==eK||P[39]!==k||P[40]!==eZ?(E=(0,o.jsx)(a.az,{paddingX:3,paddingBottom:3,children:(0,o.jsx)(a.ks,{"aria-label":S,autoComplete:"off",border:!1,clearButton:eN,fontSize:I,icon:eZ,iconRight:eK,onChange:eY,onClear:eM,onKeyDown:eL,padding:2,placeholder:k,radius:2,ref:ey,spellCheck:!1,value:ex})}),P[34]=eY,P[35]=ex,P[36]=S,P[37]=eN,P[38]=eK,P[39]=k,P[40]=eZ,P[41]=E):E=P[41];let eF=!!ec,eW=2e3===ek.length,eJ=!!eh,eU="subtle"===eV;return P[42]!==eT||P[43]!==eP||P[44]!==R||P[45]!==eR||P[46]!==ew||P[47]!==Z||P[48]!==eB||P[49]!==eS||P[50]!==ez||P[51]!==ek||P[52]!==q||P[53]!==eV||P[54]!==eD||P[55]!==e$||P[56]!==J||P[57]!==eA||P[58]!==eb||P[59]!==eu||P[60]!==eF||P[61]!==eW||P[62]!==eJ||P[63]!==eU||P[64]!==em?(z=(0,o.jsx)(oz,{childItemId:R,error:ew,filterIsSimpleTypeConstraint:eF,hasMaxItems:eW,hasSearchQuery:eJ,isActive:Z,isLazyLoading:eS,isLoading:eB,autoRetry:eT,canRetry:eP,retryCount:eA,isRetrying:ez,isConnected:eR,items:ek,layout:q,muted:eU,loadingVariant:eV,onEndReached:eD,onRetry:e$,paneTitle:em,searchInputElement:eb,showIcons:eu},J),P[42]=eT,P[43]=eP,P[44]=R,P[45]=eR,P[46]=ew,P[47]=Z,P[48]=eB,P[49]=eS,P[50]=ez,P[51]=ek,P[52]=q,P[53]=eV,P[54]=eD,P[55]=e$,P[56]=J,P[57]=eA,P[58]=eb,P[59]=eu,P[60]=eF,P[61]=eW,P[62]=eJ,P[63]=eU,P[64]=em,P[65]=z):z=P[65],P[66]!==E||P[67]!==z?(T=(0,o.jsxs)(o.Fragment,{children:[E,z]}),P[66]=E,P[67]=z,P[68]=T):T=P[68],T});function oJ(e){return e.target.value}function oU(e){return""===e?(0,N.of)(""):(0,Q.O)(300)}let oG=(0,c.memo)(e=>{let t,n,i,r,a,d,c,u,m,h=(0,s.c)(27),{contentAfter:f,index:x,initialValueTemplates:g,menuItemGroups:b,menuItems:y,setLayout:j,setSortOrder:v,title:_}=e;h[0]!==g?(t=void 0===g?[]:g,h[0]=g,h[1]=t):t=h[1];let w=t;h[2]!==b?(n=void 0===b?[]:b,h[2]=b,h[3]=n):n=h[3];let S=n;h[4]!==y?(i=void 0===y?[]:y,h[4]=y,h[5]=i):i=h[5];let I=i,{features:k}=tN(),{collapsed:E,isLast:C}=tr(),z=C&&!E?-1:0;h[6]!==j?(r=e=>{let{layout:t}=e;j(t)}
498,h[6]=j,h[7]=r):r=h[7],h[8]!==v?(a=e=>{v(e)},h[8]=v,h[9]=a):a=h[9],h[10]!==r||h[11]!==a?(d={setLayout:r,setSortOrder:a},h[10]=r,h[11]=a,h[12]=d):d=h[12];let T=d;return h[13]!==T||h[14]!==w||h[15]!==S||h[16]!==I?(c=(0,o.jsx)(ou,{initialValueTemplateItems:w,actionHandlers:T,menuItemGroups:S,menuItems:I}),h[13]=T,h[14]=w,h[15]=S,h[16]=I,h[17]=c):c=h[17],h[18]!==k.backButton||h[19]!==x?(u=k.backButton&&x>0&&(0,o.jsx)(l.$n,{as:lP,"data-as":"a",icon:p.A60,mode:"bleed",tooltipProps:{content:"Back"}}),h[18]=k.backButton,h[19]=x,h[20]=u):u=h[20],h[21]!==f||h[22]!==c||h[23]!==u||h[24]!==z||h[25]!==_?(m=(0,o.jsx)(l.vE,{children:(0,o.jsx)(tw,{actions:c,backButton:u,contentAfter:f,tabIndex:z,title:_})}),h[21]=f,h[22]=c,h[23]=u,h[24]=z,h[25]=_,h[26]=m):m=h[26],m});function oQ(e){let{row:t,table:n}=e,{selectedAnchor:i,setSelectedAnchor:r}=n.options.meta||{},l=(0,c.useCallback)(e=>{if(e.shiftKey&&null!=i){let e=t.index,r=e<i?e:i,l=e<i?i:e,o=n.getRowModel().flatRows.slice(r,l+1).map(({id:e})=>e),s=n.getSelectedRowModel().rows.map(({id:e})=>e);n.setRowSelection(()=>[...o,...s].reduce((e,t)=>({...e,[t]:!0}),{}))}else r&&(r(t.getIsSelected()?null:t.index),t.toggleSelected())},[i,t,r,n]);return(0,o.jsx)(a.Sc,{style:{paddingLeft:4},checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onChange:()=>null,onClick:l})}function oq(e){let t,n,i,r,l,a,d,p,m,h,f,x,g,b,y,j,v,_=(0,s.c)(49),{children:w,table:S}=e,[I,k]=(0,c.useState)(null);_[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],_[0]=t):t=_[0];let[E,C]=(0,c.useState)(t);_[1]!==I?.state?(n=e=>{I?.state==="focused"&&document.activeElement instanceof HTMLElement&&document.activeElement.blur(),k(void 0===e?null:e),C([])},_[1]=I?.state,_[2]=n):n=_[2];let z=n;_[3]!==z?(i=()=>z(),_[3]=z,_[4]=i):i=_[4];let T=i;_[5]!==z||_[6]!==I||_[7]!==S?(r=e=>{if(!I)return;let t=S.getVisibleLeafColumns(),n=t.findIndex(e=>e.id===I.colId)+("left"===e?-1:1);n<0||n>=t.length||z({colId:t[n].id,rowIndex:I.rowIndex,state:"selected"})},_[5]=z,_[6]=I,_[7]=S,_[8]=r):r=_[8];let P=r;_[9]!==I?(l=e=>{I&&C(t=>{let{rowIndex:n}=I,i=t=>t+("down"===e?1:-1);if(!t.length){let e=i(n);return e<0?[]:[e]}let r=i(t[t.length-1]);return r<0?t:r===n?[]:t.includes(r)?t.slice(0,-1):[...t,r]})},_[9]=I,_[10]=l):l=_[10];let A=l;_[11]!==z?(a=(e,t)=>{z({colId:e,rowIndex:t,state:"selected"})},_[11]=z,_[12]=a):a=_[12];let R=a;_[13]!==z||_[14]!==I||_[15]!==E.length?(d=()=>{I&&(E.length?C([]):z("selected"===I.state?null:{...I,state:"selected"}))},_[13]=z,_[14]=I,_[15]=E.length,_[16]=d):d=_[16];let D=d;_[17]!==A||_[18]!==I||_[19]!==R?(p=(e,t)=>{if(!I)return;let n="ArrowDown"===t?"down":"up",i="down"===n?1:-1;if(e)A(n);else{let e=I.rowIndex+i;if(e<0)return;R(I.colId,e)}},_[17]=A,_[18]=I,_[19]=R,_[20]=p):p=_[20];let $=p;_[21]!==P||_[22]!==D||_[23]!==$||_[24]!==I?(m=e=>{if(!I)return;let{key:t,shiftKey:n}=e;switch(t){case"Shift":break;case"Escape":D();break;case"ArrowDown":case"ArrowUp":e.preventDefault(),$(n,t);break;case"ArrowLeft":case"ArrowRight":"selected"===I.state&&(e.preventDefault(),P("ArrowLeft"===t?"left":"right"))}},_[21]=P,_[22]=D,_[23]=$,_[24]=I,_[25]=m):m=_[25];let B=m;_[26]!==T||_[27]!==I?(h=e=>{I&&(document.getElementById(`cell-${I.colId}-${I.rowIndex}`)?.contains(e.target)||T())},_[26]=T,_[27]=I,_[28]=h):h=_[28];let Y=h;_[29]!==Y||_[30]!==B||_[31]!==I?(f=()=>(I&&(document.addEventListener("keydown",B),document.addEventListener("click",Y)),()=>{I&&(document.removeEventListener("keydown",B),document.removeEventListener("click",Y))}),x=[Y,B,I],_[29]=Y,_[30]=B,_[31]=I,_[32]=f,_[33]=x):(f=_[32],x=_[33]),(0,c.useEffect)(f,x),_[34]===Symbol.for("react.memo_cache_sentinel")?(g=()=>k(oX),_[34]=g):g=_[34];let M=g;_[35]!==I||_[36]!==E?(b=(e,t)=>I?.colId!==e?null:I.rowIndex===t?"focused"===I.state?"focused":"selectedAnchor":E.includes(t)?"selectedRange":null,_[35]=I,_[36]=E,_[37]=b):b=_[37];let L=b;_[38]!==z||_[39]!==I?(y=()=>{I&&z({colId:I.colId,rowIndex:I.rowIndex+1,state:"selected"})},_[38]=z,_[39]=I,_[40]=y):y=_[40];let O=y;
498_[41]!==L||_[42]!==T||_[43]!==R||_[44]!==O?(j={focusAnchorCell:M,resetFocusSelection:T,setSelectedAnchorCell:R,getStateByCellId:L,submitFocusedCell:O},_[41]=L,_[42]=T,_[43]=R,_[44]=O,_[45]=j):j=_[45];let H=j;return _[46]!==w||_[47]!==H?(v=(0,o.jsx)(u.YW.Provider,{value:H,children:w}),_[46]=w,_[47]=H,_[48]=v):v=_[48],v}function oX(e){return e?{...e,state:"focused"}:null}oG.displayName="Memo(PaneHeader)";let o0=g.I4.td`
499  display: flex;
500  overflow: hidden;
501  box-sizing: border-box;
502  width: ${({width:e})=>e}px;
503  border-top: 1px solid var(--card-border-color);
504  background-color: var(--card-bg-color);
505`,o1=(0,g.I4)(o0)`
506  position: sticky;
507  z-index: 2;
508`;function o2(e){let{getValue:t,column:n,row:i,fieldType:r}=e,l=`cell-${n.id}-${i.index}`,[s,d]=(0,c.useState)(()=>t()),[p,m]=(0,c.useState)(!1),h=(0,c.useRef)(null),{focusAnchorCell:f,resetFocusSelection:x,setSelectedAnchorCell:g,getStateByCellId:b,submitFocusedCell:y}=(()=>{let e=(0,c.useContext)(u.YW);if(void 0===e)throw Error("useDocumentSheetListContext must be used within an DocumentSheetListProvider");return e})(),j=b(n.id,i.index),v=(0,c.useCallback)(()=>{g(n.id,i.index),f()},[n.id,f,i.index,g]),{patchDocument:_}=e.table.options.meta||{},w=()=>{h.current?.focus(),h.current instanceof HTMLInputElement&&h.current.select()},S=(0,c.useCallback)(e=>{let{key:t}=e;"Enter"===t&&("selectedAnchor"===j&&w(),"focused"===j&&y())},[j,y]),I=(0,c.useCallback)(e=>{let t=e.clipboardData?.getData("Text");("string"==typeof t||"number"==typeof t)&&(d(t),_?.(i.id,n.id,t))},[n.id,_,i.id]),k=(0,c.useCallback)(()=>navigator.clipboard.writeText(s.toString()),[s]);(0,c.useEffect)(()=>(("selectedAnchor"===j||"focused"===j)&&document.addEventListener("keydown",S),("selectedAnchor"===j||"selectedRange"===j)&&document.addEventListener("paste",I),"selectedAnchor"===j&&document.addEventListener("copy",k),()=>{("selectedAnchor"===j||"focused"===j)&&document.removeEventListener("keydown",S),("selectedAnchor"===j||"selectedRange"===j)&&document.removeEventListener("paste",I),"selectedAnchor"===j&&document.removeEventListener("copy",k)}),[l,j,n.id,b,k,S,I,i.index]);let E=()=>"focused"===j?"2px solid blue":"selectedRange"===j?"1px solid green":"selectedAnchor"===j?"1px solid blue":"1px solid transparent",C={onFocus:v,onBlur:()=>{p&&(_?.(i.id,n.id,s),m(!1)),x()},onMouseDown:e=>{2===e.detail?w():(e.preventDefault(),g(n.id,i.index))},"aria-selected":!!j,"data-testid":l,id:l,ref:e=>{h.current=e}};return"boolean"===r.name?(0,o.jsxs)(a.l6,{...C,onChange:()=>null,radius:0,style:{boxShadow:"none",border:E(),padding:0},value:JSON.stringify(s),children:[(0,o.jsx)("option",{value:"True",children:"True"}),(0,o.jsx)("option",{value:"False",children:"False"})]}):(0,o.jsx)(a.ks,{...C,size:0,radius:0,border:!1,style:{border:E(),padding:"22px 16px"},value:"string"==typeof s||"number"==typeof s?s:JSON.stringify(s),onChange:e=>{m(!0),d(e.target.value)}})}function o3(e){let t=e.column.getIsPinned(),n=t&&e.column.getIsLastColumn("left")?2:1;return(0,o.jsx)(t?o1:o0,{style:{left:e.column.getStart("left")??void 0,borderRight:`${n}px solid var(--card-border-color)`},width:e.column.getSize(),children:(0,eT.Kv)(e.column.columnDef.cell,e.getContext?.())},e.row.original._id+e.id)}let o4=e=>{let{documentPreviewStore:t,row:n,schemaType:i}=e,r=(0,c.useMemo)(()=>(0,h.TU6)(t,i,n.original._id),[t,n.original._id,i]),l=(0,h.r0j)(n.original._id),{snapshot:s,isLoading:d}=(0,v.J)(r,{snapshot:null,isLoading:!0});if(d)return(0,o.jsx)(a.EY,{size:1,muted:!0,children:"Loading..."});let u=s?.title??"Untitled";return(0,o.jsxs)(a.so,{align:"center",gap:3,children:[(0,o.jsx)(h.ZDR,{draft:l.draft,published:l.published,versions:void 0}),(0,o.jsx)(a.EY,{size:1,children:u})]})},o5=(0,eP.FB)(),o6=["string","number","boolean"],o7=(e,t)=>e.fields.reduce((e,n)=>{let{type:i,name:r}=n;return o6.includes(i.name)?[...e,o5.accessor(t?`${t}.${n.name}`:n.name,{id:t?`${t}_${n.name}`:n.name,header:n.type.title,enableHiding:!0,cell:e=>(0,o.jsx)(o2,{...e,fieldType:i})})]:"object"===i.name&&(0,f.$d)(i)&&!t?[...e,o5.group({header:r,columns:o7(i,n.name)})]:e},[]),o8=e=>e.flatMap(e=>"accessorKey"in e?e:"columns"in e&&e.columns?o8(e.columns):[]);function o9({table:e}){let{t}=(0,h.Bdt)(),n=e.getVisibleLeafColumns().filter(e=>e.getCanHide()).length>=5,i=(0,c.useCallback)(()=>{e.resetColumnVisibility()},[e]);return(0,o.jsx)(l.IU,{button:(0,o.jsx)(l.$n,{mode:"bleed",text:t("sheet-list.edit-columns")}),id:"columns-control",menu:(0,o.jsx)(a.W1,{padding:3,paddingTop:4,style:{width:240},children:(0,o.jsxs)(a.so,{direction:"column",height:"fill",gap:3,children:[(0,o.jsx)(a.EY,{weight:"semibold",size:1,children:t("sheet-list.select-fields")}),(0,o.jsx)(a.so,{style:{flex:"1 1 auto",maxHeight:320,overflowY:"scroll"},children:(0,o.jsx)(a.BJ,{children:e.getAllLeafColumns().filter(e=>e.getCanHide()).map(t=>{let i=t.id.replace(/ /g,"-");return(0,o.jsxs)(a.so,{marginY:2,align:"center",children:[(0,o.jsx)(a.Sc,{readOnly:(t=>{let i=t.getIsVisible(),r=1===e.getVisibleLeafColumns().filter(e=>e.getCanHide()).length;return n&&!i||r&&i})(t),checked:t.getIsVisible(),onChange:()=>{t.toggleVisibility()},id:`col-visibility-${i}`,style:{display:"block"}}),(0,o.jsx)(a.az,{flex:1,paddingLeft:3,children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)("label",{htmlFor:`col-visibility-${i}`,children:t.columnDef.header?.toString()})})})]},t.id)})})}),(0,o.jsx)(l.$n,{width:"fill",mode:"ghost",text:t("sheet-list.reset-columns"),onClick:i})]})}),placement:"bottom",popover:{portal:!0}})}let se=(0,g.I4)(a.so)`
509  flex-shrink: 0;
510`;function st(){let e,t,n,i=(0,s.c)(5),{state:r}=(0,h.Z_W)(),{filtersVisible:l}=r;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(h.w1_,{}),i[0]=e):e=i[0],i[1]!==l?(t=l&&(0,o.jsx)(h.CuW,{showTypeFilter:!1}),i[1]=l,i[2]=t):t=i[2],i[3]!==t?(n=(0,o.jsxs)(se,{children:[e,t]}),i[3]=t,i[4]=n):n=i[4],n}let sn=g.I4.th`
511  margin: 16px;
512  z-index: 1;
513  padding: 22px 0px;
514  border-top: 1px solid var(--card-border-color);
515  background-color: var(--card-badge-default-bg-color);
516  box-sizing: border-box;
517  text-align: left;
518  width: ${({width:e})=>e}px;
519  max-width: ${({width:e})=>e}px;
520`,si=(0,g.I4)(sn)`
521  position: sticky;
522  z-index: 2;
523`,sr=g.I4.div`
524  visibility: hidden;
525
526  ${sn}:hover & {
527    visibility: visible;
528  }
529`;function sl(e){let{header:t,headerGroup:n}=e,{t:i}=(0,h.Bdt)(),r=t.column.getIsPinned(),s=n.depth>0&&!t.column.parent?null:(0,o.jsx)(a.EY,{size:1,weight:"semibold",textOverflow:"ellipsis",children:(0,eT.Kv)(t.column.columnDef.header,t.getContext())}),d=t.column.getCanHide()&&(0===n.depth?!t.column.columns.length:t.column.parent),c=r&&t.column.getIsLastColumn("left")?2:1;return(0,o.jsx)(r?si:sn,{style:{left:t.column.getStart("left")??void 0,borderRight:`${c}px solid var(--card-border-color)`},"data-testid":`header-${t.id}`,width:t.getSize(),children:(0,o.jsxs)(a.so,{justify:"space-between",marginX:2,align:"baseline",children:[(0,o.jsx)(l.m_,{delay:500,content:s,children:(0,o.jsx)(a.az,{style:{boxSizing:"border-box"},marginLeft:3,marginRight:3,children:s})}),d&&(0,o.jsx)(sr,{children:(0,o.jsx)(l.IU,{button:(0,o.jsx)(l.$n,{tooltipProps:{content:"Open field menu"},mode:"bleed",icon:p.riS,"data-testid":"field-menu-button"}),id:"field menu",popover:{placement:"bottom-end"},menu:(0,o.jsx)(a.W1,{children:(0,o.jsx)(l.Dr,{text:i("sheet-list.hide-field"),icon:p.USm,onClick:()=>t.column.toggleVisibility()})})})})]})},t.id)}function so({table:e}){return(0,o.jsx)(l.vE,{children:(0,o.jsxs)(a.so,{gap:3,align:"center",children:[(0,o.jsx)(l.$n,{onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),icon:p.Zxx,tooltipProps:{content:"Go to first page"}}),(0,o.jsx)(l.$n,{onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),icon:p.YJP,tooltipProps:{content:"Go to previous page"}}),(0,o.jsxs)(a.EY,{style:{whiteSpace:"nowrap"},children:[e.getState().pagination.pageIndex+1," of ",e.getPageCount()]}),(0,o.jsx)(l.$n,{onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),icon:p.vKP,tooltipProps:{content:"Go to next page"}}),(0,o.jsx)(l.$n,{onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),icon:p.yBO,tooltipProps:{content:"Go to last page"}}),(0,o.jsx)("select",{value:e.getState().pagination.pageSize,onChange:t=>{e.setPageSize(Number(t.target.value))},children:[25,50,100].map(e=>(0,o.jsx)("option",{value:e,children:e},e))})]})})}function ss(e,t){switch(t.type){case"DOCUMENTS_SET":{let n=t.documents.reduce((e,t)=>
529({...e,[t._id]:t}),{});return{...e,documents:n}}case"DOCUMENT_RECEIVED":{let n=t.payload;return{...e,documents:{...e.documents,[n._id]:n}}}case"DOCUMENT_DELETED":{let{[t.id]:n,...i}=e.documents;return{...e,documents:i}}case"DOCUMENT_UPDATED":{let n=t.payload,i=n._id,r={...e.documents[i],...n};return{...e,documents:{...e.documents,[i]:r}}}default:return e}}let sa={events:["welcome","mutation","reconnect"],includeResult:!0,visibility:"query",includeAllVersions:!0,tag:"document-sheet-list-store"},sd=(0,g.I4)(a.so)`
530  height: 100%;
531`,sc=g.I4.div`
532  overflow: auto; //our scrollable table container
533  position: relative; //needed for sticky header
534`,su=g.I4.table`
535  border-collapse: separate;
536  border-spacing: 0;
537  font-family: arial, sans-serif;
538  white-space: nowrap;
539  width: 100%;
540  border: 1px solid lightgray;
541
542  thead {
543    display: grid;
544    position: sticky;
545    top: 0;
546    z-index: 10;
547  }
548  tr {
549    padding: 0;
550  }
551  tr:last-child {
552    border-bottom: none;
553  }
554`;function sp({documentSchemaType:e}){let{dispatch:t,state:n}=(0,h.Z_W)(),{columns:i,initialColumnsVisibility:r}=function(e){let t=(0,h.yKO)(),n=(0,c.useMemo)(()=>e?[o5.display({id:"selected",enableHiding:!1,header:e=>(0,o.jsxs)(a.az,{children:[(0,o.jsx)(a.Sc,{style:{paddingLeft:4},indeterminate:e.table.getIsSomeRowsSelected(),onChange:e.table.getToggleAllPageRowsSelectedHandler()}),e.table.getSelectedRowModel().rows.length," selected"]}),cell:oQ}),o5.accessor("Preview",{enableHiding:!1,id:"Preview",cell:n=>(0,o.jsx)(o4,{...n,documentPreviewStore:t,schemaType:e})}),...o7(e)]:[],[t,e]),[i]=(0,c.useMemo)(()=>o8(n).reduce(([e,t],n)=>{if(!n.id)throw Error("Column must have an id");let i=n.id;return n.enableHiding?5===t?[{...e,[i]:!1},t]:[{...e,[i]:!0},t+1]:[{...e,[i]:!0},t]},[{},0]),[n]);return{columns:n,initialColumnsVisibility:i}}(e),{data:l}=function(e){let t,n,i,r,l=(0,s.c)(12),{typeName:o}=e,{state:a}=(0,h.Z_W)();l[0]!==a.result.hits?(t=new Map,a.result.hits.forEach(e=>t.set((0,m.IM)(e.hit._id),e.hit)),l[0]=a.result.hits,l[1]=t):t=l[1];let d=t,u=`_type == "${o}"`;l[2]!==u?(n={filter:u},l[2]=u,l[3]=n):n=l[3];let{data:p,isLoading:f}=function(e){let t,n,i,r,l,o,a,d,u,p,f=(0,s.c)(27),{filter:x,params:g,apiVersion:b}=e,y=`*[${x}][0...2000]`,j=b||h.miu.apiVersion;f[0]!==j?(t={...h.miu,apiVersion:j},f[0]=j,f[1]=t):t=f[1];let v=(0,h.tH7)(t);f[2]===Symbol.for("react.memo_cache_sentinel")?(n={documents:{}},f[2]=n):n=f[2];let[_,w]=(0,c.useReducer)(ss,n),[S,I]=(0,c.useState)(null!==v),[k,E]=(0,c.useState)(null);f[3]!==y||f[4]!==v||f[5]!==g?(i=async()=>{if(!v)return void I(!1);try{let e=await v.fetch(y,g);w({type:"DOCUMENTS_SET",documents:e}),I(!1)}catch(e){E(e)}},f[3]=y,f[4]=v,f[5]=g,f[6]=i):i=f[6];let C=i;f[7]!==C?(r=async e=>{if("welcome"===e.type&&(I(!0),await C(),I(!1)),"reconnect"===e.type&&I(!0),"mutation"===e.type){if("appear"===e.transition){let t=e.result;t&&w({type:"DOCUMENT_RECEIVED",payload:t})}if("disappear"===e.transition&&w({type:"DOCUMENT_DELETED",id:e.documentId}),"update"===e.transition){let t=e.result;t&&w({type:"DOCUMENT_UPDATED",payload:t})}}},f[7]=C,f[8]=r):r=f[8];let T=r;e:{let e;if(!v){let e;f[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,N.of)(),f[9]=e):e=f[9],l=e;break e}if(f[10]!==y||f[11]!==v.observable||f[12]!==g){let t;f[14]===Symbol.for("react.memo_cache_sentinel")?(t=e=>(E(e),(0,N.of)(e)),f[14]=t):t=f[14],e=v.observable.listen(y,g,sa).pipe((0,z.W)(t)),f[10]=y,f[11]=v.observable,f[12]=g,f[13]=e}else e=f[13];l=e}let P=l;f[15]!==T||f[16]!==P?(o=()=>{let e=P.subscribe(T);return()=>{e?.unsubscribe()}},a=[T,P],f[15]=T,f[16]=P,f[17]=o,f[18]=a):(o=f[17],a=f[18]),(0,c.useEffect)(o,a),f[19]!==_.documents?(d=Object.keys(_.documents).reduce((e,t)=>{let n=_.documents[t],i=n._id===(0,m.T4)(n._id),r=i?n._id:(0,m.T4)(n._id);return e[r]&&!i||(e[r]=n),e},{}),f[19]=_.documents,f[20]=d):d=f[20];let A=d;f[21]!==A?(u=Object.values(A),f[21]=A,f[22]=u):u=f[22];let R=u;return f[23]!==R||f[24]!==k||f[25]!==S?(p={data:R,isLoading:S,error:k},f[23]=R,f[24]=k,f[25]=S,f[26]=p):p=f[26],p}(n);if(l[4]!==p||l[5]!==d){let e;l[7]!==d?(e=e=>d.has((0,m.IM)(e._id)),l[7]=d,l[8]=e):e=l[8],i=p.filter(e),l[4]=p,l[5]=d,l[6]=i}else i=l[6];let x=i;return l[9]!==x||l[10]!==f?(r={data:x,isLoading:f},l[9]=x,l[10]=f,l[11]=r):r=l[11],r}({typeName:e.name}),[d,u]=(0,c.useState)(null),p=n.result.hits.length,f=(0,eT.N4)({data:l,columns:i,getCoreRowModel:(0,eP.HT)(),getFilteredRowModel:(0,eP.hM)(),getPaginationRowModel:(0,eP.kW)(),autoResetPageIndex:!1,initialState:{columnPinning:{left:["selected","Preview"]},pagination:{pageSize:25},columnVisibility:r},getRowId:e=>e._id,meta:{selectedAnchor:d,setSelectedAnchor:u,patchDocument:(e,t,n
554)=>null}}),{rows:x}=f.getRowModel();(0,c.useEffect)(()=>(t({type:"TERMS_TYPE_ADD",schemaType:e}),()=>{t({type:"TERMS_TYPE_REMOVE",schemaType:e})}),[e,t]);let g=(0,c.useCallback)(e=>(0,o.jsx)(a.az,{as:"tr",paddingY:2,style:{display:"flex",width:"100%"},children:e.getVisibleCells().map(t=>(0,o.jsx)(o3,{...t},e.original._id+t.id))},e.original._id+e.id),[]),b=`Total: ${p} rows, showing ${x.length} rows`;return(0,o.jsxs)(sd,{direction:"column",paddingX:3,"data-testid":"document-sheet-list-pane",children:[(0,o.jsxs)(a.so,{direction:"row",align:"center",paddingY:3,paddingX:1,justify:"space-between",children:[(0,o.jsxs)(a.so,{direction:"row",align:"center",children:[(0,o.jsx)(st,{}),(0,o.jsx)(a.EY,{size:0,muted:!0,children:b})]}),(0,o.jsx)(o9,{table:f})]}),(0,o.jsx)(sc,{children:(0,o.jsx)(oq,{table:f,children:(0,o.jsxs)(su,{children:[(0,o.jsx)("thead",{children:f.getHeaderGroups().map(e=>(0,o.jsx)(a.az,{as:"tr",children:e.headers.map(t=>(0,o.jsx)(sl,{header:t,headerGroup:e},t.id))},e.id))}),(0,o.jsx)("tbody",{children:f.getRowModel().rows.map(g)})]})})}),(0,o.jsx)(a.so,{justify:"flex-end",padding:3,gap:4,paddingY:5,children:(0,o.jsx)(so,{table:f})})]})}function sm(e){let t,n,i,r=(0,s.c)(7),l=(0,h.I07)(),a=e.pane.schemaTypeName;if(r[0]!==l||r[1]!==a?(n=!(t=l.get(a))||!(0,f.JR)(t),r[0]=l,r[1]=a,r[2]=t,r[3]=n):(t=r[2],n=r[3]),n)throw Error(`Schema type "${a}" not found or not a document schema`);return r[4]!==e||r[5]!==t?(i=(0,o.jsx)(h.YLU,{children:(0,o.jsx)(sp,{...e,documentSchemaType:t})}),r[4]=e,r[5]=t,r[6]=i):i=r[6],i}function sh(e){let[t,n]=(0,c.useState)(e);return I(t,e)?t:(n(e),e)}let sf=(0,c.memo)(function(e){let t,n,i,r,l,a,d,c,u,p=(0,s.c)(36),{index:m,isSelected:f,pane:x,paneKey:g}=e,{name:b}=(0,h.For)(),{defaultLayout:y,initialValueTemplates:j,menuItemGroups:v,menuItems:_,options:w}=x,I=void 0===j?h.Mlv:j,{defaultOrdering:k,filter:E}=w,C=void 0===k?h.Mlv:k,z=sh(w.params||oS),T=x.source;e:{let e;p[0]!==E||p[1]!==z?(e=oP(E,z),p[0]=E,p[1]=z,p[2]=e):e=p[2];let n=e;if(n?.length===1){t=n[0];break e}t=null}let P=t,[A,R]=t4("layout",P??x.id,void 0===y?"default":y),{title:D}=(0,h.FP1)(x);p[3]!==C?(n=C?.length>0?{by:C}:ow,p[3]=C,p[4]=n):n=p[4];let $=n,[B,Y]=t4("sort-order",P??x.id,$);p[5]!==A||p[6]!==_||p[7]!==B?(i=(e=>{let{menuItems:t,sortOrderRaw:n,layout:i}=e;return t?.map(e=>e.params?.layout?{...e,selected:i===e.params?.layout}:e?.params?.by?{...e,selected:S(n?.by,e?.params?.by||h.Mlv)}:{...e,selected:!1})})({menuItems:_,sortOrderRaw:B,layout:A}),p[5]=A,p[6]=_,p[7]=B,p[8]=i):i=p[8];let M=i,L="sheetList"===A;p[9]!==L||p[10]!==A||p[11]!==e||p[12]!==B?(r=L?(0,o.jsx)(sm,{...e},e.pane.id):(0,o.jsx)(oW,{...e,sortOrder:B,layout:A}),p[9]=L,p[10]=A,p[11]=e,p[12]=B,p[13]=r):r=p[13];let O=r,H=T||b;return p[14]!==L?(l=L?{}:{currentMaxWidth:350,maxWidth:640},p[14]=L,p[15]=l):l=p[15],p[16]!==x.source?(a=n0,p[16]=x.source,p[17]=a):a=p[17],p[18]!==m||p[19]!==I||p[20]!==v||p[21]!==M||p[22]!==R||p[23]!==Y||p[24]!==D?(d=(0,o.jsx)(oG,{index:m,initialValueTemplates:I,menuItemGroups:v,menuItems:M,setLayout:R,setSortOrder:Y,title:D}),p[18]=m,p[19]=I,p[20]=v,p[21]=M,p[22]=R,p[23]=Y,p[24]=D,p[25]=d):d=p[25],p[26]!==f||p[27]!==g||p[28]!==O||p[29]!==d||p[30]!==l||p[31]!==a?(c=(0,o.jsxs)(tn,{"data-ui":"DocumentListPane",id:g,minWidth:320,...l,selected:f,children:[a,d,O]}),p[26]=f,p[27]=g,p[28]=O,p[29]=d,p[30]=l,p[31]=a,p[32]=c):c=p[32],p[33]!==c||p[34]!==H?(u=(0,o.jsx)(h.NeO,{name:H,children:c}),p[33]=c,p[34]=H,p[35]=u):u=p[35],u});sf.displayName="Memo(PaneContainer)";let sx=e=>{let{liveEditSchemaType:t,version:n}=e;return t&&!n?{label:"Live",color:"danger"}:null};sx.displayName="LiveEditBadge";let sg={activePanes:[]};function sb(e){sg.activePanes=e}function sy(e,t,n,i){let r=n?.panes||[],l=sg.activePanes||[],o=t.id||(0,x.A)();for(let n=l.length-1;n>=0;n--){let s=l[n];if("object"==typeof s&&(s.canHandleIntent?.(e,t,{pane:s,index:n})||"documentList"===s.type&&s.schemaTypeName===t.type&&"_type == $type"===s.options.filter)){let l=function(e,{template:t,version:n,inspect:i,comment:r,task:l}){switch(e){case"create":return{template:t,version:n};case"edit":return{inspect:i,comment:r,task:l};default:return n1}}(e,t);return{panes:r.slice(0,n).concat([[{id:o,params:l,payload:i}]])}}}return{intent:e,params:t,payload:i}}let sj=(0,g.I4)(h.PaW)`
555  height: 100%;
556  overflow: auto;
557  position: relative;
558  scroll-behavior: smooth;
559`,sv=(0,g.I4)(a.az)`
560  &:not([hidden]) {
561    display: grid;
562  }
563  grid-template-columns: 48px 1fr;
564  align-items: center;
565  gap: 0.25em;
566`;function s_(e){let t,n,i,l,d,u,p,m,f,x,g,b,y=(0,s.c)(39),{showChanges:j}=e,{documentId:v,schemaType:_,timelineError:w,timelineStore:S,value:
566I}=tM(),{selectedReleaseId:k}=(0,h.QO2)(),[E,C]=(0,c.useState)(null),z=(0,h.SfM)(S,sC),T=(0,h.SfM)(S,sE),P=(0,h.SfM)(S,sk),A=(0,h.SfM)(S,sI),R=(0,h.SfM)(S,sS),D="loading"===A,$=!P,{t:B}=(0,h.Bdt)(r.Z7);y[0]!==T||y[1]!==v||y[2]!==$||y[3]!==_||y[4]!==I?(t={documentId:v,schemaType:_,FieldWrapper:sw,rootDiff:T,isComparingCurrent:$,value:I,showFromValue:!0},y[0]=T,y[1]=v,y[2]=$,y[3]=_,y[4]=I,y[5]=t):t=y[5];let Y=t;if(k){let e;return y[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(a.so,{"data-testid":"review-changes-pane",direction:"column",height:"fill",children:(0,o.jsx)(a.Zp,{flex:1,padding:2,paddingTop:0,children:(0,o.jsx)(rw,{versionError:!0})})}),y[6]=e):e=y[6],e}return y[7]!==B?(n=B("changes.from.label"),y[7]=B,y[8]=n):n=y[8],y[9]!==n?(i=(0,o.jsx)(a.EY,{size:1,muted:!0,children:n}),y[9]=n,y[10]=i):i=y[10],y[11]!==R?(l=(0,o.jsx)(rk,{mode:"since",chunk:R,placement:"bottom-start"}),y[11]=R,y[12]=l):l=y[12],y[13]!==B?(d=B("changes.to.label"),y[13]=B,y[14]=d):d=y[14],y[15]!==d?(u=(0,o.jsx)(a.EY,{size:1,muted:!0,children:d}),y[15]=d,y[16]=u):u=y[16],y[17]!==z?(p=(0,o.jsx)(rk,{chunk:z,mode:"rev",placement:"bottom-end"}),y[17]=z,y[18]=p):p=y[18],y[19]!==i||y[20]!==l||y[21]!==u||y[22]!==p?(m=(0,o.jsx)(a.az,{padding:3,children:(0,o.jsxs)(sv,{paddingX:2,paddingBottom:2,children:[i,l,u,p]})}),y[19]=i,y[20]=l,y[21]=u,y[22]=p,y[23]=m):m=y[23],y[24]!==T||y[25]!==Y||y[26]!==D||y[27]!==_||y[28]!==j||y[29]!==w?(f=j&&(0,o.jsx)(sz,{diff:T,documentContext:Y,error:w,loading:D,schemaType:_}),y[24]=T,y[25]=Y,y[26]=D,y[27]=_,y[28]=j,y[29]=w,y[30]=f):f=y[30],y[31]!==f?(x=(0,o.jsx)(sj,{"data-ui":"Scroller",ref:C,children:(0,o.jsx)(a.az,{flex:1,paddingX:3,height:"fill",children:f})}),y[31]=f,y[32]=x):x=y[32],y[33]!==E||y[34]!==x?(g=(0,o.jsx)(a.Zp,{flex:1,paddingX:2,paddingY:2,children:(0,o.jsx)(a.EZ,{element:E,children:x})}),y[33]=E,y[34]=x,y[35]=g):g=y[35],y[36]!==g||y[37]!==m?(b=(0,o.jsxs)(a.so,{"data-testid":"review-changes-pane",direction:"column",height:"fill",overflow:"hidden",children:[m,g]}),y[36]=g,y[37]=m,y[38]=b):b=y[38],b}function sw(e){return(0,o.jsx)(h.uD1,{...e,hasRevertHover:!1})}function sS(e){return e.sinceTime}function sI(e){return e.selectionState}function sk(e){return e.onOlderRevision}function sE(e){return e.diff}function sC(e){return e.revTime}function sz(e){let t,n,i=(0,s.c)(9),{error:r,diff:l,documentContext:a,loading:d,schemaType:c}=e;if(r){let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(h.J7,{}),i[0]=e):e=i[0],e}if(d){let e;return i[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(h.gd4,{showText:!0}),i[1]=e):e=i[1],e}if(!l){let e;return i[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(h.J7,{}),i[2]=e):e=i[2],e}return i[3]!==l||i[4]!==c?(t=(0,o.jsx)(h.Vki,{diff:l,schemaType:c}),i[3]=l,i[4]=c,i[5]=t):t=i[5],i[6]!==a||i[7]!==t?(n=(0,o.jsx)(u.HU.Provider,{value:a,children:t}),i[6]=a,i[7]=t,i[8]=n):n=i[8],n}function sT(e){let t,n,i,r,d,c,u,p,m=(0,s.c)(27),{event:f,isSelected:x,onSelect:g,optionsMenu:b}=e,{t:y}=(0,h.Bdt)("studio");m[0]!==f?(t=!(0,h.zOx)(f)&&!(0,h.GDb)(f)&&!(0,h.ayN)(f)&&!(0,h.Bkf)(f)&&!(0,h.azN)(f),m[0]=f,m[1]=t):t=m[1];let j=t;m[2]!==f||m[3]!==j||m[4]!==g?(n=e=>{e.preventDefault(),e.stopPropagation(),j&&g(f)},m[2]=f,m[3]=j,m[4]=g,m[5]=n):n=m[5];let v=n;m[6]!==j||m[7]!==y?(i=j?"":y("changes.not-selectable"),m[6]=j,m[7]=y,m[8]=i):i=m[8];let _=j?"button":"div",w=j?"pointer":"default";return m[9]!==w?(r={cursor:w,width:"100%"},m[9]=w,m[10]=r):r=m[10],m[11]!==f?(d=(0,o.jsx)(h.JhA,{event:f,showChangesBy:"tooltip"}),m[11]=f,m[12]=d):d=m[12],m[13]!==f.timestamp||m[14]!==v||m[15]!==x||m[16]!==_||m[17]!==r||m[18]!==d?(c=(0,o.jsx)(a.Zp,{as:_,onClick:v,padding:2,pressed:x,radius:2,"data-ui":"timelineItem","data-testid":"timeline-item-button","data-chunk-timestamp":f.timestamp,style:r,children:d}),m[13]=f.timestamp,m[14]=v,m[15]=x,m[16]=_,m[17]=r,m[18]=d,m[19]=c):c=m[19],m[20]!==j||m[21]!==i||m[22]!==c?(u=(0,o.jsx)(l.m_,{content:i,disabled:j,children:c}),m[20]=j,m[21]=i,m[22]=c,m[23]=u):u=m[23],m[24]!==b||m[25]!==u?(p=(0,o.jsxs)(a.so,{gap:1,children:[u,b]}),m[24]=b,m[25]=u,m[26]=p):p=m[26],p}function sP(e){let t,n,i,d,c,u,p,f,x,g,b,y,j=(0,s.c)(44),{event:v}=e,{t:w}=(0,h.Bdt)(r.Z7),{t:S}=(0,h.Bdt)(),I=(0,a.WP)(),{params:k,setParams:E}=nC(),C=(0,h._T7)(),{document:z}=(0,h.hA9)(),{drafts:T}=z,{enabled:P}=T;j[0]!==v.id||j[1]!==v.versionId||j[2]!==v.versionRevisionId||j[3]!==k||j[4]!==E?(t=()=>{E({...k,rev:v.versionRevisionId||"@lastPublished",since:void 0,historyEvent:v.id,historyVersion:(0,m._S)(v.versionId)})},j[0]=v.id,j[1]=v.versionId,j[2]=v.versionRevisionId,j[3]=k,j[4]=E,j[5]=t):t=j[5];let A=t;
566j[6]!==v.versionRevisionId||j[7]!==P||j[8]!==k||j[9]!==E||j[10]!==C?(n=()=>{E({...k,rev:v.versionRevisionId,preserveRev:"true",since:void 0}),setTimeout(()=>{C(P?"drafts":"published")},100)},j[6]=v.versionRevisionId,j[7]=P,j[8]=k,j[9]=E,j[10]=C,j[11]=n):n=j[11];let R=n;j[12]!==v.release?(i=e=>{let{children:t}=e;return(0,o.jsx)(h.RwK,{$tone:v.release?(0,h.Jrl)(v.release)?(0,h.Y73)(v.release):"default":void 0,children:t})},j[12]=v.release,j[13]=i):i=j[13];let D=i;j[14]!==v.release?(d=v.release&&!(0,h.Jrl)(v.release),j[14]=v.release,j[15]=d):d=j[15];let $=d,B=`timeline-item-menu-button-${v.versionId}`;j[16]!==w?(c=w("timeline-item.menu-button.aria-label"),j[16]=w,j[17]=c):c=j[17],j[18]!==v.release||j[19]!==$||j[20]!==w?(u=$?w("timeline-item.not-found-release.tooltip",{releaseId:v.release?._id?(0,h._hI)(v.release._id):void 0}):w("timeline-item.menu-button.tooltip"),j[18]=v.release,j[19]=$,j[20]=w,j[21]=u):u=j[21],j[22]!==u?(p={content:u},j[22]=u,j[23]=p):p=j[23],j[24]!==$||j[25]!==c||j[26]!==p?(f=(0,o.jsx)(h.VJU,{"aria-label":c,tooltipProps:p,disabled:$}),j[24]=$,j[25]=c,j[26]=p,j[27]=f):f=j[27],j[28]!==D||j[29]!==v.release||j[30]!==v.versionRevisionId||j[31]!==R||j[32]!==A||j[33]!==w||j[34]!==S?(x=(0,o.jsx)(a.W1,{padding:1,children:v.release?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(_.RZ,{intent:h.wwz,params:{id:(0,h._hI)(v.release._id)},style:{textDecoration:"none"},children:(0,o.jsx)(a.Dr,{padding:3,children:(0,o.jsx)(a.so,{align:"center",justify:"flex-start",children:(0,o.jsx)(a.EY,{size:1,style:{textDecoration:"none"},children:(0,o.jsx)(h.HTc,{components:{VersionBadge:e=>{let{children:t}=e;return(0,o.jsx)(D,{children:t})}},i18nKey:"events.open.release",values:{releaseTitle:v.release.metadata?.title||S("release.placeholder-untitled-release")},t:w})})})})}),(0,o.jsx)(a.Dr,{onClick:A,children:(0,o.jsx)(a.so,{align:"center",justify:"flex-start",children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{components:{VersionBadge:e=>{let{children:t}=e;return(0,o.jsx)(D,{children:t})}},i18nKey:"events.inspect.release",values:{releaseTitle:v.release.metadata?.title||S("release.placeholder-untitled-release")},t:w})})})})]}):(0,o.jsx)(a.Dr,{onClick:R,disabled:!v.versionRevisionId,children:(0,o.jsx)(a.so,{align:"center",children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{components:{VersionBadge:sA},i18nKey:"events.open.draft",t:w})})})})}),j[28]=D,j[29]=v.release,j[30]=v.versionRevisionId,j[31]=R,j[32]=A,j[33]=w,j[34]=S,j[35]=x):x=j[35];let Y=!I.elements?.[rI]||rI;return j[36]===Symbol.for("react.memo_cache_sentinel")?(g=["bottom-end","bottom-start"],j[36]=g):g=j[36],j[37]!==Y?(b={portal:Y,placement:"bottom",fallbackPlacements:g},j[37]=Y,j[38]=b):b=j[38],j[39]!==f||j[40]!==x||j[41]!==b||j[42]!==B?(y=(0,o.jsx)(l.IU,{id:B,button:f,menu:x,popover:b}),j[39]=f,j[40]=x,j[41]=b,j[42]=B,j[43]=y):y=j[43],y}function sA(e){let{children:t}=e;return(0,o.jsx)(h.RwK,{$tone:"caution",children:t})}let sR=y.P.create(a.az),sD={initial:{opacity:0}
566,animate:{opacity:1},exit:{opacity:0}},s$=e=>{let t,n,i,r,l,d,u,p,m,f,x,g,b=(0,s.c)(38),{events:y,hasMoreEvents:j,selectedEventId:v,onLoadMore:_,onSelect:w,listMaxHeight:S,fetchEventChildren:I}=e,k=void 0===S?"calc(100vh - 280px)":S,[E,C]=(0,c.useState)(!1),{t:z}=(0,h.Bdt)("studio");b[0]!==y||b[1]!==v?(t=()=>{if(v){let e=y.find(e=>e.id===v);if(e&&"parentId"in e&&e.parentId)return new Set([e.parentId])}return new Set},b[0]=y,b[1]=v,b[2]=t):t=b[2];let[T,P]=(0,c.useState)(t);b[3]===Symbol.for("react.memo_cache_sentinel")?(n=new Set,b[3]=n):n=b[3];let[A,R]=(0,c.useState)(n);b[4]!==y||b[5]!==T?(i=y.filter(e=>(0,h.y4b)(e)&&e.parentId?y[y.length-1].id===e.id||T.has(e.parentId):!(0,h.WUV)(e)||!e.parentId||T.has(e.parentId)),b[4]=y,b[5]=T,b[6]=i):i=b[6];let D=i;b[7]!==I?(r=e=>async()=>{let t=e.id,n=!1;P(e=>{let i=new Set(e);return e.has(t)?i.delete(t):(n=!0,i.add(t)),i}),n&&(R(e=>{let n=new Set(e);return n.add(t),n}),await I(e),R(e=>{let n=new Set(e);return n.delete(t),n}))},b[7]=I,b[8]=r):r=b[8];let $=r;b[9]!==w?(l=e=>{w(e)},b[9]=w,b[10]=l):l=b[10];let B=l;b[11]!==T||b[12]!==$?(d=e=>{let t=(0,h.tfA)(e.documentId);return(0,h.BaK)(e)&&"published"===t?(0,o.jsx)(sP,{event:e}):(0,h.BaK)(e)&&"draft"===t&&e.creationEvent||(0,h.zOx)(e)&&e.creationEvent?(0,o.jsx)(rl,{isExpanded:T.has(e.id),onExpand:$(e)}):null},b[11]=T,b[12]=$,b[13]=d):d=b[13];let Y=d;b[14]!==D.length||b[15]!==A||b[16]!==B||b[17]!==j||b[18]!==Y||b[19]!==v?(u=(e,t)=>{let{activeIndex:n}=t,i=(0,h.y4b)(e)&&e.parentId&&A.has(e.parentId),r=n===D.length-1;return i?(0,o.jsx)(sR,{animate:{opacity:1},initial:{opacity:0}
566,transition:{duration:.2,delay:.2},children:(0,o.jsx)(a.so,{align:"center",justify:"center",style:{height:57},children:(0,o.jsx)(a.y$,{})})}):(0,o.jsxs)(sR,{paddingBottom:1,paddingRight:1,animate:"animate",exit:"exit",initial:"initial",variants:"parentId"in e?sD:void 0,paddingLeft:((0,h.WUV)(e)||(0,h.y4b)(e))&&e.parentId&&!r?4:1,children:[(0,o.jsx)(sT,{event:e,isSelected:e.id===v,onSelect:B,optionsMenu:Y(e)}),r&&j&&(0,o.jsx)(h.gd4,{})]},e.timestamp)},b[14]=D.length,b[15]=A,b[16]=B,b[17]=j,b[18]=Y,b[19]=v,b[20]=u):u=b[20];let M=u;if(b[21]===Symbol.for("react.memo_cache_sentinel")?(m=()=>C(!0),p=[],b[21]=p,b[22]=m):(p=b[21],m=b[22]),(0,c.useEffect)(m,p),b[23]!==D||b[24]!==v){let e;b[26]!==v?(e=e=>e.id===v,b[26]=v,b[27]=e):e=b[27],f=D.findIndex(e),b[23]=D,b[24]=v,b[25]=f}else f=b[25];let L=f,O=!L||E;return b[28]!==D||b[29]!==k||b[30]!==_||b[31]!==M||b[32]!==L||b[33]!==z?(x=D.length>0?(0,o.jsx)(rs,{direction:"column",$maxHeight:k,id:"timeline-list-wrapper",children:(0,o.jsx)(h.oIj,{activeItemDataAttr:"data-hovered",ariaLabel:z("timeline.list.aria-label"),autoFocus:"list",initialIndex:L,initialScrollAlign:"center",itemHeight:57,items:D,onEndReached:_,onEndReachedIndexOffset:20,overscan:5,renderItem:M,wrapAround:!1})}):(0,o.jsxs)(a.BJ,{padding:3,space:3,children:[(0,o.jsx)(a.EY,{size:1,weight:"medium",children:z("timeline.error.no-document-history-title")}),(0,o.jsx)(a.EY,{muted:!0,size:1,children:z("timeline.error.no-document-history-description")})]}),b[28]=D,b[29]=k,b[30]=_,b[31]=M,b[32]=L,b[33]=z,b[34]=x):x=b[34],b[35]!==O||b[36]!==x?(g=(0,o.jsx)(ra,{$visible:O,"data-ui":"timeline",children:x}),b[35]=O,b[36]=x,b[37]=g):g=b[37],g};s$.displayName="EventsTimeline";let sB=(0,g.I4)(l.AM)`
567  overflow: hidden;
568  overflow: clip;
569`,sY={timestamp:{dateStyle:"medium",timeStyle:"short"}};function sM(e){let t,n,i,r,u,m,f,x,g,b,y,j,v,_,w,S,I=(0,s.c)(58),{event:k,events:E,mode:C,placement:z}=e,{setTimelineRange:T}=tM(),[P,A]=(0,c.useState)(!1),[R,D]=(0,c.useState)(null),[$,B]=(0,c.useState)(null),Y=(0,d.dj)(),{nextCursor:M,loading:L,error:O,findRangeForRevision:H,findRangeForSince:V,loadMoreEvents:Z,expandEvent:N}=(0,h.LJN)(),{t:K}=(0,h.Bdt)("studio");I[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{A(!0)},I[0]=t):t=I[0];let F=t;I[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{A(!1)},I[1]=n):n=I[1];let W=n;I[2]!==R||I[3]!==P?(i=e=>{P&&("Escape"===e.key||"Tab"===e.key)&&(W(),R?.focus())},I[2]=R,I[3]=P,I[4]=i):i=I[4],(0,a.Pm)(i),I[5]!==R||I[6]!==$?(r=()=>[R,$],I[5]=R,I[6]=$,I[7]=r):r=I[7],(0,a.PR)(P&&W,r),I[8]!==H||I[9]!==T||I[10]!==K||I[11]!==Y?(u=e=>{try{(()=>{if((0,h.zOx)(e)||(0,h.GDb)(e)||(0,h.ayN)(e)||(0,h.Bkf)(e)||(0,h.azN)(e))return console.error("Event is not selectable");let[t,n]=H(e?.id);T(t,n),W()})()}catch(e){Y.push({closable:!0,description:e.message,status:"error",title:K("timeline.error.unable-to-load-revision")})}},I[8]=H,I[9]=T,I[10]=K,I[11]=Y,I[12]=u):u=I[12];let J=u;I[13]!==V||I[14]!==T||I[15]!==K||I[16]!==Y?(m=e=>{try{let[t,n]=V(e.id);T(t,n),W()}catch(e){Y.push({closable:!0,description:e.message,status:"error",title:K("timeline.error.unable-to-load-revision")})}},I[13]=V,I[14]=T,I[15]=K,I[16]=Y,I[17]=m):m=I[17];let U=m;I[18]!==Z||I[19]!==L||I[20]!==M?(f=()=>{!L&&M&&Z()},I[18]=Z,I[19]=L,I[20]=M,I[21]=f):f=I[21];let G=f;e:{let e;if(O){let e;I[22]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(rw,{}),I[22]=e):e=I[22],x=e;break e}let t=!!M,n=k?.id,i="rev"===C?J:U;I[23]!==E||I[24]!==N||I[25]!==G||I[26]!==n||I[27]!==i||I[28]!==t?(e=(0,o.jsx)(s$,{events:E,fetchEventChildren:N,hasMoreEvents:t,selectedEventId:n,onLoadMore:G,onSelect:i}),I[23]=E,I[24]=N,I[25]=G,I[26]=n,I[27]=i,I[28]=t,I[29]=e):e=I[29],x=e}let Q=x;I[30]!==k||I[31]!==K?(g=k?K(h.uMx[k.documentVariantType][k.type],{context:"timestamp",timestamp:new Date(k.timestamp),formatParams:sY}):K("timeline.latest-revision"),I[30]=k,I[31]=K,I[32]=g):g=I[32];let q=g;I[33]!==k||I[34]!==E||I[35]!==K?(b=k?K(h.uMx[k.documentVariantType][k.type],{context:"timestamp",timestamp:new Date(k.timestamp),formatParams:sY}):E.length>0?K("timeline.since-version-missing"):K("timeline.no-previous-events"),I[33]=k,I[34]=E,I[35]=K,I[36]=b):b=I[36];let X="rev"===C?q:b;I[37]!==$?(y={"timeline-menu":$},I[37]=$,I[38]=y):y=I[38];
569let ee=y,et=P&&Q,en=P?"timeline-menu-close-button":"timeline-menu-open-button",ei=L||!E.length,er=P?W:F;return I[39]===Symbol.for("react.memo_cache_sentinel")?(j={maxWidth:"100%"},I[39]=j):j=I[39],I[40]!==X||I[41]!==L||I[42]!==K?(v=L?K("timeline.loading-history"):X,I[40]=X,I[41]=L,I[42]=K,I[43]=v):v=I[43],I[44]!==P||I[45]!==en||I[46]!==ei||I[47]!==er||I[48]!==v?(_=(0,o.jsx)(a.so,{width:"fill",children:(0,o.jsx)(l.$n,{"data-testid":en,disabled:ei,mode:"ghost",onClick:er,ref:D,selected:P,width:"fill",tooltipProps:null,justify:"space-between",style:j,iconRight:p.D3D,text:v})}),I[44]=P,I[45]=en,I[46]=ei,I[47]=er,I[48]=v,I[49]=_):_=I[49],I[50]!==P||I[51]!==z||I[52]!==et||I[53]!==_?(w=(0,o.jsx)(sB,{"data-testid":"timeline-menu",constrainSize:!0,content:et,"data-ui":"versionMenu",open:P,placement:z,matchReferenceWidth:!0,portal:!0,ref:B,children:_}),I[50]=P,I[51]=z,I[52]=et,I[53]=_,I[54]=w):w=I[54],I[55]!==ee||I[56]!==w?(S=(0,o.jsx)(a.GD,{__unstable_elements:ee,children:w}),I[55]=ee,I[56]=w,I[57]=S):S=I[57],S}let sL=(0,g.I4)(h.PaW)`
570  height: 100%;
571  overflow: auto;
572  position: relative;
573  scroll-behavior: smooth;
574`,sO=(0,g.I4)(a.az)`
575  &:not([hidden]) {
576    display: grid;
577  }
578  grid-template-columns: 48px 1fr;
579  align-items: center;
580  gap: 0.25em;
581`,sH=(0,g.I4)(a.so)`
582  width: 100%;
583  position: absolute;
584  bottom: -4px;
585`,sV={diff:null,loading:!0,error:null},sZ=()=>{let e,t,n,i,l,d,c,p,m,f,x,g=(0,s.c)(31),{documentId:y,schemaType:j,editState:v,displayed:_}=tM(),{selectedPerspective:w,selectedPerspectiveName:S,selectedReleaseId:I}=(0,h.QO2)(),{t:k}=(0,h.Bdt)(r.Z7);g[0]!==_||g[1]!==v?.published?(e=(0,b.g)((0,b.L)(v?.published??{},{author:""}),(0,b.L)(_??{},{author:""})),g[0]=_,g[1]=v?.published,g[2]=e):e=g[2];let E=e;return(!I||v?.version)&&("drafts"!==w||v?.draft)&&"published"!==S&&_?._rev?(g[3]!==k?(t=k("events.compare-with-published.title"),g[3]=k,g[4]=t):t=g[4],g[5]!==t?(n=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:t}),g[5]=t,g[6]=n):n=g[6],g[7]!==w?(i=(0,h.Jrl)(w)?w.metadata?.title:"draft",g[7]=w,g[8]=i):i=g[8],g[9]!==i?(l={version:i},g[9]=i,g[10]=l):l=g[10],g[11]!==k||g[12]!==l?(d=(0,o.jsx)(a.EY,{size:1,muted:!0,children:(0,o.jsx)(h.HTc,{i18nKey:"events.compare-with-published.description",t:k,values:l})}),g[11]=k,g[12]=l,g[13]=d):d=g[13],g[14]!==n||g[15]!==d?(c=(0,o.jsx)(a.Zp,{borderBottom:!0,paddingBottom:3,children:(0,o.jsxs)(a.BJ,{space:3,paddingTop:1,children:[n,d]})}),g[14]=n,g[15]=d,g[16]=c):c=g[16],g[17]!==_||g[18]!==y||g[19]!==E||g[20]!==j?(p={documentId:y,schemaType:j,rootDiff:E,isComparingCurrent:!0,FieldWrapper:sJ,value:_,showFromValue:!0},g[17]=_,g[18]=y,g[19]=E,g[20]=j,g[21]=p):p=g[21],g[22]!==E||g[23]!==j?(m=(0,o.jsx)(a.az,{paddingY:1,children:(0,o.jsx)(h.Vki,{diff:E,schemaType:j})}),g[22]=E,g[23]=j,g[24]=m):m=g[24],g[25]!==p||g[26]!==m?(f=(0,o.jsx)(u.HU.Provider,{value:p,children:m}),g[25]=p,g[26]=m,g[27]=f):f=g[27],g[28]!==c||g[29]!==f?(x=(0,o.jsxs)(a.BJ,{space:2,marginBottom:3,children:[c,f]}),g[28]=c,g[29]=f,g[30]=x):x=g[30],x):null};function sN(e){let t,n,i,r,l,d,u,p,m,f,x,g,b,j,_,w,S,I,k,E=(0,s.c)(83),{showChanges:C}=e,{documentId:z,schemaType:T,timelineError:P,value:A,formState:R}=tM(),[D,$]=(0,c.useState)(null),{events:B,revision:Y,sinceRevision:M,getChangesList:L}=(0,h.LJN)(),O=!Y?.revisionId;E[0]!==L?(t=L(),E[0]=L,E[1]=t):t=E[1];let H=t,{diff:V,loading:Z,error:N}=(0,v.J)(H,sV),{t:K}=(0,h.Bdt)("studio");E[2]!==V||E[3]!==z||E[4]!==R?.readOnly||E[5]!==O||E[6]!==T||E[7]!==A?(n=()=>({documentId:z,schemaType:T,FieldWrapper:sK,rootDiff:V,isComparingCurrent:O&&!R?.readOnly,value:A,showFromValue:!0}),E[2]=V,E[3]=z,E[4]=R?.readOnly,E[5]=O,E[6]=T,E[7]=A,E[8]=n):n=E[8],E[9]!==n?(i=n(),E[9]=n,E[10]=i):i=E[10];let F=i;e:{let e,t,n;if(!B){let e;E[11]===Symbol.for("react.memo_cache_sentinel")?(e=[null,null],E[11]=e):e=E[11],r=e;break e}E[12]!==B||E[13]!==M?.revisionId?(e=B.find(e=>e.id===M?.revisionId)||null,E[12]=B,E[13]=M?.revisionId,E[14]=e):e=E[14],E[15]!==B||E[16]!==Y?.revisionId?(t=B.find(e=>e.id===Y?.revisionId)||B[0],E[15]=B,E[16]=Y?.revisionId,E[17]=t):t=E[17],E[18]!==e||E[19]!==t?(n=[e,t],E[18]=e,E[19]=t,E[20]=n):n=E[20],r=n}let[W,J]=r;t:{let e;if(!J){let e;E[21]!==B?(e=B.slice(1),E[21]=B,E[22]=e):e=E[22],l=e;break t}if(E[23]!==B||E[24]!==J){let t;E[26]!==J?(t=e=>"parentId"in J&&"parentId"in e&&e.parentId===J.parentId||"parentId"in e&&J.id===e.parentId?{...e,parentId:void 0}:e,E[26]=J,E[27]=t):t=E[27],e=B.slice(B.indexOf(J)+1).map(t),E[23]=B,E[24]=J,E[25]=e}else e=E[25];l=e}let U=l;if(!B.length){let e,t,n,i,r;return E[28]!==K?(e=K("timeline.error.no-document-history-title"),E[28]=K,E[29]=e):e=E[29],E[30]!==e?(t=(0,o.jsx)(a.EY,{size:1,weight:"medium",children:e}),E[30]=e,E[31]=t):t=E[31],E[32]!==K?(n=K("timeline.error.no-document-history-description"),E[32]=K,E[33]=n):n=E[33],E[34]!==n?(i=(0,o.jsx)(a.EY,{muted:!0,size:1,children:n}),E[34]=n,E[35]=i):i=E[35],E[36]!==t||E[37]!==i?(r=(0,o.jsx)(a.az,{paddingX:2,children:(0,o.jsxs)(a.BJ,{padding:3,space:3,children:[t,i]})}),E[36]=t,E[37]=i,E[38]=r):r=E[38],r}E[39]===Symbol.for("react.memo_cache_sentinel")?(d={position:"relative"},E[39]=d):d=E[39],E[40]!==K?(u=K("changes.inspector.from-label"),E[40]=K,E[41]=u):u=E[41],E[42]!==u?(p=(0,o.jsx)(a.EY,{size:1,muted:!0,children:u}),E[42]=u,E[43]=p):p=E[43];let G=W||null;E[44]!==U||E[45]!==G?(m=(0,o.jsx)(sM,{event:G,events:U,mode:"since",placement:"bottom-start"}),E[44]=U,E[45]=G,E[46]=m):m=E[46],E[47]!==K?(f=K("changes.inspector.to-label"),E[47]=K,E[48]=f):f=E[48],E[49]!==f?(x=(0,o.jsx)(a.EY,{size:1,muted:!0,children:f}),E[49]=f,E[50]=x):x=E[50];let Q=J||null;return E[51]!==B||E[52]!==Q?(g=(0,o.jsx)(sM,{event:Q,events:B,mode:"rev",placement:"bottom-end"}),E[51]=B,E[52]=Q,E[53]=g):g=E[53],E[54]!==m||E[55]!==x||E[56]!==g||E[57]!==p?(b=(0,o.jsxs)(sO,{paddingX:2,paddingBottom:2,children:[p,m,x,g]}),E[54]=m,E[55]=x,E[56]=g,E[57]=p,E[58]=b):b=E[58],E[59]!==Z||E[60]!==K?(j=Z&&
585(0,o.jsx)(y.P.div,{animate:{opacity:1},initial:{opacity:0},transition:{delay:.2,duration:.2},children:(0,o.jsxs)(sH,{justify:"center",align:"center",gap:2,children:[(0,o.jsx)(a.EY,{muted:!0,size:0,children:K("changes.loading-changes")}),(0,o.jsx)(a.y$,{size:0})]})}),E[59]=Z,E[60]=K,E[61]=j):j=E[61],E[62]!==b||E[63]!==j?(_=(0,o.jsxs)(a.az,{padding:3,style:d,children:[b,j]}),E[62]=b,E[63]=j,E[64]=_):_=E[64],E[65]!==N||E[66]!==F||E[67]!==Y?.loading||E[68]!==T||E[69]!==C||E[70]!==W||E[71]!==M?.loading||E[72]!==P||E[73]!==J?.id?(w=C&&(0,o.jsx)(sF,{documentContext:F,error:P||N,loading:Y?.loading||M?.loading||!1,schemaType:T,sameRevisionSelected:W?.id===J?.id,sinceEvent:W}),E[65]=N,E[66]=F,E[67]=Y?.loading,E[68]=T,E[69]=C,E[70]=W,E[71]=M?.loading,E[72]=P,E[73]=J?.id,E[74]=w):w=E[74],E[75]!==w?(S=(0,o.jsx)(sL,{"data-ui":"Scroller",ref:$,children:(0,o.jsx)(a.az,{flex:1,paddingX:3,height:"fill",children:w})}),E[75]=w,E[76]=S):S=E[76],E[77]!==D||E[78]!==S?(I=(0,o.jsx)(a.Zp,{flex:1,paddingX:2,paddingY:2,children:(0,o.jsx)(a.EZ,{element:D,children:S})}),E[77]=D,E[78]=S,E[79]=I):I=E[79],E[80]!==_||E[81]!==I?(k=(0,o.jsxs)(a.so,{"data-testid":"review-changes-pane",direction:"column",height:"fill",overflow:"hidden",children:[_,I]}),E[80]=_,E[81]=I,E[82]=k):k=E[82],k}function sK(e){return e.path.length>0?(0,o.jsx)(h.uD1,{...e}):e.children}function sF(e){let t,n,i=(0,s.c)(15),{error:r,documentContext:l,loading:d,schemaType:c,sameRevisionSelected:p,sinceEvent:m}=e;if(r){let e,t,n;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(sZ,{}),i[0]=e):e=i[0],i[1]!==r||i[2]!==m?.type?(t=m?.type!=="historyCleared"&&(0,o.jsx)(h.isY,{error:r}),i[1]=r,i[2]=m?.type,i[3]=t):t=i[3],i[4]!==t?(n=(0,o.jsxs)(o.Fragment,{children:[e,t]}),i[4]=t,i[5]=n):n=i[5],n}if(d){let e;return i[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(h.gd4,{showText:!0}),i[6]=e):e=i[6],e}if(p){let e;return i[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(sW,{}),i[7]=e):e=i[7],e}if(!l.rootDiff){let e;return i[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(y.P.div,{animate:{opacity:1},initial:{opacity:0}
585,transition:{delay:.2,duration:.2},children:(0,o.jsx)(h.J7,{})}),i[8]=e):e=i[8],e}return i[9]!==l.rootDiff||i[10]!==c?(t=(0,o.jsx)(a.az,{paddingY:1,children:(0,o.jsx)(h.Vki,{diff:l.rootDiff,schemaType:c})}),i[9]=l.rootDiff,i[10]=c,i[11]=t):t=i[11],i[12]!==l||i[13]!==t?(n=(0,o.jsx)(u.HU.Provider,{value:l,children:t}),i[12]=l,i[13]=t,i[14]=n):n=i[14],n}function sW(){let e,t,n,i,r,l,d,c=(0,s.c)(12),{t:u}=(0,h.Bdt)("");return c[0]===Symbol.for("react.memo_cache_sentinel")?(e={opacity:1},t={opacity:0},n={delay:.2,duration:.2},c[0]=e,c[1]=t,c[2]=n):(e=c[0],t=c[1],n=c[2]),c[3]!==u?(i=u("changes.same-revision-selected-title"),c[3]=u,c[4]=i):i=c[4],c[5]!==i?(r=(0,o.jsx)(a.EY,{size:1,weight:"medium",as:"h3",children:i}),c[5]=i,c[6]=r):r=c[6],c[7]!==u?(l=(0,o.jsx)(a.EY,{as:"p",size:1,muted:!0,children:(0,o.jsx)(h.HTc,{i18nKey:"changes.same-revision-selected-description",t:u})}),c[7]=u,c[8]=l):l=c[8],c[9]!==r||c[10]!==l?(d=(0,o.jsx)(y.P.div,{animate:e,initial:t,transition:n,children:(0,o.jsxs)(a.BJ,{space:3,paddingTop:2,children:[r,l]})}),c[9]=r,c[10]=l,c[11]=d):d=c[11],d}function sJ(e){return e.children}let sU=(0,g.I4)(h.PaW)`
586  height: 100%;
587  overflow: auto;
588  position: relative;
589  scroll-behavior: smooth;
590`;function sG(e){let t,n,i,r=(0,s.c)(21),{showList:l}=e,[u,p]=(0,c.useState)(null),[m,f]=(0,c.useState)(0),{setTimelineRange:x}=tM();r[0]!==m?(t=e=>{!m&&e&&(f(e.clientHeight?e.clientHeight-1:0),p(e))},r[0]=m,r[1]=t):t=r[1];let g=t,{events:b,nextCursor:y,loading:j,error:v,revision:_,loadMoreEvents:w,findRangeForRevision:S,expandEvent:I}=(0,h.LJN)(),{t:k}=(0,h.Bdt)("studio"),E=(0,d.dj)();r[2]!==S||r[3]!==x||r[4]!==k||r[5]!==E?(n=e=>{try{(()=>{if((0,h.zOx)(e)||(0,h.GDb)(e)||(0,h.ayN)(e)||(0,h.Bkf)(e)||(0,h.azN)(e))return console.error("Event is not selectable");let[t,n]=S(e.id);x(t,n)})()}catch(e){E.push({closable:!0,description:e.message,status:"error",title:k("timeline.error.unable-to-load-revision")})}},r[2]=S,r[3]=x,r[4]=k,r[5]=E,r[6]=n):n=r[6];let C=n,z=j&&!b.length;return r[7]!==v||r[8]!==b||r[9]!==I||r[10]!==g||r[11]!==z||r[12]!==m||r[13]!==w||r[14]!==j||r[15]!==y||r[16]!==_?.revisionId||r[17]!==u||r[18]!==C||r[19]!==l?(i=(0,o.jsx)(a.so,{"data-testid":"review-changes-pane",direction:"column",height:"fill",children:(0,o.jsx)(a.Zp,{flex:1,padding:2,paddingTop:0,children:v?(0,o.jsx)(rw,{}):(0,o.jsx)(a.EZ,{element:u,children:(0,o.jsxs)(sU,{"data-ui":"Scroller",ref:g,children:[m&&l&&!z?(0,o.jsx)(s$,{events:b,fetchEventChildren:I,hasMoreEvents:!!y,selectedEventId:_?.revisionId||b[0]?.id,onLoadMore:w,onSelect:C,listMaxHeight:`${m}px`}):null,j&&(0,o.jsx)(h.gd4,{})]})})})}),r[7]=v,r[8]=b,r[9]=I,r[10]=g,r[11]=z,r[12]=m,r[13]=w,r[14]=j,r[15]=y,r[16]=_?.revisionId,r[17]=u,r[18]=C,r[19]=l,r[20]=i):i=r[20],i}let sQ=(0,g.I4)(h.PaW)`
591  height: 100%;
592  overflow: auto;
593  position: relative;
594  scroll-behavior: smooth;
595`;function sq(e){let t,n,i,r,l=(0,s.c)(20),{showList:u}=e,{timelineError:p,setTimelineRange:m,timelineStore:f}=tM(),{selectedReleaseId:x}=(0,h.QO2)(),[g,b]=(0,c.useState)(null),[y,j]=(0,c.useState)(0);l[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{e?.clientHeight&&(j(e.clientHeight-1),b(e))},l[0]=t):t=l[0];let v=t,_=(0,h.SfM)(f,s2),w=(0,h.SfM)(f,s1),S=(0,h.SfM)(f,s0),I=(0,h.SfM)(f,sX),{t:k}=(0,h.Bdt)("studio"),E=(0,d.dj)();l[1]!==m||l[2]!==k||l[3]!==f||l[4]!==E?(n=e=>{try{let[t,n]=f?.findRangeForRev(e)||[null,null];m(t,n)}catch(e){E.push({closable:!0,description:e.message,status:"error",title:k("timeline.error.unable-to-load-revision")})}},l[1]=m,l[2]=k,l[3]=f,l[4]=E,l[5]=n):n=l[5];let C=n;l[6]!==I||l[7]!==f?(i=()=>{I||f?.loadMore()},l[6]=I,l[7]=f,l[8]=i):i=l[8];let z=i;return l[9]!==_||l[10]!==z||l[11]!==S||l[12]!==y||l[13]!==w||l[14]!==g||l[15]!==C||l[16]!==x||l[17]!==u||l[18]!==p?(r=(0,o.jsx)(a.so,{"data-testid":"review-changes-pane",direction:"column",height:"fill",children:(0,o.jsx)(a.Zp,{flex:1,padding:2,paddingTop:0,children:p||x?(0,o.jsx)(rw,{versionError:!!x}):(0,o.jsx)(a.EZ,{element:g,children:(0,o.jsx)(sQ,{"data-ui":"Scroller",ref:v,children:y&&u?(0,o.jsx)(r_,{chunks:_,hasMoreChunks:S,lastChunk:w,onLoadMore:z,onSelect:C,listMaxHeight:`${y}px`}):null})})})}),l[9]=_,l[10]=z,l[11]=S,l[12]=y,l[13]=w,l[14]=g,l[15]=C,l[16]=x,l[17]=u,l[18]=p,l[19]=r):r=l[19],r}function sX(e){return e.isLoading}function s0(e){return e.hasMoreChunks}function s1(e){return e.realRevChunk}function s2(e){return e.chunks}let s3=(0,g.I4)(a.so)`
596  opacity: 0;
597  transition: opacity 200ms;
598  &[data-ready] {
599    opacity: 1;
600  }
601`,s4=["history","review"],s5={error:p.YZv,warning:p.sAQ,info:p.YzR},s6={error:"critical",warning:"caution",info:"primary"};function s7(e){let t,n,i,r,d=(0,s.c)(17),{marker:u,onOpen:p,schemaType:m,value:h}=e;d[0]!==u.path||d[1]!==p?(t=()=>p(u.path),d[0]=u.path,d[1]=p,d[2]=t):t=d[2];let f=t,[x,g]=(0,c.useState)(null),b=s5[u.level];return d[3]!==x?(n=x&&(0,o.jsx)(a.Zp,{padding:3,radius:2,tone:"critical",children:(0,o.jsx)(a.EY,{size:1,children:x.error.message})}),d[3]=x,d[4]=n):n=d[4],d[5]!==b||d[6]!==x||d[7]!==f||d[8]!==u.level||d[9]!==u.message||d[10]!==u.path||d[11]!==m||d[12]!==h?(i=!x&&(0,o.jsx)(a.Zp,{__unstable_focusRing:!0,as:"button",onClick:f,padding:3,radius:2,tone:s6[u.level],children:(0,o.jsxs)(a.so,{align:"flex-start",ga
601p:3,children:[(0,o.jsx)(a.az,{flex:"none",children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(b,{})})}),(0,o.jsxs)(a.BJ,{flex:1,space:2,children:[(0,o.jsx)(s8,{path:u.path,schemaType:m,value:h}),(0,o.jsx)(a.EY,{muted:!0,size:1,children:u.message})]})]})}),d[5]=b,d[6]=x,d[7]=f,d[8]=u.level,d[9]=u.message,d[10]=u.path,d[11]=m,d[12]=h,d[13]=i):i=d[13],d[14]!==n||d[15]!==i?(r=(0,o.jsxs)(l.tH,{onCatch:g,children:[n,i]}),d[14]=n,d[15]=i,d[16]=r):r=d[16],r}function s8(e){let t,n,i,r=(0,s.c)(8),{path:l,schemaType:d,value:c}=e;e:{try{let e;r[0]!==l||r[1]!==d||r[2]!==c?(e=function(e){let{path:t,schemaType:n,value:i}=e,r=[],l=n,o=i;for(let e of t){if("string"==typeof e){if(!(0,h.u4i)(o)&&void 0!==o)throw Error(`Parent value is not an object, cannot get path segment: .${e}`);if("object"!==l.jsonType)throw Error(`Parent type is not an object schema type, cannot get path segment: .${e}`);o=o?.[e];let t=l.fields.find(t=>t.name===e);if(!t)return r.push({name:e}),r;l=t.type,r.push(l);continue}if("number"==typeof e){if(!(0,h.cyL)(o)&&void 0!==o)throw Error(`Parent value is not an array, cannot get path segment: [${e}]`);if("array"!==l.jsonType)throw Error(`Parent type is not an array schema type, cannot get path segment: [${e}]`);o=o?.[e];let t=l.of.find(e=>"string"==typeof o?"string"===e.jsonType:"number"==typeof o?"number"===e.jsonType:"boolean"==typeof o?"boolean"===e.jsonType:!!(0,h.u4i)(o)&&e.name===o?._type);if(!t)throw Error(`Item type not found: [${e}]`);l=t,r.push(l);continue}if((0,h.u4i)(e)&&e._key){if(typeof o>"u")return r;if(!(0,h.cyL)(o))throw Error(`Parent value is not an array, cannot get path segment: [_key == ${e}]`);if("array"!==l.jsonType)throw Error(`Parent type is not an array schema type, cannot get path segment: .${e}`);if(typeof(o=(o??[]).find(t=>(0,h.u4i)(t)&&t._key===e._key))>"u")return r;if(!(0,h.u4i)(o))throw Error(`Array item not found: [_key == ${e._key}]`);let t=l.of.find(e=>(0,h.u4i)(o)&&e.name===o?._type);if(!t)throw Error(`Array item type not found: .${o?._type}`);l=t,r.push(l);continue}throw Error(`Invalid path segment: ${JSON.stringify(e)}`)}return r}({path:l,schemaType:d,value:c}),r[0]=l,r[1]=d,r[2]=c,r[3]=e):e=r[3],t=e;break e}catch(e){console.error(e)}t=null}let u=t;return u?.length?(r[4]!==u?(n=u.map(s9),r[4]=u,r[5]=n):n=r[5],r[6]!==n?(i=(0,o.jsx)(a.EY,{size:1,children:n}),r[6]=n,r[7]=i):i=r[7],i):null}function s9(e,t){return(0,o.jsxs)(c.Fragment,{children:[t>0&&(0,o.jsx)("span",{style:{color:"var(--card-muted-fg-color)",opacity:.5},children:" / "}),(0,o.jsx)("span",{style:{fontWeight:500},children:e.title||e.name})]},t)}function ae(e){return{level:e.level,message:e.message,path:e.path}}let at={},an=_.wE.create("/",[_.wE.intents("/intent"),_.wE.create("/edit/:type/:editDocumentId",[_.wE.create({path:"/:params",transform:{params:{toState:function(e){try{return JSON.parse(decodeURIComponent(e))}catch{return console.warn("Failed to parse JSON parameters"),{}}},toPath:function(e){return JSON.stringify(e)}}}})]),_.wE.create({path:"/:panes",children:[_.wE.create("/:action",_.wE.create("/:legacyEditDocumentId"))],transform:{panes:{toState:function(e){var t;return -1!==(t=decodeURIComponent(e)).indexOf(",{")?function(e){let t=[],n=e;for(;n.length;){let[e,i,r]=n.match(ai)||[];if(!e){n=n.slice(1);continue}let l=r&&function(e){try{return JSON.parse(e)}catch(e){console.warn(`Failed to parse parameters: ${e.message}`);return}}(r);t.push({id:i,payload:l}),n=n.slice(e.length)}return[t]}(t):t.split(";").map(e=>{let[t,...n]=e.split("|").map(e=>{let[t,...n]=e.split(","),i={id:t,params:at,payload:void 0};return n.reduce((e,t)=>{if(/^[a-z0-9]+=[^=]+/i.test(t)){let n=t.slice(0,t.indexOf("=")),i=t.slice(n.length+1);e.params={...e.params,[decodeURIComponent(n)]:decodeURIComponent(i)}}else/^[A-Za-z0-9\-_]+(?:={0,2})$/.test(t)?e.payload=function(e){try{return e?(0,_.fA)(e):void 0}catch(e){console.warn(`Failed to parse parameters: ${e.message}`);return}}(t):console.warn("Unknown pane segment: %s - skipping",t);return e},i)});return[t,...n.map(e=>({...t,...e,id:e.id||t.id,params:{...w(t.params,ar),...e.params},payload:e.payload||t.payload}))]}).filter(e=>e.length>0)},toPath:function(e){return(e||[]).map(e=>
601e.map(ao).join("|")).map(encodeURIComponent).join(";")}}}})]),ai=/^([.a-z0-9_-]+),?({.*?})?(?:(;|$))/i,ar=["view","since","rev","inspect","comment"],al=Boolean;function ao(e,t,n){let{payload:i,params:r={},id:l}=e,[o]=n,s=e===o,a=0!==t&&l===o.id,d=typeof i>"u"?void 0:(0,_.nk)(i),c=Object.entries(r).filter(e=>{let[t,n]=e;return!!n&&(!!s||!(n===o.params?.[t]&&!ar.includes(t)))}).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`);return[a?"":l].concat([c.length>0&&c,d].filter(al).flat()).join(",")||","}let as=[i0,i2,iK,iW,iV,is],aa=["delete","discardChanges"],ad=[sx],ac=[{name:"sanity/structure/validation",component:function(e){let t,n,i,r,l,d,c,u=(0,s.c)(23),{onClose:p}=e,{onFocus:m,onPathOpen:f,schemaType:x,validation:g,value:b,editState:y}=tM(),{t:j}=(0,h.Bdt)("validation");u[0]!==m||u[1]!==f?(t=e=>{f(e),m(e)},u[0]=m,u[1]=f,u[2]=t):t=u[2];let v=t;u[3]!==y?(n=y&&y.version&&(0,h.YW1)(y.version),u[3]=y,u[4]=n):n=u[4];let _=n;return u[5]!==j?(i=j("panel.close-button-aria-label"),u[5]=j,u[6]=i):i=u[6],u[7]!==j?(r=j("panel.title"),u[7]=j,u[8]=r):r=u[8],u[9]!==p||u[10]!==i||u[11]!==r?(l=(0,o.jsx)(t2,{as:"header",closeButtonLabel:i,flex:"none",onClose:p,title:r}),u[9]=p,u[10]=i,u[11]=r,u[12]=l):l=u[12],u[13]!==v||u[14]!==_||u[15]!==x||u[16]!==j||u[17]!==g||u[18]!==b?(d=(0,o.jsx)(a.Zp,{flex:1,overflow:"auto",padding:3,children:_?(0,o.jsx)(a.az,{padding:2,children:(0,o.jsx)(a.EY,{muted:!0,size:1,children:j("panel.unpublish-message")})}):(0,o.jsxs)(o.Fragment,{children:[0===g.length&&(0,o.jsx)(a.az,{padding:2,children:(0,o.jsx)(a.EY,{muted:!0,size:1,children:j("panel.no-errors-message")})}),g.length>0&&(0,o.jsx)(a.BJ,{space:2,children:g.map((e,t)=>(0,o.jsx)(s7,{marker:e,onOpen:v,schemaType:x,value:b},t))})]})}),u[13]=v,u[14]=_,u[15]=x,u[16]=j,u[17]=g,u[18]=b,u[19]=d):d=u[19],u[20]!==l||u[21]!==d?(c=(0,o.jsxs)(a.so,{direction:"column",height:"fill",overflow:"hidden",children:[l,d]}),u[20]=l,u[21]=d,u[22]=c):c=u[22],c},useMenuItem:function(e){let t,n,i,r,l,o,a=(0,s.c)(11),{documentType:d}=e,{t:c}=(0,h.Bdt)("validation"),{selectedReleaseId:u}=(0,h.QO2)(),{value:m}=tM(),{validation:x}=(0,h.dWw)(m._id,d,u);a[0]!==x?(t=x.map(ae),a[0]=x,a[1]=t):t=a[1];let g=t,b=g.some(f.Ah),y=g.some(f.ci);a[2]!==m?(n=(0,h.YW1)(m),a[2]=m,a[3]=n):n=a[3];let j=n;e:{if(b){i=p.YZv;break e}if(y){i=p.sAQ;break e}i=p.Dee}let v=i;t:{if(b){r="critical";break t}if(y){r="caution";break t}r="positive"}let _=r,w=0===g.length||j;return a[4]!==c?(l=c("panel.title"),a[4]=c,a[5]=l):l=a[5],a[6]!==v||a[7]!==w||a[8]!==l||a[9]!==_?(o={hidden:w,icon:v,title:l,tone:_,showAsAction:!0},a[6]=v,a[7]=w,a[8]=l,a[9]=_,a[10]=o):o=a[10],o}},{name:tJ,useMenuItem:()=>{let{features:e}=tN(),{t}=(0,h.Bdt)();return{hidden:!e.reviewChanges,icon:p.G2W,title:t("changes.title")}},component:function(e){let t,n,i,u,m,f,x,g,b,y,j,v,_,w,S,I,k,E,C,z,T,P,A,R,D,$,B,Y=(0,s.c)(72),{params:M,setParams:L}=nC(),O=(0,h.For)(),[H,V]=(0,c.useState)(null),{t:Z}=(0,h.Bdt)(r.Z7),N=M?.inspect===tJ,{selectedPerspective:K}=(0,h.QO2)();Y[0]!==M?(t=(B=M?.changesInspectorTab)&&s4.includes(B)?M.changesInspectorTab:s4[0],Y[0]=M,Y[1]=t):t=Y[1];let F=t;Y[2]!==M||Y[3]!==L?(n=e=>L({...M,changesInspectorTab:e,since:"history"===e?void 0:M?.since}),Y[2]=M,Y[3]=L,Y[4]=n):n=Y[4];let W=n;Y[5]!==K||Y[6]!==Z?(i=(0,h.Jrl)(K)?K.metadata.title:Z("drafts"===K?"compare-versions.status.draft":"compare-versions.status.published"),Y[5]=K,Y[6]=Z,Y[7]=i):i=Y[7];let J=i,U=N?"":void 0;Y[8]!==Z?(u=Z("changes.tab.history"),Y[8]=Z,Y[9]=u):u=Y[9],Y[10]!==W?(m=()=>W("history"),Y[10]=W,Y[11]=m):m=Y[11];let G="history"===F;Y[12]!==u||Y[13]!==m||Y[14]!==G?(f=(0,o.jsx)(l.oz,{"aria-controls":"history-panel",id:"history-tab",label:u,onClick:m,selected:G}),Y[12]=u,Y[13]=m,Y[14]=G,Y[15]=f):f=Y[15],Y[16]!==Z?(x=Z("changes.tab.review-changes"),Y[16]=Z,Y[17]=x):x=Y[17],Y[18]!==W?(g=()=>W("review"),Y[18]=W,Y[19]=g):g=Y[19];let Q="review"===F;Y[20]!==Q||Y[21]!==x||Y[22]!==g?(b=(0,o.jsx)(l.oz,{"aria-controls":"review-changes-panel",id:"changes-tab",label:x,onClick:g,selected:Q}),Y[20]=Q,Y[21]=x,Y[22]=g,Y[23]=b):b=Y[23],Y[24]!==b||Y[25]!==f?(y=(0,o.jsxs)(a.wb,{space:1,flex:1,children:[f,b]}),Y[24]=b,Y[25]=f,Y[26]=y):y=Y[26],Y[27]!==Z?(j=Z("changes.action.close-label"),Y[27]=Z,Y[28]=j):j=Y[28];let q=e.onClose;Y[29]!==Z?(v=Z("document-inspector.close-button.tooltip"),Y[29]=Z,Y[30]=v):v=Y[30],Y[31]!==v?(_={content:v},Y[31]=v,Y[32]=_):_=Y[32],Y[33]!==e.onClose||Y[34]!==j||Y[35]!==_?(w=(0,o.jsx)(l.$n,{"aria-label":j,icon:p.USm,mode:"bleed",onClick:q,tooltipProps:_}),Y[33]=e.onClose,Y[34]=j,Y[35]=_,Y[36]=w):w=Y[36],Y[37]!==y||Y[38]!==w?(S=(0,o.jsx)(a.Zp,{paddingBottom:1,children:(0,o.jsxs)(a.so,{align:"center",padding:3,gap:2,children:[y,w]})}),Y[37]=y,Y[38]=w,Y[39]=S):S=Y[39],Y[40]!==Z?(I=(0,o.jsx)(a.az,{flex:1,padding:1,children:(0,o.jsx)(a.EY,{size:1,children:(0,o.jsx)(h.HTc,{t:Z,i18nKey:"changes.banner.tooltip"})})}),Y[40]=Z,Y[41]=I):I=Y[41],Y[42]===Symbol.for("react.memo_cache_sentinel")?(k=(0,o.jsx)(a.EY,{size:0,muted:!0,children:(0,o.jsx)(p.YzR,{fontSize:1})}),Y[42]=k):k=Y[42],Y[43]!==H||Y[44]!==I?(E=(0,o.jsx)(l.m_,{portal:!0,placement:"bottom-end",boundaryElement:H,content:I,children:k}),Y[43]=H,Y[44]=I,Y[45]=E):E=Y[45],Y[46]!==J?(C={perspective:J},Y[46]=J,Y[47]=C):C=Y[47],Y[48]!==Z||Y[49]!==C?(z=(0,o.jsx)(a.EY,{size:0,muted:!0,children:(0,o.jsx)(h.HTc,{t:Z,values:C,i18nKey:"changes.banner.description"})}),Y[48]=Z,Y[49]=C,Y[50]=z):z=Y[50],Y[51]!==E||Y[52]!==z?(T=(0,o.jsx)(a.Zp,{padding:2,marginBottom:3,marginX:3,tone
601:"neutral",border:!0,radius:3,children:(0,o.jsxs)(a.so,{gap:2,align:"flex-start",children:[E,z]})}),Y[51]=E,Y[52]=z,Y[53]=T):T=Y[53];let X="history"!==F;Y[54]!==F||Y[55]!==O.beta?.eventsAPI?.documents?(P=O.beta?.eventsAPI?.documents?(0,o.jsx)(sG,{showList:"history"===F}):(0,o.jsx)(sq,{showList:"history"===F}),Y[54]=F,Y[55]=O.beta?.eventsAPI?.documents,Y[56]=P):P=Y[56],Y[57]!==X||Y[58]!==P?(A=(0,o.jsx)(d.Kp,{"aria-labelledby":"history-tab",height:"fill",hidden:X,id:"history-panel",children:P}),Y[57]=X,Y[58]=P,Y[59]=A):A=Y[59];let ee="review"!==F;return Y[60]!==F||Y[61]!==O.beta?.eventsAPI?.documents?(R=O.beta?.eventsAPI?.documents?(0,o.jsx)(o.Fragment,{children:"review"===F?(0,o.jsx)(sN,{showChanges:"review"===F}):null}):(0,o.jsx)(s_,{showChanges:"review"===F}),Y[60]=F,Y[61]=O.beta?.eventsAPI?.documents,Y[62]=R):R=Y[62],Y[63]!==ee||Y[64]!==R?(D=(0,o.jsx)(d.Kp,{"aria-labelledby":"review-tab",hidden:ee,id:"review-panel",height:"fill",children:R}),Y[63]=ee,Y[64]=R,Y[65]=D):D=Y[65],Y[66]!==S||Y[67]!==T||Y[68]!==A||Y[69]!==U||Y[70]!==D?($=(0,o.jsxs)(s3,{direction:"column",padding:0,height:"fill","data-ready":U,ref:V,children:[S,T,A,D]}),Y[66]=S,Y[67]=T,Y[68]=A,Y[69]=U,Y[70]=D,Y[71]=$):$=Y[71],$},onClose:({params:e})=>({params:{...e,since:void 0,rev:void 0,changesInspectorTab:void 0,historyVersion:void 0}}),onOpen:({params:e})=>({params:{...e,since:"@lastPublished"}})}],au=(0,h.bzQ)(e=>{let t=e?.icon||p.tN2;return{name:"sanity/structure",document:{actions:(e,t)=>{let n=Array.from(new Set([...e,...as])),i=n.filter(e=>aa.includes(e.action)),r=n.filter(e=>!aa.includes(e.action));return"published"===t.versionType?[...[...r].sort((e,t)=>"unpublish"===e.action?-1:+("unpublish"===t.action)),...i]:[...r,...i]},badges:e=>Array.from(new Set([...e,...ad])),inspectors:e=>Array.from(new Set([...e,...ac]))},tools:[{name:e?.name||"structure",title:e?.title||"Structure",icon:t,component:(0,c.lazy)(()=>n.e(8945).then(n.bind(n,78945))),canHandleIntent:(e,t)=>"create"===e?function(e){return"type"in e&&(!("template"in e)||{template:!0})}(t):"edit"===e&&function(e){return"id"in e&&(!("mode"in e)||{mode:"structure"===e.mode})}(t),getIntentState:sy,controlsDocumentTitle:!0,options:e,router:an,__internalApplicationType:"sanity/structure"}],i18n:{bundles:[r.uQ]}}});var ap=Object.freeze({__proto__:null,default:lE}),am=Object.freeze({__proto__:null,default:sf})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.