mirror of
https://github.com/UiO-Gaming/uiogaming.no-backend.git
synced 2026-11-05 13:56:49 +01:00
12 lines
23 KiB
JavaScript
12 lines
23 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/index-B07hjxo-.js","static/sanity-D34DDzzj.js","static/index2-BxbGLUws.js"])))=>i.map(i=>d[i]);
|
|
import{o as Ne,f as Oe,r as v,c as E,u as me,h as he,i as ae,k as Me,l as $e,_ as Z,m as pe,n as Ae,p as Ve,q as Ee,s as Be,t as We,j as p,L as ye,v as Y,w as Ke,x as xe,y as ge,z as se,A as oe,P as He,B as Fe,E as Ge,D as Ue,F as Je,G as Ye,I as Re,J as G,R as qe,K as Qe,M as ke,N as de,S as fe,T as N,O as Pe,Q as ne,U as Te,V as Xe,W as Ze,X as we,Y as et,Z as tt,$ as nt,a0 as rt,a1 as at,a2 as st,a3 as ot,a4 as it,a5 as _e,a6 as Ie,a7 as lt,a8 as ct,H as dt,a9 as ut,aa as pt,C as re,a as Ce,ab as ft,ac as je,ad as mt,ae as ht,af as yt,ag as xt,ah as ee,ai as gt,aj as It,ak as Pt,al as wt}from"./sanity-D34DDzzj.js";function _t(){return Ne(function(t,e){var a,r=!1;t.subscribe(Oe(e,function(n){var i=a;a=n,r&&e.next([i,n]),r=!0}))})}const jt=[];function bt(t){const e=E(60),{children:a,flatIndex:r,index:n,params:i,payload:o,siblingIndex:s}=t,{navigate:l,navigateIntent:c,resolvePathFromState:d}=me(),u=he(),{panes:y,expand:g}=Je();let h;h=(u==null?void 0:u.panes)||jt;const f=h;let I;I=y==null?void 0:y[y.length-2];const P=I,m=n-1;let x;e[0]!==m||e[1]!==f||e[2]!==u||e[3]!==s?(x=j=>{const S=f[m]||[],$=S[s],A=j(S,$),X=[...f.slice(0,m),A,...f.slice(m+1)];return{...u||{},panes:X}},e[0]=m,e[1]=f,e[2]=u,e[3]=s,e[4]=x):x=e[4];const w=x;let _;e[5]!==w||e[6]!==l?(_=j=>{const S=w(j);return setTimeout(()=>l(S),0),S},e[5]=w,e[6]=l,e[7]=_):_=e[7];const b=_;let R;e[8]!==w||e[9]!==d||e[10]!==s?(R=j=>{const S=w(($,A)=>[...$.slice(0,s),{...A,params:j},...$.slice(s+1)]);return d(S)},e[8]=w,e[9]=d,e[10]=s,e[11]=R):R=e[11];const M=R;let T;e[12]!==b||e[13]!==s?(T=j=>{b((S,$)=>[...S.slice(0,s),{...$,payload:j},...S.slice(s+1)])},e[12]=b,e[13]=s,e[14]=T):T=e[14];const L=T;let C;e[15]!==b||e[16]!==s?(C=j=>{b((S,$)=>[...S.slice(0,s),{...$,params:j},...S.slice(s+1)])},e[15]=b,e[16]=s,e[17]=C):C=e[17];const k=C;let z;e[18]!==m||e[19]!==l||e[20]!==f?(z=j=>{const{id:S,parentRefPath:$,type:A,template:X}=j;l({panes:[...f.slice(0,m+1),[{id:S,params:{template:X.id,parentRefPath:nt($),type:A},payload:X.params}]]})},e[18]=m,e[19]=l,e[20]=f,e[21]=z):z=e[21];const O=z;let J;const D=f[m]?f[m].length>1:!1,V=f[m]?f[m].length:0,le=r?rt:void 0;let B,W;e[22]!==b?(B=j=>{const S=j===void 0?{}:j;b(()=>[{id:S.id||"",payload:S.payload,params:S.params||{}}])},W=()=>{b(St)},e[22]=b,e[23]=B,e[24]=W):(B=e[23],W=e[24]);let K;e[25]!==g||e[26]!==m||e[27]!==P||e[28]!==l||e[29]!==f?(K=j=>{(j===void 0||j)&&P&&g(P.element),l({panes:[...f.slice(0,m)]})},e[25]=g,e[26]=m,e[27]=P,e[28]=l,e[29]=f,e[30]=K):K=e[30];let H;e[31]!==b||e[32]!==s?(H=j=>{b((S,$)=>{const A={...$,payload:(j==null?void 0:j.payload)||$.payload,params:(j==null?void 0:j.params)||$.params};return[...S.slice(0,s),A,...S.slice(s)]})},e[31]=b,e[32]=s,e[33]=H):H=e[33];let F;e[34]!==i||e[35]!==k?(F=j=>{const S=Re(i,"view");return k(j?{...S,view:j}:S)},e[34]=i,e[35]=k,e[36]=F):F=e[36];let q;e[37]!==M||e[38]!==r||e[39]!==m||e[40]!==O||e[41]!==c||e[42]!==i||e[43]!==o||e[44]!==f||e[45]!==k||e[46]!==L||e[47]!==s||e[48]!==V||e[49]!==le||e[50]!==B||e[51]!==W||e[52]!==K||e[53]!==H||e[54]!==F||e[55]!==D?(q={index:r,groupIndex:m,siblingIndex:s,payload:o,params:i,hasGroupSiblings:D,groupLength:V,routerPanesState:f,ChildLink:at,BackLink:le,ReferenceChildLink:st,handleEditReference:O,ParameterizedLink:ot,replaceCurrent:B,closeCurrent:W,closeCurrentAndAfter:K,duplicateCurrent:H,setView:F,setParams:k,setPayload:L,createPathWithParams:M,navigateIntent:c},e[37]=M,e[38]=r,e[39]=m,e[40]=O,e[41]=c,e[42]=i,e[43]=o,e[44]=f,e[45]=k,e[46]=L,e[47]=s,e[48]=V,e[49]=le,e[50]=B,e[51]=W,e[52]=K,e[53]=H,e[54]=F,e[55]=D,e[56]=q):q=e[56],J=q;const ce=J;let Q;return e[57]!==a||e[58]!==ce?(Q=p.jsx(Ye.Provider,{value:ce,children:a}),e[57]=a,e[58]=ce,e[59]=Q):Q=e[59],Q}function St(t,e){return t.length>1?t.filter(a=>a!==e):t}class U extends Error{constructor({message:e,context:a,helpId:r,cause:n}){super(e),this.name="PaneResolutionError",this.context=a,this.helpId=r,this.cause=n}}const be=new WeakMap;function ie(t){const e=be.get(t);if(e)return e;const a=It();return be.set(t,a),a}const vt=t=>!!t&&typeof(t==null?void 0:t.then)=="function",$t=t=>ge(t)?typeof t.serialize=="function":!1,Et=t=>(e,a,r)=>{try{return t(e,a,r)}catch(n){throw n instanceof U?n:new U({message:typeof(n==null?void 0:n.message)=="string"?n.message:"",context:a,cause:n})}},Rt=t=>(...e)=>t(...e).pipe(Pt(1),wt());function De(t){const e=Et(Rt(t((a,r,n)=>{if(!a)throw new U({message:"Pane returned no child",context:r,helpId:"structure-item-returned-no-child"});return vt(a)||yt(a)?xt(a).pipe(Ie(i=>e(i,r,n))):$t(a)?e(a.serialize(r),r,n):typeof a=="function"?e(a(r.id,r),r,n):ee(a)})));return e}const Se=new WeakMap;function Le(t,e){const a=Se.get(t)||new Map;if(a){const i=a.get(e);if(i)return i}const r=t[e];if(typeof r!="function")throw new Error(`Expected property \`${e}\` to be a function but got ${typeof r} instead.`);const n=r.bind(t);return a.set(e,n),Se.set(t,a),n}async function kt(t){const e=new Map,a=De(o=>(s,l,c)=>{const d=s&&`${ie(s)}-${l.path.join("__")}`,u=d&&e.get(d);if(u)return u;const y=o(s,l,c);return d&&e.set(d,y),y}),r=[[{id:`__edit__${t.params.id}`,params:{...Re(t.params,["id"]),type:t.params.type},payload:t.payload}]];async function n({currentId:o,flatIndex:s,intent:l,params:c,parent:d,path:u,payload:y,unresolvedPane:g,levelIndex:h,structureContext:f}){var w;if(!g)return[];const{id:I,type:P,...m}=c,x=await ke(a(g,{id:o,splitIndex:0,parent:d,path:u,index:s,params:{},payload:void 0,structureContext:f},s));return x.type==="document"&&x.id===I?[{panes:[...u.slice(0,u.length-1).map(_=>[{id:_}]),[{id:I,params:m,payload:y}]],depthIndex:u.length,levelIndex:h}]:(w=x.canHandleIntent)!=null&&w.call(x,l,c,{pane:x,index:s})||x.type==="documentList"&&x.schemaTypeName===P&&x.options.filter==="_type == $type"?[{panes:[...u.map(_=>[{id:_}]),[{id:c.id,params:m,payload:y}]],depthIndex:u.length,levelIndex:h}]:x.type==="list"&&x.child&&x.items?(await Promise.all(x.items.map((_,b)=>_.type==="divider"?Promise.resolve([]):n({currentId:_._id||_.id,flatIndex:s+1,intent:l,params:c,parent:x,path:[...u,_.id],payload:y,unresolvedPane:typeof x.child=="function"?Le(x,"child"):x.child,levelIndex:b,structureContext:f})))).flat():[]}const i=(await n({currentId:"root",flatIndex:0,levelIndex:0,intent:t.intent,params:t.params,parent:null,path:[],payload:t.payload,unresolvedPane:t.rootPaneNode,structureContext:t.structureContext})).sort((o,s)=>o.depthIndex===s.depthIndex?o.levelIndex-s.levelIndex:o.depthIndex-s.depthIndex)[0];return i?i.panes:r}const Tt=(t,e)=>{const a=t.replace(/^__edit__/,""),{params:r,payload:n,structureContext:{resolveDocumentNode:i}}=e,{type:o,template:s}=r;if(!o)throw new Error(`Document type for document with ID ${a} was not provided in the router params.`);let l=i({schemaType:o,documentId:a}).id("editor");return s&&(l=l.initialValueTemplate(s,n)),l.serialize()};function Ct(t){var e,a;return`contextHash(${JSON.stringify({id:t.id,parentId:parent&&ie(parent),path:t.path,index:t.index,splitIndex:t.splitIndex,serializeOptionsIndex:(e=t.serializeOptions)==null?void 0:e.index,serializeOptionsPath:(a=t.serializeOptions)==null?void 0:a.path})})`}const ve=t=>{const e={type:t.type,id:t.routerPaneSibling.id,params:t.routerPaneSibling.params||{},payload:t.routerPaneSibling.payload||null,flatIndex:t.flatIndex,groupIndex:t.groupIndex,siblingIndex:t.siblingIndex,path:t.path,paneNode:t.type==="resolvedMeta"?ie(t.paneNode):null};return`metaHash(${JSON.stringify(e)})`};function te({unresolvedPane:t,flattenedRouterPanes:e,parent:a,path:r,resolvePane:n,structureContext:i}){const[o,...s]=e,l=s[0],c={id:o.routerPaneSibling.id,splitIndex:o.siblingIndex,parent:a,path:[...r,o.routerPaneSibling.id],index:o.flatIndex,params:o.routerPaneSibling.params||{},payload:o.routerPaneSibling.payload,structureContext:i};try{return n(t,c,o.flatIndex).pipe(Ie(d=>{const u={type:"resolvedMeta",...o,paneNode:d,path:c.path},y=s.map((h,f)=>({type:"loading",path:[...c.path,...s.slice(f).map((I,P)=>`[${h.flatIndex+P}]`)],paneNode:null,...h}));if(!s.length)return ee([u]);let g;return l!=null&&l.routerPaneSibling.id.startsWith("__edit__")?g=te({unresolvedPane:Tt,flattenedRouterPanes:s,parent:a,path:c.path,resolvePane:n,structureContext:i}):o.groupIndex===(l==null?void 0:l.groupIndex)?g=te({unresolvedPane:t,flattenedRouterPanes:s,parent:a,path:r,resolvePane:n,structureContext:i}):g=te({unresolvedPane:typeof d.child=="function"?Le(d,"child"):d.child,flattenedRouterPanes:s,parent:d,path:c.path,resolvePane:n,structureContext:i}),gt(ee([u,...y]),g.pipe(G(h=>[u,...h])))}))}catch(d){if(d instanceof U&&(d.context&&console.warn(`Pane resolution error at index ${d.context.index}${d.context.splitIndex>0?` for split pane index ${d.context.splitIndex}`:""}: ${d.message}${d.helpId?` - see ${Te(d.helpId)}`:""}`,d),d.helpId==="structure-item-returned-no-child"))return ee([]);throw d}}function Dt({routerPanesStream:t,rootPaneNode:e,initialCacheState:a={cacheKeysByFlatIndex:[],flattenedRouterPanes:[],resolvedPaneCache:new Map,resolvePane:()=>ct},structureContext:r}){return t.pipe(G(n=>[[{id:"root"}],...n]),G(n=>n.flatMap((i,o)=>i.map((s,l)=>({routerPaneSibling:s,groupIndex:o,siblingIndex:l}))).map((i,o)=>({...i,flatIndex:o}))),it([]),_t(),G(([n,i])=>{for(let o=0;o<i.length;o++){const s=n[o],l=i[o];if(!pe(s,l))return{flattenedRouterPanes:i,diffIndex:o}}return{flattenedRouterPanes:i,diffIndex:i.length}}),_e((n,i)=>{const{cacheKeysByFlatIndex:o,resolvedPaneCache:s}=n,{flattenedRouterPanes:l,diffIndex:c}=i,d=o.slice(0,c+1),u=o.slice(c+1),y=new Set(d.flatMap(h=>Array.from(h))),g=u.flatMap(h=>Array.from(h)).filter(h=>!y.has(h));for(const h of g)s.delete(h);return{flattenedRouterPanes:l,cacheKeysByFlatIndex:o,resolvedPaneCache:s,resolvePane:De(h=>(f,I,P)=>{const m=f&&`${ie(f)}-${Ct(I)}`,x=m&&s.get(m);if(x)return x;const w=h(f,I,P);if(!m)return w;const _=o[P]||new Set;return _.add(m),o[P]=_,s.set(m,w),w})}},a),Ie(({flattenedRouterPanes:n,resolvePane:i})=>te({unresolvedPane:e,flattenedRouterPanes:n,parent:null,path:[],resolvePane:i,structureContext:r}))).pipe(_e((n,i)=>i.map((o,s)=>{const l=n[s];return!l||o.type!=="loading"?o:l.routerPaneSibling.id===o.routerPaneSibling.id?l:o}),[]),lt((n,i)=>{if(n.length!==i.length)return!1;for(let o=0;o<i.length;o++){const s=n[o],l=i[o];if(ve(s)!==ve(l))return!1}return!0}))}function Lt(){const t=E(6),[e]=v.useState(Nt);let a,r;t[0]!==e?(r=e.asObservable().pipe(G(zt)),t[0]=e,t[1]=r):r=t[1],a=r;const n=a,{state:i}=me();let o,s;return t[2]!==i||t[3]!==e?(o=()=>{e.next(i)},s=[i,e],t[2]=i,t[3]=e,t[4]=o,t[5]=s):(o=t[4],s=t[5]),v.useEffect(o,s),n}function zt(t){return(t==null?void 0:t.panes)||[]}function Nt(){return new qe(1)}function Ot(){const t=E(6),[e,a]=v.useState();if(e)throw e;const{structureContext:r,rootPaneNode:n}=ae();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={paneDataItems:[],resolvedPanes:[],routerPanes:[]},t[0]=i):i=t[0];const[o,s]=v.useState(i),l=Lt();let c,d;return t[1]!==n||t[2]!==l||t[3]!==r?(c=()=>{const u=Dt({rootPaneNode:n,routerPanesStream:l,structureContext:r}).pipe(G(Mt)).subscribe({next:y=>s(y),error:y=>a(y)});return()=>u.unsubscribe()},d=[n,l,r],t[1]=n,t[2]=l,t[3]=r,t[4]=c,t[5]=d):(c=t[4],d=t[5]),v.useEffect(c,d),o}function Mt(t){const e=t.reduce(Vt,[]),a=e.length,r=t.map(n=>{const{groupIndex:i,flatIndex:o,siblingIndex:s,routerPaneSibling:l,path:c}=n,d=l.id,u=e[i+1];return{active:i===a-2,childItemId:(u==null?void 0:u[0].id)??null,index:o,itemId:l.id,groupIndex:i,key:`${n.type==="loading"?"unknown":n.paneNode.id}-${d}-${s}`,pane:n.type==="loading"?Y:n.paneNode,params:l.params||{},path:c.join(";"),payload:l.payload,selected:o===t.length-1,siblingIndex:s}});return{paneDataItems:r,routerPanes:e,resolvedPanes:r.map(At)}}function At(t){return t.pane}function Vt(t,e){const a=t[e.groupIndex]||[];return a[e.siblingIndex]=e.routerPaneSibling,t[e.groupIndex]=a,t}async function Bt(t,e,a){if(e&&a)return{id:e,type:a};if(!e&&a)return{id:Qe(),type:a};if(e&&!a){const r=await ke(t.resolveTypeForDocument(e));return{id:e,type:r}}throw new U({message:"Neither document `id` or `type` was provided when trying to resolve intent."})}const Wt={},Kt=v.memo(function(){const t=E(7),{navigate:e}=me(),a=he(Ht),{rootPaneNode:r,structureContext:n}=ae(),i=Me(),[o,s]=v.useState(null);if(o)throw o;let l,c;return t[0]!==i||t[1]!==a||t[2]!==e||t[3]!==r||t[4]!==n?(l=()=>{if(a){const{intent:d,params:u,payload:y}=a;let g;return g=!1,async function(){const{id:h,type:f}=await Bt(i,typeof u.id=="string"?u.id:void 0,typeof u.type=="string"?u.type:void 0);if(g)return;const I=await kt({intent:d,params:{...u,id:h,type:f},payload:y,rootPaneNode:r,structureContext:n});g||e({panes:I},{replace:!0})}().catch(s),()=>{g=!0}}},c=[i,a,e,r,n],t[0]=i,t[1]=a,t[2]=e,t[3]=r,t[4]=n,t[5]=l,t[6]=c):(l=t[5],c=t[6]),v.useEffect(l,c),null});function Ht(t){const e=typeof t.intent=="string"?t.intent:void 0;return e?{intent:e,params:ge(t.params)?t.params:Wt,payload:t.payload}:void 0}const Ft=$e.span`
|
|
&:not(:last-child)::after {
|
|
content: ' ➝ ';
|
|
opacity: 0.5;
|
|
}
|
|
`;function Gt(t){return t.replace(/\(\.\.\.\)\./g,`(...)
|
|
.`).replace(/__WEBPACK_IMPORTED_MODULE_\d+_+/g,"").replace(/___default\./g,".").replace(new RegExp(` \\(https?:\\/\\/${window.location.host}`,"g")," (")}function Ut(t){const e=E(37),{error:a}=t;if(!(a instanceof U))throw a;const{cause:r}=a,{t:n}=se(oe),i=(r==null?void 0:r.stack)||a.stack,o=i&&!(r instanceof de)&&!a.message.includes("Module build failed:");let s;e[0]!==r?(s=r instanceof de?r.path:[],e[0]=r,e[1]=s):s=e[1];const l=s,c=r instanceof de&&r.helpId||a.helpId,d=Yt;let u;e[2]!==n?(u=n("structure-error.header.text"),e[2]=n,e[3]=u):u=e[3];let y;e[4]!==u?(y=p.jsx(dt,{as:"h2",children:u}),e[4]=u,e[5]=y):y=e[5];let g;e[6]!==l||e[7]!==n?(g=l.length>0&&p.jsxs(fe,{space:2,children:[p.jsx(N,{size:1,weight:"medium",children:n("structure-error.structure-path.label")}),p.jsx(Pe,{children:l.slice(1).map(Jt)})]}),e[6]=l,e[7]=n,e[8]=g):g=e[8];let h;e[9]!==n?(h=n("structure-error.error.label"),e[9]=n,e[10]=h):h=e[10];let f;e[11]!==h?(f=p.jsx(N,{size:1,weight:"medium",children:h}),e[11]=h,e[12]=f):f=e[12];let I;e[13]!==a.message||e[14]!==o||e[15]!==i?(I=o?Gt(i):a.message,e[13]=a.message,e[14]=o,e[15]=i,e[16]=I):I=e[16];let P;e[17]!==I?(P=p.jsx(Pe,{children:I}),e[17]=I,e[18]=P):P=e[18];let m;e[19]!==f||e[20]!==P?(m=p.jsxs(fe,{marginTop:4,space:2,children:[f,P]}),e[19]=f,e[20]=P,e[21]=m):m=e[21];let x;e[22]!==c||e[23]!==n?(x=c&&p.jsx(ne,{marginTop:4,children:p.jsx(N,{children:p.jsx("a",{href:Te(c),rel:"noopener noreferrer",target:"_blank",children:n("structure-error.docs-link.text")})})}),e[22]=c,e[23]=n,e[24]=x):x=e[24];let w;e[25]!==n?(w=n("structure-error.reload-button.text"),e[25]=n,e[26]=w):w=e[26];let _;e[27]!==w?(_=p.jsx(ne,{marginTop:4,children:p.jsx(ut,{text:w,icon:pt,tone:"primary",onClick:d})}),e[27]=w,e[28]=_):_=e[28];let b;e[29]!==x||e[30]!==_||e[31]!==g||e[32]!==m?(b=p.jsxs(re,{marginTop:4,padding:4,radius:2,overflow:"auto",shadow:1,tone:"inherit",children:[g,m,x,_]}),e[29]=x,e[30]=_,e[31]=g,e[32]=m,e[33]=b):b=e[33];let R;return e[34]!==b||e[35]!==y?(R=p.jsx(re,{height:"fill",overflow:"auto",padding:4,sizing:"border",tone:"critical",children:p.jsxs(Ce,{children:[y,b]})}),e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function Jt(t,e){return p.jsx(Ft,{children:t},`${t}-${e}`)}function Yt(){window.location.reload()}function qt(t){const e=E(14),{isSelected:a,pane:r,paneKey:n}=t;let i;e[0]!==r?(i=ge(r)&&r.type||null,e[0]=r,e[1]=i):i=e[1];const o=i,{t:s}=se(oe);let l;e[2]!==s?(l=s("panes.unknown-pane-type.title"),e[2]=s,e[3]=l):l=e[3];let c;e[4]!==l?(c=p.jsx(Xe,{title:l}),e[4]=l,e[5]=c):c=e[5];let d;e[6]!==s||e[7]!==o?(d=p.jsx(Ze,{children:p.jsx(ne,{padding:4,children:typeof o=="string"?p.jsx(N,{as:"p",muted:!0,children:p.jsx(we,{t:s,i18nKey:"panes.unknown-pane-type.unknown-type.text",values:{type:o}})}):p.jsx(N,{as:"p",muted:!0,children:p.jsx(we,{t:s,i18nKey:"panes.unknown-pane-type.missing-type.text"})})})}),e[6]=s,e[7]=o,e[8]=d):d=e[8];let u;return e[9]!==a||e[10]!==n||e[11]!==c||e[12]!==d?(u=p.jsxs(et,{id:n,selected:a,children:[c,d]}),e[9]=a,e[10]=n,e[11]=c,e[12]=d,e[13]=u):u=e[13],u}const Qt={component:v.lazy(()=>Z(()=>import("./index-B07hjxo-.js"),__vite__mapDeps([0,1]))),document:v.lazy(()=>Z(()=>import("./sanity-D34DDzzj.js").then(t=>t.av),[]).then(function(t){return t.pane})),documentList:v.lazy(()=>Z(()=>import("./sanity-D34DDzzj.js").then(t=>t.av),[]).then(function(t){return t.pane$1})),list:v.lazy(()=>Z(()=>import("./index2-BxbGLUws.js"),__vite__mapDeps([2,1])))},Xt=v.memo(function(t){const e=E(23),{active:a,childItemId:r,groupIndex:n,index:i,itemId:o,pane:s,paneKey:l,params:c,payload:d,path:u,selected:y,siblingIndex:g}=t,h=Qt[s.type]||qt;let f;e[0]!==l||e[1]!==u||e[2]!==y?(f=p.jsx(ye,{paneKey:l,path:u,selected:y}),e[0]=l,e[1]=u,e[2]=y,e[3]=f):f=e[3];const I=r||"";let P;e[4]!==h||e[5]!==a||e[6]!==i||e[7]!==o||e[8]!==s||e[9]!==l||e[10]!==y||e[11]!==I?(P=p.jsx(h,{childItemId:I,index:i,itemId:o,isActive:a,isSelected:y,paneKey:l,pane:s}),e[4]=h,e[5]=a,e[6]=i,e[7]=o,e[8]=s,e[9]=l,e[10]=y,e[11]=I,e[12]=P):P=e[12];let m;e[13]!==f||e[14]!==P?(m=p.jsx(v.Suspense,{fallback:f,children:P}),e[13]=f,e[14]=P,e[15]=m):m=e[15];let x;return e[16]!==n||e[17]!==i||e[18]!==c||e[19]!==d||e[20]!==g||e[21]!==m?(x=p.jsx(bt,{flatIndex:i,index:n,params:c,payload:d,siblingIndex:g,children:m}),e[16]=n,e[17]=i,e[18]=c,e[19]=d,e[20]=g,e[21]=m,e[22]=x):x=e[22],x},({params:t={},payload:e=null,...a},{params:r={},payload:n=null,...i})=>{if(!pe(t,r)||!pe(e,n))return!1;const o=new Set([...Object.keys(a),...Object.keys(i)]);for(const s of o)if(a[s]!==i[s])return!1;return!0});function Zt(){const t=E(17),{t:e}=se(oe);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=p.jsx(ne,{children:p.jsx(N,{size:1,children:p.jsx(ft,{})})}),t[0]=a):a=t[0];let r;t[1]!==e?(r=e("no-document-types-screen.title"),t[1]=e,t[2]=r):r=t[2];let n;t[3]!==r?(n=p.jsx(N,{as:"h1",size:1,weight:"medium",children:r}),t[3]=r,t[4]=n):n=t[4];let i;t[5]!==e?(i=e("no-document-types-screen.subtitle"),t[5]=e,t[6]=i):i=t[6];let o;t[7]!==i?(o=p.jsx(N,{as:"p",muted:!0,size:1,children:i}),t[7]=i,t[8]=o):o=t[8];let s;t[9]!==e?(s=e("no-document-types-screen.link-text"),t[9]=e,t[10]=s):s=t[10];let l;t[11]!==s?(l=p.jsx(N,{as:"p",muted:!0,size:1,children:p.jsx("a",{href:"https://www.sanity.io/docs/create-a-schema-and-configure-sanity-studio",target:"_blank",rel:"noreferrer",children:s})}),t[11]=s,t[12]=l):l=t[12];let c;return t[13]!==n||t[14]!==o||t[15]!==l?(c=p.jsx(re,{height:"fill",children:p.jsx(je,{align:"center",height:"fill",justify:"center",padding:4,sizing:"border",children:p.jsx(Ce,{width:0,children:p.jsx(re,{padding:4,radius:2,shadow:1,tone:"caution",children:p.jsxs(je,{children:[a,p.jsxs(fe,{flex:1,marginLeft:3,space:3,children:[n,o,l]})]})})})})}),t[13]=n,t[14]=o,t[15]=l,t[16]=c):c=t[16],c}const en=t=>{const e=E(7),{documentId:a,documentType:r}=t,n=mt(a,r),i=Ee(),{t:o}=se(oe),s=!(n!=null&&n.published)&&!(n!=null&&n.draft),l=(n==null?void 0:n.draft)||(n==null?void 0:n.published),c=i.get(r),{value:d,isLoading:u}=ht({enabled:!0,schemaType:c,value:l}),y=s?o("browser-document-title.new-document",{schemaType:(c==null?void 0:c.title)||(c==null?void 0:c.name)}):(d==null?void 0:d.title)||o("browser-document-title.untitled-document"),g=n.ready&&!u,h=ze(y);let f;e[0]!==h||e[1]!==g?(f=()=>{g&&(document.title=h)},e[0]=h,e[1]=g,e[2]=f):f=e[2];let I;return e[3]!==y||e[4]!==h||e[5]!==g?(I=[y,g,h],e[3]=y,e[4]=h,e[5]=g,e[6]=I):I=e[6],v.useEffect(f,I),null},ue=t=>{const e=E(5),{title:a}=t,r=ze(a);let n;e[0]!==r?(n=()=>{document.title=r},e[0]=r,e[1]=n):n=e[1];let i;return e[2]!==r||e[3]!==a?(i=[r,a],e[2]=r,e[3]=a,e[4]=i):i=e[4],v.useEffect(n,i),null},tn=t=>{const e=E(8),{resolvedPanes:a}=t;if(!(a!=null&&a.length))return null;const r=a[a.length-1];if(an(r)){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=p.jsx(ue,{}),e[0]=o):o=e[0],o}if(rn(r)){if(r!=null&&r.title){let s;return e[1]!==r.title?(s=p.jsx(ue,{title:r.title}),e[1]=r.title,e[2]=s):s=e[2],s}let o;return e[3]!==r.options.id||e[4]!==r.options.type?(o=p.jsx(en,{documentId:r.options.id,documentType:r.options.type}),e[3]=r.options.id,e[4]=r.options.type,e[5]=o):o=e[5],o}const n=r==null?void 0:r.title;let i;return e[6]!==n?(i=p.jsx(ue,{title:n}),e[6]=n,e[7]=i):i=e[7],i};function ze(t){const e=E(3),a=ae().structureContext.title;let r;return e[0]!==t||e[1]!==a?(r=[t,a].filter(nn),e[0]=t,e[1]=a,e[2]=r):r=e[2],r.join(" | ")}function nn(t){return t}function rn(t){return t!==Y&&t.type==="document"}function an(t){return t===Y}const sn=$e(tt)`
|
|
min-height: 100%;
|
|
min-width: 320px;
|
|
`,on=Ae("mod+s"),ln=v.memo(function(t){var J;const e=E(31),{onPaneChange:a}=t,{push:r}=Ve(),n=Ee(),{layoutCollapsed:i,setLayoutCollapsed:o}=ae(),{paneDataItems:s,resolvedPanes:l}=Ot(),c=he(cn),{sanity:d}=Be(),{media:u}=d,[y,g]=v.useState(null);let h;e[0]!==o?(h=()=>o(!0),e[0]=o,e[1]=h):h=e[1];const f=h;let I;e[2]!==o?(I=()=>o(!1),e[2]=o,e[3]=I):I=e[3];const P=I;let m,x;e[4]!==a||e[5]!==l?(m=()=>{l.length&&a(l)},x=[a,l],e[4]=a,e[5]=l,e[6]=m,e[7]=x):(m=e[6],x=e[7]),v.useEffect(m,x);let w,_;if(e[8]!==r?(w=()=>{const D=V=>{on(V)&&(V.preventDefault(),r({closable:!0,id:"auto-save-message",status:"info",title:"Your work is automatically saved!",duration:4e3}))};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},_=[r],e[8]=r,e[9]=w,e[10]=_):(w=e[9],_=e[10]),v.useEffect(w,_),!((J=n._original)!=null&&J.types.some(We))){let D;return e[11]===Symbol.for("react.memo_cache_sentinel")?(D=p.jsx(Zt,{}),e[11]=D):D=e[11],D}const b=y||null,R=i?void 0:"fill",M=u[1];let T;e[12]!==s?(T=s.map(dn),e[12]=s,e[13]=T):T=e[13];let L;e[14]!==c||e[15]!==s.length?(L=s.length<=1&&c&&p.jsx(ye,{paneKey:"intent-resolver"}),e[14]=c,e[15]=s.length,e[16]=L):L=e[16];let C;e[17]!==f||e[18]!==P||e[19]!==M||e[20]!==T||e[21]!==L||e[22]!==R?(C=p.jsxs(sn,{flex:1,height:R,minWidth:M,onCollapse:f,onExpand:P,children:[T,L]}),e[17]=f,e[18]=P,e[19]=M,e[20]=T,e[21]=L,e[22]=R,e[23]=C):C=e[23];let k;e[24]!==l?(k=p.jsx(tn,{resolvedPanes:l}),e[24]=l,e[25]=k):k=e[25];let z;e[26]===Symbol.for("react.memo_cache_sentinel")?(z=p.jsx("div",{"data-portal":"",ref:g}),e[26]=z):z=e[26];let O;return e[27]!==C||e[28]!==k||e[29]!==b?(O=p.jsxs(He,{element:b,children:[C,k,z]}),e[27]=C,e[28]=k,e[29]=b,e[30]=O):O=e[30],O});function cn(t){return typeof t.intent=="string"}function dn(t){const{active:e,childItemId:a,groupIndex:r,itemId:n,key:i,pane:o,index:s,params:l,path:c,payload:d,siblingIndex:u,selected:y}=t;return p.jsx(v.Fragment,{children:o===Y?p.jsx(ye,{paneKey:i,path:c,selected:y}):p.jsx(Xt,{active:e,groupIndex:r,index:s,pane:o,childItemId:a,itemId:n,paneKey:i,params:l,payload:d,path:c,selected:y,siblingIndex:u})},`${o===Y?"loading":o.type}-${s}`)}function mn(t){const e=E(14),{tool:a}=t,{options:r}=a,{unstable_sources:n}=Ke(),[i]=n;let o;e[0]!==r?(o=r||{},e[0]=r,e[1]=o):o=e[1];const{source:s,defaultDocumentNode:l,structure:c}=o;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[2]=d):d=e[2],v.useEffect(un,d);let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={error:null},e[3]=u):u=e[3];const[y,g]=v.useState(u),{error:h}=y;if(h){let w;return e[4]!==h?(w=p.jsx(Ut,{error:h}),e[4]=h,e[5]=w):w=e[5],w}const f=s||i.name;let I,P;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=p.jsx(ln,{onPaneChange:xe}),P=p.jsx(Kt,{}),e[6]=I,e[7]=P):(I=e[6],P=e[7]);let m;e[8]!==l||e[9]!==c?(m=p.jsxs(Fe,{defaultDocumentNode:l,structure:c,children:[I,P]}),e[8]=l,e[9]=c,e[10]=m):m=e[10];let x;return e[11]!==f||e[12]!==m?(x=p.jsx(Ge,{onCatch:g,children:p.jsx(Ue,{name:f,children:m})}),e[11]=f,e[12]=m,e[13]=x):x=e[13],x}function un(){return xe([]),pn}function pn(){return xe([])}export{mn as default};
|