decap-cms-widget-file 3.4.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.5.1](https://github.com/decaporg/decap-cms/compare/decap-cms-widget-file@3.5.0...decap-cms-widget-file@3.5.1) (2026-09-08)
7
+
8
+ **Note:** Version bump only for package decap-cms-widget-file
9
+
10
+ # [3.5.0](https://github.com/decaporg/decap-cms/compare/decap-cms-widget-file@3.4.0...decap-cms-widget-file@3.5.0) (2026-07-23)
11
+
12
+ **Note:** Version bump only for package decap-cms-widget-file
13
+
6
14
  # [3.4.0](https://github.com/decaporg/decap-cms/compare/decap-cms-widget-file@3.3.0...decap-cms-widget-file@3.4.0) (2026-06-08)
7
15
 
8
16
  ### Bug Fixes
@@ -1,8 +1,8 @@
1
1
  /*! For license information please see decap-cms-widget-file.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@emotion/react"),require("react"),require("prop-types"),require("react-immutable-proptypes"),require("immutable"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsWidgetFile",["@emotion/react","react","prop-types","react-immutable-proptypes","immutable","decap-cms-ui-default"],t):"object"==typeof exports?exports.DecapCmsWidgetFile=t(require("@emotion/react"),require("react"),require("prop-types"),require("react-immutable-proptypes"),require("immutable"),require("decap-cms-ui-default")):e.DecapCmsWidgetFile=t(e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsDefaultExports.ImmutablePropTypes,e.DecapCmsDefaultExports.Immutable,e.DecapCmsUiDefault)}(window,(e,t,n,r,o,i)=>(()=>{var a={650(e,t,n){var r=n(942).Symbol;e.exports=r},379(e,t,n){var r=n(650),o=n(870),i=n(5),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},403(e,t,n){var r=n(945),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},967(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},870(e,t,n){var r=n(650),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},5(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},942(e,t,n){var r=n(967),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},945(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},80(e,t,n){var r=n(642);e.exports=function(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=r(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},580(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},547(e){e.exports=function(e){return null!=e&&"object"==typeof e}},187(e,t,n){var r=n(379),o=n(547);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},354(e,t,n){var r=n(80);e.exports=function(e){return r(2,e)}},301(e,t,n){var r=n(131),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},642(e,t,n){var r=n(301);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},131(e,t,n){var r=n(403),o=n(580),i=n(187),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},310(e,t,n){"use strict";var r=n(119);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=Symbol.for("react.portal");r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:i,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.unstable_batchedUpdates=function(e,t){return e(t)}},144(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(310)},119(e){"use strict";e.exports=t},110(t){"use strict";t.exports=e},522(e){"use strict";e.exports=o},630(e){"use strict";e.exports=r},434(e){"use strict";e.exports=n},171(e){"use strict";e.exports=i}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return a[e](n,n.exports,l),n.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};return(()=>{"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.apply(null,arguments)}l.d(c,{DecapCmsWidgetFile:()=>Hn});var t=l(110),n={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,scale: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};function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var o=/[A-Z]|^ms/g,i=/_EMO_([^_]+?)_([^]*?)_EMO_/g,a=function(e){return 45===e.charCodeAt(1)},s=function(e){return null!=e&&"boolean"!=typeof e},u=r(function(e){return a(e)?e:e.replace(o,"-$&").toLowerCase()}),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(i,function(e,t,n){return p={name:t,styles:n,next:p},t})}return 1===n[e]||a(e)||"number"!=typeof t||0===t?t:t+"px"};function f(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return p={name:o.name,styles:o.styles,next:p},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)p={name:a.name,styles:a.styles,next:p},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=f(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var l=a;null!=t&&void 0!==t[l]?r+=i+"{"+t[l]+"}":s(l)&&(r+=u(i)+":"+d(i,l)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var c=f(e,t,a);switch(i){case"animation":case"animationName":r+=u(i)+":"+c+";";break;default:r+=i+"{"+c+"}"}}else for(var p=0;p<a.length;p++)s(a[p])&&(r+=u(i)+":"+d(i,a[p])+";")}return r}(e,t,n);case"function":if(void 0!==e){var l=p,c=n(e);return p=l,f(e,t,c)}}var g=n;if(null==t)return g;var h=t[g];return void 0!==h?h:g}var p,g=/label:\s*([^\s;{]+)\s*(;|$)/g,h=l(119),v=l.n(h),m=!!h.useInsertionEffect&&h.useInsertionEffect,b=m||function(e){return e()};m||h.useLayoutEffect;var y,x,w=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},C=/^((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|fetchpriority|fetchPriority|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|popover|popoverTarget|popoverTargetAction|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)-.*))$/,R=r(function(e){return C.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),D=function(e){return"theme"!==e},E=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?R:D},S=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},k=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return w(t,n,r),b(function(){return function(e,t,n){w(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},A=function n(r,o){var i,a,s=r.__emotion_real===r,l=s&&r.__emotion_base||r;void 0!==o&&(i=o.label,a=o.target);var c=S(r,o,s),u=c||E(l),d=!u("as");return function(){var v=arguments,m=s&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==i&&m.push("label:"+i+";"),null==v[0]||void 0===v[0].raw)m.push.apply(m,v);else{var b=v[0];m.push(b[0]);for(var y=v.length,x=1;x<y;x++)m.push(v[x],b[x])}var w=(0,t.withEmotionCache)(function(e,n,r){var o,i,s,v,b=d&&e.as||l,y="",x=[],w=e;if(null==e.theme){for(var C in w={},e)w[C]=e[C];w.theme=h.useContext(t.ThemeContext)}"string"==typeof e.className?(o=n.registered,i=x,s=e.className,v="",s.split(" ").forEach(function(e){void 0!==o[e]?i.push(o[e]+";"):e&&(v+=e+" ")}),y=v):null!=e.className&&(y=e.className+" ");var R=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";p=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=f(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=f(n,t,e[a]),r&&(o+=i[a]);g.lastIndex=0;for(var s,l="";null!==(s=g.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:p}}(m.concat(x),n.registered,w);y+=n.key+"-"+R.name,void 0!==a&&(y+=" "+a);var D=d&&void 0===c?E(b):u,S={};for(var A in e)d&&"as"===A||D(A)&&(S[A]=e[A]);return S.className=y,r&&(S.ref=r),h.createElement(h.Fragment,null,h.createElement(k,{cache:n,serialized:R,isStringTag:"string"==typeof b}),h.createElement(b,S))});return w.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",w.defaultProps=r.defaultProps,w.__emotion_real=w,w.__emotion_base=l,w.__emotion_styles=m,w.__emotion_forwardProp=c,Object.defineProperty(w,"toString",{value:function(){return"."+a}}),w.withComponent=function(t,r){return n(t,e({},o,r,{shouldForwardProp:S(w,r,!0)})).apply(void 0,m)},w}},O=l(434),M=l.n(O),I=l(630),T=l.n(I),j=l(522),N=l(354),L=l.n(N),_=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),P=(y=["",""],x=["",""],Object.freeze(Object.defineProperties(y,{raw:{value:Object.freeze(x)}}))),F=function(){function e(){for(var t=this,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return"function"==typeof e?t.interimTag.bind(t,e):"string"==typeof e?t.transformEndResult(e):(e=e.map(t.transformString.bind(t)),t.transformEndResult(e.reduce(t.processSubstitutions.bind(t,r))))},r.length>0&&Array.isArray(r[0])&&(r=r[0]),this.transformers=r.map(function(e){return"function"==typeof e?e():e}),this.tag}return _(e,[{key:"interimTag",value:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return this.tag(P,e.apply(void 0,[t].concat(r)))}},{key:"processSubstitutions",value:function(e,t,n){var r=this.transformSubstitution(e.shift(),t);return"".concat(t,r,n)}},{key:"transformString",value:function(e){return this.transformers.reduce(function(e,t){return t.onString?t.onString(e):e},e)}},{key:"transformSubstitution",value:function(e,t){return this.transformers.reduce(function(e,n){return n.onSubstitution?n.onSubstitution(e,t):e},e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce(function(e,t){return t.onEndResult?t.onEndResult(e):e},e)}}]),e}();const U=F;var B={separator:"",conjunction:"",serial:!1};const q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B;return{onSubstitution:function(t,n){if(Array.isArray(t)){var r=t.length,o=e.separator,i=e.conjunction,a=e.serial,s=n.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(o+s[1]):t.join(o+" "),i&&r>1){var l=t.lastIndexOf(o);t=t.slice(0,l)+(a?o:"")+" "+i+t.slice(l+1)}}return t}}},z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var n=t.match(/^[^\S\n]*(?=\S)/gm),r=n&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n.map(function(e){return e.length})));if(r){var o=new RegExp("^.{"+r+"}","gm");return t.replace(o,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};new U(q({separator:","}),z,W),new U(q({separator:",",conjunction:"and"}),z,W),new U(q({separator:",",conjunction:"or"}),z,W);const H=function(e){return{onSubstitution:function(t,n){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}};var X=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new U(H("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(X):X(e)?e:""}}},q,z,W);const Y=function(e,t){return{onSubstitution:function(n,r){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==n?n:n.toString().replace(e,t)}}};new U(H("\n"),q,z,W,Y(/&/g,"&amp;"),Y(/</g,"&lt;"),Y(/>/g,"&gt;"),Y(/"/g,"&quot;"),Y(/'/g,"&#x27;"),Y(/`/g,"&#x60;"));const $=function(e,t){return{onEndResult:function(n){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return n.replace(e,t)}}},K=new U($(/(?:\n(?:\s*))+/g," "),W);new U($(/(?:\n\s*)/g,""),W),new U(q({separator:","}),$(/(?:\s+)/g," "),W),new U(q({separator:",",conjunction:"or"}),$(/(?:\s+)/g," "),W),new U(q({separator:",",conjunction:"and"}),$(/(?:\s+)/g," "),W),new U(q,z,W),new U(q,$(/(?:\s+)/g," "),W),new U(z,W),new U(z("all"),W);var V=l(171);function G(e,t=""){if(""===e)return e;const n=(o=e,e=o.replace(/[\\/]+/g,"/")).split("/"),r=n[n.length-1];var o;return""===r&&n.length>1?n[n.length-2]:t.length>0&&r.slice(-t.length)===t?r.slice(0,-t.length):r}var J=l(144);const Z="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Q(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function ee(e){return"nodeType"in e}function te(e){var t,n;return e?Q(e)?e:ee(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function ne(e){const{Document:t}=te(e);return e instanceof t}function re(e){return!Q(e)&&e instanceof te(e).HTMLElement}function oe(e){return e instanceof te(e).SVGElement}function ie(e){return e?Q(e)?e.document:ee(e)?ne(e)?e:re(e)||oe(e)?e.ownerDocument:document:document:document}const ae=Z?h.useLayoutEffect:h.useEffect;function se(e){const t=(0,h.useRef)(e);return ae(()=>{t.current=e}),(0,h.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function le(e,t){void 0===t&&(t=[e]);const n=(0,h.useRef)(e);return ae(()=>{n.current!==e&&(n.current=e)},t),n}function ce(e,t){const n=(0,h.useRef)();return(0,h.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function ue(e){const t=se(e),n=(0,h.useRef)(null),r=(0,h.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function de(e){const t=(0,h.useRef)();return(0,h.useEffect)(()=>{t.current=e},[e]),t.current}let fe={};function pe(e,t){return(0,h.useMemo)(()=>{if(t)return t;const n=null==fe[e]?0:fe[e]+1;return fe[e]=n,e+"-"+n},[e,t])}function ge(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}}const he=ge(1),ve=ge(-1);function me(e){if(!e)return!1;const{KeyboardEvent:t}=te(e.target);return t&&e instanceof t}function be(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=te(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const ye=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[ye.Translate.toString(e),ye.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),xe="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function we(e){return e.matches(xe)?e:e.querySelector(xe)}const Ce={display:"none"};function Re(e){let{id:t,value:n}=e;return v().createElement("div",{id:t,style:Ce},n)}function De(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return v().createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const Ee=(0,h.createContext)(null),Se={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},ke={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Ae(e){let{announcements:t=ke,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Se}=e;const{announce:i,announcement:a}=function(){const[e,t]=(0,h.useState)("");return{announce:(0,h.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),s=pe("DndLiveRegion"),[l,c]=(0,h.useState)(!1);if((0,h.useEffect)(()=>{c(!0)},[]),function(e){const t=(0,h.useContext)(Ee);(0,h.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}((0,h.useMemo)(()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}}),[i,t])),!l)return null;const u=v().createElement(v().Fragment,null,v().createElement(Re,{id:r,value:o.draggable}),v().createElement(De,{id:s,announcement:a}));return n?(0,J.createPortal)(u,n):u}var Oe;function Me(){}function Ie(e,t){return(0,h.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Oe||(Oe={}));const Te=Object.freeze({x:0,y:0});function je(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ne(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Le(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function _e(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Pe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=_e(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=je(_e(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Ne)};function Fe(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*s;return Number((o/(n+r-o)).toFixed(4))}return 0}const Ue=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=Fe(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Le)};function Be(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Te}function qe(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const ze=qe(1);const We={ignoreTransform:!1};function He(e,t){void 0===t&&(t=We);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=te(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),c=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:s,right:l}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:l}}function Xe(e){return He(e,{ignoreTransform:!0})}function Ye(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(ne(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!re(o)||oe(o))return n;if(n.includes(o))return n;const i=te(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=te(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=te(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function $e(e){const[t]=Ye(e,1);return null!=t?t:null}function Ke(e){return Z&&e?Q(e)?e:ee(e)?ne(e)||e===ie(e).scrollingElement?window:re(e)?e:null:null:null}function Ve(e){return Q(e)?e.scrollX:e.scrollLeft}function Ge(e){return Q(e)?e.scrollY:e.scrollTop}function Je(e){return{x:Ve(e),y:Ge(e)}}var Ze;function Qe(e){return!(!Z||!e)&&e===document.scrollingElement}function et(e){const t={x:0,y:0},n=Qe(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Ze||(Ze={}));const tt={x:.2,y:.2};function nt(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=tt);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=et(e),p={x:0,y:0},g={x:0,y:0},h=t.height*o.y,v=t.width*o.x;return!c&&i<=t.top+h?(p.y=Ze.Backward,g.y=r*Math.abs((t.top+h-i)/h)):!u&&l>=t.bottom-h&&(p.y=Ze.Forward,g.y=r*Math.abs((t.bottom-h-l)/h)),!f&&s>=t.right-v?(p.x=Ze.Forward,g.x=r*Math.abs((t.right-v-s)/v)):!d&&a<=t.left+v&&(p.x=Ze.Backward,g.x=r*Math.abs((t.left+v-a)/v)),{direction:p,speed:g}}function rt(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ot(e){return e.reduce((e,t)=>he(e,Je(t)),Te)}const it=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Ve(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Ge(t),0)}]];class at{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Ye(t),r=ot(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of it)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class st{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function lt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ct,ut;function dt(e){e.preventDefault()}function ft(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ct||(ct={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(ut||(ut={}));const pt={start:[ut.Space,ut.Enter],cancel:[ut.Esc],end:[ut.Space,ut.Enter,ut.Tab]},gt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ut.Right:return{...n,x:n.x+25};case ut.Left:return{...n,x:n.x-25};case ut.Down:return{...n,y:n.y+25};case ut.Up:return{...n,y:n.y-25}}};class ht{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new st(ie(t)),this.windowListeners=new st(te(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ct.Resize,this.handleCancel),this.windowListeners.add(ct.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ct.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=He),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);$e(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Te)}handleKeyDown(e){if(me(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=pt,coordinateGetter:i=gt,scrollBehavior:a="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:Te;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=ve(u,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:f}=et(n),p=rt(n),g={x:Math.min(o===ut.Right?p.right-p.width/2:p.right,Math.max(o===ut.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(o===ut.Down?p.bottom-p.height/2:p.bottom,Math.max(o===ut.Down?p.top:p.top+p.height/2,u.y))},h=o===ut.Right&&!s||o===ut.Left&&!l,v=o===ut.Down&&!c||o===ut.Up&&!i;if(h&&g.x!==u.x){const e=n.scrollLeft+t.x,i=o===ut.Right&&e<=d.x||o===ut.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===ut.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(v&&g.y!==u.y){const e=n.scrollTop+t.y,i=o===ut.Down&&e<=d.y||o===ut.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===ut.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,he(ve(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function vt(e){return Boolean(e&&"distance"in e)}function mt(e){return Boolean(e&&"delay"in e)}ht.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=pt,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class bt{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=te(e);return e instanceof t?e:ie(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=ie(i),this.documentListeners=new st(this.document),this.listeners=new st(n),this.windowListeners=new st(te(i)),this.initialCoordinates=null!=(r=be(o))?r:Te,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ct.Resize,this.handleCancel),this.windowListeners.add(ct.DragStart,dt),this.windowListeners.add(ct.VisibilityChange,this.handleCancel),this.windowListeners.add(ct.ContextMenu,dt),this.documentListeners.add(ct.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(mt(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(vt(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ct.Click,ft,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ct.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const s=null!=(t=be(e))?t:Te,l=ve(r,s);if(!n&&a){if(vt(a)){if(null!=a.tolerance&&lt(l,a.tolerance))return this.handleCancel();if(lt(l,a.distance))return this.handleStart()}return mt(a)&&lt(l,a.tolerance)?this.handleCancel():void this.handlePending(a,l)}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===ut.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const yt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class xt extends bt{constructor(e){const{event:t}=e,n=ie(t.target);super(e,yt,n)}}xt.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const wt={move:{name:"mousemove"},end:{name:"mouseup"}};var Ct;!function(e){e[e.RightClick=2]="RightClick"}(Ct||(Ct={}));class Rt extends bt{constructor(e){super(e,wt,ie(e.event.target))}}Rt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Ct.RightClick&&(null==r||r({event:n}),!0)}}];const Dt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Et extends bt{constructor(e){super(e,Dt)}static setup(){return window.addEventListener(Dt.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Dt.move.name,e)};function e(){}}}var St,kt;Et.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(St||(St={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(kt||(kt={}));const At={x:{[Ze.Backward]:!1,[Ze.Forward]:!1},y:{[Ze.Backward]:!1,[Ze.Forward]:!1}};var Ot,Mt;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Ot||(Ot={})),function(e){e.Optimized="optimized"}(Mt||(Mt={}));const It=new Map;function Tt(e,t){return ce(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function jt(e){let{callback:t,disabled:n}=e;const r=se(t),o=(0,h.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return(0,h.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Nt(e){return new at(He(e),e)}function Lt(e,t,n){void 0===t&&(t=Nt);const[r,o]=(0,h.useState)(null);function i(){o(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const a=function(e){let{callback:t,disabled:n}=e;const r=se(t),o=(0,h.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,h.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),s=jt({callback:i});return ae(()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())},[e]),r}const _t=[];function Pt(e,t){void 0===t&&(t=[]);const n=(0,h.useRef)(null);return(0,h.useEffect)(()=>{n.current=null},t),(0,h.useEffect)(()=>{const t=e!==Te;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?ve(e,n.current):Te}function Ft(e){return(0,h.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Ut=[];const Bt=[{sensor:xt,options:{}},{sensor:ht,options:{}}],qt={current:{}},zt={draggable:{measure:Xe},droppable:{measure:Xe,strategy:Ot.WhileDragging,frequency:Mt.Optimized},dragOverlay:{measure:He}};class Wt extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ht={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Wt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Me},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zt,measureDroppableContainers:Me,windowRect:null,measuringScheduled:!1},Xt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Me,draggableNodes:new Map,over:null,measureDroppableContainers:Me},Yt=(0,h.createContext)(Xt),$t=(0,h.createContext)(Ht);function Kt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Wt}}}function Vt(e,t){switch(t.type){case Oe.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Oe.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Oe.DragEnd:case Oe.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Oe.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Wt(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Oe.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Wt(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Oe.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Wt(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Gt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,h.useContext)(Yt),i=de(r),a=de(null==n?void 0:n.id);return(0,h.useEffect)(()=>{if(!t&&!r&&i&&null!=a){if(!me(i))return;if(document.activeElement===i.target)return;const e=o.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=we(e);if(t){t.focus();break}}})}},[r,t,o,a,i]),null}const Jt=(0,h.createContext)({...Te,scaleX:1,scaleY:1});var Zt;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Zt||(Zt={}));const Qt=(0,h.memo)(function(e){var t,n,r,o;let{id:i,accessibility:a,autoScroll:s=!0,children:l,sensors:c=Bt,collisionDetection:u=Ue,measuring:d,modifiers:f,...p}=e;const g=(0,h.useReducer)(Vt,void 0,Kt),[m,b]=g,[y,x]=function(){const[e]=(0,h.useState)(()=>new Set),t=(0,h.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]),n=(0,h.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]);return[n,t]}(),[w,C]=(0,h.useState)(Zt.Uninitialized),R=w===Zt.Initialized,{draggable:{active:D,nodes:E,translate:S},droppable:{containers:k}}=m,A=null!=D?E.get(D):null,O=(0,h.useRef)({initial:null,translated:null}),M=(0,h.useMemo)(()=>{var e;return null!=D?{id:D,data:null!=(e=null==A?void 0:A.data)?e:qt,rect:O}:null},[D,A]),I=(0,h.useRef)(null),[T,j]=(0,h.useState)(null),[N,L]=(0,h.useState)(null),_=le(p,Object.values(p)),P=pe("DndDescribedBy",i),F=(0,h.useMemo)(()=>k.getEnabled(),[k]),U=(B=d,(0,h.useMemo)(()=>({draggable:{...zt.draggable,...null==B?void 0:B.draggable},droppable:{...zt.droppable,...null==B?void 0:B.droppable},dragOverlay:{...zt.dragOverlay,...null==B?void 0:B.dragOverlay}}),[null==B?void 0:B.draggable,null==B?void 0:B.droppable,null==B?void 0:B.dragOverlay]));var B;const{droppableRects:q,measureDroppableContainers:z,measuringScheduled:W}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=(0,h.useState)(null),{frequency:s,measure:l,strategy:c}=o,u=(0,h.useRef)(e),d=function(){switch(c){case Ot.Always:return!1;case Ot.BeforeDragging:return n;default:return!n}}(),f=le(d),p=(0,h.useCallback)(function(e){void 0===e&&(e=[]),f.current||a(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),g=(0,h.useRef)(null),v=ce(t=>{if(d&&!n)return It;if(!t||t===It||u.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new at(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,i,n,d,l]);return(0,h.useEffect)(()=>{u.current=e},[e]),(0,h.useEffect)(()=>{d||p()},[n,d]),(0,h.useEffect)(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),(0,h.useEffect)(()=>{d||"number"!=typeof s||null!==g.current||(g.current=setTimeout(()=>{p(),g.current=null},s))},[s,d,p,...r]),{droppableRects:v,measureDroppableContainers:p,measuringScheduled:null!=i}}(F,{dragging:R,dependencies:[S.x,S.y],config:U.droppable}),H=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return ce(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(E,D),X=(0,h.useMemo)(()=>N?be(N):null,[N]),Y=function(){const e=!1===(null==T?void 0:T.autoScrollEnabled),t="object"==typeof s?!1===s.enabled:!1===s,n=R&&!e&&!t;return"object"==typeof s?{...s,enabled:n}:{enabled:n}}(),$=function(e,t){return Tt(e,t)}(H,U.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=(0,h.useRef)(!1),{x:a,y:s}="boolean"==typeof o?{x:o,y:o}:o;ae(()=>{if(!a&&!s||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=Be(n(e),r);if(a||(o.x=0),s||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=$e(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,a,s,r,n])}({activeNode:null!=D?E.get(D):null,config:Y.layoutShiftCompensation,initialRect:$,measure:U.draggable.measure});const K=Lt(H,U.draggable.measure,$),V=Lt(H?H.parentElement:null),G=(0,h.useRef)({activatorEvent:null,active:null,activeNode:H,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Q=k.getNodeFor(null==(t=G.current.over)?void 0:t.id),ee=function(e){let{measure:t}=e;const[n,r]=(0,h.useState)(null),o=jt({callback:(0,h.useCallback)(e=>{for(const{target:n}of e)if(re(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),i=(0,h.useCallback)(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return re(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)},[t,o]),[a,s]=ue(i);return(0,h.useMemo)(()=>({nodeRef:a,rect:n,setRef:s}),[n,a,s])}({measure:U.dragOverlay.measure}),ne=null!=(n=ee.nodeRef.current)?n:H,oe=R?null!=(r=ee.rect)?r:K:null,ie=Boolean(ee.nodeRef.current&&ee.rect),se=Be(fe=ie?null:K,Tt(fe));var fe;const ge=Ft(ne?te(ne):null),ve=function(e){const t=(0,h.useRef)(e),n=ce(n=>e?n&&n!==_t&&e&&t.current&&e.parentNode===t.current.parentNode?n:Ye(e):_t,[e]);return(0,h.useEffect)(()=>{t.current=e},[e]),n}(R?null!=Q?Q:H:null),me=function(e,t){void 0===t&&(t=He);const[n]=e,r=Ft(n?te(n):null),[o,i]=(0,h.useState)(Ut);function a(){i(()=>e.length?e.map(e=>Qe(e)?r:new at(t(e),e)):Ut)}const s=jt({callback:a});return ae(()=>{null==s||s.disconnect(),a(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),o}(ve),ye=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(f,{transform:{x:S.x-se.x,y:S.y-se.y,scaleX:1,scaleY:1},activatorEvent:N,active:M,activeNodeRect:K,containerNodeRect:V,draggingNodeRect:oe,over:G.current.over,overlayNodeRect:ee.rect,scrollableAncestors:ve,scrollableAncestorRects:me,windowRect:ge}),xe=X?he(X,S):null,we=function(e){const[t,n]=(0,h.useState)(null),r=(0,h.useRef)(e),o=(0,h.useCallback)(e=>{const t=Ke(e.target);t&&n(e=>e?(e.set(t,Je(t)),new Map(e)):null)},[]);return(0,h.useEffect)(()=>{const t=r.current;if(e!==t){i(t);const a=e.map(e=>{const t=Ke(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,Je(t)]):null}).filter(e=>null!=e);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{const t=Ke(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),(0,h.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>he(e,t),Te):ot(e):Te,[e,t])}(ve),Ce=Pt(we),Re=Pt(we,[K]),De=he(ye,Ce),Se=oe?ze(oe,ye):null,ke=M&&Se?u({active:M,collisionRect:Se,droppableRects:q,droppableContainers:F,pointerCoordinates:xe}):null,Me=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(ke),[Ie,je]=(0,h.useState)(null),Ne=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ie?ye:he(ye,Re),null!=(o=null==Ie?void 0:Ie.rect)?o:null,K),Le=(0,h.useRef)(null),_e=(0,h.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==I.current)return;const o=E.get(I.current);if(!o)return;const i=e.nativeEvent,a=new n({active:I.current,activeNode:o,event:i,options:r,context:G,onAbort(e){if(!E.get(e))return;const{onDragAbort:t}=_.current,n={id:e};null==t||t(n),y({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!E.get(e))return;const{onDragPending:o}=_.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),y({type:"onDragPending",event:i})},onStart(e){const t=I.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:r}=_.current,o={activatorEvent:i,active:{id:t,data:n.data,rect:O}};(0,J.unstable_batchedUpdates)(()=>{null==r||r(o),C(Zt.Initializing),b({type:Oe.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o}),j(Le.current),L(i)})},onMove(e){b({type:Oe.DragMove,coordinates:e})},onEnd:s(Oe.DragEnd),onCancel:s(Oe.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=G.current;let a=null;if(t&&o){const{cancelDrop:s}=_.current;a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Oe.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Oe.DragCancel)}I.current=null,(0,J.unstable_batchedUpdates)(()=>{b({type:e}),C(Zt.Uninitialized),je(null),j(null),L(null),Le.current=null;const t=e===Oe.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=_.current[t];null==e||e(a),y({type:t,event:a})}})}}Le.current=a},[E]),Pe=(0,h.useCallback)((e,t)=>(n,r)=>{const o=n.nativeEvent,i=E.get(r);if(null!==I.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},I.current=r,_e(n,t))},[E,_e]),Fe=function(e,t){return(0,h.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,Pe);!function(e){(0,h.useEffect)(()=>{if(!Z)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),ae(()=>{K&&w===Zt.Initializing&&C(Zt.Initialized)},[K,w]),(0,h.useEffect)(()=>{const{onDragMove:e}=_.current,{active:t,activatorEvent:n,collisions:r,over:o}=G.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:De.x,y:De.y},over:o};(0,J.unstable_batchedUpdates)(()=>{null==e||e(i),y({type:"onDragMove",event:i})})},[De.x,De.y]),(0,h.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=G.current;if(!e||null==I.current||!t||!o)return;const{onDragOver:i}=_.current,a=r.get(Me),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,J.unstable_batchedUpdates)(()=>{je(s),null==i||i(l),y({type:"onDragOver",event:l})})},[Me]),ae(()=>{G.current={activatorEvent:N,active:M,activeNode:H,collisionRect:Se,collisions:ke,droppableRects:q,draggableNodes:E,draggingNode:ne,draggingNodeRect:oe,droppableContainers:k,over:Ie,scrollableAncestors:ve,scrollAdjustedTranslate:De},O.current={initial:oe,translated:Se}},[M,H,ke,Se,E,ne,oe,q,k,Ie,ve,De]),function(e){let{acceleration:t,activator:n=St.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=kt.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=function(e){let{delta:t,disabled:n}=e;const r=de(t);return ce(e=>{if(n||!r||!e)return At;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[Ze.Backward]:e.x[Ze.Backward]||-1===o,[Ze.Forward]:e.x[Ze.Forward]||1===o},y:{[Ze.Backward]:e.y[Ze.Backward]||-1===i,[Ze.Forward]:e.y[Ze.Forward]||1===i}}},[n,t,r])}({delta:d,disabled:!i}),[g,v]=function(){const e=(0,h.useRef)(null);return[(0,h.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,h.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),m=(0,h.useRef)({x:0,y:0}),b=(0,h.useRef)({x:0,y:0}),y=(0,h.useMemo)(()=>{switch(n){case St.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case St.DraggableRect:return o}},[n,o,l]),x=(0,h.useRef)(null),w=(0,h.useCallback)(()=>{const e=x.current;if(!e)return;const t=m.current.x*b.current.x,n=m.current.y*b.current.y;e.scrollBy(t,n)},[]),C=(0,h.useMemo)(()=>s===kt.TreeOrder?[...c].reverse():c,[s,c]);(0,h.useEffect)(()=>{if(i&&c.length&&y){for(const e of C){if(!1===(null==r?void 0:r(e)))continue;const n=c.indexOf(e),o=u[n];if(!o)continue;const{direction:i,speed:s}=nt(e,o,y,t,f);for(const e of["x","y"])p[e][i[e]]||(s[e]=0,i[e]=0);if(s.x>0||s.y>0)return v(),x.current=e,g(w,a),m.current=s,void(b.current=i)}m.current={x:0,y:0},b.current={x:0,y:0},v()}else v()},[t,w,r,v,i,a,JSON.stringify(y),JSON.stringify(p),g,c,C,u,JSON.stringify(f)])}({...Y,delta:S,draggingRect:Se,pointerCoordinates:xe,scrollableAncestors:ve,scrollableAncestorRects:me});const qe=(0,h.useMemo)(()=>({active:M,activeNode:H,activeNodeRect:K,activatorEvent:N,collisions:ke,containerNodeRect:V,dragOverlay:ee,draggableNodes:E,droppableContainers:k,droppableRects:q,over:Ie,measureDroppableContainers:z,scrollableAncestors:ve,scrollableAncestorRects:me,measuringConfiguration:U,measuringScheduled:W,windowRect:ge}),[M,H,K,N,ke,V,ee,E,k,q,Ie,z,ve,me,U,W,ge]),We=(0,h.useMemo)(()=>({activatorEvent:N,activators:Fe,active:M,activeNodeRect:K,ariaDescribedById:{draggable:P},dispatch:b,draggableNodes:E,over:Ie,measureDroppableContainers:z}),[N,Fe,M,K,b,P,E,Ie,z]);return v().createElement(Ee.Provider,{value:x},v().createElement(Yt.Provider,{value:We},v().createElement($t.Provider,{value:qe},v().createElement(Jt.Provider,{value:Ne},l)),v().createElement(Gt,{disabled:!1===(null==a?void 0:a.restoreFocus)})),v().createElement(Ae,{...a,hiddenTextDescribedById:P}))}),en=(0,h.createContext)(null),tn="button";const nn={timeout:25};function rn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function on(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function an(e){return null!==e&&e>=0}const sn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=rn(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},ln="Sortable",cn=v().createContext({activeIndex:-1,containerId:ln,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:sn,disabled:{draggable:!1,droppable:!1}});function un(e){let{children:t,id:n,items:r,strategy:o=sn,disabled:i=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=(0,h.useContext)($t),d=pe(ln,n),f=Boolean(null!==s.rect),p=(0,h.useMemo)(()=>r.map(e=>"object"==typeof e&&"id"in e?e.id:e),[r]),g=null!=a,m=a?p.indexOf(a.id):-1,b=c?p.indexOf(c.id):-1,y=(0,h.useRef)(p),x=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(p,y.current),w=-1!==b&&-1===m||x,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(i);ae(()=>{x&&g&&u(p)},[x,p,g,u]),(0,h.useEffect)(()=>{y.current=p},[p]);const R=(0,h.useMemo)(()=>({activeIndex:m,containerId:d,disabled:C,disableTransforms:w,items:p,overIndex:b,useDragOverlay:f,sortedRects:on(p,l),strategy:o}),[m,d,C.draggable,C.droppable,w,p,b,l,f,o]);return v().createElement(cn.Provider,{value:R},t)}const dn=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return rn(n,r,o).indexOf(t)},fn=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r||s!==i&&o===a||!n&&(a===o||t!==l))},pn={duration:200,easing:"ease"},gn="transform",hn=ye.Transition.toString({property:gn,duration:0,easing:"linear"}),vn={roleDescription:"sortable"};function mn(e){let{animateLayoutChanges:t=fn,attributes:n,disabled:r,data:o,getNewIndex:i=dn,id:a,strategy:s,resizeObserverConfig:l,transition:c=pn}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:g,sortedRects:v,overIndex:m,useDragOverlay:b,strategy:y}=(0,h.useContext)(cn),x=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,p),w=u.indexOf(a),C=(0,h.useMemo)(()=>({sortable:{containerId:d,index:w,items:u},...o}),[d,o,w,u]),R=(0,h.useMemo)(()=>u.slice(u.indexOf(a)),[u,a]),{rect:D,node:E,isOver:S,setNodeRef:k}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=pe("Droppable"),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=(0,h.useContext)(Yt),u=(0,h.useRef)({disabled:n}),d=(0,h.useRef)(!1),f=(0,h.useRef)(null),p=(0,h.useRef)(null),{disabled:g,updateMeasurementsFor:v,timeout:m}={...nn,...o},b=le(null!=v?v:r),y=jt({callback:(0,h.useCallback)(()=>{d.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(b.current)?b.current:[b.current]),p.current=null},m)):d.current=!0},[m]),disabled:g||!a}),x=(0,h.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y]),[w,C]=ue(x),R=le(t);return(0,h.useEffect)(()=>{y&&w.current&&(y.disconnect(),d.current=!1,y.observe(w.current))},[w,y]),(0,h.useEffect)(()=>(s({type:Oe.RegisterDroppable,element:{id:r,key:i,disabled:n,node:w,rect:f,data:R}}),()=>s({type:Oe.UnregisterDroppable,key:i,id:r})),[r]),(0,h.useEffect)(()=>{n!==u.current.disabled&&(s({type:Oe.SetDroppableDisabled,id:r,key:i,disabled:n}),u.current.disabled=n)},[r,i,n,s]),{active:a,rect:f,isOver:(null==l?void 0:l.id)===r,node:w,over:l,setNodeRef:C}}({id:a,data:C,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:R,...l}}),{active:A,activatorEvent:O,activeNodeRect:M,attributes:I,setNodeRef:T,listeners:j,isDragging:N,over:L,setActivatorNodeRef:_,transform:P}=function(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=pe("Draggable"),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=(0,h.useContext)(Yt),{role:p=tn,roleDescription:g="draggable",tabIndex:v=0}=null!=o?o:{},m=(null==l?void 0:l.id)===t,b=(0,h.useContext)(m?Jt:en),[y,x]=ue(),[w,C]=ue(),R=function(e,t){return(0,h.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(a,t),D=le(n);return ae(()=>(d.set(t,{id:t,key:i,node:y,activatorNode:w,data:D}),()=>{const e=d.get(t);e&&e.key===i&&d.delete(t)}),[d,t]),{active:l,activatorEvent:s,activeNodeRect:c,attributes:(0,h.useMemo)(()=>({role:p,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!m||p!==tn)||void 0,"aria-roledescription":g,"aria-describedby":u.draggable}),[r,p,v,m,g,u.draggable]),isDragging:m,listeners:r?void 0:R,node:y,over:f,setNodeRef:x,setActivatorNodeRef:C,transform:b}}({id:a,data:C,attributes:{...vn,...n},disabled:x.draggable}),F=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,h.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}(k,T),U=Boolean(A),B=U&&!g&&an(f)&&an(m),q=!b&&N,z=q&&B?P:null,W=B?null!=z?z:(null!=s?s:y)({rects:v,activeNodeRect:M,activeIndex:f,overIndex:m,index:w}):null,H=an(f)&&an(m)?i({id:a,items:u,activeIndex:f,overIndex:m}):w,X=null==A?void 0:A.id,Y=(0,h.useRef)({activeId:X,items:u,newIndex:H,containerId:d}),$=u!==Y.current.items,K=t({active:A,containerId:d,isDragging:N,isSorting:U,id:a,index:w,items:u,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:c,wasDragging:null!=Y.current.activeId}),V=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,a]=(0,h.useState)(null),s=(0,h.useRef)(n);return ae(()=>{if(!t&&n!==s.current&&r.current){const e=o.current;if(e){const t=He(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&a(n)}}n!==s.current&&(s.current=n)},[t,n,r,o]),(0,h.useEffect)(()=>{i&&a(null)},[i]),i}({disabled:!K,index:w,node:E,rect:D});return(0,h.useEffect)(()=>{U&&Y.current.newIndex!==H&&(Y.current.newIndex=H),d!==Y.current.containerId&&(Y.current.containerId=d),u!==Y.current.items&&(Y.current.items=u)},[U,H,d,u]),(0,h.useEffect)(()=>{if(X===Y.current.activeId)return;if(X&&!Y.current.activeId)return void(Y.current.activeId=X);const e=setTimeout(()=>{Y.current.activeId=X},50);return()=>clearTimeout(e)},[X]),{active:A,activeIndex:f,attributes:I,data:C,rect:D,index:w,newIndex:H,items:u,isOver:S,isSorting:U,isDragging:N,listeners:j,node:E,overIndex:m,over:L,setNodeRef:F,setActivatorNodeRef:_,setDroppableNodeRef:k,setDraggableNodeRef:T,transform:null!=V?V:W,transition:V||$&&Y.current.newIndex===w?hn:q&&!me(O)||!c?void 0:U||K?ye.Transition.toString({...c,property:gn}):void 0}}ut.Down,ut.Right,ut.Up,ut.Left;const bn=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?function(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}(r,n,t):r};function yn(){return yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yn.apply(null,arguments)}const xn=A("div",{target:"e1hax4ql7",label:"ImageWrapper"})("flex-basis:155px;width:155px;height:100px;margin-right:20px;margin-bottom:20px;border:",V.borders.textField,";border-radius:",V.lengths.borderRadius,";overflow:hidden;",V.effects.checkerboard,";",V.shadows.inset,";cursor:",e=>e.sortable?"pointer":"auto",";"),wn=A("div",{target:"e1hax4ql6",label:"SortableImageButtonsWrapper"})({name:"1ekgmip",styles:"display:flex;justify-content:center;column-gap:10px;margin-right:20px;margin-top:-10px;margin-bottom:10px"}),Cn=A("img",{target:"e1hax4ql5",label:"StyledImage"})({name:"ukfjzf",styles:"width:100%;height:100%;object-fit:contain"});function Rn({value:e,field:n,getAsset:r}){const[o,i]=(0,h.useState)(null);return(0,h.useEffect)(()=>{if(e){const t=r(e,n);i(t)}else i(null)},[e,n,r]),o?(0,t.jsx)(Cn,{role:"presentation",src:o}):null}function Dn({onRemove:e,onReplace:n}){return(0,t.jsx)(wn,null,(0,t.jsx)(V.IconButton,{size:"small",type:"media",onClick:n}),(0,t.jsx)(V.IconButton,{size:"small",type:"close",onClick:e}))}function En(e){const{attributes:n,listeners:r,setNodeRef:o,transform:i,transition:a}=mn({id:e.id}),s={transform:ye.Transform.toString(i),transition:a},{itemValue:l,getAsset:c,field:u,onRemove:d,onReplace:f}=e;return(0,t.jsx)("div",yn({ref:o,style:s},n,r),(0,t.jsx)(xn,{sortable:!0},(0,t.jsx)(Rn,{value:l,field:u,getAsset:c})),(0,t.jsx)(Dn,{item:l,onRemove:d,onReplace:f}))}var Sn={name:"a42x49-SortableMultiImageWrapper",styles:"display:flex;flex-wrap:wrap;label:SortableMultiImageWrapper;"};function kn({items:e,getAsset:n,field:r,onSortEnd:o,onRemoveOne:i,onReplaceOne:a}){const s={distance:4},l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,h.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}(Ie(Rt,{activationConstraint:s}),Ie(Et,{activationConstraint:s}));return(0,t.jsx)("div",{css:Sn},(0,t.jsx)(Qt,{modifiers:[bn],collisionDetection:Pe,sensors:l,onDragEnd:function({active:t,over:n}){o({oldIndex:e.findIndex(e=>e.id===t.id),newIndex:e.findIndex(e=>e.id===n.id)})}},(0,t.jsx)(un,{items:e},e.map((e,o)=>(0,t.jsx)(En,{key:e.id,id:e.id,index:o,itemValue:e.value,getAsset:n,field:r,onRemove:i(o),onReplace:a(o)})))))}const An=A("a",{target:"e1hax4ql4",label:"FileLink"})({name:"7mbjrw",styles:"margin-bottom:20px;font-weight:normal;color:inherit;&:hover,&:active,&:focus{text-decoration:underline;}"}),On=A("div",{target:"e1hax4ql3",label:"FileLinks"})({name:"cn3xcj",styles:"margin-bottom:12px"}),Mn=A("ul",{target:"e1hax4ql2",label:"FileLinkList"})({name:"ffhm6p",styles:"list-style-type:none"}),In=A("button",{target:"e1hax4ql1",label:"FileWidgetButton"})(V.buttons.button,";",V.components.badge,";margin-bottom:12px;"),Tn=A("button",{target:"e1hax4ql0",label:"FileWidgetButtonRemove"})(V.buttons.button,";",V.components.badgeDanger,";");function jn(e){return Array.isArray(e)||j.List.isList(e)}function Nn(e){return j.List.isList(e)?e.toArray():e??""}const Ln=L()(e=>console.warn(K`
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@emotion/react"),require("react"),require("prop-types"),require("react-immutable-proptypes"),require("immutable"),require("decap-cms-ui-default"),require("decap-cms-lib-util")):"function"==typeof define&&define.amd?define("DecapCmsWidgetFile",["@emotion/react","react","prop-types","react-immutable-proptypes","immutable","decap-cms-ui-default","decap-cms-lib-util"],t):"object"==typeof exports?exports.DecapCmsWidgetFile=t(require("@emotion/react"),require("react"),require("prop-types"),require("react-immutable-proptypes"),require("immutable"),require("decap-cms-ui-default"),require("decap-cms-lib-util")):e.DecapCmsWidgetFile=t(e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsDefaultExports.ImmutablePropTypes,e.DecapCmsDefaultExports.Immutable,e.DecapCmsUiDefault,e.DecapCmsLibUtil)}(window,(e,t,n,r,o,i,a)=>(()=>{var s={6:(e,t,n)=>{var r=n(714).Symbol;e.exports=r},20:(e,t,n)=>{"use strict";e.exports=n(360)},70:(e,t,n)=>{var r=n(836);e.exports=function(e){return r(2,e)}},103:(e,t,n)=>{var r=n(997),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},110:t=>{"use strict";t.exports=e},119:e=>{"use strict";e.exports=t},135:e=>{"use strict";e.exports=a},171:e=>{"use strict";e.exports=i},265:(e,t,n)=>{var r=n(639),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},270:(e,t,n)=>{"use strict";e.exports=n(460)},271:(e,t,n)=>{var r=n(6),o=n(650),i=n(881),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},360:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,m=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case v:case g:case l:return e;default:return t}}case o:return t}}}function C(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return C(e)||x(e)===u},t.isConcurrentMode=C,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===v},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===b||e.$$typeof===y||e.$$typeof===w||e.$$typeof===m)},t.typeOf=x},378:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(468)},400:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},434:e=>{"use strict";e.exports=n},460:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:o,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=o,t.jsxs=o},468:(e,t,n)=>{"use strict";var r=n(119);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=Symbol.for("react.portal");r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:i,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.unstable_batchedUpdates=function(e,t){return e(t)}},522:e=>{"use strict";e.exports=o},583:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},603:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},630:e=>{"use strict";e.exports=r},639:(e,t,n)=>{var r=n(103),o=n(400),i=n(975),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},650:(e,t,n)=>{var r=n(6),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},674:(e,t,n)=>{"use strict";var r=n(20),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),v=0;v<a.length;++v){var m=a[v];if(!(i[m]||r&&r[m]||g&&g[m]||s&&s[m])){var b=f(n,m);try{c(t,m,b)}catch(e){}}}}return t}},714:(e,t,n)=>{var r=n(603),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},758:(e,t,n)=>{var r=n(265);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},836:(e,t,n)=>{var r=n(758);e.exports=function(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=r(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}},881:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},975:(e,t,n)=>{var r=n(271),o=n(583);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},997:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return s[e](n,n.exports,c),n.exports}c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var u={};return(()=>{"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.apply(null,arguments)}c.d(u,{DecapCmsWidgetFile:()=>ao});var t=c(110),n={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,scale: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};function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var o=/[A-Z]|^ms/g,i=/_EMO_([^_]+?)_([^]*?)_EMO_/g,a=function(e){return 45===e.charCodeAt(1)},s=function(e){return null!=e&&"boolean"!=typeof e},l=r(function(e){return a(e)?e:e.replace(o,"-$&").toLowerCase()}),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(i,function(e,t,n){return p={name:t,styles:n,next:p},t})}return 1===n[e]||a(e)||"number"!=typeof t||0===t?t:t+"px"};function f(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return p={name:o.name,styles:o.styles,next:p},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)p={name:a.name,styles:a.styles,next:p},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=f(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var c=a;null!=t&&void 0!==t[c]?r+=i+"{"+t[c]+"}":s(c)&&(r+=l(i)+":"+d(i,c)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var u=f(e,t,a);switch(i){case"animation":case"animationName":r+=l(i)+":"+u+";";break;default:r+=i+"{"+u+"}"}}else for(var p=0;p<a.length;p++)s(a[p])&&(r+=l(i)+":"+d(i,a[p])+";")}return r}(e,t,n);case"function":if(void 0!==e){var c=p,u=n(e);return p=c,f(e,t,u)}}var h=n;if(null==t)return h;var g=t[h];return void 0!==g?g:h}var p,h=/label:\s*([^\s;{]+)\s*(;|$)/g;function g(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";p=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=f(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=f(n,t,e[a]),r&&(o+=i[a]);h.lastIndex=0;for(var s,l="";null!==(s=h.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:p}}var v=c(119),m=c.n(v),b=!!v.useInsertionEffect&&v.useInsertionEffect,y=b||function(e){return e()};function w(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}b||v.useLayoutEffect;var x,C,S=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},R=function(e,t,n){S(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}},E=/^((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|fetchpriority|fetchPriority|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|popover|popoverTarget|popoverTargetAction|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)-.*))$/,k=r(function(e){return E.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),D=function(e){return"theme"!==e},A=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?k:D},O=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},M=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return S(t,n,r),y(function(){return R(t,n,r)}),null},T=function n(r,o){var i,a,s=r.__emotion_real===r,l=s&&r.__emotion_base||r;void 0!==o&&(i=o.label,a=o.target);var c=O(r,o,s),u=c||A(l),d=!u("as");return function(){var f=arguments,p=s&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==i&&p.push("label:"+i+";"),null==f[0]||void 0===f[0].raw)p.push.apply(p,f);else{var h=f[0];p.push(h[0]);for(var m=f.length,b=1;b<m;b++)p.push(f[b],h[b])}var y=(0,t.withEmotionCache)(function(e,n,r){var o=d&&e.as||l,i="",s=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=v.useContext(t.ThemeContext)}"string"==typeof e.className?i=w(n.registered,s,e.className):null!=e.className&&(i=e.className+" ");var m=g(p.concat(s),n.registered,f);i+=n.key+"-"+m.name,void 0!==a&&(i+=" "+a);var b=d&&void 0===c?A(o):u,y={};for(var x in e)d&&"as"===x||b(x)&&(y[x]=e[x]);return y.className=i,r&&(y.ref=r),v.createElement(v.Fragment,null,v.createElement(M,{cache:n,serialized:m,isStringTag:"string"==typeof o}),v.createElement(o,y))});return y.displayName=void 0!==i?i:"Styled("+("string"==typeof l?l:l.displayName||l.name||"Component")+")",y.defaultProps=r.defaultProps,y.__emotion_real=y,y.__emotion_base=l,y.__emotion_styles=p,y.__emotion_forwardProp=c,Object.defineProperty(y,"toString",{value:function(){return"."+a}}),y.withComponent=function(t,r){return n(t,e({},o,r,{shouldForwardProp:O(y,r,!0)})).apply(void 0,p)},y}},I=c(434),N=c.n(I),_=c(630),L=c.n(_),P=c(522),$=c(70),j=c.n($),F=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),z=(x=["",""],C=["",""],Object.freeze(Object.defineProperties(x,{raw:{value:Object.freeze(C)}}))),U=function(){function e(){for(var t=this,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return"function"==typeof e?t.interimTag.bind(t,e):"string"==typeof e?t.transformEndResult(e):(e=e.map(t.transformString.bind(t)),t.transformEndResult(e.reduce(t.processSubstitutions.bind(t,r))))},r.length>0&&Array.isArray(r[0])&&(r=r[0]),this.transformers=r.map(function(e){return"function"==typeof e?e():e}),this.tag}return F(e,[{key:"interimTag",value:function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return this.tag(z,e.apply(void 0,[t].concat(r)))}},{key:"processSubstitutions",value:function(e,t,n){var r=this.transformSubstitution(e.shift(),t);return"".concat(t,r,n)}},{key:"transformString",value:function(e){return this.transformers.reduce(function(e,t){return t.onString?t.onString(e):e},e)}},{key:"transformSubstitution",value:function(e,t){return this.transformers.reduce(function(e,n){return n.onSubstitution?n.onSubstitution(e,t):e},e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce(function(e,t){return t.onEndResult?t.onEndResult(e):e},e)}}]),e}();const q=U;var B={separator:"",conjunction:"",serial:!1};const W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B;return{onSubstitution:function(t,n){if(Array.isArray(t)){var r=t.length,o=e.separator,i=e.conjunction,a=e.serial,s=n.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(o+s[1]):t.join(o+" "),i&&r>1){var l=t.lastIndexOf(o);t=t.slice(0,l)+(a?o:"")+" "+i+t.slice(l+1)}}return t}}},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var n=t.match(/^[^\S\n]*(?=\S)/gm),r=n&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n.map(function(e){return e.length})));if(r){var o=new RegExp("^.{"+r+"}","gm");return t.replace(o,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},Y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};new q(W({separator:","}),H,Y),new q(W({separator:",",conjunction:"and"}),H,Y),new q(W({separator:",",conjunction:"or"}),H,Y);const X=function(e){return{onSubstitution:function(t,n){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}};var K=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new q(X("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(K):K(e)?e:""}}},W,H,Y);const V=function(e,t){return{onSubstitution:function(n,r){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==n?n:n.toString().replace(e,t)}}};new q(X("\n"),W,H,Y,V(/&/g,"&amp;"),V(/</g,"&lt;"),V(/>/g,"&gt;"),V(/"/g,"&quot;"),V(/'/g,"&#x27;"),V(/`/g,"&#x60;"));const G=function(e,t){return{onEndResult:function(n){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return n.replace(e,t)}}},J=new q(G(/(?:\n(?:\s*))+/g," "),Y);new q(G(/(?:\n\s*)/g,""),Y),new q(W({separator:","}),G(/(?:\s+)/g," "),Y),new q(W({separator:",",conjunction:"or"}),G(/(?:\s+)/g," "),Y),new q(W({separator:",",conjunction:"and"}),G(/(?:\s+)/g," "),Y),new q(W,H,Y),new q(W,G(/(?:\s+)/g," "),Y),new q(H,Y),new q(H("all"),Y);var Z=c(171),Q=c(135),ee=c(378);const te="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ne(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function re(e){return"nodeType"in e}function oe(e){var t,n;return e?ne(e)?e:re(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function ie(e){const{Document:t}=oe(e);return e instanceof t}function ae(e){return!ne(e)&&e instanceof oe(e).HTMLElement}function se(e){return e instanceof oe(e).SVGElement}function le(e){return e?ne(e)?e.document:re(e)?ie(e)?e:ae(e)||se(e)?e.ownerDocument:document:document:document}const ce=te?v.useLayoutEffect:v.useEffect;function ue(e){const t=(0,v.useRef)(e);return ce(()=>{t.current=e}),(0,v.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function de(e,t){void 0===t&&(t=[e]);const n=(0,v.useRef)(e);return ce(()=>{n.current!==e&&(n.current=e)},t),n}function fe(e,t){const n=(0,v.useRef)();return(0,v.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function pe(e){const t=ue(e),n=(0,v.useRef)(null),r=(0,v.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function he(e){const t=(0,v.useRef)();return(0,v.useEffect)(()=>{t.current=e},[e]),t.current}let ge={};function ve(e,t){return(0,v.useMemo)(()=>{if(t)return t;const n=null==ge[e]?0:ge[e]+1;return ge[e]=n,e+"-"+n},[e,t])}function me(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}}const be=me(1),ye=me(-1);function we(e){if(!e)return!1;const{KeyboardEvent:t}=oe(e.target);return t&&e instanceof t}function xe(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=oe(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const Ce=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Ce.Translate.toString(e),Ce.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Se="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Re(e){return e.matches(Se)?e:e.querySelector(Se)}const Ee={display:"none"};function ke(e){let{id:t,value:n}=e;return m().createElement("div",{id:t,style:Ee},n)}function De(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return m().createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}const Ae=(0,v.createContext)(null),Oe={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Me={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Te(e){let{announcements:t=Me,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Oe}=e;const{announce:i,announcement:a}=function(){const[e,t]=(0,v.useState)("");return{announce:(0,v.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),s=ve("DndLiveRegion"),[l,c]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{c(!0)},[]),function(e){const t=(0,v.useContext)(Ae);(0,v.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}((0,v.useMemo)(()=>({onDragStart(e){let{active:n}=e;i(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&i(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;i(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;i(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;i(t.onDragCancel({active:n,over:r}))}}),[i,t])),!l)return null;const u=m().createElement(m().Fragment,null,m().createElement(ke,{id:r,value:o.draggable}),m().createElement(De,{id:s,announcement:a}));return n?(0,ee.createPortal)(u,n):u}var Ie;function Ne(){}function _e(e,t){return(0,v.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(Ie||(Ie={}));const Le=Object.freeze({x:0,y:0});function Pe(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function je(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Fe(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const ze=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Fe(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Pe(Fe(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort($e)};function Ue(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*s;return Number((o/(n+r-o)).toFixed(4))}return 0}const qe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=Ue(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(je)};function Be(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Le}function We(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const He=We(1);const Ye={ignoreTransform:!1};function Xe(e,t){void 0===t&&(t=Ye);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=oe(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,l=e.left-a-(1-o)*parseFloat(n),c=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:o,width:i,height:a,bottom:s,right:l}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:l}}function Ke(e){return Xe(e,{ignoreTransform:!0})}function Ve(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(ie(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ae(o)||se(o))return n;if(n.includes(o))return n;const i=oe(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=oe(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=oe(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Ge(e){const[t]=Ve(e,1);return null!=t?t:null}function Je(e){return te&&e?ne(e)?e:re(e)?ie(e)||e===le(e).scrollingElement?window:ae(e)?e:null:null:null}function Ze(e){return ne(e)?e.scrollX:e.scrollLeft}function Qe(e){return ne(e)?e.scrollY:e.scrollTop}function et(e){return{x:Ze(e),y:Qe(e)}}var tt;function nt(e){return!(!te||!e)&&e===document.scrollingElement}function rt(e){const t={x:0,y:0},n=nt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(tt||(tt={}));const ot={x:.2,y:.2};function it(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=ot);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=rt(e),p={x:0,y:0},h={x:0,y:0},g=t.height*o.y,v=t.width*o.x;return!c&&i<=t.top+g?(p.y=tt.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!u&&l>=t.bottom-g&&(p.y=tt.Forward,h.y=r*Math.abs((t.bottom-g-l)/g)),!f&&s>=t.right-v?(p.x=tt.Forward,h.x=r*Math.abs((t.right-v-s)/v)):!d&&a<=t.left+v&&(p.x=tt.Backward,h.x=r*Math.abs((t.left+v-a)/v)),{direction:p,speed:h}}function at(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function st(e){return e.reduce((e,t)=>be(e,et(t)),Le)}const lt=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Ze(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Qe(t),0)}]];class ct{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Ve(t),r=st(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of lt)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ut{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function dt(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ft,pt,ht;function gt(e){e.preventDefault()}function vt(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ft||(ft={})),(ht=pt||(pt={})).Space="Space",ht.Down="ArrowDown",ht.Right="ArrowRight",ht.Left="ArrowLeft",ht.Up="ArrowUp",ht.Esc="Escape",ht.Enter="Enter",ht.Tab="Tab";const mt={start:[pt.Space,pt.Enter],cancel:[pt.Esc],end:[pt.Space,pt.Enter,pt.Tab]},bt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case pt.Right:return{...n,x:n.x+25};case pt.Left:return{...n,x:n.x-25};case pt.Down:return{...n,y:n.y+25};case pt.Up:return{...n,y:n.y-25}}};class yt{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new ut(le(t)),this.windowListeners=new ut(oe(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ft.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Xe),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Ge(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Le)}handleKeyDown(e){if(we(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=mt,coordinateGetter:i=bt,scrollBehavior:a="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:Le;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=ye(u,c),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:f}=rt(n),p=at(n),h={x:Math.min(o===pt.Right?p.right-p.width/2:p.right,Math.max(o===pt.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(o===pt.Down?p.bottom-p.height/2:p.bottom,Math.max(o===pt.Down?p.top:p.top+p.height/2,u.y))},g=o===pt.Right&&!s||o===pt.Left&&!l,v=o===pt.Down&&!c||o===pt.Up&&!i;if(g&&h.x!==u.x){const e=n.scrollLeft+t.x,i=o===pt.Right&&e<=d.x||o===pt.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===pt.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(v&&h.y!==u.y){const e=n.scrollTop+t.y,i=o===pt.Down&&e<=d.y||o===pt.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===pt.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,be(ye(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function wt(e){return Boolean(e&&"distance"in e)}function xt(e){return Boolean(e&&"delay"in e)}yt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=mt,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class Ct{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=oe(e);return e instanceof t?e:le(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=le(i),this.documentListeners=new ut(this.document),this.listeners=new ut(n),this.windowListeners=new ut(oe(i)),this.initialCoordinates=null!=(r=xe(o))?r:Le,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.DragStart,gt),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),this.windowListeners.add(ft.ContextMenu,gt),this.documentListeners.add(ft.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(xt(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(wt(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ft.Click,vt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ft.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const s=null!=(t=xe(e))?t:Le,l=ye(r,s);if(!n&&a){if(wt(a)){if(null!=a.tolerance&&dt(l,a.tolerance))return this.handleCancel();if(dt(l,a.distance))return this.handleStart()}return xt(a)&&dt(l,a.tolerance)?this.handleCancel():void this.handlePending(a,l)}e.cancelable&&e.preventDefault(),i(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===pt.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const St={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Rt extends Ct{constructor(e){const{event:t}=e,n=le(t.target);super(e,St,n)}}Rt.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const Et={move:{name:"mousemove"},end:{name:"mouseup"}};var kt;!function(e){e[e.RightClick=2]="RightClick"}(kt||(kt={}));class Dt extends Ct{constructor(e){super(e,Et,le(e.event.target))}}Dt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==kt.RightClick&&(null==r||r({event:n}),!0)}}];const At={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ot extends Ct{constructor(e){super(e,At)}static setup(){return window.addEventListener(At.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(At.move.name,e)};function e(){}}}var Mt,Tt;Ot.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Mt||(Mt={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Tt||(Tt={}));const It={x:{[tt.Backward]:!1,[tt.Forward]:!1},y:{[tt.Backward]:!1,[tt.Forward]:!1}};var Nt,_t;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Nt||(Nt={})),function(e){e.Optimized="optimized"}(_t||(_t={}));const Lt=new Map;function Pt(e,t){return fe(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function $t(e){let{callback:t,disabled:n}=e;const r=ue(t),o=(0,v.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return(0,v.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function jt(e){return new ct(Xe(e),e)}function Ft(e,t,n){void 0===t&&(t=jt);const[r,o]=(0,v.useState)(null);function i(){o(r=>{if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}const a=function(e){let{callback:t,disabled:n}=e;const r=ue(t),o=(0,v.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,v.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){i();break}}}}),s=$t({callback:i});return ce(()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())},[e]),r}const zt=[];function Ut(e,t){void 0===t&&(t=[]);const n=(0,v.useRef)(null);return(0,v.useEffect)(()=>{n.current=null},t),(0,v.useEffect)(()=>{const t=e!==Le;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?ye(e,n.current):Le}function qt(e){return(0,v.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Bt=[];const Wt=[{sensor:Rt,options:{}},{sensor:yt,options:{}}],Ht={current:{}},Yt={draggable:{measure:Ke},droppable:{measure:Ke,strategy:Nt.WhileDragging,frequency:_t.Optimized},dragOverlay:{measure:Xe}};class Xt extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Kt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Xt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ne},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Yt,measureDroppableContainers:Ne,windowRect:null,measuringScheduled:!1},Vt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ne,draggableNodes:new Map,over:null,measureDroppableContainers:Ne},Gt=(0,v.createContext)(Vt),Jt=(0,v.createContext)(Kt);function Zt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Xt}}}function Qt(e,t){switch(t.type){case Ie.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ie.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Ie.DragEnd:case Ie.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ie.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Xt(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Ie.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Xt(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Ie.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Xt(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function en(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,v.useContext)(Gt),i=he(r),a=he(null==n?void 0:n.id);return(0,v.useEffect)(()=>{if(!t&&!r&&i&&null!=a){if(!we(i))return;if(document.activeElement===i.target)return;const e=o.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=Re(e);if(t){t.focus();break}}})}},[r,t,o,a,i]),null}const tn=(0,v.createContext)({...Le,scaleX:1,scaleY:1});var nn;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(nn||(nn={}));const rn=(0,v.memo)(function(e){var t,n,r,o;let{id:i,accessibility:a,autoScroll:s=!0,children:l,sensors:c=Wt,collisionDetection:u=qe,measuring:d,modifiers:f,...p}=e;const h=(0,v.useReducer)(Qt,void 0,Zt),[g,b]=h,[y,w]=function(){const[e]=(0,v.useState)(()=>new Set),t=(0,v.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]),n=(0,v.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]);return[n,t]}(),[x,C]=(0,v.useState)(nn.Uninitialized),S=x===nn.Initialized,{draggable:{active:R,nodes:E,translate:k},droppable:{containers:D}}=g,A=null!=R?E.get(R):null,O=(0,v.useRef)({initial:null,translated:null}),M=(0,v.useMemo)(()=>{var e;return null!=R?{id:R,data:null!=(e=null==A?void 0:A.data)?e:Ht,rect:O}:null},[R,A]),T=(0,v.useRef)(null),[I,N]=(0,v.useState)(null),[_,L]=(0,v.useState)(null),P=de(p,Object.values(p)),$=ve("DndDescribedBy",i),j=(0,v.useMemo)(()=>D.getEnabled(),[D]),F=(z=d,(0,v.useMemo)(()=>({draggable:{...Yt.draggable,...null==z?void 0:z.draggable},droppable:{...Yt.droppable,...null==z?void 0:z.droppable},dragOverlay:{...Yt.dragOverlay,...null==z?void 0:z.dragOverlay}}),[null==z?void 0:z.draggable,null==z?void 0:z.droppable,null==z?void 0:z.dragOverlay]));var z;const{droppableRects:U,measureDroppableContainers:q,measuringScheduled:B}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=(0,v.useState)(null),{frequency:s,measure:l,strategy:c}=o,u=(0,v.useRef)(e),d=function(){switch(c){case Nt.Always:return!1;case Nt.BeforeDragging:return n;default:return!n}}(),f=de(d),p=(0,v.useCallback)(function(e){void 0===e&&(e=[]),f.current||a(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),h=(0,v.useRef)(null),g=fe(t=>{if(d&&!n)return Lt;if(!t||t===Lt||u.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new ct(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,i,n,d,l]);return(0,v.useEffect)(()=>{u.current=e},[e]),(0,v.useEffect)(()=>{d||p()},[n,d]),(0,v.useEffect)(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),(0,v.useEffect)(()=>{d||"number"!=typeof s||null!==h.current||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,d,p,...r]),{droppableRects:g,measureDroppableContainers:p,measuringScheduled:null!=i}}(j,{dragging:S,dependencies:[k.x,k.y],config:F.droppable}),W=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return fe(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(E,R),H=(0,v.useMemo)(()=>_?xe(_):null,[_]),Y=function(){const e=!1===(null==I?void 0:I.autoScrollEnabled),t="object"==typeof s?!1===s.enabled:!1===s,n=S&&!e&&!t;return"object"==typeof s?{...s,enabled:n}:{enabled:n}}(),X=function(e,t){return Pt(e,t)}(W,F.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=(0,v.useRef)(!1),{x:a,y:s}="boolean"==typeof o?{x:o,y:o}:o;ce(()=>{if(!a&&!s||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=Be(n(e),r);if(a||(o.x=0),s||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=Ge(e);t&&t.scrollBy({top:o.y,left:o.x})}},[t,a,s,r,n])}({activeNode:null!=R?E.get(R):null,config:Y.layoutShiftCompensation,initialRect:X,measure:F.draggable.measure});const K=Ft(W,F.draggable.measure,X),V=Ft(W?W.parentElement:null),G=(0,v.useRef)({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),J=D.getNodeFor(null==(t=G.current.over)?void 0:t.id),Z=function(e){let{measure:t}=e;const[n,r]=(0,v.useState)(null),o=$t({callback:(0,v.useCallback)(e=>{for(const{target:n}of e)if(ae(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),i=(0,v.useCallback)(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ae(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)},[t,o]),[a,s]=pe(i);return(0,v.useMemo)(()=>({nodeRef:a,rect:n,setRef:s}),[n,a,s])}({measure:F.dragOverlay.measure}),Q=null!=(n=Z.nodeRef.current)?n:W,ne=S?null!=(r=Z.rect)?r:K:null,re=Boolean(Z.nodeRef.current&&Z.rect),ie=Be(se=re?null:K,Pt(se));var se;const le=qt(Q?oe(Q):null),ue=function(e){const t=(0,v.useRef)(e),n=fe(n=>e?n&&n!==zt&&e&&t.current&&e.parentNode===t.current.parentNode?n:Ve(e):zt,[e]);return(0,v.useEffect)(()=>{t.current=e},[e]),n}(S?null!=J?J:W:null),ge=function(e,t){void 0===t&&(t=Xe);const[n]=e,r=qt(n?oe(n):null),[o,i]=(0,v.useState)(Bt);function a(){i(()=>e.length?e.map(e=>nt(e)?r:new ct(t(e),e)):Bt)}const s=$t({callback:a});return ce(()=>{null==s||s.disconnect(),a(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),o}(ue),me=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}(f,{transform:{x:k.x-ie.x,y:k.y-ie.y,scaleX:1,scaleY:1},activatorEvent:_,active:M,activeNodeRect:K,containerNodeRect:V,draggingNodeRect:ne,over:G.current.over,overlayNodeRect:Z.rect,scrollableAncestors:ue,scrollableAncestorRects:ge,windowRect:le}),ye=H?be(H,k):null,we=function(e){const[t,n]=(0,v.useState)(null),r=(0,v.useRef)(e),o=(0,v.useCallback)(e=>{const t=Je(e.target);t&&n(e=>e?(e.set(t,et(t)),new Map(e)):null)},[]);return(0,v.useEffect)(()=>{const t=r.current;if(e!==t){i(t);const a=e.map(e=>{const t=Je(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,et(t)]):null}).filter(e=>null!=e);n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach(e=>{const t=Je(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),(0,v.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>be(e,t),Le):st(e):Le,[e,t])}(ue),Ce=Ut(we),Se=Ut(we,[K]),Re=be(me,Ce),Ee=ne?He(ne,me):null,ke=M&&Ee?u({active:M,collisionRect:Ee,droppableRects:U,droppableContainers:j,pointerCoordinates:ye}):null,De=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(ke),[Oe,Me]=(0,v.useState)(null),Ne=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(re?me:be(me,Se),null!=(o=null==Oe?void 0:Oe.rect)?o:null,K),_e=(0,v.useRef)(null),Pe=(0,v.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==T.current)return;const o=E.get(T.current);if(!o)return;const i=e.nativeEvent,a=new n({active:T.current,activeNode:o,event:i,options:r,context:G,onAbort(e){if(!E.get(e))return;const{onDragAbort:t}=P.current,n={id:e};null==t||t(n),y({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!E.get(e))return;const{onDragPending:o}=P.current,i={id:e,constraint:t,initialCoordinates:n,offset:r};null==o||o(i),y({type:"onDragPending",event:i})},onStart(e){const t=T.current;if(null==t)return;const n=E.get(t);if(!n)return;const{onDragStart:r}=P.current,o={activatorEvent:i,active:{id:t,data:n.data,rect:O}};(0,ee.unstable_batchedUpdates)(()=>{null==r||r(o),C(nn.Initializing),b({type:Ie.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o}),N(_e.current),L(i)})},onMove(e){b({type:Ie.DragMove,coordinates:e})},onEnd:s(Ie.DragEnd),onCancel:s(Ie.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=G.current;let a=null;if(t&&o){const{cancelDrop:s}=P.current;a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Ie.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Ie.DragCancel)}T.current=null,(0,ee.unstable_batchedUpdates)(()=>{b({type:e}),C(nn.Uninitialized),Me(null),N(null),L(null),_e.current=null;const t=e===Ie.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=P.current[t];null==e||e(a),y({type:t,event:a})}})}}_e.current=a},[E]),$e=(0,v.useCallback)((e,t)=>(n,r)=>{const o=n.nativeEvent,i=E.get(r);if(null!==T.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},T.current=r,Pe(n,t))},[E,Pe]),je=function(e,t){return(0,v.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,$e);!function(e){(0,v.useEffect)(()=>{if(!te)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),ce(()=>{K&&x===nn.Initializing&&C(nn.Initialized)},[K,x]),(0,v.useEffect)(()=>{const{onDragMove:e}=P.current,{active:t,activatorEvent:n,collisions:r,over:o}=G.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:Re.x,y:Re.y},over:o};(0,ee.unstable_batchedUpdates)(()=>{null==e||e(i),y({type:"onDragMove",event:i})})},[Re.x,Re.y]),(0,v.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=G.current;if(!e||null==T.current||!t||!o)return;const{onDragOver:i}=P.current,a=r.get(De),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:o.x,y:o.y},over:s};(0,ee.unstable_batchedUpdates)(()=>{Me(s),null==i||i(l),y({type:"onDragOver",event:l})})},[De]),ce(()=>{G.current={activatorEvent:_,active:M,activeNode:W,collisionRect:Ee,collisions:ke,droppableRects:U,draggableNodes:E,draggingNode:Q,draggingNodeRect:ne,droppableContainers:D,over:Oe,scrollableAncestors:ue,scrollAdjustedTranslate:Re},O.current={initial:ne,translated:Ee}},[M,W,ke,Ee,E,Q,ne,U,D,Oe,ue,Re]),function(e){let{acceleration:t,activator:n=Mt.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=Tt.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=function(e){let{delta:t,disabled:n}=e;const r=he(t);return fe(e=>{if(n||!r||!e)return It;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[tt.Backward]:e.x[tt.Backward]||-1===o,[tt.Forward]:e.x[tt.Forward]||1===o},y:{[tt.Backward]:e.y[tt.Backward]||-1===i,[tt.Forward]:e.y[tt.Forward]||1===i}}},[n,t,r])}({delta:d,disabled:!i}),[h,g]=function(){const e=(0,v.useRef)(null);return[(0,v.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,v.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),m=(0,v.useRef)({x:0,y:0}),b=(0,v.useRef)({x:0,y:0}),y=(0,v.useMemo)(()=>{switch(n){case Mt.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Mt.DraggableRect:return o}},[n,o,l]),w=(0,v.useRef)(null),x=(0,v.useCallback)(()=>{const e=w.current;if(!e)return;const t=m.current.x*b.current.x,n=m.current.y*b.current.y;e.scrollBy(t,n)},[]),C=(0,v.useMemo)(()=>s===Tt.TreeOrder?[...c].reverse():c,[s,c]);(0,v.useEffect)(()=>{if(i&&c.length&&y){for(const e of C){if(!1===(null==r?void 0:r(e)))continue;const n=c.indexOf(e),o=u[n];if(!o)continue;const{direction:i,speed:s}=it(e,o,y,t,f);for(const e of["x","y"])p[e][i[e]]||(s[e]=0,i[e]=0);if(s.x>0||s.y>0)return g(),w.current=e,h(x,a),m.current=s,void(b.current=i)}m.current={x:0,y:0},b.current={x:0,y:0},g()}else g()},[t,x,r,g,i,a,JSON.stringify(y),JSON.stringify(p),h,c,C,u,JSON.stringify(f)])}({...Y,delta:k,draggingRect:Ee,pointerCoordinates:ye,scrollableAncestors:ue,scrollableAncestorRects:ge});const Fe=(0,v.useMemo)(()=>({active:M,activeNode:W,activeNodeRect:K,activatorEvent:_,collisions:ke,containerNodeRect:V,dragOverlay:Z,draggableNodes:E,droppableContainers:D,droppableRects:U,over:Oe,measureDroppableContainers:q,scrollableAncestors:ue,scrollableAncestorRects:ge,measuringConfiguration:F,measuringScheduled:B,windowRect:le}),[M,W,K,_,ke,V,Z,E,D,U,Oe,q,ue,ge,F,B,le]),ze=(0,v.useMemo)(()=>({activatorEvent:_,activators:je,active:M,activeNodeRect:K,ariaDescribedById:{draggable:$},dispatch:b,draggableNodes:E,over:Oe,measureDroppableContainers:q}),[_,je,M,K,b,$,E,Oe,q]);return m().createElement(Ae.Provider,{value:w},m().createElement(Gt.Provider,{value:ze},m().createElement(Jt.Provider,{value:Fe},m().createElement(tn.Provider,{value:Ne},l)),m().createElement(en,{disabled:!1===(null==a?void 0:a.restoreFocus)})),m().createElement(Te,{...a,hiddenTextDescribedById:$}))}),on=(0,v.createContext)(null),an="button";const sn={timeout:25};function ln(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function cn(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function un(e){return null!==e&&e>=0}const dn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=ln(t,r,n),a=t[o],s=i[o];return s&&a?{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}:null},fn="Sortable",pn=m().createContext({activeIndex:-1,containerId:fn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:dn,disabled:{draggable:!1,droppable:!1}});function hn(e){let{children:t,id:n,items:r,strategy:o=dn,disabled:i=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=(0,v.useContext)(Jt),d=ve(fn,n),f=Boolean(null!==s.rect),p=(0,v.useMemo)(()=>r.map(e=>"object"==typeof e&&"id"in e?e.id:e),[r]),h=null!=a,g=a?p.indexOf(a.id):-1,b=c?p.indexOf(c.id):-1,y=(0,v.useRef)(p),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(p,y.current),x=-1!==b&&-1===g||w,C=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(i);ce(()=>{w&&h&&u(p)},[w,p,h,u]),(0,v.useEffect)(()=>{y.current=p},[p]);const S=(0,v.useMemo)(()=>({activeIndex:g,containerId:d,disabled:C,disableTransforms:x,items:p,overIndex:b,useDragOverlay:f,sortedRects:cn(p,l),strategy:o}),[g,d,C.draggable,C.droppable,x,p,b,l,f,o]);return m().createElement(pn.Provider,{value:S},t)}const gn=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return ln(n,r,o).indexOf(t)},vn=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r||s!==i&&o===a||!n&&(a===o||t!==l))},mn={duration:200,easing:"ease"},bn="transform",yn=Ce.Transition.toString({property:bn,duration:0,easing:"linear"}),wn={roleDescription:"sortable"};function xn(e){let{animateLayoutChanges:t=vn,attributes:n,disabled:r,data:o,getNewIndex:i=gn,id:a,strategy:s,resizeObserverConfig:l,transition:c=mn}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:h,sortedRects:g,overIndex:m,useDragOverlay:b,strategy:y}=(0,v.useContext)(pn),w=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,p),x=u.indexOf(a),C=(0,v.useMemo)(()=>({sortable:{containerId:d,index:x,items:u},...o}),[d,o,x,u]),S=(0,v.useMemo)(()=>u.slice(u.indexOf(a)),[u,a]),{rect:R,node:E,isOver:k,setNodeRef:D}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=ve("Droppable"),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=(0,v.useContext)(Gt),u=(0,v.useRef)({disabled:n}),d=(0,v.useRef)(!1),f=(0,v.useRef)(null),p=(0,v.useRef)(null),{disabled:h,updateMeasurementsFor:g,timeout:m}={...sn,...o},b=de(null!=g?g:r),y=$t({callback:(0,v.useCallback)(()=>{d.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(b.current)?b.current:[b.current]),p.current=null},m)):d.current=!0},[m]),disabled:h||!a}),w=(0,v.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y]),[x,C]=pe(w),S=de(t);return(0,v.useEffect)(()=>{y&&x.current&&(y.disconnect(),d.current=!1,y.observe(x.current))},[x,y]),(0,v.useEffect)(()=>(s({type:Ie.RegisterDroppable,element:{id:r,key:i,disabled:n,node:x,rect:f,data:S}}),()=>s({type:Ie.UnregisterDroppable,key:i,id:r})),[r]),(0,v.useEffect)(()=>{n!==u.current.disabled&&(s({type:Ie.SetDroppableDisabled,id:r,key:i,disabled:n}),u.current.disabled=n)},[r,i,n,s]),{active:a,rect:f,isOver:(null==l?void 0:l.id)===r,node:x,over:l,setNodeRef:C}}({id:a,data:C,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...l}}),{active:A,activatorEvent:O,activeNodeRect:M,attributes:T,setNodeRef:I,listeners:N,isDragging:_,over:L,setActivatorNodeRef:P,transform:$}=function(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=ve("Draggable"),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=(0,v.useContext)(Gt),{role:p=an,roleDescription:h="draggable",tabIndex:g=0}=null!=o?o:{},m=(null==l?void 0:l.id)===t,b=(0,v.useContext)(m?tn:on),[y,w]=pe(),[x,C]=pe(),S=function(e,t){return(0,v.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(a,t),R=de(n);return ce(()=>(d.set(t,{id:t,key:i,node:y,activatorNode:x,data:R}),()=>{const e=d.get(t);e&&e.key===i&&d.delete(t)}),[d,t]),{active:l,activatorEvent:s,activeNodeRect:c,attributes:(0,v.useMemo)(()=>({role:p,tabIndex:g,"aria-disabled":r,"aria-pressed":!(!m||p!==an)||void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,p,g,m,h,u.draggable]),isDragging:m,listeners:r?void 0:S,node:y,over:f,setNodeRef:w,setActivatorNodeRef:C,transform:b}}({id:a,data:C,attributes:{...wn,...n},disabled:w.draggable}),j=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,v.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}(D,I),F=Boolean(A),z=F&&!h&&un(f)&&un(m),U=!b&&_,q=U&&z?$:null,B=z?null!=q?q:(null!=s?s:y)({rects:g,activeNodeRect:M,activeIndex:f,overIndex:m,index:x}):null,W=un(f)&&un(m)?i({id:a,items:u,activeIndex:f,overIndex:m}):x,H=null==A?void 0:A.id,Y=(0,v.useRef)({activeId:H,items:u,newIndex:W,containerId:d}),X=u!==Y.current.items,K=t({active:A,containerId:d,isDragging:_,isSorting:F,id:a,index:x,items:u,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:c,wasDragging:null!=Y.current.activeId}),V=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,a]=(0,v.useState)(null),s=(0,v.useRef)(n);return ce(()=>{if(!t&&n!==s.current&&r.current){const e=o.current;if(e){const t=Xe(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&a(n)}}n!==s.current&&(s.current=n)},[t,n,r,o]),(0,v.useEffect)(()=>{i&&a(null)},[i]),i}({disabled:!K,index:x,node:E,rect:R});return(0,v.useEffect)(()=>{F&&Y.current.newIndex!==W&&(Y.current.newIndex=W),d!==Y.current.containerId&&(Y.current.containerId=d),u!==Y.current.items&&(Y.current.items=u)},[F,W,d,u]),(0,v.useEffect)(()=>{if(H===Y.current.activeId)return;if(H&&!Y.current.activeId)return void(Y.current.activeId=H);const e=setTimeout(()=>{Y.current.activeId=H},50);return()=>clearTimeout(e)},[H]),{active:A,activeIndex:f,attributes:T,data:C,rect:R,index:x,newIndex:W,items:u,isOver:k,isSorting:F,isDragging:_,listeners:N,node:E,overIndex:m,over:L,setNodeRef:j,setActivatorNodeRef:P,setDroppableNodeRef:D,setDraggableNodeRef:I,transform:null!=V?V:B,transition:V||X&&Y.current.newIndex===x?yn:U&&!we(O)||!c?void 0:F||K?Ce.Transition.toString({...c,property:bn}):void 0}}pt.Down,pt.Right,pt.Up,pt.Left;const Cn=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?function(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}(r,n,t):r};var Sn=c(270),Rn=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),En=Math.abs,kn=String.fromCharCode,Dn=Object.assign;function An(e){return e.trim()}function On(e,t,n){return e.replace(t,n)}function Mn(e,t){return e.indexOf(t)}function Tn(e,t){return 0|e.charCodeAt(t)}function In(e,t,n){return e.slice(t,n)}function Nn(e){return e.length}function _n(e){return e.length}function Ln(e,t){return t.push(e),e}var Pn=1,$n=1,jn=0,Fn=0,zn=0,Un="";function qn(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Pn,column:$n,length:a,return:""}}function Bn(e,t){return Dn(qn("",null,null,"",null,null,0),e,{length:-e.length},t)}function Wn(){return zn=Fn>0?Tn(Un,--Fn):0,$n--,10===zn&&($n=1,Pn--),zn}function Hn(){return zn=Fn<jn?Tn(Un,Fn++):0,$n++,10===zn&&($n=1,Pn++),zn}function Yn(){return Tn(Un,Fn)}function Xn(){return Fn}function Kn(e,t){return In(Un,e,t)}function Vn(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 Gn(e){return Pn=$n=1,jn=Nn(Un=e),Fn=0,[]}function Jn(e){return Un="",e}function Zn(e){return An(Kn(Fn-1,tr(91===e?e+2:40===e?e+1:e)))}function Qn(e){for(;(zn=Yn())&&zn<33;)Hn();return Vn(e)>2||Vn(zn)>3?"":" "}function er(e,t){for(;--t&&Hn()&&!(zn<48||zn>102||zn>57&&zn<65||zn>70&&zn<97););return Kn(e,Xn()+(t<6&&32==Yn()&&32==Hn()))}function tr(e){for(;Hn();)switch(zn){case e:return Fn;case 34:case 39:34!==e&&39!==e&&tr(zn);break;case 40:41===e&&tr(e);break;case 92:Hn()}return Fn}function nr(e,t){for(;Hn()&&e+zn!==57&&(e+zn!==84||47!==Yn()););return"/*"+Kn(t,Fn-1)+"*"+kn(47===e?e:Hn())}function rr(e){for(;!Vn(Yn());)Hn();return Kn(e,Fn)}var or="-ms-",ir="-moz-",ar="-webkit-",sr="comm",lr="rule",cr="decl",ur="@keyframes";function dr(e,t){for(var n="",r=_n(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function fr(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case cr:return e.return=e.return||e.value;case sr:return"";case ur:return e.return=e.value+"{"+dr(e.children,r)+"}";case lr:e.value=e.props.join(",")}return Nn(n=dr(e.children,r))?e.return=e.value+"{"+n+"}":""}function pr(e){return Jn(hr("",null,null,null,[""],e=Gn(e),0,[0],e))}function hr(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,g=1,v=1,m=1,b=0,y="",w=o,x=i,C=r,S=y;v;)switch(h=b,b=Hn()){case 40:if(108!=h&&58==Tn(S,d-1)){-1!=Mn(S+=On(Zn(b),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:S+=Zn(b);break;case 9:case 10:case 13:case 32:S+=Qn(h);break;case 92:S+=er(Xn()-1,7);continue;case 47:switch(Yn()){case 42:case 47:Ln(vr(nr(Hn(),Xn()),t,n),l);break;default:S+="/"}break;case 123*g:s[c++]=Nn(S)*m;case 125*g:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+u:-1==m&&(S=On(S,/\f/g,"")),p>0&&Nn(S)-d&&Ln(p>32?mr(S+";",r,n,d-1):mr(On(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Ln(C=gr(S,t,n,c,u,o,s,y,w=[],x=[],d),i),123===b)if(0===u)hr(S,t,C,C,w,i,d,s,x);else switch(99===f&&110===Tn(S,3)?100:f){case 100:case 108:case 109:case 115:hr(e,C,C,r&&Ln(gr(e,C,C,0,0,o,s,y,o,w=[],d),x),o,x,d,s,r?w:x);break;default:hr(S,C,C,C,[""],x,0,s,x)}}c=u=p=0,g=m=1,y=S="",d=a;break;case 58:d=1+Nn(S),p=h;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==Wn())continue;switch(S+=kn(b),b*g){case 38:m=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(Nn(S)-1)*m,m=1;break;case 64:45===Yn()&&(S+=Zn(Hn())),f=Yn(),u=d=Nn(y=S+=rr(Xn())),b++;break;case 45:45===h&&2==Nn(S)&&(g=0)}}return i}function gr(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],p=_n(f),h=0,g=0,v=0;h<r;++h)for(var m=0,b=In(e,d+1,d=En(g=a[h])),y=e;m<p;++m)(y=An(g>0?f[m]+" "+b:On(b,/&\f/g,f[m])))&&(l[v++]=y);return qn(e,t,n,0===o?lr:s,l,c,u)}function vr(e,t,n){return qn(e,t,n,sr,kn(zn),In(e,2,-2),0)}function mr(e,t,n,r){return qn(e,t,n,cr,In(e,0,r),In(e,r+1,-1),r)}var br=function(e,t,n){for(var r=0,o=0;r=o,o=Yn(),38===r&&12===o&&(t[n]=1),!Vn(o);)Hn();return Kn(e,Fn)},yr=new WeakMap,wr=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||yr.get(n))&&!r){yr.set(e,!0);for(var o=[],i=function(e,t){return Jn(function(e,t){var n=-1,r=44;do{switch(Vn(r)){case 0:38===r&&12===Yn()&&(t[n]=1),e[n]+=br(Fn-1,t,n);break;case 2:e[n]+=Zn(r);break;case 4:if(44===r){e[++n]=58===Yn()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=kn(r)}}while(r=Hn());return e}(Gn(e),t))}(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},xr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Cr(e,t){switch(function(e,t){return 45^Tn(e,0)?(((t<<2^Tn(e,0))<<2^Tn(e,1))<<2^Tn(e,2))<<2^Tn(e,3):0}(e,t)){case 5103:return ar+"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 ar+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ar+e+ir+e+or+e+e;case 6828:case 4268:return ar+e+or+e+e;case 6165:return ar+e+or+"flex-"+e+e;case 5187:return ar+e+On(e,/(\w+).+(:[^]+)/,ar+"box-$1$2"+or+"flex-$1$2")+e;case 5443:return ar+e+or+"flex-item-"+On(e,/flex-|-self/,"")+e;case 4675:return ar+e+or+"flex-line-pack"+On(e,/align-content|flex-|-self/,"")+e;case 5548:return ar+e+or+On(e,"shrink","negative")+e;case 5292:return ar+e+or+On(e,"basis","preferred-size")+e;case 6060:return ar+"box-"+On(e,"-grow","")+ar+e+or+On(e,"grow","positive")+e;case 4554:return ar+On(e,/([^-])(transform)/g,"$1"+ar+"$2")+e;case 6187:return On(On(On(e,/(zoom-|grab)/,ar+"$1"),/(image-set)/,ar+"$1"),e,"")+e;case 5495:case 3959:return On(e,/(image-set\([^]*)/,ar+"$1$`$1");case 4968:return On(On(e,/(.+:)(flex-)?(.*)/,ar+"box-pack:$3"+or+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ar+e+e;case 4095:case 3583:case 4068:case 2532:return On(e,/(.+)-inline(.+)/,ar+"$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(Nn(e)-1-t>6)switch(Tn(e,t+1)){case 109:if(45!==Tn(e,t+4))break;case 102:return On(e,/(.+:)(.+)-([^]+)/,"$1"+ar+"$2-$3$1"+ir+(108==Tn(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Mn(e,"stretch")?Cr(On(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Tn(e,t+1))break;case 6444:switch(Tn(e,Nn(e)-3-(~Mn(e,"!important")&&10))){case 107:return On(e,":",":"+ar)+e;case 101:return On(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ar+(45===Tn(e,14)?"inline-":"")+"box$3$1"+ar+"$2$3$1"+or+"$2box$3")+e}break;case 5936:switch(Tn(e,t+11)){case 114:return ar+e+or+On(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ar+e+or+On(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ar+e+or+On(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ar+e+or+e+e}return e}var Sr=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case cr:e.return=Cr(e.value,e.length);break;case ur:return dr([Bn(e,{value:On(e.value,"@","@"+ar)})],r);case lr:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return dr([Bn(e,{props:[On(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return dr([Bn(e,{props:[On(t,/:(plac\w+)/,":"+ar+"input-$1")]}),Bn(e,{props:[On(t,/:(plac\w+)/,":-moz-$1")]}),Bn(e,{props:[On(t,/:(plac\w+)/,or+"input-$1")]})],r)}return""})}}],Rr=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Sr,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u,d,f=[fr,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(c=[wr,xr].concat(i,f),u=_n(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,dr(pr(e?e+"{"+t.styles+"}":t.styles),p),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new Rn({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return h.sheet.hydrate(s),h},Er=v.createContext("undefined"!=typeof HTMLElement?Rr({key:"css"}):null),kr=(Er.Provider,function(e){return(0,v.forwardRef)(function(t,n){var r=(0,v.useContext)(Er);return e(t,r,n)})}),Dr=v.createContext({}),Ar={}.hasOwnProperty,Or="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Mr=function(e,t){var n={};for(var r in t)Ar.call(t,r)&&(n[r]=t[r]);return n[Or]=e,n},Tr=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return S(t,n,r),y(function(){return R(t,n,r)}),null},Ir=kr(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[Or],i=[r],a="";"string"==typeof e.className?a=w(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=g(i,void 0,v.useContext(Dr));a+=t.key+"-"+s.name;var l={};for(var c in e)Ar.call(e,c)&&"css"!==c&&c!==Or&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),v.createElement(v.Fragment,null,v.createElement(Tr,{cache:t,serialized:s,isStringTag:"string"==typeof o}),v.createElement(o,l))}),Nr=(c(674),Sn.Fragment),_r=function(e,t,n){return Ar.call(t,"css")?Sn.jsx(Ir,Mr(e,t),n):Sn.jsx(e,t,n)},Lr=function(e,t,n){return Ar.call(t,"css")?Sn.jsxs(Ir,Mr(e,t),n):Sn.jsxs(e,t,n)};const Pr=T("div",{target:"e1hax4ql7",label:"ImageWrapper"})("flex-basis:155px;width:155px;height:100px;margin-right:20px;margin-bottom:20px;border:",Z.borders.textField,";border-radius:",Z.lengths.borderRadius,";overflow:hidden;",Z.effects.checkerboard,";",Z.shadows.inset,";cursor:",e=>e.sortable?"pointer":"auto",";"),$r=T("div",{target:"e1hax4ql6",label:"SortableImageButtonsWrapper"})({name:"1ekgmip",styles:"display:flex;justify-content:center;column-gap:10px;margin-right:20px;margin-top:-10px;margin-bottom:10px"}),jr=T("img",{target:"e1hax4ql5",label:"StyledImage"})({name:"ukfjzf",styles:"width:100%;height:100%;object-fit:contain"});function Fr({value:e,field:t,getAsset:n}){const[r,o]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(e){const r=n(e,t);o(r)}else o(null)},[e,t,n]),r?_r(jr,{role:"presentation",src:r}):null}function zr({onRemove:e,onReplace:t}){return Lr($r,{children:[_r(Z.IconButton,{size:"small",type:"media",onClick:t}),_r(Z.IconButton,{size:"small",type:"close",onClick:e})]})}function Ur(e){const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:i}=xn({id:e.id}),a={transform:Ce.Transform.toString(o),transition:i},{itemValue:s,getAsset:l,field:c,onRemove:u,onReplace:d}=e;return Lr("div",{ref:r,style:a,...t,...n,children:[_r(Pr,{sortable:!0,children:_r(Fr,{value:s,field:c,getAsset:l})}),_r(zr,{item:s,onRemove:u,onReplace:d})]})}var qr={name:"a42x49-SortableMultiImageWrapper",styles:"display:flex;flex-wrap:wrap;label:SortableMultiImageWrapper;"};function Br({items:e,getAsset:t,field:n,onSortEnd:r,onRemoveOne:o,onReplaceOne:i}){const a={distance:4},s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,v.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}(_e(Dt,{activationConstraint:a}),_e(Ot,{activationConstraint:a}));return _r("div",{css:qr,children:_r(rn,{modifiers:[Cn],collisionDetection:ze,sensors:s,onDragEnd:function({active:t,over:n}){r({oldIndex:e.findIndex(e=>e.id===t.id),newIndex:e.findIndex(e=>e.id===n.id)})},children:_r(hn,{items:e,children:e.map((e,r)=>_r(Ur,{id:e.id,index:r,itemValue:e.value,getAsset:t,field:n,onRemove:o(r),onReplace:i(r)},e.id))})})})}const Wr=T("a",{target:"e1hax4ql4",label:"FileLink"})({name:"7mbjrw",styles:"margin-bottom:20px;font-weight:normal;color:inherit;&:hover,&:active,&:focus{text-decoration:underline;}"}),Hr=T("div",{target:"e1hax4ql3",label:"FileLinks"})({name:"cn3xcj",styles:"margin-bottom:12px"}),Yr=T("ul",{target:"e1hax4ql2",label:"FileLinkList"})({name:"ffhm6p",styles:"list-style-type:none"}),Xr=T("button",{target:"e1hax4ql1",label:"FileWidgetButton"})(Z.buttons.button,";",Z.components.badge,";margin-bottom:12px;"),Kr=T("button",{target:"e1hax4ql0",label:"FileWidgetButtonRemove"})(Z.buttons.button,";",Z.components.badgeDanger,";");function Vr(e){return Array.isArray(e)||P.List.isList(e)}function Gr(e){return P.List.isList(e)?e.toArray():e??""}const Jr=j()(e=>console.warn(J`
3
3
  Decap CMS config: ${e.get("name")} field: property "options" has been deprecated for the
4
4
  ${e.get("widget")} widget and will be removed in the next major release. Rather than
5
5
  \`field.options.media_library\`, apply media library options for this widget under
6
6
  \`field.media_library\`.
7
- `));function _n({forImage:e}={}){return class n extends v().Component{static propTypes={field:M().object.isRequired,getAsset:M().func.isRequired,mediaPaths:T().map.isRequired,onAddAsset:M().func.isRequired,onChange:M().func.isRequired,onRemoveInsertedMedia:M().func.isRequired,onOpenMediaLibrary:M().func.isRequired,onClearMediaControl:M().func.isRequired,onRemoveMediaControl:M().func.isRequired,classNameWrapper:M().string.isRequired,value:M().oneOfType([M().string,M().arrayOf(M().string),T().listOf(M().string)]),t:M().func.isRequired};static defaultProps={value:""};constructor(e){super(e),this.controlID=crypto.randomUUID()}componentDidMount(){M().checkPropTypes(n.propTypes,this.props,"prop","FileControl")}shouldComponentUpdate(e){if(this.props.value!==e.value||this.props.getAsset!==e.getAsset)return!0;const t=e.mediaPaths.get(this.controlID);return!(!t||e.value===t)}componentDidUpdate(){const{mediaPaths:e,value:t,onRemoveInsertedMedia:n,onChange:r}=this.props,o=e.get(this.controlID);o&&o!==t?r(o):o&&o===t&&n(this.controlID)}componentWillUnmount(){this.props.onRemoveMediaControl(this.controlID)}handleChange=t=>{const{field:n,onOpenMediaLibrary:r,value:o}=this.props;t.preventDefault();const i=this.getMediaLibraryFieldOptions();return r({controlID:this.controlID,forImage:e,privateUpload:n.get("private"),value:Nn(o),allowMultiple:!!i.get("allow_multiple",!0),config:i.get("config"),field:n})};handleUrl=e=>t=>{t.preventDefault();const n=window.prompt(this.props.t(`editor.editorWidgets.${e}.promptUrl`));if(n)return this.props.onChange(n)};handleRemove=e=>(e.preventDefault(),this.props.onClearMediaControl(this.controlID),this.props.onChange(""));onRemoveOne=e=>()=>{const t=Nn(this.props.value);return t.splice(e,1),this.props.onChange(function(e){return Array.isArray(e)?e.length:j.List.isList(e)?e.size:e?1:0}(t)>0?[...t]:null)};onReplaceOne=t=>()=>{const{field:n,onOpenMediaLibrary:r,value:o}=this.props,i=this.getMediaLibraryFieldOptions();return r({controlID:this.controlID,forImage:e,privateUpload:n.get("private"),value:Nn(o),replaceIndex:t,allowMultiple:!1,config:i.get("config"),field:n})};getMediaLibraryFieldOptions=()=>{const{field:e}=this.props;return e.hasIn(["options","media_library"])?(Ln(e),e.getIn(["options","media_library"],(0,j.Map)())):e.get("media_library",(0,j.Map)())};allowsMultiple=()=>{const e=this.getMediaLibraryFieldOptions();return e.get("config",!1)&&e.get("config").get("multiple",!1)};onSortEnd=({oldIndex:e,newIndex:t})=>{const{value:n}=this.props,r=(o=n,i=e,a=t,function(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const r=n<0?e.length+n:n,[o]=e.splice(t,1);e.splice(r,0,o)}}(o=[...o],i,a),o);var o,i,a;return this.props.onChange(r)};getValidateValue=()=>{const{value:e}=this.props;return e?jn(e)?e.map(e=>G(e)):G(e):e};renderFileLink=e=>{if(!e||e.length<=50)return e;const n=`${e.slice(0,25)}…${e.slice(-24)}`;return(0,t.jsx)(An,{href:e,rel:"noopener",target:"_blank"},n)};renderFileLinks=()=>{const{value:e}=this.props;return jn(e)?(0,t.jsx)(On,null,(0,t.jsx)(Mn,null,e.map(e=>(0,t.jsx)("li",{key:e},this.renderFileLink(e))))):(0,t.jsx)(On,null,this.renderFileLink(e))};renderImages=()=>{const{getAsset:e,value:n,field:r}=this.props,o=function(e){return jn(e)?Nn(e).map(e=>({id:crypto.randomUUID(),value:e})):e}(n);return jn(n)?(0,t.jsx)(kn,{items:o,onSortEnd:this.onSortEnd,onRemoveOne:this.onRemoveOne,onReplaceOne:this.onReplaceOne,distance:4,getAsset:e,field:r,axis:"xy",lockToContainerEdges:!0}):(0,t.jsx)(xn,null,(0,t.jsx)(Rn,{value:n,field:r,getAsset:e}))};renderSelection=n=>{const{t:r,field:o}=this.props,i=this.allowsMultiple();return(0,t.jsx)("div",null,e?this.renderImages():null,(0,t.jsx)("div",null,e?null:this.renderFileLinks(),(0,t.jsx)(In,{onClick:this.handleChange},r(`editor.editorWidgets.${n}.${this.allowsMultiple()?"addMore":"chooseDifferent"}`)),o.get("choose_url",!0)&&!this.allowsMultiple()?(0,t.jsx)(In,{onClick:this.handleUrl(n)},r(`editor.editorWidgets.${n}.replaceUrl`)):null,(0,t.jsx)(Tn,{onClick:this.handleRemove},r(`editor.editorWidgets.${n}.remove${i?"All":""}`))))};renderNoSelection=e=>{const{t:n,field:r}=this.props;return(0,t.jsx)(v().Fragment,null,(0,t.jsx)(In,{onClick:this.handleChange},n(`editor.editorWidgets.${e}.choose${this.allowsMultiple()?"Multiple":""}`)),r.get("choose_url",!0)?(0,t.jsx)(In,{onClick:this.handleUrl(e)},n(`editor.editorWidgets.${e}.chooseUrl`)):null)};render(){const{value:n,classNameWrapper:r}=this.props,o=e?"image":"file";return(0,t.jsx)("div",{className:r},(0,t.jsx)("span",null,n?this.renderSelection(o):this.renderNoSelection(o)))}}}const Pn=A(({href:e,path:n})=>(0,t.jsx)("a",{href:e,rel:"noopener noreferrer",target:"_blank"},n),{target:"ecp3s3o0",label:"FileLink"})({name:"4zleql",styles:"display:block"});function Fn({values:e,getAsset:n,field:r}){return(0,t.jsx)("div",null,e.map(e=>(0,t.jsx)(Pn,{key:e,path:e,href:n(e,r)})))}function Un(e){const{value:n,getAsset:r,field:o}=e;return Array.isArray(n)||j.List.isList(n)?(0,t.jsx)(Fn,{values:n,getAsset:r,field:o}):(0,t.jsx)(Pn,{key:n,path:n,href:r(n,o)})}function Bn(e){return(0,t.jsx)(V.WidgetPreviewContainer,null,e.value?(0,t.jsx)(Un,e):null)}Bn.propTypes={getAsset:M().func.isRequired,value:M().node};const qn=Bn,zn={properties:{allow_multiple:{type:"boolean"}}},Wn=_n(),Hn={Widget:function(e={}){return{name:"file",controlComponent:Wn,previewComponent:qn,schema:zn,...e}},controlComponent:Wn,previewComponent:qn,withFileControl:_n}})(),c.DecapCmsWidgetFile})());
7
+ `));function Zr({forImage:e}={}){return class t extends v.Component{static propTypes={field:N().object.isRequired,getAsset:N().func.isRequired,mediaPaths:L().map.isRequired,onAddAsset:N().func.isRequired,onChange:N().func.isRequired,onRemoveInsertedMedia:N().func.isRequired,onOpenMediaLibrary:N().func.isRequired,onClearMediaControl:N().func.isRequired,onRemoveMediaControl:N().func.isRequired,classNameWrapper:N().string.isRequired,value:N().oneOfType([N().string,N().arrayOf(N().string),L().listOf(N().string)]),t:N().func.isRequired};static defaultProps={value:""};constructor(e){super(e),this.controlID=crypto.randomUUID()}componentDidMount(){N().checkPropTypes(t.propTypes,this.props,"prop","FileControl")}shouldComponentUpdate(e){if(this.props.value!==e.value||this.props.getAsset!==e.getAsset)return!0;const t=e.mediaPaths.get(this.controlID);return!(!t||e.value===t)}componentDidUpdate(){const{mediaPaths:e,value:t,onRemoveInsertedMedia:n,onChange:r}=this.props,o=e.get(this.controlID);o&&o!==t?r(o):o&&o===t&&n(this.controlID)}componentWillUnmount(){this.props.onRemoveMediaControl(this.controlID)}handleChange=t=>{const{field:n,onOpenMediaLibrary:r,value:o}=this.props;t.preventDefault();const i=this.getMediaLibraryFieldOptions();return r({controlID:this.controlID,forImage:e,privateUpload:n.get("private"),value:Gr(o),allowMultiple:!!i.get("allow_multiple",!0),config:i.get("config"),field:n})};handleUrl=e=>t=>{t.preventDefault();const n=window.prompt(this.props.t(`editor.editorWidgets.${e}.promptUrl`));if(n)return this.props.onChange(n)};handleRemove=e=>(e.preventDefault(),this.props.onClearMediaControl(this.controlID),this.props.onChange(""));onRemoveOne=e=>()=>{const t=Gr(this.props.value);return t.splice(e,1),this.props.onChange(function(e){return Array.isArray(e)?e.length:P.List.isList(e)?e.size:e?1:0}(t)>0?[...t]:null)};onReplaceOne=t=>()=>{const{field:n,onOpenMediaLibrary:r,value:o}=this.props,i=this.getMediaLibraryFieldOptions();return r({controlID:this.controlID,forImage:e,privateUpload:n.get("private"),value:Gr(o),replaceIndex:t,allowMultiple:!1,config:i.get("config"),field:n})};getMediaLibraryFieldOptions=()=>{const{field:e}=this.props;return e.hasIn(["options","media_library"])?(Jr(e),e.getIn(["options","media_library"],(0,P.Map)())):e.get("media_library",(0,P.Map)())};allowsMultiple=()=>{const e=this.getMediaLibraryFieldOptions();return e.get("config",!1)&&e.get("config").get("multiple",!1)};onSortEnd=({oldIndex:e,newIndex:t})=>{const{value:n}=this.props,r=(o=n,i=e,a=t,function(e,t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const r=n<0?e.length+n:n,[o]=e.splice(t,1);e.splice(r,0,o)}}(o=[...o],i,a),o);var o,i,a;return this.props.onChange(r)};getValidateValue=()=>{const{value:e}=this.props;return e?Vr(e)?e.map(e=>(0,Q.basename)(e)):(0,Q.basename)(e):e};renderFileLink=e=>{if(!e||e.length<=50)return e;const t=`${e.slice(0,25)}…${e.slice(-24)}`;return _r(Wr,{href:e,rel:"noopener",target:"_blank",children:t})};renderFileLinks=()=>{const{value:e}=this.props;return Vr(e)?_r(Hr,{children:_r(Yr,{children:e.map(e=>_r("li",{children:this.renderFileLink(e)},e))})}):_r(Hr,{children:this.renderFileLink(e)})};renderImages=()=>{const{getAsset:e,value:t,field:n}=this.props,r=function(e){return Vr(e)?Gr(e).map(e=>({id:crypto.randomUUID(),value:e})):e}(t);return Vr(t)?_r(Br,{items:r,onSortEnd:this.onSortEnd,onRemoveOne:this.onRemoveOne,onReplaceOne:this.onReplaceOne,distance:4,getAsset:e,field:n,axis:"xy",lockToContainerEdges:!0}):_r(Pr,{children:_r(Fr,{value:t,field:n,getAsset:e})})};renderSelection=t=>{const{t:n,field:r}=this.props,o=this.allowsMultiple();return Lr("div",{children:[e?this.renderImages():null,Lr("div",{children:[e?null:this.renderFileLinks(),_r(Xr,{onClick:this.handleChange,children:n(`editor.editorWidgets.${t}.${this.allowsMultiple()?"addMore":"chooseDifferent"}`)}),r.get("choose_url",!0)&&!this.allowsMultiple()?_r(Xr,{onClick:this.handleUrl(t),children:n(`editor.editorWidgets.${t}.replaceUrl`)}):null,_r(Kr,{onClick:this.handleRemove,children:n(`editor.editorWidgets.${t}.remove${o?"All":""}`)})]})]})};renderNoSelection=e=>{const{t,field:n}=this.props;return Lr(Nr,{children:[_r(Xr,{onClick:this.handleChange,children:t(`editor.editorWidgets.${e}.choose${this.allowsMultiple()?"Multiple":""}`)}),n.get("choose_url",!0)?_r(Xr,{onClick:this.handleUrl(e),children:t(`editor.editorWidgets.${e}.chooseUrl`)}):null]})};render(){const{value:t,classNameWrapper:n}=this.props,r=e?"image":"file";return _r("div",{className:n,children:_r("span",{children:t?this.renderSelection(r):this.renderNoSelection(r)})})}}}const Qr=T(({href:e,path:t})=>_r("a",{href:e,rel:"noopener noreferrer",target:"_blank",children:t}),{target:"ecp3s3o0",label:"FileLink"})({name:"4zleql",styles:"display:block"});function eo({values:e,getAsset:t,field:n}){return _r("div",{children:e.map(e=>_r(Qr,{path:e,href:t(e,n)},e))})}function to(e){const{value:t,getAsset:n,field:r}=e;return Array.isArray(t)||P.List.isList(t)?_r(eo,{values:t,getAsset:n,field:r}):_r(Qr,{path:t,href:n(t,r)},t)}function no(e){return _r(Z.WidgetPreviewContainer,{children:e.value?_r(to,{...e}):null})}no.propTypes={getAsset:N().func.isRequired,value:N().node};const ro=no,oo={properties:{allow_multiple:{type:"boolean"}}},io=Zr(),ao={Widget:function(e={}){return{name:"file",controlComponent:io,previewComponent:ro,schema:oo,...e}},controlComponent:io,previewComponent:ro,withFileControl:Zr}})(),u.DecapCmsWidgetFile})());
8
8
  //# sourceMappingURL=decap-cms-widget-file.js.map
@@ -7,3 +7,22 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
+
11
+ /**
12
+ * @license React
13
+ * react-jsx-runtime.production.js
14
+ *
15
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+
21
+ /** @license React v16.13.1
22
+ * react-is.production.min.js
23
+ *
24
+ * Copyright (c) Facebook, Inc. and its affiliates.
25
+ *
26
+ * This source code is licensed under the MIT license found in the
27
+ * LICENSE file in the root directory of this source tree.
28
+ */