sanity-plugin-taxonomy-manager
Version:
Create and manage SKOS compliant taxonomies, thesauri, and classification schemes in Sanity Studio.
33 lines (32 loc) • 95.6 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("sanity"),t=require("sanity/structure"),n=require("react"),r=require("react-fast-compare"),o=require("rxjs/operators"),i=require("react/jsx-runtime"),s=require("@sanity/ui"),a=require("@sanity/color"),c=require("@sanity/id-utils"),l=require("@sanity/icons"),d=require("nanoid"),p=require("sanity/router"),u=require("react-icons/ai");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(n),m=h(r);const g=t=>{const{onChange:r}=t,o=s.useToast(),a=n.useCallback((()=>{r(e.set(d.nanoid(6))),o.push({status:"success",title:"Identifier created.",closable:!0})}),[r,o]);return i.jsx(s.Stack,{space:2,children:i.jsx(s.Inline,{space:[3,3,4],children:i.jsx(s.Button,{tone:"primary",fontSize:2,onClick:a,text:"Generate Identifier"})})})};var y=function(){return y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},y.apply(this,arguments)};function x(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)(r||!(o in t))&&(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function b(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var v=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,w=b((function(e){return v.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),j="-ms-",C="-moz-",I="-webkit-",k="comm",S="rule",_="decl",T="@import",N="@keyframes",P="@layer",O=Math.abs,E=String.fromCharCode,A=Object.assign;function V(e){return e.trim()}function R(e,t){return(e=t.exec(e))?e[0]:e}function $(e,t,n){return e.replace(t,n)}function M(e,t,n){return e.indexOf(t,n)}function D(e,t){return 0|e.charCodeAt(t)}function z(e,t,n){return e.slice(t,n)}function H(e){return e.length}function F(e){return e.length}function L(e,t){return t.push(e),e}function B(e,t){return e.filter((function(e){return!R(e,t)}))}var U=1,q=1,G=0,W=0,Z=0,Y="";function K(e,t,n,r,o,i,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:U,column:q,length:s,return:"",siblings:a}}function X(e,t){return A(K("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function J(e){for(;e.root;)e=X(e.root,{children:[e]});L(e,e.siblings)}function Q(){return Z=W<G?D(Y,W++):0,q++,10===Z&&(q=1,U++),Z}function ee(){return D(Y,W)}function te(){return W}function ne(e,t){return z(Y,e,t)}function re(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function oe(e){return V(ne(W-1,ae(91===e?e+2:40===e?e+1:e)))}function ie(e){for(;(Z=ee())&&Z<33;)Q();return re(e)>2||re(Z)>3?"":" "}function se(e,t){for(;--t&&Q()&&!(Z<48||Z>102||Z>57&&Z<65||Z>70&&Z<97););return ne(e,te()+(t<6&&32==ee()&&32==Q()))}function ae(e){for(;Q();)switch(Z){case e:return W;case 34:case 39:34!==e&&39!==e&&ae(Z);break;case 40:41===e&&ae(e);break;case 92:Q()}return W}function ce(e,t){for(;Q()&&e+Z!==57&&(e+Z!==84||47!==ee()););return"/*"+ne(t,W-1)+"*"+E(47===e?e:Q())}function le(e){for(;!re(ee());)Q();return ne(e,W)}function de(e){return function(e){return Y="",e}(pe("",null,null,null,[""],e=function(e){return U=q=1,G=H(Y=e),W=0,[]}(e),0,[0],e))}function pe(e,t,n,r,o,i,s,a,c){for(var l=0,d=0,p=s,u=0,h=0,f=0,m=1,g=1,y=1,x=0,b="",v=o,w=i,j=r,C=b;g;)switch(f=x,x=Q()){case 40:if(108!=f&&58==D(C,p-1)){-1!=M(C+=$(oe(x),"&","&\f"),"&\f",O(l?a[l-1]:0))&&(y=-1);break}case 34:case 39:case 91:C+=oe(x);break;case 9:case 10:case 13:case 32:C+=ie(f);break;case 92:C+=se(te()-1,7);continue;case 47:switch(ee()){case 42:case 47:L(he(ce(Q(),te()),t,n,c),c);break;default:C+="/"}break;case 123*m:a[l++]=H(C)*y;case 125*m:case 59:case 0:switch(x){case 0:case 125:g=0;case 59+d:-1==y&&(C=$(C,/\f/g,"")),h>0&&H(C)-p&&L(h>32?fe(C+";",r,n,p-1,c):fe($(C," ","")+";",r,n,p-2,c),c);break;case 59:C+=";";default:if(L(j=ue(C,t,n,l,d,o,a,b,v=[],w=[],p,i),i),123===x)if(0===d)pe(C,t,j,j,v,i,p,a,w);else switch(99===u&&110===D(C,3)?100:u){case 100:case 108:case 109:case 115:pe(e,j,j,r&&L(ue(e,j,j,0,0,o,a,b,o,v=[],p,w),w),o,w,p,a,r?v:w);break;default:pe(C,j,j,j,[""],w,0,a,w)}}l=d=h=0,m=y=1,b=C="",p=s;break;case 58:p=1+H(C),h=f;default:if(m<1)if(123==x)--m;else if(125==x&&0==m++&&125==(Z=W>0?D(Y,--W):0,q--,10===Z&&(q=1,U--),Z))continue;switch(C+=E(x),x*m){case 38:y=d>0?1:(C+="\f",-1);break;case 44:a[l++]=(H(C)-1)*y,y=1;break;case 64:45===ee()&&(C+=oe(Q())),u=ee(),d=p=H(b=C+=le(te())),x++;break;case 45:45===f&&2==H(C)&&(m=0)}}return i}function ue(e,t,n,r,o,i,s,a,c,l,d,p){for(var u=o-1,h=0===o?i:[""],f=F(h),m=0,g=0,y=0;m<r;++m)for(var x=0,b=z(e,u+1,u=O(g=s[m])),v=e;x<f;++x)(v=V(g>0?h[x]+" "+b:$(b,/&\f/g,h[x])))&&(c[y++]=v);return K(e,t,n,0===o?S:a,c,l,d,p)}function he(e,t,n,r){return K(e,t,n,k,E(Z),z(e,2,-2),0,r)}function fe(e,t,n,r,o){return K(e,t,n,_,z(e,0,r),z(e,r+1,-1),r,o)}function me(e,t,n){switch(function(e,t){return 45^D(e,0)?(((t<<2^D(e,0))<<2^D(e,1))<<2^D(e,2))<<2^D(e,3):0}(e,t)){case 5103:return I+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return I+e+e;case 4789:return C+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return I+e+C+e+j+e+e;case 5936:switch(D(e,t+11)){case 114:return I+e+j+$(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return I+e+j+$(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return I+e+j+$(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return I+e+j+e+e;case 6165:return I+e+j+"flex-"+e+e;case 5187:return I+e+$(e,/(\w+).+(:[^]+)/,I+"box-$1$2"+j+"flex-$1$2")+e;case 5443:return I+e+j+"flex-item-"+$(e,/flex-|-self/g,"")+(R(e,/flex-|baseline/)?"":j+"grid-row-"+$(e,/flex-|-self/g,""))+e;case 4675:return I+e+j+"flex-line-pack"+$(e,/align-content|flex-|-self/g,"")+e;case 5548:return I+e+j+$(e,"shrink","negative")+e;case 5292:return I+e+j+$(e,"basis","preferred-size")+e;case 6060:return I+"box-"+$(e,"-grow","")+I+e+j+$(e,"grow","positive")+e;case 4554:return I+$(e,/([^-])(transform)/g,"$1"+I+"$2")+e;case 6187:return $($($(e,/(zoom-|grab)/,I+"$1"),/(image-set)/,I+"$1"),e,"")+e;case 5495:case 3959:return $(e,/(image-set\([^]*)/,I+"$1$`$1");case 4968:return $($(e,/(.+:)(flex-)?(.*)/,I+"box-pack:$3"+j+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+I+e+e;case 4200:if(!R(e,/flex-|baseline/))return j+"grid-column-align"+z(e,t)+e;break;case 2592:case 3360:return j+$(e,"template-","")+e;case 4384:case 3616:return n&&n.some((function(e,n){return t=n,R(e.props,/grid-\w+-end/)}))?~M(e+(n=n[t].value),"span",0)?e:j+$(e,"-start","")+e+j+"grid-row-span:"+(~M(n,"span",0)?R(n,/\d+/):+R(n,/\d+/)-+R(e,/\d+/))+";":j+$(e,"-start","")+e;case 4896:case 4128:return n&&n.some((function(e){return R(e.props,/grid-\w+-start/)}))?e:j+$($(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return $(e,/(.+)-inline(.+)/,I+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(H(e)-1-t>6)switch(D(e,t+1)){case 109:if(45!==D(e,t+4))break;case 102:return $(e,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+C+(108==D(e,t+3)?"$3":"$2-$3"))+e;case 115:return~M(e,"stretch",0)?me($(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return $(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,r,o,i,s,a){return j+n+":"+r+a+(o?j+n+"-span:"+(i?s:+s-+r)+a:"")+e}));case 4949:if(121===D(e,t+6))return $(e,":",":"+I)+e;break;case 6444:switch(D(e,45===D(e,14)?18:11)){case 120:return $(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+I+(45===D(e,14)?"inline-":"")+"box$3$1"+I+"$2$3$1"+j+"$2box$3")+e;case 100:return $(e,":",":"+j)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return $(e,"scroll-","scroll-snap-")+e}return e}function ge(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function ye(e,t,n,r){switch(e.type){case P:if(e.children.length)break;case T:case _:return e.return=e.return||e.value;case k:return"";case N:return e.return=e.value+"{"+ge(e.children,r)+"}";case S:if(!H(e.value=e.props.join(",")))return""}return H(n=ge(e.children,r))?e.return=e.value+"{"+n+"}":""}function xe(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case _:return void(e.return=me(e.value,e.length,n));case N:return ge([X(e,{value:$(e.value,"@","@"+I)})],r);case S:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(R(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":J(X(e,{props:[$(t,/:(read-\w+)/,":"+C+"$1")]})),J(X(e,{props:[t]})),A(e,{props:B(n,r)});break;case"::placeholder":J(X(e,{props:[$(t,/:(plac\w+)/,":"+I+"input-$1")]})),J(X(e,{props:[$(t,/:(plac\w+)/,":"+C+"$1")]})),J(X(e,{props:[$(t,/:(plac\w+)/,j+"input-$1")]})),J(X(e,{props:[t]})),A(e,{props:B(n,r)})}return""}))}}var be={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ve=typeof process<"u"&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",we="active",je="data-styled-version",Ce="6.1.12",Ie="/*!sc*/\n",ke=typeof window<"u"&&"HTMLElement"in window,Se=!!("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:typeof process<"u"&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),_e=/invalid hook call/i,Te=new Set,Ne=Object.freeze([]),Pe=Object.freeze({});var Oe=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Ee=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ae=/(^-|-$)/g;function Ve(e){return e.replace(Ee,"-").replace(Ae,"")}var Re=/(a)(d)/gi,$e=52,Me=function(e){return String.fromCharCode(e+(e>25?39:97))};function De(e){var t,n="";for(t=Math.abs(e);t>$e;t=t/$e|0)n=Me(t%$e)+n;return(Me(t%$e)+n).replace(Re,"$1-$2")}var ze,He=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Fe=function(e){return He(5381,e)};function Le(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function Be(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var Ue="function"==typeof Symbol&&Symbol.for,qe=Ue?Symbol.for("react.memo"):60115,Ge=Ue?Symbol.for("react.forward_ref"):60112,We={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ze={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ye={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ke=((ze={})[Ge]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ze[qe]=Ye,ze);function Xe(e){return("type"in(t=e)&&t.type.$$typeof)===qe?Ye:"$$typeof"in e?Ke[e.$$typeof]:We;var t}var Je=Object.defineProperty,Qe=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols,tt=Object.getOwnPropertyDescriptor,nt=Object.getPrototypeOf,rt=Object.prototype;function ot(e,t,n){if("string"!=typeof t){if(rt){var r=nt(t);r&&r!==rt&&ot(e,r,n)}var o=Qe(t);et&&(o=o.concat(et(t)));for(var i=Xe(e),s=Xe(t),a=0;a<o.length;++a){var c=o[a];if(!(c in Ze||n&&n[c]||s&&c in s||i&&c in i)){var l=tt(t,c);try{Je(e,c,l)}catch{}}}}return e}function it(e){return"function"==typeof e}function st(e){return"object"==typeof e&&"styledComponentId"in e}function at(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ct(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function lt(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function dt(e,t,n){if(void 0===n&&(n=!1),!n&&!lt(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=dt(e[r],t[r]);else if(lt(t))for(var r in t)e[r]=dt(e[r],t[r]);return e}function pt(e,t){Object.defineProperty(e,"toString",{value:t})}var ut="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function ht(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,i=e.length;o<i;o+=1)r.push(e[o]);return r.forEach((function(e){n=n.replace(/%[a-z]/,e)})),n}function ft(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(ht.apply(void 0,x([ut[e]],t,!1)).trim())}var mt=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw ft(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var s=this.indexOfGroup(e+1),a=(i=0,t.length);i<a;i++)this.tag.insertRule(s,t[i])&&(this.groupSizes[e]++,s++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(Ie);return t},e}(),gt=1<<30,yt=new Map,xt=new Map,bt=1,vt=function(e){if(yt.has(e))return yt.get(e);for(;xt.has(bt);)bt++;var t=bt++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>gt))throw ft(16,"".concat(t));return yt.set(e,t),xt.set(t,e),t},wt=function(e,t){bt=t+1,yt.set(e,t),xt.set(t,e)},jt="style[".concat(ve,"][").concat(je,'="').concat(Ce,'"]'),Ct=new RegExp("^".concat(ve,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),It=function(e,t,n){for(var r,o=n.split(","),i=0,s=o.length;i<s;i++)(r=o[i])&&e.registerName(t,r)},kt=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(Ie),o=[],i=0,s=r.length;i<s;i++){var a=r[i].trim();if(a){var c=a.match(Ct);if(c){var l=0|parseInt(c[1],10),d=c[2];0!==l&&(wt(d,l),It(e,d,c[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(a)}}},St=function(e){for(var t=document.querySelectorAll(jt),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(ve)!==we&&(kt(e,o),o.parentNode&&o.parentNode.removeChild(o))}};var _t=function(e){var t,n,r=document.head,o=e||r,i=document.createElement("style"),s=(t=o,(n=Array.from(t.querySelectorAll("style[".concat(ve,"]"))))[n.length-1]),a=void 0!==s?s.nextSibling:null;i.setAttribute(ve,we),i.setAttribute(je,Ce);var c=typeof __webpack_nonce__<"u"?__webpack_nonce__:null;return c&&i.setAttribute("nonce",c),o.insertBefore(i,a),i},Tt=function(){function e(e){this.element=_t(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ft(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Nt=function(){function e(e){this.element=_t(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Pt=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Ot=ke,Et={isServer:!ke,useCSSOMInjection:!Se},At=function(){function e(e,t,n){void 0===e&&(e=Pe),void 0===t&&(t={});var r=this;this.options=y(y({},Et),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&ke&&Ot&&(Ot=!1,St(this)),pt(this,(function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o,i=(o=n,xt.get(o));if(void 0===i)return"continue";var s=e.names.get(i),a=t.getGroup(n);if(void 0===s||!s.size||0===a.length)return"continue";var c="".concat(ve,".g").concat(n,'[id="').concat(i,'"]'),l="";void 0!==s&&s.forEach((function(e){e.length>0&&(l+="".concat(e,","))})),r+="".concat(a).concat(c,'{content:"').concat(l,'"}').concat(Ie)},i=0;i<n;i++)o(i);return r}(r)}))}return e.registerId=function(e){return vt(e)},e.prototype.rehydrate=function(){!this.server&&ke&&St(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(y(y({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=this.options,t=e.useCSSOMInjection,n=e.target,r=e.isServer?new Pt(n):t?new Tt(n):new Nt(n),new mt(r)));var e,t,n,r},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(vt(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(vt(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(vt(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Vt=/&/g,Rt=/^\s*\/\/.*$/gm;function $t(e,t){return e.map((function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map((function(e){return"".concat(t," ").concat(e)}))),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=$t(e.children,t)),e}))}var Mt=new At,Dt=function(){var e,t,n,r=Pe,o=r.options,i=void 0===o?Pe:o,s=r.plugins,a=void 0===s?Ne:s,c=function(n,r,o){return o.startsWith(t)&&o.endsWith(t)&&o.replaceAll(t,"").length>0?".".concat(e):n},l=a.slice();l.push((function(e){e.type===S&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(Vt,t).replace(n,c))})),i.prefix&&l.push(xe),l.push(ye);var d=function(r,o,s,a){void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),e=a,t=o,n=new RegExp("\\".concat(t,"\\b"),"g");var c=r.replace(Rt,""),d=de(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);i.namespace&&(d=$t(d,i.namespace));var p,u,h,f=[];return ge(d,(p=l.concat((h=function(e){return f.push(e)},function(e){e.root||(e=e.return)&&h(e)})),u=F(p),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=p[i](e,t,n,r)||"";return o})),f};return d.hash=a.length?a.reduce((function(e,t){return t.name||ft(15),He(e,t.name)}),5381).toString():"",d}(),zt=f.default.createContext({shouldForwardProp:void 0,styleSheet:Mt,stylis:Dt});function Ht(){return n.useContext(zt)}f.default.createContext(void 0);var Ft=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Dt);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,pt(this,(function(){throw ft(12,String(n.name))}))}return e.prototype.getName=function(e){return void 0===e&&(e=Dt),this.name+e.hash},e}(),Lt=function(e){return e>="A"&&e<="Z"};function Bt(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Lt(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var Ut=function(e){return null==e||!1===e||""===e},qt=function(e){var t,n,r=[];for(var o in e){var i=e[o];e.hasOwnProperty(o)&&!Ut(i)&&(Array.isArray(i)&&i.isCss||it(i)?r.push("".concat(Bt(o),":"),i,";"):lt(i)?r.push.apply(r,x(x(["".concat(o," {")],qt(i),!1),["}"],!1)):r.push("".concat(Bt(o),": ").concat((t=o,null==(n=i)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in be||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function Gt(e,t,n,r){if(Ut(e))return[];if(st(e))return[".".concat(e.styledComponentId)];if(it(e)){if(!it(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return[e];var o=e(t);return"production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof Ft||lt(o)||null===o||console.error("".concat(Le(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Gt(o,t,n,r)}var i;return e instanceof Ft?n?(e.inject(n,r),[e.getName(r)]):[e]:lt(e)?qt(e):Array.isArray(e)?Array.prototype.concat.apply(Ne,e.map((function(e){return Gt(e,t,n,r)}))):[e.toString()]}var Wt=Fe(Ce),Zt=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(it(n)&&!st(n))return!1}return!0}(e),this.componentId=t,this.baseHash=He(Wt,t),this.baseStyle=n,At.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=at(r,this.staticRulesId);else{var o=ct(Gt(this.rules,e,t,n)),i=De(He(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,i)){var s=n(o,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,s)}r=at(r,i),this.staticRulesId=i}else{for(var a=He(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var d=this.rules[l];if("string"==typeof d)c+=d,"production"!==process.env.NODE_ENV&&(a=He(a,d));else if(d){var p=ct(Gt(d,e,t,n));a=He(a,p+l),c+=p}}if(c){var u=De(a>>>0);t.hasNameForId(this.componentId,u)||t.insertRules(this.componentId,u,n(c,".".concat(u),void 0,this.componentId)),r=at(r,u)}}return r},e}(),Yt=f.default.createContext(void 0),Kt={},Xt=new Set;function Jt(e,t,r){var o,i=st(e),s=e,a=!Be(e),c=t.attrs,l=void 0===c?Ne:c,d=t.componentId,p=void 0===d?function(e,t){var n="string"!=typeof e?"sc":Ve(e);Kt[n]=(Kt[n]||0)+1;var r="".concat(n,"-").concat(function(e){return De(Fe(e)>>>0)}(Ce+n+Kt[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):d,u=t.displayName,h=void 0===u?Be(o=e)?"styled.".concat(o):"Styled(".concat(Le(o),")"):u,m=t.displayName&&t.componentId?"".concat(Ve(t.displayName),"-").concat(t.componentId):t.componentId||p,g=i&&s.attrs?s.attrs.concat(l).filter(Boolean):l,b=t.shouldForwardProp;if(i&&s.shouldForwardProp){var v=s.shouldForwardProp;if(t.shouldForwardProp){var j=t.shouldForwardProp;b=function(e,t){return v(e,t)&&j(e,t)}}else b=v}var C=new Zt(r,m,i?s.componentStyle:void 0);function I(e,t){return function(e,t,r){var o=e.attrs,i=e.componentStyle,s=e.defaultProps,a=e.foldedComponentIds,c=e.styledComponentId,l=e.target,d=f.default.useContext(Yt),p=Ht(),u=e.shouldForwardProp||p.shouldForwardProp;"production"!==process.env.NODE_ENV&&n.useDebugValue(c);var h=function(e,t,n){return void 0===n&&(n=Pe),e.theme!==n.theme&&e.theme||t||n.theme}(t,d,s)||Pe,m=function(e,t,n){for(var r,o=y(y({},t),{className:void 0,theme:n}),i=0;i<e.length;i+=1){var s=it(r=e[i])?r(o):r;for(var a in s)o[a]="className"===a?at(o[a],s[a]):"style"===a?y(y({},o[a]),s[a]):s[a]}return t.className&&(o.className=at(o.className,t.className)),o}(o,t,h),g=m.as||l,x={};for(var b in m)void 0===m[b]||"$"===b[0]||"as"===b||"theme"===b&&m.theme===h||("forwardedAs"===b?x.as=m.forwardedAs:u&&!u(b,g)||(x[b]=m[b],u||"development"!==process.env.NODE_ENV||w(b)||Xt.has(b)||!Oe.has(g)||(Xt.add(b),console.warn('styled-components: it looks like an unknown prop "'.concat(b,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var v,j,C,I,k=(v=i,j=m,C=Ht(),I=v.generateAndInjectStyles(j,C.styleSheet,C.stylis),"production"!==process.env.NODE_ENV&&n.useDebugValue(I),I);"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(k);var S=at(a,c);return k&&(S+=" "+k),m.className&&(S+=" "+m.className),x[Be(g)&&!Oe.has(g)?"class":"className"]=S,x.ref=r,n.createElement(g,x)}(k,e,t)}I.displayName=h;var k=f.default.forwardRef(I);return k.attrs=g,k.componentStyle=C,k.displayName=h,k.shouldForwardProp=b,k.foldedComponentIds=i?at(s.foldedComponentIds,s.styledComponentId):"",k.styledComponentId=m,k.target=i?s.target:e,Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)dt(e,o[r],!0);return e}({},s.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(function(e,t){if("production"!==process.env.NODE_ENV){var r=t?' with the id of "'.concat(t,'"'):"",o="The component ".concat(e).concat(r," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var s=!0;console.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];_e.test(e)?(s=!1,Te.delete(o)):i.apply(void 0,x([e],t,!1))},n.useRef(),s&&!Te.has(o)&&(console.warn(o),Te.add(o))}catch(e){_e.test(e.message)&&Te.delete(o)}finally{console.error=i}}}(h,m),k.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var i=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(i,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(h,m)),pt(k,(function(){return".".concat(k.styledComponentId)})),a&&ot(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),k}function Qt(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var en=function(e){return Object.assign(e,{isCss:!0})};function tn(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(it(e)||lt(e))return en(Gt(Qt(Ne,x([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?Gt(r):en(Gt(Qt(r,t)))}function nn(e,t,n){if(void 0===n&&(n=Pe),!t)throw ft(1,t);var r=function(r){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];return e(t,n,tn.apply(void 0,x([r],o,!1)))};return r.attrs=function(r){return nn(e,t,y(y({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return nn(e,t,y(y({},n),r))},r}var rn=function(e){return nn(Jt,e)},on=rn;Oe.forEach((function(e){on[e]=rn(e)})),"production"!==process.env.NODE_ENV&&typeof navigator<"u"&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var sn="__sc-".concat(ve,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&typeof window<"u"&&(window[sn]||(window[sn]=0),1===window[sn]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[sn]+=1);var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},cn={},ln={},dn={};Object.defineProperty(dn,"__esModule",{value:!0});var pn="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";dn.default=function(e){var t=e.split("-"),n=t[1],r=t[2],o=t[3];if(!n||!r||!o)throw new Error("Malformed asset _ref '".concat(e,"'. Expected an id like \"").concat(pn,'".'));var i=r.split("x"),s=+i[0],a=+i[1];if(!(isFinite(s)&&isFinite(a)))throw new Error("Malformed asset _ref '".concat(e,"'. Expected an id like \"").concat(pn,'".'));return{id:n,width:s,height:a,format:o}};var un={},hn=an&&an.__assign||function(){return hn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hn.apply(this,arguments)};Object.defineProperty(un,"__esModule",{value:!0});function fn(e){var t=e.split("/").slice(-1);return"image-".concat(t[0]).replace(/\.([a-z]+)$/,"-$1")}un.default=function(e){if(!e)return null;var t,n;if("string"==typeof e&&/^https?:\/\//.test("".concat(e)))t={asset:{_ref:fn(e)}};else if("string"==typeof e)t={asset:{_ref:e}};else if((n=e)&&"string"==typeof n._ref)t={asset:e};else if(function(e){return!!e&&"string"==typeof e._id}(e))t={asset:{_ref:e._id||""}};else if(function(e){var t=e;return!(!t||!t.asset)&&"string"==typeof t.asset.url}(e))t={asset:{_ref:fn(e.asset.url)}};else{if("object"!=typeof e.asset)return null;t=hn({},e)}var r=e;return r.crop&&(t.crop=r.crop),r.hotspot&&(t.hotspot=r.hotspot),function(e){if(e.crop&&e.hotspot)return e;var t=hn({},e);return t.crop||(t.crop={left:0,top:0,bottom:0,right:0}),t.hotspot||(t.hotspot={x:.5,y:.5,height:1,width:1}),t}(t)},function(e){var t=an&&an.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)},n=an&&an.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseSource=e.SPEC_NAME_TO_URL_NAME_MAPPINGS=void 0;var r=n(dn),o=n(un);e.parseSource=o.default,e.SPEC_NAME_TO_URL_NAME_MAPPINGS=[["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"]],e.default=function(n){var i=t({},n||{}),s=i.source;delete i.source;var a=(0,o.default)(s);if(!a)throw new Error("Unable to resolve image URL from source (".concat(JSON.stringify(s),")"));var c=a.asset._ref||a.asset._id||"",l=(0,r.default)(c),d=Math.round(a.crop.left*l.width),p=Math.round(a.crop.top*l.height),u={left:d,top:p,width:Math.round(l.width-a.crop.right*l.width-d),height:Math.round(l.height-a.crop.bottom*l.height-p)},h=a.hotspot.height*l.height/2,f=a.hotspot.width*l.width/2,m=a.hotspot.x*l.width,g=a.hotspot.y*l.height,y={left:m-f,top:g-h,right:m+f,bottom:g+h};return i.rect||i.focalPoint||i.ignoreImageParams||i.crop||(i=t(t({},i),function(e,t){var n,r=t.width,o=t.height;if(!r||!o)return{width:r,height:o,rect:e.crop};var i=e.crop,s=e.hotspot,a=r/o,c=i.width/i.height;if(c>a){var l=Math.round(i.height),d=Math.round(l*a),p=Math.max(0,Math.round(i.top)),u=Math.round((s.right-s.left)/2+s.left);(h=Math.max(0,Math.round(u-d/2)))<i.left?h=i.left:h+d>i.left+i.width&&(h=i.left+i.width-d),n={left:h,top:p,width:d,height:l}}else{d=i.width,l=Math.round(d/a);var h=Math.max(0,Math.round(i.left)),f=Math.round((s.bottom-s.top)/2+s.top),m=Math.max(0,Math.round(f-l/2));m<i.top?m=i.top:m+l>i.top+i.height&&(m=i.top+i.height-l),n={left:h,top:m,width:d,height:l}}return{width:r,height:o,rect:n}}({crop:u,hotspot:y},i))),function(t){var n=(t.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),r="".concat(t.asset.id,"-").concat(t.asset.width,"x").concat(t.asset.height,".").concat(t.asset.format),o="".concat(n,"/images/").concat(t.projectId,"/").concat(t.dataset,"/").concat(r),i=[];if(t.rect){var s=t.rect,a=s.left,c=s.top,l=s.width,d=s.height;(0!==a||0!==c||d!==t.asset.height||l!==t.asset.width)&&i.push("rect=".concat(a,",").concat(c,",").concat(l,",").concat(d))}t.bg&&i.push("bg=".concat(t.bg)),t.focalPoint&&(i.push("fp-x=".concat(t.focalPoint.x)),i.push("fp-y=".concat(t.focalPoint.y)));var p=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return p&&i.push("flip=".concat(p)),e.SPEC_NAME_TO_URL_NAME_MAPPINGS.forEach((function(e){var n=e[0],r=e[1];typeof t[n]<"u"?i.push("".concat(r,"=").concat(encodeURIComponent(t[n]))):typeof t[r]<"u"&&i.push("".concat(r,"=").concat(encodeURIComponent(t[r])))})),0===i.length?o:"".concat(o,"?").concat(i.join("&"))}(t(t({},i),{asset:l}))}}(ln);var mn=an&&an.__assign||function(){return mn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mn.apply(this,arguments)},gn=an&&an.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),yn=an&&an.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xn=an&&an.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&gn(t,e,n);return yn(t,e),t};Object.defineProperty(cn,"__esModule",{value:!0}),cn.ImageUrlBuilder=void 0;var bn=xn(ln),vn=["clip","crop","fill","fillmax","max","scale","min"],wn=["top","bottom","left","right","center","focalpoint","entropy"],jn=["format"];function Cn(e){for(var t=0,n=bn.SPEC_NAME_TO_URL_NAME_MAPPINGS;t<n.length;t++){var r=n[t],o=r[0],i=r[1];if(e===o||e===i)return o}return e}cn.default=function(e){if(function(e){return!(!e||!("config"in e))&&"function"==typeof e.config}(e)){var t=e.config(),n=t.apiHost,r=t.projectId,o=t.dataset;return new In(null,{baseUrl:(n||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:r,dataset:o})}var i=e;if(function(e){return!(!e||!("clientConfig"in e))&&"object"==typeof e.clientConfig}(i)){var s=i.clientConfig;n=s.apiHost,r=s.projectId,o=s.dataset;return new In(null,{baseUrl:(n||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:r,dataset:o})}return new In(null,e)};var In=function(){function e(e,t){this.options=mn(e?mn({},e.options||{}):{},t||{})}return e.prototype.withOptions=function(t){var n=t.baseUrl||this.options.baseUrl,r={baseUrl:n};for(var o in t)if(t.hasOwnProperty(o)){r[Cn(o)]=t[o]}return new e(this,mn({baseUrl:n},r))},e.prototype.image=function(e){return this.withOptions({source:e})},e.prototype.dataset=function(e){return this.withOptions({dataset:e})},e.prototype.projectId=function(e){return this.withOptions({projectId:e})},e.prototype.bg=function(e){return this.withOptions({bg:e})},e.prototype.dpr=function(e){return this.withOptions(e&&1!==e?{dpr:e}:{})},e.prototype.width=function(e){return this.withOptions({width:e})},e.prototype.height=function(e){return this.withOptions({height:e})},e.prototype.focalPoint=function(e,t){return this.withOptions({focalPoint:{x:e,y:t}})},e.prototype.maxWidth=function(e){return this.withOptions({maxWidth:e})},e.prototype.minWidth=function(e){return this.withOptions({minWidth:e})},e.prototype.maxHeight=function(e){return this.withOptions({maxHeight:e})},e.prototype.minHeight=function(e){return this.withOptions({minHeight:e})},e.prototype.size=function(e,t){return this.withOptions({width:e,height:t})},e.prototype.blur=function(e){return this.withOptions({blur:e})},e.prototype.sharpen=function(e){return this.withOptions({sharpen:e})},e.prototype.rect=function(e,t,n,r){return this.withOptions({rect:{left:e,top:t,width:n,height:r}})},e.prototype.format=function(e){return this.withOptions({format:e})},e.prototype.invert=function(e){return this.withOptions({invert:e})},e.prototype.orientation=function(e){return this.withOptions({orientation:e})},e.prototype.quality=function(e){return this.withOptions({quality:e})},e.prototype.forceDownload=function(e){return this.withOptions({download:e})},e.prototype.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},e.prototype.flipVertical=function(){return this.withOptions({flipVertical:!0})},e.prototype.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},e.prototype.fit=function(e){if(-1===vn.indexOf(e))throw new Error('Invalid fit mode "'.concat(e,'"'));return this.withOptions({fit:e})},e.prototype.crop=function(e){if(-1===wn.indexOf(e))throw new Error('Invalid crop mode "'.concat(e,'"'));return this.withOptions({crop:e})},e.prototype.saturation=function(e){return this.withOptions({saturation:e})},e.prototype.auto=function(e){if(-1===jn.indexOf(e))throw new Error('Invalid auto mode "'.concat(e,'"'));return this.withOptions({auto:e})},e.prototype.pad=function(e){return this.withOptions({pad:e})},e.prototype.url=function(){return(0,bn.default)(this.options)},e.prototype.toString=function(){return this.url()},e}();cn.ImageUrlBuilder=In,(an&&an.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(cn);const kn={},Sn={apiVersion:"v2023-05-01"},_n=null;function Tn(e){const t=n.useMemo((()=>JSON.stringify(e||{})),[e]);return n.useMemo((()=>JSON.parse(t)),[t])}function Nn(t,r){let{params:i=kn,options:s=Sn,initialValue:a=_n}=r;const[c,l]=n.useState(!0),[d,p]=n.useState(!1),[u,h]=n.useState(a),f=Tn(i),g=Tn(s),y=n.useRef(null),x=e.useDocumentStore();return n.useEffect((()=>{if(t&&!d&&!y.current)try{y.current=x.listenQuery(t,f,g).pipe(o.distinctUntilChanged(m.default),o.catchError((e=>(console.error(e),p(e),l(!1),h(null),e)))).subscribe((e=>{h((t=>m.default(t,e)?t:e)),l(!1),p(!1)}))}catch(e){console.error(e),l(!1),p(e)}return d&&y.current&&y.current.unsubscribe(),()=>{var e;y.current&&(null==(e=y?.current)||e.unsubscribe(),y.current=null)}}),[t,d,f,g,x]),{data:u,loading:c,error:d}}var Pn,On,En,An=Object.freeze,Vn=Object.defineProperty,Rn=(e,t)=>An(Vn(e,"raw",{value:An(e.slice())}));on((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i.jsx(s.Card,{as:"table",...e})}))((()=>tn(Pn||(Pn=Rn(["\n display: table;\n width: 100%;\n border-collapse: collapse;\n\n &:not([hidden]) {\n display: table;\n border-collapse: collapse;\n }\n "])))));on((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i.jsx(s.Card,{as:"tr",...e})}))((()=>tn(On||(On=Rn(["\n display: table-row;\n\n &:not([hidden]) {\n display: table-row;\n }\n "])))));on((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i.jsx(s.Card,{as:"td",...e})}))((()=>tn(En||(En=Rn(["\n display: table-cell;\n\n &:not([hidden]) {\n display: table-cell;\n }\n "])))));const $n=n.createContext(null),Mn=n.createContext({editControls:!1}),Dn=n.createContext(void 0),zn=(e=1)=>{let t="^.^.concepts[]._ref",n=1;for(;e>n;)t=`^.${t}`,n++;return e>6?"":`"childConcepts": *[_id in ${t} && ^._id in broader[]._ref]|order(prefLabel)\n {\n "id": _id,\n "level": ${e},\n _originalId,\n prefLabel,\n definition,\n example,\n scopeNote,\n ${zn(e+1)||""}\n }`},Hn=on.details`
summary {
cursor: pointer;
}
div {
margin-top: 0.5rem;
margin-left: 0.75rem;
svg {
padding-right: 0.25rem;
}
}
`,Fn=on.div`
margin-top: 2rem;
`,Ln=on.ul`
list-style: none;
padding-left: 0;
margin-block-start: 0;
li svg.info {
height: 1.2rem;
width: 1.2rem;
color: ${a.hues.gray[800].hex};
border-radius: 3px;
transition: all 0.1s ease-in-out;
&.warning:hover {
color: ${a.hues.gray[100].hex};
background-color: ${a.hues.yellow[500].hex};
}
&.error {
color: ${a.hues.red[500].hex};
&:hover {
color: ${a.hues.gray[100].hex};
background-color: ${a.hues.red[500].hex};