1System.register(["@vp/swan","react/jsx-runtime","react"],(function(d){"use strict";var x,E,N,b,P,A,g,p,B,I,O,k,v,a,y,$,U,j,R,W,Y,H,K,S,_,F,u,n,C,l,G,V,T,D,m,q;return{setters:[function(e){x=e.Box,E=e.Popover,N=e.PopoverLauncher,b=e.Button,P=e.Icon,A=e.PopoverContent,g=e.getTokenCssVar,p=e.Card,B=e.Accordion,I=e.BasicCollapsible,O=e.Table,k=e.TableHead,v=e.TableRow,a=e.TableCell,y=e.TableBody,$=e.ModalDialog,U=e.ModalDialogContent,j=e.ModalDialogNav,R=e.ModalDialogCloseButton,W=e.ModalDialogHeader,Y=e.ModalDialogTitle,H=e.ModalDialogBody,K=e.BoundedContent,S=e.Ul,_=e.Li,F=e.Link,u=e.SWAN_STYLE_KEY_MAP},function(e){n=e.jsx,C=e.Fragment,l=e.jsxs},function(e){G=e.createContext,V=e.useContext,T=e.useState,D=e.useEffect,m=e.useId,q=e.default}],execute:(function(){const e=G(void 0),ge=d("ContentfulContextProvider",({children:t,space:o,environment:i})=>n(e.Provider,{value:{space:o,environment:i??"master"},children:t})),z=d("useContentfulContext",()=>{const t=V(e);return t===void 0&&console.warn("useContentfulContext must be used within a ContentfulContextProvider"),t}),te="showContentfulLinks",oe="debugPage";function J(t){return(t??window?.location?.search)?.includes(te)??!1}function le(t){return(t??window?.location?.search)?.includes(oe)??!1}function Z(t,o){return!t?.space||!t.environment?"":`https://app.contentful.com/spaces/${t.space}/environments/${t.environment}/entries/${o}`}function Q(t){return!t?.space||!t.environment?(console.warn("ContentfulContextProvider is missing"),!1):!0}function X(t){return!(!t?.contentful_id||!t.contentfulName)}const ie=d("ContentfulLink",({children:t,id:o,search:i})=>{const r=z(),s=Q(r)&&X({contentful_id:o,contentfulName:"NOT_USED"})?Z(r,o):void 0,[h,M]=T(!1);return D(()=>{J(i)&&s?M(!0):M(!1)},[s,i]),h?l(x,{children:[l(E,{style:{left:g("SwanSemSpace5"),top:g("SwanSemSpace5"),zIndex:g("SwanSemZIndexOverTheTop")},children:[n(N,{children:n(b,{children:n(P,{src:re})})}),n(A,{children:n("a",{href:s,target:"_blank",rel:"noreferrer",children:"Go to contentful entry"})})]}),t]}):n(C,{children:t})}),re="https://cms.cloudinary.vpsvc.com/image/upload/c_scale,w_24/v1726830243/page_icons/logos/contentful.png",ce=({search:t,discardedCandidates:o})=>{const i=m();return o.length===0?null:n(p,{children:n(B,{children:n(I,{heading:`${o.length} MCS discarded entries`,collapsibleId:i,headingLevel:"h3",children:l(O,{children:[n(k,{children:l(v,{children:[n(a,{children:"Contentful name"}),n(a,{children:"Contentful id"}),n(a,{children:"Context variant discarded reason"}),n(a,{style:{width:"10%"},children:"Details"})]})}),n(y,{children:o.map((r,f)=>l(v,{children:[n(a,{textAlign:"left",children:r.contentfulName}),n(a,{textAlign:"center",children:n(ie,{id:r.contentfulId,search:t,children:r.contentfulId})}),n(a,{textAlign:"center",children:se(r.reason)}),n(a,{textAlign:"center",children:n(ae,{details:r.details})})]},`${r.contentfulId}-${r.reason}-${f}`))})]})})})})};function ae({details:t}){const[o,i]=q.useState(!1);return!t||Object.keys(t).length===0?n("span",{children:"No details"}):l(C,{children:[n(b,{onClick:()=>i(!0),children:"Show details"}),n($,{isOpen:o,bodyWidth:"grow",onRequestDismiss:()=>i(!1),children:l(U,{children:[n(j,{children:n(R,{})}),n(W,{children:n(Y,{children:"Details"})}),n(H,{children:n("pre",{style:{textAlign:"left",whiteSpace:"pre",overflow:"auto",minWidth:"150px"},children:JSON.stringify(t,null,2)})})]})})]})}function se(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())}const Ce=d("DebugSection",({contentfulMetadata:t,availability:o,entries:i,children:r,explanation:f,search:s})=>{const h=z(),ee=(i&&i.length>0?i:t&&o?[{contentfulMetadata:t,availability:o}]:[]).filter(c=>Q(h)&&X(c.contentfulMetadata)),[ne,ue]=T(!1);D(()=>{ue(J(s)||le(s))},[s]);const fe=ne&&ee.length>0;if(!ne)return n(C,{children:r});const de=c=>{const w=Object.keys(c||{});return n(S,{children:w.map((L,he)=>c[L]?l(_,{children:[L,": ",c[L]]},`li_${he}`):null)})};return l(K,{my:4,children:[fe&&l(p,{bgc:"accent",children:[n("h2",{children:"Debug information"}),n(S,{children:ee.map((c,w)=>l(_,{children:["Contentful Link:",h&&l(F,{href:Z(h,c.contentfulMetadata.contentful_id),children:[c.contentfulMetadata.contentfulName,"
1(id:"," ",c.contentfulMetadata.contentful_id,")"]}),n("br",{}),"availability:",de(c.availability)]},`entry_${c.contentfulMetadata.contentful_id}_${w}`))})]}),f?.discarded&&f.discarded.length>0&&n(ce,{discardedCandidates:f.discarded,search:s})]})}),be=d("MCS_REACT_TOOLS_SWAN_STYLES",[u.accordion,u.button,u.modalDialog,u.popover,u.table])})}})); 2//# sourceMappingURL=mcs-react-tools.js.map
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.