1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9498],{71179:(t,e,i)=>{function r(t){return"span"===t._type&&"text"in t&&"string"==typeof t.text&&(void 0===t.marks||Array.isArray(t.marks)&&t.marks.every(t=>"string"==typeof t))}function n(t){return"string"==typeof t._type&&"@"!==t._type[0]&&(!("markDefs"in t)||!t.markDefs||Array.isArray(t.markDefs)&&t.markDefs.every(t=>"string"==typeof t._key))&&"children"in t&&Array.isArray(t.children)&&t.children.every(t=>"object"==typeof t&&"_type"in t)}function o(t){return n(t)&&"listItem"in t&&"string"==typeof t.listItem&&(void 0===t.level||"number"==typeof t.level)}function s(t){return"@list"===t._type}function l(t){return"@span"===t._type}function h(t){return"@text"===t._type}i.d(e,{IG:()=>n,Pq:()=>f,YA:()=>h,bo:()=>w,fg:()=>function t(e){let i="";return e.children.forEach(e=>{h(e)?i+=e.text:l(e)&&(i+=t(e))}),i},iS:()=>u,mn:()=>y,n2:()=>o,tO:()=>l,zp:()=>s});let a=["strong","em","code","underline","strike-through"];function p(t,e,i){if(!r(t)||!t.marks||!t.marks.length)return[];let n=t.marks.slice(),o={};return n.forEach(t=>{o[t]=1;for(let n=e+1;n<i.length;n++){let e=i[n];if(e&&r(e)&&Array.isArray(e.marks)&&-1!==e.marks.indexOf(t))o[t]++;else break}}),n.sort((t,e)=>(function(t,e,i){let r=t[e],n=t[i];if(r!==n)return n-r;let o=a.indexOf(e),s=a.indexOf(i);return o===s?e.localeCompare(i):o-s})(o,t,e))}function f(t){let{children:e}=t,i=t.markDefs??[];if(!e||!e.length)return[];let n=e.map(p),o={_type:"@span",children:[],markType:"<unknown>"},s=[o];for(let t=0;t<e.length;t++){let o=e[t];if(!o)continue;let l=n[t]||[],h=1;if(s.length>1)for(;h<s.length;h++){let t=s[h]?.markKey||"",e=l.indexOf(t);if(-1===e)break;l.splice(e,1)}let a=(s=s.slice(0,h))[s.length-1];if(a){for(let t of l){let e=i?.find(e=>e._key===t),r={_type:"@span",_key:o._key,children:[],markDef:e,markType:e?e._type:t,markKey:t};a.children.push(r),s.push(r),a=r}if(r(o)){let t=o.text.split("\n");for(let e=t.length;e-- >1;)t.splice(e,0,"\n");a.children=a.children.concat(t.map(t=>({_type:"@text",text:t})))}else a.children=a.children.concat(o)}}return o.children}function u(t,e){let i=[],r;for(let l=0;l<t.length;l++){let h=t[l];if(h){var n,s;if(!o(h)){i.push(h),r=void 0;continue}if(!r){r=c(h,l,e),i.push(r);continue}if(n=h,s=r,(n.level||1)===s.level&&n.listItem===s.listItem){r.children.push(h);continue}if((h.level||1)>r.level){let t=c(h,l,e);if("html"===e){let e=r.children[r.children.length-1],i={...e,children:[...e.children,t]};r.children[r.children.length-1]=i}else r.children.push(t);r=t;continue}if((h.level||1)<r.level){let t=i[i.length-1],n=t&&d(t,h);if(n){(r=n).children.push(h);continue}r=c(h,l,e),i.push(r);continue}if(h.listItem!==r.listItem){let t=i[i.length-1],n=t&&d(t,{level:h.level||1});if(n&&n.listItem===h.listItem){(r=n).children.push(h);continue}r=c(h,l,e),i.push(r);continue}console.warn("Unknown state encountered for block",h),i.push(h)}}return i}function c(t,e,i){return{_type:"@list",_key:`${t._key||`${e}`}-parent`,mode:i,level:t.level||1,listItem:t.listItem,children:[t]}}function d(t,e){let i=e.level||1,n=e.listItem||"normal",o="string"==typeof e.listItem;if(s(t)&&(t.level||1)===i&&o&&(t.listItem||"normal")===n)return t;if(!("children"in t))return;let l=t.children[t.children.length-1];return l&&!r(l)?d(l,e):void 0}let m=/^\s/,g=/\s$/;function w(t){let e=Array.isArray(t)?t:[t],i="";return e.forEach((t,o)=>{if(!n(t))return;let s=!1;t.children.forEach(t=>{r(t)?(i+=s&&i&&!g.test(i)&&!m.test(t.text)?" ":"",i+=t.text,s=!1):s=!0}),o!==e.length-1&&(i+="\n\n")}),i}let y="html"},83316:(t,e,i)=>{let r;i.d(e,{OX:()=>u});let n="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function o(t){return`image-${t.split("/").slice(-1)[0]}`.replace(/\.([a-z]+)$/,"-$1")}let s=[["width","w"],["height","h"],["format","fm"],["download","dl"],["blur","blur"],["sharpen","sharp"],["invert","invert"],["orientation","or"],["minHeight","min-h"],["maxHeight","max-h"],["minWidth","min-w"],["maxWidth","max-w"],["quality","q"],["fit","fit"],["crop","crop"],["saturation","sat"],["auto","auto"],["dpr","dpr"],["pad","pad"],["frame","frame"]],l=["clip","crop","fill","fillmax","max","scale","min"],h=["top","bottom","left","right","center","focalpoint","entropy"],a=["format"];function p(t){let{apiHost:e,projectId:i,dataset:r}=t,n={baseUrl:(e||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn.")},o=t.resource??t["~experimental_resource"];if(o?.type==="media-library"){if("string"!=typeof o.id||0===o.id.length)throw Error('Media library clients must include an id in "resource"');return{...n,mediaLibraryId:o.id}}if(o?.type==="canvas"){if("string"!=typeof o.id||0===o.id.length)throw Error('Canvas clients must include an id in "resource"');return{...n,canvasId:o.id}}if(o?.type==="dataset"){if("string"!=typeof o.id||0===o.id.length)throw Error('Dataset clients must include an id in "resource"');let[t,e]=o.id.split(".");if(!t||!e)throw Error('Dataset resource id must be in the format "projectId.dataset", got: '+o.id);return{...n,projectId:t,dataset:e}}return{...n,projectId:i,dataset:r}}function f(t){return t&&"config"in t&&"function"==typeof t.config?p(t.config()):t&&"clientConfig"in t&&"object"==typeof t.clientConfig?p(t.clientConfig):t||{}}function u(t){return new c(null,f(t))}class c{options;constructor(t,e){this.options=t?{...t.options||{},...e||{}}:{...e||{}}}withOptions(t){return new c(this,function(t,e){let i=e.baseUrl||t.baseUrl,r={baseUrl:i};for(let t in e)e.hasOwnProperty(t)&&(r[function(t){for(let e of s){let[i,r]=e;if(t===i||t===r)return i}return t}(t)]=e[t]);return{baseUrl:i,...r}}(this.options,t))}image(t){return this.withOptions({source:t})}dataset(t){return this.withOptions({dataset:t})}projectId(t){return this.withOptions({projectId:t})}withClient(t){let e=f(t),i={...this.options};return delete i.baseUrl,delete i.projectId,delete i.dataset,delete i.mediaLibraryId,delete i.canvasId,new c(null,{...e,...i})}bg(t){return this.withOptions({bg:t})}dpr(t){return this.withOptions(t&&1!==t?{dpr:t}:{})}width(t){return this.withOptions({width:t})}height(t){return this.withOptions({height:t})}focalPoint(t,e){return this.withOptions({focalPoint:{x:t,y:e}})}maxWidth(t){return this.withOptions({maxWidth:t})}minWidth(t){return this.withOptions({minWidth:t})}maxHeight(t){return this.withOptions({maxHeight:t})}minHeight(t){return this.withOptions({minHeight:t})}size(t,e){return this.withOptions({width:t,height:e})}blur(t){return this.withOptions({blur:t})}
1sharpen(t){return this.withOptions({sharpen:t})}rect(t,e,i,r){return this.withOptions({rect:{left:t,top:e,width:i,height:r}})}format(t){return this.withOptions({format:t})}invert(t){return this.withOptions({invert:t})}orientation(t){return this.withOptions({orientation:t})}quality(t){return this.withOptions({quality:t})}forceDownload(t){return this.withOptions({download:t})}flipHorizontal(){return this.withOptions({flipHorizontal:!0})}flipVertical(){return this.withOptions({flipVertical:!0})}ignoreImageParams(){return this.withOptions({ignoreImageParams:!0})}fit(t){if(-1===l.indexOf(t))throw Error(`Invalid fit mode "${t}"`);return this.withOptions({fit:t})}crop(t){if(-1===h.indexOf(t))throw Error(`Invalid crop mode "${t}"`);return this.withOptions({crop:t})}saturation(t){return this.withOptions({saturation:t})}auto(t){if(-1===a.indexOf(t))throw Error(`Invalid auto mode "${t}"`);return this.withOptions({auto:t})}pad(t){return this.withOptions({pad:t})}vanityName(t){return this.withOptions({vanityName:t})}frame(t){if(1!==t)throw Error(`Invalid frame value "${t}"`);return this.withOptions({frame:t})}url(){return function(t){let e={...t||{}},i=e.source;delete e.source;let r=function(t){var e;let i;if(!t)return null;if("string"==typeof t&&(e=t,/^https?:\/\//.test(`${e}`)))i={asset:{_ref:o(t)}};else if("string"==typeof t)i={asset:{_ref:t}};else if(t&&"string"==typeof t._ref)i={asset:t};else if(t&&"string"==typeof t._id)i={asset:{_ref:t._id||""}};else if(t&&t.asset&&"string"==typeof t.asset.url)i={asset:{_ref:o(t.asset.url)}};else{if("object"!=typeof t.asset)return null;i={...t}}return t.crop&&(i.crop=t.crop),t.hotspot&&(i.hotspot=t.hotspot),function(t){if(t.crop&&t.hotspot)return t;let e={...t};return e.crop||(e.crop={left:0,top:0,bottom:0,right:0}),e.hotspot||(e.hotspot={x:.5,y:.5,height:1,width:1}),e}(i)}(i);if(!r){if(i&&"object"==typeof i&&null!==i&&i._upload&&(!i.asset||!i.asset._ref))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8HwQACfsD/QNViZkAAAAASUVORK5CYII=";throw Error(`Unable to resolve image URL from source (${JSON.stringify(i)})`)}let l=function(t){let[,e,i,r]=t.split("-");if(!e||!i||!r)throw Error(`Malformed asset _ref '${t}'. Expected an id like "${n}".`);let[o,s]=i.split("x"),l=+o,h=+s;if(!(isFinite(l)&&isFinite(h)))throw Error(`Malformed asset _ref '${t}'. Expected an id like "${n}".`);return{id:e,width:l,height:h,format:r}}(r.asset._ref||r.asset._id||""),h=Math.round(r.crop.left*l.width),a=Math.round(r.crop.top*l.height),p={left:h,top:a,width:Math.round(l.width-r.crop.right*l.width-h),height:Math.round(l.height-r.crop.bottom*l.height-a)},f=r.hotspot.height*l.height/2,u=r.hotspot.width*l.width/2,c=r.hotspot.x*l.width,d=r.hotspot.y*l.height;return e.rect||e.focalPoint||e.ignoreImageParams||e.crop||(e={...e,...function(t,e){let i,r=e.width,n=e.height;if(!(r&&n))return{width:r,height:n,rect:t.crop};let o=t.crop,s=t.hotspot,l=r/n;if(o.width/o.height>l){let t=Math.round(o.height),e=Math.round(t*l),r=Math.max(0,Math.round(o.top)),n=Math.max(0,Math.round(Math.round((s.right-s.left)/2+s.left)-e/2));n<o.left?n=o.left:n+e>o.left+o.width&&(n=o.left+o.width-e),i={left:n,top:r,width:e,height:t}}else{let t=o.width,e=Math.round(t/l),r=Math.max(0,Math.round(o.left)),n=Math.max(0,Math.round(Math.round((s.bottom-s.top)/2+s.top)-e/2));n<o.top?n=o.top:n+e>o.top+o.height&&(n=o.top+o.height-e),i={left:r,top:n,width:t,height:e}}return{width:r,height:n,rect:i}}({crop:p,hotspot:{left:c-u,top:d-f,right:c+u,bottom:d+f}},e)}),function(t){let e,i=(t.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),r=t.vanityName?`/${t.vanityName}`:"",n=`${t.asset.id}-${t.asset.width}x${t.asset.height}.${t.asset.format}${r}`;e=t.mediaLibraryId?`${i}/media-libraries/${t.mediaLibraryId}/images/${n}`:t.canvasId?`${i}/images/canvases/${t.canvasId}/${n}`:`${i}/images/${t.projectId}/${t.dataset}/${n}`;let o=[];if(t.rect){let{left:e,top:i,width:r,height:n}=t.rect;(0!==e||0!==i||n!==t.asset.height||r!==t.asset.width)&&o.push(`rect=${e},${i},${r},${n}`)}t.bg&&o.push(`bg=${t.bg}`),t.focalPoint&&(o.push(`fp-x=${t.focalPoint.x}`),o.push(`fp-y=${t.focalPoint.y}`));
1let l=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return l&&o.push(`flip=${l}`),s.forEach(e=>{let[i,r]=e;"u">typeof t[i]?o.push(`${r}=${encodeURIComponent(t[i])}`):"u">typeof t[r]&&o.push(`${r}=${encodeURIComponent(t[r])}`)}),0===o.length?e:`${e}?${o.join("&")}`}({...e,asset:l})}(this.options)}toString(){return this.url()}}r=["The default export of @sanity/image-url has been deprecated. Use the named export `createImageUrlBuilder` instead."],(...t)=>{console.warn(r.join(" "),...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.