PageSourceSearch

https://mergemansion.com/_next/static/chunks/pages/sanity-studio/[[...slug]]-738ac791613903c9.js

js mergemansion.com collected 2026-10-02 15:18:59 UTC 102,573 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4593],{88507:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/sanity-studio/[[...slug]]",function(){return n(95301)}])},95301:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Mo},sanityStudioPath:function(){return Ao}});var i=n(52322),l=n(2784),a=n(97729),o=n.n(a),r=n(73235),s=n(97841),c=n(76271),u=n(42718),d=n(50280),p=n(10984),m=n(82731),f=n(65186);function g(){const e=(0,r._)(["\n  display: grid;\n  grid-auto-flow: column;\n  grid-auto-columns: max-content;\n  justify-content: start;\n  width: fit-content;\n  gap: 0.5rem;\n"]);return g=function(){return e},e}function h(){const e=(0,r._)(["\n  display: grid;\n  grid-auto-flow: column;\n  place-items: center;\n  gap: 0.75em;\n  padding: 0.2em 1.25em;\n  transition: 200ms;\n  background: ",";\n  color: ",";\n  cursor: pointer;\n  width: fit-content;\n  border-radius: 2px;\n  font-size: 12px;\n  font-weight: 500;\n"]);return h=function(){return e},e}const y=m.ZP.div(g()),v=m.ZP.button(h(),(e=>{let{active:t}=e;return t?"#2276fc":"#fafafa"}),(e=>{let{active:t}=e;return t?"#fff":"#222"}));var b=e=>{const{onChange:t,schemaType:n,value:a}=e,o=(0,l.useMemo)((()=>{var t;return(null===(t=e.schemaType.options)||void 0===t?void 0:t.locales)||p.k1}),[e.schemaType.options]),r=(0,l.useMemo)((()=>o.reduce(((e,t)=>({...e,[t.id]:!0})),{})),[o]),c=(0,l.useMemo)((()=>a||r),[a,r]),u=(0,l.useCallback)((e=>{t([(0,s.CbY)({_type:n.name}),(0,s.t8m)(e)])}),[t,n]),d=(0,l.useCallback)((e=>{const t={...c,[e.id]:!c[e.id]};u(t)}),[c,u]);return(0,i.jsx)(y,{children:p.k1.map((e=>{const t=c[e.id];return(0,i.jsxs)(v,{active:t,onClick:()=>d(e),children:[e.title,t?(0,i.jsx)(f.vB0,{}):(0,i.jsx)(f.h36,{})]},e.id)}))})};const w=(0,s.Cw0)({name:"locales",schema:{types:[{name:"locales",title:"Locale selector",type:"object",components:{input:b},options:{collapsible:!1},fields:p.k1.map((e=>{let{title:t,id:n}=e;return{type:"boolean",name:n,title:t}}))}]}});var x=n(26362);const k=e=>{const t=t=>{let{fieldPath:n,root:i,unlocalize:l}=t;const{localize:a,hidden:o,readOnly:r,...s}=e,c=s.name&&!i?[...n,s.name]:n,u={...s,fieldPath:c},d=location.search.includes("debugHidden");if("undefined"!==typeof o)if(d)u.hidden=!1;else if(Array.isArray(o)){const e=e=>o.some((t=>t(e)));u.hidden=e}else u.hidden=o;if("undefined"!==typeof r&&(u.readOnly=!d&&r),a&&!l)return z(u);["fields","of"].forEach((e=>{if(u[e]){const t=u[e].filter((e=>Boolean(e)));t.some((e=>"function"!==typeof e&&"block"===e.type))||(u[e]=t.map((e=>{if("function"===typeof e){const t=e({fieldPath:c,unlocalize:l});return"object"===u.type&&t.required&&(u.required=!0),t}if("object"===typeof e&&Object.keys(e).every((e=>"type"===e)))return e;throw console.log("Debug _fieldFn:",{field:u,_fieldFn:e}),Error('Something went wrong when trying to add paths! _fieldFn is not a function, its "'.concat(typeof e,'"\nField path: ').concat(u.fieldPath.join("."),"\n\n"))})))}}));return{validation:e=>e.custom(I(u)),...u}};return t.props=e,t},z=e=>{const{name:t,title:n,type:i,hidden:l,fieldPath:a,...o}=e;return k({localize:!1,name:t,title:n,type:"object",hidden:l,fieldPath:a,options:{collapsible:!1,collapsed:!1},fields:p.k1.map((e=>{const n=e.id;if(a.includes(n))throw{message:"Duplicate locale found!",fieldPath:a.join(".")};const l=[...a,n],r="locales"===t;return k({localize:!1,localeId:n,type:i,name:n,title:e.title,fieldPath:l,hidden:C({fieldPath:l,localeId:n,isLocalesControl:r}),...o})}))})({fieldPath:a,root:!0})},I=e=>{let{localeId:t,title:n,required:i,match:l,validationFn:a,min:o}=e;return(e,r)=>{const{path:s,document:c}=r;if(t){const{active:e}=T({path:s,document:c,localeId:t});if(!e)return!0}if(!e)return!i||"".concat("",'Field "').concat(n,'" is required!');if(l){if("object"!==typeof e){return l.test(e)||"".concat("","Value must match a pattern!")}try{const t=JSON.stringify(e);return l.test(t)||"".concat("","Value must match a pattern!")}catch(u){return"".concat("","Something went wrong while trying to match a pattern!")}}if(a)return a(e);if(o){if("number"===typeof e&&e<o)return"Value is too low!";if(Array.isArray(e)&&e.length<o)return"Additional items needed!"}return!0}},C=e=>{let{fieldPath:t,localeId:n,isLocalesControl:i}=e;return e=>{let{document:l}=e;if(i)return!1;const{active:a}=T({fieldPath:t,document:l,localeId:n}
1);return!a}},T=e=>{let{path:t=[],fieldPath:n=[],document:i,localeId:l}=e;return!1===S({document:i,localeId:l})?{active:!1,path:[]}:t.reduce(((e,t)=>{if(!e.active)return e;e.path.push(t);const n=e.path.reduce(((e,t)=>{if(!e)return null;if("string"===typeof t||"number"===typeof t)return e[t];if(Array.isArray(t))throw Error("IndexTuple path segment is not implemented!");if(t._key&&Array.isArray(e))return e.find((e=>e._key===t._key));throw Error("Path could not be found!")}),i);return n?(n.locales&&(e.active=n.locales[l]),e):e}),{path:[],active:!0})},S=e=>{let{document:t,localeId:n}=e;return!(null===t||void 0===t?void 0:t.locales)||t.locales[n]},j=e=>{let{unlocalize:t=!1,...n}=e;try{const e=k({type:"document",localize:!1,...n});return e({fieldPath:[],root:!0,unlocalize:t})}catch(i){if(delete n.fields,null===i||void 0===i?void 0:i.message){const{message:e,...t}=i;console.error(e,t)}else console.error(i);const e=k({type:"document",localize:!1,fields:[],...n})({fieldPath:[],root:!0,unlocalize:t});return(0,x.f)("Document schema for: "+n.title,e),e}};var N=n(76367);function _(e){let{addLocales:t,select:n,...i}=e;const l=p.xi.reduce(((e,t)=>({...e,[t]:t})),{});return{select:n.reduce(((e,t)=>({...e,[t]:t})),t?l:{}),prepare:e=>({title:B(i.title,e,!0),subtitle:B(i.subtitle,e,!0),media:B(i.media,e)})}}function B(e,t,n){if(!e)return null;if("string"===typeof e){const{key:i,parserFunction:l}=function(e){try{if(!e.includes("|"))return{key:e};const[t,n]=e.split(/\s?\|\s?/g).map((e=>e.trim()));if(!n)return{key:t};return{key:t,parserFunctionKey:n,parserFunction:A[n]||null}}catch(t){return{key:e}}}(e),{id:a}=(0,p.aj)(),o=function(e,n){return t[e]?P({selection:t[e]}):t[n]&&t[n][e]?t[n][e]:P({selection:t,key:e})}(i,a);return l?l(o):"object"===typeof o?n&&o.asset?o.asset:null:o}return"function"===typeof e?e(t):null}const A={capitalizeWords:N.Ls};function P(e){let{selection:t,locale:n=(0,p.aj)(),previousLocales:i=[],key:l}=e;const{id:a}=(0,p.aj)();if("object"===typeof t)try{if(Array.isArray(t)&&P({selection:t[0],locale:n,key:l}),!Object.keys(t).some((e=>p.xi.includes(e))))return t;const e=t[a];if(!e){const e=[...i,n],[a]=p.k1.filter((t=>!e.includes(t)));return a?P({selection:t,locale:a,previousLocales:e,key:l}):"Unnamed"}return l?e[l]:e}catch(o){return console.warn("Invalid preview locale!",o),"Invalid preview locale!"}return t}const M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Title",name:"title",type:"string",...e})},E=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Date",name:"date",type:"date",...e})},L=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Asset Position",name:"assetPosition",type:"boolean",...e})},V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Display Name",name:"displayName",type:"string",...e})};var D=n(71950);const F=[D.B.stepByStep,D.B.image,D.B.video,D.B.iframe],O=[{value:D.B.stepByStep,title:"Step by step"},{value:D.B.image,title:"Image"},{value:D.B.video,title:"Video"},{value:D.B.iframe,title:"IFrame"}],q=e=>{let{types:t,...n}=e;const i=O.filter((e=>t.includes(e.value))),l=1===t.length?t[0]:D.B.image;return k({localize:!1,title:"Entry Type",name:"type",type:"string",initialValue:l,options:{layout:"dropdown",list:i},...n})},R=[{value:"default",title:"Default"},{value:"desktop",title:"Desktop"},{value:"mobile",title:"Mobile"},{value:"mediumMobile",title:"Mobile Medium"}],Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Target",name:"targetName",type:"string",options:{layout:"dropdown",list:R},...e})},H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Alternative text (alt text)",name:"alt",type:"text",rows:1,...e})};var J=n(63420);const G={required:!1,maxFileSize:612e4},U=e=>{let{title:t,name:n,description:i,disableAltText:l,hidden:a,localize:o,...r}=e;const s=[];l||s.push(H());const u={title:t,name:n,description:i,type:"image",hidden:a,fields:s,icon:f.e0s,validation:e=>e.custom((async e=>{const{required:t,formats:n,maxFileSize:i}={...G,...r};if(!e||!e.asset)return!t||"Image is required";try{const t=(0,J.RT)(c.N.sanity),[l]=await t.fetch('*[_id == "'.concat(e.asset._ref,'"]'));if(!l)return!0;
1if(!RegExp("image/*").test(l.mimeType))return"File is not an image";if(n&&n.length){const e=n.join("|").replace(/[+/\\]/g,(e=>"\\".concat(e)));if(!RegExp(e).test(l.mimeType))return"File is not right format! Valid formats are: ".concat(n.join(", ")," and current one is ").concat(l.mimeType)}return!(l.size>i)||"File is too big (".concat($(l.size),"). Max file size is ").concat($(i),".")}catch(l){return console.log(l),"invalid image"}}))};return k({...u,localize:o})};function $(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";const n=1024,i=t<0?0:t,l=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,a)).toFixed(i))+" "+l[a]}const W=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U({localize:!1,title:"Image",name:"image",disableAltText:!0,hidden:e=>{let{parent:t}=e;return(null===t||void 0===t?void 0:t.type)!==D.B.image},...e})},Y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Video File",name:"video",type:"object",hidden:e=>{let{parent:t}=e;return(null===t||void 0===t?void 0:t.type)!==D.B.video},fields:[X(),Q({hidden:e=>{let{parent:t}=e;return!(null===t||void 0===t?void 0:t.h264)}}),K({hidden:e=>{let{parent:t}=e;return!(null===t||void 0===t?void 0:t.h264)}})],...e})},X=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Primary Video File",description:"Select a video encoded with h264. Supported by all major browsers.",name:"h264",type:"file",options:{accept:"video/*"},...e})},Q=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Optional: h265 Encoded Video File",description:"Select a video encoded with h265/HEVC. Supported by everyone except for Firefox. Way more efficient than h264.",name:"h265",type:"file",options:{accept:"video/*"},...e})},K=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Optional: AV1 Encoded Video File",description:"Select a video encoded with AV1. Partially supported by Firefox and Chrome. Not supported by Safari (yet). More efficient than h264 and h265.",name:"av1",type:"file",options:{accept:"video/*"},...e})},ee=[D.B.video],te=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Autoplay",name:"autoplay",type:"boolean",options:{layout:"checkbox"},hidden:e=>{let{parent:t}=e;return!ee.includes(null===t||void 0===t?void 0:t.type)},...e})},ne=[D.B.video],ie=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U({localize:!1,title:"Poster image",name:"posterImage",description:"Image which will be shown as poster when video (or other asset) is loading or a video cannot be played.",disableAltText:!0,hidden:e=>{let{parent:t}=e;return!ne.includes(null===t||void 0===t?void 0:t.type)},...e})},le=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Iframe URL / Code",name:"iframe",type:"text",rows:1,hidden:e=>{let{parent:t}=e;return(null===t||void 0===t?void 0:t.type)!==D.B.iframe},...e})};var ae=n(13663);const oe=[ae.BX.image],re=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Alt Text",name:"alt",type:"string",hidden:e=>{let{parent:t}=e;return!oe.includes(null===t||void 0===t?void 0:t.type)},...e})},se=e=>{let{types:t,askTarget:n=!1,...i}=e;return k({localize:!1,title:"Step Image",name:"entry",type:"object",preview:_({select:["displayName","type","image"],title:"displayName",subtitle:e=>{let{type:t}=e;return t?"Type: ".concat(t):null},media:"image"}),fields:[V(),q({types:t}),W({hidden:!1})],...i})},ce=e=>{let{types:t,askTarget:n,...i}=e;return k({localize:!1,title:"Step by step entries",name:"stepBystepEntries",type:"array",hidden:e=>{let{parent:t}=e;return(null===t||void 0===t?void 0:t.type)!==D.B.stepByStep},of:[se({types:t,askTarget:!1})],...i})},ue=e=>{let{types:t,askTarget:n=!0,...i}=e;return k({localize:!1,title:"Item",name:"entry",type:"object",preview:_({select:["dis
1playName","type","image"],title:"displayName",subtitle:e=>{let{type:t}=e;return t?"Type: ".concat(t):null},media:"image"}),fields:[V(),n&&Z(),q({types:t}),W(),Y(),le(),ce({askTarget:!1,types:[D.B.image]}),re(),ie(),te()],...i})},de=e=>{let{types:t,askTarget:n,...i}=e;return k({localize:!1,title:"Entries",name:"entries",type:"array",of:[ue({types:t,askTarget:n})],...i})},pe=function(){let{askForPosition:e,types:t=F,askTarget:n=!0,...i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Asset",name:"asset",type:"object",fields:[e&&L(),de({types:t,askTarget:n})],...i})},me=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Class Names",name:"classNames",type:"array",of:[{type:"string"}],options:{layout:"tags"},...e})},fe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Anchor to",name:"anchorTo",type:"string",description:"Scroll to predefined anchor on the page",hidden:e=>{let{parent:t}=e;return!(!t||!t.href)&&/[#@]|^tel:|^http|^\/\//g.test(t.href)},...e})},ge=e=>!!e&&("object"!==typeof e||Object.keys(e).length>0),he=e=>{let{allowTypes:t,pattern:n}=e;return e=>{const i=t||["email","external","internal","tel"];return e.custom((e=>{if("string"!==typeof e)return!0;if(n){const t=n instanceof RegExp?n:new RegExp(n);t.lastIndex=0;if(!t.test(e))return"Value does not match the required pattern!"}const t=1===i.length;return i.reduce(((n,i)=>{if("email"===i){if(/.+@.+\..+/gi.test(e))return null;if(n&&t)return"Value is not a valid email address!"}if("tel"===i){if(/\+[\d\s]{6,20}/gi.test(e))return null;if(n&&t)return"Value is not a valid phone number!"}if("external"===i){if(/https?:\/\/(www\.)?.+/gi.test(e))return null;if(n&&t)return"Value is not a valid external link!"}if("internal"===i){if(/^[#/].*/gi.test(e))return null;if(n&&t)return"Value is not a valid internal link!"}return n}),"Value is invalid")||!0}))}},ye=function(){let{allowTypes:e,pattern:t,...n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const l=1===(null===e||void 0===e?void 0:e.length)&&e.includes("external");return k({localize:!0,title:"Href / URL",name:"href",type:l?"url":"string",validation:he({allowTypes:e,pattern:t}),hidden:e=>{let{value:t,parent:n}=e;if(t)return!1;if(n&&(["link","button"].includes(n._type)||n.reference)){if(ge(n.reference))return!0;if(i)return!1;if(!n.categoryType)return!0;if("category"===n.categoryType)return!0}return!1},...n})},ve=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"ID",name:"id",type:"string",description:"Id should always be unique!",...e})},be=p.As.map((e=>({type:e.contentType}))),we=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return k({localize:!0,title:"Reference existing page",name:"reference",type:"reference",to:[{type:"modal"},...be],hidden:e=>{let{parent:n}=e;if(n&&(["link","button"].includes(n._type)||n.href)){if(ge(n.href))return!0;if(t)return!1;if(!n.categoryType)return!0;if("category"===n.categoryType)return!0}return!1},...e})},xe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Text",name:"text",type:"string",...e})},ke=function(){let{allowDisplayName:e=!0,allowText:t=!0,allowHref:n=!0,allowReference:i=!0,allowAnchorTo:l=!0,allowId:a=!0,allowClassNames:o=!1,text:r,href:s,reference:c,...u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Link",name:"link",type:"object",fields:[e&&V(),t&&xe(r),i&&we(c),n&&ye(s),l&&fe(),a&&ve(),o&&me()],...u})},ze=()=>k({localize:!1,title:"Reference",name:"categoriesReference",type:"reference",to:[{type:"category"}]}),Ie=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Categories",name:"categories",description:"Only the first category will be visible at the top of an article if multiple categories are assigned to an article.",type:"array",of:[ze()],...e})},Ce=j({unlocalize:!0,title:"Merge Mansion: External media",name:"externalMedia",icon:f.TyN,preview:_({select:["title"],title:"title"}),fields:[M(),E(),pe({name:"thumbnail",title:"News thumbnail",requried:!0,description:"The thumbnail image for the news article."}),Ie(),ke({title:"External media link",allowDisplayName:!1,allowId:!1,allowText:!1})]}),Te=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,required:!0,title:"Meta Title",name:"metaTitle",type:"string",description:"Title for page. Visible in tabs, search results and when sharing. Recommended length is 60 characters.",...e})},Se=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U({localize:!1,required:!0,title:"Meta Image",name:"metaImage",description:"Preview image for page. Visible when sharing",...e})},je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,required:!0,title:"Meta Description",name:"metaDescription",type:"text",rows:3,description:"Description for page. Visible in search results and when sharing. Recommended length is 150 characters.",...e})},Ne=e=>{if(!e)return"";if("object"===typeof e){if(Array.isArray(e))return"";const t=e[p.al.id];if(t)return Ne(t);const n=p.k1.find((t=>e[t.id])),i=e[n.id];
1return i?Ne(i):(console.log("Could not slugify object!"),"")}return e.toLowerCase().replace(/\s+|_/g,"-").replace(/^\//g,"").replace(/-?\/-?/g,"/").replace(/\\/g,"/").replace(/[^\w/-]/g,"")},_e=e=>(t,n)=>{if(!e)return!0;const{document:i}=n,l=i._id.replace(/^drafts\./,"").replace(/-\w\w$/,""),a=p.k1.flatMap((e=>["".concat(l,"-").concat(e.id),"drafts.".concat(l,"-").concat(e.id)])),o={ids:[l,"drafts.".concat(l),...a],slug:t,type:e};return(0,J.RT)(c.N.sanity).fetch("!defined(*[!(_id in $ids) && slug.current == $slug && _type == $type ][0]._id)",o)},Be=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{source:t,slugify:n,type:i,...l}=e;return k({localize:!1,title:"Slug",name:"slug",type:"slug",options:{source:t||"displayName",slugify:n||Ne,isUnique:_e(i)},validationFn:e=>{if(!e)return"No slug!";const{current:t}=e;if(!/^(\w|\d|\*).*/.test(t))return"Slug must start with a letter! Remove slash, space or any other special characters from the start!";if(RegExp("^(".concat(p.xi.join("/|"),"/)")).test(t))return"Slug can't start with a locale (".concat(p.xi.join(", "),") since localization is automated! ");return!/[\s\xe4\xf6\xe5:.,#?\\%]/.test(t)||"Slug has invalid charecters! Remove spaces, \xe4, \xf6, \xe5 and other uncommon charecters from the slug!"},...l})};var Ae=n(68965);const Pe={title:"Bold",value:"strong"},Me={title:"Italics",value:"em"},Ee=e=>e({fieldPath:[],root:!0,unlocalize:!0}),Le={name:"textColor",type:"object",title:"Text Color",icon:f.U8L,fields:[{name:"color",type:"string",title:"Color value (hex or rgb)"}]};n(86236);const Ve=Ee(ke({icon:f.$l_})),De=Ee(k({localize:!1,title:"Custom CSS",name:"css",type:"object",icon:f.i46,fields:[function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Custom CSS",name:"cssJson",type:"text",rows:6,...e})}()]}));function Fe(){const e=(0,r._)([""]);return Fe=function(){return e},e}function Oe(){const e=(0,r._)([""]);return Oe=function(){return e},e}const qe=m.ZP.span(Fe()),Re=(0,m.ZP)(qe)(Oe()),Ze={title:"Bullet",value:"bullet",icon:f.f_H,component:e=>{let{children:t}=e;return(0,i.jsx)(qe,{children:t})}},He={title:"Numbered",value:"number",icon:f.C4F,component:e=>{let{children:t}=e;return(0,i.jsx)(Re,{children:t})}},Je=[{title:"Horizontal Line",value:"line"},{title:"Gap",value:"gap"}],Ge=[{title:"Small",value:"small"},{title:"Regular",value:"regular"},{title:"Large",value:"large"}];function Ue(e,t){const n=t.find((t=>t.value===e));return n?n.title:"Unknown"}const $e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U({localize:!1,name:"svg",title:"Svg Image",description:"SVG",type:"image",formats:["svg+xml"],...e})},We=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return $e({title:"Icon SVG",name:"reference",disableAltText:!0,...e})},Ye=[{value:"after",title:"After"},{value:"before",title:"Before"}],Xe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Icon Position",name:"position",type:"string",initialValue:"after",options:{layout:"dropdown",list:Ye},...e})},Qe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Icon",name:"icon",type:"object",fields:[We(),Xe()],...e})},Ke=[{title:"Solid",value:"solid",default:!0},{title:"Outlined",value:"outlined"},{title:"Underlined",value:"underlined"},{title:"Ghost",value:"ghost"}],et=function(){let{variants:e=Ke,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Ke.find((e=>e.default||"default"===e.value)),i=n?n.value:Ke[0].value;return k({localize:!1,title:"Style",name:"variant",type:"string",initialValue:i,options:{layout:"dropdown",list:e},...t})},tt=[{value:"auto",title:"Auto"},{value:"blue",title:"Blue"},{value:"red",title:"Red"},{value:"green",title:"Green"}],nt=function(){let{themes:e=tt,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Color",name:"theme",type:"string",initialValue:"auto",options:{layout:"dropdown",list:tt},...t})},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Geoip & platform restricted",name:"webshopOnly",type:"boolean",initialValue:!1,...e})},lt=function(){let{changeVariant:e=!0,changeTheme:t=!0,allowIcon:n=!1,variants:i,themes:l,...a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{props:{fields:o,...r}}=ke(a);return k({...r,name:"button",title:"Button",fields:[...o,e&&et({variants:i}),t&&nt({themes:l}),n&&Qe(),it()],...a})},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Iframe Source (link)",name:"iframeSrc",type:"string",placeholder:"Iframe Source (link)",...e})},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Image Caption",name:"imageCaption",type:"text",rows:3,...e})},rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Force image width",description:"Will attempt to force the width of an embedded image. Example: '160px' - don't forget the unit.",name:"imageWidth",type:"string",...e})},st=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Inline Quote Body",name:"inlineQuoteBody",type:"text",rows:3,...e})},ct=[{value:"regular",title:"Regular"},{value:"large",title:"Large"}],ut=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Quote Width",name:"quoteWidth",type:"string",initialValue:"regular",options:{layout:"dropdown",list:ct},...e})},dt=Ee(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Inline Quote",name:"inlineQuote",type:"object",fields:[st(),ut()],preview:{select:{title:"inlineQuoteBody",subtitle:"inlineQuoteAuthor"}},...e})}()),pt=Ee(k({localize:!1,type:"object",name:"storeButtons",title:"Store Buttons",icon:f.gms,fields:[V(),ve()]})),mt=[Ze,He],ft=[Ze,He],gt=[],ht=[Pe,Me,{title:"Underline",value:"underline"}],yt=[Ve,Le,De],vt=Ee(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Image",name:"embeddedImage",type:"image",icon:f.e0s,fields:[ot(),H(),rt()],...e})}()),bt=Ee(lt()),wt=Ee(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{localizeSrc:t,...n}=e,i=void 0===t||t;return k({localize:!1,title:"Embedded",name:"embedded",type:"object",description:"Youtube iFrame url: https://www.youtube.com/embed/YOUR_VIDEO_ID",icon:f.P4G,fields:[at({localize:i})],...n})}()),xt=Ee(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,name:"break",type:"object",title:"Break",icon:f.KSY,preview:_({select:["type","margin"],title:e=>{let{type:t}=e;return Ue(t,Je)},subtitle:e=>{let{margin:t}=e;return Ue(t,Ge)}}),fields:[k({localize:!1,title:"Type",name:"type",type:"string",initialValue:"line",options:{list:Je}}),k({localize:!1,title:"Margin",name:"margin",type:"string",initialValue:"regular",options:{list:Ge}})],...e})}()),kt=[dt,xt,wt,bt,vt,pt],zt=[vt,bt,wt,xt],It=[bt],Ct=[{type:"block",styles:[...Ae.Vu,...Ae.qY],lists:mt,marks:{decorators:[...ht],annotations:[...yt]}},...kt],Tt=(Ae.Vu,Ae.Ow,Ae.Vu,Ae.$X,[{type:"block",styles:[...Ae.Vu],lists:gt,marks:{decorators:[...ht],annotations:[...yt]}}
1,...It]),St=[{type:"block",styles:[Ae.iN,...Ae.im],lists:[],marks:{decorators:[Pe],annotations:[...yt]}},...It],jt=[{type:"block",styles:[Ae.iN],lists:gt,marks:{decorators:[Pe,Me],annotations:[...yt]}},...It],Nt=[{type:"block",styles:[Ae.iN,...Ae.qY],lists:[],marks:{decorators:[Pe]}}],_t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{options:t,...n}=e;return k({localize:!0,title:"Body",name:"body",type:"array",of:t||Ct,...n})};var Bt=n(13805),At=n(37164);function Pt(){const e=(0,r._)(["\n  display: grid;\n  gap: 12px;\n  justify-items: start;\n"]);return Pt=function(){return e},e}function Mt(){const e=(0,r._)(["\n  display: grid;\n  grid-template-columns: ",";\n  gap: 12px;\n  width: 100%;\n"]);return Mt=function(){return e},e}const Et=m.ZP.div(Pt()),Lt=m.ZP.div(Mt(),(e=>{let{allowElementEdit:t,allowSizeEdit:n}=e;return t&&n?"max-content max-content 1fr":t||n?"max-content 1fr":"1fr"})),Vt=e=>{const[t,n]=(0,l.useState)(!1),[a,o]=(0,l.useState)(!1),{onChange:r,schemaType:c,value:u}=e,d=(0,l.useCallback)((e=>{r([(0,s.CbY)({_type:c.name}),(0,s.t8m)(e)])}),[r,c]),p=(0,l.useCallback)((()=>{r([(0,s.zNf)()])}),[r]),{preHeading:m,mainHeading:g,subHeading:h}=(0,l.useMemo)((()=>{const e=u;return{preHeading:Ot({values:e,type:"pre"}),mainHeading:Ot({values:e,type:"main"}),subHeading:Ot({values:e,type:"sub"})}}),[u]),y=(0,l.useCallback)((e=>n=>{const i=[];t&&("preHeading"===e?n&&i.push(n):m&&i.push(m)),"mainHeading"===e?n&&i.push(n):g&&i.push(g),a&&("subHeading"===e?n&&i.push(n):h&&i.push(h)),i.length>0?d(i):p()}),[t,a,p,d,g,m,h]),{allowElementEdit:v=!0,allowSizeEdit:b=!1}=e.schemaType.options;return(0,i.jsxs)(Et,{children:[t||m?(0,i.jsx)(Dt,{type:"pre",allowParagraph:!0,value:m,handleChange:y("preHeading"),allowElementEdit:v}):(0,i.jsx)(Bt.zx,{fontSize:[1],paddingX:4,icon:f.x06,mode:"ghost",text:"Add pre heading",onClick:()=>n(!0)}),(0,i.jsx)(Dt,{type:"main",value:g,handleChange:y("mainHeading"),allowParagraph:a||t,allowElementEdit:v,allowSizeEdit:b}),a||h?(0,i.jsx)(Dt,{type:"sub",allowParagraph:!0,value:h,handleChange:y("subHeading"),allowElementEdit:v}):(0,i.jsx)(Bt.zx,{fontSize:[1],paddingX:4,icon:f.x06,mode:"ghost",text:"Add sub heading",onClick:()=>o(!0)})]})},Dt=e=>{const{type:t,value:n,handleChange:a,allowParagraph:o,allowElementEdit:r,allowSizeEdit:s}=e,[c,u]=(0,l.useState)(o?"p":"h2"),[d,p]=(0,l.useState)("regular"),m=(0,l.useMemo)((()=>(0,At.x0)(6)+"-"+t),[t]),f=(0,l.useMemo)((()=>(0,At.x0)(6)+"-"+t),[t]),g=(0,l.useCallback)((e=>{try{u(e),n&&(n.style=n.style.replace(/-h\d$/gi,"-".concat(e)),a(n))}catch(t){}}),[a,n]),h=(0,l.useCallback)((e=>{try{p(e),n&&(n.style=n.style.replace(/-.+-/gi,"-".concat(e,"-")),a(n))}catch(t){}}),[a,n]),y=(0,l.useCallback)((e=>{const{value:i}=e.target;if(!i&&n)a(null);else if(n)try{const e=qt({value:n,text:i});return a(e)}catch(l){}else if(i){const e=Ft({blockkey:m,spanKey:f,defaultEl:c,text:i,type:t,allowSizeEdit:s,defaultSize:d});return a(e)}}),[n,a,m,f,c,t,s,d]),v=(0,l.useCallback)((e=>{e&&!e.value&&(e.value=Rt(n))}),[n]),b=Zt({value:n})||c,w=Ht({value:n})||d,x=(0,l.useMemo)((()=>o?["p",...Ae.S3]:Ae.S3),[o]),k=(0,l.useMemo)((()=>{switch(t){case"pre":return"Pre heading";case"sub":return"Sub heading";default:return"Main heading"}}),[t]);return(0,i.jsxs)(i.Fragment,{children:[o&&(0,i.jsx)(Bt.__,{children:k}),(0,i.jsxs)(Lt,{allowElementEdit:r,allowSizeEdit:s,children:[r&&(0,i.jsx)(Bt.j2,{button:(0,i.jsx)(Bt.zx,{text:b.toUpperCase()}),id:"select-heading-element",menu:(0,i.jsx)(Bt.v2,{children:x.map((e=>(0,i.jsx)(Bt.sN,{text:e.toUpperCase(),onClick:()=>g(e)},e)))}),placement:"right",popover:{portal:!0}}),s&&(0,i.jsx)(Bt.j2,{button:(0,i.jsx)(Bt.zx,{text:w.toUpperCase()}),id:"select-heading-size",menu:(0,i.jsx)(Bt.v2,{children:["small","regular","medium","large"].map((e=>(0,i.jsx)(Bt.sN,{text:e.toUpperCase(),onClick:()=>h(e)},e)))}),placement:"right",popover:{portal:!0}}),(0,i.jsx)(Bt.oi,{ref:v,onChange:y})]})]})},Ft=e=>{let{blockkey:t,spanKey:n,defaultEl:i="h2",text:l,type:a,allowSizeEdit:o=!1,defaultSize:r="regular"}=e;return{_type:"block",_key:t,style:a?"main"===a?o?"heading-".concat(r,"-").concat(i):"heading-".concat(i):"heading-".concat(a,"-").concat(i):"heading-".concat(i),markDefs:[],children:[{_type:"span",_key:n,marks:[],text:l}]}},Ot=e=>{let{values:t,type:n}=e;if(!t)return null;try{const e=t.find((e=>
1e._key.endsWith(n)));if(e)return e;const i=e=>t.find((t=>t.style.startsWith(e)));switch(n){case"pre":return i("heading-pre");case"sub":return i("heading-sub");default:return i("heading-h")}}catch(i){return null}},qt=e=>{let{value:t,text:n}=e;return t.children[0].text=n,t},Rt=e=>{try{return e.children[0].text}catch(t){return null}},Zt=e=>{let{value:t}=e;try{return t.style.match(/h\d$/gi)[0]}catch(n){return""}},Ht=e=>{let{value:t}=e;try{return t.style.match(/-.+-/gi)[0].split("-")[1]||""}catch(n){return""}},Jt=function(){let{allowElementEdit:e,allowSizeEdit:t,...n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Heading",name:"heading",type:"array",components:{input:Vt},of:Nt,options:{allowElementEdit:e,allowSizeEdit:t},...n})},Gt=j({unlocalize:!0,title:"Merge Mansion: News",name:p.qp.News,icon:f.TyN,preview:_({select:["title"],title:"title"}),fields:[M(),Be({type:p.qp.News,source:"title"}),E(),Ie(),Te(),je(),Se(),pe({name:"thumbnail",title:"News thumbnail",requried:!0,description:"The thumbnail image for the news article."}),_t()]}),Ut=j({unlocalize:!0,title:"Token Modal",name:"tokenModal",icon:f.TyN,preview:_({select:["displayName"],title:"displayName"}),fields:[V(),pe({required:!1,title:"Asset",name:"asset"}),pe({required:!1,title:"Secondary asset",name:"assetSecondary"}),_t({name:"body"}),lt({options:{required:!1,allowIcon:!1,collapsed:!0}})]}),$t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U({localize:!1,title:"Main Image Desktop",name:"mainImageDesktop",description:"",...e})},Wt=e=>{let{parent:t}=e;return!t||!(null===t||void 0===t?void 0:t.mainImageDesktop)};var Yt=n(42500);function Xt(){const e=(0,r._)(["\n  width: 100%;\n  overflow-x: scroll;\n"]);return Xt=function(){return e},e}function Qt(){const e=(0,r._)(["\n  display: block;\n  width: 200%;\n  height: 200%;\n  position: relative;\n\n  img {\n    width: 100%;\n    height: auto;\n    display: block;\n  }\n"]);return Qt=function(){return e},e}function Kt(){const e=(0,r._)(["\n  display: block;\n  width: 50px;\n  height: 50px;\n  border-radius: 50%;\n  background-color: rgba(255, 255, 255, 0.4);\n  position: absolute;\n  transform: translate3d(-50%, -50%, 0);\n\n  &:before {\n    display: block;\n    content: '';\n    position: absolute;\n    width: 2px;\n    height: 100%;\n    left: calc(50% - 1px);\n    background-color: red;\n  }\n  &:after {\n    display: block;\n    content: '';\n    position: absolute;\n    width: 100%;\n    height: 2px;\n    top: calc(50% - 1px);\n    background-color: red;\n  }\n"]);return Kt=function(){return e},e}const en=m.ZP.div(Xt()),tn=m.ZP.div(Qt()),nn=m.ZP.div(Kt()),ln=e=>{const t=(0,l.useRef)(null),[n,a]=(0,l.useState)(null),[o,r]=(0,l.useState)(null),c=(0,s.tdq)(["mapImage"]),u=c.entries[0].image.asset,{value:d,path:p,onChange:m}=e,f=(0,Yt.Vh)(u);(0,l.useEffect)((()=>{d&&(a(d.x),r(d.y))}),[c,d]);const g=(0,l.useCallback)((e=>{const n=e.nativeEvent,i=n.offsetX,l=n.offsetY,{width:o,height:c}=t.current.getBoundingClientRect(),u=i/o,d=l/c;m(i?(0,s.t8m)(u,["x"]):(0,s.zNf)(["x"])),m(i?(0,s.t8m)(d,["y"]):(0,s.zNf)(["y"])),a(u),r(d)}),[p]);return(0,i.jsxs)(Bt.Zb,{children:[(0,i.jsx)(Bt.xv,{size:1,weight:"semibold"}),(0,i.jsx)(en,{children:(0,i.jsxs)(tn,{onClick:g,ref:t,children:[n&&o&&(0,i.jsx)(nn,{style:{left:"".concat(100*n,"%"),top:"".concat(100*o,"%")}}),(0,i.jsx)("img",{src:f})]})})]})},an=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Number",name:"number",type:"number",...e})},on=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Text",name:"text",type:"string",...e})};var rn=n(59607);const sn=function(){let{themes:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{themes:rn.JT};return k({localize:!1,title:"Color Scheme Template",name:"template",type:"string",initialValue:rn.hN.light,options:{layout:"dropdown",list:e},...t})},cn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
1const{customOnly:t,customTextTitle:n,customBackgroundTitle:i,themes:l,excludedThemes:a,...o}=e,r=(l||rn.JT).filter((e=>!a||!a.includes(e.value)));return k({localize:!1,title:"Theme",name:"theme",type:"object",fields:[sn({hidden:t,initialValue:t?"custom":rn.hN.light,themes:r})],...o})},un=()=>k({localize:!1,title:"Item",name:"markerItem",type:"object",preview:_({select:["displayName","icon"],title:"displayName"}),fields:[V(),on({name:"title",title:"Title/Label"}),$t({name:"icon",title:"Icon"}),dn(),_t({title:"Modal text"}),pe({title:"Modal image"}),cn()]}),dn=()=>k({localize:!1,title:"Map Selector",name:"mapSelector",type:"object",fields:[an({name:"x",title:"X Coordinate",type:"number"}),an({name:"y",title:"Y Coordinate",type:"number"})],components:{input:ln}}),pn=j({unlocalize:!0,title:"Map",name:"map",icon:f.TyN,preview:_({select:["displayName"],title:"displayName"}),fields:[V(),pe({name:"mapImage",title:"Map Image",initialValue:1}),an({title:"Zoom level multiplier (zooming too far out may break the map)",description:"Lower multiplier = scale map down, higher multiplier = scale map up.",name:"zoom"}),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Marker",name:"marker",type:"array",of:[un()],...e})}()]});var mn=n(3217),fn=n(65036),gn=n(65612),hn=n(99256),yn=n(9633),vn=n(51736),bn=n(80560);const wn={production:!1,preview:!0,live:!0,debug:!0,host:"boulton-bugle.vercel.app",gtag:null,password:"michaelboultonbugle2023",sendgrid:{apiKey:"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",listId:"4ce30a65-ec80-48be-bee1-8682ef288cfd"},sanity:{projectId:"c48u5564",dataset:"production",perspective:"previewDrafts",useCdn:!1,token:"sk7K1kOJZqn6EgPgXI4u5bhM09KU0HpGwK3mkq20mXHmKkP0Ntc3gGMa4VK2T8GbpVk9HcudNmOIrndHjGLSM9Pi7MfS3sq7srmH0tYyR7vFoqcq1lhsa7nn45kDu28kBQQImxVt3Ye9qaeBwKPg2AkMMsOn616a6LgSO6KYXCmDaXZiO0MX"}};var xn=n(14464),kn=n(68730),zn=n(14834),In=n(12335),Cn=n(35120),Tn=n(99054),Sn=n(18871),jn=n(43297);function Nn(){const e=(0,r._)(["\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n"]);return Nn=function(){return e},e}function _n(){const e=(0,r._)(["\n  font-size: 16px;\n  display: flex;\n  align-items: center;\n  gap: 2em;\n  padding: 1em;\n  box-sizing: content-box;\n  color: #fff;\n  z-index: 9999;\n"]);return _n=function(){return e},e}function Bn(){const e=(0,r._)(["\n  font-size: 1em;\n  display: flex;\n  align-items: center;\n  gap: 0.5em;\n  border: none;\n  color: #fff;\n  transition: opacity 0.2s ease-out;\n  text-decoration: none;\n  background: none;\n  cursor: pointer;\n  svg {\n    transition: transform 0.2s ease-out;\n    width: 1.5em;\n    height: 1.5em;\n  }\n  &:hover {\n    opacity: 0.7;\n    svg {\n      transform: scale(0.95);\n    }\n  }\n"]);return Bn=function(){return e},e}function An(){const e=(0,r._)(["\n  position: fixed;\n  inset: 0;\n  background: rgba(0, 0, 0, 0.75);\n  z-index: 100000001;\n"]);return An=function(){return e},e}function Pn(){const e=(0,r._)(["\n  width: 100%;\n  height: 100%;\n  max-height: 100%;\n  border: none;\n  display: block;\n  &.fullscreen {\n    position: fixed;\n    top: 5vh;\n    left: 2.5vw;\n    bottom: 5vh;\n    right: 2.5vw;\n    height: 90vh;\n    width: 95vw;\n    z-index: 100000002;\n  }\n"]);return Pn=function(){return e},e}function Mn(){const e=(0,r._)(["\n  position: fixed;\n  top: calc(5vh + 15px);\n  right: calc(2.5vw + 15px);\n  background: #000;\n  color: #fff;\n  z-index: 100000003;\n  font-size: 24px;\n  border: none;\n  border-radius: 10em;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 1.5em;\n  width: 1.5em;\n  cursor: pointer;\n  transition: 0.2s ease-out;\n  &:hover {\n    background: #fff;\n    color: #000;\n  }\n"]);return Mn=function(){return e},e}function En(){const e=(0,r._)(["*[_id == $id && _rev == $rev]"]);return En=function(){return e},e}const{apiVersion:Ln}=bn.commonEnvironment.sanity,Vn=m.ZP.div(Nn()),Dn=m.ZP.div(_n()),Fn=m.ZP.button(Bn()),On=m.ZP.div(An()),qn=m.ZP.iframe(Pn()),Rn=m.ZP.button(Mn());var Zn=e=>{let{document:t,schemaType:n,localeId:a}=e;const[o,r]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!0),[d,m]=(0,l.useState)(null),[g,h]=(0,l.useState)(!1),y=(0,l.useRef)(null),v=(0,s.m85)({apiVersion:Ln}),b=(0,l.useCallback)((async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=v.config(),l=e._id.match(/-\w\w$/)?e._id.split("-").at(-1):null,o=a||l||p.al.id,r=new J.Sanity({clientConfig:i,localeId:o}),s=p.As.find((e=>e.contentType===n.name)),c=await r.getEntry({query:(0,yn.Z)(En()),projection:(0,vn.E)(s.contentType),params:{id:e._id,rev:e._rev}});if(!c)return t<10?await(0,kn.z)((0,zn.H)(100).pipe((0,In.w)((async()=>await b(e,t+1))))):null;const u=(0,hn.l)(c),d=await r.getEntry({query:'*[_type == "pageTemplate" && pageType == $id]',projection:fn.Tz,params:{contentType:"pageTemplate",id:s.id}}),f=(0,hn.l)(d);if(!f)return u;const g=await(0,gn.U)({template:f,values:[u,f]});try{const e="/api/preview?password=".concat(wn.password),t="home"===g.slug.current?"":g.slug.current;s.slug.en?m("".concat(e,"&redirect=").concat(s.slug.en,"/").concat(t)):m("".concat(e,"&redirect=").concat(t))}catch(h){}return g}),[v,a,n.name]);(0,l.useEffect)((()=>{var e;if(null===t||void 0===t||null===(e=t.displayed)||void 0===e?void 0:e._rev){const e=(0,Cn.of)(t.displayed).pipe((0,Tn.h)((()=>Boolean(y.current))),(0,Sn.b)(500),(0,In.w)((async e=>(u(!0),await(0,kn.z)((0,jn.R)(y.current.contentWindow,"message")),await b(e)))),(0,Tn.h)((e=>Boolean(e)))).subscribe((e=>{var n;(0,x.f)("Update to",{_rev:null===t||void 0===t||null===(n=t.displayed)||void 0===n?void 0:n._rev}),y.current.contentWindow.postMessage({type:"pageData",page:e,environment:wn}),r(!0),u(!1)}));return()=>e.unsubscribe()}}),[t.displayed,b]),(0,l.useEffect)((()=>
1{if(g){const e=e=>{"Escape"===e.key&&h(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}}),[g]);const w=!o||c,k=o&&c;return(0,i.jsxs)(Vn,{children:[d&&(0,i.jsxs)(Dn,{children:[(0,i.jsxs)(Fn,{onClick:()=>h(!0),children:[(0,i.jsx)(f.yvD,{}),"Go fullscreen"]}),(0,i.jsxs)(Fn,{as:"a",target:"_blank",href:d,children:[(0,i.jsx)(f.Qnj,{}),"Open in new tab"]})]}),w&&(0,i.jsx)(xn.ZP,{overlay:k}),g&&(0,i.jsx)(On,{onClick:()=>h(!1)}),(0,i.jsx)(qn,{ref:y,src:"/_preview",className:g?"fullscreen":""}),g&&(0,i.jsx)(Rn,{onClick:()=>h(!1),children:(0,i.jsx)(f.lTq,{})})]})};const Hn=(e,t)=>"_type == '".concat(e,"' && count(*[_type == '").concat(t,"' && ( ^._id match _id + '-*' || ^._id match 'drafts.' + _id + '-*')]) < 1"),Jn=e=>e.listItem().title("Debug").icon(f.qXL).child(e.list().title("Schema types").items([e.listItem({title:"Pages",id:"pages",child:()=>e.list({title:"Pages",id:"pages-list",items:[e.listItem({title:"All Pages",id:"pages",child:()=>e.documentList({title:"All Pages",id:"pages-list",options:{filter:"_type == 'page'"}})}),e.listItem({title:"All Page Proxys",id:"page-proxys",child:()=>e.documentList({title:"All Page Proxys",id:"page-proxys-list",options:{filter:"_type == 'page-proxy'"}})}),e.listItem({title:"Orphan Pages",id:"orphan-pages",child:()=>e.documentList({title:"Orphan Pages",id:"orphan-pages-list",options:{filter:Hn("page","page-proxy")}})})]})}),e.listItem({title:"Articles",id:"articles",child:()=>e.list({title:"Articles",id:"articles-list",items:[e.listItem({title:"All Articles",id:"articles",child:()=>e.documentList({title:"All Articles",id:"articles-list",options:{filter:"_type == 'article'"}})}),e.listItem({title:"All Article Proxys",id:"article-proxys",child:()=>e.documentList({title:"All Article Proxys",id:"article-proxys-list",options:{filter:"_type == 'article-proxy'"}})}),e.listItem({title:"Orphan Articles",id:"orphan-articles",child:()=>e.documentList({title:"Orphan Articles",id:"orphan-articles-list",options:{filter:Hn("article","article-proxy")}})})]})}),e.listItem({title:"Images",id:"images",child:()=>e.documentList({title:"Images",id:"images-list",options:{filter:"_type == 'sanity.imageAsset'"}})})])),Gn=(e,t)=>e.menuItem({title:"New",showAsAction:!0,icon:mn.j29,intent:{type:"create",params:{type:"template-".concat(t)}}}),Un=e=>{let{structureBuilder:t,document:n,proxy:i,title:l,id:a,options:o={}}=e;return t.listItem({title:l,id:a,child:()=>t.documentList({title:l,id:"list",options:{filter:'_type == "'.concat(i.name,'" || (').concat(Hn(n.name,i.name),")"),...o},canHandleIntent:(e,t)=>{let{type:l}=t;const a=l===n.name,o=l===i.name;return"create"===e&&(a||o)},menuItems:[Gn(t,i.name)],child:(e,l)=>{let{params:a,path:o}=l;const r=p.k1.map((e=>e.id)).join("|"),s=".+-(".concat(r,")$"),c=RegExp(s).test(e)?e.replace(/-\w\w$/,""):e,{template:u}=a;if(u){const e=o.filter((e=>"root"!==e)).join(";");window.history.pushState(null,"","/sanity-studio/desk/".concat(e,";").concat(c))}return t.list({title:"Translations",id:"translations-list",items:[t.documentListItem({id:c,title:"".concat(n.title," Settings"),schemaType:i.name,icon:f.b9P,child:()=>t.document({id:c,options:{type:i.name}})}),t.divider(),...p.k1.map((e=>t.documentListItem({id:"".concat(c,"-").concat(e.id),title:e.title,schemaType:n.name,child:i=>t.document({id:i,views:[t.view.form().title("Editor"),t.view.component(Zn).title("Preview").options({schemaType:"page"})],options:{type:n.name,template:"template-"+n.name,templateParameters:{proxyId:c,displayName:e.title}}})})))]})}})})},$n=(e,t)=>[{id:"template-"+e.name,title:"Localized Document",schemaType:e.name,parameters:[{name:"proxyId",type:"string"},{name:"displayName",type:"string"}],value:async e=>{try{const n=(0,J.RT)(c.N.sanity),i=await n.fetch('*[_type == "'.concat(t.name,'" && _id == $proxyId][0]{displayName}'),e);return{displayName:i.displayName+" / "+e.displayName,slug:{current:Ne(i.displayName)}}}catch(n){return{}}}},{id:"template-"+t.name,title:e.title,schemaType:t.name,value:{}}],Wn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"First Name",name:"firstName",placeholder:"John",type:"string",...e})},Yn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Last Name",name:"lastName",placeholder:"Doe",type:"string",...e})},Xn=j({unlocalize:!0,title:"Character",name:"character",icon:f.J8I,preview:_({select:["dis
1playName","snippet"],title:"displayName",subtitle:"snippet"}),fields:[V(),Wn({required:!0,localize:!1}),Yn({required:!0,localize:!1}),on({required:!0,localize:!1,name:"snippet",title:"Grid snippet"}),pe({name:"gridAsset",title:"Grid asset"}),pe({name:"hoverAsset",title:"Grid hover asset"}),pe({name:"modalAsset",title:"Modal asset"}),_t()]}),Qn=j({unlocalize:!0,title:"Character Proxy",name:"character-proxy",liveEdit:!0,preview:_({select:["displayName"],title:"displayName"}),fields:[V()]}),Kn=$n(Xn,Qn),ei=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Buttons",name:"buttons",type:"array",of:[lt()],...e})},ti=j({unlocalize:!1,title:"Ad",name:"ad",icon:f.dwX,preview:_({select:["displayName"],title:"displayName"}),fields:[V(),_t(),pe({name:"logoAsset",title:"Logo asset",description:"Will be placed on top of the background image: Make sure there is transparency and sufficient contrast!"}),pe({name:"backgroundAsset",title:"Background asset"}),ei()]}),ni=j({unlocalize:!1,title:"Author",name:"persona",icon:f.Vyx,preview:_({select:["firstName","lastName"],title:e=>"".concat(e.firstName," ").concat(e.lastName)}),fields:[$t({title:"Picture",required:!0}),Wn({required:!0,localize:!1}),Yn({required:!0,localize:!1})]}),ii=(e,t)=>e.props.title<t.props.title?-1:e.props.title>t.props.title?1:0,li=e=>{const{fields:t,...n}=e,i=[];return!1!==n.localize&&i.push(function(){return k({localize:!1,title:"Copy Object",name:"copyObject",type:"copy-object",...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}})}()),k({localize:!1,type:"object",preview:_({select:["displayName","_type","locales"],title:"displayName",subtitle:e=>{const t=(0,N.Ls)(e._type);if(!e.locales)return t;const n=p.k1.filter((t=>e.locales[t.id])).map((e=>e.title)).join(", ");return"".concat(t," - ").concat(n)}}),fields:[...i,...t],...n})},ai=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Anchor",name:"anchor",type:"string",...e})},oi=e=>{let{layouts:t,...n}=e;if(!t||t.length<1)throw new Error("No layouts provided!");const i=t.find((e=>e.default||"default"===e.value)),l=i?i.value:t[0].value;return k({localize:!1,title:"Layout",name:"layout",type:"string",initialValue:l,required:!1,hidden:t.length<2,options:{layout:"dropdown",list:t},...n})},ri=[{title:"Default",value:"default",default:!0}],si=e=>{const{types:t,...n}=e;return k({localize:!1,title:"Reference",name:"reference",type:"reference",to:t.map((e=>({type:e}))),...n})},ci=[{title:"Default",value:"default",default:!0}],ui=[{title:"Default",value:"default",default:!0}],di=[{title:"Default",value:"default",default:!0}],pi=[{title:"Condensed",value:"condensed"},{title:"With Padding",value:"withPadding"},{title:"Default",value:"default",default:!0}],mi=[{title:"Default",value:"default",default:!0}],fi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Polaroid Item",name:"polaroidItem",type:"object",preview:_({select:["displayName"],title:"displayName"}),fields:[V(),pe(),ai()],...e})},gi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Polaroid pictures",name:"assets",description:"Each item in this list represents one Polaroid picture. Make sure there are three here!",type:"array",of:[fi()],...e})},hi=[{title:"Default",value:"default",default:!0}],yi=()=>k({localize:!1,title:"Item",name:"contentEntriesItem",type:"object",fields:[V(),_t()]}),vi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Content Entries",name:"contentEntries",type:"array",of:[yi()],...e})},bi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Span",name:"span",type:"number",...e})},wi=()=>k({localize:!1,title:"Item",name:"backgroundAssetsItem",type:"object",fields:[V(),bi(),pe()]}),xi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Background Assets",name:"backgroundAssets",type:"array",of:[wi()],...e})},ki=[{title:"Default",value:"default",default:!0}],zi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Scroll Block",name:"scrollBlock",icon:f.uyC,fields:[V(),oi({layouts:ki}),vi(),xi(),cn(),ai()],...e})},Ii=[{title:"Default",value:"default",default:!0}];var Ci=n(75100);const Ti=[{title:"Default",value:"default",default:!0}],Si=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Highlighted content",name:"reference",type:"reference",to:[{type:"article"}],...e})},ji=[{title:"Default",value:"default",default:!0}],Ni=[{title:"Horizontal",value:"horizontal"},{title:"Default",value:"default",default:!0}];var _i=n(8799);const Bi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Short Description",name:"shortDescription",type:"string",...e})},Ai=()=>k({localize:!1,title:"Item Card",name:"itemCard",type:"object",preview:_({select:["shortDe
1scription"],title:"shortDescription"}),fields:[Bi(),pe({types:[ae.BX.image],askTarget:!1})]}),Pi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Items",name:"items",type:"array",of:[Ai()],...e})},Mi=[{title:"Default",value:"default",default:!0}],Ei=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Characters",name:"characters",type:"array",of:[si({title:"Character",name:"character",types:["character"]})],...e})},Li=[{title:"Four Columns",value:"fourColumns"},{title:"Two Columns",value:"twoColumns"},{title:"Three Columns",value:"default",default:!0}],Vi=[{value:"3",title:"Span three columns"},{value:"2",title:"Span two columns"},{value:"1",title:"Span one column"}],Di=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Column Span Count",name:"colspan",description:"Choose how many columns of the page's grid you would like this block to span",type:"string",options:{layout:"dropdown",list:Vi},required:!1,initialValue:"3",hidden:e=>{let{document:t}=e;return"page"!=t._type},...e})},Fi=[{title:"Sidebar",value:"sidebar"},{title:"Default",value:"default",default:!0}],Oi=[{title:"Default",value:"default",default:!0}],qi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Allow Load More",name:"allowLoadMore",type:"boolean",hidden:e=>{let{parent:t}=e;if("fetch"!==(null===t||void 0===t?void 0:t.mode))return!0},...e})},Ri=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Show Categories",name:"showCategories",type:"boolean",hidden:e=>{let{parent:t}=e;if("fetch"!==(null===t||void 0===t?void 0:t.mode))return!0},...e})},Zi=()=>k({localize:!1,title:"Reference",name:"cardsReference",type:"reference",preview:_({select:["title"],title:"title"}),to:[{type:"article"},{type:"news"},{type:"externalMedia"}]}),Hi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Cards",name:"cards",description:"Manually pick the content",type:"array",of:[Zi()],hidden:e=>{let{parent:t}=e;if("choose"!==(null===t||void 0===t?void 0:t.mode))return!0},...e})},Ji=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Per Page",description:"Choose how many pieces of content are automatically fetched",name:"perPage",type:"number",initialValue:6,hidden:e=>{let{parent:t}=e;if("fetch"!==(null===t||void 0===t?void 0:t.mode))return!0},...e})},Gi=[{value:"choose",title:"Choose manually"},{value:"fetch",title:"Fetch latest"}],Ui=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Mode",name:"mode",description:"Choose if you want to choose the content, or fetch the latest content automatically",type:"string",options:{layout:"dropdown",list:Gi},validation:e=>e.required(),...e})},$i=[{value:"article",title:"Boulton Bugle Articles"},{value:"news",title:"Merge Mansion News"},{value:"externalMedia",title:"External Media Links"}],Wi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Select Types",name:"types",description:"Select types for automatically fetching the latest content",type:"array",of:[{type:"string"}],options:{list:$i},hidden:e=>{let{parent:t}=e;if("fetch"!==(null===t||void 0===t?void 0:t.mode))return!0},...e})},Yi=[{value:"1",title:"1 Column"},{value:"3",title:"3 Columns"}],Xi=()=>k({localize:!1,name:"column",title:"Columns",type:"string",initialValue:"3",options:{layout:"dropdown",list:Yi}}),Qi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Card Grid",name:"cardGrid",type:"array",hidden:e=>{let{parent:t}=e;return"default"!==t.layout},of:[Xi()],...e})},Ki=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Ad Reference",name:"adReference",type:"reference",hidden:e=>{let{parent:t}=e;return t&&"sidebar"!==t.layout},to:[{type:"ad"}],...e})},el=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Ad Position",name:"adPosition",type:"number",description:"Specify the position for ad within the article array. Defaults to 5",hidden:e=>{let{parent:t}=e;return t&&"sidebar"!==t.layout},initialValue:5,...e})},tl=()=>k({localize:!1,title:"Category",name:"categoryReference",type:"reference",to:[{type:"category"}]}),nl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Select Categories",name:"selectedCategories",type:"array",description:"Select categories from which to automatically fetch articles. If none is selected, articles from all categories will be fetched.",hidden:e=>{let{parent:t}=e;if("fetch"!==(null===t||void 0===t?void 0:t.mode))return!0},of:[tl()],...e})},il=[{title:"Mansion Archive",value:"mansionArchive"},{title:"Mansion",value:"mansion"},{title:"Archive",value:"archive"},{title:"Overflow",value:"overflow"},{title:"Sidebar",value:"sidebar"},{title:"Categories",value:"categories"},{title:"Snippet",value:"snippet"},{title:"Default",value:"default",default:!0}],ll=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Hide top border",name:"hideTopBorder",type:"boolean",...e})},al=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Ingredients",name:"recipeIngredient",type:"array",of:[{type:"string"}],...e})},ol=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Ingredients",name:"ingredients",type:"object",fields:[M({name:"ingredientsTitle",title:"Ingredients Title",initialValue:"What you'll need:",hidden:!0,required:!1}),al()],...e})},rl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{option:t,...n}=e;return k({localize:!1,title:"Recipe Text",name:"recipePortableText",type:"array",of:t||Tt,...n})},sl=()=>k({localize:!1,title:"Item",name:"instructionsItem",type:"object",fields:[M({title:"Step name",name:"name",description:"For SEO structured data. Not visible in the recipe."}),rl({option:jt,name:"text",title:"How to step"})]}),cl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
1return k({localize:!1,title:"Step By Step Instructions",name:"stepByStepInstructions",type:"array",of:[sl()],...e})},ul=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Hide Step Numbers",name:"hideStepNumbers",type:"boolean",...e})},dl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Instructions",name:"instructions",type:"object",fields:[M({initialValue:"Step by step instructions"}),cl(),ul(),pe({title:"Step by step assets",name:"stepByStepAssets",types:[ae.BX.stepByStep]})],...e})},pl=[{title:"Instructions",value:"instructions"},{title:"Default",value:"default",default:!0}],ml=[{title:"Default",value:"default",default:!0}],fl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"External Scripts",name:"externalScripts",description:"Add scripts that require loading code from external url",type:"array",of:[{type:"string"}],...e})},gl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,type:"code",name:"html",title:"HTML Code",options:{language:"html",languageAlternatives:[{title:"HTML",value:"html"}]},...e})},hl=[{value:"none",title:"None"},{value:"regular-regular",title:"Regular / Regular"},{value:"large-regular",title:"Large / Regular"},{value:"regular-large",title:"Regular / Large"},{value:"large-large",title:"Large / Large"}],yl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Padding",name:"padding",type:"string",initialValue:"regular-regular",description:"Choose the padding for this block (vertical / horizontal)",options:{layout:"dropdown",list:hl},...e})},vl=[{title:"Defaul",value:"default",default:!0}],bl=[{value:"body-asset",title:"Body - Asset"},{value:"asset-body",title:"Asset - Body"}],wl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Order",name:"order",type:"string",initialValue:"body-asset",hidden:e=>{let{parent:t}=e;var n,i;if(!t)return!0;const l=Boolean(t.heading),a=Boolean(t.body),o=l||a,r=Boolean(null===(i=t.asset)||void 0===i||null===(n=i.entries)||void 0===n?void 0:n.length);return!o||!r},options:{layout:"dropdown",list:bl},...e})},xl=[{value:"small",title:"Small"},{value:"regular",title:"Regular"},{value:"large",title:"Large"},{value:"xlarge",title:"Extra Large"}],kl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Body Width",name:"bodyWidth",type:"string",description:"Change the width of the block. Extra large is for the style found at the bottom of the About page (requires asset + text).",initialValue:"regular",hidden:e=>{let{parent:t}=e;return!(null===t||void 0===t?void 0:t.body)},options:{layout:"dropdown",list:xl},...e})},zl=[{value:"regular",title:"Left"},{value:"center",title:"Centered"}],Il=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Text Alignment",description:"Change the alignment of the text inside of the block. Left by default.",name:"textAlignment",type:"string",initialValue:"regular",hidden:e=>{let{parent:t}=e;return!(null===t||void 0===t?void 0:t.body)},options:{layout:"dropdown",list:zl},...e})},Cl=[{value:"regular",title:"Regular"},{value:"pageMargin",title:"Max"}],Tl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Asset Width",name:"assetWidth",type:"string",description:"Change the width of the block. Extra large is for the style found at the bottom of the About page (requires asset + text).",initialValue:"regular",hidden:e=>{let{parent:t}=e;return!(null===t||void 0===t?void 0:t.asset)||(null===t||void 0===t?void 0:t.body)},options:{layout:"dropdown",list:Cl},...e})},Sl=[{title:"Default",value:"default",default:!0}];var jl=n(91914);const Nl=[{title:"Under Header",value:"underHeader"},{title:"Asset",value:"asset"},{title:"Article",value:"article"},{title:"Default",value:"default",default:!0}],_l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Json",name:"json",type:"json",options:{language:"json"},...e})},Bl=[function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Mansion News Content Block",name:"mansionNewsContentBlock",icon:f.uyC,fields:[V(),oi({layouts:ri}),Jt(),_t(),pe(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Mansion Form Block",name:"mansionFormBlock",icon:f.uyC,fields:[V(),oi({layouts:ci}),_t(),_t({title:"Form card body",name:"formCardBody"}),si({name:"form",types:["form"]}
1),pe({name:"backgroundAsset",title:"Background Asset"}),pe({name:"formCardBackgroundAsset",title:"Form Card Background Asset"}),cn(),cn({title:"Form card theme",name:"cardTheme",required:!0}),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Mansion Ad Banner Block",name:"mansionAdBannerBlock",icon:f.uyC,fields:[V(),oi({layouts:ui}),_t(),pe(),pe({title:"Background",name:"assetBackground"}),lt({options:{required:!1,allowIcon:!1,collapsed:!0}}),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Mansion Text Assets Block",name:"mansionTextAssetsBlock",icon:f.uyC,fields:[V(),oi({layouts:di}),_t(),L({title:"Text on right"}),pe({title:"Background",name:"assetBackground"}),pe({title:"Device frame",name:"assetFrame"}),pe({title:"Device content",name:"assetContent"}),M({title:"Border radius for top of content",initialValue:"15%",name:"assetRadiusTop"}),pe({title:"Character",name:"assetCharacter"}),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Mansion Hero Block",name:"mansionHeroBlock",icon:f.uyC,fields:[V(),oi({layouts:pi}),_t(),pe(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Polaroid Carousel Block",name:"polaroidCarouselBlock",icon:f.uyC,fields:[V(),oi({layouts:hi}),gi({title:"Polaroid cards",description:"Each item in this list represents one Polaroid card in a carousel. A card may contain either a video or an image."}),cn(),ai()],...e})}(),zi(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Mansion Map V2 Block",name:"mansionMapV2Block",icon:f.uyC,fields:[V(),oi({layouts:Ii}),si({title:"Map",name:"map",types:["map"]}),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Legacy Map Block",name:"legacyMapBlock",icon:Ci.sXn,fields:[V(),oi({layouts:Ti}),pe(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Latest Content Highlight Block",name:"latestContentHighlightBlock",icon:f.h0r,fields:[V(),oi({layouts:ji}),M({description:"Defaults to 'Read the latest'"}),Si(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Share Some Block",name:"shareSomeBlock",icon:f.KQY,fields:[V(),oi({layouts:Ni}),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Items Card Block",name:"itemsCardBlock",icon:_i.de7,fields:[V(),oi({layouts:Mi}),Pi(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Characters Block",name:"charactersBlock",icon:f.J8I,fields:[V(),oi({layouts:Li}),Ei(),an({title:"Characters per row",description:"Number of characters per to show before 'show more'"}),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Ad Block",name:"adBlock",icon:f.sF1,preview:_({select:["ad.displayName"],title:"ad.displayName"}),fields:[oi({layouts:Fi}),si({title:"Ad",name:"ad",types:["ad"]}),Di(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Category Header Block",name:"categoryHeaderBlock",icon:f.Z26,preview:_({select:["category.title"],title:"category.title"}),fields:[si({title:"Category",name:"category",types:["category"]}),oi({layouts:Oi}),cn()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Feed Block",name:"feedBlock",icon:f.$Qw,fields:[V(),oi({layouts:il}),_t({title:"Main heading and body text",hidden:e=>{let{parent:t}=e;return"archive"!==t.layout}}),on({name:"heading",title:"Heading"}),lt({options:{collapsed:!0}}),Ui(),qi(),Ri(),Wi(),nl(),Ji(),Qi(),Ki(),el(),Hi(),Di(),ll(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Polaroid Block",name:"polaroidBlock",icon:f.C0e,fields:[V(),oi({layouts:mi}),gi(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Recipe Block",name:"recipeBlock",icon:f.eFf,fields:[V(),oi({layouts:pl}),pe({title:"Recipe asset"}),M({name:"blockTitle",title:"Block Title",initialValue:"The recipe"}),ol(),dl(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Image Comparison Slider Block",name:"imageComparisonSliderBlock",icon:f.Mzw,fields:[V(),oi({layouts:ml}),pe({title:"Before asset",name:"beforeAsset"}),pe({title:"After asset",name:"afterAsset"}),_t(),an({title:"Maximum drag distance (0 - 100, left to right)",initialValue:50,name:"sliderMax"}),an({title:"Minimum drag distance (0 - 100, left to right)",initialValue:0,name:"sliderMin"}),an({title:"Starting value (0 - 100, left to right)",initialValue:50,name:"sliderInitial"}),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"HTML Block",name:"HTMLBlock",icon:_i.cUI,fields:[V(),oi({layouts:vl}),fl(),gl(),yl(),me(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Story Block",name:"storyBlock",icon:f.Qcm,fields:[V(),oi({layouts:Sl}),wl(),_t(),kl(),Tl(),Il(),pe(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Hero Block",name:"heroBlock",icon:jl._yY,fields:[V(),oi({layouts:Nl}),_t(),pe(),cn(),ai()],...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return li({title:"Dynamic Block",name:"dynamicBlock",icon:_i.kLY,f
1ields:[V(),_l({title:"Values",name:"values"})],...e})}()],Al=e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return k({localize:!1,title:"Blocks",name:"blocks",type:"array",of:e.sort(ii),...t})}(Bl,e),Pl=p.As.map((e=>({value:e.id,title:e.title}))),Ml=j({title:"Page Template",name:"pageTemplate",icon:f.xoN,preview:_({select:["displayName","slug.current"],title:"displayName",subtitle:"slug.current"}),fields:[V(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"PageType",name:"pageType",type:"string",options:{layout:"dropdown",list:Pl},...e})}(),Te(),je({type:"string"}),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Meta Image",name:"metaImage",type:"string",description:"Preview image for page. Visible when sharing.",...e})}(),Al(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Global settings",name:"globalSettings",type:"reference",required:!0,to:[{type:"globalSettings-proxy"}],initialValue:{_ref:"default-global-settings",_type:"reference"},...e})}()]}),El=j({title:"Block Group",name:"blockGroup",icon:f.TyN,preview:_({select:["displayName"],title:"displayName"}),fields:[V(),Al()]}),Ll=j({title:"Modal",name:"modal",icon:f.e$R,preview:_({select:["displayName","slug.current"],title:"displayName",subtitle:"slug.current"}),fields:[V(),Be({type:"modal"}),Al()]}),Vl=j({title:"Redirects",name:"redirects",icon:f.YsQ,preview:_({select:["redirects"],title:()=>"Redirects"}),fields:[k({localize:!1,title:"Redirects",name:"redirects",type:"array",of:[k({localize:!1,title:"Redirect",type:"object",name:"redirect",preview:_({select:["source","destination","permanent","locale"],title:e=>{let{source:t,destination:n}=e;return"".concat(t," \u279d ").concat(n)},subtitle:e=>{let{permanent:t,locale:n}=e;return"Permanent: ".concat(t," / Automatic localization: ").concat(n)}}),fields:[k({localize:!1,type:"string",name:"source",title:"Source (slug)",initialValue:"/",validation:e=>e.required()}),k({localize:!1,type:"string",name:"destination",title:"Destination (slug or href)",initialValue:"/",validation:e=>e.required().custom(((e,t)=>{var n;return(null===t||void 0===t||null===(n=t.parent)||void 0===n?void 0:n.source)!==e||"Destination can't be same as source!"}))}),k({localize:!1,title:"Permanent?",name:"permanent",type:"boolean",initialValue:!0}),k({localize:!1,title:"Use automatic localization?",name:"locale",type:"boolean",initialValue:!0})]})]})]}),Dl=j({title:"Category",name:"category",preview:_({select:["title"],title:"title"}),icon:f.AU5,fields:[M(),on({name:"color",title:"Color",localize:!1,description:'Color of the category - use a hex value including the "#" symbol',initialValue:"#CCD6EB"}),$t({title:"Logo"})]}),Fl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Multiple",name:"multiple",type:"boolean",initialValue:!1,hidden:e=>{let{parent:t}=e;if(!(null===t||void 0===t?void 0:t.type))return!0;return!["dropdown"].includes(t.type)},...e})},Ol=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Multiple Output",name:"multipleOutput",type:"string",initialValue:"array",hidden:e=>{let{parent:t}=e;return!(null===t||void 0===t?void 0:t.multiple)},options:{layout:"dropdown",list:[{value:"array",title:"Array"},{value:"string",title:"Text"}]},...e})},ql=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Name / Key",name:"name",type:"string",...e})},Rl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Title",name:"title",type:"string",...e})},Zl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Value",name:"value",type:"string",...e})},Hl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Option",name:"option",type:"object",fields:[Rl(),Zl()],...e})},Jl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Form Field Options",name:"options",type:"array",of:[Hl()],hidden:e=>{let{parent:t}=e;if(!(null===t||void 0===t?void 0:t.type))return!0;return!["dropdown","select"].includes(t.type)},...e})},Gl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Form Field Placeholder",name:"placeholder",type:"string",hidden:e=>{let{parent:t}=e;if(!(null===t||void 0===t?void 0:t.type))return!0;return!["text","textarea","email","dropdown"].includes(t.type)},...e})},Ul=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Title",name:"title",type:"string",...e})};var $l=n(85274);const Wl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Form Field Type",name:"type",type:"string",options:{layout:"dropdown",list:[{value:$l.I.Text,title:"Text (short text)"},{value:$l.I.Textarea,title:"Textarea (long text)"},{value:$l.I.Email,title:"Email"},{value:$l.I.Number,title:"Number"},{value:$l.I.Url,title:"Url"},{value:$l.I.Checkbox,title:"Checkbox"},{value:$l.I.Dropdown,title:"Dropdown"},{value:$l.I.Select,title:"Select"},{value:$l.I.File,title:"File"}]},...e})},Yl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Target column span",name:"colSpan",type:"string",initialValue:"auto",options:{layout:"dropdown",list:[{value:"auto",title:"Auto"},{value:"1",title:"1 Column"},{value:"2",title:"2 Columns"}]},...e})},Xl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Validation / Required",name:"required",type:"boolean",initialValue:!0,...e})},Ql=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Validation",name:"validation",type:"object",fields:[Xl()],...e})},Kl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Form Field",name:"formField",type:"object",fields:[Ul(),ql(),Wl(),Gl(),Jl(),Fl(),Ol(),Yl(),Ql()],...e})},ea=j({title:"Form",name:"form",icon:f.TyN,fields:[V(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Form Id",name:"id",type:"string",...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Form Post Url",name:"postUrl",type:"string",...e})}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Form Fields",name:"fields",type:"array",of:[Kl()],...e})}(),Yl(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Submit Button Text",name:"submitButtonText",type:"string",...e})}(),_l({title:"Analytics Config",name:"analyticsConfig"})]}),ta=(e,t)=>p.k1.map((n=>e.listItem({title:"".concat(t.title," / ").concat(n.title),id:"".concat(t.name,"-").concat(n.id),child:()=>e.documentList({title:"".concat(t.title," / ").concat(n.title),id:"".concat(t.name,"-").concat(n.id,"-list"),options:{filter:'_type == "'.concat(t.name,'" && _id match "*"+$id'),params:{id:n.id}}})}))),na=j({unlocalize:!0,title:"Page",name:p.qp.Page,icon:f.TyN,preview:{select:{displayName:"displayName"},prepare(e){let{displayName:t}=e;return{title:t||"Invalid"}}},fields:[V(),Be({type:p.qp.Page}),Te(),je(),Se(),Al()]}),ia=[{title:"Merge Mansion Pages",value:"mansion-pages"},{title:"Boulton Bugle Pages",value:"bugle-pages"},{title:"Boulton Bugle Category Pages",value:"category-pages"}
1,{title:"Japan pages",value:"japan-pages"},{title:"Dev Pages",value:"dev-pages"}],la=[{value:"page",title:"Page (default)"},{value:"article",title:"Article",description:"For pages like About where there is no grid layout"}],aa=j({unlocalize:!0,title:"Page-proxy",name:"page-proxy",liveEdit:!0,preview:_({select:["displayName","pageCategories"],title:"displayName",subtitle:e=>{let{pageCategories:t}=e;return t?ia.filter((e=>t.includes(e.value))).map((e=>e.title)).join(", "):""}}),fields:[V(),(e=>{let{categories:t,...n}=e;return k({localize:!1,title:"Categories",name:"staticCategories",type:"array",of:[{type:"string"}],options:{list:t},...n})})({categories:ia}),k({localize:!1,name:"pageLayout",title:"Page layout",type:"string",initialValue:"page",options:{layout:"dropdown",list:la}})]}),oa=e=>{const t={structureBuilder:e,document:na,proxy:aa};return e.listItem({title:"Pages",id:"pages",child:()=>e.list({title:"Pages",id:"pages",menuItems:[Gn(e,aa.name)],items:[Un({...t,title:"All Pages",id:"all"}),e.divider(),...ia.map((e=>Un({...t,title:e.title,id:e.value,options:{filter:'_type == "'.concat(aa.name,'" && $categoryId in staticCategories'),params:{categoryId:e.value}}}))),e.divider(),...ta(e,na)]})})},ra=$n(na,aa),sa=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{styles:"common"};const{styles:t,...n}=e;return k({localize:!0,title:"Ingress",name:"ingress",type:"array",of:St,...n})},ca=j({unlocalize:!0,title:"Boulton Bugle Article",name:p.qp.Article,icon:f.GTW,preview:_({select:["title","slug.current","mainImageDesktop"],title:"title",subtitle:"slug.current",media:"mainImageDesktop"}),fieldsets:[{name:"hero",title:"Hero fields",description:"Optional hero fields. You can choose between either a hero asset or parallax/scroll block hero, but not both."}],fields:[M({required:!0}),Be({source:"title",type:p.qp.Article}),E(),si({title:"Author",name:"author",types:["persona"]}),$t({required:!0,title:"Card Image: 3:2 and at least 1920 x 1740 px recommended",description:"The image used as a thumbnail when listed in a feed block (home page, category page etc)."}),$t({name:"mainImageDesktopFieldWidescreen",required:!1,title:"Optional Card Image: 16:9 and at least 2292 x 1288 px recommended",description:"If the 3:2 card image does not crop pleasingly then you can assign an image to this field. It will be used if the Feed layout is set to one that displays images in 16:9."}),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U({localize:!1,title:"Main Image Mobile",name:"mainImageMobile",description:"",hidden:Wt,...e})}({title:"Card Image Mobile: 1:1 and at least 1280 x 1280 px recommended",description:"Not all cards (like category feed cards) use this size, but those that do will use this image for mobile."}),Te(),je(),Se(),zi({type:"object",fieldset:"hero",description:"A parallax block that can be shown instead of a hero asset",options:{collapsible:!0,collapsed:!1}}),pe({name:"heroAsset",title:"Hero Asset",fieldset:"hero",requried:!1,description:"An optional hero asset, shown at the top of the article."}),ll({title:"Hero Asset Cover Screen",name:"heroAssetFill",fieldset:"hero",required:!1,initialValue:!1,description:"If true, then the hero asset will fill the screen."}),sa({title:"Card snippet",name:"cardSnippet"}),sa(),Al()]}),ua=j({unlocalize:!0,title:"Article Proxy",name:"article-proxy",liveEdit:!0,preview:_({select:["displayName"],title:"displayName"}),fields:[V(),Ie()]}),da=e=>Un({...{structureBuilder:e,document:ca,proxy:ua},title:"Boulton Bugle: Articles",id:"article"}),pa=$n(ca,ua),ma=[{value:"category",title:"Category"},{value:"link",title:"Link"}],fa=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Category Type",name:"categoryType",type:"string",options:{layout:"dropdown",list:ma},readOnly:e=>{let{parent:t}=e;if(t){const{href:e,reference:n,links:i}=t;if(e||n||i)return!0}return!1},...e})},ga=function(){let{link:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Links",name:"links",type:"array",of:[ke(e)],...t})},ha=function(){let{_level:e=1,categoryLevels:t=1,allowText:n=!0,allowLink:i=!0,allowTextForLevels:l=[],allowLinkForLevels:a=[],...o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=n||l.includes(e),s=i||a.includes(e),c=t>e,u={_level:e+1,categoryLevels:t,allowTextForLevels:l,allowLinkForLevels:a,allowText:!0,allowLink:!1},d=r&&s&&c,p=!s&&c;return k({localize:!1,title:"Links Category",name:"link",type:"object",fields:[V(),d&&fa(),r&&xe({title:"Title"}),s&&ye({},!d),fe(),s&&we({},!d),c?ya(u,{},p):ga()],...o})},ya=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return k({localize:!1,title:"Link Categories",name:"links",type:"array",of:[ha(e)],hidden:e=>{let{value:t,parent:i}=e;if(t)return!1;if(n)return!1;if(i&&"link"===i._type){if(!i.categoryType)return!0;
1if("link"===i.categoryType)return!0}return!1},...t})},va=e=>{let{pattern:t,...n}=e;return ke({allowDisplayName:!1,allowText:!1,allowReference:!1,allowId:!1,href:{allowTypes:["external"],localize:!1,title:"Link",pattern:t},...n})},ba=function(){let{enableFacebook:e=!0,enableTwitter:t=!0,enableLinkedIn:n=!0,enableInstagram:i=!0,enableTikTok:l=!0,enableYoutube:a=!0,...o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({description:p.k1.length>1&&"Social media page link can be same for each translation!",localize:!1,title:"Social",name:"social",type:"object",fields:[e&&va({name:"facebook",title:"Facebook",pattern:/https:\/\/(www\.)?facebook\.com\/.+/gi}),t&&va({name:"twitter",title:"Twitter",pattern:/https:\/\/(www\.)?twitter\.com\/.+/gi}),n&&va({name:"linkedIn",title:"LinkedIn",pattern:/https:\/\/(www\.)?linkedin\.com\/.+/gi}),a&&va({name:"youtube",title:"Youtube",pattern:/https:\/\/(www\.)?youtube\.com\/.+/gi}),i&&va({name:"instagram",title:"Instagram",pattern:/https:\/\/(www\.)?instagram\.com\/.+/gi}),l&&va({name:"tiktok",title:"TikTok",pattern:/https:\/\/(www\.)?tiktok\.com\/.+/gi})],...o})},wa=j({unlocalize:!0,title:"Default global settings",name:"globalSettings-proxy",liveEdit:!1,icon:f.TyN,preview:_({select:["displayName"],title:"displayName"}),fields:[V(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U({localize:!1,name:"favicon",title:"Favicon",description:"PNG",type:"image",formats:["png"],...e})}({disableAltText:!0}),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return U({localize:!1,name:"logo",title:"Logo Image",description:"SVG or PNG",type:"image",formats:["png","svg+xml"],...e})}({disableAltText:!0}),$t({title:"Store Image",name:"storeImage"}
1),ba(),ba({title:"Social Japan",name:"socialJapan"}),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!0,title:"Copyright",name:"copyright",type:"string",required:!0,...e})}(),si({title:"Token Modal",name:"tokenModal",types:["tokenModal"]}),pe({title:"Mansion Store Asset",name:"mansionStoreAsset"}),pe({title:"Mansion Store Background",name:"mansionStoreAssetBackground"})]}),xa=j({unlocalize:!0,title:"global-settings",name:"globalSettings",icon:f.TyN,preview:_({select:["displayName"],title:"displayName"}),fields:[V(),k({localize:!1,title:"Navigation",name:"navigation",type:"object",fields:[ya({categoryLevels:1},{title:"Links"}),ei(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"Store Text",name:"storeText",type:"text",rows:3,...e})}()]}),k({localize:!1,title:"Footer",name:"footer",type:"object",fields:[on({name:"socialLinksTitle",title:"Social links title"}),ya({categoryLevels:1,allowLink:!1},{title:"Links"})]}),ga({title:"Supporting links",name:"supporting"}),ga({title:"Legal links",name:"legal"}),ga({title:"Legal links Japan",name:"legalJapan"}),k({localize:!1,title:"Mansion Navigation",name:"mansionNavigation",type:"object",fields:[ya({categoryLevels:1},{title:"Links"}),ei(),lt({title:"Mansion Modal Store Button",name:"mansionModalStoreButton",options:{required:!1,allowIcon:!1,collapsed:!0}})]}),k({localize:!1,title:"Mansion Footer",name:"mansionFooter",type:"object",fields:[on({name:"footerTitle",title:"Footer title"}),on({name:"socialLinksTitle",title:"Social links title"}),ya({categoryLevels:1,allowLink:!1},{title:"Links"})]})]}),ka=e=>(e=>{let{structureBuilder:t,document:n,proxy:i}=e;const l="default-global-settings";return t.list({title:"Translations",id:"translations-list",items:[t.documentListItem({id:l,title:"Default global Settings",schemaType:i.name,icon:f.b9P,child:()=>t.document({id:l,options:{type:i.name}})}),t.divider(),...p.k1.map((e=>t.documentListItem({id:"".concat(l,"-").concat(e.id),title:"Global settings / ".concat(e.title),schemaType:n.name,child:e=>t.document({id:e,options:{type:n.name}})})))]})})({...{structureBuilder:e,document:xa,proxy:wa},title:"Global Settings",id:"globalSettings"}),za=($n(xa,wa),j({unlocalize:!1,title:"Files",name:"files",icon:f.uEt,preview:_({select:["displayName"],title:"displayName"}),fields:[V(),Be({description:'Will be prefixed with "/files" automatically!'}),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k({localize:!1,title:"File",name:"file",type:"file",...e})}({localize:!1})]}));var Ia=[Ce,Gt,Ut,pn,Xn,Qn,ti,ni,za,Ml,El,Ll,Vl,Dl,na,aa,ca,ua,xa,wa,ea];const Ca={documentType:null,documentId:null},Ta=["blockGroup","tokenModal","modal","category","character","form","persona","ad","map"],Sa=["pageTemplate","files"],ja=["tokenModal","character","globalSettings","media.tag","page","article","redirects",...Sa,...Ta],Na=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ca;return(t,n)=>{const{documentId:i,documentType:l}=e;return l&&i?t.document({title:"Current Document",id:i,options:{type:l}}):t.list({title:"Content",id:"root",items:[oa(t),...t.documentTypeListItems().filter((e=>{const t=e.getId();return!ja.includes(t)&&!t.includes("-proxy")})),da(t),t.listItem().title("Global settings").icon(f.b9P).child(ka(t)),t.listItem().title("Reusable content").icon(f.x7G).child((()=>t.list({title:"Reusable content",id:"reuseable-content",items:t.documentTypeListItems().filter((e=>{const t=e.getId();return Ta.includes(t)&&!t.includes("-proxy")}))}))),t.listItem().title("Advanced").icon(f.pNz).child((()=>t.list({title:"Advanced",id:"advanced",items:[t.listItem().title("Redirects").icon(f.YsQ).child(t.document().schemaType("redirects").documentId("default-redirects")),t.listItem().title("Page Templates").icon(f.Bjd).child((()=>t.documentList({title:"Page Templates",id:"pageTemplates",options:{filter:"_type == 'pageTemplate'"}}))),t.listItem().title("Files").icon(f.uEt).schemaType("files").child((()=>t.documentList({title:"Files",id:"files",options:{filter:"_type == 'files'"}}))),Jn(t)]})))]})}};var _a=n(62461),Ba=n(67314),Aa=n(28312),Pa=n(95885);const Ma=e=>Pa.tk.updateListener.of((t=>{if(t.docChanged){const n=t.view.state.doc.toJSON().map((e=>e.trim())).join(" ");e(n)}}));var Ea=n(53947),La=n(1727),Va=n(12239);function Da(){const e=(0,r._)(["\n  border-radius: 2px;\n  border: 1px solid #ced2d9;\n  .warning {\n    color: #690b0b;\n    font-size: 12px;\n  }\n"]);return Da=function(){return e},e}function Fa(){const e=(0,r._)(["\n  display: block;\n  margin-top: 5px;\n  color: #a31b1b;\n  font-size: 12px;\n  font-family: 'arial';\n"]);return Fa=function(){return e},e}const Oa=m.ZP.div(Da()),qa=m.ZP.span(Fa());var Ra=e=>{const t=(0,l.useRef)(null),{onChange:n,schemaType:a,value:o=""}=e,[r,c]=(0,l.useState)(!1),[u,d]=(0,l.useState)(null);(0,l.useEffect)((()=>{const e=setTimeout((()=>{const e=(e=>{if(!e)return!0;try{return JSON.parse(e),!0}catch(t){return!1}})(o);c(e)}),1e3);return()=>clearTimeout(e)}),[o]);const p=(0,l.useCallback)((e=>{n([(0,s.CbY)({_type:a.name}),(0,s.t8m)(e)])}),[n,a]),m=e=>{try{const t=JSON.parse(e);return JSON.stringify(t,null,2)}catch(t){return e}};(0,l.useCallback)((e=>{if(e){const t=m(o);
1new La.F6,new Pa.tk({parent:e,doc:t,extensions:[Ba.Xy,(0,Aa.json)(),Ma(p),Pa.$f.of([Ea.oc]),Va.m4]})}}),[p,o]);return(0,l.useEffect)((()=>{if(t&&!u){const e=m(o),n=(new La.F6).of(Va.m4),i=new Pa.tk({parent:t.current,doc:e,extensions:[Ba.Xy,(0,Aa.json)(),Ma(p),Pa.$f.of([Ea.oc]),n]});d(i)}}),[u,p,o]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Oa,{ref:t}),!r&&(0,i.jsx)(qa,{className:"warning",children:"Warning: JSON is not valid!"})]})};const Za=(0,s.Cw0)({name:"json",schema:{types:[{name:"json",title:"JSON",type:"string",components:{input:Ra}}]}});function Ha(){const e=(0,r._)(["\n  height: 640px;\n"]);return Ha=function(){return e},e}function Ja(){const e=(0,r._)(["\n  min-height: 500px;\n  width: 100%;\n  height: 100%;\n  border: none;\n"]);return Ja=function(){return e},e}const Ga=(0,m.ZP)(Bt.Vq)(Ha()),Ua=m.ZP.iframe(Ja());const $a={icon:function(){return(0,i.jsx)(i.Fragment,{children:"\ud83d\udca2"})},name:"bouImageOptimizer",title:"Bou Image Optimizer",component:function(e){const t=(0,l.useCallback)((t=>{if("optimized_file_upload"===t.data.event){const n=new File([t.data.blob],t.data.filename,{type:"image/jpeg"});e.onSelect([{kind:"file",value:n}])}}),[e]);return(0,l.useEffect)((()=>(window.addEventListener("message",t),()=>window.removeEventListener("message",t))),[t]),(0,i.jsx)(Ga,{id:"bou-optimizer",header:"Bou Image Optimizer",onClose:e.onClose,open:!0,width:2,children:(0,i.jsx)(Ua,{src:"https://optimizer.bou.app",title:"uploader"})})}},Wa=(0,s.rxu)({name:"bouImageOptimizer",form:{file:{assetSources:e=>[...e,$a]},image:{assetSources:e=>[...e,$a]}}});function Ya(){const e=(0,r._)(["\n  position: relative;\n  padding: 0 20px;\n  & ~ * {\n    transition: opacity 200ms ease-out;\n  }\n"]);return Ya=function(){return e},e}function Xa(){const e=(0,r._)(["\n  position: absolute;\n  right: 0;\n  display: grid;\n  gap: 10px;\n  grid-auto-flow: column;\n  justify-content: end;\n"]);return Xa=function(){return e},e}function Qa(){const e=(0,r._)(["\n  border: 1px solid #eee;\n  font-size: 12px;\n  border-radius: 8px;\n  padding: 0.5em 1.2em;\n  border-radius: 4px;\n  background: none;\n  cursor: pointer;\n  &:disabled {\n    opacity: 0.6;\n  }\n"]);return Qa=function(){return e},e}function Ka(){const e=(0,r._)(["\n  padding: 20px;\n"]);return Ka=function(){return e},e}function eo(){const e=(0,r._)(["\n  width: 100%;\n  width: 500px;\n  max-width: 100%;\n  display: block;\n  border: 1px solid #888;\n  margin-bottom: 30px;\n  font-size: 14px;\n"]);return eo=function(){return e},e}function to(){const e=(0,r._)(["\n  display: grid;\n  gap: 10px;\n  grid-auto-flow: column;\n"]);return to=function(){return e},e}const{apiVersion:no}=bn.commonEnvironment.sanity,io=m.ZP.div(Ya()),lo=m.ZP.div(Xa()),ao=m.ZP.button(Qa());var oo=e=>{const{path:t}=e,[n,a]=(0,l.useState)(!1),[o,r]=(0,l.useState)(!1),c=(0,l.useMemo)((()=>{const e=[...t];return e.pop(),e}),[t]),u=(0,s.tdq)(c),d=(0,l.useCallback)((()=>{try{navigator.clipboard.writeText(JSON.stringify(u,null,2)),r(!0)}catch(e){}}),[u]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(lo,{children:[(0,i.jsx)(ao,{disabled:o,onClick:d,children:o?"Copied!":"Copy"}),(0,i.jsx)(ao,{disabled:o,onClick:()=>a(!0),children:o?"Can't paste here":"Paste"})]}),n&&(0,i.jsx)(Bt.Vq,{id:"paste",header:(0,i.jsx)("p",{children:"Paste content"}),onClose:()=>a(!1),children:(0,i.jsx)(uo,{path:c})})]})};const ro=m.ZP.div(Ka()),so=m.ZP.textarea(eo()),co=m.ZP.div(to()),uo=e=>{let{path:t}=e;const n=(0,s.tdq)([]),a=(0,s.m85)({apiVersion:no}),[o,r]=(0,l.useState)(void 0),c=(0,l.useMemo)((()=>{if(!o)return!1;if(!o.includes("_type"))return!1;try{if(JSON.parse(o))return!0}catch(e){return!1}}),[o]),u=(0,l.useCallback)((async()=>{try{const e=o.match(/"_key": "(\w|\d)+"/g).reduce(((e,t)=>e.replace(t,'"_key": "'.concat((0,At.x0)(6),'"'))),o),i=JSON.parse(e);if(i){const e=t.reduce(((e,t)=>{if("object"===typeof t){if(Array.isArray(t))throw Error("IndexTuple path segment is not implemented!");return e+'[_key=="'+t._key+'"]'}return e?e+"."+t:String(t)}),"");await a.patch(n._id).set({[e]:i}).commit()}}catch(e){}}),[a,n._id,t,o]);return(0,i.jsxs)(ro,{children:[(0,i.jsx)(so,{placeholder:"Paste here (note: only valid data is allowed)",onChange:e=>r(e.target.value),rows:3}),(0,i.jsx)(co,{children:(0,i.jsx)(Bt.zx,{tone:"critical",disabled:!c,onClick:u,textAlign:"center",children:"Update content"})})]})},po=(0,s.Cw0)({name:"copy-object",schema:{types:[{name:"copy-object",title:"Locale selector",type:"string",components:{field:io,input:oo}}]}});function mo(){const e=(0,r._)(["\n  padding: 20px;\n"]);return mo=function(){return e},e}function fo(){const e=(0,r._)(["\n  width: 100%;\n  max-width: 100%;\n  display: block;\n  border: 1px solid #888;\n  margin-bottom: 30px;\n  font-size: 14px;\n"]);return fo=function(){return e},e}function go(){const e=(0,r._)(["\n  display: grid;\n  gap: 10px;\n  grid-auto-flow: column;\n"]);return go=function(){return e},e}const{apiVersion:ho}=bn.commonEnvironment.sanity,yo=e=>{let{onComplete:t,id:n}=e;const[a,o]=(0,l.useState)(!1),r=(0,s.m85)({apiVersion:ho}),c=(0,l.useCallback)((async()=>{const e=await r.fetch('*[_id == "'.concat(n,'" || _id == "drafts.').concat(n,'"] | order(_id desc) [0]'));navigator.clipboard.writeText(JSON.stringify(e,null,2))}),[r,n]);return{label:"Copy current document",onHandle:()=>{c(),o(!0)},dialog:a&&{type:"popover",content:(0,i.jsx)("p",{style:{padding:"10px"},children:"Document copied!"}),onClose:t}}},vo=m.ZP.div(mo()),bo=m.ZP.textarea(fo()),wo=m.ZP.div(go()),xo=e=>
1{let{onComplete:t,id:n,draft:a,published:o}=e;const r=(0,s.m85)({apiVersion:ho}),[c,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(void 0),m=(0,l.useMemo)((()=>{if(!d)return!1;if(!d.includes("_type"))return!1;try{if(JSON.parse(d))return!0}catch(e){return!1}}),[d]),f=(0,l.useCallback)((async()=>{try{const e=d.match(/"_id": "(\w|\d|\.|-)+"/g).reduce(((e,t)=>e.replace(t,'"_id": "drafts.'.concat(n,'"'))),d),t=JSON.parse(e);a?(delete t._id,await r.patch(a._id).set(t).commit()):await r.createOrReplace(t),u(!1)}catch(e){alert("Something went wrong!"),console.log({error:e})}}),[r,a,n,d]);return{label:"Paste document data",onHandle:()=>{u(!0)},dialog:c&&{type:"dialog",onClose:t,content:(0,i.jsxs)(vo,{children:[(0,i.jsx)(bo,{placeholder:"Paste here (note: only valid data is allowed)",onChange:e=>p(e.target.value),rows:8}),(0,i.jsx)(wo,{children:(0,i.jsx)(Bt.zx,{tone:"critical",disabled:!m,onClick:f,textAlign:"center",children:"Update content"})})]})}}};var ko=n(47639);function zo(){const e=(0,r._)(["\n  min-height: 500px;\n  width: 100%;\n  height: 100%;\n  border: none;\n"]);return zo=function(){return e},e}const Io=m.ZP.iframe(zo());function Co(){const e=(0,r._)(["\n  min-height: 500px;\n  width: 100%;\n  height: 100%;\n  border: none;\n"]);return Co=function(){return e},e}const To=m.ZP.iframe(Co());function So(){const e=(0,r._)(["\n      *[data-ui='Navbar'] {\n        display: none;\n      }\n    "]);return So=function(){return e},e}function jo(){const e=(0,r._)(["\n  height: 100%;\n  ","\n"]);return jo=function(){return e},e}const No=m.ZP.div(jo(),(e=>{let{hideNavigation:t}=e;return t?(0,m.iv)(So()):null})),_o=e=>{let{hideNavigation:t,documentId:n,documentType:a}=e;const o=(r=c.N.sanity,m={documentId:n,documentType:a},(0,l.useMemo)((()=>{try{return(0,s.ZDM)([{name:"default",title:"Website",projectId:r.projectId,dataset:r.dataset,basePath:"/sanity-studio",tools:[{title:"Sanity 101 Guide",name:"sanity-guide-tool",icon:f.aHI,component:e=>(0,i.jsx)(Io,{src:"https://coda.io/embed/tfnwC8_BhS/_suf1Z?viewMode=embedplay",title:"uploader"})},{title:"Blocks Documentation",name:"blocks-documentation-tool",icon:f.aHI,component:e=>(0,i.jsx)(To,{src:"https://coda.io/embed/7He9lRFwiI/_suf1Z?viewMode=embedplay",title:"uploader"})}],plugins:[Za(),(0,ko.Nv)(),w(),Wa(),po(),(0,u.P0)({defaultDocumentNode:(e,t)=>{let{schemaType:n}=t;return p.As.map((e=>e.contentType)).includes(n)?e.document({views:[e.view.form().title("Editor"),e.view.component(Zn).title("Preview").options({schemaType:n})]}):null},structure:Na(m)}),(0,_a.B)(),(0,d.T)({defaultApiVersion:bn.commonEnvironment.sanity.apiVersion,defaultDataset:c.N.sanity.dataset})],schema:{types:Ia,templates:e=>{const t=e.filter((e=>{const t=e.id;return!t.includes("-proxy")&&(!!Ta.includes(t)||!!Sa.includes(t)||!ja.includes(t))}));return[...Kn,...pa,...ra,...t]}},document:{actions:e=>[...e,yo,xo]}}])}catch(e){return(0,x.f)("Something went wrong while creating config!",{error:e}),null}}),[r.dataset,r.projectId,m]));var r,m;return o?(0,i.jsx)(s.LOQ,{config:o,children:(0,i.jsx)(No,{hideNavigation:t,children:(0,i.jsx)(s.WVR,{})})}):null};var Bo=n(88177);const Ao="/sanity-studio/desk/",Po=(0,Bo.zo)("div",{height:"100vh",maxHeight:"100%"});function Mo(){const[e,t]=(0,l.useState)(!1),n=(0,l.useMemo)((()=>{if("undefined"===typeof location||!e)return null;const t=new URL(location.href);return{path:t.pathname||Ao,hideNavigation:Boolean(t.searchParams.get("hideNavigation")),documentType:t.searchParams.get("documentType"),documentId:t.searchParams.get("documentId")}}),[e]);return n?(0,i.jsxs)(Po,{children:[(0,i.jsxs)(o(),{children:[(0,i.jsx)("title",{children:"Sanity Studio"}),(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,i.jsx)(_o,{...n})]}):(0,i.jsx)(xn.ZP,{ref:()=>t(!0)})}},65036:function(e,t,n){"use strict";n.d(t,{I7:function(){return y},Or:function(){return o},Nd:function(){return w},Tz:function(){return x}});var i=n(87511),l=n(47477);"{\n\t_id,\n  _type,\n  slug,\n  title,\n  date,\n  thumbnail ".concat(i.aJ,",\n  metaTitle,\n  metaDescription,\n  defined(metaImage.asset) => {metaImage ").concat(i.GZ,'},\n  "mansionCategories": categories[]->{...},\n  link,\n  body ').concat(l.ll,",\n}");var a=n(13663);const o="{\n  _id,\n  _type,\n  slug,\n  title,\n  date,\n  thumbnail ".concat(a.aJ,",\n  metaTitle,\n  metaDescription,\n  defined(metaImage.asset) => {metaImage ").concat(a.GZ,'},\n  "mansionCategories": categories[]->{...},\n  body ').concat(l.ll,",\n}");n(54602);"\n  ...,\n  gridAsset ".concat(a.aJ,",\n  hoverAsset ").concat(a.aJ,",\n  modalAsset ").concat(a.aJ,",\n");n(42719);const r="globalSettings->{\n    ...,\n    storeImage ".concat(a.GZ,",\n    mansionStoreAsset ").concat(a.aJ,",\n    mansionStoreAssetBackgroun
1d ").concat(a.aJ,",\n    tokenModal -> {\n      ...,\n      asset ").concat(a.aJ,",\n      assetSecondary ").concat(a.aJ,",\n    },\n    ...*[_id == ^._id+'-'+$localeId][0]{...}\n  }");var s=n(73235),c=n(9633);const u=n(10984).xi.map((e=>'"'.concat(e,"\": \"/\" + *[_id match '*' + ^._id + '-").concat(e,"'][0].slug.current"))),d='*[_type == ^._type + "-proxy" && ^._id match ["*" + _id + "-*"]][0] {\n  "keepLocales": true,\n  '.concat(u,"\n}");var p=n(66570);function m(){const e=(0,s._)(["*[_type == \"article-proxy\" && (_id + '-' + $localeId == ^._id || 'drafts.' + _id + '-' + $localeId ==  ^._id)][0]"]);return m=function(){return e},e}function f(){const e=(0,s._)(['{\n  _id,\n  _type,\n  slug,\n  "redirects": ',",\n  metaTitle,\n  metaDescription,\n  defined(metaImage.asset) => {metaImage ",'},\n  !defined(metaImage.asset) => {"metaImage": mainImageDesktop ','},\n  title,\n  date,\n  "ingress" : ingress ',",\n  mainImageDesktop ",",\n  heroAsset ",",\n  heroAssetFill,\n  scrollBlock {\n    ...,\n    backgroundAssets[] {\n      span,\n      asset ","\n    },\n  },\n  author -> {",'},\n  "categories": ','.categories[]->{...},\n  "blocks": blocks [!defined(locales) || locales[$localeId]] {\n    ',"\n  }\n}"]);return f=function(){return e},e}const g="firstName, lastName, mainImageDesktop ".concat(a.GZ),h=(0,c.Z)(m()),y=(0,c.Z)(f(),d,a.GZ,a.GZ,l.ll,a.GZ,a.aJ,a.aJ,g,h,p.oD);function v(){const e=(0,s._)(["*[_type == \"page-proxy\" && (_id + '-' + $localeId == ^._id || 'drafts.' + _id + '-' + $localeId ==  ^._id)][0]"]);return v=function(){return e},e}const b=(0,c.Z)(v()),w='{\n  _id,\n  _type,\n  slug,\n  "redirects": '.concat(d,",\n  metaTitle,\n  metaDescription,\n  metaImage,\n  defined(metaImage.asset) => {metaImage ").concat(a.GZ,'},\n  "blocks": blocks [!defined(locales) || locales[$localeId]] {\n    ').concat(p.oD,'\n  },\n  "pageLayout": ').concat(b,".pageLayout\n}"),x='{\n  metaTitle,\n  metaDescription,\n  metaImage,\n  "blocks": blocks [] {\n    '.concat(p.oD,"\n  },\n  ").concat(r,"\n}")},51736:function(e,t,n){"use strict";n.d(t,{E:function(){return a}});var i=n(10984),l=n(65036);const a=e=>{switch(e){case i.qp.News:return l.Or;case i.qp.Page:return l.Nd;case i.qp.Article:return l.I7;default:return console.log('No projections set for "'.concat(e,'"')),l.Nd}}},65612:function(e,t,n){"use strict";n.d(t,{U:function(){return c}});var i=n(63420),l=n(77485),a=n.n(l),o=n(76367),r=n(26362);const s={join:(e,t)=>Array.isArray(e)?e.join(t):e,date:e=>{const t=new Date(e);if(!t||isNaN(t.getTime()))return e;try{const e=new Intl.DateTimeFormat("en",{day:"2-digit",month:"2-digit",year:"numeric"}),{day:n,month:i,year:l}=e.formatToParts(t).reduce(((e,t)=>{const{type:n,value:i}=t;return e[n]=i,e}),{});return"".concat(n,".").concat(i,".").concat(l)}catch(n){return(0,r.f)("Could not format date!",{err:n,date:e,dateObj:t}),e}},getAssetUrl:e=>{if(!e)return null;try{return(0,i.Vh)(e)}catch(t){return null}},getBlurHashUrl:e=>{if(!e)return null;try{return(0,i.oo)(e)}catch(t){return null}},readTime:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"min",n=0;JSON.stringify(e).match(/"(text|title)":"[^"]*/g).forEach((e=>{const t=e.split(" ");n+=t.length}));const i=Math.ceil(n/120);return"".concat(i," ").concat(t)},htmlToText:e=>(0,o.Z6)(e,!0)},c=async e=>{let{template:t,values:n}=e;const i=n.reduce(((e,t)=>d(e,t)),u(t,n));try{return JSON.parse(i)}catch(l){if(!l.message)throw"Could not parse merged JSON!";const[e]=l.message.match(/\d+$/gi),t=Number(e),n=i.slice(Math.max(t-50,0),Math.min(t+50,i.length-1));throw console.log("Error is here:\n-----\n...",n,"...\n-----"),"Could not parse merged JSON!"}},u=(e,t)=>{try{const n=t.reduce(((e,t)=>({...t,...e})),e);return JSON.stringify(n)}catch(n){throw(0,r.f)("Prepare template data:",{template:e,values:t}),new Error("Could not prepare template!")}},d=(e,t)=>e.replace(/{\s?"_type":"contextBlocks"[^}]*}/gi,(e=>t.blocks?JSON.stringify(t.blocks).slice(1,-1):"article"!=t._type||t.blocks?e:JSON.stringify([{ignore:"ignore"}]))).replace(/(")?{{([^{}]+)}}(")?/g,(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const{defaultVariable:o,optionalVariable:r,functionName:c}=i.match(/([^{}|]+)(?:\|\|([^{}|]+))?(?:\|([^{}|]+))?/).reduce(((e,t,n)=>{if(!t)return e;const i=t.trim();switch(n){case 1:e.defaultVariable=i;break;case 2:e.optionalVariable=i;break;case 3:e.functionName=i}return e}),{});function u(){let e=null;return[o,r].forEach((n=>{if(!e){"..."===n&&(e=t);/^'.+'$|^\\".+\\"$/gi.test(n)&&(e=n.replace(/\\?"|'/g,""));const i=a()(t,n);i&&(e=i)}})),c&&s[c]?s[c](e):e}const d=u();if(null===d||void 0===d)return null===d?null:e;if("object"===typeof d||"boolean"===typeof d){if(n&&l)return"object"===typeof d?JSON.stringify(d):String(d);if("object"===typeof d)return n+JSON.stringify(d)+l}return JSON.stringify(d).replace(/^"/,n).replace(/"$/,l)}))},99256:function(e,t,n){"use strict";n.d(t,{l:function(){return l}});var i=n(26362);const l=e=>e?Object.entries(e).reduce(((e,t)=>
1{let[n,l]=t;try{if("blocks"===n)e[n]=null===l||void 0===l?void 0:l.reduce(((e,t)=>{if(!t||"object"!==typeof t)return e;switch(t._type){case"dynamicBlock":e.push(JSON.parse(t.values));break;case"blockGroupBlock":try{e.push(...t.reference.blocks)}catch(n){}break;default:e.push(t)}return e}),[]);else e[n]=l;return e}catch(a){return(0,i.f)("Parse entry error!",a),e[n]=l,e}}),{}):null},53260:function(){}},function(e){e.O(0,[9774,4424,5873,7433,1777,9653,1208,241,1015,4873,5206,3117,3832,8917,480,6253,6621,1666,5789,2123,6037,3661,6556,4949,6780,7784,6570,2888,179],(function(){return t=88507,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.