decap-cms-widget-file 3.2.0 → 3.3.0
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,10 @@
|
|
|
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.3.0](https://github.com/decaporg/decap-cms/compare/decap-cms-widget-file@3.2.0...decap-cms-widget-file@3.3.0) (2026-06-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package decap-cms-widget-file
|
|
9
|
+
|
|
6
10
|
# [3.2.0](https://github.com/decaporg/decap-cms/compare/decap-cms-widget-file@3.1.3...decap-cms-widget-file@3.2.0) (2025-06-26)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package decap-cms-widget-file
|
|
@@ -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("uuid"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsWidgetFile",["@emotion/react","react","prop-types","react-immutable-proptypes","immutable","uuid","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("uuid"),require("decap-cms-ui-default")):e.DecapCmsWidgetFile=t(e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsDefaultExports.ImmutablePropTypes,e.DecapCmsDefaultExports.Immutable,e.DecapCmsDefaultExports.UUId,e.DecapCmsUiDefault)}(window,(e,t,n,r,o,i,a)=>(()=>{var s={5:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},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}}},97:e=>{"use strict";e.exports=i},110:t=>{"use strict";t.exports=e},119:e=>{"use strict";e.exports=t},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}},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)},171:e=>{"use strict";e.exports=a},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)}},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}},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)}},354:(e,t,n)=>{var r=n(80);e.exports=function(e){return r(2,e)}},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}},434:e=>{"use strict";e.exports=n},522:e=>{"use strict";e.exports=o},547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},630:e=>{"use strict";e.exports=r},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}},650:(e,t,n)=>{var r=n(942).Symbol;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}},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}},967:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r}},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:()=>Vn});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,g=c(119),v=c.n(g),m=!!g.useInsertionEffect&&g.useInsertionEffect,b=m||function(e){return e()};m||g.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|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},O=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},k=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=g.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]);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}}(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 k in e)d&&"as"===k||D(k)&&(S[k]=e[k]);return S.className=y,r&&(S.ref=r),g.createElement(g.Fragment,null,g.createElement(O,{cache:n,serialized:R,isStringTag:"string"==typeof b}),g.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}},A=c(434),M=c.n(A),I=c(630),T=c.n(I),j=c(522),N=c(354),L=c.n(N),_=c(97),P=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}}(),F=(y=["",""],x=["",""],Object.freeze(Object.defineProperties(y,{raw:{value:Object.freeze(x)}}))),q=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 P(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(F,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 B=q;var U={separator:"",conjunction:"",serial:!1};const z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U;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}}},W=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)}}},H=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 B(z({separator:","}),W,H),new B(z({separator:",",conjunction:"and"}),W,H),new B(z({separator:",",conjunction:"or"}),W,H);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 Y=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new B(X("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(Y):Y(e)?e:""}}},z,W,H);const $=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 B(X("\n"),z,W,H,$(/&/g,"&"),$(/</g,"<"),$(/>/g,">"),$(/"/g,"""),$(/'/g,"'"),$(/`/g,"`"));const K=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)}}},V=new B(K(/(?:\n(?:\s*))+/g," "),H);new B(K(/(?:\n\s*)/g,""),H),new B(z({separator:","}),K(/(?:\s+)/g," "),H),new B(z({separator:",",conjunction:"or"}),K(/(?:\s+)/g," "),H),new B(z({separator:",",conjunction:"and"}),K(/(?:\s+)/g," "),H),new B(z,W,H),new B(z,K(/(?:\s+)/g," "),H),new B(W,H),new B(W("all"),H);var G=c(171);function J(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 Z=c(144);const Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ee(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function te(e){return"nodeType"in e}function ne(e){var t,n;return e?ee(e)?e:te(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function re(e){const{Document:t}=ne(e);return e instanceof t}function oe(e){return!ee(e)&&e instanceof ne(e).HTMLElement}function ie(e){return e instanceof ne(e).SVGElement}function ae(e){return e?ee(e)?e.document:te(e)?re(e)?e:oe(e)||ie(e)?e.ownerDocument:document:document:document}const se=Q?g.useLayoutEffect:g.useEffect;function le(e){const t=(0,g.useRef)(e);return se(()=>{t.current=e}),(0,g.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 ce(e,t){void 0===t&&(t=[e]);const n=(0,g.useRef)(e);return se(()=>{n.current!==e&&(n.current=e)},t),n}function ue(e,t){const n=(0,g.useRef)();return(0,g.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function de(e){const t=le(e),n=(0,g.useRef)(null),r=(0,g.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,r]}function fe(e){const t=(0,g.useRef)();return(0,g.useEffect)(()=>{t.current=e},[e]),t.current}let pe={};function he(e,t){return(0,g.useMemo)(()=>{if(t)return t;const n=null==pe[e]?0:pe[e]+1;return pe[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 ve=ge(1),me=ge(-1);function be(e){if(!e)return!1;const{KeyboardEvent:t}=ne(e.target);return t&&e instanceof t}function ye(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=ne(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 xe=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[xe.Translate.toString(e),xe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),we="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ce(e){return e.matches(we)?e:e.querySelector(we)}const Re={display:"none"};function De(e){let{id:t,value:n}=e;return v().createElement("div",{id:t,style:Re},n)}function Ee(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 Se=(0,g.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 "},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=Oe}=e;const{announce:i,announcement:a}=function(){const[e,t]=(0,g.useState)("");return{announce:(0,g.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),s=he("DndLiveRegion"),[l,c]=(0,g.useState)(!1);if((0,g.useEffect)(()=>{c(!0)},[]),function(e){const t=(0,g.useContext)(Se);(0,g.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}((0,g.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(De,{id:r,value:o.draggable}),v().createElement(Ee,{id:s,announcement:a}));return n?(0,Z.createPortal)(u,n):u}var Me;function Ie(){}function Te(e,t){return(0,g.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"}(Me||(Me={}));const je=Object.freeze({x:0,y:0});function Ne(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Le(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function _e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Pe(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 Fe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Pe(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Ne(Pe(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Le)};function qe(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 Be=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=qe(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(_e)};function Ue(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:je}function ze(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 We=ze(1);const He={ignoreTransform:!1};function Xe(e,t){void 0===t&&(t=He);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=ne(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 Ye(e){return Xe(e,{ignoreTransform:!0})}function $e(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(re(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!oe(o)||ie(o))return n;if(n.includes(o))return n;const i=ne(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=ne(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=ne(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Ke(e){const[t]=$e(e,1);return null!=t?t:null}function Ve(e){return Q&&e?ee(e)?e:te(e)?re(e)||e===ae(e).scrollingElement?window:oe(e)?e:null:null:null}function Ge(e){return ee(e)?e.scrollX:e.scrollLeft}function Je(e){return ee(e)?e.scrollY:e.scrollTop}function Ze(e){return{x:Ge(e),y:Je(e)}}var Qe;function et(e){return!(!Q||!e)&&e===document.scrollingElement}function tt(e){const t={x:0,y:0},n=et(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"}(Qe||(Qe={}));const nt={x:.2,y:.2};function rt(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=nt);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=tt(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=Qe.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!u&&l>=t.bottom-g&&(p.y=Qe.Forward,h.y=r*Math.abs((t.bottom-g-l)/g)),!f&&s>=t.right-v?(p.x=Qe.Forward,h.x=r*Math.abs((t.right-v-s)/v)):!d&&a<=t.left+v&&(p.x=Qe.Backward,h.x=r*Math.abs((t.left+v-a)/v)),{direction:p,speed:h}}function ot(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 it(e){return e.reduce((e,t)=>ve(e,Ze(t)),je)}const at=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Ge(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Je(t),0)}]];class st{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=$e(t),r=it(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of at)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 lt{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 ct(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 ut,dt,ft;function pt(e){e.preventDefault()}function ht(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"}(ut||(ut={})),(ft=dt||(dt={})).Space="Space",ft.Down="ArrowDown",ft.Right="ArrowRight",ft.Left="ArrowLeft",ft.Up="ArrowUp",ft.Esc="Escape",ft.Enter="Enter",ft.Tab="Tab";const gt={start:[dt.Space,dt.Enter],cancel:[dt.Esc],end:[dt.Space,dt.Enter,dt.Tab]},vt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case dt.Right:return{...n,x:n.x+25};case dt.Left:return{...n,x:n.x-25};case dt.Down:return{...n,y:n.y+25};case dt.Up:return{...n,y:n.y-25}}};class mt{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 lt(ae(t)),this.windowListeners=new lt(ne(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ut.Resize,this.handleCancel),this.windowListeners.add(ut.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ut.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);Ke(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(je)}handleKeyDown(e){if(be(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=gt,coordinateGetter:i=vt,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}:je;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=me(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}=tt(n),p=ot(n),h={x:Math.min(o===dt.Right?p.right-p.width/2:p.right,Math.max(o===dt.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(o===dt.Down?p.bottom-p.height/2:p.bottom,Math.max(o===dt.Down?p.top:p.top+p.height/2,u.y))},g=o===dt.Right&&!s||o===dt.Left&&!l,v=o===dt.Down&&!c||o===dt.Up&&!i;if(g&&h.x!==u.x){const e=n.scrollLeft+t.x,i=o===dt.Right&&e<=d.x||o===dt.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===dt.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===dt.Down&&e<=d.y||o===dt.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===dt.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,ve(me(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 bt(e){return Boolean(e&&"distance"in e)}function yt(e){return Boolean(e&&"delay"in e)}mt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=gt,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 xt{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=ne(e);return e instanceof t?e:ae(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=ae(i),this.documentListeners=new lt(this.document),this.listeners=new lt(n),this.windowListeners=new lt(ne(i)),this.initialCoordinates=null!=(r=ye(o))?r:je,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(ut.Resize,this.handleCancel),this.windowListeners.add(ut.DragStart,pt),this.windowListeners.add(ut.VisibilityChange,this.handleCancel),this.windowListeners.add(ut.ContextMenu,pt),this.documentListeners.add(ut.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(yt(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(bt(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(ut.Click,ht,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ut.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=ye(e))?t:je,l=me(r,s);if(!n&&a){if(bt(a)){if(null!=a.tolerance&&ct(l,a.tolerance))return this.handleCancel();if(ct(l,a.distance))return this.handleStart()}return yt(a)&&ct(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===dt.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const wt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ct extends xt{constructor(e){const{event:t}=e,n=ae(t.target);super(e,wt,n)}}Ct.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 Rt={move:{name:"mousemove"},end:{name:"mouseup"}};var Dt;!function(e){e[e.RightClick=2]="RightClick"}(Dt||(Dt={}));class Et extends xt{constructor(e){super(e,Rt,ae(e.event.target))}}Et.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Dt.RightClick&&(null==r||r({event:n}),!0)}}];const St={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ot extends xt{constructor(e){super(e,St)}static setup(){return window.addEventListener(St.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(St.move.name,e)};function e(){}}}var kt,At;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"}(kt||(kt={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(At||(At={}));const Mt={x:{[Qe.Backward]:!1,[Qe.Forward]:!1},y:{[Qe.Backward]:!1,[Qe.Forward]:!1}};var It,Tt;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(It||(It={})),function(e){e.Optimized="optimized"}(Tt||(Tt={}));const jt=new Map;function Nt(e,t){return ue(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Lt(e){let{callback:t,disabled:n}=e;const r=le(t),o=(0,g.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return(0,g.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function _t(e){return new st(Xe(e),e)}function Pt(e,t,n){void 0===t&&(t=_t);const[r,o]=(0,g.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=le(t),o=(0,g.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,g.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=Lt({callback:i});return se(()=>{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 Ft=[];function qt(e,t){void 0===t&&(t=[]);const n=(0,g.useRef)(null);return(0,g.useEffect)(()=>{n.current=null},t),(0,g.useEffect)(()=>{const t=e!==je;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?me(e,n.current):je}function Bt(e){return(0,g.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 zt=[{sensor:Ct,options:{}},{sensor:mt,options:{}}],Wt={current:{}},Ht={draggable:{measure:Ye},droppable:{measure:Ye,strategy:It.WhileDragging,frequency:Tt.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 Yt={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:Ie},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ht,measureDroppableContainers:Ie,windowRect:null,measuringScheduled:!1},$t={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ie,draggableNodes:new Map,over:null,measureDroppableContainers:Ie},Kt=(0,g.createContext)($t),Vt=(0,g.createContext)(Yt);function Gt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Xt}}}function Jt(e,t){switch(t.type){case Me.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Me.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 Me.DragEnd:case Me.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Me.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 Me.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 Me.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 Zt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,g.useContext)(Kt),i=fe(r),a=fe(null==n?void 0:n.id);return(0,g.useEffect)(()=>{if(!t&&!r&&i&&null!=a){if(!be(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=Ce(e);if(t){t.focus();break}}})}},[r,t,o,a,i]),null}const Qt=(0,g.createContext)({...je,scaleX:1,scaleY:1});var en;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(en||(en={}));const tn=(0,g.memo)(function(e){var t,n,r,o;let{id:i,accessibility:a,autoScroll:s=!0,children:l,sensors:c=zt,collisionDetection:u=Be,measuring:d,modifiers:f,...p}=e;const h=(0,g.useReducer)(Jt,void 0,Gt),[m,b]=h,[y,x]=function(){const[e]=(0,g.useState)(()=>new Set),t=(0,g.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]),n=(0,g.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,g.useState)(en.Uninitialized),R=w===en.Initialized,{draggable:{active:D,nodes:E,translate:S},droppable:{containers:O}}=m,k=null!=D?E.get(D):null,A=(0,g.useRef)({initial:null,translated:null}),M=(0,g.useMemo)(()=>{var e;return null!=D?{id:D,data:null!=(e=null==k?void 0:k.data)?e:Wt,rect:A}:null},[D,k]),I=(0,g.useRef)(null),[T,j]=(0,g.useState)(null),[N,L]=(0,g.useState)(null),_=ce(p,Object.values(p)),P=he("DndDescribedBy",i),F=(0,g.useMemo)(()=>O.getEnabled(),[O]),q=(B=d,(0,g.useMemo)(()=>({draggable:{...Ht.draggable,...null==B?void 0:B.draggable},droppable:{...Ht.droppable,...null==B?void 0:B.droppable},dragOverlay:{...Ht.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:U,measureDroppableContainers:z,measuringScheduled:W}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=(0,g.useState)(null),{frequency:s,measure:l,strategy:c}=o,u=(0,g.useRef)(e),d=function(){switch(c){case It.Always:return!1;case It.BeforeDragging:return n;default:return!n}}(),f=ce(d),p=(0,g.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,g.useRef)(null),v=ue(t=>{if(d&&!n)return jt;if(!t||t===jt||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 st(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,g.useEffect)(()=>{u.current=e},[e]),(0,g.useEffect)(()=>{d||p()},[n,d]),(0,g.useEffect)(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),(0,g.useEffect)(()=>{d||"number"!=typeof s||null!==h.current||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,d,p,...r]),{droppableRects:v,measureDroppableContainers:p,measuringScheduled:null!=i}}(F,{dragging:R,dependencies:[S.x,S.y],config:q.droppable}),H=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return ue(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(E,D),X=(0,g.useMemo)(()=>N?ye(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 Nt(e,t)}(H,q.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=(0,g.useRef)(!1),{x:a,y:s}="boolean"==typeof o?{x:o,y:o}:o;se(()=>{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=Ue(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=Ke(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:q.draggable.measure});const K=Pt(H,q.draggable.measure,$),V=Pt(H?H.parentElement:null),G=(0,g.useRef)({activatorEvent:null,active:null,activeNode:H,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),J=O.getNodeFor(null==(t=G.current.over)?void 0:t.id),ee=function(e){let{measure:t}=e;const[n,r]=(0,g.useState)(null),o=Lt({callback:(0,g.useCallback)(e=>{for(const{target:n}of e)if(oe(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),i=(0,g.useCallback)(e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return oe(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)},[t,o]),[a,s]=de(i);return(0,g.useMemo)(()=>({nodeRef:a,rect:n,setRef:s}),[n,a,s])}({measure:q.dragOverlay.measure}),te=null!=(n=ee.nodeRef.current)?n:H,re=R?null!=(r=ee.rect)?r:K:null,ie=Boolean(ee.nodeRef.current&&ee.rect),ae=Ue(le=ie?null:K,Nt(le));var le;const pe=Bt(te?ne(te):null),ge=function(e){const t=(0,g.useRef)(e),n=ue(n=>e?n&&n!==Ft&&e&&t.current&&e.parentNode===t.current.parentNode?n:$e(e):Ft,[e]);return(0,g.useEffect)(()=>{t.current=e},[e]),n}(R?null!=J?J:H:null),me=function(e,t){void 0===t&&(t=Xe);const[n]=e,r=Bt(n?ne(n):null),[o,i]=(0,g.useState)(Ut);function a(){i(()=>e.length?e.map(e=>et(e)?r:new st(t(e),e)):Ut)}const s=Lt({callback:a});return se(()=>{null==s||s.disconnect(),a(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),o}(ge),be=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-ae.x,y:S.y-ae.y,scaleX:1,scaleY:1},activatorEvent:N,active:M,activeNodeRect:K,containerNodeRect:V,draggingNodeRect:re,over:G.current.over,overlayNodeRect:ee.rect,scrollableAncestors:ge,scrollableAncestorRects:me,windowRect:pe}),xe=X?ve(X,S):null,we=function(e){const[t,n]=(0,g.useState)(null),r=(0,g.useRef)(e),o=(0,g.useCallback)(e=>{const t=Ve(e.target);t&&n(e=>e?(e.set(t,Ze(t)),new Map(e)):null)},[]);return(0,g.useEffect)(()=>{const t=r.current;if(e!==t){i(t);const a=e.map(e=>{const t=Ve(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,Ze(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=Ve(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),(0,g.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>ve(e,t),je):it(e):je,[e,t])}(ge),Ce=qt(we),Re=qt(we,[K]),De=ve(be,Ce),Ee=re?We(re,be):null,Oe=M&&Ee?u({active:M,collisionRect:Ee,droppableRects:U,droppableContainers:F,pointerCoordinates:xe}):null,ke=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(Oe),[Ie,Te]=(0,g.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?be:ve(be,Re),null!=(o=null==Ie?void 0:Ie.rect)?o:null,K),Le=(0,g.useRef)(null),_e=(0,g.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:A}};(0,Z.unstable_batchedUpdates)(()=>{null==r||r(o),C(en.Initializing),b({type:Me.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o}),j(Le.current),L(i)})},onMove(e){b({type:Me.DragMove,coordinates:e})},onEnd:s(Me.DragEnd),onCancel:s(Me.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===Me.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Me.DragCancel)}I.current=null,(0,Z.unstable_batchedUpdates)(()=>{b({type:e}),C(en.Uninitialized),Te(null),j(null),L(null),Le.current=null;const t=e===Me.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=_.current[t];null==e||e(a),y({type:t,event:a})}})}}Le.current=a},[E]),Pe=(0,g.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,g.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,g.useEffect)(()=>{if(!Q)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),se(()=>{K&&w===en.Initializing&&C(en.Initialized)},[K,w]),(0,g.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,Z.unstable_batchedUpdates)(()=>{null==e||e(i),y({type:"onDragMove",event:i})})},[De.x,De.y]),(0,g.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(ke),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,Z.unstable_batchedUpdates)(()=>{Te(s),null==i||i(l),y({type:"onDragOver",event:l})})},[ke]),se(()=>{G.current={activatorEvent:N,active:M,activeNode:H,collisionRect:Ee,collisions:Oe,droppableRects:U,draggableNodes:E,draggingNode:te,draggingNodeRect:re,droppableContainers:O,over:Ie,scrollableAncestors:ge,scrollAdjustedTranslate:De},A.current={initial:re,translated:Ee}},[M,H,Oe,Ee,E,te,re,U,O,Ie,ge,De]),function(e){let{acceleration:t,activator:n=kt.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=At.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=function(e){let{delta:t,disabled:n}=e;const r=fe(t);return ue(e=>{if(n||!r||!e)return Mt;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[Qe.Backward]:e.x[Qe.Backward]||-1===o,[Qe.Forward]:e.x[Qe.Forward]||1===o},y:{[Qe.Backward]:e.y[Qe.Backward]||-1===i,[Qe.Forward]:e.y[Qe.Forward]||1===i}}},[n,t,r])}({delta:d,disabled:!i}),[h,v]=function(){const e=(0,g.useRef)(null);return[(0,g.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,g.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),m=(0,g.useRef)({x:0,y:0}),b=(0,g.useRef)({x:0,y:0}),y=(0,g.useMemo)(()=>{switch(n){case kt.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case kt.DraggableRect:return o}},[n,o,l]),x=(0,g.useRef)(null),w=(0,g.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,g.useMemo)(()=>s===At.TreeOrder?[...c].reverse():c,[s,c]);(0,g.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}=rt(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,h(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),h,c,C,u,JSON.stringify(f)])}({...Y,delta:S,draggingRect:Ee,pointerCoordinates:xe,scrollableAncestors:ge,scrollableAncestorRects:me});const qe=(0,g.useMemo)(()=>({active:M,activeNode:H,activeNodeRect:K,activatorEvent:N,collisions:Oe,containerNodeRect:V,dragOverlay:ee,draggableNodes:E,droppableContainers:O,droppableRects:U,over:Ie,measureDroppableContainers:z,scrollableAncestors:ge,scrollableAncestorRects:me,measuringConfiguration:q,measuringScheduled:W,windowRect:pe}),[M,H,K,N,Oe,V,ee,E,O,U,Ie,z,ge,me,q,W,pe]),ze=(0,g.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(Se.Provider,{value:x},v().createElement(Kt.Provider,{value:ze},v().createElement(Vt.Provider,{value:qe},v().createElement(Qt.Provider,{value:Ne},l)),v().createElement(Zt,{disabled:!1===(null==a?void 0:a.restoreFocus)})),v().createElement(Ae,{...a,hiddenTextDescribedById:P}))}),nn=(0,g.createContext)(null),rn="button";const on={timeout:25};function an(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function sn(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function ln(e){return null!==e&&e>=0}const cn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=an(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},un="Sortable",dn=v().createContext({activeIndex:-1,containerId:un,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:cn,disabled:{draggable:!1,droppable:!1}});function fn(e){let{children:t,id:n,items:r,strategy:o=cn,disabled:i=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=(0,g.useContext)(Vt),d=he(un,n),f=Boolean(null!==s.rect),p=(0,g.useMemo)(()=>r.map(e=>"object"==typeof e&&"id"in e?e.id:e),[r]),h=null!=a,m=a?p.indexOf(a.id):-1,b=c?p.indexOf(c.id):-1,y=(0,g.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);se(()=>{x&&h&&u(p)},[x,p,h,u]),(0,g.useEffect)(()=>{y.current=p},[p]);const R=(0,g.useMemo)(()=>({activeIndex:m,containerId:d,disabled:C,disableTransforms:w,items:p,overIndex:b,useDragOverlay:f,sortedRects:sn(p,l),strategy:o}),[m,d,C.draggable,C.droppable,w,p,b,l,f,o]);return v().createElement(dn.Provider,{value:R},t)}const pn=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return an(n,r,o).indexOf(t)},hn=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))},gn={duration:200,easing:"ease"},vn="transform",mn=xe.Transition.toString({property:vn,duration:0,easing:"linear"}),bn={roleDescription:"sortable"};function yn(e){let{animateLayoutChanges:t=hn,attributes:n,disabled:r,data:o,getNewIndex:i=pn,id:a,strategy:s,resizeObserverConfig:l,transition:c=gn}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:h,sortedRects:v,overIndex:m,useDragOverlay:b,strategy:y}=(0,g.useContext)(dn),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,g.useMemo)(()=>({sortable:{containerId:d,index:w,items:u},...o}),[d,o,w,u]),R=(0,g.useMemo)(()=>u.slice(u.indexOf(a)),[u,a]),{rect:D,node:E,isOver:S,setNodeRef:O}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=he("Droppable"),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=(0,g.useContext)(Kt),u=(0,g.useRef)({disabled:n}),d=(0,g.useRef)(!1),f=(0,g.useRef)(null),p=(0,g.useRef)(null),{disabled:h,updateMeasurementsFor:v,timeout:m}={...on,...o},b=ce(null!=v?v:r),y=Lt({callback:(0,g.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}),x=(0,g.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y]),[w,C]=de(x),R=ce(t);return(0,g.useEffect)(()=>{y&&w.current&&(y.disconnect(),d.current=!1,y.observe(w.current))},[w,y]),(0,g.useEffect)(()=>(s({type:Me.RegisterDroppable,element:{id:r,key:i,disabled:n,node:w,rect:f,data:R}}),()=>s({type:Me.UnregisterDroppable,key:i,id:r})),[r]),(0,g.useEffect)(()=>{n!==u.current.disabled&&(s({type:Me.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:k,activatorEvent:A,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=he("Draggable"),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=(0,g.useContext)(Kt),{role:p=rn,roleDescription:h="draggable",tabIndex:v=0}=null!=o?o:{},m=(null==l?void 0:l.id)===t,b=(0,g.useContext)(m?Qt:nn),[y,x]=de(),[w,C]=de(),R=function(e,t){return(0,g.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e},{}),[e,t])}(a,t),D=ce(n);return se(()=>(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,g.useMemo)(()=>({role:p,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!m||p!==rn)||void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,p,v,m,h,u.draggable]),isDragging:m,listeners:r?void 0:R,node:y,over:f,setNodeRef:x,setActivatorNodeRef:C,transform:b}}({id:a,data:C,attributes:{...bn,...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,g.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}(O,T),q=Boolean(k),B=q&&!h&&ln(f)&&ln(m),U=!b&&N,z=U&&B?P:null,W=B?null!=z?z:(null!=s?s:y)({rects:v,activeNodeRect:M,activeIndex:f,overIndex:m,index:w}):null,H=ln(f)&&ln(m)?i({id:a,items:u,activeIndex:f,overIndex:m}):w,X=null==k?void 0:k.id,Y=(0,g.useRef)({activeId:X,items:u,newIndex:H,containerId:d}),$=u!==Y.current.items,K=t({active:k,containerId:d,isDragging:N,isSorting:q,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,g.useState)(null),s=(0,g.useRef)(n);return se(()=>{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,g.useEffect)(()=>{i&&a(null)},[i]),i}({disabled:!K,index:w,node:E,rect:D});return(0,g.useEffect)(()=>{q&&Y.current.newIndex!==H&&(Y.current.newIndex=H),d!==Y.current.containerId&&(Y.current.containerId=d),u!==Y.current.items&&(Y.current.items=u)},[q,H,d,u]),(0,g.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:k,activeIndex:f,attributes:I,data:C,rect:D,index:w,newIndex:H,items:u,isOver:S,isSorting:q,isDragging:N,listeners:j,node:E,overIndex:m,over:L,setNodeRef:F,setActivatorNodeRef:_,setDroppableNodeRef:O,setDraggableNodeRef:T,transform:null!=V?V:W,transition:V||$&&Y.current.newIndex===w?mn:U&&!be(A)||!c?void 0:q||K?xe.Transition.toString({...c,property:vn}):void 0}}dt.Down,dt.Right,dt.Up,dt.Left;const xn=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 wn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cn(){return Cn=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},Cn.apply(null,arguments)}const Rn=k("div",{target:"e1hax4ql7",label:"ImageWrapper"})("flex-basis:155px;width:155px;height:100px;margin-right:20px;margin-bottom:20px;border:",G.borders.textField,";border-radius:",G.lengths.borderRadius,";overflow:hidden;",G.effects.checkerboard,";",G.shadows.inset,";cursor:",e=>e.sortable?"pointer":"auto",";"),Dn=k("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"}),En=k("img",{target:"e1hax4ql5",label:"StyledImage"})({name:"ukfjzf",styles:"width:100%;height:100%;object-fit:contain"});function Sn(e){return(0,t.jsx)(En,Cn({role:"presentation"},e))}function On({onRemove:e,onReplace:n}){return(0,t.jsx)(Dn,null,(0,t.jsx)(G.IconButton,{size:"small",type:"media",onClick:n}),(0,t.jsx)(G.IconButton,{size:"small",type:"close",onClick:e}))}function kn(e){const{attributes:n,listeners:r,setNodeRef:o,transform:i,transition:a}=yn({id:e.id}),s={transform:xe.Transform.toString(i),transition:a},{itemValue:l,getAsset:c,field:u,onRemove:d,onReplace:f}=e;return(0,t.jsx)("div",Cn({ref:o,style:s},n,r),(0,t.jsx)(Rn,{sortable:!0},(0,t.jsx)(Sn,{src:c(l,u)||""})),(0,t.jsx)(On,{item:l,onRemove:d,onReplace:f}))}var An={name:"a42x49-SortableMultiImageWrapper",styles:"display:flex;flex-wrap:wrap;label:SortableMultiImageWrapper;"};function Mn({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,g.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}(Te(Et,{activationConstraint:s}),Te(Ot,{activationConstraint:s}));return(0,t.jsx)("div",{css:An},(0,t.jsx)(tn,{modifiers:[xn],collisionDetection:Fe,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)(fn,{items:e},e.map((e,o)=>(0,t.jsx)(kn,{key:e.id,id:e.id,index:o,itemValue:e.value,getAsset:n,field:r,onRemove:i(o),onReplace:a(o)})))))}const In=k("a",{target:"e1hax4ql4",label:"FileLink"})({name:"7mbjrw",styles:"margin-bottom:20px;font-weight:normal;color:inherit;&:hover,&:active,&:focus{text-decoration:underline;}"}),Tn=k("div",{target:"e1hax4ql3",label:"FileLinks"})({name:"cn3xcj",styles:"margin-bottom:12px"}),jn=k("ul",{target:"e1hax4ql2",label:"FileLinkList"})({name:"ffhm6p",styles:"list-style-type:none"}),Nn=k("button",{target:"e1hax4ql1",label:"FileWidgetButton"})(G.buttons.button,";",G.components.badge,";margin-bottom:12px;"),Ln=k("button",{target:"e1hax4ql0",label:"FileWidgetButtonRemove"})(G.buttons.button,";",G.components.badgeDanger,";");function _n(e){return Array.isArray(e)||j.List.isList(e)}function Pn(e){return j.List.isList(e)?e.toArray():null!=e?e:""}const Fn=L()(e=>console.warn(V`
|
|
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("uuid"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsWidgetFile",["@emotion/react","react","prop-types","react-immutable-proptypes","immutable","uuid","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("uuid"),require("decap-cms-ui-default")):e.DecapCmsWidgetFile=t(e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsDefaultExports.ImmutablePropTypes,e.DecapCmsDefaultExports.Immutable,e.DecapCmsDefaultExports.UUId,e.DecapCmsUiDefault)}(window,(e,t,n,r,o,i,a)=>(()=>{var s={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},97(e){"use strict";e.exports=i},171(e){"use strict";e.exports=a}},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:()=>Xn});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 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=c(119),v=c.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=c(434),M=c.n(O),I=c(630),T=c.n(I),j=c(522),N=c(354),L=c.n(N),_=c(97),P=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}}(),F=(y=["",""],x=["",""],Object.freeze(Object.defineProperties(y,{raw:{value:Object.freeze(x)}}))),q=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 P(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(F,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 B=q;var U={separator:"",conjunction:"",serial:!1};const z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:U;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}}},W=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)}}},H=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 B(z({separator:","}),W,H),new B(z({separator:",",conjunction:"and"}),W,H),new B(z({separator:",",conjunction:"or"}),W,H);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 Y=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new B(X("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(Y):Y(e)?e:""}}},z,W,H);const $=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 B(X("\n"),z,W,H,$(/&/g,"&"),$(/</g,"<"),$(/>/g,">"),$(/"/g,"""),$(/'/g,"'"),$(/`/g,"`"));const K=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)}}},V=new B(K(/(?:\n(?:\s*))+/g," "),H);new B(K(/(?:\n\s*)/g,""),H),new B(z({separator:","}),K(/(?:\s+)/g," "),H),new B(z({separator:",",conjunction:"or"}),K(/(?:\s+)/g," "),H),new B(z({separator:",",conjunction:"and"}),K(/(?:\s+)/g," "),H),new B(z,W,H),new B(z,K(/(?:\s+)/g," "),H),new B(W,H),new B(W("all"),H);var G=c(171);function J(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 Z=c(144);const Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ee(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function te(e){return"nodeType"in e}function ne(e){var t,n;return e?ee(e)?e:te(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function re(e){const{Document:t}=ne(e);return e instanceof t}function oe(e){return!ee(e)&&e instanceof ne(e).HTMLElement}function ie(e){return e instanceof ne(e).SVGElement}function ae(e){return e?ee(e)?e.document:te(e)?re(e)?e:oe(e)||ie(e)?e.ownerDocument:document:document:document}const se=Q?h.useLayoutEffect:h.useEffect;function le(e){const t=(0,h.useRef)(e);return se(()=>{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 ce(e,t){void 0===t&&(t=[e]);const n=(0,h.useRef)(e);return se(()=>{n.current!==e&&(n.current=e)},t),n}function ue(e,t){const n=(0,h.useRef)();return(0,h.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function de(e){const t=le(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 fe(e){const t=(0,h.useRef)();return(0,h.useEffect)(()=>{t.current=e},[e]),t.current}let pe={};function ge(e,t){return(0,h.useMemo)(()=>{if(t)return t;const n=null==pe[e]?0:pe[e]+1;return pe[e]=n,e+"-"+n},[e,t])}function he(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 ve=he(1),me=he(-1);function be(e){if(!e)return!1;const{KeyboardEvent:t}=ne(e.target);return t&&e instanceof t}function ye(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=ne(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 xe=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[xe.Translate.toString(e),xe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),we="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ce(e){return e.matches(we)?e:e.querySelector(we)}const Re={display:"none"};function De(e){let{id:t,value:n}=e;return v().createElement("div",{id:t,style:Re},n)}function Ee(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 Se=(0,h.createContext)(null),ke={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 "},Ae={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 Oe(e){let{announcements:t=Ae,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=ke}=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=ge("DndLiveRegion"),[l,c]=(0,h.useState)(!1);if((0,h.useEffect)(()=>{c(!0)},[]),function(e){const t=(0,h.useContext)(Se);(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(De,{id:r,value:o.draggable}),v().createElement(Ee,{id:s,announcement:a}));return n?(0,Z.createPortal)(u,n):u}var Me;function Ie(){}function Te(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"}(Me||(Me={}));const je=Object.freeze({x:0,y:0});function Ne(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Le(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function _e(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Pe(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 Fe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Pe(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Ne(Pe(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Le)};function qe(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 Be=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=qe(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(_e)};function Ue(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:je}function ze(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 We=ze(1);const He={ignoreTransform:!1};function Xe(e,t){void 0===t&&(t=He);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=ne(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 Ye(e){return Xe(e,{ignoreTransform:!0})}function $e(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(re(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!oe(o)||ie(o))return n;if(n.includes(o))return n;const i=ne(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=ne(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=ne(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Ke(e){const[t]=$e(e,1);return null!=t?t:null}function Ve(e){return Q&&e?ee(e)?e:te(e)?re(e)||e===ae(e).scrollingElement?window:oe(e)?e:null:null:null}function Ge(e){return ee(e)?e.scrollX:e.scrollLeft}function Je(e){return ee(e)?e.scrollY:e.scrollTop}function Ze(e){return{x:Ge(e),y:Je(e)}}var Qe;function et(e){return!(!Q||!e)&&e===document.scrollingElement}function tt(e){const t={x:0,y:0},n=et(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"}(Qe||(Qe={}));const nt={x:.2,y:.2};function rt(e,t,n,r,o){let{top:i,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===o&&(o=nt);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=tt(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=Qe.Backward,g.y=r*Math.abs((t.top+h-i)/h)):!u&&l>=t.bottom-h&&(p.y=Qe.Forward,g.y=r*Math.abs((t.bottom-h-l)/h)),!f&&s>=t.right-v?(p.x=Qe.Forward,g.x=r*Math.abs((t.right-v-s)/v)):!d&&a<=t.left+v&&(p.x=Qe.Backward,g.x=r*Math.abs((t.left+v-a)/v)),{direction:p,speed:g}}function ot(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 it(e){return e.reduce((e,t)=>ve(e,Ze(t)),je)}const at=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Ge(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Je(t),0)}]];class st{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=$e(t),r=it(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of at)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 lt{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 ct(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 ut,dt;function ft(e){e.preventDefault()}function pt(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"}(ut||(ut={})),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"}(dt||(dt={}));const gt={start:[dt.Space,dt.Enter],cancel:[dt.Esc],end:[dt.Space,dt.Enter,dt.Tab]},ht=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case dt.Right:return{...n,x:n.x+25};case dt.Left:return{...n,x:n.x-25};case dt.Down:return{...n,y:n.y+25};case dt.Up:return{...n,y:n.y-25}}};class vt{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 lt(ae(t)),this.windowListeners=new lt(ne(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ut.Resize,this.handleCancel),this.windowListeners.add(ut.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ut.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);Ke(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(je)}handleKeyDown(e){if(be(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=gt,coordinateGetter:i=ht,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}:je;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=me(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}=tt(n),p=ot(n),g={x:Math.min(o===dt.Right?p.right-p.width/2:p.right,Math.max(o===dt.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(o===dt.Down?p.bottom-p.height/2:p.bottom,Math.max(o===dt.Down?p.top:p.top+p.height/2,u.y))},h=o===dt.Right&&!s||o===dt.Left&&!l,v=o===dt.Down&&!c||o===dt.Up&&!i;if(h&&g.x!==u.x){const e=n.scrollLeft+t.x,i=o===dt.Right&&e<=d.x||o===dt.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===dt.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===dt.Down&&e<=d.y||o===dt.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===dt.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,ve(me(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 mt(e){return Boolean(e&&"distance"in e)}function bt(e){return Boolean(e&&"delay"in e)}vt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=gt,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 yt{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=ne(e);return e instanceof t?e:ae(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=ae(i),this.documentListeners=new lt(this.document),this.listeners=new lt(n),this.windowListeners=new lt(ne(i)),this.initialCoordinates=null!=(r=ye(o))?r:je,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(ut.Resize,this.handleCancel),this.windowListeners.add(ut.DragStart,ft),this.windowListeners.add(ut.VisibilityChange,this.handleCancel),this.windowListeners.add(ut.ContextMenu,ft),this.documentListeners.add(ut.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(bt(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(mt(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(ut.Click,pt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ut.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=ye(e))?t:je,l=me(r,s);if(!n&&a){if(mt(a)){if(null!=a.tolerance&&ct(l,a.tolerance))return this.handleCancel();if(ct(l,a.distance))return this.handleStart()}return bt(a)&&ct(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===dt.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const xt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class wt extends yt{constructor(e){const{event:t}=e,n=ae(t.target);super(e,xt,n)}}wt.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 Ct={move:{name:"mousemove"},end:{name:"mouseup"}};var Rt;!function(e){e[e.RightClick=2]="RightClick"}(Rt||(Rt={}));class Dt extends yt{constructor(e){super(e,Ct,ae(e.event.target))}}Dt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Rt.RightClick&&(null==r||r({event:n}),!0)}}];const Et={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class St extends yt{constructor(e){super(e,Et)}static setup(){return window.addEventListener(Et.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Et.move.name,e)};function e(){}}}var kt,At;St.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"}(kt||(kt={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(At||(At={}));const Ot={x:{[Qe.Backward]:!1,[Qe.Forward]:!1},y:{[Qe.Backward]:!1,[Qe.Forward]:!1}};var Mt,It;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Mt||(Mt={})),function(e){e.Optimized="optimized"}(It||(It={}));const Tt=new Map;function jt(e,t){return ue(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Nt(e){let{callback:t,disabled:n}=e;const r=le(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 Lt(e){return new st(Xe(e),e)}function _t(e,t,n){void 0===t&&(t=Lt);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=le(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=Nt({callback:i});return se(()=>{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 Pt=[];function Ft(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!==je;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?me(e,n.current):je}function qt(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 Bt=[];const Ut=[{sensor:wt,options:{}},{sensor:vt,options:{}}],zt={current:{}},Wt={draggable:{measure:Ye},droppable:{measure:Ye,strategy:Mt.WhileDragging,frequency:It.Optimized},dragOverlay:{measure:Xe}};class Ht 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 Xt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ht,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ie},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Wt,measureDroppableContainers:Ie,windowRect:null,measuringScheduled:!1},Yt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ie,draggableNodes:new Map,over:null,measureDroppableContainers:Ie},$t=(0,h.createContext)(Yt),Kt=(0,h.createContext)(Xt);function Vt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ht}}}function Gt(e,t){switch(t.type){case Me.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Me.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 Me.DragEnd:case Me.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Me.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ht(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Me.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 Ht(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Me.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ht(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Jt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=(0,h.useContext)($t),i=fe(r),a=fe(null==n?void 0:n.id);return(0,h.useEffect)(()=>{if(!t&&!r&&i&&null!=a){if(!be(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=Ce(e);if(t){t.focus();break}}})}},[r,t,o,a,i]),null}const Zt=(0,h.createContext)({...je,scaleX:1,scaleY:1});var Qt;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Qt||(Qt={}));const en=(0,h.memo)(function(e){var t,n,r,o;let{id:i,accessibility:a,autoScroll:s=!0,children:l,sensors:c=Ut,collisionDetection:u=Be,measuring:d,modifiers:f,...p}=e;const g=(0,h.useReducer)(Gt,void 0,Vt),[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)(Qt.Uninitialized),R=w===Qt.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:zt,rect:O}:null},[D,A]),I=(0,h.useRef)(null),[T,j]=(0,h.useState)(null),[N,L]=(0,h.useState)(null),_=ce(p,Object.values(p)),P=ge("DndDescribedBy",i),F=(0,h.useMemo)(()=>k.getEnabled(),[k]),q=(B=d,(0,h.useMemo)(()=>({draggable:{...Wt.draggable,...null==B?void 0:B.draggable},droppable:{...Wt.droppable,...null==B?void 0:B.droppable},dragOverlay:{...Wt.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:U,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 Mt.Always:return!1;case Mt.BeforeDragging:return n;default:return!n}}(),f=ce(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=ue(t=>{if(d&&!n)return Tt;if(!t||t===Tt||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 st(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:q.droppable}),H=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return ue(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(E,D),X=(0,h.useMemo)(()=>N?ye(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 jt(e,t)}(H,q.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;se(()=>{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=Ue(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=Ke(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:q.draggable.measure});const K=_t(H,q.draggable.measure,$),V=_t(H?H.parentElement:null),G=(0,h.useRef)({activatorEvent:null,active:null,activeNode:H,collisionRect:null,collisions:null,droppableRects:U,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),J=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=Nt({callback:(0,h.useCallback)(e=>{for(const{target:n}of e)if(oe(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 oe(t)?t:e}(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),r(n?t(n):null)},[t,o]),[a,s]=de(i);return(0,h.useMemo)(()=>({nodeRef:a,rect:n,setRef:s}),[n,a,s])}({measure:q.dragOverlay.measure}),te=null!=(n=ee.nodeRef.current)?n:H,re=R?null!=(r=ee.rect)?r:K:null,ie=Boolean(ee.nodeRef.current&&ee.rect),ae=Ue(le=ie?null:K,jt(le));var le;const pe=qt(te?ne(te):null),he=function(e){const t=(0,h.useRef)(e),n=ue(n=>e?n&&n!==Pt&&e&&t.current&&e.parentNode===t.current.parentNode?n:$e(e):Pt,[e]);return(0,h.useEffect)(()=>{t.current=e},[e]),n}(R?null!=J?J:H:null),me=function(e,t){void 0===t&&(t=Xe);const[n]=e,r=qt(n?ne(n):null),[o,i]=(0,h.useState)(Bt);function a(){i(()=>e.length?e.map(e=>et(e)?r:new st(t(e),e)):Bt)}const s=Nt({callback:a});return se(()=>{null==s||s.disconnect(),a(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),o}(he),be=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-ae.x,y:S.y-ae.y,scaleX:1,scaleY:1},activatorEvent:N,active:M,activeNodeRect:K,containerNodeRect:V,draggingNodeRect:re,over:G.current.over,overlayNodeRect:ee.rect,scrollableAncestors:he,scrollableAncestorRects:me,windowRect:pe}),xe=X?ve(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=Ve(e.target);t&&n(e=>e?(e.set(t,Ze(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=Ve(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,Ze(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=Ve(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),(0,h.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>ve(e,t),je):it(e):je,[e,t])}(he),Ce=Ft(we),Re=Ft(we,[K]),De=ve(be,Ce),Ee=re?We(re,be):null,ke=M&&Ee?u({active:M,collisionRect:Ee,droppableRects:U,droppableContainers:F,pointerCoordinates:xe}):null,Ae=function(e){if(!e||0===e.length)return null;const[t]=e;return t.id}(ke),[Ie,Te]=(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?be:ve(be,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,Z.unstable_batchedUpdates)(()=>{null==r||r(o),C(Qt.Initializing),b({type:Me.DragStart,initialCoordinates:e,active:t}),y({type:"onDragStart",event:o}),j(Le.current),L(i)})},onMove(e){b({type:Me.DragMove,coordinates:e})},onEnd:s(Me.DragEnd),onCancel:s(Me.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===Me.DragEnd&&"function"==typeof s&&await Promise.resolve(s(a))&&(e=Me.DragCancel)}I.current=null,(0,Z.unstable_batchedUpdates)(()=>{b({type:e}),C(Qt.Uninitialized),Te(null),j(null),L(null),Le.current=null;const t=e===Me.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(!Q)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),se(()=>{K&&w===Qt.Initializing&&C(Qt.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,Z.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(Ae),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,Z.unstable_batchedUpdates)(()=>{Te(s),null==i||i(l),y({type:"onDragOver",event:l})})},[Ae]),se(()=>{G.current={activatorEvent:N,active:M,activeNode:H,collisionRect:Ee,collisions:ke,droppableRects:U,draggableNodes:E,draggingNode:te,draggingNodeRect:re,droppableContainers:k,over:Ie,scrollableAncestors:he,scrollAdjustedTranslate:De},O.current={initial:re,translated:Ee}},[M,H,ke,Ee,E,te,re,U,k,Ie,he,De]),function(e){let{acceleration:t,activator:n=kt.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=At.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=function(e){let{delta:t,disabled:n}=e;const r=fe(t);return ue(e=>{if(n||!r||!e)return Ot;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[Qe.Backward]:e.x[Qe.Backward]||-1===o,[Qe.Forward]:e.x[Qe.Forward]||1===o},y:{[Qe.Backward]:e.y[Qe.Backward]||-1===i,[Qe.Forward]:e.y[Qe.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 kt.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case kt.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===At.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}=rt(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:Ee,pointerCoordinates:xe,scrollableAncestors:he,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:U,over:Ie,measureDroppableContainers:z,scrollableAncestors:he,scrollableAncestorRects:me,measuringConfiguration:q,measuringScheduled:W,windowRect:pe}),[M,H,K,N,ke,V,ee,E,k,U,Ie,z,he,me,q,W,pe]),ze=(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(Se.Provider,{value:x},v().createElement($t.Provider,{value:ze},v().createElement(Kt.Provider,{value:qe},v().createElement(Zt.Provider,{value:Ne},l)),v().createElement(Jt,{disabled:!1===(null==a?void 0:a.restoreFocus)})),v().createElement(Oe,{...a,hiddenTextDescribedById:P}))}),tn=(0,h.createContext)(null),nn="button";const rn={timeout:25};function on(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function an(e,t){return e.reduce((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e},Array(e.length))}function sn(e){return null!==e&&e>=0}const ln=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=on(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},cn="Sortable",un=v().createContext({activeIndex:-1,containerId:cn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ln,disabled:{draggable:!1,droppable:!1}});function dn(e){let{children:t,id:n,items:r,strategy:o=ln,disabled:i=!1}=e;const{active:a,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=(0,h.useContext)(Kt),d=ge(cn,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);se(()=>{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:an(p,l),strategy:o}),[m,d,C.draggable,C.droppable,w,p,b,l,f,o]);return v().createElement(un.Provider,{value:R},t)}const fn=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return on(n,r,o).indexOf(t)},pn=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))},gn={duration:200,easing:"ease"},hn="transform",vn=xe.Transition.toString({property:hn,duration:0,easing:"linear"}),mn={roleDescription:"sortable"};function bn(e){let{animateLayoutChanges:t=pn,attributes:n,disabled:r,data:o,getNewIndex:i=fn,id:a,strategy:s,resizeObserverConfig:l,transition:c=gn}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:g,sortedRects:v,overIndex:m,useDragOverlay:b,strategy:y}=(0,h.useContext)(un),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=ge("Droppable"),{active:a,dispatch:s,over:l,measureDroppableContainers:c}=(0,h.useContext)($t),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}={...rn,...o},b=ce(null!=v?v:r),y=Nt({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]=de(x),R=ce(t);return(0,h.useEffect)(()=>{y&&w.current&&(y.disconnect(),d.current=!1,y.observe(w.current))},[w,y]),(0,h.useEffect)(()=>(s({type:Me.RegisterDroppable,element:{id:r,key:i,disabled:n,node:w,rect:f,data:R}}),()=>s({type:Me.UnregisterDroppable,key:i,id:r})),[r]),(0,h.useEffect)(()=>{n!==u.current.disabled&&(s({type:Me.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=ge("Draggable"),{activators:a,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=(0,h.useContext)($t),{role:p=nn,roleDescription:g="draggable",tabIndex:v=0}=null!=o?o:{},m=(null==l?void 0:l.id)===t,b=(0,h.useContext)(m?Zt:tn),[y,x]=de(),[w,C]=de(),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=ce(n);return se(()=>(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!==nn)||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:{...mn,...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),q=Boolean(A),B=q&&!g&&sn(f)&&sn(m),U=!b&&N,z=U&&B?P:null,W=B?null!=z?z:(null!=s?s:y)({rects:v,activeNodeRect:M,activeIndex:f,overIndex:m,index:w}):null,H=sn(f)&&sn(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:q,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 se(()=>{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,h.useEffect)(()=>{i&&a(null)},[i]),i}({disabled:!K,index:w,node:E,rect:D});return(0,h.useEffect)(()=>{q&&Y.current.newIndex!==H&&(Y.current.newIndex=H),d!==Y.current.containerId&&(Y.current.containerId=d),u!==Y.current.items&&(Y.current.items=u)},[q,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:q,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?vn:U&&!be(O)||!c?void 0:q||K?xe.Transition.toString({...c,property:hn}):void 0}}dt.Down,dt.Right,dt.Up,dt.Left;const yn=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 xn(){return xn=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},xn.apply(null,arguments)}const wn=A("div",{target:"e1hax4ql7",label:"ImageWrapper"})("flex-basis:155px;width:155px;height:100px;margin-right:20px;margin-bottom:20px;border:",G.borders.textField,";border-radius:",G.lengths.borderRadius,";overflow:hidden;",G.effects.checkerboard,";",G.shadows.inset,";cursor:",e=>e.sortable?"pointer":"auto",";"),Cn=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"}),Rn=A("img",{target:"e1hax4ql5",label:"StyledImage"})({name:"ukfjzf",styles:"width:100%;height:100%;object-fit:contain"});function Dn({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)(Rn,{role:"presentation",src:o}):null}function En({onRemove:e,onReplace:n}){return(0,t.jsx)(Cn,null,(0,t.jsx)(G.IconButton,{size:"small",type:"media",onClick:n}),(0,t.jsx)(G.IconButton,{size:"small",type:"close",onClick:e}))}function Sn(e){const{attributes:n,listeners:r,setNodeRef:o,transform:i,transition:a}=bn({id:e.id}),s={transform:xe.Transform.toString(i),transition:a},{itemValue:l,getAsset:c,field:u,onRemove:d,onReplace:f}=e;return(0,t.jsx)("div",xn({ref:o,style:s},n,r),(0,t.jsx)(wn,{sortable:!0},(0,t.jsx)(Dn,{value:l,field:u,getAsset:c})),(0,t.jsx)(En,{item:l,onRemove:d,onReplace:f}))}var kn={name:"a42x49-SortableMultiImageWrapper",styles:"display:flex;flex-wrap:wrap;label:SortableMultiImageWrapper;"};function An({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])}(Te(Dt,{activationConstraint:s}),Te(St,{activationConstraint:s}));return(0,t.jsx)("div",{css:kn},(0,t.jsx)(en,{modifiers:[yn],collisionDetection:Fe,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)(dn,{items:e},e.map((e,o)=>(0,t.jsx)(Sn,{key:e.id,id:e.id,index:o,itemValue:e.value,getAsset:n,field:r,onRemove:i(o),onReplace:a(o)})))))}const On=A("a",{target:"e1hax4ql4",label:"FileLink"})({name:"7mbjrw",styles:"margin-bottom:20px;font-weight:normal;color:inherit;&:hover,&:active,&:focus{text-decoration:underline;}"}),Mn=A("div",{target:"e1hax4ql3",label:"FileLinks"})({name:"cn3xcj",styles:"margin-bottom:12px"}),In=A("ul",{target:"e1hax4ql2",label:"FileLinkList"})({name:"ffhm6p",styles:"list-style-type:none"}),Tn=A("button",{target:"e1hax4ql1",label:"FileWidgetButton"})(G.buttons.button,";",G.components.badge,";margin-bottom:12px;"),jn=A("button",{target:"e1hax4ql0",label:"FileWidgetButtonRemove"})(G.buttons.button,";",G.components.badgeDanger,";");function Nn(e){return Array.isArray(e)||j.List.isList(e)}function Ln(e){return j.List.isList(e)?e.toArray():e??""}const _n=L()(e=>console.warn(V`
|
|
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
|
|
7
|
+
`));function Pn({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=(0,_.v4)()}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:Ln(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=Ln(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:Ln(o),replaceIndex:t,allowMultiple:!1,config:i.get("config"),field:n})};getMediaLibraryFieldOptions=()=>{const{field:e}=this.props;return e.hasIn(["options","media_library"])?(_n(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?Nn(e)?e.map(e=>J(e)):J(e):e};renderFileLink=e=>{if(!e||e.length<=50)return e;const n=`${e.slice(0,25)}…${e.slice(-24)}`;return(0,t.jsx)(On,{href:e,rel:"noopener",target:"_blank"},n)};renderFileLinks=()=>{const{value:e}=this.props;return Nn(e)?(0,t.jsx)(Mn,null,(0,t.jsx)(In,null,e.map(e=>(0,t.jsx)("li",{key:e},this.renderFileLink(e))))):(0,t.jsx)(Mn,null,this.renderFileLink(e))};renderImages=()=>{const{getAsset:e,value:n,field:r}=this.props,o=function(e){return Nn(e)?Ln(e).map(e=>({id:(0,_.v4)(),value:e})):e}(n);return Nn(n)?(0,t.jsx)(An,{items:o,onSortEnd:this.onSortEnd,onRemoveOne:this.onRemoveOne,onReplaceOne:this.onReplaceOne,distance:4,getAsset:e,field:r,axis:"xy",lockToContainerEdges:!0}):(0,t.jsx)(wn,null,(0,t.jsx)(Dn,{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)(Tn,{onClick:this.handleChange},r(`editor.editorWidgets.${n}.${this.allowsMultiple()?"addMore":"chooseDifferent"}`)),o.get("choose_url",!0)&&!this.allowsMultiple()?(0,t.jsx)(Tn,{onClick:this.handleUrl(n)},r(`editor.editorWidgets.${n}.replaceUrl`)):null,(0,t.jsx)(jn,{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)(Tn,{onClick:this.handleChange},n(`editor.editorWidgets.${e}.choose${this.allowsMultiple()?"Multiple":""}`)),r.get("choose_url",!0)?(0,t.jsx)(Tn,{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 Fn=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 qn({values:e,getAsset:n,field:r}){return(0,t.jsx)("div",null,e.map(e=>(0,t.jsx)(Fn,{key:e,path:e,href:n(e,r)})))}function Bn(e){const{value:n,getAsset:r,field:o}=e;return Array.isArray(n)||j.List.isList(n)?(0,t.jsx)(qn,{values:n,getAsset:r,field:o}):(0,t.jsx)(Fn,{key:n,path:n,href:r(n,o)})}function Un(e){return(0,t.jsx)(G.WidgetPreviewContainer,null,e.value?(0,t.jsx)(Bn,e):null)}Un.propTypes={getAsset:M().func.isRequired,value:M().node};const zn=Un,Wn={properties:{allow_multiple:{type:"boolean"}}},Hn=Pn(),Xn={Widget:function(e={}){return{name:"file",controlComponent:Hn,previewComponent:zn,schema:Wn,...e}},controlComponent:Hn,previewComponent:zn,withFileControl:Pn}})(),u.DecapCmsWidgetFile})());
|
|
8
8
|
//# sourceMappingURL=decap-cms-widget-file.js.map
|