andoncloud-station-assignment-widget 1.0.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/README.md +17 -0
- package/dist/assets/.gitkeep +0 -0
- package/dist/components/AssignmentBoard/DropZone/index.d.ts +8 -0
- package/dist/components/AssignmentBoard/DropZone/styles.d.ts +2 -0
- package/dist/components/AssignmentBoard/OperatorCard/index.d.ts +12 -0
- package/dist/components/AssignmentBoard/OperatorCard/styles.d.ts +6 -0
- package/dist/components/AssignmentBoard/PoolColumn/index.d.ts +7 -0
- package/dist/components/AssignmentBoard/PoolColumn/styles.d.ts +3 -0
- package/dist/components/AssignmentBoard/WorkplaceColumn/index.d.ts +7 -0
- package/dist/components/AssignmentBoard/WorkplaceColumn/styles.d.ts +5 -0
- package/dist/components/AssignmentBoard/helpers.d.ts +3 -0
- package/dist/components/AssignmentBoard/index.d.ts +12 -0
- package/dist/components/AssignmentBoard/styles.d.ts +13 -0
- package/dist/components/Navigation/index.d.ts +8 -0
- package/dist/components/Navigation/styles.d.ts +3 -0
- package/dist/components/SettingsFormContent/index.d.ts +5 -0
- package/dist/components/SettingsFormContent/styles.d.ts +3 -0
- package/dist/components/Widget/index.d.ts +5 -0
- package/dist/components/Widget/utils.d.ts +15 -0
- package/dist/components/WidgetView/index.d.ts +4 -0
- package/dist/components/WidgetView/styles.d.ts +3 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/locales/index.d.ts +35 -0
- package/dist/stories/Widget.stories.d.ts +5 -0
- package/dist/types.d.ts +28 -0
- package/dist/utils/state.d.ts +4 -0
- package/dist/version.d.ts +1 -0
- package/package.json +74 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var e=require("react"),t=require("andoncloud-dashboard-toolkit"),n=require("andoncloud-widget-base"),r=require("react-i18next"),o=require("@mui/lab"),i=require("@mui/material"),a=require("react-dom"),s=require("@mui/icons-material/ChevronLeft"),l=require("@mui/icons-material/ChevronRight");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,t}var d=/*#__PURE__*/c(e),p=/*#__PURE__*/u(e),f=/*#__PURE__*/c(a),h=/*#__PURE__*/c(s),m=/*#__PURE__*/c(l);function g(){return g=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},g.apply(null,arguments)}var b={en:{translation:{Loading:"Loading","Choose workplace":"Choose workplace",Cancel:"Cancel",Save:"Save",Settings:"Settings",noShiftsAvailable:"No shifts available",unassignedPool:"Unassigned",department:"Department",allDepartments:"All departments",refreshInterval:"Refresh interval",filters:"Filters",advanced:"Advanced"}},pl:{translation:{Loading:"Wczytywanie","Choose workplace":"Wybierz stanowisko",Cancel:"Anuluj",Save:"Zapisz",Settings:"Ustawienia",noShiftsAvailable:"Brak dostępnych zmian",unassignedPool:"Nieprzypisani",department:"Wydział",allDepartments:"Wszystkie wydziały",refreshInterval:"Interwał odświeżania",filters:"Filtry",advanced:"Zaawansowane"}}};function y(e){var t={exports:{}};return e(t,t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var v=y(function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function l(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return At(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){var t=null,r=!1,o=e._d&&!isNaN(e._d.getTime());return o&&(t=h(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),o=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?o:(e._isValid=o,e._isValid)}function g(e){var t=f(NaN);return null!=e?p(h(t),e):h(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],y=!1;function v(e,t){var n,r,o,i=b.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=h(t)),l(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)l(o=t[r=b[n]])||(e[r]=o);return e}function E(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,r.updateOffset(this),y=!1)}function _(e){return e instanceof E||null!=e&&null!=e._isAMomentObject}function D(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function N(e,t){var n=!0;return p(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var o,i,s,l=[],c=arguments.length;for(i=0;i<c;i++){if(o="","object"==typeof arguments[i]){for(s in o+="\n["+i+"] ",arguments[0])a(arguments[0],s)&&(o+=s+": "+arguments[0][s]+", ");o=o.slice(0,-2)}else o=arguments[i];l.push(o)}D(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var w,O={};function x(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),O[e]||(D(t),O[e]=!0)}function S(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e,t){var n,r=p({},e);for(n in t)a(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&i(e[n])&&(r[n]=p({},r[n]));return r}function C(e){null!=e&&this.set(e)}function k(e,t,n){var r=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-r.length)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,w=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var T=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,M=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,A={},P={};function V(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(P[e]=o),t&&(P[t[0]]=function(){return k(o.apply(this,arguments),t[1],t[2])}),n&&(P[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function R(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function F(e,t){return e.isValid()?(t=L(t,e.localeData()),A[t]=A[t]||function(e){var t,n,r=e.match(T);for(t=0,n=r.length;t<n;t++)r[t]=P[r[t]]?P[r[t]]:R(r[t]);return function(t){var o,i="";for(o=0;o<n;o++)i+=S(r[o])?r[o].call(t,e):r[o];return i}}(t),A[t](e)):e.localeData().invalidDate()}function L(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(M.lastIndex=0;n>=0&&M.test(e);)e=e.replace(M,r),M.lastIndex=0,n-=1;return e}var Y={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function $(e){return"string"==typeof e?Y[e]||Y[e.toLowerCase()]:void 0}function B(e){var t,n,r={};for(n in e)a(e,n)&&(t=$(n))&&(r[t]=e[n]);return r}var G,j={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},W=/\d/,U=/\d\d/,H=/\d{3}/,z=/\d{4}/,q=/[+-]?\d{6}/,Z=/\d\d?/,J=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,Q=/\d{1,4}/,ee=/[+-]?\d{1,6}/,te=/\d+/,ne=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,ie=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ae=/^[1-9]\d?/,se=/^([1-9]\d|\d)/;function le(e,t,n){G[e]=S(t)?t:function(e,r){return e&&n?n:t}}function ce(e,t){return a(G,e)?G[e](t._strict,t._locale):new RegExp(ue(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o})))}function ue(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function de(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function pe(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=de(t)),n}G={};var fe={};function he(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),c(t)&&(o=function(e,n){n[t]=pe(e)}),r=e.length,n=0;n<r;n++)fe[e[n]]=o}function me(e,t){he(e,function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)})}function ge(e,t,n){null!=t&&a(fe,e)&&fe[e](t,n._a,n,e)}function be(e){return e%4==0&&e%100!=0||e%400==0}var ye=0,ve=1,Ee=2,_e=3,De=4,Ne=5,we=6,Oe=7,xe=8;function Se(e){return be(e)?366:365}V("Y",0,0,function(){var e=this.year();return e<=9999?k(e,4):"+"+e}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),le("Y",ne),le("YY",Z,U),le("YYYY",Q,z),le("YYYYY",ee,q),le("YYYYYY",ee,q),he(["YYYYY","YYYYYY"],ye),he("YYYY",function(e,t){t[ye]=2===e.length?r.parseTwoDigitYear(e):pe(e)}),he("YY",function(e,t){t[ye]=r.parseTwoDigitYear(e)}),he("Y",function(e,t){t[ye]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return pe(e)+(pe(e)>68?1900:2e3)};var Ie,Ce=ke("FullYear",!0);function ke(e,t){return function(n){return null!=n?(Me(this,e,n),r.updateOffset(this,t),this):Te(this,e)}}function Te(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Me(e,t,n){var r,o,i,a,s;if(e.isValid()&&!isNaN(n)){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}i=n,a=e.month(),s=29!==(s=e.date())||1!==a||be(i)?s:28,o?r.setUTCFullYear(i,a,s):r.setFullYear(i,a,s)}}function Ae(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?be(e)?29:28:31-n%7%2}Ie=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),V("MMMM",0,0,function(e){return this.localeData().months(this,e)}),le("M",Z,ae),le("MM",Z,U),le("MMM",function(e,t){return t.monthsShortRegex(e)}),le("MMMM",function(e,t){return t.monthsRegex(e)}),he(["M","MM"],function(e,t){t[ve]=pe(e)-1}),he(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[ve]=o:h(n).invalidMonth=e});var Pe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ve="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Re=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Fe=ie,Le=ie;function Ye(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Ie.call(this._shortMonthsParse,a))?o:null:-1!==(o=Ie.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=Ie.call(this._shortMonthsParse,a))||-1!==(o=Ie.call(this._longMonthsParse,a))?o:null:-1!==(o=Ie.call(this._longMonthsParse,a))||-1!==(o=Ie.call(this._shortMonthsParse,a))?o:null}function $e(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=pe(t);else if(!c(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,Ae(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Be(e){return null!=e?($e(this,e),r.updateOffset(this,!0),this):Te(this,"Month")}function Ge(){function e(e,t){return t.length-e.length}var t,n,r,o,i=[],a=[],s=[];for(t=0;t<12;t++)n=f([2e3,t]),r=ue(this.monthsShort(n,"")),o=ue(this.months(n,"")),i.push(r),a.push(o),s.push(o),s.push(r);i.sort(e),a.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function je(e,t,n,r,o,i,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,i,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,i,a),s}function We(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ue(e,t,n){var r=7+t-n;return-(7+We(e,0,r).getUTCDay()-t)%7+r-1}function He(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+Ue(e,r,o);return s<=0?a=Se(i=e-1)+s:s>Se(e)?(i=e+1,a=s-Se(e)):(i=e,a=s),{year:i,dayOfYear:a}}function ze(e,t,n){var r,o,i=Ue(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+qe(o=e.year()-1,t,n):a>qe(e.year(),t,n)?(r=a-qe(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function qe(e,t,n){var r=Ue(e,t,n),o=Ue(e+1,t,n);return(Se(e)-r+o)/7}function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),le("w",Z,ae),le("ww",Z,U),le("W",Z,ae),le("WW",Z,U),me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=pe(e)}),V("d",0,"do","day"),V("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),V("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),V("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),le("d",Z),le("e",Z),le("E",Z),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),me(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:h(n).invalidWeekday=e}),me(["d","e","E"],function(e,t,n,r){t[r]=pe(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qe=ie,et=ie,tt=ie;function nt(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Ie.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Ie.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=Ie.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=Ie.call(this._weekdaysParse,a))||-1!==(o=Ie.call(this._shortWeekdaysParse,a))||-1!==(o=Ie.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Ie.call(this._shortWeekdaysParse,a))||-1!==(o=Ie.call(this._weekdaysParse,a))||-1!==(o=Ie.call(this._minWeekdaysParse,a))?o:null:-1!==(o=Ie.call(this._minWeekdaysParse,a))||-1!==(o=Ie.call(this._weekdaysParse,a))||-1!==(o=Ie.call(this._shortWeekdaysParse,a))?o:null}function rt(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=ue(this.weekdaysMin(n,"")),o=ue(this.weekdaysShort(n,"")),i=ue(this.weekdays(n,"")),a.push(r),s.push(o),l.push(i),c.push(r),c.push(o),c.push(i);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function ot(){return this.hours()%12||12}function it(e,t){V(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,ot),V("k",["kk",2],0,function(){return this.hours()||24}),V("hmm",0,0,function(){return""+ot.apply(this)+k(this.minutes(),2)}),V("hmmss",0,0,function(){return""+ot.apply(this)+k(this.minutes(),2)+k(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+k(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+k(this.minutes(),2)+k(this.seconds(),2)}),it("a",!0),it("A",!1),le("a",at),le("A",at),le("H",Z,se),le("h",Z,ae),le("k",Z,ae),le("HH",Z,U),le("hh",Z,U),le("kk",Z,U),le("hmm",J),le("hmmss",X),le("Hmm",J),le("Hmmss",X),he(["H","HH"],_e),he(["k","kk"],function(e,t,n){var r=pe(e);t[_e]=24===r?0:r}),he(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),he(["h","hh"],function(e,t,n){t[_e]=pe(e),h(n).bigHour=!0}),he("hmm",function(e,t,n){var r=e.length-2;t[_e]=pe(e.substr(0,r)),t[De]=pe(e.substr(r)),h(n).bigHour=!0}),he("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[_e]=pe(e.substr(0,r)),t[De]=pe(e.substr(r,2)),t[Ne]=pe(e.substr(o)),h(n).bigHour=!0}),he("Hmm",function(e,t,n){var r=e.length-2;t[_e]=pe(e.substr(0,r)),t[De]=pe(e.substr(r))}),he("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[_e]=pe(e.substr(0,r)),t[De]=pe(e.substr(r,2)),t[Ne]=pe(e.substr(o))});var st,lt=ke("Hours",!0),ct={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Pe,monthsShort:Ve,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Ke,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},ut={},dt={};function pt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ft(e){return e?e.toLowerCase().replace("_","-"):e}function ht(t){var n=null;if(void 0===ut[t]&&e&&e.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(t))try{n=st._abbr,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}("./locale/"+t),mt(n)}catch(e){ut[t]=null}return ut[t]}function mt(e,t){var n;return e&&((n=l(t)?bt(e):gt(e,t))?st=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),st._abbr}function gt(e,t){if(null!==t){var n,r=ct;if(t.abbr=e,null!=ut[e])x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ut[e]._config;else if(null!=t.parentLocale)if(null!=ut[t.parentLocale])r=ut[t.parentLocale]._config;else{if(null==(n=ht(t.parentLocale)))return dt[t.parentLocale]||(dt[t.parentLocale]=[]),dt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ut[e]=new C(I(r,t)),dt[e]&&dt[e].forEach(function(e){gt(e.name,e.config)}),mt(e),ut[e]}return delete ut[e],null}function bt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return st;if(!o(e)){if(t=ht(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=ft(e[i]).split("-")).length,n=(n=ft(e[i+1]))?n.split("-"):null;t>0;){if(r=ht(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&pt(o,n)>=t-1)break;t--}i++}return st}(e)}function yt(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ve]<0||n[ve]>11?ve:n[Ee]<1||n[Ee]>Ae(n[ye],n[ve])?Ee:n[_e]<0||n[_e]>24||24===n[_e]&&(0!==n[De]||0!==n[Ne]||0!==n[we])?_e:n[De]<0||n[De]>59?De:n[Ne]<0||n[Ne]>59?Ne:n[we]<0||n[we]>999?we:-1,h(e)._overflowDayOfYear&&(t<ye||t>Ee)&&(t=Ee),h(e)._overflowWeeks&&-1===t&&(t=Oe),h(e)._overflowWeekday&&-1===t&&(t=xe),h(e).overflow=t),e}var vt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Et=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,Dt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Nt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],wt=/^\/?Date\((-?\d+)/i,Ot=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,xt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var t,n,r,o,i,a,s=e._i,l=vt.exec(s)||Et.exec(s),c=Dt.length,u=Nt.length;if(l){for(h(e).iso=!0,t=0,n=c;t<n;t++)if(Dt[t][1].exec(l[1])){o=Dt[t][0],r=!1!==Dt[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(Nt[t][1].exec(l[3])){i=(l[2]||" ")+Nt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!_t.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),Tt(e)}else e._isValid=!1}function It(e){var t,n,r,o,i,a,s,l,c,u=Ot.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[3],r=u[2],o=u[5],i=u[6],a=u[7],s=[(l=u[4],c=parseInt(l,10),c<=49?2e3+c:c<=999?1900+c:c),Ve.indexOf(n),parseInt(r,10),parseInt(o,10),parseInt(i,10)],a&&s.push(parseInt(a,10)),!function(e,t,n){return!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t=s,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return xt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(u[8],u[9],u[10]),e._d=We.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function Ct(e,t,n){return null!=e?e:null!=t?t:n}function kt(e){var t,n,o,i,a,s=[];if(!e._d){for(o=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[Ee]&&null==e._a[ve]&&function(e){var t,n,r,o,i,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,a=4,n=Ct(t.GG,e._a[ye],ze(Pt(),1,4).year),r=Ct(t.W,1),((o=Ct(t.E,1))<1||o>7)&&(l=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,c=ze(Pt(),i,a),n=Ct(t.gg,e._a[ye],c.year),r=Ct(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i),r<1||r>qe(n,i,a)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=He(n,r,o,i,a),e._a[ye]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=Ct(e._a[ye],o[ye]),(e._dayOfYear>Se(a)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=We(a,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[Ee]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=o[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[De]&&0===e._a[Ne]&&0===e._a[we]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?We:je).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(h(e).weekdayMismatch=!0)}}function Tt(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],h(e).empty=!0;var t,n,o,i,a,s,l,c=""+e._i,u=c.length,d=0;for(l=(o=L(e._f,e._locale).match(T)||[]).length,t=0;t<l;t++)(n=(c.match(ce(i=o[t],e))||[])[0])&&((a=c.substr(0,c.indexOf(n))).length>0&&h(e).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),d+=n.length),P[i]?(n?h(e).empty=!1:h(e).unusedTokens.push(i),ge(i,n,e)):e._strict&&!n&&h(e).unusedTokens.push(i);h(e).charsLeftOver=u-d,c.length>0&&h(e).unusedInput.push(c),e._a[_e]<=12&&!0===h(e).bigHour&&e._a[_e]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[_e]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[_e],e._meridiem),null!==(s=h(e).era)&&(e._a[ye]=e._locale.erasConvertYear(s,e._a[ye])),kt(e),yt(e)}else It(e);else St(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||bt(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),_(t)?new E(yt(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,o,i,a,s=!1,l=e._f.length;if(0===l)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)i=0,a=!1,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Tt(t),m(t)&&(a=!0),i+=h(t).charsLeftOver,i+=10*h(t).unusedTokens.length,h(t).score=i,s?i<r&&(r=i,n=t):(null==r||i<r||a)&&(r=i,n=t,a&&(s=!0));p(e,n||t)}(e):n?Tt(e):function(e){var t=e._i;l(t)?e._d=new Date(r.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=wt.exec(e._i);null===t?(St(e),!1===e._isValid&&(delete e._isValid,It(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),kt(e)):i(t)?function(e){if(!e._d){var t=B(e._i);e._a=d([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),kt(e)}}(e):c(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),m(e)||(e._d=null),e))}function At(e,t,n,r,a){var l,c={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&s(e)||o(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=a,c._l=n,c._i=e,c._f=t,c._strict=r,(l=new E(yt(Mt(c))))._nextDay&&(l.add(1,"d"),l._nextDay=void 0),l}function Pt(e,t,n,r){return At(e,t,n,r,!1)}r.createFromInputFallback=N("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Vt=N("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Pt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),Rt=N("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Pt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()});function Ft(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Pt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Lt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Yt(e){var t=B(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,s=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,o=Lt.length;for(t in e)if(a(e,t)&&(-1===Ie.call(Lt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[Lt[n]]){if(r)return!1;parseFloat(e[Lt[n]])!==pe(e[Lt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*l*60*60,this._days=+s+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=bt(),this._bubble()}function $t(e){return e instanceof Yt}function Bt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Gt(e,t){V(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+k(~~(e/60),2)+t+k(~~e%60,2)})}Gt("Z",":"),Gt("ZZ",""),le("Z",oe),le("ZZ",oe),he(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Wt(oe,e)});var jt=/([\+\-]|\d\d)/gi;function Wt(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(jt)||["-",0,0])[1]+pe(n[2]))?0:"+"===n[0]?r:-r}function Ut(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(_(e)||u(e)?e.valueOf():Pt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),r.updateOffset(n,!1),n):Pt(e).local()}function Ht(e){return-Math.round(e._d.getTimezoneOffset())}function zt(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var qt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Jt(e,t){var n,r,o,i,s,l,u=e,d=null;return $t(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(u={},t?u[t]=+e:u.milliseconds=+e):(d=qt.exec(e))?(n="-"===d[1]?-1:1,u={y:0,d:pe(d[Ee])*n,h:pe(d[_e])*n,m:pe(d[De])*n,s:pe(d[Ne])*n,ms:pe(Bt(1e3*d[we]))*n}):(d=Zt.exec(e))?u={y:Xt(d[2],n="-"===d[1]?-1:1),M:Xt(d[3],n),w:Xt(d[4],n),d:Xt(d[5],n),h:Xt(d[6],n),m:Xt(d[7],n),s:Xt(d[8],n)}:null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Pt(u.from),s=Pt(u.to),o=i.isValid()&&s.isValid()?(s=Ut(s,i),i.isBefore(s)?l=Kt(i,s):((l=Kt(s,i)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(u={}).ms=o.milliseconds,u.M=o.months),r=new Yt(u),$t(e)&&a(e,"_locale")&&(r._locale=e._locale),$t(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Xt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Qt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(x(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),en(this,Jt(n,r),e),this}}function en(e,t,n,o){var i=t._milliseconds,a=Bt(t._days),s=Bt(t._months);e.isValid()&&(o=null==o||o,s&&$e(e,Te(e,"Month")+s*n),a&&Me(e,"Date",Te(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),o&&r.updateOffset(e,a||s))}Jt.fn=Yt.prototype,Jt.invalid=function(){return Jt(NaN)};var tn=Qt(1,"add"),nn=Qt(-1,"subtract");function rn(e){return"string"==typeof e||e instanceof String}function on(e,t){if(e.date()<t.date())return-on(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function an(e){var t;return void 0===e?this._locale._abbr:(null!=(t=bt(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var sn=N("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function ln(){return this._locale}var cn=1e3,un=6e4,dn=36e5,pn=126227808e5;function fn(e,t){return(e%t+t)%t}function hn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-pn:new Date(e,t,n).valueOf()}function mn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-pn:Date.UTC(e,t,n)}function gn(e,t){return t.erasAbbrRegex(e)}function bn(){var e,t,n,r,o,i=[],a=[],s=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)n=ue(c[e].name),r=ue(c[e].abbr),o=ue(c[e].narrow),a.push(n),i.push(r),s.push(o),l.push(n),l.push(r),l.push(o);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function yn(e,t){V(0,[e,e.length],0,t)}function vn(e,t,n,r,o){var i;return null==e?ze(this,r,o).year:(t>(i=qe(e,r,o))&&(t=i),En.call(this,e,t,n,r,o))}function En(e,t,n,r,o){var i=He(e,t,n,r,o),a=We(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),le("N",gn),le("NN",gn),le("NNN",gn),le("NNNN",function(e,t){return t.erasNameRegex(e)}),le("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),he(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?h(n).era=o:h(n).invalidEra=e}),le("y",te),le("yy",te),le("yyy",te),le("yyyy",te),le("yo",function(e,t){return t._eraYearOrdinalRegex||te}),he(["y","yy","yyy","yyyy"],ye),he(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),t[ye]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,o):parseInt(e,10)}),V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100}),yn("gggg","weekYear"),yn("ggggg","weekYear"),yn("GGGG","isoWeekYear"),yn("GGGGG","isoWeekYear"),le("G",ne),le("g",ne),le("GG",Z,U),le("gg",Z,U),le("GGGG",Q,z),le("gggg",Q,z),le("GGGGG",ee,q),le("ggggg",ee,q),me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=pe(e)}),me(["gg","GG"],function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)}),V("Q",0,"Qo","quarter"),le("Q",W),he("Q",function(e,t){t[ve]=3*(pe(e)-1)}),V("D",["DD",2],"Do","date"),le("D",Z,ae),le("DD",Z,U),le("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),he(["D","DD"],Ee),he("Do",function(e,t){t[Ee]=pe(e.match(Z)[0])});var _n=ke("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),le("DDD",K),le("DDDD",H),he(["DDD","DDDD"],function(e,t,n){n._dayOfYear=pe(e)}),V("m",["mm",2],0,"minute"),le("m",Z,se),le("mm",Z,U),he(["m","mm"],De);var Dn=ke("Minutes",!1);V("s",["ss",2],0,"second"),le("s",Z,se),le("ss",Z,U),he(["s","ss"],Ne);var Nn,wn,On=ke("Seconds",!1);for(V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return 10*this.millisecond()}),V(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),V(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),V(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),V(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),V(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),le("S",K,W),le("SS",K,U),le("SSS",K,H),Nn="SSSS";Nn.length<=9;Nn+="S")le(Nn,te);function xn(e,t){t[we]=pe(1e3*("0."+e))}for(Nn="S";Nn.length<=9;Nn+="S")he(Nn,xn);wn=ke("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var Sn=E.prototype;function In(e){return e}Sn.add=tn,Sn.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?_(n=arguments[0])||u(n)||rn(n)||c(n)||function(e){var t=o(e),n=!1;return t&&(n=0===e.filter(function(t){return!c(t)&&rn(e)}).length),t&&n}(n)||function(e){var t,n=i(e)&&!s(e),r=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=o.length;for(t=0;t<l;t+=1)r=r||a(e,o[t]);return n&&r}(n)||null==n?(e=arguments[0],t=void 0):function(e){var t,n=i(e)&&!s(e),r=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=r||a(e,o[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var l=e||Pt(),d=Ut(l,this).startOf("day"),p=r.calendarFormat(this,d)||"sameElse",f=t&&(S(t[p])?t[p].call(this,l):t[p]);return this.format(f||this.localeData().calendar(p,this,Pt(l)))},Sn.clone=function(){return new E(this)},Sn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Ut(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=$(t)){case"year":i=on(this,r)/12;break;case"month":i=on(this,r);break;case"quarter":i=on(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:de(i)},Sn.endOf=function(e){var t,n;if(void 0===(e=$(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mn:hn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dn-fn(t+(this._isUTC?0:this.utcOffset()*un),dn)-1;break;case"minute":t=this._d.valueOf(),t+=un-fn(t,un)-1;break;case"second":t=this._d.valueOf(),t+=cn-fn(t,cn)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},Sn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)},Sn.from=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Pt(e).isValid())?Jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.fromNow=function(e){return this.from(Pt(),e)},Sn.to=function(e,t){return this.isValid()&&(_(e)&&e.isValid()||Pt(e).isValid())?Jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Sn.toNow=function(e){return this.to(Pt(),e)},Sn.get=function(e){return S(this[e=$(e)])?this[e]():this},Sn.invalidAt=function(){return h(this).overflow},Sn.isAfter=function(e,t){var n=_(e)?e:Pt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Sn.isBefore=function(e,t){var n=_(e)?e:Pt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Sn.isBetween=function(e,t,n,r){var o=_(e)?e:Pt(e),i=_(t)?t:Pt(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},Sn.isSame=function(e,t){var n,r=_(e)?e:Pt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Sn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Sn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Sn.isValid=function(){return m(this)},Sn.lang=sn,Sn.locale=an,Sn.localeData=ln,Sn.max=Rt,Sn.min=Vt,Sn.parsingFlags=function(){return p({},h(this))},Sn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:j[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=B(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(S(this[e=$(e)]))return this[e](t);return this},Sn.startOf=function(e){var t,n;if(void 0===(e=$(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?mn:hn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fn(t+(this._isUTC?0:this.utcOffset()*un),dn);break;case"minute":t=this._d.valueOf(),t-=fn(t,un);break;case"second":t=this._d.valueOf(),t-=fn(t,cn)}return this._d.setTime(t),r.updateOffset(this,!0),this},Sn.subtract=nn,Sn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Sn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Sn.toDate=function(){return new Date(this.valueOf())},Sn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?F(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(n,"Z")):F(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Sn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Sn.toJSON=function(){return this.isValid()?this.toISOString():null},Sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Sn.unix=function(){return Math.floor(this.valueOf()/1e3)},Sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Sn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Sn.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Sn.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Sn.eraYear=function(){var e,t,n,o,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,o=this.clone().startOf("day").valueOf(),i[e].since<=o&&o<=i[e].until||i[e].until<=o&&o<=i[e].since)return(this.year()-r(i[e].since).year())*n+i[e].offset;return this.year()},Sn.year=Ce,Sn.isLeapYear=function(){return be(this.year())},Sn.weekYear=function(e){return vn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},Sn.isoWeekYear=function(e){return vn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Sn.quarter=Sn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Sn.month=Be,Sn.daysInMonth=function(){return Ae(this.year(),this.month())},Sn.week=Sn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Sn.isoWeek=Sn.isoWeeks=function(e){var t=ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Sn.weeksInYear=function(){var e=this.localeData()._week;return qe(this.year(),e.dow,e.doy)},Sn.weeksInWeekYear=function(){var e=this.localeData()._week;return qe(this.weekYear(),e.dow,e.doy)},Sn.isoWeeksInYear=function(){return qe(this.year(),1,4)},Sn.isoWeeksInISOWeekYear=function(){return qe(this.isoWeekYear(),1,4)},Sn.date=_n,Sn.day=Sn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=Te(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Sn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Sn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Sn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Sn.hour=Sn.hours=lt,Sn.minute=Sn.minutes=Dn,Sn.second=Sn.seconds=On,Sn.millisecond=Sn.milliseconds=wn,Sn.utcOffset=function(e,t,n){var o,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Wt(oe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=Ht(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),i!==e&&(!t||this._changeInProgress?en(this,Jt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Ht(this)},Sn.utc=function(e){return this.utcOffset(0,e)},Sn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ht(this),"m")),this},Sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Wt(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Sn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Pt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Sn.isUtc=zt,Sn.isUTC=zt,Sn.zoneAbbr=function(){return this._isUTC?"UTC":""},Sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Sn.dates=N("dates accessor is deprecated. Use date instead.",_n),Sn.months=N("months accessor is deprecated. Use month instead",Be),Sn.years=N("years accessor is deprecated. Use year instead",Ce),Sn.zone=N("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Sn.isDSTShifted=N("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=Mt(t))._a?(e=t._isUTC?f(t._a):Pt(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0;for(n=0;n<r;n++)pe(e[n])!==pe(t[n])&&i++;return i+o}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var Cn=C.prototype;function kn(e,t,n,r){var o=bt(),i=f().set(r,t);return o[n](i,e)}function Tn(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return kn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=kn(e,r,n,"month");return o}function Mn(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var o,i=bt(),a=e?i._week.dow:0,s=[];if(null!=n)return kn(t,(n+a)%7,r,"day");for(o=0;o<7;o++)s[o]=kn(t,(o+a)%7,r,"day");return s}Cn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return S(r)?r.call(t,n):r},Cn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(T).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},Cn.invalidDate=function(){return this._invalidDate},Cn.ordinal=function(e){return this._ordinal.replace("%d",e)},Cn.preparse=In,Cn.postformat=In,Cn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return S(o)?o(e,t,n,r):o.replace(/%d/i,e)},Cn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return S(n)?n(t):n.replace(/%s/i,t)},Cn.set=function(e){var t,n;for(n in e)a(e,n)&&(S(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Cn.eras=function(e,t){var n,o,i,a=this._eras||bt("en")._eras;for(n=0,o=a.length;n<o;++n)switch("string"==typeof a[n].since&&(i=r(a[n].since).startOf("day"),a[n].since=i.valueOf()),typeof a[n].until){case"undefined":a[n].until=Infinity;break;case"string":i=r(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf()}return a},Cn.erasParse=function(e,t,n){var r,o,i,a,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(i=l[r].name.toUpperCase(),a=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[r];break;case"NNNN":if(i===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([i,a,s].indexOf(e)>=0)return l[r]},Cn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},Cn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||bn.call(this),e?this._erasAbbrRegex:this._erasRegex},Cn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||bn.call(this),e?this._erasNameRegex:this._erasRegex},Cn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||bn.call(this),e?this._erasNarrowRegex:this._erasRegex},Cn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Re).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},Cn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Re.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Cn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Ye.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Cn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ge.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Le),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Cn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ge.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Cn.week=function(e){return ze(e,this._week.dow,this._week.doy).week},Cn.firstDayOfYear=function(){return this._week.doy},Cn.firstDayOfWeek=function(){return this._week.dow},Cn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ze(n,this._week.dow):e?n[e.day()]:n},Cn.weekdaysMin=function(e){return!0===e?Ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Cn.weekdaysShort=function(e){return!0===e?Ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Cn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return nt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Cn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Cn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Cn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Cn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Cn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},mt("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===pe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=N("moment.lang is deprecated. Use moment.locale instead.",mt),r.langData=N("moment.langData is deprecated. Use moment.localeData instead.",bt);var An=Math.abs;function Pn(e,t,n,r){var o=Jt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Vn(e){return e<0?Math.floor(e):Math.ceil(e)}function Rn(e){return 4800*e/146097}function Fn(e){return 146097*e/4800}function Ln(e){return function(){return this.as(e)}}var Yn=Ln("ms"),$n=Ln("s"),Bn=Ln("m"),Gn=Ln("h"),jn=Ln("d"),Wn=Ln("w"),Un=Ln("M"),Hn=Ln("Q"),zn=Ln("y"),qn=Yn;function Zn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jn=Zn("milliseconds"),Xn=Zn("seconds"),Kn=Zn("minutes"),Qn=Zn("hours"),er=Zn("days"),tr=Zn("months"),nr=Zn("years"),rr=Math.round,or={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ir(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var ar=Math.abs;function sr(e){return(e>0)-(e<0)||+e}function lr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,i,a,s,l=ar(this._milliseconds)/1e3,c=ar(this._days),u=ar(this._months),d=this.asSeconds();return d?(e=de(l/60),t=de(e/60),l%=60,e%=60,n=de(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",i=sr(this._months)!==sr(d)?"-":"",a=sr(this._days)!==sr(d)?"-":"",s=sr(this._milliseconds)!==sr(d)?"-":"",o+"P"+(n?i+n+"Y":"")+(u?i+u+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var cr=Yt.prototype;return cr.isValid=function(){return this._isValid},cr.abs=function(){var e=this._data;return this._milliseconds=An(this._milliseconds),this._days=An(this._days),this._months=An(this._months),e.milliseconds=An(e.milliseconds),e.seconds=An(e.seconds),e.minutes=An(e.minutes),e.hours=An(e.hours),e.months=An(e.months),e.years=An(e.years),this},cr.add=function(e,t){return Pn(this,e,t,1)},cr.subtract=function(e,t){return Pn(this,e,t,-1)},cr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=$(e))||"quarter"===e||"year"===e)switch(n=this._months+Rn(t=this._days+r/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Fn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},cr.asMilliseconds=Yn,cr.asSeconds=$n,cr.asMinutes=Bn,cr.asHours=Gn,cr.asDays=jn,cr.asWeeks=Wn,cr.asMonths=Un,cr.asQuarters=Hn,cr.asYears=zn,cr.valueOf=qn,cr._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*Vn(Fn(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=de(i/1e3),l.seconds=e%60,t=de(e/60),l.minutes=t%60,n=de(t/60),l.hours=n%24,a+=de(n/24),s+=o=de(Rn(a)),a-=Vn(Fn(o)),r=de(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},cr.clone=function(){return Jt(this)},cr.get=function(e){return e=$(e),this.isValid()?this[e+"s"]():NaN},cr.milliseconds=Jn,cr.seconds=Xn,cr.minutes=Kn,cr.hours=Qn,cr.days=er,cr.weeks=function(){return de(this.days()/7)},cr.months=tr,cr.years=nr,cr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,i=or;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(i=Object.assign({},or,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=function(e,t,n,r){var o=Jt(e).abs(),i=rr(o.as("s")),a=rr(o.as("m")),s=rr(o.as("h")),l=rr(o.as("d")),c=rr(o.as("M")),u=rr(o.as("w")),d=rr(o.as("y")),p=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||a<=1&&["m"]||a<n.m&&["mm",a]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(p=p||u<=1&&["w"]||u<n.w&&["ww",u]),(p=p||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,p[3]=+e>0,p[4]=r,ir.apply(null,p)}(this,!o,i,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)},cr.toISOString=lr,cr.toString=lr,cr.toJSON=lr,cr.locale=an,cr.localeData=ln,cr.toIsoString=N("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lr),cr.lang=sn,V("X",0,0,"unix"),V("x",0,0,"valueOf"),le("x",ne),le("X",/[+-]?\d+(\.\d{1,3})?/),he("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),he("x",function(e,t,n){n._d=new Date(pe(e))}),r.version="2.30.1",t=Pt,r.fn=Sn,r.min=function(){return Ft("isBefore",[].slice.call(arguments,0))},r.max=function(){return Ft("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return Pt(1e3*e)},r.months=function(e,t){return Tn(e,t,"months")},r.isDate=u,r.locale=mt,r.invalid=g,r.duration=Jt,r.isMoment=_,r.weekdays=function(e,t,n){return Mn(e,t,n,"weekdays")},r.parseZone=function(){return Pt.apply(null,arguments).parseZone()},r.localeData=bt,r.isDuration=$t,r.monthsShort=function(e,t){return Tn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return Mn(e,t,n,"weekdaysMin")},r.defineLocale=gt,r.updateLocale=function(e,t){if(null!=t){var n,r,o=ct;null!=ut[e]&&null!=ut[e].parentLocale?ut[e].set(I(ut[e]._config,t)):(null!=(r=ht(e))&&(o=r._config),t=I(o,t),null==r&&(t.abbr=e),(n=new C(t)).parentLocale=ut[e],ut[e]=n),mt(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?(ut[e]=ut[e].parentLocale,e===mt()&&mt(e)):null!=ut[e]&&delete ut[e]);return ut[e]},r.locales=function(){return w(ut)},r.weekdaysShort=function(e,t,n){return Mn(e,t,n,"weekdaysShort")},r.normalizeUnits=$,r.relativeTimeRounding=function(e){return void 0===e?rr:"function"==typeof e&&(rr=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==or[e]&&(void 0===t?or[e]:(or[e]=t,"s"===e&&(or.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=Sn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}),E=function(e,t){return e.find(function(e){return e.name===t})},_=function(e){var n=v(),r=n.format("YYYY-MM-DD"),o=t.normalizeShifts(e,n),i=t.getCurrentShift(n,o);if(i){var a=E(e,i.name);if(a)return{date:r,shift:a}}var s=o.find(function(e){return e.startedAt.isAfter(n)});if(s){var l=E(e,s.name);if(l)return{date:r,shift:l}}var c=v(n).add(1,"day").startOf("day"),u=t.normalizeShifts(e,c);if(u.length>0){var d=E(e,u[0].name);if(d)return{date:c.format("YYYY-MM-DD"),shift:d}}return null},D="1.0.0",N=function(t){var n,a=t.data,s=t.formProps,l=e.useState("1"),c=l[0],u=l[1],p=r.useTranslation().t;return d.default.createElement(o.TabContext,{value:c},d.default.createElement(i.Box,{sx:{borderBottom:1,borderColor:"divider"}},d.default.createElement(o.TabList,{onChange:function(e,t){u(t)}},d.default.createElement(i.Tab,{label:p("filters"),value:"1"}),d.default.createElement(i.Tab,{label:p("advanced"),value:"2"}))),d.default.createElement(o.TabPanel,{value:"1"},d.default.createElement(i.FormControl,{fullWidth:!0},d.default.createElement(i.InputLabel,{id:"department-label"},p("department")),d.default.createElement(i.Select,{name:"departmentId",labelId:"department-label",variant:"outlined",value:null!=(n=s.values.departmentId)?n:"",onChange:s.handleChange,fullWidth:!0},d.default.createElement(i.MenuItem,{value:""},p("allDepartments")),a.departments.map(function(e){return d.default.createElement(i.MenuItem,{key:e.id,value:e.id},e.name)})))),d.default.createElement(o.TabPanel,{value:"2"},d.default.createElement(i.FormControl,{fullWidth:!0},d.default.createElement(i.InputLabel,{id:"refresh-interval-label"},p("refreshInterval")),d.default.createElement(i.Select,{name:"refreshInterval",labelId:"refresh-interval-label",variant:"outlined",value:s.values.refreshInterval,onChange:s.handleChange,fullWidth:!0},d.default.createElement(i.MenuItem,{value:15},"15s"),d.default.createElement(i.MenuItem,{value:30},"30s"),d.default.createElement(i.MenuItem,{value:60},"60s")))))};function w(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var O=/* @__PURE__ */(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),x=()=>Math.random().toString(36).substring(7).split("").join("."),S={INIT:`@@redux/INIT${x()}`,REPLACE:`@@redux/REPLACE${x()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${x()}`};function I(e){let t=typeof e;return"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(t=function(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}(e)),t}function C(e,t,n){if("function"!=typeof e)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(2):`Expected the root reducer to be a function. Instead, received: '${I(e)}'`);if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(1):`Expected the enhancer to be a function. Instead, received: '${I(n)}'`);return n(C)(e,t)}let r=e,o=t,i=/* @__PURE__ */new Map,a=i,s=0,l=!1;function c(){a===i&&(a=/* @__PURE__ */new Map,i.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(e){if("function"!=typeof e)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(4):`Expected the listener to be a function. Instead, received: '${I(e)}'`);if(l)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,c(),a.delete(n),i=null}}}function p(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(7):`Actions must be plain objects. Instead, the actual type was: '${I(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(17):`Action "type" property must be a string. Instead, the actual type was: '${I(e.type)}'. Value was: '${e.type}' (stringified)`);if(l)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(9):"Reducers may not dispatch actions.");try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}return p({type:S.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(10):`Expected the nextReducer to be a function. Instead, received: '${I(e)}`);r=e,p({type:S.REPLACE})},[O]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(11):`Expected the observer to be an object. Instead, received: '${I(t)}'`);function n(){t.next&&t.next(u())}return n(),{unsubscribe:e(n)}},[O](){return this}}}}}function k(e,t){return function(...n){return t(e.apply(this,n))}}function T(e,t){if("function"==typeof e)return k(e,t);if("object"!=typeof e||null===e)throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(16):`bindActionCreators expected an object or a function, but instead received: '${I(e)}'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=k(o,t))}return n}function M(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}var A="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},P=d.default.useSyncExternalStore,V=d.default.useRef,R=d.default.useEffect,F=d.default.useMemo,L=d.default.useDebugValue,Y={useSyncExternalStoreWithSelector:function(e,t,n,r,o){var i=V(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=F(function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&a.hasValue){var t=a.value;if(o(t,e))return s=t}return s=e}if(t=s,A(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(i=e,t):(i=e,s=n)}var i,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,o]);var s=P(e,i[0],i[1]);return R(function(){a.hasValue=!0,a.value=s},[s]),L(s),s}},$=y(function(e,t){"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=d.default,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=o(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=a(function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&p.hasValue){var t=p.value;if(u(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,o=a)}var r,o,i=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,l,c,u]);var f=r(e,d[0],d[1]);return i(function(){p.hasValue=!0,p.value=f},[f]),s(f),f},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()});y(function(e){e.exports="production"==='{NODE_ENV:"production"}'.NODE_ENV?Y:$});var B=/* @__PURE__ */p.version.startsWith("19"),G=/* @__PURE__ */Symbol.for(B?"react.transitional.element":"react.element"),j=/* @__PURE__ */Symbol.for("react.portal"),W=/* @__PURE__ */Symbol.for("react.fragment"),U=/* @__PURE__ */Symbol.for("react.strict_mode"),H=/* @__PURE__ */Symbol.for("react.profiler"),z=/* @__PURE__ */Symbol.for("react.consumer"),q=/* @__PURE__ */Symbol.for("react.context"),Z=/* @__PURE__ */Symbol.for("react.forward_ref"),J=/* @__PURE__ */Symbol.for("react.suspense"),X=/* @__PURE__ */Symbol.for("react.suspense_list"),K=/* @__PURE__ */Symbol.for("react.memo"),Q=/* @__PURE__ */Symbol.for("react.lazy"),ee=/* @__PURE__ */Symbol.for("react.offscreen"),te=/* @__PURE__ */Symbol.for("react.client.reference"),ne=Z,re=K;function oe(e){return"string"==typeof e||"function"==typeof e||e===W||e===H||e===U||e===J||e===X||e===ee||"object"==typeof e&&null!==e&&(e.$$typeof===Q||e.$$typeof===K||e.$$typeof===q||e.$$typeof===z||e.$$typeof===Z||e.$$typeof===te||void 0!==e.getModuleId)}function ie(e){if("object"==typeof e&&null!==e){const{$$typeof:t}=e;switch(t){case G:switch(e=e.type){case W:case H:case U:case J:case X:return e;default:switch(e=e&&e.$$typeof){case q:case Z:case Q:case K:case z:return e;default:return t}}case j:return t}}}function ae(e){return B?ie(e)===z:ie(e)===q}function se(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function le(e,t){if(!e)throw new Error(`Unexpected value for ${t} in connect.`);"mapStateToProps"!==t&&"mapDispatchToProps"!==t||Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||se(`The selector for ${t} of connect did not specify a value for dependsOnOwnProps.`)}function ce(e,t,n){(function(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n})(e)||se(`${n}() in ${t} must return a plain object. Instead received ${e}.`)}function ue(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function de(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function pe(e,t){return function(n,{displayName:r}){const o=function(e,t){return o.mapToProps(e,o.dependsOnOwnProps?t:void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(n,i){o.mapToProps=e,o.dependsOnOwnProps=de(e);let a=o(n,i);return"function"==typeof a&&(o.mapToProps=a,o.dependsOnOwnProps=de(a),a=o(n,i)),"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&ce(a,r,t),a},o}}function fe(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function he(e,t,n){return{...n,...e,...t}}var me={notify(){},get:()=>[]};function ge(e,t){let n,r=me,o=0,i=!1;function a(){c.onStateChange&&c.onStateChange()}function s(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){(()=>{let t=e;for(;t;)t.callback(),t=t.next})()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function l(){o--,n&&0===o&&(n(),n=void 0,r.clear(),r=me)}const c={addNestedSub:function(e){s();const t=r.subscribe(e);let n=!1;return()=>{n||(n=!0,t(),l())}},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:a,isSubscribed:function(){return i},trySubscribe:function(){i||(i=!0,s())},tryUnsubscribe:function(){i&&(i=!1,l())},getListeners:()=>r};return c}var be=/* @__PURE__ */(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),ye=/* @__PURE__ */(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),ve=/* @__PURE__ */(()=>be||ye?p.useLayoutEffect:p.useEffect)();function Ee(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function _e(e,t){if(Ee(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Ee(e[n[r]],t[n[r]]))return!1;return!0}var De={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ne={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},we={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Oe={[ne]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[re]:we};function xe(e){return function(e){return ie(e)===K}(e)?we:Oe[e.$$typeof]||De}var Se=Object.defineProperty,Ie=Object.getOwnPropertyNames,Ce=Object.getOwnPropertySymbols,ke=Object.getOwnPropertyDescriptor,Te=Object.getPrototypeOf,Me=Object.prototype;function Ae(e,t){if("string"!=typeof t){if(Me){const n=Te(t);n&&n!==Me&&Ae(e,n)}let n=Ie(t);Ce&&(n=n.concat(Ce(t)));const r=xe(e),o=xe(t);for(let i=0;i<n.length;++i){const a=n[i];if(!(Ne[a]||o&&o[a]||r&&r[a])){const n=ke(t,a);try{Se(e,a,n)}catch(e){}}}}return e}var Pe=/* @__PURE__ */Symbol.for("react-redux-context"),Ve="undefined"!=typeof globalThis?globalThis:{};function Re(){if(!p.createContext)return{};const e=Ve[Pe]??=/* @__PURE__ */new Map;let t=e.get(p.createContext);return t||(t=p.createContext(null),"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(t.displayName="ReactRedux"),e.set(p.createContext,t)),t}var Fe=/* @__PURE__ */Re(),Le=[null,null];function Ye(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function $e(e,t){return e===t}var Be=!1,Ge=function(e,t,n,{pure:r,areStatesEqual:o=$e,areOwnPropsEqual:i=_e,areStatePropsEqual:a=_e,areMergedPropsEqual:s=_e,forwardRef:l=!1,context:c=Fe}={}){"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(void 0===r||Be||(Be=!0,se('The `pure` option has been removed. `connect` is now always a "pure/memoized" component')));const u=c,d=function(e){return e?"function"==typeof e?pe(e,"mapStateToProps"):fe(e,"mapStateToProps"):ue(()=>({}))}(e),f=function(e){return e&&"object"==typeof e?ue(t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t)):e?"function"==typeof e?pe(e,"mapDispatchToProps"):fe(e,"mapDispatchToProps"):ue(e=>({dispatch:e}))}(t),h=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,a,s){const l=e(t,a,s);return i?r(l,o)||(o=l):(i=!0,o=l,"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&ce(o,n,"mergeProps")),o}}}(e):fe(e,"mergeProps"):()=>he}(n),m=Boolean(e);return e=>{if("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&!/* @__PURE__ */oe(e))throw new Error(`You must pass a component to the function returned by connect. Instead received ${(e=>{try{return JSON.stringify(e)}catch(t){return String(e)}})(e)}`);const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function c(t){const[o,i,a]=p.useMemo(()=>{const{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),s=p.useMemo(()=>{let e=u;if(o?.Consumer&&"production"!=='{NODE_ENV:"production"}'.NODE_ENV){if(!/* @__PURE__ */ae(
|
|
2
|
+
/* @__PURE__ */
|
|
3
|
+
p.createElement(o.Consumer,null)))throw new Error("You must pass a valid React context consumer as `props.context`");e=o}return e},[o,u]),l=p.useContext(s),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),d=Boolean(l)&&Boolean(l.store);if("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&!c&&!d)throw new Error(`Could not find "store" in the context of "${n}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${n} in connect options.`);const f=c?t.store:l.store,h=d?l.getServerState:f.getState,g=p.useMemo(()=>function(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),a=n(e,o),s=r(e,o);return"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&function(e,t,n){le(e,"mapStateToProps"),le(t,"mapDispatchToProps"),le(n,"mergeProps")}(i,a,s),function(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let s,l,c,u,d,p=!1;return function(f,h){return p?function(p,f){const h=!i(f,l),m=!o(p,s,f,l);return s=p,l=f,h&&m?(c=e(s,l),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):h?(e.dependsOnOwnProps&&(c=e(s,l)),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):m?function(){const t=e(s,l),r=!a(t,c);return c=t,r&&(d=n(c,u,l)),d}():d}(f,h):(s=f,l=h,c=e(s,l),u=t(r,l),d=n(c,u,l),p=!0,d)}}(i,a,s,e,o)}(f.dispatch,r),[f]),[b,y]=p.useMemo(()=>{if(!m)return Le;const e=ge(f,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[f,c,l]),v=p.useMemo(()=>c?l:{...l,subscription:b},[c,l,b]),E=p.useRef(void 0),_=p.useRef(a),D=p.useRef(void 0),N=p.useRef(!1),w=p.useRef(!1),O=p.useRef(void 0);ve(()=>(w.current=!0,()=>{w.current=!1}),[]);const x=p.useMemo(()=>()=>D.current&&a===_.current?D.current:g(f.getState(),a),[f,a]),S=p.useMemo(()=>e=>b?function(e,t,n,r,o,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,p=null;const f=()=>{if(d||!s.current)return;const e=t.getState();let n,f;try{n=r(e,o.current)}catch(e){f=e,p=e}f||(p=null),n===i.current?a.current||c():(i.current=n,l.current=n,a.current=!0,u())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}(m,f,b,g,_,E,N,w,D,y,e):()=>{},[b]);var I,C;let k;I=Ye,C=[_,E,N,a,D,y],ve(()=>I(...C),void 0);try{k=p.useSyncExternalStore(S,x,h?()=>g(h(),a):x)}catch(e){throw O.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${O.current.stack}\n\n`),e}ve(()=>{O.current=void 0,D.current=void 0,E.current=k});const T=p.useMemo(()=>
|
|
4
|
+
/* @__PURE__ */p.createElement(e,{...k,ref:i}),[i,e,k]);return p.useMemo(()=>m?/* @__PURE__ */p.createElement(s.Provider,{value:v},T):T,[s,T,v])}const g=p.memo(c);if(g.WrappedComponent=e,g.displayName=c.displayName=n,l){const t=p.forwardRef(function(e,t){/* @__PURE__ */
|
|
5
|
+
return p.createElement(g,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,/* @__PURE__ */Ae(t,e)}/* @__PURE__ */
|
|
6
|
+
return Ae(g,e)}},je=function(e){const{children:t,context:n,serverState:r,store:o}=e,i=p.useMemo(()=>{const t=ge(o),n={store:o,subscription:t,getServerState:r?()=>r:void 0};if("production"==='{NODE_ENV:"production"}'.NODE_ENV)return n;{const{identityFunctionCheck:t="once",stabilityCheck:r="once"}=e;/* @__PURE__ */
|
|
7
|
+
return Object.assign(n,{stabilityCheck:r,identityFunctionCheck:t})}},[o,r]),a=p.useMemo(()=>o.getState(),[o]);return ve(()=>{const{subscription:e}=i;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==o.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[i,a]),/* @__PURE__ */p.createElement((n||Fe).Provider,{value:i},t)},We="production"==='{NODE_ENV:"production"}'.NODE_ENV,Ue="Invariant failed";function He(e,t){if(!e){if(We)throw new Error(Ue);var n="function"==typeof t?t():t,r=n?"".concat(Ue,": ").concat(n):Ue;throw new Error(r)}}var ze=function(e){var t=e.top,n=e.right,r=e.bottom,o=e.left;return{top:t,right:n,bottom:r,left:o,width:n-o,height:r-t,x:o,y:t,center:{x:(n+o)/2,y:(r+t)/2}}},qe=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Ze=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Je={top:0,right:0,bottom:0,left:0},Xe=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Je:n,o=e.border,i=void 0===o?Je:o,a=e.padding,s=void 0===a?Je:a,l=ze(qe(t,r)),c=ze(Ze(t,i)),u=ze(Ze(c,s));return{marginBox:l,borderBox:ze(t),paddingBox:c,contentBox:u,margin:r,border:i,padding:s}},Ke=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?He(!1,"Could not parse value [raw: "+e+", without suffix: "+t+"]"):He(!1)),n},Qe=function(e,t){var n,r,o={top:(n=e.borderBox).top+(r=t).y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x};return Xe({borderBox:o,border:e.border,margin:e.margin,padding:e.padding})},et=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Qe(e,t)},tt=function(e,t){var n={top:Ke(t.marginTop),right:Ke(t.marginRight),bottom:Ke(t.marginBottom),left:Ke(t.marginLeft)},r={top:Ke(t.paddingTop),right:Ke(t.paddingRight),bottom:Ke(t.paddingBottom),left:Ke(t.paddingLeft)},o={top:Ke(t.borderTopWidth),right:Ke(t.borderRightWidth),bottom:Ke(t.borderBottomWidth),left:Ke(t.borderLeftWidth)};return Xe({borderBox:e,margin:n,padding:r,border:o})},nt=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return tt(t,n)},rt=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];t=o,n||(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},r};function ot(){return ot=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},ot.apply(null,arguments)}const it="production"==='{NODE_ENV:"production"}'.NODE_ENV,at=/[ \t]{2,}/g,st=/^[ \t]*/gm,lt=e=>e.replace(at," ").replace(st,"").trim(),ct=e=>lt(`\n %c@hello-pangea/dnd\n\n %c${lt(e)}\n\n %c👷 This is a development only message. It will be removed in production builds.\n`);function ut(e,t){it||"undefined"!=typeof window&&window["__@hello-pangea/dnd-disable-dev-warnings"]||console[e](...(e=>[ct(e),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"])(t))}const dt=ut.bind(null,"warn"),pt=ut.bind(null,"error");function ft(){}function ht(e,t,n){const r=t.map(t=>{const r=function(e,t){return{...e,...t}}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}const mt="production"==='{NODE_ENV:"production"}'.NODE_ENV,gt="Invariant failed";class bt extends Error{}function yt(e,t){throw new bt(mt?gt:`${gt}: ${t||""}`)}bt.prototype.toString=function(){return this.message};class vt extends d.default.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=ft,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&(t.tryAbort(),"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("\n An error was caught by our window 'error' event listener while a drag was occurring.\n The active drag has been aborted.\n "));const n=e.error;n instanceof bt&&(e.preventDefault(),"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&pt(n.message))},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=ht(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(e instanceof bt)return"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&pt(e.message),void this.setState({});throw e}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Et=e=>e+1,_t=(e,t)=>{const n=e.droppableId===t.droppableId,r=Et(e.index),o=Et(t.index);return n?`\n You have moved the item from position ${r}\n to position ${o}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${o}\n `},Dt=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,Nt=e=>`\n The item has returned to its starting position\n of ${Et(e.index)}\n`,wt=e=>`\n You have lifted an item in position ${Et(e.source.index)}\n`,Ot=e=>{const t=e.destination;if(t)return _t(e.source,t);const n=e.combine;return n?Dt(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},xt=e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${Nt(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${_t(e.source,t)}\n `:n?`\n You have dropped the item.\n ${Dt(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${Nt(e.source)}\n `};function St(e,t){return e===t||!(!Number.isNaN(e)||!Number.isNaN(t))}function It(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!St(e[n],t[n]))return!1;return!0}function Ct(t,n){const r=e.useState(()=>({inputs:n,result:t()}))[0],o=e.useRef(!0),i=e.useRef(r),a=o.current||Boolean(n&&i.current.inputs&&It(n,i.current.inputs))?i.current:{inputs:n,result:t()};return e.useEffect(()=>{o.current=!1,i.current=a},[a]),a.result}function kt(e,t){return Ct(()=>e,t)}const Tt={x:0,y:0},Mt=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),At=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Pt=(e,t)=>e.x===t.x&&e.y===t.y,Vt=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Rt=(e,t,n=0)=>"x"===e?{x:t,y:n}:{x:n,y:t},Ft=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Lt=(e,t)=>Math.min(...t.map(t=>Ft(e,t))),Yt=e=>t=>({x:e(t.x),y:e(t.y)}),$t=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Bt=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Gt=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=ze({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):ze(e);var jt=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=((e,t)=>t?$t(e,t.scroll.diff.displacement):e)(e.marginBox,r),i=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(o,n,t);return{page:e,withPlaceholder:t,active:Gt(i,r)}},Wt=(e,t)=>{e.frame||yt();const n=e.frame,r=At(t,n.scroll.initial),o=Vt(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},a=jt({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function Ut(e,t=It){let n=null;function r(...r){if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;const o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}const Ht=Ut(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),zt=Ut(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),qt=Ut(e=>Object.values(e)),Zt=Ut(e=>Object.values(e));var Jt=Ut((e,t)=>{const n=Zt(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index);return n});function Xt(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Kt(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Qt=Ut((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),en=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const tn={point:Tt,value:0},nn={invisible:{},visible:{},all:[]},rn={displaced:nn,displacedBy:tn,at:null};var on=(e,t)=>n=>e<=n&&n<=t,an=e=>{const t=on(e.top,e.bottom),n=on(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const o=t(r.top)||t(r.bottom),i=n(r.left)||n(r.right);if(o&&i)return!0;const a=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return!(!a||!s)||a&&i||s&&o}},sn=e=>{const t=on(e.top,e.bottom),n=on(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const ln={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},cn={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},un=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?((e,t)=>$t(e,t.frame?t.frame.scroll.diff.displacement:Tt))(e,t):e;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(i,t,o)&&((e,t,n)=>n(t)(e))(i,n,o)},dn=e=>un({...e,isVisibleThroughFrameFn:sn});function pn({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(e,a){const s=function(e,t){return ze(qe(e.page.marginBox,{top:t.point.y,right:0,bottom:0,left:t.point.x}))}(a,n),l=a.descriptor.id;var c;if(e.all.push(l),c={target:s,destination:t,viewport:r,withDroppableDisplacement:!0},!un({...c,isVisibleThroughFrameFn:an}))return e.invisible[a.descriptor.id]=!0,e;const u=((e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return!i||i.shouldAnimate})(l,i,o);return e.visible[l]={draggableId:l,shouldAnimate:u},e},{all:[],visible:{},invisible:{}})}function fn({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(e,{inHomeList:t});return{displaced:nn,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function hn({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:a,forceShouldAnimate:s}){const l=en(e,n);if(null==a)return fn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const c=t.find(e=>e.descriptor.index===a);if(!c)return fn({insideDestination:t,inHomeList:l,displacedBy:o,destination:n});const u=Qt(e,t),d=t.indexOf(c);return{displaced:pn({afterDragging:u.slice(d),destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:a}}}}function mn(e,t){return Boolean(t.effected[e])}const gn=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,bn=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,yn=({axis:e,moveRelativeTo:t,isMoving:n})=>Rt(e.line,t.marginBox[e.end]+gn(e,n),bn(e,t.marginBox,n)),vn=({axis:e,moveRelativeTo:t,isMoving:n})=>Rt(e.line,t.marginBox[e.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(e,n),bn(e,t.marginBox,n));var En=(e,t)=>{const n=e.frame;return n?Mt(t,n.scroll.diff.displacement):t},_n=e=>{const t=(({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,a=e.at;return n&&a?"REORDER"===a.type?(({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=Jt(r.descriptor.id,n),a=t.page,s=r.axis;if(!i.length)return(({axis:e,moveInto:t,isMoving:n})=>Rt(e.line,t.contentBox[e.start]+gn(e,n),bn(e,t.contentBox,n)))({axis:s,moveInto:r.page,isMoving:a});const{displaced:l,displacedBy:c}=e,u=l.all[0];if(u){const e=n[u];if(mn(u,o))return vn({axis:s,moveRelativeTo:e.page,isMoving:a});const t=Qe(e.page,c.point);return vn({axis:s,moveRelativeTo:t,isMoving:a})}const d=i[i.length-1];if(d.descriptor.id===t.descriptor.id)return a.borderBox.center;if(mn(d.descriptor.id,o)){const e=Qe(d.page,Vt(o.displacedBy.point));return yn({axis:s,moveRelativeTo:e,isMoving:a})}return yn({axis:s,moveRelativeTo:d.page,isMoving:a})})({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):(({afterCritical:e,impact:t,draggables:n})=>{const r=Kt(t);r||yt();const o=r.draggableId,i=n[o].page.borderBox.center,a=(({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=Boolean(e.visible[n]||e.invisible[n]);return mn(n,t)?o?Tt:Vt(r.point):o?r.point:Tt})({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return Mt(i,a)})({impact:e,draggables:r,afterCritical:o}):i})(e),n=e.droppable;return n?En(n,t):t},Dn=(e,t)=>{const n=At(t,e.scroll.initial),r=Vt(n);return{frame:ze({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function Nn(e,t){return e.map(e=>t[e])}var wn=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=((e,t)=>Mt(e.scroll.diff.displacement,t))(n,e),o=At(r,t.page.borderBox.center);return Mt(t.client.borderBox.center,o)},On=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const a=At(n,e.page.borderBox.center),s={target:$t(e.page.borderBox,a),destination:t,withDroppableDisplacement:o,viewport:r};return i?(e=>{return un({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=on(e.top,e.bottom),r=on(e.left,e.right);return e=>t===ln?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(s):dn(s)};const xn=e=>{const t=e.subject.active;return t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot get clipped area from droppable"):yt()),t},Sn=(e,t)=>{const n=e.page.borderBox.center;return mn(e.descriptor.id,t)?At(n,t.displacedBy.point):n},In=(e,t)=>{const n=e.page.borderBox;return mn(e.descriptor.id,t)?$t(n,Vt(t.displacedBy.point)):n};var Cn=Ut(function(e,t){const n=t[e.line];return{value:n,point:Rt(e.line,n)}});const kn=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),Tn=(e,t,n)=>{const r=e.frame;en(t,e)&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Should not add placeholder space to home list"):yt()),e.subject.withPlaceholder&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot add placeholder size to a subject when it already has one"):yt());const o=Cn(e.axis,t.displaceBy).point,i=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return Rt(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],i=Jt(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-o;return i<=0?null:Rt(r.line,i)})(e,o,n),a={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=jt({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:t}}const s=i?Mt(r.scroll.max,i):r.scroll.max,l=kn(r,s),c=jt({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var Mn=e=>{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};function An(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Pn(e){const t=on(e.top,e.bottom),n=on(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}const Vn=(e,t)=>ze($t(e,t));function Rn({displaced:e,id:t}){return Boolean(e.visible[t]||e.invisible[t])}var Fn=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:o,viewport:i,afterCritical:a})=>{const s=Vn(t.page.borderBox,e),l=function({pageBorderBox:e,draggable:t,droppables:n}){const r=qt(n).filter(t=>{if(!t.isEnabled)return!1;const n=t.subject.active;if(!n)return!1;if(!((r=e).left<(o=n).right&&r.right>o.left&&r.top<o.bottom&&r.bottom>o.top))return!1;var r,o;if(Pn(n)(e.center))return!0;const i=t.axis,a=n.center[i.crossAxisLine],s=e[i.crossAxisStart],l=e[i.crossAxisEnd],c=on(n[i.crossAxisStart],n[i.crossAxisEnd]),u=c(s),d=c(l);return!u&&!d||(u?s<a:l>a)});return r.length?1===r.length?r[0].descriptor.id:function({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(t=>{const n=t.axis,o=Rt(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:Ft(r,o)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:e,draggable:t,candidates:r}):null}({pageBorderBox:s,draggable:t,droppables:r});if(!l)return rn;const c=r[l],u=Jt(c.descriptor.id,n),d=((e,t)=>{const n=e.frame;return n?Vn(t,n.scroll.diff.value):t})(c,s);return(({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:o,afterCritical:i})=>{if(!r.isCombineEnabled)return null;const a=r.axis,s=Cn(r.axis,e.displaceBy),l=s.value,c=t[a.start],u=t[a.end],d=Qt(e,o).find(e=>{const t=e.descriptor.id,r=e.page.borderBox,o=r[a.size]/4,s=mn(t,i),d=Rn({displaced:n.displaced,id:t});return s?d?u>r[a.start]+o&&u<r[a.end]-o:c>r[a.start]-l+o&&c<r[a.end]-l-o:d?u>r[a.start]+l+o&&u<r[a.end]+l-o:c>r[a.start]+o&&c<r[a.end]-o});return d?{displacedBy:s,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:d.descriptor.id,droppableId:r.descriptor.id}}}:null})({pageBorderBoxWithDroppableScroll:d,draggable:t,previousImpact:o,destination:c,insideDestination:u,afterCritical:a})||(({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:a})=>{const s=n.axis,l=Cn(n.axis,t.displaceBy),c=l.value,u=e[s.start],d=e[s.end],p=function({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}({draggable:t,closest:Qt(t,r).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=mn(t,a),i=Rn({displaced:o,id:t});return r?i?d<=n:u<n-c:i?d<=n+c:u<n})||null,inHomeList:en(t,n)});return hn({draggable:t,insideDestination:r,destination:n,viewport:i,last:o,displacedBy:l,index:p})})({pageBorderBoxWithDroppableScroll:d,draggable:t,destination:c,insideDestination:u,last:o.displaced,viewport:i,afterCritical:a})},Ln=(e,t)=>({...e,[t.descriptor.id]:t}),Yn=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const a=r||e.viewport,s=n||e.dimensions,l=t||e.current.client.selection,c=At(l,e.initial.client.selection),u={offset:c,selection:l,borderBoxCenter:Mt(e.initial.client.borderBoxCenter,c)},d={selection:Mt(u.selection,a.scroll.current),borderBoxCenter:Mt(u.borderBoxCenter,a.scroll.current),offset:Mt(u.offset,a.scroll.diff.value)},p={client:u,page:d};if("COLLECTING"===e.phase)return{...e,dimensions:s,viewport:a,current:p};const f=s.draggables[e.critical.draggable.id],h=o||Fn({pageOffset:d.offset,draggable:f,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),m=(({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=(({previousImpact:e,impact:t,droppables:n})=>{const r=Mn(e),o=Mn(t);if(!r)return n;if(r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const a=(e=>{const t=e.subject.withPlaceholder;t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot remove placeholder form subject when there was none"):yt());const n=e.frame;if(!n){const t=jt({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Expected droppable with frame to have old max frame scroll when removing placeholder"):yt());const o=kn(n,r),i=jt({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}})(i);return Ln(n,a)})({previousImpact:r,impact:o,droppables:n}),a=Mn(o);if(!a)return i;const s=n[a];if(en(e,s))return i;if(s.subject.withPlaceholder)return i;const l=Tn(s,e,t);return Ln(i,l)})({draggable:f,impact:h,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:m},impact:h,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:!i&&null}},$n=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,a=function(e,t){return e.map(e=>t[e])}(i.all,n),s=pn({afterDragging:a,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:s}},Bn=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const a=_n({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return wn({pageBorderBoxCenter:a,draggable:t,viewport:o})},Gn=({state:e,dimensions:t,viewport:n})=>{"SNAP"!==e.movementMode&&yt();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=Mn(r);c||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Must be over a destination in SNAP movement mode"):yt());const u=s[c],d=$n({impact:r,viewport:o,destination:u,draggables:a}),p=Bn({impact:d,draggable:l,droppable:u,draggables:a,viewport:o,afterCritical:e.afterCritical});return Yn({impact:d,clientSelection:p,state:e,dimensions:i,viewport:o})},jn=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=Cn(t.axis,e.displaceBy),i=Jt(t.descriptor.id,n),a=i.indexOf(e);-1===a&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Expected draggable to be inside home list"):yt());const s=i.slice(a+1),l=s.reduce((e,t)=>(e[t.descriptor.id]=!0,e),{}),c={inVirtualList:"virtual"===t.descriptor.mode,displacedBy:o,effected:l};var u;return{impact:{displaced:pn({afterDragging:s,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(u=e.descriptor,{index:u.index,droppableId:u.droppableId})}},afterCritical:c}};const Wn=e=>"SNAP"===e.movementMode,Un=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:Ln(e.droppables,t)}))(e.dimensions,t);return!Wn(e)||n?Yn({state:e,dimensions:r}):Gn({state:e,dimensions:r})};function Hn(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const zn={phase:"IDLE",completed:null,shouldFlush:!1};var qn=(e=zn,t)=>{if("FLUSH"===t.type)return{...zn,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"INITIAL_PUBLISH must come after a IDLE phase"):yt());const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:a}=t.payload,s=i.draggables[n.draggable.id],l=i.droppables[n.droppable.id],c={selection:r,borderBoxCenter:s.client.borderBox.center,offset:Tt},u={client:c,page:{selection:Mt(c.selection,o.scroll.initial),borderBoxCenter:Mt(c.selection,o.scroll.initial),offset:Mt(c.selection,o.scroll.diff.value)}},d=qt(i.droppables).every(e=>!e.isFixedOnPage),{impact:p,afterCritical:f}=jn({draggable:s,home:l,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:i,initial:u,current:u,isWindowScrollAllowed:d,impact:p,afterCritical:f,onLiftImpact:p,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Collection cannot start from phase ${e.phase}`):yt()),{...e,phase:"COLLECTING"});if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Unexpected ${t.type} received in phase ${e.phase}`):yt()),(({state:e,published:t})=>{const n=t.modified.map(t=>Wt(e.dimensions.droppables[t.droppableId],t.scroll)),r={...e.dimensions.droppables,...Ht(n)},o=zt((({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(e=>{const o=(e=>{const t=e.frame;return t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Expected Droppable to have a frame"):yt()),t})(t[e.descriptor.droppableId]),i=(({draggable:e,offset:t,initialWindowScroll:n})=>{const r=Qe(e.client,t),o=et(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}})({draggable:e,offset:Mt(r,o.scroll.diff.value),initialWindowScroll:n.scroll.initial});return i})})({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(e=>{delete i[e]});const a={droppables:r,draggables:i},s=Mn(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],u=a.droppables[e.critical.droppable.id],{impact:d,afterCritical:p}=jn({draggable:c,home:u,draggables:i,viewport:e.viewport}),f=Fn({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:l&&l.isCombineEnabled?e.impact:d,viewport:e.viewport,afterCritical:p}),h={...e,phase:"DRAGGING",impact:f,onLiftImpact:d,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return"COLLECTING"===e.phase?h:{...h,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;An(e)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`${t.type} not permitted in phase ${e.phase}`):yt());const{client:n}=t.payload;return Pt(n,e.current.client.selection)?e:Yn({state:e,clientSelection:n,impact:Wn(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Hn(e);if("COLLECTING"===e.phase)return Hn(e);An(e)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`${t.type} not permitted in phase ${e.phase}`):yt());const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=Wt(o,r);return Un(e,i,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;An(e)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Attempting to move in an unsupported phase ${e.phase}`):yt());const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot find Droppable[id: ${n}] to toggle its enabled state`):yt()),o.isEnabled===r&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Trying to set droppable isEnabled to ${String(r)}\n but it is already ${String(o.isEnabled)}`):yt());const i={...o,isEnabled:r};return Un(e,i,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;An(e)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Attempting to move in an unsupported phase ${e.phase}`):yt());const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot find Droppable[id: ${n}] to toggle its isCombineEnabled state`):yt()),o.isCombineEnabled===r&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Trying to set droppable isCombineEnabled to ${String(r)}\n but it is already ${String(o.isCombineEnabled)}`):yt());const i={...o,isCombineEnabled:r};return Un(e,i,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;An(e)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot move by window in phase ${e.phase}`):yt()),e.isWindowScrollAllowed||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Window scrolling is currently not supported for fixed lists"):yt());const n=t.payload.newScroll;if(Pt(e.viewport.scroll.current,n))return Hn(e);const r=Dn(e.viewport,n);return Wn(e)?Gn({state:e,viewport:r}):Yn({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!An(e))return e;const n=t.payload.maxScroll;if(Pt(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`${t.type} received while not in DRAGGING phase`):yt());const n=(({state:e,type:t})=>{const n=((e,t)=>{const n=Mn(e);return n?t[n]:null})(e.impact,e.dimensions.droppables),r=Boolean(n),o=n||e.dimensions.droppables[e.critical.droppable.id],i=o.axis.direction,a="vertical"===i&&("MOVE_UP"===t||"MOVE_DOWN"===t)||"horizontal"===i&&("MOVE_LEFT"===t||"MOVE_RIGHT"===t);if(a&&!r)return null;const s="MOVE_DOWN"===t||"MOVE_RIGHT"===t,l=e.dimensions.draggables[e.critical.draggable.id],c=e.current.page.borderBoxCenter,{draggables:u,droppables:d}=e.dimensions;return a?(({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!n.isEnabled)return null;const c=Jt(n.descriptor.id,r),u=en(t,n),d=(({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled)return null;if(!Xt(o))return null;function i(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:n.descriptor.id}};return{...o,at:t}}const a=o.displaced.all,s=a.length?a[0]:null;if(e)return s?i(s):null;const l=Qt(t,r);if(!s)return l.length?i(l[l.length-1].descriptor.id):null;const c=l.findIndex(e=>e.descriptor.id===s);-1===c&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Could not find displaced item in set"):yt());const u=c-1;return u<0?null:i(l[u].descriptor.id)})({isMovingForward:e,draggable:t,destination:n,insideDestination:c,previousImpact:o})||(({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot move in direction without previous impact location"):yt()),"REORDER"===c.type){const r=(({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,a=n[n.length-1].descriptor.index;return i<n[0].descriptor.index||i>(t?a:a+1)?null:i})({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return null==r?null:hn({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:r})}const u=(({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,a=n[i].descriptor.index;return mn(i,o)?e?a:a-1:e?a+1:a})({isMovingForward:e,destination:o,displaced:a.displaced,draggables:r,combine:c.combine,afterCritical:l});return null==u?null:hn({draggable:n,insideDestination:i,destination:o,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})})({isMovingForward:e,isInHomeList:u,draggable:t,draggables:r,destination:n,insideDestination:c,previousImpact:o,viewport:i,afterCritical:l});if(!d)return null;const p=_n({impact:d,draggable:t,droppable:n,draggables:r,afterCritical:l});if(On({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:wn({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:d,scrollJumpRequest:null};const f=At(p,a),h=(({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:o})=>{const i=Dn(t,Mt(t.scroll.current,o)),a=n.frame?Wt(n,Mt(n.frame.scroll.current,o)):n,s=e.displaced,l=pn({afterDragging:Nn(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=pn({afterDragging:Nn(s.all,r),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),u={},d={},p=[s,l,c];return s.all.forEach(e=>{const t=function(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}(e,p);t?d[e]=t:u[e]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:d}}})({impact:d,viewport:i,destination:n,draggables:r,maxScrollChange:f});return{clientSelection:s,impact:h,scrollJumpRequest:f}})({isMovingForward:s,previousPageBorderBoxCenter:c,draggable:l,destination:o,draggables:u,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):(({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:a,afterCritical:s})=>{const l=(({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const a=n.axis,s=on(i[a.start],i[a.end]),l=qt(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>an(o.frame)(xn(e))).filter(t=>{const n=xn(t);return e?i[a.crossAxisEnd]<n[a.crossAxisEnd]:n[a.crossAxisStart]<i[a.crossAxisStart]}).filter(e=>{const t=xn(e),n=on(t[a.start],t[a.end]);return s(t[a.start])||s(t[a.end])||n(i[a.start])||n(i[a.end])}).sort((t,n)=>{const r=xn(t)[a.crossAxisStart],o=xn(n)[a.crossAxisStart];return e?r-o:o-r}).filter((e,t,n)=>xn(e)[a.crossAxisStart]===xn(n[0])[a.crossAxisStart]);if(!l.length)return null;if(1===l.length)return l[0];const c=l.filter(e=>on(xn(e)[a.start],xn(e)[a.end])(t[a.line]));return 1===c.length?c[0]:c.length>1?c.sort((e,t)=>xn(e)[a.start]-xn(t)[a.start])[0]:l.sort((e,n)=>{const r=Lt(t,Bt(xn(e))),o=Lt(t,Bt(xn(n)));return r!==o?r-o:xn(e)[a.start]-xn(n)[a.start]})[0]})({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:a});if(!l)return null;const c=Jt(l.descriptor.id,o),u=(({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>{const i=r.filter(e=>dn({target:In(e,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{const i=Ft(e,En(n,Sn(t,o))),a=Ft(e,En(n,Sn(r,o)));return i<a?-1:a<i?1:t.descriptor.index-r.descriptor.index});return i[0]||null})({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),d=(({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(n.length)return null;const e={displaced:nn,displacedBy:tn,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},t=_n({impact:e,draggable:r,droppable:i,draggables:o,afterCritical:s}),l=en(r,i)?i:Tn(i,r,o);return On({draggable:r,destination:l,newPageBorderBoxCenter:t,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const l=Boolean(e[i.axis.line]<=t.page.borderBox.center[i.axis.line]),c=(()=>{const e=t.descriptor.index;return t.descriptor.id===r.descriptor.id||l?e:e+1})(),u=Cn(i.axis,r.displaceBy);return hn({draggable:r,insideDestination:n,destination:i,viewport:a,displacedBy:u,last:nn,index:c})})({previousPageBorderBoxCenter:t,destination:l,draggable:n,draggables:o,moveRelativeTo:u,insideDestination:c,viewport:a,afterCritical:s});if(!d)return null;const p=_n({impact:d,draggable:n,droppable:l,draggables:o,afterCritical:s});return{clientSelection:wn({pageBorderBoxCenter:p,draggable:n,viewport:a}),impact:d,scrollJumpRequest:null}})({isMovingForward:s,previousPageBorderBoxCenter:c,draggable:l,isOver:o,draggables:u,droppables:d,viewport:e.viewport,afterCritical:e.afterCritical})})({state:e,type:t.type});return n?Yn({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;return"COLLECTING"!==e.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Can only move into the DROP_PENDING phase from the COLLECTING phase"):yt()),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot animate drop from phase ${e.phase}`):yt()),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};function Zn(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Jn=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Xn=()=>({type:"COLLECTION_STARTING",payload:null}),Kn=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Qn=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),er=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),tr=e=>({type:"MOVE",payload:e}),nr=()=>({type:"MOVE_UP",payload:null}),rr=()=>({type:"MOVE_DOWN",payload:null}),or=()=>({type:"MOVE_RIGHT",payload:null}),ir=()=>({type:"MOVE_LEFT",payload:null}),ar=e=>({type:"DROP_COMPLETE",payload:e}),sr=e=>({type:"DROP",payload:e}),lr="cubic-bezier(.2,1,.1,1)",cr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},ur=`${cr.outOfTheWay}s cubic-bezier(0.2, 0, 0, 1)`,dr={fluid:`opacity ${ur}`,snap:`transform ${ur}, opacity ${ur}`,drop:e=>{const t=`${e}s ${lr}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${ur}`,placeholder:`height ${ur}, width ${ur}, margin ${ur}`},pr=e=>Pt(e,Tt)?void 0:`translate(${e.x}px, ${e.y}px)`,fr=pr,{minDropTime:hr,maxDropTime:mr}=cr,gr=mr-hr,br=({getState:e,dispatch:t})=>n=>r=>{if(!Zn(r,"DROP"))return void n(r);const o=e(),i=r.payload.reason;if("COLLECTING"===o.phase)return void t((a={reason:i},{type:"DROP_PENDING",payload:a}));var a;if("IDLE"===o.phase)return;"DROP_PENDING"===o.phase&&o.isWaiting&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"A DROP action occurred while DROP_PENDING and still waiting"):yt()),"DRAGGING"!==o.phase&&"DROP_PENDING"!==o.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot drop in phase: ${o.phase}`):yt());const s=o.critical,l=o.dimensions,c=l.draggables[o.critical.draggable.id],{impact:u,didDropInsideDroppable:d}=(({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>n.at&&"DROP"===t?"REORDER"===n.at.type?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:nn},didDropInsideDroppable:!0}:{impact:$n({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1})({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),p=d?Xt(u):null,f=d?Kt(u):null,h={draggableId:c.descriptor.id,type:c.descriptor.type,source:{index:s.draggable.index,droppableId:s.droppable.id},reason:i,mode:o.movementMode,destination:p,combine:f},m=(({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:a}=n,s=Mn(e),l=Bn({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:(s?a[s]:null)||a[t.descriptor.droppableId],viewport:r});return At(l,t.client.borderBox.center)})({impact:u,draggable:c,dimensions:l,viewport:o.viewport,afterCritical:o.afterCritical}),g={critical:o.critical,afterCritical:o.afterCritical,result:h,impact:u};if(Pt(o.current.client.offset,m)&&!Boolean(h.combine))return void t(ar({completed:g}));const b=(({current:e,destination:t,reason:n})=>{const r=Ft(e,t);if(r<=0)return hr;if(r>=1500)return mr;const o=hr+gr*(r/1500);return Number(("CANCEL"===n?.6*o:o).toFixed(2))})({current:o.current.client.offset,destination:m,reason:i});t((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:m,dropDuration:b,completed:g}))};var yr=()=>({x:window.pageXOffset,y:window.pageYOffset});const vr=e=>{const t=function({onWindowScroll:e}){const t=rt(function(){e(yr())}),n=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}(t);let r=ft;function o(){return r!==ft}return{start:function(){o()&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot start scroll listener when already active"):yt()),r=ht(window,[n])},stop:function(){o()||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot stop scroll listener when not active"):yt()),t.cancel(),r(),r=ft},isActive:o}}({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{!t.isActive()&&Zn(n,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&(e=>Zn(e,"DROP_COMPLETE")||Zn(e,"DROP_ANIMATE")||Zn(e,"FLUSH"))(n)&&t.stop(),e(n)}},Er=(e,t)=>{t()},_r=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function Dr(e,t,n,r){if(!e)return void n(r(t));const o=(e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=o=>{t?"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("Announcement already made. Not making a second announcement"):n?"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("\n Announcements cannot be made asynchronously.\n Default message has already been announced.\n "):(t=!0,e(o),clearTimeout(r))};return o.wasCalled=()=>t,o})(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}const Nr=e=>t=>n=>{if(!Zn(n,"DROP_ANIMATION_FINISHED"))return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot finish a drop animating when no drop is occurring"):yt()),e.dispatch(ar({completed:r.completed}))},wr=e=>{let t=null,n=null;return r=>o=>{if((Zn(o,"FLUSH")||Zn(o,"DROP_COMPLETE")||Zn(o,"DROP_ANIMATION_FINISHED"))&&(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(o),!Zn(o,"DROP_ANIMATE"))return;const i={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(()=>{n=null,t=ht(window,[i])})}},Or=e=>t=>n=>{if(t(n),!Zn(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(sr({reason:r.reason})))},xr="production"!=='{NODE_ENV:"production"}'.NODE_ENV&&"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"@hello-pangea/dnd"}):M;var Sr=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=At({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Ir=()=>{const e=document.documentElement;return e||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot find document.documentElement"):yt()),e},Cr=()=>{const e=Ir();return Sr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})};function kr(e,t,n){return n.descriptor.id!==t.id&&n.descriptor.type===t.type&&("virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode||("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n You are attempting to add or remove a Draggable [id: ${n.descriptor.id}]\n while a drag is occurring. This is only supported for virtual lists.\n\n See https://github.com/hello-pangea/dnd/blob/main/docs/patterns/virtual-lists.md\n `),!1))}var Tr=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason,Mr=e=>{window.scrollBy(e.x,e.y)};const Ar=Ut(e=>qt(e).filter(e=>!!e.isEnabled&&!!e.frame)),Pr={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Vr=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return 0===r?("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("\n Detected distance range of 0 in the fluid auto scroller\n This is unexpected and would cause a divide by 0 issue.\n Not allowing an auto scroll\n "),0):(n-e)/r},Rr=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:o})=>{const i=((e,t,n=()=>Pr)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const o=Vr({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=r.maxPixelScroll*r.ease(1-o);return Math.ceil(i)})(e,t,o);return 0===i?0:r?Math.max(((e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,a=t,s=i,l=Date.now()-a;if(l>=i)return e;if(l<o)return 1;const c=Vr({startOfRange:o,endOfRange:s,current:l}),u=e*r.ease(c);return Math.ceil(u)})(i,n,o),1):i},Fr=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=((e,t,n=()=>Pr)=>{const r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}})(e,r,i);return t[r.end]<t[r.start]?Rr({distanceToEdge:t[r.end],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i}):-1*Rr({distanceToEdge:t[r.start],thresholds:a,dragStartTime:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i})};const Lr=Yt(e=>0===e?0:e);var Yr=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=Fr({container:t,distanceToEdges:a,dragStartTime:e,axis:ln,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),l=Fr({container:t,distanceToEdges:a,dragStartTime:e,axis:cn,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=Lr({x:l,y:s});if(Pt(c,Tt))return null;const u=(({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,o=t.width>e.width;return o||r?o&&r?null:{x:o?0:n.x,y:r?0:n.y}:n})({container:t,subject:n,proposedScroll:c});return u?Pt(u,Tt)?null:u:null};const $r=Yt(e=>0===e?0:e>0?1:-1),Br=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{const o=Mt(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return Pt(i,Tt)?null:i}})(),Gr=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=$r(n),i=Br({max:r,current:t,change:o});return!i||0!==o.x&&0===i.x||0!==o.y&&0===i.y},jr=(e,t)=>Gr({current:e.scroll.current,max:e.scroll.max,change:t}),Wr=(e,t)=>{const n=e.frame;return!!n&&Gr({current:n.scroll.current,max:n.scroll.max,change:t})};var Ur=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,s=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const o=(({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=Yr({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&jr(e,a)?a:null})({dragStartTime:t,viewport:e.viewport,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(o)return void r(o)}const l=(({center:e,destination:t,droppables:n})=>{if(t){const e=n[t];return e.frame?e:null}const r=((e,t)=>{const n=Ar(t).find(t=>(t.frame||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Invalid result"):yt()),Pn(t.frame.pageMarginBox)(e)))||null;return n})(e,n);return r})({center:a,destination:Mn(e.impact),droppables:e.dimensions.droppables});if(!l)return;const c=(({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=Yr({dragStartTime:r,container:a.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&Wr(e,s)?s:null})({dragStartTime:t,droppable:l,subject:s,center:a,shouldUseTimeDampening:n,getAutoScrollerOptions:i});c&&o(l.descriptor.id,c)};const Hr="data-rfd",zr=(()=>{const e=`${Hr}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),qr=(()=>{const e=`${Hr}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Zr=(()=>{const e=`${Hr}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Jr={contextId:`${Hr}-scroll-container-context-id`},Xr=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" "),Kr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?e.useLayoutEffect:e.useEffect,Qr=()=>{const e=document.querySelector("head");return e||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot find the head to append a style to"):yt()),e},eo=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function to(e,t){return Array.from(e.querySelectorAll(t))}var no=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function ro(e){return e instanceof no(e).HTMLElement}function oo(e,t){const n=to(document,`[${zr.contextId}="${e}"]`);if(!n.length)return"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`Unable to find any drag handles in the context "${e}"`),null;const r=n.find(e=>e.getAttribute(zr.draggableId)===t);return r?ro(r)?r:("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("drag handle needs to be a HTMLElement"),null):("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`Unable to find drag handle with id "${t}" as no handle with a matching id was found`),null)}function io(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(t=>t(e))}function r(t){return e.draggables[t]||null}function o(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const o=t.descriptor.id,i=r(o);i&&t.uniqueId===i.uniqueId&&(delete e.draggables[o],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot find draggable entry with id [${e}]`):yt()),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Object.values(e.draggables).filter(e=>e.descriptor.type===t)},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=o(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=o(e);return t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot find droppable entry with id [${e}]`):yt()),t},findById:o,exists:e=>Boolean(o(e)),getAllByType:t=>Object.values(e.droppables).filter(e=>e.descriptor.type===t)},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var ao=d.default.createContext(null),so=()=>{const e=document.body;return e||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot find document.body"):yt()),e};const lo={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},co={separator:"::"};function uo(e,t=co){const n=d.default.useId();return Ct(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}var po=d.default.createContext(null);const fo=/(\d+)\.(\d+)\.(\d+)/,ho=e=>{const t=fo.exec(e);return null==t&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Unable to parse React version ${e}`):yt()),{major:Number(t[1]),minor:Number(t[2]),patch:Number(t[3]),raw:e}},mo="\n We expect a html5 doctype: <!doctype html>\n This is to ensure consistent browser layout and measurement\n\n More information: https://github.com/hello-pangea/dnd/blob/main/docs/guides/doctype.md\n";function go(e){"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&e()}function bo(t,n){go(()=>{e.useEffect(()=>{try{t()}catch(e){pt(`\n A setup problem was encountered.\n\n > ${e.message}\n `)}},n)})}function yo(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),n}function vo(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const Eo=9,_o=13,Do=33,No=34,wo=35,Oo=36,xo={[_o]:!0,[Eo]:!0};var So=e=>{xo[e.keyCode]&&e.preventDefault()};const Io=(()=>{const e="visibilitychange";return"undefined"==typeof document?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),Co={type:"IDLE"};function ko(){}const To={[No]:!0,[Do]:!0,[Oo]:!0,[wo]:!0},Mo={type:"IDLE"},Ao=["input","button","textarea","select","option","optgroup","video","audio"];function Po(e,t){if(null==t)return!1;if(Ao.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&Po(e,t.parentElement)}function Vo(e,t){const n=t.target;return!!ro(n)&&Po(e,n)}var Ro=e=>ze(e.getBoundingClientRect()).center;const Fo=(()=>{const e="matches";return"undefined"==typeof document?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||e})();function Lo(e,t){return null==e?null:e[Fo](t)?e:Lo(e.parentElement,t)}function Yo(e,t){return e.closest?e.closest(t):Lo(e,t)}function $o(e){e.preventDefault()}function Bo({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return n()?e===t||(r&&"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n Cannot perform action.\n The actions you used belong to an outdated phase\n\n Current phase: ${e}\n You called an action from outdated phase: ${t}\n\n Tips:\n\n - Do not use preDragActions actions after calling preDragActions.lift()\n `),!1):(r&&"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("\n Cannot perform action.\n The sensor no longer has an action lock.\n\n Tips:\n\n - Throw away your action handlers when forceStop() is called\n - Check actions.isActive() if you really need to\n "),!1)}function Go({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return o?!!o.options.isEnabled&&!!Tr(t.getState(),r):("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`Unable to find draggable with id: ${r}`),!1)}const jo=[function(t){const n=e.useRef(Co),r=e.useRef(ft),o=Ct(()=>({eventName:"mousedown",fn:function(e){if(e.defaultPrevented)return;if(0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;const n=t.findClosestDraggableId(e);if(!n)return;const o=t.tryGetLock(n,s,{sourceEvent:e});if(!o)return;e.preventDefault();const i={x:e.clientX,y:e.clientY};r.current(),u(o,i)}}),[t]),i=Ct(()=>({eventName:"webkitmouseforcewillbegin",fn:e=>{if(e.defaultPrevented)return;const n=t.findClosestDraggableId(e);if(!n)return;const r=t.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||t.canGetLock(n)&&e.preventDefault())}}),[t]),a=kt(function(){r.current=ht(window,[i,o],{passive:!1,capture:!0})},[i,o]),s=kt(()=>{"IDLE"!==n.current.type&&(n.current=Co,r.current(),a())},[a]),l=kt(()=>{const e=n.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[s]),c=kt(function(){const e=function({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:o,clientY:i}=e;if(0!==t)return;const a={x:o,y:i},s=n();if("DRAGGING"===s.type)return e.preventDefault(),void s.actions.move(a);if("PENDING"!==s.type&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot be IDLE"):yt()),l=s.point,c=a,!(Math.abs(c.x-l.x)>=5||Math.abs(c.y-l.y)>=5))return;var l,c;e.preventDefault();const u=s.actions.fluidLift(a);r({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"mousedown",fn:t=>{"DRAGGING"===n().type&&t.preventDefault(),e()}},{eventName:"keydown",fn:t=>{if("PENDING"!==n().type)return 27===t.keyCode?(t.preventDefault(),void e()):void So(t);e()}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===n().type&&e()}},{eventName:"webkitmouseforcedown",fn:t=>{const r=n();"IDLE"===r.type&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Unexpected phase"):yt()),r.actions.shouldRespectForcePress()?e():t.preventDefault()}},{eventName:Io,fn:e}]}({cancel:l,completed:s,getPhase:()=>n.current,setPhase:e=>{n.current=e}});r.current=ht(window,e,{capture:!0,passive:!1})},[l,s]),u=kt(function(e,t){"IDLE"!==n.current.type&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Expected to move from IDLE to PENDING drag"):yt()),n.current={type:"PENDING",point:t,actions:e},c()},[c]);Kr(function(){return a(),function(){r.current()}},[a])},function(t){const n=e.useRef(ko),r=Ct(()=>({eventName:"keydown",fn:function(e){if(e.defaultPrevented)return;if(32!==e.keyCode)return;const r=t.findClosestDraggableId(e);if(!r)return;const i=t.tryGetLock(r,l,{sourceEvent:e});if(!i)return;e.preventDefault();let a=!0;const s=i.snapLift();function l(){a||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot stop capturing a keyboard drag when not capturing"):yt()),a=!1,n.current(),o()}n.current(),n.current=ht(window,function(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(To[r.keyCode]?r.preventDefault():So(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Io,fn:n}]}(s,l),{capture:!0,passive:!1})}}),[t]),o=kt(function(){n.current=ht(window,[r],{passive:!1,capture:!0})},[r]);Kr(function(){return o(),function(){n.current()}},[o])},function(t){const n=e.useRef(Mo),r=e.useRef(ft),o=kt(function(){return n.current},[]),i=kt(function(e){n.current=e},[]),a=Ct(()=>({eventName:"touchstart",fn:function(e){if(e.defaultPrevented)return;const n=t.findClosestDraggableId(e);if(!n)return;const o=t.tryGetLock(n,l,{sourceEvent:e});if(!o)return;const i=e.touches[0],{clientX:a,clientY:s}=i,c={x:a,y:s};r.current(),p(o,c)}}),[t]),s=kt(function(){r.current=ht(window,[a],{capture:!0,passive:!1})},[a]),l=kt(()=>{const e=n.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),i(Mo),r.current(),s())},[s,i]),c=kt(()=>{const e=n.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[l]),u=kt(function(){const e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:o},n=ht(window,function({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:t=>{const r=n();if("DRAGGING"!==r.type)return void e();r.hasMoved=!0;const{clientX:o,clientY:i}=t.touches[0],a={x:o,y:i};t.preventDefault(),r.actions.move(a)}},{eventName:"touchend",fn:r=>{const o=n();"DRAGGING"===o.type?(r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()):e()}},{eventName:"touchcancel",fn:t=>{"DRAGGING"===n().type?(t.preventDefault(),e()):e()}},{eventName:"touchforcechange",fn:t=>{const r=n();"IDLE"===r.type&&yt();const o=t.touches[0];if(!o)return;if(!(o.force>=.15))return;const i=r.actions.shouldRespectForcePress();if("PENDING"!==r.type)return i?r.hasMoved?void t.preventDefault():void e():void t.preventDefault();i&&e()}},{eventName:Io,fn:e}]}(t),e),i=ht(window,function({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:n=>{"DRAGGING"===t().type?(27===n.keyCode&&n.preventDefault(),e()):e()}},{eventName:Io,fn:e}]}(t),e);r.current=function(){n(),i()}},[c,o,l]),d=kt(function(){const e=o();"PENDING"!==e.type&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot start dragging from phase ${e.type}`):yt());const t=e.actions.fluidLift(e.point);i({type:"DRAGGING",actions:t,hasMoved:!1})},[o,i]),p=kt(function(e,t){"IDLE"!==o().type&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Expected to move from IDLE to PENDING drag"):yt());const n=setTimeout(d,120);i({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()},[u,o,i,d]);Kr(function(){return s(),function(){r.current();const e=o();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),i(Mo))}},[o,s,i]),Kr(function(){return ht(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}];function Wo({contextId:t,store:n,registry:r,customSensors:o,enableDefaultSensors:i}){const a=[...i?jo:[],...o||[]],s=e.useState(()=>function(){let e=null;function t(){e||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot release lock when there is no lock"):yt()),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot claim lock as it is already claimed"):yt());const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],l=kt(function(e,t){vo(e)&&!vo(t)&&s.tryAbandon()},[s]);Kr(function(){let e=n.getState();return n.subscribe(()=>{const t=n.getState();l(e,t),e=t})},[s,n,l]),Kr(()=>s.tryAbandon,[s.tryAbandon]);const c=kt(e=>Go({lockAPI:s,registry:r,store:n,draggableId:e}),[s,r,n]),u=kt((e,o,i)=>function({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:a}){if(!Go({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const s=r.draggable.getById(o),l=function(e,t){const n=to(document,`[${qr.contextId}="${e}"]`).find(e=>e.getAttribute(qr.id)===t);return n?ro(n)?n:("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("Draggable element is not a HTMLElement"),null):null}(t,s.descriptor.id);if(!l)return"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`Unable to find draggable element with id: ${o}`),null;if(a&&!s.options.canDragInteractiveElements&&Vo(l,a))return null;const c=e.claim(i||ft);let u="PRE_DRAG";function d(){return s.options.shouldRespectForcePress}function p(){return e.isActive(c)}const f=function(e,t){Bo({expected:e,phase:u,isLockActive:p,shouldWarn:!0})&&n.dispatch(t())}.bind(null,"DRAGGING");function h(t){function r(){e.release(),u="COMPLETED"}function o(e,o={shouldBlockNextClick:!1}){if(t.cleanup(),o.shouldBlockNextClick){const e=ht(window,[{eventName:"click",fn:$o,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(sr({reason:e}))}return"PRE_DRAG"!==u&&(r(),"production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot lift in phase ${u}`):yt()),n.dispatch((e=>({type:"LIFT",payload:e}))(t.liftActionArgs)),u="DRAGGING",{isActive:()=>Bo({expected:"DRAGGING",phase:u,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:d,drop:e=>o("DROP",e),cancel:e=>o("CANCEL",e),...t.actions}}return{isActive:()=>Bo({expected:"PRE_DRAG",phase:u,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:d,fluidLift:function(e){const t=rt(e=>{f(()=>tr({client:e}))});return{...h({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>f(nr),moveRight:()=>f(or),moveDown:()=>f(rr),moveLeft:()=>f(ir)};return h({liftActionArgs:{id:o,clientSelection:Ro(l),movementMode:"SNAP"},cleanup:ft,actions:e})},abort:function(){Bo({expected:"PRE_DRAG",phase:u,isLockActive:p,shouldWarn:!0})&&e.release()}}}({lockAPI:s,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:o||null,sourceEvent:i&&i.sourceEvent?i.sourceEvent:null}),[t,s,r,n]),d=kt(e=>function(e,t){const n=function(e,t){const n=t.target;if(!((r=n)instanceof no(r).Element))return"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("event.target must be a Element"),null;var r;const o=function(e){return`[${zr.contextId}="${e}"]`}(e),i=Yo(n,o);return i?ro(i)?i:("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("drag handle must be a HTMLElement"),null):null}(e,t);return n?n.getAttribute(zr.draggableId):null}(t,e),[t]),p=kt(e=>{const t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),f=kt(function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))},[s,n]),h=kt(()=>s.isClaimed(),[s]),m=Ct(()=>({canGetLock:c,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:h}),[c,u,d,p,f,h]);var g;g=a,go(()=>{const e=yo(g);bo(()=>{e.current.length!==g.length&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot change the amount of sensor hooks after mounting"):yt())})});for(let e=0;e<a.length;e++)a[e](m)}function Uo(e){return e.current||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Could not find store from lazy ref"):yt()),e.current}function Ho(t){const{contextId:n,setCallbacks:r,sensors:o,nonce:i,dragHandleUsageInstructions:s}=t,l=e.useRef(null);bo(()=>{((e,t)=>{const n=ho("^18.0.0 || ^19.0.0"),r=ho(t);((e,t)=>t.major>e.major||!(t.major<e.major)&&(t.minor>e.minor||!(t.minor<e.minor)&&t.patch>=e.patch))(n,r)||"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n React version: [${r.raw}]\n does not satisfy expected peer dependency version: [${n.raw}]\n\n This can result in run time bugs, and even fatal crashes\n `)})(0,d.default.version),(()=>{const e=document.doctype;e?("html"!==e.name.toLowerCase()&&"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n Unexpected <!doctype> found: (${e.name})\n\n ${mo}\n `),""!==e.publicId&&"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n Unexpected <!doctype> publicId found: (${e.publicId})\n A html5 doctype does not have a publicId\n\n ${mo}\n `)):"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n No <!doctype html> found.\n\n ${mo}\n `)})()},[]);const c=yo(t),u=kt(()=>(e=>({onBeforeCapture:t=>{a.flushSync(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(c.current),[c]),p=kt(()=>(e=>({...Pr,...e.autoScrollerOptions,durationDampening:{...Pr.durationDampening,...e.autoScrollerOptions}}))(c.current),[c]),f=function(t){const n=Ct(()=>(e=>`rfd-announcement-${e}`)(t),[t]),r=e.useRef(null);return e.useEffect(function(){const e=document.createElement("div");return r.current=e,e.id=n,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),ot(e.style,lo),so().appendChild(e),function(){setTimeout(function(){const t=so();t.contains(e)&&t.removeChild(e),e===r.current&&(r.current=null)})}},[n]),kt(e=>{const t=r.current;t?t.textContent=e:"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n A screen reader message was trying to be announced but it was unable to do so.\n This can occur if you unmount your <DragDropContext /> in your onDragEnd.\n Consider calling provided.announce() before the unmount so that the instruction will\n not be lost for users relying on a screen reader.\n\n Message not passed to screen reader:\n\n "${e}"\n `)},[])}(n),h=function({contextId:t,text:n}){const r=uo("hidden-text",{separator:"-"}),o=Ct(()=>function({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}({contextId:t,uniqueId:r}),[r,t]);return e.useEffect(function(){const e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",so().appendChild(e),function(){const t=so();t.contains(e)&&t.removeChild(e)}},[o,n]),o}({contextId:n,text:s}),m=function(t,n){const r=Ct(()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(zr.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),o=[(()=>{const e=`\n transition: ${dr.outOfTheWay};\n `;return{selector:t(qr.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(Zr.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Xr(o,"always"),resting:Xr(o,"resting"),dragging:Xr(o,"dragging"),dropAnimating:Xr(o,"dropAnimating"),userCancel:Xr(o,"userCancel")}})(t),[t]),o=e.useRef(null),i=e.useRef(null),a=kt(Ut(e=>{const t=i.current;t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot set dynamic style element if it is not set"):yt()),t.textContent=e}),[]),s=kt(e=>{const t=o.current;t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot set dynamic style element if it is not set"):yt()),t.textContent=e},[]);Kr(()=>{(o.current||i.current)&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"style elements already mounted"):yt());const e=eo(n),l=eo(n);return o.current=e,i.current=l,e.setAttribute(`${Hr}-always`,t),l.setAttribute(`${Hr}-dynamic`,t),Qr().appendChild(e),Qr().appendChild(l),s(r.always),a(r.resting),()=>{const e=e=>{const t=e.current;t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot unmount ref as it is not set"):yt()),Qr().removeChild(t),e.current=null};e(o),e(i)}},[n,s,a,r.always,r.resting,t]);const l=kt(()=>a(r.dragging),[a,r.dragging]),c=kt(e=>{a("DROP"!==e?r.userCancel:r.dropAnimating)},[a,r.dropAnimating,r.userCancel]),u=kt(()=>{i.current&&a(r.resting)},[a,r.resting]);return Ct(()=>({dragging:l,dropping:c,resting:u}),[l,c,u])}(n,i),g=kt(e=>{Uo(l).dispatch(e)},[]),b=Ct(()=>T({publishWhileDragging:Jn,updateDroppableScroll:Kn,updateDroppableIsEnabled:Qn,updateDroppableIsCombineEnabled:er,collectionStarting:Xn},g),[g]),y=function(){const t=Ct(io,[]);return e.useEffect(()=>function(){t.clean()},[t]),t}(),v=Ct(()=>((e,t)=>{let n=null;const r=function({registry:e,callbacks:t}){let n={additions:{},removals:{},modified:{}},r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:o,removals:i,modified:a}=n,s=Object.keys(o).map(t=>e.draggable.getById(t).getDimension(Tt)).sort((e,t)=>e.descriptor.index-t.descriptor.index),l=Object.keys(a).map(t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()})),c={additions:s,removals:Object.keys(i),modified:l};n={additions:{},removals:{},modified:{}},t.publish(c)}))};return{add:e=>{const t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],o()},remove:e=>{const t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=t=>{n||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Should only be subscribed when a collection is occurring"):yt());const o=n.critical.draggable;"ADDITION"===t.type&&kr(e,o,t.value)&&r.add(t.value),"REMOVAL"===t.type&&kr(e,o,t.value)&&r.remove(t.value)},i={updateDroppableIsEnabled:(r,o)=>{e.droppable.exists(r)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot update is enabled flag of Droppable ${r} as it is not registered`):yt()),n&&t.updateDroppableIsEnabled({id:r,isEnabled:o})},updateDroppableIsCombineEnabled:(r,o)=>{n&&(e.droppable.exists(r)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot update isCombineEnabled flag of Droppable ${r} as it is not registered`):yt()),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:o}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,o)=>{n&&(e.droppable.exists(r)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Cannot update the scroll on Droppable ${r} as it is not registered`):yt()),t.updateDroppableScroll({id:r,newScroll:o}))},startPublishing:t=>{n&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot start capturing critical dimensions as there is already a collection"):yt());const r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor},s=e.subscribe(o);return n={critical:a,unsubscribe:s},(({critical:e,scrollOptions:t,registry:n})=>{const r=(()=>{const e=yr(),t=Cr(),n=e.y,r=e.x,o=Ir();return{frame:ze({top:n,left:r,right:r+o.clientWidth,bottom:n+o.clientHeight}),scroll:{initial:e,current:e,max:t,diff:{value:Tt,displacement:Tt}}}})(),o=r.scroll.current,i=n.droppable.getAllByType(e.droppable.type).map(e=>e.callbacks.getDimensionAndWatchScroll(o,t)),a=n.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(o));return{dimensions:{draggables:zt(a),droppables:Ht(i)},critical:e,viewport:r}})({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{n&&(r.stop(),e.droppable.getAllByType(n.critical.droppable.type).forEach(e=>e.callbacks.dragStopped()),n.unsubscribe(),n=null)}};return i})(y,b),[y,b]),E=Ct(()=>(({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=(({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>Pr})=>{const r=rt(e),o=rt(t);let i=null;const a=e=>{i||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot fluid scroll if not dragging"):yt());const{shouldUseTimeDampening:t,dragStartTime:a}=i;Ur({state:e,scrollWindow:r,scrollDroppable:o,dragStartTime:a,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{i&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot start auto scrolling when already started"):yt());const t=Date.now();let r=!1;const o=()=>{r=!0};Ur({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:o,scrollDroppable:o,getAutoScrollerOptions:n}),i={dragStartTime:t,shouldUseTimeDampening:r},r&&a(e)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:a}})({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=(({move:e,scrollDroppable:t,scrollWindow:n})=>r=>{const o=r.scrollJumpRequest;if(!o)return;const i=Mn(r.impact);i||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot perform a jump scroll when there is no destination"):yt());const a=((e,n)=>{if(!Wr(e,n))return n;const r=((e,t)=>{const n=e.frame;return n&&Wr(e,t)?Br({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,n);if(!r)return t(e.descriptor.id,n),null;const o=At(n,r);return t(e.descriptor.id,o),At(n,o)})(r.dimensions.droppables[i],o);if(!a)return;const s=((e,t,r)=>{if(!e)return r;if(!jr(t,r))return r;const o=((e,t)=>jr(e,t)?Br({current:e.scroll.current,max:e.scroll.max,change:t}):null)(t,r);if(!o)return n(r),null;const i=At(r,o);return n(i),At(r,i)})(r.isWindowScrollAllowed,r.viewport,a);s&&((t,n)=>{const r=Mt(t.current.client.selection,n);e({client:r})})(r,s)})({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{r().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&i(e):o.scroll(e))},start:o.start,stop:o.stop}})({scrollWindow:Mr,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:p,...T({move:tr},g)}),[v.scrollDroppable,g,p]),_=function(t){const n=e.useRef({}),r=e.useRef(null),o=e.useRef(null),i=e.useRef(!1),a=kt(function(e,t){const r={id:e,focus:t};return n.current[e]=r,function(){const t=n.current;t[e]!==r&&delete t[e]}},[]),s=kt(function(e){const n=oo(t,e);n&&n!==document.activeElement&&n.focus()},[t]),l=kt(function(e,t){r.current===e&&(r.current=t)},[]),c=kt(function(){o.current||i.current&&(o.current=requestAnimationFrame(()=>{o.current=null;const e=r.current;e&&s(e)}))},[s]),u=kt(function(e){r.current=null;const t=document.activeElement;t&&t.getAttribute(zr.draggableId)===e&&(r.current=e)},[]);return Kr(()=>(i.current=!0,function(){i.current=!1;const e=o.current;e&&cancelAnimationFrame(e)}),[]),Ct(()=>({register:a,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:l}),[a,u,c,l])}(n),D=Ct(()=>(({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>{return C(qn,xr(function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error("production"==='{NODE_ENV:"production"}'.NODE_ENV?w(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=M(...s)(o.dispatch),{...o,dispatch:i}}}((a=n,()=>e=>t=>{Zn(t,"INITIAL_PUBLISH")&&a.dragging(),Zn(t,"DROP_ANIMATE")&&a.dropping(t.payload.completed.result.reason),(Zn(t,"FLUSH")||Zn(t,"DROP_COMPLETE"))&&a.resting(),e(t)}),(e=>()=>t=>n=>{(Zn(n,"DROP_COMPLETE")||Zn(n,"FLUSH")||Zn(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)})(e),(e=>({getState:t,dispatch:n})=>r=>o=>{if(!Zn(o,"LIFT"))return void r(o);const{id:i,clientSelection:a,movementMode:s}=o.payload,l=t();"DROP_ANIMATING"===l.phase&&n(ar({completed:l.completed})),"IDLE"!==t().phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Unexpected phase to start a drag"):yt()),n({type:"FLUSH",payload:null}),n({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:i,movementMode:s}});const c={draggableId:i,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},{critical:u,dimensions:d,viewport:p}=e.startPublishing(c);(function(e,t){"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&function(e){if(e.length<=1)return;const t=e.map(e=>e.descriptor.index),n={};for(let e=1;e<t.length;e++){const r=t[e];r!==t[e-1]+1&&(n[r]=!0)}if(!Object.keys(n).length)return;const r=t.map(e=>Boolean(n[e])?`[🔥${e}]`:`${e}`).join(", ");"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n Detected non-consecutive <Draggable /> indexes.\n\n (This can cause unexpected bugs)\n\n ${r}\n `)}(Jt(e.droppable.id,t.draggables))})(u,d),n({type:"INITIAL_PUBLISH",payload:{critical:u,dimensions:d,clientSelection:a,movementMode:s,viewport:p}})})(e),br,Nr,wr,Or,(e=>t=>n=>r=>{if((e=>Zn(e,"DROP_COMPLETE")||Zn(e,"DROP_ANIMATE")||Zn(e,"FLUSH"))(r))return e.stop(),void n(r);if(Zn(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();return"DRAGGING"!==o.phase&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Expected phase to be DRAGGING after INITIAL_PUBLISH"):yt()),void e.start(o)}n(r),e.scroll(t.getState())})(i),vr,(e=>{let t=!1;return()=>n=>r=>{if(Zn(r,"INITIAL_PUBLISH"))return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if(Zn(r,"FLUSH"))return t=!1,void e.tryRestoreFocusRecorded();if(Zn(r,"DROP_COMPLETE")){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(t),((e,t)=>{const n=((e,t)=>{const n=(()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Could not find timer"):yt());const[r]=e.splice(n,1);r.callback()})(n));e.push({timerId:n,callback:t})},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}})();let r=null;const o=n=>{r||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot fire onDragEnd when there is no matching onDragStart"):yt()),r=null,Er(0,()=>Dr(e().onDragEnd,n,t,xt))};return{beforeCapture:(t,n)=>{r&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot fire onBeforeCapture as a drag start has already been published"):yt()),Er(0,()=>{const r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},beforeStart:(t,n)=>{r&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot fire onBeforeDragStart as a drag start has already been published"):yt()),Er(0,()=>{const r=e().onBeforeDragStart;r&&r(_r(t,n))})},start:(o,i)=>{r&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot fire onBeforeDragStart as a drag start has already been published"):yt());const a=_r(o,i);r={mode:i,lastCritical:o,lastLocation:a.source,lastCombine:null},n.add(()=>{Er(0,()=>Dr(e().onDragStart,a,t,wt))})},update:(o,i)=>{const a=Xt(i),s=Kt(i);r||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot fire onDragMove when onDragStart has not been called"):yt());const l=!((c=o)===(u=r.lastCritical)||c.draggable.id===u.draggable.id&&c.draggable.droppableId===u.draggable.droppableId&&c.draggable.type===u.draggable.type&&c.draggable.index===u.draggable.index&&c.droppable.id===u.droppable.id&&c.droppable.type===u.droppable.type);var c,u;l&&(r.lastCritical=o);const d=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.droppableId===t.droppableId&&e.index===t.index)(r.lastLocation,a);d&&(r.lastLocation=a);const p=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId)(r.lastCombine,s);if(p&&(r.lastCombine=s),!l&&!d&&!p)return;const f={..._r(o,r.mode),combine:s,destination:a};n.add(()=>{Er(0,()=>Dr(e().onDragUpdate,f,t,Ot))})},flush:()=>{r||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Can only flush responders while dragging"):yt()),n.flush()},drop:o,abort:()=>{if(!r)return;const e={..._r(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};o(e)}}})(e,t);return e=>t=>r=>{if(Zn(r,"BEFORE_INITIAL_CAPTURE"))return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if(Zn(r,"INITIAL_PUBLISH")){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if(Zn(r,"DROP_COMPLETE")){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),Zn(r,"FLUSH"))return void n.abort();const o=e.getState();"DRAGGING"===o.phase&&n.update(o.critical,o.impact)}})(r,o))));var a})({announce:f,autoScroller:E,dimensionMarshal:v,focusMarshal:_,getResponders:u,styleMarshal:m}),[f,E,v,_,u,m]);"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&l.current&&l.current!==D&&"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("unexpected store change"),l.current=D;const N=kt(()=>{const e=Uo(l);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),O=kt(()=>{const e=Uo(l).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);r(Ct(()=>({isDragging:O,tryAbort:N}),[O,N]));const x=kt(e=>Tr(Uo(l).getState(),e),[]),S=kt(()=>An(Uo(l).getState()),[]),I=Ct(()=>({marshal:v,focus:_,contextId:n,canLift:x,isMovementAllowed:S,dragHandleUsageInstructionsId:h,registry:y}),[n,v,h,_,x,S,y]);return Wo({contextId:n,store:D,registry:y,customSensors:o||null,enableDefaultSensors:!1!==t.enableDefaultSensors}),e.useEffect(()=>N,[N]),d.default.createElement(po.Provider,{value:I},d.default.createElement(je,{context:ao,store:D},t.children))}function zo(e){const t=d.default.useId(),n=e.dragHandleUsageInstructions||"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n";return d.default.createElement(vt,null,r=>d.default.createElement(Ho,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const qo=(e,t)=>t?dr.drop(t.duration):e?dr.snap:dr.fluid,Zo=(e,t)=>{if(e)return t?0:.7};var Jo=d.default.createContext(null);function Xo(e){e&&ro(e)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"\n provided.innerRef has not been provided with a HTMLElement.\n\n You can find a guide on using the innerRef callback functions at:\n https://github.com/hello-pangea/dnd/blob/main/docs/guides/using-inner-ref.md\n "):yt())}function Ko(t){const n=e.useContext(t);return n||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Could not find required context"):yt()),n}function Qo(e){e.preventDefault()}var ei=(e,t)=>e===t,ti=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function ni(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const ri={mapped:{type:"SECONDARY",offset:Tt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:ni(null)}},oi=Ge(()=>{const e=function(){const e=Ut((e,t)=>({x:e,y:t})),t=Ut((e,t,n=null,r=null,o=null)=>({isDragging:!0,isClone:t,isDropAnimating:Boolean(o),dropAnimation:o,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null})),n=Ut((e,n,r,o,i=null,a=null,s=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:i,combineWith:a,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,o,i,a,null)}}));return(r,o)=>{if(vo(r)){if(r.critical.draggable.id!==o.draggableId)return null;const t=r.current.client.offset,a=r.dimensions.draggables[o.draggableId],s=Mn(r.impact),l=(i=r.impact).at&&"COMBINE"===i.at.type?i.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,a,o.isClone,s,l,c)}var i;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==o.draggableId)return null;const n=o.isClone,i=r.dimensions.draggables[o.draggableId],a=e.result,s=a.mode,l=ti(a),c=(e=>e.combine?e.combine.draggableId:null)(a),u={duration:r.dropDuration,curve:lr,moveTo:r.newHomeClientOffset,opacity:c?0:null,scale:c?.75:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:i,dropping:u,draggingOver:l,combineWith:c,mode:s,forceShouldAnimate:null,snapshot:t(s,n,l,c,u)}}}return null}}(),t=function(){const e=Ut((e,t)=>({x:e,y:t})),t=Ut(ni),n=Ut((e,n=null,r)=>({mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(Tt,e,!0):null,o=(t,o,i,a)=>{const s=i.displaced.visible[t],l=Boolean(a.inVirtualList&&a.effected[t]),c=Kt(i),u=c&&c.draggableId===t?o:null;if(!s){if(!l)return r(u);if(i.displaced.invisible[t])return null;const o=Vt(a.displacedBy.point),s=e(o.x,o.y);return n(s,u,!0)}if(l)return r(u);const d=i.displacedBy.point,p=e(d.x,d.y);return n(p,u,s.shouldAnimate)};return(e,t)=>{if(vo(e))return e.critical.draggable.id===t.draggableId?null:o(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:o(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||ri},{dropAnimationFinished:()=>({type:"DROP_ANIMATION_FINISHED",payload:null})},null,{context:ao,areStatePropsEqual:ei})(t=>{const n=e.useRef(null),r=kt((e=null)=>{n.current=e},[]),o=kt(()=>n.current,[]),{contextId:i,dragHandleUsageInstructionsId:s,registry:l}=Ko(po),{type:c,droppableId:u}=Ko(Jo),p=Ct(()=>({id:t.draggableId,index:t.index,type:c,droppableId:u}),[t.draggableId,t.index,c,u]),{children:f,draggableId:h,isEnabled:m,shouldRespectForcePress:g,canDragInteractiveElements:b,isClone:y,mapped:v,dropAnimationFinished:E}=t;(function(e,t,n){bo(()=>{function r(e){return`Draggable[id: ${e}]: `}const o=e.draggableId;o||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Draggable requires a draggableId"):yt()),"string"!=typeof o&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`Draggable requires a [string] draggableId.\n Provided: [type: ${typeof o}] (value: ${o})`):yt()),Number.isInteger(e.index)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`${r(o)} requires an integer index prop`):yt()),"DRAGGING"!==e.mapped.type&&(Xo(n()),e.isEnabled&&(oo(t,o)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`${r(o)} Unable to find drag handle`):yt())))})})(t,i,o),function(t){go(()=>{const n=e.useRef(t);bo(()=>{t!==n.current&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Draggable isClone prop value changed during component life"):yt())},[t])})}(y),y||function(t){const n=uo("draggable"),{descriptor:r,registry:o,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l}=t,c=Ct(()=>({canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:l}),[a,l,s]),u=kt(e=>{const t=i();return t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot get dimension when no ref is set"):yt()),function(e,t,n=Tt){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=tt(o,r),a=et(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}(r,t,e)},[r,i]),d=Ct(()=>({uniqueId:n,descriptor:r,options:c,getDimension:u}),[r,u,c,n]),p=e.useRef(d),f=e.useRef(!0);Kr(()=>(o.draggable.register(p.current),()=>o.draggable.unregister(p.current)),[o.draggable]),Kr(()=>{if(f.current)return void(f.current=!1);const e=p.current;p.current=d,o.draggable.update(d,e)},[d,o.draggable])}(Ct(()=>({descriptor:p,registry:l,getDraggableRef:o,canDragInteractiveElements:b,shouldRespectForcePress:g,isEnabled:m}),[p,l,o,b,g,m]));const _=Ct(()=>m?{tabIndex:0,role:"button","aria-describedby":s,"data-rfd-drag-handle-draggable-id":h,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:Qo}:null,[i,s,h,m]),D=kt(e=>{"DRAGGING"===v.type&&v.dropping&&"transform"===e.propertyName&&a.flushSync(E)},[E,v]),N=Ct(()=>{const e=function(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:o}=e,i=Boolean(r),a=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),s=Boolean(o),l=s?((e,t)=>{const n=pr(e);if(n)return t?`${n} scale(0.75)`:n})(n,i):fr(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:qo(a,o),transform:l,opacity:Zo(i,s),zIndex:s?4500:5e3,pointerEvents:"none"}}(e):{transform:fr((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}(v);return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":h,style:e,onTransitionEnd:"DRAGGING"===v.type&&v.dropping?D:void 0},dragHandleProps:_}},[i,_,h,v,D,r]),w=Ct(()=>({draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}}),[p.droppableId,p.id,p.index,p.type]);return d.default.createElement(d.default.Fragment,null,f(N,v.snapshot,w))});function ii(e){return Ko(Jo).isUsingCloneFor!==e.draggableId||e.isClone?d.default.createElement(oi,e):null}function ai(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return d.default.createElement(ii,ot({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const si=e=>t=>e===t,li=si("scroll"),ci=si("auto"),ui=si("visible"),di=(e,t)=>t(e.overflowX)||t(e.overflowY),pi=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return di(n,li)||di(n,ci)},fi=e=>null==e?null:e===document.body?(()=>{if("production"==='{NODE_ENV:"production"}'.NODE_ENV)return!1;const e=so(),t=document.documentElement;if(t||yt(),!pi(e))return!1;const n=window.getComputedStyle(t);return(o=ui)((r={overflowX:n.overflowX,overflowY:n.overflowY}).overflowX)&&o(r.overflowY)||"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("\n We have detected that your <body> element might be a scroll container.\n We have found no reliable way of detecting whether the <body> element is a scroll container.\n Under most circumstances a <body> scroll bar will be on the <html> element (document.documentElement)\n\n Because we cannot determine if the <body> is a scroll container, and generally it is not one,\n we will be treating the <body> as *not* a scroll container\n\n More information: https://github.com/hello-pangea/dnd/blob/main/docs/guides/how-we-detect-scroll-containers.md\n "),!1;var r,o})()?e:null:e===document.documentElement?null:pi(e)?e:fi(e.parentElement);var hi=e=>({x:e.scrollLeft,y:e.scrollTop});const mi=e=>!!e&&("fixed"===window.getComputedStyle(e).position||mi(e.parentElement)),gi={passive:!1},bi={passive:!0};var yi=e=>e.shouldPublishImmediately?gi:bi;const vi=e=>e&&e.env.closestScrollable||null;function Ei(){}const _i={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};var Di=d.default.memo(t=>{const n=e.useRef(null),r=kt(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]),{animate:o,onTransitionEnd:i,onClose:a,contextId:s}=t,[l,c]=e.useState("open"===t.animate);e.useEffect(()=>l?"open"!==o?(r(),c(!1),Ei):n.current?Ei:(n.current=setTimeout(()=>{n.current=null,c(!1)}),r):Ei,[o,l,r]);const u=kt(e=>{"height"===e.propertyName&&(i(),"close"===o&&a())},[o,a,i]),p=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=(({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||"close"===n?_i:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin})({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==n?dr.placeholder:null}})({isAnimatingOpenOnMount:l,animate:t.animate,placeholder:t.placeholder});return d.default.createElement(t.placeholder.tagName,{style:p,"data-rfd-placeholder-context-id":s,onTransitionEnd:u,ref:t.innerRef})});function Ni(e){return"boolean"==typeof e}function wi(e,t){t.forEach(t=>t(e))}const Oi=[function({props:e}){e.droppableId||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"A Droppable requires a droppableId prop"):yt()),"string"!=typeof e.droppableId&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,`A Droppable requires a [string] droppableId. Provided: [${typeof e.droppableId}]`):yt())},function({props:e}){Ni(e.isDropDisabled)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"isDropDisabled must be a boolean"):yt()),Ni(e.isCombineEnabled)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"isCombineEnabled must be a boolean"):yt()),Ni(e.ignoreContainerClipping)||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"ignoreContainerClipping must be a boolean"):yt())},function({getDroppableRef:e}){Xo(e())}],xi=[function({props:e,getPlaceholderRef:t}){e.placeholder&&(t()||"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt(`\n Droppable setup issue [droppableId: "${e.droppableId}"]:\n DroppableProvided > placeholder could not be found.\n\n Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.\n More information: https://github.com/hello-pangea/dnd/blob/main/docs/api/droppable.md\n `))}],Si=[function({props:e}){e.renderClone||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Must provide a clone render function (renderClone) for virtual lists"):yt())},function({getPlaceholderRef:e}){e()&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Expected virtual list to not have a placeholder"):yt())}];class Ii extends d.default.PureComponent{constructor(...e){super(...e),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){return this.state.isVisible?this.props.children({onClose:this.onClose,data:this.state.data,animate:this.state.animate}):null}}const Ci={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"document.body is not ready"):yt()),document.body}},ki=e=>{let t,n={...e};for(t in Ci)void 0===e[t]&&(n={...n,[t]:Ci[t]});return n},Ti=(e,t)=>e===t.droppable.type,Mi=(e,t)=>t.draggables[e.draggable.id],Ai=Ge(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=Ut(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=Ut((r,o,i,a,s,l)=>{const c=s.descriptor.id;if(s.descriptor.droppableId===r){const e=l?{render:l,dragging:n(s.descriptor)}:null;return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:{isDraggingOver:i,draggingOverWith:i?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0},useClone:e}}return o?a?{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:i,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0},useClone:null}:e:t});return(n,o)=>{const i=ki(o),a=i.droppableId,s=i.type,l=!i.isDropDisabled,c=i.renderClone;if(vo(n)){const e=n.critical;if(!Ti(s,e))return t;const o=Mi(e,n.dimensions),i=Mn(n.impact)===a;return r(a,l,i,i,o,c)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!Ti(s,e.critical))return t;const o=Mi(e.critical,n.dimensions);return r(a,l,ti(e.result)===a,Mn(e.impact)===a,o,c)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!Ti(s,r.critical))return t;const o=Mn(r.impact)===a,i=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type);return o?i?e:t:r.critical.droppable.id===a?e:t}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},(e,t,n)=>({...ki(n),...e,...t}),{context:ao,areStatePropsEqual:ei})(t=>{const n=e.useContext(po);n||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Could not find app context"):yt());const{contextId:r,isMovementAllowed:o}=n,i=e.useRef(null),a=e.useRef(null),{children:s,droppableId:l,type:c,mode:u,direction:p,ignoreContainerClipping:h,isDropDisabled:m,isCombineEnabled:g,snapshot:b,useClone:y,updateViewportMaxScroll:v,getContainerForClone:E}=t,_=kt(()=>i.current,[]),D=kt((e=null)=>{i.current=e},[]),N=kt(()=>a.current,[]),w=kt((e=null)=>{a.current=e},[]);var O;O={props:t,getDroppableRef:_,getPlaceholderRef:N},bo(()=>{wi(O,Oi),"standard"===O.props.mode&&wi(O,xi),"virtual"===O.props.mode&&wi(O,Si)});const x=kt(()=>{o()&&v({maxScroll:Cr()})},[o,v]);!function(t){const n=e.useRef(null),r=Ko(po),o=uo("droppable"),{registry:i,marshal:a}=r,s=yo(t),l=Ct(()=>({id:t.droppableId,type:t.type,mode:t.mode}),[t.droppableId,t.mode,t.type]),c=e.useRef(l),u=Ct(()=>Ut((e,t)=>{n.current||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Can only update scroll when dragging"):yt()),a.updateDroppableScroll(l.id,{x:e,y:t})}),[l.id,a]),d=kt(()=>{const e=n.current;return e&&e.env.closestScrollable?hi(e.env.closestScrollable):Tt},[]),p=kt(()=>{const e=d();u(e.x,e.y)},[d,u]),f=Ct(()=>rt(p),[p]),h=kt(()=>{const e=n.current,t=vi(e);e&&t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Could not find scroll options while scrolling"):yt()),e.scrollOptions.shouldPublishImmediately?p():f()},[f,p]),m=kt((e,t)=>{n.current&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot collect a droppable while a drag is occurring"):yt());const o=s.current,i=o.getDroppableRef();i||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot collect without a droppable ref"):yt());const a={closestScrollable:fi(c=i),isFixedOnPage:mi(c)};var c;const u={ref:i,descriptor:l,env:a,scrollOptions:t};n.current=u;const d=(({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=n.closestScrollable,c=((e,t)=>{const n=nt(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=qe({top:r,right:o+t.scrollWidth,bottom:r+t.scrollHeight,left:o},n.border);return Xe({borderBox:i,margin:n.margin,border:n.border,padding:n.padding})})(e,l),u=et(c,r),d=(()=>{if(!l)return null;const e=nt(l),t={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:e,page:et(e,r),scroll:hi(l),scrollSize:t,shouldClipSubject:s}})(),p=(({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:e,client:t}=s,n=Sr({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:Tt,displacement:Tt}}}})(),c="vertical"===o?ln:cn;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:jt({page:a,withPlaceholder:null,axis:c,frame:l})}})({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:n.isFixedOnPage,direction:o,client:c,page:u,closest:d});return p})({ref:i,descriptor:l,env:a,windowScroll:e,direction:o.direction,isDropDisabled:o.isDropDisabled,isCombineEnabled:o.isCombineEnabled,shouldClipSubject:!o.ignoreContainerClipping}),p=a.closestScrollable;return p&&(p.setAttribute(Jr.contextId,r.contextId),p.addEventListener("scroll",h,yi(u.scrollOptions)),"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(e=>{e&&fi(e.parentElement)&&"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("\n Droppable: unsupported nested scroll container detected.\n A Droppable can only have one scroll parent (which can be itself)\n Nested scroll containers are currently not supported.\n\n We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131\n ")})(p)),d},[r.contextId,l,h,s]),g=kt(()=>{const e=n.current,t=vi(e);return e&&t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Can only recollect Droppable client for Droppables that have a scroll container"):yt()),hi(t)},[]),b=kt(()=>{const e=n.current;e||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot stop drag when no active drag"):yt());const t=vi(e);n.current=null,t&&(f.cancel(),t.removeAttribute(Jr.contextId),t.removeEventListener("scroll",h,yi(e.scrollOptions)))},[h,f]),y=kt(e=>{const t=n.current;t||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot scroll when there is no drag"):yt());const r=vi(t);r||("production"!=='{NODE_ENV:"production"}'.NODE_ENV?yt(0,"Cannot scroll a droppable with no closest scrollable"):yt()),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),v=Ct(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:g,dragStopped:b,scroll:y}),[b,m,g,y]),E=Ct(()=>({uniqueId:o,descriptor:l,callbacks:v}),[v,l,o]);Kr(()=>(c.current=E.descriptor,i.droppable.register(E),()=>{n.current&&("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&dt("Unsupported: changing the droppableId or type of a Droppable during a drag"),b()),i.droppable.unregister(E)}),[v,l,b,E,a,i.droppable]),Kr(()=>{n.current&&a.updateDroppableIsEnabled(c.current.id,!t.isDropDisabled)},[t.isDropDisabled,a]),Kr(()=>{n.current&&a.updateDroppableIsCombineEnabled(c.current.id,t.isCombineEnabled)},[t.isCombineEnabled,a])}({droppableId:l,type:c,mode:u,direction:p,isDropDisabled:m,isCombineEnabled:g,ignoreContainerClipping:h,getDroppableRef:_});const S=Ct(()=>d.default.createElement(Ii,{on:t.placeholder,shouldAnimate:t.shouldAnimatePlaceholder},({onClose:e,data:t,animate:n})=>d.default.createElement(Di,{placeholder:t,onClose:e,innerRef:w,animate:n,contextId:r,onTransitionEnd:x})),[r,x,t.placeholder,t.shouldAnimatePlaceholder,w]),I=Ct(()=>({innerRef:D,placeholder:S,droppableProps:{"data-rfd-droppable-id":l,"data-rfd-droppable-context-id":r}}),[r,l,S,D]),C=y?y.dragging.draggableId:null,k=Ct(()=>({droppableId:l,type:c,isUsingCloneFor:C}),[l,C,c]);return d.default.createElement(Jo.Provider,{value:k},s(I,b),function(){if(!y)return null;const{dragging:e,render:t}=y,n=d.default.createElement(ii,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return f.default.createPortal(n,E())}())});var Pi,Vi=function(e){var t=e.children;return d.default.createElement(Ai,{droppableId:e.droppableId},function(e,n){return d.default.createElement(i.Box,g({ref:e.innerRef},e.droppableProps,{sx:(r=n.isDraggingOver,{height:"100%",transition:"background-color 0.2s ease",backgroundColor:r?"rgba(0,0,0,0.1)":"transparent"})}),t(e),e.placeholder);var r})},Ri=((Pi={})[t.PresenceStatusEnum.Present]="success.main",Pi[t.PresenceStatusEnum.NotPresent]="error.main",Pi[t.PresenceStatusEnum.PresentElsewhere]="warning.main",Pi),Fi=function(e){return{display:"flex",alignItems:"center",gap:function(e){return e.spacing(1)},opacity:e?.8:1,padding:function(e){return e.spacing(1)},borderBottom:"1px solid rgba(255, 255, 255, 0.15)",boxShadow:"none","&:last-of-type":{borderBottom:"none"}}},Li={name:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},Yi=function(e){var t=e.user,n=e.showPresence,r=e.presenceStatus;return d.default.createElement(ai,{draggableId:e.draggableId,index:e.index},function(e,o){return d.default.createElement(i.Card,g({ref:e.innerRef},e.draggableProps,e.dragHandleProps,{sx:Fi(o.isDragging)}),n&&r&&d.default.createElement(i.Box,{sx:(a=r,{flexShrink:0,width:10,height:10,borderRadius:"50%",backgroundColor:Ri[a]})}),d.default.createElement(i.Typography,{sx:Li.name},t.name));var a})},$i={root:{display:"flex",flexDirection:"column",width:250,flexShrink:0,height:"100%"},header:{display:"flex",padding:function(e){return e.spacing(.5,1)}},action:{display:"flex",alignSelf:"center",margin:function(e){return e.spacing(0,0,0,1)}},count:{fontWeight:"bold"},content:{flexGrow:1,padding:function(e){return e.spacing(.5)}}},Bi=function(e){var t=e.operators,n=r.useTranslation();return d.default.createElement(i.Card,{sx:$i.root},d.default.createElement(i.CardHeader,{title:(0,n.t)("unassignedPool"),action:t.length,slotProps:{title:{variant:"subtitle1"},action:{sx:$i.action}},sx:$i.header}),d.default.createElement(i.CardContent,{sx:$i.content},d.default.createElement(Vi,{droppableId:"pool"},function(){return d.default.createElement(d.default.Fragment,null,t.map(function(e,t){return d.default.createElement(Yi,{key:e.id,user:e,index:t,draggableId:e.id})}))})))},Gi={header:{display:"flex",padding:function(e){return e.spacing(.5,1)},"& .MuiCardHeader-content":{overflowX:"hidden"}},title:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},action:{display:"flex",alignSelf:"center",gap:function(e){return e.spacing(1)},margin:function(e){return e.spacing(0,0,0,1)}},content:{flexGrow:1,padding:function(e){return e.spacing(.5)}}},ji=function(e){var t,n,r,o=e.assignment,a=(t=o.assignedCount-o.recommendedOperators)>0?{text:"+"+t,status:"overcapacity"}:t<0?{text:""+t,status:"missing"}:{text:"OK",status:"ok"};return d.default.createElement(i.Card,{sx:(r=o.isOvercapacity,{display:"flex",flexDirection:"column",flexShrink:0,width:250,minHeight:200,border:r?2:1,borderColor:r?"error.main":"divider"})},d.default.createElement(i.CardHeader,{title:o.workplace.name,action:d.default.createElement(d.default.Fragment,null,d.default.createElement(i.Typography,null,o.assignedCount+"/"+o.recommendedOperators),d.default.createElement(i.Typography,{variant:"caption",sx:(n=a.status,{padding:function(e){return e.spacing(.25)+" "+e.spacing(1)},borderRadius:1,color:"ok"===n?"success.contrastText":"error.contrastText",backgroundColor:"ok"===n?"success.main":"error.main"})},a.text)),slotProps:{title:{variant:"subtitle1",sx:Gi.title},action:{sx:Gi.action}},sx:Gi.header}),d.default.createElement(i.CardContent,{sx:Gi.content},d.default.createElement(Vi,{droppableId:o.workplace.id},function(){return d.default.createElement(d.default.Fragment,null,o.assignedOperators.map(function(e,t){return d.default.createElement(Yi,{key:e.user.id,user:e.user,index:t,draggableId:e.user.id,showPresence:!0,presenceStatus:e.presenceStatus})}))})))},Wi={grid:function(e){return{display:"flex",flexDirection:"column",flexWrap:"wrap",alignContent:"flex-start",gap:e.spacing(1),height:"100%",overflowX:"auto"}}},Ui=function(e){var n=e.data,r=e.viewState,o=e.updateData,a=e.onMutationComplete,s=e.gqlClients.graphqlSdk;return d.default.createElement(zo,{onDragEnd:function(e){if(s){var i=function(e,n){var r=n.source,o=n.destination;if(!o)return null;if(r.droppableId===o.droppableId&&r.index===o.index)return null;var i,a=n.draggableId,s="pool"===r.droppableId,l="pool"===o.droppableId,c=t.PresenceStatusEnum.NotPresent,u=[].concat(e.unassignedOperators),d=e.workplaces.map(function(e){return g({},e,{assignedOperators:[].concat(e.assignedOperators)})});if(s){var p=u.findIndex(function(e){return e.id===a});-1!==p&&(i=u[p],u.splice(p,1))}else{var f=d.find(function(e){return e.workplace.id===r.droppableId});if(f){var h=f.assignedOperators.findIndex(function(e){return e.user.id===a});-1!==h&&(i=f.assignedOperators[h].user,c=f.assignedOperators[h].presenceStatus,f.assignedOperators.splice(h,1))}}if(!i)return null;if(l)u.splice(o.index,0,i);else{var m=d.find(function(e){return e.workplace.id===o.droppableId});m&&m.assignedOperators.splice(o.index,0,{user:i,presenceStatus:c})}return{workplaces:d,unassignedOperators:u}}(n,e);if(i){o(i);var l=e.destination,c=e.draggableId;"pool"===l.droppableId?s.unassignOperator({input:{userId:c,shiftId:r.shift.id,validFrom:r.date}}).then(a).catch(function(){}):s.assignOperator({input:{userId:c,workplaceId:l.droppableId,shiftId:r.shift.id,validFrom:r.date}}).then(a).catch(function(){})}}}},d.default.createElement(i.Box,{sx:Wi.grid},d.default.createElement(Bi,{operators:n.unassignedOperators}),n.workplaces.map(function(e){return d.default.createElement(ji,{key:e.workplace.id,assignment:e})})))},Hi={root:{display:"flex",alignItems:"center",justifyContent:"center",gap:function(e){return e.spacing(2)},marginBottom:function(e){return e.spacing(1)},padding:function(e){return e.spacing(1)},borderBottom:"1px solid #717171",background:"#525860"},label:{minWidth:200,textAlign:"center",color:"rgba(255, 255, 255, 0.65)"}},zi=function(e){var t=e.viewState,n=e.onNavigate;return d.default.createElement(i.Box,{sx:Hi.root},d.default.createElement(i.IconButton,{color:"secondary",onClick:function(){return n("prev")}},d.default.createElement(h.default,null)),d.default.createElement(i.Typography,{sx:Hi.label},t.date," - ",t.shift.name),d.default.createElement(i.IconButton,{color:"secondary",onClick:function(){return n("next")}},d.default.createElement(m.default,null)))},qi={root:{display:"flex",flexDirection:"column",height:"100%"}},Zi=function(t){var n=t.data,o=t.updateData,a=t.gqlClients,s=t.settings,l=r.useTranslation().t,c=e.useState(null),u=c[0],p=c[1],f=a.graphqlSdk;e.useEffect(function(){if(n.shifts.length>0&&!u){var e=_(n.shifts);e&&p(e)}},[n.shifts,u]);var h=e.useRef(null);h.current=function(){f&&u&&o&&f.workplaceAssignments({input:{date:u.date,shiftId:u.shift.id,departmentId:(null==s?void 0:s.departmentId)||void 0}}).then(function(e){return o(e.workplaceAssignments)}).catch(function(){})},e.useEffect(function(){if(u&&f){null==h.current||h.current();var e=setInterval(function(){return null==h.current?void 0:h.current()},1e3*((null==s?void 0:s.refreshInterval)||60));return function(){return clearInterval(e)}}},[u,f,null==s?void 0:s.departmentId,null==s?void 0:s.refreshInterval]);var m=e.useCallback(function(e){if(u){var t=function(e,t,n){var r=t.findIndex(function(t){return t.id===e.shift.id});return"next"===n?r<t.length-1?{date:e.date,shift:t[r+1]}:{date:v(e.date).add(1,"day").format("YYYY-MM-DD"),shift:t[0]}:r>0?{date:e.date,shift:t[r-1]}:{date:v(e.date).subtract(1,"day").format("YYYY-MM-DD"),shift:t[t.length-1]}}(u,n.shifts,e);p(t)}},[u,n.shifts]);return d.default.createElement(i.Box,{sx:qi.root},u?d.default.createElement(d.default.Fragment,null,d.default.createElement(zi,{viewState:u,onNavigate:m}),d.default.createElement(Ui,{data:n,viewState:u,gqlClients:a,updateData:o,onMutationComplete:function(){return null==h.current?void 0:h.current()}})):d.default.createElement(i.Typography,null,l("noShiftsAvailable")))};function Ji(e){this._maxSize=e,this.clear()}Ji.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Ji.prototype.get=function(e){return this._values[e]},Ji.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Xi=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Ki=/^\d+$/,Qi=/^\d/,ea=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,ta=/^\s*(['"]?)(.*?)(\1)\s*$/,na=new Ji(512),ra=new Ji(512),oa=new Ji(512),ia={Cache:Ji,split:sa,normalizePath:aa,setter:function(e){var t=aa(e);return ra.get(e)||ra.set(e,function(e,n){for(var r=0,o=t.length,i=e;r<o-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;i=i[t[r++]]}i[t[r]]=n})},getter:function(e,t){var n=aa(e);return oa.get(e)||oa.set(e,function(e){for(var r=0,o=n.length;r<o;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(la(t)||Ki.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,o,i,a,s=e.length;for(o=0;o<s;o++)(r=e[o])&&(ca(r)&&(r='"'+r+'"'),i=!(a=la(r))&&/^\d+$/.test(r),t.call(n,r,a,i,o,e))}(Array.isArray(e)?e:sa(e),t,n)}};function aa(e){return na.get(e)||na.set(e,sa(e).map(function(e){return e.replace(ta,"$2")}))}function sa(e){return e.match(Xi)||[""]}function la(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function ca(e){return!la(e)&&(function(e){return e.match(Qi)&&!e.match(Ki)}(e)||function(e){return ea.test(e)}(e))}const ua=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,da=e=>e.match(ua)||[];var pa=e=>da(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,""),fa=e=>(e=>da(e).join("_").toLowerCase())(e),ha=function(e){return ma(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}(e),e)};function ma(e,t){var n=e.length,r=new Array(n),o={},i=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}(t),s=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(e,t,i){if(i.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!o[t]){o[t]=!0;var u=a.get(e)||new Set;if(t=(u=Array.from(u)).length){i.add(e);do{var d=u[--t];l(d,s.get(d),i)}while(t);i.delete(e)}r[--n]=e}}}ha.array=ma;const ga=Object.prototype.toString,ba=Error.prototype.toString,ya=RegExp.prototype.toString,va="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",Ea=/^Symbol\((.*)\)(.*)$/;function _a(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return va.call(e).replace(Ea,"Symbol($1)");const r=ga.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+ba.call(e)+"]":"RegExp"===r?ya.call(e):null}function Da(e,t){let n=_a(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=_a(this[e],t);return null!==r?r:n},2)}function Na(e){return null==e?[]:[].concat(e)}let wa,Oa,xa,Sa=/\$\{\s*(\w+)\s*\}/g;wa=Symbol.toStringTag;class Ia{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[wa]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],Na(e).forEach(e=>{Ca.isError(e)?(this.errors.push(...e.errors),this.inner.push(...e.inner.length?e.inner:[e])):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Oa=Symbol.hasInstance,xa=Symbol.toStringTag;class Ca extends Error{static formatError(e,t){return t=Object.assign({},t,{path:t.label||t.path||"this",originalPath:t.path}),"string"==typeof e?e.replace(Sa,(e,n)=>Da(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,o){const i=new Ia(e,t,n,r);if(o)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xa]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ca)}static[Oa](e){return Ia[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let ka={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=null!=r&&r!==n?` (cast from the value \`${Da(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${Da(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Da(n,!0)}\``+o}},Ta={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ma={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Aa={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Pa={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Va={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Da(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Da(n,!0)}\``}return Ca.formatError(ka.notType,e)}};var Ra=Object.assign(Object.create(null),{mixed:ka,string:Ta,number:Ma,date:Aa,object:Pa,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"},tuple:Va});const Fa=e=>e&&e.__isYupSchema__;class La{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:o}=t,i="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new La(e,(e,t)=>{var n;let a=i(...e)?r:o;return null!=(n=null==a?void 0:a(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!Fa(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}class Ya{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&ia.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Ya.prototype.__isYupRef=!0;const $a=e=>null==e;function Ba(e){function t({value:t,path:n="",options:r,originalValue:o,schema:i},a,s){const{name:l,test:c,params:u,message:d,skipAbsent:p}=e;let{parent:f,context:h,abortEarly:m=i.spec.abortEarly,disableStackTrace:g=i.spec.disableStackTrace}=r;const b={value:t,parent:f,context:h};function y(e={}){const r=Ga(Object.assign({value:t,originalValue:o,label:i.spec.label,path:e.path||n,spec:i.spec,disableStackTrace:e.disableStackTrace||g},u,e.params),b),a=new Ca(Ca.formatError(e.message||d,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const v=m?a:s;let E={path:n,parent:f,type:l,from:r.from,createError:y,resolve:e=>ja(e,b),options:r,originalValue:o,schema:i};const _=e=>{Ca.isError(e)?v(e):e?s(null):v(y())},D=e=>{Ca.isError(e)?v(e):a(e)};if(p&&$a(t))return _(!0);let N;try{var w;if(N=c.call(E,t,E),"function"==typeof(null==(w=N)?void 0:w.then)){if(r.sync)throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(_,D)}}catch(e){return void D(e)}_(N)}return t.OPTIONS=e,t}function Ga(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=ja(e[n],t);return e}function ja(e,t){return Ya.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Wa(e,t,n,r=n){let o,i,a;return t?(ia.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s,d="tuple"===(e=e.resolve({context:r,parent:o,value:n})).type,p=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&p>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[p],e=d?e.spec.types[p]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class Ua extends Set{describe(){const e=[];for(const t of this.values())e.push(Ya.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Ua(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function Ha(e,t=new Map){if(Fa(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Ha(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,Ha(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ha(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=Ha(o,t)}return n}function za(e){if(null==e||!e.length)return;const t=[];let n="",r=!1,o=!1;for(let i=0;i<e.length;i++){const a=e[i];"["!==a||o?"]"!==a||o?'"'!==a?"."!==a||r||o?n+=a:n&&(t.push(n),n=""):o=!o:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),r=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),r=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function qa(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:za(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>qa(e,r))}class Za{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ua,this._blacklist=new Ua,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(ka.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Ha(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,o;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(o=e.disableStackTrace)?o:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),r="ignore-optionality"===t.assert,o=n._cast(e,t);if(!1!==t.assert&&!n.isType(o)){if(r&&$a(o))return o;let i=Da(e),a=Da(o);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return o}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,r)=>r.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:o,originalValue:i=e,strict:a=this.spec.strict}=t,s=e;a||(s=this._cast(s,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:o,value:s,originalValue:i,options:t,tests:l},n,e=>{if(e.length)return r(e,s);this.runTests({path:o,value:s,originalValue:i,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:o,value:i,originalValue:a,path:s,options:l}=e,c=e=>{r||(r=!0,t(e,i))},u=e=>{r||(r=!0,n(e,i))},d=o.length,p=[];if(!d)return u([]);let f={value:i,originalValue:a,path:s,options:l,schema:this};for(let e=0;e<o.length;e++)(0,o[e])(f,c,function(e){e&&(Array.isArray(e)?p.push(...e):p.push(e)),--d<=0&&u(p)})}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:o,options:i}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const s="number"==typeof a;let l=n[a];const c=Object.assign({},i,{strict:!0,parent:n,value:l,originalValue:o[a],key:void 0,[s?"index":"key"]:a,path:s||a.includes(".")?`${r||""}[${s?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(c)._validate(l,c,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),o=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,i)=>r._validate(e,t,(e,t)=>{Ca.isError(e)&&(e.value=t),i(e)},(e,t)=>{e.length?i(new Ca(e,t,void 0,void 0,o)):n(t)}))}validateSync(e,t){var n;let r,o=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:o.spec.disableStackTrace;return o._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw Ca.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new Ca(t,e,void 0,void 0,i);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(Ca.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(Ca.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):Ha(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=Ba({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=Ba({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=ka.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=ka.notNull){return this.nullability(!1,e)}required(e=ka.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=ka.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=Ba(t),o=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(o)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=Na(e).map(e=>new Ya(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new La(r,t):La.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=Ba({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=ka.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=Ba({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=ka.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=Ba({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:o,nullable:i}=t.spec;return{meta:r,label:n,optional:o,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?Ga(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})}}get"~standard"(){const e=this;return{version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof Ca)return{issues:qa(e)};throw e}}}}}Za.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Za.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=Wa(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])Za.prototype[e]=Za.prototype.oneOf;for(const e of["not","nope"])Za.prototype[e]=Za.prototype.notOneOf;const Ja=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Xa(e){var t,n;const r=Ja.exec(e);return r?{year:Ka(r[1]),month:Ka(r[2],1)-1,day:Ka(r[3],1),hour:Ka(r[4]),minute:Ka(r[5]),second:Ka(r[6]),millisecond:r[7]?Ka(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Ka(r[10]),minuteOffset:Ka(r[11])}:null}function Ka(e,t=0){return Number(e)||t}let Qa=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,es=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ts=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ns=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),rs=e=>$a(e)||e===e.trim(),os={}.toString();function is(){return new as}class as extends Za{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===os?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||ka.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=Ta.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=Ta.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=Ta.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,o=!1;return t&&("object"==typeof t?({excludeEmptyString:o=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||Ta.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&o||-1!==t.search(e)})}email(e=Ta.email){return this.matches(Qa,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ta.url){return this.matches(es,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ta.uuid){return this.matches(ts,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(ns,{name:"datetime",message:r||Ta.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Ta.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=Xa(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||Ta.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=Xa(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Ta.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:rs})}lowercase(e=Ta.lowercase){return this.transform(e=>$a(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>$a(e)||e===e.toLowerCase()})}uppercase(e=Ta.uppercase){return this.transform(e=>$a(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>$a(e)||e===e.toUpperCase()})}}function ss(){return new ls}is.prototype=as.prototype;class ls extends Za{constructor(){super({type:"number",check:e=>(e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!(e=>e!=+e)(e))}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce)return e;let n=e;if("string"==typeof n){if(n=n.replace(/\s/g,""),""===n)return NaN;n=+n}return this.isType(n)||null===n?n:parseFloat(n)})})}min(e,t=Ma.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t>=this.resolve(e)}})}max(e,t=Ma.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t<=this.resolve(e)}})}lessThan(e,t=Ma.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},skipAbsent:!0,test(t){return t<this.resolve(e)}})}moreThan(e,t=Ma.moreThan){return this.test({message:t,name:"min",exclusive:!0,params:{more:e},skipAbsent:!0,test(t){return t>this.resolve(e)}})}positive(e=Ma.positive){return this.moreThan(0,e)}negative(e=Ma.negative){return this.lessThan(0,e)}integer(e=Ma.integer){return this.test({name:"integer",message:e,skipAbsent:!0,test:e=>Number.isInteger(e)})}truncate(){return this.transform(e=>$a(e)?e:0|e)}round(e){var t;let n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>$a(t)?t:Math[e](t))}}ss.prototype=ls.prototype;let cs=new Date("");class us extends Za{constructor(){super({type:"date",check:e=>"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=Xa(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?us.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(Ya.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=Aa.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=Aa.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function ds(e,t){let n=Infinity;return e.some((e,r)=>{var o;if(null!=(o=t.path)&&o.includes(e))return n=r,!0}),n}function ps(e){return(t,n)=>ds(e,t)-ds(e,n)}us.INVALID_DATE=cs;const fs=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function hs(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=hs(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=hs(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(hs)}):"optional"in e?e.optional():e}let ms=e=>"[object Object]"===Object.prototype.toString.call(e);function gs(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const bs=ps([]);function ys(e){return new vs(e)}class vs extends Za{constructor(e){super({type:"object",check:e=>ms(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=bs,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let o=this.fields,i=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),s={},l=Object.assign({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(const e of a){let n=o[e],a=e in r,u=r[e];if(n){let o;l.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:u,context:t.context,parent:s});let i=n instanceof Za?n.spec:void 0,a=null==i?void 0:i.strict;if(null!=i&&i.strip){c=c||e in r;continue}o=t.__validating&&a?u:n.cast(u,l),void 0!==o&&(s[e]=o)}else a&&!i&&(s[e]=u);a===e in s&&s[e]===u||(c=!0)}return c?s:r}_validate(e,t={},n,r){let{from:o=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...o],t.__validating=!0,t.originalValue=i,super._validate(e,t,n,(e,o)=>{if(!a||!ms(o))return void r(e,o);i=i||o;let s=[];for(let e of this._nodes){let n=this.fields[e];n&&!Ya.isRef(n)&&s.push(n.asNestedTest({options:t,key:e,parent:o,parentPath:t.path,originalParent:i}))}this.runTests({tests:s,value:o,originalValue:i,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),o)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const o=this.fields[n];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[n]})),t[n]=o&&"getDefault"in o?o.getDefault(i):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([e,t])=>`${e}-${t}`));function i(e,t){let i=ia.split(e)[0];r.add(i),o.has(`${t}-${i}`)||n.push([t,i])}for(const t of Object.keys(e)){let n=e[t];r.add(t),Ya.isRef(n)&&n.isSibling?i(n.path,t):Fa(n)&&"deps"in n&&n.deps.forEach(e=>i(e,t))}return ha.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=ps(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return hs(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=ia.getter(e,!0);return this.transform(o=>{if(!o)return o;let i=o;return((e,t)=>{const n=[...ia.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),o=ia.getter(ia.join(n),!0)(e);return!(!o||!(r in o))})(o,e)&&(i=Object.assign({},o),n||delete i[e],i[t]=r(o)),i})}json(){return this.transform(fs)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Pa.exact,test(e){if(null==e)return!0;const t=gs(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=Pa.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=gs(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Pa.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(pa)}snakeCase(){return this.transformKeys(fa)}constantCase(){return this.transformKeys(e=>fa(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[o,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[o]})),n.fields[o]=i.describe(t)}return n}}ys.prototype=vs.prototype;var Es=function(e){var t;return t={mixed:{required:e("This field is required")}},Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{Ra[e][n]=t[e][n]})}),{initialValues:{departmentId:void 0,refreshInterval:60},validationSchema:ys({departmentId:is(),refreshInterval:ss().oneOf([15,30,60]).required()})}},_s=["url","wsUrl","lang","data","settings"];exports.Widget=function(r){var o=r.url,i=r.wsUrl,a=r.lang,s=r.data,l=r.settings,c=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(r,_s),u=t.useGqlClients({url:o,wsUrl:i,lang:a}),p=u.graphqlSdk,f=u.gqlWsClient,h=e.useState(s),m=h[0],y=h[1];return e.useEffect(function(){!s&&p&&Promise.all([p.departments(),p.shifts()]).then(function(e){var t=e[0].departments,n=e[1].shifts,r=_(n);if(r)return p.workplaceAssignments({input:{date:r.date,shiftId:r.shift.id,departmentId:(null==l?void 0:l.departmentId)||void 0}}).then(function(e){return y(g({},e.workplaceAssignments,{departments:t,shifts:n}))})}).catch(function(){})},[s,p,null==l?void 0:l.departmentId]),d.default.createElement(n.BaseWidget,g({lang:a,locales:b,data:m,gqlClients:{graphqlSdk:p,gqlWsClient:f},WidgetView:Zi,getSettingsFormProps:Es,SettingsFormContent:N,version:D,"data-testid":"station-assignment-widget"},c))},exports.extraPermissions=[],exports.getDisplayName=function(e){switch(e){case"en":return"Operator assignment";case"pl":return"Przypisanie operatorów";default:return"station-assignment-widget"}},exports.requiredFeatures=["feature.station-assignment-widget"],exports.version=D;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|