(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[24],{6803:function(t){t.exports=function(){function _extends(){return(_extends=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,i=Array(e);r=t.length?{done:!0}:{done:!1,value:t[e++]}};throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=t[Symbol.iterator]()).next.bind(e)}(e);!(r=i()).done;){var n=r.value,o=n[0],a=n[1];if(t===o||t===a)return o}return t}(n)]=t[n]);return new ImageUrlBuilder(this,_extends({baseUrl:r},i))},o.image=function(t){return this.withOptions({source:t})},o.dataset=function(t){return this.withOptions({dataset:t})},o.projectId=function(t){return this.withOptions({projectId:t})},o.bg=function(t){return this.withOptions({bg:t})},o.dpr=function(t){return this.withOptions({dpr:t})},o.width=function(t){return this.withOptions({width:t})},o.height=function(t){return this.withOptions({height:t})},o.focalPoint=function(t,e){return this.withOptions({focalPoint:{x:t,y:e}})},o.maxWidth=function(t){return this.withOptions({maxWidth:t})},o.minWidth=function(t){return this.withOptions({minWidth:t})},o.maxHeight=function(t){return this.withOptions({maxHeight:t})},o.minHeight=function(t){return this.withOptions({minHeight:t})},o.size=function(t,e){return this.withOptions({width:t,height:e})},o.blur=function(t){return this.withOptions({blur:t})},o.sharpen=function(t){return this.withOptions({sharpen:t})},o.rect=function(t,e,r,i){return this.withOptions({rect:{left:t,top:e,width:r,height:i}})},o.format=function(t){return this.withOptions({format:t})},o.invert=function(t){return this.withOptions({invert:t})},o.orientation=function(t){return this.withOptions({orientation:t})},o.quality=function(t){return this.withOptions({quality:t})},o.forceDownload=function(t){return this.withOptions({download:t})},o.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},o.flipVertical=function(){return this.withOptions({flipVertical:!0})},o.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},o.fit=function(t){if(-1===r.indexOf(t))throw Error('Invalid fit mode "'+t+'"');return this.withOptions({fit:t})},o.crop=function(t){if(-1===i.indexOf(t))throw Error('Invalid crop mode "'+t+'"');return this.withOptions({crop:t})},o.saturation=function(t){return this.withOptions({saturation:t})},o.auto=function(t){if(-1===n.indexOf(t))throw Error('Invalid auto mode "'+t+'"');return this.withOptions({auto:t})},o.pad=function(t){return this.withOptions({pad:t})},o.url=function(){return function(r){var i=_extends({},r||{}),n=i.source;delete i.source;var o=function(t){var e;if(!t)return null;if("string"==typeof t&&/^https?:\/\//.test(""+t))e={asset:{_ref:urlToId(t)}};else if("string"==typeof t)e={asset:{_ref:t}};else if(t&&"string"==typeof t._ref)e={asset:t};else if(t&&"string"==typeof t._id)e={asset:{_ref:t._id||""}};else if(t&&t.asset&&"string"==typeof t.asset.url)e={asset:{_ref:urlToId(t.asset.url)}};else{if("object"!=typeof t.asset)return null;e=t}return t.crop&&(e.crop=t.crop),t.hotspot&&(e.hotspot=t.hotspot),function(t){if(t.crop&&t.hotspot)return t;var e=_extends({},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}(e)}(n);if(!o)return null;var a=function(e){var r=e.split("-"),i=r[1],n=r[2],o=r[3];if(!i||!n||!o)throw Error("Malformed asset _ref '"+e+"'. Expected an id like \""+t+'".');var a=n.split("x"),s=a[0],u=a[1],h=+s,f=+u;if(!(isFinite(h)&&isFinite(f)))throw Error("Malformed asset _ref '"+e+"'. Expected an id like \""+t+'".');return{id:i,width:h,height:f,format:o}}(o.asset._ref||o.asset._id||""),s=Math.round(o.crop.left*a.width),u=Math.round(o.crop.top*a.height),h={left:s,top:u,width:Math.round(a.width-o.crop.right*a.width-s),height:Math.round(a.height-o.crop.bottom*a.height-u)},f=o.hotspot.height*a.height/2,l=o.hotspot.width*a.width/2,p=o.hotspot.x*a.width,c=o.hotspot.y*a.height;return i.rect||i.focalPoint||i.ignoreImageParams||i.crop||(i=_extends(_extends({},i),function(t,e){var r,i=e.width,n=e.height;if(!(i&&n))return{width:i,height:n,rect:t.crop};var o=t.crop,a=t.hotspot,s=i/n;if(o.width/o.height>s){var u=o.height,h=u*s,f=o.top,l=(a.right-a.left)/2+a.left-h/2;lo.left+o.width&&(l=o.left+o.width-h),r={left:Math.round(l),top:Math.round(f),width:Math.round(h),height:Math.round(u)}}else{var p=o.width,c=p/s,d=o.left,m=(a.bottom-a.top)/2+a.top-c/2;mo.top+o.height&&(m=o.top+o.height-c),r={left:Math.max(0,Math.floor(d)),top:Math.max(0,Math.floor(m)),width:Math.round(p),height:Math.round(c)}}return{width:i,height:n,rect:r}}({crop:h,hotspot:{left:p-l,top:c-f,right:p+l,bottom:c+f}},i))),function(t){var r=t.baseUrl||"https://cdn.sanity.io",i=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format,n=r+"/images/"+t.projectId+"/"+t.dataset+"/"+i,o=[];if(t.rect){var a=t.rect,s=a.left,u=a.top,h=a.width,f=a.height;(0!==s||0!==u||f!==t.asset.height||h!==t.asset.width)&&o.push("rect="+s+","+u+","+h+","+f)}t.bg&&o.push("bg="+t.bg),t.focalPoint&&(o.push("fp-x="+t.focalPoint.x),o.push("fp-y="+t.focalPoint.y));var l=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return(l&&o.push("flip="+l),e.forEach(function(e){var r=e[0],i=e[1];void 0!==t[r]?o.push(i+"="+encodeURIComponent(t[r])):void 0!==t[i]&&o.push(i+"="+encodeURIComponent(t[i]))}),0===o.length)?n:n+"?"+o.join("&")}(_extends(_extends({},i),{},{asset:a}))}(this.options)},o.toString=function(){return this.url()},ImageUrlBuilder}();return function(t){if(t&&"object"==typeof t.clientConfig){var e=t.clientConfig,r=e.apiHost,i=e.projectId,n=e.dataset;return new o(null,{baseUrl:(r||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:i,dataset:n})}return new o(null,t)}}()},12870:function(t){"use strict";t.exports=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i